From 27fcef09b5af8d6816babf3cf063a8d62726e1d0 Mon Sep 17 00:00:00 2001
From: zhoushihao <zsh19950802@163.com>
Date: 星期五, 19 四月 2024 09:18:01 +0800
Subject: [PATCH] 1、下片模块新增多数据源sqlserver配置 可供其他模块有需要配置的参考 2、 a、需要在各自pom文件中添加sqlserver依赖     b、在对应mapper文件中加入DS注解     c、在配置文件中配置数据源     d、主库不需要要添加DS注解指定数据库

---
 hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/taskcache/controller/TaskCacheController.java |   64 +++++++++++++++++++++++++++++++-
 1 files changed, 62 insertions(+), 2 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 cf3d9d1..cb8fb57 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,7 +1,15 @@
 package com.mes.taskcache.controller;
 
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import com.mes.edgstoragecage.service.impl.EdgStorageCageDetailsServiceImpl;
+import com.mes.edgstoragecage.service.impl.EdgStorageCageServiceImpl;
+import com.mes.taskcache.service.HangzhoumesService;
+import com.mes.taskcache.service.PpService;
+import com.mes.utils.Result;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+import java.util.Map;
 
 /**
  * <p>
@@ -15,5 +23,57 @@
 @RequestMapping("/taskCache")
 public class TaskCacheController {
 
+    @Autowired
+    private EdgStorageCageServiceImpl edgStorageCageServiceImpl;
+
+    @Autowired
+    private EdgStorageCageDetailsServiceImpl edgStorageCageDetailsServiceImpl;
+
+    @Autowired
+    private HangzhoumesService hangzhoumesService;
+
+    @PostMapping("/cutTerritory") // 鏌ヨ鍒囧壊鐗堝浘淇℃伅-鏍规嵁 宸ョ▼鍙�
+    @ResponseBody
+    public Result cutTerritory(String current) {
+        List<Map> h = edgStorageCageDetailsServiceImpl.selectCurrentCutTerritory(current);
+        return Result.build(200,"鎴愬姛",h);
+    }
+
+    @PostMapping("/currentCutTerritory") // 璇嗗埆鏄剧ず  褰撳墠鐗堝浘
+    @ResponseBody
+    public Result currentCutTerritory() {
+        List<Map> h = edgStorageCageDetailsServiceImpl.selectCutTerritory();
+        return Result.build(200,"鎴愬姛",h);
+    }
+
+    @PostMapping("/selectCutTerritory") // 璇嗗埆鏄剧ず  鐗瑰畾鐗堝浘
+    @ResponseBody
+    public Result selectCutTerritory(String TerritoryId) {
+        List<Map> h = edgStorageCageDetailsServiceImpl.selectCutTerritory();
+        return Result.build(200,"鎴愬姛",h);
+    }
+
+    @PostMapping("/identControls") //   璇嗗埆鎿嶄綔锛�   鐮存崯/鎷胯蛋     鍙傛暟锛圛D锛屽姛鑳絒0:鐮存崯锛�1锛氭嬁璧癩锛�
+    @ResponseBody
+    public Result identControls(@RequestParam(name = "identId", required = false) String identId,@RequestParam(name = "controlsId", required = false) int controlsId) {
+
+        boolean issucess = edgStorageCageDetailsServiceImpl.identWorn(identId,controlsId);
+        return Result.build(200,"鎴愬姛",issucess);
+    }
+
+    @PostMapping("/selectCageInfo") // 鏌ヨ绗煎唴淇℃伅
+    @ResponseBody
+    public Result selectCageInfo(String ProcessId) {
+        List<Map> h = hangzhoumesService.SelectCageInfo();
+        return Result.build(200,"鎴愬姛",h);
+    }
+
+    @PostMapping("/selectEdgTask") //纾ㄨ竟浠诲姟
+    @ResponseBody
+    public Result selectEdgTask(String ProcessId) {
+        List<Map> EdgTasks = hangzhoumesService.SelectEdgInfo("1");
+        return Result.build(200,"鎴愬姛",EdgTasks);
+    }
+
 }
 

--
Gitblit v1.8.0