From 5d4062b4caf6af878db6049f8dbefe8ffe41a57e Mon Sep 17 00:00:00 2001
From: wu <731351411@qq.com>
Date: 星期二, 23 四月 2024 09:48:13 +0800
Subject: [PATCH] 删除多余代码

---
 springboot-vue3/src/main/java/com/example/springboot/controller/HomeController.java |   27 ++++++---------------------
 1 files changed, 6 insertions(+), 21 deletions(-)

diff --git a/springboot-vue3/src/main/java/com/example/springboot/controller/HomeController.java b/springboot-vue3/src/main/java/com/example/springboot/controller/HomeController.java
index 89bddaa..c7a5a08 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/controller/HomeController.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/controller/HomeController.java
@@ -274,19 +274,8 @@
   // 鎵嬪姩娣诲姞鎵爜浣嶇幓鐠�
   @PostMapping("/InsertQueueGlassId")
   public Result InsertQueueGlassId(Short id, @RequestBody Queue queue) {
-    Map<String, Object> map = new HashMap<>();
-    short result = homeMapper.SelectStorageByGlassId(queue.getglassId());
-    if (result > 0) {
-      map.put("message", "300");
-    } else {
-      homeMapper.InsertQueueGlassId(queue, id);
-      if (id == 1) {
-        // 璋冪敤浼嶅瓨鍌ㄨ繃绋�
-        spianService.selectAll(queue.getglassId());
-      }
-      map.put("message", "200");
-    }
-    return Result.success(map);
+    return storageCageService.InsertQueueGlassId(id, queue);
+    
   }
 
   // 纭鎵爜浣嶇幓鐠冧俊鎭�
@@ -330,11 +319,7 @@
   // 鏍规嵁閾濇id鍒犻櫎鍑虹墖闃熷垪鐜荤拑
   @PostMapping("/DeleteProductionQueueGlass")
   public Result DeleteProductionQueueGlass(String FrameNo) {
-    homeMapper.CompleteQueueByFrameNo(FrameNo);
-
-    Map<String, Object> map = new HashMap<>();
-    map.put("message", "200");
-    return Result.success(map);
+    return outSliceServive.CompleteQueueByFrameNo(FrameNo);
   }
 
   // 娣诲姞閾濇id瀵瑰簲鐜荤拑鍒板嚭鐗囬槦鍒�
@@ -402,7 +387,7 @@
   @PostMapping("/WriteGlassID")
   public Result WriteGlassID(String glassid) {
     // 鎵爜浣嶅啓鍏ョ幓鐠僫d
-    spianService.outmesid(glassid, "DB103.256");
+    spianService.outmesid(glassid, "DB103.286");
     Map<String, Object> map = new HashMap<>();
     map.put("message", "200");
     return Result.success(map);
@@ -454,8 +439,8 @@
 
   // 鍒囨崲PLC鑾峰彇浜岀淮鐮佹柟寮�
   @PostMapping("/SwitchScanMethod")
-  public Result SwitchScanMethod(Short scansmethod) {
-    S7control.getinstance().WriteWord("DB103.255", scansmethod);
+  public Result SwitchScanMethod(Boolean scansmethod) {
+    S7control.getinstance().WriteBit("DB101.11.4", scansmethod);
     Map<String, Object> map = new HashMap<>();
     map.put("message", "200");
     return Result.success(map);

--
Gitblit v1.8.0