| | |
| | | <?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> |
| | |
| | | "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", |
| | |
| | | "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", |
| | |
| | | "@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", |
| | |
| | | "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", |
| | |
| | | "@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", |
| | |
| | | "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", |
New file |
| | |
| | | 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!' |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | |
| | | 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 |
New file |
| | |
| | | export default { |
| | | login:{ |
| | | userErr:'请输入你的账号', |
| | | pwErr:'请输入你的密码', |
| | | loginSuccessful:'登陆成功', |
| | | connectErr:'服务器连接失败', |
| | | user:'用户', |
| | | password:'密码', |
| | | SysName:'北玻自动化ERP管理系统', |
| | | login:'登陆', |
| | | register:'注册', |
| | | }, |
| | | main:{ |
| | | connectErr:'服务器连接异常,请稍后再试', |
| | | titleFirst:"欢迎 ", |
| | | titleLast:' 使用北玻ERP系统!' |
| | | }, |
| | | order:{ |
| | | |
| | | } |
| | | |
| | | } |
| | |
| | | <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() |
| | |
| | | |
| | | //提取模块列表 |
| | | let menuList=$ref([]) |
| | | request.get("/menu").then((res) => { |
| | | request.get(`/menu/getMenu/${lang}`).then((res) => { |
| | | if(res.code==200){ |
| | | menuList= deepClone(res.data) |
| | | }else{ |
| | |
| | | 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{ |
| | |
| | | <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> |
| | |
| | | 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() |
| | |
| | | app.use(ElementPlus,{ |
| | | locale: zhCn, |
| | | }) |
| | | app.use(i18n) |
| | | |
| | | app.mount('#app') |
| | |
| | | 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>() |
| | |
| | | |
| | | const validateUser = (rule: any, value: any, callback: any) => { |
| | | if (value === '') { |
| | | callback(new Error('请输入你的账号')) |
| | | callback(new Error(t('login.userErr'))) |
| | | } else { |
| | | callback() |
| | | } |
| | |
| | | |
| | | const validatePass = (rule: any, value: any, callback: any) => { |
| | | if (value === '') { |
| | | callback(new Error('请输入你的密码')) |
| | | callback(new Error(t('login.psErr'))) |
| | | } else { |
| | | callback() |
| | | } |
| | |
| | | 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 |
| | | }) |
| | |
| | | <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" |
| | |
| | | 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"> |
| | |
| | | :loading="registerLoadings" |
| | | type="primary" |
| | | @click="register" |
| | | >注册 |
| | | >{{$t('login.register')}} |
| | | </el-button> |
| | | <el-button |
| | | :loading="loginLoadings" |
| | |
| | | native-type="submit" |
| | | @click="submitForm(ruleFormRef)" |
| | | @keyup.enter.native="keyDown(e)" |
| | | >登录 |
| | | >{{$t('login.login')}} |
| | | </el-button> |
| | | |
| | | </el-form-item> |
| | |
| | | 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") |
| | |
| | | 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") |
| | |
| | | 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") |
| | |
| | | }) |
| | | 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") |
| | |
| | | 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") |
| | |
| | | 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 |
| | |
| | | </div> |
| | | |
| | | <div id="main-body"> |
| | | <router-view /> |
| | | <router-view :key="route.fullPath" /> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | // { 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' }}, |
| | |
| | | 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 }) { |
| | |
| | | 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) |
| | |
| | | { |
| | | 'name': '反审',status: 'primary', |
| | | 'code':'rework' |
| | | }, |
| | | { |
| | | 'name': '作废',status: 'primary', |
| | | 'code':'cancel' |
| | | }], |
| | | /*import: false, |
| | | export: true, |
| | |
| | | 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) |
| | |
| | | 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; |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | 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) |
| | |
| | | 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 |
| | |
| | | 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: {}, |
| | |
| | | {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: { |
| | |
| | | }, |
| | | //脚部求和 |
| | | 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) |
| | |
| | | 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") |
| | |
| | | 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 |
| | |
| | | </div> |
| | | |
| | | <div id="main-body"> |
| | | <router-view /> |
| | | <router-view :key="route.fullPath" /> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | 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: {}, |
| | |
| | | }, |
| | | //脚部求和 |
| | | footerMethod ({ columns, data }) {//页脚函数 |
| | | let footList=['processCardNumber','numberBroken'] |
| | | let footList=['patch_num','patch_area'] |
| | | return[ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | |
| | | const $table = xGrid.value |
| | | if ($table) { |
| | | const selectRecords = $table.getCheckboxRecords() |
| | | |
| | | if (selectRecords.length === 0) { |
| | | ElMessage.warning("未选中数据") |
| | | return |
| | | } |
| | | let flowData = ref({ |
| | | |
| | | userId:userid, |
| | |
| | | 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) |
| | |
| | | } |
| | | |
| | | 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 |
| | | } |
| | | |
| | | //定义时间 |
| | |
| | | |
| | | let orderId = route.query.orderId |
| | | let productionId = route.query.productionId |
| | | |
| | | |
| | | //第一次加载数据 |
| | | |
| | | request.post(`/processCard/selectNoCard/${orderId}/${productionId}`, filterData.value).then((res) => { |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | /*后端返回结果多层嵌套展示*/ |
| | | const hasDecimal = (value) => { |
| | | const regex = /\./; // 定义正则表达式,查找小数点 |
| | |
| | | |
| | | |
| | | //筛选方法 |
| | | const filterChanged = ({ option, row, column }) => { |
| | | const filterChanged = ({option, row, column}) => { |
| | | if (option.data) { |
| | | return row[column.field].toString().toLowerCase().indexOf(option.data) > -1 |
| | | } |
| | |
| | | useKey: true |
| | | }, |
| | | filterConfig: { //筛选配置项 |
| | | //remote: true |
| | | //remote: true |
| | | }, |
| | | customConfig: { |
| | | storage: true |
| | |
| | | },//表头参数 |
| | | 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: '重量'} |
| | | ],//表头按钮 |
| | | |
| | |
| | | data: [],//table body实际数据 |
| | | //脚部求和 |
| | | footerMethod({columns, data}) {//页脚函数 |
| | | let footList = ['baiscQuantity', 'computeGrossArea', 'totalThickness','thickness', 'weight'] |
| | | let footList = ['', '', '', '', ''] |
| | | return [ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | |
| | | } |
| | | |
| | | }) |
| | | |
| | | |
| | | //左侧子组件接收参数 |
| | | const xGridLeft = ref() |
| | |
| | | useKey: true |
| | | }, |
| | | filterConfig: { //筛选配置项 |
| | | //remote: true |
| | | //remote: true |
| | | }, |
| | | customConfig: { |
| | | storage: true |
| | |
| | | },//表头参数 |
| | | 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: '总数量'}, |
| | |
| | | data: [],//table body实际数据 |
| | | //脚部求和 |
| | | footerMethod({columns, data}) {//页脚函数 |
| | | let footList = ['总数量', '总面积', '分箱数'] |
| | | let footList = [''] |
| | | return [ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | |
| | | const createProcessCard = () => { |
| | | const $grid = xGrid.value |
| | | const checkedList = $grid.getCheckboxRecords() |
| | | |
| | | if (checkedList.length === 0) { |
| | | ElMessage.warning("请先选择右侧数据") |
| | | return |
| | |
| | | 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('') |
| | |
| | | } else { |
| | | //右边表格没有此条数据则往右边表格插入数据 |
| | | item.baiscQuantity = checkedNum.value |
| | | if (item.quantity === 0) { |
| | | $gridLeft.remove(item) |
| | | } |
| | | $grid.insert(item) |
| | | } |
| | | }) |
| | |
| | | |
| | | $gridLeft.remove(item) |
| | | }) |
| | | } |
| | | |
| | | |
| | | } |
| | | $gridLeft.clearCheckboxRow() |
| | | $grid.clearCheckboxRow() |
| | | } catch (e) { |
| | | ElMessage.warning(e.message) |
| | | } |
| | |
| | | //获取左边表格checkbox选中的数据 |
| | | const checkedListLeft = $gridLeft.getCheckboxRecords() |
| | | //判断右边表格是否有选中的数据 |
| | | if (checkedList.length === 0) { |
| | | if (checkedList.length * 1 === 0) { |
| | | ElMessage.warning("请先选择右侧数据") |
| | | return |
| | | } |
| | |
| | | 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 = { |
| | |
| | | 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 { |
| | |
| | | <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" |
| | | > |
| | |
| | | </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> |
| | |
| | | </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> |
| | |
| | | height: 100%; |
| | | } |
| | | |
| | | .header{ |
| | | .header { |
| | | width: 100%; |
| | | height: 35px; |
| | | margin-top: -20px; |
| | |
| | | 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() |
| | |
| | | |
| | | //工序 |
| | | const value = ref('') |
| | | const options = [ |
| | | { |
| | | value: '切割', |
| | | label: '切割', |
| | | }, |
| | | { |
| | | value: '磨边', |
| | | label: '磨边', |
| | | }, |
| | | { |
| | | value: '钢化', |
| | | label: '钢化', |
| | | }, |
| | | ] |
| | | |
| | | |
| | | //排产状态 |
| | | const stateValue = ref('1') |
| | |
| | | const form = reactive({ |
| | | date1: '', |
| | | orderId: '' |
| | | }) |
| | | |
| | | //定义接收加载表头下拉数据 |
| | | const titleSelectJson = ref({ |
| | | processType: [], |
| | | }) |
| | | |
| | | |
| | |
| | | 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 |
| | |
| | | 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) => { |
| | |
| | | useKey: true |
| | | }, |
| | | filterConfig: { //筛选配置项 |
| | | remote: true |
| | | // remote: true |
| | | }, |
| | | customConfig: { |
| | | storage: true |
| | |
| | | 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}, |
| | | { |
| | |
| | | |
| | | <el-input v-model="form.orderId" placeholder="销售单号" clearable style="width: 110px"></el-input> |
| | | |
| | | <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> |
| | | |
| | |
| | | |
| | | 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 |
| | |
| | | //定义数据返回结果 |
| | | let produceList = ref([]) |
| | | //定义当前页数 |
| | | let pageNum = $ref(1) |
| | | let pageNum=ref(1) |
| | | let pageState = null |
| | | |
| | | //获取七天前到当前时间 |
| | |
| | | } |
| | | }) |
| | | |
| | | //页脚翻页查询 |
| | | 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 = () => { |
| | | |
| | |
| | | const handlePageChange = ({ currentPage, pageSize }) => { |
| | | pageNum.value=currentPage |
| | | total.pageTotal = pageSize |
| | | selectOrderList() |
| | | selectPageList() |
| | | } |
| | | |
| | | /*使用筛选,后端获取数据*/ |
| | |
| | | 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 |
| | |
| | | },//表头参数 |
| | | 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: { |
| | |
| | | </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> |
| | | |
| | |
| | | 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) |
| | |
| | | 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: {}, |
| | |
| | | {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: { |
| | |
| | | }, |
| | | //脚部求和 |
| | | footerMethod({columns, data}) {//页脚函数 |
| | | let footList = ['total', 'TotalArea'] |
| | | let footList = ['reworkNum', 'breakageQuantity'] |
| | | return [ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | |
| | | 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") |
| | |
| | | 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 |
| | |
| | | </div> |
| | | |
| | | <div id="main-body"> |
| | | <router-view /> |
| | | <router-view :key="route.fullPath" /> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | 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 |
| | | |
| | |
| | | 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: {}, |
| | |
| | | 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 '' |
| | | }) |
| | | ] |
| | |
| | | //gridOptions.columns.unshift(a) |
| | | if ($table) { |
| | | const selectRecords = $table.getCheckboxRecords() |
| | | |
| | | if (selectRecords.length === 0) { |
| | | ElMessage.warning("未选中数据") |
| | | return |
| | | } |
| | | let flowData = ref({ |
| | | |
| | | userId:userid, |
| | |
| | | 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) |
| | |
| | | |
| | | let productGlassTypeStore = useProductGlassTypeStore() |
| | | let router = useRouter() |
| | | let isButtonDisabled=false |
| | | |
| | | const getTableRow = (row, type) => { |
| | | switch (type) { |
| | | case 'edit' : { |
| | |
| | | |
| | | //获取七天前到当前时间 |
| | | 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天前 |
| | |
| | | }) |
| | | |
| | | //点击查询 |
| | | 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 |
| | |
| | | </el-select> |
| | | |
| | | <el-button |
| | | @click="getWorkOrder" |
| | | @click="getWorkOrder(isButtonDisabled)" |
| | | :disabled="isButtonDisabled" |
| | | id="select" |
| | | type="primary" :icon="Search">查询 |
| | | </el-button> |
| | |
| | | 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 |
| | |
| | | </el-breadcrumb> |
| | | </div> |
| | | <div id="main-body"> |
| | | <router-view /> |
| | | <router-view :key="route.fullPath" /> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | 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") |
| | |
| | | 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") |
| | |
| | | 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") |
| | |
| | | <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 |
| | |
| | | </div> |
| | | |
| | | <div id="main-body"> |
| | | <router-view /> |
| | | <router-view :key="route.fullPath" /> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | |
| | | } |
| | | } |
| | | |
| | | /*订单作废*/ |
| | | @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,"领出失败"); |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | 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,"修改失败"); |
| | |
| | | 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.*; |
| | | |
| | |
| | | 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, |
| | |
| | | |
| | | } |
| | | //点击查询排版数据 |
| | | @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, |
| | |
| | | } |
| | | |
| | | //添加排产数据 |
| | | @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,"保存失败"); |
| | |
| | | } |
| | | |
| | | //删除排产数据 |
| | | @ApiOperation("删除排产数据接口") |
| | | @PostMapping("/deleteScheduling") |
| | | public Result deleteScheduling( @RequestBody Map<String,Object> object) throws Exception{ |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | @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,"审核失败"); |
| | |
| | | return Result.seccess(); |
| | | |
| | | }else { |
| | | throw new ServiceException(Constants.Code_500,"返工失败"); |
| | | throw new ServiceException(Constants.Code_500,"补片失败"); |
| | | |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | @ApiOperation("审核接口") |
| | | @ApiOperation("返工审核接口") |
| | | @PostMapping("/updateRework") |
| | | public Result updateRework( @RequestBody Map<String,Object> object){ |
| | | if(reworkService.updateRework(object)){ |
| | |
| | | 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.*; |
| | | |
| | |
| | | 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, |
| | |
| | | } |
| | | |
| | | //转生产订单查询 |
| | | @ApiOperation("转生产订单查询接口") |
| | | @PostMapping ("/addWork/{orderId}") |
| | | |
| | | public Result addWork( |
| | | @PathVariable String orderId, |
| | | @RequestBody OrderDetail orderDetail){ |
| | |
| | | |
| | | |
| | | //添加工单 |
| | | @ApiOperation("添加工单接口") |
| | | @PostMapping("/addOrderWork") |
| | | public Result addOrderWork( @RequestBody Map<String,Object> object){ |
| | | |
| | |
| | | } |
| | | |
| | | //删除工单 |
| | | @ApiOperation("删除工单接口") |
| | | @PostMapping("/deleteOrderWork/{orderId}/{productName}") |
| | | public Result deleteOrderWork( |
| | | @PathVariable String orderId, |
| | |
| | | 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; |
| | | |
| | |
| | | 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)); |
| | | |
| | | } |
| | | } |
| | |
| | | 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)); |
| | | } |
| | | } |
| | |
| | | //已优化数量 |
| | | private Integer optimizeQuantity; |
| | | //排版状态 |
| | | private Integer layoutStatus; |
| | | private String layoutStatus; |
| | | //补片数量 |
| | | private Integer numberPatches; |
| | | //库存数量 |
| | |
| | | private String orderId; |
| | | //订单序号 |
| | | private String orderNumber; |
| | | //小片顺序 |
| | | private String technologyNumber; |
| | | //排产工序 |
| | | private String processes; |
| | | //排产数量 |
| | |
| | | Boolean updateToExamine(@Param("finishedOperateLog") FinishedOperateLog finishedOperateLog, |
| | | @Param("userName") String userName, |
| | | @Param("type") String type); |
| | | |
| | | Boolean updateFinishedOperateLogState(@Param("finishedOperateLog") FinishedOperateLog finishedOperateLog,@Param("type") String type); |
| | | } |
| | |
| | | |
| | | List<BasicDataProduce> SelectWorkBasicTeamsMp(String process); |
| | | |
| | | List<BasicDataProduce> SelectWorkBasicTeams(); |
| | | List<BasicDataProduce> SelectWorkBasicTeams(String process); |
| | | } |
| | |
| | | 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); |
| | | |
| | |
| | | Integer selectLayer(String productionId, Integer orderNumber); |
| | | |
| | | |
| | | Integer selectFlowCardCount(String orderId); |
| | | } |
| | |
| | | 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; |
| | |
| | | |
| | | 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); |
| | | |
| | |
| | | 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; |
| | |
| | | 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); |
| | | |
| | |
| | | |
| | | 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); |
| | | } |
| | |
| | | @Mapper |
| | | public interface SysMenuItemMapper { |
| | | |
| | | List<SysMenuItem> findAll() ; |
| | | List<SysMenuItem> findAll(String lang) ; |
| | | } |
| | |
| | | @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); |
| | | } |
| | |
| | | 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); |
| | | //修改发货表状态 |
| | |
| | | |
| | | } |
| | | |
| | | 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; |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | //流程卡管理查询 |
| | | 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; |
| | | } |
| | | |
| | |
| | | //删除流程卡 |
| | | 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; |
| | |
| | | |
| | | |
| | | //修改排版状态 |
| | | 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 { |
| | |
| | | //查询每个序号的层数 |
| | | 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()); |
| | | //查询该订单未分架数量 |
| | |
| | | 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())); |
| | | |
| | | |
| | | //赋值订单工艺表 |
| | |
| | | } |
| | | } |
| | | |
| | | 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)); |
| | | |
| | | } |
| | | |
| | |
| | | @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=""; |
| | |
| | | } |
| | | |
| | | 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)); |
| | | |
| | | } |
| | | |
| | |
| | | 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; |
| | | } |
| | | |
| | |
| | | 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(); |
| | |
| | | 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()); |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | 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(); |
| | |
| | | |
| | | 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; |
| | |
| | | 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; |
| | |
| | | @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) { |
| | |
| | | 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); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | |
| | | 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); |
| | |
| | | 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); |
| | |
| | | //新增发货表数据 |
| | | deliveryMapper.insertDelivery(delivery, oddNumber, orderDetaillist.get(0).getOrderId()); |
| | | } |
| | | |
| | | System.out.println(4); |
| | | Double area = 0.0; |
| | | Integer quantity = 0; |
| | | Double money = 0.0; |
| | |
| | | public class SysMenuItemService { |
| | | @Autowired |
| | | SysMenuItemMapper sysMenuItemMapper; |
| | | public List<SysMenuItem> getMenuItem() { |
| | | return sysMenuItemMapper.findAll(); |
| | | public List<SysMenuItem> getMenuItem(String lang) { |
| | | return sysMenuItemMapper.findAll(lang); |
| | | } |
| | | } |
| | |
| | | @Autowired |
| | | private SysMenuMapper sysMenuMapper; |
| | | |
| | | public List<SysMenu> getMenu(){ |
| | | public List<SysMenu> getMenu(String lang){ |
| | | |
| | | return sysMenuMapper.findAll(); |
| | | return sysMenuMapper.findAll(lang); |
| | | } |
| | | } |
| | |
| | | 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, |
| | |
| | | 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) <= #{endDate} |
| | |
| | | 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) <= #{endDate} |
| | |
| | | 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> |
| | |
| | | <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"/> |
| | |
| | | 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} |
| | |
| | | and b.project regexp #{flowCard.order.project} |
| | | </if> |
| | | |
| | | |
| | | ORDER BY a.id desc |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | |
| | | and o.salesman regexp #{flowCard.order.salesman} |
| | | </if> |
| | | group by o.order_id |
| | | order by o.id desc |
| | | |
| | | ; |
| | | </select> |
| | |
| | | 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} |
| | |
| | | and od.product_name regexp #{flowCard.orderDetail.productName} |
| | | </if> |
| | | group by od.order_id, ogd.production_id |
| | | order by od.id desc |
| | | </select> |
| | | |
| | | <!-- 更新分架状态--> |
| | |
| | | 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> |
| | | |
| | |
| | | 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"> |
| | |
| | | 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> |
| | |
| | | <where> |
| | | date(r.create_time)>=#{startDate} and date(r.create_time) <= #{endDate} |
| | | </where> |
| | | order by r.review_status |
| | | order by r.review_status,r.id desc |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | |
| | | </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" > |
| | |
| | | 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, |
| | |
| | | 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 |
| | |
| | | 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> |
| | | |
| | | |
| | |
| | | </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> |
| | |
| | | <where> |
| | | date(r.create_time)>=#{startDate} and date(r.create_time) <= #{endDate} |
| | | </where> |
| | | order by r.review_status |
| | | order by r.review_status,r.id desc |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | |
| | | 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 |
| | |
| | | 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> |
| | | |
| | |
| | | </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" > |
| | |
| | | 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> |
| | | |
| | |
| | | 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() |
| | | ) |
| | |
| | | </if> |
| | | |
| | | </where> |
| | | order by dd.id desc |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | |
| | | from sys_menu as a |
| | | where |
| | | a.state=1 |
| | | and a.languageType = #{lang} |
| | | order by a.listSort |
| | | ; |
| | | </select> |
| | |
| | | from `sys_menu_item` as a |
| | | where |
| | | a.state=1 |
| | | and a.languageType = #{lang} |
| | | order by |
| | | a.menuId,a.listSort |
| | | ; |
| | |
| | | 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, |
| | |
| | | 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) <= #{endDate} |
| | |
| | | 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) <= #{endDate} |
| | |
| | | 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> |
| | |
| | | <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"/> |
| | |
| | | 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} |
| | |
| | | and b.project regexp #{flowCard.order.project} |
| | | </if> |
| | | |
| | | |
| | | ORDER BY a.id desc |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | |
| | | and o.salesman regexp #{flowCard.order.salesman} |
| | | </if> |
| | | group by o.order_id |
| | | order by o.id desc |
| | | |
| | | ; |
| | | </select> |
| | |
| | | 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} |
| | |
| | | and od.product_name regexp #{flowCard.orderDetail.productName} |
| | | </if> |
| | | group by od.order_id, ogd.production_id |
| | | order by od.id desc |
| | | </select> |
| | | |
| | | <!-- 更新分架状态--> |
| | |
| | | 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> |
| | | |
| | |
| | | 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"> |
| | |
| | | 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> |
| | |
| | | <where> |
| | | date(r.create_time)>=#{startDate} and date(r.create_time) <= #{endDate} |
| | | </where> |
| | | order by r.review_status |
| | | order by r.review_status,r.id desc |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | |
| | | </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" > |
| | |
| | | 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, |
| | |
| | | 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 |
| | |
| | | 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> |
| | | |
| | | |
| | |
| | | </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> |
| | |
| | | <where> |
| | | date(r.create_time)>=#{startDate} and date(r.create_time) <= #{endDate} |
| | | </where> |
| | | order by r.review_status |
| | | order by r.review_status,r.id desc |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | |
| | | 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 |
| | |
| | | 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> |
| | | |
| | |
| | | </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" > |
| | |
| | | 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> |
| | | |
| | |
| | | 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() |
| | | ) |
| | |
| | | </if> |
| | | |
| | | </where> |
| | | order by dd.id desc |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | |
| | | from sys_menu as a |
| | | where |
| | | a.state=1 |
| | | and a.languageType = #{lang} |
| | | order by a.listSort |
| | | ; |
| | | </select> |
| | |
| | | from `sys_menu_item` as a |
| | | where |
| | | a.state=1 |
| | | and a.languageType = #{lang} |
| | | order by |
| | | a.menuId,a.listSort |
| | | ; |