|
|
|
@ -835,6 +835,33 @@ public class WmsProductPutServiceImpl implements IWmsProductPutService {
|
|
|
|
|
String result1="出库成功";
|
|
|
|
|
DynamicDataSourceContextHolder.push("ds_" + wmsSellOutEmbryo.getFactoryCode());
|
|
|
|
|
List<WmsProductPutTrayCode> wmsProductPutTrayCodeList= wmsSellOutEmbryo.getWmsProductPutTrayCodeList();
|
|
|
|
|
List<WmsFpStorageNewsSn> wmsFpStorageNewsSns = wmsSellOutEmbryo.getWmsFpStorageNewsSns();
|
|
|
|
|
for (WmsFpStorageNewsSn wmsFpStorageNewsSn:
|
|
|
|
|
wmsFpStorageNewsSns) {
|
|
|
|
|
WmsSellOutEmbryo wmsSellOutEmbryo1 = wmsSellOutEmbryoMapper.selectWmsSellOutEmbryoById(wmsSellOutEmbryo.getId());
|
|
|
|
|
BigDecimal OutQuantity= wmsSellOutEmbryo1.getOutQuantity().add(wmsFpStorageNewsSn.getAmount());//已出加操作
|
|
|
|
|
int result = wmsSellOutEmbryo1.getPlanQuantity().compareTo(OutQuantity);
|
|
|
|
|
WmsSellOutEmbryo wmsSellOutEmbryoUpdate=new WmsSellOutEmbryo();
|
|
|
|
|
if (result == 0){//出库完
|
|
|
|
|
wmsSellOutEmbryoUpdate.setStatus("2");
|
|
|
|
|
}else {
|
|
|
|
|
wmsSellOutEmbryoUpdate.setStatus("1");
|
|
|
|
|
}
|
|
|
|
|
wmsSellOutEmbryoUpdate.setId(wmsSellOutEmbryo.getId());
|
|
|
|
|
wmsSellOutEmbryoUpdate.setOutQuantity(OutQuantity);
|
|
|
|
|
wmsSellOutEmbryoMapper.updateWmsSellOutEmbryo(wmsSellOutEmbryoUpdate);
|
|
|
|
|
WmsFpStorageNewsSn wmsFpStorageNewsSn1=new WmsFpStorageNewsSn();
|
|
|
|
|
wmsFpStorageNewsSn1.setStorageId(wmsFpStorageNewsSn.getStorageId());
|
|
|
|
|
wmsFpStorageNewsSn1.setUserDefined2(wmsFpStorageNewsSn.getAmount().toString());
|
|
|
|
|
wmsFpStorageNewsSn1.setActiveFlag("1");
|
|
|
|
|
wmsFpStorageNewsSn1.setProductCode(wmsSellOutEmbryo1.getProductCode());
|
|
|
|
|
wmsFpStorageNewsSnMapper.updateWmsFpStorageNewsSnOut(wmsFpStorageNewsSn1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//成品销售出库--确认接口---修改出库单,--出库库存
|
|
|
|
|
WmsSellOutEmbryo wmsSellOutEmbryo1 = wmsSellOutEmbryoMapper.selectWmsSellOutEmbryoById(wmsSellOutEmbryo.getId());
|
|
|
|
|
Integer tem= wmsProductPutTrayCodeList.size();
|
|
|
|
@ -862,7 +889,7 @@ public class WmsProductPutServiceImpl implements IWmsProductPutService {
|
|
|
|
|
wmsFpStorageNewsSn.setProductCode(wmsSellOutEmbryo1.getProductCode());
|
|
|
|
|
wmsFpStorageNewsSnMapper.updateWmsFpStorageNewsSnOut(wmsFpStorageNewsSn);
|
|
|
|
|
//判断如果托盘数据被出完,就关闭这个明细
|
|
|
|
|
List<WmsFpStorageNewsSn> wmsFpStorageNewsSns= wmsFpStorageNewsSnMapper.selectWmsFpStorageNewsSnList(wmsFpStorageNewsSn);
|
|
|
|
|
// List<WmsFpStorageNewsSn> wmsFpStorageNewsSns= wmsFpStorageNewsSnMapper.selectWmsFpStorageNewsSnList(wmsFpStorageNewsSn);
|
|
|
|
|
if (wmsFpStorageNewsSns.size()>0){
|
|
|
|
|
WmsFpStorageNewsSn wmsFpStorageNewsSn1= wmsFpStorageNewsSns.get(0);
|
|
|
|
|
|
|
|
|
|