| | |
| | | <?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> |
| | |
| | | <user-name>root</user-name> |
| | | <schema-mapping> |
| | | <introspection-scope> |
| | | <node kind="schema" negative="1" /> |
| | | <node kind="schema"> |
| | | <name qname="erp_user_info" /> |
| | | <name qname="mm" /> |
| | | <name qname="pp" /> |
| | | <name qname="sd" /> |
| | | </node> |
| | | </introspection-scope> |
| | | </schema-mapping> |
| | | </data-source> |
| | |
| | | import {ElMessage} from "element-plus" |
| | | import request from "@/utils/request" |
| | | import deepClone from "@/utils/deepClone" |
| | | |
| | | import useUserInfoStore from '@/stores/userInfo' |
| | | let dialogTableVisible = ref(false) |
| | | const userStore = useUserInfoStore() |
| | | const router = useRouter() |
| | | const xGrid = ref() |
| | | const gridOptions = reactive({ |
| | |
| | | keepSource: true,//保持源数据 |
| | | align: 'center',//文字居中 |
| | | stripe:true,//斑马纹 |
| | | rowConfig: {isCurrent: true, isHover: true,height: 50},//鼠标移动或选择高亮 |
| | | rowConfig: {isCurrent: true, isHover: true,height: 30},//鼠标移动或选择高亮 |
| | | id: 'OrderList', |
| | | showFooter: true,//显示脚 |
| | | printConfig: {}, |
| | |
| | | const $grid = xGrid.value |
| | | if ($grid) { |
| | | switch (code) { |
| | | case 'remarks': { |
| | | dialogTableVisible.value=true |
| | | break |
| | | } |
| | | case 'Craft': { |
| | | await router.push({path: '/main/order/updateOrderCraft', query: {orderID: 12123}}) |
| | | break |
| | |
| | | ElMessage.error('没有表格数据!') |
| | | return |
| | | } |
| | | console.log($grid.getTableData().tableData) |
| | | const project = titleUploadData.value.project |
| | | if(project === null || project === undefined || project === ''){ |
| | | ElMessage.error('输入项目名称!') |
| | | return |
| | | } |
| | | const customer = titleUploadData.value.customerId |
| | | if(customer === null || customer === undefined || customer === ''){ |
| | | ElMessage.error('请选择客户!') |
| | | return |
| | | } |
| | | const salasMan = titleUploadData.value.salesman |
| | | if(salasMan === null || salasMan === undefined || salasMan === ''){ |
| | | ElMessage.error('请选择业务员!') |
| | | return |
| | | } |
| | | const calculateType = titleUploadData.value.calculateType |
| | | if(calculateType === null || calculateType === undefined || calculateType === ''){ |
| | | ElMessage.error('请选择计算方式!') |
| | | return |
| | | } |
| | | |
| | | if ($grid) { |
| | | const errMap = await $grid.validate(true) |
| | | if (errMap) { |
| | |
| | | const titleUploadData = ref({ |
| | | project:'', |
| | | orderType:'', |
| | | alType:'', |
| | | customerId:'', |
| | | customerName:'', |
| | | icon:'', |
| | | orderClassify:'', |
| | | packType:'', |
| | | deliveryDate:'' |
| | | orderId:'', |
| | | deliveryDate:'', |
| | | batch:'', |
| | | calculateType:'', |
| | | salesmanId:'', |
| | | salesman:'', |
| | | alType:'', |
| | | money:'', |
| | | contractId:'', |
| | | customerBatch:'', |
| | | contacts:'', |
| | | contactNumber:'', |
| | | deliveryAddress:'', |
| | | otherMoney:'', |
| | | otherMoneyRemarks:'', |
| | | processingNote:'', |
| | | creatorId:userStore.user.userName, |
| | | creator:userStore.user.userId, |
| | | }) |
| | | |
| | | //定义接收加载表头下拉数据 |
| | |
| | | icon:[], |
| | | orderClassify:[], |
| | | packType:[], |
| | | customer:[], |
| | | saleMan:[] |
| | | }) |
| | | //页面第一次加载执行 |
| | | request.get(`/basicData/orderBasicData`).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | titleSelectJson.value=deepClone(res.data) |
| | | titleUploadData.value.orderType = titleSelectJson.value.orderType[0].id |
| | | titleUploadData.value.orderClassify = titleSelectJson.value.orderClassify[0].id |
| | | titleUploadData.value.icon = titleSelectJson.value.icon[0].id |
| | | titleUploadData.value.packType = titleSelectJson.value.packType[0].id |
| | | titleUploadData.value.alType = titleSelectJson.value.alType[0].id |
| | | titleUploadData.value.orderType = titleSelectJson.value.orderType[0].basicName |
| | | titleUploadData.value.orderClassify = titleSelectJson.value.orderClassify[0].basicName |
| | | titleUploadData.value.icon = titleSelectJson.value.icon[0].basicName |
| | | titleUploadData.value.packType = titleSelectJson.value.packType[0].basicName |
| | | titleUploadData.value.alType = titleSelectJson.value.alType[0].basicName |
| | | const today = new Date |
| | | today.setTime(today.getTime() + (15 * 24 * 60 * 60 * 1000)) |
| | | titleUploadData.value.deliveryDate = today.getFullYear() + |
| | |
| | | const saveOrder = (order) => { |
| | | request.post(`/order/saveOrder`,order).then((res) => { |
| | | if(res.code==200){ |
| | | location.reload() |
| | | ElMessage.success('保存成功') |
| | | }else { |
| | | ElMessage.warning(res.msg) |
| | | ElMessage.error(res.msg) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | const countAmount = (row) => { |
| | | return |
| | | const changeCustomer = () => { |
| | | const changedCustomerId = titleUploadData.value.customerId |
| | | const customer = titleSelectJson.value.customer.filter(item => item.id === changedCustomerId) |
| | | titleUploadData.value.customerName = customer[0].customerName |
| | | //titleSelectJson.value.customer |
| | | } |
| | | |
| | | const changeSaleMan = () => { |
| | | const changedSaleManId = titleUploadData.value.salesmanId |
| | | const SaleMan = titleSelectJson.value.saleMan.filter(item => item.id === changedSaleManId) |
| | | titleUploadData.value.salesman = SaleMan[0].basicName |
| | | } |
| | | |
| | | const area = (row) => { |
| | | return parseFloat((row.width * row.height/1000000).toFixed(2)) |
| | | } |
| | | const countArea = (row) => { |
| | | return parseFloat((row.width * row.height/1000000).toFixed(2))*row.quantity |
| | | 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)=>{ |
| | | countMoney += parseFloat(item.grossAmount) |
| | | }) |
| | | return countMoney |
| | | } |
| | | //导入功能 |
| | | const impotEvent = async () => { |
| | | const importEvent = async () => { |
| | | const $grid = xGrid.value |
| | | const { files } = await $grid.readFile({ |
| | | types: ['xls', 'xlsx'] |
| | |
| | | const workbook = XLXS.read(data, { type: 'binary' }) |
| | | let jsonData = XLXS.utils.sheet_to_json(workbook.Sheets.Sheet1).slice(1) |
| | | if(jsonData.length>240){ |
| | | ElMessage.error('导入数据不能超过240条,请分订单导入') |
| | | ElMessage.error(`导入${jsonData.length}条,数据不能超过240条,请分订单导入`) |
| | | return |
| | | } |
| | | jsonData.forEach((item,index) => { |
| | | //item.computeArea |
| | | //console.log() |
| | | if(item.computeArea === undefined){ |
| | | item.computeArea = area(item) |
| | | } |
| | | item.computeGrossArea = parseFloat((item.computeArea*item.quantity).toString()) |
| | | item.area = area(item) |
| | | item.grossArea = countArea(item) |
| | | item.computeGrossArea = parseFloat((item.computeArea*item.quantity).toFixed(2)) |
| | | item.grossAmount=parseFloat((item.price * item.computeGrossArea).toFixed(2)) |
| | | }) |
| | | |
| | | //赋值表头数据 |
| | | titleUploadData.value.money=countMoney(jsonData).toString() |
| | | xGrid.value.loadData(jsonData) |
| | | } |
| | | fileReader.readAsBinaryString(files[0]) |
| | |
| | | row.grossArea = countArea(row) |
| | | row.computeArea = row.area |
| | | row.computeGrossArea = row.grossArea |
| | | row.grossAmount=row.price * row.computeGrossArea |
| | | row.grossAmount=parseFloat((row.price * row.computeGrossArea).toFixed(2)) |
| | | }else if(column.property === 'computeArea'){ |
| | | row.computeGrossArea=parseFloat((row.computeArea*row.quantity).toString()) |
| | | row.grossAmount=row.price * row.computeGrossArea |
| | | row.computeGrossArea=parseFloat((row.computeArea*row.quantity).toFixed(2)) |
| | | row.grossAmount=parseFloat((row.price * row.computeGrossArea).toFixed(2)) |
| | | } |
| | | |
| | | titleUploadData.value.money=countMoney(xGrid.value.getTableData().fullData).toString() |
| | | } |
| | | </script> |
| | | |
| | |
| | | <div class="order-primary" style="background-color: white"> |
| | | <el-row> |
| | | <el-col :span="2"><el-text>*项目名称:</el-text></el-col> |
| | | <el-col :span="2"><el-input/></el-col> |
| | | <el-col :span="2"><el-input v-model="titleUploadData.project"/></el-col> |
| | | <el-col :span="2"><el-text>*客户选择:</el-text></el-col> |
| | | <el-col :span="2"> |
| | | <el-select clearable placeholder=" " > |
| | | <el-option/> |
| | | <el-select v-model="titleUploadData.customerId" |
| | | @change="changeCustomer" |
| | | filterable |
| | | clearable |
| | | placeholder="" > |
| | | <el-option v-for="item in titleSelectJson['customer']" |
| | | :key="item.id" |
| | | :label="item.id+' '+item.customerName" |
| | | :value="item.id" |
| | | /> |
| | | </el-select> |
| | | </el-col> |
| | | <el-col :span="2"><el-text>*订单类型:</el-text></el-col> |
| | |
| | | v-for="item in titleSelectJson['orderType']" |
| | | :key="item.id" |
| | | :label="item.basicName" |
| | | :value="item.id" |
| | | :value="item.basicName" |
| | | /> |
| | | </el-select> |
| | | </el-col> |
| | | <el-col :span="2"><el-text>订单分类:</el-text></el-col> |
| | | <el-col :span="2"> |
| | | <el-select v-model="titleUploadData.orderClassify" clearable placeholder=" " > |
| | | <el-select v-model="titleUploadData.orderClassify" clearable placeholder=" " > |
| | | <el-option |
| | | v-for="item in titleSelectJson['orderClassify']" |
| | | :key="item.id" |
| | | :label="item.basicName" |
| | | :value="item.id" |
| | | :value="item.basicName" |
| | | /> |
| | | </el-select> |
| | | </el-col> |
| | | <el-col :span="2"><el-text>商标选项:</el-text></el-col> |
| | | <el-col :span="2"> |
| | | <el-select v-model="titleUploadData.icon" clearable placeholder=" " > |
| | | <el-select v-model="titleUploadData.icon" clearable placeholder=" " > |
| | | <el-option v-for="item in titleSelectJson['icon']" |
| | | :key="item.id" |
| | | :label="item.basicName" |
| | | :value="item.id"/> |
| | | :value="item.basicName"/> |
| | | </el-select> |
| | | </el-col> |
| | | <el-col :span="2"><el-text>包装方式:</el-text></el-col> |
| | | <el-col :span="2"> |
| | | <el-select v-model="titleUploadData.packType" clearable placeholder=" " > |
| | | <el-select v-model="titleUploadData.packType" clearable placeholder=" " > |
| | | <el-option v-for="item in titleSelectJson['packType']" |
| | | :key="item.id" |
| | | :label="item.basicName" |
| | | :value="item.id"/> |
| | | :value="item.basicName"/> |
| | | </el-select> |
| | | </el-col> |
| | | <!-- <el-col :span="2"><el-text /></el-col>--> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="2"><el-text>销售单号:</el-text></el-col> |
| | | <el-col :span="2"><el-text /></el-col> |
| | | <el-col :span="2"><el-text >{{titleUploadData.orderId}}</el-text></el-col> |
| | | <el-col :span="2"><el-text>交货日期:</el-text></el-col> |
| | | <el-col :span="2"> |
| | | <el-date-picker |
| | | v-model="titleUploadData.deliveryDate" |
| | | type="date" |
| | | placeholder="Pick a day" |
| | | placeholder="" |
| | | /> |
| | | </el-col> |
| | | <el-col :span="2"><el-text>批次:</el-text></el-col> |
| | | <el-col :span="2"><el-input/></el-col> |
| | | <el-col :span="2"><el-input v-model="titleUploadData.batch"/></el-col> |
| | | <el-col :span="2"><el-text>计算方式:</el-text></el-col> |
| | | <el-col :span="2"> |
| | | <el-select clearable placeholder=" " > |
| | | <el-option/> |
| | | <el-select v-model="titleUploadData.calculateType" clearable placeholder=" " > |
| | | <el-option value="1" label="1"/> |
| | | </el-select> |
| | | </el-col> |
| | | <el-col :span="2"><el-text>*业务员:</el-text></el-col> |
| | | <el-col :span="2"> |
| | | <el-select clearable placeholder=" " > |
| | | <el-option/> |
| | | <el-select |
| | | v-model="titleUploadData.salesmanId" |
| | | @change = "changeSaleMan" |
| | | clearable |
| | | placeholder=" " |
| | | > |
| | | <el-option v-for="item in titleSelectJson['saleMan']" |
| | | :key="item.id" |
| | | :label="item.basicName" |
| | | :value="item.id"/> |
| | | </el-select> |
| | | </el-col> |
| | | <el-col :span="2"><el-text>铝条方式:</el-text></el-col> |
| | |
| | | <el-option v-for="item in titleSelectJson['alType']" |
| | | :key="item.id" |
| | | :label="item.basicName" |
| | | :value="item.id"/> |
| | | :value="item.basicName"/> |
| | | </el-select> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="2"><el-text>总金额:</el-text></el-col> |
| | | <el-col :span="2"><el-text /></el-col> |
| | | |
| | | <el-col :span="2"><el-text >{{titleUploadData.money}}</el-text></el-col> |
| | | <el-col :span="2"><el-text>合同编号:</el-text></el-col> |
| | | <el-col :span="2"><el-input/></el-col> |
| | | <el-col :span="2"><el-input v-model="titleUploadData.contractId"/></el-col> |
| | | <el-col :span="2"><el-text>客户批次:</el-text></el-col> |
| | | <el-col :span="2"><el-text /></el-col> |
| | | <el-col :span="2"><el-input v-model="titleUploadData.customerBatch"/></el-col> |
| | | <el-col :span="2"><el-text>联系人:</el-text></el-col> |
| | | <el-col :span="2"><el-input/></el-col> |
| | | <el-col :span="2"><el-input v-model="titleUploadData.contacts" /></el-col> |
| | | <el-col :span="2"><el-text>联系电话:</el-text></el-col> |
| | | <el-col :span="2"><el-input/></el-col> |
| | | <el-col :span="2"><el-text>送货地址:</el-text></el-col> |
| | | <el-col :span="2"><el-input/></el-col> |
| | | <el-col :span="2"><el-input v-model="titleUploadData.contactNumber"/></el-col> |
| | | <el-col :span="2"><el-text >送货地址:</el-text></el-col> |
| | | <el-col :span="2"><el-input v-model="titleUploadData.deliveryAddress"/></el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="2"><el-text>其他金额:</el-text></el-col> |
| | | <el-col :span="2"><el-text /></el-col> |
| | | <el-col :span="2"><el-text>其他金额备注:</el-text></el-col> |
| | | <el-col :span="2"><el-text /></el-col> |
| | | <!-- <el-row>--> |
| | | <!-- <el-col :span="2"><el-text>其他金额:</el-text></el-col>--> |
| | | <!-- <el-col :span="2"><el-text /></el-col>--> |
| | | <!-- <el-col :span="2"><el-text>其他金额备注:</el-text></el-col>--> |
| | | <!-- <el-col :span="2"><el-text /></el-col>--> |
| | | |
| | | </el-row> |
| | | <!-- </el-row>--> |
| | | </div> |
| | | <div class="order-detail"> |
| | | <vxe-grid |
| | |
| | | </div> |
| | | </template> |
| | | <template #toolbar_buttons> |
| | | <vxe-button @click="impotEvent">导入</vxe-button> |
| | | <vxe-button @click="importEvent">导入</vxe-button> |
| | | </template> |
| | | |
| | | |
| | | </vxe-grid> |
| | | </div> |
| | | <el-dialog v-model="dialogTableVisible" title="加工要求" style="width: 60%;height:75% "> |
| | | <el-input |
| | | v-model="titleUploadData.processingNote" |
| | | type="textarea" |
| | | :autosize="{ minRows: 2, maxRows: 20 }" |
| | | /> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import {reactive, ref} from "vue"; |
| | | const router = useRouter() |
| | | import ProcessCardProgress from '@/views/pp/report/ProcessCardProgress.vue' |
| | | import request from "@/utils/request"; |
| | | import deepClone from "@/utils/deepClone"; |
| | | import {ElMessage} from "element-plus"; |
| | | |
| | | const getTableRow = (row,type) =>{ |
| | | switch (type) { |
| | | case 'edit' :{ |
| | | //alert('我接收到子组件传送的编辑信息') |
| | | router.push({path: '/main/order/createOrder', query: { orderID: 'NG24010101' }}) |
| | | break |
| | | } |
| | | case 'delete':{ |
| | | alert('我接收到子组件传送的删除信息') |
| | | break |
| | | } |
| | | } |
| | | } |
| | | |
| | | const xGrid = ref() |
| | | const gridOptions = reactive({ |
| | | border: "full",//表格加边框 |
| | | keepSource: true,//保持源数据 |
| | | align: 'center',//文字居中 |
| | | stripe:true,//斑马纹 |
| | | rowConfig: {isCurrent: true, isHover: true,height: 50},//鼠标移动或选择高亮 |
| | | rowConfig: {isCurrent: true, isHover: true,height: 30},//鼠标移动或选择高亮 |
| | | id: 'OrderList', |
| | | showFooter: true,//显示脚 |
| | | printConfig: {}, |
| | |
| | | {title: '操作', width: 110, slots: { default: 'button_slot' },fixed:"left",}, |
| | | {type: 'seq', title: '自序', width: 80 ,fixed:"left",}, |
| | | |
| | | {title: '下单', width: 40, slots: { default: 'state' }}, |
| | | {title: '工艺', width: 40, slots: { default: 'state' }}, |
| | | {title: '审核', width: 40, slots: { default: 'state' }}, |
| | | {title: '生产', width: 40, slots: { default: 'state' }}, |
| | | {title: '交接', width: 40, slots: { default: 'state' }}, |
| | | {title: '下达', width: 40, slots: { default: 'state' }}, |
| | | {title: '入库', width: 40, slots: { default: 'state' }}, |
| | | {title: '发货', width: 40, slots: { default: 'state' }}, |
| | | {field:'createOrder',title: '下单', width: 40, slots: { default: 'state' }}, |
| | | {field:'processReview',title: '工艺', width: 40, slots: { default: 'state' }}, |
| | | {field:'orderReview',title: '审核', width: 40, slots: { default: 'state' }}, |
| | | {field:'productionOrder',title: '工单', width: 40, slots: { default: 'state' }}, |
| | | {field:'processingCard',title: '流程卡', width: 40, slots: { default: 'state' }}, |
| | | {field:'warehousing',title: '入库', width: 40, slots: { default: 'state' }}, |
| | | {field:'delivery',title: '发货', width: 40, slots: { default: 'state' }}, |
| | | |
| | | {field: '1',width:120, title: '销售单号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: '2',width:120, title: '客户编号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: '3',width:120, title: '客户名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: '4',width:120, title: '总数量',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: '5',width:120, title: '可用库存',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: '6',width:120, title: '项目名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: '7',width:120, title: '批次',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: '8',width:120, title: '总金额',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: '9',width:120, title: '结算总面积',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: '10',width:120, title: '报表日期',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: '11',width:120, title: '包装方式',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: '12',width:120, title: '订单类型',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: '13',width:120, title: '订单类型',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: '14',width:120, title: '订单类型',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true} |
| | | {field: 'orderId',width:120, title: '销售单号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'customerId',width:120, title: '客户编号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'customerName',width:120, title: '客户名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'project',width:120, title: '项目名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'batch',width:120, title: '批次',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'quantity',width:120, title: '数量',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: '14',width:120, title: '库存数', sortable: true}, |
| | | {field: 'area',width:120, title: '总结算面积',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'createTime',width:120, title: '报表日期',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'packType',width:120, title: '包装方式',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'orderType',width:120, title: '订单类型',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'salesman',width:120, title: '业务员',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'perimeter',width:120, title: '周长',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'deliveryDate',width:120, title: '交货日期',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'customerBatch',width:120, title: '客户批次',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | |
| | | //{field: '14',width:120, title: '备注',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'deliveryAddress',width:120, title: '地址',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true} |
| | | |
| | | ],//表头按钮 |
| | | toolbarConfig: { |
| | | buttons: [ |
| | | |
| | | ], |
| | | import: false, |
| | | export: true, |
| | | print: true, |
| | | slots:{ |
| | | buttons: "toolbar_buttons" |
| | | }, |
| | | |
| | | // import: false, |
| | | // export: true, |
| | | // print: true, |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | | data: [ |
| | | { |
| | | '0': '1', |
| | | '1': 'NG23110102', |
| | | '2': '11', |
| | | '3': '中建', |
| | | '4': '534', |
| | | '5': '116', |
| | | '6': '黄石有轨电车', |
| | | '7': '20批', |
| | | '8': '111100.02', |
| | | '9': '1008.38', |
| | | '10': '2023-10-30', |
| | | '11': '叉车木箱', |
| | | '12': '普通订单', |
| | | '13': '', |
| | | '14': '王龙' |
| | | }, |
| | | { |
| | | '0': '1', |
| | | '1': 'NG23110101', |
| | | '2': '11', |
| | | '3': '中建', |
| | | '4': '534', |
| | | '5': '116', |
| | | '6': '黄石有轨电车', |
| | | '7': '20批', |
| | | '8': '111100.02', |
| | | '9': '1008.38', |
| | | '10': '2023-10-30', |
| | | '11': '叉车木箱', |
| | | '12': '普通订单', |
| | | '13': '', |
| | | '14': '王龙' |
| | | } |
| | | ],//table body实际数据 |
| | | |
| | | footerMethod ({ columns, data }) {//页脚函数 |
| | | return[ |
| | | columns.map((column, columnIndex) => { |
| | |
| | | |
| | | }) |
| | | const dialogTableVisible = ref(false) |
| | | let orderType = ref("2") |
| | | let selectDate = ref(["",""]) |
| | | let filterData = ref({}) |
| | | let orderList = ref([]) |
| | | request.post(`/order/getOrderList/1/100/${orderType.value}/${selectDate.value}`,filterData).then((res) => { |
| | | if(res.code==200){ |
| | | console.log(res.data) |
| | | orderList.value = deepClone(res.data.data) |
| | | xGrid.value.loadData(orderList.value) |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | |
| | | const cellClickEvent =()=>{ |
| | | dialogTableVisible.value = true |
| | | } |
| | | //双击表格行 |
| | | // const cellClickEvent =()=>{ |
| | | // dialogTableVisible.value = true |
| | | // } |
| | | |
| | | |
| | | |
| | | |
| | |
| | | </ul> |
| | | </template> |
| | | |
| | | <template #state="{ row}"> |
| | | <el-checkbox checked/> |
| | | <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> |
| | | |
| | | <!--左边固定显示的插槽--> |
| | |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | |
| | | <template #toolbar_buttons> |
| | | <vxe-select v-model="orderType" placeholder="订单类型"> |
| | | <vxe-option value="2" label="正常订单"></vxe-option> |
| | | <vxe-option value="-2" label="作废订单"></vxe-option> |
| | | <vxe-option value="" label="全部订单"></vxe-option> |
| | | </vxe-select> |
| | | </template> |
| | | </vxe-grid> |
| | | |
| | | <el-dialog v-model="dialogTableVisible" title="流程卡进度" style="width: 80%;height:75% "> |
| | |
| | | |
| | | |
| | | |
| | | /*const getTableRow = (row,type) =>{ |
| | | switch (type) { |
| | | case 'edit' : { |
| | | router.push({path: '/main/product/createProduct', query: { id: row.id }}) |
| | | break |
| | | } |
| | | case 'delete': { |
| | | alert('我接收到子组件传送的删除信息') |
| | | break |
| | | } |
| | | } |
| | | }*/ |
| | | |
| | | // const getCheckList = (row) =>{ |
| | | // alert('我接收到子组件传送的确认复选框信息可在控制台查看') |
| | | // } |
| | | |
| | | |
| | | const xGrid = ref() |
| | |
| | | keepSource: true,//保持源数据 |
| | | align: 'center',//文字居中 |
| | | stripe:true,//斑马纹 |
| | | rowConfig: {isCurrent: true, isHover: true,height: 60, useKey: true},//鼠标移动或选择高亮 |
| | | rowConfig: {isCurrent: true, isHover: true,height: 30, useKey: true},//鼠标移动或选择高亮 |
| | | id: 'demo_1', |
| | | showFooter: true,//显示脚 |
| | | printConfig: {}, |
| | |
| | | {title: '审核', width: 40, slots: { default: 'state' }}, |
| | | {title: '出库', width: 40, slots: { default: 'state' }}, |
| | | |
| | | {field: '1',width:120, title: '销售单号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: '1',width:120, title: '发货单号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: '2',width:120, title: '客户编号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: '3',width:120, title: '客户名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: '4',width:120, title: '总数量',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | |
| | | data: [ |
| | | { |
| | | '0': '1', |
| | | '1': 'NG23110102', |
| | | '1': 'JG23110102', |
| | | '2': '11', |
| | | '3': '中建', |
| | | '4': '534', |
| | |
| | | }, |
| | | { |
| | | '0': '1', |
| | | '1': 'NG23110101', |
| | | '1': 'JG23110101', |
| | | '2': '11', |
| | | '3': '中建', |
| | | '4': '534', |
| | |
| | | String Code_400="400";// |
| | | String Code_200="200";//成功 |
| | | String Code_600="600";//其他问题 |
| | | String Code_msg = "服务器发生异常,保存失败"; |
| | | } |
| | |
| | | package com.example.erp.controller.sd; |
| | | |
| | | import cn.hutool.json.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.example.erp.common.Constants; |
| | | import com.example.erp.common.Result; |
| | | import com.example.erp.entity.sd.Order; |
| | | import com.example.erp.exception.ServiceException; |
| | | import com.example.erp.service.sd.OrderService; |
| | | import org.apache.tomcat.Jar; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | @RequestMapping("/order") |
| | | public class OrderController { |
| | | @Autowired |
| | | private OrderService orderService; |
| | | private final OrderService orderService; |
| | | |
| | | public OrderController(OrderService orderService) { |
| | | this.orderService = orderService; |
| | | } |
| | | |
| | | |
| | | @PostMapping("/saveOrder") |
| | | public Result saveOrder(@RequestBody Map<String, Object> orderMap) { |
| | | return Result.seccess(orderService.saveOrder(orderMap)); |
| | | public Result saveOrder(@RequestBody Map<String, Object> orderMap) throws Exception { |
| | | if(orderService.saveOrder(orderMap)) { |
| | | return Result.seccess(true); |
| | | }else{ |
| | | throw new ServiceException(Constants.Code_500,Constants.Code_msg); |
| | | } |
| | | } |
| | | |
| | | @PostMapping("/getOrderList/{pageNum}/{pageSize}/{orderType}/{selectDate}") |
| | | public Result getOrderList(@PathVariable Integer pageNum, @PathVariable Integer pageSize,@PathVariable Integer orderType, @PathVariable List<LocalDate> selectDate, @RequestBody Order order) { |
| | | return Result.seccess(orderService.getOrderList(pageNum, pageSize, selectDate, order,orderType)); |
| | | } |
| | | } |
| | |
| | | private Integer deliveryState; |
| | | private Integer stockState; |
| | | private String deliveryId; |
| | | private String orderId; |
| | | private String project; |
| | | private String customerId; |
| | | private String customerName; |
| | | private LocalDate deliveryDate; |
| | | private String payMethod; |
| | | private LocalDate payDate; |
| | | private String salaManId; |
| | | private String salaMan; |
| | | private String saleManId; |
| | | private String saleMan; |
| | | private String creatorId; |
| | | private String creator; |
| | | private String contacts; |
| | |
| | | private String remarks; |
| | | private LocalDate createTime; |
| | | private LocalDate updateTime; |
| | | private Order order; |
| | | private Customer customer; |
| | | |
| | | } |
| | |
| | | private Integer deliveryDetailState; |
| | | private LocalDate createTime; |
| | | private LocalDate updateTime; |
| | | |
| | | private Delivery delivery; |
| | | private OrderDetail orderDetail; |
| | | |
| | |
| | | private String otherRemarks; |
| | | private Double area; |
| | | private Long quantity; |
| | | private String perimeter; |
| | | private String verifierId; |
| | | private String verifier; |
| | | private String creatorId; |
| | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.example.erp.entity.mm.FinishedGoodsInventory; |
| | | import com.example.erp.entity.pp.FlowCard; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDate; |
| | |
| | | @Data |
| | | public class OrderDetail { |
| | | @TableId(type = IdType.AUTO) |
| | | |
| | | private Long id; |
| | | |
| | | private String orderId; |
| | | private String orderId; |
| | | private Integer orderNumber; |
| | | private String buildingNumber; |
| | |
| | | private Integer state; |
| | | private LocalDate createTime; |
| | | private LocalDate updateTime; |
| | | |
| | | private Order order; |
| | | private Delivery delivery; |
| | | private DeliveryDetail deliveryDetail; |
| | |
| | | @TableId(type = IdType.AUTO) |
| | | |
| | | private Long id; |
| | | private String orderId; |
| | | private String orderNumber; |
| | | private Integer technologyNumber; |
| | | private String process; |
| | | private Integer reportingworkNum; |
| | | private Integer brokenNum; |
| | | |
| | | private Order order; |
| | | private OrderDetail orderDetail; |
| | | private Product product; |
| | | // private Order order; |
| | | // private OrderDetail orderDetail; |
| | | // private Product product; |
| | | } |
| | |
| | | public class ProductDetail { |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | private String productName; |
| | | private String prodId; |
| | | private String sortNum; |
| | | private String glassSort; |
| | | private String detailType; |
| | | private String detail; |
| | | private Integer glassGroup; |
| | | private String process; |
| | | private String separation; |
| | | private LocalDate createTime; |
| | | |
| | | private Product product; |
| | | } |
New file |
| | |
| | | package com.example.erp.entity.userInfo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class SysError { |
| | | @TableId(type = IdType.AUTO) |
| | | private String id; |
| | | private String func; |
| | | private String error; |
| | | private String createTime; |
| | | } |
New file |
| | |
| | | package com.example.erp.mapper.sd; |
| | | |
| | | import com.example.erp.entity.sd.Customer; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Mapper |
| | | public interface CustomerMapper { |
| | | List<Customer> getCustomerList(); |
| | | } |
New file |
| | |
| | | package com.example.erp.mapper.sd; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.example.erp.entity.sd.OrderGlassDetail; |
| | | import com.example.erp.entity.sd.OrderProcessDetail; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Mapper |
| | | public interface OrderGlassDetailMapper extends BaseMapper<OrderGlassDetail> { |
| | | boolean insertOrderGlassDetail(@Param("orderId") String orderId); |
| | | |
| | | List<OrderGlassDetail> selectOrderGlassDetail(@Param("orderId") String orderId); |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.example.erp.entity.sd.Order; |
| | | import com.example.erp.entity.sd.Product; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Mapper |
| | | public interface OrderMapper extends BaseMapper<Order> { |
| | | Integer selectMaxOrderId(); |
| | | |
| | | boolean updateOrderParameter(@Param("orderId") String orderId); |
| | | |
| | | List<Order> getOrderList(Integer offset, Integer pageSize, LocalDate startDate, LocalDate endDate, Order order, Integer orderType); |
| | | Integer getPageTotal(Integer offset, Integer pageSize, LocalDate startDate, LocalDate endDate, Order order , Integer orderType); |
| | | } |
New file |
| | |
| | | package com.example.erp.mapper.sd; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.example.erp.entity.sd.OrderProcessDetail; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Mapper |
| | | public interface OrderProcessDetailMapper extends BaseMapper<OrderProcessDetail> { |
| | | boolean insertOrderProcessDetail(@Param("processDetailList") List<OrderProcessDetail> processDetailList); |
| | | } |
New file |
| | |
| | | package com.example.erp.mapper.sd; |
| | | |
| | | import com.example.erp.entity.sd.ProductDetail; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Mapper |
| | | public interface ProductDetailMapper { |
| | | List<ProductDetail> getGlassDetailList(); |
| | | |
| | | } |
New file |
| | |
| | | package com.example.erp.mapper.userInfo; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.example.erp.entity.userInfo.SysError; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | @Mapper |
| | | public interface SysErrorMapper extends BaseMapper<SysError> { |
| | | Boolean saveError(@Param("sysError")SysError sysError); |
| | | } |
| | |
| | | package com.example.erp.service.sd; |
| | | |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.example.erp.entity.sd.Customer; |
| | | import com.example.erp.mapper.sd.BasicDateMapper; |
| | | import com.example.erp.mapper.sd.CustomerMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import com.example.erp.entity.sd.BasicData; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | |
| | | @Service |
| | | @DS("sd") |
| | | public class BasicDateService { |
| | | @Autowired |
| | | BasicDateMapper basicDateMapper; |
| | | private BasicDateMapper basicDateMapper; |
| | | |
| | | @Autowired |
| | | private CustomerMapper customerMapper; |
| | | |
| | | //获取订单基本数据 |
| | | public Map<String, List<Object>> getOrderBasicData() { |
| | | //获取订单基本数据类型 |
| | |
| | | //将数据放入List中 |
| | | orderBasicDataMap.get(item.getBasicCategory()).add(item); |
| | | } |
| | | |
| | | //获取客户列表 |
| | | List<Object> orderBasicDataList = new ArrayList<>(); |
| | | orderBasicDataMap.put("customer",orderBasicDataList); |
| | | List<Customer> customerList = customerMapper.getCustomerList(); |
| | | for (Customer customer : customerList){ |
| | | orderBasicDataMap.get("customer").add(customer); |
| | | } |
| | | |
| | | |
| | | //返回Map对象 |
| | | return orderBasicDataMap; |
| | | } |
| | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.example.erp.entity.sd.Order; |
| | | import com.example.erp.entity.sd.OrderDetail; |
| | | import com.example.erp.entity.sd.OrderGlassDetail; |
| | | import com.example.erp.entity.sd.OrderProcessDetail; |
| | | import com.example.erp.entity.userInfo.SysError; |
| | | import com.example.erp.mapper.sd.OrderDetailMapper; |
| | | import com.example.erp.mapper.sd.OrderGlassDetailMapper; |
| | | import com.example.erp.mapper.sd.OrderMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.example.erp.mapper.sd.OrderProcessDetailMapper; |
| | | import com.example.erp.service.userInfo.SysErrorService; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.transaction.interceptor.TransactionAspectSupport; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDate; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | |
| | | @Service |
| | | @DS("sd") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class OrderService { |
| | | @Autowired |
| | | private OrderMapper orderMapper; |
| | | @Autowired |
| | | private OrderDetailMapper orderDetailMapper; |
| | | private final OrderMapper orderMapper; |
| | | private final OrderDetailMapper orderDetailMapper; |
| | | private final OrderGlassDetailMapper orderGlassDetailMapper; |
| | | private final SysErrorService sysErrorService; |
| | | |
| | | public boolean saveOrder(Map<String,Object> orderMap) { |
| | | private final OrderProcessDetailMapper orderProcessDetailMapper; |
| | | public OrderService(OrderMapper orderMapper, OrderDetailMapper orderDetailMapper, OrderGlassDetailMapper orderGlassDetailMapper, OrderProcessDetailMapper orderProcessDetailMapper, SysErrorService sysErrorService) { |
| | | this.orderMapper = orderMapper; |
| | | this.orderDetailMapper = orderDetailMapper; |
| | | this.orderGlassDetailMapper = orderGlassDetailMapper; |
| | | this.orderProcessDetailMapper = orderProcessDetailMapper; |
| | | this.sysErrorService = sysErrorService; |
| | | } |
| | | |
| | | public boolean saveOrder(Map<String,Object> orderMap) throws Exception { |
| | | JSONObject orderJson = new JSONObject(orderMap); |
| | | Order order = JSONObject.parseObject(JSONObject.toJSONString(orderJson.get("title")), Order.class); |
| | | List<OrderDetail> OrderDetails = JSONArray.parseArray(JSONObject.toJSONString(orderJson.get("detail")), OrderDetail.class); |
| | | boolean saveState = true; |
| | | //设置回滚点 |
| | | Object savePoint = TransactionAspectSupport.currentTransactionStatus().createSavepoint(); |
| | | //判断传入id参数是否为空,未传入id为空插入订单表,传入更新表 |
| | | if(order.getOrderId() == null){ |
| | | saveState = insertOrder(order,OrderDetails); |
| | | }else { |
| | | saveState = updateOrder(order,OrderDetails); |
| | | try{ |
| | | if(order.getOrderId() == null || order.getOrderId().isEmpty()){ |
| | | insertOrder(order,OrderDetails); |
| | | }else { |
| | | updateOrder(order,OrderDetails); |
| | | } |
| | | }catch (Exception e){ |
| | | TransactionAspectSupport.currentTransactionStatus().rollbackToSavepoint(savePoint); |
| | | //将异常传入数据库 |
| | | SysError sysError = new SysError(); |
| | | sysError.setError(e.toString()); |
| | | sysError.setFunc("saveOrder"); |
| | | sysErrorService.insert(sysError); |
| | | saveState = false; |
| | | |
| | | //throw new Exception(); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | return false; |
| | | return saveState; |
| | | } |
| | | @Transactional |
| | | public boolean insertOrder(Order order,List<OrderDetail> OrderDetails) { |
| | | //生成订单数据 |
| | | public void insertOrder(Order order,List<OrderDetail> OrderDetails) { |
| | | Integer maxOrderId = orderMapper.selectMaxOrderId(); |
| | | //查询订单id,并且自增 |
| | | String formattedNumber = String.format("%02d", maxOrderId+1); |
| | |
| | | Date currentDate = new Date(); |
| | | SimpleDateFormat dateFormat = new SimpleDateFormat("yyMMdd"); |
| | | String formattedDate = dateFormat.format(currentDate); |
| | | String orderId = "NG"+formattedDate+formattedNumber; |
| | | //往主表插数据 |
| | | order.setOrderId(orderId); |
| | | orderMapper.insert(order); |
| | | insertOtherDetail(orderId,OrderDetails); |
| | | |
| | | } |
| | | //修改订单数据,并且重新生成多个副表数据 |
| | | public void updateOrder(Order order,List<OrderDetail> OrderDetails) { |
| | | LambdaUpdateWrapper<Order> updateWrapper = new LambdaUpdateWrapper<>(); |
| | | updateWrapper.eq(Order::getOrderId, order.getOrderId()); |
| | | orderMapper.update(order,updateWrapper); |
| | | //删除订单明细表 |
| | | orderDetailMapper.delete(new LambdaQueryWrapper<OrderDetail>().eq(OrderDetail::getOrderId, order.getOrderId())); |
| | | //删除订单小片表 |
| | | orderGlassDetailMapper.delete(new LambdaQueryWrapper<OrderGlassDetail>().eq(OrderGlassDetail::getOrderId, order.getOrderId())); |
| | | //删除订单工艺表 |
| | | orderProcessDetailMapper.delete(new LambdaQueryWrapper<OrderProcessDetail>().eq(OrderProcessDetail::getOrderId, order.getOrderId())); |
| | | insertOtherDetail(order.getOrderId(),OrderDetails); |
| | | } |
| | | |
| | | |
| | | //插入其他副表数据,被其他方法引用 |
| | | public void insertOtherDetail(String orderId,List<OrderDetail> OrderDetails) { |
| | | //循环给订单明细表字段添加序号和周长 |
| | | for (int i = 0; i < OrderDetails.size(); i++) { |
| | | OrderDetails.get(i).setOrderNumber(i+1); |
| | | order.setOrderId(formattedDate); |
| | | OrderDetails.get(i).setPerimeter(OrderDetails.get(i).getWidth()*OrderDetails.get(i).getHeight()*2); |
| | | OrderDetails.get(i).setOrderId(orderId); |
| | | OrderDetails.get(i).setPerimeter(OrderDetails.get(i).getWidth()*OrderDetails.get(i).getHeight()*2/1000); |
| | | OrderDetails.get(i).setWeight(1.0); |
| | | } |
| | | //往明细表插数据 |
| | | orderDetailMapper.insertBatch(OrderDetails); |
| | | return false; |
| | | //修改订单主表面积与周长以及重量 |
| | | orderMapper.updateOrderParameter(orderId); |
| | | //往小片表传入产品数据 |
| | | orderGlassDetailMapper.insertOrderGlassDetail(orderId); |
| | | //查询订单小片表获取工艺传入小片工艺表 |
| | | List<OrderGlassDetail> orderGlassDetails = orderGlassDetailMapper.selectOrderGlassDetail(orderId); |
| | | List<OrderProcessDetail> orderProcessDetailList = getOrderProcessDetails(orderGlassDetails); |
| | | //赋值订单工艺表 |
| | | orderProcessDetailMapper.insertOrderProcessDetail(orderProcessDetailList); |
| | | } |
| | | |
| | | public boolean updateOrder(Order order,List<OrderDetail> OrderDetails) { |
| | | return false; |
| | | private static List<OrderProcessDetail> getOrderProcessDetails(List<OrderGlassDetail> orderGlassDetails) { |
| | | List<OrderProcessDetail> orderProcessDetailList = new ArrayList<>(); |
| | | for (OrderGlassDetail orderGlassDetail : orderGlassDetails) { |
| | | String[] processList = orderGlassDetail.getProcess().split("->"); |
| | | for (String process : processList) { |
| | | OrderProcessDetail orderProcessDetail = new OrderProcessDetail(); |
| | | orderProcessDetail.setOrderId(orderGlassDetail.getOrderId()); |
| | | orderProcessDetail.setOrderNumber(orderGlassDetail.getOrderNumber()); |
| | | orderProcessDetail.setTechnologyNumber(orderGlassDetail.getTechnologyNumber()); |
| | | orderProcessDetail.setProcess(process); |
| | | orderProcessDetailList.add(orderProcessDetail); |
| | | } |
| | | } |
| | | return orderProcessDetailList; |
| | | } |
| | | |
| | | //查询获取列表 |
| | | public Map<String,Object> getOrderList(Integer pageNum, Integer pageSize, List<LocalDate> selectDate, Order order,Integer orderType) { |
| | | Integer offset = (pageNum-1)*pageSize; |
| | | LocalDate endDate = LocalDate.now(); |
| | | LocalDate startDate = endDate.minusDays(15); |
| | | |
| | | if(selectDate == null && selectDate.size()==2){ |
| | | startDate = selectDate.get(0); |
| | | endDate = selectDate.get(1); |
| | | } |
| | | |
| | | Map<String,Object> map = new HashMap<>(); |
| | | map.put("data",orderMapper.getOrderList(offset, pageSize, startDate, endDate, order,orderType)); |
| | | map.put("total",orderMapper.getPageTotal(offset, pageSize, startDate, endDate, order,orderType)); |
| | | map.put("startDate",startDate); |
| | | map.put("endDate",endDate); |
| | | return map; |
| | | } |
| | | } |
New file |
| | |
| | | package com.example.erp.service.userInfo; |
| | | |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.example.erp.entity.userInfo.SysError; |
| | | import com.example.erp.mapper.userInfo.SysErrorMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service |
| | | @DS("user_info") |
| | | public class SysErrorService { |
| | | private final SysErrorMapper sysErrorMapper; |
| | | |
| | | public SysErrorService(SysErrorMapper sysErrorMapper) { |
| | | this.sysErrorMapper = sysErrorMapper; |
| | | } |
| | | |
| | | public void insert(SysError sysError) { |
| | | sysErrorMapper.saveError(sysError); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.example.erp.mapper.sd.CustomerMapper"> |
| | | <select id="getCustomerList"> |
| | | select |
| | | * |
| | | from |
| | | customer |
| | | </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.sd.OrderGlassDetailMapper"> |
| | | |
| | | <insert id="insertOrderGlassDetail" parameterType="java.lang.String"> |
| | | insert into |
| | | order_glass_detail ( |
| | | order_id, order_number, |
| | | technology_number, |
| | | glass_address, |
| | | glass_child, |
| | | child_width, |
| | | child_height, |
| | | process, |
| | | `group`) |
| | | select |
| | | od.order_id, |
| | | od.order_number, |
| | | pd.glass_sort, |
| | | if(pd.glass_sort=1,'(外)',if(pd2.glass_sort=pd.glass_sort,'(内)','')), |
| | | pd.detail, |
| | | od.width, |
| | | od.height, |
| | | pd.process, |
| | | pd.glass_group |
| | | from sd.product_detail as pd |
| | | left join order_detail as od |
| | | on od.product_id = pd.prod_id and pd.detail_type='glass' |
| | | LEFT JOIN (SELECT max(id) as id ,max(glass_sort) as glass_sort from product_detail GROUP BY prod_id)as pd2 |
| | | on pd2.id=pd.id |
| | | |
| | | where od.order_id = #{orderId} |
| | | ORDER BY od.order_number |
| | | </insert> |
| | | |
| | | <select id="selectOrderGlassDetail"> |
| | | select * from order_glass_detail where order_id = #{orderId} |
| | | </select> |
| | | </mapper> |
| | |
| | | from |
| | | `order` as a |
| | | where |
| | | a.create_time = curdate() |
| | | date(a.create_time) = curdate() |
| | | </select> |
| | | |
| | | |
| | | <update id="updateOrderParameter"> |
| | | update `order` o |
| | | left join |
| | | (select a.order_id,sum(a.perimeter) as aa,sum(a.quantity) as b,sum(a.compute_gross_area) as c |
| | | from sd.order_detail as a group by a.order_id) od |
| | | on o.order_id = od.order_id |
| | | set |
| | | o.quantity = od.b, |
| | | o.area = od.c, |
| | | o.perimeter= od.aa |
| | | where |
| | | o.order_id = #{orderId} |
| | | |
| | | </update> |
| | | |
| | | <select id="getOrderList"> |
| | | select |
| | | * |
| | | from |
| | | `order` as o |
| | | where o.create_time>=#{startDate} and o.create_time <= #{endDate} |
| | | |
| | | <if test="orderType!= null and orderType != ''"> |
| | | and o.create_order = #{orderType} |
| | | </if> |
| | | |
| | | <if test="order.orderId != null and order.orderId != ''"> |
| | | and o.order_id REGEXP #{order.orderId} |
| | | </if> |
| | | |
| | | <if test="order.customerId != null and order.customerId != ''"> |
| | | and o.customer_id REGEXP #{customerId} |
| | | </if> |
| | | <if test="order.customerName != null and order.customerName != ''"> |
| | | and o.customer_name REGEXP #{customerName} |
| | | </if> |
| | | <if test="order.project != null and order.project != ''"> |
| | | and o.project REGEXP #{order.project} |
| | | </if> |
| | | <if test="order.batch != null and order.batch != ''"> |
| | | and o.batch REGEXP #{order.batch} |
| | | </if> |
| | | <if test="order.quantity != null and order.quantity != ''"> |
| | | and o.quantity REGEXP #{order.quantity} |
| | | </if> |
| | | |
| | | <if test="order.area != null and order.area != ''"> |
| | | and o.area REGEXP #{order.area} |
| | | </if> |
| | | <if test="order.createTime != null and order.createTime != ''"> |
| | | and date(o.create_time) = #{order.createTime} |
| | | </if> |
| | | <if test="order.packType != null and order.packType != ''"> |
| | | and o.pack_type REGEXP #{order.packType} |
| | | </if> |
| | | <if test="order.orderType != null and order.orderType != ''"> |
| | | and o.order_type REGEXP #{order.orderType} |
| | | </if> |
| | | <if test="order.salesman != null and order.salesman != ''"> |
| | | and o.salesman REGEXP #{order.salesman} |
| | | </if> |
| | | |
| | | <if test="order.perimeter != null and order.perimeter != ''"> |
| | | and o.perimeter REGEXP #{order.perimeter} |
| | | </if> |
| | | <if test="order.deliveryDate != null and order.deliveryDate != ''"> |
| | | and o.delivery_date REGEXP #{order.deliveryDate} |
| | | </if> |
| | | <if test="order.customerBatch != null and order.customerBatch != ''"> |
| | | and o.customer_batch REGEXP #{order.customerBatch} |
| | | </if> |
| | | <if test="order.otherRemarks != null and order.otherRemarks != ''"> |
| | | and o.other_remarks REGEXP #{order.otherRemarks} |
| | | </if> |
| | | <if test="order.deliveryAddress != null and order.deliveryAddress != ''"> |
| | | and o.delivery_address REGEXP #{order.deliveryAddress} |
| | | </if> |
| | | |
| | | order by o.id desc |
| | | limit #{offset},#{pageSize} |
| | | </select> |
| | | |
| | | <select id="getPageTotal"> |
| | | select |
| | | CEILING(count(o.id)/#{pageSize}) |
| | | from |
| | | `order` as o |
| | | where o.create_time>=#{startDate} and o.create_time <= #{endDate} |
| | | <if test="orderType!= null and orderType != ''"> |
| | | and o.create_order = #{orderType} |
| | | </if> |
| | | |
| | | <if test="order.orderId != null and order.orderId != ''"> |
| | | and o.order_id REGEXP #{order.orderId} |
| | | </if> |
| | | |
| | | <if test="order.customerId != null and order.customerId != ''"> |
| | | and o.customer_id REGEXP #{customerId} |
| | | </if> |
| | | <if test="order.customerName != null and order.customerName != ''"> |
| | | and o.customer_name REGEXP #{customerName} |
| | | </if> |
| | | <if test="order.project != null and order.project != ''"> |
| | | and o.project REGEXP #{order.project} |
| | | </if> |
| | | <if test="order.batch != null and order.batch != ''"> |
| | | and o.batch REGEXP #{order.batch} |
| | | </if> |
| | | <if test="order.quantity != null and order.quantity != ''"> |
| | | and o.quantity REGEXP #{order.quantity} |
| | | </if> |
| | | |
| | | <if test="order.area != null and order.area != ''"> |
| | | and o.area REGEXP #{order.area} |
| | | </if> |
| | | <if test="order.createTime != null and order.createTime != ''"> |
| | | and date(o.create_time) = #{order.createTime} |
| | | </if> |
| | | <if test="order.packType != null and order.packType != ''"> |
| | | and o.pack_type REGEXP #{order.packType} |
| | | </if> |
| | | <if test="order.orderType != null and order.orderType != ''"> |
| | | and o.order_type REGEXP #{order.orderType} |
| | | </if> |
| | | <if test="order.salesman != null and order.salesman != ''"> |
| | | and o.salesman REGEXP #{order.salesman} |
| | | </if> |
| | | |
| | | <if test="order.perimeter != null and order.perimeter != ''"> |
| | | and o.perimeter REGEXP #{order.perimeter} |
| | | </if> |
| | | <if test="order.deliveryDate != null and order.deliveryDate != ''"> |
| | | and o.delivery_date REGEXP #{order.deliveryDate} |
| | | </if> |
| | | <if test="order.customerBatch != null and order.customerBatch != ''"> |
| | | and o.customer_batch REGEXP #{order.customerBatch} |
| | | </if> |
| | | <if test="order.otherRemarks != null and order.otherRemarks != ''"> |
| | | and o.other_remarks REGEXP #{order.otherRemarks} |
| | | </if> |
| | | <if test="order.deliveryAddress != null and order.deliveryAddress != ''"> |
| | | and o.delivery_address REGEXP #{order.deliveryAddress} |
| | | </if> |
| | | |
| | | order by o.id desc |
| | | limit #{offset},#{pageSize} |
| | | </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.sd.OrderProcessDetailMapper"> |
| | | |
| | | <insert id="insertOrderProcessDetail" > |
| | | insert into |
| | | order_process_detail( |
| | | order_id, |
| | | order_number, |
| | | technology_number, |
| | | process |
| | | ) |
| | | values |
| | | <foreach collection ="processDetailList" item="processDetail" separator =","> |
| | | ( |
| | | #{processDetail.orderId}, |
| | | #{processDetail.orderNumber}, |
| | | #{processDetail.technologyNumber}, |
| | | #{processDetail.process} |
| | | ) |
| | | </foreach> |
| | | |
| | | |
| | | </insert> |
| | | |
| | | </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.sd.ProductDetailMapper"> |
| | | <select id="getGlassDetailList"> |
| | | select * from product_detail where prod_id = #{productId} and detail_type = 'glass' |
| | | </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.userInfo.SysErrorMapper"> |
| | | <insert id="saveError"> |
| | | insert into erp_user_info.sys_error( func, error) |
| | | values |
| | | (#{sysError.func}, #{sysError.error}) |
| | | </insert> |
| | | |
| | | </mapper> |
| | |
| | | package com.example.erp.service.sd; |
| | | |
| | | import com.example.erp.entity.sd.Order; |
| | | import org.junit.jupiter.api.Test; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.boot.test.context.SpringBootTest; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import static org.junit.jupiter.api.Assertions.*; |
| | |
| | | |
| | | @Test |
| | | void testCreateOrder() { |
| | | Map<String, Object> order =new HashMap<>(); |
| | | |
| | | //orderService.saveOrder(); |
| | | List<LocalDate> a = new ArrayList<>(); |
| | | a.add(LocalDate.now().minusDays(15)); |
| | | a.add(LocalDate.now().plusDays(1)); |
| | | Order order = new Order(); |
| | | orderService.getOrderList(1,100,a,order,null); |
| | | } |
| | | |
| | | } |
| | |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | |
| | | <mapper namespace="com.example.erp.mapper.mm.FinishedGoodsInventoryMapper"> |
| | | <!--映射成品库存--> |
| | | <!--映射成品库存--> |
| | | <resultMap id="selectFinishedGoodsInventory" type="com.example.erp.entity.mm.FinishedGoodsInventory"> |
| | | <id column="fid" property="id"/> |
| | | <result column="inventory" property="inventory"/> |
| | |
| | | <result column="product_id" property="orderDetail.productId"/> |
| | | |
| | | </resultMap> |
| | | <!--映射成品入库--> |
| | | <!--映射成品入库--> |
| | | <resultMap id="selectFlowCard" type="com.example.erp.entity.pp.FlowCard"> |
| | | <id column="id" property="id"/> |
| | | <result column="order_number" property="orderNumber"/> |
| | |
| | | <result column="quantity" property="orderDetail.quantity"/> |
| | | </resultMap> |
| | | |
| | | <!--映射成品出库--> |
| | | <!--映射成品出库--> |
| | | <resultMap id="selectDelivery" type="com.example.erp.entity.sd.OrderDetail"> |
| | | <id column="id" property="id"/> |
| | | <result column="building_number" property="buildingNumber"/> |
| | |
| | | |
| | | </resultMap> |
| | | |
| | | <!--映射订单调拨--> |
| | | <!--映射订单调拨--> |
| | | <resultMap id="selectDeliveryFinishedGoodsInventory" type="com.example.erp.entity.sd.OrderDetail"> |
| | | |
| | | <result column="width" property="width"/> |
New file |
| | |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.example.erp.mapper.sd.CustomerMapper"> |
| | | <select id="getCustomerList"> |
| | | select |
| | | * |
| | | from |
| | | customer |
| | | </select> |
| | | </mapper> |
| | |
| | | from |
| | | `order` as a |
| | | where |
| | | a.create_time = curdate() |
| | | date(a.create_time) = curdate() |
| | | </select> |
| | | |
| | | |
| | | <update id="updateOrderParameter"> |
| | | update `order` o |
| | | left join |
| | | (select a.order_id,sum(a.perimeter) as aa,sum(a.quantity) as b,sum(a.compute_gross_area) as c |
| | | from sd.order_detail as a group by a.order_id) od |
| | | on o.order_id = od.order_id |
| | | set |
| | | o.quantity = od.b, |
| | | o.area = od.c, |
| | | o.perimeter= od.aa |
| | | where |
| | | o.order_id = #{orderId} |
| | | |
| | | </update> |
| | | |
| | | <select id="getOrderList"> |
| | | select |
| | | * |
| | | from |
| | | `order` as o |
| | | where o.create_time>=#{startDate} and o.create_time <= #{endDate} |
| | | |
| | | <if test="orderType!= null and orderType != ''"> |
| | | and o.create_order = #{orderType} |
| | | </if> |
| | | |
| | | <if test="order.orderId != null and order.orderId != ''"> |
| | | and o.order_id REGEXP #{order.orderId} |
| | | </if> |
| | | |
| | | <if test="order.customerId != null and order.customerId != ''"> |
| | | and o.customer_id REGEXP #{customerId} |
| | | </if> |
| | | <if test="order.customerName != null and order.customerName != ''"> |
| | | and o.customer_name REGEXP #{customerName} |
| | | </if> |
| | | <if test="order.project != null and order.project != ''"> |
| | | and o.project REGEXP #{order.project} |
| | | </if> |
| | | <if test="order.batch != null and order.batch != ''"> |
| | | and o.batch REGEXP #{order.batch} |
| | | </if> |
| | | <if test="order.quantity != null and order.quantity != ''"> |
| | | and o.quantity REGEXP #{order.quantity} |
| | | </if> |
| | | |
| | | <if test="order.area != null and order.area != ''"> |
| | | and o.area REGEXP #{order.area} |
| | | </if> |
| | | <if test="order.createTime != null and order.createTime != ''"> |
| | | and date(o.create_time) = #{order.createTime} |
| | | </if> |
| | | <if test="order.packType != null and order.packType != ''"> |
| | | and o.pack_type REGEXP #{order.packType} |
| | | </if> |
| | | <if test="order.orderType != null and order.orderType != ''"> |
| | | and o.order_type REGEXP #{order.orderType} |
| | | </if> |
| | | <if test="order.salesman != null and order.salesman != ''"> |
| | | and o.salesman REGEXP #{order.salesman} |
| | | </if> |
| | | |
| | | <if test="order.perimeter != null and order.perimeter != ''"> |
| | | and o.perimeter REGEXP #{order.perimeter} |
| | | </if> |
| | | <if test="order.deliveryDate != null and order.deliveryDate != ''"> |
| | | and o.delivery_date REGEXP #{order.deliveryDate} |
| | | </if> |
| | | <if test="order.customerBatch != null and order.customerBatch != ''"> |
| | | and o.customer_batch REGEXP #{order.customerBatch} |
| | | </if> |
| | | <if test="order.otherRemarks != null and order.otherRemarks != ''"> |
| | | and o.other_remarks REGEXP #{order.otherRemarks} |
| | | </if> |
| | | <if test="order.deliveryAddress != null and order.deliveryAddress != ''"> |
| | | and o.delivery_address REGEXP #{order.deliveryAddress} |
| | | </if> |
| | | |
| | | order by o.id desc |
| | | limit #{offset},#{pageSize} |
| | | </select> |
| | | |
| | | <select id="getPageTotal"> |
| | | select |
| | | CEILING(count(o.id)/#{pageSize}) |
| | | from |
| | | `order` as o |
| | | where o.create_time>=#{startDate} and o.create_time <= #{endDate} |
| | | <if test="orderType!= null and orderType != ''"> |
| | | and o.create_order = #{orderType} |
| | | </if> |
| | | |
| | | <if test="order.orderId != null and order.orderId != ''"> |
| | | and o.order_id REGEXP #{order.orderId} |
| | | </if> |
| | | |
| | | <if test="order.customerId != null and order.customerId != ''"> |
| | | and o.customer_id REGEXP #{customerId} |
| | | </if> |
| | | <if test="order.customerName != null and order.customerName != ''"> |
| | | and o.customer_name REGEXP #{customerName} |
| | | </if> |
| | | <if test="order.project != null and order.project != ''"> |
| | | and o.project REGEXP #{order.project} |
| | | </if> |
| | | <if test="order.batch != null and order.batch != ''"> |
| | | and o.batch REGEXP #{order.batch} |
| | | </if> |
| | | <if test="order.quantity != null and order.quantity != ''"> |
| | | and o.quantity REGEXP #{order.quantity} |
| | | </if> |
| | | |
| | | <if test="order.area != null and order.area != ''"> |
| | | and o.area REGEXP #{order.area} |
| | | </if> |
| | | <if test="order.createTime != null and order.createTime != ''"> |
| | | and date(o.create_time) = #{order.createTime} |
| | | </if> |
| | | <if test="order.packType != null and order.packType != ''"> |
| | | and o.pack_type REGEXP #{order.packType} |
| | | </if> |
| | | <if test="order.orderType != null and order.orderType != ''"> |
| | | and o.order_type REGEXP #{order.orderType} |
| | | </if> |
| | | <if test="order.salesman != null and order.salesman != ''"> |
| | | and o.salesman REGEXP #{order.salesman} |
| | | </if> |
| | | |
| | | <if test="order.perimeter != null and order.perimeter != ''"> |
| | | and o.perimeter REGEXP #{order.perimeter} |
| | | </if> |
| | | <if test="order.deliveryDate != null and order.deliveryDate != ''"> |
| | | and o.delivery_date REGEXP #{order.deliveryDate} |
| | | </if> |
| | | <if test="order.customerBatch != null and order.customerBatch != ''"> |
| | | and o.customer_batch REGEXP #{order.customerBatch} |
| | | </if> |
| | | <if test="order.otherRemarks != null and order.otherRemarks != ''"> |
| | | and o.other_remarks REGEXP #{order.otherRemarks} |
| | | </if> |
| | | <if test="order.deliveryAddress != null and order.deliveryAddress != ''"> |
| | | and o.delivery_address REGEXP #{order.deliveryAddress} |
| | | </if> |
| | | |
| | | order by o.id desc |
| | | limit #{offset},#{pageSize} |
| | | </select> |
| | | |
| | | </mapper> |