@ -104,7 +104,8 @@ namespace CowOutputClient
for ( int i = 1 ; i < list . Count ; i + + ) {
for ( int i = 1 ; i < list . Count ; i + + ) {
ProductPlanBL . UpdateButhcerDetailFinish ( list [ i ] . Value ) ;
ProductPlanBL . UpdateButhcerDetailFinish ( list [ i ] . Value ) ;
var result = butDetails . Where ( x = > x . DetailID = = list [ i ] . Value ) ;
var result = butDetails . Where ( x = > x . DetailID = = list [ i ] . Value ) ;
butDetails . Remove ( result . First ( ) ) ;
if ( result . Count ( ) > 0 )
butDetails . Remove ( result . First ( ) ) ;
}
}
var resultList = new List < ButcherDetailData > ( ) ;
var resultList = new List < ButcherDetailData > ( ) ;
foreach ( var item in butDetails ) {
foreach ( var item in butDetails ) {
@ -272,6 +273,8 @@ namespace CowOutputClient
//weight.Weight = goodsWeight.Value;
//weight.Weight = goodsWeight.Value;
weight . SubWeight = tare ;
weight . SubWeight = tare ;
weight . NetWeight = weight . Weight - ( weight . SubWeight ? ? 0 ) ;
weight . NetWeight = weight . Weight - ( weight . SubWeight ? ? 0 ) ;
if ( weight . NetWeight < 0 )
throw new ApplicationException ( "毛重" + weight . Weight + ",皮重" + weight . SubWeight + ",净重" + weight . NetWeight + "小于零,不能录入" ) ;
weight . CreateTime = DateTime . Now ;
weight . CreateTime = DateTime . Now ;
if ( rbSingleWeight . IsChecked = = true )
if ( rbSingleWeight . IsChecked = = true )
weight . ProductNum = 1 ;
weight . ProductNum = 1 ;
@ -281,8 +284,10 @@ namespace CowOutputClient
if ( mButcherDetailData ! = null & & detail . Goods_ID = = mButcherDetailData . Goods_ID ) {
if ( mButcherDetailData ! = null & & detail . Goods_ID = = mButcherDetailData . Goods_ID ) {
weight . ButcDetailID = mButcherDetailData . DetailID ;
weight . ButcDetailID = mButcherDetailData . DetailID ;
finishNum = ( mButcherDetailData . FinishNum ? ? 0 ) + weight . NetWeight ;
finishNum = ( mButcherDetailData . FinishNum ? ? 0 ) + weight . NetWeight ;
if ( finishNum > mButcherDetailData . PlanNumber )
throw new ApplicationException ( "计划数量【" + mButcherDetailData . PlanNumber + "】完工数量【" + finishNum + "】超出【" + ( finishNum - mButcherDetailData . PlanNumber ) + "】" ) ;
if ( finishNum > mButcherDetailData . PlanNumber ) {
var infoWindow = new AutoCloseWindow ( "计划数量【" + mButcherDetailData . PlanNumber + "】完工数量【" + finishNum + "】超出【" + ( finishNum - mButcherDetailData . PlanNumber ) + "】" ) ;
infoWindow . ShowDialog ( ) ;
}
ProductPlanBL . UpdateButhcerDetailFinishNum ( finishNum , mButcherDetailData . DetailID , mButcherDetailData . Goods_ID , she ) ;
ProductPlanBL . UpdateButhcerDetailFinishNum ( finishNum , mButcherDetailData . DetailID , mButcherDetailData . Goods_ID , she ) ;
//weight.DetailSequence = WeightInfoBL.GetCurrentSequence(mButcherDetailData.DetailID);
//weight.DetailSequence = WeightInfoBL.GetCurrentSequence(mButcherDetailData.DetailID);
}
}
@ -429,7 +434,8 @@ namespace CowOutputClient
for ( int i = 1 ; i < list . Count ; i + + ) {
for ( int i = 1 ; i < list . Count ; i + + ) {
ProductPlanBL . UpdateButhcerDetailFinish ( list [ i ] . Value ) ;
ProductPlanBL . UpdateButhcerDetailFinish ( list [ i ] . Value ) ;
var result = butDetails . Where ( x = > x . DetailID = = list [ i ] . Value ) ;
var result = butDetails . Where ( x = > x . DetailID = = list [ i ] . Value ) ;
butDetails . Remove ( result . First ( ) ) ;
if ( result . Count ( ) > 0 )
butDetails . Remove ( result . First ( ) ) ;
}
}
var resultList = new List < ButcherDetailData > ( ) ;
var resultList = new List < ButcherDetailData > ( ) ;
foreach ( var item in butDetails ) {
foreach ( var item in butDetails ) {
@ -441,7 +447,9 @@ namespace CowOutputClient
WindowUtil . Inf ( "生成产出单No." + outputId ) ;
WindowUtil . Inf ( "生成产出单No." + outputId ) ;
}
}
mButcherDetailData = null ;
if ( mButcherDetailData ! = null & & mButcherDetailData . DetailID = = selectedItem . DetailID ) {
mButcherDetailData = null ;
}
//var num = RpcFacade.Call<int>("/MainSystem/B3_HaoYue/Rpcs/B3CowButcherManageRpc/FinishButcherDetail", selectedItem.DetailID);
//var num = RpcFacade.Call<int>("/MainSystem/B3_HaoYue/Rpcs/B3CowButcherManageRpc/FinishButcherDetail", selectedItem.DetailID);
//if (num == 1) {
//if (num == 1) {
// ProductPlanBL.UpdateButhcerDetailFinish(selectedItem.DetailID);
// ProductPlanBL.UpdateButhcerDetailFinish(selectedItem.DetailID);