guoyuji
2024-03-12 9477c09873492574e584c2791a07c1cf9ff2566c
中英文切换相关文件
75个文件已修改
3个文件已添加
1738 ■■■■■ 已修改文件
north-glass-erp/.idea/dataSources.local.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/package-lock.json 82 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/package.json 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/lang/en.js 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/lang/index.js 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/lang/zh.js 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/layout/MainErpView.vue 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/main.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/LoginView.vue 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/CreateProductStock.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/FinishedGoodsIssue.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/FinishedProductOut.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/FinishedProductRework.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/OrderAllocation.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/ProductStock.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/ProductStockList.vue 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/ReworkRecord.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/TakeOutRecord.vue 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/TransferRecord.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/Replenish/AddReplenish.vue 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/Replenish/Replenish.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/Replenish/SelectReplenish.vue 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/processCard/AddProcessCard.vue 295 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/processCard/ProductionScheduling.vue 50 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/processCard/SelectProcessCard.vue 91 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/processCard/SplittingDetails.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/rework/AddRework.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/rework/Rework.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/rework/SelectRework.vue 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/workOrder/SelectWorkOrder.vue 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/workOrder/WorkOrder.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/sd/delivery/CreateDelivery.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/sd/delivery/Delivery.vue 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/controller/mm/FinishedGoodsInventoryController.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/controller/pp/ProcessCardController.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/controller/pp/ProductionSchedulingController.java 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/controller/pp/ReplenishController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/controller/pp/ReworkController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/controller/pp/WorkOrderController.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/controller/userInfo/SysMenuController.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/controller/userInfo/SysMenuItemController.java 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/entity/pp/FlowCard.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/entity/pp/ProductionScheduling.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/mapper/mm/FinishedOperateLogMapper.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/mapper/pp/BasicDateProduceMapper.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/mapper/pp/FlowCardMapper.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/mapper/pp/PatchLogMapper.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/mapper/pp/ProductionSchedulingMapper.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/mapper/userInfo/SysMenuItemMapper.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/mapper/userInfo/SysMenuMapper.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/mm/FinishedGoodsInventoryService.java 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/pp/ProductionSchedulingService.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/pp/ReplenishService.java 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/pp/ReworkService.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/sd/DeliveryService.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/userInfo/SysMenuItemService.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/userInfo/SysMenuService.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/mm/FinishedOperateLog.xml 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/pp/BasicDataProduce.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/pp/PatchLogMapper.xml 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/pp/ProductionScheduling.xml 248 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/pp/ReworkMapper.xml 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/sd/Delivery.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/sd/DeliveryDetail.xml 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/userInfo/SysMenu.xml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/userInfo/SysMenuItem.xml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/target/classes/mapper/mm/FinishedOperateLog.xml 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/target/classes/mapper/pp/BasicDataProduce.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/target/classes/mapper/pp/FolwCard.xml 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/target/classes/mapper/pp/PatchLogMapper.xml 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/target/classes/mapper/pp/ProductionScheduling.xml 248 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/target/classes/mapper/pp/ReworkMapper.xml 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/target/classes/mapper/sd/Delivery.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/target/classes/mapper/sd/DeliveryDetail.xml 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/target/classes/mapper/userInfo/SysMenu.xml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/target/classes/mapper/userInfo/SysMenuItem.xml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/.idea/dataSources.local.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="dataSourceStorageLocal" created-in="IU-232.8660.185">
  <component name="dataSourceStorageLocal" created-in="IU-232.9559.62">
    <data-source name="@localhost [2]" uuid="165c5447-d19a-4aaf-af5f-cee92ae696c2">
      <database-info product="MySQL" version="8.0.22" jdbc-version="4.2" driver-name="MySQL Connector/J" driver-version="mysql-connector-java-8.0.25 (Revision: 08be9e9b4cba6aa115f9b27b215887af40b159e0)" dbms="MYSQL" exact-version="8.0.22" exact-driver-version="8.0">
        <extra-name-characters>#@</extra-name-characters>
north-glass-erp/northglass-erp/package-lock.json
@@ -17,6 +17,7 @@
        "pinia-plugin-persistedstate": "^3.2.0",
        "sortablejs": "^1.15.1",
        "vue": "^3.3.4",
        "vue-i18n": "^9.10.1",
        "vue-router": "^4.2.4",
        "vxe-table": "^4.5.15",
        "xe-utils": "^3.5.14",
@@ -457,6 +458,38 @@
      "version": "0.1.6",
      "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.1.6.tgz",
      "integrity": "sha512-OfX7E2oUDYxtBvsuS4e/jSn4Q9Qb6DzgeYtsAdkPZ47znpoNsMgZw0+tVijiv3uGNR6dgNlty6r9rzIzHjtd/A=="
    },
    "node_modules/@intlify/core-base": {
      "version": "9.10.1",
      "resolved": "https://registry.npmmirror.com/@intlify/core-base/-/core-base-9.10.1.tgz",
      "integrity": "sha512-0+Wtjj04GIyglh5KKiNjRwgjpHrhqqGZhaKY/QVjjogWKZq5WHROrTi84pNVsRN18QynyPmjtsVUWqFKPQ45xQ==",
      "dependencies": {
        "@intlify/message-compiler": "9.10.1",
        "@intlify/shared": "9.10.1"
      },
      "engines": {
        "node": ">= 16"
      }
    },
    "node_modules/@intlify/message-compiler": {
      "version": "9.10.1",
      "resolved": "https://registry.npmmirror.com/@intlify/message-compiler/-/message-compiler-9.10.1.tgz",
      "integrity": "sha512-b68UTmRhgZfswJZI7VAgW6BXZK5JOpoi5swMLGr4j6ss2XbFY13kiw+Hu+xYAfulMPSapcHzdWHnq21VGnMCnA==",
      "dependencies": {
        "@intlify/shared": "9.10.1",
        "source-map-js": "^1.0.2"
      },
      "engines": {
        "node": ">= 16"
      }
    },
    "node_modules/@intlify/shared": {
      "version": "9.10.1",
      "resolved": "https://registry.npmmirror.com/@intlify/shared/-/shared-9.10.1.tgz",
      "integrity": "sha512-liyH3UMoglHBUn70iCYcy9CQlInx/lp50W2aeSxqqrvmG+LDj/Jj7tBJhBoQL4fECkldGhbmW0g2ommHfL6Wmw==",
      "engines": {
        "node": ">= 16"
      }
    },
    "node_modules/@jridgewell/sourcemap-codec": {
      "version": "1.4.15",
@@ -1502,6 +1535,22 @@
        "@vue/shared": "3.3.4"
      }
    },
    "node_modules/vue-i18n": {
      "version": "9.10.1",
      "resolved": "https://registry.npmmirror.com/vue-i18n/-/vue-i18n-9.10.1.tgz",
      "integrity": "sha512-37HVJQZ/pZaRXGzFmmMomM1u1k7kndv3xCBPYHKEVfv5W3UVK67U/TpBug71ILYLNmjHLHdvTUPRF81pFT5fFg==",
      "dependencies": {
        "@intlify/core-base": "9.10.1",
        "@intlify/shared": "9.10.1",
        "@vue/devtools-api": "^6.5.0"
      },
      "engines": {
        "node": ">= 16"
      },
      "peerDependencies": {
        "vue": "^3.0.0"
      }
    },
    "node_modules/vue-router": {
      "version": "4.2.5",
      "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-4.2.5.tgz",
@@ -1796,6 +1845,29 @@
      "version": "0.1.6",
      "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.1.6.tgz",
      "integrity": "sha512-OfX7E2oUDYxtBvsuS4e/jSn4Q9Qb6DzgeYtsAdkPZ47znpoNsMgZw0+tVijiv3uGNR6dgNlty6r9rzIzHjtd/A=="
    },
    "@intlify/core-base": {
      "version": "9.10.1",
      "resolved": "https://registry.npmmirror.com/@intlify/core-base/-/core-base-9.10.1.tgz",
      "integrity": "sha512-0+Wtjj04GIyglh5KKiNjRwgjpHrhqqGZhaKY/QVjjogWKZq5WHROrTi84pNVsRN18QynyPmjtsVUWqFKPQ45xQ==",
      "requires": {
        "@intlify/message-compiler": "9.10.1",
        "@intlify/shared": "9.10.1"
      }
    },
    "@intlify/message-compiler": {
      "version": "9.10.1",
      "resolved": "https://registry.npmmirror.com/@intlify/message-compiler/-/message-compiler-9.10.1.tgz",
      "integrity": "sha512-b68UTmRhgZfswJZI7VAgW6BXZK5JOpoi5swMLGr4j6ss2XbFY13kiw+Hu+xYAfulMPSapcHzdWHnq21VGnMCnA==",
      "requires": {
        "@intlify/shared": "9.10.1",
        "source-map-js": "^1.0.2"
      }
    },
    "@intlify/shared": {
      "version": "9.10.1",
      "resolved": "https://registry.npmmirror.com/@intlify/shared/-/shared-9.10.1.tgz",
      "integrity": "sha512-liyH3UMoglHBUn70iCYcy9CQlInx/lp50W2aeSxqqrvmG+LDj/Jj7tBJhBoQL4fECkldGhbmW0g2ommHfL6Wmw=="
    },
    "@jridgewell/sourcemap-codec": {
      "version": "1.4.15",
@@ -2488,6 +2560,16 @@
        "@vue/shared": "3.3.4"
      }
    },
    "vue-i18n": {
      "version": "9.10.1",
      "resolved": "https://registry.npmmirror.com/vue-i18n/-/vue-i18n-9.10.1.tgz",
      "integrity": "sha512-37HVJQZ/pZaRXGzFmmMomM1u1k7kndv3xCBPYHKEVfv5W3UVK67U/TpBug71ILYLNmjHLHdvTUPRF81pFT5fFg==",
      "requires": {
        "@intlify/core-base": "9.10.1",
        "@intlify/shared": "9.10.1",
        "@vue/devtools-api": "^6.5.0"
      }
    },
    "vue-router": {
      "version": "4.2.5",
      "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-4.2.5.tgz",
north-glass-erp/northglass-erp/package.json
@@ -17,6 +17,7 @@
    "pinia-plugin-persistedstate": "^3.2.0",
    "sortablejs": "^1.15.1",
    "vue": "^3.3.4",
    "vue-i18n": "^9.10.1",
    "vue-router": "^4.2.4",
    "vxe-table": "^4.5.15",
    "xe-utils": "^3.5.14",
north-glass-erp/northglass-erp/src/lang/en.js
New file
@@ -0,0 +1,21 @@
export  default {
    login:{
        userErr:'Please enter your user id',
        pwErr:'Please enter your password',
        loginSuccessful:'User login successful',
        connectErr:'server connection failed',
        user:'user',
        password:'pass',
        SysName:'North Glass ERP System',
        login:'login',
        register:'register',
    },
    main:{
        connectErr:'The server connection is abnormal. Please try again later',
        titleFirst:"Welcome ",
        titleLast:' to use North Glass ERP system!'
    }
}
north-glass-erp/northglass-erp/src/lang/index.js
New file
@@ -0,0 +1,18 @@
import { createI18n}  from 'vue-i18n'
import zh from "./zh"
import en from "./en"
let messages = {
    zh:zh,
    en: en
}
const i18n = createI18n({
    locale: localStorage.getItem('lang') || 'en', // 设置当前语言类型
    legacy: false, // 如果要支持compositionAPI,此项必须设置为false;
    globalInjection: true, // 全局注册$t方法
    messages
})
export default i18n
north-glass-erp/northglass-erp/src/lang/zh.js
New file
@@ -0,0 +1,22 @@
export  default {
    login:{
        userErr:'请输入你的账号',
        pwErr:'请输入你的密码',
        loginSuccessful:'登陆成功',
        connectErr:'服务器连接失败',
        user:'用户',
        password:'密码',
        SysName:'北玻自动化ERP管理系统',
        login:'登陆',
        register:'注册',
    },
    main:{
        connectErr:'服务器连接异常,请稍后再试',
        titleFirst:"欢迎 ",
        titleLast:' 使用北玻ERP系统!'
    },
    order:{
    }
}
north-glass-erp/northglass-erp/src/layout/MainErpView.vue
@@ -1,12 +1,17 @@
<script setup>
import { RouterLink,useRouter} from 'vue-router'
import  useUserInfoStore from '@/stores/userInfo'
import request from "@/utils/request";
import {ElMessage} from "element-plus";
import request from "@/utils/request"
import {ElMessage} from "element-plus"
import {onMounted, reactive, ref, watch} from "vue"
import deepClone from "@/utils/deepClone"
import userInfo from '@/stores/userInfo'
import {Close, Grid, Histogram, MessageBox, SwitchButton} from "@element-plus/icons-vue";
import {Close, Grid, Histogram, MessageBox, SwitchButton} from "@element-plus/icons-vue"
import { useI18n } from 'vue-i18n'
import i18n from "@/lang/index"
const lang = i18n.global.locale.value
//语言获取
const { t } = useI18n()
const store=userInfo()
const router = useRouter()
@@ -23,7 +28,7 @@
//提取模块列表
let menuList=$ref([])
request.get("/menu").then((res) => {
request.get(`/menu/getMenu/${lang}`).then((res) => {
  if(res.code==200){
    menuList= deepClone(res.data)
  }else{
@@ -31,13 +36,13 @@
    router.push("/login")
  }
}).catch((e)=>{
  ElMessage.warning("服务器连接异常,请稍后再试")
  ElMessage.warning(t('main.connectErr'))
  router.push("/login")
})
//获取菜单列表
let menuItemList=$ref([])
request.get("/menuItem").then((res) => {
request.get(`/menuItem/getMenuItem/${lang}`).then((res) => {
  if(res.code==200){
    menuItemList= deepClone(res.data)
  }else{
@@ -83,7 +88,7 @@
      <el-header >
        <div style="height: 100%;width: 100%;display: flex">
          <img src="../assets/northGlass.ico" alt="" style="max-width: 100%;max-height: 100%">
          <h3 style="margin: 1rem  ;font-weight: bold;width: 20vw;"> 欢迎{{ user }}使用北玻ERP系统!</h3>
          <h3 style="margin: 1rem  ;font-weight: bold;width: 40vw;"> {{$t('main.titleFirst') + user + $t('main.titleLast')}}</h3>
          <span style="height: 70%;width: 78vw;margin-top: 1rem;" >
            <el-button  class="sys-quit" @click="quit"  type="info" round>
north-glass-erp/northglass-erp/src/main.js
@@ -10,6 +10,9 @@
import 'element-plus/dist/index.css'
import VXETable from 'vxe-table'
import 'vxe-table/lib/style.css'
import i18n from "@/lang"
const app = createApp(App)
const pinia = createPinia()
@@ -20,5 +23,6 @@
app.use(ElementPlus,{
    locale: zhCn,
})
app.use(i18n)
app.mount('#app')
north-glass-erp/northglass-erp/src/views/LoginView.vue
@@ -7,6 +7,9 @@
import request from '@/utils/request'
import userInfo from '@/stores/userInfo'
import { sendSock, createWebSocket, closeSock,global_callback1 } from "@/utils/webSocket"
import { useI18n } from 'vue-i18n'
//语言获取
const { t } = useI18n()
const store=userInfo()
let ruleFormRef  = ref<FormInstance>()
@@ -24,7 +27,7 @@
const validateUser = (rule: any, value: any, callback: any) => {
  if (value === '') {
    callback(new Error('请输入你的账号'))
    callback(new Error(t('login.userErr')))
  } else {
    callback()
  }
@@ -32,7 +35,7 @@
const validatePass = (rule: any, value: any, callback: any) => {
  if (value === '') {
    callback(new Error('请输入你的密码'))
    callback(new Error(t('login.psErr')))
  } else {
    callback()
  }
@@ -55,14 +58,14 @@
          store.$patch({user:res.data})
          router.push('/main')
          ElMessage.success(`登录成功`)
          ElMessage.success(t('login.loginSuccessful'))
        } else {
          ElMessage.error(res['msg'])
          loginLoadings.value=false
          return false
        }
      }).catch(error => {
        ElMessage.error("服务器连接失败")
        ElMessage.error(t('login.connectErr'))
        loginLoadings.value=false
        return false
      })
@@ -102,7 +105,7 @@
        <img id="img-pic" src="@/assets/img.png" alt="">
      </div>
      <div id="div-login">
        <h2>北玻自动化ERP管理系统</h2>
        <h2>{{$t('login.SysName')}}</h2>
        <el-form
            @submit.native.prevent
            ref="ruleFormRef"
@@ -110,22 +113,22 @@
            status-icon
            :rules="rules"
        >
          <el-form-item label="用户:" prop="userId">
          <el-form-item :label="$t('login.user')+':'" prop="userId">
            <el-input
                v-model="userForm.userId"
                type="text"
                autocomplete="off"
                :prefix-icon="Avatar"
                placeholder="请输入你的账号"
                :placeholder="$t('login.userErr')"
            />
          </el-form-item>
          <el-form-item label="密码:" prop="pass">
          <el-form-item :label="$t('login.password')+':'" prop="pass">
            <el-input
                v-model="userForm.pass"
                type="password"
                autocomplete="off"
                :prefix-icon="Lock"
                placeholder="请输入你的密码"
                :placeholder="$t('login.pwErr')"
            />
          </el-form-item>
          <el-form-item id="submitForm">
@@ -133,7 +136,7 @@
                :loading="registerLoadings"
                type="primary"
                @click="register"
            >注册
            >{{$t('login.register')}}
            </el-button>
            <el-button
                :loading="loginLoadings"
@@ -141,7 +144,7 @@
                native-type="submit"
                @click="submitForm(ruleFormRef)"
                @keyup.enter.native="keyDown(e)"
            >登录
            >{{$t('login.login')}}
            </el-button>
          </el-form-item>
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/CreateProductStock.vue
@@ -266,7 +266,7 @@
              request.post("/FinishedGoodsInventory/addSelectWarehousing",flowData.value).then((res) => {
                if(res.code==200){
                  ElMessage.success("入库成功")
                  location.reload();
                  router.push({path:'/main/productStock/CreateProductStock',query:{random:Math.random()}})
                }else{
                  ElMessage.warning(res.msg)
                  router.push("/login")
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/FinishedGoodsIssue.vue
@@ -64,7 +64,7 @@
          request.post("/FinishedGoodsInventory/updateFinishedGoodsInventoryTakeOut",flowData.value).then((res) => {
            if(res.code==200){
              ElMessage.success("领出成功")
              router.push({path: '/main/delivery/SelectOrderList'})
              router.push({path:'/main/productStock/FinishedGoodsIssue',query:{random:Math.random()}})
            }else{
              ElMessage.warning(res.msg)
              router.push("/login")
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/FinishedProductOut.vue
@@ -268,7 +268,7 @@
            request.post("/FinishedGoodsInventory/addDeliveryDetail",orderDetailData.value).then((res) => {
              if(res.code==200){
                ElMessage.success("出库成功")
                location.reload();
                router.push({path:'/main/productStock/FinishedProductOut',query:{random:Math.random()}})
              }else{
                ElMessage.warning(res.msg)
                router.push("/login")
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/FinishedProductRework.vue
@@ -63,8 +63,8 @@
          })
          request.post("/FinishedGoodsInventory/updateFinishedGoodsInventoryRework", flowData.value).then((res) => {
            if (res.code == 200) {
              location.reload();
              ElMessage.success("返工成功")
              router.push({path:'/main/productStock/FinishedProductRework',query:{random:Math.random()}})
            } else {
              ElMessage.warning(res.msg)
              router.push("/login")
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/OrderAllocation.vue
@@ -276,7 +276,7 @@
              if (res.code == 200) {
                ElMessage.success("调拨成功")
                location.reload();
                router.push({path:'/main/productStock/OrderAllocation',query:{random:Math.random()}})
              } else {
                ElMessage.warning(res.msg)
                router.push("/login")
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/ProductStock.vue
@@ -4,11 +4,11 @@
import request from "@/utils/request";
import deepClone from "@/utils/deepClone";
import {ElMessage} from "element-plus";
import {useRouter} from "vue-router";
import  GlassType from '@/components/basic/product/GlassType.vue'
import {useRouter,useRoute,onBeforeRouteUpdate} from "vue-router";
const router = useRouter()
const route = useRoute()
let indexFlag=$ref(1)
function changeRouter(index){
  indexFlag=index
@@ -33,7 +33,7 @@
    </div>
    <div id="main-body">
      <router-view  />
      <router-view  :key="route.fullPath" />
    </div>
  </div>
</template>
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/ProductStockList.vue
@@ -183,7 +183,7 @@
    // { type: 'checkbox',fixed:"left", title: '选择', width: '80' },
    { type: 'seq',fixed:"left", title: '自序', width: '80' },
    // {title: '操作', width: '220', slots: { default: 'button_slot' },fixed:"left"},
    {field: 'orderDetail.orderNumber', width:'150', title: '订单序号', filters:[{ data: '' }],editRender: { name: 'input', attrs: { placeholder: '' } } },
    {field: 'orderDetail.orderNumber', width:'150', title: '订单序号', filters:[{ data: '' }],slots: { filter: 'num1_filter' } },
    {field: 'order.orderId', width: '150',title: '销售单号',showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'order.project', width: '120',title: '项目名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'order.orderType', width: '100',title: '订单类型', filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
@@ -220,19 +220,33 @@
    zoom: true,
    custom: true
  },
  //脚部求和
  footerMethod ({ columns, data }) {//页脚函数
    let footList = ['inventory','quantityAvailable','area']
    return[
      columns.map((column, columnIndex) => {
        if (columnIndex === 0) {
          return `合计`
        }
        if (footList.includes(column.field)) {
          return sumNum(data, column.field)
        }
        return ''
      })
    ]
  }
})
//表尾求和
const sumNum = (list, field) => {
  let count = 0
  list.forEach(item => {
    count += Number(item[field])
  })
  return count.toFixed(2)
}
const  xGrid = ref();
const gridEvents = {
  toolbarButtonClick({ code }) {
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/ReworkRecord.vue
@@ -250,10 +250,10 @@
              orderDetail:selectRecords
            })
            request.post("/FinishedGoodsInventory/updateFinishedGoodsInventoryCounterexamination",flowData.value).then((res) => {
            request.post("/FinishedGoodsInventory/updateFinishedGoodsInventoryCounterExamination",flowData.value).then((res) => {
              if(res.code==200){
                ElMessage.success("反审成功")
                location.reload();
                router.push({path:'/main/productStock/ReworkRecord',query:{random:Math.random()}})
              }else{
                ElMessage.warning(res.msg)
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/TakeOutRecord.vue
@@ -211,6 +211,10 @@
      {
        'name': '反审',status: 'primary',
        'code':'rework'
      },
      {
        'name': '作废',status: 'primary',
        'code':'cancel'
      }],
    /*import: false,
   export: true,
@@ -256,7 +260,7 @@
            request.post("/FinishedGoodsInventory/updateFinishedGoodsInventoryToExamine",flowData.value).then((res) => {
              if(res.code==200){
                ElMessage.success("审核成功")
                location.reload();
                router.push({path:'/main/productStock/TakeOutRecord',query:{random:Math.random()}})
              }else{
                ElMessage.warning(res.msg)
@@ -271,6 +275,34 @@
          router.push({path: '/main/productStock/ReworkRecord'});
          return
        }
        case 'cancel': {
          const $table = xGrid.value
          //gridOptions.columns.unshift(a)
          if ($table) {
            const selectRecords = $table.getCheckboxRecords()
            let flowData = ref({
              userId:userid,
              userName:username,
              orderDetail:selectRecords
            })
            console.log(flowData)
            request.post("/FinishedGoodsInventory/cancelFinishedGoodsInventoryToExamine",flowData.value).then((res) => {
              if(res.code==200){
                ElMessage.success("作废成功")
                router.push({path:'/main/productStock/TakeOutRecord',query:{random:Math.random()}})
              }else{
                ElMessage.warning(res.msg)
                router.push("/login")
              }
            })
          }
          return;
        }
      }
north-glass-erp/northglass-erp/src/views/mm/mainProductStock/TransferRecord.vue
@@ -247,7 +247,7 @@
            request.post("/FinishedGoodsInventory/updateFinishedGoodsInventoryCounterExamination",flowData.value).then((res) => {
              if(res.code==200){
                ElMessage.success("反审成功")
                location.reload();
                router.push({path:'/main/productStock/TransferRecord',query:{random:Math.random()}})
              }else{
                ElMessage.warning(res.msg)
north-glass-erp/northglass-erp/src/views/pp/Replenish/AddReplenish.vue
@@ -29,7 +29,7 @@
request.post(`/Replenish/getSelectReplenish/${pageNum}/100`,filterData.value).then((res) => {
  if(res.code==200){
    console.log(res.data)
    produceList = deepClone(res.data)
    xGrid.value.loadData(produceList)
    gridOptions.loading=false
@@ -56,7 +56,7 @@
  keepSource: true,//保持源数据
  align: 'center',//文字居中
  stripe:true,//斑马纹
  rowConfig: {isCurrent: true, isHover: true,height: 50},//鼠标移动或选择高亮
  rowConfig: {isCurrent: true, isHover: true,height: 30},//鼠标移动或选择高亮
  id: 'CustomerList',
  showFooter: true,//显示脚
  printConfig: {},
@@ -102,7 +102,7 @@
    {field: 'patchReason', width: 120, title: '次破原因', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'responsibleEquipment', width: 120, title: '责任设备', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged},
    {field: 'responsibleTeam', width: 120, title: '责任班组', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged},
    {field: 'qualityInsPector', width: 100, title: '质检员', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}
    {field: 'qualityInspector', width: 100, title: '质检员', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}
  ],//表头按钮
  toolbarConfig: {
@@ -117,11 +117,11 @@
  },
  //脚部求和
  footerMethod ({ columns, data }) {//页脚函数
    let footList=['流程卡数量','面积','次破数量']
    let footList=['patchNum']
    return[
      columns.map((column, columnIndex) => {
        if (columnIndex === 0) {
          return '合计:'
          return '合计'
        }
        if (footList.includes(column.field)) {
          return sumNum(data, column.field)
@@ -159,7 +159,7 @@
          request.post("/Replenish/saveReplenish", flowData.value).then((res) => {
            if(res.code==200){
              ElMessage.success("补片单提交成功")
              location.reload();
              router.push({path:'/main/Replenish/AddReplenish',query:{random:Math.random()}})
            }else{
              ElMessage.warning(res.msg)
              router.push("/login")
north-glass-erp/northglass-erp/src/views/pp/Replenish/Replenish.vue
@@ -4,11 +4,12 @@
import request from "@/utils/request";
import deepClone from "@/utils/deepClone";
import {ElMessage} from "element-plus";
import {useRouter} from "vue-router";
import  GlassType from '@/components/basic/product/GlassType.vue'
import {useRouter,useRoute,onBeforeRouteUpdate} from "vue-router";
const router = useRouter()
const route = useRoute()
let indexFlag=$ref(1)
function changeRouter(index){
  indexFlag=index
@@ -27,7 +28,7 @@
    </div>
    <div id="main-body">
      <router-view  />
      <router-view  :key="route.fullPath" />
    </div>
  </div>
</template>
north-glass-erp/northglass-erp/src/views/pp/Replenish/SelectReplenish.vue
@@ -85,7 +85,7 @@
  keepSource: true,//保持源数据
  align: 'center',//文字居中
  stripe:true,//斑马纹
  rowConfig: {isCurrent: true, isHover: true,height: 50},//鼠标移动或选择高亮
  rowConfig: {isCurrent: true, isHover: true,height: 30},//鼠标移动或选择高亮
  id: 'CustomerList',
  showFooter: true,//显示脚
  printConfig: {},
@@ -154,7 +154,7 @@
  },
  //脚部求和
  footerMethod ({ columns, data }) {//页脚函数
    let footList=['processCardNumber','numberBroken']
    let footList=['patch_num','patch_area']
    return[
      columns.map((column, columnIndex) => {
        if (columnIndex === 0) {
@@ -179,7 +179,10 @@
          const $table = xGrid.value
          if ($table) {
            const selectRecords = $table.getCheckboxRecords()
            if (selectRecords.length === 0) {
              ElMessage.warning("未选中数据")
              return
            }
            let flowData = ref({
              userId:userid,
@@ -190,7 +193,7 @@
            request.post("/Replenish/updateReplenish",flowData.value).then((res) => {
              if(res.code==200){
                ElMessage.success("审核成功")
                location.reload();
                router.push({path:'/main/Replenish/SelectReplenish',query:{random:Math.random()}})
              }else{
                ElMessage.warning(res.msg)
north-glass-erp/northglass-erp/src/views/pp/processCard/AddProcessCard.vue
@@ -43,13 +43,14 @@
}
let flag = $ref(true)
function intoCreateProduct(){
  if(flag){
function intoCreateProduct() {
  if (flag) {
    router.push(`/main/processCard/SplittingDetails?orderId=${orderId}`)
  }else {
  } else {
    router.push('/main/processCard/SplittingDetails?orderId=${orderId}')
  }
  flag=!flag
  flag = !flag
}
//定义时间
@@ -91,6 +92,8 @@
let orderId = route.query.orderId
let productionId = route.query.productionId
//第一次加载数据
request.post(`/processCard/selectNoCard/${orderId}/${productionId}`, filterData.value).then((res) => {
@@ -116,7 +119,6 @@
}
/*后端返回结果多层嵌套展示*/
const hasDecimal = (value) => {
  const regex = /\./; // 定义正则表达式,查找小数点
@@ -125,7 +127,7 @@
//筛选方法
const filterChanged = ({ option, row, column }) => {
const filterChanged = ({option, row, column}) => {
  if (option.data) {
    return row[column.field].toString().toLowerCase().indexOf(option.data) > -1
  }
@@ -153,7 +155,7 @@
    useKey: true
  },
  filterConfig: {   //筛选配置项
    //remote: true
                    //remote: true
  },
  customConfig: {
    storage: true
@@ -165,14 +167,43 @@
  },//表头参数
  columns: [
    {type: 'checkbox', fixed: "left", title: '选择'},
    {field: 'orderNumber', title: '订序', filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod:filterChanged},
    {field: 'shape', title: '形状', showOverflow: "ellipsis", filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod:filterChanged},
    {field: 'width', title: '宽', sortable: true, filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod:filterChanged,width:'60px'},
    {field: 'height', title: '高', sortable: true, filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod:filterChanged,width:'60px'},
    {field: 'baiscQuantity', title: '待分数量', showOverflow: "ellipsis",width:'60px'},
    {field: 'computeGrossArea', title: '待分面积',width:'60px'},
    {field: 'totalThickness', title: '总厚度',width:'80px'},
    {field: 'thickness', title: '玻璃厚度',width:'60px'},
    {
      field: 'orderNumber',
      title: '订序',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      filterMethod: filterChanged
    },
    {
      field: 'shape',
      title: '形状',
      showOverflow: "ellipsis",
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      filterMethod: filterChanged
    },
    {
      field: 'width',
      title: '宽',
      sortable: true,
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      filterMethod: filterChanged,
      width: '60px'
    },
    {
      field: 'height',
      title: '高',
      sortable: true,
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      filterMethod: filterChanged,
      width: '60px'
    },
    {field: 'baiscQuantity', title: '待分数量', showOverflow: "ellipsis", width: '60px'},
    {field: 'computeGrossArea', title: '待分面积', width: '60px'},
    {field: 'totalThickness', title: '总厚度', width: '80px'},
    {field: 'thickness', title: '玻璃厚度', width: '60px'},
    {field: 'weight', title: '重量'}
  ],//表头按钮
@@ -189,7 +220,7 @@
  data: [],//table body实际数据
  //脚部求和
  footerMethod({columns, data}) {//页脚函数
    let footList = ['baiscQuantity', 'computeGrossArea', 'totalThickness','thickness', 'weight']
    let footList = ['', '', '', '', '']
    return [
      columns.map((column, columnIndex) => {
        if (columnIndex === 0) {
@@ -204,7 +235,6 @@
  }
})
//左侧子组件接收参数
const xGridLeft = ref()
@@ -226,7 +256,7 @@
    useKey: true
  },
  filterConfig: {   //筛选配置项
    //remote: true
                    //remote: true
  },
  customConfig: {
    storage: true
@@ -238,17 +268,30 @@
  },//表头参数
  columns: [
    {type: 'checkbox', fixed: "left", title: '选择'},
    {field: 'processId', title: '流程卡号', filters: [{data: ''}], slots: {filter: 'num1_filter'}, width: 130,filterMethod:filterChanged},
    {
      field: 'processId',
      title: '流程卡号',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      width: 130,
      filterMethod: filterChanged
    },
    {
      field: 'orderNumber',
      title: '订序',
      showOverflow: "ellipsis",
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'}
      ,filterMethod:filterChanged
      , filterMethod: filterChanged
    },
    {field: 'landingSequence', title: '落架顺序', filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod:filterChanged},
    {field: 'shape', title: '形状', filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod:filterChanged},
    {
      field: 'landingSequence',
      title: '小片顺序',
      filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      filterMethod: filterChanged
    },
    {field: 'shape', title: '形状', filters: [{data: ''}], slots: {filter: 'num1_filter'}, filterMethod: filterChanged},
    {field: 'width', title: '宽', showOverflow: "ellipsis"},
    {field: 'height', title: '高'},
    {field: 'quantity', title: '总数量'},
@@ -268,7 +311,7 @@
  data: [],//table body实际数据
  //脚部求和
  footerMethod({columns, data}) {//页脚函数
    let footList = ['总数量', '总面积', '分箱数']
    let footList = ['']
    return [
      columns.map((column, columnIndex) => {
        if (columnIndex === 0) {
@@ -287,6 +330,7 @@
const createProcessCard = () => {
  const $grid = xGrid.value
  const checkedList = $grid.getCheckboxRecords()
  if (checkedList.length === 0) {
    ElMessage.warning("请先选择右侧数据")
    return
@@ -303,14 +347,17 @@
  checkedList.forEach((item) => {
    item.processId = processId
    item.landingSequence = index
    item.quantity=item.baiscQuantity
    item.quantity = item.baiscQuantity
  })
  checkedList.forEach((item)=>{
  checkedList.forEach((item) => {
    delete item._X_ROW_KEY
  })
  $gridLeft.insertAt(checkedList)
  $grid.remove(checkedList)
  if ($gridLeft || $grid) {
    $gridLeft.clearCheckboxRow()
    $grid.clearCheckboxRow()
  }
}
let checkedNum = ref('')
@@ -356,6 +403,9 @@
        } else {
          //右边表格没有此条数据则往右边表格插入数据
          item.baiscQuantity = checkedNum.value
          if (item.quantity === 0) {
            $gridLeft.remove(item)
          }
          $grid.insert(item)
        }
      })
@@ -374,8 +424,11 @@
        $gridLeft.remove(item)
      })
    }
    }
    $gridLeft.clearCheckboxRow()
    $grid.clearCheckboxRow()
  } catch (e) {
    ElMessage.warning(e.message)
  }
@@ -392,7 +445,7 @@
    //获取左边表格checkbox选中的数据
    const checkedListLeft = $gridLeft.getCheckboxRecords()
    //判断右边表格是否有选中的数据
    if (checkedList.length === 0) {
    if (checkedList.length * 1 === 0) {
      ElMessage.warning("请先选择右侧数据")
      return
    }
@@ -409,41 +462,100 @@
    if (/^[1-9]\d*$/.test(checkedNum.value)) {
      checkedList.forEach((item) => {
        //判断可用数量是否大于等于输入的数量,不满足则抛出异常
        if (item.baiscQuantity < checkedNum.value) throw new Error("请输入小于等于可用数量的数字");
        if (item.baiscQuantity * 1 < checkedNum.value * 1) throw new Error("请输入小于等于可用数量的数字");
        item.baiscQuantity = item.baiscQuantity - checkedNum.value
        //定义key值保持
        let key = item._X_ROW_KEY
        //左边表格数据
        let leftData = $gridLeft.getTableData().fullData
        //左边表格数据中查找当前数据下标
        let filterIndex = leftData.findIndex(item1 => item1.orderNumber === item.orderNumber)
        //如果右边表格数据中存在当前数据则数量相加
        if (filterIndex >= 0) {
          leftData[filterIndex].quantity = leftData[filterIndex].quantity * 1 + checkedNum.value * 1
        //判断右侧勾选值与左侧是否相同
        if (checkedListLeft[0].orderNumber === item.orderNumber) {
          if (item.baiscQuantity === 0) {
            $grid.remove(checkedList)
          //如果右边表格数据中存在当前数据则数量相加
          if (filterIndex >= 0) {
            leftData[filterIndex].quantity = leftData[filterIndex].quantity * 1 + checkedNum.value * 1
            if (item.baiscQuantity === 0) {
              $grid.remove(checkedList)
            }
            //delete item._X_ROW_KEY
          } else {
            item.quantity = checkedNum.value
            item.processId = checkedListLeft[0].processId
            item.landingSequence = checkedListLeft[0].landingSequence
            delete item._X_ROW_KEY
            $gridLeft.insert(item)
            item._X_ROW_KEY = key
          }
        } else {
          // if (){
          //
          // }
          //如果勾选两个值不同则插入同流程卡
          item.quantity = checkedNum.value
          item.processId = checkedListLeft[0].processId
          item.landingSequence = checkedListLeft[0].landingSequence
          delete item._X_ROW_KEY
          $gridLeft.insert(item)
          if (item.baiscQuantity === 0) {
            $grid.remove(checkedList)
          }
          for (let i = 0; i < leftData.length; i++) {
            if (leftData[i].orderNumber === item.orderNumber && leftData[i].processId === item.processId) {
              leftData[i].quantity = leftData[i].quantity * 1 + checkedNum.value * 1
              break
            } else if (leftData[i].orderNumber === item.orderNumber && leftData[i].processId !== item.processId) {
              delete item._X_ROW_KEY
              $gridLeft.insert(item)
              item._X_ROW_KEY = key
              break
            }
            else if (leftData[i].orderNumber !== item.orderNumber && leftData[i].processId !== item.processId) {
              delete item._X_ROW_KEY
              $gridLeft.insert(item)
              item._X_ROW_KEY = key
              break
            }
          }
          // leftData.forEach((items) => {
          //   console.log(items.processId, item.processId,"——————",items.orderNumber, item.orderNumber)
          //   if (items.orderNumber === item.orderNumber && items.processId===item.processId) {
          //     console.log("测试333")
          //
          //   }
          //   else{
          //
          //   }
          //
          // })
        }
      })
    } else if (checkedNum.value === '') {//判断数量输入框有无输入数字
    } else if (checkedNum.value === '') {//判断数量输入框无输入数字
      checkedList.forEach((item) => {
        item.processId = checkedListLeft[0].processId
        item.landingSequence = checkedListLeft[0].landingSequence
        item.quantity = checkedListLeft[0].baiscQuantity
        delete item._X_ROW_KEY
      })
      $gridLeft.insertAt(checkedList)
      $grid.remove(checkedList)
    }
    if ($gridLeft || $grid) {
      $gridLeft.clearCheckboxRow()
      $grid.clearCheckboxRow()
    }
  } catch (e) {
    ElMessage.warning(e.message)
  }
}
//保存流程卡数据
const gridEvents = {
@@ -457,25 +569,28 @@
          if ($table) {
            const selectRecords = $table.getCheckboxRecords()
            const selectRight = $tableRight.getCheckboxRecords()
            if (selectRecords.length === 0){
            if (selectRecords.length === 0) {
              ElMessage.warning("请先选择保存的数据")
              return
            }
            if (selectRight.length > 0){
            if (selectRight.length > 0) {
              ElMessage.warning("请先将右侧数据全部建立流程卡后保存")
              return;
            }
            let flowCardData = ref({
              flowCard: selectRecords,
              userName:username,
              productionId:productionId
              userName: username,
              productionId: productionId
            })
            request.post("/processCard/addFlowCard", flowCardData.value).then((res) => {
              if (res.code == 200) {
                ElMessage.success("保存成功")
                //router.push('/main/processCard/SplittingDetails?orderId=${orderId}')
                  router.push({path: '/main/processCard/AddProcessCard', query: {orderId: orderId,productionId:productionId,random:Math.random()}})
                router.push({
                  path: '/main/processCard/AddProcessCard',
                  query: {orderId: orderId, productionId: productionId, random: Math.random()}
                })
                //location.reload();
              } else {
@@ -502,26 +617,26 @@
      <div class="header" style="height: 5%;width: 100%">
        <el-button
            style="float: left"
            @click="intoCreateProduct"
            id="searchButton1"
            type="primary"
            :icon="ArrowLeftBold"
            round>
            round
            style="float: left"
            type="primary"
            @click="intoCreateProduct">
          {{ flag ? '返回' : '返回' }}
        </el-button>
        <!--      <el-button  type="primary">保存分架</el-button>-->
<!--              <el-button type="primary" :hidden="true">分架汇总</el-button>-->
        <!--              <el-button type="primary" :hidden="true">分架汇总</el-button>-->
        <div style="width: 100px;">
        </div>
      </div>
      <el-container style="height: 100%;width: 100%">
        <el-aside style="width: 44%;height: 100%" >
        <el-aside style="width: 44%;height: 100%">
          <vxe-grid
              max-height="100%"
              class="mytable-scrollbar"
              ref="xGridLeft"
              class="mytable-scrollbar"
              max-height="100%"
              v-bind="gridLeftOptions"
              v-on="gridEvents"
          >
@@ -540,15 +655,15 @@
            </template>
            <!--左边固定显示的插槽-->
            <template #button_slot="{ row }">
              <el-button @click="getTableRow(row,'edit')" link type="primary" size="small">打印</el-button>
              <el-button @click="getTableRow(row,'setType')" link type="primary" size="small">排版</el-button>
              <el-button @click="getTableRow(row,'delete')" link type="primary" size="small">删除</el-button>
              <el-button link size="small" type="primary" @click="getTableRow(row,'edit')">打印</el-button>
              <el-button link size="small" type="primary" @click="getTableRow(row,'setType')">排版</el-button>
              <el-button link size="small" type="primary" @click="getTableRow(row,'delete')">删除</el-button>
            </template>
            <template #num1_filter="{ column, $panel }">
              <div>
                <div v-for="(option, index) in column.filters" :key="index">
                  <input type="text"
                         v-model="option.data"
                  <input v-model="option.data"
                         type="text"
                         @input="changeFilterEvent($event, option, $panel)"/>
                </div>
              </div>
@@ -560,55 +675,55 @@
        </el-aside>
        <div width="12%">
          <el-main  style="">
            <span>选中数量:<el-input type="number" v-model="checkedNum"></el-input></span><br>
          <el-main style="">
            <span>选中数量:<el-input v-model="checkedNum" clearable type="number"></el-input></span><br>
            <el-button type="primary" @click="addRight"> →</el-button>
            <br>
            <br>
            <el-button type="primary" @click="addLeft"> ←</el-button>
            <br>
            <br>
            <el-button @click="createProcessCard" type="primary">建立流程卡</el-button>
            <el-button type="primary" @click="createProcessCard">建立流程卡</el-button>
          </el-main>
        </div>
<!--        右侧-->
        <!--        右侧-->
        <div style="height: 100%;width: 100%">
        <el-aside style="width: 100%;height: 100%">
          <vxe-grid
          <el-aside style="width: 100%;height: 100%">
            <vxe-grid
              max-height="100%"
              class="mytable-scrollbar"
              ref="xGrid"
              v-bind="gridOptions"
          >
            <!--      @toolbar-button-click="toolbarButtonClickEvent"-->
            <!--      下拉显示所有信息插槽-->
            <template #content="{ row }">
              <ul class="expand-wrapper">
                <li v-for="(item,index) in gridOptions.columns" v-show="item.field!=undefined ">
                  <span style="font-weight: bold">{{ item.title + ':  ' }}</span>
                  <span v-if="hasDecimal(item.field)">{{
                      row[item.field.split('.')[0]][item.field.split('.')[1]]
                    }}</span>
                  <span v-else>{{ row[item.field] }}</span>
                </li>
              </ul>
            </template>
                ref="xGrid"
                class="mytable-scrollbar"
                max-height="100%"
                v-bind="gridOptions"
            >
              <!--      @toolbar-button-click="toolbarButtonClickEvent"-->
              <!--      下拉显示所有信息插槽-->
              <template #content="{ row }">
                <ul class="expand-wrapper">
                  <li v-for="(item,index) in gridOptions.columns" v-show="item.field!=undefined ">
                    <span style="font-weight: bold">{{ item.title + ':  ' }}</span>
                    <span v-if="hasDecimal(item.field)">{{
                        row[item.field.split('.')[0]][item.field.split('.')[1]]
                      }}</span>
                    <span v-else>{{ row[item.field] }}</span>
                  </li>
                </ul>
              </template>
            <template #num1_filter="{ column, $panel }">
              <div>
                <div v-for="(option, index) in column.filters" :key="index">
                  <input type="text"
                         v-model="option.data"
                         @input="changeFilterEvent($event, option, $panel)"/>
              <template #num1_filter="{ column, $panel }">
                <div>
                  <div v-for="(option, index) in column.filters" :key="index">
                    <input v-model="option.data"
                           type="text"
                           @input="changeFilterEvent($event, option, $panel)"/>
                  </div>
                </div>
              </div>
            </template>
          </vxe-grid>
        </el-aside>
              </template>
            </vxe-grid>
          </el-aside>
        </div>
      </el-container>
    </div>
@@ -620,7 +735,7 @@
  height: 100%;
}
.header{
.header {
  width: 100%;
  height: 35px;
  margin-top: -20px;
north-glass-erp/northglass-erp/src/views/pp/processCard/ProductionScheduling.vue
@@ -12,6 +12,7 @@
import BasicTable from '@/components/basic/BasicTable.vue'
import {VXETable} from "vxe-table";
import useUserInfoStore from "@/stores/userInfo";
import {changeFilterEvent,filterChanged} from "@/hook"
let router = useRouter()
const userStore = useUserInfoStore()
@@ -33,20 +34,7 @@
//工序
const value = ref('')
const options = [
  {
    value: '切割',
    label: '切割',
  },
  {
    value: '磨边',
    label: '磨边',
  },
  {
    value: '钢化',
    label: '钢化',
  },
]
//排产状态
const stateValue = ref('1')
@@ -69,6 +57,11 @@
const form = reactive({
  date1: '',
  orderId: ''
})
//定义接收加载表头下拉数据
const titleSelectJson = ref({
  processType: [],
})
@@ -137,8 +130,10 @@
  if (res.code == 200) {
    pageTotal.value = res.data.total
    produceList = produceList.value.concat(deepClone(res.data.data))
    titleSelectJson.value.processType=res.data.process
    xGrid.value.reloadData(produceList)
    gridOptions.loading = false
    console.log(res.data)
    //禁用删除、保存按钮
    gridOptions.toolbarConfig.buttons[0].disabled = true
    gridOptions.toolbarConfig.buttons[1].disabled = true
@@ -177,7 +172,8 @@
        ElMessage.warning(res.msg)
      }
    })
  } else if (inputVal != null && selectState == 1) {
  } else
    if (inputVal != null && selectState == 1) {
    //根据工序查询未排产数据
    request.post(`/productionScheduling/selectScheduling/${startTime}/${endTime}/${inputVal}/${selectProcesses}/${selectState}`, filterData.value).then((res) => {
@@ -253,7 +249,7 @@
    useKey: true
  },
  filterConfig: {   //筛选配置项
    remote: true
    // remote: true
  },
  customConfig: {
    storage: true
@@ -280,13 +276,13 @@
      title: '计划结束时间'
    },
    // {field: '排产编号', title: '排产编号',  width: 120 },
    {field: 'order_id', title: '销售单号', filters: [{data: ''}], slots: {filter: 'num1_filter'}, width: 100},
    {field: 'customer_name', title: '客户名称', width: 110, filters: [{data: ''}], slots: {filter: 'num1_filter'}},
    {field: 'project', title: '项目名称', width: 100, filters: [{data: ''}], slots: {filter: 'num1_filter'}},
    {field: 'order_number', title: '序号', filters: [{data: ''}], slots: {filter: 'num1_filter'}, width: 70},
    {field: 'order_id', title: '销售单号', filters: [{data: ''}], slots: {filter: 'num1_filter'}, width: 100,filterMethod:filterChanged},
    {field: 'customer_name', title: '客户名称', width: 110, filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod:filterChanged},
    {field: 'project', title: '项目名称', width: 100, filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod:filterChanged},
    {field: 'order_number', title: '序号', filters: [{data: ''}], slots: {filter: 'num1_filter'}, width: 70,filterMethod:filterChanged},
    {field: 'width', title: '宽', width: 60},
    {field: 'height', title: '高', width: 60},
    {field: 'width', title: '宽', width: 60,filters: [{data: ''}],slots: {filter: 'num1_filter'},filterMethod:filterChanged},
    {field: 'height', title: '高', width: 60,filters: [{data: ''}],slots: {filter: 'num1_filter'},filterMethod:filterChanged},
    {field: 'quantity', title: '订单数量', width: 70},
    {field: 'area', title: '订单面积', width: 90},
    {
@@ -487,12 +483,12 @@
        &nbsp;&nbsp;
        <el-input v-model="form.orderId" placeholder="销售单号" clearable style="width: 110px"></el-input>
        &nbsp;
        <el-select v-model="value" class="m-2" placeholder="工序" clearable style="width: 90px;">
        <el-select v-model="value" clearable placeholder="请选择工序" style="width: 120px">
          <el-option
              v-for="item in options"
              :key="item.value"
              :label="item.label"
              :value="item.value"
              v-for="item in titleSelectJson['processType']"
              :key="item.id"
              :label="item.basic_name"
              :value="item.basic_name"
          />
        </el-select>
        &nbsp;
north-glass-erp/northglass-erp/src/views/pp/processCard/SelectProcessCard.vue
@@ -14,32 +14,55 @@
let productGlassTypeStore = useProductGlassTypeStore()
let router = useRouter()
let props = defineProps({
  rowIndex:{}
})
const getTableRow = (row, type) => {
  let startTime = form.date1[0]
  let endTime = form.date1[1]
  switch (type) {
    case 'edit' : {
      router.push({path: '/main/processCard/PrintFlowCard', query: {id: row.id}})
      // console.log(row)
      // router.push({path: '/main/processCard/PrintFlowCard', query: {id: row.id}})
      break
    }
    case 'setType': {
      request.post(`/processCard/updateLayoutStatus/${row.processId}`).then((res) => {
        if (res.code == 200) {
          ElMessage.success("排版成功")
          location.reload();
        } else {
      let state=row.layoutStatus
          ElMessage.warning(res.msg)
        }
      })
      if (state=='可排版'){
        request.post(`/processCard/updateLayoutStatus/${row.processId}/2`).then((res) => {
          if (res.code == 200) {
            ElMessage.success("排版成功")
            router.push({path: '/main/processCard/SelectProcessCard', query: {random:Math.random()}})
          } else {
            ElMessage.warning(res.msg)
          }
        })
      }
      else if(state=='不可排版'){
        request.post(`/processCard/updateLayoutStatus/${row.processId}/1`).then((res) => {
          if (res.code == 200) {
            ElMessage.success("修改成功")
            router.push({path: '/main/processCard/SelectProcessCard', query: {random:Math.random()}})
          } else {
            ElMessage.warning(res.msg)
          }
        })
      }
      break
    }
    case 'delete': {
      request.post(`/processCard/deleteFlowCard/${row.orderId}/${row.processId}`).then((res) => {
        if (res.code == 200) {
          ElMessage.success("删除成功")
          location.reload();
          router.push({path: '/main/processCard/SelectProcessCard', query: {random:Math.random()}})
        } else {
          ElMessage.warning(res.msg)
          router.push("/login")
        }
      })
      break
@@ -98,7 +121,7 @@
//定义数据返回结果
let produceList = ref([])
//定义当前页数
let pageNum = $ref(1)
let pageNum=ref(1)
let pageState = null
//获取七天前到当前时间
@@ -140,6 +163,21 @@
  }
})
//页脚翻页查询
const selectPageList = ()=>{
  let startTime = form.date1[0]
  let endTime = form.date1[1]
  request.post(`/processCard/flowCard/${pageNum.value}/${total.pageSize}/${startTime}/${endTime}`,filterData.value).then((res) => {
    if(res.code==200){
      produceList = deepClone(res.data.data)
      xGrid.value.reloadData(produceList)
    }else{
      ElMessage.warning(res.msg)
    }
  })
}
//点击查询
const getWorkOrder = () => {
@@ -161,7 +199,7 @@
const handlePageChange = ({ currentPage, pageSize }) => {
  pageNum.value=currentPage
  total.pageTotal    = pageSize
  selectOrderList()
  selectPageList()
}
/*使用筛选,后端获取数据*/
@@ -185,14 +223,15 @@
    filterData.value[column.property] = value
  }
//获取选中时间和是否转单状态
//获取选中时间
  let startTime = form.date1[0]
  let endTime = form.date1[1]
  request.post(`/processCard/flowCard/${startTime}/${endTime}`, filterData.value).then((res) => {
  request.post(`/processCard/flowCard/1/${total.pageSize}/${startTime}/${endTime}`, filterData.value).then((res) => {
    if(res.code==200){
      pageTotal.value=res.data.total
      total.pageTotal=parseInt(res.data.total)
      pageNum.value=1
      produceList = deepClone(res.data.data)
      xGrid.value.loadData(produceList)
      gridOptions.loading=false
@@ -240,17 +279,18 @@
  },//表头参数
  columns:[
    {type:'expand',fixed:"left",slots: { content:'content' },width: 50},
    {title: '操作', width: 140, slots: { default: 'button_slot' },fixed:"left"},
    {title: '操作', width: 160, slots: { default: 'button_slot' },fixed:"left"},
    { type: 'seq',fixed:"left", title: '自序', width: 50 },
    {field: 'orderId', title: '销售单号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, },
    {field: 'orderId', title: '销售单号',filters:[{ data: '' }],slots: { filter: 'num1_filter' },width: 80 },
    {field: 'processId', width: 130, title: '流程卡号' ,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'orderDetail.productId', title: '产品编号' ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
    {field: 'orderDetail.productName', title: '产品名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, },
    {field: 'orderDetail.productId', title: '产品编号' ,filters:[{ data: '' }],slots: { filter: 'num1_filter' },},
    {field: 'orderDetail.productName', title: '产品名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, width: 180},
    {field: 'order.project', title: '项目名称' ,showOverflow:"ellipsis"},
    {field: 'binningQuantity', title: '数量', },
    {field: 'quantity', title: '数量', },
    {field: 'orderDetail.computeGrossArea', title: '面积', },
    {field: 'founder', title: '分架员', },
    {field: 'orderDetail.processingNote', title: '加工要求', }
    {field: 'orderDetail.processingNote', title: '加工要求', },
    {field: 'layoutStatus', title: '排版状态', }
  ],//表头按钮
  toolbarConfig: {
@@ -332,9 +372,12 @@
      </template>
      <!--左边固定显示的插槽-->
      <template #button_slot="{ row }">
      <template #button_slot="{ row }" >
        <el-button @click="getTableRow(row,'edit')" link type="primary" size="small">打印</el-button>
        <el-button @click="getTableRow(row,'setType')" link type="primary" size="small">排版</el-button>
        <el-button v-if="row.layoutStatus=='可排版'" @click="getTableRow(row,'setType')" link type="primary" size="small">排版</el-button>
        <el-button v-else-if="row.layoutStatus=='不可排版'" @click="getTableRow(row,'setType')" link type="primary" size="small">可排版</el-button>
        <el-button v-else-if="row.layoutStatus=='已排版'" disabled @click="getTableRow(row,'setType')" link type="primary" size="small">排版</el-button>
        <el-button @click="getTableRow(row,'delete')" link type="primary" size="small">删除</el-button>
      </template>
north-glass-erp/northglass-erp/src/views/pp/processCard/SplittingDetails.vue
@@ -71,6 +71,7 @@
request.post(`/processCard/detailsSelect/${id}`, filterData.value).then((res) => {
  if (res.code == 200) {
    console.log(res.data)
    pageTotal.value = res.data.total
    produceList = produceList.value.concat(deepClone(res.data.data))
    xGrid.value.reloadData(produceList)
north-glass-erp/northglass-erp/src/views/pp/rework/AddRework.vue
@@ -65,7 +65,7 @@
  keepSource: true,//保持源数据
  align: 'center',//文字居中
  stripe: true,//斑马纹
  rowConfig: {isCurrent: true, isHover: true, height: 50},//鼠标移动或选择高亮
  rowConfig: {isCurrent: true, isHover: true, height: 30},//鼠标移动或选择高亮
  id: 'CustomerList',
  showFooter: true,//显示脚
  printConfig: {},
@@ -121,7 +121,7 @@
    {field: 'responsibleEquipment', width: 120, title: '责任设备', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged},
    {field: 'responsibleTeam', width: 120, title: '责任班组', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged},
    {field: 'area', width: 120, title: '返工面积', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged},
    {field: 'qualityInsPector', width: 100, title: '质检员', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}
    {field: 'qualityInspector', width: 100, title: '质检员', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}
  ],//表头按钮
  toolbarConfig: {
@@ -136,7 +136,7 @@
  },
  //脚部求和
  footerMethod({columns, data}) {//页脚函数
    let footList = ['total', 'TotalArea']
    let footList = ['reworkNum', 'breakageQuantity']
    return [
      columns.map((column, columnIndex) => {
        if (columnIndex === 0) {
@@ -178,7 +178,7 @@
          request.post("/rework/saveRework", flowData.value).then((res) => {
            if(res.code==200){
              ElMessage.success("返工单提交成功")
              location.reload();
              router.push({path:'/main/rework/AddRework',query:{random:Math.random()}})
            }else{
              ElMessage.warning(res.msg)
              router.push("/login")
north-glass-erp/northglass-erp/src/views/pp/rework/Rework.vue
@@ -4,10 +4,11 @@
import request from "@/utils/request";
import deepClone from "@/utils/deepClone";
import {ElMessage} from "element-plus";
import {useRouter} from "vue-router";
import  GlassType from '@/components/basic/product/GlassType.vue'
import {useRouter,useRoute,onBeforeRouteUpdate} from "vue-router";
const router = useRouter()
const route = useRoute()
let indexFlag=$ref(1)
function changeRouter(index){
  indexFlag=index
@@ -25,7 +26,7 @@
    </div>
    <div id="main-body">
      <router-view  />
      <router-view  :key="route.fullPath" />
    </div>
  </div>
</template>
north-glass-erp/northglass-erp/src/views/pp/rework/SelectRework.vue
@@ -64,6 +64,7 @@
request.post(`/rework/SelectRework/1/${total.pageSize}/${selectDate.value}`,filterData.value).then((res) => {
  if(res.code==200){
    console.log(res.data.data)
    total.dataTotal = res.data.total.total*1
    total.pageTotal= res.data.total.pageTotal
@@ -95,7 +96,7 @@
  keepSource: true,//保持源数据
  align: 'center',//文字居中
  stripe: true,//斑马纹
  rowConfig: {isCurrent: true, isHover: true, height: 50},//鼠标移动或选择高亮
  rowConfig: {isCurrent: true, isHover: true, height: 30},//鼠标移动或选择高亮
  id: 'CustomerList',
  showFooter: true,//显示脚
  printConfig: {},
@@ -160,17 +161,17 @@
    zoom: true,
    custom: true
  },
  data: null,//table body实际数据
  //脚部求和
  footerMethod ({ columns, data }) {//页脚函数
    let footList = ['rework_num','rework_area']
    return[
      columns.map((column, columnIndex) => {
        if (columnIndex === 0) {
          return `合计`
        }
        // if (props.tableProp.footList.includes(column.field)) {
        //   return sumNum(data, column.field)
        // }
        if (footList.includes(column.field)) {
          return sumNum(data, column.field)
        }
        return ''
      })
    ]
@@ -188,7 +189,10 @@
          //gridOptions.columns.unshift(a)
          if ($table) {
            const selectRecords = $table.getCheckboxRecords()
            if (selectRecords.length === 0) {
              ElMessage.warning("未选中数据")
              return
            }
            let flowData = ref({
              userId:userid,
@@ -199,7 +203,7 @@
            request.post("/rework/updateRework",flowData.value).then((res) => {
              if(res.code==200){
                ElMessage.success("审核成功")
                location.reload();
                router.push({path:'/main/rework/SelectRework',query:{random:Math.random()}})
              }else{
                ElMessage.warning(res.msg)
north-glass-erp/northglass-erp/src/views/pp/workOrder/SelectWorkOrder.vue
@@ -14,6 +14,8 @@
let productGlassTypeStore = useProductGlassTypeStore()
let router = useRouter()
let isButtonDisabled=false
const getTableRow = (row, type) => {
  switch (type) {
    case 'edit' : {
@@ -106,7 +108,7 @@
//获取七天前到当前时间
function getNowTime() {
  const start = new Date(new Date().getTime() - 3600 * 1000 * 24 * 7)
  const start = new Date(new Date().getTime() - 3600 * 1000 * 24 * 3)
      .toISOString()
      .replace('T', ' ')
      .slice(0, 10) //默认开始时间7天前
@@ -139,14 +141,14 @@
})
//点击查询
const getWorkOrder = () => {
const getWorkOrder = (isButtonDisabled) => {
  let startTime = form.date1[0]
  let endTime = form.date1[1]
  let selectState = optionVal.value
  request.post(`/workOrder/orderGlassDetail/${startTime}/${endTime}/${selectState}`, filterData.value).then((res) => {
    if (res.code == 200) {
      //isButtonDisabled=false
      pageTotal.value = res.data.total
      xGrid.value.loadData(res.data.data)
      gridOptions.loading = false
@@ -314,7 +316,8 @@
        </el-select>
        &nbsp;&nbsp;
        <el-button
            @click="getWorkOrder"
            @click="getWorkOrder(isButtonDisabled)"
            :disabled="isButtonDisabled"
            id="select"
            type="primary" :icon="Search">查询
        </el-button>
north-glass-erp/northglass-erp/src/views/pp/workOrder/WorkOrder.vue
@@ -4,9 +4,10 @@
import request from "@/utils/request";
import deepClone from "@/utils/deepClone";
import {ElMessage} from "element-plus";
import {useRouter} from "vue-router";
import {useRoute, useRouter} from "vue-router";
import  GlassType from '@/components/basic/product/GlassType.vue'
const router = useRouter()
const route = useRoute()
let indexFlag=$ref(1)
function changeRouter(index){
  indexFlag=index
@@ -22,7 +23,7 @@
      </el-breadcrumb>
    </div>
    <div id="main-body">
      <router-view  />
      <router-view  :key="route.fullPath" />
    </div>
  </div>
</template>
north-glass-erp/northglass-erp/src/views/sd/delivery/CreateDelivery.vue
@@ -426,10 +426,11 @@
            deliveryId: route.query.deliveryID
          })
          console.log(flowData)
           request.post("/Delivery/insertDelivery", flowData.value).then((res) => {
             if(res.code==200){
               ElMessage.success("发货单提交成功")
               router.push({path: '/main/delivery/selectDelivery', query: { id: 1 }})
               router.push({path: '/main/delivery/selectDelivery', query:{random:Math.random()}})
             }else{
               ElMessage.warning(res.msg)
               router.push("/login")
@@ -446,7 +447,7 @@
          request.post("/Delivery/updateDeliveryToExamine", flowData.value).then((res) => {
            if (res.code == 200) {
              ElMessage.success("审核成功")
              router.push({path: '/main/delivery/selectDelivery', query: {id: 1}})
              router.push({path: '/main/delivery/selectDelivery', query:{random:Math.random()}})
            } else {
              ElMessage.warning(res.msg)
              router.push("/login")
@@ -463,7 +464,7 @@
          request.post("/Delivery/updateDeliveryToExamine", flowData.value).then((res) => {
            if (res.code == 200) {
              ElMessage.success("反审成功")
              router.push({path: '/main/delivery/selectDelivery', query: {id: 1}})
              router.push({path: '/main/delivery/selectDelivery', query:{random:Math.random()}})
            } else {
              ElMessage.warning(res.msg)
              router.push("/login")
north-glass-erp/northglass-erp/src/views/sd/delivery/Delivery.vue
@@ -1,6 +1,11 @@
<script setup>
import {ArrowLeftBold, ArrowRight, Search} from "@element-plus/icons-vue"
import {useRouter} from "vue-router";
import {useRouter,useRoute,onBeforeRouteUpdate} from "vue-router";
const router = useRouter()
const route = useRoute()
let indexFlag=$ref(1)
function changeRouter(index){
  indexFlag=index
@@ -19,7 +24,7 @@
    </div>
    <div id="main-body">
      <router-view  />
      <router-view  :key="route.fullPath" />
    </div>
  </div>
</template>
north-glass-erp/src/main/java/com/example/erp/controller/mm/FinishedGoodsInventoryController.java
@@ -162,4 +162,18 @@
        }
    }
    /*订单作废*/
    @ApiOperation("订单作废接口")
    @PostMapping("/cancelFinishedGoodsInventoryToExamine")
    public Result cancelFinishedGoodsInventoryToExamine( @RequestBody Map<String,Object>  object){
        if(finishedGoodsInventoryService.cancelFinishedGoodsInventoryToExamine(object)){
            return Result.seccess();
        }else {
            throw new ServiceException(Constants.Code_500,"领出失败");
        }
    }
}
north-glass-erp/src/main/java/com/example/erp/controller/pp/ProcessCardController.java
@@ -69,18 +69,19 @@
        if(flowCardService.deleteFlowCardSv(orderId,processId)){
            return Result.seccess();
        }else {
            throw new ServiceException(Constants.Code_500,"删除失败");
            throw new ServiceException(Constants.Code_500,"删除失败,请检查是否已报工");
        }
    }
    //修改排版状态
    @ApiOperation("修改排版状态接口")
    @PostMapping("/updateLayoutStatus/{processId}")
    @PostMapping("/updateLayoutStatus/{processId}/{state}")
    public Result updateLayoutStatus(
            @PathVariable String processId
            @PathVariable String processId,
            @PathVariable Integer state
    ){
        if(flowCardService.updateLayoutStatusSv(processId)){
        if(flowCardService.updateLayoutStatusSv(processId,state)){
            return Result.seccess();
        }else {
            throw new ServiceException(Constants.Code_500,"修改失败");
north-glass-erp/src/main/java/com/example/erp/controller/pp/ProductionSchedulingController.java
@@ -5,6 +5,8 @@
import com.example.erp.entity.pp.ProductionScheduling;
import com.example.erp.exception.ServiceException;
import com.example.erp.service.pp.ProductionSchedulingService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -12,12 +14,14 @@
import java.util.Map;
@RestController
@Api(value="排产controller",tags={"排产相关操作接口"})
@RequestMapping("/productionScheduling")
public class ProductionSchedulingController {
    @Autowired
    ProductionSchedulingService productionSchedulingService;
    //查询第一次排版数据
    @ApiOperation("加载时查询排版数据接口")
    @PostMapping  ("/selectLastScheduling/{selectTime1}/{selectTime2}")
    public Result selectLastScheduling(
            @PathVariable String selectTime1,
@@ -27,19 +31,21 @@
    }
    //点击查询排版数据
    @ApiOperation("点击查询排版数据接口")
    @PostMapping  ("/selectScheduling/{selectTime1}/{selectTime2}/{orderId}/{processes}/{state}")
    public Result SelectScheduling(
    public Result selectScheduling(
            @PathVariable String selectTime1,
            @PathVariable String selectTime2,
            @PathVariable String orderId,
            @PathVariable String processes,
            @PathVariable Integer state,
            @RequestBody ProductionScheduling productionScheduling){
        return Result.seccess(productionSchedulingService.SelectSchedulingSv(selectTime1,selectTime2,orderId,processes,state,productionScheduling));
        return Result.seccess(productionSchedulingService.selectSchedulingSv(selectTime1,selectTime2,orderId,processes,state,productionScheduling));
    }
    //点击查询排版数据(带订单号查询)
    @ApiOperation("根据条件查询排版数据接口")
    @PostMapping  ("/selectSchedulingNot/{selectTime1}/{selectTime2}/{orderId}/{processes}/{state}")
    public Result selectSchedulingNot(
            @PathVariable String selectTime1,
@@ -53,10 +59,11 @@
    }
    //添加排产数据
    @ApiOperation("添加排产数据接口")
    @PostMapping("/addScheduling")
    public Result AddScheduling( @RequestBody Map<String,Object>  object){
    public Result addScheduling( @RequestBody Map<String,Object>  object){
        if(productionSchedulingService.AddSchedulingSv(object)){
        if(productionSchedulingService.addSchedulingSv(object)){
            return Result.seccess();
        }else {
            throw new ServiceException(Constants.Code_500,"保存失败");
@@ -65,6 +72,7 @@
    }
    //删除排产数据
    @ApiOperation("删除排产数据接口")
    @PostMapping("/deleteScheduling")
    public Result deleteScheduling( @RequestBody Map<String,Object>  object) throws Exception{
@@ -76,10 +84,11 @@
        }
    }
    @ApiOperation("排版审核接口")
    @PostMapping("/examineScheduling")
    public Result ExamineScheduling( @RequestBody Map<String,Object>  object){
    public Result examineScheduling( @RequestBody Map<String,Object>  object){
        if(productionSchedulingService.ExamineSchedulingSv(object)){
        if(productionSchedulingService.examineSchedulingSv(object)){
            return Result.seccess();
        }else {
            throw new ServiceException(Constants.Code_500,"审核失败");
north-glass-erp/src/main/java/com/example/erp/controller/pp/ReplenishController.java
@@ -45,7 +45,7 @@
            return Result.seccess();
        }else {
            throw new ServiceException(Constants.Code_500,"返工失败");
            throw new ServiceException(Constants.Code_500,"补片失败");
        }
    }
north-glass-erp/src/main/java/com/example/erp/controller/pp/ReworkController.java
@@ -50,7 +50,7 @@
        }
    }
    @ApiOperation("审核接口")
    @ApiOperation("返工审核接口")
    @PostMapping("/updateRework")
    public Result updateRework( @RequestBody Map<String,Object> object){
        if(reworkService.updateRework(object)){
north-glass-erp/src/main/java/com/example/erp/controller/pp/WorkOrderController.java
@@ -6,6 +6,8 @@
import com.example.erp.entity.sd.OrderDetail;
import com.example.erp.exception.ServiceException;
import com.example.erp.service.pp.WorkOrderService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -13,12 +15,14 @@
import java.util.Map;
@RestController
@Api(value="工单管理controller",tags={"工单管理操作接口"})
@RequestMapping("/workOrder")
public class WorkOrderController {
    @Autowired
    WorkOrderService workOrderService;
    //查询工单
    @ApiOperation("查询工单接口")
    @PostMapping  ("/orderGlassDetail/{selectTime1}/{selectTime2}/{state}")
    public Result dateWork(
            @PathVariable Date selectTime1,
@@ -29,8 +33,8 @@
    }
    //转生产订单查询
    @ApiOperation("转生产订单查询接口")
    @PostMapping  ("/addWork/{orderId}")
    public Result addWork(
            @PathVariable String orderId,
            @RequestBody OrderDetail orderDetail){
@@ -40,6 +44,7 @@
    //添加工单
    @ApiOperation("添加工单接口")
    @PostMapping("/addOrderWork")
    public Result addOrderWork( @RequestBody Map<String,Object>  object){
@@ -52,6 +57,7 @@
    }
    //删除工单
    @ApiOperation("删除工单接口")
    @PostMapping("/deleteOrderWork/{orderId}/{productName}")
    public Result deleteOrderWork(
            @PathVariable String orderId,
north-glass-erp/src/main/java/com/example/erp/controller/userInfo/SysMenuController.java
@@ -6,6 +6,7 @@
import com.example.erp.tools.netty.MyChannelHandlerPool;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@@ -18,12 +19,13 @@
    private CacheUtil cacheUtil;
    @Autowired
    private SysMenuService sysMenuService;
    @GetMapping
    public Result getMenu(){
    @GetMapping("/getMenu/{lang}")
    public Result getMenu(@PathVariable String lang){
        System.out.println(lang);
        MyChannelHandlerPool myChannelHandlerPool = new MyChannelHandlerPool();
        //myChannelHandlerPool.sendMsg("123");
        //MyChannelHandlerPool.channelGroup.writeAndFlush( new TextWebSocketFrame("123123"));
        return Result.seccess(sysMenuService.getMenu());
        return Result.seccess(sysMenuService.getMenu(lang));
    }
}
north-glass-erp/src/main/java/com/example/erp/controller/userInfo/SysMenuItemController.java
@@ -4,16 +4,22 @@
import com.example.erp.service.userInfo.SysMenuItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/menuItem")
public class SysMenuItemController {
    @Autowired
    final
    SysMenuItemService sysMenuItemService;
    @GetMapping
    public Result getMenuItem(){
        return Result.seccess(sysMenuItemService.getMenuItem());
    public SysMenuItemController(SysMenuItemService sysMenuItemService) {
        this.sysMenuItemService = sysMenuItemService;
    }
    @GetMapping("/getMenuItem/{lang}")
    public Result getMenuItem(@PathVariable String lang){
        return Result.seccess(sysMenuItemService.getMenuItem(lang));
    }
}
north-glass-erp/src/main/java/com/example/erp/entity/pp/FlowCard.java
@@ -31,7 +31,7 @@
    //已优化数量
    private Integer optimizeQuantity;
    //排版状态
    private Integer layoutStatus;
    private String layoutStatus;
    //补片数量
    private Integer numberPatches;
    //库存数量
north-glass-erp/src/main/java/com/example/erp/entity/pp/ProductionScheduling.java
@@ -16,6 +16,8 @@
    private String orderId;
    //订单序号
    private String orderNumber;
    //小片顺序
    private String technologyNumber;
    //排产工序
    private String processes;
    //排产数量
north-glass-erp/src/main/java/com/example/erp/mapper/mm/FinishedOperateLogMapper.java
@@ -54,4 +54,6 @@
    Boolean updateToExamine(@Param("finishedOperateLog") FinishedOperateLog finishedOperateLog,
                                           @Param("userName") String userName,
                                            @Param("type") String type);
    Boolean updateFinishedOperateLogState(@Param("finishedOperateLog") FinishedOperateLog finishedOperateLog,@Param("type") String type);
}
north-glass-erp/src/main/java/com/example/erp/mapper/pp/BasicDateProduceMapper.java
@@ -14,5 +14,5 @@
    List<BasicDataProduce> SelectWorkBasicTeamsMp(String process);
    List<BasicDataProduce> SelectWorkBasicTeams();
    List<BasicDataProduce> SelectWorkBasicTeams(String process);
}
north-glass-erp/src/main/java/com/example/erp/mapper/pp/FlowCardMapper.java
@@ -32,7 +32,7 @@
    List<Map<String, String>> selectNoCardMp(String orderId, String productionId, FlowCard flowCard);
    //修改排版状态
    Boolean updateLayoutStatusMp(String processId);
    Boolean updateLayoutStatusMp(String processId,Integer state);
    Integer selectLayoutStatus(String processId);
@@ -60,4 +60,5 @@
    Integer selectLayer(String productionId, Integer orderNumber);
    Integer selectFlowCardCount(String orderId);
}
north-glass-erp/src/main/java/com/example/erp/mapper/pp/PatchLogMapper.java
@@ -1,6 +1,7 @@
package com.example.erp.mapper.pp;
import com.example.erp.entity.pp.PatchLog;
import com.example.erp.entity.pp.ReportingWork;
import com.example.erp.entity.pp.Rework;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@@ -26,7 +27,7 @@
    Boolean updateReplenish(@Param("patchLog") PatchLog patchLog ,  @Param("userName") String userName);
    Boolean updateOrderProcessDetail(@Param("patchLog") PatchLog patchLog );
    Boolean updateOrderProcessDetail(@Param("patchLog") PatchLog patchLog,@Param("reportingWork") ReportingWork reportingWork );
    List<Map<String,Object>> getSelectReplenish(@Param("offset") Integer offset, @Param("pageSize") Integer pageSiz);
north-glass-erp/src/main/java/com/example/erp/mapper/pp/ProductionSchedulingMapper.java
@@ -1,7 +1,9 @@
package com.example.erp.mapper.pp;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.erp.entity.pp.BasicDataProduce;
import com.example.erp.entity.pp.ProductionScheduling;
import com.example.erp.entity.sd.BasicData;
import org.apache.ibatis.annotations.Mapper;
import java.sql.Date;
@@ -13,9 +15,9 @@
public interface ProductionSchedulingMapper extends BaseMapper<ProductionScheduling> {
    List<Map<String,String>> SelectOkSchedulingMp(String selectTime1, String selectTime2,String orderId,String processes, ProductionScheduling productionScheduling);
    List<Map<String,String>> selectOkSchedulingMp(String selectTime1, String selectTime2,String orderId,String processes, ProductionScheduling productionScheduling);
    List<Map<String,String>> SelectNoSchedulingMp(String selectTime1, String selectTime2,String orderId,String processes, ProductionScheduling  productionScheduling);
    List<Map<String,String>> selectNoSchedulingMp(String selectTime1, String selectTime2,String orderId,String processes, ProductionScheduling  productionScheduling);
    List<Map<String,String>> selectLastSchedulingMp(String selectTime1, String selectTime2, ProductionScheduling productionScheduling);
@@ -25,7 +27,11 @@
    Boolean insertSelective(String schedulingId, String orderId, String orderNumber, String processes, Integer schedulingQuantity, LocalDate scheduledStartTime, LocalDate planEndTime, String notes);
    Boolean ExamineSchedulingMp(String schedulingId, String userName);
    Boolean examineSchedulingMp(String schedulingId, String userName);
    Boolean deleteSchedulingMp(String schedulingId);
    List<Map<String,String>> selectProcess();
    Integer selectNumberMp(String orderId, String orderNumber, String processes);
}
north-glass-erp/src/main/java/com/example/erp/mapper/userInfo/SysMenuItemMapper.java
@@ -8,5 +8,5 @@
@Mapper
public interface SysMenuItemMapper {
     List<SysMenuItem> findAll() ;
     List<SysMenuItem> findAll(String lang) ;
}
north-glass-erp/src/main/java/com/example/erp/mapper/userInfo/SysMenuMapper.java
@@ -9,6 +9,6 @@
@Mapper
public interface SysMenuMapper {
    @Select("select  a.id, a.menuName from sys_menu as a where a.state=1 order by a.listSort")
    List<SysMenu> findAll();
    List<SysMenu> findAll(String lang);
}
north-glass-erp/src/main/java/com/example/erp/service/mm/FinishedGoodsInventoryService.java
@@ -175,13 +175,13 @@
                        deliverydetailsum=0;
                    }
                    System.out.println("订单总数:" + ordersum + "订单剩余数量:" + ordernumbersum + "准备出库数量" +
                    /*System.out.println("订单总数:" + ordersum + "订单剩余数量:" + ordernumbersum + "准备出库数量" +
                            orderDetail.getWarehouseNum()+ "发货数量" + orderDetail.getDeliveryNum()+ "发货总数" +
                            deliverysum+ "已发数量" + deliverydetailsum);
                            deliverysum+ "已发数量" + deliverydetailsum);*/
                    if (finishedGoodsInventorycount > 0) {
                        if(orderDetail.getWarehouseNum()>=orderDetail.getDeliveryNum()){
                            //修改库存表出库数量
                            //finishedGoodsInventoryMapper.updateInventoryquantityavailable(orderDetail);
                            //修改库存表库存数量
                            finishedGoodsInventoryMapper.updateInventoryInventoryOut(orderDetail.getDeliveryDetail().getOrderId(),orderDetail.getDeliveryDetail().getOrderNumber(),orderDetail.getDeliveryNum());
                            //修改发货明细表状态
                            finishedGoodsInventoryMapper.updateDeliveryDetailState(orderDetail,0);
                            //修改发货表状态
@@ -502,6 +502,43 @@
    }
    public Boolean cancelFinishedGoodsInventoryToExamine(Map<String,Object> object) {
        boolean saveState = true;
        //设置回滚点
        Object savePoint = TransactionAspectSupport.currentTransactionStatus().createSavepoint();
        try {
            String userName = "";
            String userId = "";
            if (object.get("userName") != null) {
                userName = object.get("userName").toString();
            }
            if (object.get("userId") != null) {
                userId = object.get("userId").toString();
            }
            //获取对象集合循环进行新增修改
            List<FinishedOperateLog> finishedOperateLogslist = JSONArray.parseArray(JSONObject.toJSONString(object.get("orderDetail")), FinishedOperateLog.class);
            if (!finishedOperateLogslist.isEmpty()){
                for (FinishedOperateLog finishedOperateLog : finishedOperateLogslist) {
                    finishedGoodsInventoryMapper.updateInventoryquantityInt(finishedOperateLog.getOrderId(),finishedOperateLog.getOperationNumber(), Math.toIntExact(finishedOperateLog.getQuantity()));
                    finishedOperateLogMapper.updateFinishedOperateLogState(finishedOperateLog,"已作废");
                }
            }
        } catch (Exception e) {
            TransactionAspectSupport.currentTransactionStatus().rollbackToSavepoint(savePoint);
            //将异常传入数据库
            SysError sysError = new SysError();
            sysError.setError(e.toString());
            sysError.setFunc("saveOrder");
            sysErrorService.insert(sysError);
            saveState = false;
        }
        return saveState;
    }
north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java
@@ -40,11 +40,11 @@
    }
    //流程卡管理查询
    public Map<String, Object> selectProcessCard(Integer pageNum, Integer pageSize,Date selectTime1, Date selectTime2, FlowCard flowCard) {
        Integer offset = (pageNum-1)*pageSize;
    public Map<String, Object> selectProcessCard(Integer pageNum, Integer pageSize, Date selectTime1, Date selectTime2, FlowCard flowCard) {
        Integer offset = (pageNum - 1) * pageSize;
        Map<String, Object> map = new HashMap<>();
        map.put("data", flowCardMapper.selectFlowCard(offset, pageSize,selectTime1, selectTime2, flowCard));
        map.put("total",flowCardMapper.getPageTotal(offset, pageSize, selectTime1, selectTime2, flowCard));
        map.put("data", flowCardMapper.selectFlowCard(offset, pageSize, selectTime1, selectTime2, flowCard));
        map.put("total", flowCardMapper.getPageTotal(offset, pageSize, selectTime1, selectTime2, flowCard));
        return map;
    }
@@ -65,14 +65,23 @@
    //删除流程卡
    public Boolean deleteFlowCardSv(String orderId, String processId) {
        if (!orderId.isEmpty() && !processId.isEmpty()) {
            //判断该流程卡是否报工
            Integer count = flowCardMapper.reportingWorkCount(processId);
            if (count == 0) {
                //修改订单表分架状态为1,未全部分架完成
                flowCardMapper.updateProcessingCard(orderId, 1);
                //修改分架状态
                flowCardMapper.updateDeleteState(orderId, processId);
                //删除分架明细
                flowCardMapper.deleteFlowCardMp(orderId, processId);
                //判断该订单流程卡是否全部删除
                Integer flowNumber = flowCardMapper.selectFlowCardCount(orderId);
                if (flowNumber == 0) {
                    //修改订单表分架状态为0,全部删除
                    flowCardMapper.updateProcessingCard(orderId, 0);
                } else {
                    //修改订单表分架状态为1,删除部分
                    flowCardMapper.updateProcessingCard(orderId, 1);
                }
                return true;
            } else {
                return false;
@@ -92,15 +101,13 @@
    //修改排版状态
    public Boolean updateLayoutStatusSv(String processId) {
    public Boolean updateLayoutStatusSv(String processId, Integer state) {
        if (!processId.isEmpty()) {
            Integer Status = flowCardMapper.selectLayoutStatus(processId);
            if (Status == 1) {
                flowCardMapper.updateLayoutStatusMp(processId);
            } else {
                return false;
            }
//            Integer Status = flowCardMapper.selectLayoutStatus(processId);
            flowCardMapper.updateLayoutStatusMp(processId, state);
            return true;
        } else {
@@ -126,7 +133,7 @@
                //查询每个序号的层数
                Integer layer = flowCardMapper.selectLayer(productionId, flowCard.getOrderNumber());
                //添加流程卡数据
                flowCardMapper.addFlowCardMp(flowCard.getProcessId(), flowCard.getOrderNumber(), flowCard.getLandingSequence(), flowCard.getQuantity(), productionId, userName,layer);
                flowCardMapper.addFlowCardMp(flowCard.getProcessId(), flowCard.getOrderNumber(), flowCard.getLandingSequence(), flowCard.getQuantity(), productionId, userName, layer);
                //修改分架状态,将状态改为1
                flowCardMapper.updateFlowState(productionId, flowCard.getOrderNumber());
                //查询该订单未分架数量
@@ -142,12 +149,12 @@
                List<OrderGlassDetail> orderGlassDetailList =
                        orderGlassDetailMapper.selectList(
                                new QueryWrapper<OrderGlassDetail>()
                                .eq("order_id", flowCard.getProcessId().substring(0,10))
                                .eq("order_number", flowCard.getOrderNumber())
                                        .eq("order_id", flowCard.getProcessId().substring(0, 10))
                                        .eq("order_number", flowCard.getOrderNumber())
                        );
                List<OrderProcessDetail> orderProcessDetailList = getOrderProcessDetails(orderGlassDetailList);
                orderProcessDetailList.forEach(
                        orderGlassDetail ->orderGlassDetail.setProcessId(flowCard.getProcessId()));
                        orderGlassDetail -> orderGlassDetail.setProcessId(flowCard.getProcessId()));
                //赋值订单工艺表
@@ -160,13 +167,13 @@
        }
    }
    public Map<String, Object> selectSchedulingSv(String selectTime1, String selectTime2, String orderId,String processes, Integer state, FlowCard flowCard) {
    public Map<String, Object> selectSchedulingSv(String selectTime1, String selectTime2, String orderId, String processes, Integer state, FlowCard flowCard) {
        Map<String, Object> map = new HashMap<>();
        if (state==2){//已排产
            map.put("data", flowCardMapper.selectOkSchedulingMp(selectTime1, selectTime2,orderId,processes, flowCard));
        if (state == 2) {//已排产
            map.put("data", flowCardMapper.selectOkSchedulingMp(selectTime1, selectTime2, orderId, processes, flowCard));
        }else if (state==1){//未排产
            map.put("data", flowCardMapper.selectNoSchedulingMp(selectTime1, selectTime2,orderId,processes, flowCard));
        } else if (state == 1) {//未排产
            map.put("data", flowCardMapper.selectNoSchedulingMp(selectTime1, selectTime2, orderId, processes, flowCard));
        }
north-glass-erp/src/main/java/com/example/erp/service/pp/ProductionSchedulingService.java
@@ -23,8 +23,8 @@
    @Autowired
    ProductionSchedulingMapper productionSchedulingMapper;
    //带时间查询
    public Map<String, Object> SelectSchedulingSv(String selectTime1, String selectTime2, String orderId,String processes, Integer state, ProductionScheduling productionScheduling ) {
    //未排产查询
    public Map<String, Object> selectSchedulingSv(String selectTime1, String selectTime2, String orderId,String processes, Integer state, ProductionScheduling productionScheduling ) {
        Map<String, Object> map = new HashMap<>();
        if(orderId.equals("null")){
            orderId="";
@@ -35,10 +35,10 @@
        }
        if (state==2){//已排产
            map.put("data", productionSchedulingMapper.SelectOkSchedulingMp(selectTime1, selectTime2,orderId,processes, productionScheduling));
            map.put("data", productionSchedulingMapper.selectOkSchedulingMp(selectTime1, selectTime2,orderId,processes, productionScheduling));
        }else if (state==1){//未排产
            map.put("data", productionSchedulingMapper.SelectNoSchedulingMp(selectTime1, selectTime2,orderId,processes, productionScheduling));
            map.put("data", productionSchedulingMapper.selectNoSchedulingMp(selectTime1, selectTime2,orderId,processes, productionScheduling));
        }
@@ -50,6 +50,7 @@
    public Map<String, Object> selectLastScheduling(String selectTime1, String selectTime2,ProductionScheduling productionScheduling ) {
        Map<String, Object> map = new HashMap<>();
        map.put("data", productionSchedulingMapper.selectLastSchedulingMp(selectTime1, selectTime2, productionScheduling));
        map.put("process", productionSchedulingMapper.selectProcess());
        return map;
    }
@@ -60,7 +61,7 @@
        return map;
    }
    public Boolean AddSchedulingSv(Map<String, Object> object) {
    public Boolean addSchedulingSv(Map<String, Object> object) {
        String userName = "";
        if (object.get("userName") != null) {
            userName = object.get("userName").toString();
@@ -82,6 +83,9 @@
        List<ProductionScheduling> schedulinglist = JSONArray.parseArray(JSONObject.toJSONString(object.get("scheduling")), ProductionScheduling.class);
        if (!schedulinglist.isEmpty()) {
            for (ProductionScheduling productionScheduling : schedulinglist) {
                //查询已排产工序数量
              Integer num =  productionSchedulingMapper.selectNumberMp(productionScheduling.getOrderId(),productionScheduling.getOrderNumber(),processes);
               productionSchedulingMapper.insertSelective(schedulingId,productionScheduling.getOrderId(),productionScheduling.getOrderNumber(),processes,productionScheduling.getSchedulingQuantity(),productionScheduling.getScheduledStartTime(),productionScheduling.getPlanEndTime(),productionScheduling.getNotes());
               // System.out.println(productionScheduling.getOrderNumber()+"***"+productionScheduling.getOrderId());
            }
@@ -109,7 +113,7 @@
        }
    }
    public boolean ExamineSchedulingSv(Map<String, Object> object) {
    public boolean examineSchedulingSv(Map<String, Object> object) {
        String userName = "";
        if (object.get("userName") != null) {
            userName = object.get("userName").toString();
@@ -118,7 +122,7 @@
        if (!schedulinglist.isEmpty()) {
            for (ProductionScheduling productionScheduling : schedulinglist) {
                productionSchedulingMapper.ExamineSchedulingMp(productionScheduling.getSchedulingId(),userName);
                productionSchedulingMapper.examineSchedulingMp(productionScheduling.getSchedulingId(),userName);
                // System.out.println(productionScheduling.getOrderNumber()+"***"+productionScheduling.getOrderId());
            }
            return true;
north-glass-erp/src/main/java/com/example/erp/service/pp/ReplenishService.java
@@ -3,11 +3,14 @@
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.example.erp.entity.pp.FlowCard;
import com.example.erp.entity.pp.PatchLog;
import com.example.erp.entity.pp.ReportingWork;
import com.example.erp.entity.pp.Rework;
import com.example.erp.entity.userInfo.SysError;
import com.example.erp.mapper.pp.PatchLogMapper;
import com.example.erp.mapper.pp.ReportingWorkMapper;
import com.example.erp.service.userInfo.SysErrorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -23,11 +26,20 @@
@DS("pp")
@Transactional(rollbackFor = Exception.class)
public class ReplenishService {
    @Autowired
    final
    PatchLogMapper patchMapper;
    @Autowired
    final
    SysErrorService sysErrorService;
    final
    ReportingWorkMapper reportingWorkMapper;
    public ReplenishService(PatchLogMapper patchMapper, SysErrorService sysErrorService, ReportingWorkMapper reportingWorkMapper) {
        this.patchMapper = patchMapper;
        this.sysErrorService = sysErrorService;
        this.reportingWorkMapper = reportingWorkMapper;
    }
    public List<Map<String, Object>> getSelectReplenish(Integer pageNum, Integer pageSize) {
@@ -114,9 +126,12 @@
            if (!patchLoglist.isEmpty()){
                for (PatchLog patchLog : patchLoglist) {
                    //审核
                    patchMapper.updateReplenish(patchLog,userName);
                   patchMapper.updateReplenish(patchLog,userName);
                    ReportingWork reportingWork = reportingWorkMapper
                            .selectOne(new QueryWrapper<ReportingWork>().eq("reporting_work_id",patchLog.getReportingWorkId()));
                    System.out.println(reportingWork.getReportingWorkId());
                    //修改小片流程卡数量
                    patchMapper.updateOrderProcessDetail(patchLog);
                    patchMapper.updateOrderProcessDetail(patchLog,reportingWork);
                }
            }
north-glass-erp/src/main/java/com/example/erp/service/pp/ReworkService.java
@@ -41,11 +41,12 @@
        List<Map<String, Object>> ReworkMap =reworkMapper.getSelectRework(offset,pageSize);
        List<BasicDataProduce> basicDataProduceList=basicDateProduceMapper.SelectWorkBasicTeams();
        for (Map<String, Object> item:ReworkMap){
            item.put("reworkTeam","");
            List<BasicDataProduce> basicCategory=new ArrayList<>();
            List<BasicDataProduce> basicDataProduceList=basicDateProduceMapper.SelectWorkBasicTeams(item.get("reworkProcesses").toString());
            for (BasicDataProduce basicDataProduce:basicDataProduceList){
                if(Objects.equals(basicDataProduce.getBasicData().getBasicName(),item.get("reworkProcesses"))){
                    basicCategory.add(basicDataProduce);
north-glass-erp/src/main/java/com/example/erp/service/sd/DeliveryService.java
@@ -117,7 +117,7 @@
            if (object.get("deliveryId") != null) {
                deliveryId = object.get("deliveryId").toString();
            }
            Delivery delivery = JSONObject.parseObject(JSONObject.toJSONString(object.get("customer")), Delivery.class);
            Delivery delivery = JSONObject.parseObject(JSONObject.toJSONString(object.get("title")), Delivery.class);
            List<OrderDetail> orderDetaillist = JSONArray.parseArray(JSONObject.toJSONString(object.get("delivery")), OrderDetail.class);
            //查询发货单是否存在
            Integer deliveryConut = deliveryMapper.getDeliveryConut(deliveryId);
@@ -154,7 +154,7 @@
                //新增发货表数据
                deliveryMapper.insertDelivery(delivery, oddNumber, orderDetaillist.get(0).getOrderId());
            }
            System.out.println(4);
            Double area = 0.0;
            Integer quantity = 0;
            Double money = 0.0;
north-glass-erp/src/main/java/com/example/erp/service/userInfo/SysMenuItemService.java
@@ -13,7 +13,7 @@
public class SysMenuItemService {
    @Autowired
    SysMenuItemMapper sysMenuItemMapper;
    public List<SysMenuItem> getMenuItem() {
        return sysMenuItemMapper.findAll();
    public List<SysMenuItem> getMenuItem(String lang) {
        return sysMenuItemMapper.findAll(lang);
    }
}
north-glass-erp/src/main/java/com/example/erp/service/userInfo/SysMenuService.java
@@ -14,8 +14,8 @@
    @Autowired
    private SysMenuMapper sysMenuMapper;
    public List<SysMenu> getMenu(){
    public List<SysMenu> getMenu(String lang){
        return sysMenuMapper.findAll();
        return sysMenuMapper.findAll(lang);
    }
}
north-glass-erp/src/main/resources/mapper/mm/FinishedOperateLog.xml
@@ -32,8 +32,13 @@
        update mm.finished_operate_log set reviewed=#{userName},reviewed_time=now(),status=#{type} where operation_order_number=#{finishedOperateLog.operationOrderNumber};
    </update>
    <update id="updateFinishedOperateLogState">
        update mm.finished_operate_log set status=#{type} where id=#{finishedOperateLog.id};
    </update>
    <select id="getSelectOperateRecord" resultMap="selectFinishedGoodsInventory">
        select fol.operation_order_number,
        select fol.id,
               fol.operation_order_number,
               fol.order_id,
               fol.operation_number,
               fol.quantity,
@@ -50,7 +55,7 @@
               fol.type,
               fol.remarks
        from (select *
              from mm.finished_operate_log aa where aa.operate_type = '领出' or aa.operate_type = '返工') fol
              from mm.finished_operate_log aa where (aa.operate_type = '领出' or aa.operate_type = '返工') and aa.status!='已作废') fol
                 left join sd.order_detail od on fol.order_id = od.order_id and fol.operation_number = od.order_number
        <where>
                date(fol.operate_time)>=#{startDate} and date(fol.operate_time) &lt;= #{endDate}
@@ -108,7 +113,7 @@
        select CEILING(count(fol.id)/#{pageSize}) as 'pageTotal',
        count(fol.id) as 'total'
        from (select *
            from mm.finished_operate_log aa where aa.operate_type = '领出' or aa.operate_type = '返工') fol
            from mm.finished_operate_log aa where (aa.operate_type = '领出' or aa.operate_type = '返工') and aa.status!='已作废') fol
            left join sd.order_detail od on fol.order_id = od.order_id and fol.operation_number = od.order_number
        <where>
                 date(fol.operate_time)>=#{startDate} and date(fol.operate_time) &lt;= #{endDate}
north-glass-erp/src/main/resources/mapper/pp/BasicDataProduce.xml
@@ -37,7 +37,7 @@
        select bdp.basic_name ,bd.basic_name as d_basic_name
        from pp.basic_data_produce bdp
                 left join sd.basic_data bd on bdp.basic_category = bd.id
        where bd.basic_name = "切割"
        where bd.basic_name = #{process}
          and bdp.basic_type = "teamsgroups"
    </select>
</mapper>
north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
@@ -9,6 +9,7 @@
        <result column="quantity" property="quantity"/>
        <result column="founder" property="founder"/>
        <result column="create_time" property="createTime"/>
        <result column="layout_status" property="layoutStatus"/>
        <!--接收其他外键实体类数据-->
        <association property="order" javaType="com.example.erp.entity.sd.Order">
            <result column="project" property="project"/>
@@ -56,18 +57,19 @@
        c.product_id,
        c.product_name,
        b.project,
        a.quantity,
        c.compute_gross_area,
        sum(a.quantity) as quantity,
        sum(c.compute_gross_area) as compute_gross_area,
        a.founder,
        c.processing_note
        c.processing_note,
        if(a.layout_status=0,"不可排版",if(a.layout_status=1,"可排版","已排版")) as layout_status
        from flow_card as a left join sd.`order` as b on a.order_Id=b.order_id
        left join sd.order_detail as c on a.order_Id=c.order_id and a.order_Number=c.order_number
        where a.create_time between #{selectTime1} and #{selectTime2}
                    <if test="flowCard.orderId != null and flowCard.orderId != ''">
                        and a.order_id regexp #{flowCard.orderId}
                    </if>
                    <if test="flowCard.productionId != null and flowCard.productionId != ''">
                        and a.process_Id regexp #{flowCard.productionId}
                    <if test="flowCard.processId != null and flowCard.processId != ''">
                        and a.process_Id regexp #{flowCard.processId}
                    </if>
                    <if test="flowCard.orderDetail.productId != null and flowCard.orderDetail.productId != ''">
                        and c.product_id regexp #{flowCard.orderDetail.productId}
@@ -111,7 +113,7 @@
            and b.project regexp #{flowCard.order.project}
        </if>
        ORDER BY a.id desc
        limit #{offset},#{pageSize};
    </select>
@@ -158,6 +160,7 @@
            and o.salesman regexp #{flowCard.order.salesman}
        </if>
        group by o.order_id
        order by o.id desc
        ;
    </select>
@@ -171,11 +174,13 @@
        SUM( od.quantity) as quantity,
        SUM(od.compute_gross_area) as compute_gross_area,
        od.perimeter
        from  sd.order_detail as od left join sd.order_glass_detail as ogd
        on od.order_id=ogd.order_id and od.order_number=ogd.order_number
        from  sd.order_detail as od left join
        (select order_id,order_number,production_id,splitting_status from sd.order_glass_detail
        GROUP BY order_id,order_number
        ) as ogd on od.order_id=ogd.order_id and od.order_number=ogd.order_number
        where od.order_id = #{orderId} and ogd.splitting_status=0
        <if test="flowCard.orderDetail.orderId != null and flowCard.orderDetail.orderId != ''">
            and od.order_id regexp #{flowCard.orderDetail.orderId}
        <if test="flowCard.orderId != null and flowCard.orderId != ''">
            and od.order_id regexp #{flowCard.orderId}
        </if>
        <if test="flowCard.orderGlassDetail.productionId != null and flowCard.orderGlassDetail.productionId != ''">
            and ogd.production_id regexp #{flowCard.orderGlassDetail.productionId}
@@ -187,6 +192,7 @@
            and od.product_name regexp #{flowCard.orderDetail.productName}
        </if>
        group by od.order_id, ogd.production_id
        order by od.id desc
    </select>
    <!--    更新分架状态-->
@@ -228,15 +234,15 @@
        left join sd.order_glass_detail as ogd on od.order_id=ogd.order_id and od.order_number=ogd.order_number
        left join sd.product as p on od.product_name=p.product_name
        where od.order_id=#{orderId} and ogd.production_id=#{productionId} and ogd.splitting_status=0
        GROUP BY od.order_number;
        GROUP BY od.order_number
        order by od.id desc
    </select>
    <!--修改排版状态-->
    <update id="updateLayoutStatusMp">
        update flow_card as fc
        set fc.layout_status=2
        set fc.layout_status=#{state}
        where fc.process_id = #{processId}
    </update>
@@ -322,7 +328,7 @@
        from sd.order_detail as od left join sd.order as o on od.order_id=o.order_id
                                   left join production_scheduling as ps on ps.order_id=od.order_id and ps.order_number=od.order_number
        where od.order_id=#{orderId} and ps.processes=#{processes} and ps.scheduling_id IS NOT NULL
        order by ps.id desc
    </select>
<!--    查询未排版数据-->
    <select id="selectNoSchedulingMp">
@@ -349,4 +355,8 @@
        where ogd.production_id = #{productionId}
          and ogd.order_number=#{orderNumber}
    </select>
<!--  查询该订单流程卡条数  -->
    <select id="selectFlowCardCount">
        select COUNT(*) from flow_card where order_id=#{orderId}
    </select>
</mapper>
north-glass-erp/src/main/resources/mapper/pp/PatchLogMapper.xml
@@ -46,7 +46,7 @@
        <where>
            date(r.create_time)>=#{startDate} and date(r.create_time) &lt;= #{endDate}
        </where>
         order by r.review_status
         order by r.review_status,r.id desc
        limit #{offset},#{pageSize};
    </select>
@@ -89,10 +89,20 @@
    </update>
    <update id="updateOrderProcessDetail"  >
        update sd.order_process_detail set reporting_work_num=reporting_work_num-#{patchLog.patchNum} where order_id=#{patchLog.orderId} and
        order_number=#{patchLog.orderSort} and technology_number=#{patchLog.technologyNumber} and id <![CDATA[<]]> (select a.opdid from(select id as opdid from
        sd.order_process_detail opd where opd.order_id=#{patchLog.orderId} and opd.order_number=#{patchLog.orderSort} and opd.technology_number=#{patchLog.technologyNumber}
        and process=#{patchLog.patchProcesses}) as a)
        update sd.order_process_detail
        set reporting_work_num=reporting_work_num - #{patchLog.patchNum}
        where order_id = #{patchLog.orderId}
          and process_id = #{patchLog.processId}
          and order_number = #{patchLog.orderSort}
          and technology_number = #{patchLog.technologyNumber}
          and id <![CDATA[<]]> (select a.opdid
                       from (select id as opdid
                             from sd.order_process_detail opd
                             where opd.order_id = #{patchLog.orderId}
                               and opd.process_id = #{patchLog.processId}
                               and opd.order_number = #{patchLog.orderSort}
                               and opd.technology_number = #{patchLog.technologyNumber}
                               and process = #{reportingWork.thisProcess}) as a)
    </update>
    <update id="updateDamageDetails"  >
@@ -118,6 +128,7 @@
               od.width,
               od.height,
               od.shape,
               dd.responsible_process as patchProcesses,
               dd.breakage_quantity-dd.quantity as breakageQuantity,
               dd.return_process as patchProcesses,
               dd.breakage_reason as patchReason,
@@ -126,7 +137,7 @@
               dd.responsible_equipment as responsibleEquipment,
               dd.responsible_team as responsibleTeam,
               ROUND((dd.breakage_quantity-dd.quantity) * od.width * od.height / 1000000, 2) as patchArea,
               rw.qualityIns_pector as qualityInsPector
               rw.quality_inspector as qualityInspector
        from pp.damage_details dd
                 left join    pp.reporting_work_detail rwd on dd.reporting_work_id = rwd.reporting_work_id and dd.order_number=rwd.order_number  and dd.technology_number=rwd.technology_number
                 left join pp.reporting_work rw on dd.reporting_work_id = rw.reporting_work_id
@@ -137,7 +148,7 @@
                           on rw.order_id = ogd.order_id and dd.order_number = ogd.order_number
        where  dd.breakage_quantity-dd.quantity>0 and dd.available=0 and (dd.responsible_process=rw.this_process or (dd.responsible_process!=rw.this_process and dd.qualityIns_status=1))
        order by dd.id desc
    </select>
north-glass-erp/src/main/resources/mapper/pp/ProductionScheduling.xml
@@ -42,123 +42,185 @@
    </resultMap>
<!--    查询已排版数据-->
    <select id="SelectOkSchedulingMp">
        select date(ps.scheduled_start_time) as scheduled_start_time,
               date(ps.plan_end_time) as plan_end_time,
               od.order_id,o.customer_name,o.project,od.order_number,od.width,od.height,od.quantity,
        round(od.width*od.height*od.quantity/1000000,2) as area,
        ps.scheduling_quantity,
#         (od.quantity-IFNULL(ps.scheduling_quantity,0)) as pendingProductionQuantity,
#         round(od.width*od.height*(od.quantity-IFNULL(ps.scheduling_quantity,0))/1000000,2) as pendingProductionArea,
        IFNULL(ps.scheduling_quantity,0) as productionScheduledQuantity,
        round(od.width*od.height*(IFNULL(ps.scheduling_quantity,0))/1000000,2) as productionScheduledArea,
        IF(ps.review_status=0,"未审核","已审核") as review_status,
        ps.reviewer,
        od.product_name,od.shape,ps.scheduling_id
    <!--    查询已排版数据-->
    <select id="selectOkSchedulingMp">
        select date(ps.scheduled_start_time)                          as scheduled_start_time,
               date(ps.plan_end_time)                                 as plan_end_time,
               od.order_id,
               o.customer_name,
               o.project,
               od.order_number,
               od.width,
               od.height,
               od.quantity,
               round(od.width * od.height * od.quantity / 1000000, 2) as area,
               ps.scheduling_quantity,
               (od.quantity - IFNULL(sum(ps.scheduling_quantity), 0)) as pendingProductionQuantity,
               round(od.width * od.height * (od.quantity - IFNULL(sum(ps.scheduling_quantity), 0)) / 1000000,
                     2)                                               as pendingProductionArea,
               IFNULL(ps.scheduling_quantity, 0)                      as productionScheduledQuantity,
               round(od.width * od.height * (IFNULL(ps.scheduling_quantity, 0)) / 1000000,
                     2)                                               as productionScheduledArea,
               IF(ps.review_status = 0, "未审核", "已审核")           as review_status,
               ps.reviewer,
               od.product_name,
               od.shape,
               ps.scheduling_id
        from sd.order_detail as od
            left join sd.order as o on od.order_id=o.order_id
            left join production_scheduling as ps on ps.order_id=od.order_id and ps.order_number=od.order_number
        where  ps.scheduling_id IS NOT NULL
           and od.create_time between #{selectTime1} and #{selectTime2}
                 left join sd.order as o on od.order_id = o.order_id
                 left join production_scheduling as ps
                           on ps.order_id = od.order_id and ps.order_number = od.order_number
        where ps.scheduling_id IS NOT NULL
          and od.create_time between #{selectTime1} and #{selectTime2}
          and position(#{processes} in ps.processes)
          and position(#{orderId} in ps.order_id)
        group by od.order_id, od.order_number
        order by ps.id desc
    </select>
    <!--    查询已排产带订单编号的数据-->
    <!--    查询已排产的数据-->
    <select id="selectSchedulingNotMp">
        select date(ps.scheduled_start_time) as scheduled_start_time,
        date(ps.plan_end_time) as plan_end_time,
        od.order_id,o.customer_name,o.project,od.order_number,od.width,od.height,od.quantity,
        round(od.width*od.height*od.quantity/1000000,2) as area,
        ps.scheduling_quantity,
#         (od.quantity-IFNULL(ps.scheduling_quantity,0)) as pendingProductionQuantity,
#         round(od.width*od.height*(od.quantity-IFNULL(ps.scheduling_quantity,0))/1000000,2) as pendingProductionArea,
        IFNULL(ps.scheduling_quantity,0) as productionScheduledQuantity,
        round(od.width*od.height*(IFNULL(ps.scheduling_quantity,0))/1000000,2) as productionScheduledArea,
        IF(ps.review_status=0,"未审核","已审核") as review_status,
        ps.reviewer,
        od.product_name,od.shape,ps.scheduling_id
        select date(ps.scheduled_start_time)                          as scheduled_start_time,
               date(ps.plan_end_time)                                 as plan_end_time,
               od.order_id,
               o.customer_name,
               o.project,
               od.order_number,
               od.width,
               od.height,
               od.quantity,
               round(od.width * od.height * od.quantity / 1000000, 2) as area,
               ps.scheduling_quantity,
               (od.quantity - IFNULL(sum(ps.scheduling_quantity), 0)) as pendingProductionQuantity,
               round(od.width * od.height * (od.quantity - IFNULL(sum(ps.scheduling_quantity), 0)) / 1000000, 2)
                                                                      as pendingProductionArea,
               IFNULL(ps.scheduling_quantity, 0)                      as productionScheduledQuantity,
               round(od.width * od.height * (IFNULL(ps.scheduling_quantity, 0)) / 1000000, 2)
                                                                      as productionScheduledArea,
               IF(ps.review_status = 0, "未审核", "已审核")
                                                                      as review_status,
               ps.reviewer,
               od.product_name,
               od.shape,
               ps.scheduling_id
        from sd.order_detail as od
        left join sd.order as o on od.order_id=o.order_id
        left join production_scheduling as ps on ps.order_id=od.order_id and ps.order_number=od.order_number
        where  (ps.scheduling_id IS NOT NULL )
                 left join sd.order as o on od.order_id = o.order_id
                 left join production_scheduling as ps
                           on ps.order_id = od.order_id and ps.order_number = od.order_number
        where (ps.scheduling_id IS NOT NULL)
          and position(#{processes} in ps.processes)
          and position(#{orderId} in ps.order_id)
        group by od.order_id, od.order_number
        order by ps.id desc
    </select>
<!--    查询未排产数据-->
    <select id="SelectNoSchedulingMp" >
        select od.order_id,o.customer_name,o.project,od.order_number,od.width,od.height,od.quantity,
        round(od.width*od.height*od.quantity/1000000,2) as area,
        (od.quantity-IFNULL(ps.scheduling_quantity,0)) as pendingProductionQuantity,
        round(od.width*od.height*(od.quantity-IFNULL(ps.scheduling_quantity,0))/1000000,2) as pendingProductionArea,
        IFNULL(ps.scheduling_quantity,0) as productionScheduledQuantity,
        round(od.width*od.height*(IFNULL(ps.scheduling_quantity,0))/1000000,2) as productionScheduledArea,
        od.product_name,od.shape
        from sd.order_detail as od left join sd.order as o on od.order_id=o.order_id
        left join production_scheduling as ps on ps.order_id=od.order_id and ps.order_number=od.order_number
        where   od.quantity-IFNULL(ps.scheduling_quantity,0)>0 and od.create_time between #{selectTime1} and #{selectTime2}
    <!--    查询未排产数据-->
    <select id="selectNoSchedulingMp">
        select od.order_id,
               o.customer_name,
               o.project,
               od.order_number,
               od.width,
               od.height,
               od.quantity,
               round(od.width * od.height * od.quantity / 1000000, 2) as area,
               (od.quantity - IFNULL(sum(ps.scheduling_quantity), 0)) as pendingProductionQuantity,
               round(od.width * od.height * (od.quantity - IFNULL(sum(ps.scheduling_quantity), 0)) / 1000000, 2)
                                                                      as pendingProductionArea,
               IFNULL(ps.scheduling_quantity, 0)                      as productionScheduledQuantity,
               round(od.width * od.height * (IFNULL(ps.scheduling_quantity, 0)) / 1000000,
                     2)                                               as productionScheduledArea,
               od.product_name,
               od.shape
        from sd.order_detail as od
                 left join sd.order as o on od.order_id = o.order_id
                 left join production_scheduling as ps
                           on ps.order_id = od.order_id and ps.order_number = od.order_number
        where (od.quantity - IFNULL((ps.scheduling_quantity), 0)) > 0
          and od.create_time between #{selectTime1} and #{selectTime2}
          and position(#{orderId} in ps.order_id)
    group by od.order_id,od.order_number
          and position(#{processes} in ps.processes)
        group by od.order_id, od.order_number
        order by ps.id desc
    </select>
<!--    首次查询排产数据-->
    <!--    首次查询排产数据-->
    <select id="selectLastSchedulingMp">
        select od.order_id,o.customer_name,o.project,od.order_number,od.width,od.height,od.quantity,
               round(od.width*od.height*od.quantity/1000000,2) as area,
               (od.quantity-IFNULL(sum(ps.scheduling_quantity),0)) as pendingProductionQuantity,
               round(od.width*od.height*(od.quantity-IFNULL(sum(ps.scheduling_quantity),0))/1000000,2) as pendingProductionArea,
               IFNULL(sum(ps.scheduling_quantity),0) as productionScheduledQuantity,
               round(od.width*od.height*(IFNULL(sum(ps.scheduling_quantity),0))/1000000,2) as productionScheduledArea,
               od.product_name,od.shape
        from sd.order_detail as od left join sd.order as o on od.order_id=o.order_id
                                   left join production_scheduling as ps on ps.order_id=od.order_id and ps.order_number=od.order_number
        where od.create_time between #{selectTime1} and #{selectTime2} and od.quantity-IFNULL(ps.scheduling_quantity,0)>0
        group by od.order_id,od.order_number
        select od.order_id,
               o.customer_name,
               o.project,
               od.order_number,
               od.width,
               od.height,
               od.quantity,
               round(od.width * od.height * od.quantity / 1000000, 2) as area,
               (od.quantity - IFNULL(sum(ps.scheduling_quantity), 0)) as pendingProductionQuantity,
               round(od.width * od.height * (od.quantity - IFNULL(sum(ps.scheduling_quantity), 0)) / 1000000,
                     2)                                               as pendingProductionArea,
               IFNULL(sum(ps.scheduling_quantity), 0)                 as productionScheduledQuantity,
               round(od.width * od.height * (IFNULL(sum(ps.scheduling_quantity), 0)) / 1000000,
                     2)                                               as productionScheduledArea,
               od.product_name,
               od.shape
        from sd.order_detail as od
                 left join sd.order as o on od.order_id = o.order_id
                 left join production_scheduling as ps
                           on ps.order_id = od.order_id and ps.order_number = od.order_number
        where od.create_time between #{selectTime1} and #{selectTime2}
          and (od.quantity - IFNULL((ps.scheduling_quantity), 0)) > 0
        group by od.order_id, od.order_number
        order by ps.id desc
    </select>
    <select id="selectMaxId">
        select
            COUNT(ps.scheduling_id)
        from
            `production_scheduling` as ps
        where
            date(ps.create_time) = curdate()
        select COUNT(ps.scheduling_id)
        from `production_scheduling` as ps
        where date(ps.create_time) = curdate()
    </select>
    <insert id="insertSelective">
        insert into production_scheduling(
               scheduling_id,
               order_id,
               order_number,
               processes,
               scheduling_quantity,
               scheduled_start_time,
               plan_end_time,
               notes,
               create_time
               )
        VALUES(
               #{schedulingId},
               #{orderId},
               #{orderNumber},
               #{processes},
               #{schedulingQuantity},
               #{scheduledStartTime},
               #{planEndTime},
               #{notes},
               now()
              )
        insert into production_scheduling(scheduling_id,
                                          order_id,
                                          order_number,
                                          processes,
                                          scheduling_quantity,
                                          scheduled_start_time,
                                          plan_end_time,
                                          notes,
                                          create_time)
        VALUES (#{schedulingId},
                #{orderId},
                #{orderNumber},
                #{processes},
                #{schedulingQuantity},
                #{scheduledStartTime},
                #{planEndTime},
                #{notes},
                now())
    </insert>
    <update id="ExamineSchedulingMp">
        update production_scheduling set review_status=1,reviewer=#{userName} where
        scheduling_id=#{schedulingId}
    <update id="examineSchedulingMp">
        update production_scheduling
        set review_status=1,
            reviewer=#{userName}
        where scheduling_id = #{schedulingId}
    </update>
    <delete id="deleteSchedulingMp">
        delete from production_scheduling where scheduling_id=#{schedulingId}
        delete
        from production_scheduling
        where scheduling_id = #{schedulingId}
    </delete>
    <select id="selectProcess">
        SELECT *
        FROM sd.basic_data as bd
        where bd.basic_category = 'process'
          and bd.basic_type = 'product'
    </select>
    <select id="selectNumberMp">
    </select>
</mapper>
north-glass-erp/src/main/resources/mapper/pp/ReworkMapper.xml
@@ -45,7 +45,7 @@
        <where>
            date(r.create_time)>=#{startDate} and date(r.create_time) &lt;= #{endDate}
        </where>
         order by r.review_status
         order by r.review_status,r.id desc
        limit #{offset},#{pageSize};
    </select>
@@ -88,7 +88,7 @@
               dd.responsible_equipment as responsibleEquipment,
               dd.responsible_team as responsibleTeam,
               ROUND((dd.breakage_quantity-dd.quantity) * od.width * od.height / 1000000, 2) as reworkArea,
               rw.qualityIns_pector as qualityInsPector
               rw.quality_inspector as qualityInspector
        from pp.damage_details dd
                 left join    pp.reporting_work_detail rwd on dd.reporting_work_id = rwd.reporting_work_id and dd.order_number=rwd.order_number  and dd.technology_number=rwd.technology_number
                 left join pp.reporting_work rw on dd.reporting_work_id = rw.reporting_work_id
@@ -98,7 +98,7 @@
                 left join (select * from sd.order_glass_detail group by order_id,order_number) as ogd
                           on rw.order_id = ogd.order_id and dd.order_number = ogd.order_number
        where  dd.breakage_quantity-dd.quantity>0 and dd.available=1 and dd.qualityIns_status=1
        where  dd.breakage_quantity-dd.quantity>0 and dd.available=1 and dd.qualityIns_status=1 order by dd.id
    </select>
@@ -123,7 +123,7 @@
    </insert>
    <update id="updateRework"  >
        update pp.rework set reviewer=#{userName},review_status=1,update_time=now() where rework_id=#{rework.id}
        update pp.rework set reviewer=#{userName},review_status=1,update_time=now() where id=#{rework.id}
    </update>
    <update id="updateDamageDetails"  >
north-glass-erp/src/main/resources/mapper/sd/Delivery.xml
@@ -122,7 +122,7 @@
                and fgi.quantity_available REGEXP #{order.finishedGoodsInventory.quantityAvailable}
            </if>
        </where>
        group by o.order_id
        group by o.order_id order by o.id desc
        limit #{offset},#{pageSize};
    </select>
north-glass-erp/src/main/resources/mapper/sd/DeliveryDetail.xml
@@ -81,7 +81,7 @@
        insert into sd.delivery_detail (delivery_id,delivery_number,order_number,
                                        area,order_id,quantity,money,delivery_detail_remakes,delivery_detail_state,create_time)
        values (
                   #{number} ,#{deliveryNumber},#{orderDetail.order_number},#{orderDetail.computeGrossArea},
                   #{number} ,#{deliveryNumber},#{orderDetail.orderNumber},#{orderDetail.computeGrossArea},
                #{orderDetail.orderId},#{orderDetail.deliveryDetail.quantity},
                #{orderDetail.price}*#{orderDetail.deliveryDetail.quantity},'',1,now()
               )
@@ -192,6 +192,7 @@
            </if>
        </where>
        order by dd.id desc
        limit #{offset},#{pageSize};
    </select>
north-glass-erp/src/main/resources/mapper/userInfo/SysMenu.xml
@@ -9,6 +9,7 @@
        from sys_menu as a
        where
            a.state=1
            and a.languageType = #{lang}
        order by a.listSort
        ;
    </select>
north-glass-erp/src/main/resources/mapper/userInfo/SysMenuItem.xml
@@ -9,6 +9,7 @@
        from `sys_menu_item` as a
        where
            a.state=1
           and a.languageType = #{lang}
        order by
            a.menuId,a.listSort
        ;
north-glass-erp/target/classes/mapper/mm/FinishedOperateLog.xml
@@ -32,8 +32,13 @@
        update mm.finished_operate_log set reviewed=#{userName},reviewed_time=now(),status=#{type} where operation_order_number=#{finishedOperateLog.operationOrderNumber};
    </update>
    <update id="updateFinishedOperateLogState">
        update mm.finished_operate_log set status=#{type} where id=#{finishedOperateLog.id};
    </update>
    <select id="getSelectOperateRecord" resultMap="selectFinishedGoodsInventory">
        select fol.operation_order_number,
        select fol.id,
               fol.operation_order_number,
               fol.order_id,
               fol.operation_number,
               fol.quantity,
@@ -50,7 +55,7 @@
               fol.type,
               fol.remarks
        from (select *
              from mm.finished_operate_log aa where aa.operate_type = '领出' or aa.operate_type = '返工') fol
              from mm.finished_operate_log aa where (aa.operate_type = '领出' or aa.operate_type = '返工') and aa.status!='已作废') fol
                 left join sd.order_detail od on fol.order_id = od.order_id and fol.operation_number = od.order_number
        <where>
                date(fol.operate_time)>=#{startDate} and date(fol.operate_time) &lt;= #{endDate}
@@ -108,7 +113,7 @@
        select CEILING(count(fol.id)/#{pageSize}) as 'pageTotal',
        count(fol.id) as 'total'
        from (select *
            from mm.finished_operate_log aa where aa.operate_type = '领出' or aa.operate_type = '返工') fol
            from mm.finished_operate_log aa where (aa.operate_type = '领出' or aa.operate_type = '返工') and aa.status!='已作废') fol
            left join sd.order_detail od on fol.order_id = od.order_id and fol.operation_number = od.order_number
        <where>
                 date(fol.operate_time)>=#{startDate} and date(fol.operate_time) &lt;= #{endDate}
north-glass-erp/target/classes/mapper/pp/BasicDataProduce.xml
@@ -37,7 +37,7 @@
        select bdp.basic_name ,bd.basic_name as d_basic_name
        from pp.basic_data_produce bdp
                 left join sd.basic_data bd on bdp.basic_category = bd.id
        where bd.basic_name = "切割"
        where bd.basic_name = #{process}
          and bdp.basic_type = "teamsgroups"
    </select>
</mapper>
north-glass-erp/target/classes/mapper/pp/FolwCard.xml
@@ -9,6 +9,7 @@
        <result column="quantity" property="quantity"/>
        <result column="founder" property="founder"/>
        <result column="create_time" property="createTime"/>
        <result column="layout_status" property="layoutStatus"/>
        <!--接收其他外键实体类数据-->
        <association property="order" javaType="com.example.erp.entity.sd.Order">
            <result column="project" property="project"/>
@@ -56,18 +57,19 @@
        c.product_id,
        c.product_name,
        b.project,
        a.quantity,
        c.compute_gross_area,
        sum(a.quantity) as quantity,
        sum(c.compute_gross_area) as compute_gross_area,
        a.founder,
        c.processing_note
        c.processing_note,
        if(a.layout_status=0,"不可排版",if(a.layout_status=1,"可排版","已排版")) as layout_status
        from flow_card as a left join sd.`order` as b on a.order_Id=b.order_id
        left join sd.order_detail as c on a.order_Id=c.order_id and a.order_Number=c.order_number
        where a.create_time between #{selectTime1} and #{selectTime2}
                    <if test="flowCard.orderId != null and flowCard.orderId != ''">
                        and a.order_id regexp #{flowCard.orderId}
                    </if>
                    <if test="flowCard.productionId != null and flowCard.productionId != ''">
                        and a.process_Id regexp #{flowCard.productionId}
                    <if test="flowCard.processId != null and flowCard.processId != ''">
                        and a.process_Id regexp #{flowCard.processId}
                    </if>
                    <if test="flowCard.orderDetail.productId != null and flowCard.orderDetail.productId != ''">
                        and c.product_id regexp #{flowCard.orderDetail.productId}
@@ -111,7 +113,7 @@
            and b.project regexp #{flowCard.order.project}
        </if>
        ORDER BY a.id desc
        limit #{offset},#{pageSize};
    </select>
@@ -158,6 +160,7 @@
            and o.salesman regexp #{flowCard.order.salesman}
        </if>
        group by o.order_id
        order by o.id desc
        ;
    </select>
@@ -171,11 +174,13 @@
        SUM( od.quantity) as quantity,
        SUM(od.compute_gross_area) as compute_gross_area,
        od.perimeter
        from  sd.order_detail as od left join sd.order_glass_detail as ogd
        on od.order_id=ogd.order_id and od.order_number=ogd.order_number
        from  sd.order_detail as od left join
        (select order_id,order_number,production_id,splitting_status from sd.order_glass_detail
        GROUP BY order_id,order_number
        ) as ogd on od.order_id=ogd.order_id and od.order_number=ogd.order_number
        where od.order_id = #{orderId} and ogd.splitting_status=0
        <if test="flowCard.orderDetail.orderId != null and flowCard.orderDetail.orderId != ''">
            and od.order_id regexp #{flowCard.orderDetail.orderId}
        <if test="flowCard.orderId != null and flowCard.orderId != ''">
            and od.order_id regexp #{flowCard.orderId}
        </if>
        <if test="flowCard.orderGlassDetail.productionId != null and flowCard.orderGlassDetail.productionId != ''">
            and ogd.production_id regexp #{flowCard.orderGlassDetail.productionId}
@@ -187,6 +192,7 @@
            and od.product_name regexp #{flowCard.orderDetail.productName}
        </if>
        group by od.order_id, ogd.production_id
        order by od.id desc
    </select>
    <!--    更新分架状态-->
@@ -228,15 +234,15 @@
        left join sd.order_glass_detail as ogd on od.order_id=ogd.order_id and od.order_number=ogd.order_number
        left join sd.product as p on od.product_name=p.product_name
        where od.order_id=#{orderId} and ogd.production_id=#{productionId} and ogd.splitting_status=0
        GROUP BY od.order_number;
        GROUP BY od.order_number
        order by od.id desc
    </select>
    <!--修改排版状态-->
    <update id="updateLayoutStatusMp">
        update flow_card as fc
        set fc.layout_status=2
        set fc.layout_status=#{state}
        where fc.process_id = #{processId}
    </update>
@@ -322,7 +328,7 @@
        from sd.order_detail as od left join sd.order as o on od.order_id=o.order_id
                                   left join production_scheduling as ps on ps.order_id=od.order_id and ps.order_number=od.order_number
        where od.order_id=#{orderId} and ps.processes=#{processes} and ps.scheduling_id IS NOT NULL
        order by ps.id desc
    </select>
<!--    查询未排版数据-->
    <select id="selectNoSchedulingMp">
@@ -349,4 +355,8 @@
        where ogd.production_id = #{productionId}
          and ogd.order_number=#{orderNumber}
    </select>
<!--  查询该订单流程卡条数  -->
    <select id="selectFlowCardCount">
        select COUNT(*) from flow_card where order_id=#{orderId}
    </select>
</mapper>
north-glass-erp/target/classes/mapper/pp/PatchLogMapper.xml
@@ -46,7 +46,7 @@
        <where>
            date(r.create_time)>=#{startDate} and date(r.create_time) &lt;= #{endDate}
        </where>
         order by r.review_status
         order by r.review_status,r.id desc
        limit #{offset},#{pageSize};
    </select>
@@ -89,10 +89,20 @@
    </update>
    <update id="updateOrderProcessDetail"  >
        update sd.order_process_detail set reporting_work_num=reporting_work_num-#{patchLog.patchNum} where order_id=#{patchLog.orderId} and
        order_number=#{patchLog.orderSort} and technology_number=#{patchLog.technologyNumber} and id <![CDATA[<]]> (select a.opdid from(select id as opdid from
        sd.order_process_detail opd where opd.order_id=#{patchLog.orderId} and opd.order_number=#{patchLog.orderSort} and opd.technology_number=#{patchLog.technologyNumber}
        and process=#{patchLog.patchProcesses}) as a)
        update sd.order_process_detail
        set reporting_work_num=reporting_work_num - #{patchLog.patchNum}
        where order_id = #{patchLog.orderId}
          and process_id = #{patchLog.processId}
          and order_number = #{patchLog.orderSort}
          and technology_number = #{patchLog.technologyNumber}
          and id <![CDATA[<]]> (select a.opdid
                       from (select id as opdid
                             from sd.order_process_detail opd
                             where opd.order_id = #{patchLog.orderId}
                               and opd.process_id = #{patchLog.processId}
                               and opd.order_number = #{patchLog.orderSort}
                               and opd.technology_number = #{patchLog.technologyNumber}
                               and process = #{reportingWork.thisProcess}) as a)
    </update>
    <update id="updateDamageDetails"  >
@@ -118,6 +128,7 @@
               od.width,
               od.height,
               od.shape,
               dd.responsible_process as patchProcesses,
               dd.breakage_quantity-dd.quantity as breakageQuantity,
               dd.return_process as patchProcesses,
               dd.breakage_reason as patchReason,
@@ -126,7 +137,7 @@
               dd.responsible_equipment as responsibleEquipment,
               dd.responsible_team as responsibleTeam,
               ROUND((dd.breakage_quantity-dd.quantity) * od.width * od.height / 1000000, 2) as patchArea,
               rw.qualityIns_pector as qualityInsPector
               rw.quality_inspector as qualityInspector
        from pp.damage_details dd
                 left join    pp.reporting_work_detail rwd on dd.reporting_work_id = rwd.reporting_work_id and dd.order_number=rwd.order_number  and dd.technology_number=rwd.technology_number
                 left join pp.reporting_work rw on dd.reporting_work_id = rw.reporting_work_id
@@ -137,7 +148,7 @@
                           on rw.order_id = ogd.order_id and dd.order_number = ogd.order_number
        where  dd.breakage_quantity-dd.quantity>0 and dd.available=0 and (dd.responsible_process=rw.this_process or (dd.responsible_process!=rw.this_process and dd.qualityIns_status=1))
        order by dd.id desc
    </select>
north-glass-erp/target/classes/mapper/pp/ProductionScheduling.xml
@@ -42,123 +42,185 @@
    </resultMap>
<!--    查询已排版数据-->
    <select id="SelectOkSchedulingMp">
        select date(ps.scheduled_start_time) as scheduled_start_time,
               date(ps.plan_end_time) as plan_end_time,
               od.order_id,o.customer_name,o.project,od.order_number,od.width,od.height,od.quantity,
        round(od.width*od.height*od.quantity/1000000,2) as area,
        ps.scheduling_quantity,
#         (od.quantity-IFNULL(ps.scheduling_quantity,0)) as pendingProductionQuantity,
#         round(od.width*od.height*(od.quantity-IFNULL(ps.scheduling_quantity,0))/1000000,2) as pendingProductionArea,
        IFNULL(ps.scheduling_quantity,0) as productionScheduledQuantity,
        round(od.width*od.height*(IFNULL(ps.scheduling_quantity,0))/1000000,2) as productionScheduledArea,
        IF(ps.review_status=0,"未审核","已审核") as review_status,
        ps.reviewer,
        od.product_name,od.shape,ps.scheduling_id
    <!--    查询已排版数据-->
    <select id="selectOkSchedulingMp">
        select date(ps.scheduled_start_time)                          as scheduled_start_time,
               date(ps.plan_end_time)                                 as plan_end_time,
               od.order_id,
               o.customer_name,
               o.project,
               od.order_number,
               od.width,
               od.height,
               od.quantity,
               round(od.width * od.height * od.quantity / 1000000, 2) as area,
               ps.scheduling_quantity,
               (od.quantity - IFNULL(sum(ps.scheduling_quantity), 0)) as pendingProductionQuantity,
               round(od.width * od.height * (od.quantity - IFNULL(sum(ps.scheduling_quantity), 0)) / 1000000,
                     2)                                               as pendingProductionArea,
               IFNULL(ps.scheduling_quantity, 0)                      as productionScheduledQuantity,
               round(od.width * od.height * (IFNULL(ps.scheduling_quantity, 0)) / 1000000,
                     2)                                               as productionScheduledArea,
               IF(ps.review_status = 0, "未审核", "已审核")           as review_status,
               ps.reviewer,
               od.product_name,
               od.shape,
               ps.scheduling_id
        from sd.order_detail as od
            left join sd.order as o on od.order_id=o.order_id
            left join production_scheduling as ps on ps.order_id=od.order_id and ps.order_number=od.order_number
        where  ps.scheduling_id IS NOT NULL
           and od.create_time between #{selectTime1} and #{selectTime2}
                 left join sd.order as o on od.order_id = o.order_id
                 left join production_scheduling as ps
                           on ps.order_id = od.order_id and ps.order_number = od.order_number
        where ps.scheduling_id IS NOT NULL
          and od.create_time between #{selectTime1} and #{selectTime2}
          and position(#{processes} in ps.processes)
          and position(#{orderId} in ps.order_id)
        group by od.order_id, od.order_number
        order by ps.id desc
    </select>
    <!--    查询已排产带订单编号的数据-->
    <!--    查询已排产的数据-->
    <select id="selectSchedulingNotMp">
        select date(ps.scheduled_start_time) as scheduled_start_time,
        date(ps.plan_end_time) as plan_end_time,
        od.order_id,o.customer_name,o.project,od.order_number,od.width,od.height,od.quantity,
        round(od.width*od.height*od.quantity/1000000,2) as area,
        ps.scheduling_quantity,
#         (od.quantity-IFNULL(ps.scheduling_quantity,0)) as pendingProductionQuantity,
#         round(od.width*od.height*(od.quantity-IFNULL(ps.scheduling_quantity,0))/1000000,2) as pendingProductionArea,
        IFNULL(ps.scheduling_quantity,0) as productionScheduledQuantity,
        round(od.width*od.height*(IFNULL(ps.scheduling_quantity,0))/1000000,2) as productionScheduledArea,
        IF(ps.review_status=0,"未审核","已审核") as review_status,
        ps.reviewer,
        od.product_name,od.shape,ps.scheduling_id
        select date(ps.scheduled_start_time)                          as scheduled_start_time,
               date(ps.plan_end_time)                                 as plan_end_time,
               od.order_id,
               o.customer_name,
               o.project,
               od.order_number,
               od.width,
               od.height,
               od.quantity,
               round(od.width * od.height * od.quantity / 1000000, 2) as area,
               ps.scheduling_quantity,
               (od.quantity - IFNULL(sum(ps.scheduling_quantity), 0)) as pendingProductionQuantity,
               round(od.width * od.height * (od.quantity - IFNULL(sum(ps.scheduling_quantity), 0)) / 1000000, 2)
                                                                      as pendingProductionArea,
               IFNULL(ps.scheduling_quantity, 0)                      as productionScheduledQuantity,
               round(od.width * od.height * (IFNULL(ps.scheduling_quantity, 0)) / 1000000, 2)
                                                                      as productionScheduledArea,
               IF(ps.review_status = 0, "未审核", "已审核")
                                                                      as review_status,
               ps.reviewer,
               od.product_name,
               od.shape,
               ps.scheduling_id
        from sd.order_detail as od
        left join sd.order as o on od.order_id=o.order_id
        left join production_scheduling as ps on ps.order_id=od.order_id and ps.order_number=od.order_number
        where  (ps.scheduling_id IS NOT NULL )
                 left join sd.order as o on od.order_id = o.order_id
                 left join production_scheduling as ps
                           on ps.order_id = od.order_id and ps.order_number = od.order_number
        where (ps.scheduling_id IS NOT NULL)
          and position(#{processes} in ps.processes)
          and position(#{orderId} in ps.order_id)
        group by od.order_id, od.order_number
        order by ps.id desc
    </select>
<!--    查询未排产数据-->
    <select id="SelectNoSchedulingMp" >
        select od.order_id,o.customer_name,o.project,od.order_number,od.width,od.height,od.quantity,
        round(od.width*od.height*od.quantity/1000000,2) as area,
        (od.quantity-IFNULL(ps.scheduling_quantity,0)) as pendingProductionQuantity,
        round(od.width*od.height*(od.quantity-IFNULL(ps.scheduling_quantity,0))/1000000,2) as pendingProductionArea,
        IFNULL(ps.scheduling_quantity,0) as productionScheduledQuantity,
        round(od.width*od.height*(IFNULL(ps.scheduling_quantity,0))/1000000,2) as productionScheduledArea,
        od.product_name,od.shape
        from sd.order_detail as od left join sd.order as o on od.order_id=o.order_id
        left join production_scheduling as ps on ps.order_id=od.order_id and ps.order_number=od.order_number
        where   od.quantity-IFNULL(ps.scheduling_quantity,0)>0 and od.create_time between #{selectTime1} and #{selectTime2}
    <!--    查询未排产数据-->
    <select id="selectNoSchedulingMp">
        select od.order_id,
               o.customer_name,
               o.project,
               od.order_number,
               od.width,
               od.height,
               od.quantity,
               round(od.width * od.height * od.quantity / 1000000, 2) as area,
               (od.quantity - IFNULL(sum(ps.scheduling_quantity), 0)) as pendingProductionQuantity,
               round(od.width * od.height * (od.quantity - IFNULL(sum(ps.scheduling_quantity), 0)) / 1000000, 2)
                                                                      as pendingProductionArea,
               IFNULL(ps.scheduling_quantity, 0)                      as productionScheduledQuantity,
               round(od.width * od.height * (IFNULL(ps.scheduling_quantity, 0)) / 1000000,
                     2)                                               as productionScheduledArea,
               od.product_name,
               od.shape
        from sd.order_detail as od
                 left join sd.order as o on od.order_id = o.order_id
                 left join production_scheduling as ps
                           on ps.order_id = od.order_id and ps.order_number = od.order_number
        where (od.quantity - IFNULL((ps.scheduling_quantity), 0)) > 0
          and od.create_time between #{selectTime1} and #{selectTime2}
          and position(#{orderId} in ps.order_id)
    group by od.order_id,od.order_number
          and position(#{processes} in ps.processes)
        group by od.order_id, od.order_number
        order by ps.id desc
    </select>
<!--    首次查询排产数据-->
    <!--    首次查询排产数据-->
    <select id="selectLastSchedulingMp">
        select od.order_id,o.customer_name,o.project,od.order_number,od.width,od.height,od.quantity,
               round(od.width*od.height*od.quantity/1000000,2) as area,
               (od.quantity-IFNULL(sum(ps.scheduling_quantity),0)) as pendingProductionQuantity,
               round(od.width*od.height*(od.quantity-IFNULL(sum(ps.scheduling_quantity),0))/1000000,2) as pendingProductionArea,
               IFNULL(sum(ps.scheduling_quantity),0) as productionScheduledQuantity,
               round(od.width*od.height*(IFNULL(sum(ps.scheduling_quantity),0))/1000000,2) as productionScheduledArea,
               od.product_name,od.shape
        from sd.order_detail as od left join sd.order as o on od.order_id=o.order_id
                                   left join production_scheduling as ps on ps.order_id=od.order_id and ps.order_number=od.order_number
        where od.create_time between #{selectTime1} and #{selectTime2} and od.quantity-IFNULL(ps.scheduling_quantity,0)>0
        group by od.order_id,od.order_number
        select od.order_id,
               o.customer_name,
               o.project,
               od.order_number,
               od.width,
               od.height,
               od.quantity,
               round(od.width * od.height * od.quantity / 1000000, 2) as area,
               (od.quantity - IFNULL(sum(ps.scheduling_quantity), 0)) as pendingProductionQuantity,
               round(od.width * od.height * (od.quantity - IFNULL(sum(ps.scheduling_quantity), 0)) / 1000000,
                     2)                                               as pendingProductionArea,
               IFNULL(sum(ps.scheduling_quantity), 0)                 as productionScheduledQuantity,
               round(od.width * od.height * (IFNULL(sum(ps.scheduling_quantity), 0)) / 1000000,
                     2)                                               as productionScheduledArea,
               od.product_name,
               od.shape
        from sd.order_detail as od
                 left join sd.order as o on od.order_id = o.order_id
                 left join production_scheduling as ps
                           on ps.order_id = od.order_id and ps.order_number = od.order_number
        where od.create_time between #{selectTime1} and #{selectTime2}
          and (od.quantity - IFNULL((ps.scheduling_quantity), 0)) > 0
        group by od.order_id, od.order_number
        order by ps.id desc
    </select>
    <select id="selectMaxId">
        select
            COUNT(ps.scheduling_id)
        from
            `production_scheduling` as ps
        where
            date(ps.create_time) = curdate()
        select COUNT(ps.scheduling_id)
        from `production_scheduling` as ps
        where date(ps.create_time) = curdate()
    </select>
    <insert id="insertSelective">
        insert into production_scheduling(
               scheduling_id,
               order_id,
               order_number,
               processes,
               scheduling_quantity,
               scheduled_start_time,
               plan_end_time,
               notes,
               create_time
               )
        VALUES(
               #{schedulingId},
               #{orderId},
               #{orderNumber},
               #{processes},
               #{schedulingQuantity},
               #{scheduledStartTime},
               #{planEndTime},
               #{notes},
               now()
              )
        insert into production_scheduling(scheduling_id,
                                          order_id,
                                          order_number,
                                          processes,
                                          scheduling_quantity,
                                          scheduled_start_time,
                                          plan_end_time,
                                          notes,
                                          create_time)
        VALUES (#{schedulingId},
                #{orderId},
                #{orderNumber},
                #{processes},
                #{schedulingQuantity},
                #{scheduledStartTime},
                #{planEndTime},
                #{notes},
                now())
    </insert>
    <update id="ExamineSchedulingMp">
        update production_scheduling set review_status=1,reviewer=#{userName} where
        scheduling_id=#{schedulingId}
    <update id="examineSchedulingMp">
        update production_scheduling
        set review_status=1,
            reviewer=#{userName}
        where scheduling_id = #{schedulingId}
    </update>
    <delete id="deleteSchedulingMp">
        delete from production_scheduling where scheduling_id=#{schedulingId}
        delete
        from production_scheduling
        where scheduling_id = #{schedulingId}
    </delete>
    <select id="selectProcess">
        SELECT *
        FROM sd.basic_data as bd
        where bd.basic_category = 'process'
          and bd.basic_type = 'product'
    </select>
    <select id="selectNumberMp">
    </select>
</mapper>
north-glass-erp/target/classes/mapper/pp/ReworkMapper.xml
@@ -45,7 +45,7 @@
        <where>
            date(r.create_time)>=#{startDate} and date(r.create_time) &lt;= #{endDate}
        </where>
         order by r.review_status
         order by r.review_status,r.id desc
        limit #{offset},#{pageSize};
    </select>
@@ -88,7 +88,7 @@
               dd.responsible_equipment as responsibleEquipment,
               dd.responsible_team as responsibleTeam,
               ROUND((dd.breakage_quantity-dd.quantity) * od.width * od.height / 1000000, 2) as reworkArea,
               rw.qualityIns_pector as qualityInsPector
               rw.quality_inspector as qualityInspector
        from pp.damage_details dd
                 left join    pp.reporting_work_detail rwd on dd.reporting_work_id = rwd.reporting_work_id and dd.order_number=rwd.order_number  and dd.technology_number=rwd.technology_number
                 left join pp.reporting_work rw on dd.reporting_work_id = rw.reporting_work_id
@@ -98,7 +98,7 @@
                 left join (select * from sd.order_glass_detail group by order_id,order_number) as ogd
                           on rw.order_id = ogd.order_id and dd.order_number = ogd.order_number
        where  dd.breakage_quantity-dd.quantity>0 and dd.available=1 and dd.qualityIns_status=1
        where  dd.breakage_quantity-dd.quantity>0 and dd.available=1 and dd.qualityIns_status=1 order by dd.id
    </select>
@@ -123,7 +123,7 @@
    </insert>
    <update id="updateRework"  >
        update pp.rework set reviewer=#{userName},review_status=1,update_time=now() where rework_id=#{rework.id}
        update pp.rework set reviewer=#{userName},review_status=1,update_time=now() where id=#{rework.id}
    </update>
    <update id="updateDamageDetails"  >
north-glass-erp/target/classes/mapper/sd/Delivery.xml
@@ -122,7 +122,7 @@
                and fgi.quantity_available REGEXP #{order.finishedGoodsInventory.quantityAvailable}
            </if>
        </where>
        group by o.order_id
        group by o.order_id order by o.id desc
        limit #{offset},#{pageSize};
    </select>
north-glass-erp/target/classes/mapper/sd/DeliveryDetail.xml
@@ -81,7 +81,7 @@
        insert into sd.delivery_detail (delivery_id,delivery_number,order_number,
                                        area,order_id,quantity,money,delivery_detail_remakes,delivery_detail_state,create_time)
        values (
                   #{number} ,#{deliveryNumber},#{orderDetail.order_number},#{orderDetail.computeGrossArea},
                   #{number} ,#{deliveryNumber},#{orderDetail.orderNumber},#{orderDetail.computeGrossArea},
                #{orderDetail.orderId},#{orderDetail.deliveryDetail.quantity},
                #{orderDetail.price}*#{orderDetail.deliveryDetail.quantity},'',1,now()
               )
@@ -192,6 +192,7 @@
            </if>
        </where>
        order by dd.id desc
        limit #{offset},#{pageSize};
    </select>
north-glass-erp/target/classes/mapper/userInfo/SysMenu.xml
@@ -9,6 +9,7 @@
        from sys_menu as a
        where
            a.state=1
            and a.languageType = #{lang}
        order by a.listSort
        ;
    </select>
north-glass-erp/target/classes/mapper/userInfo/SysMenuItem.xml
@@ -9,6 +9,7 @@
        from `sys_menu_item` as a
        where
            a.state=1
           and a.languageType = #{lang}
        order by
            a.menuId,a.listSort
        ;