|
@@ -1,11 +1,9 @@
|
|
|
package com.zkqy.business.service.impl;
|
|
|
|
|
|
import java.text.DecimalFormat;
|
|
|
-import java.util.ArrayList;
|
|
|
-import java.util.HashMap;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
+import java.util.*;
|
|
|
|
|
|
+import cn.hutool.core.util.RandomUtil;
|
|
|
import com.zkqy.business.domain.*;
|
|
|
import com.zkqy.business.domain.vo.ProductCodeListVO;
|
|
|
import com.zkqy.business.domain.vo.ProductInvoiceVO;
|
|
@@ -749,6 +747,36 @@ 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();
|
|
@@ -760,6 +788,8 @@ public class ProductInventoryServiceImpl implements IProductInventoryService {
|
|
|
if (productInventoryList.size() == 0) {
|
|
|
return AjaxResult.error("库存不足!");
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
//返回变量
|
|
|
String msg = "";
|
|
|
boolean returnState = false;
|
|
@@ -844,6 +874,7 @@ public class ProductInventoryServiceImpl implements IProductInventoryService {
|
|
|
return AjaxResult.error(msg);
|
|
|
}
|
|
|
// 外层
|
|
|
+
|
|
|
}
|
|
|
|
|
|
//修改销售单状态为已完成
|