成品入库检测任务联调

master
zhaoxiaolin 1 year ago
parent 6cc3e25bf0
commit 886cfd442d

@ -138,6 +138,15 @@ public class QcCheckTaskIncome extends BaseEntity {
private BigDecimal cNoOkquality;
private String updateByName;
private String fileList;
private List<BaseFile> files;
public List<BaseFile> getFiles() {
return files;
}
public void setFiles(List<BaseFile> files) {
this.files = files;
}
public String getUpdateByName() {
return updateByName;

@ -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;

@ -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 01MATNR MAKTX suppliernum
* supplier CHARG comeQty testDate JYBH
* BJY OEMWLLY 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 JYRESULT0 2
* PROCODEBAK BZ CPCYS PCJYBHGMS */
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**/

@ -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){

@ -131,18 +131,20 @@ public class QcProCheckServiceImpl implements QcProCheckService {
DynamicDataSourceContextHolder.push(qcCheckTaskDetail.getFactoryCode());
QcCheckTaskIncome dto = new QcCheckTaskIncome();
List<QcCheckTaskDetail> qcCheckTaskDetails =qcCheckTaskIncomeMapper.getCkeckProjectList(qcCheckTaskDetail);
for(QcCheckTaskDetail qcd:qcCheckTaskDetails){
List<BaseFile> files = qmsFileMapper.getBaseFileBatch(qcd.getRecordId());
if (CollectionUtils.isNotEmpty(files)) {
qcd.setFiles(files);
}
}
dto.setQcCheckTaskDetails(qcCheckTaskDetails);
List<QcCheckTaskDefect> defects =qcCheckTaskIncomeMapper.getCkeckDefectList(qcCheckTaskDetail);
if(CollectionUtils.isEmpty(defects)){
defects =qcCheckTaskIncomeMapper.getDefectType(qcCheckTaskDetail);
}
dto.setDefects(defects);
for(QcCheckTaskDetail qcd:qcCheckTaskDetails){
List<BaseFile> files = qmsFileMapper.getBaseFileBatch(qcd.getRecordId());
if (CollectionUtils.isEmpty(files)) {
qcd.setFiles(files);
}
}
return dto;
}

Loading…
Cancel
Save