From 0b83163518f23e4571f3f510c38e9a25f46b6d07 Mon Sep 17 00:00:00 2001
From: clll <1320612696@qq.com>
Date: 星期五, 08 九月 2023 17:06:00 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.150:10101/r/CanadaMes

---
 CanadaMes-ui/src/views/home/index.vue                                                |  190 +++++++--
 springboot-vue3/src/main/java/com/example/springboot/component/PlcHold.java          |    7 
 springboot-vue3/src/main/java/com/example/springboot/mapper/SpianMapper.java         |    4 
 CanadaMes-ui/src/views/Electrical/Parameter.vue                                      |  137 +++---
 springboot-vue3/src/main/java/com/example/springboot/controller/SpianController.java |   16 
 CanadaMes-ui/src/views/user/index.vue                                                |  242 ++++++-----
 CanadaMes-ui/src/layout/tag.vue                                                      |    2 
 springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java          |    5 
 springboot-vue3/src/main/java/com/example/springboot/mapper/HomeMapper.java          |   18 
 CanadaMes-ui/src/layout/index.vue                                                    |   30 
 springboot-vue3/src/main/java/com/example/springboot/controller/HomeController.java  |   19 
 CanadaMes-ui/src/lang/locales/zh-CN.json                                             |    4 
 springboot-vue3/src/main/java/com/example/springboot/component/PlcParameter.java     |   99 ++--
 springboot-vue3/src/main/java/com/example/springboot/config/AppRunnerConfig.java     |    6 
 CanadaMes-ui/src/views/Electrical/alarm.vue                                          |    4 
 CanadaMes-ui/src/api/home.js                                                         |   12 
 CanadaMes-ui/src/lang/locales/en-US.json                                             |  253 ++++++------
 springboot-vue3/src/main/java/com/example/springboot/component/Plcaction.java        |  141 +++---
 18 files changed, 693 insertions(+), 496 deletions(-)

diff --git a/CanadaMes-ui/src/api/home.js b/CanadaMes-ui/src/api/home.js
index 7d62fb2..0f4e344 100644
--- a/CanadaMes-ui/src/api/home.js
+++ b/CanadaMes-ui/src/api/home.js
@@ -43,9 +43,17 @@
     })
 }
 
-export function UpdateTask(types,shelf_rack) {
+export function UpdateTask(types,shelfrack) {
     return request({
-        url: '/home/UpdateTask?types=' + types + '&shelf_rack'+shelf_rack,
+        url: '/home/UpdateTask?types=' + types + '&shelfrack='+shelfrack,
+        method: 'get',
+        data :""
+    })
+}
+
+export function SelectAlarmmgInfo() {
+    return request({
+        url: '/home/SelectAlarmmgInfo',
         method: 'get',
         data :""
     })
diff --git a/CanadaMes-ui/src/lang/locales/en-US.json b/CanadaMes-ui/src/lang/locales/en-US.json
index 5942770..3e3cd2d 100644
--- a/CanadaMes-ui/src/lang/locales/en-US.json
+++ b/CanadaMes-ui/src/lang/locales/en-US.json
@@ -1,127 +1,131 @@
 {
-  "systemTitle": "Login System",
-  "usernamePlaceholder": "Please enter username",
-  "passwordPlaceholder": "Please enter password",
-  "loginButton": "Login",
-  "registerButton": "Register",
-  "resetButton": "Reset",
-  "usernameRequired": "Please enter username",
-  "usernameLength": "Username must be between 5 and 15 characters",
-  "passwordRequired": "Please enter password",
-  "passwordLength": "Password must be between 5 and 15 characters",
-  "loginSuccess": "Login successful",
-  "langBtnCN": "Chinese",
-  "langBtnEN": "English",
-  "langHome": "Home",
-  "langUserManagement": "User Management",
-  "langUserList": "User List",
-  "langUsernamePlaceholder": "Please enter username",
-  "langEmailPlaceholder": "Please enter email",
-  "langSearch": "Search",
-  "langAddUser": "Add User",
-  "langUsername": "Username",
-  "langEmail": "Email",
-  "langCreateTime": "Create Time",
-  "langDisabled": "Disabled",
-  "langAction": "Action",
-  "langEdit": "Edit",
-  "langDelete": "Delete",
-  "langAddUserTitle": "Add User",
-  "langPassword": "Password",
-  "langState": "State",
-  "langSelect": "Please select",
-  "langCancel": "Cancel",
-  "langConfirm": "Confirm",
-  "langEditUserTitle": "Edit User",
-  "northglassMESsystem": "NorthGlassMesSystem",
-  "exit": "exit",
-  "changePassword": "changePassword",
-  "resetPassword": "resetPassword",
-  "home": "Home",
-  "role": "role",
-  "langRoleManagement": "Role Management",
-  "langRoleList": "Role List",
-  "langEnterRoleName": "Please enter role name",
-  "langAddRole": "Add Role",
-  "langName": "Name",
-  "langIsValid": "Is Valid",
-  "langOperation": "Operation",
-  "langPleaseSelect": "Please select",
-  "langValid": "Valid",
-  "langInvalid": "Invalid",
-  "langAddRoleSuccess": "Add role successfully",
-  "langEnterName": "Please enter name",
-  "langLengthBetween": "Length should be between",
-  "langAnd": "and",
-  "langCharacters": "characters",
-  "langEnterState": "Please enter state",
-  "langUpdateState": "Update state successfully",
-  "langEditRole": "Edit Role",
-  "langEditRoleSuccess": "Edit role successfully",
-  "langDeleteRoleConfirm": "Are you sure you want to delete this role?",
-  "langPrompt": "Prompt",
-  "langDeleteRoleSuccess": "Delete role successfully",
-  "langCancelDelete": "Cancelled deleting",
-  "langRoleName": "langRoleName",
-  "updateSuccessMessage": "updateSuccessMessage",
-  "paginationTotal": "Total {total}",
-  "paginationSizes": "Items per page",
-  "paginationPrev": "Previous",
-  "paginationPager": "{currentPage}/{pageCount}",
-  "paginationNext": "Next",
-  "paginationJumper": "Jump to",
-  "breadcrumb": {
-    "home": "Home",
-    "permissionManagement": "Permission Management",
-    "permissionList": "Permission List"
-  },
-  "search": {
-    "placeholder": "Enter keywords"
-  },
-  "button": {
-    "addPermission": "Add Permission",
-    "cancel": "Cancel",
-    "confirm": "Confirm"
-  },
-  "table": {
-    "role": "Role",
-    "permissionDescription": "Permission Description",
-    "permissionValue": "Permission Value",
-    "createTime": "Create Time",
-    "isActive": "Is Active",
-    "operation": "Operation"
-  },
-  "tooltip": {
-    "edit": "Edit",
-    "delete": "Delete"
-  },
-  "dialog": {
-    "addPermission": "Add Permission",
-    "editPermission": "Edit Permission"
-  },
-  "form": {
-    "role": "Role",
-    "select": "Please Select",
-    "permission": "Permission",
-    "isActive": "Is Active"
-  },
-  "鎿嶄綔": "Operation",
-  "鏈夋晥": "Valid",
-  "鏃犳晥": "Invalid",
-  "璇疯緭鍏ュ悕绉�": "Please enter a name",
-  "闀垮害鍦� 2 鍒� 15 涓瓧绗�": "Length between 2 and 15 characters",
-  "璇疯緭鍏ョ姸鎬�": "Please enter the status",
-  "娣诲姞瑙掕壊": "Add Role",
-  "淇敼瑙掕壊": "Edit Role",
-  "鍒犻櫎瑙掕壊": "Delete Role",
-  "姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ヨ鑹�, 鏄惁缁х画?": "This operation will permanently delete the role. Continue?",
-  "鎻愮ず": "Reminder",
-  "纭畾": "Confirm",
-  "鍙栨秷": "Cancel",
-  "娣诲姞瑙掕壊鎴愬姛": "Successfully added role",
-  "鏇存柊鐘舵�佹垚鍔�": "Successfully updated status",
-  "淇敼瑙掕壊鎴愬姛": "Successfully modified role",
-  "鍒犻櫎瑙掕壊鎴愬姛": "Successfully deleted role",
+
+    "systemTitle": "Login System",
+    "usernamePlaceholder": "Please enter username",
+    "passwordPlaceholder": "Please enter password",
+    "loginButton": "Login",
+    "registerButton": "Register",
+    "resetButton": "Reset",
+    "usernameRequired": "Please enter username",
+    "usernameLength": "Username must be between 5 and 15 characters",
+    "passwordRequired": "Please enter password",
+    "passwordLength": "Password must be between 5 and 15 characters",
+    "loginSuccess": "Login successful",
+    "langBtnCN": "Chinese",
+    "langBtnEN": "English",
+    "langHome": "Home",
+    "langUserManagement": "User Management",
+    "langUserList": "User List",
+    "langUsernamePlaceholder": "Please enter username",
+    "langEmailPlaceholder": "Please enter email",
+    "langSearch": "Search",
+    "langAddUser": "Add User",
+    "langUsername": "Username",
+    "langEmail": "Email",
+    "langCreateTime": "Create Time",
+    "langDisabled": "Disabled",
+    "langAction": "Action",
+    "langEdit": "Edit",
+    "langDelete": "Delete",
+    "langAddUserTitle": "Add User",
+    "langPassword": "Password",
+    "langState": "State",
+    "langSelect": "Please select",
+    "langCancel": "Cancel",
+    "langConfirm": "Confirm",
+    "langEditUserTitle": "Edit User",
+    "northglassMESsystem":"NorthGlassMesSystem",
+    "exit":"exit",
+    "changePassword":"changePassword",
+    "resetPassword": "resetPassword",
+    "home":"Home",
+    "role":"role",
+    "langRoleManagement": "Role Management",
+    "langRoleList": "Role List",
+    "langEnterRoleName": "Please enter role name",
+    "langAddRole": "Add Role",
+    "langName": "Name",
+    "langIsValid": "Is Valid",
+    "langOperation": "Operation",
+    "langPleaseSelect": "Please select",
+    "langValid": "Valid",
+    "langInvalid": "Invalid",
+    "langAddRoleSuccess": "Add role successfully",
+    "langEnterName": "Please enter name",
+    "langLengthBetween": "Length should be between",
+    "langAnd": "and",
+    "langCharacters": "characters",
+    "langEnterState": "Please enter state",
+    "langUpdateState": "Update state successfully",
+    "langEditRole": "Edit Role",
+    "langEditRoleSuccess": "Edit role successfully",
+    "langDeleteRoleConfirm": "Are you sure you want to delete this role?",
+    "langPrompt": "Prompt",
+    "langDeleteRoleSuccess": "Delete role successfully",
+    "langCancelDelete": "Cancelled deleting",
+    "langRoleName":"langRoleName",
+    "updateSuccessMessage":"updateSuccessMessage",
+    "paginationTotal": "Total {total}",
+    "paginationSizes": "Items per page",
+    "paginationPrev": "Previous",
+    "paginationPager": "{currentPage}/{pageCount}",
+    "paginationNext": "Next",
+    "paginationJumper": "Jump to",
+    "breadcrumb": {
+      "home": "Home",
+      "permissionManagement": "Permission Management",
+      "permissionList": "Permission List"
+    },
+    "search": {
+      "placeholder": "Enter keywords"
+    },
+    "button": {
+      "addPermission": "Add Permission",
+      "cancel": "Cancel",
+      "confirm": "Confirm"
+    },
+    "table": {
+      "role": "Role",
+      "permissionDescription": "Permission Description",
+      "permissionValue": "Permission Value",
+      "createTime": "Create Time",
+      "isActive": "Is Active",
+      "operation": "Operation"
+    },
+    "tooltip": {
+      "edit": "Edit",
+      "delete": "Delete"
+    },
+    "dialog": {
+      "addPermission": "Add Permission",
+      "editPermission": "Edit Permission"
+    },
+    "form": {
+      "role": "Role",
+      "select": "Please Select",
+      "permission": "Permission",
+      "isActive": "Is Active"
+    },
+    "鎿嶄綔": "Operation",
+    "鏈夋晥": "Valid",
+    "鏃犳晥": "Invalid",
+    "璇疯緭鍏ュ悕绉�": "Please enter a name",
+    "闀垮害鍦� 2 鍒� 15 涓瓧绗�": "Length between 2 and 15 characters",
+    "璇疯緭鍏ョ姸鎬�": "Please enter the status",
+    "娣诲姞瑙掕壊": "Add Role",
+    "淇敼瑙掕壊": "Edit Role",
+    "鍒犻櫎瑙掕壊": "Delete Role",
+    "姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ヨ鑹�, 鏄惁缁х画?": "This operation will permanently delete the role. Continue?",
+    "鎻愮ず": "Reminder",
+    "纭畾": "Confirm",
+    "鍙栨秷": "Cancel",
+    "娣诲姞瑙掕壊鎴愬姛": "Successfully added role",
+    "鏇存柊鐘舵�佹垚鍔�": "Successfully updated status",
+    "淇敼瑙掕壊鎴愬姛": "Successfully modified role",
+    "鍒犻櫎瑙掕壊鎴愬姛": "Successfully deleted role",
+    "淇敼鐢ㄦ埛鎴愬姛":"Successfully modified user",
+   
+
   "translation": {
     "D01 VFD error": "D01 VFD error",
     "D02 VFD error": "D02 VFD error",
@@ -171,4 +175,5 @@
   "State": "State",
   "Alarm": "Alarm",
   "Distribute": "Distribute"
-}
\ No newline at end of file
+}
+
diff --git a/CanadaMes-ui/src/lang/locales/zh-CN.json b/CanadaMes-ui/src/lang/locales/zh-CN.json
index b3f3a2a..d1971e8 100644
--- a/CanadaMes-ui/src/lang/locales/zh-CN.json
+++ b/CanadaMes-ui/src/lang/locales/zh-CN.json
@@ -35,6 +35,7 @@
   "exit": "閫�鍑�",
   "changePassword": "淇敼瀵嗙爜",
   "resetPassword": "閲嶇疆瀵嗙爜",
+
   "home": "涓婚〉",
   "role": "瑙掕壊",
   "langRoleManagement": "瑙掕壊绠$悊",
@@ -171,4 +172,5 @@
   "State": "State",
   "Alarm": "鎶ヨ淇℃伅",
   "Distribute": "涓嬪彂"
-}
\ No newline at end of file
+}
+
diff --git a/CanadaMes-ui/src/layout/index.vue b/CanadaMes-ui/src/layout/index.vue
index 8ae46e0..4e5d820 100644
--- a/CanadaMes-ui/src/layout/index.vue
+++ b/CanadaMes-ui/src/layout/index.vue
@@ -13,14 +13,14 @@
                       background-color="#222f3e" text-color="#fff" active-text-color="#ffd04b"
                       :collapse="isCollapse" :unique-opened="true"
                       :collapse-transition="false" :router="true">
-              <el-menu-item index="/" @click="goToHome">
+              <!-- <el-menu-item index="/" @click="goToHome">
                 <template slot="title">
-                  <!--鍥炬爣-->
+               
                   <i class="el-icon-menu"></i>
-                  <!--鏂囨湰-->
+                
                   <span>{{ $t('home') }}</span>
                 </template>
-              </el-menu-item>
+              </el-menu-item> -->
               <!--涓�绾ц彍鍗�-->
               <el-submenu :index="item.id.toString()" v-for="item in menuList" :key="item.id">
                 <!--涓�绾ц彍鍗曟ā鏉垮尯鍩�-->
@@ -31,6 +31,7 @@
                   <span>{{ item.name }}</span>
                 </template>
                 <!--浜岀骇鑿滃崟-->
+              
                 <el-menu-item :index="'/'+menu.router"
                               v-for="menu in item.menuLists" :key="menu.id"
                               @click="addTag(menu.router)">
@@ -53,16 +54,15 @@
         <el-menu :default-active="activePath1" class="el-menu-demo" mode="horizontal"
                  background-color="#576574" text-color="#fff" active-text-color="#ffd04b">
           <div class="header-left">
-            <el-button :icon="isCollapse ? 'el-icon-s-unfold' : 'el-icon-s-fold'" @click="toggleCollapse" style="height:30px"></el-button>
+            <el-button :icon="isCollapse ? 'el-icon-s-unfold' : 'el-icon-s-fold'" @click="toggleCollapse" style="height:30px;"></el-button>
           </div>
-          <div class="tagContainer">
-            <tag v-for="(tag, index) in tags" :key="index" :tag="tag" @removeTag="removeTag(index)" @switchTag="switchTag(index)"></tag>
-            <!-- <el-button icon="el-icon-circle-close" class="close-all-btn" @click="removeAllTags"></el-button> -->
-          </div>
+          <div class="tagContainer" style="display: flex;">
+  <tag v-for="(tag, index) in tags" :key="index" :tag="tag" @removeTag="removeTag(index)" @switchTag="switchTag(index)"></tag>
+</div>
           <template>
-            <el-submenu index="1" class="custom-submenu">
+            <el-submenu index="1" class="custom-submenu"  >
               <template slot="title">
-                <el-avatar src="../assets/emi.png" style="width:30px;height:30px;margin-top:2px;"></el-avatar>
+                <el-avatar src="../assets/emi.png"   style="width:20px;height:20px;margin-top:30px;background-color: white;"></el-avatar>
               </template>
               <el-menu-item index="1-1" @click="logout">{{ $t('exit') }}</el-menu-item>
               <el-menu-item index="1-2" @click="showChangePasswordDialog">{{ $t('changePassword') }}</el-menu-item>
@@ -149,6 +149,7 @@
     ...mapState('tags', ['tags'])
   },
   methods: {
+    
     logout: function () {
       removeToken()
       this.$router.push('/login')
@@ -168,6 +169,7 @@
     this.$store.commit('tags/addTag', tag);
   }
 },
+
 
     removeTag(index) {
       this.$store.commit('tags/removeTag', index); // 浠� Vuex Store 涓Щ闄ゆ爣绛�
@@ -235,11 +237,16 @@
 </script>
 
 <style scoped lang="less">
+
+.el-menu--horizontal > .el-submenu .el-submenu__title {
+  height: 45px !important;
+}
 .custom-submenu  {
  
  
  height: 90px   !important;
 }
+
 
 .header-container {
 
@@ -250,6 +257,7 @@
 
 .header-left {
  margin-right: auto;
+width:30px;
  
 }
 .el-aside {
diff --git a/CanadaMes-ui/src/layout/tag.vue b/CanadaMes-ui/src/layout/tag.vue
index 01a1b7d..63c425f 100644
--- a/CanadaMes-ui/src/layout/tag.vue
+++ b/CanadaMes-ui/src/layout/tag.vue
@@ -64,7 +64,7 @@
 
 .tag i {
   margin-left: 5px;
-  font-size: 12px;
+  font-size: 5px;
   cursor: pointer;
 }
 </style>
\ No newline at end of file
diff --git a/CanadaMes-ui/src/views/Electrical/Parameter.vue b/CanadaMes-ui/src/views/Electrical/Parameter.vue
index ed3cb31..d30361f 100644
--- a/CanadaMes-ui/src/views/Electrical/Parameter.vue
+++ b/CanadaMes-ui/src/views/Electrical/Parameter.vue
@@ -1,55 +1,55 @@
 <template>
   <div class="app">
-    <!--闈㈠寘灞戝鑸尯鍩�-->
+    <!-- 闈㈠寘灞戝鑸尯鍩� -->
     <el-breadcrumb separator-class="el-icon-arrow-right" class="el-breadcrumb">
       <router-link to="/home" tag="el-button" type="text">{{ $t('langHome') }}</router-link>
-      <el-button type="text">{{ $t('Distribute') }}</el-button>
+      <el-button type="text">Electrical</el-button>
       <router-link to="/Electrical/Parameter" tag="el-button" type="text">Parameter</router-link>
       <router-link to="/Electrical/Action" tag="el-button" type="text">Action</router-link>
       <router-link to="/Electrical/Sign" tag="el-button" type="text">Sign</router-link>
       <router-link to="/Electrical/State" tag="el-button" type="text">State</router-link>
       <router-link to="/Electrical/alarm" tag="el-button" type="text">Alarm</router-link>
     </el-breadcrumb>
+    
     <div>Parameter</div>
-
-    <el-form label-width="100px" style="display: flex;flex-wrap: wrap;" :model="messagepack.data">
+  
+    <el-form label-width="100px" style="display: flex; flex-wrap: wrap;" :model="messagepack.data">
       <div id="btn_div">
-        <el-button type="primary" @click="send()">{{ $t('Distribute') }}</el-button>
+        <el-button type="primary" @click="send()" id="xiafa"  :disabled="isButtonDisabled">涓嬪彂鍙傛暟</el-button>
+       
       </div>
       <div class="kuai_div" v-for="(item, index) in record.xyData" :key="index">
-        <el-input style="width: 280px;" class="in_mc" v-model="item.name" readonly></el-input>
-        <el-input v-model.number="item.value" style="width: 80px;"
-          @input="handleChange(index, $event.target.value)"></el-input>
-      </div>
+  <el-input style="width: 280px; border:none;" class="in_mc" v-model="item.name" readonly></el-input> 
+  <span style="margin-right: 5px; width: 50px;">{{ item.value }}</span>
+  <span style="margin-right: 5px; font-size: 14px;">|</span>
+  <input v-model="item.value2" type="number" style="width: 30px; margin-right: 5px; margin-top: 5px; font-size: 16px;">
+</div>
     </el-form>
   </div>
 </template>
-  
-<script>
 
-import LanguageMixin from '../../lang/LanguageMixin'
+<script>
 let socket;
 
 export default {
   name: "Parameter",
-  mixins: [LanguageMixin],
-  data () {
+  data() {
     return {
       record: {
         params: [100, 200, 10, 10, 10, 10],
         xyData: [
-          { name: "conveyor Velocity(Auto FAST)", value: 0 },
-          { name: "conveyor Velocity(Auto SLOW)", value: 0 },
-          { name: "conveyor Velocity(Manual)", value: 0 },
-          { name: "A01 A02 TURN JOG Velocity", value: 0 },
-          { name: "A01 A02 TRAVEL JOG Velocity", value: 0 },
-          { name: "B01 B02 TRAVEL JOG Velocity", value: 0 },
-          { name: "A01 A02 TURN POS Velocity AUTO", value: 0 },
-          { name: "A01 A02 TURN POS Velocity manual", value: 0 },
-          { name: "A01 A02 TRAVEL POS Velocity AUTO", value: 0 },
-          { name: "A01 A02 TRAVEL POS Velocity manual", value: 0 },
-          { name: "B01 B02 TRAVEL POS Velocity AUTO", value: 0 },
-          { name: "B01 B02 TRAVEL POS Velocity manual", value: 0 }
+          { name: "conveyor Velocity(Auto FAST)", value: 0, value2: 0 },
+          { name: "conveyor Velocity(Auto SLOW)", value: 0, value2: 0 },
+          { name: "conveyor Velocity(Manual)", value: 0 ,value2: 0 },
+          { name: "A01 A02 TURN JOG Velocity", value: 0, value2: 0 },
+          { name: "A01 A02 TRAVEL JOG Velocity", value: 0, value2: 0 },
+          { name: "B01 B02 TRAVEL JOG Velocity", value: 0, value2: 0 },
+          { name: "A01 A02 TURN POS Velocity AUTO", value: 0, value2: 0 },
+          { name: "A01 A02 TURN POS Velocity manual", value: 0, value2: 0 },
+          { name: "A01 A02 TRAVEL POS Velocity AUTO", value: 0, value2: 0 },
+          { name: "A01 A02 TRAVEL POS Velocity manual", value: 0, value2: 0 },
+          { name: "B01 B02 TRAVEL POS Velocity AUTO", value: 0, value2: 0 },
+          { name: "B01 B02 TRAVEL POS Velocity manual", value: 0, value2: 0 }
         ],
         canshu: []
       },
@@ -62,92 +62,98 @@
       }
     };
   },
-  created () {
+  
+ 
+  created() {
     this.initWebSocket();
+    this.isButtonDisabled = true;
   },
   methods: {
-    initWebSocket () {
+    initWebSocket() {
       let viewname = "Parameter";
-
+  
       if (typeof WebSocket === "undefined") {
         console.log("鎮ㄧ殑娴忚鍣ㄤ笉鏀寔WebSocket");
       } else {
         let socketUrl = "ws://" + "localhost:8888" + "/springboot-vue3/api/talk/" + viewname;
-
+  
         if (socket != null) {
           socket.close();
           socket = null;
         }
-
+  
         // 寮�鍚竴涓獁ebsocket鏈嶅姟
         socket = new WebSocket(socketUrl);
-
+  
         // 鎵撳紑浜嬩欢
         socket.onopen = function () {
           console.log("websocket宸叉墦寮�");
         };
-
+  
         // 鏀跺埌娑堟伅
         socket.onmessage = (msg) => {
-          if (!msg.data) {
-            return; // 濡傛灉鏀跺埌绌烘暟鎹紝鍒欑洿鎺ヨ繑鍥烇紝涓嶆墽琛屽悗缁�昏緫
-          }
+  if (!msg.data) {
+    return; // 濡傛灉鏀跺埌绌烘暟鎹紝鍒欑洿鎺ヨ繑鍥烇紝涓嶆墽琛屽悗缁�昏緫
+  }
 
-          let obj = JSON.parse(msg.data);
-          this.record.params[0] = obj.params[0];
+  let obj = JSON.parse(msg.data);
+  this.record.params[0] = obj.params[0];
+  this.record.state = obj.state[0];
 
-          for (let a = 0; a <= this.record.params[0].length - 1; a++) {
-            if (!this.record.xyData[a]) {
-              this.record.xyData[a] = { name: this.record.canshu[a], value: this.record.params[0][a] };
-            } else {
-              this.record.xyData[a].value = this.record.params[0][a];
-            }
-          }
+  let isButtonDisabled = this.record.state.includes(1); 
+  // 鍒ゆ柇state涓槸鍚﹀瓨鍦�1
+  console.log(isButtonDisabled)
+  this.isButtonDisabled = isButtonDisabled; // 灏嗗垽鏂粨鏋滀繚瀛樺埌鍙橀噺isButtonDisabled涓�
 
-          console.log(this.record.xyData);
-          this.$forceUpdate();
-        };
+  for (let a = 0; a <= this.record.params[0].length - 1; a++) {
+    if (!this.record.xyData[a]) {
+      this.record.xyData[a] = { name: this.record.canshu[a], value: this.record.params[0][a] };
+    } else {
+      this.record.xyData[a].value = this.record.params[0][a];
+    }
+  }
 
+  console.log(this.record.xyData);
+  this.$forceUpdate();
+};
+  
         // 鍏抽棴浜嬩欢
         socket.onclose = function () {
           console.log("websocket宸插叧闂�");
         };
-
+  
         // 鍙戠敓閿欒浜嬩欢
         socket.onerror = function () {
           console.log("websocket鍙戠敓浜嗛敊璇�");
         };
       }
     },
-    send () {
-      this.messagepack.data = this.record.xyData.map((item) => parseInt(item.value)); // 杞崲涓烘暣鏁版暟缁�
+    send() {
+      this.messagepack.data = this.record.xyData.map((item) => parseInt(item.value2)); // 杞崲涓烘暣鏁版暟缁�
       console.log(this.messagepack);
       socket?.send(JSON.stringify(this.messagepack));
     },
-    handleChange (index, value) {
+    handleChange(index, value) {
       this.record.xyData[index].value = value;
     }
   }
 };
 </script>
-  
+
 <style>
 .kuai_div {
-  width: 30%;
+  width: calc(100% / 3);
   margin-bottom: 15px;
-}
-
-.el-input {
-  border: none;
 }
 
 .el-input__inner {
   border: 1px solid black;
 }
+.in_mc{
 
-.in_mc .el-input__inner {
-  border: none;
+  border:none;
 }
+
 
 #btn_div {
   width: 100%;
@@ -156,4 +162,13 @@
 #btn_div .el-button {
   float: right;
 }
-</style>
\ No newline at end of file
+input[type="number"]::-webkit-inner-spin-button,
+  input[type="number"]::-webkit-outer-spin-button {
+    -webkit-appearance: none;
+    margin: 0;
+  }
+
+  input[type="number"] {
+    -moz-appearance: textfield; /* Firefox涓鐢ㄤ笂涓嬬澶� */
+  }
+</style>
diff --git a/CanadaMes-ui/src/views/Electrical/alarm.vue b/CanadaMes-ui/src/views/Electrical/alarm.vue
index 19ed7d2..c96986c 100644
--- a/CanadaMes-ui/src/views/Electrical/alarm.vue
+++ b/CanadaMes-ui/src/views/Electrical/alarm.vue
@@ -55,7 +55,9 @@
 
       },
       roles: [],
+
       localizedRoles: [],
+
       messagepack: {
         data: { taskname: "" }
       },
@@ -105,6 +107,7 @@
 
   },
   methods: {
+
     load () {
       setAll().then(res => {
         this.roles = res.data.list;
@@ -140,6 +143,7 @@
         content: translation[role.content] || role.content
       }));
     },
+
     init () {
       let viewname = "alarm";
 
diff --git a/CanadaMes-ui/src/views/home/index.vue b/CanadaMes-ui/src/views/home/index.vue
index f5ca385..7900d17 100644
--- a/CanadaMes-ui/src/views/home/index.vue
+++ b/CanadaMes-ui/src/views/home/index.vue
@@ -73,7 +73,7 @@
 
 
 .blocks {
-    min-height: 50vh;
+    min-height: 49vh;
     max-width: 100vw;
     background-image: url('../../img/xmjc.png');
     margin: 0 auto;
@@ -110,36 +110,74 @@
 .el-table__empty-text {
     line-height: 41px;
 }
+
+.box {
+    width: 90%;
+    margin-left: 5%;
+    height: 35px;
+    color: red;
+    font-size: 12px;
+    overflow: hidden;
+}
+
+.text {
+    width: auto;
+    line-height: 35px;
+    white-space: nowrap;
+    animation: textScroll 20s linear infinite;
+    margin: 0 auto;
+}
+
+@keyframes textScroll {
+    0% {
+        transform: translateX(100%);
+    }
+
+    100% {
+        transform: translateX(-150%);
+    }
+}
 </style>
 <template>
     <el-container>
         <!-- <el-header style="padding: 10px;"></el-header> -->
         <el-main>
+            <div class="box">
+                <div class="text">
+                    Alarm:
+                    <label v-for="item in this.alarm" :key="item['id']">
+                        {{ item['content'] }}
+                    </label>
+                </div>
+            </div>
+
             <div style="display:flex;justify-content: space-around;width: 95%;margin: 0 auto;">
                 <el-input style="width:15%;" placeholder="Enter the glass lD" v-model="glassid"></el-input>
                 <el-button type="primary" @click="showform()">Manually feed the glass</el-button>
                 <el-input style="width:15%;" placeholder="Enter the order number" v-model="order"></el-input>
-                <el-button type="warning" @click="getOrder()">Exit the glass by order number</el-button>
+                <el-button type="warning" @click="showform1();">Exit the glass by order number</el-button>
             </div>
             <div>
-                <el-table :data="this.tasklist1" border style="width: 100%" >
+                <el-table :data="this.tasklist1" border style="width: 100%">
                     <el-table-column prop="glassId" label="Coming out glass ID"></el-table-column>
-                    <el-table-column :width="250" prop="cage" label="The Grille number being used"></el-table-column>
+                    <el-table-column :width="250" prop="cell" label="The Grille number being used"></el-table-column>
                     <el-table-column prop="orderId" label="Order Nmuber"></el-table-column>
                     <el-table-column prop="lengthwidth" label="Length and width"></el-table-column>
                     <el-table-column prop="coating" label="coating"></el-table-column>
                     <el-table-column label="Operate">
-                        <el-button type="primary" style="padding: 4px 10px;font-size: 12px;">end task</el-button>
+                        <el-button type="primary" style="padding: 4px 10px;font-size: 12px;" @click="endtask(0)">end
+                            task</el-button>
                     </el-table-column>
                 </el-table>
                 <el-table :data="this.tasklist2" border style="width: 100%">
                     <el-table-column prop="glassId" label="Incoming glass ID"></el-table-column>
-                    <el-table-column :width="250" prop="cage" label="The Grille number being used"></el-table-column>
+                    <el-table-column :width="250" prop="cell" label="The Grille number being used"></el-table-column>
                     <el-table-column prop="orderId" label="Order Nmuber"></el-table-column>
                     <el-table-column prop="lengthwidth" label="Length and width"></el-table-column>
                     <el-table-column prop="coating" label="coating"></el-table-column>
                     <el-table-column label="Operate">
-                        <el-button type="primary" style="padding: 4px 10px;font-size: 12px;">end task</el-button>
+                        <el-button type="primary" style="padding: 4px 10px;font-size: 12px;" @click="endtask(1)">end
+                            task</el-button>
                     </el-table-column>
                 </el-table>
             </div>
@@ -180,7 +218,7 @@
         </el-footer>
         <el-dialog :visible.sync="dialogFormVisible" title="Please confirm the information">
             <el-form :model="form" label-width="100px" style="padding-right: 30px">
-                <el-form-item label="Order">
+                <el-form-item label="order">
                     <el-input v-model="form.orderno" autocomplete="off" />
                 </el-form-item>
                 <el-form-item label="length">
@@ -200,12 +238,28 @@
                 </span>
             </template>
         </el-dialog>
+        <el-dialog :visible.sync="dialogFormVisible1" title="Ordering Information">
+            <el-form :model="form1" label-width="100px" style="padding-right: 30px">
+                <el-form-item label="order">
+                    <el-input v-model="form1.order" autocomplete="off" />
+                </el-form-item>
+                <el-form-item label="number">
+                    <el-input v-model="form1.number" autocomplete="off" />
+                </el-form-item>
+            </el-form>
+            <template #footer>
+                <span class="dialog-footer">
+                    <el-button @click="cancal1()">cancal</el-button>
+                    <el-button @click="getOrder();" type="primary">confirm</el-button>
+                </span>
+            </template>
+        </el-dialog>
     </el-container>
 </template>
   
 <script>
 
-import { home, home2, loadtask, InsertOrder, Addglassid } from "../../api/home";
+import { home, home2, loadtask, InsertOrder, Addglassid, UpdateTask, SelectAlarmmgInfo } from "../../api/home";
 
 let socket;
 export default {
@@ -213,12 +267,18 @@
     data() {
         return {
             dialogFormVisible: false,
+            dialogFormVisible1: false,
             form: {
                 orderno: "NG2210210",
                 length: 800,
                 width: 1000,
                 coating: "red",
             },
+            form1: {
+                order: "NG2210210",
+                number: 800,
+            },
+            alarm: [],
             tableData: [],
             cagelist1: [],
             cagelist2: [],
@@ -232,7 +292,9 @@
             glassid: "",
             url: "../../img/bigcar01.png",
             car1: 116,
-            car2: 187
+            car2: 187,
+            incell: "",
+            outcell: ""
         };
     },
     created() {
@@ -268,14 +330,20 @@
 
                     this.car1 = 116 + 18.88 * obj.params[0][0];
                     this.car2 = 187 + 18.8 * obj.params[0][1];
-                    this.tableData=obj.tableData[0];
-                    this.cagelist1=obj.cagelist1[0];
-                    this.cagelist2=obj.cagelist2[0];
-                    this.cagelist3=obj.cagelist3[0];
-                    this.cagelist4=obj.cagelist4[0];
-                    this.tasklist1=obj.tasklist1[0];
-                    this.tasklist2=obj.tasklist2[0];
-                
+                    this.tableData = obj.tableData[0];
+                    this.cagelist1 = obj.cagelist1[0];
+                    this.cagelist2 = obj.cagelist2[0];
+                    this.cagelist3 = obj.cagelist3[0];
+                    this.cagelist4 = obj.cagelist4[0];
+                    this.tasklist1 = obj.tasklist1[0];
+                    this.tasklist2 = obj.tasklist2[0];
+                    if (this.tasklist1.length > 0) {
+                        this.incell = this.tasklist1[0]['cell'];
+                    }
+                    if (this.tasklist1.length > 0) {
+                        this.outcell = this.tasklist2[0]['cell'];
+                    }
+                    this.alarm = obj.alarmmg[0];
                     // for (let a = 0; a <= this.record.params.length - 1; a++) {
                     //     // this.record.xyData[a] = [this.record.canshu[a], this.record.params[0][a]];
                     //     // this.record.xyData[a] = { name: this.record.canshu[a], value: this.record.params[0][a] };
@@ -311,14 +379,23 @@
             });
             loadtask(this.task1).then(res => {
                 this.tasklist1 = res.data.list;
-                console.log(this.tasklist1);
+                if (res.data.list.length > 0) {
+                    this.incell = this.tasklist1[0]['cell'];
+                }
             });
             loadtask(this.task2).then(res => {
                 this.tasklist2 = res.data.list;
+                if (res.data.list.length > 0) {
+                    this.outcell = this.tasklist2[0]['cell'];
+                }
+
             });
             loadtask(this.task2).then(res => {
                 this.tasklist2 = res.data.list;
-                
+
+            });
+            SelectAlarmmgInfo().then(res => {
+                this.alarm = res.data.alarmmg;
             });
         },
         //鏍规嵁鏍煎瓙鐘舵�佷慨鏀归鑹�
@@ -337,7 +414,7 @@
         },
         //鎸夎鍗曞嚭鐗�
         getOrder() {
-            if (this.order != "") {
+            if (this.form1.order != "") {
                 InsertOrder(this.order).then(res => {
                     if (res.data.message == 200) {
                         this.$message.success("Operation successful");
@@ -349,23 +426,9 @@
             }
 
         },
-        showform() {
-            this.form =
-            {
-                orderno: "NG2210210",
-                length: 800,
-                width: 1000,
-                coating: "red",
-            };
-            this.dialogFormVisible = true;
-        },
-        cancal() {
-            this.dialogFormVisible = false;
-            this.form = {};
-        },
         //鎵嬪姩涓婄墖
         sbumitglassid() {
-            if (this.glassid != "") {
+            if (this.form.order != "") {
                 Addglassid(this.glassid).then(res => {
                     if (res.data.message2 == 200) {
                         this.$message.success("Operation successful");
@@ -376,12 +439,59 @@
                 });
             }
         },
-        endtask(type,shelfrack) {
-            alert(type);
-            alert(shelfrack);
+        showform() {
+            if (this.glassid != "") {
+                this.form =
+                {
+                    orderno: "NG2210210",
+                    length: 800,
+                    width: 1000,
+                    coating: "red",
+                };
+                this.dialogFormVisible = true;
+            }
+        },
+        showform1() {
+            if (this.order != "") {
+                this.form1 =
+                {
+                    order: "NG2210210",
+                    number: 800,
+                };
+                this.dialogFormVisible1 = true;
+            }
+
+
+        },
+        cancal() {
+            this.dialogFormVisible = false;
+            this.form = {};
+        },
+        cancal1() {
+            this.dialogFormVisible1 = false;
+            this.form1 = {};
+        },
+        endtask(type) {
+            if (type == 0) {
+                UpdateTask(type, this.incell).then(res => {
+                    if (res.data.message3 == 200) {
+                        this.$message.success("Operation successful");
+                    }
+                });
+            } else {
+                UpdateTask(type, this.outcell).then(res => {
+                    if (res.data.message3 == 200) {
+                        this.$message.success("Operation successful");
+                    }
+                });
+            }
+
+
         }
+
     }
-};
+}
+
 
 
 </script>
\ No newline at end of file
diff --git a/CanadaMes-ui/src/views/user/index.vue b/CanadaMes-ui/src/views/user/index.vue
index 700277e..82dbf5f 100644
--- a/CanadaMes-ui/src/views/user/index.vue
+++ b/CanadaMes-ui/src/views/user/index.vue
@@ -11,12 +11,11 @@
       <el-row :gutter="20">
         <!--鎼滅储涓庢坊鍔犲尯鍩�-->
         <el-col :span="6">
-          <el-input :placeholder="$t('langUsernamePlaceholder')" v-model="queryInfo.username" clearable
-            @clear="getUserList">
+          <el-input :placeholder= "$t('langUsernamePlaceholder')"  v-model="queryInfo.username" clearable @clear="getUserList">
           </el-input>
         </el-col>
         <el-col :span="6">
-          <el-input :placeholder="$t('langEmailPlaceholder')" v-model="queryInfo.email" clearable @clear="getUserList">
+          <el-input  :placeholder="$t('langEmailPlaceholder')"  v-model="queryInfo.email" clearable @clear="getUserList">
           </el-input>
         </el-col>
         <!--鎼滅储鎸夐挳-->
@@ -36,62 +35,86 @@
         <el-table-column :label="$t('langCreateTime')" prop="createTime"></el-table-column>
         <el-table-column :label="$t('langDisabled')">
           <template slot-scope="scope">
-            <el-switch :active-value="0" :inactive-value="1" v-model="scope.row.state" @change="stateChange(scope.row)">
+            <el-switch
+                :active-value="0"
+                :inactive-value="1"
+                v-model="scope.row.state"
+                @change="stateChange(scope.row)">
             </el-switch>
           </template>
         </el-table-column>
         <el-table-column label="鎿嶄綔">
-          <template slot-scope="scope">
-            <el-button type="primary" icon="el-icon-refresh" @click="resetPassword(scope.row)">
-
-              {{ $t('resetPassword') }}
-            </el-button>
-          </template>
-        </el-table-column>
+  <template slot-scope="scope">
+    <el-button  type="primary" icon="el-icon-refresh" @click="resetPassword(scope.row)">
+   
+      {{ $t('resetPassword') }}
+    </el-button>
+  </template>
+</el-table-column>
         <el-table-column :label="$t('langAction')">
           <template slot-scope="scope">
             <!--淇敼-->
             <el-tooltip effect="dark" :content="$t('langEdit')" placement="top" :enterable="false">
-              <el-button type="primary" icon="el-icon-edit" size="mini" @click="showEditDialog(scope.row.id)"></el-button>
+              <el-button type="primary" icon="el-icon-edit" size="mini"
+                         @click="showEditDialog(scope.row.id)"></el-button>
             </el-tooltip>
             <!--鍒犻櫎-->
             <el-tooltip effect="dark" :content="$t('langDelete')" placement="top" :enterable="false">
-              <el-button type="danger" icon="el-icon-delete" size="mini" @click="removeUserById(scope.row)"></el-button>
+              <el-button type="danger" icon="el-icon-delete" size="mini"
+                         @click="removeUserById(scope.row)"></el-button>
             </el-tooltip>
           </template>
         </el-table-column>
       </el-table>
       <!--鍒嗛〉鍖哄煙-->
-      <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
-        :current-page="queryInfo.pageNum" :page-sizes="[6, 12, 18, 24]" :page-size="queryInfo.pageSize"
-        :total="userList.total" :pager-count="7" :layout="layout">
-      </el-pagination>
+       <el-pagination
+      @size-change="handleSizeChange"
+      @current-change="handleCurrentChange"
+      :current-page="queryInfo.pageNum"
+      :page-sizes="[6, 12, 18, 24]"
+      :page-size="queryInfo.pageSize"
+      :total="userList.total"
+      
+      :pager-count="7"
+      :layout="layout"
+    >
+    </el-pagination>
     </el-card>
     <!--娣诲姞鐢ㄦ埛鐨勫璇濇-->
-    <el-dialog :title="$t('langAddUserTitle')" :visible.sync="addDialogVisible" width="50%" @close="addDialogClosed">
+    <el-dialog
+        :title="$t('langAddUserTitle')"
+        :visible.sync="addDialogVisible"
+        width="50%"
+        @close="addDialogClosed">
       <!--鍐呭涓讳綋鍖哄煙-->
       <el-form :model="addUserForm" :rules="addUserRules" ref="addUserRef" label-width="100px">
-        <el-form-item :label="$t('langUsername')" prop="username">
-          <el-input v-model="addUserForm.username"></el-input>
+        <el-form-item :label="$t('langUsername')" prop="username" >
+          <el-input v-model="addUserForm.username" ></el-input>
         </el-form-item>
-        <el-form-item :label="$t('langPassword')" prop="password">
+        <el-form-item :label="$t('langPassword')" prop="password" >
           <el-input v-model="addUserForm.password" type="password"></el-input>
         </el-form-item>
         <el-form-item :label="$t('langEmail')" prop="email">
           <el-input v-model="addUserForm.email"></el-input>
         </el-form-item>
 
-
+      
         <el-form-item :label="$t('langState')" prop="state">
-          <el-select v-model="addUserForm.state">
-            <el-option v-for="(item, index) in options" :key="index" :value="item.value" :label="item.label">
+          <el-select v-model="addUserForm.state" >
+            <el-option v-for="(item,index) in options"
+                       :key="index"
+                       :value="item.value"
+                       :label="item.label">
             </el-option>
           </el-select>
         </el-form-item>
 
-        <el-form-item label="瑙掕壊" prop="roleId">
-          <el-select filterable v-model="addUserForm.roleId" placeholder="璇烽�夋嫨">
-            <el-option v-for="item in roleList" :key="item.id" :value="item.id" :label="item.name">
+        <el-form-item :label="$t('role')" prop="roleId">
+          <el-select filterable v-model="addUserForm.roleId" :placeholder="$t('langSelect')"  >
+            <el-option v-for="item in roleList"
+                       :key="item.id"
+                       :value="item.id"
+                       :label="item.name">
             </el-option>
           </el-select>
         </el-form-item>
@@ -102,15 +125,21 @@
       </span>
     </el-dialog>
     <!--淇敼鐢ㄦ埛鐨勫璇濇-->
-    <el-dialog :title="$t('langEditUserTitle')" :visible.sync="editDialogVisible" width="50%">
+    <el-dialog
+        :title="$t('langEditUserTitle')"
+        :visible.sync="editDialogVisible"
+        width="50%">
       <!--鍐呭涓讳綋鍖哄煙-->
       <el-form :model="editUserForm" :rules="addUserRules" ref="addCategoryRef" label-width="100px">
         <el-form-item :label="$t('langUsername')" prop="username">
           <el-input v-model="editUserForm.username" disabled></el-input>
         </el-form-item>
         <el-form-item :label="$t('role')" prop="roleId">
-          <el-select filterable v-model="editUserForm.roleId" placeholder="璇烽�夋嫨">
-            <el-option v-for="item in roleList" :key="item.id" :value="item.id" :label="item.name">
+          <el-select filterable v-model="editUserForm.roleId" :placeholder="$t('langSelect')" >
+            <el-option v-for="item in roleList"
+                       :key="item.id"
+                       :value="item.id"
+                       :label="item.name">
             </el-option>
           </el-select>
         </el-form-item>
@@ -118,8 +147,11 @@
           <el-input v-model="editUserForm.email"></el-input>
         </el-form-item>
         <el-form-item :label="$t('langDisabled')" prop="state">
-          <el-select v-model="editUserForm.state">
-            <el-option v-for="(item, index) in options" :key="index" :value="item.value" :label="item.label">
+          <el-select v-model="editUserForm.state" >
+            <el-option v-for="(item,index) in options"
+                       :key="index"
+                       :value="item.value"
+                       :label="item.label">
             </el-option>
           </el-select>
         </el-form-item>
@@ -134,15 +166,15 @@
 
 
 <script>
-import { getById, removeById, saveOrUpdate, selectPage, resetPass } from "../../api/user";
-import { select } from "../../api/role";
+import {getById, removeById, saveOrUpdate, selectPage,resetPass} from "../../api/user";
+import {select} from "../../api/role";
 
 import LanguageMixin from '../../lang/LanguageMixin'
 export default {
   name: "User",
   mixins: [LanguageMixin],
 
-  data () {
+  data() {
     return {
       layout: 'total, sizes, prev, pager, next, jumper',
       queryInfo: {
@@ -161,23 +193,23 @@
       editUserForm: {
 
         roleId: null,
-        name: null,
-        roleid: null,
+        name:null,
+        roleid:null,
       },
       // 娣诲姞鍒嗙被鐨勯獙璇佽鍒�
       addUserRules: {
         roleId: null,
         username: [
-          { required: true, message: '璇疯緭鍏ョ敤鎴峰悕', trigger: 'blur' },
-          { min: 5, max: 15, message: '闀垮害鍦� 5 鍒� 15 涓瓧绗�', trigger: 'blur' }
+          {required: true, message: '璇疯緭鍏ョ敤鎴峰悕', trigger: 'blur'},
+          {min: 5, max: 15, message: '闀垮害鍦� 5 鍒� 15 涓瓧绗�', trigger: 'blur'}
         ],
         password: [
-          { required: true, message: '璇疯緭鍏ュ瘑鐮�', trigger: 'blur' },
-          { min: 5, max: 15, message: '闀垮害鍦� 5 鍒� 15 涓瓧绗�', trigger: 'blur' }
+          {required: true, message: '璇疯緭鍏ュ瘑鐮�', trigger: 'blur'},
+          {min: 5, max: 15, message: '闀垮害鍦� 5 鍒� 15 涓瓧绗�', trigger: 'blur'}
         ],
         email: [
-          { required: true, message: '璇疯緭鍏ラ偖绠�', trigger: 'blur' },
-          { type: 'email', message: '璇疯緭鍏ユ纭牸寮忕殑閭鍦板潃', trigger: 'blur' }
+          {required: true, message: '璇疯緭鍏ラ偖绠�', trigger: 'blur'},
+          {type: 'email', message: '璇疯緭鍏ユ纭牸寮忕殑閭鍦板潃', trigger: 'blur'}
         ]
       },
       // 鎺у埗娣诲姞鐢ㄦ埛寮规鐨勬樉绀哄拰闅愯棌
@@ -185,96 +217,95 @@
       // 鎺у埗淇敼鐢ㄦ埛寮规鐨勬樉绀哄拰闅愯棌
       editDialogVisible: false,
       options: [
-        { label: '姝e父', value: 1 },
-        { label: '绂佺敤', value: 0 }
+        {label: '姝e父', value: 1},
+        {label: '绂佺敤', value: 0}
       ],
       roleList: [],
     }
   },
-  created () {
+  created() {
     this.getUserList();
   },
   methods: {
-    getUserList () {
+    getUserList() {
       selectPage(this.queryInfo).then(res => {
         this.userList.records = res.data.records;
-
         this.userList.total = res.data.total
       });
+    
+//       test().then(res => {
+//         console.log(res.data)
+//       });
+//       const data6 = [
+//   { id: 32, deviceName: 'Device 7', address: 'Address 1' },
+//   { id: 33, deviceName: 'Device 8', address: 'Address 2' },
 
-      //       test().then(res => {
-      //         console.log(res.data)
-      //       });
-      //       const data6 = [
-      //   { id: 32, deviceName: 'Device 7', address: 'Address 1' },
-      //   { id: 33, deviceName: 'Device 8', address: 'Address 2' },
+// ];
 
-      // ];
-
-      //       testup(data6).then(res => {
-      //         console.log(res.data);
-      //       });
-
-      //       call({
-      //   id: 1,
-      //   name: 12345 
-      // }).then(res => {
-      //         console.log(res.data);
-      //       });
+//       testup(data6).then(res => {
+//         console.log(res.data);
+//       });
+      
+//       call({
+//   id: 1,
+//   name: 12345 
+// }).then(res => {
+//         console.log(res.data);
+//       });
 
     },
-
-    showAddDialog () {
+  
+    showAddDialog() {
       this.addDialogVisible = true;
-      select().then(res => {
-        this.roleList = res.data;
-      });
+       select().then(res => {
+  this.roleList = res.data;
+});
     },
     // stateChange(info) {
     //   saveOrUpdate(info).then(() => {
     //     this.$message.success("鏇存柊鐘舵�佹垚鍔�")
     //   });
     // },
-    stateChange (info) {
-      saveOrUpdate(info).then(() => {
-        const successMessage = this.$t('updateSuccessMessage');
-        this.$message.success(successMessage);
+    stateChange(info) {
+  saveOrUpdate(info).then(() => {
+    const successMessage = this.$t('updateSuccessMessage');
+    this.$message.success(successMessage);
+  });
+},
+    resetPassword(info) {
+  this.$confirm('纭閲嶇疆瀵嗙爜涓洪粯璁ゅ�煎悧锛�', '閲嶇疆瀵嗙爜', {
+    confirmButtonText: '纭畾',
+    cancelButtonText: '鍙栨秷',
+    type: 'warning',
+  })
+    .then(() => {
+      resetPass(info).then(() => {
+        this.$message.success('瀵嗙爜宸查噸缃负榛樿鍊�');
       });
-    },
-    resetPassword (info) {
-      this.$confirm('纭閲嶇疆瀵嗙爜涓洪粯璁ゅ�煎悧锛�', '閲嶇疆瀵嗙爜', {
-        confirmButtonText: '纭畾',
-        cancelButtonText: '鍙栨秷',
-        type: 'warning',
-      })
-        .then(() => {
-          resetPass(info).then(() => {
-            this.$message.success('瀵嗙爜宸查噸缃负榛樿鍊�');
-          });
-        })
-        .catch(() => {
-          // 鐢ㄦ埛鍙栨秷閲嶇疆瀵嗙爜鎿嶄綔
-        });
-    },
-    showEditDialog (id) {
-      getById({ id: id }).then(res => {
+    })
+    .catch(() => {
+      // 鐢ㄦ埛鍙栨秷閲嶇疆瀵嗙爜鎿嶄綔
+    });
+},
+    showEditDialog(id) {
+      getById({id: id}).then(res => {
         this.editUserForm = res.data;
         this.editDialogVisible = true;
       });
 
-
+     
       select().then(res => {
-        this.roleList = res.data;
-      });
+  this.roleList = res.data;
+});
     },
-    removeUserById (user) {
+    removeUserById(user) {
       // 寮规璇㈤棶鐢ㄦ埛鏄惁鍒犻櫎鍒嗙被
       this.$confirm('姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ュ垎绫�, 鏄惁缁х画?', '鎻愮ず', {
         confirmButtonText: '纭畾',
         cancelButtonText: '鍙栨秷',
         type: 'warning'
       }).then(() => {
-        removeById({ id: user.id }).then(() => {
+        removeById({id: user.id}).then(() => {
           // 閲嶆柊鑾峰彇鍒嗙被鍒楄〃
           this.getUserList();
           this.$message.success("鍒犻櫎鐢ㄦ埛鎴愬姛");
@@ -283,18 +314,18 @@
         this.$message.info('宸插彇娑堝垹闄�');
       });
     },
-    handleSizeChange (newSize) {
+    handleSizeChange(newSize) {
       this.queryInfo.pageSize = newSize;
       this.getUserList()
     },
-    handleCurrentChange (newPage) {
+    handleCurrentChange(newPage) {
       this.queryInfo.pageNum = newPage;
       this.getUserList()
     },
-    addDialogClosed () {
+    addDialogClosed() {
       this.$refs['addUserRef'].resetFields();
     },
-    addUser () {
+    addUser() {
       this.$refs.addUserRef.validate(async valid => {
         if (!valid) return;
         saveOrUpdate(this.addUserForm).then(() => {
@@ -306,12 +337,13 @@
         });
       })
     },
-    editUserInfo () {
+    editUserInfo() {
       this.$refs.addCategoryRef.validate(async valid => {
         if (!valid) return;
-
+       
         saveOrUpdate(this.editUserForm).then(() => {
-          this.$message.success("淇敼鐢ㄦ埛鎴愬姛");
+          const 淇敼鐢ㄦ埛鎴愬姛 = this.$t('淇敼鐢ㄦ埛鎴愬姛');
+          this.$message.success(淇敼鐢ㄦ埛鎴愬姛);
           // 闅愯棌娣诲姞鍒嗙被瀵硅瘽妗�
           this.editDialogVisible = false;
           // 閲嶆柊鑾峰彇鍒嗙被鍒楄〃
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 5e776f9..28a4104 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
@@ -18,7 +18,7 @@
     while (this != null) {
       try {
 
-        Thread.sleep(10000);
+        Thread.sleep(500);
       } catch (InterruptedException e) {
         // TODO Auto-generated catch block
         e.printStackTrace();
@@ -26,7 +26,10 @@
       List<Boolean> bitlist = S7control.getinstance().ReadBits("DB2.0.0", 100);
 
       List<Short> paramlist = S7control.getinstance().ReadWord("DB100.6", 1);
-
+      
+      //鍒ゆ柇杩涚墖璇锋眰 
+      List<Short> datas1List=S7control.getinstance().ReadWord("DB106.24", 1);
+    
       // 鏌ヨ鏁版嵁搴�
       // 鎺ㄩ�佸埌鍓嶇
 
diff --git a/springboot-vue3/src/main/java/com/example/springboot/component/PlcParameter.java b/springboot-vue3/src/main/java/com/example/springboot/component/PlcParameter.java
index 601fd7e..d416822 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/component/PlcParameter.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/component/PlcParameter.java
@@ -6,76 +6,57 @@
 import java.util.List;
 
 public class PlcParameter extends Thread {
-    private static final int SEND_INTERVAL = 10000;
-    private static final int WRITE_INTERVAL = 100;
-
     @Override
-
     public void run() {
-        try {
-            // 鍙戦�佷竴娆℃秷鎭�
-            sendMessages();
-
-            // 寤惰繜涓�娈垫椂闂�
-            Thread.sleep(SEND_INTERVAL);
-
-            while (true) {
-                // 鍐欏叆PLC
-                writeToPlc();
-                Thread.sleep(WRITE_INTERVAL);
-
-                // 鍙戦�佹秷鎭�
-                sendMessages();
-                Thread.sleep(SEND_INTERVAL);
+        while (this != null) {
+            try {
+                Thread.sleep(1000);
+            } catch (InterruptedException e) {
+                e.printStackTrace();
             }
 
-        } catch (InterruptedException e) {
-            e.printStackTrace();
-        }
-    }
-
-    private void sendMessages() {
-        WebSocketServer sendwServer = WebSocketServer.sessionMap.get("Parameter");
-        if (sendwServer != null) {
             List<Short> paramlist = S7control.getinstance().ReadWord("DB100.DBW", 12);
+            List<Short> state = S7control.getinstance().ReadWord("DB103.DBW0", 10);
             JSONObject jsonObject = new JSONObject();
-//            new short[]{1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0}
-            jsonObject.append("params", new short[]{1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0});
-            sendwServer.sendMessage(jsonObject.toString());
-        }
-    }
+            jsonObject.append("params", new short[]{1111,121, 3232, 0, 1, 0, 1, 0, 1, 0, 1, 0});
+            jsonObject.append("state", new short[]{0, 1, 0, 0, 0, 0, 0,0, 0, 0});
+            WebSocketServer sendwServer = WebSocketServer.sessionMap.get("Parameter");
+            if (sendwServer != null) {
+                sendwServer.sendMessage(jsonObject.toString());
+            }
 
-    private void writeToPlc() {
-        WebSocketServer webSocketServer = WebSocketServer.sessionMap.get("Parameter");
-        if (webSocketServer != null) {
-            List<String> messages = webSocketServer.getMessages();
+            WebSocketServer webSocketServer = WebSocketServer.sessionMap.get("Parameter");
+            if (webSocketServer != null) {
+                List<String> messages = webSocketServer.getMessages();
 
-            String addressList = "DB100.DBW0";
+                String addressList = "DB100.DBW0";
 
-            if (!messages.isEmpty()) {
-                // 灏嗘渶鍚庝竴涓秷鎭浆鎹负 short 绫诲瀷鐨勫垪琛�
-                String lastMessage = messages.get(messages.size() - 1);
-                System.out.println("messages锛�" + messages);
-                String[] parts = lastMessage.split(",");
-                List<Short> messageValues = new ArrayList<>();
-                for (String part : parts) {
-                    try {
-                        // 浣跨敤姝e垯琛ㄨ揪寮忔竻闄ら潪鏁板瓧瀛楃
-                        String cleanedPart = part.replaceAll("[^0-9-]", "");
-                        short value = Short.parseShort(cleanedPart.trim());
-                        messageValues.add(value);
-                    } catch (NumberFormatException e) {
-                        // 濡傛灉鏃犳硶瑙f瀽涓� short 绫诲瀷锛屽垯蹇界暐璇ラ儴鍒�
-                        e.printStackTrace();
+                if (!messages.isEmpty()) {
+                    // 灏嗘渶鍚庝竴涓秷鎭浆鎹负 short 绫诲瀷鐨勫垪琛�
+                    String lastMessage = messages.get(messages.size() - 1);
+                    System.out.println("messages锛�" + messages);
+                    String[] parts = lastMessage.split(",");
+                    List<Short> messageValues = new ArrayList<>();
+                    for (String part : parts) {
+                        try {
+                            // 浣跨敤姝e垯琛ㄨ揪寮忔竻闄ら潪鏁板瓧瀛楃
+                            String cleanedPart = part.replaceAll("[^0-9-]", "");
+                            short value = Short.parseShort(cleanedPart.trim());
+                            messageValues.add(value);
+                        } catch (NumberFormatException e) {
+                            // 濡傛灉鏃犳硶瑙f瀽涓� short 绫诲瀷锛屽垯蹇界暐璇ラ儴鍒�
+
+                            e.printStackTrace();
+                        }
                     }
-                }
 
-                // 灏嗘秷鎭�煎啓鍏� PLC
-                S7control.getinstance().WriteWord(addressList, messageValues);
-                System.out.println("messageValues锛�" + messageValues);
-                System.out.println("addressList锛�" + addressList);
-                // 娓呯┖娑堟伅鍒楄〃
-                webSocketServer.clearMessages();
+                    // 灏嗘秷鎭�煎啓鍏� PLC
+                    S7control.getinstance().WriteWord(addressList, messageValues);
+                    System.out.println("messageValues锛�" + messageValues);
+                    System.out.println("addressList锛�" + addressList);
+                    // 娓呯┖娑堟伅鍒楄〃
+                    webSocketServer.clearMessages();
+                }
             }
         }
     }
diff --git a/springboot-vue3/src/main/java/com/example/springboot/component/Plcaction.java b/springboot-vue3/src/main/java/com/example/springboot/component/Plcaction.java
index c6e197c..5e4d59e 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/component/Plcaction.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/component/Plcaction.java
@@ -3,97 +3,84 @@
 import cn.hutool.json.JSONObject;
 
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.List;
 
 public class Plcaction extends Thread {
-  private static final long SEND_INTERVAL = 2000; // 鍙戦�佹秷鎭殑鏃堕棿闂撮殧
-  private static final long WRITE_INTERVAL = 100; // 鍐欏叆PLC鐨勬椂闂撮棿闅�
-
   @Override
   public void run() {
-    try {
-      // 鍙戦�佷竴娆℃秷鎭�
-      sendMessages();
-
-      // 寤惰繜涓�娈垫椂闂�
-      Thread.sleep(SEND_INTERVAL);
-
-      while (true) {
-        // 鍐欏叆PLC
-        writeToPlc();
-        Thread.sleep(WRITE_INTERVAL);
-
-        // 鍙戦�佹秷鎭�
-        sendMessages();
-        Thread.sleep(SEND_INTERVAL);
+    while (this != null) {
+      try {
+        Thread.sleep(1000);
+      } catch (InterruptedException e) {
+        e.printStackTrace();
       }
 
-    } catch (InterruptedException e) {
-      e.printStackTrace();
-    }
-  }
+//      List<Boolean> paramlist = S7control.getinstance().ReadBits("DB100.DBW", 12);
+////
+//      JSONObject jsonObject = new JSONObject();
+//      jsonObject.append("params", new short[]{1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0});
 
-  private void sendMessages() {
-    WebSocketServer sendwServer = WebSocketServer.sessionMap.get("action");
-    if (sendwServer != null) {
+//      List<Boolean> paramlist = S7control.getinstance().ReadBits("DB100.DBW", 12);
+      Boolean[] values = {false, true,false, true,false, true,false, true,false, true,false, true,false, true,false, true,false, true,false, true,false, true};
+      List<Boolean> paramlist = new ArrayList<>(Arrays.asList(values));
+      if (paramlist == null) {
 
-      List<Boolean> paramlist = S7control.getinstance().ReadBits("DB100.DBW", 12);
-      // new short[]{1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0,
-      // 1, 0}
-      JSONObject jsonObject = new JSONObject();
-      jsonObject.append("params",
-          new short[] { 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0 });
+      } else {
+        short[] params = new short[paramlist.size()];
 
-      sendwServer.sendMessage(jsonObject.toString());
-    }
-
-  }
-
-  private void writeToPlc() {
-    WebSocketServer webSocketServer = WebSocketServer.sessionMap.get("action");
-    if (webSocketServer != null) {
-      List<String> messages = webSocketServer.getMessages();
-
-      String addressList = "DB100.DBW0";
-
-      if (!messages.isEmpty()) {
-        // 灏嗘渶鍚庝竴涓秷鎭浆鎹负鏁存暟绫诲瀷鐨勫垪琛�
-        String lastMessage = messages.get(messages.size() - 1);
-        System.out.println("messages锛�" + messages);
-        String[] parts = lastMessage.split(",");
-        List<Integer> messageValues = new ArrayList<>();
-        for (String part : parts) {
-          try {
-            // 浣跨敤姝e垯琛ㄨ揪寮忔竻闄ら潪鏁板瓧瀛楃
-            String cleanedPart = part.replaceAll("[^0-9-]", "");
-            Integer value = Integer.parseInt(cleanedPart.trim());
-            messageValues.add(value);
-          } catch (NumberFormatException e) {
-            // 濡傛灉鏃犳硶瑙f瀽涓烘暣鏁扮被鍨嬶紝鍒欏拷鐣ヨ閮ㄥ垎
-            e.printStackTrace();
-          }
+        for (int i = 0; i < paramlist.size(); i++) {
+          boolean value = paramlist.get(i);
+          params[i] = value ? (short) 1 : (short) 0;
         }
-
-        // 灏嗘秷鎭�艰浆鎹负甯冨皵鍒楄〃
-        List<Boolean> messageBooleans = new ArrayList<>();
-        for (Integer value : messageValues) {
-          messageBooleans.add(value == 0 ? true : false);
+        JSONObject jsonObject = new JSONObject();
+        jsonObject.append("params", params);
+        WebSocketServer sendwServer = WebSocketServer.sessionMap.get("action");
+        if (sendwServer != null) {
+          sendwServer.sendMessage(jsonObject.toString());
         }
+      }
 
-        // 灏嗗竷灏斿垪琛ㄥ啓鍏� PLC
-        S7control.getinstance().WriteBit(addressList, messageBooleans);
-        System.out.println("messageValues锛�" + messageBooleans);
-        System.out.println("addressList锛�" + addressList);
 
-        // 娓呯┖娑堟伅鍒楄〃
-        webSocketServer.clearMessages();
+      WebSocketServer webSocketServer = WebSocketServer.sessionMap.get("action");
+      if (webSocketServer != null) {
+
+          List<String> messages = webSocketServer.getMessages();
+
+          String addressList = "DB100.DBW0";
+
+          if (!messages.isEmpty()) {
+            // 灏嗘渶鍚庝竴涓秷鎭浆鎹负鏁存暟绫诲瀷鐨勫垪琛�
+            String lastMessage = messages.get(messages.size() - 1);
+            System.out.println("messages锛�" + messages);
+            String[] parts = lastMessage.split(",");
+            List<Integer> messageValues = new ArrayList<>();
+            for (String part : parts) {
+              try {
+                // 浣跨敤姝e垯琛ㄨ揪寮忔竻闄ら潪鏁板瓧瀛楃
+                String cleanedPart = part.replaceAll("[^0-9-]", "");
+                Integer value = Integer.parseInt(cleanedPart.trim());
+                messageValues.add(value);
+              } catch (NumberFormatException e) {
+                // 濡傛灉鏃犳硶瑙f瀽涓烘暣鏁扮被鍨嬶紝鍒欏拷鐣ヨ閮ㄥ垎
+                e.printStackTrace();
+              }
+            }
+
+            // 灏嗘秷鎭�艰浆鎹负甯冨皵鍒楄〃
+            List<Boolean> messageBooleans = new ArrayList<>();
+            for (Integer value : messageValues) {
+              messageBooleans.add(value == 0 ? true : false);
+            }
+
+            // 灏嗗竷灏斿垪琛ㄥ啓鍏� PLC
+            S7control.getinstance().WriteBit(addressList, messageBooleans);
+            System.out.println("messageValues锛�" + messageBooleans);
+            System.out.println("addressList锛�" + addressList);
+          // 娓呯┖娑堟伅鍒楄〃
+          webSocketServer.clearMessages();
+        }
       }
     }
   }
-
-  private List<Boolean> paramList() {
-    // 鑾峰彇鍙傛暟鍒楄〃鐨勯�昏緫
-
-    return new ArrayList<>(); // 鍋囪杩斿洖绌哄垪琛�
-  }
-}
\ No newline at end of file
+}
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 6450dc5..c6ce249 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
@@ -7,6 +7,7 @@
 import org.springframework.context.ConfigurableApplicationContext;
 
 import com.example.springboot.entity.StorageCage;
+import com.example.springboot.entity.alarmmg;
 import com.example.springboot.mapper.HomeMapper;
 
 public class Plchome extends Thread {
@@ -42,7 +43,9 @@
             List<StorageCage> tasklist2=homeMapper.selectinout(3);
             jsonObject.append("tasklist1", tasklist1);
             jsonObject.append("tasklist2", tasklist2);
-
+            //鏌ヨ鎶ヨ淇℃伅
+            List<alarmmg> alarmmg=homeMapper.SelectAlarmmgInfo();
+            jsonObject.append("alarmmg", alarmmg);
             //璇诲幓Plc杩涚墖杞︿笌鍑虹墖杞︿綅缃�
             // List<String> addressList = new ArrayList<>();
             // addressList.add("DB100.DBW0");
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 babc506..16c83fa 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
@@ -28,15 +28,9 @@
     new PlcHold().start();
     new Plcaction().start();
     new PlcParameter().start();
-
     new Plchome().start();
-
-    new PlcParameter().start();
-
     new Plcalarm().start();
-
     new Plcsign().start();
-
     new Plcstate().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 f21eb5f..4216a59 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
@@ -10,6 +10,7 @@
 import com.example.springboot.service.HomeService;
 import com.example.springboot.common.Result;
 import com.example.springboot.entity.StorageCage;
+import com.example.springboot.entity.alarmmg;
 
 import org.springframework.web.bind.annotation.*;
 
@@ -81,12 +82,24 @@
     }
 
     @GetMapping("/UpdateTask")
-    public Result UpdateTask(Integer types,Integer shelf_rack){
+    public Result UpdateTask(Integer types,Integer shelfrack){
         Map<String, Object> map = new HashMap<>();
-        homeMapper.UpdateTask(types,shelf_rack);
-        map.put("message2","200");
+        homeMapper.UpdateTask(types,shelfrack);
+        if(types==0){
+            homeMapper.UpdateCageTask1(shelfrack);
+        }else{
+            homeMapper.UpdateCageTask2(shelfrack);
+        }
+        map.put("message3","200");
         return Result.success(map);
     }
 
+    @GetMapping("/SelectAlarmmgInfo")    
+    public Result SelectAlarmmgInfo(){
+        List<alarmmg> alarmmg=homeMapper.SelectAlarmmgInfo();
+        Map<String, Object> map = new HashMap<>();
+        map.put("alarmmg",alarmmg);
+        return Result.success(map);
+    }
     
 }
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..c7a1c97 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,6 +1,7 @@
 package com.example.springboot.controller;
 
 import com.example.springboot.common.Result;
+import com.example.springboot.component.S7control;
 import com.example.springboot.entity.StorageCage;
 import com.example.springboot.mapper.SpianMapper;
 import com.example.springboot.service.SpianService;
@@ -13,6 +14,7 @@
 import org.springframework.web.bind.annotation.RestController;
 
 import java.util.List;
+import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Map;
 @RestController
@@ -30,6 +32,9 @@
     //鍑虹墖浠诲姟
 @GetMapping("/all2")
     public Result selectdd(String orderid){
+       
+
+
         //鑾峰彇浼樺厛鍑虹墖鐨勪綅缃�
          StorageCage cageout=spianMapper.selectOut(orderid);
          int cage =cageout.getCage(); //鍌ㄥ瓨鍑虹墖浣嶇疆锛岀瀛愭牸瀛愬嚑鍙风幓鐠�
@@ -52,6 +57,17 @@
                if(cage<6){
                 StorageCage cagecell= spianMapper.selectGlassCage(cage,glasswidth,0,6);
                 //鑾峰彇璋冩嫧浣嶇疆杩涜璋冩嫧
+                List<String> adddresslist=new ArrayList<>();
+                adddresslist.add("DB105.6");
+                adddresslist.add("DB105.8");
+                adddresslist.add("DB105.10");
+                adddresslist.add("DB105.14");
+                List<Short> datas=new ArrayList<>();
+                 datas.add((short)0);
+                datas.add((short)0);
+                datas.add((short)0);
+                datas.add((short)0);
+                S7control.getinstance().WriteWord(adddresslist, datas);
                 return Result.success(cagecell);  //璋冩嫧浣嶇疆鐨勫弬鏁板唴瀹�
                 //鍒ゆ柇璋冩嫧缁撴潫鍚庡啀娆″嚭鐗�
                }else{
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 fd4f6b4..c0ea329 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
@@ -3,11 +3,13 @@
 import org.apache.ibatis.annotations.*;
 
 import com.example.springboot.entity.StorageCage;
+import com.example.springboot.entity.alarmmg;
 
 import java.util.List;
 
 @Mapper
 public interface HomeMapper {
+  //鏌ヨ姣忎釜绗煎瓙鐨勪娇鐢ㄦ儏鍐�
   @Select("SELECT cage,round(round(sum(state)/42,2)*100) as cell,42-sum(state) as state FROM storage_cage group by cage")
   List<StorageCage> selectAll();
 
@@ -48,6 +50,18 @@
   short SelectOutTask();
 
   // 鎵嬪姩瀹屾垚浠诲姟
-  @Select("update storage_task set state=1 where shelf_rack=#{shelf_rack} and task_type=#{task_type} and task_state=0")
-  short UpdateTask(@Param("task_type") Integer task_type, @Param("shelf_rack") Integer shelf_rack);
+  @Update("update storage_task set task_state=1 where shelf_rack=#{shelf_rack} and task_type=#{task_type} and task_state=0")
+  void UpdateTask(@Param("task_type") Integer task_type, @Param("shelf_rack") Integer shelf_rack);
+
+  // 鎵嬪姩瀹屾垚杩涚墖浠诲姟淇敼绗煎瓙鏁版嵁
+  @Update("update storage_cage set state=1 where cell=#{cell} and state=2")
+  void UpdateCageTask1(@Param("cell") Integer cell);
+
+  // 鎵嬪姩瀹屾垚鍑虹墖浠诲姟淇敼绗煎瓙鏁版嵁
+  @Update("update storage_cage set state=0,glass_id=null,order_id=null,glasswidth=null,glassheight=null,coating=null where cell=#{cell} and state=2")
+  void UpdateCageTask2(@Param("cell") Integer cell);
+
+  //鑾峰彇鎶ヨ淇℃伅
+  @Select("select * from alarmmg where endTime is null")
+  List<alarmmg> SelectAlarmmgInfo();
 }
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 c8dc1a5..b688705 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
@@ -40,7 +40,9 @@
      //鍒ゆ柇璇ヨ皟鎷ㄧ殑绗煎瓙
      @Select("select cage,cell,max(state)as shu from storage_cage where width>=#{width} and cage>#{cage1} and cage<#{cage2} GROUP BY cage,cell HAVING shu=0 order by abs(#{cage} - cage) limit 1;")
      StorageCage selectGlassCage(int cage,double width,int cage1,int cage2);
-     
+    //淇敼绗煎瓙淇℃伅(杩涚墖)
+//    @Update("update storage_cage set state=1,width=width #{width},glass_id=#{glassid},order_id=#{orderid},glasswidth=#{glasswidth} where cage=#{cage} and cell=#{cell} and tier=#{tier}");
+
     // @Insert("insert into user(name, date, address, user_no) values (#{name}, #{date}, #{address}, #{userNo})")
     // void insert (Spian spian);
     

--
Gitblit v1.8.0