Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override
| | |
| | | <?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> |
| | |
| | | { |
| | | 'name': '反审',status: 'primary', |
| | | 'code':'rework' |
| | | }, |
| | | { |
| | | 'name': '作废',status: 'primary', |
| | | 'code':'cancel' |
| | | }], |
| | | /*import: false, |
| | | export: true, |
| | |
| | | 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; |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | <script setup> |
| | | import {computed, nextTick, onMounted, reactive, ref, toRefs} from "vue"; |
| | | import {useRouter} from 'vue-router' |
| | | import {useRouter,useRoute} from 'vue-router' |
| | | import request from "@/utils/request"; |
| | | import {ElMessage} from "element-plus"; |
| | | import {changeFilterEvent, filterChanged} from "@/hook" |
| | |
| | | let brokenVisible = ref(false) |
| | | const xGrid = ref() |
| | | const brokenGrid =ref() |
| | | let router = useRouter() |
| | | const router = useRouter() |
| | | const route = useRoute() |
| | | const user=userInfo() |
| | | |
| | | //定义表头数据 |
| | | const titleUploadData = ref({ |
| | | //流程卡号 |
| | | processId: 'NG24030701B01/1', |
| | | processId: 'NG24030804A02/1', |
| | | //销售单号 |
| | | orderId: '', |
| | | reviewedState:0, |
| | | //生产单号 |
| | | productionId: '', |
| | | //设备类型 |
| | |
| | | |
| | | }) |
| | | |
| | | |
| | | onMounted(() =>{ |
| | | if(route.query.processId !== undefined && route.query.processId!=='' && route.query.processId!=null ){ |
| | | titleUploadData.value.processId = route.query.processId |
| | | } |
| | | //判断是否传入报工编号 |
| | | if(route.query.reportingWorkId!== undefined && route.query.reportingWorkId!=='' && route.query.reportingWorkId!=null){ |
| | | request.post(`reportingWork/selectUpdateReportingWork/${route.query.reportingWorkId}`).then(res=>{ |
| | | if(res.code === '200'){ |
| | | titleUploadData.value = res.data.reportingWork |
| | | console.log(res.data) |
| | | xGrid.value.reloadData(res.data.reportingWorkDetails) |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | |
| | | |
| | | //表尾求和 |
| | | const sumNum = (list, field) => { |
| | | let count = 0 |
| | |
| | | |
| | | |
| | | const optionVal = ref('') |
| | | const options = [ |
| | | { |
| | | value: '切割', |
| | | label: '切割', |
| | | }, |
| | | { |
| | | value: '磨边', |
| | | label: '磨边', |
| | | }, |
| | | { |
| | | value: '钢化', |
| | | label: '钢化', |
| | | }, |
| | | ] |
| | | |
| | | //班次 |
| | | const classesVal = ref('早班') |
| | |
| | | showOverflow: "ellipsis", |
| | | filterMethod: filterChanged |
| | | }, |
| | | {field: 'quantity', title: '上工完工数量',}, |
| | | {field: 'quantity', title: '可报数量',}, |
| | | { |
| | | field: 'completedQuantity', title: '完工数量', |
| | | field: 'completedQuantity', title: '完工数量',width: 120, |
| | | editRender: { |
| | | name: 'input', |
| | | attrs: {placeholder: ''}, |
| | | attrs: {placeholder: ''} |
| | | }, |
| | | |
| | | }, |
| | |
| | | // {code: 'sameDamage', name: '次破相同'}, |
| | | // {code: 'sameOneCompletion', name: '完工一列相同'}, |
| | | // {code: 'sameOneDamage', name: '次破一列相同'}, |
| | | {code: 'saveReportingWork', name: '保存', status: 'primary', icon: 'vxe-icon-save'}, |
| | | {code: 'print_lck', name: '保存并审核', status: 'primary', icon: 'vxe-icon-save'}, |
| | | {code: 'saveReportingWork', name: '保存', status: 'primary', icon: 'vxe-icon-save',disabled:true}, |
| | | {code: 'saveReportingWorkReview', name: '保存并审核', status: 'primary', icon: 'vxe-icon-save',disabled:true}, |
| | | ], |
| | | // import: false, |
| | | // export: true, |
| | |
| | | if ($grid) { |
| | | switch (code) { |
| | | case 'saveReportingWork': { |
| | | if($grid.getTableData().fullData.length===0){ |
| | | ElMessage.warning(`请选择流程卡数据`) |
| | | return false |
| | | } |
| | | const device = titleUploadData.value.deviceName |
| | | if(device === null || device === undefined || device === ''){ |
| | | ElMessage.error('请选择报工设备!') |
| | | return |
| | | } |
| | | const teamsGroupsName = titleUploadData.value.teamsGroupsName |
| | | if(teamsGroupsName === null || teamsGroupsName === undefined || teamsGroupsName === ''){ |
| | | ElMessage.error('请选择报工设备!') |
| | | return |
| | | } |
| | | const errMap = await $grid.validate(true) |
| | | if (errMap) { |
| | | ElMessage.error(`校验不通过!`) |
| | | return |
| | | } |
| | | saveReportingWork() |
| | | saveReportingWork(0) |
| | | break |
| | | } |
| | | case 'saveReportingWorkReview': { |
| | | const errMap = await $grid.validate(true) |
| | | if (errMap) { |
| | | ElMessage.error(`校验不通过!`) |
| | | return |
| | | } |
| | | saveReportingWork(1) |
| | | break |
| | | } |
| | | } |
| | |
| | | |
| | | |
| | | const checkClose = async (done) => { |
| | | if(brokenGrid.value.getTableData().fullData.length===0){ |
| | | done() |
| | | return true |
| | | } |
| | | const errMap = await brokenGrid.value.validate(true) |
| | | if (errMap) { |
| | | ElMessage.error(`校验不通过!`) |
| | |
| | | }) |
| | | |
| | | let reportingWorkNum = isNaN(brokenRow.value.completedQuantity*1)?0:brokenRow.value.completedQuantity*1 |
| | | if(breakageQuantityCount+reportingWorkNum>brokenRow.value.quantity*1){ |
| | | if((breakageQuantityCount+reportingWorkNum>brokenRow.value.quantity*1) ){ |
| | | ElMessage.warning(`损耗数:'${breakageQuantityCount}' |
| | | 完工数:'${reportingWorkNum}'之和${breakageQuantityCount+reportingWorkNum} |
| | | 不能大于${brokenRow.value.quantity*1}`) |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | //第一次加载数据 |
| | | |
| | | request.post(`/reportingWork/selectProcess`).then((res) => { |
| | |
| | | } |
| | | }) |
| | | |
| | | const saveReportingWork = () => { |
| | | const saveReportingWork = (type) => { |
| | | |
| | | if(xGrid.value.getTableData().fullData.length===0){ |
| | | ElMessage.warning(`请选择流程卡数据`) |
| | | return false |
| | | } |
| | | const device = titleUploadData.value.deviceName |
| | | if(device === null || device === undefined || device === ''){ |
| | | ElMessage.error('请选择报工设备!') |
| | | return |
| | | } |
| | | const teamsGroupsName = titleUploadData.value.teamsGroupsName |
| | | if(teamsGroupsName === null || teamsGroupsName === undefined || teamsGroupsName === ''){ |
| | | ElMessage.error('请选择报工设备!') |
| | | return |
| | | } |
| | | |
| | | titleUploadData.value.creator = user.user.userName |
| | | titleUploadData.value.creatorId = user.user.userId |
| | |
| | | |
| | | const requestData = { |
| | | title:titleUploadData.value, |
| | | detail:xGrid.value.getTableData().fullData |
| | | detail:xGrid.value.getTableData().fullData, |
| | | type:type//审核状态 |
| | | } |
| | | gridOptions.toolbarConfig.buttons[0].disabled=true |
| | | gridOptions.toolbarConfig.buttons[1].disabled=true |
| | | request.post(`/reportingWork/saveReportingWork`,requestData).then(res =>{ |
| | | if (res.code == 200){ |
| | | ElMessage.success("报工成功") |
| | | router.push({path:'/main/reportingWorks/AddReportingWork',query:{random:Math.random()}}) |
| | | router.push({path:'/main/reportingWorks/AddReportingWork',query:{processId:titleUploadData.value.processId,random:Math.random()}}) |
| | | }else{ |
| | | ElMessage.error(res.msg) |
| | | const errorObj = JSON.parse(res.msg) |
| | | const msg = "序号:"+errorObj.orderNumber+'\n' |
| | | +'小片顺序:'+errorObj.technologyNumber+'\n' |
| | | +"实际可报工数量:"+errorObj.processNum+'<'+ |
| | | "报工数量:"+errorObj.sumNum+'\n' |
| | | +"请刷新界面重新报工" |
| | | |
| | | ElMessage.error(msg) |
| | | } |
| | | }).catch(err =>{ |
| | | ElMessage.error(err.message) |
| | | }).finally(()=>{ |
| | | gridOptions.toolbarConfig.buttons[0].disabled=false |
| | | gridOptions.toolbarConfig.buttons[1].disabled=false |
| | | }) |
| | | } |
| | | |
| | |
| | | } |
| | | }) |
| | | |
| | | let loadingFlag = ref(false) |
| | | let disabledFlag = ref(true) |
| | | const reviewReportingWork = () => { |
| | | const processId = titleUploadData.value.processId |
| | | if (processId.indexOf("/") < 0) { |
| | | ElMessage.warning("请输入正确格式流程卡") |
| | | return |
| | | } |
| | | let indexOfChar = processId.indexOf("/") |
| | | let leftString = processId.slice(0, indexOfChar) |
| | | if (leftString.length !== 13) { |
| | | ElMessage.warning("请输入正确位数的流程卡") |
| | | return |
| | | } |
| | | //工序 |
| | | let process = titleUploadData.value.thisProcess |
| | | if (process === "" || process == null) { |
| | | ElMessage.warning("请选择工序") |
| | | return |
| | | } |
| | | if(titleUploadData.value.previousProcess===''){ |
| | | ElMessage.warning("第一道工序不需要审核") |
| | | return |
| | | } |
| | | const reportWork = { |
| | | process: titleUploadData.value.previousProcess, |
| | | processId:processId |
| | | } |
| | | loadingFlag.value= true |
| | | request.post("/reportingWork/reviewReportingWork",reportWork).then((res) =>{ |
| | | if(res.code === '200'){ |
| | | ElMessage.success("审核成功") |
| | | router.push({path:'/main/reportingWorks/AddReportingWork', |
| | | query:{ |
| | | processId:titleUploadData.value.processId, |
| | | random:Math.random() |
| | | } |
| | | }) |
| | | } |
| | | }).finally( |
| | | loadingFlag.value= false |
| | | ) |
| | | |
| | | } |
| | | |
| | | |
| | | //下拉款选择工序时查询 |
| | | const getWork = () => { |
| | |
| | | //工序 |
| | | let process = titleUploadData.value.thisProcess |
| | | if (process == "" || process == null) { |
| | | |
| | | ElMessage.warning("请选择工序") |
| | | return |
| | | } |
| | |
| | | |
| | | request.post(`/reportingWork/addSelectLastWork/${processIdStr}/${technologyStr}/${process}`).then((res) => { |
| | | if (res.code == 200) { |
| | | if(res.data.data===null){ |
| | | ElMessage.error("未查询到此流程卡数据") |
| | | return |
| | | } |
| | | //表头赋值 |
| | | titleUploadData.value = res.data.data |
| | | titleUploadData.value.processId = processId |
| | |
| | | titleSelectJson.value.breakageType = res.data.breakageType |
| | | //次破原因 |
| | | titleSelectJson.value.breakageReason = res.data.breakageReason |
| | | //console.log(res.data) |
| | | if(titleUploadData.value.reviewedState==1){ |
| | | gridOptions.toolbarConfig.buttons[0].disabled=false |
| | | gridOptions.toolbarConfig.buttons[1].disabled=false |
| | | disabledFlag.value=true |
| | | }else { |
| | | gridOptions.toolbarConfig.buttons[0].disabled=true |
| | | gridOptions.toolbarConfig.buttons[1].disabled=true |
| | | disabledFlag.value=false |
| | | } |
| | | |
| | | //判断早晚班 |
| | | titleUploadData.value.classes='早班' |
| | | |
| | | |
| | | titleUploadData.value.reportingWorkTime = formatCurrentTime() |
| | | //绑定下方表格 |
| | | detail.value = res.data.Detail |
| | |
| | | let hours = dateObj.getHours().toString().padStart(2, '0'); // 小时 |
| | | let minutes = dateObj.getMinutes().toString().padStart(2, '0'); // 分钟 |
| | | let seconds = dateObj.getSeconds().toString().padStart(2, '0'); // 秒数 |
| | | if(parseInt(hours)>=17)titleUploadData.value.classes='晚班' |
| | | if(parseInt(hours)>=17 && parseInt(hours)<8)titleUploadData.value.classes='晚班' |
| | | return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; // 返回格式化后的时间字符串 |
| | | } |
| | | |
| | | const ptypeChangeEvent = (row) => { |
| | | // for (let i = 0; i < row.length; i++){ |
| | | // |
| | | // let process=row[i].responsibleProcess |
| | | // } |
| | | const editClosedEvent = ({ row, column }) => { |
| | | if (column.property==='completedQuantity') { |
| | | xGrid.value.getTableData().fullData.forEach((item, index) =>{ |
| | | if(item.order_number===row.order_number){ |
| | | item.completedQuantity=row.completedQuantity |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | |
| | | /> |
| | | </el-select> |
| | | |
| | | <el-button type="primary">审核通过</el-button> |
| | | <el-button type="primary">审核不通过</el-button> |
| | | <el-button :disabled="disabledFlag" :loading="loadingFlag" @click="reviewReportingWork" type="primary">审核通过</el-button> |
| | | <!-- <el-button type="primary">审核不通过</el-button>--> |
| | | |
| | | <label>流程卡面积:xxx平方米</label> |
| | | </div> |
| | |
| | | <el-text>可报工数量:</el-text> |
| | | </el-col> |
| | | <el-col :span="2"> |
| | | <el-text>{{ titleUploadData.flowCard.quantity }}</el-text> |
| | | <el-text>{{ titleUploadData.previousProcessQuantity }}</el-text> |
| | | |
| | | </el-col> |
| | | <el-col :span="2"> |
| | |
| | | v-bind="gridOptions" |
| | | v-on="gridEvents" |
| | | @filter-change="filterChanged" |
| | | @edit-closed="editClosedEvent" |
| | | |
| | | > |
| | | |
| | |
| | | deliveryId: route.query.deliveryID |
| | | |
| | | }) |
| | | console.log(flowData) |
| | | request.post("/Delivery/insertDelivery", flowData.value).then((res) => { |
| | | if(res.code==200){ |
| | | ElMessage.success("发货单提交成功") |
| | |
| | | |
| | | } |
| | | } |
| | | |
| | | /*订单作废*/ |
| | | @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,"领出失败"); |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | import com.example.erp.entity.pp.ReportingWork; |
| | | import com.example.erp.exception.ServiceException; |
| | | import com.example.erp.service.pp.ReportingWorkService; |
| | | 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.sql.Date; |
| | | @RestController |
| | | @RequestMapping("/reportingWork") |
| | | @Api(value="报工controller",tags={"报工控制器"}) |
| | | public class ReportingWorkController { |
| | | @Autowired |
| | | final |
| | | ReportingWorkService reportingWorkService; |
| | | |
| | | public ReportingWorkController(ReportingWorkService reportingWorkService) { |
| | | this.reportingWorkService = reportingWorkService; |
| | | } |
| | | |
| | | |
| | | @PostMapping ("/addSelectLastWork/{processIdStr}/{technologyStr}/{process}") |
| | |
| | | return Result.seccess(reportingWorkService.SelectProcessSv()); |
| | | } |
| | | |
| | | @ApiOperation("报工新增") |
| | | @PostMapping ("/saveReportingWork") |
| | | public Result SaveReportingWork(@RequestBody Map<String,Object> reportingWork) { |
| | | return Result.seccess(reportingWorkService.SaveReportingWorkSv(reportingWork)); |
| | | } |
| | | |
| | | @ApiOperation("报工审核") |
| | | @PostMapping ("/reviewReportingWork") |
| | | public Result ReviewReportingWork(@RequestBody Map<String,String> reportingWork) { |
| | | return Result.seccess(reportingWorkService.ReviewReportingWorkSv(reportingWork)); |
| | | } |
| | | |
| | | @ApiOperation("报工修改查询") |
| | | @PostMapping ("/selectUpdateReportingWork/{reportingWorkId}") |
| | | public Result SelectUpdateReportingWork(@PathVariable String reportingWorkId) { |
| | | return Result.seccess(reportingWorkService.selectUpdateReportingWorkSv(reportingWorkId)); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | 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 waitReworkQuantity; |
| | | //返工审核状态 |
| | | private Integer reviewerState; |
| | | private Integer reviewStatus; |
| | | //返工审核人 |
| | | private String reviewer; |
| | | //返工时间 |
| | |
| | | import java.time.LocalDate; |
| | | |
| | | @Data |
| | | @TableName("`order`") |
| | | @TableName("sd.`order`") |
| | | public class Order { |
| | | @TableId(type = IdType.AUTO) |
| | | |
| | |
| | | Boolean updateToExamine(@Param("finishedOperateLog") FinishedOperateLog finishedOperateLog, |
| | | @Param("userName") String userName, |
| | | @Param("type") String type); |
| | | |
| | | Boolean updateFinishedOperateLogState(@Param("finishedOperateLog") FinishedOperateLog finishedOperateLog,@Param("type") String type); |
| | | } |
| | |
| | | package com.example.erp.mapper.pp; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.example.erp.entity.pp.FlowCard; |
| | | import com.example.erp.entity.sd.Order; |
| | | import com.example.erp.entity.sd.OrderDetail; |
| | |
| | | import java.util.Map; |
| | | |
| | | @Mapper |
| | | public interface FlowCardMapper { |
| | | public interface FlowCardMapper extends BaseMapper<FlowCard> { |
| | | //流程卡管理查询 |
| | | List<FlowCard> selectFlowCard(Integer offset, Integer pageSize, Date selectTime1, Date selectTime2, FlowCard flowCard); |
| | | |
| | |
| | | @Param("sDate") String startTime,@Param("eDate") String endTime,ReportingWorkDetail reportingWorkDetail); |
| | | |
| | | |
| | | List<ReportingWorkDetail> selectByreportingWorkId(String reportingWorkId); |
| | | } |
| | |
| | | @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> queryRework (Integer pageNum, Integer pageSize,ReportingWorkDetail reportingWorkDetail ) { |
| | | Integer offset = (pageNum-1)*pageSize; |
| | | |
| | | Map<String,Object> map = new HashMap<>(); |
| | | map.put("data",reportingWorkDetailMapper.queryReworkAdd(offset,pageSize, reportingWorkDetail)); |
| | | return map; |
| | |
| | | package com.example.erp.service.pp; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.extension.conditions.update.LambdaUpdateChainWrapper; |
| | | import com.example.erp.common.Constants; |
| | | import com.example.erp.entity.pp.DamageDetails; |
| | | import com.example.erp.entity.pp.FlowCard; |
| | | import com.example.erp.entity.pp.ReportingWork; |
| | | import com.example.erp.entity.pp.ReportingWorkDetail; |
| | | import com.example.erp.entity.sd.Order; |
| | | import com.example.erp.entity.sd.OrderDetail; |
| | | import com.example.erp.entity.sd.OrderProcessDetail; |
| | | import com.example.erp.exception.ServiceException; |
| | | import com.example.erp.mapper.pp.BasicDateProduceMapper; |
| | | import com.example.erp.mapper.pp.DamageDetailsMapper; |
| | | import com.example.erp.mapper.pp.ReportingWorkDetailMapper; |
| | | import com.example.erp.mapper.pp.ReportingWorkMapper; |
| | | import com.example.erp.mapper.pp.*; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.example.erp.mapper.sd.OrderMapper; |
| | | import com.example.erp.mapper.sd.OrderProcessDetailMapper; |
| | | import com.example.erp.service.sd.OrderProcessDetailService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | |
| | | @Service |
| | | @DS("pp") |
| | |
| | | final |
| | | ReportingWorkDetailMapper |
| | | reportingWorkDetailMapper; |
| | | final OrderMapper |
| | | orderMapper; |
| | | |
| | | final |
| | | FlowCardMapper flowCardMapper; |
| | | |
| | | final |
| | | OrderProcessDetailService orderProcessDetailService; |
| | | |
| | | |
| | | |
| | | public ReportingWorkService(ReportingWorkMapper reportingWorkMapper, BasicDateProduceMapper basicDateProduceMapper, DamageDetailsMapper damageDetailsMapper, ReportingWorkDetailMapper reportingWorkDetailMapper, OrderProcessDetailMapper orderProcessDetailMapper, OrderProcessDetailService orderProcessDetailService) { |
| | | public ReportingWorkService(ReportingWorkMapper reportingWorkMapper, BasicDateProduceMapper basicDateProduceMapper, DamageDetailsMapper damageDetailsMapper, ReportingWorkDetailMapper reportingWorkDetailMapper, OrderProcessDetailMapper orderProcessDetailMapper, OrderProcessDetailService orderProcessDetailService, OrderMapper orderMapper, FlowCardMapper flowCardMapper) { |
| | | this.reportingWorkMapper = reportingWorkMapper; |
| | | this.basicDateProduceMapper = basicDateProduceMapper; |
| | | this.damageDetailsMapper = damageDetailsMapper; |
| | | this.reportingWorkDetailMapper = reportingWorkDetailMapper; |
| | | this.orderProcessDetailMapper = orderProcessDetailMapper; |
| | | this.orderProcessDetailService = orderProcessDetailService; |
| | | this.orderMapper = orderMapper; |
| | | this.flowCardMapper = flowCardMapper; |
| | | } |
| | | |
| | | public Map<String, Object> AddSelectLastWorkSv(String processIdStr, String technologyStr, String process) { |
| | |
| | | } |
| | | //System.out.println("当前工序:" + process + " 上一道工序:" + previousProcess + " 下一道工序:" + nextProcess); |
| | | //查询当前工序的表头数据 |
| | | // System.out.println(reportingWorkMapper.AddSelectLastWorkMp(processIdStr, technologyStr,previousProcess,nextProcess,process)); |
| | | //System.out.println(reportingWorkMapper.AddSelectLastWorkMp(processIdStr, technologyStr,previousProcess,nextProcess,process)); |
| | | map.put("data", reportingWorkMapper.AddSelectLastWorkMp(processIdStr, technologyStr,previousProcess,nextProcess,process)); |
| | | map.put("thisProcess", processList); |
| | | break; |
| | |
| | | String reportingWorkId = "BG"+formattedDate+formattedNumber; |
| | | reportingWork.setReportingWorkId(reportingWorkId); |
| | | reportingWork.setProcessId(reportingWork.getProcessId().substring(0,13)); |
| | | |
| | | int reviewState = (int) reportingWorkJson.get("type"); |
| | | if(reviewState==1){ |
| | | reportingWork.setReviewed(reportingWork.getCreator()); |
| | | reportingWork.setReviewedState(1); |
| | | }else{ |
| | | reportingWork.setReviewedState(0); |
| | | } |
| | | //主表插入 |
| | | reportingWorkMapper.insert(reportingWork); |
| | | |
| | |
| | | |
| | | //判断是否大于当前数量并且抛出异常 |
| | | if(processNum<(reportingWorkDetail.getBreakageQuantity()+reportingWorkDetail.getCompletedQuantity())){ |
| | | // System.out.println(processNum); |
| | | // System.out.println(reportingWorkDetail.getBreakageQuantity()); |
| | | // System.out.println(reportingWorkDetail.getCompletedQuantity()); |
| | | throw new ServiceException(Constants.Code_600,"当前工序数量大于流程卡表数量"); |
| | | Map<String,Object> map = new HashMap<>(); |
| | | map.put("orderNumber",reportingWorkDetail.getOrderNumber()); |
| | | map.put("technologyNumber",reportingWorkDetail.getOrderNumber()); |
| | | map.put("processNum",processNum); |
| | | map.put("sumNum",reportingWorkDetail.getBreakageQuantity()+reportingWorkDetail.getCompletedQuantity()); |
| | | String msg = JSON.toJSONString(map); |
| | | throw new ServiceException(Constants.Code_600,msg); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | OrderProcessDetail orderProcessDetail = new OrderProcessDetail(); |
| | | orderProcessDetail.setBrokenNum(reportingWorkDetail.getBreakageQuantity()); |
| | | orderProcessDetail.setReportingWorkNum(reportingWorkDetail.getCompletedQuantity()); |
| | | orderProcessDetail.setReportingWorkNumCount(reportingWorkDetail.getCompletedQuantity()); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | //根据订单id,订单序号,以及小片序号 更新小片流程的完工数量以及刺破数量 |
| | | LambdaUpdateWrapper<OrderProcessDetail> updateWrapper = new LambdaUpdateWrapper<>(); |
| | |
| | | .eq(OrderProcessDetail::getOrderId, reportingWork.getOrderId()) |
| | | .eq(OrderProcessDetail::getProcess, reportingWork.getThisProcess()) |
| | | .eq(OrderProcessDetail::getTechnologyNumber, reportingWorkDetail.getTechnologyNumber()) |
| | | .setSql("reporting_work_num_count =reporting_work_num_count +"+orderProcessDetail.getReportingWorkNum()) |
| | | .setSql("reporting_work_num_count = reporting_work_num_count +"+orderProcessDetail.getReportingWorkNum()) |
| | | .setSql("reporting_work_num =reporting_work_num +"+orderProcessDetail.getReportingWorkNum()) |
| | | .setSql("broken_num =broken_num +"+orderProcessDetail.getBrokenNum()); |
| | | |
| | | orderProcessDetailMapper.update(null,updateWrapper); |
| | | reportingWorkDetailMapper.insert(reportingWorkDetail); |
| | | //更新流程卡表的报工数量 |
| | | if(Objects.equals(reportingWork.getNextProcess(), "")){ |
| | | LambdaUpdateWrapper<FlowCard> flowCardLambdaUpdateWrapper = |
| | | new LambdaUpdateWrapper<>(); |
| | | flowCardLambdaUpdateWrapper |
| | | .eq(FlowCard::getProcessId, reportingWork.getProcessId()) |
| | | .eq(FlowCard::getOrderNumber, reportingWorkDetail.getOrderNumber()) |
| | | .eq(FlowCard::getTechnologyNumber, reportingWorkDetail.getTechnologyNumber()) |
| | | .setSql("inventory_quantity = inventory_quantity +"+orderProcessDetail.getReportingWorkNum()); |
| | | flowCardMapper.update(null,flowCardLambdaUpdateWrapper); |
| | | } |
| | | |
| | | |
| | | }); |
| | | return false; |
| | | return true; |
| | | } |
| | | |
| | | //下工序审核方法 |
| | | public boolean ReviewReportingWorkSv(Map<String, String> reportingWork) { |
| | | |
| | | String processId = reportingWork.get("processId"); |
| | | |
| | | LambdaUpdateWrapper |
| | | <ReportingWork> updateWrapper = new LambdaUpdateWrapper<>(); |
| | | updateWrapper |
| | | .eq(ReportingWork::getProcessId, processId.substring(0,13)) |
| | | .eq(ReportingWork::getThisProcess,reportingWork.get("process")) |
| | | .eq(ReportingWork::getReviewedState,0) |
| | | .setSql("reviewed_state =1"); |
| | | reportingWorkMapper.update(null,updateWrapper); |
| | | |
| | | |
| | | return true; |
| | | } |
| | | |
| | | public Map<String,Object> selectUpdateReportingWorkSv(String reportingWorkId) { |
| | | ReportingWork reportingWork =reportingWorkMapper.selectOne(new LambdaQueryWrapper<ReportingWork>() |
| | | .eq(ReportingWork::getReportingWorkId,reportingWorkId)); |
| | | reportingWork.setOrder( |
| | | orderMapper.selectOne(new LambdaQueryWrapper<Order>() |
| | | .eq(Order::getOrderId,reportingWork.getOrderId()))); |
| | | reportingWork.setFlowCard(new FlowCard()); |
| | | |
| | | List<ReportingWorkDetail> reportingWorkDetails = reportingWorkDetailMapper.selectByreportingWorkId(reportingWorkId); |
| | | |
| | | |
| | | Map<String,Object> map = new HashMap<>(); |
| | | map.put("reportingWork",reportingWork); |
| | | map.put("reportingWorkDetails",reportingWorkDetails); |
| | | return map; |
| | | |
| | | } |
| | | } |
| | |
| | | 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} |
| | |
| | | <result property="previousProcess" column="previous_process"/> |
| | | <result property="nextProcess" column="next_process"/> |
| | | <result property="thisProcess" column="this_process"/> |
| | | <result property="reviewedState" column="reviewed_state"/> |
| | | <result property="previousProcessQuantity" column="previous_process_quantity"/> |
| | | <association property="order" javaType="com.example.erp.entity.sd.Order"> |
| | | <result property="customerId" column="customer_id"/> |
| | | <result property="customerName" column="customer_name"/> |
| | |
| | | <association property="flowCard" javaType="com.example.erp.entity.pp.FlowCard"> |
| | | <result property="orderId" column="order_id"/> |
| | | <result property="productionId" column="production_id"/> |
| | | <result property="quantity" column="quantity"/> |
| | | </association> |
| | | <association property="reportingWorkDetail" javaType="com.example.erp.entity.pp.ReportingWorkDetail"> |
| | | <result property="completedQuantity" column="completed_quantity"/> |
| | |
| | | o.customer_id, |
| | | o.customer_name, |
| | | o.project, |
| | | SUM(fc.quantity) as quantity, |
| | | SUM(fc.quantity) as previous_process_quantity, |
| | | #{previousProcess} as previous_process, |
| | | #{nextProcess} as next_process, |
| | | #{process} as this_process |
| | | #{process} as this_process, |
| | | ifnull((rw.reviewed_state),1) as reviewed_state -- 下工序审核状态 |
| | | from sd.order as o |
| | | left join flow_card as fc on fc.order_id = o.order_id |
| | | left join flow_card as fc on fc.order_id = o.order_id |
| | | left join (select if(count(reviewed_state)>0 and process_id=null,1,0) as reviewed_state , |
| | | process_id |
| | | from reporting_work |
| | | where this_process=#{previousProcess} and reviewed_state=0 and process_id=#{processIdStr}) as rw |
| | | on rw.process_id = fc.process_id |
| | | where fc.process_id = #{processIdStr} |
| | | and position(fc.technology_number in #{technologyStr}) |
| | | and fc.technology_number = #{technologyStr} |
| | | GROUP BY fc.process_id |
| | | </select> |
| | | |
| | |
| | | ogd.child_width, |
| | | ogd.child_height, |
| | | od.shape, |
| | | fc.quantity -odpd.reporting_work_num + ifnull(c.patchNumSum,0) as quantity, |
| | | fc.quantity -odpd.reporting_work_num -odpd.broken_num + ifnull(c.patchNumSum,0) as quantity, |
| | | odpd.reporting_work_num_count as completed, |
| | | odpd.broken_num as onceBroken |
| | | FROM |
| | |
| | | ogd.child_width, |
| | | ogd.child_height, |
| | | od.shape, |
| | | odpds.reporting_work_num -odpd.reporting_work_num + ifnull(c.patchNumSum,0) as quantity, |
| | | odpds.reporting_work_num -odpd.reporting_work_num -odpd.broken_num + ifnull(c.patchNumSum,0) as quantity, |
| | | odpd.reporting_work_num_count as completed, |
| | | odpd.broken_num as onceBroken |
| | | odpd.broken_num as onceBroken, |
| | | ogd.`group` |
| | | |
| | | |
| | | 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 |
| | | <if test="process == '夹胶'"> |
| | | AND ogd.`group` = (select `group` |
| | | from sd.order_glass_detail |
| | | where order_id = ogd.order_id |
| | | and order_number = ogd.order_number |
| | | and technology_number =#{technologyStr} |
| | | limit 1) |
| | | </if> |
| | | |
| | | LEFT JOIN flow_card AS fc |
| | | ON fc.order_id = ogd.order_id |
| | | and fc.production_id=ogd.production_id |
| | |
| | | and c.technology_number = fc.technology_number |
| | | WHERE |
| | | fc.process_id = #{processIdStr} |
| | | AND fc.technology_number = #{technologyStr} |
| | | AND odpd.process = #{process} |
| | | <if test="process != '中空' and process != '夹胶' and process != '包装'"> |
| | | AND fc.technology_number = #{technologyStr} |
| | | </if> |
| | | AND odpd.process = #{process} |
| | | order by fc.order_number |
| | | </select> |
| | | |
| | |
| | | </select> |
| | | |
| | | |
| | | <!--查询detail明细--> |
| | | <select id="reportingWorkId"> |
| | | select * from reporting_work_detail |
| | | where reporting_work_id = #{reportingWorkId} |
| | | </select> |
| | | |
| | | |
| | | <!--<where> |
| | | |
| | | create_time <![CDATA[>=]]> #{startTime} and create_time <![CDATA[<=]]> #{endTime}} |
| | |
| | | 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() |
| | | ) |
| | |
| | | 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} |
| | |
| | | <result property="previousProcess" column="previous_process"/> |
| | | <result property="nextProcess" column="next_process"/> |
| | | <result property="thisProcess" column="this_process"/> |
| | | <result property="reviewedState" column="reviewed_state"/> |
| | | <result property="previousProcessQuantity" column="previous_process_quantity"/> |
| | | <association property="order" javaType="com.example.erp.entity.sd.Order"> |
| | | <result property="customerId" column="customer_id"/> |
| | | <result property="customerName" column="customer_name"/> |
| | |
| | | <association property="flowCard" javaType="com.example.erp.entity.pp.FlowCard"> |
| | | <result property="orderId" column="order_id"/> |
| | | <result property="productionId" column="production_id"/> |
| | | <result property="quantity" column="quantity"/> |
| | | </association> |
| | | <association property="reportingWorkDetail" javaType="com.example.erp.entity.pp.ReportingWorkDetail"> |
| | | <result property="completedQuantity" column="completed_quantity"/> |
| | |
| | | o.customer_id, |
| | | o.customer_name, |
| | | o.project, |
| | | SUM(fc.quantity) as quantity, |
| | | SUM(fc.quantity) as previous_process_quantity, |
| | | #{previousProcess} as previous_process, |
| | | #{nextProcess} as next_process, |
| | | #{process} as this_process |
| | | #{process} as this_process, |
| | | ifnull((rw.reviewed_state),1) as reviewed_state -- 下工序审核状态 |
| | | from sd.order as o |
| | | left join flow_card as fc on fc.order_id = o.order_id |
| | | left join flow_card as fc on fc.order_id = o.order_id |
| | | left join (select if(count(reviewed_state)>0 and process_id=null,1,0) as reviewed_state , |
| | | process_id |
| | | from reporting_work |
| | | where this_process=#{previousProcess} and reviewed_state=0 and process_id=#{processIdStr}) as rw |
| | | on rw.process_id = fc.process_id |
| | | where fc.process_id = #{processIdStr} |
| | | and position(fc.technology_number in #{technologyStr}) |
| | | and fc.technology_number = #{technologyStr} |
| | | GROUP BY fc.process_id |
| | | </select> |
| | | |
| | |
| | | ogd.child_width, |
| | | ogd.child_height, |
| | | od.shape, |
| | | fc.quantity -odpd.reporting_work_num + ifnull(c.patchNumSum,0) as quantity, |
| | | fc.quantity -odpd.reporting_work_num -odpd.broken_num + ifnull(c.patchNumSum,0) as quantity, |
| | | odpd.reporting_work_num_count as completed, |
| | | odpd.broken_num as onceBroken |
| | | FROM |
| | |
| | | ogd.child_width, |
| | | ogd.child_height, |
| | | od.shape, |
| | | odpds.reporting_work_num -odpd.reporting_work_num + ifnull(c.patchNumSum,0) as quantity, |
| | | odpds.reporting_work_num -odpd.reporting_work_num -odpd.broken_num + ifnull(c.patchNumSum,0) as quantity, |
| | | odpd.reporting_work_num_count as completed, |
| | | odpd.broken_num as onceBroken |
| | | odpd.broken_num as onceBroken, |
| | | ogd.`group` |
| | | |
| | | |
| | | 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 |
| | | <if test="process == '夹胶'"> |
| | | AND ogd.`group` = (select `group` |
| | | from sd.order_glass_detail |
| | | where order_id = ogd.order_id |
| | | and order_number = ogd.order_number |
| | | and technology_number =#{technologyStr} |
| | | limit 1) |
| | | </if> |
| | | |
| | | LEFT JOIN flow_card AS fc |
| | | ON fc.order_id = ogd.order_id |
| | | and fc.production_id=ogd.production_id |
| | |
| | | and c.technology_number = fc.technology_number |
| | | WHERE |
| | | fc.process_id = #{processIdStr} |
| | | AND fc.technology_number = #{technologyStr} |
| | | AND odpd.process = #{process} |
| | | <if test="process != '中空' and process != '夹胶' and process != '包装'"> |
| | | AND fc.technology_number = #{technologyStr} |
| | | </if> |
| | | AND odpd.process = #{process} |
| | | order by fc.order_number |
| | | </select> |
| | | |
| | |
| | | </select> |
| | | |
| | | |
| | | <!--查询detail明细--> |
| | | <select id="reportingWorkId"> |
| | | select * from reporting_work_detail |
| | | where reporting_work_id = #{reportingWorkId} |
| | | </select> |
| | | |
| | | |
| | | <!--<where> |
| | | |
| | | create_time <![CDATA[>=]]> #{startTime} and create_time <![CDATA[<=]]> #{endTime}} |
| | |
| | | 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() |
| | | ) |
| | |
| | | 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 |
| | | ; |