Commit 9e0e782d by 宋祥

1.委外入库单不合格数量时新增整改通知单

parent 2764e964
......@@ -5,8 +5,10 @@ package com.baosight.hggp.common;
* @version 1.0 2024/5/21
*/
public enum CheckTypeEnum {
PROCESS_CHECK(1,"工序质检单"),
POLLING_CHECK(2,"日常巡检单");
POLLING_CHECK(2,"日常巡检单"),
OUTSOURCE_CHECK(3, "委外入库单");
private Integer code;
......
......@@ -82,6 +82,8 @@ public class HGConstant {
public static final String HGZL002_CHECK_CODE = "HGZL002_CHECK_CODE";
//日常巡检
public static final String HGZL003_CHECK_CODE = "HGZL003_CHECK_CODE";
// 整改通知单
public static final String HGZL004_CHECK_CODE = "HGZL004_CHECK_CODE";
//生产任务订单
public static final String PROD_TASK_NO = "PROD_TASK_NO";
//售后维修单号
......
......@@ -7,7 +7,7 @@ package com.baosight.hggp.hg.ct.constant;
public class HgCtConst {
/**
* HPCT01 定义
* HGCT01 定义
*
* @author:songx
* @date:2024/9/24,17:54
......
......@@ -259,8 +259,8 @@ public class ServiceHGZL011 extends ServiceBase {
DaoUtils.insert(HGKC008A.INSERT, newKc008A);
// 修改库存
HGKCUtils.HgKc010.updateInv(dbKc008A.getCompanyCode(), dbKc008A.getWhCode(),
dbKc008A.getInventCode(), newKc008A.getInvQty(), newKc008A.getInvUnitWeight(),
newKc008A.getInvWeight());
dbKc008A.getInventCode(), newKc008A.getInvQty().negate(), newKc008A.getInvUnitWeight(),
newKc008A.getInvWeight().negate());
}
/**
......
......@@ -251,6 +251,9 @@ public class ServiceHGZL012 extends ServiceBase {
}
// 不合格量大于0,更新委外加工
if (fZl012.getUnQualityQty().compareTo(BigDecimal.ZERO) > 0) {
// 生成整改通知单
HGZLTools.THGZL004.addByHGZL012(fZl012);
// 更新委外加工
HGSCTools.Hgsc010a.updateDeliver(dbKc014A.getPcsId(), fZl012.getUnQualityQty());
}
}
......
......@@ -11,6 +11,7 @@ import com.baosight.hggp.hg.kc.tools.HGKCTools;
import com.baosight.hggp.hg.kc.utils.HGKCUtils;
import com.baosight.hggp.hg.zl.constant.HgZlConst;
import com.baosight.hggp.hg.zl.domain.HGZL012;
import com.baosight.hggp.hg.zl.tools.HGZLTools;
import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.BeanUtils;
import com.baosight.hggp.util.CommonMethod;
......
......@@ -21,10 +21,10 @@ import com.baosight.hggp.hg.zl.domain.HGZL004A;
import com.baosight.hggp.hg.zl.domain.HGZL011;
import com.baosight.hggp.hg.zl.domain.HGZL012;
import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.BeanUtils;
import com.baosight.hggp.util.DateUtils;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.BeanUtils;
import java.math.BigDecimal;
import java.util.HashMap;
......@@ -257,7 +257,28 @@ public class HGZLTools {
DaoUtils.insert(HGZL004.INSERT, hgzl004);
}
}
/**
* 生成整改通知单
*
* @param hgZl012
*/
public static void addByHGZL012(HGZL012 hgZl012) {
if (hgZl012.getUnQualityQty().compareTo(BigDecimal.ZERO) < 1) {
return;
}
HGZL004 newZl004 = BeanUtils.copy(hgZl012, HGZL004.class);
newZl004.setCheckId(hgZl012.getId());
newZl004.setCheckType(CheckTypeEnum.OUTSOURCE_CHECK.getCode());
newZl004.setHandleStatus(HandleStatusEnum.UNPROCESS.getCode());
newZl004.setCheckCode(SequenceGenerator.getNextSequence(HGConstant.SequenceId.HGZL002_CHECK_CODE));
newZl004.setCheckBy(UserSessionUtils.getLoginName());
newZl004.setCheckName(UserSessionUtils.getLoginCName());
newZl004.setProductCode(hgZl012.getInventCode());
newZl004.setProductName(hgZl012.getInventName());
DaoUtils.insert(HGZL004.INSERT, newZl004);
}
public static void deleteByCheckIds(List<Long> checkIds,CheckTypeEnum checkType){
List<HGZL004> hgzl004List = listByCheckIds(checkIds,checkType.getCode());
List<Long> ids = hgzl004List.stream().map(HGZL004::getId).collect(Collectors.toList());
......
......@@ -22,24 +22,24 @@
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="checkBy" cname="质检员" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="100" align="center"/>
<EF:EFColumn ename="companyName" cname="公司名称" width="130" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="problemPic" cname="问题照片" width="90" enable="false" align="center"/>
<EF:EFColumn ename="processPic" cname="处理照片" width="90" enable="false" align="center"/>
<EF:EFColumn ename="checkCode" cname="整改单号" width="130" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="companyName" cname="公司名称" width="180" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="projCode" cname="项目编号" width="130" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="projName" cname="项目名称" width="130" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="createdTime" cname="单据日期" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" enable="true" width="120" align="center" readOnly="true"/>
<EF:EFColumn ename="checkCode" cname="检查单号" width="130" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="checkName" cname="质检人" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="groupName" cname="责任部门" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="workName" cname="姓名" width="90" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="productName" cname="产品名称" width="90" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="processName" cname="工序" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="qualityProblem" cname="质量问题描述" width="130" align="center"/>
<EF:EFColumn ename="problemPic" cname="问题照片" width="90" enable="false" align="center"/>
<EF:EFColumn ename="processPic" cname="处理照片" width="90" enable="false" align="center"/>
<EF:EFColumn ename="processSugges" cname="处理意见" width="130" align="center"/>
<EF:EFColumn ename="rectificatSugges" cname="整改措施" width="130" align="center"/>
<EF:EFComboColumn ename="handleStatus" cname="处理状态" width="80" align="center" enable="false"
......
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