Commit eceb8b93 by wuwenlong

Merge remote-tracking branch 'origin/dev' into dev

parents dc9a9fd2 4f71c6f0
...@@ -184,7 +184,6 @@ public class HGKCTools { ...@@ -184,7 +184,6 @@ public class HGKCTools {
*/ */
public static void putInStorageCheckData(List<HGZL002> hgzl002List) { public static void putInStorageCheckData(List<HGZL002> hgzl002List) {
for(HGZL002 hgzl002 : hgzl002List){ for(HGZL002 hgzl002 : hgzl002List){
AssertUtils.isTrue(hgzl002.getPassQuantity().compareTo(0) <= 0, "合格数量小于等于0!");
AssertUtils.isEmpty(hgzl002.getCompanyCode(), "公司编码不能为空!"); AssertUtils.isEmpty(hgzl002.getCompanyCode(), "公司编码不能为空!");
AssertUtils.isEmpty(hgzl002.getCompanyName(), "公司名称不能为空!"); AssertUtils.isEmpty(hgzl002.getCompanyName(), "公司名称不能为空!");
AssertUtils.isEmpty(hgzl002.getProjCode(), "项目编号不能为空!"); AssertUtils.isEmpty(hgzl002.getProjCode(), "项目编号不能为空!");
...@@ -200,6 +199,8 @@ public class HGKCTools { ...@@ -200,6 +199,8 @@ public class HGKCTools {
*/ */
public static void putInStorageData(List<HGZL002> hgzl002List) { public static void putInStorageData(List<HGZL002> hgzl002List) {
List<HGKC003> hgkc003List = new LinkedList<>(); List<HGKC003> hgkc003List = new LinkedList<>();
//入库校验
putInStorageCheckData(hgzl002List);
setHgkc003Data(hgzl002List,hgkc003List, null, null); setHgkc003Data(hgzl002List,hgkc003List, null, null);
DaoUtils.insertBatch(HGKC003.INSERT,hgkc003List); DaoUtils.insertBatch(HGKC003.INSERT,hgkc003List);
} }
...@@ -232,6 +233,9 @@ public class HGKCTools { ...@@ -232,6 +233,9 @@ public class HGKCTools {
//工序质检单 //工序质检单
hgkc003.setInvQty(new BigDecimal(o.getPassQuantity())); hgkc003.setInvQty(new BigDecimal(o.getPassQuantity()));
} }
if(hgkc003.getInvQty().compareTo(BigDecimal.ZERO) == 0){
return;
}
//单重 //单重
BigDecimal invUnitWeight = HGPZTools.HgPz005.calcUnitWeight(hgpz005); BigDecimal invUnitWeight = HGPZTools.HgPz005.calcUnitWeight(hgpz005);
hgkc003.setInvUnitWeight(invUnitWeight); hgkc003.setInvUnitWeight(invUnitWeight);
......
...@@ -82,8 +82,6 @@ public class ServiceHGZL002 extends ServiceBase { ...@@ -82,8 +82,6 @@ public class ServiceHGZL002 extends ServiceBase {
public EiInfo save(EiInfo inInfo) { public EiInfo save(EiInfo inInfo) {
try { try {
List<HGZL002> hgzl002List = MapUtils.toDaoEPBase(inInfo,HGZL002.class); List<HGZL002> hgzl002List = MapUtils.toDaoEPBase(inInfo,HGZL002.class);
//入库校验
HGKCTools.HgKc003.putInStorageCheckData(hgzl002List);
hgzl002List.forEach( o -> { hgzl002List.forEach( o -> {
o.setCheckStatus(CheckStatusEnum.CHECKED.getCode()); o.setCheckStatus(CheckStatusEnum.CHECKED.getCode());
DaoUtils.update(HGZL002.UPDATE,o); 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