质量任务接口修改

master
zhaoxiaolin 1 year ago
parent 3e965d7b70
commit 55fc30ed13

@ -27,7 +27,7 @@ public class QcCheckTaskIncome extends BaseEntity {
private String checkNo;
private String workorderCode;
private String workorderCodeSap;
/** 来料批次号 */
@Excel(name = "批次号")
private String incomeBatchNo;
@ -139,6 +139,14 @@ public class QcCheckTaskIncome extends BaseEntity {
private String fileList;
public String getWorkorderCodeSap() {
return workorderCodeSap;
}
public void setWorkorderCodeSap(String workorderCodeSap) {
this.workorderCodeSap = workorderCodeSap;
}
public String getFileList() {
return fileList;
}

@ -163,6 +163,8 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService {
qcCheckTaskUser.setCheckManCode(splitCodes[i]);
qcCheckTaskUser.setCheckNo(qcCheckTaskIncome.getCheckNo());
qcCheckTaskUser.setBelongTo(beLongId);
qcCheckTaskUser.setFactoryCode(factoryCode);
qcCheckTaskUserList.add(qcCheckTaskUser);
}
//检验人插入
@ -407,14 +409,14 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService {
return n ;
}
//来料检验不良OA流程
private AjaxResult createLLOA(QcCheckTaskIncome qcCheckTaskIncome){
//发起来料检验OA流程
Map<String, Object> paramMap = new HashMap<>();
paramMap.put("user","999999");//提交人工号qcCheckTaskIncome.getUpdateBy()
paramMap.put("requestLevel",0);//流程紧急度
paramMap.put("requestName","ZL0010-来料检验不合格审批流程(订单:"+qcCheckTaskIncome.getOrderNo()+")");//流程名称
paramMap.put("workflowId",26258);//该流程对应的唯- workFlowld
paramMap.put("requestName","ZL0020-来料检验不合格审批流程(订单:"+qcCheckTaskIncome.getOrderNo()+")");//流程名称
paramMap.put("workflowId",26234);//该流程对应的唯- workFlowld
StringBuffer mainObject = new StringBuffer();
mainObject.append("{");
@ -429,13 +431,41 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService {
//mainObject.append(",\"memo\":"+"\""+qcCheckTaskIncome.getQuality0()+"\"");//不合格情况描述
mainObject.append("}");
paramMap.put("mainObject",mainObject.toString());
logger.info("流程Id 26234:"+ JSONObject.toJSONString(paramMap));
AjaxResult oaR = remoteOpenService.OAInspection(paramMap);
logger.info("流程Id 26234:"+ JSONObject.toJSONString(oaR));
return oaR;
}
/*OA
* PGBCJ /SSCJ /ZRPSN/GJZ/SCLX/OEM OEM/DH /DW/MEMO01 /
* MEMO03 /SFXZG QC/PGZG QC
* PGZRJL */
private AjaxResult createProduceOA(QcCheckTaskIncome qcCheckTaskIncome){
//发起来料检验OA流程
Map<String, Object> paramMap = new HashMap<>();
paramMap.put("user","999999");//提交人工号qcCheckTaskIncome.getUpdateBy()
paramMap.put("requestLevel",0);//流程紧急度
paramMap.put("requestName","ZL0010-成品检验控制流程(订单:"+qcCheckTaskIncome.getOrderNo()+")");//流程名称
paramMap.put("workflowId",26258);//该流程对应的唯- workFlowld
StringBuffer mainObject = new StringBuffer();
mainObject.append("{");
mainObject.append("\"SSCJ\":"+qcCheckTaskIncome.getFactoryCode());//所属车间
mainObject.append(",\"ZRPSN\":"+"\""+qcCheckTaskIncome.getUpdateBy()+"\"");//报检人
mainObject.append(",\"OEM\":"+"\""+qcCheckTaskIncome.getFactoryCode()+"\"");//OEM厂名
mainObject.append(",\"DH\":"+"\""+qcCheckTaskIncome+"\"");//单号
mainObject.append(",\"MEMO01\":"+"\""+qcCheckTaskIncome.getSupplierName()+"\"");//不合格情况描述
mainObject.append("}");
paramMap.put("mainObject",mainObject.toString());
logger.info("流程Id 26258:"+ JSONObject.toJSONString(paramMap));
AjaxResult oaR = remoteOpenService.OAInspection(paramMap);
logger.info("流程Id 26258:"+ JSONObject.toJSONString(oaR));
return oaR;
}
@Override
@DS("#header.poolName")
public List<QcDefectType> getDefectList(QcDefectType qcDefectType) {
@ -597,7 +627,7 @@ 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())) {
}

@ -4,6 +4,7 @@ import java.util.Date;
import java.util.List;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder;
import com.op.common.core.utils.DateUtils;
import com.op.common.core.utils.StringUtils;
import com.op.common.core.utils.uuid.IdUtils;
@ -70,7 +71,7 @@ public class QcCheckTaskUserServiceImpl implements IQcCheckTaskUserService {
/**
* --
*
* @param qcCheckTaskUser --
* @param qcCheckTaskUserList --
* @return
*/
@Override
@ -134,10 +135,17 @@ public class QcCheckTaskUserServiceImpl implements IQcCheckTaskUserService {
if (CollectionUtils.isEmpty(qcCheckTaskUserList)){
return 0;
}
String factoryCode = "";
if(StringUtils.isNotBlank(qcCheckTaskUserList.get(0).getFactoryCode())){
DynamicDataSourceContextHolder.push("ds_"+qcCheckTaskUserList.get(0).getFactoryCode());
factoryCode= qcCheckTaskUserList.get(0).getFactoryCode();
}else{
//获取当前所选工厂
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
String key = "#header.poolName";
String factoryCode = request.getHeader(key.substring(8)).replace("ds_", "");
factoryCode = request.getHeader(key.substring(8)).replace("ds_","");
}
//遍历赋值
Date nowTime = DateUtils.getNowDate();
for (QcCheckTaskUser qcCheckTaskUser : qcCheckTaskUserList){

@ -66,6 +66,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="factoryCode" column="factory_code" />
<result property="delFlag" column="del_flag" />
<result property="checkType" column="check_type" />
<result property="workorderCodeSap" column="workorderCodeSap" />
<result property="aNoOkquality" column="aNoOkquality" />
<result property="bNoOkquality" column="bNoOkquality" />
@ -255,10 +256,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
qct.check_status, qct.check_man_code,qct.check_man_name, qct.check_time, qct.check_result,
qct.status,qct.create_by,qct.create_time,qct.check_type,
qct.noOk_quality,qct.aNoOkquality,qct.bNoOkquality,qct.cNoOkquality,qct.sample_quality
,pow.workorder_code_sap workorderCodeSap
from qc_check_task qct
left join qc_check_task_user qctu on qctu.belong_to = qct.record_id
left join pro_order_workorder pow on pow.workorder_code = qct.order_no
<where>
and qct.del_flag = '0'
and qct.del_flag = '0' and pow.del_flag = '0'
<if test="checkType != null and checkType != ''"> and qct.check_type = #{checkType}</if>
<if test="checkManCode != null and checkManCode != ''"> and qctu.check_man_code = #{checkManCode}</if>
<if test="checkStatus != null and checkStatus != ''"> and qct.check_status in (${checkStatus})</if>

@ -150,7 +150,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
)ymdms
from qc_check_task qct
left join qc_check_task_detail qctd on qct.record_id = qctd.belong_to
where qct.order_no = #{orderNo} and qct.check_type = 'checkTypeSCXJ'
where qct.order_no = #{orderNo} and qct.check_type = 'checkTypeSCXJ' and qct.check_status = '2'
order by qctd.create_time
</select>

Loading…
Cancel
Save