Commit 4f71c6f0 by 江和松

修改工序质检单的录入生产入库单逻辑

parent cc1dd8e4
......@@ -184,7 +184,6 @@ public class HGKCTools {
*/
public static void putInStorageCheckData(List<HGZL002> hgzl002List) {
for(HGZL002 hgzl002 : hgzl002List){
AssertUtils.isTrue(hgzl002.getPassQuantity().compareTo(0) <= 0, "合格数量小于等于0!");
AssertUtils.isEmpty(hgzl002.getCompanyCode(), "公司编码不能为空!");
AssertUtils.isEmpty(hgzl002.getCompanyName(), "公司名称不能为空!");
AssertUtils.isEmpty(hgzl002.getProjCode(), "项目编号不能为空!");
......@@ -200,6 +199,8 @@ public class HGKCTools {
*/
public static void putInStorageData(List<HGZL002> hgzl002List) {
List<HGKC003> hgkc003List = new LinkedList<>();
//入库校验
putInStorageCheckData(hgzl002List);
setHgkc003Data(hgzl002List,hgkc003List, null, null);
DaoUtils.insertBatch(HGKC003.INSERT,hgkc003List);
}
......@@ -232,6 +233,9 @@ public class HGKCTools {
//工序质检单
hgkc003.setInvQty(new BigDecimal(o.getPassQuantity()));
}
if(hgkc003.getInvQty().compareTo(BigDecimal.ZERO) == 0){
return;
}
//单重
BigDecimal invUnitWeight = HGPZTools.HgPz005.calcUnitWeight(hgpz005);
hgkc003.setInvUnitWeight(invUnitWeight);
......
......@@ -80,8 +80,6 @@ public class ServiceHGZL002 extends ServiceBase {
public EiInfo save(EiInfo inInfo) {
try {
List<HGZL002> hgzl002List = MapUtils.toDaoEPBase(inInfo,HGZL002.class);
//入库校验
HGKCTools.HgKc003.putInStorageCheckData(hgzl002List);
hgzl002List.forEach( o -> {
o.setCheckStatus(CheckStatusEnum.CHECKED.getCode());
DaoUtils.update(HGZL002.UPDATE,o);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment