|
@@ -145,18 +145,35 @@ public class MesController extends SuperController<MesNoticeService, Long, MesNo
|
|
|
|
|
|
@ApiOperation(value = "质检结果上报", notes = "质检结果上报")
|
|
|
@PostMapping("/externalApi/qualityResultReport")
|
|
|
- public R QualityResultReport(@RequestBody String data) {
|
|
|
+ public R QualityResultReport(@RequestBody Map<String, String> params) {
|
|
|
log.info("定时================质检结果上报开始================");
|
|
|
// 根据代办的质量任务,查询是否已经检测完成,是,进行上报
|
|
|
+ String instructionUrl="http://192.168.11.37:8080/apis/Schedule/PostBack420TaskCheckData";
|
|
|
+ ThreeCoordinateDto threeCoordinateDto = BeanUtil.mapToBean(params, ThreeCoordinateDto.class, true);
|
|
|
+ String data = JSONObject.toJSONString(threeCoordinateDto);
|
|
|
+ MesNotice mesNotice = MesNotice.builder().orderNo(threeCoordinateDto.getTaskCode()).
|
|
|
+ buType("TASKAPPLY").
|
|
|
+ apiType("QUALITYREPORT").
|
|
|
+ lineCode("407109").
|
|
|
+ status("1").
|
|
|
+ userCode(threeCoordinateDto.getUserCode()).
|
|
|
+ source("产线管控单元").
|
|
|
+ targetSource("数字化检测系统").
|
|
|
+ apiAddress(instructionUrl).
|
|
|
+ acceptPar(data).build();
|
|
|
try {
|
|
|
- MesNotice mesNotice = MesNotice.builder().build();
|
|
|
- mesNotice.setSource("QUALITY");
|
|
|
- baseService.QualityResultReport(mesNotice);
|
|
|
+ boolean b = baseService.addNotice(mesNotice);
|
|
|
} catch (Exception e) {
|
|
|
log.error("质检结果上报失败:" + e);
|
|
|
-
|
|
|
return R.fail(e.getMessage());
|
|
|
}
|
|
|
+ if(!autoPostEnable){
|
|
|
+ mesNotice.setStatus("0");
|
|
|
+ baseService.updateById(mesNotice);
|
|
|
+ String returnData = msgUtil.httpForPost(instructionUrl, data);
|
|
|
+ return R.success(returnData);
|
|
|
+ }
|
|
|
+
|
|
|
log.info("定时================质检结果上报结束================");
|
|
|
return R.success();
|
|
|
|
|
@@ -167,7 +184,7 @@ public class MesController extends SuperController<MesNoticeService, Long, MesNo
|
|
|
public R sendCutterNeedToEop(@RequestBody String data) {
|
|
|
log.info("定时================发送刀具需求给Eop系统开始================");
|
|
|
CutterNeedDto cutterNeedDto = JSONObject.parseObject(data, CutterNeedDto.class);
|
|
|
- MesNotice mesNotice = MesNotice.builder().orderNo(cutterNeedDto.getAUFNR()).buType("TASKDISTRIBUTE").lineCode("11111")
|
|
|
+ MesNotice mesNotice = MesNotice.builder().orderNo(cutterNeedDto.getAUFNR()).buType("TASKDISTRIBUTE").lineCode("407109")
|
|
|
.status("1").apiType("CUTTERNEED").source("PRODUCTION_LINE").targetSource("EOP").acceptPar(JSONObject.toJSONString(data)).build();
|
|
|
try {
|
|
|
boolean b = baseService.addNotice(mesNotice);
|