|
|
|
@ -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<String, Object> 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<String, Object> 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**/
|
|
|
|
|