工单管理转生产订单、删除,流程卡管理部分查询相关代码
| | |
| | | <database-info product="MySQL" version="8.0.19" 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.19" exact-driver-version="8.0"> |
| | | <extra-name-characters>#@</extra-name-characters> |
| | | <identifier-quote-string>`</identifier-quote-string> |
| | | <jdbc-catalog-is-schema>true</jdbc-catalog-is-schema> |
| | | </database-info> |
| | | <case-sensitivity plain-identifiers="lower" quoted-identifiers="lower" /> |
| | | <secret-storage>master_key</secret-storage> |
| | |
| | | <script setup> |
| | | |
| | | import {reactive} from "vue"; |
| | | 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 {Search} from "@element-plus/icons-vue"; |
| | | let router=useRouter() |
| | | const getTableRow = (row,type) =>{ |
| | | switch (type) { |
| | | case 'edit' :{ |
| | | //alert('我接收到子组件传送的编辑信息') |
| | | router.push({path: '/main/processCard/SplittingDetails', query: { id: row.id }}) |
| | | router.push({path: '/main/processCard/SplittingDetails', query: { orderId: row.orderId }}) |
| | | break |
| | | } |
| | | case 'delete':{ |
| | |
| | | } |
| | | } |
| | | |
| | | //定义时间 |
| | | const form = reactive({ |
| | | date1: '', |
| | | }) |
| | | |
| | | //表尾求和 |
| | | const sumNum = (list, field) => { |
| | | let count = 0 |
| | |
| | | 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: { |
| | | batch: '' |
| | | }, |
| | | orderDetail: { |
| | | productName: '', |
| | | computeArea: '', |
| | | quantity: '', |
| | | computeGrossArea: '', |
| | | perimeter: '', |
| | | bendRadius: '', |
| | | 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()) |
| | | .toISOString() |
| | | .replace('T', ' ') |
| | | .slice(0, 10)//默认结束时间当前时间 |
| | | return [start, end] |
| | | } |
| | | |
| | | |
| | | //第一次加载获取近七天时间和默认状态 |
| | | form.date1 = getNowTime() |
| | | let startTime = form.date1[0] |
| | | let endTime = form.date1[1] |
| | | |
| | | //第一次加载数据 |
| | | |
| | | 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) |
| | | gridOptions.loading = false |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | |
| | | //点击查询 |
| | | const getWorkOrder = () => { |
| | | |
| | | let startTime = form.date1[0] |
| | | let endTime = form.date1[1] |
| | | request.post(`/processCard/selectAddProcess/${startTime}/${endTime}`, filterData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | |
| | | pageTotal.value = res.data.total |
| | | xGrid.value.loadData(res.data.data) |
| | | gridOptions.loading = false |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | /*使用筛选,后端获取数据*/ |
| | | const changeFilterEvent = (event, option, $panel,) => { |
| | | // 手动触发筛选 |
| | | $panel.changeOption(event, !!option.data, option) |
| | | } |
| | | |
| | | function filterChanged(column) { |
| | | gridOptions.loading = true |
| | | //筛选条件发生变化条件发生变化 |
| | | let value = column.datas[0] != undefined ? column.datas[0] : '' |
| | | value = value.trim() |
| | | //判断是否存在外键 |
| | | if (column.property.indexOf('.') > -1) { |
| | | const columnArr = column.property.split('.') |
| | | filterData.value[columnArr[0]] = { |
| | | [columnArr[1]]: value |
| | | } |
| | | } else { |
| | | filterData.value[column.property] = value |
| | | } |
| | | |
| | | //获取选中时间 |
| | | let startTime = form.date1[0] |
| | | let endTime = form.date1[1] |
| | | |
| | | request.post(`/processCard/selectAddProcess/${startTime}/${endTime}`, 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 xGrid = ref() |
| | | const gridOptions = reactive({ |
| | | border: "full",//表格加边框 |
| | | loading: true, |
| | | border: "full",//表格加边框 |
| | | keepSource: true,//保持源数据 |
| | | align: 'center',//文字居中 |
| | | stripe:true,//斑马纹 |
| | | rowConfig: {isCurrent: true, isHover: true,height: 50},//鼠标移动或选择高亮 |
| | | id: 'CustomerList', |
| | | stripe: true,//斑马纹 |
| | | rowConfig: {isCurrent: true, isHover: true,height: 30},//鼠标移动或选择高亮 |
| | | id: 'demo_1', |
| | | showFooter: true,//显示脚 |
| | | printConfig: {}, |
| | | importConfig: {}, |
| | | exportConfig: {}, |
| | | scrollY:{ enabled: true },//开启虚拟滚动 |
| | | showOverflow:true, |
| | | scrollX: {enabled: true}, |
| | | scrollY: {enabled: true, gt: 0},//开启虚拟滚动 |
| | | showOverflow: true, |
| | | columnConfig: { |
| | | resizable: true, |
| | | useKey: true |
| | |
| | | {type:'expand',fixed:"left",slots: { content:'content' },width: 50}, |
| | | {title: '操作', width: 80, slots: { default: 'button_slot' },fixed:"left"}, |
| | | { type: 'seq',fixed:"left", title: '自序', width: 50 }, |
| | | {field: '销售单号', title: '销售单号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true, }, |
| | | {field: '客户名称', title: '客户名称', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: '项目名称', title: '项目名称', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: '批次', title: '批次',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: '原片要求', title: '原片要求', sortable: true,showOverflow:"ellipsis"}, |
| | | {field: '商标选项', title: '商标选项', sortable: true}, |
| | | {field: '订单类型', title: '订单类型', sortable: true}, |
| | | {field: '业务员', title: '业务员', sortable: true}, |
| | | {field: '加工要求', title: '加工要求', sortable: true,showOverflow:"ellipsis"}, |
| | | {field: '送货地址', title: '送货地址', sortable: true}, |
| | | {field: '交货日期', title: '交货日期', sortable: true} |
| | | {field: 'orderId', title: '销售单号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true, }, |
| | | {field: 'customerName', title: '客户名称', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'project', title: '项目名称', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'batch', title: '批次',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'otherRemarks', title: '原片要求', sortable: true,showOverflow:"ellipsis"}, |
| | | {field: 'icon', title: '商标选项', sortable: true}, |
| | | {field: 'orderType', title: '订单类型', sortable: true}, |
| | | {field: 'salesman', title: '业务员', sortable: true}, |
| | | {field: 'processingNote', title: '加工要求', sortable: true,showOverflow:"ellipsis"}, |
| | | {field: 'deliveryAddress', title: '送货地址', sortable: true}, |
| | | ],//表头按钮 |
| | | |
| | | toolbarConfig: { |
| | |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | | data: [ |
| | | { |
| | | 销售单号: 'NG231201', |
| | | 客户名称:"慕墙公司", |
| | | 项目名称: '信合春天里', |
| | | 批次: '23批', |
| | | 原片要求: '2022/5/24XFPO202205202', |
| | | 商标选项:'北玻商标', |
| | | 订单类型: '普通订单', |
| | | 业务员: 'XXX', |
| | | 加工要求: '1)按企标2)每片玻璃标签贴室外面。内片玻璃打“3C商标”,统一打在玻璃“宽度”方向右下角4)按批次单独落架。', |
| | | 送货地址:'工地', |
| | | 交货日期:'2024-01-12' |
| | | }, |
| | | { |
| | | 销售单号: 'NG231201', |
| | | 客户名称:"慕墙公司", |
| | | 项目名称: '信合春天里', |
| | | 批次: '23批', |
| | | 原片要求: '2022/5/24XFPO202205202', |
| | | 商标选项:'北玻商标', |
| | | 订单类型: '普通订单', |
| | | 业务员: 'XXX', |
| | | 加工要求: '1)按企标2)每片玻璃标签贴室外面。内片玻璃打“3C商标”,统一打在玻璃“宽度”方向右下角4)按批次单独落架。', |
| | | 送货地址:'工地', |
| | | 交货日期:'2024-01-12' |
| | | }, |
| | | { |
| | | 销售单号: 'NG231201', |
| | | 客户名称:"慕墙公司", |
| | | 项目名称: '信合春天里', |
| | | 批次: '23批', |
| | | 原片要求: '2022/5/24XFPO202205202', |
| | | 商标选项:'北玻商标', |
| | | 订单类型: '普通订单', |
| | | 业务员: 'XXX', |
| | | 加工要求: '1)按企标2)每片玻璃标签贴室外面。内片玻璃打“3C商标”,统一打在玻璃“宽度”方向右下角4)按批次单独落架。', |
| | | 送货地址:'工地', |
| | | 交货日期:'2024-01-12' |
| | | }, |
| | | { |
| | | 销售单号: 'NG231201', |
| | | 客户名称:"慕墙公司", |
| | | 项目名称: '信合春天里', |
| | | 批次: '23批', |
| | | 原片要求: '2022/5/24XFPO202205202', |
| | | 商标选项:'北玻商标', |
| | | 订单类型: '普通订单', |
| | | 业务员: 'XXX', |
| | | 加工要求: '1)按企标2)每片玻璃标签贴室外面。内片玻璃打“3C商标”,统一打在玻璃“宽度”方向右下角4)按批次单独落架。', |
| | | 送货地址:'工地', |
| | | 交货日期:'2024-01-12' |
| | | }, |
| | | { |
| | | 销售单号: 'NG231201', |
| | | 客户名称:"慕墙公司", |
| | | 项目名称: '信合春天里', |
| | | 批次: '23批', |
| | | 原片要求: '2022/5/24XFPO202205202', |
| | | 商标选项:'北玻商标', |
| | | 订单类型: '普通订单', |
| | | 业务员: 'XXX', |
| | | 加工要求: '1)按企标2)每片玻璃标签贴室外面。内片玻璃打“3C商标”,统一打在玻璃“宽度”方向右下角4)按批次单独落架。', |
| | | 送货地址:'工地', |
| | | 交货日期:'2024-01-12' |
| | | }, |
| | | { |
| | | 销售单号: 'NG231201', |
| | | 客户名称:"慕墙公司", |
| | | 项目名称: '信合春天里', |
| | | 批次: '23批', |
| | | 原片要求: '2022/5/24XFPO202205202', |
| | | 商标选项:'北玻商标', |
| | | 订单类型: '普通订单', |
| | | 业务员: 'XXX', |
| | | 加工要求: '1)按企标2)每片玻璃标签贴室外面。内片玻璃打“3C商标”,统一打在玻璃“宽度”方向右下角4)按批次单独落架。', |
| | | 送货地址:'工地', |
| | | 交货日期:'2024-01-12' |
| | | }, |
| | | { |
| | | 销售单号: 'NG231201', |
| | | 客户名称:"慕墙公司", |
| | | 项目名称: '信合春天里', |
| | | 批次: '23批', |
| | | 原片要求: '2022/5/24XFPO202205202', |
| | | 商标选项:'北玻商标', |
| | | 订单类型: '普通订单', |
| | | 业务员: 'XXX', |
| | | 加工要求: '1)按企标2)每片玻璃标签贴室外面。内片玻璃打“3C商标”,统一打在玻璃“宽度”方向右下角4)按批次单独落架。', |
| | | 送货地址:'工地', |
| | | 交货日期:'2024-01-12' |
| | | }, |
| | | ],//table body实际数据 |
| | | data: null,//表格数据 |
| | | //脚部求和 |
| | | footerMethod ({ columns, data }) {//页脚函数 |
| | | let footList=['total','TotalArea','Cases'] |
| | |
| | | |
| | | <template> |
| | | <div class="main-div-customer"> |
| | | <div id="selectForm"> |
| | | <el-row :gutter="0"> |
| | | <el-date-picker |
| | | v-model="form.date1" |
| | | type="daterange" |
| | | format="YYYY/MM/DD" |
| | | value-format="YYYY-MM-DD" |
| | | start-placeholder="开始时间" |
| | | end-placeholder="结束时间" |
| | | :default-time="defaultTime" |
| | | |
| | | /> |
| | | |
| | | |
| | | <el-button |
| | | @click="getWorkOrder" |
| | | id="select" |
| | | type="primary" :icon="Search">查询 |
| | | </el-button> |
| | | </el-row> |
| | | |
| | | </div> |
| | | <vxe-grid |
| | | max-height="100%" |
| | | @filter-change="filterChanged" |
| | |
| | | width: 99%; |
| | | height: 100%; |
| | | } |
| | | #selectForm { |
| | | width: 50%; |
| | | text-align: center; |
| | | } |
| | | </style> |
| | |
| | | {title: '操作', width: 140, slots: { default: 'button_slot' },fixed:"left"}, |
| | | { type: 'seq',fixed:"left", title: '自序', width: 50 }, |
| | | {field: 'orderId', title: '销售单号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true, }, |
| | | {field: 'productionId', width: 120, title: '流程卡号', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'processId', width: 130, title: '流程卡号', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'orderDetail.productId', title: '产品编号', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'orderDetail.productName', title: '产品名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'order.project', title: '项目名称', sortable: true,showOverflow:"ellipsis"}, |
| | | {field: 'binningQuantity', title: '数量', sortable: true}, |
| | | {field: 'orderDetail.compute_gross_area', title: '面积', sortable: true}, |
| | | {field: 'orderDetail.computeGrossArea', title: '面积', sortable: true}, |
| | | {field: 'founder', title: '分架员', sortable: true}, |
| | | {field: 'orderDetail.processingNote', title: '加工要求', sortable: true} |
| | | ],//表头按钮 |
| | |
| | | <script setup> |
| | | |
| | | import {reactive} 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) { |
| | |
| | | } |
| | | } |
| | | |
| | | //定义滚动条高度 |
| | | 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: { |
| | | batch: '' |
| | | }, |
| | | orderDetail: { |
| | | productName: '', |
| | | computeArea: '', |
| | | quantity: '', |
| | | computeGrossArea: '', |
| | | perimeter: '', |
| | | bendRadius: '', |
| | | processingNote: '' |
| | | } |
| | | |
| | | }) |
| | | //定义页面总页数 |
| | | let pageTotal = ref('') |
| | | //定义数据返回结果 |
| | | let produceList = ref([]) |
| | | //定义当前页数 |
| | | let pageNum = $ref(1) |
| | | let pageState = null |
| | | |
| | | const { currentRoute } = useRouter() |
| | | const route = currentRoute.value |
| | | |
| | | let id=route.query.orderId |
| | | |
| | | 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) |
| | | gridOptions.loading = false |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | |
| | | //表尾求和 |
| | | const sumNum = (list, field) => { |
| | | let count = 0 |
| | |
| | | } |
| | | |
| | | //子组件接收参数 |
| | | |
| | | const xGrid = ref() |
| | | const gridOptions = reactive({ |
| | | border: "full",//表格加边框 |
| | | loading: true, |
| | | border: "full",//表格加边框 |
| | | keepSource: true,//保持源数据 |
| | | align: 'center',//文字居中 |
| | | stripe:true,//斑马纹 |
| | | rowConfig: {isCurrent: true, isHover: true,height: 50},//鼠标移动或选择高亮 |
| | | id: 'CustomerList', |
| | | stripe: true,//斑马纹 |
| | | rowConfig: {isCurrent: true, isHover: true,height: 30},//鼠标移动或选择高亮 |
| | | id: 'demo_1', |
| | | showFooter: true,//显示脚 |
| | | printConfig: {}, |
| | | importConfig: {}, |
| | | exportConfig: {}, |
| | | scrollY:{ enabled: true },//开启虚拟滚动 |
| | | showOverflow:true, |
| | | scrollX: {enabled: true}, |
| | | scrollY: {enabled: true, gt: 0},//开启虚拟滚动 |
| | | showOverflow: true, |
| | | columnConfig: { |
| | | resizable: true, |
| | | useKey: true |
| | |
| | | {type:'expand',fixed:"left",slots: { content:'content' },width: 50}, |
| | | {title: '操作', width: 80, slots: { default: 'button_slot' },fixed:"left"}, |
| | | { type: 'seq',fixed:"left", title: '自序', width: 50 }, |
| | | {field: '销售单号', title: '销售单号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true, }, |
| | | {field: '生产订单号', title: '生产订单号', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: '产品编号', title: '产品编号', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: '产品名称', title: '产品名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: '总数量', title: '总数量', sortable: true,showOverflow:"ellipsis"}, |
| | | {field: '总面积', title: '总面积', sortable: true}, |
| | | {field: '周长', title: '周长', sortable: true}, |
| | | {field: 'orderId', title: '销售单号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true, }, |
| | | {field: 'productionId', title: '生产订单号', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'productId', title: '产品编号', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'productName', title: '产品名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'quantity', title: '总数量', sortable: true,showOverflow:"ellipsis"}, |
| | | {field: 'computeGrossArea', title: '总面积', sortable: true}, |
| | | {field: 'perimeter', title: '周长', sortable: true}, |
| | | ],//表头按钮 |
| | | |
| | | toolbarConfig: { |
| | |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | | data: [ |
| | | { |
| | | 销售单号: 'NG231201', |
| | | 生产订单号: 'NG231201A', |
| | | 产品编号: '9001010203000008', |
| | | 产品名称: '5mm白玻平钢(外)+0.76PVB透明+5mm白玻平钢(内)', |
| | | 总数量: '169', |
| | | 总面积: '175.31', |
| | | 周长: '99.84', |
| | | }, |
| | | { |
| | | 销售单号: 'NG231201', |
| | | 生产订单号: 'NG231201A', |
| | | 产品编号: '9001010203000008', |
| | | 产品名称: '5mm白玻平钢(外)+0.76PVB透明+5mm白玻平钢(内)', |
| | | 总数量: '169', |
| | | 总面积: '175.31', |
| | | 周长: '99.84', |
| | | }, |
| | | { |
| | | 销售单号: 'NG231201', |
| | | 生产订单号: 'NG231201A', |
| | | 产品编号: '9001010203000008', |
| | | 产品名称: '5mm白玻平钢(外)+0.76PVB透明+5mm白玻平钢(内)', |
| | | 总数量: '169', |
| | | 总面积: '175.31', |
| | | 周长: '99.84', |
| | | }, |
| | | { |
| | | 销售单号: 'NG231201', |
| | | 生产订单号: 'NG231201A', |
| | | 产品编号: '9001010203000008', |
| | | 产品名称: '5mm白玻平钢(外)+0.76PVB透明+5mm白玻平钢(内)', |
| | | 总数量: '169', |
| | | 总面积: '175.31', |
| | | 周长: '99.84', |
| | | }, |
| | | ],//table body实际数据 |
| | | data: null,//表格数据 |
| | | //脚部求和 |
| | | footerMethod ({ columns, data }) {//页脚函数 |
| | | let footList=['总数量','总面积'] |
| | |
| | | > |
| | | <!-- @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>{{ row[item.field] }}</span> |
| | | </li> |
| | | </ul> |
| | | </template> |
| | |
| | | <script setup> |
| | | |
| | | import {reactive} from "vue"; |
| | | import {useRouter} from 'vue-router' |
| | | let router=useRouter() |
| | | const getTableRow = (row,type) =>{ |
| | | 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"; |
| | | import useUserInfoStore from "@/stores/userInfo"; |
| | | |
| | | let router = useRouter() |
| | | const userStore = useUserInfoStore() |
| | | const username = userStore.user.userName |
| | | const getTableRow = (row, type) => { |
| | | switch (type) { |
| | | case 'edit' :{ |
| | | case 'edit' : { |
| | | //alert('我接收到子组件传送的编辑信息') |
| | | router.push({path: '/main/workOrder/addWorkOrder', query: { id: row.id }}) |
| | | router.push({path: '/main/workOrder/addWorkOrder', query: {id: row.id}}) |
| | | break |
| | | } |
| | | case 'delete':{ |
| | | case 'delete': { |
| | | alert('我接收到子组件传送的删除信息') |
| | | break |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | //定义滚动条高度 |
| | | 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: { |
| | | batch: '' |
| | | }, |
| | | orderDetail: { |
| | | productName: '', |
| | | computeArea: '', |
| | | quantity: '', |
| | | computeGrossArea: '', |
| | | perimeter: '', |
| | | bendRadius: '', |
| | | processingNote: '' |
| | | } |
| | | |
| | | }) |
| | | //定义页面总页数 |
| | | let pageTotal = ref('') |
| | | //定义数据返回结果 |
| | | let produceList = ref([]) |
| | | //定义当前页数 |
| | | let pageNum = $ref(1) |
| | | let pageState = null |
| | | |
| | | const {currentRoute} = useRouter() |
| | | const route = currentRoute.value |
| | | |
| | | let id = route.query.orderId |
| | | |
| | | request.post(`/workOrder/addWork/${id}`, 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 sumNum = (list, field) => { |
| | |
| | | } |
| | | |
| | | //子组件接收参数 |
| | | |
| | | const xGrid = ref() |
| | | const gridOptions = reactive({ |
| | | border: "full",//表格加边框 |
| | | loading: true, |
| | | border: "full",//表格加边框 |
| | | keepSource: true,//保持源数据 |
| | | align: 'center',//文字居中 |
| | | stripe:true,//斑马纹 |
| | | rowConfig: {isCurrent: true, isHover: true,height: 50},//鼠标移动或选择高亮 |
| | | id: 'CustomerList', |
| | | stripe: true,//斑马纹 |
| | | rowConfig: {isCurrent: true, isHover: true, height: 30},//鼠标移动或选择高亮 |
| | | id: 'demo_1', |
| | | showFooter: true,//显示脚 |
| | | printConfig: {}, |
| | | importConfig: {}, |
| | | exportConfig: {}, |
| | | scrollY:{ enabled: true },//开启虚拟滚动 |
| | | showOverflow:true, |
| | | scrollX: {enabled: true}, |
| | | scrollY: {enabled: true, gt: 0},//开启虚拟滚动 |
| | | showOverflow: true, |
| | | columnConfig: { |
| | | resizable: true, |
| | | useKey: true |
| | |
| | | mode: 'row', |
| | | showStatus: true |
| | | },//表头参数 |
| | | columns:[ |
| | | {type:'expand',fixed:"left",slots: { content:'content' },width: 50}, |
| | | { type: 'checkbox',fixed:"left", title: '选择', width: 80 }, |
| | | { type: 'seq',fixed:"left", title: '自序', width: 50 }, |
| | | {field: 'salesOrderNo', title: '销售单号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true, }, |
| | | {field: 'productID', title: '产品编号', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'productName', title: '产品名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'total', title: '总数量', sortable: true}, |
| | | {field: 'totalArea', title: '总面积', sortable: true}, |
| | | {field: 'perimeter', title: '周长', sortable: true,showOverflow:"ellipsis"}, |
| | | columns: [ |
| | | {type: 'expand', fixed: "left", slots: {content: 'content'}, width: 50}, |
| | | {type: 'checkbox', fixed: "left", title: '选择', width: 80}, |
| | | {type: 'seq', fixed: "left", title: '自序', width: 50}, |
| | | {field: 'orderId', title: '销售单号', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true,}, |
| | | { |
| | | field: 'productId', |
| | | title: '产品编号', |
| | | sortable: true, |
| | | showOverflow: "ellipsis", |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'} |
| | | }, |
| | | {field: 'productName', title: '产品名称', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true}, |
| | | {field: 'quantity', title: '总数量', sortable: true}, |
| | | {field: 'computeGrossArea', title: '总面积', sortable: true}, |
| | | {field: 'perimeter', title: '周长', sortable: true, showOverflow: "ellipsis"}, |
| | | ],//表头按钮 |
| | | |
| | | toolbarConfig: { |
| | | buttons: [ |
| | | {code: 'print_lck', name: '保存',status:'primary' ,icon:'vxe-icon-save'}, |
| | | {code: 'saveWorkOrder', name: '保存', status: 'primary', icon: 'vxe-icon-save'}, |
| | | ], |
| | | import: false, |
| | | export: true, |
| | |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | | data: [ |
| | | { |
| | | salesOrderNo: 'NG231201', |
| | | productID: '9001010208000021', |
| | | productName: '6mm超白UD60平钢(外)+12A(结)+6mm超白平钢(内)', |
| | | total:"123", |
| | | totalArea:"1233.12", |
| | | perimeter:"133" |
| | | }, |
| | | { |
| | | salesOrderNo: 'NG231201', |
| | | productID: '9001010203000008', |
| | | productName: '6mm超白LYDE-80平钢(外)+12Ar(结)+6mm超白平钢(内)', |
| | | total:"123", |
| | | totalArea:"1233.12", |
| | | perimeter:"133" |
| | | }, |
| | | ],//table body实际数据 |
| | | data: null,//表格数据 |
| | | //脚部求和 |
| | | footerMethod ({ columns, data }) {//页脚函数 |
| | | let footList=['total','totalArea'] |
| | | return[ |
| | | footerMethod({columns, data}) {//页脚函数 |
| | | let footList = ['total', 'totalArea'] |
| | | return [ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return '合计:' |
| | |
| | | |
| | | }) |
| | | |
| | | const gridEvents = { |
| | | toolbarButtonClick({code}) { |
| | | const $grid = xGrid.value |
| | | if ($grid) { |
| | | switch (code) { |
| | | case 'saveWorkOrder': { |
| | | const $table = xGrid.value |
| | | if ($table) { |
| | | const selectRecords = $table.getCheckboxRecords() |
| | | |
| | | let workOrderData = ref({ |
| | | orderdetail: selectRecords, |
| | | userName:username |
| | | }) |
| | | |
| | | console.log(workOrderData.value) |
| | | request.post("/workOrder/addOrderWork", workOrderData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | ElMessage.success("保存成功") |
| | | location.reload(); |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | |
| | | } |
| | | return; |
| | | |
| | | } |
| | | |
| | | } |
| | | } |
| | | }, |
| | | |
| | | } |
| | | |
| | | </script> |
| | | |
| | |
| | | class="mytable-scrollbar" |
| | | ref="xGrid" |
| | | v-bind="gridOptions" |
| | | v-on="gridEvents" |
| | | |
| | | > |
| | | <!-- @toolbar-button-click="toolbarButtonClickEvent"--> |
| | | <!-- 下拉显示所有信息插槽--> |
| | | <template #content="{ row }"> |
| | | <ul class="expand-wrapper"> |
| | | <li v-for="(item,index) in gridOptions.columns" v-show="item.field!=undefined "> |
| | | <span style="font-weight: bold">{{item.title+': '}}</span> |
| | | <li v-for="(item,index) in gridOptions.columns" v-show="item.field!=undefined "> |
| | | <span style="font-weight: bold">{{ item.title + ': ' }}</span> |
| | | <span>{{ row[item.field] }}</span> |
| | | </li> |
| | | </ul> |
| | |
| | | </template> |
| | | |
| | | <style scoped> |
| | | .main-div-customer{ |
| | | .main-div-customer { |
| | | width: 99%; |
| | | height: 100%; |
| | | } |
| | |
| | | switch (type) { |
| | | case 'edit' : { |
| | | //alert('我接收到子组件传送的编辑信息') |
| | | router.push({path: '/main/workOrder/addWorkOrder', query: {id: row.id}}) |
| | | router.push({path: '/main/workOrder/addWorkOrder', query: {orderId: row.orderId}}) |
| | | break |
| | | } |
| | | case 'delete': { |
| | | alert('我接收到子组件传送的删除信息') |
| | | //console.log(row.orderDetail.productName) |
| | | //request.post('/workOrder/deleteOrderWork/${row.orderId}', ,row.orderDetail.productName).then((res) => { |
| | | request.post(`/workOrder/deleteOrderWork/${row.orderId}/${row.orderDetail.productName}`).then((res) => { |
| | | if (res.code == 200) { |
| | | ElMessage.success("删除成功") |
| | | location.reload(); |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | break |
| | | } |
| | | } |
| | |
| | | keepSource: true,//保持源数据 |
| | | align: 'center',//文字居中 |
| | | stripe: true,//斑马纹 |
| | | rowConfig: {isCurrent: true, isHover: true, height: 60, useKey: true},//鼠标移动或选择高亮 |
| | | rowConfig: {isCurrent: true, isHover: true,height: 30},//鼠标移动或选择高亮 |
| | | id: 'demo_1', |
| | | showFooter: true,//显示脚 |
| | | printConfig: {}, |
| | |
| | | {type: 'expand', fixed: "left", slots: {content: 'content'}, width: 50}, |
| | | {title: '操作', width: 110, slots: {default: 'button_slot'}, fixed: "left"}, |
| | | {type: 'seq', fixed: "left", title: '自序', width: 50}, |
| | | {field: 'orderId', title: '销售单号', filters: [{data: ''}], slots: {filter: 'num1_filter'},}, |
| | | {field: 'orderId', title: '销售单号', filters: [{data: ''}], slots: {filter: 'num1_filter'}, width: 110}, |
| | | { |
| | | field: 'productionId', |
| | | title: '生产订单号', |
| | | showOverflow: "ellipsis", |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'} |
| | | , width: 130 |
| | | }, |
| | | {field: 'order.batch', title: '批次', filters: [{data: ''}], slots: {filter: 'num1_filter'}}, |
| | | {field: 'orderDetail.productName', title: '产品名称', filters: [{data: ''}], slots: {filter: 'num1_filter'},}, |
| | | {field: 'orderDetail.computeArea', title: '单片总面积', showOverflow: "ellipsis"}, |
| | | {field: 'orderDetail.quantity', title: '总数量',}, |
| | | {field: 'order.batch', title: '批次', filters: [{data: ''}], slots: {filter: 'num1_filter'}, width: 110}, |
| | | {field: 'orderDetail.productName', title: '产品名称', filters: [{data: ''}], slots: {filter: 'num1_filter'}, width: 210}, |
| | | {field: 'orderDetail.computeArea', title: '单片总面积', showOverflow: "ellipsis", width: 110}, |
| | | {field: 'orderDetail.quantity', title: '总数量', width: 70}, |
| | | {field: 'orderDetail.computeGrossArea', title: '成品总面积',}, |
| | | {field: 'orderDetail.perimeter', title: '周长', showOverflow: "ellipsis"}, |
| | | {field: 'orderDetail.bendRadius', title: '半径',}, |
| | |
| | | |
| | | <!--左边固定显示的插槽--> |
| | | <template #button_slot="{ row }"> |
| | | <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-button :class="{disable: optionVal== 0}" :disabled="optionVal == 0" @click="getTableRow(row,'edit')" link type="primary" size="small">转工单</el-button> |
| | | <el-button :class="{disable: optionVal== 1}" :disabled="optionVal == 1" @click="getTableRow(row,'delete')" link type="primary" size="small">删除</el-button> |
| | | </template> |
| | | |
| | | <template #num1_filter="{ column, $panel }"> |
| | |
| | | package com.example.erp.controller.pp; |
| | | |
| | | import com.example.erp.entity.pp.FlowCard; |
| | | import com.example.erp.entity.sd.Order; |
| | | import com.example.erp.common.Result; |
| | | import com.example.erp.entity.sd.OrderDetail; |
| | | import com.example.erp.service.pp.FlowCardService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | @PathVariable Date selectTime1, |
| | | @PathVariable Date selectTime2, |
| | | @RequestBody FlowCard flowCard){ |
| | | System.out.println(selectTime1+" "+selectTime2+" "+flowCard.toString()); |
| | | return Result.seccess(flowCardService.selectProcessCard(selectTime1,selectTime2,flowCard)); |
| | | |
| | | } |
| | | |
| | | @PostMapping ("/selectAddProcess/{selectTime1}/{selectTime2}") |
| | | public Result SelectAddProcess( |
| | | @PathVariable Date selectTime1, |
| | | @PathVariable Date selectTime2, |
| | | @RequestBody Order order){ |
| | | // System.out.println(selectTime1+" "+selectTime2+" "+flowCard.toString()); |
| | | return Result.seccess(flowCardService.selectAddProcess(selectTime1,selectTime2,order)); |
| | | |
| | | } |
| | | |
| | | @PostMapping ("/detailsSelect/{orderId}") |
| | | |
| | | public Result DetailsSelect( |
| | | @PathVariable String orderId, |
| | | @RequestBody OrderDetail orderDetail){ |
| | | return Result.seccess(flowCardService.DetailsSelectSv(orderId,orderDetail)); |
| | | |
| | | } |
| | | |
| | | } |
| | |
| | | package com.example.erp.controller.pp; |
| | | |
| | | import com.example.erp.common.Constants; |
| | | import com.example.erp.common.Result; |
| | | import com.example.erp.entity.sd.OrderGlassDetail; |
| | | import com.example.erp.entity.sd.OrderDetail; |
| | | import com.example.erp.exception.ServiceException; |
| | | import com.example.erp.service.pp.WorkOrderService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.sql.Date; |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | @RequestMapping("/workOrder") |
| | |
| | | @Autowired |
| | | WorkOrderService workOrderService; |
| | | |
| | | //查询工单 |
| | | @PostMapping ("/orderGlassDetail/{selectTime1}/{selectTime2}/{state}") |
| | | public Result DateWork( |
| | | @PathVariable Date selectTime1, |
| | |
| | | @RequestBody OrderGlassDetail orderGlassDetail){ |
| | | return Result.seccess(workOrderService.defaultDateWork(selectTime1,selectTime2,state,orderGlassDetail)); |
| | | } |
| | | |
| | | //转生产订单查询 |
| | | @PostMapping ("/addWork/{orderId}") |
| | | |
| | | public Result AddWork( |
| | | @PathVariable String orderId, |
| | | @RequestBody OrderDetail orderDetail){ |
| | | return Result.seccess(workOrderService.AddDateWork(orderId,orderDetail)); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | @PostMapping("/addOrderWork") |
| | | public Result AddOrderWork( @RequestBody Map<String,Object> object){ |
| | | System.out.println("obj:"+object); |
| | | if(workOrderService.AddOrderWorkSv(object)){ |
| | | return Result.seccess(); |
| | | }else { |
| | | throw new ServiceException(Constants.Code_500,"保存失败"); |
| | | |
| | | } |
| | | } |
| | | |
| | | @PostMapping("/deleteOrderWork/{orderId}/{productName}") |
| | | public Result deleteOrderWork( |
| | | @PathVariable String orderId, |
| | | @PathVariable String productName |
| | | ){ |
| | | if(workOrderService.DeleteOrderWorkSv(orderId,productName)){ |
| | | return Result.seccess(); |
| | | }else { |
| | | throw new ServiceException(Constants.Code_500,"删除失败"); |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | package com.example.erp.mapper.pp; |
| | | |
| | | import com.example.erp.entity.pp.FlowCard; |
| | | import com.example.erp.entity.sd.Order; |
| | | import com.example.erp.entity.sd.OrderDetail; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | import java.sql.Date; |
| | |
| | | @Mapper |
| | | public interface FlowCardMapper { |
| | | List<FlowCard> selectFlowCard(Date selectTime1, Date selectTime2,FlowCard flowCard); |
| | | // Integer getPageTotal(Integer offset, Integer pageSize, String glassTypeId, Product product); |
| | | |
| | | List<Order> selectFlowCardMp(Date selectTime1, Date selectTime2, Order order); |
| | | |
| | | List<OrderDetail> DetailsSelectMp(String orderId, OrderDetail orderDetail); |
| | | // Integer getPageTotal(Integer offset, Integer pageSize, String glassTypeId, Product product); |
| | | } |
| | |
| | | |
| | | import com.example.erp.entity.sd.Product; |
| | | import com.example.erp.entity.sd.OrderGlassDetail; |
| | | import com.example.erp.entity.sd.OrderDetail; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | |
| | | |
| | | @Mapper |
| | | public interface WorkOrderMapper { |
| | | List<OrderGlassDetail> selectWordOrder(Date selectTime1, Date selectTime2, Integer state,OrderGlassDetail orderGlassDetail); |
| | | List<OrderGlassDetail> selectWordOrder(Date selectTime1, Date selectTime2, OrderGlassDetail orderGlassDetail); |
| | | |
| | | // Integer getPageTotal(Integer offset, Integer pageSize, String glassTypeId, Product product); |
| | | List<OrderGlassDetail> selectWordOrderNo(Date selectTime1, Date selectTime2, OrderGlassDetail orderGlassDetail); |
| | | List<OrderDetail> addWordOrder(String orderId, OrderDetail orderDetail); |
| | | |
| | | |
| | | Boolean AddOrderWorkMp(String productIdVl, |
| | | @Param("orderId") String orderId, |
| | | @Param("productId") Integer productId, |
| | | @Param("productName") String productName, |
| | | String userName); |
| | | |
| | | Integer SelectOrderNumber(String productIdVl); |
| | | |
| | | |
| | | Boolean DeleteOrderWorkMp(String orderId, String productName); |
| | | } |
| | |
| | | |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.example.erp.entity.pp.FlowCard; |
| | | import com.example.erp.entity.sd.Order; |
| | | import com.example.erp.entity.sd.OrderDetail; |
| | | import com.example.erp.mapper.pp.FlowCardMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | } |
| | | |
| | | |
| | | public Map<String, Object> selectAddProcess(Date selectTime1, Date selectTime2, Order order) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | System.out.println(flowCardMapper.selectFlowCardMp( selectTime1,selectTime2, order)); |
| | | map.put("data", flowCardMapper.selectFlowCardMp( selectTime1,selectTime2, order)); |
| | | // map.put("total", productMapper.getPageTotal(offset, pageSize, glassTypeId, product)); |
| | | return map; |
| | | } |
| | | |
| | | public Map<String, Object> DetailsSelectSv(String orderId, OrderDetail orderDetail) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", flowCardMapper.DetailsSelectMp( orderId, orderDetail)); |
| | | |
| | | // map.put("total", productMapper.getPageTotal(offset, pageSize, glassTypeId, product)); |
| | | return map; |
| | | } |
| | | } |
| | |
| | | |
| | | 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.FlowCard; |
| | | import com.example.erp.entity.sd.OrderGlassDetail; |
| | | import com.example.erp.entity.sd.OrderDetail; |
| | | import com.example.erp.mapper.pp.WorkOrderMapper; |
| | | 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 |
| | |
| | | @Autowired |
| | | WorkOrderMapper workOrderMapper; |
| | | |
| | | public Map<String, Object> defaultDateWork( Date selectTime1,Date selectTime2,Integer state, OrderGlassDetail orderGlassDetail) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | // System.out.println(workOrderMapper.selectWordOrder( selectTime1,selectTime2,state, orderGlassDetail)); |
| | | map.put("data", workOrderMapper.selectWordOrder( selectTime1,selectTime2,state, orderGlassDetail)); |
| | | // map.put("total", productMapper.getPageTotal(offset, pageSize, glassTypeId, product)); |
| | | public Map<String, Object> defaultDateWork(Date selectTime1, Date selectTime2, Integer state, OrderGlassDetail orderGlassDetail) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | // System.out.println(workOrderMapper.selectWordOrder( selectTime1,selectTime2,state, orderGlassDetail)); |
| | | if (state==1){ |
| | | map.put("data", workOrderMapper.selectWordOrder(selectTime1, selectTime2, orderGlassDetail)); |
| | | } |
| | | else { |
| | | map.put("data", workOrderMapper.selectWordOrderNo(selectTime1, selectTime2, orderGlassDetail)); |
| | | } |
| | | |
| | | return map; |
| | | } |
| | | |
| | | public Map<String, Object> AddDateWork(String orderId, OrderDetail orderDetail) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", workOrderMapper.addWordOrder(orderId, orderDetail)); |
| | | return map; |
| | | } |
| | | |
| | | public Boolean AddOrderWorkSv(Map<String, Object> object) { |
| | | String userName = ""; |
| | | if (object.get("userName") != null) { |
| | | userName = object.get("userName").toString(); |
| | | } |
| | | |
| | | char lettr = 'A'; |
| | | char letters = '1'; |
| | | int count = 25; |
| | | String productIdVl = ""; |
| | | |
| | | |
| | | List<OrderDetail> orderDetaillist = JSONArray.parseArray(JSONObject.toJSONString(object.get("orderdetail")), OrderDetail.class); |
| | | String orderID = orderDetaillist.get(0).getOrderId(); |
| | | |
| | | if (!orderDetaillist.isEmpty()) { |
| | | for (OrderDetail orderDetail : orderDetaillist) { |
| | | for (int i = 0; i < count; i++) { |
| | | letters = lettr++; |
| | | productIdVl = orderID + letters; |
| | | Integer workCount = workOrderMapper.SelectOrderNumber(productIdVl); |
| | | if (workCount <1) |
| | | { |
| | | break; |
| | | } |
| | | |
| | | } |
| | | System.out.println(productIdVl); |
| | | workOrderMapper.AddOrderWorkMp(productIdVl, orderDetail.getOrderId(), orderDetail.getProductId(), orderDetail.getProductName(),userName); |
| | | } |
| | | return true; |
| | | } else { |
| | | return false; |
| | | } |
| | | |
| | | } |
| | | |
| | | public Boolean DeleteOrderWorkSv(String orderId, String productName) { |
| | | if (!orderId.isEmpty()&&!productName.isEmpty()){ |
| | | workOrderMapper.DeleteOrderWorkMp(orderId, productName); |
| | | return true; |
| | | } |
| | | else { |
| | | return false; |
| | | } |
| | | } |
| | | } |
| | |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.example.erp.mapper.pp.FlowCardMapper"> |
| | | <resultMap id="flowCardMap" type="com.example.erp.entity.pp.FlowCard"> |
| | | |
| | | <result column="order_id" property="orderId"/> |
| | | <result column="process_Id" property="processId"/> |
| | | <result column="binning_quantity" property="binningQuantity"/> |
| | | <result column="founder" property="founder"/> |
| | | <result column="create_time" property="createTime"/> |
| | | <!--接收其他外键实体类数据--> |
| | | <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="product_id" property="productId"/> |
| | |
| | | c.processing_note |
| | | from flow_card as a left join sd.`order` as b on a.order_Id=b.order_id |
| | | left join sd.order_detail as c on a.order_Id=c.order_id and a.order_Number=c.order_number |
| | | <where> |
| | | <if test="flowCard.orderId != null and flowCard.orderId != ''"> |
| | | and a.order_id regexp #{flowCard.orderId} |
| | | </if> |
| | | <if test="flowCard.productionId != null and flowCard.productionId != ''"> |
| | | and a.process_Id regexp #{flowCard.productionId} |
| | | </if> |
| | | <if test="flowCard.orderDetail.productId != null and flowCard.orderDetail.productId != ''"> |
| | | and c.product_id regexp #{flowCard.orderDetail.productId} |
| | | </if> |
| | | <if test="flowCard.orderDetail.productName != null and flowCard.orderDetail.productName!= ''"> |
| | | and c.product_name regexp #{flowCard.orderDetail.productName} |
| | | </if> |
| | | where a.create_time between #{selectTime1} and #{selectTime2} |
| | | <!-- <where>--> |
| | | <!-- <if test="flowCard.orderId != null and flowCard.orderId != ''">--> |
| | | <!-- and a.order_id regexp #{flowCard.orderId}--> |
| | | <!-- </if>--> |
| | | <!-- <if test="flowCard.productionId != null and flowCard.productionId != ''">--> |
| | | <!-- and a.process_Id regexp #{flowCard.productionId}--> |
| | | <!-- </if>--> |
| | | <!-- <if test="flowCard.orderDetail.productId != null and flowCard.orderDetail.productId != ''">--> |
| | | <!-- and c.product_id regexp #{flowCard.orderDetail.productId}--> |
| | | <!-- </if>--> |
| | | <!-- <if test="flowCard.orderDetail.productName != null and flowCard.orderDetail.productName!= ''">--> |
| | | <!-- and c.product_name regexp #{flowCard.orderDetail.productName}--> |
| | | <!-- </if>--> |
| | | |
| | | <if test="flowCard.order.project != null and flowCard.order.project!= ''"> |
| | | and b.project regexp #{flowCard.order.project} |
| | | </if> |
| | | |
| | | <if test="flowCard.createTime != ''"> |
| | | and DATE_FORMAT((a.create_time),'%Y-%m-%d') BETWEEN #{ selectTime1 } AND #{ selectTime2 } |
| | | </if> |
| | | </where> |
| | | group by a.process_Id |
| | | <!-- <if test="flowCard.order.project != null and flowCard.order.project!= ''">--> |
| | | <!-- and b.project regexp #{flowCard.order.project}--> |
| | | <!-- </if>--> |
| | | |
| | | |
| | | <!-- <if test="flowCard.createTime != null and flowCard.createTime != ''">--> |
| | | <!-- and DATE_FORMAT((a.create_time),'%Y-%m-%d') BETWEEN #{ selectTime1 } AND #{ selectTime2 }--> |
| | | <!-- </if>--> |
| | | |
| | | ; |
| | | <!-- </where>--> |
| | | group by a.process_Id; |
| | | </select> |
| | | |
| | | <!-- <select id="getPageTotal" >--> |
| | | <!-- select--> |
| | | <!-- CEILING(count(a.id)/#{pageSize})--> |
| | | <!-- from product as a--> |
| | | <!-- left join basic_glass_type bgt on bgt.type_id = a.type_id--> |
| | | <!-- <where>--> |
| | | <!-- <if test="glassTypeId != null and glassTypeId != ''">--> |
| | | <!-- and a.type_id regexp #{glassTypeId}--> |
| | | <!-- </if>--> |
| | | <!-- <if test="product.id != null and product.id != ''">--> |
| | | <!-- and a.id regexp #{product.id}--> |
| | | <!-- </if>--> |
| | | <!-- <if test="product.productName != null and product.productName != ''">--> |
| | | <!-- and a.product_name regexp #{product.productName}--> |
| | | <!-- </if>--> |
| | | <!-- <if test="product.basicGlassType.typeName != null and product.basicGlassType.typeName!= ''">--> |
| | | <!-- and bgt.type_name regexp #{product.basicGlassType.typeName}--> |
| | | <!-- </if>--> |
| | | <!-- <if test="product.query != null and product.query != ''">--> |
| | | <!-- and a.query regexp #{product.query}--> |
| | | <!-- </if>--> |
| | | <!-- <if test="product.creator != null and product.creator != ''">--> |
| | | <!-- and a.creator regexp #{product.creator}--> |
| | | <!-- </if>--> |
| | | <!-- <if test="product.createTime != null and product.createTime != ''">--> |
| | | <!-- and date(a.create_time) regexp #{product.createTime}--> |
| | | <!-- </if>--> |
| | | <!-- </where>--> |
| | | |
| | | <!-- order by a.id desc--> |
| | | <!-- ;--> |
| | | <!-- </select>--> |
| | | |
| | | <select id="selectFlowCardMp"> |
| | | select o.order_id, |
| | | o.customer_name, |
| | | o.project, |
| | | o.batch, |
| | | o.other_remarks, |
| | | o.icon, |
| | | o.order_type, |
| | | o.salesman, |
| | | o.processing_note, |
| | | o.delivery_address |
| | | from sd.`order` as o |
| | | where o.create_time between #{selectTime1} and #{selectTime2} |
| | | <!-- <where>--> |
| | | <!-- <if test="flowCard.orderId != null and flowCard.orderId != ''">--> |
| | | <!-- and a.order_id regexp #{flowCard.orderId}--> |
| | | <!-- </if>--> |
| | | <!-- <if test="flowCard.productionId != null and flowCard.productionId != ''">--> |
| | | <!-- and a.process_Id regexp #{flowCard.productionId}--> |
| | | <!-- </if>--> |
| | | <!-- <if test="flowCard.orderDetail.productId != null and flowCard.orderDetail.productId != ''">--> |
| | | <!-- and c.product_id regexp #{flowCard.orderDetail.productId}--> |
| | | <!-- </if>--> |
| | | <!-- <if test="flowCard.orderDetail.productName != null and flowCard.orderDetail.productName!= ''">--> |
| | | <!-- and c.product_name regexp #{flowCard.orderDetail.productName}--> |
| | | <!-- </if>--> |
| | | |
| | | <!-- <if test="flowCard.order.project != null and flowCard.order.project!= ''">--> |
| | | <!-- and b.project regexp #{flowCard.order.project}--> |
| | | <!-- </if>--> |
| | | |
| | | |
| | | <!-- <if test="flowCard.createTime != null and flowCard.createTime != ''">--> |
| | | <!-- and DATE_FORMAT((a.create_time),'%Y-%m-%d') BETWEEN #{ selectTime1 } AND #{ selectTime2 }--> |
| | | <!-- </if>--> |
| | | |
| | | <!-- </where>--> |
| | | ; |
| | | </select> |
| | | |
| | | <select id="DetailsSelectMp"> |
| | | select od.order_id, |
| | | ogd.production_id, |
| | | od.product_id, |
| | | od.product_name, |
| | | od.quantity, |
| | | od.compute_gross_area, |
| | | od.perimeter |
| | | from sd.order_detail as od |
| | | left join sd.order_glass_detail as ogd |
| | | on od.order_id = ogd.order_id and od.order_number = ogd.order_number |
| | | where od.order_id = #{orderId} |
| | | group by od.order_id,ogd.production_id |
| | | </select> |
| | | </mapper> |
| | |
| | | <result column="batch" property="batch"/> |
| | | </association> |
| | | <association property="orderDetail" javaType="com.example.erp.entity.sd.OrderDetail"> |
| | | <result column="product_id" property="productId"/> |
| | | <result column="product_name" property="productName"/> |
| | | <result column="compute_area" property="computeArea"/> |
| | | <result column="quantity" property="quantity"/> |
| | |
| | | from order_glass_detail as a |
| | | LEFT JOIN order_detail as b on a.order_id=b.order_id and a.order_number=b.order_number LEFT JOIN |
| | | `order` as c on a.order_id=c.order_id |
| | | <where> |
| | | where isnull(a.production_id) |
| | | <if test="orderGlassDetail.orderId != null and orderGlassDetail.orderId != ''"> |
| | | and a.order_id regexp #{orderGlassDetail.orderId} |
| | | </if> |
| | |
| | | <if test="orderGlassDetail.orderDetail.productName != null and orderGlassDetail.orderDetail.productName!= ''"> |
| | | and b.product_name regexp #{orderGlassDetail.orderDetail.productName} |
| | | </if> |
| | | <if test="orderGlassDetail.splittingStatus=0 " > |
| | | and a.splitting_status regexp #{state} |
| | | </if> |
| | | <if test="orderGlassDetail.splittingStatus=1"> |
| | | and a.splitting_status regexp #{state} |
| | | </if> |
| | | |
| | | <if test="orderGlassDetail.createTime != ''"> |
| | | and DATE_FORMAT((a.create_time),'%Y-%m-%d') BETWEEN #{ selectTime1 } AND #{ selectTime2 } |
| | | and DATE_FORMAT((a.create_time),'%Y-%m-%d') BETWEEN #{ selectTime1 } AND #{ selectTime2 } |
| | | </if> |
| | | </where> |
| | | |
| | | group by a.production_id,a.order_number |
| | | order by a.id desc |
| | | |
| | |
| | | ; |
| | | </select> |
| | | |
| | | <!-- <select id="getPageTotal" >--> |
| | | <!-- select--> |
| | | <!-- CEILING(count(a.id)/#{pageSize})--> |
| | | <!-- from product as a--> |
| | | <!-- left join basic_glass_type bgt on bgt.type_id = a.type_id--> |
| | | <!-- <where>--> |
| | | <!-- <if test="glassTypeId != null and glassTypeId != ''">--> |
| | | <!-- and a.type_id regexp #{glassTypeId}--> |
| | | <!-- </if>--> |
| | | <!-- <if test="product.id != null and product.id != ''">--> |
| | | <!-- and a.id regexp #{product.id}--> |
| | | <!-- </if>--> |
| | | <!-- <if test="product.productName != null and product.productName != ''">--> |
| | | <!-- and a.product_name regexp #{product.productName}--> |
| | | <!-- </if>--> |
| | | <!-- <if test="product.basicGlassType.typeName != null and product.basicGlassType.typeName!= ''">--> |
| | | <!-- and bgt.type_name regexp #{product.basicGlassType.typeName}--> |
| | | <!-- </if>--> |
| | | <!-- <if test="product.query != null and product.query != ''">--> |
| | | <!-- and a.query regexp #{product.query}--> |
| | | <!-- </if>--> |
| | | <!-- <if test="product.creator != null and product.creator != ''">--> |
| | | <!-- and a.creator regexp #{product.creator}--> |
| | | <!-- </if>--> |
| | | <!-- <if test="product.createTime != null and product.createTime != ''">--> |
| | | <!-- and date(a.create_time) regexp #{product.createTime}--> |
| | | <!-- </if>--> |
| | | <!-- </where>--> |
| | | <select id="selectWordOrderNo" resultMap="wordOrderMap"> |
| | | select |
| | | a.order_id, |
| | | a.production_id, |
| | | c.batch, |
| | | b.product_name, |
| | | b.compute_area, |
| | | b.quantity, |
| | | b.compute_gross_area, |
| | | b.perimeter, |
| | | b.bend_radius, |
| | | b.processing_note |
| | | from order_glass_detail as a |
| | | LEFT JOIN order_detail as b on a.order_id=b.order_id and a.order_number=b.order_number LEFT JOIN |
| | | `order` as c on a.order_id=c.order_id |
| | | where a.production_id IS NOT NULL |
| | | <if test="orderGlassDetail.orderId != null and orderGlassDetail.orderId != ''"> |
| | | and a.order_id regexp #{orderGlassDetail.orderId} |
| | | </if> |
| | | <if test="orderGlassDetail.productionId != null and orderGlassDetail.productionId != ''"> |
| | | and a.production_id regexp #{orderGlassDetail.productionId} |
| | | </if> |
| | | <if test="orderGlassDetail.order.batch != null and orderGlassDetail.order.batch != ''"> |
| | | and c.batch regexp #{orderGlassDetail.order.batch} |
| | | </if> |
| | | <if test="orderGlassDetail.orderDetail.productName != null and orderGlassDetail.orderDetail.productName!= ''"> |
| | | and b.product_name regexp #{orderGlassDetail.orderDetail.productName} |
| | | </if> |
| | | |
| | | <!-- order by a.id desc--> |
| | | <!-- ;--> |
| | | <!-- </select>--> |
| | | <if test="orderGlassDetail.createTime != ''"> |
| | | and DATE_FORMAT((a.create_time),'%Y-%m-%d') BETWEEN #{ selectTime1 } AND #{ selectTime2 } |
| | | </if> |
| | | |
| | | group by a.production_id,a.order_number |
| | | order by a.id desc |
| | | |
| | | |
| | | ; |
| | | </select> |
| | | |
| | | <select id="addWordOrder"> |
| | | select od.order_id, |
| | | od.product_id, |
| | | od.product_name, |
| | | od.quantity, |
| | | od.compute_gross_area, |
| | | od.perimeter |
| | | from 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 |
| | | where od.order_id = #{orderId} |
| | | and ISNULL(ogd.production_id) |
| | | group by od.order_id, od.product_id, od.product_name |
| | | ; |
| | | </select> |
| | | |
| | | <select id="SelectOrderNumber"> |
| | | select count(ogd.production_id) |
| | | from sd.order_glass_detail as ogd |
| | | where ogd.production_id = #{productIdVl} |
| | | </select> |
| | | |
| | | <update id="AddOrderWorkMp"> |
| | | 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=#{productIdVl}, |
| | | ogd.production_time=NOW(), |
| | | ogd.founder=#{userName} |
| | | |
| | | where od.order_id = #{orderId} |
| | | and od.product_id =#{productId} |
| | | and od.product_name = #{productName} |
| | | </update> |
| | | |
| | | <update id="DeleteOrderWorkMp"> |
| | | 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 od.product_name = #{productName} |
| | | </update> |
| | | </mapper> |
| | |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.example.erp.mapper.pp.FlowCardMapper"> |
| | | <resultMap id="flowCardMap" type="com.example.erp.entity.pp.FlowCard"> |
| | | |
| | | <result column="order_id" property="orderId"/> |
| | | <result column="process_Id" property="processId"/> |
| | | <result column="binning_quantity" property="binningQuantity"/> |
| | | <result column="founder" property="founder"/> |
| | | <result column="create_time" property="createTime"/> |
| | | <!--接收其他外键实体类数据--> |
| | | <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="product_id" property="productId"/> |
| | |
| | | c.processing_note |
| | | from flow_card as a left join sd.`order` as b on a.order_Id=b.order_id |
| | | left join sd.order_detail as c on a.order_Id=c.order_id and a.order_Number=c.order_number |
| | | <where> |
| | | <if test="flowCard.orderId != null and flowCard.orderId != ''"> |
| | | and a.order_id regexp #{flowCard.orderId} |
| | | </if> |
| | | <if test="flowCard.productionId != null and flowCard.productionId != ''"> |
| | | and a.process_Id regexp #{flowCard.productionId} |
| | | </if> |
| | | <if test="flowCard.orderDetail.productId != null and flowCard.orderDetail.productId != ''"> |
| | | and c.product_id regexp #{flowCard.orderDetail.productId} |
| | | </if> |
| | | <if test="flowCard.orderDetail.productName != null and flowCard.orderDetail.productName!= ''"> |
| | | and c.product_name regexp #{flowCard.orderDetail.productName} |
| | | </if> |
| | | where a.create_time between #{selectTime1} and #{selectTime2} |
| | | <!-- <where>--> |
| | | <!-- <if test="flowCard.orderId != null and flowCard.orderId != ''">--> |
| | | <!-- and a.order_id regexp #{flowCard.orderId}--> |
| | | <!-- </if>--> |
| | | <!-- <if test="flowCard.productionId != null and flowCard.productionId != ''">--> |
| | | <!-- and a.process_Id regexp #{flowCard.productionId}--> |
| | | <!-- </if>--> |
| | | <!-- <if test="flowCard.orderDetail.productId != null and flowCard.orderDetail.productId != ''">--> |
| | | <!-- and c.product_id regexp #{flowCard.orderDetail.productId}--> |
| | | <!-- </if>--> |
| | | <!-- <if test="flowCard.orderDetail.productName != null and flowCard.orderDetail.productName!= ''">--> |
| | | <!-- and c.product_name regexp #{flowCard.orderDetail.productName}--> |
| | | <!-- </if>--> |
| | | |
| | | <if test="flowCard.order.project != null and flowCard.order.project!= ''"> |
| | | and b.project regexp #{flowCard.order.project} |
| | | </if> |
| | | |
| | | <if test="flowCard.createTime != ''"> |
| | | and DATE_FORMAT((a.create_time),'%Y-%m-%d') BETWEEN #{ selectTime1 } AND #{ selectTime2 } |
| | | </if> |
| | | </where> |
| | | group by a.process_Id |
| | | <!-- <if test="flowCard.order.project != null and flowCard.order.project!= ''">--> |
| | | <!-- and b.project regexp #{flowCard.order.project}--> |
| | | <!-- </if>--> |
| | | |
| | | |
| | | <!-- <if test="flowCard.createTime != null and flowCard.createTime != ''">--> |
| | | <!-- and DATE_FORMAT((a.create_time),'%Y-%m-%d') BETWEEN #{ selectTime1 } AND #{ selectTime2 }--> |
| | | <!-- </if>--> |
| | | |
| | | ; |
| | | <!-- </where>--> |
| | | group by a.process_Id; |
| | | </select> |
| | | |
| | | <!-- <select id="getPageTotal" >--> |
| | | <!-- select--> |
| | | <!-- CEILING(count(a.id)/#{pageSize})--> |
| | | <!-- from product as a--> |
| | | <!-- left join basic_glass_type bgt on bgt.type_id = a.type_id--> |
| | | <!-- <where>--> |
| | | <!-- <if test="glassTypeId != null and glassTypeId != ''">--> |
| | | <!-- and a.type_id regexp #{glassTypeId}--> |
| | | <!-- </if>--> |
| | | <!-- <if test="product.id != null and product.id != ''">--> |
| | | <!-- and a.id regexp #{product.id}--> |
| | | <!-- </if>--> |
| | | <!-- <if test="product.productName != null and product.productName != ''">--> |
| | | <!-- and a.product_name regexp #{product.productName}--> |
| | | <!-- </if>--> |
| | | <!-- <if test="product.basicGlassType.typeName != null and product.basicGlassType.typeName!= ''">--> |
| | | <!-- and bgt.type_name regexp #{product.basicGlassType.typeName}--> |
| | | <!-- </if>--> |
| | | <!-- <if test="product.query != null and product.query != ''">--> |
| | | <!-- and a.query regexp #{product.query}--> |
| | | <!-- </if>--> |
| | | <!-- <if test="product.creator != null and product.creator != ''">--> |
| | | <!-- and a.creator regexp #{product.creator}--> |
| | | <!-- </if>--> |
| | | <!-- <if test="product.createTime != null and product.createTime != ''">--> |
| | | <!-- and date(a.create_time) regexp #{product.createTime}--> |
| | | <!-- </if>--> |
| | | <!-- </where>--> |
| | | |
| | | <!-- order by a.id desc--> |
| | | <!-- ;--> |
| | | <!-- </select>--> |
| | | |
| | | <select id="selectFlowCardMp"> |
| | | select o.order_id, |
| | | o.customer_name, |
| | | o.project, |
| | | o.batch, |
| | | o.other_remarks, |
| | | o.icon, |
| | | o.order_type, |
| | | o.salesman, |
| | | o.processing_note, |
| | | o.delivery_address |
| | | from sd.`order` as o |
| | | where o.create_time between #{selectTime1} and #{selectTime2} |
| | | <!-- <where>--> |
| | | <!-- <if test="flowCard.orderId != null and flowCard.orderId != ''">--> |
| | | <!-- and a.order_id regexp #{flowCard.orderId}--> |
| | | <!-- </if>--> |
| | | <!-- <if test="flowCard.productionId != null and flowCard.productionId != ''">--> |
| | | <!-- and a.process_Id regexp #{flowCard.productionId}--> |
| | | <!-- </if>--> |
| | | <!-- <if test="flowCard.orderDetail.productId != null and flowCard.orderDetail.productId != ''">--> |
| | | <!-- and c.product_id regexp #{flowCard.orderDetail.productId}--> |
| | | <!-- </if>--> |
| | | <!-- <if test="flowCard.orderDetail.productName != null and flowCard.orderDetail.productName!= ''">--> |
| | | <!-- and c.product_name regexp #{flowCard.orderDetail.productName}--> |
| | | <!-- </if>--> |
| | | |
| | | <!-- <if test="flowCard.order.project != null and flowCard.order.project!= ''">--> |
| | | <!-- and b.project regexp #{flowCard.order.project}--> |
| | | <!-- </if>--> |
| | | |
| | | |
| | | <!-- <if test="flowCard.createTime != null and flowCard.createTime != ''">--> |
| | | <!-- and DATE_FORMAT((a.create_time),'%Y-%m-%d') BETWEEN #{ selectTime1 } AND #{ selectTime2 }--> |
| | | <!-- </if>--> |
| | | |
| | | <!-- </where>--> |
| | | ; |
| | | </select> |
| | | |
| | | <select id="DetailsSelectMp"> |
| | | select od.order_id, |
| | | ogd.production_id, |
| | | od.product_id, |
| | | od.product_name, |
| | | od.quantity, |
| | | od.compute_gross_area, |
| | | od.perimeter |
| | | from sd.order_detail as od |
| | | left join sd.order_glass_detail as ogd |
| | | on od.order_id = ogd.order_id and od.order_number = ogd.order_number |
| | | where od.order_id = #{orderId} |
| | | group by od.order_id,ogd.production_id |
| | | </select> |
| | | </mapper> |
| | |
| | | <result column="batch" property="batch"/> |
| | | </association> |
| | | <association property="orderDetail" javaType="com.example.erp.entity.sd.OrderDetail"> |
| | | <result column="product_id" property="productId"/> |
| | | <result column="product_name" property="productName"/> |
| | | <result column="compute_area" property="computeArea"/> |
| | | <result column="quantity" property="quantity"/> |
| | |
| | | from order_glass_detail as a |
| | | LEFT JOIN order_detail as b on a.order_id=b.order_id and a.order_number=b.order_number LEFT JOIN |
| | | `order` as c on a.order_id=c.order_id |
| | | <where> |
| | | where isnull(a.production_id) |
| | | <if test="orderGlassDetail.orderId != null and orderGlassDetail.orderId != ''"> |
| | | and a.order_id regexp #{orderGlassDetail.orderId} |
| | | </if> |
| | |
| | | <if test="orderGlassDetail.orderDetail.productName != null and orderGlassDetail.orderDetail.productName!= ''"> |
| | | and b.product_name regexp #{orderGlassDetail.orderDetail.productName} |
| | | </if> |
| | | <if test="orderGlassDetail.splittingStatus=0 " > |
| | | and a.splitting_status regexp #{state} |
| | | </if> |
| | | <if test="orderGlassDetail.splittingStatus=1"> |
| | | and a.splitting_status regexp #{state} |
| | | </if> |
| | | |
| | | <if test="orderGlassDetail.createTime != ''"> |
| | | and DATE_FORMAT((a.create_time),'%Y-%m-%d') BETWEEN #{ selectTime1 } AND #{ selectTime2 } |
| | | and DATE_FORMAT((a.create_time),'%Y-%m-%d') BETWEEN #{ selectTime1 } AND #{ selectTime2 } |
| | | </if> |
| | | </where> |
| | | |
| | | group by a.production_id,a.order_number |
| | | order by a.id desc |
| | | |
| | |
| | | ; |
| | | </select> |
| | | |
| | | <!-- <select id="getPageTotal" >--> |
| | | <!-- select--> |
| | | <!-- CEILING(count(a.id)/#{pageSize})--> |
| | | <!-- from product as a--> |
| | | <!-- left join basic_glass_type bgt on bgt.type_id = a.type_id--> |
| | | <!-- <where>--> |
| | | <!-- <if test="glassTypeId != null and glassTypeId != ''">--> |
| | | <!-- and a.type_id regexp #{glassTypeId}--> |
| | | <!-- </if>--> |
| | | <!-- <if test="product.id != null and product.id != ''">--> |
| | | <!-- and a.id regexp #{product.id}--> |
| | | <!-- </if>--> |
| | | <!-- <if test="product.productName != null and product.productName != ''">--> |
| | | <!-- and a.product_name regexp #{product.productName}--> |
| | | <!-- </if>--> |
| | | <!-- <if test="product.basicGlassType.typeName != null and product.basicGlassType.typeName!= ''">--> |
| | | <!-- and bgt.type_name regexp #{product.basicGlassType.typeName}--> |
| | | <!-- </if>--> |
| | | <!-- <if test="product.query != null and product.query != ''">--> |
| | | <!-- and a.query regexp #{product.query}--> |
| | | <!-- </if>--> |
| | | <!-- <if test="product.creator != null and product.creator != ''">--> |
| | | <!-- and a.creator regexp #{product.creator}--> |
| | | <!-- </if>--> |
| | | <!-- <if test="product.createTime != null and product.createTime != ''">--> |
| | | <!-- and date(a.create_time) regexp #{product.createTime}--> |
| | | <!-- </if>--> |
| | | <!-- </where>--> |
| | | <select id="selectWordOrderNo" resultMap="wordOrderMap"> |
| | | select |
| | | a.order_id, |
| | | a.production_id, |
| | | c.batch, |
| | | b.product_name, |
| | | b.compute_area, |
| | | b.quantity, |
| | | b.compute_gross_area, |
| | | b.perimeter, |
| | | b.bend_radius, |
| | | b.processing_note |
| | | from order_glass_detail as a |
| | | LEFT JOIN order_detail as b on a.order_id=b.order_id and a.order_number=b.order_number LEFT JOIN |
| | | `order` as c on a.order_id=c.order_id |
| | | where a.production_id IS NOT NULL |
| | | <if test="orderGlassDetail.orderId != null and orderGlassDetail.orderId != ''"> |
| | | and a.order_id regexp #{orderGlassDetail.orderId} |
| | | </if> |
| | | <if test="orderGlassDetail.productionId != null and orderGlassDetail.productionId != ''"> |
| | | and a.production_id regexp #{orderGlassDetail.productionId} |
| | | </if> |
| | | <if test="orderGlassDetail.order.batch != null and orderGlassDetail.order.batch != ''"> |
| | | and c.batch regexp #{orderGlassDetail.order.batch} |
| | | </if> |
| | | <if test="orderGlassDetail.orderDetail.productName != null and orderGlassDetail.orderDetail.productName!= ''"> |
| | | and b.product_name regexp #{orderGlassDetail.orderDetail.productName} |
| | | </if> |
| | | |
| | | <!-- order by a.id desc--> |
| | | <!-- ;--> |
| | | <!-- </select>--> |
| | | <if test="orderGlassDetail.createTime != ''"> |
| | | and DATE_FORMAT((a.create_time),'%Y-%m-%d') BETWEEN #{ selectTime1 } AND #{ selectTime2 } |
| | | </if> |
| | | |
| | | group by a.production_id,a.order_number |
| | | order by a.id desc |
| | | |
| | | |
| | | ; |
| | | </select> |
| | | |
| | | <select id="addWordOrder"> |
| | | select od.order_id, |
| | | od.product_id, |
| | | od.product_name, |
| | | od.quantity, |
| | | od.compute_gross_area, |
| | | od.perimeter |
| | | from 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 |
| | | where od.order_id = #{orderId} |
| | | and ISNULL(ogd.production_id) |
| | | group by od.order_id, od.product_id, od.product_name |
| | | ; |
| | | </select> |
| | | |
| | | <select id="SelectOrderNumber"> |
| | | select count(ogd.production_id) |
| | | from sd.order_glass_detail as ogd |
| | | where ogd.production_id = #{productIdVl} |
| | | </select> |
| | | |
| | | <update id="AddOrderWorkMp"> |
| | | 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=#{productIdVl}, |
| | | ogd.production_time=NOW(), |
| | | ogd.founder=#{userName} |
| | | |
| | | where od.order_id = #{orderId} |
| | | and od.product_id =#{productId} |
| | | and od.product_name = #{productName} |
| | | </update> |
| | | |
| | | <update id="DeleteOrderWorkMp"> |
| | | 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 od.product_name = #{productName} |
| | | </update> |
| | | </mapper> |