From 09fe50d59e2f1e2261d376eb49ad6c40301f25b4 Mon Sep 17 00:00:00 2001 From: ZengTao <2773468879@qq.com> Date: 星期五, 10 五月 2024 16:08:59 +0800 Subject: [PATCH] 修改IP与数据库连接 --- springboot-vue3/src/main/java/com/example/springboot/controller/HomeController.java | 37 +++++++++++++------------------------ 1 files changed, 13 insertions(+), 24 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 f2f32ee..3b08bdb 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) { @@ -177,10 +178,10 @@ Map<String, Object> map = new HashMap<>(); Out_slice result = homeMapper.SelectQueueByglassid(glassid); if (result == null) { - north_glass_buffer1 north_glass_buffer1 = jdbcConnections.SelectGlassByGlassIdOrderIdFrameId(glassid, "", ""); + north_glass_buffer1 north_glass_buffer1 = jdbcConnections.SelectGlassByGlassIdOrderIdFrameIdout(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,20 +274,9 @@ // 鎵嬪姩娣诲姞鎵爜浣嶇幓鐠� @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); + public Result InsertQueueGlassId(Short id, @RequestBody Queue queue) throws SQLException { + return storageCageService.InsertQueueGlassId(id, queue); + } // 纭鎵爜浣嶇幓鐠冧俊鎭� @@ -321,6 +311,7 @@ public Result SelectAluminumFrameInfoById(String FrameBarcode) throws SQLException { String flip = jdbcConnections.SelectFlipByFrameBarcode(FrameBarcode); List<north_glass_buffer1> AluminumFrame = north_Glass_Buffer1Service.SelectAluminumFrameInfoById(FrameBarcode); + Plchome.AluminumFrameInfo=jdbcConnections.SelectFrameBarcode(FrameBarcode); Map<String, Object> map = new HashMap<>(); map.put("AluminumFrame", AluminumFrame); map.put("flip", flip); @@ -330,11 +321,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瀵瑰簲鐜荤拑鍒板嚭鐗囬槦鍒� @@ -343,6 +330,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); @@ -377,7 +365,7 @@ return Result.success(map); } - // 淇敼鍑虹墖闃熷垪鐘舵�佷笌鍑虹墖闃熷垪璋冨簭 + // 淇槸鍚﹂渶瑕佺‘璁� @PostMapping("/isConfirmStates") public Result isConfirmStates(Boolean isConfirmStates) { Plchome.isConfirm = isConfirmStates; @@ -418,6 +406,7 @@ @PostMapping("/CloseForm7") public Result CloseForm7() { Plchome.AluminumFrame = null; + Plchome.AluminumFrameInfo = null; Map<String, Object> map = new HashMap<>(); map.put("message", "200"); return Result.success(map); -- Gitblit v1.8.0