Pārlūkot izejas kodu

fix:更新三坐标参数字段

wang.sq@aliyun.com 1 nedēļu atpakaļ
vecāks
revīzija
4668d76afd

+ 4 - 1
imcs-admin-boot/imcs-authority-server/src/main/java/com/github/zuihou/authority/config/AuthorityWebConfiguration.java

@@ -98,7 +98,10 @@ public class AuthorityWebConfiguration extends BaseConfig implements WebMvcConfi
                 "/cache/**",
                 "/swagger-ui.html**",
                 "/doc.html**",
-                "/api/external-interaction/**"
+                "/api/external-interaction/**",
+                "/mesNotice/externalApi/quality/**",
+                "/mesNotice/externalApi/cutter/**",
+                "/mesNotice/externalApi/order/**"
         };
         return urls;
     }

+ 24 - 4
imcs-admin-boot/imcs-business-controller/src/main/java/com/github/zuihou/business/controller/externalApi/MesController.java

@@ -136,7 +136,7 @@ public class MesController extends SuperController<MesNoticeService, Long, MesNo
 
 
     @ApiOperation(value = "接受质检任务下发通知接口", notes = "接受质检任务下发通知接口")
-    @PostMapping("/externalApi/quality/measuringTaskReceive")
+    @PostMapping("/externalApi/measuringTaskReceive")
     public R addQualityToNotice(@RequestBody String data) {
         log.info("==============接受质检任务下发通知接口开始=================");
         ThreeCoordinateDto threeCoordinateDto = JSONObject.parseObject(data, ThreeCoordinateDto.class);
@@ -155,7 +155,7 @@ public class MesController extends SuperController<MesNoticeService, Long, MesNo
     }
 
     @ApiOperation(value = "质检结果上报", notes = "质检结果上报")
-    @PostMapping("/externalApi/quality/qualityResultReport")
+    @PostMapping("/externalApi/qualityResultReport")
     public  R QualityResultReport(@RequestBody String data){
         log.info("定时================质检结果上报开始================");
         // 根据代办的质量任务,查询是否已经检测完成,是,进行上报
@@ -174,7 +174,7 @@ public class MesController extends SuperController<MesNoticeService, Long, MesNo
     }
 
     @ApiOperation(value = "刀具需求下发给EOP", notes = "刀具需求下发给EOP")
-    @PostMapping("/externalApi/cutter/sendCutterNeedToEop")
+    @PostMapping("/externalApi/sendCutterNeedToEop")
     public  R sendCutterNeedToEop(@RequestBody String data){
         log.info("定时================发送刀具需求给Eop系统开始================");
         CutterNeedDto cutterNeedDto = JSONObject.parseObject(data, CutterNeedDto.class);
@@ -191,7 +191,7 @@ public class MesController extends SuperController<MesNoticeService, Long, MesNo
     }
 
     @ApiOperation(value = "接受刀具分拣结果", notes = "接受刀具分拣结果")
-    @PostMapping("/externalApi/cutter/acceptSortingResult")
+    @PostMapping("/externalApi/acceptSortingResult")
     public  R acceptSortingResult(@RequestBody CutterNeedDto data){
         log.info("定时================质检结果上报开始================");
         // 根据代办的质量任务,查询是否已经检测完成,是,进行上报
@@ -209,7 +209,27 @@ public class MesController extends SuperController<MesNoticeService, Long, MesNo
 
     }
 
+    @ApiOperation(value = "任务下发通知接口", notes = "任务下发通知接口")
+    @PostMapping("/externalApi/order/addMes")
+    public R addNotice(@RequestBody  String data) {
+        log.info("================接受上游系统的任务================");
+
+        log.info("任务数据{}", JSONObject.toJSONString(data));
+        try {
+            JSONObject jsonObject = JSONObject.parseObject(data);
+
+            MesNotice mesNotice = MesNotice.builder().orderNo(jsonObject.getString("workOrderNo")).
+                    buType("TASKDISTRIBUTE").lineCode("11111").status("1").source("QUALITY").apiType("TASKDISTRIBUTE")
+                    .targetSource("PRODUCTION_LINE").acceptPar(data).build();
+            boolean b = baseService.addNotice(mesNotice);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return R.fail(e.getMessage());
+        }
 
+        log.info("================接受上游系统的任务结束================");
+        return R.success();
+    }