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 73a76d34..9ad0dac1 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 @@ -138,6 +138,15 @@ public class QcCheckTaskIncome extends BaseEntity { private BigDecimal cNoOkquality; private String updateByName; private String fileList; + private List files; + + public List getFiles() { + return files; + } + + public void setFiles(List files) { + this.files = files; + } public String getUpdateByName() { return updateByName; diff --git a/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckTaskWarehousing.java b/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckTaskWarehousing.java index e186e3db..8d27e183 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckTaskWarehousing.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckTaskWarehousing.java @@ -120,6 +120,24 @@ public class QcCheckTaskWarehousing extends BaseEntity { private String typeCode; private String checkType; private String orderType; + private BigDecimal noOkQuality; + private BigDecimal sampleQuality; + + public BigDecimal getSampleQuality() { + return sampleQuality; + } + + public void setSampleQuality(BigDecimal sampleQuality) { + this.sampleQuality = sampleQuality; + } + + public BigDecimal getNoOkQuality() { + return noOkQuality; + } + + public void setNoOkQuality(BigDecimal noOkQuality) { + this.noOkQuality = noOkQuality; + } public String getOrderType() { return orderType; 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 cdaf2031..acfe46f8 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 @@ -393,9 +393,10 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService { if("material".equals(qcCheckTaskIncome.getTypeCode())) { oaR = this.createLLOA(qcCheckTaskIncome); }else if("produce".equals(qcCheckTaskIncome.getTypeCode())){ - + oaR = this.createProduceOA(qcCheckTaskIncome); }else if("product".equals(qcCheckTaskIncome.getTypeCode())) { - + //TODO;不走OA + oaR.put("code","200"); } if((oaR.get("code").toString()).equals("200")){ @@ -409,14 +410,19 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService { return n ; } - //来料检验不良OA流程 + /*来料检验不良OA流程 + * CQ 厂区、 OEMCM 厂名 、 LLLB 来料类别【0、1】、MATNR 物料编号、MAKTX 物料名称、suppliernum 供应商编码 + * supplier 供应商名称、CHARG 生产批号、comeQty 来料数量、testDate 检验日期 、 JYBH 检验编号、 + * BJY 仓储报检人(OEM产品提报人)、WLLY 物料来源、ZCF 转出方、 ZCOEMCM 转出OEM厂名、 + * memo 不合格情况描述 、PZGLBZG QC主管 + */ private AjaxResult createLLOA(QcCheckTaskIncome qcCheckTaskIncome){ //发起来料检验OA流程 Map paramMap = new HashMap<>(); - paramMap.put("user","999999");//提交人工号qcCheckTaskIncome.getUpdateBy() + paramMap.put("user",qcCheckTaskIncome.getUpdateBy());//提交人工号 paramMap.put("requestLevel",0);//流程紧急度 paramMap.put("requestName","ZL0020-来料检验不合格审批流程(订单:"+qcCheckTaskIncome.getOrderNo()+")");//流程名称 - paramMap.put("workflowId",26234);//该流程对应的唯- workFlowld + paramMap.put("workflowId",26235);//该流程对应的唯- workFlowld StringBuffer mainObject = new StringBuffer(); mainObject.append("{"); @@ -432,38 +438,46 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService { mainObject.append("}"); paramMap.put("mainObject",mainObject.toString()); - logger.info("流程Id 26234:"+ JSONObject.toJSONString(paramMap)); + logger.info("流程Id 26235:"+ JSONObject.toJSONString(paramMap)); AjaxResult oaR = remoteOpenService.OAInspection(paramMap); - logger.info("流程Id 26234:"+ JSONObject.toJSONString(oaR)); + logger.info("流程Id 26235:"+ JSONObject.toJSONString(oaR)); return oaR; } /*生产过程不良OA流程 + * ZL0020-成品检验控制流程:"workflowId": 26234 + * + * --------主表------- * PGBCJ 申请部门/SSCJ 所属车间/ZRPSN报检人/GJZ关键字/SCLX生产类型/OEM OEM厂名/DH 单号/DW单位/MEMO01 不合格描述/ * MEMO03 备注/SFXZG 是否需要QC主管审核/PGZG QC主管 - * PGZRJL 品管主任*/ + * PGZRJL 品管主任 + * ----------明细表--- + * 请求示例:{"colNames":"PROCODE,PRONAME,SCCODE......","details":[{"PROCODE":"","PRONAME":"",.....},{},{},.....]} + * PROCODE 产品编码、PRONAME 产品名称、SCCODE 批次号、SCTOTAL 数量、 + * BJDATE 报检日期、JYCODE 检验编号、JYDATE 检验日期、JYRESULT检验结果:0合格 2不合格、 + * PROCODEBAK 、BZ 备注、CPCYS 产品抽样数(PC)、JYBHGMS 不合格情况描述*/ private AjaxResult createProduceOA(QcCheckTaskIncome qcCheckTaskIncome){ //发起来料检验OA流程 Map paramMap = new HashMap<>(); - paramMap.put("user","999999");//提交人工号qcCheckTaskIncome.getUpdateBy() + paramMap.put("user",qcCheckTaskIncome.getUpdateBy());//提交人工号qcCheckTaskIncome.getUpdateBy() paramMap.put("requestLevel",0);//流程紧急度 paramMap.put("requestName","ZL0010-成品检验控制流程(订单:"+qcCheckTaskIncome.getOrderNo()+")");//流程名称 - paramMap.put("workflowId",26258);//该流程对应的唯- workFlowld + paramMap.put("workflowId",26234);//该流程对应的唯- workFlowld StringBuffer mainObject = new StringBuffer(); mainObject.append("{"); - mainObject.append("\"SSCJ\":"+qcCheckTaskIncome.getFactoryCode());//所属车间 + mainObject.append("\"SSCJ\":"+qcCheckTaskIncome.getSupplierName());//所属车间 mainObject.append(",\"ZRPSN\":"+"\""+qcCheckTaskIncome.getUpdateBy()+"\"");//报检人 mainObject.append(",\"OEM\":"+"\""+qcCheckTaskIncome.getFactoryCode()+"\"");//OEM厂名 - mainObject.append(",\"DH\":"+"\""+qcCheckTaskIncome+"\"");//单号 - mainObject.append(",\"MEMO01\":"+"\""+qcCheckTaskIncome.getSupplierName()+"\"");//不合格情况描述 + mainObject.append(",\"DH\":"+"\""+qcCheckTaskIncome.getWorkorderCodeSap()+"\"");//单号 + //mainObject.append(",\"MEMO01\":"+"\""+qcCheckTaskIncome.getRemarks()+"\"");//不合格情况描述 mainObject.append("}"); paramMap.put("mainObject",mainObject.toString()); - logger.info("流程Id 26258:"+ JSONObject.toJSONString(paramMap)); + logger.info("流程Id 26234:"+ JSONObject.toJSONString(paramMap)); AjaxResult oaR = remoteOpenService.OAInspection(paramMap); - logger.info("流程Id 26258:"+ JSONObject.toJSONString(oaR)); + logger.info("流程Id 26234:"+ JSONObject.toJSONString(oaR)); return oaR; } @Override @@ -623,7 +637,6 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService { unqualified.setFactoryCode(factoryCode); unqualified.setType(checkType); - //发起来料检验OA流程 AjaxResult oaR = new AjaxResult(); if("material".equals(qcCheckTaskIncome.getTypeCode())) { @@ -631,7 +644,8 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService { }else if("produce".equals(qcCheckTaskIncome.getTypeCode())){ oaR = this.createProduceOA(qcCheckTaskIncome); }else if("product".equals(qcCheckTaskIncome.getTypeCode())) { - + //TODO;不走OA + oaR.put("code","200"); } if((oaR.get("code").toString()).equals("200")){ /**qc_check_unqualified**/ diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskWarehousingServiceImpl.java b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskWarehousingServiceImpl.java index 6d879176..af22a9c0 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskWarehousingServiceImpl.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskWarehousingServiceImpl.java @@ -50,7 +50,7 @@ public class QcCheckTaskWarehousingServiceImpl implements IQcCheckTaskWarehousin @Autowired private IQcCheckTaskUserService qcCheckTaskUserService; - + @Autowired private QcCheckTaskIncomeMapper qcCheckTaskIncomeMapper; /** @@ -86,7 +86,6 @@ public class QcCheckTaskWarehousingServiceImpl implements IQcCheckTaskWarehousin * @return 结果 */ @Override - @Transactional(rollbackFor = Exception.class) public int insertQcCheckTaskWarehousing(QcCheckTaskWarehousing qcCheckTaskWarehousing) { if(StringUtils.isNotBlank(qcCheckTaskWarehousing.getFactoryCode())){ @@ -170,11 +169,13 @@ public class QcCheckTaskWarehousingServiceImpl implements IQcCheckTaskWarehousin user.setCreateTime(nowDate); } } + /**qc_check_task_user**/ int m=qcCheckTaskIncomeMapper.addCheckUsers(users); logger.info("检查人新增"+m+"成功"); } - - qcCheckTaskWarehousingMapper.insertQcCheckTaskWarehousing(qcCheckTaskWarehousing); + /**qc_check_task**/ + int n = qcCheckTaskWarehousingMapper.insertQcCheckTaskWarehousing(qcCheckTaskWarehousing); + logger.info("qc_check_task:"+n+"成功"); /**qc_check_task_detail**/ for(QcCheckTaskDetail item:items){ diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcProCheckServiceImpl.java b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcProCheckServiceImpl.java index 9d13d63f..66c3a91d 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcProCheckServiceImpl.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcProCheckServiceImpl.java @@ -131,18 +131,20 @@ public class QcProCheckServiceImpl implements QcProCheckService { DynamicDataSourceContextHolder.push(qcCheckTaskDetail.getFactoryCode()); QcCheckTaskIncome dto = new QcCheckTaskIncome(); List qcCheckTaskDetails =qcCheckTaskIncomeMapper.getCkeckProjectList(qcCheckTaskDetail); + + for(QcCheckTaskDetail qcd:qcCheckTaskDetails){ + List files = qmsFileMapper.getBaseFileBatch(qcd.getRecordId()); + if (CollectionUtils.isNotEmpty(files)) { + qcd.setFiles(files); + } + } + dto.setQcCheckTaskDetails(qcCheckTaskDetails); List defects =qcCheckTaskIncomeMapper.getCkeckDefectList(qcCheckTaskDetail); if(CollectionUtils.isEmpty(defects)){ defects =qcCheckTaskIncomeMapper.getDefectType(qcCheckTaskDetail); } dto.setDefects(defects); - for(QcCheckTaskDetail qcd:qcCheckTaskDetails){ - List files = qmsFileMapper.getBaseFileBatch(qcd.getRecordId()); - if (CollectionUtils.isEmpty(files)) { - qcd.setFiles(files); - } - } return dto; }