From 8a8a404516c6ab5a9b9012b148cbc83b78020a65 Mon Sep 17 00:00:00 2001
From: wu <731351411@qq.com>
Date: 星期一, 11 三月 2024 16:56:10 +0800
Subject: [PATCH] 更新代码、增加json文件和读写

---
 springboot-vue3/src/main/java/com/example/springboot/service/SpianServiceNew.java |   23 +++++++++++++++++++----
 1 files changed, 19 insertions(+), 4 deletions(-)

diff --git a/springboot-vue3/src/main/java/com/example/springboot/service/SpianServiceNew.java b/springboot-vue3/src/main/java/com/example/springboot/service/SpianServiceNew.java
index 262411c..f779ef2 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/service/SpianServiceNew.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/service/SpianServiceNew.java
@@ -7,11 +7,8 @@
 import com.example.springboot.component.PLCAutoMes;
 import com.example.springboot.component.S7control;
 import com.example.springboot.entity.GlassInfo;
-import com.example.springboot.entity.StorageCage;
-import com.example.springboot.entity.glassinfo;
 import com.example.springboot.entity.device.PlcParameterObject;
 import com.example.springboot.mapper.AlbaniaMapper;
-import com.example.springboot.mapper.SpianMapper;
 import com.google.common.primitives.Bytes;
 
 
@@ -24,11 +21,20 @@
 public Short selectAll(GlassInfo glassInfo) {
     //瀹氫箟鍒濆瀛楁
     int cageid;
+    String glassid=glassInfo.getGlassid();
+    Double width=glassInfo.getWidth();
+    Double height=glassInfo.getHeight();
+    int glasstype=glassInfo.getGlasstype();
+    
+    
 
     //鍒ゆ柇鏄惁鏈夊悓绫诲瀷鐨�
      cageid=albaniaMapper.SelectCage(glassInfo.getGlasstype(), glassInfo.getWidth(), 50);
     //濡傛灉鏈夊悓绫诲瀷鏃剁洿鎺ュ鍔�
     if(cageid!=Integer.MIN_VALUE){
+        //鍙戦�乸lc浠诲姟
+        
+        //浠诲姟瀹屾垚鍚庡鍔犳暟閲�
         albaniaMapper.UpdateCageNumberAdd(cageid);
     }else{
          //鍒ゆ柇鐜荤拑鏄惁杩涘叆澶х墖绗�
@@ -36,17 +42,26 @@
             cageid=albaniaMapper.SelectNewCell(3,5);
         }else{
             cageid=albaniaMapper.SelectNewCell(3,5);
+            //鍙戦�乸lc浠诲姟
         }
         //褰撹繑鍥炵殑鏍煎瓙鍙蜂负绌烘椂,杩斿洖400绗煎瓙宸叉弧
         if(cageid==Integer.MIN_VALUE){
             return(400);
+        }else{
+            //鍒ゆ柇瀹屾垚浠诲姟鍚庡鍔犳暟閲�
+            albaniaMapper.AddCage(cageid, glassid, width, height, width, height, 0, glasstype, 1);
         }
     }
+    //澧炲姞浠诲姟璁板綍
+    albaniaMapper.Inserttask(0, 0, 0, cageid, glassInfo.getGlassid(), 0, 0);
     return(200);
 
 }
 
-    public Short selectout2(String glassid) {
+
+    public Short selectout(String glasstype) {
+        //鍒ゆ柇绗煎瓙鏈�鍏堝嚭鍝墖
+         
        
         return(200);// 缁撴潫
     }

--
Gitblit v1.8.0