From b6452537abc6ee317993e0bc198066244bda95df Mon Sep 17 00:00:00 2001
From: wuyouming666 <2265557248@qq.com>
Date: 星期四, 07 十二月 2023 09:43:50 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/CanadaMes

---
 /dev/null                                                                           |  507 ---------------------------------------
 CanadaMes-ui/src/views/home/index.vue                                               |  163 ++++++++----
 CanadaMes-ui/src/api/home.js                                                        |   17 +
 CanadaMes-ui/src/img/xmjc.png                                                       |    0 
 CanadaMes-ui/src/lang/locales/en-US.json                                            |    3 
 springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java         |    5 
 springboot-vue3/src/main/java/com/example/springboot/mapper/HomeMapper.java         |    3 
 springboot-vue3/src/main/java/com/example/springboot/controller/HomeController.java |   50 +++
 CanadaMes-ui/src/lang/locales/zh-CN.json                                            |    3 
 9 files changed, 179 insertions(+), 572 deletions(-)

diff --git a/CanadaMes-ui/src/api/home.js b/CanadaMes-ui/src/api/home.js
index 64fb220..beef5bd 100644
--- a/CanadaMes-ui/src/api/home.js
+++ b/CanadaMes-ui/src/api/home.js
@@ -1,5 +1,22 @@
 import request from "../utils/request";
 
+
+export function SelectPermissionByUserName(username) {
+    return request({
+        url: '/home/SelectPermissionByUserName?username='+username,
+        method: 'get',
+        data:""
+    })
+}
+
+export function currentUsername() {
+    return request({
+        url: '/api/user/currentUsername',
+        method: 'get',
+        
+    })
+ }
+
 /**
  *鐧诲綍
  * @param data
diff --git a/CanadaMes-ui/src/img/xmjc.png b/CanadaMes-ui/src/img/xmjc.png
index 5935f14..afdb166 100644
--- a/CanadaMes-ui/src/img/xmjc.png
+++ b/CanadaMes-ui/src/img/xmjc.png
Binary files differ
diff --git a/CanadaMes-ui/src/lang/locales/en-US.json b/CanadaMes-ui/src/lang/locales/en-US.json
index 3aaa68f..1584100 100644
--- a/CanadaMes-ui/src/lang/locales/en-US.json
+++ b/CanadaMes-ui/src/lang/locales/en-US.json
@@ -321,6 +321,9 @@
   "Top":"Top",
   "Up":"Up",
   "Down":"Down",
+  "Unable to find the placement method of the aluminum frame":"Unable to find the placement method of the aluminum frame",
+  "Unable to find whether the aluminum frame is flipped or not":"Unable to find whether the aluminum frame is flipped or not",
+  "You do not have this permission":"You do not have this permission",
     "ServoManualone": {
       "A01 鎵�鍦ㄦ牸瀛�": "A01 Current Grid",
       "鏁伴噺": "Quantity",
diff --git a/CanadaMes-ui/src/lang/locales/zh-CN.json b/CanadaMes-ui/src/lang/locales/zh-CN.json
index 05c7ab5..e49479d 100644
--- a/CanadaMes-ui/src/lang/locales/zh-CN.json
+++ b/CanadaMes-ui/src/lang/locales/zh-CN.json
@@ -313,6 +313,9 @@
   "Top":"缃《",
   "Up":"涓婄Щ",
   "Down":"涓嬬Щ",
+  "You do not have this permission":"You do not have this permission",
+  "Unable to find the placement method of the aluminum frame":"鏌ヨ涓嶅埌閾濇鎽嗘斁鏂瑰紡",
+  "Unable to find whether the aluminum frame is flipped or not":"鏌ヨ涓嶅埌閾濇鏄惁缈昏浆",
   "langparameter": {
     "conveyor Velocity(Auto FAST)": "D01-D06 鐨甫杈撻�佽嚜鍔ㄥ揩閫�",
     "conveyor Velocity(Auto SLOW)": "D01-D06 鐨甫杈撻�佽嚜鍔ㄦ參閫�",
diff --git a/CanadaMes-ui/src/views/home/index.vue b/CanadaMes-ui/src/views/home/index.vue
index 634d594..b5b1693 100644
--- a/CanadaMes-ui/src/views/home/index.vue
+++ b/CanadaMes-ui/src/views/home/index.vue
@@ -104,7 +104,7 @@
     position: absolute;
     background-image: url('../../img/dipan.png');
     background-size: 70px 85px;
-    left: 654px;
+    left: 501px;
     top: 333px;
     /* background-size: 85px 100px;
     left: 912px;
@@ -132,7 +132,7 @@
     position: absolute;
     background-image: url('../../img/taimian.png');
     background-size: 120px 30px;
-    left: 630px;
+    left: 477px;
     top: 420px;
     /* background-size: 160px 40px;
     left: 875px;
@@ -199,9 +199,12 @@
     font-size: 25px;
 }
 
-@media screen and (min-width: 1900px) { 
-    .blocks{transform: scale(1.5,1.05);width: 1210px;}
-} 
+@media screen and (min-width: 1900px) {
+    .blocks {
+        transform: scale(1.5, 1.05);
+        width: 1210px;
+    }
+}
 
 .el-message-box__btns {
     padding: 0px 15px 0;
@@ -228,7 +231,8 @@
             </div>
             <div style="display:flex;justify-content: space-around;width: 9zz5%;margin: 0 auto;">
                 <el-input style="width:15%;" :placeholder="$t('Enter the glass barcode')" v-model="glassid1"></el-input>
-                <el-button type="primary" @click="SelectGlassByGlassIDs(2)">{{ $t('Manually Infeed Glass') }}</el-button>
+                <el-button type="primary" @click="SelectGlassByGlassIDs(2)" :disabled="ManuallyInfeedGlass">
+                    {{ $t('Manually Infeed Glass') }}</el-button>
                 <!-- <el-input style="width:15%;" :placeholder="$t('Enter the Order No')" v-model="order"></el-input>
                 <el-button type="warning" @click="showform1();">{{ $t('Exit the glass by order number') }}</el-button> -->
             </div>
@@ -312,14 +316,19 @@
                         @click="showcageinfo(item['cage'])"></div>
                 </div>
                 <div class="blue gezi"
-                    :style="{ display: 'flex', position: 'absolute', float: 'left', top: 105 + 'px', left: 1050 + 'px', height: loadglassheight + 'px', width: 5 + 'px' }">
+                    :style="{ display: 'flex', position: 'absolute', float: 'left', top: 28 + 'px', left: 1050 + 'px', height: loadglassheight1 + 'px', width: 4 + 'px' }">
+                </div>
+                <div class="blue gezi"
+                    :style="{ display: 'flex', position: 'absolute', float: 'left', top: 105 + 'px', left: 1050 + 'px', height: loadglassheight2 + 'px', width: 4 + 'px' }">
                 </div>
                 <div class="blocks-img" :style="{ left: car1 + 'px', top: '16px' }"></div>
                 <div class="blocks-img" :style="{ left: car2 + 'px', top: '175px' }"></div>
                 <div class="blocks-img2"></div>
                 <div class="blocks-img3"></div>
-                <el-button class="orderbutton1" type="primary" @click="showform2()">{{ $t('OrderInfo') }}</el-button>
-                <el-button class="orderbutton2" type="primary" @click="showform6()">{{ $t('Outing Queue') }}</el-button>
+                <el-button class="orderbutton1" type="primary" @click="showform2()" :disabled="OrderInfo">{{ $t('OrderInfo')
+                }}</el-button>
+                <el-button class="orderbutton2" type="primary" @click="showform6()" :disabled="OutingQueue">
+                    {{ $t('Outing Queue') }}</el-button>
 
                 <!-- <div style="display:flex;position: absolute;float:left;z-index: 999;top:112px;left:328px;">
                     <div :class="getStatusClass(item.state)" v-for="(item,index) in cagelist1" :key="item['date']"
@@ -639,17 +648,20 @@
                 <el-table-column prop="barcode" :label="$t('Frame No')"></el-table-column>
                 <el-table-column :width="280" :label="$t('Operate')">
                     <template slot-scope='scope'>
-                        <el-button type="text" size="small" @click="getTopMove(scope.row, scope.$index)" style="font-size: 15px;"
+                        <el-button type="text" size="small" @click="getTopMove(scope.row, scope.$index)"
+                            style="font-size: 15px;"
                             :disabled="(scope.$index == 0 || isAllowQueue == true || scope.row.state == 1)">
-                            {{$t('Top')}}
+                            {{ $t('Top') }}
                         </el-button>
-                        <el-button type="text" size="small" @click="getUpMove(scope.row, scope.$index)" style="font-size: 15px;"
+                        <el-button type="text" size="small" @click="getUpMove(scope.row, scope.$index)"
+                            style="font-size: 15px;"
                             :disabled="(scope.$index == 0 || isAllowQueue == true || scope.row.state == 1)">
-                            {{$t('Up')}}
+                            {{ $t('Up') }}
                         </el-button>
-                        <el-button type="text" size="small" @click="getDownMove(scope.row, scope.$index)" style="font-size: 15px;"
+                        <el-button type="text" size="small" @click="getDownMove(scope.row, scope.$index)"
+                            style="font-size: 15px;"
                             :disabled="(OutSlice.length - 1 == scope.$index || isAllowQueue == true || scope.row.state == 1)">
-                            {{$t('Down')}}
+                            {{ $t('Down') }}
                         </el-button>
                         <el-button type="primary" style="padding: 4px 10px;font-size: 12px;" :disabled="isAllowQueue"
                             @click="deleteproductionqueueglass(scope.row.barcode)">{{ $t('Delete') }}</el-button>
@@ -702,7 +714,7 @@
 import {
     home, home2, InsertOrder, Addglassid, UpdateTask, SelectAlarmmgInfo, SelectCageInfo, DeleteByGlassID, OutByGlassID, Loadcarlist,
     SelectPassword, SelectGlassByGlassID, Disabled, Inglassid, SelectGlass, InsertQueueGlassId, UpdateQueueState, DeleteQueueGlass, SelectGlassNo,
-    SelectAluminumFrameInfoById, DeleteProductionQueueGlass, AddOutSliceS, isAllowQueues, isConfirmStates
+    SelectAluminumFrameInfoById, DeleteProductionQueueGlass, AddOutSliceS, isAllowQueues, isConfirmStates, SelectPermissionByUserName, currentUsername
 } from "../../api/home";
 
 
@@ -761,7 +773,8 @@
             cageinfo: [],
             cage: 0,
             carlist: [],
-            loadglassheight: 0,
+            loadglassheight1: 0,
+            loadglassheight2: 0,
             password: 1,
             text: "",
             zhuangtai: "",
@@ -776,13 +789,16 @@
             currentPages: 1,  //榛樿鍒濆椤�
             pagesizes: 21,    //姣忛〉榛樿鏄剧ず鐨勬暟鎹�
             pageCounts: 0,
-
             OutSlice: [],
             AluminumFrame: [],
             framebarcode: "",
             isAllowQueue: true,
             FrameNoFlag: "",
-            isConfirm: true
+            isConfirm: true,
+            ManuallyInfeedGlass: true,
+            OutingQueue: true,
+            OrderInfo: true,
+            CageDetails: true
         };
     },
     created() {
@@ -835,33 +851,37 @@
                         this.OutSlice = obj.listoutslice[0];
                     }
                     //鑾峰彇涓婄墖浣嶇幓鐠冧俊鎭�
-                    this.loadglassheight = obj.loadglassheight;
+
                     if (obj.zhuangtai != null) {
                         this.zhuangtai = obj.zhuangtai[0];
                     }
                     //涓婄墖浣嶇幓鐠冧俊鎭�
                     if (obj.form2 != null && obj.form2 != "") {
                         this.form2 = obj.form2[0];
+                        this.loadglassheight2 = 70;
                     } else {
                         this.form2 = {};
                     }
-                    
+
                     //鏄惁闇�瑕佹墜鍔ㄧ‘璁や笂鐗�
                     this.isConfirm = obj.isConfirm[0];
                     //鎵爜浣嶇幓鐠冧俊鎭�
                     if (obj.form3 != null && obj.form3 != "" && obj.state[0] == 1) {
                         this.form3 = obj.form3[0];
+                        this.loadglassheight1 = 70;
                     } else {
                         this.form3 = {};
                     }
                     if (obj.form3 != null && obj.form3 != "" && obj.state[0] == 0) {
-                        
+                        this.loadglassheight1 = 70;
                         this.form5 = obj.form3[0];
                         this.showform3();
                         this.Sizerange(this.form5, 3);
-
+                        this.glassid1="";
                     } else {
-                        this.Sizerange(this.form5, 3);
+                        if(this.glassid1==""){
+                            this.DeleteBarcodeGlass();
+                        }
                     }
                     //鏁版嵁搴撹繛鎺ユ槸鍚︽甯�
                     if (obj.dbconnected == "false") {
@@ -889,6 +909,26 @@
             }
         },
         load() {
+            //鍔犺浇鐢ㄦ埛鏉冮檺
+            currentUsername().then(res => {
+                SelectPermissionByUserName(res.data).then(res => {
+                    res.data.permission.forEach(item => {
+                        if (item.permissionId == "32" && item.state == 1) {
+                            this.ManuallyInfeedGlass = false;
+                        }
+                        if (item.permissionId == "32" && item.state == 1) {
+                            this.OutingQueue = false;
+                        }
+                        if (item.permissionId == "33" && item.state == 1) {
+                            this.OrderInfo = false;
+                        }
+                        if (item.permissionId == "34" && item.state == 1) {
+                            this.CageDetails = false;
+                        }
+                    });
+                });
+
+            });
             //鍔犺浇绗煎瓙浣跨敤鎯呭喌鏁版嵁
             home().then(res => {
                 this.tableData = res.data.list;
@@ -1140,12 +1180,17 @@
         },
         //鏄剧ず鐞嗙墖绗艰鎯呬俊鎭�
         showcageinfo(cage) {
-            cage = this.cageglassid;
-            SelectCageInfo(cage).then(res => {
-                this.cageinfo = res.data.cageinfo;
-                this.currentPages = 1;
-                this.dialogFormVisible3 = true;
-            });
+            if (this.CageDetails == false) {
+                cage = this.cageglassid;
+                SelectCageInfo(cage).then(res => {
+                    this.cageinfo = res.data.cageinfo;
+                    this.currentPages = 1;
+                    this.dialogFormVisible3 = true;
+                });
+            } else {
+                this.$message.error(this.$t('You do not have this permission'));
+            }
+
         },
         //鍒犻櫎鐞嗙墖绗肩幓鐠�
         deleteglass(glassid, state) {
@@ -1191,6 +1236,12 @@
                         OutByGlassID(glassid).then(res => {
                             if (res.data.message3 == 200) {
                                 this.$message.success(this.$t('Operation successful'));
+                            }
+                            else if (res.data.message2 == 300) {
+                                this.$message.error(this.$t('Unable to find the placement method of the aluminum frame'));
+                            }
+                            else if (res.data.message2 == 400) {
+                                this.$message.error(this.$t('Unable to find whether the aluminum frame is flipped or not'));
                             }
                             else if (res.data.message2 == 500) {
                                 this.$message.error(this.$t('This glass is already in the Queue'));
@@ -1380,7 +1431,7 @@
                     this.$message.success(this.$t('Operation successful'));
                 }
             });
-        }, 
+        },
         //缃《
         getTopMove(row, index) {
             let Sequence = [];
@@ -1549,32 +1600,34 @@
         },
         //鍒ゆ柇鐜荤拑鏄惁瓒呭嚭鑼冨洿
         Sizerange(Glass, position) {
-            if ((Glass.glassheight < 380 || Glass.glasswidth < 390 || Glass.glassheight > 1810 || Glass.glasswidth > 2760) || (Glass.glassheight < 390 || Glass.glasswidth < 380 || Glass.glassheight > 2760 || Glass.glasswidth > 1810)) {
-                this.$alert(this.$t('The glass size is not within the range'), this.$t('confirm'), {
-                    confirmButtonText: this.$t('Yes'),
-                    type: 'info',
-                    callback: (action) => {
-                        this.$message({
-                            type: 'info',
-                            message: `action: ${ action }`
-                        }).then(
-                            this.DeleteBarcodeGlass()
-                        );
+            if (this.ManuallyInfeedGlass == true) {
+                if ((Glass.glassheight < 380 || Glass.glasswidth < 390 || Glass.glassheight > 1810 || Glass.glasswidth > 2760) || (Glass.glassheight < 390 || Glass.glasswidth < 380 || Glass.glassheight > 2760 || Glass.glasswidth > 1810)) {
+                    this.$alert(this.$t('The glass size is not within the range'), this.$t('confirm'), {
+                        confirmButtonText: this.$t('Yes'),
+                        type: 'info',
+                        callback: (action) => {
+                            this.$message({
+                                type: 'info',
+                                message: `action: ${action}`
+                            }).then(
+                                this.DeleteBarcodeGlass()
+                            );
+                        }
+                    });
+                    if (position == 1 || position == 3) {
+                        this.disabled1 = true;
+                    } else {
+                        this.disabled = true;
                     }
-                });
-                if (position == 1 || position == 3) {
-                    this.disabled1 = true;
                 } else {
-                    this.disabled = true;
-                }
-            } else {
-                if (position == 1 || position == 3) {
-                    this.disabled1 = false;
-                } else {
-                    this.disabled = false;
-                }
-                if (position == 3&&this.isConfirmState==true) {
-                    this.InsertQueueGlass(1);
+                    if (position == 1 || position == 3) {
+                        this.disabled1 = false;
+                    } else {
+                        this.disabled = false;
+                    }
+                    if (position == 3 && this.isConfirmState == true) {
+                        this.InsertQueueGlass(1);
+                    }
                 }
             }
         },
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 7fae6e4..de38cb9 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
@@ -1,9 +1,7 @@
 package com.example.springboot.component;
 
 import cn.hutool.json.JSONObject;
-import cn.hutool.poi.excel.sax.handler.MapRowHandler;
-
-import java.sql.SQLException;
+import java.util.ArrayList;
 import java.util.List;
 
 import org.springframework.beans.factory.annotation.Autowired;
@@ -89,6 +87,7 @@
             // if (inglassInfo.size() > 0)
             // jsonObject.append("loadglassheight", inglassInfo.get(0) * 70);
             // }
+            
             // 浼� 鑾峰彇杩涙槸鍚︽湁寰呯‘璁ょ殑鐜荤拑id
             String queid = spianMapper.Selectqueueid();
             int state = spianMapper.Selectqueuestate();
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 25d72ac..a8fcacd 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
@@ -5,27 +5,42 @@
 import java.util.List;
 import java.util.Map;
 
+import javax.servlet.http.Cookie;
+import javax.servlet.http.HttpServletRequest;
+
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.annotation.Bean;
 
 import com.example.springboot.mapper.HomeMapper;
 import com.example.springboot.mapper.SpianMapper;
+import com.example.springboot.security.constant.SystemConstant;
+import com.example.springboot.security.util.JwtUtil;
+import com.example.springboot.security.util.SecurityUtil;
 import com.example.springboot.service.HomeService;
 import com.example.springboot.service.JdbcConnections;
 import com.example.springboot.service.North_Glass_Buffer1Service;
 import com.example.springboot.service.OutSliceServive;
+import com.example.springboot.service.PermissionService;
 import com.example.springboot.service.SpianService;
+
+import cn.hutool.core.util.StrUtil;
+
 import com.example.springboot.common.Result;
 import com.example.springboot.component.Plchome;
 import com.example.springboot.component.S7control;
 import com.example.springboot.entity.CarPosition;
 import com.example.springboot.entity.StorageCage;
+import com.example.springboot.entity.User;
 import com.example.springboot.entity.alarmmg;
 import com.example.springboot.entity.north_glass_buffer1;
 import com.example.springboot.entity.Out_slice;
+import com.example.springboot.entity.Permission;
 import com.example.springboot.entity.Queue;
+import com.example.springboot.entity.RolePermission;
 
 import org.springframework.web.bind.annotation.*;
+import org.springframework.web.context.request.RequestContextHolder;
+import org.springframework.web.context.request.ServletRequestAttributes;
 
 @RestController
 @RequestMapping("/home")
@@ -51,6 +66,15 @@
   @Autowired
   private JdbcConnections jdbcConnections;
 
+  // 鑾峰彇褰撳墠鐧诲綍鐢ㄦ埛鏉冮檺
+  @GetMapping("/SelectPermissionByUserName")
+  public Result SelectPermissionByUserName(String username) {
+    Map<String, Object> map = new HashMap<>();
+    List<RolePermission> permission = homeMapper.SelectPermissionByUserName(username);
+    map.put("permission", permission);
+    return Result.success(map);
+  }
+
   // 鏌ヨ鐞嗙墖绗间娇鐢ㄦ儏鍐�
   @GetMapping("/load")
   public Result selectAll() {
@@ -63,6 +87,7 @@
   // 鏌ヨ鐞嗙墖绗肩幓鐠冩儏鍐�
   @GetMapping("/loads")
   public Result selectRack() {
+
     List<StorageCage> storageCagelist1 = homeMapper.selectRack1();
     List<StorageCage> storageCagelist2 = homeMapper.selectRack2();
     List<StorageCage> storageCagelist3 = homeMapper.selectRack3();
@@ -166,11 +191,22 @@
     if (result == null) {
       north_glass_buffer1 north_glass_buffer1 = jdbcConnections.SelectGlassByGlassIdOrderIdFrameId(glassid, "", "");
       String flip = jdbcConnections.SelectFlipByFrameBarcode(north_glass_buffer1.getFrameBarcode());
-      String position = jdbcConnections.SelectPositionByFrameBarcode(north_glass_buffer1.getFrameBarcode());
-      int sequence=homeMapper.SelectMaxSquence();
-      homeMapper.AddOutSliceS(glassid, flip, north_glass_buffer1.getFrameBarcode(),
-          north_glass_buffer1.getglasslengthmm().toString(), north_glass_buffer1.getglassheightmm().toString(),sequence,position);
-      map.put("message2", "200");
+      if (flip != null) {
+        String position = jdbcConnections.SelectPositionByFrameBarcode(north_glass_buffer1.getFrameBarcode());
+        if (position != null) {
+          int sequence = homeMapper.SelectMaxSquence();
+          homeMapper.AddOutSliceS(glassid, flip, north_glass_buffer1.getFrameBarcode(),
+              north_glass_buffer1.getglasslengthmm().toString(), north_glass_buffer1.getglassheightmm().toString(),
+              sequence, position);
+          map.put("message2", "200");
+        } else {
+          map.put("message2", "300");
+        }
+
+      } else {
+        map.put("message2", "400");
+      }
+
     } else {
       map.put("message2", "500");
     }
@@ -285,7 +321,7 @@
   @PostMapping("/SelectAluminumFrameInfoById")
   public Result SelectAluminumFrameInfoById(String FrameBarcode) throws SQLException {
     String flip = jdbcConnections.SelectFlipByFrameBarcode(FrameBarcode);
-    List<north_glass_buffer1> listAluminumFrame=north_Glass_Buffer1Service.SelectAluminumFrameInfoById(FrameBarcode);
+    List<north_glass_buffer1> listAluminumFrame = north_Glass_Buffer1Service.SelectAluminumFrameInfoById(FrameBarcode);
     Map<String, Object> map = new HashMap<>();
     map.put("listAluminumFrame", listAluminumFrame);
     map.put("flip", flip);
@@ -332,7 +368,7 @@
     Plchome.isAllowQueue = isAllowQueue;
     if (isAllowQueue == true) {
       for (Out_slice out_slice2 : out_slice) {
-        homeMapper.UpdateOutSliceSequence(out_slice2.getGlassId(),out_slice2.getSequence());
+        homeMapper.UpdateOutSliceSequence(out_slice2.getGlassId(), out_slice2.getSequence());
       }
     }
     Map<String, Object> map = new HashMap<>();
diff --git a/springboot-vue3/src/main/java/com/example/springboot/mapper/HomeMapper.java b/springboot-vue3/src/main/java/com/example/springboot/mapper/HomeMapper.java
index 1889fad..3dfec02 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/mapper/HomeMapper.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/mapper/HomeMapper.java
@@ -8,6 +8,7 @@
 import com.example.springboot.entity.north_glass_buffer1;
 import com.example.springboot.entity.Out_slice;
 import com.example.springboot.entity.Queue;
+import com.example.springboot.entity.RolePermission;
 
 import java.util.List;
 
@@ -167,5 +168,7 @@
   @Select("select ifnull(max(sequence),0)+1 from out_slice ")
   Short SelectMaxSquence();
 
+  @Select("select rp.* from role_permission rp inner join role r on rp.role_id=r.id and r.name=#{token} and (permission_id=32 or permission_id=33 or permission_id=34 or permission_id=35)")
+  List<RolePermission> SelectPermissionByUserName(String token);
 
 }
diff --git a/springboot-vue3/src/main/resources/Alarm.json b/springboot-vue3/src/main/resources/Alarm.json
deleted file mode 100644
index 89bf615..0000000
--- a/springboot-vue3/src/main/resources/Alarm.json
+++ /dev/null
@@ -1,507 +0,0 @@
-{
-  "content": [
-    {
-      "name": "D01 VFD error",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "D02 VFD error",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "D03 VFD error",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "D04 VFD error",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "D05 VFD error",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "D06 VFD error",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "B01 VFD error",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "B02 VFD error",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "A01 VFD error",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "A02 VFD error",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "A01 servo turn error",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "A02 servo turn error",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "A01 servo travel error",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "A02 servo travel error",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "B01 servo travel error",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "B02 servo travel error",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "D01 DEC error",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "D01 pos error",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "D02 DEC error",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "D02 pos error",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "D03 DEC error",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "D03 pos error",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "D04 DEC error",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "D04 pos error",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "D05 DEC error",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "D05 pos error",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "D06 DEC error",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "D06 pos error",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "A01 DEC error",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "A01 pos error",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "A02 DEC error",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "A02 pos error",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "B01 IN DEC error",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "B01 IN pos error",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "B01 OUT DEC error",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "B01 OUT pos error",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "B02 IN DEC error",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "B02 IN pos error",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "B02 OUT DEC error",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "B02 OUT pos error",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "D01 Scan glass exceeding limit",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "emergency stop alarm",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "More glass than known",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "less glass than known",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "D01 conveyor timeout alarm",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "D02 conveyor timeout alarm",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "D03 conveyor timeout alarm",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "D04 conveyor timeout alarm",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "D05 conveyor timeout alarm",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "D06 conveyor timeout alarm",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "A01 conveyor timeout alarm",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "A02 conveyor timeout alarm",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "B01 conveyor timeout alarm",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "B02 conveyor timeout alarm",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "A01 conveyor Left safety alarm",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "A01 conveyor right safety alarm",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "A02 conveyor Left safety alarm",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "A02 conveyor right safety alarm",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "1# buffer safety alarm",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "2# buffer safety alarm",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "3# buffer safety alarm",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "4# buffer safety alarm",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "A01.SR right in pos error",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "A02.SR left in pos error",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "B01.SR left in pos error",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "B01.SR left dec error",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "B01.SR right dec error",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "B01.SR right in pos error",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "B02.SR left in pos error",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "B02.SR left dec error",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    },
-    {
-      "name": "B02.SR right dec error",
-      "value": "1",
-      "state": "1",
-      "type": "3",
-      "page": "1"
-    }
-  ],
-  "address": [
-    {
-      "name": "DB104.0.0",
-      "count": 71
-    }
-  ]
-}
\ No newline at end of file

--
Gitblit v1.8.0