Commit 682fc1de by 江和松

修改生产入库代码,以及退回、提交操作逻辑

parent 935a54d9
...@@ -158,7 +158,7 @@ public class ServiceHGKC003 extends ServiceBase { ...@@ -158,7 +158,7 @@ public class ServiceHGKC003 extends ServiceBase {
DaoUtils.update(HGKC003.UPDATE_SUBMIT_STATUS, hgkc003); DaoUtils.update(HGKC003.UPDATE_SUBMIT_STATUS, hgkc003);
//修改计划生产任务完工数量 //修改计划生产任务完工数量
HGSCTools.complete(hgkc003.getQualityId(),hgkc003.getInvQty().intValue(),hgkc003.getRectificationId()); HGSCTools.complete(hgkc003.getQualityId(),hgkc003.getInvQty().intValue(),hgkc003.getRectificationId(),HGConstant.StorageType.RK);
// 修改库存 // 修改库存
HGKCUtils.HgKc010.updateInv(hgkc003.getCompanyCode(), hgkc003.getWhCode(), hgkc003.getPartCode(), HGKCUtils.HgKc010.updateInv(hgkc003.getCompanyCode(), hgkc003.getWhCode(), hgkc003.getPartCode(),
hgkc003.getInvQty(), hgkc003.getInvWeight()); hgkc003.getInvQty(), hgkc003.getInvWeight());
...@@ -244,7 +244,7 @@ public class ServiceHGKC003 extends ServiceBase { ...@@ -244,7 +244,7 @@ public class ServiceHGKC003 extends ServiceBase {
newKc003.setIsReturn(CommonConstant.YesNo.YES_1); newKc003.setIsReturn(CommonConstant.YesNo.YES_1);
DaoUtils.insert(HGKC003.INSERT, newKc003); DaoUtils.insert(HGKC003.INSERT, newKc003);
//修改计划生产任务完工数量 //修改计划生产任务完工数量
HGSCTools.complete(fKc003.getQualityId(),newKc003.getInvQty().intValue(),fKc003.getRectificationId()); HGSCTools.complete(fKc003.getQualityId(),newKc003.getInvQty().intValue(),fKc003.getRectificationId(), HGConstant.StorageType.TH);
// 修改库存 // 修改库存
HGKCUtils.HgKc010.updateInv(newKc003.getCompanyCode(), newKc003.getWhCode(), newKc003.getPartCode(), HGKCUtils.HgKc010.updateInv(newKc003.getCompanyCode(), newKc003.getWhCode(), newKc003.getPartCode(),
newKc003.getInvQty(), newKc003.getInvWeight()); newKc003.getInvQty(), newKc003.getInvWeight());
......
...@@ -81,27 +81,6 @@ ...@@ -81,27 +81,6 @@
<isNotEmpty prepend=" AND " property="projName"> <isNotEmpty prepend=" AND " property="projName">
PROJ_NAME like ('%$projName$%') PROJ_NAME like ('%$projName$%')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtType">
PRDT_TYPE = #prdtType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtCode">
PRDT_CODE = #prdtCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtName">
PRDT_NAME = #prdtName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtLength">
PRDT_LENGTH = #prdtLength#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtWidth">
PRDT_WIDTH = #prdtWidth#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtThick">
PRDT_THICK = #prdtThick#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtSpec">
PRDT_SPEC = #prdtSpec#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partType"> <isNotEmpty prepend=" AND " property="partType">
PART_TYPE = #partType# PART_TYPE = #partType#
</isNotEmpty> </isNotEmpty>
...@@ -191,13 +170,6 @@ ...@@ -191,13 +170,6 @@
PROD_TASK_NO as "prodTaskNo", <!-- 生产任务号 --> PROD_TASK_NO as "prodTaskNo", <!-- 生产任务号 -->
PROJ_CODE as "projCode", <!-- 项目编码 --> PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName", <!-- 项目名称 --> PROJ_NAME as "projName", <!-- 项目名称 -->
PRDT_TYPE as "prdtType", <!-- 产品类型 -->
PRDT_CODE as "prdtCode", <!-- 产品编码 -->
PRDT_NAME as "prdtName", <!-- 产品名称 -->
PRDT_LENGTH as "prdtLength", <!-- 产品-长 -->
PRDT_WIDTH as "prdtWidth", <!-- 产品-宽 -->
PRDT_THICK as "prdtThick", <!-- 产品-厚 -->
PRDT_SPEC as "prdtSpec", <!-- 产品规格 -->
PART_TYPE as "partType", <!-- 零件类型 --> PART_TYPE as "partType", <!-- 零件类型 -->
PART_CODE as "partCode", <!-- 零件编码 --> PART_CODE as "partCode", <!-- 零件编码 -->
PART_NAME as "partName", <!-- 零件名称 --> PART_NAME as "partName", <!-- 零件名称 -->
...@@ -261,13 +233,6 @@ ...@@ -261,13 +233,6 @@
PROD_TASK_NO, <!-- 生产任务号 --> PROD_TASK_NO, <!-- 生产任务号 -->
PROJ_CODE, <!-- 项目编码 --> PROJ_CODE, <!-- 项目编码 -->
PROJ_NAME, <!-- 项目名称 --> PROJ_NAME, <!-- 项目名称 -->
PRDT_TYPE, <!-- 产品类型 -->
PRDT_CODE, <!-- 产品编码 -->
PRDT_NAME, <!-- 产品名称 -->
PRDT_LENGTH, <!-- 产品-长 -->
PRDT_WIDTH, <!-- 产品-宽 -->
PRDT_THICK, <!-- 产品-厚 -->
PRDT_SPEC, <!-- 产品规格 -->
PART_TYPE, <!-- 零件类型 --> PART_TYPE, <!-- 零件类型 -->
PART_CODE, <!-- 零件编码 --> PART_CODE, <!-- 零件编码 -->
PART_NAME, <!-- 零件名称 --> PART_NAME, <!-- 零件名称 -->
...@@ -288,8 +253,7 @@ ...@@ -288,8 +253,7 @@
#companyName#, #depositDate#, #depositNo#, #whCode#, #whName#, #companyName#, #depositDate#, #depositNo#, #whCode#, #whName#,
#invQty#, #invUnitWeight#, #invWeight#, #depositNoOld#, #remark#, #invQty#, #invUnitWeight#, #invWeight#, #depositNoOld#, #remark#,
#factoryCode#, #prodOrderNo#, #prodTaskNo#, #projCode#, #projName#, #factoryCode#, #prodOrderNo#, #prodTaskNo#, #projCode#, #projName#,
#prdtType#, #prdtCode#, #prdtName#, #prdtLength#, #prdtWidth#, #prdtThick#, #partType#, #partCode#, #partName#, #partLength#, #partWidth#,
#prdtSpec#, #partType#, #partCode#, #partName#, #partLength#, #partWidth#,
#partThick#, #partSpec#, #price#, #amount#, #storageType#, #isReturn#,#submitStatus#,#inventTypeDetail#) #partThick#, #partSpec#, #price#, #amount#, #storageType#, #isReturn#,#submitStatus#,#inventTypeDetail#)
</insert> </insert>
...@@ -334,13 +298,6 @@ ...@@ -334,13 +298,6 @@
PROD_TASK_NO = #prodTaskNo#, <!-- 生产任务号 --> PROD_TASK_NO = #prodTaskNo#, <!-- 生产任务号 -->
PROJ_CODE = #projCode#, <!-- 项目编码 --> PROJ_CODE = #projCode#, <!-- 项目编码 -->
PROJ_NAME = #projName#, <!-- 项目名称 --> PROJ_NAME = #projName#, <!-- 项目名称 -->
PRDT_TYPE = #prdtType#, <!-- 产品类型 -->
PRDT_CODE = #prdtCode#, <!-- 产品编码 -->
PRDT_NAME = #prdtName#, <!-- 产品名称 -->
PRDT_LENGTH = #prdtLength#, <!-- 产品-长 -->
PRDT_WIDTH = #prdtWidth#, <!-- 产品-宽 -->
PRDT_THICK = #prdtThick#, <!-- 产品-厚 -->
PRDT_SPEC = #prdtSpec#, <!-- 产品规格 -->
PART_TYPE = #partType#, <!-- 零件类型 --> PART_TYPE = #partType#, <!-- 零件类型 -->
PART_CODE = #partCode#, <!-- 零件编码 --> PART_CODE = #partCode#, <!-- 零件编码 -->
PART_NAME = #partName#, <!-- 零件名称 --> PART_NAME = #partName#, <!-- 零件名称 -->
...@@ -424,13 +381,6 @@ ...@@ -424,13 +381,6 @@
PROD_TASK_NO as "prodTaskNo", <!-- 生产任务号 --> PROD_TASK_NO as "prodTaskNo", <!-- 生产任务号 -->
PROJ_CODE as "projCode", <!-- 项目编码 --> PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName", <!-- 项目名称 --> PROJ_NAME as "projName", <!-- 项目名称 -->
PRDT_TYPE as "prdtType", <!-- 产品类型 -->
PRDT_CODE as "prdtCode", <!-- 产品编码 -->
PRDT_NAME as "prdtName", <!-- 产品名称 -->
PRDT_LENGTH as "prdtLength", <!-- 产品-长 -->
PRDT_WIDTH as "prdtWidth", <!-- 产品-宽 -->
PRDT_THICK as "prdtThick", <!-- 产品-厚 -->
PRDT_SPEC as "prdtSpec", <!-- 产品规格 -->
PART_TYPE as "partType", <!-- 零件类型 --> PART_TYPE as "partType", <!-- 零件类型 -->
PART_CODE as "partCode", <!-- 零件编码 --> PART_CODE as "partCode", <!-- 零件编码 -->
PART_NAME as "partName", <!-- 零件名称 --> PART_NAME as "partName", <!-- 零件名称 -->
......
package com.baosight.hggp.hg.sc.tools; package com.baosight.hggp.hg.sc.tools;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.lang.copier.SrcToDestCopier;
import com.baosight.hggp.common.*; import com.baosight.hggp.common.*;
import com.baosight.hggp.core.constant.CommonConstant; import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoBase; import com.baosight.hggp.core.dao.DaoBase;
...@@ -16,7 +15,6 @@ import com.baosight.hggp.hg.pz.tools.HGPZTools; ...@@ -16,7 +15,6 @@ import com.baosight.hggp.hg.pz.tools.HGPZTools;
import com.baosight.hggp.hg.sc.domain.*; import com.baosight.hggp.hg.sc.domain.*;
import com.baosight.hggp.hg.sj.domain.HGSJ001; import com.baosight.hggp.hg.sj.domain.HGSJ001;
import com.baosight.hggp.hg.sj.tools.HGSJTools; import com.baosight.hggp.hg.sj.tools.HGSJTools;
import com.baosight.hggp.hg.xs.domain.Org;
import com.baosight.hggp.hg.zl.domain.HGZL002; import com.baosight.hggp.hg.zl.domain.HGZL002;
import com.baosight.hggp.hg.zl.domain.HGZL004; import com.baosight.hggp.hg.zl.domain.HGZL004;
import com.baosight.hggp.hg.zl.tools.HGZLTools; import com.baosight.hggp.hg.zl.tools.HGZLTools;
...@@ -36,7 +34,6 @@ import org.apache.commons.lang3.StringUtils; ...@@ -36,7 +34,6 @@ import org.apache.commons.lang3.StringUtils;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.*; import java.util.*;
import java.util.concurrent.atomic.AtomicReference; import java.util.concurrent.atomic.AtomicReference;
import java.util.stream.Collector;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import static com.baosight.hggp.common.AssignStatusEnum.*; import static com.baosight.hggp.common.AssignStatusEnum.*;
...@@ -132,18 +129,21 @@ public class HGSCTools { ...@@ -132,18 +129,21 @@ public class HGSCTools {
} }
public static void complete(Long checkId, Integer completeNum, Long rectificationId){ public static void complete(Long checkId, Integer completeNum, Long rectificationId, Integer storageType){
HGZL002 hgzl002 = HGZLTools.THGZL002.get(checkId); HGZL002 hgzl002 = HGZLTools.THGZL002.get(checkId);
if(Objects.nonNull(rectificationId) && rectificationId.intValue() != 0){ //如果是退回,需要修改整改通知单状态,工序质检单状态
//更新整改通知单状态,工序质检单与整改通知单是2条入库单数据 if(storageType.intValue() == HGConstant.StorageType.TH){
HGZL004 hgzl004 = HGZLTools.THGZL004.get(rectificationId); if(Objects.nonNull(rectificationId) && rectificationId.intValue() != 0){
hgzl004.setHandleStatus(HandleStatusEnum.UNPROCESS.getCode()); //更新整改通知单状态,工序质检单与整改通知单是2条入库单数据
DaoUtils.update(HGZL004.UPDATE,hgzl004); HGZL004 hgzl004 = HGZLTools.THGZL004.get(rectificationId);
}else{ hgzl004.setHandleStatus(HandleStatusEnum.UNPROCESS.getCode());
//整改通知单id为空的入库单才是工序质检单生成的入库单。 DaoUtils.update(HGZL004.UPDATE,hgzl004);
//更新工序质检单状态 }else{
hgzl002.setCheckStatus(CheckStatusEnum.CHECKING.getCode()); //整改通知单id为空的入库单才是工序质检单生成的入库单。
DaoUtils.update(HGZL002.UPDATE,hgzl002); //更新工序质检单状态
hgzl002.setCheckStatus(CheckStatusEnum.CHECKING.getCode());
DaoUtils.update(HGZL002.UPDATE,hgzl002);
}
} }
HGSC008 hgsc008 = THGSC008.getById(hgzl002.getWorkId()); HGSC008 hgsc008 = THGSC008.getById(hgzl002.getWorkId());
HGSC007 hgsc007 = THGSC007.getById(hgsc008.getTaskId()); HGSC007 hgsc007 = THGSC007.getById(hgsc008.getTaskId());
......
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