clll
2023-09-06 ee84c191faa2c235703eaa8cdc765729bed71a4f
Merge branch 'master' of http://10.153.19.150:10101/r/CanadaMes

# Conflicts:
# CanadaMes-ui/src/views/Electrical/Action.vue
# CanadaMes-ui/src/views/Electrical/Parameter.vue
# springboot-vue3/src/main/java/com/example/springboot/AuthorityApplication.java
# springboot-vue3/src/main/java/com/example/springboot/component/PlcHold.java
# springboot-vue3/src/main/java/com/example/springboot/component/PlcParameter.java
# springboot-vue3/src/main/java/com/example/springboot/component/Plcaction.java
# springboot-vue3/src/main/java/com/example/springboot/component/WebSocketServer.java
# springboot-vue3/src/main/java/com/example/springboot/config/AppRunnerConfig.java
2个文件已添加
27个文件已修改
1033 ■■■■■ 已修改文件
CanadaMes-ui/run.bat 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CanadaMes-ui/src/api/home.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CanadaMes-ui/src/lang/locales/en-US.json 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CanadaMes-ui/src/lang/locales/zh-CN.json 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CanadaMes-ui/src/layout/index.vue 85 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CanadaMes-ui/src/layout/tag.vue 87 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CanadaMes-ui/src/store/index.js 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CanadaMes-ui/src/store/module/tags.js 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CanadaMes-ui/src/views/Electrical/Action.vue 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CanadaMes-ui/src/views/Electrical/Parameter.vue 144 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CanadaMes-ui/src/views/device/talkvue.vue 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CanadaMes-ui/src/views/home/index.vue 77 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CanadaMes-ui/src/views/power/index.vue 64 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CanadaMes-ui/src/views/role/index.vue 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CanadaMes-ui/src/views/user/index.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/pom.xml 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/component/PlcParameter.java 59 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/component/Plcaction.java 78 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java 70 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/component/WebSocketServer.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/config/AppRunnerConfig.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/controller/HomeController.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/controller/SpianController.java 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/entity/StorageCage.java 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/entity/StorageTask.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/mapper/HomeMapper.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/java/com/example/springboot/mapper/SpianMapper.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/resources/application.properties 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springboot-vue3/src/main/resources/sql/canadames.sql 35 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CanadaMes-ui/run.bat
New file
@@ -0,0 +1,5 @@
@echo off
echo Starting frontend development server...
cd /d %~dp0  // 切换到当前批处理脚本所在的目录
cd ..\CanadaMes-ui  // 假设CanadaMes-ui在与批处理脚本相同的目录下
npm run serve
CanadaMes-ui/src/api/home.js
@@ -42,3 +42,11 @@
        data :""
    })
}
export function UpdateTask(types,shelf_rack) {
    return request({
        url: '/home/UpdateTask?types=' + types + '&shelf_rack'+shelf_rack,
        method: 'get',
        data :""
    })
}
CanadaMes-ui/src/lang/locales/en-US.json
@@ -69,5 +69,57 @@
    "paginationPrev": "Previous",
    "paginationPager": "{currentPage}/{pageCount}",
    "paginationNext": "Next",
    "paginationJumper": "Jump to"
    "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"
  }
CanadaMes-ui/src/lang/locales/zh-CN.json
@@ -72,6 +72,58 @@
    "paginationPrev": "上一页",
    "paginationPager": "{currentPage}/{pageCount}",
    "paginationNext": "下一页",
    "paginationJumper": "跳至"
    "paginationJumper": "跳至",
    "breadcrumb": {
      "home": "首页",
      "permissionManagement": "权限管理",
      "permissionList": "权限列表"
    },
    "search": {
      "placeholder": "请输入关键字"
    },
    "button": {
      "addPermission": "添加权限",
      "cancel": "取消",
      "confirm": "确认"
    },
    "table": {
      "role": "角色",
      "permissionDescription": "权限描述",
      "permissionValue": "权限值",
      "createTime": "创建时间",
      "isActive": "是否激活",
      "operation": "操作"
    },
    "tooltip": {
      "edit": "修改",
      "delete": "删除"
    },
    "dialog": {
      "addPermission": "添加权限",
      "editPermission": "编辑权限"
    },
    "form": {
      "role": "角色",
      "select": "请选择",
      "permission": "权限",
      "isActive": "是否激活"
    },
    "操作": "操作",
    "有效": "有效",
    "无效": "无效",
    "请输入名称": "请输入名称",
    "长度在 2 到 15 个字符": "长度在 2 到 15 个字符",
    "请输入状态": "请输入状态",
    "添加角色": "添加角色",
    "修改角色": "修改角色",
    "删除角色": "删除角色",
    "此操作将永久删除该角色, 是否继续?": "此操作将永久删除该角色, 是否继续?",
    "提示": "提示",
    "确定": "确定",
    "取消": "取消",
    "添加角色成功": "添加角色成功",
    "更新状态成功": "更新状态成功",
    "修改角色成功": "修改角色成功",
    "删除角色成功": "删除角色成功"
  }
  
CanadaMes-ui/src/layout/index.vue
@@ -1,6 +1,5 @@
<template>
  <el-container style="flex: 1;">
    <div style="width: 200px;background-color: #222f3e" :style="{width: isCollapse?'70px':'250px'}">
      <el-aside :width="isCollapse?'70px':'250px'">
        <el-col :gutter="20">
@@ -22,7 +21,6 @@
    <span>{{ $t('home') }}</span>
  </template>
</el-menu-item>
                     <!--一级菜单-->
              <el-submenu :index="item.id.toString()" v-for="item in menuList" :key="item.id">
                <!--一级菜单模板区域-->
@@ -35,7 +33,7 @@
                <!--二级菜单-->
                <el-menu-item :index="'/'+menu.router"
                              v-for="menu in item.menuLists" :key="menu.id"
                              @click="saveNavState('/'+menu.router)"   @select="saveNavState" :default-active="$route.path">
                              @click="addTag(menu.router)">
                  <template slot="title">
                    <!--图标-->
                    <i :class="menu.icon"></i>
@@ -43,40 +41,35 @@
                    <span>{{ menu.name }}</span>
                  </template>
                </el-menu-item>
              </el-submenu>
            </el-menu>
          </el-row>
        </el-col>
      </el-aside>
    </div>
    <el-container  >
      <el-header class="header-container"    >
      
        <div class="tagContainer"  >
      <tag v-for="(tag, index) in tags" :key="index" :tag="tag" @removeTag="removeTag"></tag>
    </div>
        <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>
        </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>
        <template >
          <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:30px;height:30px;margin-top:2px;"></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>
          </el-submenu>
        </template> 
          <template>
  <el-dialog title="修改密码" :visible.sync="dialogVisible" width="30%"   s>
            <el-dialog title="修改密码" :visible.sync="dialogVisible" width="30%">
    <el-form ref="form" :model="formData" label-width="100px"   >
      <el-form-item label="旧密码">
        <el-input v-model="formData.oldPassword" type="password" show-password></el-input>
@@ -97,13 +90,13 @@
        </el-menu>
      </el-header>
      <el-main>
        <keep-alive>
        <router-view/>
        </keep-alive>
      </el-main>
    </el-container>
  </el-container>
</template>
<script>
import {selectList} from '../api/menuList'
@@ -120,7 +113,6 @@
  mixins: [LanguageMixin],
  data() {
    return {
      activeTag: '', // 当前激活的标签
      dialogVisible: false,
      formData: {
@@ -128,7 +120,6 @@
        newPassword: '',
        confirmPassword: ''
      },
      menuList: [],
      isCollapse: false,
      activePath: '',
@@ -165,27 +156,22 @@
    goToHome() {
    this.$router.push('/home');
  },
   // 使用 mapMutations 辅助函数调用 Store 中的 mutations
   ...mapMutations('tags', ['addTag', 'removeTag']),
    // 切换标签时触发的方法
    saveNavState(activePath) {
      window.sessionStorage.setItem('activePath', activePath);
      const menuItem = this.menuList.find(item => item.menuLists.some(menu => menu.router === activePath));
    ...mapMutations('tags', ['addTag', 'removeTag', 'switchTag']),
    addTag(router) {
  let submenuItem;
  const menuItem = this.menuList.find(item => item.menuLists.some(menu => menu.router === router));
      if (menuItem) {
        const submenuItem = menuItem.menuLists.find(menu => menu.router === activePath);
    submenuItem = menuItem.menuLists.find(menu => menu.router === router);
  }
        if (submenuItem) {
          const tag = submenuItem.name;
          this.$store.commit('tags/addTag', tag);  // 调用 Vuex Store 中的 addTag mutation
        }
    const tag = submenuItem.router;
    this.$store.commit('tags/addTag', tag);
      }
    },
    // 关闭标签时触发的方法
    removeTag(tag) {
      this.removeTag(tag); // 从 Vuex Store 中移除标签
    removeTag(index) {
      this.$store.commit('tags/removeTag', index); // 从 Vuex Store 中移除标签
    },
    showChangePasswordDialog() {
      this.dialogVisible = true;
    },
@@ -201,24 +187,15 @@
        this.$message.success('密码修改成功');
        removeToken()
      this.$router.push('/login')
      }).catch(() => {
       
      });
      this.dialogVisible = false;
    },
    toggleCollapse: function () {
      this.isCollapse = !this.isCollapse;
    },
    // saveNavState: function (activePath) {
    //   window.sessionStorage.setItem('activePath', activePath)
    // },
    replaceChineseWithEnglish(menuData) {
      // 定义中英文对照关系对象
      const translation = {
@@ -232,7 +209,8 @@
        '权限管理': 'PermissionManagement',
        '权限列表': 'PermissionList',
        '角色管理': 'RoleManagement',
        '角色列表': 'RoleList'
        '角色列表': 'RoleList',
        '电气管理': 'Electrical management'
        // 根据实际需求继续添加对照关系
      };
@@ -242,22 +220,21 @@
          subMenu.name = translation[subMenu.name] || subMenu.name;
        });
      });
    }
  },
  watch: {
    '$route'(to) {
      // 切换路由时更新激活的标签
      const tag = this.menuList.some(item => item.menuLists.some(menu => '/' + menu.router === to.path));
      if (tag) {
        this.activeTag = tag;
    }
  }
  }
}
</script>
<style scoped lang="less">
// .header-container {
//   display: flex;
//   justify-content: flex-start;
//   height: 10px; /* 设置较小的高度 */
// }
.custom-submenu  {
 
 
CanadaMes-ui/src/layout/tag.vue
@@ -1,59 +1,70 @@
<template>
  <div class="tagContainer">
    <div v-for="(tag, index) in tags" :key="index" class="tagItem">
      {{ tag }}
      <span class="closeBtn" @click="removeTag(index)">x</span>
  <keep-alive>
    <div
      class="tag"
      :class="{ active: isActive }"
      @click="switchTag(tag)">
      <span>{{ tag }}</span>
      <i class="el-icon-close" @click.stop="removeTag(tag)"></i>
    </div>
  </div>
  </keep-alive>
</template>
<script>
import { mapState, mapMutations } from 'vuex';
export default {
  props: {
    tag: {
      type: String,
      required: true
    },
    activeTag: {
      type: String,
      required: true
    }
  },
  computed: {
    ...mapState('tags', { // 这里添加了 'tags' 模块的命名空间前缀
      tags: state => state.tags.tags
    })
    isActive() {
      return this.tag === this.activeTag;
    },
    tagData() {
      return this.$store.getters.getTagData(this.tag);
    }
  },
  methods: {
    ...mapMutations('tag', ['removeTag']),
    saveNavState(activePath) {
    window.sessionStorage.setItem('activePath', activePath);
    removeTag(tag) {
      this.$emit('removeTag', tag);
    },
    switchTag(tag) {
  this.$emit('switchTag', tag);
  this.$router.push('/' + tag); // 切换到指定路由
}
    
    const menuItem = this.menuList.find(item => item.menuLists.some(menu => menu.router === activePath));
    if (menuItem) {
      const submenuItem = menuItem.menuLists.find(menu => menu.router === activePath);
      if (submenuItem) {
        const tag = submenuItem.name;
        this.addTag(tag); // 添加标签到 Vuex Store
      }
    }
  }
  }
}
</script>
<style scoped>
.tagContainer {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.tagItem {
  background-color: #eee;
.tag {
  display: inline-block;
  margin-right: 10px;
  padding: 4px 10px;
  border-radius: 4px;
  padding: 4px 8px;
  margin-right: 8px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  background-color: #f0f0f0;
  cursor: pointer;
}
.closeBtn {
  margin-left: 4px;
  color: red;
.tag.active {
  background-color: #409eff;
  color: #fff;
}
.tag span {
  margin-right: 5px;
}
.tag i {
  margin-left: 5px;
  font-size: 12px;
  cursor: pointer;
}
</style>
CanadaMes-ui/src/store/index.js
@@ -10,5 +10,29 @@
  modules: {
    tags,
  },
  state: {
    tagData: {} // 存储标签数据的对象
  },
  mutations: {
    // 更新标签数据
    updateTagData(state, payload) {
      state.tagData[payload.tag] = payload.data;
    }
  },
  actions: {
    // 异步操作更新标签数据
    updateTagDataAsync({ commit }, payload) {
      // 执行异步操作,比如发送请求获取数据
      // 然后通过commit触发mutation来更新数据
      setTimeout(() => {
        commit('updateTagData', payload);
      }, 1000);
    }
  },
  getters: {
    getTagData: (state) => (tag) => {
      return state.tagData[tag] || null; // 获取指定标签的数据
    }
  }
  // 其他配置
});
CanadaMes-ui/src/store/module/tags.js
@@ -1,6 +1,6 @@
const state = {
  tags: []
};
}
const mutations = {
  addTag(state, tag) {
@@ -8,15 +8,20 @@
      state.tags.push(tag);
    }
  },
  removeTag(state, tag) {
    const index = state.tags.indexOf(tag);
    if (index !== -1) {
  removeTag(state, index) {
      state.tags.splice(index, 1);
  },
  removeAllTags(state) {
    state.tags = [];
  },
  switchTag(tag) {
    this.$emit('switchTag', tag);
    this.$router.push('/' + tag); // 添加这行代码以切换路由
    }
  }
};
export default {
  namespaced: true,
  state,
  mutations
};
}
CanadaMes-ui/src/views/Electrical/Action.vue
@@ -18,7 +18,7 @@
      </div> -->
      <div class="kuai_div" v-for="(item, index) in record.xyData" :key="index">
        <el-input v-model="item.name" style="width: 240px;" class="in_mc"></el-input>
        <el-input v-model="item.name" style="width: 240px;" class="in_mc" readonly></el-input>
        <el-switch v-model="item.value" active-value="1" inactive-value="0" @change="send()"></el-switch>
      </div>
    </el-form>
@@ -138,7 +138,7 @@
          let obj = JSON.parse(msg.data);
          this.record.params[0] = obj.params[0];
          for (let a = 0; a <= this.record.params[0].length; a++) {
  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].toString() };
            } else {
@@ -188,16 +188,18 @@
  border: none;
}
  .el-input__inner {
    border: 1 solid black;
  }
.in_mc {
}
.in_mc {
  .el-input__inner {
    border: none;
  }
}
</style>
CanadaMes-ui/src/views/Electrical/Parameter.vue
@@ -12,140 +12,119 @@
    </el-breadcrumb>
    <div>Parameter</div>
    <el-form label-width="100px" style="display: flex;flex-wrap: wrap;" :model="messagepack.data">
      <div id="btn_div">
        <el-button type="primary" @click="send()">Distribute</el-button>
        <!-- <button @click="send()">测试发送</button> -->
      <el-button type="primary" @click="send()">下发参数</el-button>
      </div>
      <div class="kuai_div" v-for="item in this.record.xyData" :key="item.name">
        <el-input style="width: 280px;" class="in_mc" v-model="item.name"></el-input>
        <el-input v-model="item.value" style="width: 80px;"></el-input>
    <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-form>
  </div>
</template>
<script >
let socket;
export default {
  name: "Parameter",
  data () {
    return {
      record: {
        params: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
  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 },
  { 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 }
        ],
        canshu: [
          'conveyor Velocity(Auto FAST)',
          'conveyor Velocity(Auto SLOW)',
          'conveyor Velocity(Manual)',
          'A01 A02 TURN JOG Velocity',
          'A01 A02 TRAVEL JOG Velocity',
          'B01 B02 TRAVEL JOG Velocity',
          'A01 A02 TURN POS Velocity AUTO',
          'A01 A02 TURN POS Velocity manual',
          'A01 A02 TRAVEL POS Velocity AUTO',
          'A01 A02 TRAVEL POS Velocity manual',
          'B01 B02 TRAVEL POS Velocity AUTO',
          'B01 B02 TRAVEL POS Velocity manual',
        ],
  canshu: []
      },
      messagepack: {
        data: { taskname: "" }
      },
      queryInfo: {
        data: "1",
        pageSize: 10
      },
    }
  };
  },
  created () {
    this.init();
  this.initWebSocket();
  },
  methods: {
    init () {
  initWebSocket() {
      let viewname = "Parameter";
      if (typeof (WebSocket) == "undefined") {
    if (typeof WebSocket === "undefined") {
        console.log("您的浏览器不支持WebSocket");
      } else {
        //console.log("您的浏览器支持WebSocket");
        let socketUrl = "ws://" + "localhost:8888" + "/springboot-vue3/api/talk/" + viewname;
        if (socket != null) {
          socket.close();
          socket = null;
        }
        // 开启一个websocket服务
        socket = new WebSocket(socketUrl);
        //打开事件
        socket.onopen = function () {
          console.log("websocket已打开");
        };
        //  浏览器端收消息,获得从服务端发送过来的文本消息
        socket.onmessage = function (msg) {
          //console.log("收到数据====" + msg.data);
          let obj = JSON.parse(msg.data);
          //this.$set(this.record.params, 0, obj.params[0]);
          this.record.params[0] = obj.params[0];
          for (let a = 0; a <= this.record.params.length; 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] };
            // this.record.xyData[a].value = this.record.params[0][a];
      // 收到消息
      socket.onmessage = (msg) => {
        if (!msg.data) {
          return; // 如果收到空数据,则直接返回,不执行后续逻辑
          }
          this.$forceUpdate();
        }.bind(this);
        let obj = JSON.parse(msg.data);
        this.record.params[0] = obj.params[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];
          }
        }
        console.log(this.record.xyData);
        this.$forceUpdate();
      };
        //关闭事件
        socket.onclose = function () {
          console.log("websocket已关闭");
        };
        //发生了错误事件
      // 发生错误事件
        socket.onerror = function () {
          console.log("websocket发生了错误");
        }
      };
      }
    },
    send () {
      this.messagepack.data = { taskname: "前端到后台" };
      socket?.send(JSON.stringify(this.messagepack));  // 将组装好的json发送给服务端,由服务端进行转发
    this.messagepack.data = this.record.xyData.map((item) => parseInt(item.value)); // 转换为整数数组
    console.log(this.messagepack);
    socket?.send(JSON.stringify(this.messagepack));
  },
  handleChange(index, value) {
    this.record.xyData[index].value = value;
    }
  }
}
  };
</script>
<style>
@@ -156,25 +135,18 @@
.el-input {
  border: none;
  .el-input__inner {
    border: 1 solid black;
  }
  .el-input__inner {
  border: 1px solid black;
}
.in_mc {
  .el-input__inner {
  .in_mc .el-input__inner {
    border: none;
  }
}
#btn_div {
  width: 100%;
}
#btn_div .el-button {
CanadaMes-ui/src/views/device/talkvue.vue
@@ -6,9 +6,6 @@
  <button @click="ttt()">测试发送</button>
  </div>
</template>
    
<script>
CanadaMes-ui/src/views/home/index.vue
@@ -102,9 +102,11 @@
.el-table th {
    padding: 8px 0;
}
.el-table__empty-block{
    min-height: 41px;
}
.el-table__empty-text{
    line-height: 41px;
}
@@ -124,7 +126,7 @@
                    <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 prop="orderId" label="Order Nmuber"></el-table-column>
                    <el-table-column prop="glasswidth" label="Length and width"></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>
@@ -134,7 +136,7 @@
                    <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 prop="orderId" label="Order Nmuber"></el-table-column>
                    <el-table-column prop="glasswidth" label="Length and width"></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>
@@ -205,8 +207,9 @@
import { home, home2, loadtask, InsertOrder, Addglassid } from "../../api/home";
let socket;
export default {
    name: "Home",
    data() {
        return {
            dialogFormVisible: false,
@@ -234,8 +237,68 @@
    },
    created() {
        this.load();
        this.init();
    },
    methods: {
        init() {
            let viewname = "Home";
            if (typeof (WebSocket) == "undefined") {
                console.log("您的浏览器不支持WebSocket");
            } else {
                //console.log("您的浏览器支持WebSocket");
                let socketUrl = "ws://" + "localhost:8888" + "/springboot-vue3/api/talk/" + viewname;
                if (socket != null) {
                    socket.close();
                    socket = null;
                }
                // 开启一个websocket服务
                socket = new WebSocket(socketUrl);
                //打开事件
                socket.onopen = function () {
                    console.log("websocket已打开");
                };
                //  浏览器端收消息,获得从服务端发送过来的文本消息
                socket.onmessage = function (msg) {
                    //console.log("收到数据====" + msg.data);
                    let obj = JSON.parse(msg.data);
                    //this.$set(this.record.params, 0, obj.params[0]);
                    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];
                    // 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] };
                    //     // this.record.xyData[a].value = this.record.params[0][a];
                    //     this.car1=this.record.params[0][a];
                    //     console.log(this.record.params[0][a]);
                    // }
                    this.$forceUpdate();
                }.bind(this);
                //关闭事件
                socket.onclose = function () {
                    console.log("websocket已关闭");
                };
                //发生了错误事件
                socket.onerror = function () {
                    console.log("websocket发生了错误");
                }
            }
        },
        load() {
            home().then(res => {
                this.tableData = res.data.list;
@@ -255,8 +318,7 @@
            });
            loadtask(this.task2).then(res => {
                this.tasklist2 = res.data.list;
                this.car1 = 116 + 18.88 * 20;
                this.car2 = 187 + 18.8 * 30;
            });
        },
        //根据格子状态修改颜色
@@ -314,8 +376,9 @@
                });
            }
        },
        endtask(){
        endtask(type,shelfrack) {
            alert(type);
            alert(shelfrack);
        }
    }
};
CanadaMes-ui/src/views/power/index.vue
@@ -2,32 +2,32 @@
  <div class="app">
    <!--面包屑导航区域-->
    <el-breadcrumb separator-class="el-icon-arrow-right">
      <el-breadcrumb-item :to="{ path: '/home' }">首页</el-breadcrumb-item>
      <el-breadcrumb-item>权限管理</el-breadcrumb-item>
      <el-breadcrumb-item>权限列表</el-breadcrumb-item>
      <el-breadcrumb-item :to="{ path: '/home' }">{{$t('breadcrumb.home')}}</el-breadcrumb-item>
      <el-breadcrumb-item>{{$t('breadcrumb.permissionManagement')}}</el-breadcrumb-item>
      <el-breadcrumb-item>{{$t('breadcrumb.permissionList')}}</el-breadcrumb-item>
    </el-breadcrumb>
    <!--卡片视图区域-->
    <el-card class="el-card">
      <el-row :gutter="20">
        <!--搜索与添加区域-->
        <el-col :span="6">
          <el-input placeholder="请输入权限名称" v-model="queryInfo.name" clearable @clear="getPowerList()">
          <el-input :placeholder="$t('search.placeholder')" v-model="queryInfo.name" clearable @clear="getPowerList()">
            <el-button slot="append" icon="el-icon-search" @click="getPowerList()"></el-button>
          </el-input>
        </el-col>
        <!--添加区域-->
        <el-col :span="4">
          <el-button type="primary" @click="showAddDialog">添加权限</el-button>
          <el-button type="primary" @click="showAddDialog">{{$t('button.addPermission')}}</el-button>
        </el-col>
      </el-row>
      <!--权限列表区域-->
      <el-table :data="powerList.records" border stripe>
        <el-table-column label="#" type="index"></el-table-column>
        <el-table-column label="角色" prop="role.name"></el-table-column>
        <el-table-column label="权限描述" prop="permission.description"></el-table-column>
        <el-table-column label="权限值" prop="permission.name"></el-table-column>
        <el-table-column label="创建时间" prop="createTime"></el-table-column>
        <el-table-column label="是否生效">
        <el-table-column :label="$t('table.role')" prop="role.name"></el-table-column>
        <el-table-column :label="$t('table.permissionDescription')" prop="permission.description"></el-table-column>
        <el-table-column :label="$t('table.permissionValue')" prop="permission.name"></el-table-column>
        <el-table-column :label="$t('table.createTime')" prop="createTime"></el-table-column>
        <el-table-column :label="$t('table.isActive')">
          <template slot-scope="scope">
            <el-switch :active-value=1
                       :inactive-value=0
@@ -36,15 +36,15 @@
            </el-switch>
          </template>
        </el-table-column>
        <el-table-column label="操作">
        <el-table-column :label="$t('table.operation')">
          <template slot-scope="scope">
            <!--修改-->
            <el-tooltip effect="dark" content="修改" placement="top" :enterable="false">
            <el-tooltip effect="dark" :content="$t('tooltip.edit')" placement="top" :enterable="false">
              <el-button type="primary" icon="el-icon-edit" size="mini"
                         @click="showEditDialog(scope.row)"></el-button>
            </el-tooltip>
            <!--删除-->
            <el-tooltip effect="dark" content="删除" placement="top" :enterable="false">
            <el-tooltip effect="dark" :content="$t('tooltip.delete')" placement="top" :enterable="false">
              <el-button type="danger" icon="el-icon-delete" size="mini"
                         @click="removeById(scope.row)"></el-button>
            </el-tooltip>
@@ -64,14 +64,14 @@
    </el-card>
    <!--添加权限的对话框-->
    <el-dialog
        title="添加权限"
        :title="$t('dialog.addPermission')"
        :visible.sync="addDialogVisible"
        width="50%"
        @close="addDialogClosed">
      <!--内容主体区域-->
      <el-form :model="addPowerForm" :rules="powerRules" ref="powerRef" label-width="70px">
        <el-form-item label="角色" prop="roleId">
          <el-select filterable v-model="addPowerForm.roleId" placeholder="请选择">
        <el-form-item :label="$t('form.role')" prop="roleId">
          <el-select filterable v-model="addPowerForm.roleId" :placeholder="$t('form.select')">
            <el-option v-for="item in roleList"
                       :key="item.id"
                       :value="item.id"
@@ -79,8 +79,8 @@
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="权限" prop="permissionId">
          <el-select filterable v-model="addPowerForm.permissionId" placeholder="请选择">
        <el-form-item :label="$t('form.permission')" prop="permissionId">
          <el-select filterable v-model="addPowerForm.permissionId" :placeholder="$t('form.select')">
            <el-option v-for="item in permissionList"
                       :key="item.id"
                       :value="item.id"
@@ -88,8 +88,8 @@
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="是否生效" prop="state">
          <el-select v-model="addPowerForm.state" placeholder="请选择">
        <el-form-item :label="$t('form.isActive')" prop="state">
          <el-select v-model="addPowerForm.state" :placeholder="$t('form.select')">
            <el-option v-for="(item,index) in options"
                       :key="index"
                       :value="item.value"
@@ -99,19 +99,19 @@
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
    <el-button @click="addDialogVisible = false">取 消</el-button>
    <el-button type="primary" @click="addPower">确 定</el-button>
    <el-button @click="addDialogVisible = false">{{$t('button.cancel')}}</el-button>
    <el-button type="primary" @click="addPower">{{$t('button.confirm')}}</el-button>
  </span>
    </el-dialog>
    <!--修改权限的对话框-->
    <el-dialog
        title="修改权限"
        :title="$t('dialog.editPermission')"
        :visible.sync="editDialogVisible"
        width="50%">
      <!--内容主体区域-->
      <el-form :model="editRoleForm" :rules="powerRules" ref="powerRef" label-width="70px">
        <el-form-item label="角色" prop="roleId">
          <el-select filterable v-model="editRoleForm.roleId" placeholder="请选择">
        <el-form-item :label="$t('form.role')" prop="roleId">
          <el-select filterable v-model="editRoleForm.roleId" :placeholder="$t('form.select')">
            <el-option v-for="item in roleList"
                       :key="item.id"
                       :value="item.id"
@@ -119,8 +119,8 @@
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item filterable label="权限" prop="permissionId">
          <el-select v-model="editRoleForm.permissionId" placeholder="请选择">
        <el-form-item filterable :label="$t('form.permission')" prop="permissionId">
          <el-select v-model="editRoleForm.permissionId" :placeholder="$t('form.select')">
            <el-option v-for="item in permissionList"
                       :key="item.id"
                       :value="item.id"
@@ -128,8 +128,8 @@
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="是否生效" prop="state">
          <el-select v-model="editRoleForm.state" placeholder="请选择">
        <el-form-item :label="$t('form.isActive')" prop="state">
          <el-select v-model="editRoleForm.state" :placeholder="$t('form.select')">
            <el-option v-for="(item,index) in options"
                       :key="index"
                       :value="item.value"
@@ -139,8 +139,8 @@
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
    <el-button @click="editDialogVisible = false">取 消</el-button>
    <el-button type="primary" @click="editRoleInfo">确 定</el-button>
    <el-button @click="editDialogVisible = false">{{$t('button.cancel')}}</el-button>
    <el-button type="primary" @click="editRoleInfo">{{$t('button.confirm')}}</el-button>
  </span>
    </el-dialog>
  </div>
@@ -150,9 +150,11 @@
import {getById, removeById, saveOrUpdate, selectPage} from "../../api/rolePermission";
import {select} from "../../api/role";
import {selectPermission} from "../../api/permission";
import LanguageMixin from '../../lang/LanguageMixin'
export default {
  name: "Power",
  mixins: [LanguageMixin],
  data() {
    return {
      queryInfo: {
CanadaMes-ui/src/views/role/index.vue
@@ -137,6 +137,7 @@
      addRoleForm: {
        state: 1
      },
      // 修改的角色对象
      editRoleForm: {},
      // 添加角色的验证规则
@@ -177,7 +178,8 @@
    },
    stateChange(info) {
      saveOrUpdate(info).then(() => {
        this.$message.success("更新状态成功")
        const 更新状态成功 = this.$t('更新状态成功');
        this.$message.success(更新状态成功)
      });
    },
@@ -195,7 +197,8 @@
          this.getRoleList();
          // 隐藏添加角色对话框
          this.addDialogVisible = false;
          this.$message.success("添加角色成功");
          const 添加角色成功 = this.$t('添加角色成功');
          this.$message.success(添加角色成功);
        });
      })
    },
@@ -220,26 +223,33 @@
          this.getRoleList();
          // 隐藏添加角色对话框
          this.editDialogVisible = false;
          this.$message.success("修改角色成功");
          const 修改角色成功 = this.$t('修改角色成功');
          this.$message.success(修改角色成功);
        });
      })
    },
    // 根据id删除角色信息
    removeById(role) {
      // 弹框询问用户是否删除角色
      this.$confirm('此操作将永久删除该角色, 是否继续?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
      const 此操作将永久删除该角色是否继续 = this.$t('此操作将永久删除该角色, 是否继续?');
      const 提示 = this.$t('提示');
      const 确定 = this.$t('确定');
      const 取消 = this.$t('取消');
      this.$confirm(此操作将永久删除该角色是否继续, 提示, {
        confirmButtonText: 确定,
        cancelButtonText: 取消,
        type: 'warning'
      }).then(() => {
        // 删除角色
        removeById({id: role.id}).then(() => {
          // 重新获取角色列表
          this.getRoleList();
          this.$message.success("删除角色成功");
          const 删除角色成功 = this.$t('删除角色成功');
          this.$message.success(删除角色成功);
        });
      }).catch(() => {
        this.$message('已取消删除');
        const 已取消删除 = this.$t('已取消删除');
        this.$message(已取消删除);
      });
    }
  }
CanadaMes-ui/src/views/user/index.vue
@@ -11,11 +11,11 @@
      <el-row :gutter="20">
        <!--搜索与添加区域-->
        <el-col :span="6">
          <el-input placeholder="请输入用户名称"  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="请输入邮箱" v-model="queryInfo.email" clearable @clear="getUserList">
          <el-input  :placeholder="$t('langEmailPlaceholder')"  v-model="queryInfo.email" clearable @clear="getUserList">
          </el-input>
        </el-col>
        <!--搜索按钮-->
@@ -74,8 +74,7 @@
      :page-sizes="[6, 12, 18, 24]"
      :page-size="queryInfo.pageSize"
      :total="userList.total"
      :prev-text="$t('pagination.prev')"
      :next-text="$t('pagination.next')"
      :pager-count="7"
      :layout="layout"
    >
springboot-vue3/pom.xml
@@ -118,6 +118,9 @@
            <artifactId>poi-tl</artifactId>
            <version>1.12.1</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-websocket</artifactId>
springboot-vue3/src/main/java/com/example/springboot/component/PlcParameter.java
@@ -6,42 +6,51 @@
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() {
    while (this != null) {
      try {
        Thread.sleep(10000);
            // 发送一次消息
            sendMessages();
            // 延迟一段时间
            Thread.sleep(SEND_INTERVAL);
            while (true) {
                // 写入PLC
                writeToPlc();
                Thread.sleep(WRITE_INTERVAL);
                // 发送消息
                sendMessages();
                Thread.sleep(SEND_INTERVAL);
            }
      } catch (InterruptedException e) {
        e.printStackTrace();
      }
      List<Short> paramlist = S7control.getinstance().ReadWord("DB100.DBW", 12);
      JSONObject jsonObject = new JSONObject();
      // jsonObject.append("params", paramlist);
      jsonObject.append("params", new short[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, });
      WebSocketServer sendwServer = WebSocketServer.sessionMap.get("Parameter");
      if (sendwServer != null) {
        sendwServer.sendMessage(jsonObject.toString());
      }
    private void sendMessages() {
        WebSocketServer sendwServer = WebSocketServer.sessionMap.get("Parameter");
        if (sendwServer != null) {
            List<Short> paramlist = S7control.getinstance().ReadWord("DB100.DBW", 12);
            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());
        }
    }
    private void writeToPlc() {
      WebSocketServer webSocketServer = WebSocketServer.sessionMap.get("Parameter");
      if (webSocketServer != null) {
        List<String> messages = webSocketServer.getMessages();
        String addressList = "DB100.DBW0";
        // addressList.add("DB100.DBW0");
        // addressList.add("DB100.DBW2");
        // addressList.add("DB100.DBW4");
        // addressList.add("DB100.DBW6");
        // addressList.add("DB100.DBW8");
        // addressList.add("DB100.DBW10");
        // addressList.add("DB100.DBW12");
        // addressList.add("DB100.DBW14");
        // addressList.add("DB100.DBW16");
        // addressList.add("DB100.DBW18");
        // addressList.add("DB100.DBW20");
        // addressList.add("DB100.DBW22");
        if (!messages.isEmpty()) {
          // 将最后一个消息转换为 short 类型的列表
@@ -57,18 +66,16 @@
              messageValues.add(value);
            } catch (NumberFormatException e) {
              // 如果无法解析为 short 类型,则忽略该部分
              e.printStackTrace();
            }
          }
          // 将消息值写入 PLC
          // S7control.getinstance().WriteWord(addressList, messageValues);
                S7control.getinstance().WriteWord(addressList, messageValues);
          System.out.println("messageValues:" + messageValues);
          System.out.println("addressList:" + addressList);
          // 清空消息列表
          webSocketServer.clearMessages();
        }
      }
    }
  }
springboot-vue3/src/main/java/com/example/springboot/component/Plcaction.java
@@ -6,70 +6,96 @@
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() {
    while (this != null) {
      try {
        Thread.sleep(10000);
            // 发送一次消息
            sendMessages();
            // 延迟一段时间
            Thread.sleep(SEND_INTERVAL);
            while (true) {
                // 写入PLC
                writeToPlc();
                Thread.sleep(WRITE_INTERVAL);
                // 发送消息
                sendMessages();
                Thread.sleep(SEND_INTERVAL);
            }
      } catch (InterruptedException e) {
        e.printStackTrace();
      }
    }
      List<Short> paramlist = S7control.getinstance().ReadWord("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);
            //        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});
        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";
        // addressList.add("DB100.DBW0");
        // addressList.add("DB100.DBW2");
        // addressList.add("DB100.DBW4");
        // addressList.add("DB100.DBW6");
        // addressList.add("DB100.DBW8");
        // addressList.add("DB100.DBW10");
        // addressList.add("DB100.DBW12");
        // addressList.add("DB100.DBW14");
        // addressList.add("DB100.DBW16");
        // addressList.add("DB100.DBW18");
        // addressList.add("DB100.DBW20");
        // addressList.add("DB100.DBW22");
        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<>();
                List<Integer> messageValues = new ArrayList<>();
          for (String part : parts) {
            try {
              // 使用正则表达式清除非数字字符
              String cleanedPart = part.replaceAll("[^0-9-]", "");
              short value = Short.parseShort(cleanedPart.trim());
                        Integer value = Integer.parseInt(cleanedPart.trim());
              messageValues.add(value);
            } catch (NumberFormatException e) {
              // 如果无法解析为 short 类型,则忽略该部分
                        // 如果无法解析为整数类型,则忽略该部分
              e.printStackTrace();
            }
          }
          // 将消息值写入 PLC
          // S7control.getinstance().WriteWord(addressList, messageValues);
          System.out.println("messageValues:" + messageValues);
                // 将消息值转换为布尔列表
                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<>(); // 假设返回空列表
  }
}
springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java
New file
@@ -0,0 +1,70 @@
package com.example.springboot.component;
import cn.hutool.json.JSONObject;
import java.util.List;
import org.springframework.context.ConfigurableApplicationContext;
import com.example.springboot.entity.StorageCage;
import com.example.springboot.mapper.HomeMapper;
public class Plchome extends Thread {
    private HomeMapper homeMapper;
    @Override
    public void run() {
        while (this != null) {
            try {
                Thread.sleep(10000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            JSONObject jsonObject = new JSONObject();
            homeMapper = WebSocketServer.applicationContext.getBean(HomeMapper.class);
            // 笼子使用情况
            List<StorageCage> tableData = homeMapper.selectAll();
            jsonObject.append("tableData", tableData);
            //格理片笼格子状态
            List<StorageCage> cagelist1 = homeMapper.selectRack1();
            List<StorageCage> cagelist2 = homeMapper.selectRack2();
            List<StorageCage> cagelist3 = homeMapper.selectRack3();
            List<StorageCage> cagelist4 = homeMapper.selectRack4();
            jsonObject.append("cagelist1", cagelist1);
            jsonObject.append("cagelist2", cagelist2);
            jsonObject.append("cagelist3", cagelist3);
            jsonObject.append("cagelist4", cagelist4);
            //进出片任务
            List<StorageCage> tasklist1=homeMapper.selectinout(2);
            List<StorageCage> tasklist2=homeMapper.selectinout(3);
            jsonObject.append("tasklist1", tasklist1);
            jsonObject.append("tasklist2", tasklist2);
            //读去Plc进片车与出片车位置
            // List<String> addressList = new ArrayList<>();
            // addressList.add("DB100.DBW0");
            // addressList.add("DB100.DBW2");
            // List<Short> paramlist = S7control.getinstance().ReadWord(addressList);
            // jsonObject.append("params", paramlist);
            jsonObject.append("params", new short[] { 30, 40, });
            WebSocketServer sendwServer = WebSocketServer.sessionMap.get("Home");
            if (sendwServer != null) {
                sendwServer.sendMessage(jsonObject.toString());
            }
            // JSONObject jsonObject = new JSONObject();
            // jsonObject.append("params", new short[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
            // 11, });
            // WebSocketServer sendwServer = WebSocketServer.sessionMap.get("Home");
            // if (sendwServer != null) {
            // sendwServer.sendMessage(jsonObject.toString());
            // }
        }
    }
}
springboot-vue3/src/main/java/com/example/springboot/component/WebSocketServer.java
@@ -4,8 +4,11 @@
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import org.apache.catalina.core.ApplicationContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.websocket.OnClose;
import javax.websocket.OnError;
@@ -25,13 +28,16 @@
@Component
public class WebSocketServer {
  static ConfigurableApplicationContext applicationContext;
  // 解决无法注入mapper问题  //使用方法
  // homeMapper=WebSocketServer.applicationContext.getBean(HomeMapper.class);
    // @Autowired
    // HomeMapper homeMapper;
    static ConfigurableApplicationContext applicationContext;
    //解决无法注入mapper问题  //使用方法 homeMapper=WebSocketServer.applicationContext.getBean(HomeMapper.class);
  public static void setApplicationContext(ConfigurableApplicationContext configurableApplicationContext) {
    WebSocketServer.applicationContext = configurableApplicationContext;
  }
  private static final Logger log = LoggerFactory.getLogger(WebSocketServer.class);
  private List<String> messages;
@@ -42,11 +48,9 @@
  String username;
  Session session;
  public WebSocketServer() {
    this.messages = new ArrayList<>();
  }
  /**
   * 连接建立成功调用的方法
   */
@@ -83,7 +87,6 @@
   * 后台收到客户端发送过来的消息
   * onMessage 是一个消息的中转站
   * 接受 浏览器端 socket.send 发送过来的 json数据
   *
   * @param message 客户端发送过来的消息
   */
  @OnMessage
@@ -96,6 +99,7 @@
    jsonObject.set("message", text);
    this.messages.add(text);
    this.sendMessage(jsonObject.toString()); // JSONUtil.toJsonStr(jsonObject)
  }
  @OnError
@@ -132,6 +136,7 @@
  public List<String> getMessages() {
    return messages;
  }
  public void clearMessages() {
springboot-vue3/src/main/java/com/example/springboot/config/AppRunnerConfig.java
@@ -1,5 +1,6 @@
package com.example.springboot.config;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.core.annotation.Order;
@@ -8,13 +9,16 @@
import com.example.springboot.component.PlcHold;
import com.example.springboot.component.PlcParameter;
import com.example.springboot.component.Plcaction;
import com.example.springboot.component.Plchome;
import com.example.springboot.component.Plcalarm;
import com.example.springboot.component.Plcsign;
import com.example.springboot.component.Plcstate;
@Component
@Order(1)
public class AppRunnerConfig implements ApplicationRunner {
  @Override
  public void run(ApplicationArguments args) throws Exception {
    // TODO Auto-generated method stub
@@ -22,8 +26,10 @@
    System.out.println("启动完成");
    new PlcHold().start();
    new Plcaction().start();
    new PlcParameter().start();
    new Plchome().start();
    new PlcParameter().start();
springboot-vue3/src/main/java/com/example/springboot/controller/HomeController.java
@@ -76,8 +76,17 @@
        }else{
            map.put("message2","200");
            //调用伍上片函数
        }
        return Result.success(map);
    }
    @GetMapping("/UpdateTask")
    public Result UpdateTask(Integer types,Integer shelf_rack){
        Map<String, Object> map = new HashMap<>();
        homeMapper.UpdateTask(types,shelf_rack);
        map.put("message2","200");
        return Result.success(map);
    }
}
springboot-vue3/src/main/java/com/example/springboot/controller/SpianController.java
@@ -30,27 +30,39 @@
    //出片任务
@GetMapping("/all2")
    public Result selectdd(String orderid){
        //获取优先出片的位置
         StorageCage cageout=spianMapper.selectOut(orderid);
         //判断玻璃可直接出片时
         //玻璃内外片
         int cage =cageout.getCage();
         int cage =cageout.getCage(); //储存出片位置,笼子格子几号玻璃
         int cell =cageout.getCell();
         int tier =cageout.getTier();
         double width=cageout.getWidth();
         double glasswidth=cageout.getGlassWidth();
         //判断玻璃内外片
         if(tier==2){
             //判断玻璃可直接出片时
                return Result.success("执行出片");  
         }
         else{  
            //获取格子的玻璃数量
           int state= spianMapper.selectGlassState(cage,cell);
            //判断内片是否需要调拨
            if(state==0){
             return Result.success("状态为0,直接出片");  
             }else{
              //玻璃需要调拨时
              //玻璃需要调拨时,判断属于哪个半区的笼子
               if(cage<6){
                StorageCage cagecell= spianMapper.selectGlassCage(cage,glasswidth,0,6);
                //获取调拨位置进行调拨
                return Result.success(cagecell);  //调拨位置的参数内容
                //判断调拨结束后再次出片
               }else{
                StorageCage cagecell= spianMapper.selectGlassCage(cage,glasswidth,5,11);
                //获取调拨位置进行调拨
                StorageCage ca=cagecell;
                return Result.success(cagecell);  //调拨位置的参数内容
                //判断调拨结束后再次出片
               
               return Result.success("状态为1,需要被调拨");
               }
             }
        }
    
@@ -72,13 +84,17 @@
            int cages=spianMapper.selectCage(cage1);
            //判断选中笼子是否有空格
            StorageCage cages1=spianMapper.selectCage1(cage1);
            //有合适空格时进片
            if(cages>1 &&cages1.getTier()!=null){
                //执行进片
                return Result.success(cages1);
            }else{
                //返回不可进片
            }
            
             
        }         
        return Result.success("0");
        return Result.success("不可进片");
      
    }
    
springboot-vue3/src/main/java/com/example/springboot/entity/StorageCage.java
@@ -11,13 +11,17 @@
    private String state;
    private Integer tier;  
    private String orderId;
    private String coating;
    private String lengthwidth;
    public Integer id() {
        return id;
    }
    public void setId(Integer id) {
        this.id = id;
    }
    public Integer getId() {
        return id;
    }
@@ -29,6 +33,7 @@
    public void setGlassId(String glassId) {
        this.glassId = glassId;
    }
     public String getOrderId() {
        return orderId;
    }
@@ -53,16 +58,6 @@
        return cell;
    }
    // public String getHeighth() {
    //     return height;
    // }
    // public void setHeight(String height) {
    //     this.height = height;
    // }
    public Double getWidth() {
        return width;
    }
@@ -86,6 +81,7 @@
    public void setTier(Integer tier) {
        this.tier = tier;
    }
     public Double getGlassWidth() {
        return glasswidth;
    }
@@ -93,6 +89,7 @@
    public void setGlassWidth(Double glasswidth) {
        this.glasswidth = glasswidth;
    }
    public Double getGlassHeight() {
        return glassheight;
    }
@@ -101,4 +98,19 @@
        this.glassheight = glassheight;
    }
  
    public String getCoating() {
        return coating;
    }
    public void setCoating(String coating) {
        this.coating = coating;
    }
    public String getLengthWidth() {
        return lengthwidth;
    }
    public void setLengthWidth(String lengthwidth) {
        this.lengthwidth = lengthwidth;
    }
}
springboot-vue3/src/main/java/com/example/springboot/entity/StorageTask.java
@@ -7,6 +7,7 @@
    private String shelfRack;
    private String loadrack;
    public Integer id() {
        return id;
    }
springboot-vue3/src/main/java/com/example/springboot/mapper/HomeMapper.java
@@ -28,7 +28,7 @@
    List<StorageCage> selectRack4();
    // 根据任务类型查询当前正在出片,进片的玻璃信息
    @Select("select * from storage_cage where state=#{task_type} limit 1")
  @Select("select *,concat(glasswidth,' x ',glassheight) as lengthwidth from storage_cage where state=#{task_type} limit 1")
    List<StorageCage> selectinout(@Param("task_type") Integer task_type);
    // 查询是否存在此订单
@@ -36,7 +36,7 @@
    short SelectOrder(@Param("orderid") String orderid);
    // @Insert("insert into order_out(orderid) values('#{orderid}')")
    @Insert("INSERT INTO `canadames`.`order_out`( `order_id`,`mod_time`) VALUES ( #{orderid},now())")
  @Insert("INSERT INTO `canadames`.`order_out`( `orderid`,`mod_time`) VALUES ( #{orderid},now())")
    void InsertOrder(String orderid);
    //停止按当前订单出片
@@ -46,4 +46,8 @@
    //查询是否存在正在上片的任务
    @Select("select count(*) from storage_task where task_state=0 and task_type=1")
    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);
}
springboot-vue3/src/main/java/com/example/springboot/mapper/SpianMapper.java
@@ -32,14 +32,14 @@
     void insert(StorageTask storageTask);
    
    //出片任务查询
    @Select("select cage,cell,tier from storage_cage as a where a.order_id=#{orderId} and state=1 order by cage desc,tier desc,cell desc LIMIT 1")
    @Select("select cage,cell,tier,glasswidth from storage_cage as a where a.order_id=#{orderId} and state=1 order by cage desc,tier desc,cell desc LIMIT 1")
     StorageCage selectOut(String  orderId);
    //判断出片为1时,是否可直接出片
    @Select("select state from storage_cage where cage=#{cage} and cell=#{cell} and tier=2;")
     int selectGlassState(int  cage,int cell);
     //判断
     @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;")
     int selectGlassCage(double width,int cage1,int cage2);
     //判断该调拨的笼子
     @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);
     
    // @Insert("insert into user(name, date, address, user_no) values (#{name}, #{date}, #{address}, #{userNo})")
    // void insert (Spian spian);
springboot-vue3/src/main/resources/application.properties
@@ -6,7 +6,7 @@
#\u6570\u636E\u5E93\u9A71\u52A8
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
#\u6570\u636E\u5E93\u8FDE\u63A5\u5730\u5740
spring.datasource.url=jdbc:mysql://localhost:3306/canadames?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
spring.datasource.url=jdbc:mysql://10.153.19.150:3306/canadames?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
#\u6570\u636E\u5E93\u7528\u6237\u540D
spring.datasource.username=root
#\u6570\u636E\u5E93\u7528\u6237\u5BC6\u7801
springboot-vue3/src/main/resources/sql/canadames.sql
@@ -11,7 +11,7 @@
 Target Server Version : 80022
 File Encoding         : 65001
 Date: 30/08/2023 16:14:36
 Date: 05/09/2023 16:20:45
*/
SET NAMES utf8mb4;
@@ -32,7 +32,7 @@
  `create_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间',
  `update_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '商品分类' ROW_FORMAT = Dynamic;
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '商品分类' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of category
@@ -62,7 +62,7 @@
  `last_product_count_date` date NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `device_id_idx`(`device_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 53 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC;
) ENGINE = InnoDB AUTO_INCREMENT = 46 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of device
@@ -102,16 +102,16 @@
-- Records of menu_list
-- ----------------------------
INSERT INTO `menu_list` VALUES (1, NULL, '用户管理', 'el-icon-user-solid', 1, '', 1, '2021-11-28 14:30:27', '2021-11-28 15:06:04');
INSERT INTO `menu_list` VALUES (2, NULL, '设备管理', 'el-icon-lollipop', 2, '', 1, '2023-08-23 20:11:38', '2023-08-28 08:16:00');
INSERT INTO `menu_list` VALUES (2, NULL, '电气管理', 'el-icon-lollipop', 2, '', 1, '2023-08-23 20:11:38', '2023-09-01 16:34:36');
INSERT INTO `menu_list` VALUES (5, NULL, '权限管理', 'el-icon-collection-tag', 5, '', 1, '2021-11-28 14:30:27', '2021-11-28 15:06:04');
INSERT INTO `menu_list` VALUES (6, NULL, '角色管理', 'el-icon-s-flag', 6, '', 1, '2021-11-28 14:30:27', '2021-11-28 15:06:04');
INSERT INTO `menu_list` VALUES (7, 1, '用户列表', '', 7, 'user', 1, '2021-11-28 14:30:27', '2021-11-28 15:06:04');
INSERT INTO `menu_list` VALUES (11, 5, '权限列表', '', 11, 'power', 1, '2021-11-28 14:30:28', '2021-11-28 15:06:04');
INSERT INTO `menu_list` VALUES (12, 6, '角色列表', '', 12, 'role', 1, '2021-11-28 14:30:28', '2021-11-28 15:06:04');
INSERT INTO `menu_list` VALUES (49, 2, '报警信息', '', 49, 'device/alarm', 1, '2021-11-28 14:30:28', '2023-08-25 14:05:05');
INSERT INTO `menu_list` VALUES (51, 2, 'I/O状态', NULL, 51, 'device/iostate', 1, '2023-08-25 13:29:13', '2023-08-25 14:07:04');
INSERT INTO `menu_list` VALUES (52, 2, '开关控制', NULL, 52, 'device/control', 1, '2023-08-25 13:29:18', '2023-08-25 14:06:48');
INSERT INTO `menu_list` VALUES (53, 2, '参数下发', NULL, 53, 'device/parameter', 1, '2023-08-25 13:29:22', '2023-08-25 14:06:33');
INSERT INTO `menu_list` VALUES (49, 2, '报警信息', '', 49, 'Electrical/Action', 1, '2021-11-28 14:30:28', '2023-09-01 16:33:29');
INSERT INTO `menu_list` VALUES (51, 2, 'I/O状态', NULL, 51, 'Electrical/State', 1, '2023-08-25 13:29:13', '2023-09-01 16:34:03');
INSERT INTO `menu_list` VALUES (52, 2, '开关控制', NULL, 52, 'Electrical/Sign', 1, '2023-08-25 13:29:18', '2023-09-01 16:33:48');
INSERT INTO `menu_list` VALUES (53, 2, '参数下发', NULL, 53, 'Electrical/Parameter', 1, '2023-08-25 13:29:22', '2023-09-01 16:32:29');
-- ----------------------------
-- Table structure for permission
@@ -188,7 +188,7 @@
  `create_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间',
  `update_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 52 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '角色和菜单关联表' ROW_FORMAT = Dynamic;
) ENGINE = InnoDB AUTO_INCREMENT = 54 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '角色和菜单关联表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of role_menu_list
@@ -229,6 +229,8 @@
INSERT INTO `role_menu_list` VALUES (47, 2, 60, 1, '2023-08-28 15:14:27', '2023-08-28 15:53:34');
INSERT INTO `role_menu_list` VALUES (50, 2, 2, 1, '2023-08-28 15:14:27', '2023-08-28 15:53:34');
INSERT INTO `role_menu_list` VALUES (51, 2, 49, 1, '2023-08-28 15:14:27', '2023-08-28 15:53:34');
INSERT INTO `role_menu_list` VALUES (52, 2, 1, 1, '2023-08-30 16:28:57', '2023-08-30 16:28:57');
INSERT INTO `role_menu_list` VALUES (53, 2, 7, 1, '2023-08-30 16:29:05', '2023-08-30 16:29:05');
-- ----------------------------
-- Table structure for role_permission
@@ -242,7 +244,7 @@
  `create_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间',
  `update_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 74 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '角色权限' ROW_FORMAT = Dynamic;
) ENGINE = InnoDB AUTO_INCREMENT = 76 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '角色权限' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of role_permission
@@ -276,7 +278,7 @@
INSERT INTO `role_permission` VALUES (43, 1, 29, 1, '2023-08-24 08:56:15', '2023-08-24 08:56:15');
INSERT INTO `role_permission` VALUES (44, 1, 31, 1, '2023-08-24 08:56:23', '2023-08-24 08:56:23');
INSERT INTO `role_permission` VALUES (53, 2, 2, 1, '2021-11-28 15:07:54', '2021-11-28 15:07:54');
INSERT INTO `role_permission` VALUES (54, 2, 3, 1, '2021-11-28 15:07:54', '2021-11-28 15:07:54');
INSERT INTO `role_permission` VALUES (54, 2, 3, 0, '2021-11-28 15:07:54', '2021-11-28 15:07:54');
INSERT INTO `role_permission` VALUES (56, 2, 8, 1, '2021-11-28 15:07:54', '2021-11-28 15:07:54');
INSERT INTO `role_permission` VALUES (57, 2, 9, 1, '2021-11-28 15:07:54', '2021-11-28 15:07:54');
INSERT INTO `role_permission` VALUES (58, 2, 10, 1, '2021-11-28 15:07:54', '2021-11-28 15:07:54');
@@ -285,7 +287,7 @@
INSERT INTO `role_permission` VALUES (63, 2, 17, 1, '2021-11-28 15:07:54', '2021-11-28 15:07:54');
INSERT INTO `role_permission` VALUES (64, 2, 18, 1, '2021-11-28 15:07:54', '2021-11-28 15:07:54');
INSERT INTO `role_permission` VALUES (65, 2, 19, 1, '2021-11-28 15:07:54', '2021-11-28 15:07:54');
INSERT INTO `role_permission` VALUES (66, 2, 20, 1, '2021-11-28 15:07:54', '2021-11-28 15:07:54');
INSERT INTO `role_permission` VALUES (66, 2, 20, 0, '2021-11-28 15:07:54', '2021-11-28 15:07:54');
INSERT INTO `role_permission` VALUES (67, 2, 22, 1, '2021-11-28 15:07:54', '2021-11-28 15:07:54');
INSERT INTO `role_permission` VALUES (68, 2, 25, 1, '2021-11-28 15:07:54', '2021-11-28 15:07:54');
INSERT INTO `role_permission` VALUES (69, 2, 26, 1, '2021-11-28 15:07:54', '2021-11-28 15:07:54');
@@ -293,6 +295,7 @@
INSERT INTO `role_permission` VALUES (71, 2, 28, 1, '2021-11-28 15:07:54', '2021-11-28 15:07:54');
INSERT INTO `role_permission` VALUES (72, 2, 30, 1, '2023-08-24 08:55:34', '2023-08-24 08:55:34');
INSERT INTO `role_permission` VALUES (73, 2, 29, 1, '2023-08-24 08:56:15', '2023-08-28 15:33:14');
INSERT INTO `role_permission` VALUES (74, 2, 1, 1, '2023-08-30 16:29:46', '2023-08-30 16:29:46');
-- ----------------------------
-- Table structure for storage_rack
@@ -759,19 +762,19 @@
-- ----------------------------
-- Records of user
-- ----------------------------
INSERT INTO `user` VALUES (1, 0, '', 0, 1, 'admin', 'b2f0c414a5ffb6944c424bc18ae3a8a0', NULL, NULL, NULL, 1, '2023-08-25 08:58:58', '2023-08-29 16:02:56');
INSERT INTO `user` VALUES (1, 0, '', 0, 1, 'admin', 'b2f0c414a5ffb6944c424bc18ae3a8a0', NULL, NULL, NULL, 1, '2023-08-25 08:58:58', '2023-09-05 16:12:28');
INSERT INTO `user` VALUES (2, 1, '1-', 1, 2, 'user1', '601b99523f82de29f87771d5f95accdc', 'user1@qq.com', NULL, NULL, 1, '2021-11-28 14:31:39', '2021-11-28 15:09:36');
INSERT INTO `user` VALUES (3, 1, '1-', 1, 2, 'user2', 'f403c87893db29eb71b21905b57bbd0d', 'user2@qq.com', NULL, NULL, 1, '2021-11-28 14:31:39', '2021-11-28 15:09:36');
INSERT INTO `user` VALUES (8, 1, '1-', 1, 5, 'yyyyy', 'fca7e8e6b2fca165de912bd617c8df3c', '2265557248@qq.com', NULL, NULL, 1, '2023-08-23 20:08:44', '2023-08-23 20:08:44');
INSERT INTO `user` VALUES (9, 1, '1-', 1, 1, 'yttttttttttt', '16de30ab81d69e8cc479a05cad599657', '666@qq.com', NULL, NULL, 1, '2023-08-23 20:35:32', '2023-08-23 20:35:32');
INSERT INTO `user` VALUES (9, 1, '1-', 1, 1, 'yttttttttttt', 'b2f0c414a5ffb6944c424bc18ae3a8a0', '666@qq.com', NULL, NULL, 1, '2023-08-23 20:35:32', '2023-08-23 20:35:32');
INSERT INTO `user` VALUES (10, 1, '1-', 1, 2, '767655555', '500637c0d48b442a3be6d4fce12e0910', NULL, NULL, NULL, 1, '2023-08-23 20:42:58', '2023-08-23 20:42:58');
INSERT INTO `user` VALUES (11, 1, '1-', 1, 5, 'uiuyiuy', 'e046c4175152aa3001d2c71c5bc1aee5', '767676767tt@qq.com', NULL, NULL, 1, '2023-08-23 20:43:42', '2023-08-23 20:43:42');
INSERT INTO `user` VALUES (13, 1, '1-', 1, 2, 'user3', '500637c0d48b442a3be6d4fce12e0910', '2265557345@qq.com', NULL, NULL, 1, '2023-08-24 09:58:40', '2023-08-24 09:58:40');
INSERT INTO `user` VALUES (15, 1, '1-', 1, 2, '99999', 'b2f0c414a5ffb6944c424bc18ae3a8a0', '2267666@qq.com', NULL, NULL, 1, '2023-08-25 09:37:05', '2023-08-28 14:37:27');
INSERT INTO `user` VALUES (16, 1, '1-', 1, 1, '5656tttt', 'b2f0c414a5ffb6944c424bc18ae3a8a0', '5454@qq.com', NULL, NULL, 1, '2023-08-28 14:17:44', '2023-08-28 14:37:24');
INSERT INTO `user` VALUES (16, 1, '1-', 1, 2, '5656tttt', 'b2f0c414a5ffb6944c424bc18ae3a8a0', '5454@qq.com', NULL, NULL, 1, '2023-08-28 14:17:44', '2023-08-28 14:37:24');
INSERT INTO `user` VALUES (17, 1, '1-', 1, 2, '6767ttt', 'b2f0c414a5ffb6944c424bc18ae3a8a0', '225@qq.com', NULL, NULL, 1, '2023-08-28 14:20:05', '2023-08-28 14:23:53');
INSERT INTO `user` VALUES (18, 1, '1-', 1, 2, '8989ttt', 'b2f0c414a5ffb6944c424bc18ae3a8a0', '224@qq.com', NULL, NULL, 1, '2023-08-28 14:26:17', '2023-08-28 14:37:22');
INSERT INTO `user` VALUES (19, 1, '1-', 1, 2, '8080ttt', 'b2f0c414a5ffb6944c424bc18ae3a8a0', '87@qq.com', NULL, NULL, 1, '2023-08-28 14:34:39', '2023-08-29 16:03:38');
INSERT INTO `user` VALUES (19, 1, '1-', 1, 5, '8080ttt', 'b2f0c414a5ffb6944c424bc18ae3a8a0', '87@qq.com', NULL, NULL, 1, '2023-08-28 14:34:39', '2023-08-29 16:03:38');
-- ----------------------------
-- Procedure structure for Your_Stored_Procedure