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> |
| | |
| | | //前端筛选功能 |
| | | |
| | | //筛选手动触发 |
| | | function changeFilterEvent (event, option, $panel) { |
| | | // 手动触发筛选 |
| | | $panel.changeOption(event, !!option.data, option) |
| | | } |
| | | |
| | | // 筛选函数 |
| | | const filterChanged = ({ option, row, column }) => { |
| | | if (option.data) { |
| | | return row[column.field].toString().toLowerCase().indexOf(option.data) > -1 |
| | | } |
| | | return true |
| | | } |
| | | |
| | | export {changeFilterEvent,filterChanged} |
| | |
| | | clientHeight.value = row.$event.target.clientHeight |
| | | } |
| | | //筛选条件,有外键需要先定义明细里面的数据 |
| | | let filterData = ref({ |
| | | product: { |
| | | thickness: '', |
| | | totalThickness: '' |
| | | }, |
| | | orderDetail: { |
| | | orderNumber: '', |
| | | height: '', |
| | | computeGrossArea: '', |
| | | binningQuantity: '', |
| | | shape: '', |
| | | width: '', |
| | | weight: '' |
| | | } |
| | | |
| | | }) |
| | | let filterData = ref({}) |
| | | //定义页面总页数 |
| | | let pageTotal = ref('') |
| | | //定义数据返回结果 |
| | |
| | | request.post(`/processCard/selectNoCard/${orderId}/${productionId}`, filterData.value).then((res) => { |
| | | |
| | | if (res.code == 200) { |
| | | console.log(res.data) |
| | | //console.log(res.data) |
| | | pageTotal.value = res.data.total |
| | | produceList = produceList.value.concat(deepClone(res.data.data)) |
| | | xGrid.value.reloadData(produceList) |
| | |
| | | return ('00' + str).substr(str.length) |
| | | } |
| | | |
| | | 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 |
| | | } |
| | | |
| | | |
| | | request.post(`/processCard/selectNoCard/${orderId}/${productionId}`, filterData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | |
| | | pageTotal.value = res.data.total |
| | | 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 filterChanged = ({ option, row, column }) => { |
| | | if (option.data) { |
| | | return row[column.field].toString().toLowerCase().indexOf(option.data) > -1 |
| | | } |
| | | return true |
| | | //@filter-change="filterChanged" |
| | | } |
| | | |
| | | //右侧子组件接收参数 |
| | |
| | | useKey: true |
| | | }, |
| | | filterConfig: { //筛选配置项 |
| | | remote: true |
| | | //remote: true |
| | | }, |
| | | customConfig: { |
| | | storage: true |
| | |
| | | },//表头参数 |
| | | columns: [ |
| | | {type: 'checkbox', fixed: "left", title: '选择'}, |
| | | {field: 'orderNumber', title: '订序', filters: [{data: ''}], slots: {filter: 'num1_filter'}}, |
| | | {field: 'shape', title: '形状', showOverflow: "ellipsis", filters: [{data: ''}], slots: {filter: 'num1_filter'}}, |
| | | {field: 'width', title: '宽', filters: [{data: ''}], slots: {filter: 'num1_filter'}}, |
| | | {field: 'height', title: '高', filters: [{data: ''}], slots: {filter: 'num1_filter'}}, |
| | | {field: 'orderNumber', title: '订序', filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod:filterChanged}, |
| | | {field: 'shape', title: '形状', showOverflow: "ellipsis", filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod:filterChanged}, |
| | | {field: 'width', title: '宽', sortable: true, filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod:filterChanged}, |
| | | {field: 'height', title: '高', sortable: true, filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod:filterChanged}, |
| | | {field: 'baiscQuantity', title: '待分数量', showOverflow: "ellipsis"}, |
| | | {field: 'computeGrossArea', title: '待分面积'}, |
| | | {field: 'totalThickness', title: '总厚度'}, |
| | |
| | | useKey: true |
| | | }, |
| | | filterConfig: { //筛选配置项 |
| | | remote: true |
| | | //remote: true |
| | | }, |
| | | customConfig: { |
| | | storage: true |
| | |
| | | },//表头参数 |
| | | columns: [ |
| | | {type: 'checkbox', fixed: "left", title: '选择'}, |
| | | {field: 'processId', title: '流程卡号', filters: [{data: ''}], slots: {filter: 'num1_filter'}, width: 130}, |
| | | {field: 'processId', title: '流程卡号', filters: [{data: ''}], slots: {filter: 'num1_filter'}, width: 130,filterMethod:filterChanged}, |
| | | { |
| | | field: 'orderNumber', |
| | | title: '订序', |
| | | showOverflow: "ellipsis", |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'} |
| | | ,filterMethod:filterChanged |
| | | }, |
| | | {field: 'landingSequence', title: '落架顺序', filters: [{data: ''}], slots: {filter: 'num1_filter'}}, |
| | | {field: 'shape', title: '形状', filters: [{data: ''}], slots: {filter: 'num1_filter'}}, |
| | | {field: 'landingSequence', title: '落架顺序', filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod:filterChanged}, |
| | | {field: 'shape', title: '形状', filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod:filterChanged}, |
| | | {field: 'width', title: '宽', showOverflow: "ellipsis"}, |
| | | {field: 'height', title: '高'}, |
| | | {field: 'quantity', title: '总数量'}, |
| | |
| | | productionId:productionId |
| | | }) |
| | | |
| | | console.log(flowCardData.value) |
| | | //console.log(flowCardData.value) |
| | | request.post("/processCard/addFlowCard", flowCardData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | ElMessage.success("保存成功") |
| | | location.reload(); |
| | | //router.push('/main/processCard/SplittingDetails?orderId=${orderId}') |
| | | router.push({path: '/main/processCard/SplittingDetails', query: {orderId: orderId}}) |
| | | |
| | | //location.reload(); |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | |
| | | <el-aside width="44%" > |
| | | <vxe-grid |
| | | max-height="100%" |
| | | @filter-change="filterChanged" |
| | | class="mytable-scrollbar" |
| | | ref="xGridLeft" |
| | | v-bind="gridLeftOptions" |
| | |
| | | <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)"/> |
| | | <input type="text" |
| | | v-model="option.data" |
| | | @input="changeFilterEvent($event, option, $panel)"/> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | <el-button @click="createProcessCard" type="primary">建立流程卡</el-button> |
| | | </el-main> |
| | | |
| | | <!-- 右侧--> |
| | | <el-aside width="45%" height="500px" style=""> |
| | | <vxe-grid |
| | | |
| | | max-height="97%" |
| | | @filter-change="filterChanged" |
| | | class="mytable-scrollbar" |
| | | ref="xGrid" |
| | | v-bind="gridOptions" |
| | |
| | | </ul> |
| | | </template> |
| | | |
| | | <!--左边固定显示的插槽--> |
| | | <template #button_slot="{ row }"> |
| | | <el-button @click="getTableRow(row,'edit')" link type="primary" size="small">打印</el-button> |
| | | <el-button @click="getTableRow(row,'setType')" link type="primary" size="small">排版</el-button> |
| | | <el-button @click="getTableRow(row,'delete')" link type="primary" size="small">删除</el-button> |
| | | </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)"/> |
| | | <input type="text" |
| | | v-model="option.data" |
| | | @input="changeFilterEvent($event, option, $panel)"/> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | <script setup> |
| | | |
| | | import {reactive, ref} from "vue"; |
| | | import {useRouter} from 'vue-router' |
| | | 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 router=useRouter() |
| | | const getTableRow = (row,type) =>{ |
| | | switch (type) { |
| | |
| | | } |
| | | } |
| | | |
| | | //工序 |
| | | const value = ref('') |
| | | const options = [ |
| | | { |
| | | value: '切割', |
| | | label: '切割', |
| | | }, |
| | | { |
| | | value: '磨边', |
| | | label: '磨边', |
| | | }, |
| | | { |
| | | value: '钢化', |
| | | label: '钢化', |
| | | }, |
| | | ] |
| | | |
| | | //排产状态 |
| | | const stateValue = ref('1') |
| | | const stateOptions = [ |
| | | { |
| | | value: '2', |
| | | label: '已排产', |
| | | }, |
| | | { |
| | | value: '1', |
| | | label: '未排产', |
| | | }, |
| | | ] |
| | | |
| | | function padLeftZero(str) { |
| | | return ('00' + str).substr(str.length) |
| | | } |
| | | |
| | | //定义表单值 |
| | | const form = reactive({ |
| | | date1: '', |
| | | orderId:'' |
| | | }) |
| | | |
| | | |
| | | |
| | | //表尾求和 |
| | |
| | | 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 |
| | | |
| | | |
| | | //获取七天前到当前时间 |
| | | function getNowTime() { |
| | | const start = new Date(new Date().getTime()- 3600 * 1000 * 24 * 7) |
| | | .toISOString() |
| | | .replace('T', ' ') |
| | | .slice(0,10) //默认开始时间7天前 |
| | | const end = new Date(new Date().getTime()+3600 * 1000 * 24) |
| | | .toISOString() |
| | | .replace('T', ' ') |
| | | .slice(0,10)//默认结束时间当前时间 |
| | | return [start, end] |
| | | } |
| | | |
| | | //第一次加载获取近七天时间和默认状态 |
| | | form.date1=getNowTime() |
| | | let startTime = form.date1[0] |
| | | let endTime = form.date1[1] |
| | | //第一次加载数据 |
| | | |
| | | request.post(`/productionScheduling/selectLastScheduling/${startTime}/${endTime}`, filterData.value).then((res) => { |
| | | |
| | | if (res.code == 200) { |
| | | pageTotal.value = res.data.total |
| | | produceList = produceList.value.concat(deepClone(res.data.data)) |
| | | xGrid.value.reloadData(produceList) |
| | | gridOptions.loading = false |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | |
| | | //点击时查询 |
| | | const getWorkOrder = () => { |
| | | let selectProcesses=value.value |
| | | let selectState = stateValue.value |
| | | let inputVal=form.orderId |
| | | if (inputVal== ''){ |
| | | inputVal=null |
| | | } |
| | | if (selectProcesses== ''){ |
| | | selectProcesses=null |
| | | } |
| | | if (inputVal== null && selectState==1){ |
| | | //根据时间查询未排产数据 |
| | | request.post(`/productionScheduling/selectLastScheduling/${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) |
| | | } |
| | | }) |
| | | } |
| | | 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 |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | } |
| | | else if(inputVal== null && selectState==2){ |
| | | //根据时间查询已排产数据 |
| | | 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 |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | else if(inputVal!= null && selectState==2){ |
| | | //根据订单号查询已排产数据 |
| | | request.post(`/productionScheduling/selectSchedulingNot/${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 |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | //子组件接收参数 |
| | | const xGrid = ref() |
| | | const gridOptions = reactive({ |
| | | border: "full",//表格加边框 |
| | | keepSource: true,//保持源数据 |
| | |
| | | {type:'expand',fixed:"left",slots: { content:'content' },width: 50}, |
| | | { type: 'checkbox',fixed:"left", title: '选择', width: 80 }, |
| | | { type: 'seq',fixed:"left", title: '自序', width: 50 }, |
| | | {field: '排产编号', title: '排产编号', sortable: true, width: 120 }, |
| | | {field: '销售单号', title: '销售单号',slots: { filter: 'num1_filter' }, sortable: true, width: 100 }, |
| | | {field: '客户名称', title: '客户名称', sortable: true, width: 110}, |
| | | {field: '项目名称', title: '项目名称', sortable: true , width: 100}, |
| | | {field: '序号', title: '序号', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }, width: 90}, |
| | | {field: '产品名称', title: '产品名称', sortable: true, width: 140}, |
| | | {field: '宽', title: '宽', sortable: true , width: 70}, |
| | | {field: '高', title: '高', sortable: true , width: 70}, |
| | | {field: '数量', title: '数量', sortable: true , width: 70}, |
| | | {field: '面积', title: '面积', sortable: true , width: 90}, |
| | | {field: '排产数量' , width: 120,editRender: { name: 'input', attrs: { placeholder: '' } }, title: '排产数量', sortable: true}, |
| | | {field: '已排产数量', title: '已排产数量', sortable: true , width: 120}, |
| | | {field: '已排产面积', title: '已排产面积', sortable: true , width: 120}, |
| | | {field: '未排产数量', title: '未排产数量', sortable: true , width: 120}, |
| | | {field: '未排产面积', title: '未排产面积', sortable: true , width: 120}, |
| | | {field: '形状', title: '形状', sortable: true , width: 80}, |
| | | {field: '备注', title: '备注', sortable: true , width: 120}, |
| | | {field: 'scheduled_start_time' , width: 120,editRender: { name: 'input', attrs: { placeholder: '',type:'date' } }, title: '计划开始时间'}, |
| | | {field: 'plan_end_time' , width: 120,editRender: { name: 'input', attrs: { placeholder: '',type:'date' } }, title: '计划结束时间'}, |
| | | // {field: '排产编号', title: '排产编号', width: 120 }, |
| | | {field: 'order_id', title: '销售单号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, width: 100 }, |
| | | {field: 'customer_name', title: '客户名称', width: 110,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'project', title: '项目名称', width: 100,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'order_number', title: '序号', filters:[{ data: '' }],slots: { filter: 'num1_filter' }, width: 70}, |
| | | |
| | | {field: 'width', title: '宽', width: 60}, |
| | | {field: 'height', title: '高', width: 60}, |
| | | {field: 'quantity', title: '订单数量', width: 70}, |
| | | {field: 'area', title: '订单面积', width: 90}, |
| | | {field: 'scheduling_quantity' , width: 120,editRender: { name: 'input', attrs: { placeholder: '' } }, title: '排产数量', sortable: true}, |
| | | {field: 'pendingProductionQuantity', title: '待排产数量', width: 120}, |
| | | {field: 'pendingProductionArea', title: '待排产面积', width: 120}, |
| | | {field: 'productionScheduledQuantity', title: '已排产数量', width: 120}, |
| | | {field: 'productionScheduledArea', title: '已排产面积', width: 120}, |
| | | {field: 'review_status', title: '审核状态', width: 140}, |
| | | {field: 'reviewer', title: '审核人', width: 140}, |
| | | {field: 'product_name', title: '产品名称', width: 140}, |
| | | {field: 'shape', title: '形状', width: 80}, |
| | | {field: 'notes', title: '备注', editRender: { name: 'input', attrs: { placeholder: '' } }, width: 120}, |
| | | ],//表头按钮 |
| | | |
| | | toolbarConfig: { |
| | | buttons: [ |
| | | {code: 'print_lck', name: '删除',status:'primary' }, |
| | | {code: 'print_lck', name: '排产',status:'primary' ,icon:'vxe-icon-save'}, |
| | | {code: 'delete', name: '删除',status:'primary' }, |
| | | {code: 'review', name: '审核',status:'primary' }, |
| | | {code: 'save', name: '排产',status:'primary' ,icon:'vxe-icon-save'}, |
| | | ], |
| | | import: false, |
| | | export: true, |
| | | print: true, |
| | | // export: true, |
| | | // print: true, |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | | data: [ |
| | | { |
| | | 排产编号:"PC20230100001", |
| | | 销售单号: 'NG231207', |
| | | 客户名称:'XXX公司', |
| | | 项目名称:"XXXX公园", |
| | | 序号: '1', |
| | | 产品名称: '6mm超白Low-E(外)+A12+6mm超白平钢(内)', |
| | | 宽: '2000', |
| | | 高: '1000', |
| | | 数量: '10', |
| | | 面积: '20000', |
| | | 排产数量: '', |
| | | 已排产数量: '10000', |
| | | 已排产面积: '10000', |
| | | 未排产数量: '', |
| | | 未排产面积: '', |
| | | 形状: '矩形', |
| | | 备注: '备注' |
| | | }, |
| | | { |
| | | 排产编号:"PC20230100001", |
| | | 销售单号: 'NG231207', |
| | | 客户名称:'XXX公司', |
| | | 项目名称:"XXXX公园", |
| | | 序号: '1', |
| | | 产品名称: '6mm超白Low-E(外)+A12+6mm超白平钢(内)', |
| | | 宽: '2000', |
| | | 高: '1000', |
| | | 数量: '10', |
| | | 面积: '20000', |
| | | 排产数量: '', |
| | | 已排产数量: '10000', |
| | | 已排产面积: '10000', |
| | | 未排产数量: '', |
| | | 未排产面积: '', |
| | | 形状: '矩形', |
| | | 备注: '备注' |
| | | }, |
| | | { |
| | | 排产编号:"PC20230100001", |
| | | 销售单号: 'NG231207', |
| | | 客户名称:'XXX公司', |
| | | 项目名称:"XXXX公园", |
| | | 序号: '1', |
| | | 产品名称: '6mm超白Low-E(外)+A12+6mm超白平钢(内)', |
| | | 宽: '2000', |
| | | 高: '1000', |
| | | 数量: '10', |
| | | 面积: '20000', |
| | | 排产数量: '', |
| | | 已排产数量: '10000', |
| | | 已排产面积: '10000', |
| | | 未排产数量: '', |
| | | 未排产面积: '', |
| | | 形状: '矩形', |
| | | 备注: '备注' |
| | | }, |
| | | |
| | | ],//table body实际数据 |
| | | //脚部求和 |
| | | footerMethod ({ columns, data }) {//页脚函数 |
| | |
| | | |
| | | }) |
| | | |
| | | const form = reactive({ |
| | | name: '', |
| | | region: '', |
| | | date1: '', |
| | | date2: '', |
| | | delivery: false, |
| | | type: [], |
| | | resource: '', |
| | | desc: '', |
| | | }) |
| | | const value = ref('') |
| | | const options = [ |
| | | { |
| | | value: 'Option1', |
| | | label: 'Option1', |
| | | |
| | | const gridEvents = { |
| | | toolbarButtonClick({code}) { |
| | | const $grid = xGrid.value |
| | | if ($grid) { |
| | | switch (code) { |
| | | case 'save': { |
| | | const $table = xGrid.value |
| | | if ($table) { |
| | | const selectRecords = $table.getCheckboxRecords() |
| | | let selectProcesses=value.value |
| | | |
| | | let schedulingData = ref({ |
| | | scheduling: selectRecords, |
| | | Processes:selectProcesses |
| | | }) |
| | | if (selectRecords.length==0){ |
| | | ElMessage.success("请勾选排产数据") |
| | | return; |
| | | } |
| | | for (let i = 0; i < selectRecords.length; i++){ |
| | | let start= selectRecords[i].scheduled_start_time |
| | | let end= selectRecords[i].plan_end_time |
| | | let number=selectRecords[i].scheduling_quantity |
| | | if (start==null || end==null || number==null){ |
| | | ElMessage.success("请填入对应的值再进行保存") |
| | | return; |
| | | } |
| | | } |
| | | console.log(schedulingData.value) |
| | | // request.post("/workOrder/addOrderWork", schedulingData.value).then((res) => { |
| | | // if (res.code == 200) { |
| | | // ElMessage.success("保存成功") |
| | | // location.reload(); |
| | | // } else { |
| | | // ElMessage.warning(res.msg) |
| | | // router.push("/login") |
| | | // } |
| | | // }) |
| | | |
| | | } |
| | | return; |
| | | |
| | | } |
| | | |
| | | } |
| | | } |
| | | }, |
| | | { |
| | | value: 'Option2', |
| | | label: 'Option2', |
| | | }, |
| | | { |
| | | value: 'Option3', |
| | | label: 'Option3', |
| | | }, |
| | | ] |
| | | |
| | | } |
| | | |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | |
| | | <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-select v-model="value" class="m-2" placeholder="工序"> |
| | | <el-input placeholder="销售单号" v-model="form.orderId" style="width: 110px"></el-input> |
| | | |
| | | <el-select v-model="value" class="m-2" placeholder="工序" style="width: 90px;"> |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | <el-select v-model="value" class="m-2" placeholder="是否排产"> |
| | | |
| | | <el-select v-model="stateValue" class="m-2" placeholder="是否排产" style="width: 120px"> |
| | | <el-option |
| | | v-for="item in options" |
| | | v-for="item in stateOptions" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | |
| | | <el-button type="primary">查询</el-button> |
| | | <el-button |
| | | @click="getWorkOrder" |
| | | id="select" |
| | | type="primary" :icon="Search">查询 |
| | | </el-button> |
| | | </el-row> |
| | | |
| | | </div> |
| | |
| | | class="mytable-scrollbar" |
| | | ref="xGrid" |
| | | v-bind="gridOptions" |
| | | |
| | | v-on="gridEvents" |
| | | > |
| | | <!-- @toolbar-button-click="toolbarButtonClickEvent"--> |
| | | <!-- 下拉显示所有信息插槽--> |
| | | <template #content="{ row}"> |
| | | <template #content="{ row }"> |
| | | <ul class="expand-wrapper"> |
| | | <li v-for="(item,key,index) in row"> |
| | | <span style="font-weight: bold">{{key+': '}}</span> |
| | | <span>{{ item }}</span> |
| | | <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 @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"> |
| | |
| | | request.post(`/processCard/selectAddProcess/${startTime}/${endTime}`, filterData.value).then((res) => { |
| | | |
| | | if (res.code == 200) { |
| | | console.log(res.data.data) |
| | | pageTotal.value = res.data.total |
| | | produceList = produceList.value.concat(deepClone(res.data.data)) |
| | | xGrid.value.reloadData(produceList) |
| | |
| | | request.post(`/processCard/flowCard/${startTime}/${endTime}`, filterData.value).then((res) => { |
| | | |
| | | if (res.code == 200) { |
| | | console.log(res.data.data) |
| | | pageTotal.value = res.data.total |
| | | produceList = produceList.value.concat(deepClone(res.data.data)) |
| | | xGrid.value.reloadData(produceList) |
| | |
| | | request.post(`/processCard/detailsSelect/${id}`, filterData.value).then((res) => { |
| | | |
| | | if (res.code == 200) { |
| | | console.log(res.data.data) |
| | | pageTotal.value = res.data.total |
| | | produceList = produceList.value.concat(deepClone(res.data.data)) |
| | | xGrid.value.reloadData(produceList) |
| | |
| | | filterData.value[column.property] = value |
| | | } |
| | | |
| | | |
| | | console.log(filterData.value) |
| | | request.post(`/processCard/detailsSelect/${id}`, filterData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | pageTotal.value = res.data.total |
| | |
| | | data: null,//表格数据 |
| | | //脚部求和 |
| | | footerMethod ({ columns, data }) {//页脚函数 |
| | | console.log(columns,data) |
| | | let footList=['data.orderDetail.quantity','data.orderDetail.computeGrossArea'] |
| | | return[ |
| | | columns.map((column, columnIndex) => { |
| | |
| | | request.post(`/workOrder/addWork/${id}`, filterData.value).then((res) => { |
| | | |
| | | if (res.code == 200) { |
| | | console.log(res.data.data) |
| | | pageTotal.value = res.data.total |
| | | produceList = produceList.value.concat(deepClone(res.data.data)) |
| | | xGrid.value.reloadData(produceList) |
| | |
| | | userName:username |
| | | }) |
| | | |
| | | console.log(workOrderData.value) |
| | | request.post("/workOrder/addOrderWork", workOrderData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | ElMessage.success("保存成功") |
| | |
| | | request.post(`/workOrder/orderGlassDetail/${startTime}/${endTime}/${state}`, filterData.value).then((res) => { |
| | | |
| | | if (res.code == 200) { |
| | | console.log(res.data.data) |
| | | pageTotal.value = res.data.total |
| | | produceList = produceList.value.concat(deepClone(res.data.data)) |
| | | xGrid.value.reloadData(produceList) |
| | |
| | | import request from "@/utils/request" |
| | | import deepClone from "@/utils/deepClone" |
| | | import useUserInfoStore from '@/stores/userInfo' |
| | | import SelectProduct from "@/views/sd/product/SelectProduct.vue" |
| | | import {changeFilterEvent,filterChanged} from "@/hook" |
| | | |
| | | let dialogTableVisible = ref(false) |
| | | let productVisible = ref(false) |
| | | const userStore = useUserInfoStore() |
| | | const router = useRouter() |
| | | const route = useRoute() |
| | |
| | | saleMan:[] |
| | | }) |
| | | let filterData = ref({}) |
| | | const filterChanged = ({ option, row, column }) => { |
| | | if (option.data) { |
| | | return row[column.field].toString().toLowerCase().indexOf(option.data) > -1 |
| | | } |
| | | return true |
| | | //@filter-change="filterChanged" |
| | | } |
| | | let rowIndex = ref(null) |
| | | let rowClickIndex = ref(null) |
| | | |
| | | const gridOptions = reactive({ |
| | | border: "full",//表格加边框 |
| | | keepSource: true,//保持源数据 |
| | |
| | | body: { |
| | | options: [ |
| | | [ |
| | | { code: 'addRow', name: '添加', prefixIcon: 'vxe-icon-square-plus', visible: true, disabled: false } |
| | | { code: 'addRow', name: '添加', prefixIcon: 'vxe-icon-square-plus', visible: true, disabled: false }, |
| | | { code: 'deleteRow', name: '删除', prefixIcon: 'vxe-icon-delete', visible: true, disabled: true } |
| | | ] |
| | | ] |
| | | } |
| | |
| | | } |
| | | ], |
| | | quantity: [ |
| | | { type: 'number', min: 0, message: '请输入大于等于0的数值' } |
| | | //type: 'number', min: 0, message: '请输入大于等于0的数值' , |
| | | { |
| | | validator ({ cellValue }) { |
| | | const regex = /^[1-9]\d*$/ |
| | | if (!regex.test(cellValue)) { |
| | | return new Error('输入大于0的整数') |
| | | } |
| | | }} |
| | | ], |
| | | width:[ |
| | | { |
| | |
| | | return |
| | | } |
| | | $grid.insert({}) |
| | | //console.log($grid.getRecordset().insertRecords) |
| | | break |
| | | } |
| | | case 'deleteRow':{ |
| | | |
| | | $grid.remove(rowClickIndex.value) |
| | | rowClickIndex.value = null |
| | | gridOptions.menuConfig.body.options[0][1].disabled=true |
| | | break |
| | | } |
| | | } |
| | |
| | | }, |
| | | cellDblclick (params) {//表格内容双击打开产品界面 |
| | | const { row } = params |
| | | //alert("我打开了产品界面") |
| | | productVisible.value = true |
| | | rowIndex=row |
| | | }, |
| | | cellClick({ row }){ |
| | | rowClickIndex.value = row |
| | | //右键菜单删除启用 |
| | | gridOptions.menuConfig.body.options[0][1].disabled=false |
| | | } |
| | | } |
| | | //获取子页面产品方法 |
| | | const getProductRow = (row) => { |
| | | rowIndex.productName = row.productName |
| | | rowIndex.productId = row.id |
| | | productVisible.value = false |
| | | } |
| | | |
| | | //初始化判断是否有id传入 |
| | |
| | | const area = parseFloat((row.width * row.height/1000000).toFixed(2)) |
| | | return parseFloat((area * row.quantity).toFixed(2)) |
| | | } |
| | | |
| | | //计算金钱 |
| | | const countMoney = (list) => { |
| | | let countMoney = 0 |
| | | list.forEach((item)=>{ |
| | |
| | | titleUploadData.value.money=countMoney(xGrid.value.getTableData().fullData).toString() |
| | | } |
| | | |
| | | // 手动触发筛选 |
| | | const changeFilterEvent = (event, option, $panel) => { |
| | | // 手动触发筛选 |
| | | $panel.changeOption(event, !!option.data, option) |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | |
| | | :autosize="{ minRows: 2, maxRows: 20 }" |
| | | /> |
| | | </el-dialog> |
| | | <el-dialog v-model="productVisible" style="width: 80%;height:75% "> |
| | | <select-product :rowIndex="rowIndex" @getProductRow="getProductRow" style="width: 100%;height: 100%" /> |
| | | </el-dialog> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | <script setup> |
| | | import {ArrowLeftBold, ArrowRight, Search} from "@element-plus/icons-vue" |
| | | import {useRouter,useRoute,onBeforeRouteUpdate} from "vue-router"; |
| | | import {watch} from "vue"; |
| | | |
| | | const router = useRouter() |
| | | const route = useRoute() |
| | | let indexFlag=$ref(1) |
| | |
| | | let total = reactive({ |
| | | pageTotal : 0, |
| | | dataTotal : 0, |
| | | pageSize : 10 |
| | | pageSize : 100 |
| | | }) |
| | | //加载请求 |
| | | request.post(`/order/getOrderList/1/${total.pageSize}/${orderType.value}/${selectDate.value}`,filterData).then((res) => { |
| | |
| | | break |
| | | } |
| | | case 'delete': { |
| | | if (row.processReview === 2) { |
| | | ElMessage.warning('已审核的订单不能删除') |
| | | return |
| | | } |
| | | request.post(`/order/deleteOrder/${row.orderId}`).then((res) => { |
| | | if(res.code==200){ |
| | | ElMessage.success('删除成功') |
| | |
| | | </template> |
| | | |
| | | <template #state="{ row,column}"> |
| | | <!-- <p>{{row[column.field]}}</p>--> |
| | | <el-checkbox @click.native.prevent :indeterminate="row[column.field]===1" :checked="row[column.field]===2"/> |
| | | </template> |
| | | |
| | |
| | | |
| | | <template #pager> |
| | | <!--使用 pager 插槽--> |
| | | <!-- 'PrevJump','NextJump', --> |
| | | <vxe-pager |
| | | @page-change="handlePageChange" |
| | | :layouts="[ 'PrevJump', 'PrevPage', 'Jump','PageCount', 'NextPage', 'NextJump', 'Total']" |
| | | :layouts="[ 'PrevPage', 'Jump','PageCount', 'NextPage', 'Total']" |
| | | v-model:current-page="pageNum" |
| | | v-model:page-size="total.pageSize" |
| | | v-model:pager-count="total.pageTotal" |
| | |
| | | <script setup> |
| | | import {onMounted, reactive, ref} from "vue" |
| | | import {computed, onMounted, reactive, ref} from "vue" |
| | | import {useRouter,useRoute} from "vue-router" |
| | | import request from "@/utils/request" |
| | | import {ElMessage} from "element-plus"; |
| | | import {ElMessage} from "element-plus" |
| | | import {changeFilterEvent,filterChanged} from "@/hook" |
| | | import SelectProduct from "@/views/sd/product/SelectProduct.vue"; |
| | | |
| | | const router = useRouter() |
| | | const route = useRoute() |
| | | let dialogTableVisible = ref(false) |
| | | let craftVisible = ref(false) |
| | | const xGrid = ref() |
| | | const gridOptions = reactive({ |
| | | border: "full",//表格加边框 |
| | |
| | | useKey: true |
| | | }, |
| | | filterConfig: { //筛选配置项 |
| | | remote: true |
| | | // remote: true |
| | | }, |
| | | customConfig: { |
| | | storage: true |
| | |
| | | },//表头参数 |
| | | columns:[ |
| | | {title: '操作', width: 110, slots: { default: 'button_slot' },fixed:"left",}, |
| | | {field: 'orderNumber',width:120, title: '序号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'orderNumber',width:120, title: '序号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | //{field: 'orderDetail.buildingNumber',width:120, title: '楼号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'orderDetail.productName',width:120, title: '成品名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'glassAddress',width:120, title: '标记',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'glassChild',width:120, title: '子产品',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'orderDetail.width',width:120, title: '成品宽',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'orderDetail.height',width:120, title: '成品高',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'orderDetail.shape',width:120, title: '形状',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'orderDetail.grossArea',width:120, title: '总尺寸',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'childWidth',width:120, title: '单片宽',editRender: { name: 'input'},filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'childHeight',width:120, title: '单片高',editRender: { name: 'input'},filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'orderDetail.area',width:120, title: '单片尺寸',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'orderDetail.quantity',width:120, title: '数量',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'process',width:120, title: '工艺流程',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'orderDetail.processingNote',width:120, title: '加工要求',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'orderDetail.remarks',width:120, title: '备注',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'orderDetail.edgingType',width:120, title: '磨边类型',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true} |
| | | {field: 'orderDetail.productName',width:120, title: '成品名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'glassAddress',width:120, title: '标记',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'glassChild',width:120, title: '子产品',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'orderDetail.width',width:120, title: '成品宽',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'orderDetail.height',width:120, title: '成品高',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'orderDetail.shape',width:120, title: '形状',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'totalArea',width:120, title: '总尺寸',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'childWidth',width:120, title: '单片宽',editRender: { name: 'input'},filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'childHeight',width:120, title: '单片高',editRender: { name: 'input'},filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'area',width:120, title: '单片尺寸',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'orderDetail.quantity',width:120, title: '数量',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'process',width:120, title: '工艺流程',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'icon',width:120, title: '商标',editRender: { name: 'input'},filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'orderDetail.processingNote',width:120, title: '加工要求',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'orderDetail.remarks',width:120, title: '备注',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'orderDetail.edgingType',width:120, title: '磨边类型',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged} |
| | | ],//表头按钮 |
| | | mergeCells: [ |
| | | /*{ row: 0, col: 1, rowspan: 4, colspan: 1 }, |
| | |
| | | processingNote:'' |
| | | }) |
| | | |
| | | let process = ref([]) |
| | | request.get(`/basicData/BasicDataByType/product/process`).then((res) =>{ |
| | | if (res.code==200){ |
| | | process.value=res.data |
| | | } |
| | | }) |
| | | |
| | | let rowIndex = ref({}) |
| | | const updateCraft = (row) => { |
| | | craftVisible.value= true |
| | | Object.keys(craftObj).forEach((key) =>{ |
| | | craftObj[key] = row['process'].split('->') |
| | | }) |
| | | rowIndex.value = row |
| | | } |
| | | const craftObj = reactive({ |
| | | newCraft: [], |
| | | oldCraft: [] |
| | | }) |
| | | const resetCraft = () => { |
| | | craftObj.newCraft = [] |
| | | } |
| | | |
| | | const saveCraft = () => { |
| | | rowIndex.value.process = craftObj.newCraft.join('->') |
| | | craftVisible.value= false |
| | | } |
| | | |
| | | const newCraftComputed = computed(() =>{ |
| | | return craftObj.newCraft.join('->') |
| | | }) |
| | | const oldCraftComputed = computed(() =>{ |
| | | return craftObj.oldCraft.join('->') |
| | | }) |
| | | |
| | | //初始化判断是否有id传入 |
| | | onMounted(()=>{ |
| | | const str = route.query.orderId |
| | |
| | | } |
| | | request.post(`/order/getOrderCraftById/${str}`).then((res) => { |
| | | if(res.code==200){ |
| | | console.log(res.data) |
| | | titleUploadData.value = res.data.order |
| | | |
| | | //取消审核按钮禁用 |
| | |
| | | } |
| | | }) |
| | | }) |
| | | //保存修改工艺 |
| | | const reviewOrderCraft = (state) => { |
| | | |
| | | request.post(`/order/reviewProcessById/${titleUploadData.value.orderId}/${state}`,xGrid.value.getRecordset().updateRecords).then(res =>{ |
| | |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | |
| | | // |
| | | </script> |
| | | |
| | | <template> |
| | |
| | | |
| | | <!--左边固定显示的插槽--> |
| | | <template #button_slot="{ row }"> |
| | | <el-button @click="getTableRow(row,'edit')" link type="primary" size="small">修改工艺</el-button> |
| | | <el-button @click="updateCraft(row)" link type="primary" size="small">修改工艺</el-button> |
| | | </template> |
| | | |
| | | <template #num1_filter="{ column, $panel }"> |
| | |
| | | :autosize="{ minRows: 2, maxRows: 20 }" |
| | | /> |
| | | </el-dialog> |
| | | |
| | | <el-dialog v-model="craftVisible" title="工艺流程" style="width: 60%;height:60% ;position: relative;" > |
| | | <h5>工艺属性</h5> |
| | | <el-checkbox |
| | | v-model="craftObj.newCraft" |
| | | v-for="item in process" |
| | | :label="item.basicName" |
| | | class="glass-process-checkbox" |
| | | size="small" /> |
| | | |
| | | <el-row style="width: 90%;border: 0;position: absolute;bottom: 1rem; left: 50%;transform: translateX(-50%);"> |
| | | |
| | | <span class="ml-3 w-35 text-gray-600 inline-flex items-center" |
| | | >原流程: |
| | | </span> |
| | | <el-input :value="oldCraftComputed" disabled class="w-50 m-2" /> |
| | | <span class="ml-3 w-35 text-gray-600 inline-flex items-center" |
| | | >流程: |
| | | </span> |
| | | <el-input :value="newCraftComputed" disabled class="w-50 m-2" /> |
| | | <el-col style="margin-top: 0.5rem"> |
| | | <el-button type="primary" @click="resetCraft">重置</el-button> |
| | | <el-button type="primary" @click="saveCraft">保存</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | |
| | | |
| | | </el-dialog> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | width: 100%; |
| | | height: 90%; |
| | | } |
| | | |
| | | .el-dialog .el-col{ |
| | | border: 0;text-align: right |
| | | } |
| | | .el-dialog .el-text{ |
| | | font-weight: bolder |
| | | } |
| | | </style> |
| | |
| | | import request from "@/utils/request" |
| | | import deepClone from "@/utils/deepClone" |
| | | import {ElMessage} from "element-plus" |
| | | import {computed, ref} from "vue" |
| | | import {computed, onMounted, ref} from "vue" |
| | | import useUserInfo from "@/stores/userInfo" |
| | | import {useRouter,useRoute} from "vue-router" |
| | | import GlassType from "@/components/sd/product/GlassType.vue" |
| | | import useProductGlassTypeStore from "@/stores/sd/product/productGlassType" |
| | | |
| | | const router = useRouter() |
| | | const route = useRoute() |
| | | let userInfo = useUserInfo() |
| | | const disposeList = $ref([ |
| | | '彩釉', |
| | |
| | | let productDetailList = ref([]) |
| | | let productTotal = ref({ |
| | | productName:'', |
| | | query:'', |
| | | remarks:'', |
| | | thickness:'', |
| | | totalThickness:'', |
| | | typeId:'', |
| | | creator:userInfo.user.userName |
| | | }) |
| | | |
| | | let productGlassTypeStore = useProductGlassTypeStore() |
| | | productGlassTypeStore.GlassType=['',''] |
| | | |
| | | //页面加载请求 |
| | | request.get(`/basicData/BasicDataByType/product`).then((res) => { |
| | | if(res.code==200){ |
| | |
| | | } |
| | | }) |
| | | |
| | | |
| | | onMounted(()=>{ |
| | | const str = route.query.id |
| | | if (typeof str === 'undefined' || str === null || str === '' || str === '\n' || str === '\r'){ |
| | | return |
| | | } |
| | | request.post(`/product/selectProductById/${str}`).then((res) => { |
| | | if(res.code==200){ |
| | | productDetailList.value = res.data.detail |
| | | productDetailList.value.forEach((item)=>{ |
| | | item.separation = JSON.parse(item.separation) |
| | | }) |
| | | productTotal.value = res.data.title |
| | | //BasicData.value = res.data |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | |
| | | }) |
| | | |
| | | const saveProduct = () => { |
| | | if(productDetailList.value.length===0){ |
| | | ElMessage.warning("请添加产品详情") |
| | |
| | | }else if(productDetailList.value[productDetailList.value.length-1].detailType!=='glass'){ |
| | | ElMessage.warning("产品详情最后一条不是玻璃,请完善") |
| | | return |
| | | }else if(productGlassTypeStore.GlassType[1]==='' || productGlassTypeStore.GlassType[1]===null){ |
| | | ElMessage.warning("请选择产品类别") |
| | | return |
| | | } |
| | | productTotal.value.typeId = productGlassTypeStore.GlassType[1] |
| | | |
| | | let productName = "" |
| | | productDetailList.value.forEach(item =>{ |
| | | switch(item.detailType){ |
| | |
| | | break |
| | | } |
| | | case 'Interlayer' :{ |
| | | productName+='+'+item.detail |
| | | productName+='+'+item.detail+"+" |
| | | break |
| | | } |
| | | case 'hollow' :{ |
| | | productName+='*'+item.detail |
| | | productName+='*'+item.detail+"*" |
| | | break |
| | | } |
| | | } |
| | | }) |
| | |
| | | } |
| | | request.post(`/product/saveProduct`,product).then((res) =>{ |
| | | if(res.code==200){ |
| | | ElMessage.success(res.msg) |
| | | ElMessage.success("创建成功") |
| | | router.push("/main/product/selectProduct") |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //审核产品状态 |
| | | const updateProductState = (state) => { |
| | | request.post(`/product/updateProductStateById/${productTotal.value.id}/${state}`).then((res) =>{ |
| | | if(res.code==200){ |
| | | ElMessage.success("操作成功") |
| | | //router.go(0) |
| | | router.push({path:'/main/product/createProduct',query:{id:productTotal.value.id,random:Math.random()}}) |
| | | }else{ |
| | | ElMessage.error("操作失败") |
| | | } |
| | | }) |
| | | } |
| | | |
| | | const reset = () => { |
| | | processChecked.value=[] |
| | |
| | | index:null |
| | | }) |
| | | const updateGlass = (index) => { |
| | | stuff.value = productDetailList.value[index].separation |
| | | Object.keys(stuff.value).forEach((item)=>{ |
| | | stuff.value[item]=productDetailList.value[index].separation[item] |
| | | }) |
| | | processChecked.value = productDetailList.value[index].process.split("->") |
| | | glassFlag.value.flag=false |
| | | glassFlag.value.index=index |
| | |
| | | index:null |
| | | }) |
| | | const updateInterlayer = (index) => { |
| | | InterlayerBasic.value = productDetailList.value[index].separation |
| | | Object.keys(InterlayerBasic.value).forEach((item)=>{ |
| | | InterlayerBasic.value[item]=productDetailList.value[index].separation[item] |
| | | }) |
| | | |
| | | InterlayerFlag.value.flag=false |
| | | InterlayerFlag.value.index=index |
| | | } |
| | |
| | | index:null |
| | | }) |
| | | const updateHollow = (index) => { |
| | | hollowBasic.value = productDetailList.value[index].separation |
| | | Object.keys(hollowBasic.value).forEach((item)=>{ |
| | | hollowBasic.value[item]=productDetailList.value[index].separation[item] |
| | | }) |
| | | |
| | | hollowFlag.value.flag=false |
| | | hollowFlag.value.index=index |
| | | } |
| | |
| | | break |
| | | } |
| | | case 'Interlayer' :{ |
| | | productName+='+'+item.detail |
| | | productName+='+'+item.detail+"+" |
| | | break |
| | | } |
| | | case 'hollow' :{ |
| | | productName+='*'+item.detail |
| | | productName+='*'+item.detail+"*" |
| | | break |
| | | } |
| | | } |
| | | }) |
| | | return productName |
| | | }) |
| | | |
| | | |
| | | |
| | | </script> |
| | | |
| | |
| | | boxShadow: `var(--el-box-shadow-lighter)`, |
| | | }" |
| | | > |
| | | |
| | | <div class="glass-dispose"> |
| | | <!-- <h5>表面处理</h5>--> |
| | | <!-- <h5>玻璃类别</h5>--> |
| | | <div class="glass-dispose-detail"> |
| | | <glass-type style="float: left;margin-left: -0.5rem" /> |
| | | <!-- <div v-for="n in 2" class="glass-dispose-detail-1"> |
| | | <p style="writing-mode: vertical-rl;"> |
| | | {{n===1?'第一面':'第二面'}} |
| | | </p> |
| | | <div class="glass-dispose-detail-list" |
| | | v-for="(item,index) in disposeList" |
| | | > |
| | | <el-checkbox |
| | | :label="item" size="large" /> |
| | | <el-input |
| | | v-if="index==0 && n==1" |
| | | class="dispose-input" |
| | | size="small" |
| | | clearable /> |
| | | </div> |
| | | |
| | | </div>--> |
| | | </div> |
| | | </div> |
| | | <div class="line"/> |
| | | |
| | | <div class="glass-type"> |
| | | <h5>材料属性</h5> |
| | | <el-row :gutter="50"> |
| | |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <div class="line"/> |
| | | <div class="glass-dispose"> |
| | | <h5>表面处理</h5> |
| | | <div class="glass-dispose-detail"> |
| | | <div v-for="n in 2" class="glass-dispose-detail-1"> |
| | | <p style="writing-mode: vertical-rl;"> |
| | | {{n===1?'第一面':'第二面'}} |
| | | </p> |
| | | <div class="glass-dispose-detail-list" |
| | | v-for="(item,index) in disposeList" |
| | | > |
| | | <el-checkbox |
| | | :label="item" size="large" /> |
| | | <el-input |
| | | v-if="index==0 && n==1" |
| | | class="dispose-input" |
| | | size="small" |
| | | clearable /> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | <div class="line"/> |
| | | <div class="glass-process"> |
| | | <h5>工艺属性</h5> |
| | |
| | | style="margin-left: 0.5rem;text-align: center"> |
| | | 快速查询: |
| | | </el-text> |
| | | <el-input size="small" disabled /> |
| | | <el-input v-model="productTotal.query" size="small" disabled /> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="5"> |
| | |
| | | style="margin-left: 0.5rem;text-align: center"> |
| | | 计重厚度: |
| | | </el-text> |
| | | <el-input size="small" disabled /> |
| | | <el-input v-model="productTotal.thickness" size="small" disabled /> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="5"> |
| | |
| | | style="margin-left: 0.5rem;text-align: center"> |
| | | 厚度: |
| | | </el-text> |
| | | <el-input size="small" disabled /> |
| | | <el-input v-model="productTotal.totalThickness" size="small" disabled /> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="5"> |
| | |
| | | style="margin-left: 0.5rem;text-align: center"> |
| | | 备注: |
| | | </el-text> |
| | | <el-input size="small" disabled /> |
| | | <el-input v-model="productTotal.remarks" size="small" /> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | |
| | | </div> |
| | | <el-button |
| | | :disabled="productTotal.state===1" |
| | | @click="saveProduct" |
| | | style="float: right; |
| | | margin-right: 0.5rem;" |
| | | size="large" |
| | | type="primary" |
| | | round>创建</el-button> |
| | | round>{{productTotal.id?'修改':'创建'}}</el-button> |
| | | <el-button |
| | | v-if="productTotal.state===0" |
| | | @click="updateProductState(1)" |
| | | style="float: right; |
| | | margin-right: 0.5rem;" |
| | | size="large" |
| | | type="primary" |
| | | round>审核</el-button> |
| | | <el-button |
| | | v-else-if="productTotal.state===1" |
| | | @click="updateProductState(0)" |
| | | style="float: right; |
| | | margin-right: 0.5rem;" |
| | | size="large" |
| | | type="primary" |
| | | round>反审</el-button> |
| | | |
| | | </div> |
| | | |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | } |
| | | .glass-dispose{ |
| | | width: 100%; |
| | | height: 20%; |
| | | height: 5%; |
| | | } |
| | | .glass-dispose-detail{ |
| | | margin-top: 0.5rem; |
| | |
| | | import request from "@/utils/request"; |
| | | import deepClone from "@/utils/deepClone"; |
| | | import {ElMessage} from "element-plus"; |
| | | import {useRouter} from "vue-router"; |
| | | import GlassType from '@/components/sd/product/GlassType.vue' |
| | | import {useRouter,useRoute,onBeforeRouteUpdate} from "vue-router"; |
| | | const router = useRouter() |
| | | const route = useRoute() |
| | | let indexFlag=$ref(1) |
| | | function changeRouter(index){ |
| | | indexFlag=index |
| | |
| | | </div> |
| | | |
| | | <div id="main-body"> |
| | | <router-view /> |
| | | <router-view :key="route.fullPath" /> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | //监听玻璃类型改变 |
| | | let productList = ref([]) |
| | | let date=ref(['','']) |
| | | productGlassTypeStore.GlassType=['',''] |
| | | |
| | | |
| | | let props = defineProps({ |
| | | rowIndex:{} |
| | | }) |
| | | |
| | | let glassType = ref([]) |
| | | watch(productGlassTypeStore,(newVal,oldVal) => { |
| | | |
| | | |
| | | }) |
| | | const getProduct = () => { |
| | | request.post(`/product/1/100/${productGlassTypeStore.GlassType}`,filterData.value).then((res) => { |
| | | if(res.code==200){ |
| | |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | //删除与编辑方法 |
| | | const getTableRow = (row,type) => { |
| | | switch (type) { |
| | | case 'edit': { |
| | | router.push({path:'/main/product/createProduct',query:{id:row.id}}) |
| | | break |
| | | } |
| | | case 'delete': { |
| | | request.post(`/product/deleteProductById/${row.id}`).then((res) => { |
| | | if(res.code==200){ |
| | | //router.push("/main/product/selectProduct") |
| | | router.go(0) |
| | | ElMessage.success('删除成功') |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | break |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | |
| | | }, |
| | | columns:[ |
| | | {type:'expand',fixed:"left",slots: { content:'content' },width: 60}, |
| | | {type: 'seq',fixed:"left", title: '自序', width: 80 }, |
| | | {title: '操作', width: 110, slots: { default: 'button_slot' },fixed:"left"}, |
| | | {field:'state',title: '审核', width: 40, slots: { default: 'state' }}, |
| | | {type: 'seq',fixed:"left", title: '自序', width: 80 }, |
| | | {field: 'id', title: '编号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: false}, |
| | | {field: 'productName', title: '名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: false}, |
| | | {field: 'basicGlassType.typeName', title: '所属类别',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: false}, |
| | |
| | | }) |
| | | } |
| | | |
| | | let emit = defineEmits([ |
| | | 'getProductRow' |
| | | ]) |
| | | |
| | | |
| | | const emitParent = (row) => { |
| | | emit('getProductRow', 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-if="hasDecimal(item.field)">{{ row[item.field] }}</span> |
| | | <span v-else>{{ row[item.field] }}</span> |
| | | |
| | | </li> |
| | |
| | | </template> |
| | | |
| | | <!--左边固定显示的插槽--> |
| | | <template #button_slot="{ row }"> |
| | | <template #button_slot="{ row }" v-if="!props.rowIndex"> |
| | | <el-button @click="getTableRow(row,'edit')" link type="primary" size="small">编辑</el-button> |
| | | <el-button @click="getTableRow(row,'delete')" link type="primary" size="small">删除</el-button> |
| | | <el-popconfirm @confirm="getTableRow(row,'delete')" title="确认删除产品?"> |
| | | <template #reference> |
| | | <el-button link type="primary" size="small">删除</el-button> |
| | | </template> |
| | | </el-popconfirm> |
| | | </template> |
| | | <template #button_slot="{ row }" v-else> |
| | | <el-button @click="emitParent(row)" link type="primary" size="small">添加</el-button> |
| | | </template> |
| | | |
| | | <template #num1_filter="{ column, $panel }"> |
| | |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <template #state="{ row,column}"> |
| | | <el-checkbox @click.native.prevent :checked="row[column.field]===1"/> |
| | | </template> |
| | | |
| | | </vxe-grid> |
| | | |
| | |
| | | |
| | | //分架新增明细查询 |
| | | @PostMapping ("/selectNoCard/{orderId}/{productionId}") |
| | | |
| | | public Result SelectNoCard( |
| | | @PathVariable String orderId, |
| | | @PathVariable String productionId, |
| | |
| | | } |
| | | } |
| | | |
| | | //查询第一次排版数据 |
| | | @PostMapping ("/selectLastScheduling/{selectTime1}/{selectTime2}") |
| | | public Result selectLastScheduling( |
| | | @PathVariable String selectTime1, |
| | | @PathVariable String selectTime2, |
| | | @RequestBody FlowCard flowCard){ |
| | | return Result.seccess(flowCardService.selectLastScheduling(selectTime1,selectTime2,flowCard)); |
| | | |
| | | } |
| | | //查询排版数据 |
| | | @PostMapping ("/selectScheduling/{selectTime1}/{selectTime2}/{orderId}/{processes}/{state}") |
| | | public Result selectScheduling( |
| | | @PathVariable String selectTime1, |
| | | @PathVariable String selectTime2, |
| | | @PathVariable String orderId, |
| | | @PathVariable String processes, |
| | | @PathVariable Integer state, |
| | | @RequestBody FlowCard flowCard){ |
| | | return Result.seccess(flowCardService.SelectSchedulingSv(selectTime1,selectTime2,orderId,processes,state,flowCard)); |
| | | |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.example.erp.controller.pp; |
| | | |
| | | import com.example.erp.common.Constants; |
| | | import com.example.erp.common.Result; |
| | | import com.example.erp.entity.pp.ProductionScheduling; |
| | | import com.example.erp.exception.ServiceException; |
| | | import com.example.erp.service.pp.ProductionSchedulingService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.sql.Date; |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | @RequestMapping("/productionScheduling") |
| | | public class ProductionSchedulingController { |
| | | @Autowired |
| | | ProductionSchedulingService productionSchedulingService; |
| | | |
| | | //查询第一次排版数据 |
| | | @PostMapping ("/selectLastScheduling/{selectTime1}/{selectTime2}") |
| | | public Result selectLastScheduling( |
| | | @PathVariable String selectTime1, |
| | | @PathVariable String selectTime2, |
| | | @RequestBody ProductionScheduling productionScheduling){ |
| | | return Result.seccess(productionSchedulingService.selectLastScheduling(selectTime1,selectTime2,productionScheduling)); |
| | | |
| | | } |
| | | //点击查询排版数据 |
| | | @PostMapping ("/selectScheduling/{selectTime1}/{selectTime2}/{orderId}/{processes}/{state}") |
| | | public Result SelectScheduling( |
| | | @PathVariable String selectTime1, |
| | | @PathVariable String selectTime2, |
| | | @PathVariable String orderId, |
| | | @PathVariable String processes, |
| | | @PathVariable Integer state, |
| | | @RequestBody ProductionScheduling productionScheduling){ |
| | | return Result.seccess(productionSchedulingService.SelectSchedulingSv(selectTime1,selectTime2,orderId,processes,state,productionScheduling)); |
| | | |
| | | } |
| | | |
| | | //点击查询排版数据 |
| | | @PostMapping ("/selectSchedulingNot/{selectTime1}/{selectTime2}/{orderId}/{processes}/{state}") |
| | | public Result SelectSchedulingNot( |
| | | @PathVariable String selectTime1, |
| | | @PathVariable String selectTime2, |
| | | @PathVariable String orderId, |
| | | @PathVariable String processes, |
| | | @PathVariable Integer state, |
| | | @RequestBody ProductionScheduling productionScheduling){ |
| | | return Result.seccess(productionSchedulingService.SelectSchedulingNotSv(selectTime1,selectTime2,orderId,processes,state,productionScheduling)); |
| | | |
| | | } |
| | | |
| | | } |
| | |
| | | public Result getBasicDataByType(@PathVariable String type){ |
| | | return Result.seccess(basicDateService.getBasicDataByType(type)); |
| | | } |
| | | @GetMapping("/BasicDataByType/{type}/{childType}") |
| | | public Result getBasicDataByTypeAndChildType(@PathVariable String type,@PathVariable String childType){ |
| | | return Result.seccess(basicDateService.getBasicDataByTypeAndChildType(type,childType)); |
| | | } |
| | | } |
| | |
| | | import com.example.erp.common.Result; |
| | | import com.example.erp.entity.sd.Product; |
| | | import com.example.erp.service.sd.ProductService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.ibatis.annotations.Delete; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | @Api(value="产品controller",tags={"产品操作接口"}) |
| | | @RequestMapping("/product") |
| | | public class ProductController { |
| | | @Autowired |
| | | ProductService productService; |
| | | |
| | | @ApiOperation("产品查询接口") |
| | | @PostMapping ("/{pageNum}/{pageSize}/{glassType}") |
| | | public Result defaultDateProduct(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @PathVariable List<String> glassType, @RequestBody Product product){ |
| | | return Result.seccess(productService.defaultDateProduct(pageNum,pageSize,glassType,product)); |
| | | } |
| | | |
| | | @ApiOperation("产品保存接口") |
| | | @PostMapping("/saveProduct") |
| | | public Result saveProduct(@RequestBody Map<String,Object> product){ |
| | | return Result.seccess(productService.saveProduct(product)); |
| | | } |
| | | @ApiOperation("产品删除接口") |
| | | @PostMapping("/deleteProductById/{id}") |
| | | public Result deleteProductById(@PathVariable Integer id){ |
| | | return Result.seccess(productService.deleteProductById(id)); |
| | | } |
| | | |
| | | @ApiOperation("产品审核状态修改接口") |
| | | @PostMapping("/updateProductStateById/{id}/{state}") |
| | | public Result updateProductStateById(@PathVariable Integer id,@PathVariable Integer state){ |
| | | return Result.seccess(productService.updateProductStateById(id,state)); |
| | | } |
| | | @ApiOperation("根据产品id查询产品接口") |
| | | @PostMapping("/selectProductById/{id}") |
| | | public Result selectProductById(@PathVariable Integer id){ |
| | | return Result.seccess(productService.selectProductById(id)); |
| | | } |
| | | } |
New file |
| | |
| | | package com.example.erp.entity.pp; |
| | | |
| | | import com.example.erp.entity.sd.Order; |
| | | import com.example.erp.entity.sd.OrderDetail; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class ProductionScheduling { |
| | | //自增id |
| | | private Integer id; |
| | | //排产编号 |
| | | private String schedulingId; |
| | | //订单号 |
| | | private String orderId; |
| | | //订单序号 |
| | | private String orderNumber; |
| | | //排产工序 |
| | | private String processes; |
| | | //排产数量 |
| | | private Integer schedulingQuantity; |
| | | //计划开始时间 |
| | | private Integer scheduledStartTime; |
| | | //计划结束时间 |
| | | private Integer planEndTime; |
| | | //审核状态 |
| | | private String reviewStatus; |
| | | //备注 |
| | | private String notes; |
| | | //创建时间 |
| | | private String createTime; |
| | | |
| | | //外键订单表 |
| | | private Order order; |
| | | //外键订单明细表 |
| | | private OrderDetail orderDetail; |
| | | } |
| | |
| | | private String glassChild; |
| | | private Double childWidth; |
| | | private Double childHeight; |
| | | private Double area; |
| | | private Double totalArea; |
| | | private String icon; |
| | | private String process; |
| | | private String productionId; |
| | | private Integer splittingStatus; |
| | |
| | | package com.example.erp.entity.sd; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import lombok.Data; |
| | | |
| | |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | private String productName; |
| | | private String typeId; |
| | | private String typeName; |
| | | private Double totalThickness; |
| | | private Double thickness; |
| | |
| | | private String creator; |
| | | private LocalDate createTime; |
| | | private LocalDate updateTime; |
| | | @TableField(select = false) |
| | | private BasicGlassType basicGlassType; |
| | | |
| | | } |
| | |
| | | package com.example.erp.entity.sd; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import lombok.Data; |
| | | |
| | |
| | | private String process; |
| | | private String separation; |
| | | private LocalDate createTime; |
| | | @TableField(select = false) |
| | | private Product product; |
| | | } |
| | |
| | | //分架明细查询 |
| | | List<FlowCard> DetailsSelectMp(String orderId, FlowCard flowCard); |
| | | |
| | | //删除工单 |
| | | //删除流程卡 |
| | | Boolean DeleteFlowCardMp(String orderId, String processId); |
| | | |
| | | //分架新增明细查询 |
| | |
| | | |
| | | Integer SelectLayoutStatus(String processId); |
| | | |
| | | //查询报工表内是否存在对应流程卡的数据 |
| | | Integer ReportingWorkCount(String processId); |
| | | |
| | | Boolean AddFlowCardMp(String processId, Integer orderNumber, Integer landingSequence, Integer quantity, String productionId, String userName); |
| | | //插入Flow_card表 |
| | | Boolean AddFlowCardMp(String processId, Integer orderNumber, Integer landingSequence, Integer quantity, String productionId, String userName,Integer layer); |
| | | |
| | | Boolean UpdateFlowState(String productionId, Integer orderNumber); |
| | | |
| | |
| | | Boolean UpdateProcessingCard(String productionId, int state); |
| | | |
| | | Boolean UpdateDeleteState(String orderId, String processId); |
| | | |
| | | List<FlowCard> SelectOkSchedulingMp(String selectTime1, String selectTime2, String orderId,String processes, FlowCard flowCard); |
| | | |
| | | List<FlowCard> SelectNoSchedulingMp(String selectTime1, String selectTime2, String orderId,String processes, FlowCard flowCard); |
| | | |
| | | List<Map<String,String>> selectLastSchedulingMp(String selectTime1, String selectTime2, FlowCard flowCard); |
| | | |
| | | Integer SelectLayer(String productionId, Integer orderNumber); |
| | | } |
New file |
| | |
| | | package com.example.erp.mapper.pp; |
| | | |
| | | import com.example.erp.entity.pp.ProductionScheduling; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | import java.sql.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Mapper |
| | | public interface ProductionSchedulingMapper { |
| | | |
| | | |
| | | List<Map<String,String>> SelectOkSchedulingMp(String selectTime1, String selectTime2,String orderId,String processes, ProductionScheduling productionScheduling); |
| | | |
| | | List<Map<String,String>> SelectNoSchedulingMp(String selectTime1, String selectTime2,String orderId,String processes, ProductionScheduling productionScheduling); |
| | | |
| | | List<Map<String,String>> selectLastSchedulingMp(String selectTime1, String selectTime2, ProductionScheduling productionScheduling); |
| | | |
| | | List<Map<String,String>> SelectSchedulingNotMp(String selectTime1, String selectTime2, String orderId, String processes, ProductionScheduling productionScheduling); |
| | | } |
| | |
| | | List<BasicData> getOrderBasicData(String type); |
| | | List<String> getOrderBasicDataType(String type); |
| | | |
| | | List<BasicData> getOrderBasicDataByTypeAndChildType(String type, String childType); |
| | | } |
| | |
| | | package com.example.erp.mapper.sd; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.example.erp.entity.sd.ProductDetail; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Mapper |
| | | public interface ProductDetailMapper { |
| | | public interface ProductDetailMapper extends BaseMapper<ProductDetail> { |
| | | List<ProductDetail> getGlassDetailList(); |
| | | |
| | | boolean insertList(List<ProductDetail> getProductDetails); |
| | |
| | | @Param("product") Product product); |
| | | |
| | | Integer getPageTotal(Integer offset, Integer pageSize, String glassTypeId, Product product); |
| | | |
| | | boolean updateProductStateById(Integer id,Integer state); |
| | | } |
| | |
| | | return map; |
| | | } |
| | | |
| | | //删除工单 |
| | | //删除流程卡 |
| | | public Boolean DeleteFlowCardSv(String orderId, String processId) { |
| | | if (!orderId.isEmpty() && !processId.isEmpty()) { |
| | | Integer count=flowCardMapper.ReportingWorkCount(processId); |
| | | if (count==0){ |
| | | Integer count = flowCardMapper.ReportingWorkCount(processId); |
| | | if (count == 0) { |
| | | //修改订单表分架状态为1,未全部分架完成 |
| | | flowCardMapper.UpdateProcessingCard(orderId, 1); |
| | | //修改分架状态 |
| | | flowCardMapper.UpdateDeleteState(orderId, processId); |
| | | //删除分架明细 |
| | | flowCardMapper.DeleteFlowCardMp(orderId, processId); |
| | | return true; |
| | | } |
| | | else { |
| | | } else { |
| | | return false; |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | //保存流程卡数据 |
| | | public Boolean AddFlowCardSv(Map<String, Object> object) { |
| | | String userName = ""; |
| | | if (object.get("userName") != null) { |
| | |
| | | List<FlowCard> FlowCardList = JSONArray.parseArray(JSONObject.toJSONString(object.get("flowCard")), FlowCard.class); |
| | | if (!FlowCardList.isEmpty()) { |
| | | for (FlowCard flowCard : FlowCardList) { |
| | | //查询每个序号的层数 |
| | | Integer layer = flowCardMapper.SelectLayer(productionId, flowCard.getOrderNumber()); |
| | | //添加流程卡数据 |
| | | flowCardMapper.AddFlowCardMp(flowCard.getProcessId(),flowCard.getOrderNumber(),flowCard.getLandingSequence(),flowCard.getQuantity(),productionId,userName); |
| | | flowCardMapper.AddFlowCardMp(flowCard.getProcessId(), flowCard.getOrderNumber(), flowCard.getLandingSequence(), flowCard.getQuantity(), productionId, userName,layer); |
| | | //修改分架状态,将状态改为1 |
| | | flowCardMapper.UpdateFlowState(productionId,flowCard.getOrderNumber()); |
| | | flowCardMapper.UpdateFlowState(productionId, flowCard.getOrderNumber()); |
| | | //查询该订单未分架数量 |
| | | Integer FlowCount= flowCardMapper.SelectFlowCount(productionId); |
| | | |
| | | if (FlowCount==0){ |
| | | //修改订单表分架状态为2 |
| | | System.out.println("我来试试1"); |
| | | flowCardMapper.UpdateProcessingCard(productionId,2); |
| | | } |
| | | else{ |
| | | //修改订单表分架状态为1,未全部分架完成 |
| | | System.out.println("我来试试2"); |
| | | flowCardMapper.UpdateProcessingCard(productionId,1); |
| | | } |
| | | Integer FlowCount = flowCardMapper.SelectFlowCount(productionId); |
| | | if (FlowCount == 0) { |
| | | //修改订单表分架状态为2 |
| | | flowCardMapper.UpdateProcessingCard(productionId, 2); |
| | | } else { |
| | | //修改订单表分架状态为1,未全部分架完成 |
| | | flowCardMapper.UpdateProcessingCard(productionId, 1); |
| | | } |
| | | } |
| | | return true; |
| | | return true; |
| | | } else { |
| | | return false; |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | public Map<String, Object> SelectSchedulingSv(String selectTime1, String selectTime2, String orderId,String processes, Integer state, FlowCard flowCard) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | if (state==2){//已排产 |
| | | map.put("data", flowCardMapper.SelectOkSchedulingMp(selectTime1, selectTime2,orderId,processes, flowCard)); |
| | | |
| | | }else if (state==1){//未排产 |
| | | map.put("data", flowCardMapper.SelectNoSchedulingMp(selectTime1, selectTime2,orderId,processes, flowCard)); |
| | | |
| | | } |
| | | |
| | | return map; |
| | | } |
| | | |
| | | |
| | | //首次查询排版数据 |
| | | public Map<String, Object> selectLastScheduling(String selectTime1, String selectTime2, FlowCard flowCard) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", flowCardMapper.selectLastSchedulingMp(selectTime1, selectTime2, flowCard)); |
| | | return map; |
| | | } |
| | | } |
New file |
| | |
| | | |
| | | package com.example.erp.service.pp; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.example.erp.entity.pp.ProductionScheduling; |
| | | import com.example.erp.mapper.pp.ProductionSchedulingMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.sql.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Service |
| | | @DS("pp") |
| | | public class ProductionSchedulingService { |
| | | @Autowired |
| | | ProductionSchedulingMapper productionSchedulingMapper; |
| | | |
| | | //带时间查询 |
| | | public Map<String, Object> SelectSchedulingSv(String selectTime1, String selectTime2, String orderId,String processes, Integer state, ProductionScheduling productionScheduling ) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | |
| | | if (state==2){//已排产 |
| | | map.put("data", productionSchedulingMapper.SelectOkSchedulingMp(selectTime1, selectTime2,orderId,processes, productionScheduling)); |
| | | |
| | | }else if (state==1){//未排产 |
| | | map.put("data", productionSchedulingMapper.SelectNoSchedulingMp(selectTime1, selectTime2,orderId,processes, productionScheduling)); |
| | | |
| | | } |
| | | |
| | | return map; |
| | | } |
| | | |
| | | |
| | | //首次查询排产数据 |
| | | public Map<String, Object> selectLastScheduling(String selectTime1, String selectTime2,ProductionScheduling productionScheduling ) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", productionSchedulingMapper.selectLastSchedulingMp(selectTime1, selectTime2, productionScheduling)); |
| | | return map; |
| | | } |
| | | |
| | | //带订单号查询 |
| | | public Map<String, Object> SelectSchedulingNotSv(String selectTime1, String selectTime2, String orderId, String processes, Integer state, ProductionScheduling productionScheduling) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", productionSchedulingMapper.SelectSchedulingNotMp(selectTime1, selectTime2,orderId,processes, productionScheduling)); |
| | | return map; |
| | | } |
| | | } |
| | |
| | | //查询生成的生产订单号是否存在 |
| | | |
| | | Integer workCount = workOrderMapper.SelectOrderNumber(productIdVl); |
| | | System.out.println("生产订单号:" + productIdVl + " 查询结果:" + workCount); |
| | | if (workCount < 1 ) { |
| | | break; |
| | | } |
| | |
| | | Integer States = 1; |
| | | Integer NoWorkCount = workOrderMapper.SelectWorkCount(orderId); |
| | | Integer YesWorkCount = workOrderMapper.SelectYesWorkCount(orderId); |
| | | System.out.println(NoWorkCount); |
| | | if (NoWorkCount ==YesWorkCount) { |
| | | workOrderMapper.UpdateWorkType(orderId, State); |
| | | } else { |
| | |
| | | public Map<String, List<Object>> getBasicDataByType(String type){ |
| | | List<String> orderBasicDataType = basicDateMapper.getOrderBasicDataType(type); |
| | | List<BasicData> orderBasicData = basicDateMapper.getOrderBasicData(type); |
| | | Map<String, List<Object>> BasicDataMap = new HashMap<>(); ; |
| | | Map<String, List<Object>> BasicDataMap = new HashMap<>(); |
| | | //创建List对象 |
| | | |
| | | //遍历订单基本数据类型 |
| | |
| | | } |
| | | return BasicDataMap; |
| | | } |
| | | |
| | | public List<BasicData> getBasicDataByTypeAndChildType(String type, String childType) { |
| | | Map<String, List<Object>> BasicDataMap = new HashMap<>(); |
| | | return basicDateMapper.getOrderBasicDataByTypeAndChildType(type, childType); |
| | | |
| | | } |
| | | } |
| | |
| | | //工艺审核界面审核更新数据 |
| | | public boolean reviewProcessById(String id, Integer status,List<OrderGlassDetail> orderGlassDetails) { |
| | | if(!orderGlassDetails.isEmpty() && status==2){ |
| | | orderGlassDetails.forEach(orderGlassDetail ->{ |
| | | double area = Math.round((orderGlassDetail.getChildWidth()*orderGlassDetail.getChildHeight()/1000000) * 100) * 0.01d; |
| | | orderGlassDetail.setArea(area); |
| | | }); |
| | | |
| | | orderGlassDetailMapper.updateSizeAndProcess(orderGlassDetails); |
| | | orderProcessDetailMapper.delete(new QueryWrapper<OrderProcessDetail>().eq("order_id",id)); |
| | | //查询订单小片表获取工艺传入小片工艺表 |
| | |
| | | package com.example.erp.service.sd; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.alibaba.fastjson.parser.Feature; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.example.erp.common.Constants; |
| | | import com.example.erp.entity.sd.Product; |
| | | import com.example.erp.entity.sd.ProductDetail; |
| | | import com.example.erp.exception.ServiceException; |
| | | import com.example.erp.mapper.sd.ProductDetailMapper; |
| | | import com.example.erp.mapper.sd.ProductMapper; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.text.DecimalFormat; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | import java.util.*; |
| | | |
| | | @Service |
| | | @DS("sd") |
| | |
| | | this.productMapper = productMapper; |
| | | this.productDetailMapper = productDetailMapper; |
| | | } |
| | | //产品查询方法 |
| | | //产品查询方法 |
| | | public Map<String,Object> defaultDateProduct(Integer pageNum, Integer pageSize, List<String> glassType, Product product) { |
| | | Integer offset = (pageNum-1)*pageSize; |
| | | String glassTypeId = null; |
| | |
| | | return map; |
| | | } |
| | | |
| | | //产品保存方法 |
| | | //产品保存方法 |
| | | public boolean saveProduct(Map<String,Object> productObject) { |
| | | //把传入主附表的object类型转换成实体类类型 |
| | | JSONObject productJson = new JSONObject(productObject); |
| | | Product product = JSONObject.parseObject(JSONObject.toJSONString(productJson.get("title")), Product.class); |
| | | List<ProductDetail> productDetails = JSONArray.parseArray(JSONObject.toJSONString(productJson.get("detail")), ProductDetail.class); |
| | | |
| | | System.out.println(product); |
| | | //完善主附表信息并返回 |
| | | Map<String,Object> getProductJson = updateProduct(productDetails,product); |
| | | Product getProduct = JSONObject.parseObject(JSONObject.toJSONString(getProductJson.get("title")), Product.class); |
| | | List<ProductDetail> getProductDetails = JSONArray.parseArray(JSONObject.toJSONString(getProductJson.get("detail")), ProductDetail.class); |
| | | |
| | | if(getProduct.getId()==null ){ |
| | | insertProduct(getProduct,getProductDetails); |
| | | }else{ |
| | | updateProductData(getProductDetails,getProduct); |
| | | } |
| | | return true; |
| | | |
| | | } |
| | | |
| | | private void updateProductData(List<ProductDetail> getProductDetails, Product getProduct) { |
| | | productMapper.update(getProduct,new UpdateWrapper<Product>().eq("id",getProduct.getId())); |
| | | productDetailMapper.delete(new QueryWrapper<ProductDetail>().eq("prod_id",getProduct.getId())); |
| | | for (ProductDetail getProductDetail : getProductDetails) { |
| | | getProductDetail.setProdId(getProduct.getId()); |
| | | } |
| | | productDetailMapper.insertList(getProductDetails); |
| | | } |
| | | |
| | | private void insertProduct(Product getProduct, List<ProductDetail> getProductDetails) { |
| | | //插入主表数据 |
| | | productMapper.insert(getProduct); |
| | | //给副表添加产品id |
| | |
| | | } |
| | | //插入副表 |
| | | productDetailMapper.insertList(getProductDetails); |
| | | |
| | | return false; |
| | | |
| | | } |
| | | |
| | | private Map<String,Object> updateProduct(List<ProductDetail> productDetailList,Product product) { |
| | |
| | | for (ProductDetail productDetail : productDetailList) { |
| | | sortNum+=1; |
| | | productDetail.setSortNum(sortNum); |
| | | |
| | | JSONObject separation = JSONObject.parseObject( productDetail.getSeparation()); |
| | | JSONObject separation = JSONObject.parseObject(productDetail.getSeparation(), Feature.OrderedField); |
| | | String getThickness = (String) separation.get("thickness"); |
| | | double thicknessDetail = Double.parseDouble(getThickness.replace("mm","")); |
| | | totalThickness += thicknessDetail; |
| | |
| | | map.put("detail",productDetailList); |
| | | return map; |
| | | } |
| | | |
| | | public boolean deleteProductById(Integer id) { |
| | | Product product = productMapper.selectById(id); |
| | | if(product.getState()==1){ |
| | | throw new ServiceException(Constants.Code_600,"产品已审核,无法删除"); |
| | | } |
| | | productMapper.deleteById(id); |
| | | return true; |
| | | } |
| | | |
| | | public boolean updateProductStateById(Integer id,Integer state) { |
| | | return productMapper.updateProductStateById(id,state); |
| | | } |
| | | |
| | | public Map<String,Object> selectProductById(Integer id) { |
| | | Product product = productMapper.selectById(id); |
| | | List<ProductDetail> productDetailList = productDetailMapper.selectList( |
| | | new QueryWrapper<ProductDetail>().eq("prod_id", id)); |
| | | Map<String,Object> map = new HashMap<>(); |
| | | map.put("title",product); |
| | | map.put("detail",productDetailList); |
| | | return map; |
| | | } |
| | | } |
| | |
| | | group by od.order_id, ogd.production_id |
| | | </select> |
| | | |
| | | <!-- 更新分架状态--> |
| | | <update id="UpdateDeleteState"> |
| | | update sd.order_glass_detail as ogd |
| | | set ogd.production_id=null, |
| | | ogd.production_time=null, |
| | | ogd.founder=null |
| | | where ogd.production_id = #{processId} |
| | | update |
| | | 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} |
| | | |
| | | </update> |
| | | |
| | | <!-- 删除流程卡--> |
| | | <update id="DeleteFlowCardMp"> |
| | | update 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 |
| | | set ogd.production_id=null, |
| | | ogd.production_time=null, |
| | | ogd.founder=null |
| | | where od.order_id = #{orderId} |
| | | and ogd.production_id = #{processId} |
| | | delete from flow_card as fc where fc.process_id=#{processId} |
| | | </update> |
| | | |
| | | <!-- 分架新增明细查询--> |
| | |
| | | technology_number, |
| | | quantity, |
| | | founder, |
| | | layers_number, |
| | | splitFrame_time, |
| | | create_time |
| | | ) |
| | |
| | | ogd.technology_number, |
| | | #{quantity}, |
| | | #{userName}, |
| | | #{layer}, |
| | | NOW(), |
| | | NOW() |
| | | |
| | |
| | | set o.processing_card=#{state} |
| | | where o.order_id=left(#{productionId},10) |
| | | </update> |
| | | |
| | | <!-- 查询已排版数据--> |
| | | <select id="SelectOkSchedulingMp"> |
| | | 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 |
| | | |
| | | </select> |
| | | <!-- 查询未排版数据--> |
| | | <select id="SelectNoSchedulingMp"> |
| | | |
| | | </select> |
| | | <!-- 首次查询排版数据--> |
| | | <select id="selectLastSchedulingMp"> |
| | | select od.order_id,o.customer_name,o.project,od.order_number,od.width,od.height,od.quantity, |
| | | round(od.width*od.height*od.quantity/1000000,2) as area, |
| | | (od.quantity-IFNULL(ps.scheduling_quantity,0)) as pendingProductionQuantity, |
| | | round(od.width*od.height*(od.quantity-IFNULL(ps.scheduling_quantity,0))/1000000,2) as pendingProductionArea, |
| | | IFNULL(ps.scheduling_quantity,0) as productionScheduledQuantity, |
| | | round(od.width*od.height*(IFNULL(ps.scheduling_quantity,0))/1000000,2) as productionScheduledArea, |
| | | od.product_name,od.shape |
| | | from sd.order_detail as od left join sd.order as o on od.order_id=o.order_id |
| | | left join production_scheduling as ps on ps.order_id=od.order_id and ps.order_number=od.order_number |
| | | where od.create_time between #{selectTime1} and #{selectTime2} |
| | | </select> |
| | | |
| | | <!-- 查询对应序号的层数--> |
| | | <select id="SelectLayer"> |
| | | select COUNT(ogd.order_number) |
| | | from sd.order_glass_detail as ogd |
| | | where ogd.production_id = #{productionId} |
| | | and ogd.order_number=#{orderNumber} |
| | | </select> |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.example.erp.mapper.pp.ProductionSchedulingMapper"> |
| | | <resultMap id="ProductionSchedulingMap" type="com.example.erp.entity.pp.ProductionScheduling"> |
| | | <result column="processes" property="processes"/> |
| | | <result column="scheduling_quantity" property="schedulingQuantity"/> |
| | | <result column="order_number" property="orderNumber"/> |
| | | <!--接收其他外键实体类数据--> |
| | | <association property="order" javaType="com.example.erp.entity.sd.Order"> |
| | | <result column="project" property="project"/> |
| | | <result column="order_id" property="orderId"/> |
| | | <result column="customer_name" property="customerName"/> |
| | | <result column="batch" property="batch"/> |
| | | <result column="other_remarks" property="otherRemarks"/> |
| | | <result column="icon" property="icon"/> |
| | | <result column="order_type" property="orderType"/> |
| | | <result column="salesman" property="salesman"/> |
| | | <result column="processing_note" property="processingNote"/> |
| | | <result column="delivery_address" property="deliveryAddress"/> |
| | | </association> |
| | | <association property="orderDetail" javaType="com.example.erp.entity.sd.OrderDetail"> |
| | | <result column="order_id" property="orderId"/> |
| | | <result column="product_id" property="productId"/> |
| | | <result column="product_name" property="productName"/> |
| | | <result column="compute_gross_area" property="computeGrossArea"/> |
| | | <result column="processing_note" property="processingNote"/> |
| | | <result column="quantity" property="quantity"/> |
| | | <result column="compute_gross_area" property="computeGrossArea"/> |
| | | <result column="perimeter" property="perimeter"/> |
| | | <result column="order_number" property="orderNumber"/> |
| | | <result column="width" property="width"/> |
| | | <result column="height" property="height"/> |
| | | <result column="shape" property="shape"/> |
| | | <result column="weight" property="weight"/> |
| | | </association> |
| | | |
| | | |
| | | </resultMap> |
| | | |
| | | |
| | | <!-- 查询已排版数据--> |
| | | <select id="SelectOkSchedulingMp"> |
| | | select date(ps.scheduled_start_time) as scheduled_start_time, |
| | | date(ps.plan_end_time) as plan_end_time, |
| | | od.order_id,o.customer_name,o.project,od.order_number,od.width,od.height,od.quantity, |
| | | round(od.width*od.height*od.quantity/1000000,2) as area, |
| | | ps.scheduling_quantity, |
| | | (od.quantity-IFNULL(ps.scheduling_quantity,0)) as pendingProductionQuantity, |
| | | round(od.width*od.height*(od.quantity-IFNULL(ps.scheduling_quantity,0))/1000000,2) as pendingProductionArea, |
| | | IFNULL(ps.scheduling_quantity,0) as productionScheduledQuantity, |
| | | round(od.width*od.height*(IFNULL(ps.scheduling_quantity,0))/1000000,2) as productionScheduledArea, |
| | | IF(ps.review_status=0,"未审核","已审核") as review_status, |
| | | ps.reviewer, |
| | | od.product_name,od.shape |
| | | from sd.order_detail as od |
| | | left join sd.order as o on od.order_id=o.order_id |
| | | left join production_scheduling as ps on ps.order_id=od.order_id and ps.order_number=od.order_number |
| | | where ps.scheduling_id IS NOT NULL |
| | | and od.create_time between #{selectTime1} and #{selectTime2} |
| | | <if test="processes!=null and processes!=''"> |
| | | and ps.processes regexp #{processes} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | <!-- 查询已排产带订单编号的数据--> |
| | | <select id="SelectSchedulingNotMp"> |
| | | select date(ps.scheduled_start_time) as scheduled_start_time, |
| | | date(ps.plan_end_time) as plan_end_time, |
| | | od.order_id,o.customer_name,o.project,od.order_number,od.width,od.height,od.quantity, |
| | | round(od.width*od.height*od.quantity/1000000,2) as area, |
| | | ps.scheduling_quantity, |
| | | (od.quantity-IFNULL(ps.scheduling_quantity,0)) as pendingProductionQuantity, |
| | | round(od.width*od.height*(od.quantity-IFNULL(ps.scheduling_quantity,0))/1000000,2) as pendingProductionArea, |
| | | IFNULL(ps.scheduling_quantity,0) as productionScheduledQuantity, |
| | | round(od.width*od.height*(IFNULL(ps.scheduling_quantity,0))/1000000,2) as productionScheduledArea, |
| | | IF(ps.review_status=0,"未审核","已审核") as review_status, |
| | | ps.reviewer, |
| | | od.product_name,od.shape |
| | | from sd.order_detail as od |
| | | left join sd.order as o on od.order_id=o.order_id |
| | | left join production_scheduling as ps on ps.order_id=od.order_id and ps.order_number=od.order_number |
| | | where ps.scheduling_id IS NOT NULL |
| | | and od.order_id regexp #{orderId} |
| | | |
| | | <if test="processes!=null and processes!=''"> |
| | | and ps.processes regexp #{processes} |
| | | </if> |
| | | |
| | | </select> |
| | | <!-- 查询未排产数据--> |
| | | <select id="SelectNoSchedulingMp" > |
| | | select od.order_id,o.customer_name,o.project,od.order_number,od.width,od.height,od.quantity, |
| | | round(od.width*od.height*od.quantity/1000000,2) as area, |
| | | (od.quantity-IFNULL(ps.scheduling_quantity,0)) as pendingProductionQuantity, |
| | | round(od.width*od.height*(od.quantity-IFNULL(ps.scheduling_quantity,0))/1000000,2) as pendingProductionArea, |
| | | IFNULL(ps.scheduling_quantity,0) as productionScheduledQuantity, |
| | | round(od.width*od.height*(IFNULL(ps.scheduling_quantity,0))/1000000,2) as productionScheduledArea, |
| | | od.product_name,od.shape |
| | | from sd.order_detail as od left join sd.order as o on od.order_id=o.order_id |
| | | left join production_scheduling as ps on ps.order_id=od.order_id and ps.order_number=od.order_number |
| | | where isnull(ps.scheduling_id) and od.create_time between #{selectTime1} and #{selectTime2} |
| | | <if test="orderId!=null and orderId!=''"> |
| | | and od.order_id regexp #{orderId} |
| | | |
| | | </if> |
| | | group by od.order_id,od.order_number |
| | | </select> |
| | | <!-- 首次查询排产数据--> |
| | | <select id="selectLastSchedulingMp"> |
| | | select od.order_id,o.customer_name,o.project,od.order_number,od.width,od.height,od.quantity, |
| | | round(od.width*od.height*od.quantity/1000000,2) as area, |
| | | (od.quantity-IFNULL(ps.scheduling_quantity,0)) as pendingProductionQuantity, |
| | | round(od.width*od.height*(od.quantity-IFNULL(ps.scheduling_quantity,0))/1000000,2) as pendingProductionArea, |
| | | IFNULL(ps.scheduling_quantity,0) as productionScheduledQuantity, |
| | | round(od.width*od.height*(IFNULL(ps.scheduling_quantity,0))/1000000,2) as productionScheduledArea, |
| | | od.product_name,od.shape |
| | | from sd.order_detail as od left join sd.order as o on od.order_id=o.order_id |
| | | left join production_scheduling as ps on ps.order_id=od.order_id and ps.order_number=od.order_number |
| | | where od.create_time between #{selectTime1} and #{selectTime2} |
| | | </select> |
| | | </mapper> |
| | |
| | | basic_data as a |
| | | where a.basic_type=#{type} |
| | | </select> |
| | | <select id="getOrderBasicDataByTypeAndChildType"> |
| | | select |
| | | * |
| | | from |
| | | basic_data as a |
| | | where a.basic_type=#{type} and a.basic_category = #{childType} |
| | | </select> |
| | | |
| | | <select id="getOrderBasicDataType"> |
| | | select |
| | | a.basic_category |
| | |
| | | glass_child, |
| | | child_width, |
| | | child_height, |
| | | area, |
| | | total_area, |
| | | |
| | | process, |
| | | `group`) |
| | | select |
| | |
| | | pd.detail, |
| | | od.width, |
| | | od.height, |
| | | od.area, |
| | | od.gross_area, |
| | | pd.process, |
| | | pd.glass_group |
| | | from sd.product_detail as pd |
| | |
| | | <result column="glass_child" property="glassChild"/> |
| | | <result column="child_width" property="childWidth"/> |
| | | <result column="child_height" property="childHeight"/> |
| | | <result column="icon" property="icon"/> |
| | | <result column="process" property="process"/> |
| | | <result column="area" property="area"/> |
| | | <result column="total_area" property="totalArea"/> |
| | | <!--接收其他外键实体类数据--> |
| | | <association property="orderDetail" javaType="com.example.erp.entity.sd.OrderDetail"> |
| | | |
| | | <result column="building_number" property="buildingNumber"/> |
| | | |
| | | <result column="product_name" property="productName"/> |
| | | <result column="width" property="width"/> |
| | | <result column="height" property="height"/> |
| | | <result column="shape" property="shape"/> |
| | | <result column="gross_area" property="grossArea"/> |
| | | <result column="edging_type" property="edgingType"/> |
| | | <result column="area" property="area"/> |
| | | <result column="quantity" property="quantity"/> |
| | | <result column="processing_note" property="processingNote"/> |
| | | <result column="beizhu" property="remarks"/> |
| | |
| | | b.width, |
| | | b.height, |
| | | b.shape, |
| | | b.gross_area, |
| | | a.total_area, |
| | | b.edging_type, |
| | | a.child_width, |
| | | a.child_height, |
| | | b.area, |
| | | a.icon, |
| | | a.area, |
| | | b.quantity, |
| | | a.process, |
| | | b.remarks as 'beizhu', |
| | |
| | | |
| | | <update id="updateSizeAndProcess" parameterType="java.util.List"> |
| | | <foreach collection="orderGlassDetails" item="item" index="index" open="" close="" separator=";"> |
| | | update order_glass_detail |
| | | update order_glass_detail as a, |
| | | order_detail as b |
| | | set |
| | | child_width = #{item.childWidth}, |
| | | child_height = #{item.childHeight}, |
| | | process = #{item.process} |
| | | a.child_width = #{item.childWidth}, |
| | | a.child_height = #{item.childHeight}, |
| | | a.area = #{item.area}, |
| | | a.total_area = #{item.area}*b.quantity, |
| | | a.icon = #{item.icon}, |
| | | a.process = #{item.process} |
| | | where |
| | | order_id = #{item.orderId} |
| | | and order_number = #{item.orderNumber} |
| | | and technology_number = #{item.technologyNumber} |
| | | a.order_id = b.order_id |
| | | and a.order_id = #{item.orderId} |
| | | and a.order_number = #{item.orderNumber} |
| | | and a.technology_number = #{item.technologyNumber} |
| | | </foreach> |
| | | |
| | | </update> |
| | |
| | | limit #{offset},#{pageSize} |
| | | ; |
| | | </select> |
| | | |
| | | <update id="updateProductStateById"> |
| | | update product set state = #{state} where id = #{id} |
| | | </update> |
| | | </mapper> |
| | |
| | | group by od.order_id, ogd.production_id |
| | | </select> |
| | | |
| | | <!-- 更新分架状态--> |
| | | <update id="UpdateDeleteState"> |
| | | update sd.order_glass_detail as ogd |
| | | set ogd.production_id=null, |
| | | ogd.production_time=null, |
| | | ogd.founder=null |
| | | where ogd.production_id = #{processId} |
| | | update |
| | | 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} |
| | | |
| | | </update> |
| | | |
| | | <!-- 删除流程卡--> |
| | | <update id="DeleteFlowCardMp"> |
| | | update 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 |
| | | set ogd.production_id=null, |
| | | ogd.production_time=null, |
| | | ogd.founder=null |
| | | where od.order_id = #{orderId} |
| | | and ogd.production_id = #{processId} |
| | | delete from flow_card as fc where fc.process_id=#{processId} |
| | | </update> |
| | | |
| | | <!-- 分架新增明细查询--> |
| | |
| | | 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 |
| | | left join sd.product as p on od.product_name=p.product_name |
| | |
| | | technology_number, |
| | | quantity, |
| | | founder, |
| | | layers_number, |
| | | splitFrame_time, |
| | | create_time |
| | | ) |
| | |
| | | ogd.technology_number, |
| | | #{quantity}, |
| | | #{userName}, |
| | | #{layer}, |
| | | NOW(), |
| | | NOW() |
| | | |
| | |
| | | set o.processing_card=#{state} |
| | | where o.order_id=left(#{productionId},10) |
| | | </update> |
| | | |
| | | <!-- 查询已排版数据--> |
| | | <select id="SelectOkSchedulingMp"> |
| | | 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 |
| | | |
| | | </select> |
| | | <!-- 查询未排版数据--> |
| | | <select id="SelectNoSchedulingMp"> |
| | | |
| | | </select> |
| | | <!-- 首次查询排版数据--> |
| | | <select id="selectLastSchedulingMp"> |
| | | select od.order_id,o.customer_name,o.project,od.order_number,od.width,od.height,od.quantity, |
| | | round(od.width*od.height*od.quantity/1000000,2) as area, |
| | | (od.quantity-IFNULL(ps.scheduling_quantity,0)) as pendingProductionQuantity, |
| | | round(od.width*od.height*(od.quantity-IFNULL(ps.scheduling_quantity,0))/1000000,2) as pendingProductionArea, |
| | | IFNULL(ps.scheduling_quantity,0) as productionScheduledQuantity, |
| | | round(od.width*od.height*(IFNULL(ps.scheduling_quantity,0))/1000000,2) as productionScheduledArea, |
| | | od.product_name,od.shape |
| | | from sd.order_detail as od left join sd.order as o on od.order_id=o.order_id |
| | | left join production_scheduling as ps on ps.order_id=od.order_id and ps.order_number=od.order_number |
| | | where od.create_time between #{selectTime1} and #{selectTime2} |
| | | </select> |
| | | |
| | | <!-- 查询对应序号的层数--> |
| | | <select id="SelectLayer"> |
| | | select COUNT(ogd.order_number) |
| | | from sd.order_glass_detail as ogd |
| | | where ogd.production_id = #{productionId} |
| | | and ogd.order_number=#{orderNumber} |
| | | </select> |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.example.erp.mapper.pp.ProductionSchedulingMapper"> |
| | | <resultMap id="ProductionSchedulingMap" type="com.example.erp.entity.pp.ProductionScheduling"> |
| | | <result column="processes" property="processes"/> |
| | | <result column="scheduling_quantity" property="schedulingQuantity"/> |
| | | <result column="order_number" property="orderNumber"/> |
| | | <!--接收其他外键实体类数据--> |
| | | <association property="order" javaType="com.example.erp.entity.sd.Order"> |
| | | <result column="project" property="project"/> |
| | | <result column="order_id" property="orderId"/> |
| | | <result column="customer_name" property="customerName"/> |
| | | <result column="batch" property="batch"/> |
| | | <result column="other_remarks" property="otherRemarks"/> |
| | | <result column="icon" property="icon"/> |
| | | <result column="order_type" property="orderType"/> |
| | | <result column="salesman" property="salesman"/> |
| | | <result column="processing_note" property="processingNote"/> |
| | | <result column="delivery_address" property="deliveryAddress"/> |
| | | </association> |
| | | <association property="orderDetail" javaType="com.example.erp.entity.sd.OrderDetail"> |
| | | <result column="order_id" property="orderId"/> |
| | | <result column="product_id" property="productId"/> |
| | | <result column="product_name" property="productName"/> |
| | | <result column="compute_gross_area" property="computeGrossArea"/> |
| | | <result column="processing_note" property="processingNote"/> |
| | | <result column="quantity" property="quantity"/> |
| | | <result column="compute_gross_area" property="computeGrossArea"/> |
| | | <result column="perimeter" property="perimeter"/> |
| | | <result column="order_number" property="orderNumber"/> |
| | | <result column="width" property="width"/> |
| | | <result column="height" property="height"/> |
| | | <result column="shape" property="shape"/> |
| | | <result column="weight" property="weight"/> |
| | | </association> |
| | | |
| | | |
| | | </resultMap> |
| | | |
| | | |
| | | <!-- 查询已排版数据--> |
| | | <select id="SelectOkSchedulingMp"> |
| | | select date(ps.scheduled_start_time) as scheduled_start_time, |
| | | date(ps.plan_end_time) as plan_end_time, |
| | | od.order_id,o.customer_name,o.project,od.order_number,od.width,od.height,od.quantity, |
| | | round(od.width*od.height*od.quantity/1000000,2) as area, |
| | | ps.scheduling_quantity, |
| | | (od.quantity-IFNULL(ps.scheduling_quantity,0)) as pendingProductionQuantity, |
| | | round(od.width*od.height*(od.quantity-IFNULL(ps.scheduling_quantity,0))/1000000,2) as pendingProductionArea, |
| | | IFNULL(ps.scheduling_quantity,0) as productionScheduledQuantity, |
| | | round(od.width*od.height*(IFNULL(ps.scheduling_quantity,0))/1000000,2) as productionScheduledArea, |
| | | IF(ps.review_status=0,"未审核","已审核") as review_status, |
| | | ps.reviewer, |
| | | od.product_name,od.shape |
| | | from sd.order_detail as od |
| | | left join sd.order as o on od.order_id=o.order_id |
| | | left join production_scheduling as ps on ps.order_id=od.order_id and ps.order_number=od.order_number |
| | | where ps.scheduling_id IS NOT NULL |
| | | and od.create_time between #{selectTime1} and #{selectTime2} |
| | | <if test="processes!=null and processes!=''"> |
| | | and ps.processes regexp #{processes} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | <!-- 查询已排产带订单编号的数据--> |
| | | <select id="SelectSchedulingNotMp"> |
| | | select date(ps.scheduled_start_time) as scheduled_start_time, |
| | | date(ps.plan_end_time) as plan_end_time, |
| | | od.order_id,o.customer_name,o.project,od.order_number,od.width,od.height,od.quantity, |
| | | round(od.width*od.height*od.quantity/1000000,2) as area, |
| | | ps.scheduling_quantity, |
| | | (od.quantity-IFNULL(ps.scheduling_quantity,0)) as pendingProductionQuantity, |
| | | round(od.width*od.height*(od.quantity-IFNULL(ps.scheduling_quantity,0))/1000000,2) as pendingProductionArea, |
| | | IFNULL(ps.scheduling_quantity,0) as productionScheduledQuantity, |
| | | round(od.width*od.height*(IFNULL(ps.scheduling_quantity,0))/1000000,2) as productionScheduledArea, |
| | | IF(ps.review_status=0,"未审核","已审核") as review_status, |
| | | ps.reviewer, |
| | | od.product_name,od.shape |
| | | from sd.order_detail as od |
| | | left join sd.order as o on od.order_id=o.order_id |
| | | left join production_scheduling as ps on ps.order_id=od.order_id and ps.order_number=od.order_number |
| | | where ps.scheduling_id IS NOT NULL |
| | | and od.order_id regexp #{orderId} |
| | | |
| | | <if test="processes!=null and processes!=''"> |
| | | and ps.processes regexp #{processes} |
| | | </if> |
| | | |
| | | </select> |
| | | <!-- 查询未排产数据--> |
| | | <select id="SelectNoSchedulingMp" > |
| | | select od.order_id,o.customer_name,o.project,od.order_number,od.width,od.height,od.quantity, |
| | | round(od.width*od.height*od.quantity/1000000,2) as area, |
| | | (od.quantity-IFNULL(ps.scheduling_quantity,0)) as pendingProductionQuantity, |
| | | round(od.width*od.height*(od.quantity-IFNULL(ps.scheduling_quantity,0))/1000000,2) as pendingProductionArea, |
| | | IFNULL(ps.scheduling_quantity,0) as productionScheduledQuantity, |
| | | round(od.width*od.height*(IFNULL(ps.scheduling_quantity,0))/1000000,2) as productionScheduledArea, |
| | | od.product_name,od.shape |
| | | from sd.order_detail as od left join sd.order as o on od.order_id=o.order_id |
| | | left join production_scheduling as ps on ps.order_id=od.order_id and ps.order_number=od.order_number |
| | | where isnull(ps.scheduling_id) and od.create_time between #{selectTime1} and #{selectTime2} |
| | | <if test="orderId!=null and orderId!=''"> |
| | | and od.order_id regexp #{orderId} |
| | | |
| | | </if> |
| | | group by od.order_id,od.order_number |
| | | </select> |
| | | <!-- 首次查询排产数据--> |
| | | <select id="selectLastSchedulingMp"> |
| | | select od.order_id,o.customer_name,o.project,od.order_number,od.width,od.height,od.quantity, |
| | | round(od.width*od.height*od.quantity/1000000,2) as area, |
| | | (od.quantity-IFNULL(ps.scheduling_quantity,0)) as pendingProductionQuantity, |
| | | round(od.width*od.height*(od.quantity-IFNULL(ps.scheduling_quantity,0))/1000000,2) as pendingProductionArea, |
| | | IFNULL(ps.scheduling_quantity,0) as productionScheduledQuantity, |
| | | round(od.width*od.height*(IFNULL(ps.scheduling_quantity,0))/1000000,2) as productionScheduledArea, |
| | | od.product_name,od.shape |
| | | from sd.order_detail as od left join sd.order as o on od.order_id=o.order_id |
| | | left join production_scheduling as ps on ps.order_id=od.order_id and ps.order_number=od.order_number |
| | | where od.create_time between #{selectTime1} and #{selectTime2} |
| | | </select> |
| | | </mapper> |
| | |
| | | basic_data as a |
| | | where a.basic_type=#{type} |
| | | </select> |
| | | <select id="getOrderBasicDataByTypeAndChildType"> |
| | | select |
| | | * |
| | | from |
| | | basic_data as a |
| | | where a.basic_type=#{type} and a.basic_category = #{childType} |
| | | </select> |
| | | |
| | | <select id="getOrderBasicDataType"> |
| | | select |
| | | a.basic_category |
| | |
| | | glass_child, |
| | | child_width, |
| | | child_height, |
| | | area, |
| | | total_area, |
| | | |
| | | process, |
| | | `group`) |
| | | select |
| | |
| | | pd.detail, |
| | | od.width, |
| | | od.height, |
| | | od.area, |
| | | od.gross_area, |
| | | pd.process, |
| | | pd.glass_group |
| | | from sd.product_detail as pd |
| | |
| | | <result column="glass_child" property="glassChild"/> |
| | | <result column="child_width" property="childWidth"/> |
| | | <result column="child_height" property="childHeight"/> |
| | | <result column="icon" property="icon"/> |
| | | <result column="process" property="process"/> |
| | | <result column="area" property="area"/> |
| | | <result column="total_area" property="totalArea"/> |
| | | <!--接收其他外键实体类数据--> |
| | | <association property="orderDetail" javaType="com.example.erp.entity.sd.OrderDetail"> |
| | | |
| | | <result column="building_number" property="buildingNumber"/> |
| | | |
| | | <result column="product_name" property="productName"/> |
| | | <result column="width" property="width"/> |
| | | <result column="height" property="height"/> |
| | | <result column="shape" property="shape"/> |
| | | <result column="gross_area" property="grossArea"/> |
| | | <result column="edging_type" property="edgingType"/> |
| | | <result column="area" property="area"/> |
| | | <result column="quantity" property="quantity"/> |
| | | <result column="processing_note" property="processingNote"/> |
| | | <result column="beizhu" property="remarks"/> |
| | |
| | | b.width, |
| | | b.height, |
| | | b.shape, |
| | | b.gross_area, |
| | | a.total_area, |
| | | b.edging_type, |
| | | a.child_width, |
| | | a.child_height, |
| | | b.area, |
| | | a.icon, |
| | | a.area, |
| | | b.quantity, |
| | | a.process, |
| | | b.remarks as 'beizhu', |
| | |
| | | |
| | | <update id="updateSizeAndProcess" parameterType="java.util.List"> |
| | | <foreach collection="orderGlassDetails" item="item" index="index" open="" close="" separator=";"> |
| | | update order_glass_detail |
| | | update order_glass_detail as a, |
| | | order_detail as b |
| | | set |
| | | child_width = #{item.childWidth}, |
| | | child_height = #{item.childHeight}, |
| | | process = #{item.process} |
| | | a.child_width = #{item.childWidth}, |
| | | a.child_height = #{item.childHeight}, |
| | | a.area = #{item.area}, |
| | | a.total_area = #{item.area}*b.quantity, |
| | | a.icon = #{item.icon}, |
| | | a.process = #{item.process} |
| | | where |
| | | order_id = #{item.orderId} |
| | | and order_number = #{item.orderNumber} |
| | | and technology_number = #{item.technologyNumber} |
| | | a.order_id = b.order_id |
| | | and a.order_id = #{item.orderId} |
| | | and a.order_number = #{item.orderNumber} |
| | | and a.technology_number = #{item.technologyNumber} |
| | | </foreach> |
| | | |
| | | </update> |
| | |
| | | limit #{offset},#{pageSize} |
| | | ; |
| | | </select> |
| | | |
| | | <update id="updateProductStateById"> |
| | | update product set state = #{state} where id = #{id} |
| | | </update> |
| | | </mapper> |