From 7687eb6cc76ab8ca20b39e7567255939abc4ff66 Mon Sep 17 00:00:00 2001
From: ZengTao <2773468879@qq.com>
Date: 星期一, 29 四月 2024 09:16:24 +0800
Subject: [PATCH] 修改进片逻辑判断,添加异常捕获

---
 springboot-vue3/src/main/java/com/example/springboot/controller/HomeController.java |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 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 c7a5a08..8dbb53f 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
@@ -106,14 +106,15 @@
 
   // 鏍规嵁鐜荤拑id鎵嬪姩涓婄墖
   @GetMapping("/Addglassid")
-  public Result Addglassid(String glassid) {
+  public Result Addglassid(String glassid) throws SQLException {
     Map<String, Object> map = new HashMap<>();
     short taskno = homeMapper.SelectInTask();
     if (taskno > 0) {
       map.put("message2", "500");
     } else {
       // 璋冪敤浼嶄笂鐗囧嚱鏁�
-      short results = spianService.selectAll(glassid);
+      north_glass_buffer1 north_glass_buffer1 = jdbcConnections.SelectGlassByGlassIdOrderIdFrameId(glassid, "", "");
+      short results = spianService.selectAll(north_glass_buffer1);
       if (results == 200) {
         map.put("message2", "200");
       } else if (results == 300) {
@@ -180,7 +181,7 @@
       north_glass_buffer1 north_glass_buffer1 = jdbcConnections.SelectGlassByGlassIdOrderIdFrameId(glassid, "", "");
       String flip = jdbcConnections.SelectFlipByFrameBarcode(north_glass_buffer1.getFrameBarcode());
 
-      if (flip != null) {
+      if (flip != null&&flip != "") {
         String position = jdbcConnections.SelectPositionByFrameBarcode(north_glass_buffer1.getFrameBarcode());
         if (position != null) {
           String framelength = jdbcConnections.SelectFrameLengthByFrameBarcode(north_glass_buffer1.getFrameBarcode());
@@ -273,7 +274,7 @@
 
   // 鎵嬪姩娣诲姞鎵爜浣嶇幓鐠�
   @PostMapping("/InsertQueueGlassId")
-  public Result InsertQueueGlassId(Short id, @RequestBody Queue queue) {
+  public Result InsertQueueGlassId(Short id, @RequestBody Queue queue) throws SQLException {
     return storageCageService.InsertQueueGlassId(id, queue);
     
   }
@@ -328,6 +329,7 @@
     // public Result AddOutSliceS(@RequestBody String[][] AluminumFrames) throws
     // SQLException {
     north_Glass_Buffer1Service.AddOutSliceS(FrameNo);
+    Plchome.AluminumFrame = null;
     Map<String, Object> map = new HashMap<>();
     map.put("message", "200");
     return Result.success(map);
@@ -362,7 +364,7 @@
     return Result.success(map);
   }
 
-  // 淇敼鍑虹墖闃熷垪鐘舵�佷笌鍑虹墖闃熷垪璋冨簭
+  // 淇槸鍚﹂渶瑕佺‘璁�
   @PostMapping("/isConfirmStates")
   public Result isConfirmStates(Boolean isConfirmStates) {
     Plchome.isConfirm = isConfirmStates;

--
Gitblit v1.8.0