| | |
| | | component: () => import('../views/pp/processCard/ProductionScheduling.vue'), |
| | | }, |
| | | { |
| | | path: 'selectDetailProcessCard', |
| | | name: 'selectDetailProcessCard', |
| | | component: () => import('../views/pp/processCard/SelectDetailProcessCard.vue'), |
| | | }, |
| | | { |
| | | path: '', |
| | | redirect:'/main/processCard/SelectProcessCard' |
| | | } |
| | |
| | | } |
| | | |
| | | }) |
| | | //定义输入数量 |
| | | let checkedNum = ref('') |
| | | //创建流程卡 |
| | | const createProcessCard = () => { |
| | | const $grid = xGrid.value |
| | |
| | | //index = index.toString().padStart(2, '0') |
| | | } |
| | | const processId = productionId + index.toString().padStart(2, '0') |
| | | const regex = /^(\d+|)$/; |
| | | if (!regex.test(checkedNum.value)) { |
| | | ElMessage.warning("请输入正整数") |
| | | return |
| | | } |
| | | //判断正整数 |
| | | if (/^[1-9]\d*$/.test(checkedNum.value)) { |
| | | checkedList.forEach((item) => { |
| | | //定义key值保持 |
| | | |
| | | //判断可用数量是否大于等于输入的数量,不满足则抛出异常 |
| | | if (item.baiscQuantity * 1 < checkedNum.value * 1) throw new Error("请输入小于等于可用数量的数字"); |
| | | item.quantity = checkedNum.value |
| | | item.processId = processId |
| | | item.landingSequence = index |
| | | item.baiscQuantity=item.baiscQuantity - checkedNum.value |
| | | }) |
| | | //删除key |
| | | checkedList.forEach((item) => { |
| | | let key = item._X_ROW_KEY |
| | | delete item._X_ROW_KEY |
| | | if (item.baiscQuantity===0){ |
| | | $grid.remove(checkedList) |
| | | } |
| | | $gridLeft.insertAt(checkedList) |
| | | item._X_ROW_KEY = key |
| | | }) |
| | | |
| | | //清除两边复选框 |
| | | $gridLeft.clearCheckboxRow() |
| | | $grid.clearCheckboxRow() |
| | | } |
| | | else if (checkedNum.value === '') {//判断数量输入框无输入数字 |
| | | |
| | | checkedList.forEach((item) => { |
| | | item.processId = processId |
| | | item.landingSequence = index |
| | | item.quantity = item.baiscQuantity |
| | | }) |
| | | //删除key |
| | | checkedList.forEach((item) => { |
| | | delete item._X_ROW_KEY |
| | | }) |
| | | $gridLeft.insertAt(checkedList) |
| | | $grid.remove(checkedList) |
| | | if ($gridLeft || $grid) { |
| | | //清除两边复选框 |
| | | $gridLeft.clearCheckboxRow() |
| | | $grid.clearCheckboxRow() |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | let checkedNum = ref('') |
| | | |
| | | |
| | | //向右边表格添加数据 |
| | | const addRight = () => { |
| | |
| | | $grid.insert(item) |
| | | } |
| | | }) |
| | | } else if (checkedNum.value === '') {//判断数量输入框有无输入数字 |
| | | } else if (checkedNum.value === '') {//判断数量输入框无输入数字 |
| | | |
| | | checkedList.forEach((item) => { |
| | | let rightData = $grid.getTableData().fullData |
| | |
| | | |
| | | |
| | | } |
| | | //清除两边复选框 |
| | | $gridLeft.clearCheckboxRow() |
| | | $grid.clearCheckboxRow() |
| | | } catch (e) { |
| | |
| | | } |
| | | } else { |
| | | |
| | | // if (){ |
| | | // |
| | | // } |
| | | //如果勾选两个值不同则插入同流程卡 |
| | | item.quantity = checkedNum.value |
| | | item.processId = checkedListLeft[0].processId |
| | |
| | | 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{ |
| | | // |
| | | // } |
| | | // |
| | | // }) |
| | | |
| | | } |
| | | |
| | | }) |
| | |
| | | $gridLeft.insertAt(checkedList) |
| | | $grid.remove(checkedList) |
| | | } |
| | | //清除两边复选框 |
| | | if ($gridLeft || $grid) { |
| | | $gridLeft.clearCheckboxRow() |
| | | $grid.clearCheckboxRow() |
| | |
| | | const $tableRight = xGrid.value |
| | | if ($table) { |
| | | const selectRecords = $table.getCheckboxRecords() |
| | | const selectRight = $tableRight.getCheckboxRecords() |
| | | // const selectRight = $tableRight.getCheckboxRecords() |
| | | let leftData = $tableRight.getTableData().fullData |
| | | if (selectRecords.length === 0) { |
| | | ElMessage.warning("请先选择保存的数据") |
| | | return |
| | | } |
| | | if (selectRight.length > 0) { |
| | | |
| | | if (leftData.length > 0) { |
| | | ElMessage.warning("请先将右侧数据全部建立流程卡后保存") |
| | | return; |
| | | } |
| | |
| | | import {VXETable} from "vxe-table"; |
| | | import useUserInfoStore from "@/stores/userInfo"; |
| | | import {changeFilterEvent,filterChanged} from "@/hook" |
| | | import {addListener,toolbarButtonClickEvent} from "@/hook/mouseMove"; |
| | | |
| | | |
| | | let router = useRouter() |
| | | const userStore = useUserInfoStore() |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | //工序 |
| | | const value = ref('') |
| | | const value = ref('切割') |
| | | |
| | | |
| | | //排产状态 |
| | |
| | | return [start, end] |
| | | } |
| | | |
| | | onMounted(()=>{ |
| | | //启用表格拖动选中 |
| | | addListener(xGrid.value,gridOptions) |
| | | }) |
| | | |
| | | //第一次加载获取近七天时间和默认状态 |
| | | form.date1 = getNowTime() |
| | | let startTime = form.date1[0] |
| | | let endTime = form.date1[1] |
| | | let selectProcesses = value.value |
| | | let inputVal = form.orderId |
| | | if (inputVal == '') { |
| | | inputVal = null |
| | | } |
| | | if (selectProcesses == '') { |
| | | selectProcesses = null |
| | | } |
| | | //第一次加载数据 |
| | | |
| | | request.post(`/productionScheduling/selectLastScheduling/${startTime}/${endTime}`, filterData.value).then((res) => { |
| | | request.post(`/productionScheduling/selectLastScheduling/${startTime}/${endTime}/${selectProcesses}/${inputVal}`, filterData.value).then((res) => { |
| | | |
| | | if (res.code == 200) { |
| | | pageTotal.value = res.data.total |
| | |
| | | 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 |
| | |
| | | } |
| | | if (inputVal == null && selectState == 1) { |
| | | //根据时间查询未排产数据 |
| | | request.post(`/productionScheduling/selectLastScheduling/${startTime}/${endTime}`, filterData.value).then((res) => { |
| | | request.post(`/productionScheduling/selectLastScheduling/${startTime}/${endTime}/${selectProcesses}/${inputVal}`, filterData.value).then((res) => { |
| | | |
| | | if (res.code == 200) { |
| | | pageTotal.value = res.data.total |
| | | xGrid.value.loadData(res.data.data) |
| | | gridOptions.loading = false |
| | | //禁用删除、保存按钮 |
| | | //禁用删除、审核按钮 |
| | | 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) => { |
| | | if (res.code == 200) { |
| | | pageTotal.value = res.data.total |
| | | xGrid.value.loadData(res.data.data) |
| | | gridOptions.loading = false |
| | | //禁用删除、保存按钮 |
| | | //禁用删除、审核按钮 |
| | | gridOptions.toolbarConfig.buttons[0].disabled = true |
| | | gridOptions.toolbarConfig.buttons[1].disabled = true |
| | | //启用保存 |
| | |
| | | }) |
| | | } else if (inputVal == null && selectState == 2) { |
| | | //根据时间查询已排产数据 |
| | | console.log(startTime, endTime, selectProcesses, selectState) |
| | | request.post(`/productionScheduling/selectScheduling/${startTime}/${endTime}/${inputVal}/${selectProcesses}/${selectState}`, filterData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | pageTotal.value = res.data.total |
| | | xGrid.value.loadData(res.data.data) |
| | | gridOptions.loading = false |
| | | //启用删除、保存按钮 |
| | | //启用删除、审核按钮 |
| | | gridOptions.toolbarConfig.buttons[0].disabled = false |
| | | gridOptions.toolbarConfig.buttons[1].disabled = false |
| | | //禁用保存 |
| | |
| | | pageTotal.value = res.data.total |
| | | xGrid.value.loadData(res.data.data) |
| | | gridOptions.loading = false |
| | | //启用删除、保存按钮 |
| | | //启用删除、审核按钮 |
| | | gridOptions.toolbarConfig.buttons[0].disabled = false |
| | | gridOptions.toolbarConfig.buttons[1].disabled = false |
| | | //禁用保存 |
| | |
| | | |
| | | } |
| | | |
| | | /*后端返回结果多层嵌套展示*/ |
| | | const hasDecimal = (value) => { |
| | | const regex = /\./; // 定义正则表达式,查找小数点 |
| | | return regex.test(value); // 返回true/false |
| | | } |
| | | |
| | | |
| | | //子组件接收参数 |
| | | const xGrid = ref() |
| | |
| | | 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: {}, |
| | |
| | | customConfig: { |
| | | storage: true |
| | | }, |
| | | |
| | | editConfig: { |
| | | trigger: 'click', |
| | | mode: 'row', |
| | | showStatus: true |
| | | },//表头参数 |
| | | }, |
| | | menuConfig: { |
| | | body: { |
| | | options: [ |
| | | [ |
| | | { code: 'copyChecked', name: '选中相同', prefixIcon: 'vxe-icon-copy', visible: true, disabled: false }, |
| | | { code: 'copyAll', name: '之后相同', prefixIcon: 'vxe-icon-feedback', visible: true, disabled: false }, |
| | | { code: 'clearChecked', name: '清除选中', prefixIcon: 'vxe-icon-indicator', visible: true, disabled: false }, |
| | | ] |
| | | ] |
| | | } |
| | | }, |
| | | //表头参数 |
| | | columns: [ |
| | | {type: 'expand', fixed: "left", slots: {content: 'content'}, width: 50}, |
| | | {type: 'checkbox', fixed: "left", title: '选择', width: 80}, |
| | |
| | | title: '计划结束时间' |
| | | }, |
| | | // {field: '排产编号', title: '排产编号', width: 120 }, |
| | | {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,filters: [{data: ''}],slots: {filter: 'num1_filter'},filterMethod:filterChanged}, |
| | | {field: 'height', title: '高', width: 60,filters: [{data: ''}],slots: {filter: 'num1_filter'},filterMethod:filterChanged}, |
| | | { |
| | | 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: 'technology_number', |
| | | title: '小片顺序', |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | width: 70, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'child_width', |
| | | title: '宽', |
| | | width: 60, |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'child_height', |
| | | title: '高', |
| | | width: 60, |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | {field: 'quantity', title: '订单数量', width: 70}, |
| | | {field: 'area', title: '订单面积', width: 90}, |
| | | { |
| | |
| | | {field: 'productionScheduledArea', title: '已排产面积', width: 120}, |
| | | {field: 'review_status', title: '审核状态', width: 140}, |
| | | {field: 'reviewer', title: '审核人', width: 140}, |
| | | {field: 'product_name', title: '产品名称', width: 140}, |
| | | {field: 'glass_child', title: '产品名称', width: 140}, |
| | | {field: 'shape', title: '形状', width: 80}, |
| | | {field: 'notes', title: '备注', editRender: {name: 'input', attrs: {placeholder: ''}}, width: 120}, |
| | | {field: 'scheduling_id', title: '排产编号',width: 120}, |
| | |
| | | |
| | | }) |
| | | |
| | | //删除 |
| | | |
| | | |
| | | //表格按钮 |
| | | const gridEvents = { |
| | | async toolbarButtonClick({code}) { |
| | | const $grid = xGrid.value |
| | |
| | | processes: selectProcesses,//工序 |
| | | userName: username//审核人 |
| | | }) |
| | | //禁用保存 |
| | | gridOptions.toolbarConfig.buttons[2].disabled = true |
| | | //保存排产数据 |
| | | request.post("/productionScheduling/addScheduling", schedulingData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | ElMessage.success("保存成功") |
| | | location.reload(); |
| | | // 启用保存 |
| | | gridOptions.toolbarConfig.buttons[2].disabled = false |
| | | router.push({ |
| | | path: '/main/processCard/ProductionScheduling', |
| | | query: { random: Math.random()} |
| | | }) |
| | | } else { |
| | | // 启用保存 |
| | | gridOptions.toolbarConfig.buttons[2].disabled = false |
| | | ElMessage.warning(res.msg) |
| | | |
| | | } |
| | |
| | | } |
| | | } |
| | | }, |
| | | |
| | | menuClick ({ menu, row, column }) { |
| | | const $grid = xGrid.value |
| | | if ($grid) { |
| | | switch (menu.code) { |
| | | case 'copyChecked' :{ |
| | | let result = toolbarButtonClickEvent() |
| | | if(result){ |
| | | const dataList = xGrid.value.getTableData().visibleData |
| | | const val = dataList[result.start][result.cell] |
| | | dataList.forEach((item,index) =>{ |
| | | if(index>=result.start && index<=result.end){ |
| | | item[result.cell] = val |
| | | } |
| | | }) |
| | | } |
| | | gridOptions.menuConfig.body.options[0][5].disabled=false |
| | | break |
| | | } |
| | | case 'copyAll' :{ |
| | | let result = toolbarButtonClickEvent() |
| | | if(result){ |
| | | const dataList = xGrid.value.getTableData().visibleData |
| | | const val = dataList[result.start][result.cell] |
| | | dataList.forEach((item,index) =>{ |
| | | if(index>=result.start ){ |
| | | item[result.cell] = val |
| | | } |
| | | }) |
| | | } |
| | | gridOptions.menuConfig.body.options[0][5].disabled=false |
| | | break |
| | | } |
| | | case 'clearChecked' :{ |
| | | let result = toolbarButtonClickEvent() |
| | | if(result){ |
| | | const dataList = xGrid.value.getTableData().visibleData |
| | | dataList.forEach((item,index) =>{ |
| | | if(index>=result.start && index<=result.end){ |
| | | item[result.cell] = '' |
| | | } |
| | | }) |
| | | } |
| | | gridOptions.menuConfig.body.options[0][5].disabled=false |
| | | break |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | } |
| | | |
| | | const determineNum = () => { |
| | | const $grid = xGrid.value |
| | | const table = $grid.getTableData().fullData |
| | | const selectRecords = $grid.getCheckboxRecords() |
| | | let selectState = stateValue.value |
| | | table.forEach((selectRecords) => { |
| | | if (selectRecords.scheduling_quantity > selectRecords.pendingProductionQuantity) { |
| | | if (selectRecords.scheduling_quantity > selectRecords.pendingProductionQuantity && selectState==1) { |
| | | ElMessage.warning("排产数量不能大于待排产数量") |
| | | //禁用保存按钮 |
| | | //gridOptions.toolbarConfig.buttons[2].disabled = true |
| | |
| | | |
| | | }) |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | </script> |
| | |
| | | |
| | | /> |
| | | |
| | | <el-input v-model="form.orderId" placeholder="销售单号" clearable style="width: 110px"></el-input> |
| | | <el-input v-model="form.orderId" clearable placeholder="销售单号" style="width: 110px"></el-input> |
| | | |
| | | <el-select v-model="value" clearable placeholder="请选择工序" style="width: 120px"> |
| | | <el-select v-model="value" clearable default-value="default_city" style="width: 120px"> |
| | | <el-option |
| | | v-for="item in titleSelectJson['processType']" |
| | | :key="item.id" |
| | |
| | | <vxe-grid |
| | | ref="xGrid" |
| | | class="mytable-scrollbar" |
| | | max-height="100%" |
| | | height="100%" |
| | | max-height="100%" |
| | | v-bind="gridOptions" |
| | | v-on="gridEvents" |
| | | @filter-change="filterChanged" |
| | |
| | | |
| | | </vxe-grid> |
| | | </div> |
| | | <div class="vxe-table--cell-area" ref="cellArea" > |
| | | <span class="vxe-table--cell-main-area" ></span> |
| | | |
| | | <span class="vxe-table--cell-active-area" ></span> |
| | | </div> |
| | | </template> |
| | | |
| | | <style scoped> |
| | |
| | | height: 6%; |
| | | text-align: center; |
| | | } |
| | | .vxe-grid { |
| | | /* 禁用浏览器默认选中 */ |
| | | -webkit-user-select: none; |
| | | -moz-user-select: none; |
| | | -ms-user-select: none; |
| | | user-select: none; |
| | | } |
| | | </style> |
New file |
| | |
| | | <script setup> |
| | | |
| | | import request from "@/utils/request" |
| | | import deepClone from "@/utils/deepClone" |
| | | import {ElDatePicker, ElMessage} from "element-plus" |
| | | import useProductGlassTypeStore from "@/stores/sd/product/productGlassType" |
| | | import {nextTick, onMounted, onUnmounted, reactive, ref, watch} from "vue" |
| | | import {Search} from "@element-plus/icons-vue" |
| | | import GlassType from "@/components/sd/product/GlassType.vue" |
| | | import {useRouter} from 'vue-router' |
| | | import Sortable from 'sortablejs' |
| | | import BasicTable from '@/components/basic/BasicTable.vue' |
| | | import {VXETable} from "vxe-table"; |
| | | |
| | | let productGlassTypeStore = useProductGlassTypeStore() |
| | | let router = useRouter() |
| | | let props = defineProps({ |
| | | rowIndex:{} |
| | | }) |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | //表尾求和 |
| | | const sumNum = (list, field) => { |
| | | let count = 0 |
| | | list.forEach(item => { |
| | | count += Number(item[field]) |
| | | }) |
| | | return count.toFixed(2) |
| | | } |
| | | |
| | | //定义滚动条高度 |
| | | let scrollTop = ref(null) |
| | | let scrollHeight = ref(null) |
| | | let clientHeight = ref(null) |
| | | const scrollEvnt = (row) => { |
| | | // 内容高度 |
| | | scrollTop.value = row.$event.target.scrollTop |
| | | scrollHeight.value = row.$event.target.scrollHeight |
| | | clientHeight.value = row.$event.target.clientHeight |
| | | } |
| | | //筛选条件,有外键需要先定义明细里面的数据 |
| | | let filterData = ref({ |
| | | order: { |
| | | project: '' |
| | | }, |
| | | orderDetail: { |
| | | productId: '', |
| | | productName: '', |
| | | computeGrossArea: '', |
| | | processingNote: '', |
| | | } |
| | | |
| | | }) |
| | | //定义页面总页数 |
| | | let pageTotal = ref('') |
| | | //定义数据返回结果 |
| | | let produceList = ref([]) |
| | | //定义当前页数 |
| | | let pageNum=ref(1) |
| | | let pageState = null |
| | | |
| | | |
| | | |
| | | //第一次加载 |
| | | |
| | | const {currentRoute} = useRouter() |
| | | const route = currentRoute.value |
| | | |
| | | let processId = route.query.processId |
| | | //第一次加载数据 |
| | | |
| | | request.post(`/processCard/flowCardDetail/${processId}`, filterData.value).then((res) => { |
| | | |
| | | if (res.code == 200) { |
| | | produceList = produceList.value.concat(deepClone(res.data.data)) |
| | | xGrid.value.reloadData(produceList) |
| | | gridOptions.loading = false |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | |
| | | //页脚翻页查询 |
| | | 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 = () => { |
| | | |
| | | let startTime = form.date1[0] |
| | | let endTime = form.date1[1] |
| | | request.post(`/processCard/flowCard/${startTime}/${endTime}`, filterData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | |
| | | pageTotal.value = res.data.total |
| | | xGrid.value.loadData(res.data.data) |
| | | gridOptions.loading = false |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //页脚跳转 |
| | | const handlePageChange = ({ currentPage, pageSize }) => { |
| | | pageNum.value=currentPage |
| | | total.pageTotal = pageSize |
| | | selectPageList() |
| | | } |
| | | |
| | | /*使用筛选,后端获取数据*/ |
| | | const changeFilterEvent = (event, option, $panel,) => { |
| | | // 手动触发筛选 |
| | | $panel.changeOption(event, !!option.data, option) |
| | | } |
| | | |
| | | function filterChanged(column) { |
| | | gridOptions.loading = true |
| | | //筛选条件发生变化条件发生变化 |
| | | let value = column.datas[0] != undefined ? column.datas[0] : '' |
| | | value = value.trim() |
| | | //判断是否存在外键 |
| | | if (column.property.indexOf('.') > -1) { |
| | | const columnArr = column.property.split('.') |
| | | filterData.value[columnArr[0]] = { |
| | | [columnArr[1]]: value |
| | | } |
| | | } else { |
| | | filterData.value[column.property] = value |
| | | } |
| | | |
| | | //获取选中时间 |
| | | let startTime = form.date1[0] |
| | | let endTime = form.date1[1] |
| | | |
| | | request.post(`/processCard/detailFlowCard/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 |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | /*后端返回结果多层嵌套展示*/ |
| | | const hasDecimal = (value) => { |
| | | const regex = /\./; // 定义正则表达式,查找小数点 |
| | | return regex.test(value); // 返回true/false |
| | | } |
| | | |
| | | //子组件接收参数 |
| | | const xGrid = ref() |
| | | const gridOptions = reactive({ |
| | | border: "full",//表格加边框 |
| | | keepSource: true,//保持源数据 |
| | | align: 'center',//文字居中 |
| | | stripe:true,//斑马纹 |
| | | rowConfig: {isCurrent: true, isHover: true,height: 30},//鼠标移动或选择高亮 |
| | | id: 'CustomerList', |
| | | showFooter: true,//显示脚 |
| | | printConfig: {}, |
| | | importConfig: {}, |
| | | exportConfig: {}, |
| | | scrollY:{ enabled: true },//开启虚拟滚动 |
| | | showOverflow:true, |
| | | columnConfig: { |
| | | resizable: true, |
| | | useKey: true |
| | | }, |
| | | filterConfig: { //筛选配置项 |
| | | //remote: true |
| | | }, |
| | | customConfig: { |
| | | storage: true |
| | | }, |
| | | editConfig: { |
| | | trigger: 'click', |
| | | mode: 'row', |
| | | showStatus: true |
| | | },//表头参数 |
| | | columns:[ |
| | | {type:'expand',fixed:"left",slots: { content:'content' },width: 50}, |
| | | { type: 'seq',fixed:"left", title: '自序', width: 50 }, |
| | | {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' }, width: 180}, |
| | | {field: 'order.project', title: '项目名称' ,showOverflow:"ellipsis"}, |
| | | {field: 'quantity', title: '数量', }, |
| | | {field: 'orderDetail.computeGrossArea', title: '面积', }, |
| | | {field: 'founder', title: '分架员', }, |
| | | {field: 'orderDetail.processingNote', title: '加工要求', }, |
| | | {field: 'layoutStatus', title: '排版状态', } |
| | | ],//表头按钮 |
| | | |
| | | toolbarConfig: { |
| | | // buttons: [{ |
| | | // |
| | | // }], |
| | | import: false, |
| | | // export: true, |
| | | // print: true, |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | | data: [ |
| | | |
| | | ],//table body实际数据 |
| | | //脚部求和 |
| | | footerMethod ({ columns, data }) {//页脚函数 |
| | | return[ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return '合计:' |
| | | } |
| | | // if (props.tableProp.footList.includes(column.field)) { |
| | | // return sumNum(data, column.field) |
| | | // } |
| | | return '' |
| | | }) |
| | | ] |
| | | } |
| | | |
| | | }) |
| | | |
| | | |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | | <div class="main-div-customer"> |
| | | <div id="selectForm"> |
| | | <el-row :gutter="0"> |
| | | <el-date-picker |
| | | v-model="form.date1" |
| | | type="daterange" |
| | | format="YYYY/MM/DD" |
| | | value-format="YYYY-MM-DD" |
| | | start-placeholder="开始时间" |
| | | end-placeholder="结束时间" |
| | | :default-time="defaultTime" |
| | | |
| | | /> |
| | | |
| | | <el-button |
| | | @click="getWorkOrder" |
| | | id="select" |
| | | type="primary" :icon="Search">查询 |
| | | </el-button> |
| | | </el-row> |
| | | |
| | | </div> |
| | | <vxe-grid |
| | | max-height="100%" |
| | | @filter-change="filterChanged" |
| | | 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> |
| | | |
| | | <!--左边固定显示的插槽--> |
| | | |
| | | <template #button_slot="{ row }" > |
| | | <el-button @click="getTableRow(row,'edit')" 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> |
| | | |
| | | <template #num1_filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | | <input type="type" v-model="option.data" @input="changeFilterEvent($event, option, $panel)"/> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | <template #pager> |
| | | <!--使用 pager 插槽--> |
| | | <!-- 'PrevJump','NextJump', --> |
| | | <vxe-pager |
| | | @page-change="handlePageChange" |
| | | :layouts="[ 'PrevPage', 'Jump','PageCount', 'NextPage', 'Total']" |
| | | v-model:current-page="pageNum" |
| | | v-model:page-size="total.pageSize" |
| | | v-model:pager-count="total.pageTotal" |
| | | :total="total.dataTotal" |
| | | > |
| | | </vxe-pager> |
| | | </template> |
| | | |
| | | </vxe-grid> |
| | | </div> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | .main-div-customer{ |
| | | width: 99%; |
| | | height: 100%; |
| | | } |
| | | #selectForm { |
| | | width: 40%; |
| | | text-align: center; |
| | | } |
| | | </style> |
| | |
| | | let startTime = form.date1[0] |
| | | let endTime = form.date1[1] |
| | | switch (type) { |
| | | case 'edit' : { |
| | | // console.log(row) |
| | | // router.push({path: '/main/processCard/PrintFlowCard', query: {id: row.id}}) |
| | | case 'select' : { |
| | | console.log(row.processId) |
| | | router.push({path: '/main/processCard/SelectDetailProcessCard', query: { processId: row.processId }}) |
| | | break |
| | | } |
| | | case 'setType': { |
| | |
| | | <!--左边固定显示的插槽--> |
| | | |
| | | <template #button_slot="{ row }" > |
| | | <el-button @click="getTableRow(row,'edit')" link type="primary" size="small">打印</el-button> |
| | | <el-button @click="getTableRow(row,'select')" 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> |
| | |
| | | return Result.seccess(flowCardService.selectSchedulingSv(selectTime1,selectTime2,orderId,processes,state,flowCard)); |
| | | |
| | | } |
| | | //查询排产数据 |
| | | @ApiOperation("流程卡明细查询接口") |
| | | @PostMapping ("/flowCardDetail/{processId}") |
| | | public Result flowCardDetail( |
| | | @PathVariable String processId, |
| | | @RequestBody FlowCard flowCard){ |
| | | return Result.seccess(flowCardService.flowCardDetailSv(processId,flowCard)); |
| | | |
| | | } |
| | | } |
| | |
| | | |
| | | //查询第一次排版数据 |
| | | @ApiOperation("加载时查询排版数据接口") |
| | | @PostMapping ("/selectLastScheduling/{selectTime1}/{selectTime2}") |
| | | @PostMapping ("/selectLastScheduling/{selectTime1}/{selectTime2}/{processes}/{orderId}") |
| | | public Result selectLastScheduling( |
| | | @PathVariable String selectTime1, |
| | | @PathVariable String selectTime2, |
| | | @PathVariable String processes, |
| | | @PathVariable String orderId, |
| | | @RequestBody ProductionScheduling productionScheduling){ |
| | | return Result.seccess(productionSchedulingService.selectLastScheduling(selectTime1,selectTime2,productionScheduling)); |
| | | return Result.seccess(productionSchedulingService.selectLastScheduling(selectTime1,selectTime2,processes,orderId,productionScheduling)); |
| | | |
| | | } |
| | | //点击查询排版数据 |
| | |
| | | |
| | | |
| | | Integer selectFlowCardCount(String orderId); |
| | | |
| | | List<Map<String, String>> flowCardDetailMp(String processId, FlowCard flowCard); |
| | | } |
| | |
| | | |
| | | 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); |
| | | List<Map<String,String>> selectLastSchedulingMp(String selectTime1, String selectTime2,String processes,String orderId, ProductionScheduling productionScheduling); |
| | | |
| | | List<Map<String,String>> selectSchedulingNotMp(String selectTime1, String selectTime2, String orderId, String processes, ProductionScheduling productionScheduling); |
| | | |
| | | Integer selectMaxId(); |
| | | |
| | | Boolean insertSelective(String schedulingId, String orderId, String orderNumber, String processes, Integer schedulingQuantity, LocalDate scheduledStartTime, LocalDate planEndTime, String notes); |
| | | Boolean insertSelective(String schedulingId, String orderId, String orderNumber,String technologyNumber, String processes, Integer schedulingQuantity, LocalDate scheduledStartTime, LocalDate planEndTime, String notes); |
| | | |
| | | Boolean examineSchedulingMp(String schedulingId, String userName); |
| | | |
| | |
| | | |
| | | List<Map<String,String>> selectProcess(); |
| | | |
| | | Integer selectNumberMp(String orderId, String orderNumber, String processes); |
| | | // Integer selectNumberMp(String orderId, String orderNumber, String processes); |
| | | } |
| | |
| | | map.put("data", flowCardMapper.selectLastSchedulingMp(selectTime1, selectTime2, flowCard)); |
| | | return map; |
| | | } |
| | | |
| | | public Object flowCardDetailSv(String processId, FlowCard flowCard) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", flowCardMapper.flowCardDetailMp(processId, flowCard)); |
| | | return map; |
| | | } |
| | | } |
| | |
| | | |
| | | |
| | | //首次查询排产数据 |
| | | public Map<String, Object> selectLastScheduling(String selectTime1, String selectTime2,ProductionScheduling productionScheduling ) { |
| | | public Map<String, Object> selectLastScheduling(String selectTime1, String selectTime2,String processes,String orderId,ProductionScheduling productionScheduling ) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", productionSchedulingMapper.selectLastSchedulingMp(selectTime1, selectTime2, productionScheduling)); |
| | | if(orderId.equals("null")){ |
| | | orderId=""; |
| | | } |
| | | if (processes.equals("null")){ |
| | | |
| | | processes=""; |
| | | } |
| | | map.put("data", productionSchedulingMapper.selectLastSchedulingMp(selectTime1, selectTime2,processes,orderId, productionScheduling)); |
| | | map.put("process", productionSchedulingMapper.selectProcess()); |
| | | return map; |
| | | } |
| | |
| | | if (!schedulinglist.isEmpty()) { |
| | | for (ProductionScheduling productionScheduling : schedulinglist) { |
| | | //查询已排产工序数量 |
| | | Integer num = productionSchedulingMapper.selectNumberMp(productionScheduling.getOrderId(),productionScheduling.getOrderNumber(),processes); |
| | | // 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()); |
| | | productionSchedulingMapper.insertSelective(schedulingId,productionScheduling.getOrderId(),productionScheduling.getOrderNumber(),productionScheduling.getTechnologyNumber(),processes,productionScheduling.getSchedulingQuantity(),productionScheduling.getScheduledStartTime(),productionScheduling.getPlanEndTime(),productionScheduling.getNotes()); |
| | | //System.out.println(productionScheduling.getOrderNumber()+"***"+productionScheduling.getTechnologyNumber()); |
| | | } |
| | | return true; |
| | | } |
| | |
| | | o.delivery_address |
| | | from sd.`order` as o |
| | | left join sd.order_glass_detail ogd on o.order_id = ogd.order_id |
| | | where o.production_order=2 and ogd.splitting_status=0 and o.create_time between #{selectTime1} and #{selectTime2} |
| | | where o.production_order=2 and ogd.splitting_status=0 and o.create_time between #{selectTime1} and |
| | | #{selectTime2} |
| | | |
| | | <if test="flowCard.order.orderId != null and flowCard.order.orderId != ''"> |
| | | and o.order_id regexp #{flowCard.order.orderId} |
| | |
| | | sd.order_glass_detail as ogd left join flow_card as fc |
| | | on ogd.order_id=fc.order_id and ogd.order_number=fc.order_number |
| | | set ogd.splitting_status=0 |
| | | where ogd.order_id=#{orderId} and fc.process_id=#{processId} |
| | | where ogd.order_id = #{orderId} |
| | | and fc.process_id = #{processId} |
| | | |
| | | </update> |
| | | |
| | | <!-- 删除流程卡--> |
| | | <update id="deleteFlowCardMp"> |
| | | delete from flow_card as fc where fc.process_id=#{processId} |
| | | delete |
| | | from flow_card as fc |
| | | where fc.process_id = #{processId} |
| | | </update> |
| | | |
| | | <!-- 分架新增明细查询--> |
| | |
| | | <!--resultMap="flowCardMap"--> |
| | | <select id="selectNoCardMp" > |
| | | |
| | | select |
| | | od.order_number, |
| | | select od.order_number, |
| | | od.order_number AS 'orderNumber', |
| | | od.width, |
| | | od.height, |
| | |
| | | p.total_thickness AS 'totalThickness', |
| | | p.thickness, |
| | | od.weight |
| | | 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 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 |
| | | where od.order_id = #{orderId} |
| | | and ogd.production_id = #{productionId} |
| | | and ogd.splitting_status = 0 |
| | | GROUP BY od.order_number |
| | | order by od.id desc |
| | | order by od.id |
| | | |
| | | </select> |
| | | |
| | |
| | | </select> |
| | | <!-- 插入Flow_card表--> |
| | | <insert id="addFlowCardMp"> |
| | | insert into |
| | | flow_card ( |
| | | order_id, |
| | | insert into flow_card (order_id, |
| | | production_id, |
| | | process_id, |
| | | landing_sequence, |
| | |
| | | founder, |
| | | layers_number, |
| | | splitFrame_time, |
| | | create_time |
| | | ) |
| | | select |
| | | ogd.order_id, |
| | | create_time) |
| | | select ogd.order_id, |
| | | ogd.production_id, |
| | | #{processId}, |
| | | #{landingSequence}, |
| | |
| | | NOW() |
| | | |
| | | |
| | | |
| | | from sd.order_glass_detail as ogd |
| | | where ogd.production_id=#{productionId} and ogd.order_number=#{orderNumber} |
| | | where ogd.production_id = #{productionId} |
| | | and ogd.order_number = #{orderNumber} |
| | | GROUP BY ogd.technology_number |
| | | </insert> |
| | | |
| | |
| | | <update id="updateFlowState"> |
| | | update sd.order_glass_detail as ogd |
| | | set ogd.splitting_status=1 |
| | | where ogd.production_id=#{productionId} and ogd.order_number=#{orderNumber} |
| | | where ogd.production_id = #{productionId} |
| | | and ogd.order_number = #{orderNumber} |
| | | </update> |
| | | <!-- 查询未分架的条数--> |
| | | <select id="selectFlowCount"> |
| | |
| | | |
| | | <!-- 查询已排版数据--> |
| | | <select id="selectOkSchedulingMp"> |
| | | select od.order_id,o.customer_name,o.project,od.order_number,od.width,od.height,od.quantity, |
| | | 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), |
| | | (od.quantity-IFNULL(ps.scheduling_quantity,0)), |
| | | round(od.width*od.height*(od.quantity-IFNULL(ps.scheduling_quantity,0))/1000000,2), |
| | | IFNULL(ps.scheduling_quantity,0), |
| | | round(od.width*od.height*(IFNULL(ps.scheduling_quantity,0))/1000000,2), |
| | | 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.order_id=#{orderId} and ps.processes=#{processes} and ps.scheduling_id IS NOT NULL |
| | | 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.order_id = #{orderId} |
| | | and ps.processes = #{processes} |
| | | and ps.scheduling_id IS NOT NULL |
| | | order by ps.id desc |
| | | </select> |
| | | <!-- 查询未排版数据--> |
| | |
| | | </select> |
| | | <!-- 首次查询排版数据--> |
| | | <select id="selectLastSchedulingMp"> |
| | | select od.order_id,o.customer_name,o.project,od.order_number,od.width,od.height,od.quantity, |
| | | 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, |
| | | 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 |
| | | 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.create_time between #{selectTime1} and #{selectTime2} |
| | | </select> |
| | | |
| | |
| | | </select> |
| | | <!-- 查询该订单流程卡条数 --> |
| | | <select id="selectFlowCardCount"> |
| | | select COUNT(*) from flow_card where order_id=#{orderId} |
| | | select COUNT(*) |
| | | from flow_card |
| | | where order_id = #{orderId} |
| | | </select> |
| | | |
| | | <select id="flowCardDetailMp"> |
| | | select fc.order_id, |
| | | fc.process_id, |
| | | fc.order_number, |
| | | fc.quantity, |
| | | round(ogd.child_width * ogd.child_height * fc.quantity / 1000000, 2) as area, |
| | | od.product_name, |
| | | fc.founder, |
| | | fc.splitFrame_time |
| | | from flow_card as fc |
| | | left join sd.order_glass_detail as ogd |
| | | on fc.order_id = ogd.order_id and fc.order_number = ogd.order_number and |
| | | fc.technology_number = ogd.technology_number |
| | | left join sd.order_detail as od on od.order_id = ogd.order_id and od.order_number = ogd.order_number |
| | | where fc.process_id = #{processId} |
| | | GROUP BY fc.order_id, fc.process_id, fc.order_number |
| | | </select> |
| | | </mapper> |
| | |
| | | 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, |
| | | (od.quantity - IFNULL(sum(ps.scheduling_quantity), 0)) as scheduling_quantity, |
| | | round(od.width * od.height * (od.quantity - IFNULL(sum(ps.scheduling_quantity), 0)) / 1000000, 2) |
| | | as pendingProductionArea, |
| | | IFNULL(ps.scheduling_quantity, 0) as productionScheduledQuantity, |
| | |
| | | </select> |
| | | <!-- 查询未排产数据--> |
| | | <select id="selectNoSchedulingMp"> |
| | | select od.order_id, |
| | | select ogd.order_id, |
| | | o.customer_name, |
| | | o.project, |
| | | od.order_number, |
| | | od.width, |
| | | od.height, |
| | | ogd.order_number, |
| | | ogd.technology_number, |
| | | ogd.child_width, |
| | | ogd.child_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) |
| | | round(ogd.child_width * ogd.child_height * od.quantity / 1000000, 2) as area, |
| | | (od.quantity - IFNULL((ps.schedulingQuantity), 0)) as scheduling_quantity, |
| | | (od.quantity - IFNULL((ps.schedulingQuantity), 0)) as pendingProductionQuantity, |
| | | round(ogd.child_width * ogd.child_height * (od.quantity - IFNULL((ps.schedulingQuantity), 0)) / 1000000, 2) |
| | | as pendingProductionArea, |
| | | IFNULL(ps.scheduling_quantity, 0) as productionScheduledQuantity, |
| | | round(od.width * od.height * (IFNULL(ps.scheduling_quantity, 0)) / 1000000, |
| | | IFNULL(ps.schedulingQuantity, 0) as productionScheduledQuantity, |
| | | round(ogd.child_width * ogd.child_height * (IFNULL(ps.schedulingQuantity, 0)) / 1000000, |
| | | 2) as productionScheduledArea, |
| | | od.product_name, |
| | | ogd.glass_child, |
| | | 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} |
| | | from sd.order_glass_detail as ogd |
| | | |
| | | and position(#{orderId} in ps.order_id) |
| | | and position(#{processes} in ps.processes) |
| | | left join sd.order as o on ogd.order_id = o.order_id |
| | | left join sd.order_detail as od on od.order_id=ogd.order_id and od.order_number=ogd.order_number |
| | | left join sd.order_process_detail as opd on opd.order_id=ogd.order_id and opd.order_number=ogd.order_number and opd.technology_number=ogd.technology_number |
| | | left join |
| | | (select order_id,order_number,technology_number,SUM(scheduling_quantity) as schedulingQuantity from production_scheduling where processes=#{processes} group by order_id,order_number,technology_number) as ps on ps.order_id = ogd.order_id and ps.order_number = ogd.order_number and ps.technology_number=ogd.technology_number |
| | | |
| | | group by od.order_id, od.order_number |
| | | order by ps.id desc |
| | | where (od.quantity - IFNULL((ps.schedulingQuantity), 0)) > 0 |
| | | and od.create_time between #{selectTime1} and #{selectTime2} and opd.reporting_work_num_count=0 |
| | | |
| | | and position(#{orderId} in ogd.order_id) |
| | | -- and position("切割" in ps.processes) |
| | | |
| | | group by ogd.order_id, ogd.order_number,ogd.technology_number |
| | | order by ogd.order_id desc |
| | | </select> |
| | | <!-- 首次查询排产数据--> |
| | | <select id="selectLastSchedulingMp"> |
| | | select od.order_id, |
| | | select ogd.order_id, |
| | | o.customer_name, |
| | | o.project, |
| | | od.order_number, |
| | | od.width, |
| | | od.height, |
| | | ogd.order_number, |
| | | ogd.technology_number, |
| | | ogd.child_width, |
| | | ogd.child_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, |
| | | round(ogd.child_width * ogd.child_height * od.quantity / 1000000, 2) as area, |
| | | (od.quantity - IFNULL((ps.schedulingQuantity), 0)) as scheduling_quantity, |
| | | (od.quantity - IFNULL((ps.schedulingQuantity), 0)) as pendingProductionQuantity, |
| | | round(ogd.child_width * ogd.child_height * (od.quantity - IFNULL((ps.schedulingQuantity), 0)) / 1000000, 2) |
| | | as pendingProductionArea, |
| | | IFNULL(ps.schedulingQuantity, 0) as productionScheduledQuantity, |
| | | round(ogd.child_width * ogd.child_height * (IFNULL(ps.schedulingQuantity, 0)) / 1000000, |
| | | 2) as productionScheduledArea, |
| | | od.product_name, |
| | | ogd.glass_child, |
| | | 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 |
| | | from sd.order_glass_detail as ogd |
| | | |
| | | group by od.order_id, od.order_number |
| | | order by ps.id desc |
| | | left join sd.order as o on ogd.order_id = o.order_id |
| | | left join sd.order_detail as od on od.order_id=ogd.order_id and od.order_number=ogd.order_number |
| | | left join sd.order_process_detail as opd on opd.order_id=ogd.order_id and opd.order_number=ogd.order_number and opd.technology_number=ogd.technology_number |
| | | left join |
| | | (select order_id,order_number,technology_number,SUM(scheduling_quantity) as schedulingQuantity from production_scheduling where processes=#{processes} group by order_id,order_number,technology_number) as ps on ps.order_id = ogd.order_id and ps.order_number = ogd.order_number and ps.technology_number=ogd.technology_number |
| | | |
| | | where (od.quantity - IFNULL((ps.schedulingQuantity), 0)) > 0 |
| | | and od.create_time between #{selectTime1} and #{selectTime2} and opd.reporting_work_num_count=0 |
| | | |
| | | and position(#{orderId} in ogd.order_id) |
| | | -- and position("切割" in ps.processes) |
| | | |
| | | group by ogd.order_id, ogd.order_number,ogd.technology_number |
| | | order by ogd.order_id desc |
| | | </select> |
| | | |
| | | <select id="selectMaxId"> |
| | |
| | | insert into production_scheduling(scheduling_id, |
| | | order_id, |
| | | order_number, |
| | | technology_number, |
| | | processes, |
| | | scheduling_quantity, |
| | | scheduled_start_time, |
| | |
| | | VALUES (#{schedulingId}, |
| | | #{orderId}, |
| | | #{orderNumber}, |
| | | #{technologyNumber}, |
| | | #{processes}, |
| | | #{schedulingQuantity}, |
| | | #{scheduledStartTime}, |
| | |
| | | o.delivery_address |
| | | from sd.`order` as o |
| | | left join sd.order_glass_detail ogd on o.order_id = ogd.order_id |
| | | where o.production_order=2 and ogd.splitting_status=0 and o.create_time between #{selectTime1} and #{selectTime2} |
| | | where o.production_order=2 and ogd.splitting_status=0 and o.create_time between #{selectTime1} and |
| | | #{selectTime2} |
| | | |
| | | <if test="flowCard.order.orderId != null and flowCard.order.orderId != ''"> |
| | | and o.order_id regexp #{flowCard.order.orderId} |
| | |
| | | sd.order_glass_detail as ogd left join flow_card as fc |
| | | on ogd.order_id=fc.order_id and ogd.order_number=fc.order_number |
| | | set ogd.splitting_status=0 |
| | | where ogd.order_id=#{orderId} and fc.process_id=#{processId} |
| | | where ogd.order_id = #{orderId} |
| | | and fc.process_id = #{processId} |
| | | |
| | | </update> |
| | | |
| | | <!-- 删除流程卡--> |
| | | <update id="deleteFlowCardMp"> |
| | | delete from flow_card as fc where fc.process_id=#{processId} |
| | | delete |
| | | from flow_card as fc |
| | | where fc.process_id = #{processId} |
| | | </update> |
| | | |
| | | <!-- 分架新增明细查询--> |
| | |
| | | <!--resultMap="flowCardMap"--> |
| | | <select id="selectNoCardMp" > |
| | | |
| | | select |
| | | od.order_number, |
| | | select od.order_number, |
| | | od.order_number AS 'orderNumber', |
| | | od.width, |
| | | od.height, |
| | |
| | | p.total_thickness AS 'totalThickness', |
| | | p.thickness, |
| | | od.weight |
| | | 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 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 |
| | | where od.order_id = #{orderId} |
| | | and ogd.production_id = #{productionId} |
| | | and ogd.splitting_status = 0 |
| | | GROUP BY od.order_number |
| | | order by od.id desc |
| | | order by od.id |
| | | |
| | | </select> |
| | | |
| | |
| | | </select> |
| | | <!-- 插入Flow_card表--> |
| | | <insert id="addFlowCardMp"> |
| | | insert into |
| | | flow_card ( |
| | | order_id, |
| | | insert into flow_card (order_id, |
| | | production_id, |
| | | process_id, |
| | | landing_sequence, |
| | |
| | | founder, |
| | | layers_number, |
| | | splitFrame_time, |
| | | create_time |
| | | ) |
| | | select |
| | | ogd.order_id, |
| | | create_time) |
| | | select ogd.order_id, |
| | | ogd.production_id, |
| | | #{processId}, |
| | | #{landingSequence}, |
| | |
| | | NOW() |
| | | |
| | | |
| | | |
| | | from sd.order_glass_detail as ogd |
| | | where ogd.production_id=#{productionId} and ogd.order_number=#{orderNumber} |
| | | where ogd.production_id = #{productionId} |
| | | and ogd.order_number = #{orderNumber} |
| | | GROUP BY ogd.technology_number |
| | | </insert> |
| | | |
| | |
| | | <update id="updateFlowState"> |
| | | update sd.order_glass_detail as ogd |
| | | set ogd.splitting_status=1 |
| | | where ogd.production_id=#{productionId} and ogd.order_number=#{orderNumber} |
| | | where ogd.production_id = #{productionId} |
| | | and ogd.order_number = #{orderNumber} |
| | | </update> |
| | | <!-- 查询未分架的条数--> |
| | | <select id="selectFlowCount"> |
| | |
| | | |
| | | <!-- 查询已排版数据--> |
| | | <select id="selectOkSchedulingMp"> |
| | | select od.order_id,o.customer_name,o.project,od.order_number,od.width,od.height,od.quantity, |
| | | 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), |
| | | (od.quantity-IFNULL(ps.scheduling_quantity,0)), |
| | | round(od.width*od.height*(od.quantity-IFNULL(ps.scheduling_quantity,0))/1000000,2), |
| | | IFNULL(ps.scheduling_quantity,0), |
| | | round(od.width*od.height*(IFNULL(ps.scheduling_quantity,0))/1000000,2), |
| | | 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.order_id=#{orderId} and ps.processes=#{processes} and ps.scheduling_id IS NOT NULL |
| | | 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.order_id = #{orderId} |
| | | and ps.processes = #{processes} |
| | | and ps.scheduling_id IS NOT NULL |
| | | order by ps.id desc |
| | | </select> |
| | | <!-- 查询未排版数据--> |
| | |
| | | </select> |
| | | <!-- 首次查询排版数据--> |
| | | <select id="selectLastSchedulingMp"> |
| | | select od.order_id,o.customer_name,o.project,od.order_number,od.width,od.height,od.quantity, |
| | | 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, |
| | | 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 |
| | | 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.create_time between #{selectTime1} and #{selectTime2} |
| | | </select> |
| | | |
| | |
| | | </select> |
| | | <!-- 查询该订单流程卡条数 --> |
| | | <select id="selectFlowCardCount"> |
| | | select COUNT(*) from flow_card where order_id=#{orderId} |
| | | select COUNT(*) |
| | | from flow_card |
| | | where order_id = #{orderId} |
| | | </select> |
| | | |
| | | <select id="flowCardDetailMp"> |
| | | select fc.order_id, |
| | | fc.process_id, |
| | | fc.order_number, |
| | | fc.quantity, |
| | | round(ogd.child_width * ogd.child_height * fc.quantity / 1000000, 2) as area, |
| | | od.product_name, |
| | | fc.founder, |
| | | fc.splitFrame_time |
| | | from flow_card as fc |
| | | left join sd.order_glass_detail as ogd |
| | | on fc.order_id = ogd.order_id and fc.order_number = ogd.order_number and |
| | | fc.technology_number = ogd.technology_number |
| | | left join sd.order_detail as od on od.order_id = ogd.order_id and od.order_number = ogd.order_number |
| | | where fc.process_id = #{processId} |
| | | GROUP BY fc.order_id, fc.process_id, fc.order_number |
| | | </select> |
| | | </mapper> |
| | |
| | | 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, |
| | | (od.quantity - IFNULL(sum(ps.scheduling_quantity), 0)) as scheduling_quantity, |
| | | round(od.width * od.height * (od.quantity - IFNULL(sum(ps.scheduling_quantity), 0)) / 1000000, 2) |
| | | as pendingProductionArea, |
| | | IFNULL(ps.scheduling_quantity, 0) as productionScheduledQuantity, |
| | |
| | | </select> |
| | | <!-- 查询未排产数据--> |
| | | <select id="selectNoSchedulingMp"> |
| | | select od.order_id, |
| | | select ogd.order_id, |
| | | o.customer_name, |
| | | o.project, |
| | | od.order_number, |
| | | od.width, |
| | | od.height, |
| | | ogd.order_number, |
| | | ogd.technology_number, |
| | | ogd.child_width, |
| | | ogd.child_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) |
| | | round(ogd.child_width * ogd.child_height * od.quantity / 1000000, 2) as area, |
| | | (od.quantity - IFNULL((ps.schedulingQuantity), 0)) as scheduling_quantity, |
| | | (od.quantity - IFNULL((ps.schedulingQuantity), 0)) as pendingProductionQuantity, |
| | | round(ogd.child_width * ogd.child_height * (od.quantity - IFNULL((ps.schedulingQuantity), 0)) / 1000000, 2) |
| | | as pendingProductionArea, |
| | | IFNULL(ps.scheduling_quantity, 0) as productionScheduledQuantity, |
| | | round(od.width * od.height * (IFNULL(ps.scheduling_quantity, 0)) / 1000000, |
| | | IFNULL(ps.schedulingQuantity, 0) as productionScheduledQuantity, |
| | | round(ogd.child_width * ogd.child_height * (IFNULL(ps.schedulingQuantity, 0)) / 1000000, |
| | | 2) as productionScheduledArea, |
| | | od.product_name, |
| | | ogd.glass_child, |
| | | 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} |
| | | from sd.order_glass_detail as ogd |
| | | |
| | | and position(#{orderId} in ps.order_id) |
| | | and position(#{processes} in ps.processes) |
| | | left join sd.order as o on ogd.order_id = o.order_id |
| | | left join sd.order_detail as od on od.order_id=ogd.order_id and od.order_number=ogd.order_number |
| | | left join sd.order_process_detail as opd on opd.order_id=ogd.order_id and opd.order_number=ogd.order_number and opd.technology_number=ogd.technology_number |
| | | left join |
| | | (select order_id,order_number,technology_number,SUM(scheduling_quantity) as schedulingQuantity from production_scheduling where processes=#{processes} group by order_id,order_number,technology_number) as ps on ps.order_id = ogd.order_id and ps.order_number = ogd.order_number and ps.technology_number=ogd.technology_number |
| | | |
| | | group by od.order_id, od.order_number |
| | | order by ps.id desc |
| | | where (od.quantity - IFNULL((ps.schedulingQuantity), 0)) > 0 |
| | | and od.create_time between #{selectTime1} and #{selectTime2} and opd.reporting_work_num_count=0 |
| | | |
| | | and position(#{orderId} in ogd.order_id) |
| | | -- and position("切割" in ps.processes) |
| | | |
| | | group by ogd.order_id, ogd.order_number,ogd.technology_number |
| | | order by ogd.order_id desc |
| | | </select> |
| | | <!-- 首次查询排产数据--> |
| | | <select id="selectLastSchedulingMp"> |
| | | select od.order_id, |
| | | select ogd.order_id, |
| | | o.customer_name, |
| | | o.project, |
| | | od.order_number, |
| | | od.width, |
| | | od.height, |
| | | ogd.order_number, |
| | | ogd.technology_number, |
| | | ogd.child_width, |
| | | ogd.child_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, |
| | | round(ogd.child_width * ogd.child_height * od.quantity / 1000000, 2) as area, |
| | | (od.quantity - IFNULL((ps.schedulingQuantity), 0)) as scheduling_quantity, |
| | | (od.quantity - IFNULL((ps.schedulingQuantity), 0)) as pendingProductionQuantity, |
| | | round(ogd.child_width * ogd.child_height * (od.quantity - IFNULL((ps.schedulingQuantity), 0)) / 1000000, 2) |
| | | as pendingProductionArea, |
| | | IFNULL(ps.schedulingQuantity, 0) as productionScheduledQuantity, |
| | | round(ogd.child_width * ogd.child_height * (IFNULL(ps.schedulingQuantity, 0)) / 1000000, |
| | | 2) as productionScheduledArea, |
| | | od.product_name, |
| | | ogd.glass_child, |
| | | 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 |
| | | from sd.order_glass_detail as ogd |
| | | |
| | | group by od.order_id, od.order_number |
| | | order by ps.id desc |
| | | left join sd.order as o on ogd.order_id = o.order_id |
| | | left join sd.order_detail as od on od.order_id=ogd.order_id and od.order_number=ogd.order_number |
| | | left join sd.order_process_detail as opd on opd.order_id=ogd.order_id and opd.order_number=ogd.order_number and opd.technology_number=ogd.technology_number |
| | | left join |
| | | (select order_id,order_number,technology_number,SUM(scheduling_quantity) as schedulingQuantity from production_scheduling where processes=#{processes} group by order_id,order_number,technology_number) as ps on ps.order_id = ogd.order_id and ps.order_number = ogd.order_number and ps.technology_number=ogd.technology_number |
| | | |
| | | where (od.quantity - IFNULL((ps.schedulingQuantity), 0)) > 0 |
| | | and od.create_time between #{selectTime1} and #{selectTime2} and opd.reporting_work_num_count=0 |
| | | |
| | | and position(#{orderId} in ogd.order_id) |
| | | -- and position("切割" in ps.processes) |
| | | |
| | | group by ogd.order_id, ogd.order_number,ogd.technology_number |
| | | order by ogd.order_id desc |
| | | </select> |
| | | |
| | | <select id="selectMaxId"> |
| | |
| | | insert into production_scheduling(scheduling_id, |
| | | order_id, |
| | | order_number, |
| | | technology_number, |
| | | processes, |
| | | scheduling_quantity, |
| | | scheduled_start_time, |
| | |
| | | VALUES (#{schedulingId}, |
| | | #{orderId}, |
| | | #{orderNumber}, |
| | | #{technologyNumber}, |
| | | #{processes}, |
| | | #{schedulingQuantity}, |
| | | #{scheduledStartTime}, |
| | |
| | | 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> |
| | | |
| | |
| | | </if> |
| | | |
| | | </where> |
| | | order by dd.id desc |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |