|
@@ -747,36 +747,7 @@ public class ProductInventoryServiceImpl implements IProductInventoryService {
|
|
|
oldProductOutboundRecord.setDelFlag("0");
|
|
|
oldProductOutboundRecordService.insertOldProductOutboundRecord(oldProductOutboundRecord);
|
|
|
|
|
|
- // 成品出库记录
|
|
|
- ProductOutboundRecord productOutboundRecord = new ProductOutboundRecord();
|
|
|
- productOutboundRecord.setQrCode("lkc_"+System.currentTimeMillis());//码单号
|
|
|
- productOutboundRecord.setQrCodeId("lkc_"+ RandomUtil.getSecureRandom().nextInt());//码单标识
|
|
|
- productOutboundRecord.setProductId(item.getProductId());//产品编号
|
|
|
- productOutboundRecord.setCanisterNum(0);//筒数
|
|
|
- productOutboundRecord.setLevels(item.getLevels());//等级
|
|
|
- productOutboundRecord.setBoxNum(item.getOldActualBoxNum());//箱数
|
|
|
- productOutboundRecord.setSuttle(item.getOldActualWeight());//重量
|
|
|
- productOutboundRecord.setMachineTool(Long.parseLong("30"));//机台
|
|
|
- productOutboundRecord.setGrossWeight(item.getOldActualWeight());//毛重
|
|
|
- productOutboundRecord.setPackaging("2");//包装
|
|
|
- productOutboundRecord.setWorkShifts("D甲");//班次
|
|
|
- productOutboundRecord.setForeignTradeNumber("1");//外贸号
|
|
|
- productOutboundRecord.setCanisterWeight(0.0);//筒重
|
|
|
- productOutboundRecord.setBoxWeight(0.0);//箱重
|
|
|
- productOutboundRecord.setTubeColor("塑料管");
|
|
|
- productOutboundRecord.setPrintFormat("4");//打印格式
|
|
|
- productOutboundRecord.setDelFlag("0");
|
|
|
- productOutboundRecord.setCreateById(SecurityUtils.getUserId());
|
|
|
- productOutboundRecord.setCreateBy(SecurityUtils.getUsername());
|
|
|
- productOutboundRecord.setCreateTime(new Date());
|
|
|
- productOutboundRecord.setDepositor(SecurityUtils.getUsername());
|
|
|
- productOutboundRecord.setNoticeNumber(productInvoice.getNoticeNumber());
|
|
|
- productOutboundRecord.setProductColour(item.getProductColor());
|
|
|
- productOutboundRecord.setHistoryBatch(false);
|
|
|
- productOutboundRecord.setBatchNumber(0);
|
|
|
- productOutboundRecord.setConfirmOut(1);
|
|
|
- // 添加成品库存出库记录
|
|
|
- productOutboundRecordMapper.insertProductOutboundRecord(productOutboundRecord);
|
|
|
+
|
|
|
|
|
|
// 得到当前出库货品库存(老库存)
|
|
|
ProductInventory product = new ProductInventory();
|
|
@@ -789,12 +760,12 @@ public class ProductInventoryServiceImpl implements IProductInventoryService {
|
|
|
return AjaxResult.error("库存不足!");
|
|
|
}
|
|
|
|
|
|
-
|
|
|
//返回变量
|
|
|
String msg = "";
|
|
|
boolean returnState = false;
|
|
|
int del = 0;
|
|
|
-
|
|
|
+ int oldBoxNum = 0;
|
|
|
+ Double suttle = 0.0;
|
|
|
// 循环减当前库存
|
|
|
for (int i = 0; i < productInventoryList.size(); i++) {
|
|
|
//当前库存对象
|
|
@@ -867,6 +838,37 @@ public class ProductInventoryServiceImpl implements IProductInventoryService {
|
|
|
if (del == 2) {
|
|
|
editProductInventory.setDelFlag("2");
|
|
|
}
|
|
|
+ // 成品出库记录
|
|
|
+ ProductOutboundRecord productOutboundRecord = new ProductOutboundRecord();
|
|
|
+ productOutboundRecord.setQrCode("lkc_"+System.currentTimeMillis());//码单号
|
|
|
+ productOutboundRecord.setQrCodeId("lkc_"+ RandomUtil.getSecureRandom().nextInt());//码单标识
|
|
|
+ productOutboundRecord.setProductId(item.getProductId());//产品编号
|
|
|
+ productOutboundRecord.setCanisterNum(0);//筒数
|
|
|
+ productOutboundRecord.setLevels(productInventory.getLevels());//等级
|
|
|
+ productOutboundRecord.setLotNum(productInventory.getLotNum());//库存批号
|
|
|
+ productOutboundRecord.setBoxNum(Integer.parseInt(oldProductOutboundRecord.getActualBoxnum()));//箱数
|
|
|
+ productOutboundRecord.setSuttle(Double.parseDouble(oldProductOutboundRecord.getActualWeight()));//重量
|
|
|
+ productOutboundRecord.setMachineTool(Long.parseLong("30"));//机台
|
|
|
+ productOutboundRecord.setGrossWeight(item.getOldActualWeight());//毛重
|
|
|
+ productOutboundRecord.setPackaging("2");//包装
|
|
|
+ productOutboundRecord.setWorkShifts("D甲");//班次
|
|
|
+ productOutboundRecord.setForeignTradeNumber("1");//外贸号
|
|
|
+ productOutboundRecord.setCanisterWeight(0.0);//筒重
|
|
|
+ productOutboundRecord.setBoxWeight(0.0);//箱重
|
|
|
+ productOutboundRecord.setTubeColor("塑料管");
|
|
|
+ productOutboundRecord.setPrintFormat("4");//打印格式
|
|
|
+ productOutboundRecord.setDelFlag("0");
|
|
|
+ productOutboundRecord.setCreateById(SecurityUtils.getUserId());
|
|
|
+ productOutboundRecord.setCreateBy(SecurityUtils.getUsername());
|
|
|
+ productOutboundRecord.setCreateTime(new Date());
|
|
|
+ productOutboundRecord.setDepositor(SecurityUtils.getUsername());
|
|
|
+ productOutboundRecord.setNoticeNumber(productInvoice.getNoticeNumber());
|
|
|
+ productOutboundRecord.setProductColour(item.getProductColor());
|
|
|
+ productOutboundRecord.setHistoryBatch(false);
|
|
|
+ productOutboundRecord.setBatchNumber(0);
|
|
|
+ productOutboundRecord.setConfirmOut(1);
|
|
|
+ // 添加成品库存出库记录
|
|
|
+ productOutboundRecordMapper.insertProductOutboundRecord(productOutboundRecord);
|
|
|
productInventoryMapper.updateProductInventory(editProductInventory);
|
|
|
}
|
|
|
|