OA流程号修改

master
杨万里 2 months ago
parent 3f40e94671
commit 9969de26b1

@ -16,6 +16,7 @@ import com.op.system.api.RemoteOpenService;
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.QcCheckUnqualifiedMapper;
import com.op.quality.domain.QcCheckUnqualified;
@ -30,6 +31,8 @@ import com.op.quality.service.IQcCheckUnqualifiedService;
@Service
public class QcCheckUnqualifiedServiceImpl implements IQcCheckUnqualifiedService {
protected Logger logger = LoggerFactory.getLogger(getClass());
@Value("${OA.ZL0010}")
private String ZL0010;
@Autowired
private QcCheckUnqualifiedMapper qcCheckUnqualifiedMapper;
@ -161,7 +164,7 @@ public class QcCheckUnqualifiedServiceImpl implements IQcCheckUnqualifiedService
public List<OAInfo> getOAInfoList(QcCheckUnqualified qcCheckUnqualified) {
logger.info("查看流程Id"+ qcCheckUnqualified.getTaskId());
AjaxResult oaR = remoteOpenService.GetOaNodeInfo(qcCheckUnqualified.getTaskId());
logger.info("流程Id 113454:"+ JSONObject.toJSONString(oaR));
logger.info("流程Id:"+ZL0010+ JSONObject.toJSONString(oaR));
List<OAInfo> infoList = new ArrayList<>();
if((int)oaR.get("code")==200){
infoList=JSONArray.parseArray(oaR.get("msg").toString(),OAInfo.class);
@ -190,7 +193,7 @@ public class QcCheckUnqualifiedServiceImpl implements IQcCheckUnqualifiedService
paramMap.put("user",task.getUser());//提交人工号
paramMap.put("requestLevel",0);//流程紧急度
paramMap.put("requestName","ZL0010-来料检验不合格控制流程");//流程名称
paramMap.put("workflowId",113454);//该流程对应的唯- workFlowld
paramMap.put("workflowId",ZL0010);//该流程对应的唯- workFlowld
if(StringUtils.isEmpty(task.getIncomeBatchNo())){
task.setIncomeBatchNo(DateUtils.parseDateToStr("yyyyMMdd",new Date()));
@ -219,9 +222,9 @@ public class QcCheckUnqualifiedServiceImpl implements IQcCheckUnqualifiedService
mainObject.append("}");
paramMap.put("mainObject",mainObject.toString());
logger.info("流程Id 113454:"+ JSONObject.toJSONString(paramMap));
logger.info("流程Id :"+ZL0010+ JSONObject.toJSONString(paramMap));
AjaxResult oaR = remoteOpenService.OAInspection(paramMap);
logger.info("流程Id 113454:"+ JSONObject.toJSONString(oaR));
logger.info("流程Id :"+ZL0010+ JSONObject.toJSONString(oaR));
return oaR;
}
/*OA
@ -343,7 +346,7 @@ public class QcCheckUnqualifiedServiceImpl implements IQcCheckUnqualifiedService
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",ZL0010);//该流程对应的唯- workFlowld
StringBuffer mainObject = new StringBuffer();
mainObject.append("{");

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

Loading…
Cancel
Save