From c13207a19a92c845fcb8c356e01f073142d9084e Mon Sep 17 00:00:00 2001
From: ZengTao <2773468879@qq.com>
Date: 星期五, 19 一月 2024 14:32:42 +0800
Subject: [PATCH] 测试后代码更新

---
 springboot-vue3/src/main/java/com/example/springboot/service/StorageCageService.java |   11 ++-
 CanadaMes-ui/src/views/home/index.vue                                                |   68 ++++++++++------------
 springboot-vue3/src/main/java/com/example/springboot/config/AppRunnerConfig.java     |    8 +-
 springboot-vue3/src/main/java/com/example/springboot/component/PlcHold.java          |   15 ++++
 springboot-vue3/src/main/java/com/example/springboot/mapper/SpianMapper.java         |    7 +
 CanadaMes-ui/src/lang/locales/en-US.json                                             |    1 
 springboot-vue3/src/main/java/com/example/springboot/service/SpianService.java       |   22 +++----
 springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java          |    6 +-
 springboot-vue3/src/main/java/com/example/springboot/controller/HomeController.java  |   11 ++-
 CanadaMes-ui/src/lang/locales/zh-CN.json                                             |    1 
 10 files changed, 82 insertions(+), 68 deletions(-)

diff --git a/CanadaMes-ui/src/lang/locales/en-US.json b/CanadaMes-ui/src/lang/locales/en-US.json
index b100ef2..562e83d 100644
--- a/CanadaMes-ui/src/lang/locales/en-US.json
+++ b/CanadaMes-ui/src/lang/locales/en-US.json
@@ -1,4 +1,5 @@
 {
+  "Clear":"Clear",
   "ip":"localhost",
   "systemTitle": "Login System",
   "usernamePlaceholder": "Please enter username",
diff --git a/CanadaMes-ui/src/lang/locales/zh-CN.json b/CanadaMes-ui/src/lang/locales/zh-CN.json
index 5bda464..1135939 100644
--- a/CanadaMes-ui/src/lang/locales/zh-CN.json
+++ b/CanadaMes-ui/src/lang/locales/zh-CN.json
@@ -1,4 +1,5 @@
 {
+  "Clear":"娓呴櫎",
   "ip":"localhost",
   "systemTitle": "鐧诲綍绯荤粺",
   "usernamePlaceholder": "璇疯緭鍏ョ敤鎴峰悕",
diff --git a/CanadaMes-ui/src/views/home/index.vue b/CanadaMes-ui/src/views/home/index.vue
index e15ba1c..c7eab6f 100644
--- a/CanadaMes-ui/src/views/home/index.vue
+++ b/CanadaMes-ui/src/views/home/index.vue
@@ -375,78 +375,67 @@
                 <div class="device" :style="'top: 262px;left: 150px;background-color: ' + ShowDeviceList(8) + ';'">D05</div>
                 <div class="device" :style="'top: 339px;left: 150px;background-color: ' + ShowDeviceList(9) + ';'">D06</div>
 
-                <div class="glass D01" style="top: 39px;left: 1055px;position: absolute;"
-                    >{{ ShowGlassIdList(0) }}
-                    <br/>
+                <div class="glass D01" style="top: 39px;left: 1055px;position: absolute;">{{ ShowGlassIdList(0) }}
+                    <br />
                     <el-button type="primary" size="mini" @click="ClearGlassId('DB101.9.2', 0)">
                         {{ $t('Clear') }}</el-button>
                 </div>
-                <div class="glass D02" style="top: 117px;left: 1055px;position: absolute;"
-                    >{{ ShowGlassIdList(1) }}
-                    <br/>
+                <div class="glass D02" style="top: 117px;left: 1055px;position: absolute;">{{ ShowGlassIdList(1) }}
+                    <br />
                     <el-button type="primary" size="mini" @click="ClearGlassId('DB101.9.2', 1)">
                         {{ $t('Clear') }}</el-button>
                 </div>
-                <div class="glass B01" style="top: 270px;left: 640px;position: absolute;"
-                    >
+                <div class="glass B01" style="top: 270px;left: 640px;position: absolute;">
                     B01:{{ ShowGlassIdList(2) }}
-                    <br/>
+                    <br />
                     <el-button type="primary" size="mini" @click="ClearGlassId('DB101.10.2', 2)">
                         {{ $t('Clear') }}</el-button>
                 </div>
-                <div class="glass B02" style="top: 290px;left: 640px;position: absolute;"
-                    >B02:{{ ShowGlassIdList(3) }}
-                    <br/>
+                <div class="glass B02" style="top: 315px;left: 640px;position: absolute;">B02:{{ ShowGlassIdList(3) }}
+                    <br />
                     <el-button type="primary" size="mini" @click="ClearGlassId('DB101.10.3', 3)">
                         {{ $t('Clear') }}</el-button>
                 </div>
-                <div class="glass A01" style="top: 270px;left: 289px;position: absolute;"
-                    >
+                <div class="glass A01" style="top: 270px;left: 289px;position: absolute;">
                     A01.1:{{ ShowGlassIdList(4) }}
-                    <br/>
+                    <br />
                     <el-button type="primary" size="mini" @click="ClearGlassId('DB101.10.0', 4)">
                         {{ $t('Clear') }}</el-button>
                 </div>
 
-                <div class="glass A01" style="top: 315px;left: 289px;position: absolute;"
-                    >A01.2:{{ ShowGlassIdList(5) }}X21942611703GV
-                    <br/>
+                <div class="glass A01" style="top: 315px;left: 289px;position: absolute;">A01.2:{{ ShowGlassIdList(5) }}
+                    <br />
                     <el-button type="primary" size="mini" @click="ClearGlassId('DB101.10.1,5', 5)">
                         {{ $t('Clear') }}</el-button>
                 </div>
 
-                <div class="glass A02" style="top: 360px;left: 289px;position: absolute;"
-                    >A02:{{ ShowGlassIdList(6) }}
-                    <br/>
+                <div class="glass A02" style="top: 360px;left: 289px;position: absolute;">A02:{{ ShowGlassIdList(6) }}
+                    <br />
                     <el-button type="primary" size="mini" @click="ClearGlassId('DB101.10.2,6', 6)">
                         {{ $t('Clear') }}</el-button>
                 </div>
 
-                <div class="glass D03" style="top: 122px;left: 42px;position: absolute;"
-                    >
+                <div class="glass D03" style="top: 122px;left: 42px;position: absolute;">
                     {{ ShowGlassIdList(7) }}
-                    <br/>
+                    <br />
                     <el-button type="primary" size="mini" @click="ClearGlassId('DB101.9.4', 7)">
                         {{ $t('Clear') }}</el-button>
                 </div>
-                <div class="glass D04" style="top: 198px;left: 42px;position: absolute;"
-                    >
+                <div class="glass D04" style="top: 198px;left: 42px;position: absolute;">
                     {{ ShowGlassIdList(8) }}
-                    <br/>
+                    <br />
                     <el-button type="primary" size="mini" @click="ClearGlassId('DB101.9.5', 8)">
                         {{ $t('Clear') }}</el-button>
                 </div>
-                <div class="glass D05" style="top: 275px;left: 42px;position: absolute;"
-                    >
+                <div class="glass D05" style="top: 275px;left: 42px;position: absolute;">
                     {{ ShowGlassIdList(9) }}
-                    <br/>
+                    <br />
                     <el-button type="primary" size="mini" @click="ClearGlassId('DB101.9.6', 9)">
                         {{ $t('Clear') }}</el-button>
                 </div>
-                <div class="glass D06" style="top: 352px;left: 42px;position: absolute;"
-                    >
+                <div class="glass D06" style="top: 352px;left: 42px;position: absolute;">
                     {{ ShowGlassIdList(10) }}
-                    <br/>
+                    <br />
                     <el-button type="primary" size="mini" @click="ClearGlassId('DB101.9.5', 10)">
                         {{ $t('Clear') }}</el-button>
                 </div>
@@ -617,12 +606,12 @@
                         }}</el-button>
                     </el-form-item> -->
                     <el-form-item>
-                        {{ $t('Confirm State') }}:{{ this.isConfirm == true ? $t('Not Allow') : $t('Allow') }}
+                        {{ $t('Confirm State') }}:{{ this.isConfirm == true ? $t('Allow') : $t('Not Allow') }}
                         <el-button type="primary" @click="isConfirmState()">
-                            {{ this.isConfirm == true ? $t('Allow') : $t('Not Allow') }}</el-button>
+                            {{ this.isConfirm == true ? $t('Not Allow') : $t('Allow') }}</el-button>
                     </el-form-item>
                     <el-form-item>
-                        {{ $t('Current State') }}:{{ this.Scanningmethod == true ? $t('Automatic') : $t('Hand Movement') }}
+                        {{ $t('Current State') }}:{{ this.Scanningmethod == false ? $t('Automatic') : $t('Hand Movement') }}
                         <el-button type="primary" @click="SwitchScanMethod()">{{ $t('Switch')
                         }}</el-button>
                     </el-form-item>
@@ -1030,7 +1019,6 @@
     },
     created() {
         this.load();
-
         this.init();
     }
     ,
@@ -1305,6 +1293,7 @@
         },
         //鎵嬪姩涓婄墖
         sbumitglassid() {
+            console.log(1111111);
             if (this.form.order != "") {
                 if (this.form.height < 380 || this.form.width < 390 || this.form.height > 1810 || this.form.width > 2760) {
                     this.$message.error(this.$t('The glass size is not within the range'));
@@ -1678,6 +1667,9 @@
                         if (res.data.message == 200) {
                             this.form5 = {};
                             this.$message.success(this.$t('Operation successful'));
+                        }
+                        else if (res.data.message == 400) {
+                            this.$message.error(this.$t('The glass size is not within the range'));
                         } else {
                             this.$message.error(this.$t('This glass ID already exists in the sorting cage'));
                         }
@@ -2090,7 +2082,7 @@
             if (this.ClearGlassID == false) {
                 console.log(this.DeviceList, num);
                 if (this.DeviceList[num] == 0) {
-                    if (this.GlassIdList[num].length < 14) {
+                    if (this.GlassIdList[num].length <= 14) {
                         this.$confirm(this.$t('Are you sure to clear this barcode ?'), this.$t('confirm'), {
                             confirmButtonText: this.$t('Yes'),
                             cancelButtonText: this.$t('No'),
diff --git a/springboot-vue3/src/main/java/com/example/springboot/component/PlcHold.java b/springboot-vue3/src/main/java/com/example/springboot/component/PlcHold.java
index fda114a..b270a74 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/component/PlcHold.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/component/PlcHold.java
@@ -1,5 +1,6 @@
 package com.example.springboot.component;
 
+import java.time.LocalDateTime;
 import java.util.List;
 import org.springframework.beans.factory.annotation.Autowired;
 import com.example.springboot.service.JdbcConnections;
@@ -29,6 +30,7 @@
         // \\ TODO Auto-generated catch block
         e.printStackTrace();
       }
+
       // if (S7control.getinstance().CheckConnected() == false) {
         spianService = WebSocketServer.applicationContext.getBean(SpianService.class);
         spianMapper = WebSocketServer.applicationContext.getBean(SpianMapper.class);
@@ -82,6 +84,8 @@
           if (outstate == true) {// 褰撳嚭鐗囪溅绌洪棽鏃�,涓斿嚭鐗囧惎鍔ㄤ负1鏃讹紝浠诲姟鍚姩鏀逛负0
             if (outstate1 == true) {
               S7control.getinstance().WriteWord("DB105.18", (short) 0);// 鍑虹墖浠诲姟鍚姩鏀逛负0
+              System.out.println("鍏抽棴鍚姩"+LocalDateTime.now());
+
             }
           }
         }
@@ -99,22 +103,31 @@
 
         // 褰撹繘鐗囧皬杞﹀畬鎴愪换鍔℃椂
         if (B01backs == true) {
-          // 褰揃01灏忚溅姹囨姤瀹屾垚鏃舵洿鏀圭幓鐠冪姸鎬� 涓�1
+          //鍒ゆ柇鏄惁姹囨姤姝g‘鐨刬d
+          int HB=spianMapper.SelectHB(B01glassid.toString());
+          if(HB>0){
+             // 褰揃01灏忚溅姹囨姤瀹屾垚鏃舵洿鏀圭幓鐠冪姸鎬� 涓�1
           spianService.overtask(B01glassid.toString());// 瀹屾垚浠诲姟
           S7control.getinstance().WriteWord("DB106.60", (short) 0);// 鎭㈠B01灏忚溅搴旂瓟鏀逛负0
           boolean yingda = spianService.listbool("DB106.60");// b01姹囨姤
           System.out.println("姹囨姤鏃禕01|绗�" + aaa + "娆�" + B01glassid + "搴旂瓟" + yingda);
           aaa += 1;
+          }
+         
         }
 
         // 褰撳嚭鐗囧皬杞﹀畬鎴愪换鍔℃椂
         if (B02backs == true) {
+          //鍒ゆ柇鏄惁姹囨姤姝g‘鐨刬d
+          int HB=spianMapper.SelectHB(B02glassid.toString());
+          if(HB>0){
           // 褰揃02灏忚溅姹囨姤瀹屾垚鏃舵洿鏀圭幓鐠冪姸鎬佷负0
           spianService.overtask(B02glassid.toString());// 瀹屾垚浠诲姟
           S7control.getinstance().WriteWord("DB106.62", (short) 0);// 鎭㈠B02灏忚溅搴旂瓟鏀逛负0
           System.out.println("姹囨姤鏃禕02|" + B02glassid);
           boolean yingda = spianService.listbool("DB106.62");// b02姹囨姤
           System.out.println("姹囨姤鏃禕02|绗�" + aaa + "娆�" + B02glassid + "搴旂瓟" + yingda);
+          }
         }
 
         // 鑾峰彇DO1鏁版嵁
diff --git a/springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java b/springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java
index 5601296..b8a0c05 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java
@@ -153,7 +153,7 @@
             // // TODO: handle exception
             // }
 
-            if (S7control.getinstance().CheckConnected() == true) {
+            // if (S7control.getinstance().CheckConnected() == true) {
                 // 鑾峰彇褰撳墠鎵爜鏂瑰紡
 
                 List<Boolean> Scanningmethods = S7control.getinstance().ReadBits("DB101.11.4", 1);
@@ -171,7 +171,7 @@
                 jsonObject.append("DeviceList", DeviceList);
                 // 鑾峰彇D01-D06,A01,A02,B01,B02鐜荤拑id
                 List<String> GlassIdList = new ArrayList<String>();
-                GlassIdList.add(spianService.queGlassid("DB103.40", 14).toString());
+                GlassIdList.add(spianService.queGlassid("DB103.44", 14).toString());
                 GlassIdList.add(spianService.queGlassid("DB103.58", 14).toString());
 
                 GlassIdList.add(spianService.queGlassid("DB103.184", 14).toString());
@@ -294,7 +294,7 @@
                 // }
 
                 // }
-            }
+            // }
 
             storageCageService = WebSocketServer.applicationContext.getBean(StorageCageService.class);
             dbserve = WebSocketServer.applicationContext.getBean(JdbcConnections.class);
diff --git a/springboot-vue3/src/main/java/com/example/springboot/config/AppRunnerConfig.java b/springboot-vue3/src/main/java/com/example/springboot/config/AppRunnerConfig.java
index bbc83de..6b392e3 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/config/AppRunnerConfig.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/config/AppRunnerConfig.java
@@ -17,10 +17,10 @@
         //
         System.out.println("鍚姩瀹屾垚");
 
-      //  new PlcHold().start();
+         new PlcHold().start();
 
         new Plchome().start();
-
+        new PlcLayout().start();
         new Plcalarm().start();
 
         new Plcsign().start();
@@ -36,10 +36,10 @@
         new PlcManualonePosition2().start();
         new PlcServoManualone().start();
         new PLCManualJog().start();
-        //new Plclog().start();
+        new Plclog().start();
 
         new PlcInteractionState().start();
-//new PlcParameter1Review().start();
+        //new PlcParameter1Review().start();
        // new PLCAutomaticParameterSettingReview().start();
     }
 }
\ No newline at end of file
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..69666cd 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
@@ -275,16 +275,21 @@
   @PostMapping("/InsertQueueGlassId")
   public Result InsertQueueGlassId(Short id, @RequestBody Queue queue) {
     Map<String, Object> map = new HashMap<>();
+    Short zhi=200;
     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());
+        zhi=spianService.selectAll(queue.getglassId());
+        if(zhi==200){
+          homeMapper.InsertQueueGlassId(queue, id);
+        }
       }
-      map.put("message", "200");
+      
+      map.put("message",zhi);
     }
     return Result.success(map);
   }
diff --git a/springboot-vue3/src/main/java/com/example/springboot/mapper/SpianMapper.java b/springboot-vue3/src/main/java/com/example/springboot/mapper/SpianMapper.java
index 612e27a..20a4424 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/mapper/SpianMapper.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/mapper/SpianMapper.java
@@ -18,8 +18,8 @@
     @Select("select a.cage,FrameBarcode,COUNT(if(a.order_id=#{orderids},a.order_id,null))as orderid,b.shu,c.shu2,a.cell,min(a.state)as state1,max(a.state)as state2,disabled,FrameBarcode from storage_cage a left join (select COUNT(*)shu,cage from storage_cage  where order_id=#{orderids} GROUP BY cage)as b on a.cage=b.cage left join(select cage ,COUNT(glass_id)as shu2 from storage_cage GROUP BY cage)c  on a.cage=c.cage where (order_id=#{orderids} or ''='') GROUP BY cage,cell HAVING state1=0 ORDER BY (FrameBarcode=#{Fbarcode} or ''='') desc,shu desc,shu2,state2 asc,cage asc;")
     List<StorageCage> selectAll(String orderids,String Fbarcode);
     //浼樺厛鍒ゆ柇涓�娆℃槸鍚︽湁鍚岄摑妗嗙殑绌轰綅
-    @Select("select *,min(state) state1 from storage_cage  GROUP BY cage,cell HAVING state1=0 and  FrameBarcode=#{FrameBarcode} LIMIT 1;")
-    List<StorageCage> selectAllFbarcode(String Fbarcode);
+    @Select("select *,min(state) state1 from storage_cage where width>=(#{width}+#{width2})  GROUP BY cage,cell HAVING state1=0 and  FrameBarcode=#{Fbarcode} ORDER BY width desc LIMIT 1;")
+    List<StorageCage> selectAllFbarcode(String Fbarcode,double width,double width2);
     // 鑾峰彇鍒ゆ柇璇ユ牸瀛愭槸鍚﹂渶瑕佹妸澶栫墖鎺ㄥ叆鍐呯墖浣嶇疆
     @Select("select state from storage_cage where  cage=#{cage} and cell=#{cell} and tier=1;")
     int selectcell(int cage, int cell);
@@ -232,4 +232,7 @@
     //鍒ゆ柇鐜荤拑鏄惁绂佺敤
     @Select(" select disabled from storage_cage where glass_id=#{glassid} limit 1;")
     int SelectCageGlassState(String glassid);
+    //鍒ゆ柇姹囨姤鐨刬d鏄惁姝g‘
+    @Select("SELECT count(*) FROM `storage_cage` where state!=0 and state!=1 and glass_id=#{glassid}")
+    int SelectHB(String glassid);
 }
\ No newline at end of file
diff --git a/springboot-vue3/src/main/java/com/example/springboot/service/SpianService.java b/springboot-vue3/src/main/java/com/example/springboot/service/SpianService.java
index 7d4844b..1179f74 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/service/SpianService.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/service/SpianService.java
@@ -19,7 +19,7 @@
     // @GetMapping("/all")
     public Short selectAll(String glassid) {
 
-        int cage1;
+        int cage1=0;
         int cells;
         int ids;
         int prcid;
@@ -33,12 +33,7 @@
         if (glasslist == null) {
             return (300);
         }
-        //鍒ゆ柇鏄惁杩樻湁杩涚墖浠诲姟鏈畬鎴愮殑
-        int cagestate=spianMapper.SelectCageState(2);
-        //鏈夎繘鐗囦换鍔℃湭瀹屾垚鏃惰繑鍥炰笉杩涚墖
-        if(cagestate>0){
-            return (300);
-        }
+       
         double widths = glasslist.getglasslengthmm();
         String orderids = glasslist.getordernumber();
         String FrameBarcode = glasslist.getFrameBarcode();
@@ -54,7 +49,10 @@
 
         // String orderid="A001";
         // 鑾峰彇璁㈠崟鐩稿叧搴︽渶楂樼殑绗煎瓙鎺掑簭
-        List<StorageCage> storageCage = spianMapper.selectAllFbarcode(FrameBarcode);
+        List<StorageCage> storageCage = spianMapper.selectAllFbarcode(FrameBarcode,widths,400);
+        //鍒ゆ柇閾濇鎸囧畾绌烘牸鏄惁闇�瑕侀棿闅旂┖闂�
+        
+        
         if (storageCage.size() == 0) {
             storageCage = spianMapper.selectAll(orderids, FrameBarcode);
         }
@@ -171,10 +169,10 @@
 
             spianMapper.Inserttask(1, 0, cageout.getId(), 1000, glassid, state);// 鏂板浠诲姟
             // int state = spianMapper.selectGlassState(cage, cell);//鑾峰彇鏍煎瓙鏁伴噺
-            if (state == 2) {
-                spianMapper.UpdateDBCage1(cage, cell);// 灏嗗唴鐗囨暟鎹洿鏂板埌澶栫墖閲�
-                spianMapper.UpdateDBCage2(cage, cell);// 娓呴櫎鍐呯墖鏁版嵁
-            }
+            // if (state == 2) {
+            //     spianMapper.UpdateDBCage1(cage, cell);// 灏嗗唴鐗囨暟鎹洿鏂板埌澶栫墖閲�
+            //     spianMapper.UpdateDBCage2(cage, cell);// 娓呴櫎鍐呯墖鏁版嵁
+            // }
             System.out.println("鍑虹墖浠诲姟|" + datas);
             S7control.getinstance().WriteWord(adddresslist, datas);// 娲惧彂鍑虹墖杞︿换鍔�
             outmesid(glassid, "DB105.34");// 娲惧彂鍑虹墖ID
diff --git a/springboot-vue3/src/main/java/com/example/springboot/service/StorageCageService.java b/springboot-vue3/src/main/java/com/example/springboot/service/StorageCageService.java
index 4ef8022..619fd1b 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/service/StorageCageService.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/service/StorageCageService.java
@@ -30,19 +30,21 @@
         String A01glassid2 = spianService.queGlassid("DB103.142", 14).toString();
         String A02glassid1 = spianService.queGlassid("DB103.156", 14).toString();
         String B01glassid = spianService.queGlassid("DB103.184", 14).toString();
-        String B02glassid = spianService.queGlassid("DB103.198", 14).toString();
+        String B02glassid = spianService.queGlassid("DB103.212", 14).toString();
         List<Short> DeviceList = S7control.getinstance().ReadWord("DB103.0", 10);
         if (types == 0) {// 缁堟杩涚墖浠诲姟
             List<StorageTask> cageList = homeMapper.SelectTaskByState(types);
             for (StorageTask storageTask : cageList) {
                 // 鍒ゆ柇鍑虹墖浠诲姟浣嶇疆骞舵竻闄ゅ搴旂幓鐠僫d
-                if ((storageTask.getGlassId() == A01glassid1 || storageTask.getGlassId() == A01glassid2)&&DeviceList.get(4)==0) {
+                if ((storageTask.getGlassId().equals(A01glassid1)|| storageTask.getGlassId().equals(A01glassid2))&&DeviceList.get(4)==0) {
                     outSliceServive.StopTask(storageTask.getGlassId(), types);
                     ClearGlassId("DB101.10.0");
-                } else if (storageTask.getGlassId() == B01glassid&&DeviceList.get(2)==0) {
+                } 
+                if (storageTask.getGlassId().equals(B01glassid)&&DeviceList.get(2)==0) {
                     outSliceServive.StopTask(storageTask.getGlassId(), types);
                     ClearGlassId("DB101.10.2");
-                } else if (storageTask.getGlassId() == B02glassid&&DeviceList.get(3)==0) {
+                } 
+                if (storageTask.getGlassId().equals(B02glassid)&&DeviceList.get(3)==0) {
                     ClearGlassId("DB101.10.3");
                     outSliceServive.StopTask(storageTask.getGlassId(), types);
                 }
@@ -56,7 +58,6 @@
             }
             for (StorageTask cageList : cageLists) {
                 if (cageList.getTaskType().equals("1")) {
-
                     System.out.println(DeviceList.get(5));
                     if(cageList.getGlassId().equals(A02glassid1)&&DeviceList.get(5)==0){
                         outSliceServive.StopTask(cageList.getGlassId(), types);

--
Gitblit v1.8.0