From 4931e26b417299dff0e23f1bfa4915b323922b4c Mon Sep 17 00:00:00 2001
From: ZengTao <2773468879@qq.com>
Date: 星期四, 07 三月 2024 14:16:19 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/Albania_Mes

---
 springboot-vue3/src/main/java/com/example/springboot/mapper/AlbaniaMapper.java    |   44 ++++++++
 springboot-vue3/src/main/java/com/example/springboot/entity/alarmmg.java          |    1 
 springboot-vue3/src/main/java/com/example/springboot/entity/flowcard.java         |   19 +++
 springboot-vue3/src/main/java/com/example/springboot/service/SpianServiceNew.java |    2 
 springboot-vue3/src/main/java/com/example/springboot/component/PlcHoldNew.java    |    3 
 springboot-vue3/src/main/java/com/example/springboot/entity/FlowCard.java         |   44 ++------
 springboot-vue3/src/main/java/com/example/springboot/entity/GlassInfo.java        |   76 +++------------
 springboot-vue3/src/main/java/com/example/springboot/entity/StorageCage.java      |    2 
 springboot-vue3/src/main/resources/JsonFile/Albania.json                          |   51 ++++++++++
 springboot-vue3/src/main/java/com/example/springboot/entity/glassinfo.java        |   25 +++++
 10 files changed, 169 insertions(+), 98 deletions(-)

diff --git a/springboot-vue3/src/main/java/com/example/springboot/component/PlcHoldNew.java b/springboot-vue3/src/main/java/com/example/springboot/component/PlcHoldNew.java
index 5c979bf..3da8352 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/component/PlcHoldNew.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/component/PlcHoldNew.java
@@ -36,7 +36,6 @@
       // if (S7control.getinstance().CheckConnected() == false) {
       spianService = WebSocketServer.applicationContext.getBean(SpianService.class);
       spianMapper = WebSocketServer.applicationContext.getBean(SpianMapper.class);
-      jdbcConnections = WebSocketServer.applicationContext.getBean(JdbcConnections.class);
 
       //璇诲彇DB105鍖烘枃浠�
       PlcParameterObject plcmes=PLCAutoMes.PlcMesObject;
@@ -49,7 +48,7 @@
       
 
      
-      S7control.getinstance().WriteWord( plcmes.getPlcParameter("1231").getAddress(plcmes.getPlcParameter("1231").getAddressIndex()), (short) 0);
+      //S7control.getinstance().WriteWord( plcmes.getPlcParameter("1231").getAddress(plcmes.getPlcParameter("1231").getAddressIndex()), (short) 0);
       // 鍑虹墖浠诲姟
       
       if (OutActivate.equals("1") == false&&OutRequest.equals("1")==true) {
diff --git a/springboot-vue3/src/main/java/com/example/springboot/entity/FlowCard.java b/springboot-vue3/src/main/java/com/example/springboot/entity/FlowCard.java
index f90a3bc..0d6a010 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/entity/FlowCard.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/entity/FlowCard.java
@@ -1,43 +1,19 @@
 package com.example.springboot.entity;
 
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
+import java.util.Date;
+
 import com.baomidou.mybatisplus.annotation.TableName;
 
 import lombok.Data;
 
-/**
- * 娴佺▼鍗¤〃
- */
 @Data
-@TableName("flowcard")
-public class FlowCard {
-
-    /**
-     * 涓婚敭锛岃嚜鍔ㄧ敓鎴�
-     */
-    @TableId(value = "id", type = IdType.AUTO)
-    private Integer id;
-
-    /**
-     * 娴佺▼鍗�
-     */
-    private String flowcard;
-    /**
-     * 鎬诲眰鏁�
-     */
-    private Integer totaltier;
-    /**
-     * 鐜荤拑鏁伴噺
-     */
-    private Integer number;
-    /**
-     * 浠诲姟绾胯矾
-     */
-    private Integer line;
-    /**
-     * 鐘舵��
-     */
-    private Integer state;
+@TableName("`flowcard`")
+public class flowcard {
+  private Integer id;// 鑷id
+  private String flowcard;// 娴佺▼鍗d
+  private Integer number;// 鐜荤拑鏁伴噺
+  private Integer line;// 浠诲姟璺嚎
+  private Integer state;// 鐘舵��
+ 
 
 }
diff --git a/springboot-vue3/src/main/java/com/example/springboot/entity/GlassInfo.java b/springboot-vue3/src/main/java/com/example/springboot/entity/GlassInfo.java
index 977b843..568facc 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/entity/GlassInfo.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/entity/GlassInfo.java
@@ -1,69 +1,25 @@
 package com.example.springboot.entity;
 
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
+import java.util.Date;
+
 import com.baomidou.mybatisplus.annotation.TableName;
 
 import lombok.Data;
 
-/**
- * 鐜荤拑琛�
- */
 @Data
-@TableName("glassinfo")
-public class GlassInfo {
-
-    /**
-     * 涓婚敭锛岃嚜鍔ㄧ敓鎴�
-     */
-    @TableId(value = "id", type = IdType.AUTO)
-    private Integer id;
-
-    /**
-     * 娴佺▼鍗d
-     */
-    private Integer flowcard;
-    /**
-     * 鐜荤拑绫诲瀷
-     */
-    private Integer glasstype;
-    /**
-     * 閰嶇墖id
-     */
-    private Integer mateid;
-    /**
-     * 鐜荤拑id
-     */
-    private String glassid;
-    /**
-     * 灞�
-     */
-    private Integer tier;
-    /**
-     * 鑶滅郴
-     */
-    private String films;
-    /**
-     * 瀹�
-     */
-    private Double width;
-    /**
-     * 楂�
-     */
-    private Double height;
-    /**
-     * 鍘氬害
-     */
-    private Double thickness;
-    /**
-     * 鏁伴噺
-     */
-    private Integer number;
-    /**
-     * 瀹屾垚鏁伴噺
-     */
-    private Integer finishnumber;
+@TableName("`glassinfo`")
+public class glassinfo {
+  private Integer id;// 鑷id
+  private String flowcard;// 娴佺▼鍗d
+  private Integer glasstype;// 鐜荤拑绫诲瀷
+  private Integer mateid;// 閰嶇墖id
+  private Integer glassid;// 鐜荤拑id
+  private Integer tier;// 灞�
+  private String films;// 鑶滅郴
+  private Double width;// 瀹�
+  private Double height;// 楂�
+  private String thickness;// 鍘�
+  private Integer number;// 鏁伴噺
+  private Integer finishnumber;// 瀹屾垚鏁伴噺
 
 }
-
-
diff --git a/springboot-vue3/src/main/java/com/example/springboot/entity/StorageCage.java b/springboot-vue3/src/main/java/com/example/springboot/entity/StorageCage.java
index 08784f7..972b185 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/entity/StorageCage.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/entity/StorageCage.java
@@ -85,4 +85,4 @@
      */
     private Integer number;
 
-}
\ No newline at end of file
+}
diff --git a/springboot-vue3/src/main/java/com/example/springboot/entity/alarmmg.java b/springboot-vue3/src/main/java/com/example/springboot/entity/alarmmg.java
index cde8841..f679e0a 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/entity/alarmmg.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/entity/alarmmg.java
@@ -1,6 +1,7 @@
 package com.example.springboot.entity;
 
 import java.util.Date;
+
 //鎶ヨ淇℃伅琛�
 public class alarmmg {
   private Integer id;//鑷id
diff --git a/springboot-vue3/src/main/java/com/example/springboot/entity/flowcard.java b/springboot-vue3/src/main/java/com/example/springboot/entity/flowcard.java
new file mode 100644
index 0000000..0d6a010
--- /dev/null
+++ b/springboot-vue3/src/main/java/com/example/springboot/entity/flowcard.java
@@ -0,0 +1,19 @@
+package com.example.springboot.entity;
+
+import java.util.Date;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import lombok.Data;
+
+@Data
+@TableName("`flowcard`")
+public class flowcard {
+  private Integer id;// 鑷id
+  private String flowcard;// 娴佺▼鍗d
+  private Integer number;// 鐜荤拑鏁伴噺
+  private Integer line;// 浠诲姟璺嚎
+  private Integer state;// 鐘舵��
+ 
+
+}
diff --git a/springboot-vue3/src/main/java/com/example/springboot/entity/glassinfo.java b/springboot-vue3/src/main/java/com/example/springboot/entity/glassinfo.java
new file mode 100644
index 0000000..568facc
--- /dev/null
+++ b/springboot-vue3/src/main/java/com/example/springboot/entity/glassinfo.java
@@ -0,0 +1,25 @@
+package com.example.springboot.entity;
+
+import java.util.Date;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import lombok.Data;
+
+@Data
+@TableName("`glassinfo`")
+public class glassinfo {
+  private Integer id;// 鑷id
+  private String flowcard;// 娴佺▼鍗d
+  private Integer glasstype;// 鐜荤拑绫诲瀷
+  private Integer mateid;// 閰嶇墖id
+  private Integer glassid;// 鐜荤拑id
+  private Integer tier;// 灞�
+  private String films;// 鑶滅郴
+  private Double width;// 瀹�
+  private Double height;// 楂�
+  private String thickness;// 鍘�
+  private Integer number;// 鏁伴噺
+  private Integer finishnumber;// 瀹屾垚鏁伴噺
+
+}
diff --git a/springboot-vue3/src/main/java/com/example/springboot/mapper/AlbaniaMapper.java b/springboot-vue3/src/main/java/com/example/springboot/mapper/AlbaniaMapper.java
new file mode 100644
index 0000000..e33d0bb
--- /dev/null
+++ b/springboot-vue3/src/main/java/com/example/springboot/mapper/AlbaniaMapper.java
@@ -0,0 +1,44 @@
+package com.example.springboot.mapper;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Select;
+import org.apache.ibatis.annotations.Update;
+import org.springframework.stereotype.Repository;
+import com.example.springboot.entity.StorageCage;
+import com.example.springboot.entity.north_glass_buffer1;
+
+@Mapper
+@Repository
+public interface AlbaniaMapper  {
+    // 鑾峰彇鍒ゆ柇璇ユ牸瀛愭槸鍚﹂渶瑕佹妸澶栫墖鎺ㄥ叆鍐呯墖浣嶇疆
+    @Select("select state from storage_cage where  cage=#{cage} and cell=#{cell} and tier=1;")
+    int selectcell(int cage, int cell);
+     // 鍒ゆ柇璇ョ瀛愭槸鍚︽湁鍚堥�傚搴︾┖鏍�
+    @Select("select cage,cell,tier,id,ROUND(id/2)as prcId,width from storage_cage where cage=#{cage1} and cell=#{cell} and state=0 and disabled=0 and width>=#{width} ORDER BY cell asc,tier asc LIMIT 1")
+    StorageCage selectCage1(int cage1, int cell, double width);
+
+    // 鍒ゆ柇绗煎瓙鍐呯幓鐠冩暟
+    @Select("select COUNT(tier)as tier from storage_cage where  cage=#{cage} and cell=#{cell} and state!=0 and state!=3;")
+    int selectsum(int cage, int cell);
+
+    // 瀹屾垚鍑虹墖涓殑鐜荤拑鐘舵��
+    @Update("update storage_cage set state=#{state} where glass_id=#{glassid} and state=3;")
+    void UpdateCageOver(String glassid, int state);
+    // 瀹屾垚杩涚墖涓殑鐜荤拑鐘舵��
+    @Update("update storage_cage set state=#{state} where glass_id=#{glassid} and state=2;")
+    void UpdateCageadd(String glassid, int state);
+    //鏌ヨ鏄惁鏈夎绫诲瀷鐨勪换鍔¤繕鏈畬鎴�
+     // 鍒ゆ柇鍑虹墖涓�1鏃讹紝鏄惁鍙洿鎺ュ嚭鐗�
+    @Select("select COUNT(state) from storage_cage where state=#{state}")
+    int SelectCageState(int state);
+    // 鑾峰彇鐜荤拑淇℃伅
+    @Select("select *,ordernumber ,glasslength_mm as glasslengthmm,glassheight_mm as glassheightmm,barcode,listnumber,boxnumber,glasslength,glassheight,FrameBarcode from north_glass_buffer1 where barcode=#{glassid}")
+    north_glass_buffer1 selectGlass(String glassid);
+    //鍒ゆ柇绗煎唴鏄惁鏈夊悎閫傜殑绫诲瀷绌烘牸
+    @Select("select id from storage_cage where glasstype=#{glasstype} and width>=#{width}+#{widths} and state=0 order by id limit 1")
+    int SelectCage(int glasstype,int width,int widths);
+    //鍒ゆ柇绗煎唴娌℃湁鐜荤拑鐨勭┖鏍�
+    @Select("select id from storage_cage where state=0 and number=0 order by id limit 1")
+    int SelectNewCell();
+    
+
+}
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 a584239..1da7bc8 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
@@ -22,7 +22,7 @@
     private SpianMapper spianMapper;
    
     // @GetMapping("/all")
-    public Short selectAll(String glassid) {
+public Short selectAll(String glassid) {
  //璇诲彇DB105鍖烘枃浠�
  PlcParameterObject plcmes=PLCAutoMes.PlcMesObject;
  //璇�106
diff --git a/springboot-vue3/src/main/resources/JsonFile/Albania.json b/springboot-vue3/src/main/resources/JsonFile/Albania.json
new file mode 100644
index 0000000..751f96c
--- /dev/null
+++ b/springboot-vue3/src/main/resources/JsonFile/Albania.json
@@ -0,0 +1,51 @@
+{
+   "plcAddressBegin":"DB17.0",
+   "plcAddressLenght":"272",
+   "dataType":"word",
+   "parameteInfor":[
+      {
+         "codeId": "PLCToMesIn",  
+         "addressIndex":"0",
+         "addressLenght":"2", 
+         "ratio":"1", 
+         "unit":"m/min"    
+      },
+      {
+          "codeId": "PLCINID",
+          "addressIndex":"16",
+          "addressLenght":"2",
+          "ratio":"1",
+          "unit":"m/min"      
+       },
+       {
+          "codeId": "InIdState",
+          "addressIndex":"18",
+          "addressLenght":"2",
+          "ratio":"1",
+          "unit":"m/min"       
+       },
+       {
+          "codeId": "J01Quest",
+          "addressIndex":"20",
+          "addressLenght":"2",
+          "ratio":"1",
+          "unit":"mm/S"
+       },
+       {
+          "codeId": "J01id",
+          "addressIndex":"22",
+          "addressLenght":"14",
+          "ratio":"1",
+          "unit":"mm/S"
+       },
+       {
+          "codeId": "J01TurnGo",
+          "addressIndex":"38",
+          "addressLenght":"2",
+          "ratio":"1",
+          "unit":"mm/S"
+       }
+
+
+   ]
+}

--
Gitblit v1.8.0