From 1038bc3f2791526a2030587c0d698b3a2648aa0c Mon Sep 17 00:00:00 2001 From: zhaoxiaolin Date: Tue, 2 Jul 2024 14:56:40 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B4=A8=E9=87=8Foa?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../op/quality/domain/QcCheckTaskIncome.java | 9 ++ .../op/quality/domain/QcCheckUnqualified.java | 9 ++ .../impl/QcCheckTaskIncomeServiceImpl.java | 91 +++++++++++-------- .../impl/QcCheckUnqualifiedServiceImpl.java | 6 +- 4 files changed, 72 insertions(+), 43 deletions(-) diff --git a/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckTaskIncome.java b/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckTaskIncome.java index 6509c4d2..977572e4 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckTaskIncome.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckTaskIncome.java @@ -202,6 +202,15 @@ public class QcCheckTaskIncome extends BaseEntity { private String sampleCode; private String sampleAql; private String reason; + private String sfgyswt;//是否供应商问题 + + public String getSfgyswt() { + return sfgyswt; + } + + public void setSfgyswt(String sfgyswt) { + this.sfgyswt = sfgyswt; + } public String getSampleAql() { return sampleAql; diff --git a/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckUnqualified.java b/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckUnqualified.java index 79332706..23ab32eb 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckUnqualified.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckUnqualified.java @@ -124,6 +124,15 @@ public class QcCheckUnqualified extends BaseEntity { private String qczg;//QC主管 private String user; private String sqr; + private String sfgyswt;//是否供应商问题 + + public String getSfgyswt() { + return sfgyswt; + } + + public void setSfgyswt(String sfgyswt) { + this.sfgyswt = sfgyswt; + } public String getSqr() { return sqr; diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskIncomeServiceImpl.java b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskIncomeServiceImpl.java index 93c0288f..9ae80d80 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskIncomeServiceImpl.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskIncomeServiceImpl.java @@ -797,52 +797,63 @@ public class QcCheckTaskIncomeServiceImpl implements n = qcCheckUnqualifiedMapper.insertQcCheckUnqualified(unqualified); logger.info("qc_check_unqualified:" + n); if("1".equals(qcCheckTaskIncome.getStartOA())){ - - unqualified.setTypeCode(qcCheckTaskIncome.getTypeCode()); - //不合格描述 - unqualified.setRemark(qcCheckTaskIncome.getRemark()); - //厂区(小榄固定值) - unqualified.setOaFactory("0"); - //来料类别 - unqualified.setMaterialType(qcCheckTaskIncome.getMaterialType()); - //物料来源 - unqualified.setMaterialFrom(qcCheckTaskIncome.getMaterialFrom()); - //物料编号 - unqualified.setMaterialCode(qcCheckTaskIncome.getMaterialCode()); - //物料名称 - unqualified.setMaterialName(qcCheckTaskIncome.getMaterialName()); - //供应商编码 - unqualified.setSupplierCode(qcCheckTaskIncome.getSupplierCode()); - //供应商名称 - unqualified.setSupplierName(qcCheckTaskIncome.getSupplierName()); - //供应商名称 - unqualified.setSupplierName(qcCheckTaskIncome.getSupplierName()); - //生产批号 - unqualified.setIncomeBatchNo(qcCheckTaskIncome.getIncomeBatchNo()); - //来料数量 - unqualified.setQuality(qcCheckTaskIncome.getQuality().toString()); - //来料单位 - unqualified.setUnit(qcCheckTaskIncome.getUnit()); - //检验编号 - unqualified.setCheckNo(qcCheckTaskIncome.getCheckNo()); - //仓储报检人-李爱娟 - unqualified.setCzbjr("284"); - //物料类别 - unqualified.setMaterialType(qcCheckTaskIncome.getMaterialType()); - //物料来源 - unqualified.setMaterialFrom(qcCheckTaskIncome.getMaterialFrom()); - //QC主管-朱继新 - unqualified.setQczg("660"); - //申请人-朱继新 - unqualified.setSqr("660"); - unqualified.setUser(updateBy); - qcCheckUnqualifiedService.updateQcCheckUnqualified(unqualified); + this.setOaFunc(unqualified,qcCheckTaskIncome); } //发送企业微信 this.sendWX(qcCheckTaskIncome); } return 1 ; } + /* 首检巡检都是品质异常流程 + * 成品的是成品检验控制流程 + * 来料的是来料检验不合格流程*/ + private void setOaFunc(QcCheckUnqualified unqualified,QcCheckTaskIncome qcCheckTaskIncome){ + //不合格描述 + unqualified.setRemark(qcCheckTaskIncome.getRemark()); + if("produce".equals(qcCheckTaskIncome.getTypeCode())){ + unqualified.setSfgyswt(qcCheckTaskIncome.getSfgyswt()); + }else if("material".equals(qcCheckTaskIncome.getTypeCode())){ + unqualified.setTypeCode(qcCheckTaskIncome.getTypeCode()); + + //厂区(小榄固定值) + unqualified.setOaFactory("0"); + //来料类别 + unqualified.setMaterialType(qcCheckTaskIncome.getMaterialType()); + //物料来源 + unqualified.setMaterialFrom(qcCheckTaskIncome.getMaterialFrom()); + //物料编号 + unqualified.setMaterialCode(qcCheckTaskIncome.getMaterialCode()); + //物料名称 + unqualified.setMaterialName(qcCheckTaskIncome.getMaterialName()); + //供应商编码 + unqualified.setSupplierCode(qcCheckTaskIncome.getSupplierCode()); + //供应商名称 + unqualified.setSupplierName(qcCheckTaskIncome.getSupplierName()); + //供应商名称 + unqualified.setSupplierName(qcCheckTaskIncome.getSupplierName()); + //生产批号 + unqualified.setIncomeBatchNo(qcCheckTaskIncome.getIncomeBatchNo()); + //来料数量 + unqualified.setQuality(qcCheckTaskIncome.getQuality().toString()); + //来料单位 + unqualified.setUnit(qcCheckTaskIncome.getUnit()); + //检验编号 + unqualified.setCheckNo(qcCheckTaskIncome.getCheckNo()); + //仓储报检人-李爱娟 + unqualified.setCzbjr("284"); + //物料类别 + unqualified.setMaterialType(qcCheckTaskIncome.getMaterialType()); + //物料来源 + unqualified.setMaterialFrom(qcCheckTaskIncome.getMaterialFrom()); + //QC主管-朱继新 + unqualified.setQczg("660"); + //申请人-朱继新 + unqualified.setSqr("660"); + unqualified.setUser(qcCheckTaskIncome.getUpdateBy()); + } + + qcCheckUnqualifiedService.updateQcCheckUnqualified(unqualified); + } protected void sendWX(QcCheckTaskIncome qcCheckTaskIncome){ //发企业微信--------------------开始(跟班组有关) diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckUnqualifiedServiceImpl.java b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckUnqualifiedServiceImpl.java index cae9d89a..0ebebf28 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckUnqualifiedServiceImpl.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckUnqualifiedServiceImpl.java @@ -317,8 +317,8 @@ public class QcCheckUnqualifiedServiceImpl implements IQcCheckUnqualifiedService mainObject.append(",\"CPBM\":"+detailInfo.getMaterialCode());//产品编码 mainObject.append(",\"SQBM\":"+"\"0\"");//0品质保障部 mainObject.append(",\"SQR\":"+"\""+SecurityUtils.getUsername()+"\"");//申请人:默认当前用户 - mainObject.append(",\"SQSJ\":"+"\""+detailInfo.getSupplierCode()+"\"");//申请时间 - mainObject.append(",\"SCCJ\":"+"\""+detailInfo.getSupplierName()+"\"");//所属车间 + mainObject.append(",\"SQSJ\":"+"\""+DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss",detailInfo.getCheckTime())+"\"");//申请时间 + mainObject.append(",\"SCCJ\":"+"\"162\"");//所属车间 mainObject.append(",\"SCPH\":"+"\""+detailInfo.getIncomeBatchNo()+"\"");//生产批号 mainObject.append(",\"SCSL\":"+"\""+detailInfo.getQuality()+"\"");//生产数量 mainObject.append(",\"FXDD\":"+"\""+detailInfo.getCheckLoc()+"\"");//发现地点 @@ -328,7 +328,7 @@ public class QcCheckUnqualifiedServiceImpl implements IQcCheckUnqualifiedService mainObject.append(",\"PZYCMS\":"+"\""+detailInfo.getRemark()+"\"");//品质异常描述 mainObject.append(",\"Notes\":"+"\"\"");//测试备注 mainObject.append(",\"SFXYZG\":"+"\"0\"");//*是否需要主管审核 1否 0是 - mainObject.append(",\"PGZG\":"+"\""+detailInfo.getRemark()+"\"");//QC主管:SFXYZG字段为"是",则此项选择QC主管信息 + mainObject.append(",\"PGZG\":"+"\"660\"");//QC主管:SFXYZG字段为"是",则此项选择QC主管信息 mainObject.append(",\"PGZR\":"+"\"660\"");//质量主管 660:朱继新 mainObject.append(",\"SFGYSWT\":"+"\"1\"");//*是否供应商问题 1非供应商问题 0是供应商问题