oa修改-

master
zhaoxiaolin 1 year ago
parent 976cb28b54
commit 6473691de9

@ -24,5 +24,5 @@ public interface RemoteOpenService {
/**获取流程信息**/
@PostMapping("/openInterface/GetOaNodeInfo")
public AjaxResult GetOaNodeInfo(@RequestParam String requestId);
public AjaxResult GetOaNodeInfo(@RequestParam("requestId") String requestId);
}

@ -25,7 +25,7 @@ public class RemoteOpenFallbackFactory implements FallbackFactory<RemoteOpenServ
}
@Override
public AjaxResult GetOaNodeInfo(@RequestParam String requestId) {
public AjaxResult GetOaNodeInfo(@RequestParam("requestId") String requestId) {
return AjaxResult.error("获取流程失败"+throwable.getMessage());
}
};

@ -146,7 +146,7 @@ public class OpenController extends BaseController {
* @return
*/
@GetMapping("/GetOaNodeInfo")
public AjaxResult GetOaNodeInfo(@RequestParam String requestId) {
public AjaxResult GetOaNodeInfo(@RequestParam("requestId") String requestId) {
return openService.GetOaNodeInfo(requestId);
}

@ -86,6 +86,24 @@ public class QcCheckUnqualified extends BaseEntity {
@Excel(name = "检验时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private String checkTime;
private String checkResult;
private String requestid;
private String typeCode;
public String getTypeCode() {
return typeCode;
}
public void setTypeCode(String typeCode) {
this.typeCode = typeCode;
}
public String getRequestid() {
return requestid;
}
public void setRequestid(String requestid) {
this.requestid = requestid;
}
public String getCheckType() {
return checkType;

@ -382,32 +382,56 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService {
unqualified.setCreateBy(qcCheckTaskIncome.getUpdateBy());
unqualified.setFactoryCode(factoryCode);
unqualified.setType(qcCheckTaskIncome.getCheckType());
/**qc_check_unqualified**/
qcCheckUnqualifiedMapper.insertQcCheckUnqualified(unqualified);
qcCheckTaskIncome.setUpdateBy(SecurityUtils.getUsername());
AjaxResult oaR = new AjaxResult();
if("material".equals(qcCheckTaskIncome.getTypeCode())) {
oaR = this.createLLOA(qcCheckTaskIncome);
}else if("produce".equals(qcCheckTaskIncome.getTypeCode())){
}else if("product".equals(qcCheckTaskIncome.getTypeCode())) {
}
if((oaR.get("code").toString()).equals("200")){
/**qc_check_unqualified**/
qcCheckTaskIncome.setFactoryCode(factoryCode);
unqualified.setRequestid(oaR.get("data").toString());
qcCheckUnqualifiedMapper.insertQcCheckUnqualified(unqualified);
}
//发起来料检验OA流程
Map<String, Object> paramMap = new HashMap<>();
paramMap.put("user","019047");//提交人工号qcCheckTaskIncome.getUpdateBy()
paramMap.put("requestLevel",0);//流程紧急度
paramMap.put("requestName","ZL0010-来料检验不合格审批流程(定单:"+qcCheckTaskIncome.getOrderNo()+")");//流程名称
paramMap.put("workflowld","26258");//该流程对应的唯- workFlowld
StringBuffer mainObject = new StringBuffer();
mainObject.append("{");
mainObject.append("\"CQ\":"+1);//厂区
mainObject.append(",\"LLLB\":"+0);//来料类别【0、1】
mainObject.append(",\"MATNR\":"+"\"000000010101003200\"");//物料编码
//mainObject.append("\"MAKTX\""+MATNR);//物料名称
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 n ;
}
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
StringBuffer mainObject = new StringBuffer();
mainObject.append("{");
mainObject.append("\"CQ\":"+qcCheckTaskIncome.getFactoryCode());//厂区
mainObject.append(",\"LLLB\":"+0);//来料类别【0、1】
mainObject.append(",\"MATNR\":"+"\""+qcCheckTaskIncome.getMaterialCode()+"\"");//物料编码
mainObject.append(",\"MAKTX\":"+"\""+qcCheckTaskIncome.getMaterialName()+"\"");//物料名称
mainObject.append(",\"suppliernum\":"+"\""+qcCheckTaskIncome.getSupplierCode()+"\"");//供应商编码
mainObject.append(",\"supplier\":"+"\""+qcCheckTaskIncome.getSupplierName()+"\"");//供应商名称
mainObject.append(",\"CHARG\":"+"\""+qcCheckTaskIncome.getIncomeBatchNo()+"\"");//生产批号
mainObject.append(",\"comeQty\":"+"\""+qcCheckTaskIncome.getQuality()+"\"");//来料数量
//mainObject.append(",\"memo\":"+"\""+qcCheckTaskIncome.getQuality0()+"\"");//不合格情况描述
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) {
@ -477,7 +501,7 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService {
String updateBy = qcCheckTaskIncome.getUpdateBy();
String belongId = details.get(0).getBelongTo();
String checkType = qcCheckTaskIncome.getCheckType();
qcCheckTaskIncome.setFactoryCode(qcCheckTaskIncome.getFactoryCode().replace("ds_",""));
//默认合格
String result = "Y";
for(QcCheckTaskDetail detail:details){
@ -535,7 +559,7 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService {
}
//不合格处理
if("N".equals(result)){
if("N".equals(result)) {
QcCheckUnqualified unqualified = new QcCheckUnqualified();
unqualified.setId(IdUtils.fastSimpleUUID());
unqualified.setTaskId(belongId);
@ -543,30 +567,24 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService {
unqualified.setCreateBy(updateBy);
unqualified.setFactoryCode(factoryCode);
unqualified.setType(checkType);
/**qc_check_unqualified**/
n = qcCheckUnqualifiedMapper.insertQcCheckUnqualified(unqualified);
logger.info("qc_check_unqualified:"+n);
// //发起来料检验OA流程
// Map<String, Object> paramMap = new HashMap<>();
// paramMap.put("user",updateBy);//提交人工号
// paramMap.put("requestLevel",0);//流程紧急度
// paramMap.put("requestName","ZL0010-来料检验不合格审批流程(定单:"+qcCheckTaskIncome.getOrderNo()+")");//流程名称
// paramMap.put("workflowld","26258");//该流程对应的唯- workFlowld
//
// StringBuffer mainObject = new StringBuffer();
// mainObject.append("{");
// mainObject.append("\"CQ\":"+1);//厂区
// mainObject.append("\"LLLB\":"+0);//来料类别【0、1】
// mainObject.append("\"MATNR\""+"\"000000010101003200\"");//物料编码
// //mainObject.append("\"MAKTX\""+MATNR);//物料名称
// mainObject.append("{");
// paramMap.put("mainObject",mainObject.toString());
//
// AjaxResult oaR = remoteOpenService.OAInspection(paramMap);
// logger.info("流程Id 26258:"+ JSONObject.toJSONString(oaR));
}
//发起来料检验OA流程
AjaxResult oaR = new AjaxResult();
if("material".equals(qcCheckTaskIncome.getTypeCode())) {
oaR = this.createLLOA(qcCheckTaskIncome);
}else if("produce".equals(qcCheckTaskIncome.getTypeCode())){
}else if("product".equals(qcCheckTaskIncome.getTypeCode())) {
}
if((oaR.get("code").toString()).equals("200")){
/**qc_check_unqualified**/
unqualified.setRequestid(oaR.get("data").toString());
n = qcCheckUnqualifiedMapper.insertQcCheckUnqualified(unqualified);
logger.info("qc_check_unqualified:" + n);
}
}
return n ;
}

@ -40,8 +40,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join qc_check_task qct on qcu.task_id = qct.record_id
left join qc_check_type qtn on qtn.id = qct.check_type
<where>
<if test="taskId != null and taskId != ''"> and task_id like concat('%', #{taskId}, '%')</if>
<if test="status != null and status != ''"> and status = #{status}</if>
<if test="orderNo != null and orderNo != ''"> and qct.order_no like concat('%', #{orderNo}, '%')</if>
<if test="checkNo != null and checkNo != ''"> and qct.check_no like concat('%', #{checkNo}, '%')</if>
<if test="nextNodeCode != null and nextNodeCode != ''"> and next_node_code = #{nextNodeCode}</if>
@ -51,7 +49,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and qcu.del_flag = '0'
<if test="checkTimeStart != null "> and CONVERT(varchar(30),qct.check_time, 120) >= #{checkTimeStart}</if>
<if test="checkTimeEnd != null "> and #{checkTimeEnd} > CONVERT(varchar(30),qct.check_time, 120)</if>
<if test="typeCode != null and typeCode != ''"> and qct.type_code = #{typeCode}</if>
<if test="checkType != null and checkType != ''"> and qct.check_type = #{checkType}</if>
</where>
</select>
@ -152,6 +151,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime != null">update_time,</if>
<if test="factoryCode != null and factoryCode != ''">factory_code,</if>
<if test="delFlag != null">del_flag,</if>
<if test="requestid != null">requestid,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
@ -171,6 +171,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime != null">#{updateTime},</if>
<if test="factoryCode != null and factoryCode != ''">#{factoryCode},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="requestid != null">#{requestid},</if>
</trim>
</insert>

Loading…
Cancel
Save