From d799fbde44cc568a3e15d78dc6e582ff244ffa89 Mon Sep 17 00:00:00 2001
From: zhoushihao <zsh19950802@163.com>
Date: 星期六, 29 三月 2025 16:05:44 +0800
Subject: [PATCH] 1、卧式理片重置任务调整,避免无任务情况下无法将任务交互表的数据清掉 2、中空领取任务界面新增产品名称,便于识别产品 3、调整部分定时任务间隔时间 4、定时任务分隔开,按照两个/多个界面的websocket由一个分为多个 5、取消钢化功能开发中z

---
 hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/taskcache/controller/TaskCacheController.java |   84 +++++++++++++++++++-----------------------
 1 files changed, 38 insertions(+), 46 deletions(-)

diff --git a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/taskcache/controller/TaskCacheController.java b/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/taskcache/controller/TaskCacheController.java
index 84126c3..b99bef0 100644
--- a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/taskcache/controller/TaskCacheController.java
+++ b/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/taskcache/controller/TaskCacheController.java
@@ -1,9 +1,15 @@
 package com.mes.taskcache.controller;
 
-import com.mes.taskcache.service.HangzhoumesService;
-import com.mes.taskcache.service.PpService;
+import cn.hutool.json.JSONObject;
+import com.mes.damage.entity.request.DamageRequest;
+import com.mes.edgstoragecage.entity.vo.CutDrawingVO;
+import com.mes.edgstoragecage.service.EdgStorageCageDetailsService;
+import com.mes.taskcache.service.TaskCacheService;
 import com.mes.utils.Result;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 
 import java.util.List;
@@ -11,71 +17,57 @@
 
 /**
  * <p>
- *  鍓嶇鎺у埗鍣�
+ * 鍓嶇鎺у埗鍣�
  * </p>
  *
  * @author zhoush
  * @since 2024-04-07
  */
+@Api(tags = "璇嗗埆鏄剧ず")
 @RestController
 @RequestMapping("/taskCache")
 public class TaskCacheController {
 
     @Autowired
-    private PpService ppService;
+    private EdgStorageCageDetailsService edgStorageCageDetailsService;
 
     @Autowired
-    private HangzhoumesService hangzhoumesService;
+    private TaskCacheService taskCacheService;
 
-//    @GetMapping("/SelectTerritoryInfo") // 鏌ヨ閽㈠寲鐗堝浘淇℃伅-鏍规嵁 宸ョ▼鍙�
-//    @ResponseBody
-//    public Result SelectTerritoryInfo(@RequestParam(name = "ProcessId", required = false) String ProcessId) {
-//        List<Tempered> h = ppService.selectTemperedTerritory(ProcessId);
-//        return Result.seccess(h);
-//    }
-
-    @GetMapping("/CutTerritory") // 鏌ヨ鍒囧壊鐗堝浘淇℃伅-鏍规嵁 宸ョ▼鍙�
-    @ResponseBody
-    public Result CutTerritory(String ProcessId) {
-        List<Map> h = ppService.selectCutTerritory(ProcessId);
-        return Result.build(200,"鎴愬姛",h);
+    @ApiOperation("鏌ヨ閽㈠寲鐗堝浘淇℃伅-鏍规嵁 宸ョ▼鍙�   鍙傛暟(宸ョ▼鍙�)")
+    @PostMapping("/temperingTerritory")
+    public Result temperingTerritory(String current) {
+        List<Map<String, Object>> h = edgStorageCageDetailsService.selectTemperingTerritory(current);
+        return Result.build(200, "鎴愬姛", h);
     }
 
-    @GetMapping("/CurrentCutTerritory") // 璇嗗埆鏄剧ず  褰撳墠鐗堝浘
-    @ResponseBody
-    public Result CurrentCutTerritory() {
-        List<Map> h = ppService.selectCutTerritory();
-        System.out.println(h);
-        return Result.build(200,"鎴愬姛",h);
+    @ApiOperation("鏌ヨ鍒囧壊鐗堝浘淇℃伅-鏍规嵁宸ョ▼鍙峰強鐗堝簭锛岀増搴忛粯璁や负1")
+    @PostMapping("/queryCutDrawingByEngineerId")
+    public Result queryCutDrawingByEngineerId(String engineerId, int patternSequence) {
+//        List<List<Map<String, Object>>> h = edgStorageCageDetailsService.selectCurrentCutTerritory(current);
+        Map<String, Object> map = edgStorageCageDetailsService.queryCutDrawingByEngineerId(engineerId, patternSequence);
+        return Result.build(200, "鎴愬姛", map);
     }
 
-    @GetMapping("/SelectCutTerritory") // 璇嗗埆鏄剧ず  鐗瑰畾鐗堝浘
-    @ResponseBody
-    public Result SelectCutTerritory(String TerritoryId) {
-        List<Map> h = ppService.selectCutTerritory(TerritoryId);
-        return Result.build(200,"鎴愬姛",h);
+    @ApiOperation("璇嗗埆鏄剧ず:褰撳墠鐗堝浘,闇�瑕佸綋鍓嶅崸寮忕悊鐗囪澶噄d銆佷笂鐗囩嚎璺�")
+    @PostMapping("/queryCurrentCutDrawing")
+    public Result<JSONObject> queryCurrentCutDrawing(int deviceId, int stationCell) {
+        JSONObject jsonObject = edgStorageCageDetailsService.queryCurrentCutDrawing(deviceId, stationCell);
+        return Result.build(200, "鎴愬姛", jsonObject);
     }
 
-    @GetMapping("/IdentControls") //   璇嗗埆鎿嶄綔锛�   鐮存崯/鎷胯蛋     鍙傛暟锛圛D锛屽姛鑳絒0:鐮存崯锛�1锛氭嬁璧癩锛�
-    @ResponseBody
-    public Result Ident(@RequestParam(name = "IdentId", required = false) String ProcessId,@RequestParam(name = "ControlsId", required = false) String ControlsId) {
-        List<Map> h = ppService.selectCutTerritory("P24032508");
-        return Result.build(200,"鎴愬姛",h);
+    @ApiOperation("璇嗗埆鎿嶄綔锛�   鐮存崯/鎷胯蛋     鍙傛暟锛圛D,鍔熻兘[9锛氭嬁璧帮紝8:鐮存崯]锛�")
+    @PostMapping("/identControls")
+    public Result<String> identControls(@RequestBody @Validated DamageRequest request) {
+        return Result.build(200, "鎴愬姛", edgStorageCageDetailsService.identControls(request));
     }
 
-    @GetMapping("/SelectCageInfo") // 鏌ヨ绗煎唴淇℃伅
-    @ResponseBody
-    public Result SelectCageInfo(String ProcessId) {
-        List<Map> h = hangzhoumesService.SelectCageInfo();
-        return Result.build(200,"鎴愬姛",h);
-    }
-
-
-    @GetMapping("/SelectEdgTask") //纾ㄨ竟浠诲姟
-    @ResponseBody
-    public Result SelectEdgTask(String ProcessId) {
-        List<Map> EdgTasks = hangzhoumesService.SelectEdgInfo("1");
-        return Result.build(200,"鎴愬姛",EdgTasks);
+    @ApiOperation("纾ㄨ竟浠诲姟 鍙傛暟()")
+    @PostMapping("/selectEdgTask")
+    public Result selectEdgTask(@RequestBody Map<String, String> arguments) {
+        String line = arguments.get("line");
+        List<Map<String, Object>> EdgTasks = taskCacheService.selectEdgInfo(line);
+        return Result.build(200, "鎴愬姛", EdgTasks);
     }
 
 }

--
Gitblit v1.8.0