|
|
|
|
@ -25,6 +25,7 @@ import com.sun.xml.bind.v2.TODO;
|
|
|
|
|
import org.slf4j.Logger;
|
|
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
import com.op.quality.mapper.QcGoalMapper;
|
|
|
|
|
import com.op.quality.domain.QcGoal;
|
|
|
|
|
@ -45,6 +46,8 @@ import javax.servlet.http.HttpServletRequest;
|
|
|
|
|
@Service
|
|
|
|
|
public class QcGoalServiceImpl implements IQcGoalService {
|
|
|
|
|
protected Logger logger = LoggerFactory.getLogger(getClass());
|
|
|
|
|
@Value("${OA.ZL0030}")
|
|
|
|
|
private String ZL0030;
|
|
|
|
|
@Autowired
|
|
|
|
|
private QcGoalMapper qcGoalMapper;
|
|
|
|
|
// @Autowired
|
|
|
|
|
@ -146,48 +149,48 @@ public class QcGoalServiceImpl implements IQcGoalService {
|
|
|
|
|
return qcGoals;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private AjaxResult createLLOA(QcCheckUnqualified task){
|
|
|
|
|
|
|
|
|
|
//QcCheckTaskIncome detailInfo = qcCheckTaskIncomeMapper.getTaskInfo(task.getTaskId());
|
|
|
|
|
//发起来料检验OA流程
|
|
|
|
|
Map<String, Object> paramMap = new HashMap<>();
|
|
|
|
|
paramMap.put("user",task.getUser());//提交人工号
|
|
|
|
|
paramMap.put("requestLevel",0);//流程紧急度
|
|
|
|
|
paramMap.put("requestName","ZL0010-来料检验不合格控制流程");//流程名称
|
|
|
|
|
paramMap.put("workflowId",113454);//该流程对应的唯- workFlowld
|
|
|
|
|
|
|
|
|
|
if(StringUtils.isEmpty(task.getIncomeBatchNo())){
|
|
|
|
|
task.setIncomeBatchNo(DateUtils.parseDateToStr("yyyyMMdd",new Date()));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
StringBuffer mainObject = new StringBuffer();
|
|
|
|
|
mainObject.append("{");
|
|
|
|
|
mainObject.append("\"SQR\":"+"\""+task.getSqr()+"\"");//申请人--
|
|
|
|
|
mainObject.append(",\"CQ\":"+task.getOaFactory());//厂区--
|
|
|
|
|
mainObject.append(",\"LLLB\":"+task.getMaterialType());//来料类别【0、1】
|
|
|
|
|
mainObject.append(",\"MATNR\":"+"\""+task.getMaterialCode()+"\"");//物料编码
|
|
|
|
|
mainObject.append(",\"MAKTX\":"+"\""+task.getMaterialName()+"\"");//物料名称
|
|
|
|
|
mainObject.append(",\"suppliernum\":"+"\""+task.getSupplierCode()+"\"");//供应商编码
|
|
|
|
|
mainObject.append(",\"supplier\":"+"\""+task.getSupplierName()+"\"");//供应商名称
|
|
|
|
|
mainObject.append(",\"CHARG\":"+"\""+task.getIncomeBatchNo()+"\"");//生产批号
|
|
|
|
|
mainObject.append(",\"comeQty\":"+"\""+task.getQuality()+"\"");//来料数量
|
|
|
|
|
mainObject.append(",\"DW\":"+"\""+task.getUnit()+"\"");//来料单位
|
|
|
|
|
mainObject.append(",\"testDate\":"+"\""+DateUtils.parseDateToStr("yyyy-MM-dd",new Date())+"\"");//检验日期
|
|
|
|
|
mainObject.append(",\"JYBH\":"+"\""+task.getCheckNo()+"\"");//检验编码
|
|
|
|
|
mainObject.append(",\"BJY\":"+"\""+task.getCzbjr()+"\"");//仓储报检人--
|
|
|
|
|
mainObject.append(",\"WLLY\":"+"\""+task.getMaterialFrom()+"\"");//物料来源
|
|
|
|
|
mainObject.append(",\"ZCF\":"+"\""+task.getZcf()+"\"");//转出方
|
|
|
|
|
mainObject.append(",\"ZCOEMCM\":"+"\""+task.getZcoemcm()+"\"");//转出OEM厂名
|
|
|
|
|
mainObject.append(",\"memo\":"+"\""+task.getRemark()+"\"");//不合格描述
|
|
|
|
|
mainObject.append(",\"PZGLBZG\":"+"\""+task.getQczg()+"\"");//qc主管--
|
|
|
|
|
mainObject.append("}");
|
|
|
|
|
|
|
|
|
|
paramMap.put("mainObject",mainObject.toString());
|
|
|
|
|
logger.info("流程Id 113454:"+ JSONObject.toJSONString(paramMap));
|
|
|
|
|
AjaxResult oaR = remoteOpenService.OAInspection(paramMap);
|
|
|
|
|
logger.info("流程Id 113454:"+ JSONObject.toJSONString(oaR));
|
|
|
|
|
return oaR;
|
|
|
|
|
}
|
|
|
|
|
// private AjaxResult createLLOA(QcCheckUnqualified task){
|
|
|
|
|
//
|
|
|
|
|
// //QcCheckTaskIncome detailInfo = qcCheckTaskIncomeMapper.getTaskInfo(task.getTaskId());
|
|
|
|
|
// //发起来料检验OA流程
|
|
|
|
|
// Map<String, Object> paramMap = new HashMap<>();
|
|
|
|
|
// paramMap.put("user",task.getUser());//提交人工号
|
|
|
|
|
// paramMap.put("requestLevel",0);//流程紧急度
|
|
|
|
|
// paramMap.put("requestName","ZL0010-来料检验不合格控制流程");//流程名称
|
|
|
|
|
// paramMap.put("workflowId",113454);//该流程对应的唯- workFlowld
|
|
|
|
|
//
|
|
|
|
|
// if(StringUtils.isEmpty(task.getIncomeBatchNo())){
|
|
|
|
|
// task.setIncomeBatchNo(DateUtils.parseDateToStr("yyyyMMdd",new Date()));
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// StringBuffer mainObject = new StringBuffer();
|
|
|
|
|
// mainObject.append("{");
|
|
|
|
|
// mainObject.append("\"SQR\":"+"\""+task.getSqr()+"\"");//申请人--
|
|
|
|
|
// mainObject.append(",\"CQ\":"+task.getOaFactory());//厂区--
|
|
|
|
|
// mainObject.append(",\"LLLB\":"+task.getMaterialType());//来料类别【0、1】
|
|
|
|
|
// mainObject.append(",\"MATNR\":"+"\""+task.getMaterialCode()+"\"");//物料编码
|
|
|
|
|
// mainObject.append(",\"MAKTX\":"+"\""+task.getMaterialName()+"\"");//物料名称
|
|
|
|
|
// mainObject.append(",\"suppliernum\":"+"\""+task.getSupplierCode()+"\"");//供应商编码
|
|
|
|
|
// mainObject.append(",\"supplier\":"+"\""+task.getSupplierName()+"\"");//供应商名称
|
|
|
|
|
// mainObject.append(",\"CHARG\":"+"\""+task.getIncomeBatchNo()+"\"");//生产批号
|
|
|
|
|
// mainObject.append(",\"comeQty\":"+"\""+task.getQuality()+"\"");//来料数量
|
|
|
|
|
// mainObject.append(",\"DW\":"+"\""+task.getUnit()+"\"");//来料单位
|
|
|
|
|
// mainObject.append(",\"testDate\":"+"\""+DateUtils.parseDateToStr("yyyy-MM-dd",new Date())+"\"");//检验日期
|
|
|
|
|
// mainObject.append(",\"JYBH\":"+"\""+task.getCheckNo()+"\"");//检验编码
|
|
|
|
|
// mainObject.append(",\"BJY\":"+"\""+task.getCzbjr()+"\"");//仓储报检人--
|
|
|
|
|
// mainObject.append(",\"WLLY\":"+"\""+task.getMaterialFrom()+"\"");//物料来源
|
|
|
|
|
// mainObject.append(",\"ZCF\":"+"\""+task.getZcf()+"\"");//转出方
|
|
|
|
|
// mainObject.append(",\"ZCOEMCM\":"+"\""+task.getZcoemcm()+"\"");//转出OEM厂名
|
|
|
|
|
// mainObject.append(",\"memo\":"+"\""+task.getRemark()+"\"");//不合格描述
|
|
|
|
|
// mainObject.append(",\"PZGLBZG\":"+"\""+task.getQczg()+"\"");//qc主管--
|
|
|
|
|
// mainObject.append("}");
|
|
|
|
|
//
|
|
|
|
|
// paramMap.put("mainObject",mainObject.toString());
|
|
|
|
|
// logger.info("流程Id 113454:"+ JSONObject.toJSONString(paramMap));
|
|
|
|
|
// AjaxResult oaR = remoteOpenService.OAInspection(paramMap);
|
|
|
|
|
// logger.info("流程Id 113454:"+ JSONObject.toJSONString(oaR));
|
|
|
|
|
// return oaR;
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
private AjaxResult createProduceOA(QcCheckUnqualified task){
|
|
|
|
|
|
|
|
|
|
@ -197,7 +200,7 @@ public class QcGoalServiceImpl implements IQcGoalService {
|
|
|
|
|
paramMap.put("user",task.getUser());//提交人工号
|
|
|
|
|
paramMap.put("requestLevel",0);//流程紧急度
|
|
|
|
|
paramMap.put("requestName","ZL0030-品质异常流程-智能制造-"+DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss",detailInfo.getIncomeTime())+"(产品名称:"+detailInfo.getMaterialName()+")");//流程名称
|
|
|
|
|
paramMap.put("workflowId",113455);//该流程对应的唯- workFlowld
|
|
|
|
|
paramMap.put("workflowId",ZL0030);//该流程对应的唯- workFlowld
|
|
|
|
|
|
|
|
|
|
StringBuffer mainObject = new StringBuffer();
|
|
|
|
|
mainObject.append("{");
|
|
|
|
|
@ -223,9 +226,9 @@ public class QcGoalServiceImpl implements IQcGoalService {
|
|
|
|
|
mainObject.append("}");
|
|
|
|
|
|
|
|
|
|
paramMap.put("mainObject",mainObject.toString());
|
|
|
|
|
logger.info("流程Id 113455:"+ JSONObject.toJSONString(paramMap));
|
|
|
|
|
logger.info("流程Id :"+ZL0030+ JSONObject.toJSONString(paramMap));
|
|
|
|
|
AjaxResult oaR = remoteOpenService.OAInspection(paramMap);
|
|
|
|
|
logger.info("流程Id 113455:"+ JSONObject.toJSONString(oaR));
|
|
|
|
|
logger.info("流程Id :"+ZL0030+ JSONObject.toJSONString(oaR));
|
|
|
|
|
return oaR;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|