From d0e719bd6bb8d2a840211d60efbb46b83d77455d Mon Sep 17 00:00:00 2001
From: ZengTao <2773468879@qq.com>
Date: 星期四, 21 九月 2023 09:51:54 +0800
Subject: [PATCH] 添加玻璃尺寸不在范围内的提示并不允许上片

---
 springboot-vue3/src/main/java/com/example/springboot/controller/SpianController.java |   84 ++++-------------------------------------
 1 files changed, 9 insertions(+), 75 deletions(-)

diff --git a/springboot-vue3/src/main/java/com/example/springboot/controller/SpianController.java b/springboot-vue3/src/main/java/com/example/springboot/controller/SpianController.java
index 0b0e6d2..7ab5b9a 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/controller/SpianController.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/controller/SpianController.java
@@ -1,20 +1,15 @@
 package com.example.springboot.controller;
 
-import com.example.springboot.common.Result;
-import com.example.springboot.entity.StorageCage;
 import com.example.springboot.mapper.SpianMapper;
 import com.example.springboot.service.SpianService;
 
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
+
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
-import java.util.List;
-import java.util.HashMap;
-import java.util.Map;
+
 @RestController
 @RequestMapping("/spian")
 
@@ -23,88 +18,27 @@
     
     @Autowired
     SpianMapper spianMapper;
-    
-    
     @Autowired
     SpianService spianservice;
     //鍑虹墖浠诲姟
 @GetMapping("/all2")
-    public Result selectdd(String orderid){
-        //鑾峰彇浼樺厛鍑虹墖鐨勪綅缃�
-         StorageCage cageout=spianMapper.selectOut(orderid);
-         int cage =cageout.getCage(); //鍌ㄥ瓨鍑虹墖浣嶇疆锛岀瀛愭牸瀛愬嚑鍙风幓鐠�
-         int cell =cageout.getCell();
-         int tier =cageout.getTier();
-         double glasswidth=cageout.getGlassWidth();
-         //鍒ゆ柇鐜荤拑鍐呭鐗�
-         if(tier==2){
-             //鍒ゆ柇鐜荤拑鍙洿鎺ュ嚭鐗囨椂
-                return Result.success("鎵ц鍑虹墖");  
-         }
-         else{  
-            //鑾峰彇鏍煎瓙鐨勭幓鐠冩暟閲�
-           int state= spianMapper.selectGlassState(cage,cell);
-            //鍒ゆ柇鍐呯墖鏄惁闇�瑕佽皟鎷�
-            if(state==0){
-             return Result.success("鐘舵�佷负0,鐩存帴鍑虹墖");  
-             }else{
-              //鐜荤拑闇�瑕佽皟鎷ㄦ椂锛屽垽鏂睘浜庡摢涓崐鍖虹殑绗煎瓙
-               if(cage<6){
-                StorageCage cagecell= spianMapper.selectGlassCage(cage,glasswidth,0,6);
-                //鑾峰彇璋冩嫧浣嶇疆杩涜璋冩嫧
-                return Result.success(cagecell);  //璋冩嫧浣嶇疆鐨勫弬鏁板唴瀹�
-                //鍒ゆ柇璋冩嫧缁撴潫鍚庡啀娆″嚭鐗�
-               }else{
-                StorageCage cagecell= spianMapper.selectGlassCage(cage,glasswidth,5,11);
-                //鑾峰彇璋冩嫧浣嶇疆杩涜璋冩嫧
-                StorageCage ca=cagecell;
-                return Result.success(cagecell);  //璋冩嫧浣嶇疆鐨勫弬鏁板唴瀹� 
-                //鍒ゆ柇璋冩嫧缁撴潫鍚庡啀娆″嚭鐗�
-                
-               }
-               
-             }
-        }
+    public void selectdd(String orderid){
+       SpianService service=new SpianService();
+       service.selectout(orderid);
     
 }
 
    @GetMapping("/all")
    //杩涚墖浠诲姟,浼犺鍗昳d
    //鎸夎鍗曚紭鍏堣繘鐗�
-    public Result selectAll(String orderid){
-        //return spianMapper.selectAll(); 
-        int cage1;
-        //String orderid="A001";
-        //鑾峰彇璁㈠崟鐩稿叧搴︽渶楂樼殑绗煎瓙鎺掑簭
-        List<StorageCage> storageCage=spianMapper.selectAll(orderid);
-        for (StorageCage storageCage2 : storageCage) {
-            //淇濆瓨璁㈠崟浼樺厛椤哄簭绗煎瓙鍙�
-            cage1=storageCage2.getCage();
-            //鍒ゆ柇璇ョ瀛愬彿鐩搁偦鏈�澶х殑绌烘牸鏁�
-            int cages=spianMapper.selectCage(cage1);
-            //鍒ゆ柇閫変腑绗煎瓙鏄惁鏈夌┖鏍�
-            StorageCage cages1=spianMapper.selectCage1(cage1);
-            //鏈夊悎閫傜┖鏍兼椂杩涚墖
-            if(cages>1 &&cages1.getTier()!=null){
-                //鎵ц杩涚墖
-                return Result.success(cages1);
-            }else{
-                //杩斿洖涓嶅彲杩涚墖
-            }
-            
-             
-        }         
-        return Result.success("涓嶅彲杩涚墖");      
+    public void selectAll(Short glassid){
+       SpianService service=new SpianService();
+       service.selectAll(Short.toString(glassid));
       
     }
     
 
-    @PostMapping("/save")
-    public Result save(@RequestBody StorageCage spian){
-        spianservice.Save(spian);
-        return Result.success();
-    }
-
+ 
 
 
 

--
Gitblit v1.8.0