@ -856,58 +856,18 @@ public class WmsProductPutServiceImpl implements IWmsProductPutService {
wmsFpStorageNewsSn1 . setActiveFlag ( "1" ) ;
wmsFpStorageNewsSn1 . setProductCode ( wmsSellOutEmbryo1 . getProductCode ( ) ) ;
wmsFpStorageNewsSnMapper . updateWmsFpStorageNewsSnOut ( wmsFpStorageNewsSn1 ) ;
}
//成品销售出库--确认接口---修改出库单,--出库库存
WmsSellOutEmbryo wmsSellOutEmbryo1 = wmsSellOutEmbryoMapper . selectWmsSellOutEmbryoById ( wmsSellOutEmbryo . getId ( ) ) ;
Integer tem = wmsProductPutTrayCodeList . size ( ) ;
BigDecimal OutQuantity = wmsSellOutEmbryo1 . getOutQuantity ( ) . add ( new BigDecimal ( tem ) ) ; //2
int result = wmsSellOutEmbryo1 . getPlanQuantity ( ) . compareTo ( OutQuantity ) ;
WmsSellOutEmbryo wmsSellOutEmbryoUpdate = new WmsSellOutEmbryo ( ) ;
if ( result = = 0 ) { //出库完
wmsSellOutEmbryoUpdate . setStatus ( "1" ) ;
} else {
wmsSellOutEmbryoUpdate . setStatus ( "0" ) ;
}
wmsSellOutEmbryoUpdate . setId ( wmsSellOutEmbryo . getId ( ) ) ;
wmsSellOutEmbryoUpdate . setOutQuantity ( OutQuantity ) ;
wmsSellOutEmbryoMapper . updateWmsSellOutEmbryo ( wmsSellOutEmbryoUpdate ) ;
//订单修改完成
for ( WmsProductPutTrayCode wmsProductPutTrayCode : wmsProductPutTrayCodeList ) { //库存修改
//解除绑定
wmsProductPutTrayCode . setRelatStatus ( "0" ) ;
wmsProductPutTrayCodeMapper . updateWmsProductPutTrayCode ( wmsProductPutTrayCode ) ;
//改明细
WmsFpStorageNewsSn wmsFpStorageNewsSn = new WmsFpStorageNewsSn ( ) ;
wmsFpStorageNewsSn . setSn ( wmsProductPutTrayCode . getSn ( ) ) ;
wmsFpStorageNewsSn . setWlCode ( wmsProductPutTrayCode . getWlCode ( ) ) ;
wmsFpStorageNewsSn . setActiveFlag ( "1" ) ;
wmsFpStorageNewsSn . setProductCode ( wmsSellOutEmbryo1 . getProductCode ( ) ) ;
wmsFpStorageNewsSnMapper . updateWmsFpStorageNewsSnOut ( wmsFpStorageNewsSn ) ;
//判断如果托盘数据被出完,就关闭这个明细
// List<WmsFpStorageNewsSn> wmsFpStorageNewsSns= wmsFpStorageNewsSnMapper.selectWmsFpStorageNewsSnList(wmsFpStorageNewsSn);
if ( wmsFpStorageNewsSns . size ( ) > 0 ) {
WmsFpStorageNewsSn wmsFpStorageNewsSn1 = wmsFpStorageNewsSns . get ( 0 ) ;
BigDecimal ken = new BigDecimal ( wmsFpStorageNewsSn1 . getUserDefined2 ( ) ) ;
int comparisonResult = ken . compareTo ( wmsFpStorageNewsSn1 . getAmount ( ) ) ;
if ( comparisonResult = = 0 ) {
// ken和amount相等
wmsFpStorageNewsSn1 . setActiveFlag ( "0" ) ;
wmsFpStorageNewsSnMapper . updateWmsFpStorageNewsSn ( wmsFpStorageNewsSn1 ) ;
}
}
//改主表
WmsFpStorageNewsSn wmsFpStorageNewsSn2 = wmsFpStorageNewsSnMapper . selectWmsFpStorageNewsSnByStorageId ( wmsFpStorageNewsSn . getStorageId ( ) ) ;
WmsFpStorageNews wmsFpStorageNews = new WmsFpStorageNews ( ) ;
wmsFpStorageNews . setActiveFlag ( "1" ) ;
wmsFpStorageNews . setWlCode ( wms ProductPutTrayCode . getWlCode ( ) ) ;
wmsFpStorageNews . setWlCode ( wmsFpStorageNewsSn2 . getWlCode ( ) ) ;
wmsFpStorageNews . setProductCode ( wmsSellOutEmbryo1 . getProductCode ( ) ) ;
wmsFpStorageNews . setProductBatch ( wmsFpStorageNewsSn2 . getBatchNumber ( ) ) ;
wmsFpStorageNews . setAmount ( wmsFpStorageNewsSn . getAmount ( ) ) ;
wmsFpStorageNews . setWhCode ( wmsFpStorageNewsSn2 . getWhCode ( ) ) ;
wmsFpStorageNews . setWaCode ( wmsFpStorageNewsSn2 . getWaCode ( ) ) ;
wmsFpStorageNewsMapper . updateWmsFpStorageNewsOut ( wmsFpStorageNews ) ;
}
return result1 ;
}
@ -919,7 +879,7 @@ public class WmsProductPutServiceImpl implements IWmsProductPutService {
WmsFpStorageNewsSn wmsFpStorageNewsSn = new WmsFpStorageNewsSn ( ) ;
wmsFpStorageNewsSn . setSn ( wmsProductPutTrayCode . getSn ( ) ) ;
wmsFpStorageNewsSn . setActiveFlag ( "1" ) ;
List < WmsFpStorageNewsSn > wmsFpStorageNewsSns = wmsFpStorageNewsSnMapper . selectWmsFpStorageNewsSn List( wmsFpStorageNewsSn ) ;
List < WmsFpStorageNewsSn > wmsFpStorageNewsSns = wmsFpStorageNewsSnMapper . selectWmsFpStorageNewsSn ST List( wmsFpStorageNewsSn ) ;
return wmsFpStorageNewsSns ;
}