Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override
# Conflicts:
# north-glass-erp/target/classes/mapper/mm/FinishedGoodsInventory.xml
流程卡管理查询代码
| | |
| | | <option name="url" value="https://repo.maven.apache.org/maven2" /> |
| | | </remote-repository> |
| | | <remote-repository> |
| | | <option name="id" value="central" /> |
| | | <option name="name" value="Central Repository" /> |
| | | <option name="url" value="https://maven.aliyun.com/repository/public/" /> |
| | | </remote-repository> |
| | | <remote-repository> |
| | | <option name="id" value="nexus-aliyun" /> |
| | | <option name="name" value="nexus-aliyun" /> |
| | | <option name="url" value="http://maven.aliyun.com/nexus/content/groups/public/" /> |
| | |
| | | <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 {reactive, ref} from "vue"; |
| | | import {useRouter} from 'vue-router' |
| | | import request from "@/utils/request"; |
| | | import deepClone from "@/utils/deepClone"; |
| | | import request from "@/utils/request" |
| | | import deepClone from "@/utils/deepClone" |
| | | import VXETable from "vxe-table"; |
| | | import useUserInfoStore from "@/stores/userInfo"; |
| | | import {ElMessage} from "element-plus"; |
| | | |
| | | const userStore = useUserInfoStore() |
| | | const username = userStore.user.userName |
| | | const userid = userStore.user.userId |
| | | let router=useRouter() |
| | | let produceList = ref([]) |
| | | let tableRef = ref([]) |
| | |
| | | const xGrid = ref(); |
| | | const storageRegion = ref(null); |
| | | const remark = ref(null); |
| | | const flowcard = ref(null); |
| | | |
| | | const gridEvents = { |
| | | toolbarButtonClick ({ code }) { |
| | | const $grid = xGrid.value |
| | | if ($grid) { |
| | | switch (code) { |
| | | case 'add': { |
| | | //判断输入框值不能为null |
| | | if(storageRegion.value!==null && storageRegion.value!=""){ |
| | | const $table = xGrid.value |
| | | if ($table) { |
| | | const selectRecords = $table.getCheckboxRecords() |
| | | //循环获取选中的复选框 |
| | | for (let i=0;i<selectRecords.length;i++){ |
| | | //定义后端需要的参数 |
| | | |
| | | let flowData = ref({ |
| | | finishedGoodsInventory:{ |
| | | userId:userid, |
| | | userName:username, |
| | | storageRegion:storageRegion.value, |
| | | remark:remark.value |
| | | }, |
| | | |
| | | flowcard:selectRecords[0] |
| | | remark:remark.value, |
| | | flowcard:selectRecords |
| | | }) |
| | | console.log(flowcard.value) |
| | | |
| | | console.log(flowData.value) |
| | | request.post("/FinishedGoodsInventory/addseletwarehousing",flowData.value).then((res) => { |
| | | /* request.post("/FinishedGoodsInventory/addseletwarehousing/"+storageRegion.value+"/"+remark.value,flowData.value).then((res) => {*/ |
| | | if(res.code===200){ |
| | | alert(`入库成功`) |
| | | request.post("/FinishedGoodsInventory/getseletwarehousing/1/100",filterData.value).then((res) => { |
| | | if(res.code==200){ |
| | | ElMessage.success("入库成功") |
| | | location.reload(); |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | |
| | | if(res.code===200){ |
| | | console.log(res.data) |
| | | pageTotal.value=res.data.total |
| | | pageNum=1 |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | return; |
| | | |
| | | |
| | | }else{ |
| | | alert(`请输入库位`) |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | |
| | | import {reactive, ref} from "vue"; |
| | | import {useRouter} from 'vue-router' |
| | | import request from "@/utils/request"; |
| | | import deepClone from "@/utils/deepClone"; |
| | | import useUserInfoStore from "@/stores/userInfo"; |
| | | import {ElMessage} from "element-plus"; |
| | | |
| | | const userStore = useUserInfoStore() |
| | | const username = userStore.user.userName |
| | | const userid = userStore.user.userId |
| | | let router=useRouter() |
| | | let produceList = ref([]) |
| | | |
| | | const getTableRow = (row,type) =>{ |
| | | switch (type) { |
| | | // case 'edit' :{ |
| | | // //alert('我接收到子组件传送的编辑信息') |
| | | // router.push({path: '/main/productStock/OrderAllocation', query: { id: row.id }}) |
| | | // break |
| | | // } |
| | | // case 'back':{ |
| | | // router.push({path: '/main/productStock/FinishedProductRework', query: { id: row.id }}) |
| | | // break |
| | | // } |
| | | // case 'out' :{ |
| | | // //alert('我接收到子组件传送的编辑信息') |
| | | // router.push({path: '/main/productStock/FinishedGoodsIssue', query: { id: row.id }}) |
| | | // break |
| | | // } |
| | | |
| | | } |
| | | } |
| | | let operateType = ref(null) |
| | | let remarks = ref(null) |
| | | const xGrid = ref(); |
| | | const gridEvents = { |
| | | toolbarButtonClick({ code }) { |
| | |
| | | if($grid){ |
| | | switch (code){ |
| | | case 'verify':{ |
| | | alert('我接收到子组件传送的编辑信息') |
| | | // router.push({path: '/main/productStock/OrderAllocation'}); |
| | | // return; |
| | | break |
| | | const $table = xGrid.value |
| | | if ($table) { |
| | | const selectRecords = $table.getCheckboxRecords() |
| | | console.log(selectRecords) |
| | | |
| | | let flowData = ref({ |
| | | |
| | | userId:userid, |
| | | userName:username, |
| | | operateType:operateType, |
| | | remarks:remarks, |
| | | orderDetail:selectRecords |
| | | |
| | | }) |
| | | request.post("/FinishedGoodsInventory/updateFinishedGoodsInventoryTakeOut",flowData.value).then((res) => { |
| | | if(res.code==200){ |
| | | location.reload(); |
| | | ElMessage.success("领出成功") |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | return |
| | | } |
| | | case 'out':{ |
| | | router.push({path: '/main/productStock/TakeOutRecord'}); |
| | | return; |
| | | break; |
| | | return |
| | | } |
| | | case 'rework':{ |
| | | router.push({path: '/main/productStock/FinishedProductRework'}); |
| | | return; |
| | | break; |
| | | return |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | |
| | | const hasDecimal=(value)=>{ |
| | | const regex=/\./ // 定义正则表达式,查找小数点 |
| | | return regex.test(value) //返回true/false |
| | | } |
| | | |
| | | const hasDecimalhtml=(item,row)=>{ |
| | | let aa=item.split('.').length |
| | | if (aa===2){ |
| | | return row[item.split('.')[0]][item.split('.')[1]] |
| | | }else if(aa===3){ |
| | | return row[item.split('.')[0]][item.split('.')[1]][item.split('.')[2]] |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | //筛选条件,有外键需要先定义明细里面的数据 |
| | | let filterData = ref({ |
| | | finishedGoodsInventory:{ |
| | | orderNumber:'', |
| | | orderId:'', |
| | | quantityAvailable:'', |
| | | actualSignalArea:'', |
| | | area:'', |
| | | storageRegion:'' |
| | | }, |
| | | order:{ |
| | | project:'', |
| | | customerId:'', |
| | | customerName:'' |
| | | |
| | | } |
| | | }) |
| | | let takeOut = ref(null) |
| | | //第一次调用 |
| | | request.post("/FinishedGoodsInventory/getSelectAllocate/1/100",filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | console.log(res.data) |
| | | pageTotal.value=res.data.total |
| | | takeOut.value=res.data.type |
| | | |
| | | pageNum=1 |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | |
| | | |
| | | //定义页面总页数 |
| | | let pageTotal=ref('') |
| | | //定义当前页数 |
| | | let pageNum=$ref(1) |
| | | let pageState = null |
| | | |
| | | /*使用筛选,后端获取数据*/ |
| | | 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 |
| | | } |
| | | request.post("/FinishedGoodsInventory/getSelectAllocate/1/100",filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | console.log(res.data) |
| | | pageTotal.value=res.data.total |
| | | pageNum=1 |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | //子组件接收参数 |
| | |
| | | columns:[ |
| | | {type:'expand',fixed:"left",slots: { content:'content' },width: '50'}, |
| | | { type: 'checkbox',fixed:"left", title: '选择', width: '80' }, |
| | | // { type: 'seq',fixed:"left", title: '自序', width: '80' }, |
| | | // {title: '操作', width: '220', slots: { default: 'button_slot' },fixed:"left"}, |
| | | {field: 'SalesOrderNumber', width: '150',title: '销售单号', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'ProjectName', width: '120',title: '项目名称', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'ProcessCardNumber',width: '100', title: '流程卡号', sortable: true,showOverflow:"ellipsis"}, |
| | | {field: 'FinishedProductNumber', width: '100',title: '成品编号', sortable: true}, |
| | | {field: 'Quantity',width: '140', title: '数量', sortable: true}, |
| | | {field: 'DiaoQuantity',width: '140', title: '领出数量',editRender: { name: 'input', attrs: { placeholder: '' } }, sortable: true}, |
| | | {field: 'ProductNumber',width: '100', title: '产品编号', sortable: true}, |
| | | {field: 'CustomerNumber', width: '100',title: '客户编号', sortable: true}, |
| | | {field: 'CustomerName',width: '100', title: '客户名称', sortable: true}, |
| | | {field: 'Length', width: '100',title: '长度', sortable: true}, |
| | | {field: 'Width',width: '100', title: '宽度', sortable: true}, |
| | | {field: 'Thickness', width: '100',title: '厚度', sortable: true}, |
| | | {field: 'SingleArea',width: '140', title: '单片面积', sortable: true}, |
| | | {field: 'TotalArea',width: '100', title: '总面积', sortable: true}, |
| | | {field: 'StorageArea',width: '100', title: '库区', sortable: true}, |
| | | {field: 'Location',width: '100', title: '库位', sortable: true}, |
| | | { type: 'seq',fixed:"left", title: '自序', width: '80' }, |
| | | {field: 'finishedGoodsInventory.orderId', width: '150',title: '销售单号',showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'order.project', width: '150',title: '项目名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'productId',width: '150', title: '产品编号', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'productName', width: '150',title: '产品名称', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'finishedGoodsInventory.quantityAvailable',width: '140', title: '数量', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'quantity',width: '140', title: '领出数量',editRender: { name: 'input', attrs: { placeholder: '' } }}, |
| | | {field: 'order.customerId', width: '100',title: '客户编号', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'order.customerName',width: '150', title: '客户名称', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'width', width: '100',title: '长度', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'height',width: '100', title: '宽度', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'finishedGoodsInventory.actualSignalArea',width: '140', title: '单片面积', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'finishedGoodsInventory.area',width: '150', title: '总面积', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'finishedGoodsInventory.storageRegion',width: '100', title: '库存区域', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | ],//表头按钮 |
| | | toolbarConfig: { |
| | | buttons: [{ |
| | |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | | data: [ |
| | | { |
| | | "SalesOrderNumber": "NG23072003", |
| | | "ProjectName": "钢化玻璃", |
| | | "ProcessCardNumber": "NG23072003A01", |
| | | 'FinishedProductNumber':'', |
| | | 'FinishedProductName':'', |
| | | 'BoxNumber':'', |
| | | "CustomerNumber": "KD0071", |
| | | "CustomerName": "件", |
| | | "Length": "1075.00", |
| | | "Width": "440.00", |
| | | "Thickness": "3.00", |
| | | "Quantity": "360", |
| | | "SingleArea": "0.473000", |
| | | "TotalArea": "170.28", |
| | | "StorageArea": "0.47", |
| | | "Location": "170.28", |
| | | },{ |
| | | "SalesOrderNumber": "NG23072003", |
| | | "ProjectName": "钢化玻璃", |
| | | "ProcessCardNumber": "NG23072003A01", |
| | | 'FinishedProductNumber':'', |
| | | 'FinishedProductName':'', |
| | | 'BoxNumber':'', |
| | | "CustomerNumber": "KD0071", |
| | | "CustomerName": "件", |
| | | "Length": "1075.00", |
| | | "Width": "440.00", |
| | | "Thickness": "3.00", |
| | | "Quantity": "360", |
| | | "SingleArea": "0.473000", |
| | | "TotalArea": "170.28", |
| | | "StorageArea": "0.47", |
| | | "Location": "170.28", |
| | | },{ |
| | | "SalesOrderNumber": "NG23072003", |
| | | "ProjectName": "钢化玻璃", |
| | | "ProcessCardNumber": "NG23072003A01", |
| | | 'FinishedProductNumber':'', |
| | | 'FinishedProductName':'', |
| | | 'BoxNumber':'', |
| | | "CustomerNumber": "KD0071", |
| | | "CustomerName": "件", |
| | | "Length": "1075.00", |
| | | "Width": "440.00", |
| | | "Thickness": "3.00", |
| | | "Quantity": "360", |
| | | "SingleArea": "0.473000", |
| | | "TotalArea": "170.28", |
| | | "StorageArea": "0.47", |
| | | "Location": "170.28", |
| | | }, |
| | | |
| | | ],//table body实际数据 |
| | | footerMethod ({ columns, data }) {//页脚函数 |
| | | return[ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return '合计:' |
| | | return `页数:${pageNum}/${pageTotal.value}` |
| | | } |
| | | // if (props.tableProp.footList.includes(column.field)) { |
| | | // return sumNum(data, column.field) |
| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | | <div class="main-div-customer"> |
| | | <vxe-select v-model="operateType" placeholder="请选择领出类型"> |
| | | <vxe-option v-for="(item,index) in takeOut" :key="index" :value="item.operateTypeName" :label="item.operateTypeName" ></vxe-option> |
| | | </vxe-select> |
| | | |
| | | <vxe-input v-model="remarks" placeholder="备注"></vxe-input> |
| | | |
| | | <vxe-grid |
| | | max-height="100%" |
| | | @filter-change="filterChanged" |
| | |
| | | <ul class="expand-wrapper"> |
| | | <li v-for="(item,index) in gridOptions.columns" v-show="item.field!=undefined "> |
| | | <span style="font-weight: bold">{{item.title+': '}}</span> |
| | | <span>{{ row[item.field] }}</span> |
| | | <span v-if="hasDecimal(item.field)">{{ hasDecimalhtml(item.field,row) }}</span> |
| | | <span v-else>{{ row[item.field] }}</span> |
| | | </li> |
| | | </ul> |
| | | </template> |
| | |
| | | |
| | | import {reactive, ref} from "vue"; |
| | | import {useRouter} from 'vue-router' |
| | | import request from "@/utils/request" |
| | | import deepClone from "@/utils/deepClone" |
| | | import useUserInfoStore from "@/stores/userInfo"; |
| | | import {ElMessage} from "element-plus"; |
| | | |
| | | const userStore = useUserInfoStore() |
| | | const username = userStore.user.userName |
| | | const userid = userStore.user.userId |
| | | let router=useRouter() |
| | | let produceList = ref([]) |
| | | //定义页面总页数 |
| | | let pageTotal=ref('') |
| | | //定义当前页数 |
| | | let pageNum=$ref(1) |
| | | const getTableRow = (row,type) =>{ |
| | | switch (type) { |
| | | case 'edit' :{ |
| | |
| | | } |
| | | } |
| | | |
| | | const xGrid = ref(); |
| | | const gridEvents = { |
| | | toolbarButtonClick({ code }) { |
| | | const $grid = xGrid.value |
| | | if($grid){ |
| | | switch (code){ |
| | | case 'ver':{ |
| | | alert('我接收到子组件传送的编辑信息') |
| | | // router.push({path: '/main/productStock/OrderAllocation'}); |
| | | // return; |
| | | break |
| | | |
| | | const hasDecimal=(value)=>{ |
| | | const regex=/\./ // 定义正则表达式,查找小数点 |
| | | return regex.test(value) //返回true/false |
| | | } |
| | | case 'record':{ |
| | | router.push({path: '/main/productStock/TransferRecord'}); |
| | | return; |
| | | break; |
| | | |
| | | const hasDecimalhtml=(item,row)=>{ |
| | | let aa=item.split('.').length |
| | | if (aa===2){ |
| | | return row[item.split('.')[0]][item.split('.')[1]] |
| | | }else if(aa===3){ |
| | | return row[item.split('.')[0]][item.split('.')[1]][item.split('.')[2]] |
| | | } |
| | | case 'rework':{ |
| | | router.push({path: '/main/productStock/FinishedProductRework'}); |
| | | return; |
| | | break; |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | //筛选条件,有外键需要先定义明细里面的数据 |
| | | let filterData = ref({ |
| | | deliveryDetail:{ |
| | | orderNumber:'', |
| | | deliveryId:'', |
| | | deliveryNumber:'', |
| | | deliveryDetailRemakes:'', |
| | | orderId:'', |
| | | createTime:'' |
| | | }, |
| | | order:{ |
| | | project:'' |
| | | |
| | | }, |
| | | delivery:{ |
| | | creator:'', |
| | | customerName:'', |
| | | quantity:'', |
| | | area:'' |
| | | |
| | | } |
| | | }) |
| | | |
| | | |
| | | |
| | | //第一次调用 |
| | | request.post("/FinishedGoodsInventory/getseletdeliveryDetail/1/100",filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | console.log(res.data) |
| | | pageTotal.value=res.data.total |
| | | pageNum=1 |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | |
| | | |
| | | |
| | | /*使用筛选,后端获取数据*/ |
| | | 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 |
| | | } |
| | | request.post("/FinishedGoodsInventory/getseletdeliveryDetail/1/100",filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | console.log(res.data) |
| | | pageTotal.value=res.data.total |
| | | pageNum=1 |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | |
| | | showStatus: true |
| | | },//表头参数 |
| | | columns:[ |
| | | {type:'expand',fixed:"left",slots: { content:'content' },width: '50'}, |
| | | {type:'expand',fixed:"left",slots: { content:'content' },width: '60'}, |
| | | { type: 'checkbox',fixed:"left", title: '选择', width: '80' }, |
| | | { type: 'seq',fixed:"left", title: '自序', width: '80' }, |
| | | {title: '操作', width: '80', slots: { default: 'button_slot' },fixed:"left"}, |
| | | {field: 'DeliveryOrderNumber', width:'150', title: '送货单号', sortable: true,editRender: { name: 'input', attrs: { placeholder: '' } } }, |
| | | {field: 'SalesOrderNumber', width: '150',title: '销售单号', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'ProjectName', width: '120',title: '项目名称', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'ProductName', width: '100',title: '成品名称', sortable: true}, |
| | | {field: 'ProductNumber',width: '100', title: '成品编号', sortable: true}, |
| | | {field: 'CustomerName',width: '100', title: '客户名称', sortable: true}, |
| | | {field: 'Length', width: '100',title: '长度', sortable: true}, |
| | | {field: 'Width',width: '100', title: '宽度', sortable: true}, |
| | | {field: 'Thickness', width: '100',title: '厚度', sortable: true}, |
| | | {field: 'TotalQuantity',width: '140', title: '总数量', sortable: true}, |
| | | {field: 'TotalArea',width: '100', title: '总面积', sortable: true}, |
| | | {field: 'FloorNumber',width: '100', title: '楼层编号', sortable: true}, |
| | | {field: 'OrderNumber',width: '100', title: '订序', sortable: true}, |
| | | {field: 'Salesman',width: '100', title: '业务员', sortable: true}, |
| | | {field: 'BoxNumber',width: '100', title: '箱号', sortable: true}, |
| | | {field: 'Quantity',width: '100', title: '数量', sortable: true}, |
| | | {field: 'ReportingDate',width: '140', title: '报表日期', sortable: true}, |
| | | {field: 'OrderQuantity',width: '100', title: '订单数', sortable: true}, |
| | | {field: 'Status',width: '100', title: '状态', sortable: true}, |
| | | {field: 'remark',width: '80', title: '备注', sortable: true}, |
| | | {field: 'deliveryDetail.deliveryId', width:'150', title: '送货单号',filters:[{ data: '' }],slots: { filter: 'num1_filter' } }, |
| | | {field: 'deliveryDetail.orderId', width: '150',title: '销售单号',showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'order.project', width: '120',title: '项目名称', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'productId', width: '100',title: '产品编号', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'productName',width: '200', title: '产品名称', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'delivery.customerName',width: '200', title: '客户名称', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'width', width: '100',title: '宽度', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'height',width: '100', title: '高度', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'delivery.quantity',width: '100', title: '订单总数', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'warehouseNum',width: '140', title: '数量', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'delivery.area',width: '100', title: '总面积', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'buildingNumber',width: '100', title: '楼层编号', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'deliveryDetail.orderNumber',width: '100', title: '订单序号', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'delivery.creator',width: '100', title: '业务员', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'deliveryDetail.createTime',width: '140', title: '报表日期', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | //{field: 'Status',width: '100', title: '状态', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'deliveryDetail.deliveryDetailRemakes',width: '80', title: '备注', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | ],//表头按钮 |
| | | toolbarConfig: { |
| | | buttons: [{ |
| | |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | | data: [ |
| | | { |
| | | "DeliveryOrderNumber": "1", |
| | | "SalesOrderNumber": "NG23072003", |
| | | "ProjectName": "钢化玻璃", |
| | | "CustomerName": "李二牛", |
| | | "Salesman": "小岳", |
| | | "OrderNumber": '7', |
| | | "FloorNumber": "06040000022", |
| | | "OrderQuantity": "7", |
| | | "Length": "1230.00", |
| | | "Width": "1075.00", |
| | | "Thickness": "6.700", |
| | | "TotalQuantity": "100.00", |
| | | "TotalArea": "360.80", |
| | | "BoxNumber": "06", |
| | | "ReportingDate": "2023-12-22", |
| | | "ProductNumber": "NG2312220001", |
| | | "ProductName": "超级玻璃", |
| | | "Quantity": "360", |
| | | "Status": "已调架", |
| | | "remark": "测试", |
| | | }, { |
| | | "DeliveryOrderNumber": "1", |
| | | "SalesOrderNumber": "NG23072003", |
| | | "ProjectName": "钢化玻璃", |
| | | "CustomerName": "李二牛", |
| | | "Salesman": "小岳", |
| | | "OrderNumber": '7', |
| | | "FloorNumber": "06040000022", |
| | | "OrderQuantity": "7", |
| | | "Length": "1230.00", |
| | | "Width": "1075.00", |
| | | "Thickness": "6.700", |
| | | "TotalQuantity": "100.00", |
| | | "TotalArea": "360.80", |
| | | "BoxNumber": "06", |
| | | "ReportingDate": "2023-12-22", |
| | | "ProductNumber": "NG2312220001", |
| | | "ProductName": "超级玻璃", |
| | | "Quantity": "360", |
| | | "Status": "已调架", |
| | | "remark": "测试", |
| | | }, { |
| | | "DeliveryOrderNumber": "1", |
| | | "SalesOrderNumber": "NG23072003", |
| | | "ProjectName": "钢化玻璃", |
| | | "CustomerName": "李二牛", |
| | | "Salesman": "小岳", |
| | | "OrderNumber": '7', |
| | | "FloorNumber": "06040000022", |
| | | "OrderQuantity": "7", |
| | | "Length": "1230.00", |
| | | "Width": "1075.00", |
| | | "Thickness": "6.700", |
| | | "TotalQuantity": "100.00", |
| | | "TotalArea": "360.80", |
| | | "BoxNumber": "06", |
| | | "ReportingDate": "2023-12-22", |
| | | "ProductNumber": "NG2312220001", |
| | | "ProductName": "超级玻璃", |
| | | "Quantity": "360", |
| | | "Status": "已调架", |
| | | "remark": "测试", |
| | | }, { |
| | | "DeliveryOrderNumber": "1", |
| | | "SalesOrderNumber": "NG23072003", |
| | | "ProjectName": "钢化玻璃", |
| | | "CustomerName": "李二牛", |
| | | "Salesman": "小岳", |
| | | "OrderNumber": '7', |
| | | "FloorNumber": "06040000022", |
| | | "OrderQuantity": "7", |
| | | "Length": "1230.00", |
| | | "Width": "1075.00", |
| | | "Thickness": "6.700", |
| | | "TotalQuantity": "100.00", |
| | | "TotalArea": "360.80", |
| | | "BoxNumber": "06", |
| | | "ReportingDate": "2023-12-22", |
| | | "ProductNumber": "NG2312220001", |
| | | "ProductName": "超级玻璃", |
| | | "Quantity": "360", |
| | | "Status": "已调架", |
| | | "remark": "测试", |
| | | }, { |
| | | "DeliveryOrderNumber": "1", |
| | | "SalesOrderNumber": "NG23072003", |
| | | "ProjectName": "钢化玻璃", |
| | | "CustomerName": "李二牛", |
| | | "Salesman": "小岳", |
| | | "OrderNumber": '7', |
| | | "FloorNumber": "06040000022", |
| | | "OrderQuantity": "7", |
| | | "Length": "1230.00", |
| | | "Width": "1075.00", |
| | | "Thickness": "6.700", |
| | | "TotalQuantity": "100.00", |
| | | "TotalArea": "360.80", |
| | | "BoxNumber": "06", |
| | | "ReportingDate": "2023-12-22", |
| | | "ProductNumber": "NG2312220001", |
| | | "ProductName": "超级玻璃", |
| | | "Quantity": "360", |
| | | "Status": "已调架", |
| | | "remark": "测试", |
| | | }, { |
| | | "DeliveryOrderNumber": "1", |
| | | "SalesOrderNumber": "NG23072003", |
| | | "ProjectName": "钢化玻璃", |
| | | "CustomerName": "李二牛", |
| | | "Salesman": "小岳", |
| | | "OrderNumber": '7', |
| | | "FloorNumber": "06040000022", |
| | | "OrderQuantity": "7", |
| | | "Length": "1230.00", |
| | | "Width": "1075.00", |
| | | "Thickness": "6.700", |
| | | "TotalQuantity": "100.00", |
| | | "TotalArea": "360.80", |
| | | "BoxNumber": "06", |
| | | "ReportingDate": "2023-12-22", |
| | | "ProductNumber": "NG2312220001", |
| | | "ProductName": "超级玻璃", |
| | | "Quantity": "360", |
| | | "Status": "已调架", |
| | | "remark": "测试", |
| | | }, |
| | | |
| | | ],//table body实际数据 |
| | | |
| | | //table body实际数据 |
| | | footerMethod ({ columns, data }) {//页脚函数 |
| | | return[ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return '合计:' |
| | | return `页数:${pageNum}/${pageTotal.value}` |
| | | } |
| | | // if (props.tableProp.footList.includes(column.field)) { |
| | | // return sumNum(data, column.field) |
| | | // } |
| | | |
| | | return '' |
| | | }) |
| | | ] |
| | | } |
| | | |
| | | }) |
| | | const storageRegion = ref(null); |
| | | const remark = ref(null); |
| | | const xGrid = ref(); |
| | | const gridEvents = { |
| | | toolbarButtonClick ({ code }) { |
| | | const $grid = xGrid.value |
| | | if ($grid) { |
| | | switch (code) { |
| | | case 'ver': { |
| | | const $table = xGrid.value |
| | | if ($table) { |
| | | const selectRecords = $table.getCheckboxRecords() |
| | | |
| | | let orderDetailData = ref({ |
| | | userId:userid, |
| | | userName:username, |
| | | orderDetail:selectRecords |
| | | }) |
| | | |
| | | console.log(orderDetailData.value) |
| | | request.post("/FinishedGoodsInventory/adddeliveryDetail",orderDetailData.value).then((res) => { |
| | | if(res.code==200){ |
| | | ElMessage.success("出库成功") |
| | | location.reload(); |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | |
| | | } |
| | | return; |
| | | |
| | | |
| | | } |
| | | |
| | | } |
| | | } |
| | | }, |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | |
| | | <ul class="expand-wrapper"> |
| | | <li v-for="(item,index) in gridOptions.columns" v-show="item.field!=undefined "> |
| | | <span style="font-weight: bold">{{item.title+': '}}</span> |
| | | <span>{{ row[item.field] }}</span> |
| | | <span v-if="hasDecimal(item.field)">{{ hasDecimalhtml(item.field,row) }}</span> |
| | | <span v-else>{{ row[item.field] }}</span> |
| | | </li> |
| | | </ul> |
| | | </template> |
| | |
| | | } |
| | | case 'out' :{ |
| | | //alert('我接收到子组件传送的编辑信息') |
| | | router.push({path: '/main/productStock/FinishedGoodsIssue', query: { id: row.id }}) |
| | | break |
| | | router.push({path: '/main/productStock/TakeOutRecord'}); |
| | | return |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | import {reactive, ref} from "vue"; |
| | | import {useRouter} from 'vue-router' |
| | | import request from "@/utils/request" |
| | | import deepClone from "@/utils/deepClone" |
| | | import userInfo from '@/stores/userInfo' |
| | | import useUserInfoStore from "@/stores/userInfo"; |
| | | import {ElMessage} from "element-plus"; |
| | | |
| | | const userStore = useUserInfoStore() |
| | | const username = userStore.user.userName |
| | | const userid = userStore.user.userId |
| | | let router=useRouter() |
| | | let produceList = ref([]) |
| | | const getTableRow = (row,type) =>{ |
| | | switch (type) { |
| | | case 'edit' :{ |
| | |
| | | break |
| | | } |
| | | } |
| | | } |
| | | |
| | | const hasDecimal=(value)=>{ |
| | | const regex=/\./ // 定义正则表达式,查找小数点 |
| | | return regex.test(value) //返回true/false |
| | | } |
| | | |
| | | const hasDecimalhtml=(item,row)=>{ |
| | | let aa=item.split('.').length |
| | | if (aa===2){ |
| | | return row[item.split('.')[0]][item.split('.')[1]] |
| | | }else if(aa===3){ |
| | | return row[item.split('.')[0]][item.split('.')[1]][item.split('.')[2]] |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | //筛选条件,有外键需要先定义明细里面的数据 |
| | | let filterData = ref({ |
| | | finishedGoodsInventory:{ |
| | | orderNumber:'', |
| | | orderId:'', |
| | | quantityAvailable:'', |
| | | actualSignalArea:'', |
| | | area:'', |
| | | storageRegion:'' |
| | | }, |
| | | order:{ |
| | | project:'', |
| | | customerId:'', |
| | | customerName:'' |
| | | |
| | | } |
| | | }) |
| | | |
| | | //第一次调用 |
| | | request.post("/FinishedGoodsInventory/getSelectAllocate/1/100",filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | console.log(res.data) |
| | | pageTotal.value=res.data.total |
| | | pageNum=1 |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | |
| | | |
| | | //定义页面总页数 |
| | | let pageTotal=ref('') |
| | | //定义当前页数 |
| | | let pageNum=$ref(1) |
| | | let pageState = null |
| | | |
| | | /*使用筛选,后端获取数据*/ |
| | | 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 |
| | | } |
| | | request.post("/FinishedGoodsInventory/getSelectAllocate/1/100",filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | console.log(res.data) |
| | | pageTotal.value=res.data.total |
| | | pageNum=1 |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | |
| | | { type: 'checkbox',fixed:"left", title: '选择', width: '80' }, |
| | | // { type: 'seq',fixed:"left", title: '自序', width: '80' }, |
| | | // {title: '操作', width: '80', slots: { default: 'button_slot' },fixed:"left"}, |
| | | {field: 'SalesOrderNumber', width: '150',title: '销售单号', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'ProjectName', width: '120',title: '项目名称', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'NowNum', width: '120',title: '当前序号', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'Quantity',width: '140', title: '订单数量', sortable: true}, |
| | | {field: 'DiaoSalesOrderNumber', width: '150',title: '调拨单号',editRender: { name: 'input', attrs: { placeholder: '' } }, sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'NewNum', width:'150', title: '新订序', sortable: true,editRender: { name: 'input', attrs: { placeholder: '' } } }, |
| | | {field: 'DiaoQuantity',width: '140', title: '调拨数量',editRender: { name: 'input', attrs: { placeholder: '' } }, sortable: true}, |
| | | {field: 'ProcessCardNumber',width: '100', title: '流程卡号', sortable: true,showOverflow:"ellipsis"}, |
| | | {field: 'FinishedProductNumber', width: '100',title: '成品编号', sortable: true}, |
| | | {field: 'ProductNumber',width: '100', title: '产品编号', sortable: true}, |
| | | {field: 'CustomerNumber', width: '100',title: '客户编号', sortable: true}, |
| | | {field: 'CustomerName',width: '100', title: '客户名称', sortable: true}, |
| | | {field: 'Length', width: '100',title: '长度', sortable: true}, |
| | | {field: 'Width',width: '100', title: '宽度', sortable: true}, |
| | | {field: 'Thickness', width: '100',title: '厚度', sortable: true}, |
| | | {field: 'SingleArea',width: '140', title: '单片面积', sortable: true}, |
| | | {field: 'TotalArea',width: '100', title: '总面积', sortable: true}, |
| | | {field: 'StorageArea',width: '100', title: '库区', sortable: true}, |
| | | {field: 'Location',width: '100', title: '库位', sortable: true}, |
| | | {field: 'finishedGoodsInventory.orderId', width: '150',title: '销售单号',showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'order.project', width: '120',title: '项目名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'finishedGoodsInventory.orderNumber', width: '120',title: '当前序号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'finishedGoodsInventory.quantityAvailable',width: '140', title: '订单数量'}, |
| | | {field: 'orderId', width: '150',title: '调拨单号',editRender: { name: 'input', attrs: { placeholder: '' } }, showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'orderNumber', width:'150', title: '新订序', editRender: { name: 'input', attrs: { placeholder: '' } } }, |
| | | {field: 'quantity',width: '120', title: '调拨数量',editRender: { name: 'input', attrs: { placeholder: '' } }}, |
| | | {field: 'productId', width: '120',title: '产品编号'}, |
| | | {field: 'productName',width: '140', title: '产品名称'}, |
| | | {field: 'order.customerId', width: '100',title: '客户编号'}, |
| | | {field: 'order.customerName',width: '140', title: '客户名称'}, |
| | | {field: 'width', width: '100',title: '宽度'}, |
| | | {field: 'height',width: '100', title: '高度'}, |
| | | {field: 'finishedGoodsInventory.actualSignalArea',width: '140', title: '单片面积'}, |
| | | {field: 'finishedGoodsInventory.area',width: '100', title: '总面积'}, |
| | | {field: 'finishedGoodsInventory.storageRegion',width: '100', title: '库存区域'}, |
| | | ],//表头按钮 |
| | | toolbarConfig: { |
| | | buttons: [ |
| | |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | | data: [ |
| | | { |
| | | "SalesOrderNumber": "NG23072003", |
| | | "ProjectName": "钢化玻璃", |
| | | "ProcessCardNumber": "NG23072003A01", |
| | | 'FinishedProductNumber':'', |
| | | 'FinishedProductName':'', |
| | | 'BoxNumber':'', |
| | | "CustomerNumber": "KD0071", |
| | | "CustomerName": "件", |
| | | "Length": "1075.00", |
| | | "Width": "440.00", |
| | | "Thickness": "3.00", |
| | | "Quantity": "360", |
| | | "SingleArea": "0.473000", |
| | | "TotalArea": "170.28", |
| | | "StorageArea": "0.47", |
| | | "Location": "170.28", |
| | | "NowNum":'1' |
| | | },{ |
| | | "SalesOrderNumber": "NG23072003", |
| | | "ProjectName": "钢化玻璃", |
| | | "ProcessCardNumber": "NG23072003A01", |
| | | 'FinishedProductNumber':'', |
| | | 'FinishedProductName':'', |
| | | 'BoxNumber':'', |
| | | "CustomerNumber": "KD0071", |
| | | "CustomerName": "件", |
| | | "Length": "1075.00", |
| | | "Width": "440.00", |
| | | "Thickness": "3.00", |
| | | "Quantity": "360", |
| | | "SingleArea": "0.473000", |
| | | "TotalArea": "170.28", |
| | | "StorageArea": "0.47", |
| | | "Location": "170.28", |
| | | "NowNum":'1' |
| | | },{ |
| | | "SalesOrderNumber": "NG23072003", |
| | | "ProjectName": "钢化玻璃", |
| | | "ProcessCardNumber": "NG23072003A01", |
| | | 'FinishedProductNumber':'', |
| | | 'FinishedProductName':'', |
| | | 'BoxNumber':'', |
| | | "CustomerNumber": "KD0071", |
| | | "CustomerName": "件", |
| | | "Length": "1075.00", |
| | | "Width": "440.00", |
| | | "Thickness": "3.00", |
| | | "Quantity": "360", |
| | | "SingleArea": "0.473000", |
| | | "TotalArea": "170.28", |
| | | "StorageArea": "0.47", |
| | | "Location": "170.28", |
| | | "NowNum":'1' |
| | | }, |
| | | |
| | | ],//table body实际数据 |
| | | //table body实际数据 |
| | | footerMethod ({ columns, data }) {//页脚函数 |
| | | return[ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return '合计:' |
| | | return `页数:${pageNum}/${pageTotal.value}` |
| | | } |
| | | // if (props.tableProp.footList.includes(column.field)) { |
| | | // return sumNum(data, column.field) |
| | |
| | | if($grid){ |
| | | switch (code){ |
| | | case 'edit':{ |
| | | alert('我接收到子组件传送的编辑信息') |
| | | // router.push({path: '/main/productStock/OrderAllocation'}); |
| | | // return; |
| | | break |
| | | const $table = xGrid.value |
| | | if ($table) { |
| | | const selectRecords = $table.getCheckboxRecords() |
| | | console.log(selectRecords) |
| | | |
| | | let flowData = ref({ |
| | | |
| | | userId:userid, |
| | | userName:username, |
| | | |
| | | orderDetail:selectRecords |
| | | }) |
| | | request.post("/FinishedGoodsInventory/updateFinishedGoodsInventoryAllocate",flowData.value).then((res) => { |
| | | if(res.code==200){ |
| | | |
| | | ElMessage.success("调拨成功") |
| | | location.reload(); |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | } |
| | | return; |
| | | } |
| | | case 'record':{ |
| | | router.push({path: '/main/productStock/TransferRecord'}); |
| | |
| | | <ul class="expand-wrapper"> |
| | | <li v-for="(item,index) in gridOptions.columns" v-show="item.field!=undefined "> |
| | | <span style="font-weight: bold">{{item.title+': '}}</span> |
| | | <span>{{ row[item.field] }}</span> |
| | | <span v-if="hasDecimal(item.field)">{{ hasDecimalhtml(item.field,row) }}</span> |
| | | <span v-else>{{ row[item.field] }}</span> |
| | | </li> |
| | | </ul> |
| | | </template> |
| | |
| | | <!-- 领出记录 --> |
| | | <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 useUserInfoStore from "@/stores/userInfo"; |
| | | import {ElMessage} from "element-plus"; |
| | | |
| | | const userStore = useUserInfoStore() |
| | | const username = userStore.user.userName |
| | | const userid = userStore.user.userId |
| | | let router=useRouter() |
| | | let produceList = ref([]) |
| | | const getTableRow = (row,type) =>{ |
| | | switch (type) { |
| | | case 'edit' :{ |
| | | //alert('我接收到子组件传送的编辑信息') |
| | | router.push({path: '/main/trader/CreateTrader', query: { id: row.id }}) |
| | | case 'add' :{ |
| | | alert('我接收到子组件传送的编辑信息') |
| | | break |
| | | } |
| | | case 'delete':{ |
| | |
| | | } |
| | | } |
| | | |
| | | const hasDecimal=(value)=>{ |
| | | const regex=/\./ // 定义正则表达式,查找小数点 |
| | | return regex.test(value) //返回true/false |
| | | } |
| | | |
| | | const hasDecimalhtml=(item,row)=>{ |
| | | let aa=item.split('.').length |
| | | if (aa===2){ |
| | | return row[item.split('.')[0]][item.split('.')[1]] |
| | | }else if(aa===3){ |
| | | return row[item.split('.')[0]][item.split('.')[1]][item.split('.')[2]] |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | //筛选条件,有外键需要先定义明细里面的数据 |
| | | let filterData = ref({ |
| | | orderDetail:{ |
| | | width:'', |
| | | height:'', |
| | | productId:'', |
| | | productName:'' |
| | | |
| | | } |
| | | |
| | | }) |
| | | |
| | | //第一次调用 |
| | | request.post("/FinishedGoodsInventory/getSelectOperateRecord/1/100",filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | console.log(res.data) |
| | | pageTotal.value=res.data.total |
| | | |
| | | pageNum=1 |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | |
| | | |
| | | //定义页面总页数 |
| | | let pageTotal=ref('') |
| | | //定义当前页数 |
| | | let pageNum=$ref(1) |
| | | let pageState = null |
| | | |
| | | /*使用筛选,后端获取数据*/ |
| | | 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 |
| | | } |
| | | request.post("/FinishedGoodsInventory/getSelectOperateRecord/1/100",filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | console.log(res.data) |
| | | pageTotal.value=res.data.total |
| | | pageNum=1 |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | } |
| | | const a = {field:"status", title: '选择', width: '80',slots: { default: 'state' } } |
| | | |
| | | |
| | | |
| | | |
| | | //子组件接收参数 |
| | | const xGrid = ref(); |
| | | |
| | | const gridOptions = reactive({ |
| | | border: "full",//表格加边框 |
| | |
| | | showStatus: true |
| | | },//表头参数 |
| | | columns:[ |
| | | {type:'expand',fixed:"left",slots: { content:'content' },width: '50'}, |
| | | // { type: 'checkbox',fixed:"left", title: '选择', width: '80' }, |
| | | |
| | | {type: 'checkbox',fixed:"left", title: '选择', width: '80' }, |
| | | //{field:"status", title: '选择', width: '80',slots: { default: 'state' } }, |
| | | {type:'expand',fixed:"left",slots: { content:'content' },width: '80'}, |
| | | { type: 'seq',fixed:"left", title: '自序', width: '80' }, |
| | | // {title: '操作', width: '110', slots: { default: 'button_slot' },fixed:"left"}, |
| | | {field: 'id', width:'150', title: '领出单号', sortable: true,}, |
| | | {field: 'MaterialCode', width: '150',title: '原订单号', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'Code', width: '150',title: '序号', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'MaterialName', width: '120',title: '新订单号', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'Origin', width: '100',title: '新序号', sortable: true}, |
| | | {field: 'InventoryNumber',width: '100', title: '领出类型', sortable: true,showOverflow:"ellipsis"}, |
| | | {field: 'Thickness', width: '80',title: '调出数量', sortable: true}, |
| | | {field: 'MainUnit',width: '100', title: '产品编号', sortable: true}, |
| | | {field: 'ProductName',width: '100', title: '产品名称', sortable: true}, |
| | | {field: 'Height', width: '100',title: '长', sortable: true}, |
| | | {field: 'Width',width: '100', title: '宽', sortable: true}, |
| | | {field: 'ZhiDanRen', width: '80',title: '制单人', sortable: true}, |
| | | {field: 'status', width: '80',title: '单据状态', sortable: true}, |
| | | {field: 'SafetyStock', width: '100',title: '制单日期', sortable: true}, |
| | | {field: 'Auditor', width: '100',title: '审核人', sortable: true}, |
| | | {field: 'AuditorDate', width: '100',title: '审核日期', sortable: true}, |
| | | {field: 'status', width: '120',title: '单据状态',filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'operationOrderNumber', width:'150', title: '操作单号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'orderId', width: '150',title: '销售单号',showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'operationNumber', width: '100',title: '序号', showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'quantity', width: '140',title: '领出/返工数量',filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'orderDetail.productId',width: '100', title: '产品编号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'orderDetail.productName',width: '140', title: '产品名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'orderDetail.width', width: '100',title: '宽度',filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'orderDetail.height',width: '100', title: '高度',filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'operator', width: '100',title: '制单人',filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'operateTime', width:'140', title: '制单日期',filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'reviewed', width: '100',title: '审核人',filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'reviewedTime', width: '140',title: '审核日期',filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'remarks', width: '140',title: '备注',filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | ],//表头按钮 |
| | | toolbarConfig: { |
| | | // buttons: [{ |
| | | // 'name': '新增' |
| | | // }], |
| | | buttons: [{ |
| | | 'name': '审核',status: 'primary', |
| | | 'code':'add' |
| | | }], |
| | | import: false, |
| | | export: true, |
| | | print: true, |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | | data: [ |
| | | { |
| | | "id": "LC23123011", |
| | | "MaterialCode": "NG23060212", |
| | | "Code": "1", |
| | | "MaterialName": "11月29退货众致", |
| | | "Origin": "补单", |
| | | "InventoryNumber": '退货废弃', |
| | | "Thickness": '876', |
| | | "MainUnit": "0604000108", |
| | | "ProductName": "4mm高性能环保镜", |
| | | "Height": "930.00", |
| | | "Width": "550.00", |
| | | "ZhiDanRen": "曲慧霞", |
| | | "status": "已审核", |
| | | "SafetyStock": "2023-12-30", |
| | | "Auditor": "曲慧霞", |
| | | "AuditorDate": "2023-12-30", |
| | | }, |
| | | { |
| | | "id": "LC23123010", |
| | | "MaterialCode": "NG23060211", |
| | | "Code": "1", |
| | | "MaterialName": "11月29退货众致", |
| | | "Origin": "补单", |
| | | "InventoryNumber": '开介领出', |
| | | "Thickness": '584', |
| | | "MainUnit": "0604000107", |
| | | "ProductName": "5mm环氧树脂镜", |
| | | "Height": "866.00", |
| | | "Width": "486.00", |
| | | "ZhiDanRen": "曲慧霞", |
| | | "status": "已审核", |
| | | "SafetyStock": "2023-12-30", |
| | | "Auditor": "曲慧霞", |
| | | "AuditorDate": "2023-12-30", |
| | | }, |
| | | { |
| | | "id": "LC23123009", |
| | | "MaterialCode": "NG23060210", |
| | | "Code": "1", |
| | | "MaterialName": "11月29退货众致", |
| | | "Origin": "补单", |
| | | "InventoryNumber": '开介领出', |
| | | "Thickness": '584', |
| | | "MainUnit": "0604000106", |
| | | "ProductName": "5mm环氧树脂镜", |
| | | "Height": "866.00", |
| | | "Width": "486.00", |
| | | "ZhiDanRen": "曲慧霞", |
| | | "status": "已审核", |
| | | "SafetyStock": "2023-12-30", |
| | | "Auditor": "曲慧霞", |
| | | "AuditorDate": "2023-12-30", |
| | | }, |
| | | ],//table body实际数据 |
| | | |
| | | footerMethod ({ columns, data }) {//页脚函数 |
| | | return[ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return '合计:' |
| | | return `页数:${pageNum}/${pageTotal.value}` |
| | | } |
| | | // if (props.tableProp.footList.includes(column.field)) { |
| | | // return sumNum(data, column.field) |
| | |
| | | } |
| | | |
| | | }) |
| | | |
| | | const gridEvents = { |
| | | toolbarButtonClick ({ code }) { |
| | | const $grid = xGrid.value |
| | | if ($grid) { |
| | | switch (code) { |
| | | case 'add': { |
| | | const $table = xGrid.value |
| | | //gridOptions.columns.unshift(a) |
| | | if ($table) { |
| | | const selectRecords = $table.getCheckboxRecords() |
| | | console.log(selectRecords) |
| | | } |
| | | return; |
| | | |
| | | } |
| | | |
| | | } |
| | | } |
| | | }, |
| | | |
| | | } |
| | | |
| | | const checkBoxConfig = { |
| | | checkMethod: ({ row }) => { |
| | | if (row['status']==='已审核'||row['status']==='未通过'){ |
| | | return row.disable |
| | | }else{ |
| | | return !row.disable |
| | | } |
| | | |
| | | }, |
| | | reserve:true |
| | | } |
| | | |
| | | |
| | | |
| | |
| | | class="mytable-scrollbar" |
| | | ref="xGrid" |
| | | v-bind="gridOptions" |
| | | v-on="gridEvents" |
| | | :checkbox-config="checkBoxConfig" |
| | | |
| | | > |
| | | |
| | | <!-- <template #state="{ row,column}"> |
| | | <!– <p>{{row[column.field]}}</p>–> |
| | | <!– <el-checkbox v-model="row['isState']" :disabled="row[column.field]==='已审核'||row[column.field]==='未通过'"/>–> |
| | | <vxe-checkbox v-model="row['isState']" :disabled="row[column.field]==='已审核'||row[column.field]==='未通过'"></vxe-checkbox> |
| | | </template>--> |
| | | |
| | | |
| | | <!-- @toolbar-button-click="toolbarButtonClickEvent"--> |
| | | <!-- 下拉显示所有信息插槽--> |
| | | <template #content="{ row }"> |
| | | <ul class="expand-wrapper"> |
| | | <li v-for="(item,index) in gridOptions.columns" v-show="item.field!=undefined "> |
| | | <span style="font-weight: bold">{{item.title+': '}}</span> |
| | | <span>{{ row[item.field] }}</span> |
| | | <span v-if="hasDecimal(item.field)">{{ hasDecimalhtml(item.field,row) }}</span> |
| | | <span v-else>{{ row[item.field] }}</span> |
| | | </li> |
| | | </ul> |
| | | </template> |
| | |
| | | <!-- 调拨记录 --> |
| | | <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" |
| | | let router=useRouter() |
| | | let produceList = ref([]) |
| | | const getTableRow = (row,type) =>{ |
| | | switch (type) { |
| | | case 'edit' :{ |
| | |
| | | break |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | const hasDecimal=(value)=>{ |
| | | const regex=/\./ // 定义正则表达式,查找小数点 |
| | | return regex.test(value) //返回true/false |
| | | } |
| | | |
| | | const hasDecimalhtml=(item,row)=>{ |
| | | let aa=item.split('.').length |
| | | if (aa===2){ |
| | | return row[item.split('.')[0]][item.split('.')[1]] |
| | | }else if(aa===3){ |
| | | return row[item.split('.')[0]][item.split('.')[1]][item.split('.')[2]] |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | //筛选条件,有外键需要先定义明细里面的数据 |
| | | let filterData = ref({ |
| | | orderDetail:{ |
| | | productName:'', |
| | | productId:'', |
| | | width:'', |
| | | height:'' |
| | | }, |
| | | getDate:{ |
| | | startDate:'', |
| | | stopDate:'' |
| | | } |
| | | }) |
| | | |
| | | |
| | | //第一次调用 |
| | | request.post("/FinishedGoodsInventory/getselectAllocateFinishedOperateLog/1/100",filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | console.log(res.data) |
| | | pageTotal.value=res.data.total |
| | | pageNum=1 |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | |
| | | const selectedDate = ref(); |
| | | const xGrid = ref(); |
| | | //定义页面总页数 |
| | | let pageTotal=ref('') |
| | | //定义当前页数 |
| | | let pageNum=$ref(1) |
| | | let pageState = null |
| | | |
| | | /*使用筛选,后端获取数据*/ |
| | | 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 |
| | | } |
| | | request.post("/FinishedGoodsInventory/getselectAllocateFinishedOperateLog/1/100",filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | console.log(res.data) |
| | | pageTotal.value=res.data.total |
| | | pageNum=1 |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | |
| | | },//表头参数 |
| | | columns:[ |
| | | {type:'expand',fixed:"left",slots: { content:'content' },width: '50'}, |
| | | // { type: 'checkbox',fixed:"left", title: '选择', width: '80' }, |
| | | { type: 'seq',fixed:"left", title: '自序', width: '80' }, |
| | | // {title: '操作', width: '110', slots: { default: 'button_slot' },fixed:"left"}, |
| | | {field: 'id', width:'150', title: 'ID', sortable: true,}, |
| | | {field: 'MaterialCode', width: '150',title: '原订单号', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'MaterialName', width: '120',title: '新订单号', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'Origin', width: '100',title: '新序号', sortable: true}, |
| | | {field: 'InventoryNumber',width: '100', title: '库存数', sortable: true,showOverflow:"ellipsis"}, |
| | | {field: 'Width', width: '80',title: '调用数量', sortable: true}, |
| | | {field: 'ZhiDanRen', width: '80',title: '制单人', sortable: true}, |
| | | {field: 'Height',width: '100', title: '产品编号', sortable: true}, |
| | | {field: 'Thickness', width: '100',title: '长', sortable: true}, |
| | | {field: 'MainUnit',width: '100', title: '宽', sortable: true}, |
| | | {field: 'SafetyStock', width: '100',title: '制单日期', sortable: true}, |
| | | {field: 'operationOrderNumber', width: '150',title: '新订单号',showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'orderId', width: '150',title: '原订单号',showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'operationNumber', width: '100',title: '原序号', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'staterOperationOrderNumber', width: '150',title: '新订单号', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'endOperationOrderNumber', width: '100',title: '新序号', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'quantity', width: '120',title: '调拨数量', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'operator', width: '120',title: '制单人', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'orderDetail.productId',width: '100', title: '产品编号', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'orderDetail.productName',width: '100', title: '产品名称', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'orderDetail.width', width: '100',title: '宽度', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'orderDetail.height',width: '100', title: '高度', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'operateTime', width: '100',title: '制单日期', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | ],//表头按钮 |
| | | toolbarConfig: { |
| | | // buttons: [{ |
| | |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | | data: [ |
| | | { |
| | | "id": "3765", |
| | | "MaterialCode": "NG23120709", |
| | | "MaterialName": "9", |
| | | "Origin": "NG23122010", |
| | | "InventoryNumber": "20", |
| | | "Width": '12.00', |
| | | "ZhiDanRen": '刘晓艳', |
| | | "Height": "0601000437", |
| | | "Thickness": "1390.00", |
| | | "MainUnit": "760.00", |
| | | "SafetyStock": "2023-12-30", |
| | | }, |
| | | { |
| | | "id": "3766", |
| | | "MaterialCode": "NG23120709", |
| | | "MaterialName": "9", |
| | | "Origin": "NG23122010", |
| | | "InventoryNumber": "20", |
| | | "Width": '12.00', |
| | | "ZhiDanRen": '刘晓艳', |
| | | "Height": "0601000437", |
| | | "Thickness": "1390.00", |
| | | "MainUnit": "760.00", |
| | | "SafetyStock": "2023-12-30", |
| | | },{ |
| | | "id": "3767", |
| | | "MaterialCode": "NG23120709", |
| | | "MaterialName": "9", |
| | | "Origin": "NG23122010", |
| | | "InventoryNumber": "20", |
| | | "Width": '12.00', |
| | | "ZhiDanRen": '刘晓艳', |
| | | "Height": "0601000437", |
| | | "Thickness": "1390.00", |
| | | "MainUnit": "760.00", |
| | | "SafetyStock": "2023-12-30", |
| | | }, |
| | | ],//table body实际数据 |
| | | |
| | | footerMethod ({ columns, data }) {//页脚函数 |
| | | return[ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return '合计:' |
| | | return `页数:${pageNum}/${pageTotal.value}` |
| | | } |
| | | // if (props.tableProp.footList.includes(column.field)) { |
| | | // return sumNum(data, column.field) |
| | |
| | | } |
| | | |
| | | }) |
| | | let date; |
| | | const getDate = () => { |
| | | let filterData = ref({ |
| | | orderDetail:{ |
| | | productName:'', |
| | | productId:'', |
| | | width:'', |
| | | height:'' |
| | | }, |
| | | getDate:{ |
| | | startDate:date[0], |
| | | stopDate:date[1], |
| | | } |
| | | }) |
| | | |
| | | request.post("/FinishedGoodsInventory/getselectAllocateFinishedOperateLog/1/100",filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | console.log(res.data) |
| | | pageTotal.value=res.data.total |
| | | pageNum=1 |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | |
| | | } |
| | | |
| | | |
| | | </script> |
| | |
| | | <el-col :span="2.5"> |
| | | <div class="label-text">制单日期范围</div> |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <el-col :span="3"> |
| | | <el-date-picker |
| | | v-model="selectedDate" |
| | | type="daterange" |
| | | start-placeholder="开始时间" |
| | | end-placeholder="结束时间" |
| | |
| | | /> |
| | | </el-col> |
| | | <el-col span="4"> |
| | | <el-button id="searchButton" type="primary" :icon="Search">查询</el-button> |
| | | <el-button id="searchButton" type="primary" @click="getDate" :icon="Search">查询</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | |
| | | <ul class="expand-wrapper"> |
| | | <li v-for="(item,index) in gridOptions.columns" v-show="item.field!=undefined "> |
| | | <span style="font-weight: bold">{{item.title+': '}}</span> |
| | | <span>{{ row[item.field] }}</span> |
| | | <span v-if="hasDecimal(item.field)">{{ hasDecimalhtml(item.field,row) }}</span> |
| | | <span v-else>{{ row[item.field] }}</span> |
| | | </li> |
| | | </ul> |
| | | </template> |
| | |
| | | <el-button type="primary">查询</el-button> |
| | | </el-row> |
| | | </div> |
| | | |
| | | <vxe-grid |
| | | max-height="100%" |
| | | @filter-change="filterChanged" |
| | |
| | | <script setup> |
| | | |
| | | import {reactive} from "vue"; |
| | | import request from "@/utils/request" |
| | | import deepClone from "@/utils/deepClone" |
| | | import {ElDatePicker, ElMessage} from "element-plus" |
| | | import useProductGlassTypeStore from "@/stores/sd/product/productGlassType" |
| | | import {nextTick, onMounted, onUnmounted, reactive, ref, watch} from "vue" |
| | | import {Search} from "@element-plus/icons-vue" |
| | | import GlassType from "@/components/sd/product/GlassType.vue" |
| | | import {useRouter} from 'vue-router' |
| | | import Sortable from 'sortablejs' |
| | | import BasicTable from '@/components/basic/BasicTable.vue' |
| | | import {VXETable} from "vxe-table"; |
| | | |
| | | let productGlassTypeStore = useProductGlassTypeStore() |
| | | let router=useRouter() |
| | | const getTableRow = (row,type) =>{ |
| | | switch (type) { |
| | | case 'edit' :{ |
| | | //alert('我接收到子组件传送的编辑信息') |
| | | router.push({path: '/main/processCard/PrintFlowCard', query: { id: row.id }}) |
| | | router.push({path: '/main/workOrder/addWorkOrder', query: {id: row.id}}) |
| | | break |
| | | } |
| | | case 'delete':{ |
| | | alert('我接收到子组件传送的删除信息') |
| | | break |
| | | } |
| | | case 'setType':{ |
| | | alert('我接收到子组件传送的排版状态') |
| | | break |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | function padLeftZero(str) { |
| | | return ('00' + str).substr(str.length) |
| | | } |
| | | |
| | | //定义时间 |
| | | const form = reactive({ |
| | | date1: '', |
| | | }) |
| | | |
| | | |
| | | |
| | | |
| | | //表尾求和 |
| | | const sumNum = (list, field) => { |
| | |
| | | return count.toFixed(2) |
| | | } |
| | | |
| | | //子组件接收参数 |
| | | //定义滚动条高度 |
| | | let scrollTop = ref(null) |
| | | let scrollHeight = ref(null) |
| | | let clientHeight = ref(null) |
| | | const scrollEvnt = (row) => { |
| | | // 内容高度 |
| | | scrollTop.value = row.$event.target.scrollTop |
| | | scrollHeight.value = row.$event.target.scrollHeight |
| | | clientHeight.value = row.$event.target.clientHeight |
| | | } |
| | | //筛选条件,有外键需要先定义明细里面的数据 |
| | | let filterData = ref({ |
| | | order: { |
| | | project: '' |
| | | }, |
| | | orderDetail: { |
| | | productId: '', |
| | | productName: '', |
| | | computeGrossArea: '', |
| | | processingNote: '', |
| | | } |
| | | |
| | | }) |
| | | //定义页面总页数 |
| | | let pageTotal = ref('') |
| | | //定义数据返回结果 |
| | | let produceList = ref([]) |
| | | //定义当前页数 |
| | | let pageNum = $ref(1) |
| | | let pageState = null |
| | | |
| | | //获取七天前到当前时间 |
| | | 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/flowCard/${startTime}/${endTime}`, filterData.value).then((res) => { |
| | | |
| | | if (res.code == 200) { |
| | | console.log(res.data.data) |
| | | pageTotal.value = res.data.total |
| | | produceList = produceList.value.concat(deepClone(res.data.data)) |
| | | xGrid.value.reloadData(produceList) |
| | | gridOptions.loading = false |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | |
| | | //点击查询 |
| | | const getWorkOrder = () => { |
| | | |
| | | let startTime = form.date1[0] |
| | | let endTime = form.date1[1] |
| | | request.post(`/processCard/flowCard/${startTime}/${endTime}`, filterData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | |
| | | pageTotal.value = res.data.total |
| | | xGrid.value.loadData(res.data.data) |
| | | gridOptions.loading = false |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | /*使用筛选,后端获取数据*/ |
| | | const 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/flowCard/${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",//表格加边框 |
| | | keepSource: true,//保持源数据 |
| | |
| | | {type:'expand',fixed:"left",slots: { content:'content' },width: 50}, |
| | | {title: '操作', width: 140, slots: { default: 'button_slot' },fixed:"left"}, |
| | | { type: 'seq',fixed:"left", title: '自序', width: 50 }, |
| | | {field: '销售单号', title: '销售单号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true, }, |
| | | {field: '流程卡号', width: 120, 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,showOverflow:"ellipsis"}, |
| | | {field: '分架员', title: '分架员', sortable: true}, |
| | | {field: '加工要求', title: '加工要求', sortable: true} |
| | | {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: '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: 'founder', title: '分架员', sortable: true}, |
| | | {field: 'orderDetail.processingNote', title: '加工要求', sortable: true} |
| | | ],//表头按钮 |
| | | |
| | | toolbarConfig: { |
| | |
| | | custom: true |
| | | }, |
| | | data: [ |
| | | { |
| | | 销售单号: 'NG231201', |
| | | 流程卡号: 'NG231201A01 ', |
| | | 产品编号: '9001010203000008', |
| | | 产品名称: '5mm白玻平钢(外)+0.76PVB透明+5mm白玻平钢(内)', |
| | | 项目名称: '信合春天里', |
| | | 总数量: '169', |
| | | 总面积: '175.31', |
| | | 分箱数: '3', |
| | | 分架员: 'xxx', |
| | | 加工要求: '1)按企标2)每片玻璃标签贴室外面。内片玻璃打“3C商标”,统一打在玻璃“宽度”方向右下角4)按批次单独落架。', |
| | | }, |
| | | { |
| | | 销售单号: 'NG231201', |
| | | 流程卡号: 'NG231201A01 ', |
| | | 产品编号: '9001010203000008', |
| | | 产品名称: '5mm白玻平钢(外)+0.76PVB透明+5mm白玻平钢(内)', |
| | | 项目名称: '信合春天里', |
| | | 总数量: '169', |
| | | 总面积: '175.31', |
| | | 分箱数: '3', |
| | | 分架员: 'xxx', |
| | | 加工要求: '1)按企标2)每片玻璃标签贴室外面。内片玻璃打“3C商标”,统一打在玻璃“宽度”方向右下角4)按批次单独落架。', |
| | | }, |
| | | { |
| | | 销售单号: 'NG231201', |
| | | 流程卡号: 'NG231201A01 ', |
| | | 产品编号: '9001010203000008', |
| | | 产品名称: '5mm白玻平钢(外)+0.76PVB透明+5mm白玻平钢(内)', |
| | | 项目名称: '信合春天里', |
| | | 总数量: '169', |
| | | 总面积: '175.31', |
| | | 分箱数: '3', |
| | | 分架员: 'xxx', |
| | | 加工要求: '1)按企标2)每片玻璃标签贴室外面。内片玻璃打“3C商标”,统一打在玻璃“宽度”方向右下角4)按批次单独落架。', |
| | | }, |
| | | { |
| | | 销售单号: 'NG231201', |
| | | 流程卡号: 'NG231201A01 ', |
| | | 产品编号: '9001010203000008', |
| | | 产品名称: '5mm白玻平钢(外)+0.76PVB透明+5mm白玻平钢(内)', |
| | | 项目名称: '信合春天里', |
| | | 总数量: '169', |
| | | 总面积: '175.31', |
| | | 分箱数: '3', |
| | | 分架员: 'xxx', |
| | | 加工要求: '1)按企标2)每片玻璃标签贴室外面。内片玻璃打“3C商标”,统一打在玻璃“宽度”方向右下角4)按批次单独落架。', |
| | | }, |
| | | { |
| | | 销售单号: 'NG231201', |
| | | 流程卡号: 'NG231201A01 ', |
| | | 产品编号: '9001010203000008', |
| | | 产品名称: '5mm白玻平钢(外)+0.76PVB透明+5mm白玻平钢(内)', |
| | | 项目名称: '信合春天里', |
| | | 总数量: '169', |
| | | 总面积: '175.31', |
| | | 分箱数: '3', |
| | | 分架员: 'xxx', |
| | | 加工要求: '1)按企标2)每片玻璃标签贴室外面。内片玻璃打“3C商标”,统一打在玻璃“宽度”方向右下角4)按批次单独落架。', |
| | | }, |
| | | { |
| | | 销售单号: 'NG231201', |
| | | 流程卡号: 'NG231201A01 ', |
| | | 产品编号: '9001010203000008', |
| | | 产品名称: '5mm白玻平钢(外)+0.76PVB透明+5mm白玻平钢(内)', |
| | | 项目名称: '信合春天里', |
| | | 总数量: '169', |
| | | 总面积: '175.31', |
| | | 分箱数: '3', |
| | | 分架员: 'xxx', |
| | | 加工要求: '1)按企标2)每片玻璃标签贴室外面。内片玻璃打“3C商标”,统一打在玻璃“宽度”方向右下角4)按批次单独落架。', |
| | | }, |
| | | { |
| | | 销售单号: 'NG231201', |
| | | 流程卡号: 'NG231201A01 ', |
| | | 产品编号: '9001010203000008', |
| | | 产品名称: '5mm白玻平钢(外)+0.76PVB透明+5mm白玻平钢(内)', |
| | | 项目名称: '信合春天里', |
| | | 总数量: '169', |
| | | 总面积: '175.31', |
| | | 分箱数: '3', |
| | | 分架员: 'xxx', |
| | | 加工要求: '1)按企标2)每片玻璃标签贴室外面。内片玻璃打“3C商标”,统一打在玻璃“宽度”方向右下角4)按批次单独落架。', |
| | | }, |
| | | |
| | | ],//table body实际数据 |
| | | //脚部求和 |
| | | footerMethod ({ columns, data }) {//页脚函数 |
| | |
| | | |
| | | }) |
| | | |
| | | const form = reactive({ |
| | | name: '', |
| | | region: '', |
| | | date1: '', |
| | | date2: '', |
| | | delivery: false, |
| | | type: [], |
| | | resource: '', |
| | | desc: '', |
| | | }) |
| | | |
| | | |
| | | </script> |
| | | |
| | |
| | | <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 type="primary">查询</el-button> |
| | |
| | | <!-- 下拉显示所有信息插槽--> |
| | | <template #content="{ row}"> |
| | | <ul class="expand-wrapper"> |
| | | <li v-for="(item,key,index) in row"> |
| | | <span style="font-weight: bold">{{key+': '}}</span> |
| | | <span>{{ item }}</span> |
| | | <li v-for="(item,index) in gridOptions.columns" v-show="item.field!=undefined "> |
| | | <span style="font-weight: bold">{{ item.title + ': ' }}</span> |
| | | <span v-if="hasDecimal(item.field)">{{ row[item.field.split('.')[0]][item.field.split('.')[1]] }}</span> |
| | | <span v-else>{{ row[item.field] }}</span> |
| | | |
| | | </li> |
| | | </ul> |
| | | </template> |
| | |
| | | <script setup> |
| | | |
| | | import {reactive} from "vue"; |
| | | import {reactive, ref} from "vue"; |
| | | import {useRouter} from 'vue-router' |
| | | import request from "@/utils/request"; |
| | | import {ElMessage} from "element-plus"; |
| | | import deepClone from "@/utils/deepClone"; |
| | | |
| | | let router=useRouter() |
| | | const getTableRow = (row,type) =>{ |
| | | switch (type) { |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | //定义页面总页数 |
| | | let pageTotal=ref('') |
| | | //定义数据返回结果 |
| | | let produceList = ref([]) |
| | | //定义当前页数 |
| | | let pageNum=$ref(1) |
| | | |
| | | const getRewokAddData = () => { |
| | | request.post(`/reportData/rework/add/query/${pageNum}/100`,filterData.value).then((res) => { |
| | | |
| | | MessageShow(filterData.value); |
| | | return ; |
| | | |
| | | if (res.code === 200) { |
| | | pageTotal.value = res.data.total |
| | | xGrid.value.loadData(res.data.data) |
| | | gridOptions.loading = false |
| | | } else { |
| | | |
| | | |
| | | MessageShow(res.msg,'warning'); |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | //表尾求和 |
| | | const sumNum = (list, field) => { |
| | |
| | | {title: '操作', width: 70, slots: { default: 'button_slot' },fixed:"left"}, |
| | | { type: 'seq',fixed:"left", title: '自序', width: 50 }, |
| | | |
| | | {field: 'reworkTeams',width: 90, title: '返工班组', editRender: { name: 'input', attrs: { placeholder: '' } }}, |
| | | {field: 'salesOrderNo',width: 120, title: '销售单号', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'processCardNo',width: 120, title: '流程卡号', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'entryName', width: 120,title: '项目名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'reworkTeams', width: 120, title: '返工班组', editRender: {name: 'input', attrs: {placeholder: ''}}}, |
| | | { |
| | | field: 'salesOrderNo', |
| | | width: 120, |
| | | title: '销售单号', |
| | | sortable: true, |
| | | showOverflow: "ellipsis", |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'} |
| | | }, |
| | | { |
| | | field: 'processCardNo', |
| | | width: 120, |
| | | title: '流程卡号', |
| | | sortable: true, |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'} |
| | | }, |
| | | { |
| | | field: 'entryName', |
| | | width: 120, |
| | | title: '项目名称', |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | sortable: true |
| | | }, |
| | | {field: 'batch',width: 80, title: '批次', sortable: true,showOverflow:"ellipsis"}, |
| | | {field: 'serialNumber',width: 80, title: '序号', sortable: true}, |
| | | {field: 'singlePieceName',width: 120, title: '单片名称', sortable: true}, |
| | |
| | | |
| | | }) |
| | | |
| | | //筛选条件,有外键需要先定义明细里面的数据 |
| | | let filterData = ref({ |
| | | |
| | | }) |
| | | |
| | | |
| | | /*使用筛选,后端获取数据*/ |
| | | 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 |
| | | } |
| | | request.post(`/reportData/rework/add/query/1/100`,filterData.value).then((res) => { |
| | | if (res.code === 200) { |
| | | pageTotal.value = res.data.total |
| | | pageNum = 1 |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading = false |
| | | } else { |
| | | MessageShow(res.msg,'warning'); |
| | | } |
| | | }) |
| | | } |
| | | const MessageShow = (content, type = 'success') => { |
| | | ElMessage({ |
| | | message: content, |
| | | type: type, |
| | | showClose: true, |
| | | }) |
| | | } |
| | | |
| | | |
| | | </script> |
| | |
| | | |
| | | </template> |
| | | |
| | | <!-- 筛选插槽 --> |
| | | <template #num1_filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | |
| | | /*main-body样式*/ |
| | | #main-body{ |
| | | width: 99%; |
| | | height: 92%; |
| | | margin-top: 1%; |
| | | height: 95%; |
| | | /*margin-top: 1%;*/ |
| | | } |
| | | </style> |
| | |
| | | |
| | | import {reactive, ref} from "vue"; |
| | | import {useRouter} from 'vue-router' |
| | | let router=useRouter() |
| | | import request from "@/utils/request"; |
| | | import {ElMessage} from "element-plus"; |
| | | |
| | | let router = useRouter() |
| | | const dateValue = ref("");//查询日期 |
| | | const dialogFormVisible = ref(false) |
| | | const formLabelWidth = '140px' |
| | | |
| | | const form = reactive({ |
| | | /*编辑弹窗显示数据*/ |
| | | const editData = reactive({ |
| | | name: 'FG20202020', |
| | | region: '', |
| | | date1: '', |
| | |
| | | resource: '', |
| | | desc: '', |
| | | }) |
| | | |
| | | |
| | | const getTableRow = (row,type) =>{ |
| | | switch (type) { |
| | | case 'edit' :{ |
| | |
| | | } |
| | | |
| | | //子组件接收参数 |
| | | |
| | | const xGrid = ref() |
| | | const gridOptions = reactive({ |
| | | border: "full",//表格加边框 |
| | | keepSource: true,//保持源数据 |
| | |
| | | {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: 'reworkNumber',width: 120, title: '返工编号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true, }, |
| | | {field: 'salesOrderNo',width: 120, title: '销售单号', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'processCardNo',width: 120, title: '流程卡号', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'entryName', width: 120,title: '项目名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'batch',width: 80, title: '批次', sortable: true,showOverflow:"ellipsis"}, |
| | | {field: 'serialNumber',width: 80, title: '序号', sortable: true}, |
| | | {field: 'singlePieceName',width: 120, title: '单片名称', sortable: true}, |
| | | {field: 'marking',width: 80, title: '标记', sortable: true,showOverflow:"ellipsis"}, |
| | | {field: 'pieces',width: 90, title: '片标记', sortable: true}, |
| | | {field: 'number',width: 80, title: '数量', sortable: true}, |
| | | {field: 'width',width: 80, title: '宽', sortable: true}, |
| | | {field: 'height',width: 80, title: '高', sortable: true}, |
| | | {field: 'shape',width: 80, title: '形状', sortable: true}, |
| | | {field: 'type',width: 100, title: '返工类型', sortable: true}, |
| | | {field: 'damage',width: 120, title: '返工原因', sortable: true}, |
| | | {field: 'device',width: 120, title: '责任设备', sortable: true}, |
| | | {field: 'teams',width: 120, title: '责任班组', sortable: true}, |
| | | {field: 'area',width: 120, title: '返工面积', sortable: true}, |
| | | {field: 'reworkProcess',width: 120, title: '返工工序', sortable: true}, |
| | | {field: 'reworkTeams',width: 120, title: '返工班组', sortable: true}, |
| | | {field: 'qualityInspector',width: 100, title: '质检员', sortable: true} |
| | | {field: 'reworkTeam', width: 120, title: '返工班组'}, |
| | | { |
| | | field: 'order.orderId', |
| | | width: 120, |
| | | title: '销售单号', |
| | | showOverflow: "ellipsis", |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'} |
| | | }, |
| | | { |
| | | field: 'reportingWork.processId', |
| | | width: 120, |
| | | title: '流程卡号', |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'} |
| | | }, |
| | | {field: 'order.project', width: 120, title: '项目名称', filters: [{data: ''}], slots: {filter: 'num1_filter'}}, |
| | | {field: 'order.batch', width: 80, title: '批次', showOverflow: "ellipsis"}, |
| | | {field: 'orderNumber', width: 80, title: '序号'}, |
| | | {field: 'orderGlassDetail.glassChild', width: 120, title: '单片名称'}, |
| | | {field: 'orderGlassDetail.technologyNumber', width: 80, title: '标记', showOverflow: "ellipsis"}, |
| | | {field: 'orderGlassDetail.glassAddress', width: 90, title: '片标记'}, |
| | | {field: 'breakageNumber', width: 80, title: '数量'}, |
| | | {field: 'orderGlassDetail.childWidth', width: 80, title: '宽'}, |
| | | {field: 'orderGlassDetail.childHeight', width: 80, title: '高'}, |
| | | {field: 'orderDetail.shape', width: 80, title: '形状'}, |
| | | {field: 'breakageType', width: 100, title: '返工类型'}, |
| | | {field: 'breakageReason', width: 120, title: '返工原因'}, |
| | | {field: 'responsibleEquipment', width: 120, title: '责任设备'}, |
| | | {field: 'responsibleTeam', width: 120, title: '责任班组'}, |
| | | {field: 'reworkArea', width: 120, title: '返工面积'}, |
| | | {field: 'returnProcess', width: 120, title: '返工工序'}, |
| | | {field: 'qualityInspector', width: 100, title: '质检员'}, |
| | | {field: 'reworkTime', width: 100, title: '返工时间'}, |
| | | {field: 'reworkUpdateTime', width: 120, title: '返工审核时间'} |
| | | ],//表头按钮 |
| | | |
| | | toolbarConfig: { |
| | |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | | data: [ |
| | | { |
| | | |
| | | reworkNumber:'FG20202020', |
| | | salesOrderNo:'NG23010101', |
| | | processCardNo:'NG23010101A01', |
| | | entryName:'xxxx', |
| | | batch:'二批三', |
| | | serialNumber:'1', |
| | | area:'23.11', |
| | | qualityInspector:"张三", |
| | | number:'1', |
| | | singlePieceName: '6mm白玻平钢(外)', |
| | | marking: '1', |
| | | pieces: '(外)', |
| | | width: '575', |
| | | height:"2241", |
| | | shape: '普形', |
| | | reworkTeams:'XX二班', |
| | | type: '机器', |
| | | damage:'气泡超标', |
| | | reworkProcess:'XXXX', |
| | | device:'XXX' |
| | | }, |
| | | { |
| | | |
| | | reworkNumber:'FG20203333', |
| | | salesOrderNo:'NG23010101', |
| | | processCardNo:'NG23010101A01', |
| | | entryName:'xxxx', |
| | | batch:'二批三', |
| | | serialNumber:'1', |
| | | area:'23.11', |
| | | qualityInspector:"张三", |
| | | number:'1', |
| | | singlePieceName: '6mm白玻平钢(外)', |
| | | marking: '1', |
| | | pieces: '(外)', |
| | | width: '575', |
| | | height:"2241", |
| | | shape: '普形', |
| | | reworkTeams:'XX二班', |
| | | type: '机器', |
| | | damage:'气泡超标', |
| | | reworkProcess:'XXXX', |
| | | device:'XXX' |
| | | }, |
| | | ],//table body实际数据 |
| | | data: null,//table body实际数据 |
| | | //脚部求和 |
| | | footerMethod ({ columns, data }) {//页脚函数 |
| | | let footList=['number','area'] |
| | |
| | | return '' |
| | | }) |
| | | ] |
| | | } |
| | | }, mergeFooterItems: [ |
| | | {row: 0, col: 0, rowspan: 1, colspan: 2} |
| | | ],//合并脚 |
| | | |
| | | }) |
| | | |
| | | |
| | | /*查询*/ |
| | | const queryData = () => { |
| | | |
| | | if (dateValue.value === "") { |
| | | MessageShow("未选择时间,请选择时间后再次进行查询", "warning"); |
| | | return; |
| | | } |
| | | |
| | | request.post(`/reportData/rework/manage/query/1/100/${dateValue.value[0]}/${dateValue.value[1]}`).then((res) => { |
| | | |
| | | |
| | | console.log(res); |
| | | //MessageShow(res); |
| | | if (res.code === 200 || res.code === '200') { |
| | | pageTotal.value = res.data.total |
| | | |
| | | MessageShow(res.data.data.total) |
| | | xGrid.value.loadData(res.data.data) |
| | | |
| | | |
| | | gridOptions.loading = false |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | |
| | | } |
| | | |
| | | //筛选条件,有外键需要先定义明细里面的数据 |
| | | let filterData = ref({}) |
| | | |
| | | //定义页面总页数 |
| | | let pageTotal = ref('') |
| | | //定义数据返回结果 |
| | | let produceList = ref([]) |
| | | //定义当前页数 |
| | | let pageNum = $ref(1) |
| | | let pageState = null |
| | | |
| | | //定义滚动条高度 |
| | | 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 |
| | | } |
| | | |
| | | /*时间框快速选择*/ |
| | | const shortcuts = [ |
| | | { |
| | | text: '近一周', |
| | | value: () => { |
| | | const end = new Date() |
| | | const start = new Date() |
| | | start.setTime(start.getTime() - 3600 * 1000 * 24 * 7) |
| | | return [start, end] |
| | | }, |
| | | }, |
| | | { |
| | | text: '近一个月', |
| | | value: () => { |
| | | const end = new Date() |
| | | const start = new Date() |
| | | start.setTime(start.getTime() - 3600 * 1000 * 24 * 30) |
| | | return [start, end] |
| | | }, |
| | | }, |
| | | { |
| | | text: '近三个月', |
| | | value: () => { |
| | | const end = new Date() |
| | | const start = new Date() |
| | | start.setTime(start.getTime() - 3600 * 1000 * 24 * 90) |
| | | return [start, end] |
| | | }, |
| | | }, |
| | | ] |
| | | |
| | | const MessageShow = (content, type = 'success') => { |
| | | ElMessage({ |
| | | message: content, |
| | | type: type, |
| | | showClose: true, |
| | | }) |
| | | } |
| | | |
| | | |
| | | /*使用筛选,后端获取数据*/ |
| | | 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 |
| | | } |
| | | request.post("/product/1/100/"+productGlassTypeStore.GlassType,filterData.value).then((res) => { |
| | | if(res.code==200){ |
| | | pageTotal.value=res.data.total |
| | | pageNum=1 |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | })*/ |
| | | } |
| | | |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | | <div class="main-div-customer"> |
| | | <div id="head" > |
| | | <el-row :gutter="0"> |
| | | <el-header height="auto" style="padding: 0;margin:0"> |
| | | <el-row :gutter="0" style="margin-bottom: 5px"> |
| | | <el-col :span="7"> |
| | | <el-date-picker |
| | | v-model="value" |
| | | v-model="dateValue" |
| | | type="daterange" |
| | | start-placeholder="开始时间" |
| | | end-placeholder="结束时间" |
| | | unlink-panels |
| | | range-separator="-" |
| | | start-placeholder="开始日期" |
| | | end-placeholder="结束日期" |
| | | :shortcuts="shortcuts" |
| | | format="YYYY-MM-DD" |
| | | value-format="YYYY-MM-DD" |
| | | width:99% |
| | | /> |
| | | |
| | | <el-button type="primary">查询</el-button> |
| | | </el-col> |
| | | |
| | | <el-col :span="2"> |
| | | <el-button type="primary" @click="queryData()">查询</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </el-header> |
| | | |
| | | |
| | | <vxe-grid |
| | | max-height="100%" |
| | | @filter-change="filterChanged" |
| | | class="mytable-scrollbar" |
| | | ref="xGrid" |
| | | v-bind="gridOptions" |
| | | @scroll="scrollEvnt" |
| | | |
| | | > |
| | | <!-- @toolbar-button-click="toolbarButtonClickEvent"--> |
| | |
| | | |
| | | |
| | | </vxe-grid> |
| | | |
| | | |
| | | <!-- 返工管理-“编辑”弹窗 --> |
| | | <el-dialog v-model="dialogFormVisible" title="返工编辑"> |
| | | <el-form :model="form"> |
| | | <el-form :model="editData"> |
| | | <el-form-item label="返工编号" :label-width="formLabelWidth"> |
| | | <el-input v-model="form.name" disabled autocomplete="off" style="width: 200px"/> |
| | | </el-form-item> |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-form> |
| | | |
| | | |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | | <el-button @click="dialogFormVisible = false">取消</el-button> |
| | |
| | | </template> |
| | | </el-dialog> |
| | | </div> |
| | | |
| | | </template> |
| | | |
| | | <style scoped> |
| | | .main-div-customer{ |
| | | width: 99%; |
| | | height: 100%; |
| | | height: 98%; |
| | | } |
| | | #head{ |
| | | width:40%; |
| | | |
| | | :deep(.el-col div) { |
| | | font-weight: bold; |
| | | width: 99%; |
| | | } |
| | | </style> |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | function padLeftZero(str) { |
| | | return ('00' + str).substr(str.length) |
| | | } |
| | |
| | | |
| | | /> |
| | | |
| | | <el-select :default-first-option="true" ref="getSelect" style="width: 120px" v-model="optionVal" class="m-2" placeholder="是否转工单"> |
| | | <el-select :default-first-option="true" ref="getSelect" style="width: 120px" v-model="optionVal" class="m-2" |
| | | placeholder="是否转工单"> |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | |
| | | 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> |
| | |
| | | v-for="item in titleSelectJson['orderClassify']" |
| | | :key="item.id" |
| | | :label="item.basicName" |
| | | :value="item.id" |
| | | :value="item.basicName" |
| | | /> |
| | | </el-select> |
| | | </el-col> |
| | |
| | | <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-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-input v-model="titleUploadData.contactNumber"/></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.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) |
| | | |
| | | const cellClickEvent =()=>{ |
| | | dialogTableVisible.value = true |
| | | 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 |
| | | // } |
| | | |
| | | |
| | | |
| | | |
| | |
| | | </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', |
| | |
| | | } |
| | | }, |
| | | server: { |
| | | port: 80,//端口号 |
| | | port: 81,//端口号 |
| | | host: true,//ip地址 或 '0.0.0.0' 或 "loaclhost" |
| | | open: false, //启动后是否自动打开浏览器 |
| | | https: false, // 是否开启 https |
| | |
| | | String Code_400="400";// |
| | | String Code_200="200";//成功 |
| | | String Code_600="600";//其他问题 |
| | | String Code_msg = "服务器发生异常,保存失败"; |
| | | } |
| | |
| | | |
| | | import com.example.erp.common.Constants; |
| | | import com.example.erp.common.Result; |
| | | import com.example.erp.entity.mm.FinishedOperateLog; |
| | | import com.example.erp.entity.pp.FlowCard; |
| | | import com.example.erp.entity.sd.OrderDetail; |
| | | import com.example.erp.exception.ServiceException; |
| | | import com.example.erp.service.mm.FinishedGoodsInventoryService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | import com.example.erp.entity.mm.FinishedGoodsInventory; |
| | | |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | |
| | | @Autowired |
| | | FinishedGoodsInventoryService finishedGoodsInventoryService; |
| | | |
| | | /*成品库存查询*/ |
| | | @PostMapping("/getselet/{pageNum}/{pageSize}") |
| | | public Result defaultDateFinishedGoodsInventory(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @RequestBody FinishedGoodsInventory finishedGoodsInventory){ |
| | | System.out.println(finishedGoodsInventory); |
| | | return Result.seccess(finishedGoodsInventoryService.defaultDateFinishedGoodsInventory(pageNum,pageSize,finishedGoodsInventory)); |
| | | } |
| | | |
| | | /*查询可入库的成品数据*/ |
| | | @PostMapping("/getseletwarehousing/{pageNum}/{pageSize}") |
| | | public Result getseletwarehousing(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @RequestBody FlowCard flowCard){ |
| | | System.out.println(flowCard); |
| | | return Result.seccess(finishedGoodsInventoryService.getseletwarehousing(pageNum,pageSize,flowCard)); |
| | | } |
| | | |
| | | /*成品入库*/ |
| | | @PostMapping("/addseletwarehousing") |
| | | public Result addseletwarehousing( @RequestBody Map<String,Map<String,Object>> object){ |
| | | public Result addseletwarehousing( @RequestBody Map<String,Object> object){ |
| | | if(finishedGoodsInventoryService.addseletwarehousing(object)){ |
| | | return Result.seccess(); |
| | | }else { |
| | |
| | | |
| | | } |
| | | } |
| | | |
| | | /*查询可发货的成品数据*/ |
| | | @PostMapping("/getseletdeliveryDetail/{pageNum}/{pageSize}") |
| | | public Result getseletdeliveryDetail(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @RequestBody OrderDetail orderDetail){ |
| | | return Result.seccess(finishedGoodsInventoryService.getseletdeliveryDetail(pageNum,pageSize,orderDetail)); |
| | | } |
| | | |
| | | /*成品发货*/ |
| | | @PostMapping("/adddeliveryDetail") |
| | | public Result adddeliveryDetail( @RequestBody Map<String,Object> object){ |
| | | if(finishedGoodsInventoryService.adddeliveryDetail(object)){ |
| | | return Result.seccess(); |
| | | }else { |
| | | throw new ServiceException(Constants.Code_500,"出库失败"); |
| | | |
| | | } |
| | | } |
| | | |
| | | /* 调拨查询*/ |
| | | @PostMapping("/getSelectAllocate/{pageNum}/{pageSize}") |
| | | public Result getSelectAllocate(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @RequestBody OrderDetail orderDetail){ |
| | | return Result.seccess(finishedGoodsInventoryService.getSelectAllocate(pageNum,pageSize,orderDetail)); |
| | | } |
| | | |
| | | /*订单调拨*/ |
| | | @PostMapping("/updateFinishedGoodsInventoryAllocate") |
| | | public Result updateFinishedGoodsInventoryAllocate( @RequestBody Map<String,Object> object){ |
| | | if(finishedGoodsInventoryService.updateFinishedGoodsInventoryAllocate(object)){ |
| | | |
| | | return Result.seccess(); |
| | | |
| | | }else { |
| | | throw new ServiceException(Constants.Code_500,"调拨失败"); |
| | | |
| | | } |
| | | } |
| | | |
| | | /*领出查询*/ |
| | | @PostMapping("/getselectAllocateFinishedOperateLog/{pageNum}/{pageSize}") |
| | | public Result getselectAllocateFinishedOperateLog(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @RequestBody FinishedOperateLog finishedOperateLog){ |
| | | return Result.seccess(finishedGoodsInventoryService.getselectAllocateFinishedOperateLog(pageNum,pageSize,finishedOperateLog)); |
| | | } |
| | | |
| | | /*订单领出*/ |
| | | @PostMapping("/updateFinishedGoodsInventoryTakeOut") |
| | | public Result updateFinishedGoodsInventoryTakeOut( @RequestBody Map<String,Object> object){ |
| | | |
| | | if(finishedGoodsInventoryService.updateFinishedGoodsInventoryTakeOut(object)){ |
| | | return Result.seccess(); |
| | | |
| | | }else { |
| | | throw new ServiceException(Constants.Code_500,"领出失败"); |
| | | |
| | | } |
| | | } |
| | | |
| | | /*领出记录查询*/ |
| | | @PostMapping("/getSelectOperateRecord/{pageNum}/{pageSize}") |
| | | public Result getSelectOperateRecord(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @RequestBody FinishedOperateLog finishedOperateLog){ |
| | | return Result.seccess(finishedGoodsInventoryService.getSelectOperateRecord(pageNum,pageSize,finishedOperateLog)); |
| | | } |
| | | } |
| | |
| | | package com.example.erp.controller.pp; |
| | | |
| | | import com.example.erp.entity.pp.FlowCard; |
| | | import com.example.erp.common.Result; |
| | | import com.example.erp.service.pp.FlowCardService; |
| | |
| | | @Autowired |
| | | FlowCardService flowCardService; |
| | | |
| | | @PostMapping ("/flowCard/{selectTime1}/{selectTime2}}") |
| | | @PostMapping ("/flowCard/{selectTime1}/{selectTime2}") |
| | | public Result DateProcess( |
| | | @PathVariable Date selectTime1, |
| | | @PathVariable Date selectTime2, |
| | | @RequestBody FlowCard flowCard){ |
| | | return Result.seccess(flowCardService.selectProcessCard(selectTime1,selectTime2,flowCard)); |
| | | |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.example.erp.controller.pp; |
| | | |
| | | import com.example.erp.common.Result; |
| | | import com.example.erp.entity.pp.ReportingWorkDetail; |
| | | import com.example.erp.service.pp.ReportWorkService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | |
| | | @RestController |
| | | @RequestMapping("/reportData") |
| | | public class ReportWorkController { |
| | | |
| | | @Autowired |
| | | ReportWorkService reportWorkService; |
| | | |
| | | /*返工管理数据*/ |
| | | @PostMapping("/rework/manage/query/{pageNum}/{pageSize}/{startTime}/{endTime}") |
| | | public Result queryReworkData(@PathVariable Integer pageNum, @PathVariable Integer pageSize |
| | | ,@PathVariable String startTime,@PathVariable String endTime |
| | | ) { |
| | | return Result.seccess(reportWorkService.reworkMangageData(pageNum, pageSize,startTime,endTime)); |
| | | } |
| | | |
| | | /*返工新增数据查询*/ |
| | | @PostMapping("/rework/add/query/{pageNum}/{pageSize}") |
| | | public Result queryReworkAdd(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @RequestBody ReportingWorkDetail reportingWorkDetail) { |
| | | return Result.seccess(reportWorkService.queryRework(pageNum, pageSize,reportingWorkDetail)); |
| | | } |
| | | } |
New file |
| | |
| | | package com.example.erp.controller.pp; |
| | | |
| | | import com.example.erp.common.Result; |
| | | import com.example.erp.service.pp.ReworkService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | @RestController |
| | | @RequestMapping("/rework") |
| | | public class ReworkController { |
| | | |
| | | @Autowired |
| | | ReworkService reworkService; |
| | | |
| | | @PostMapping("/query/{pageNum}/{pageSize}/{startTime}/{endTime}") |
| | | public Result queryRework(@PathVariable Integer pageNum, @PathVariable Integer pageSize, |
| | | @PathVariable String startTime,@PathVariable String endTime |
| | | ){ |
| | | |
| | | return Result.seccess(reworkService.queryRework(pageNum,pageSize,startTime,endTime,null)); |
| | | } |
| | | } |
| | |
| | | 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)); |
| | | } |
| | | } |
New file |
| | |
| | | package com.example.erp.entity.mm; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDate; |
| | | |
| | | @Data |
| | | public class BasicWarehouseType { |
| | | @TableId(type = IdType.AUTO) |
| | | |
| | | private Long id; |
| | | private Integer operateTypeId; |
| | | private String operateTypeName; |
| | | private String operateType; |
| | | private LocalDate createTime; |
| | | |
| | | |
| | | } |
| | |
| | | @TableId(type = IdType.AUTO) |
| | | |
| | | private Long id; |
| | | private Order order; |
| | | private OrderDetail orderDetail; |
| | | private String orderId; |
| | | private Integer orderNumber; |
| | | private Integer inventory ; |
| | | private Double actualSignalArea; |
| | | private Double area; |
| | |
| | | private LocalDate updateTime; |
| | | private LocalDate endTime; |
| | | |
| | | private Order order; |
| | | private OrderDetail orderDetail; |
| | | |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.example.erp.entity.sd.OrderDetail; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDate; |
| | |
| | | |
| | | private Long id; |
| | | private String operationOrderNumber; |
| | | private Long productNumber; |
| | | private String orderId; |
| | | private Integer operationNumber; |
| | | private Integer quantity; |
| | | private String operateType; |
| | | private String operator; |
| | | private LocalDate operateTime; |
| | | private String staterOperationOrderNumber; |
| | | private String endOperationOrderNumber;; |
| | | private String endOperationOrderNumber; |
| | | |
| | | private String status; |
| | | private Boolean isState; |
| | | private String reviewed; |
| | | private LocalDate reviewedTime; |
| | | private String type; |
| | | private String remarks; |
| | | |
| | | private OrderDetail orderDetail; |
| | | |
| | | |
| | | } |
| | |
| | | package com.example.erp.entity.pp; |
| | | |
| | | import com.example.erp.entity.sd.Order; |
| | | import com.example.erp.entity.sd.OrderDetail; |
| | | import com.example.erp.entity.sd.OrderGlassDetail; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDate; |
| | | |
| | | @Data |
| | | public class ReportingWorkDetail { |
| | |
| | | private Integer breakageNumber; |
| | | //次破原因 |
| | | private String breakageReason; |
| | | //类型 |
| | | private String breakageType; |
| | | //可利用 |
| | | private Integer available; |
| | | //退回工序 |
| | |
| | | //报工类型 |
| | | private Integer type; |
| | | |
| | | /*返工部分*/ |
| | | //返工班组 |
| | | private String reworkTeam; |
| | | //返工审核状态 |
| | | private Integer reviewerState; |
| | | //返工审核人 |
| | | private String reviewer; |
| | | //返工时间 |
| | | private LocalDate reworkTime; |
| | | //返工更新时间 |
| | | private LocalDate reworkUpdateTime; |
| | | //返工面积 |
| | | private double reworkArea; |
| | | |
| | | |
| | | //外键报工主表 |
| | | private ReportingWork reportingWork; |
| | | private Order order; |
| | | private OrderDetail orderDetail; |
| | | private OrderGlassDetail orderGlassDetail; |
| | | |
| | | } |
| | |
| | | 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 createrId; |
| | | private String saleManId; |
| | | private String saleMan; |
| | | private String creatorId; |
| | | private String creator; |
| | | private String contacts; |
| | | private String contactNumber; |
| | |
| | | private String remarks; |
| | | private LocalDate createTime; |
| | | private LocalDate updateTime; |
| | | private Order order; |
| | | private Customer customer; |
| | | |
| | | } |
| | |
| | | @TableId(type = IdType.AUTO) |
| | | |
| | | private Long id; |
| | | private String deliveryId; |
| | | private Integer deliveryNumber; |
| | | private String orderId; |
| | | private Integer orderNumber; |
| | | private Double area; |
| | | private String quantity; |
| | |
| | | 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 lombok.Data; |
| | | |
| | | import java.time.LocalDate; |
| | |
| | | @Data |
| | | public class OrderDetail { |
| | | @TableId(type = IdType.AUTO) |
| | | |
| | | private Long id; |
| | | |
| | | private String orderId; |
| | | private Integer orderNumber; |
| | | private String buildingNumber; |
| | | private Integer productId; |
| | |
| | | private Integer state; |
| | | private LocalDate createTime; |
| | | private LocalDate updateTime; |
| | | |
| | | private Order order; |
| | | private Delivery delivery; |
| | | private DeliveryDetail deliveryDetail; |
| | | private FinishedGoodsInventory finishedGoodsInventory; |
| | | //private Product product; |
| | | |
| | | } |
| | |
| | | @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.mm; |
| | | |
| | | import com.example.erp.entity.mm.BasicWarehouseType; |
| | | import com.example.erp.entity.pp.FlowCard; |
| | | import com.example.erp.entity.sd.OrderDetail; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springframework.data.repository.CrudRepository; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Mapper |
| | | public interface BasicWarehouseTypeMapper extends CrudRepository<BasicWarehouseType,Long> { |
| | | List<BasicWarehouseType> getBasicWarehouseTypeTakeOut(); |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | Integer getseletwarehousingPageTotal(Integer offset, Integer pageSize,FlowCard flowCard); |
| | | |
| | | Integer findOrderNumberdcount(Integer orderNumber); |
| | | Integer findOrderNumberdcount(@Param("orderId") String orderId, |
| | | @Param("orderNumber") Integer orderNumber); |
| | | |
| | | Boolean updateInventory(FlowCard flowCard); |
| | | Integer finishedGoodsInventorybycount(@Param("orderId") String orderId, |
| | | @Param("orderNumber") Integer orderNumber); |
| | | |
| | | Integer findOrderQuantity(String orderId); |
| | | |
| | | Integer findOrderNumberdsum(String orderId); |
| | | |
| | | Boolean updateInventory(@Param("flowCard") FlowCard flowCard, |
| | | @Param("storageRegion") String storageRegion, |
| | | @Param("remark") String remark); |
| | | |
| | | Boolean updateInventoryquantityavailable(@Param("orderDetail") OrderDetail orderDetail); |
| | | Boolean updateflowcard(FlowCard flowCard); |
| | | |
| | | Boolean updateIntOrderNumberConut( @Param("orderId") String orderId, |
| | | @Param("orderNumber") Integer orderNumber, |
| | | @Param("quantity") Integer quantity); |
| | | |
| | | Boolean updateOutOrderNumberConut( @Param("orderId") String orderId, |
| | | @Param("orderNumber") Integer orderNumber, |
| | | @Param("quantity") Integer quantity); |
| | | |
| | | |
| | | Boolean updateOrderWarehousingState(String orderId,Integer state); |
| | | |
| | | Boolean updateOrderDeliveryState(String orderId,Integer state); |
| | | |
| | | Boolean updateDeliveryDetailState(OrderDetail orderDetail,Integer state); |
| | | |
| | | Boolean insertFinishedGoodsInventory(@Param("flowCard") FlowCard flowCard, |
| | | @Param("storageRegion") String storageRegion, |
| | | @Param("remark") String remark); |
| | | |
| | | |
| | | List<OrderDetail> getseletdeliveryDetail(@Param("offset") Integer offset, |
| | | @Param("pageSize") Integer pageSize, |
| | | @Param("orderDetail") OrderDetail orderDetail); |
| | | |
| | | Integer getseletdeliveryDetailPageTotal(Integer offset, Integer pageSize,OrderDetail orderDetail); |
| | | |
| | | List<OrderDetail> getSelectAllocate(@Param("offset") Integer offset, |
| | | @Param("pageSize") Integer pageSize, |
| | | @Param("orderDetail") OrderDetail orderDetail); |
| | | |
| | | Integer getSelectAllocatePageTotal(Integer offset, Integer pageSize,OrderDetail orderDetail); |
| | | |
| | | Boolean updateInventoryquantityAllocateOut(@Param("orderId") String orderId, |
| | | @Param("orderNumber") Integer orderNumber, |
| | | @Param("quantity") Integer quantity); |
| | | Boolean updateInventoryquantityAllocateInt(@Param("orderId") String orderId, |
| | | @Param("orderNumber") Integer orderNumber, |
| | | @Param("quantity") Integer quantity); |
| | | } |
| | | |
| | | |
| | |
| | | import com.example.erp.entity.mm.FinishedGoodsInventory; |
| | | import com.example.erp.entity.mm.FinishedOperateLog; |
| | | import com.example.erp.entity.pp.FlowCard; |
| | | import com.example.erp.entity.sd.OrderDetail; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springframework.data.repository.CrudRepository; |
| | |
| | | public interface FinishedOperateLogMapper extends CrudRepository<FinishedOperateLog,Long> { |
| | | FinishedOperateLog getselectFinishedOperateLog(); |
| | | |
| | | Boolean insertFinishedOperateLog(FlowCard flowCard); |
| | | Boolean insertIntFinishedOperateLog(@Param("flowCard") FlowCard flowCard ,@Param("userName") String userName,@Param("oddNumber") String oddNumber); |
| | | |
| | | Boolean insertOutFinishedOperateLog(@Param("orderDetail") OrderDetail orderDetail,@Param("userName") String userName,@Param("oddNumber") String oddNumber); |
| | | |
| | | Boolean insertFinishedOperateLogAllocate(@Param("orderDetail") OrderDetail orderDetail,@Param("userName") String userName,@Param("oddNumber") String oddNumber); |
| | | |
| | | List<OrderDetail> getselectAllocateFinishedOperateLog(@Param("offset") Integer offset, |
| | | @Param("pageSize") Integer pageSize, |
| | | @Param("finishedOperateLog") FinishedOperateLog finishedOperateLog); |
| | | |
| | | Integer getselectAllocateFinishedOperateLogPageTotal(@Param("offset") Integer offset, |
| | | @Param("pageSize") Integer pageSize, |
| | | @Param("finishedOperateLog") FinishedOperateLog finishedOperateLog); |
| | | |
| | | Integer getmaximum(@Param("type") String type); |
| | | |
| | | Boolean insertFinishedOperateLogTakeOut(@Param("orderDetail") OrderDetail orderDetail, |
| | | @Param("userName") String userName, |
| | | @Param("oddNumber") String oddNumber, |
| | | @Param("operateType") String operateType, |
| | | @Param("remarks") String remarks); |
| | | |
| | | List<OrderDetail> getSelectOperateRecord(@Param("offset") Integer offset, |
| | | @Param("pageSize") Integer pageSize, |
| | | @Param("finishedOperateLog") FinishedOperateLog finishedOperateLog); |
| | | |
| | | Integer getSelectOperateRecordLogPageTotal(@Param("offset") Integer offset, |
| | | @Param("pageSize") Integer pageSize, |
| | | @Param("finishedOperateLog") FinishedOperateLog finishedOperateLog); |
| | | } |
New file |
| | |
| | | package com.example.erp.mapper.pp; |
| | | |
| | | |
| | | import com.example.erp.entity.pp.ReportingWorkDetail; |
| | | import com.example.erp.entity.pp.Rework; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Mapper |
| | | public interface ReportingWorkDetailMapper { |
| | | /*List<ReportingWorkDetail> getDetail();*/ |
| | | |
| | | /*查询返工新增数据*/ |
| | | List<ReportingWorkDetail> queryReworkAdd(@Param("pageNum") Integer pageNum, @Param("pageSize") Integer pageSize, |
| | | ReportingWorkDetail reportingWorkDetail); |
| | | |
| | | |
| | | /*查询返工数据*/ |
| | | List<ReportingWorkDetail> reworkDataManage(@Param("pageNum") Integer pageNum, @Param("pageSize") Integer pageSize, |
| | | @Param("sDate") String startTime,@Param("eDate") String endTime); |
| | | |
| | | List<ReportingWorkDetail> reworkDataManage2(@Param("pageNum") Integer pageNum, @Param("pageSize") Integer pageSize, |
| | | @Param("sDate") String startTime,@Param("eDate") String endTime,ReportingWorkDetail reportingWorkDetail); |
| | | |
| | | } |
New file |
| | |
| | | package com.example.erp.mapper.pp; |
| | | |
| | | import com.example.erp.entity.pp.Rework; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Mapper |
| | | public interface ReworkMapper { |
| | | |
| | | List<Rework> queryRework(@Param("offset") Integer offset,@Param("pageSize") Integer pageSiz,String startTime,String endTime,Rework rework); |
| | | } |
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.mm; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.example.erp.entity.mm.FinishedGoodsInventory; |
| | |
| | | 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.mm.BasicWarehouseTypeMapper; |
| | | import com.example.erp.mapper.mm.FinishedGoodsInventoryMapper; |
| | | import com.example.erp.mapper.mm.FinishedOperateLogMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.sql.SQLException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDate; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | |
| | | @Service |
| | | @DS("mm") |
| | |
| | | FinishedGoodsInventoryMapper finishedGoodsInventoryMapper; |
| | | @Autowired |
| | | FinishedOperateLogMapper finishedOperateLogMapper; |
| | | @Autowired |
| | | BasicWarehouseTypeMapper basicWarehouseTypeMapper; |
| | | |
| | | public Map<String,Object> defaultDateFinishedGoodsInventory(Integer pageNum, Integer pageSize,FinishedGoodsInventory finishedGoodsInventory) { |
| | | Integer offset = (pageNum-1)*pageSize; |
| | | Map<String,Object> map = new HashMap<>(); |
| | |
| | | return map; |
| | | } |
| | | |
| | | public Boolean addseletwarehousing(Map<String,Map<String,Object>> object) { |
| | | public Boolean addseletwarehousing(Map<String,Object> object) { |
| | | Boolean isinsert=false; |
| | | |
| | | Map<String,Object> maps= object.get("finishedGoodsInventory"); |
| | | String storageRegion= maps.get("storageRegion").toString(); |
| | | String remark= maps.get("remark").toString(); |
| | | JSONObject jsonObject = new JSONObject(object.get("flowcard")); |
| | | FlowCard flowCard = JSONObject.parseObject(JSONObject.toJSONString(jsonObject), FlowCard.class); |
| | | System.out.println("数据2:"+flowCard); |
| | | //定义前端传输的数据 |
| | | String storageRegion = ""; |
| | | String remark = ""; |
| | | if (object.get("remark") != null) { |
| | | remark = object.get("remark").toString(); |
| | | } |
| | | if (object.get("storageRegion") != null) { |
| | | storageRegion = object.get("storageRegion").toString(); |
| | | } |
| | | |
| | | String userName = ""; |
| | | String userId = ""; |
| | | if (object.get("userName") != null) { |
| | | userName = object.get("userName").toString(); |
| | | } |
| | | if (object.get("userId") != null) { |
| | | userId = object.get("userId").toString(); |
| | | } |
| | | |
| | | //获取对象集合循环进行新增修改 |
| | | List<FlowCard> flowCardlist = JSONArray.parseArray(JSONObject.toJSONString(object.get("flowcard")), FlowCard.class); |
| | | if (!flowCardlist.isEmpty()){ |
| | | for (FlowCard flowCard : flowCardlist) { |
| | | //获取单号 |
| | | String oddNumber= orderNumberSetting("入库"); |
| | | //添加出入库记录 |
| | | finishedOperateLogMapper.insertFinishedOperateLog(flowCard); |
| | | finishedOperateLogMapper.insertIntFinishedOperateLog(flowCard,userName,oddNumber); |
| | | System.out.println(flowCard.getOrder().getOrderId()); |
| | | Integer finishedGoodsInventorycount=finishedGoodsInventoryMapper.findOrderNumberdcount(flowCard.getOrderNumber()); |
| | | System.out.println("数量:"+finishedGoodsInventorycount); |
| | | Integer finishedGoodsInventorycount = finishedGoodsInventoryMapper.findOrderNumberdcount(flowCard.getOrder().getOrderId(),flowCard.getOrderNumber()); |
| | | Integer ordersum = finishedGoodsInventoryMapper.findOrderQuantity(flowCard.getOrder().getOrderId()); |
| | | Integer ordernumbersum = finishedGoodsInventoryMapper.findOrderNumberdsum(flowCard.getOrder().getOrderId()); |
| | | |
| | | System.out.println("订单总数:" + ordersum + "已入库数量:" + ordernumbersum + "准备入库数量" + flowCard.getInventoryQuantity()); |
| | | if(finishedGoodsInventorycount>0){ |
| | | finishedGoodsInventoryMapper.updateInventory(flowCard); |
| | | //修改库存表入库数量 |
| | | finishedGoodsInventoryMapper.updateInventory(flowCard,storageRegion, remark); |
| | | //修改流程卡表入库数量 |
| | | finishedGoodsInventoryMapper.updateflowcard(flowCard); |
| | | return true; |
| | | //修改订单明细表入库数量 |
| | | finishedGoodsInventoryMapper.updateIntOrderNumberConut(flowCard.getOrder().getOrderId(),flowCard.getOrderNumber(),flowCard.getInventoryQuantity()); |
| | | //判断订单是否全部入库 |
| | | if (ordersum == (ordernumbersum + flowCard.getInventoryQuantity())) { |
| | | //修改订单表入库状态 |
| | | finishedGoodsInventoryMapper.updateOrderWarehousingState(flowCard.getOrder().getOrderId(),2); |
| | | } |
| | | isinsert=true; |
| | | }else{ |
| | | if (finishedGoodsInventoryMapper.insertFinishedGoodsInventory(flowCard,storageRegion,remark)){ |
| | | //修改流程卡表入库数量 |
| | | finishedGoodsInventoryMapper.updateflowcard(flowCard); |
| | | return true; |
| | | //修改订单明细表入库数量 |
| | | finishedGoodsInventoryMapper.updateIntOrderNumberConut(flowCard.getOrder().getOrderId(),flowCard.getOrderNumber(),flowCard.getInventoryQuantity()); |
| | | //修改订单表入库状态 |
| | | finishedGoodsInventoryMapper.updateOrderWarehousingState(flowCard.getOrder().getOrderId(),1); |
| | | isinsert=true; |
| | | } else { |
| | | isinsert= false; |
| | | } |
| | | } |
| | | } |
| | | return isinsert; |
| | | }else{ |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | |
| | | /*Order order=finishedGoodsInventoryMapper.findOrderId(flowCard.getOrder().getOrderId()); |
| | | OrderDetail orderDetail=finishedGoodsInventoryMapper.findOrderNumber(flowCard.getOrderNumber());*/ |
| | | /*finishedGoodsInventory.setOrder(order); |
| | | finishedGoodsInventory.setOrderDetail(orderDetail); |
| | | finishedGoodsInventory.setInventory(flowCard.getInventoryQuantity()); |
| | | finishedGoodsInventory.setActualSignalArea(flowCard.getOrderDetail().getHeight()*flowCard.getOrderDetail().getWidth()); |
| | | finishedGoodsInventory.setArea(flowCard.getOrderDetail().getHeight()*flowCard.getOrderDetail().getWidth()*flowCard.getInventoryQuantity()); |
| | | finishedGoodsInventory.setQuantityAvailable(flowCard.getInventoryQuantity()); |
| | | finishedGoodsInventory.setWarehouseNumber(flowCard.getOrderDetail().getBuildingNumber()); |
| | | finishedGoodsInventory.setStorageRegion(flowCard.getOrderDetail().getBuildingNumber()); |
| | | finishedGoodsInventory.setStatus(0); |
| | | finishedGoodsInventory.setEnterStorageTime(LocalDate.now()); |
| | | finishedGoodsInventory.setUpdateTime(LocalDate.now()); |
| | | finishedGoodsInventory.setEndTime(null); |
| | | finishedGoodsInventory.setRemark("");*/ |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | public Map<String, Object> getseletdeliveryDetail(Integer pageNum, Integer pageSize, OrderDetail orderDetail) { |
| | | Integer offset = (pageNum - 1) * pageSize; |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", finishedGoodsInventoryMapper.getseletdeliveryDetail(offset, pageSize, orderDetail)); |
| | | map.put("total", finishedGoodsInventoryMapper.getseletdeliveryDetailPageTotal(offset, pageSize, orderDetail)); |
| | | return map; |
| | | } |
| | | |
| | | |
| | | public Boolean adddeliveryDetail(Map<String,Object> object) { |
| | | Boolean isinsert=false; |
| | | String userName = ""; |
| | | String userId = ""; |
| | | if (object.get("userName") != null) { |
| | | userName = object.get("userName").toString(); |
| | | } |
| | | if (object.get("userId") != null) { |
| | | userId = object.get("userId").toString(); |
| | | } |
| | | //获取对象集合循环进行新增修改 |
| | | List<OrderDetail> orderDetaillist = JSONArray.parseArray(JSONObject.toJSONString(object.get("orderDetail")), OrderDetail.class); |
| | | if (!orderDetaillist.isEmpty()){ |
| | | for (OrderDetail orderDetail : orderDetaillist) { |
| | | //获取单号 |
| | | String oddNumber= orderNumberSetting("出库"); |
| | | //添加出入库记录 |
| | | finishedOperateLogMapper.insertOutFinishedOperateLog(orderDetail,userName,oddNumber); |
| | | Integer finishedGoodsInventorycount = finishedGoodsInventoryMapper.findOrderNumberdcount(orderDetail.getDeliveryDetail().getOrderId(),orderDetail.getDeliveryDetail().getOrderNumber()); |
| | | System.out.println("数据3:"+finishedGoodsInventorycount); |
| | | Integer finishedGoodsInventorybycount=finishedGoodsInventoryMapper.finishedGoodsInventorybycount(orderDetail.getDeliveryDetail().getOrderId(),orderDetail.getDeliveryDetail().getOrderNumber()); |
| | | Integer ordersum = finishedGoodsInventoryMapper.findOrderQuantity(orderDetail.getDeliveryDetail().getOrderId()); |
| | | Integer ordernumbersum = finishedGoodsInventoryMapper.findOrderNumberdsum(orderDetail.getDeliveryDetail().getOrderId()); |
| | | |
| | | System.out.println("订单总数:" + ordersum + "订单剩余数量:" + ordernumbersum + "准备出库数量" + orderDetail.getWarehouseNum()+ "库存数量" + finishedGoodsInventorybycount); |
| | | if (finishedGoodsInventorycount > 0) { |
| | | if(Objects.equals(finishedGoodsInventorybycount, orderDetail.getWarehouseNum())){ |
| | | System.out.println(123); |
| | | //修改库存表出库数量 |
| | | finishedGoodsInventoryMapper.updateInventoryquantityavailable(orderDetail); |
| | | //修改发货明细表状态 |
| | | finishedGoodsInventoryMapper.updateDeliveryDetailState(orderDetail,0); |
| | | //修改订单明细表发货数量 |
| | | finishedGoodsInventoryMapper.updateOutOrderNumberConut(orderDetail.getDeliveryDetail().getOrderId(),orderDetail.getDeliveryDetail().getOrderNumber(),orderDetail.getWarehouseNum()); |
| | | //修改订单表发货状态 |
| | | finishedGoodsInventoryMapper.updateOrderDeliveryState(orderDetail.getDeliveryDetail().getOrderId(),1); |
| | | //判断订单是否全部发货 |
| | | if (0 == (ordernumbersum - orderDetail.getWarehouseNum())) { |
| | | //修改订单表发货状态 |
| | | finishedGoodsInventoryMapper.updateOrderDeliveryState(orderDetail.getDeliveryDetail().getOrderId(),2); |
| | | } |
| | | isinsert=true; |
| | | } |
| | | |
| | | } else { |
| | | isinsert=false; |
| | | } |
| | | } |
| | | return isinsert; |
| | | }else{ |
| | | return false; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | public Map<String, Object> getSelectAllocate(Integer pageNum, Integer pageSize, OrderDetail orderDetail) { |
| | | Integer offset = (pageNum - 1) * pageSize; |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", finishedGoodsInventoryMapper.getSelectAllocate(offset, pageSize, orderDetail)); |
| | | map.put("total", finishedGoodsInventoryMapper.getSelectAllocatePageTotal(offset, pageSize, orderDetail)); |
| | | map.put("type", basicWarehouseTypeMapper.getBasicWarehouseTypeTakeOut()); |
| | | return map; |
| | | } |
| | | |
| | | public Boolean updateFinishedGoodsInventoryAllocate(Map<String,Object> object) { |
| | | Boolean isinsert=false; |
| | | String userName = ""; |
| | | String userId = ""; |
| | | if (object.get("userName") != null) { |
| | | userName = object.get("userName").toString(); |
| | | } |
| | | if (object.get("userId") != null) { |
| | | userId = object.get("userId").toString(); |
| | | } |
| | | //获取对象集合循环进行新增修改 |
| | | List<OrderDetail> orderDetaillist = JSONArray.parseArray(JSONObject.toJSONString(object.get("orderDetail")), OrderDetail.class); |
| | | if (!orderDetaillist.isEmpty()){ |
| | | for (OrderDetail orderDetail : orderDetaillist) { |
| | | Integer oldordersum = finishedGoodsInventoryMapper.findOrderQuantity(orderDetail.getFinishedGoodsInventory().getOrderId()); |
| | | Integer oldordernumbersum = finishedGoodsInventoryMapper.findOrderNumberdsum(orderDetail.getFinishedGoodsInventory().getOrderId()); |
| | | |
| | | Integer newordersum = finishedGoodsInventoryMapper.findOrderQuantity(orderDetail.getOrderId()); |
| | | Integer newordernumbersum = finishedGoodsInventoryMapper.findOrderNumberdsum(orderDetail.getOrderId()); |
| | | |
| | | //获取单号 |
| | | String oddNumber= orderNumberSetting("调拨"); |
| | | //添加调拨记录 |
| | | finishedOperateLogMapper.insertFinishedOperateLogAllocate(orderDetail,userName,oddNumber); |
| | | //修改原订单的库存数量 |
| | | finishedGoodsInventoryMapper.updateInventoryquantityAllocateOut(orderDetail.getFinishedGoodsInventory().getOrderId(),orderDetail.getFinishedGoodsInventory().getOrderNumber(), Math.toIntExact(orderDetail.getQuantity())); |
| | | //修改调拨后订单的库存数量 |
| | | finishedGoodsInventoryMapper.updateInventoryquantityAllocateInt(orderDetail.getOrderId(),orderDetail.getOrderNumber(), Math.toIntExact(orderDetail.getQuantity())); |
| | | //修改原订单明细表发货数量 |
| | | finishedGoodsInventoryMapper.updateOutOrderNumberConut(orderDetail.getFinishedGoodsInventory().getOrderId(),orderDetail.getFinishedGoodsInventory().getOrderNumber(), Math.toIntExact(orderDetail.getQuantity())); |
| | | //修改调拨新订单明细表发货数量 |
| | | finishedGoodsInventoryMapper.updateIntOrderNumberConut(orderDetail.getOrderId(),orderDetail.getOrderNumber(), Math.toIntExact(orderDetail.getQuantity())); |
| | | if (newordersum==newordernumbersum+orderDetail.getQuantity()){ |
| | | //修改订单表入库状态 |
| | | finishedGoodsInventoryMapper.updateOrderWarehousingState(orderDetail.getOrderId(),2); |
| | | } |
| | | if (Objects.equals(oldordersum, oldordernumbersum)){ |
| | | //修改订单表入库状态 |
| | | finishedGoodsInventoryMapper.updateOrderWarehousingState(orderDetail.getFinishedGoodsInventory().getOrderId(),1); |
| | | } |
| | | isinsert=true; |
| | | } |
| | | return isinsert; |
| | | }else{ |
| | | return false; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | public Map<String, Object> getselectAllocateFinishedOperateLog(Integer pageNum, Integer pageSize, FinishedOperateLog finishedOperateLog) { |
| | | Integer offset = (pageNum - 1) * pageSize; |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", finishedOperateLogMapper.getselectAllocateFinishedOperateLog(offset, pageSize, finishedOperateLog)); |
| | | map.put("total", finishedOperateLogMapper.getselectAllocateFinishedOperateLogPageTotal(offset, pageSize, finishedOperateLog)); |
| | | return map; |
| | | } |
| | | |
| | | public Boolean updateFinishedGoodsInventoryTakeOut(Map<String,Object> object) { |
| | | Boolean isinsert=false; |
| | | String userName = ""; |
| | | String userId = ""; |
| | | if (object.get("userName") != null) { |
| | | userName = object.get("userName").toString(); |
| | | System.out.println(12344); |
| | | } |
| | | if (object.get("userId") != null) { |
| | | userId = object.get("userId").toString(); |
| | | } |
| | | |
| | | String operateType = ""; |
| | | String remarks = ""; |
| | | if (object.get("remarks") != null) { |
| | | remarks = object.get("remarks").toString(); |
| | | } |
| | | if (object.get("operateType") != null) { |
| | | operateType = object.get("operateType").toString(); |
| | | } |
| | | //获取对象集合循环进行新增修改 |
| | | List<OrderDetail> orderDetaillist = JSONArray.parseArray(JSONObject.toJSONString(object.get("orderDetail")), OrderDetail.class); |
| | | if (!orderDetaillist.isEmpty()){ |
| | | for (OrderDetail orderDetail : orderDetaillist) { |
| | | Integer oldordersum = finishedGoodsInventoryMapper.findOrderQuantity(orderDetail.getFinishedGoodsInventory().getOrderId()); |
| | | Integer oldordernumbersum = finishedGoodsInventoryMapper.findOrderNumberdsum(orderDetail.getFinishedGoodsInventory().getOrderId()); |
| | | |
| | | //获取单号 |
| | | String oddNumber= orderNumberSetting("领出"); |
| | | //添加领出记录 |
| | | finishedOperateLogMapper.insertFinishedOperateLogTakeOut(orderDetail,userName,oddNumber,operateType,remarks); |
| | | //修改库存数量 |
| | | finishedGoodsInventoryMapper.updateInventoryquantityAllocateOut(orderDetail.getFinishedGoodsInventory().getOrderId(),orderDetail.getFinishedGoodsInventory().getOrderNumber(), Math.toIntExact(orderDetail.getQuantity())); |
| | | //修改订单明细表数量 |
| | | finishedGoodsInventoryMapper.updateOutOrderNumberConut(orderDetail.getFinishedGoodsInventory().getOrderId(),orderDetail.getFinishedGoodsInventory().getOrderNumber(), Math.toIntExact(orderDetail.getQuantity())); |
| | | if (Objects.equals(oldordersum, oldordernumbersum)){ |
| | | //修改订单表入库状态 |
| | | finishedGoodsInventoryMapper.updateOrderWarehousingState(orderDetail.getFinishedGoodsInventory().getOrderId(),1); |
| | | } |
| | | isinsert=true; |
| | | } |
| | | return isinsert; |
| | | }else{ |
| | | return false; |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | public Map<String, Object> getselectTakeOutFinishedOperateLog(Integer pageNum, Integer pageSize, FinishedOperateLog finishedOperateLog) { |
| | | Integer offset = (pageNum - 1) * pageSize; |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", finishedOperateLogMapper.getselectAllocateFinishedOperateLog(offset, pageSize, finishedOperateLog)); |
| | | map.put("total", finishedOperateLogMapper.getselectAllocateFinishedOperateLogPageTotal(offset, pageSize, finishedOperateLog)); |
| | | return map; |
| | | } |
| | | |
| | | public Map<String, Object> getSelectOperateRecord(Integer pageNum, Integer pageSize, FinishedOperateLog finishedOperateLog) { |
| | | Integer offset = (pageNum - 1) * pageSize; |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", finishedOperateLogMapper.getSelectOperateRecord(offset, pageSize, finishedOperateLog)); |
| | | map.put("total", finishedOperateLogMapper.getSelectOperateRecordLogPageTotal(offset, pageSize, finishedOperateLog)); |
| | | return map; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | public String orderNumberSetting(String type) { |
| | | //根据类型自动生成不同的操作单号 |
| | | String alias=""; |
| | | if(Objects.equals(type, "入库")){ |
| | | alias="RK"; |
| | | }else if(Objects.equals(type, "出库")){ |
| | | alias="CK"; |
| | | }else if(Objects.equals(type, "调拨")){ |
| | | alias="DB"; |
| | | }else if(Objects.equals(type, "领出")){ |
| | | alias="LC"; |
| | | }else if(Objects.equals(type, "返工")){ |
| | | alias="FG"; |
| | | } |
| | | //查询当天的最大数量 |
| | | Integer maximum=finishedOperateLogMapper.getmaximum(type); |
| | | //设置两位不够补0 |
| | | String formattedNumber = String.format("%02d", maximum+1); |
| | | //格式化当前日期 |
| | | Date currentDate = new Date(); |
| | | SimpleDateFormat dateFormat = new SimpleDateFormat("yyMMdd"); |
| | | String formattedDate = dateFormat.format(currentDate); |
| | | String oddNumbers = alias+formattedDate+formattedNumber; |
| | | return oddNumbers; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | public Map<String, Object> selectProcessCard(Date selectTime1, Date selectTime2, FlowCard flowCard) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | // System.out.println(flowCardMapper.selectFlowCard( selectTime1,selectTime2, flowCard)); |
| | | System.out.println(flowCardMapper.selectFlowCard( selectTime1,selectTime2, flowCard)); |
| | | map.put("data", flowCardMapper.selectFlowCard( selectTime1,selectTime2, flowCard)); |
| | | // map.put("total", productMapper.getPageTotal(offset, pageSize, glassTypeId, product)); |
| | | return map; |
New file |
| | |
| | | package com.example.erp.service.pp; |
| | | |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.example.erp.entity.pp.ReportingWorkDetail; |
| | | import com.example.erp.mapper.pp.ReportingWorkDetailMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | @Service |
| | | @DS("pp") |
| | | public class ReportWorkService { |
| | | |
| | | @Autowired |
| | | ReportingWorkDetailMapper reportingWorkDetailMapper; |
| | | |
| | | /*获取返工新增功能数据*/ |
| | | public Map<String,Object> queryRework (Integer pageNum, Integer pageSize,ReportingWorkDetail reportingWorkDetail ) { |
| | | Integer offset = (pageNum-1)*pageSize; |
| | | |
| | | Map<String,Object> map = new HashMap<>(); |
| | | map.put("data",reportingWorkDetailMapper.queryReworkAdd(offset,pageSize, reportingWorkDetail)); |
| | | return map; |
| | | }; |
| | | |
| | | |
| | | |
| | | /*获取返工管理数据*/ |
| | | public Map<String,Object> reworkMangageData (Integer pageNum, Integer pageSize,String startTime,String endTime) { |
| | | Integer offset = (pageNum-1)*pageSize; |
| | | |
| | | Map<String,Object> map = new HashMap<>(); |
| | | map.put("data",reportingWorkDetailMapper.reworkDataManage(offset,pageSize,startTime,endTime)); |
| | | return map; |
| | | }; |
| | | |
| | | /*获取返工管理数据*/ |
| | | public Map<String,Object> reworkMangageData2 (Integer pageNum, Integer pageSize,String startTime,String endTime,ReportingWorkDetail reportingWorkDetail ) { |
| | | Integer offset = (pageNum-1)*pageSize; |
| | | |
| | | Map<String,Object> map = new HashMap<>(); |
| | | map.put("data",reportingWorkDetailMapper.reworkDataManage2(offset,pageSize,startTime,endTime, reportingWorkDetail)); |
| | | return map; |
| | | }; |
| | | } |
New file |
| | |
| | | package com.example.erp.service.pp; |
| | | |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.example.erp.entity.pp.Rework; |
| | | import com.example.erp.mapper.pp.ReworkMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | |
| | | @Service |
| | | @DS("pp") |
| | | public class ReworkService { |
| | | @Autowired |
| | | ReworkMapper reworkMapper; |
| | | |
| | | /*查询返工数据*/ |
| | | public Map<String,Object> queryRework(Integer pageNum, Integer pageSize,String startTime,String endTime,Rework rework) { |
| | | Integer offset = (pageNum-1)*pageSize; |
| | | |
| | | Map<String,Object> map = new HashMap<>(); |
| | | map.put("data",reworkMapper.queryRework(offset,pageSize,startTime,endTime,rework)); |
| | | return map; |
| | | } |
| | | } |
| | | |
| | |
| | | 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); |
| | | try{ |
| | | if(order.getOrderId() == null || order.getOrderId().isEmpty()){ |
| | | insertOrder(order,OrderDetails); |
| | | }else { |
| | | saveState = updateOrder(order,OrderDetails); |
| | | 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; |
| | | |
| | | |
| | | |
| | | |
| | | return false; |
| | | //throw new Exception(); |
| | | } |
| | | @Transactional |
| | | public boolean insertOrder(Order order,List<OrderDetail> OrderDetails) { |
| | | return saveState; |
| | | } |
| | | //生成订单数据 |
| | | 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 |
| | |
| | | <?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.mm.BasicWarehouseTypeMapper"> |
| | | |
| | | <select id="getBasicWarehouseTypeTakeOut" > |
| | | select * from mm.basic_warehouse_type where operate_type='领出'; |
| | | </select> |
| | | |
| | | |
| | | |
| | | |
| | | </mapper> |
| | |
| | | "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="order_id" property="order.orderId"/> |
| | | <result column="project" property="order.project"/> |
| | | <result column="creater" property="order.creater"/> |
| | | <result column="creator" property="order.creator"/> |
| | | <result column="area" property="order.area"/> |
| | | <result column="batch" property="order.batch"/> |
| | | <result column="order_quantity" property="order.quantity"/> |
| | | |
| | | <result column="building_number" property="orderDetail.buildingNumber"/> |
| | | <result column="width" property="orderDetail.width"/> |
| | |
| | | <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"/> |
| | | <result column="width" property="width"/> |
| | | <result column="height" property="height"/> |
| | | <result column="product_name" property="productName"/> |
| | | <result column="product_id" property="productId"/> |
| | | <result column="warehouse_num" property="warehouseNum"/> |
| | | |
| | | <result column="order_number" property="deliveryDetail.orderNumber"/> |
| | | <result column="delivery_id" property="deliveryDetail.deliveryId"/> |
| | | <result column="delivery_number" property="deliveryDetail.deliveryNumber"/> |
| | | <result column="delivery_detail_remakes" property="deliveryDetail.deliveryDetailRemakes"/> |
| | | <result column="order_id" property="deliveryDetail.orderId"/> |
| | | <result column="create_time" property="deliveryDetail.createTime"/> |
| | | |
| | | <result column="project" property="order.project"/> |
| | | |
| | | <result column="creator" property="delivery.creator"/> |
| | | <result column="customer_name" property="delivery.customerName"/> |
| | | <result column="quantity" property="delivery.quantity"/> |
| | | <result column="area" property="delivery.area"/> |
| | | |
| | | |
| | | </resultMap> |
| | | |
| | | <!--映射订单调拨--> |
| | | <resultMap id="selectDeliveryFinishedGoodsInventory" type="com.example.erp.entity.sd.OrderDetail"> |
| | | |
| | | <result column="width" property="width"/> |
| | | <result column="height" property="height"/> |
| | | <result column="product_name" property="productName"/> |
| | | <result column="product_id" property="productId"/> |
| | | |
| | | <result column="order_id" property="finishedGoodsInventory.orderId"/> |
| | | <result column="order_number" property="finishedGoodsInventory.orderNumber"/> |
| | | <result column="quantity_available" property="finishedGoodsInventory.quantityAvailable"/> |
| | | <result column="actual_signal_area" property="finishedGoodsInventory.actualSignalArea"/> |
| | | <result column="area" property="finishedGoodsInventory.area"/> |
| | | <result column="storage_region" property="finishedGoodsInventory.storageRegion"/> |
| | | |
| | | <result column="project" property="order.project"/> |
| | | <result column="customer_id" property="order.customerId"/> |
| | | <result column="customer_name" property="order.customerName"/> |
| | | |
| | | |
| | | </resultMap> |
| | | <update id="updateInventoryquantityAllocateInt"> |
| | | update mm.finished_goods_inventory |
| | | set inventory=inventory+#{quantity},quantity_available=quantity_available+#{quantity}, |
| | | update_time=now(),area=actual_signal_area*quantity_available |
| | | where order_number=#{orderNumber} and order_id=#{orderId} |
| | | </update> |
| | | |
| | | <update id="updateInventoryquantityAllocateOut"> |
| | | update mm.finished_goods_inventory |
| | | set inventory=inventory-#{quantity},quantity_available=quantity_available-#{quantity}, |
| | | update_time=now(),area=actual_signal_area*quantity_available |
| | | where order_number=#{orderNumber} and order_id=#{orderId} |
| | | </update> |
| | | |
| | | <select id="getSelectAllocate" resultMap="selectDeliveryFinishedGoodsInventory"> |
| | | select fgi.order_id, |
| | | o.project, |
| | | fgi.order_number, |
| | | fgi.quantity_available, |
| | | od.product_id, |
| | | od.product_name, |
| | | od.width, |
| | | od.height, |
| | | o.customer_id, |
| | | o.customer_name, |
| | | fgi.actual_signal_area, |
| | | fgi.area, |
| | | fgi.storage_region |
| | | from mm.finished_goods_inventory fgi |
| | | left join sd.order_detail od on fgi.order_id = od.order_id and fgi.order_number = od.order_number |
| | | left join sd.`order` o on fgi.order_id = o.order_id |
| | | <where> |
| | | and fgi.quantity_available>0 |
| | | <if test="orderDetail.finishedGoodsInventory.orderId != null and orderDetail.finishedGoodsInventory.orderId != ''"> |
| | | and fgi.order_id regexp #{orderDetail.finishedGoodsInventory.orderId} |
| | | </if> |
| | | <if test="orderDetail.order.project != null and orderDetail.order.project != ''"> |
| | | and o.project regexp #{orderDetail.order.project} |
| | | </if> |
| | | <if test="orderDetail.finishedGoodsInventory.orderNumber != null and orderDetail.finishedGoodsInventory.orderNumber != ''"> |
| | | and fgi.order_number regexp #{orderDetail.finishedGoodsInventory.orderNumber} |
| | | </if> |
| | | <if test="orderDetail.finishedGoodsInventory.quantityAvailable != null and orderDetail.finishedGoodsInventory.quantityAvailable != ''"> |
| | | and fgi.quantity_available regexp #{orderDetail.finishedGoodsInventory.quantityAvailable} |
| | | </if> |
| | | <if test="orderDetail.productId != null and orderDetail.productId != ''"> |
| | | and od.product_id regexp #{orderDetail.productId} |
| | | </if> |
| | | <if test="orderDetail.productName != null and orderDetail.productName != ''"> |
| | | and od.product_name regexp #{orderDetail.productName} |
| | | </if> |
| | | <if test="orderDetail.width != null and orderDetail.width != ''"> |
| | | and od.width regexp #{orderDetail.width} |
| | | </if> |
| | | <if test="orderDetail.height != null and orderDetail.height != ''"> |
| | | and od.height regexp #{orderDetail.height} |
| | | </if> |
| | | <if test="orderDetail.order.customerId != null and orderDetail.order.customerId != ''"> |
| | | and o.customer_id regexp #{orderDetail.order.customerId} |
| | | </if> |
| | | <if test="orderDetail.order.customerName != null and orderDetail.order.customerName != ''"> |
| | | and o.customer_name regexp #{orderDetail.order.customerName} |
| | | </if> |
| | | <if test="orderDetail.finishedGoodsInventory.actualSignalArea != null and orderDetail.finishedGoodsInventory.actualSignalArea != ''"> |
| | | and fgi.actual_signal_area regexp #{orderDetail.finishedGoodsInventory.actualSignalArea} |
| | | </if> |
| | | <if test="orderDetail.finishedGoodsInventory.area != null and orderDetail.finishedGoodsInventory.area != ''"> |
| | | and fgi.area regexp #{orderDetail.finishedGoodsInventory.area} |
| | | </if> |
| | | <if test="orderDetail.finishedGoodsInventory.storageRegion != null and orderDetail.finishedGoodsInventory.storageRegion != ''"> |
| | | and fgi.storage_region regexp #{orderDetail.finishedGoodsInventory.storageRegion} |
| | | </if> |
| | | </where> |
| | | group by fgi.order_id, fgi.order_number |
| | | |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | <select id="getSelectAllocatePageTotal" > |
| | | select CEILING(count(zu.order_number)/#{pageSize}) from |
| | | (select fgi.order_number as order_number |
| | | from mm.finished_goods_inventory fgi |
| | | left join sd.order_detail od on fgi.order_id = od.order_id and fgi.order_number = od.order_number |
| | | left join sd.`order` o on fgi.order_id = o.order_id |
| | | group by fgi.order_id, fgi.order_number) as zu |
| | | |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | <update id="updateDeliveryDetailState"> |
| | | update sd.delivery_detail |
| | | set delivery_detail_state=#{state} |
| | | where order_number=#{orderDetail.deliveryDetail.orderNumber} and order_id=#{orderDetail.deliveryDetail.orderId} |
| | | </update> |
| | | |
| | | <update id="updateInventoryquantityavailable"> |
| | | update mm.finished_goods_inventory |
| | | set inventory=0,quantity_available=0, |
| | | update_time=now(),area=0,status=1 |
| | | where order_number=#{orderDetail.deliveryDetail.orderNumber} and order_id=#{orderDetail.deliveryDetail.orderId} |
| | | </update> |
| | | |
| | | |
| | | <select id="getseletdeliveryDetailPageTotal" > |
| | | select CEILING(count(dd.id)/#{pageSize}) |
| | | from sd.delivery_detail dd |
| | | left join sd.delivery d on dd.delivery_id = d.delivery_id |
| | | left join sd.order_detail od on od.order_id = dd.order_id and dd.order_number = od.order_number |
| | | left join sd.`order` o on o.order_id = dd.order_id |
| | | <where> |
| | | <if test="orderDetail.deliveryDetail.deliveryId != null and orderDetail.deliveryDetail.deliveryId != ''"> |
| | | and dd.delivery_id regexp #{orderDetail.deliveryDetail.deliveryId} |
| | | </if> |
| | | <if test="orderDetail.deliveryDetail.orderId != null and orderDetail.deliveryDetail.orderId != ''"> |
| | | and dd.order_id regexp #{orderDetail.deliveryDetail.orderId} |
| | | </if> |
| | | <if test="orderDetail.order.project != null and orderDetail.order.project != ''"> |
| | | and o.project regexp #{orderDetail.order.project} |
| | | </if> |
| | | <if test="orderDetail.productId != null and orderDetail.productId != ''"> |
| | | and od.product_id regexp #{orderDetail.productId} |
| | | </if> |
| | | <if test="orderDetail.productName != null and orderDetail.productName != ''"> |
| | | and od.product_name regexp #{orderDetail.productName} |
| | | </if> |
| | | <if test="orderDetail.delivery.customerName != null and orderDetail.delivery.customerName != ''"> |
| | | and d.customer_name regexp #{orderDetail.delivery.customerName} |
| | | </if> |
| | | <if test="orderDetail.width != null and orderDetail.width != ''"> |
| | | and od.width regexp #{orderDetail.width} |
| | | </if> |
| | | <if test="orderDetail.height != null and orderDetail.height != ''"> |
| | | and od.height regexp #{orderDetail.height} |
| | | </if> |
| | | <if test="orderDetail.delivery.quantity != null and orderDetail.delivery.quantity != ''"> |
| | | and d.quantity regexp #{orderDetail.delivery.quantity} |
| | | </if> |
| | | <if test="orderDetail.warehouseNum != null and orderDetail.warehouseNum != ''"> |
| | | and od.warehouseNum regexp #{orderDetail.warehouseNum} |
| | | </if> |
| | | <if test="orderDetail.buildingNumber != null and orderDetail.buildingNumber != ''"> |
| | | and od.building_number regexp #{orderDetail.buildingNumber} |
| | | </if> |
| | | <if test="orderDetail.delivery.area != null and orderDetail.delivery.area != ''"> |
| | | and d.area regexp #{orderDetail.delivery.area} |
| | | </if> |
| | | <if test="orderDetail.deliveryDetail.orderNumber != null and orderDetail.deliveryDetail.orderNumber != ''"> |
| | | and dd.order_number regexp #{orderDetail.deliveryDetail.orderNumber} |
| | | </if> |
| | | <if test="orderDetail.delivery.creator != null and orderDetail.delivery.creator != ''"> |
| | | and d.creator regexp #{orderDetail.delivery.creator} |
| | | </if> |
| | | <if test="orderDetail.deliveryDetail.createTime != null and orderDetail.deliveryDetail.createTime != ''"> |
| | | and dd.create_time regexp #{orderDetail.deliveryDetail.createTime} |
| | | </if> |
| | | <if test="orderDetail.deliveryDetail.deliveryDetailRemakes != null and orderDetail.deliveryDetail.deliveryDetailRemakes != ''"> |
| | | and dd.delivery_detail_remakes regexp #{orderDetail.deliveryDetail.deliveryDetailRemakes} |
| | | </if> |
| | | </where> |
| | | order by dd.id |
| | | |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | <select id="getseletdeliveryDetail" resultMap="selectDelivery"> |
| | | select dd.delivery_id, |
| | | dd.order_number, |
| | | dd.order_id, |
| | | o.project, |
| | | od.product_id, |
| | | od.product_name, |
| | | d.customer_name, |
| | | od.width, |
| | | od.height, |
| | | d.quantity, |
| | | od.warehouse_num, |
| | | d.area, |
| | | od.building_number, |
| | | d.creator, |
| | | dd.delivery_detail_remakes, |
| | | dd.create_time |
| | | from sd.delivery_detail dd |
| | | left join sd.delivery d on dd.delivery_id = d.delivery_id |
| | | left join sd.order_detail od on od.order_id = dd.order_id and dd.order_number = od.order_number |
| | | left join sd.`order` o on o.order_id = dd.order_id where dd.delivery_detail_state=1 |
| | | |
| | | <where> |
| | | <if test="orderDetail.deliveryDetail.deliveryId != null and orderDetail.deliveryDetail.deliveryId != ''"> |
| | | and dd.delivery_id regexp #{orderDetail.deliveryDetail.deliveryId} |
| | | </if> |
| | | <if test="orderDetail.deliveryDetail.orderId != null and orderDetail.deliveryDetail.orderId != ''"> |
| | | and dd.order_id regexp #{orderDetail.deliveryDetail.orderId} |
| | | </if> |
| | | <if test="orderDetail.order.project != null and orderDetail.order.project != ''"> |
| | | and o.project regexp #{orderDetail.order.project} |
| | | </if> |
| | | <if test="orderDetail.productId != null and orderDetail.productId != ''"> |
| | | and od.product_id regexp #{orderDetail.productId} |
| | | </if> |
| | | <if test="orderDetail.productName != null and orderDetail.productName != ''"> |
| | | and od.product_name regexp #{orderDetail.productName} |
| | | </if> |
| | | <if test="orderDetail.delivery.customerName != null and orderDetail.delivery.customerName != ''"> |
| | | and d.customer_name regexp #{orderDetail.delivery.customerName} |
| | | </if> |
| | | <if test="orderDetail.width != null and orderDetail.width != ''"> |
| | | and od.width regexp #{orderDetail.width} |
| | | </if> |
| | | <if test="orderDetail.height != null and orderDetail.height != ''"> |
| | | and od.height regexp #{orderDetail.height} |
| | | </if> |
| | | <if test="orderDetail.delivery.quantity != null and orderDetail.delivery.quantity != ''"> |
| | | and d.quantity regexp #{orderDetail.delivery.quantity} |
| | | </if> |
| | | <if test="orderDetail.warehouseNum != null and orderDetail.warehouseNum != ''"> |
| | | and od.warehouseNum regexp #{orderDetail.warehouseNum} |
| | | </if> |
| | | <if test="orderDetail.buildingNumber != null and orderDetail.buildingNumber != ''"> |
| | | and od.building_number regexp #{orderDetail.buildingNumber} |
| | | </if> |
| | | <if test="orderDetail.delivery.area != null and orderDetail.delivery.area != ''"> |
| | | and d.area regexp #{orderDetail.delivery.area} |
| | | </if> |
| | | <if test="orderDetail.deliveryDetail.orderNumber != null and orderDetail.deliveryDetail.orderNumber != ''"> |
| | | and dd.order_number regexp #{orderDetail.deliveryDetail.orderNumber} |
| | | </if> |
| | | <if test="orderDetail.delivery.creator != null and orderDetail.delivery.creator != ''"> |
| | | and d.creator regexp #{orderDetail.delivery.creator} |
| | | </if> |
| | | <if test="orderDetail.deliveryDetail.createTime != null and orderDetail.deliveryDetail.createTime != ''"> |
| | | and dd.create_time regexp #{orderDetail.deliveryDetail.createTime} |
| | | </if> |
| | | <if test="orderDetail.deliveryDetail.deliveryDetailRemakes != null and orderDetail.deliveryDetail.deliveryDetailRemakes != ''"> |
| | | and dd.delivery_detail_remakes regexp #{orderDetail.deliveryDetail.deliveryDetailRemakes} |
| | | </if> |
| | | </where> |
| | | |
| | | order by dd.id |
| | | |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | <select id="findOrderQuantity" > |
| | | select quantity from sd.`order` where order_id=#{orderId} |
| | | </select> |
| | | |
| | | <select id="findOrderNumberdsum" > |
| | | select sum(warehouse_num) from sd.order_detail where order_id=#{orderId} |
| | | </select> |
| | | |
| | | <update id="updateOrderWarehousingState"> |
| | | update sd.`order` |
| | | set warehousing=#{state} |
| | | where order_id=#{orderId} |
| | | </update> |
| | | |
| | | <update id="updateOrderDeliveryState"> |
| | | update sd.`order` |
| | | set delivery=#{state} |
| | | where order_id=#{orderId} |
| | | </update> |
| | | |
| | | <update id="updateIntOrderNumberConut"> |
| | | update sd.order_detail |
| | | set warehouse_num=warehouse_num+${quantity} |
| | | where order_number=#{orderNumber} and order_id=#{orderId} |
| | | </update> |
| | | |
| | | <update id="updateOutOrderNumberConut"> |
| | | update sd.order_detail |
| | | set warehouse_num=warehouse_num-${quantity} |
| | | where order_number=#{orderNumber} and order_id=#{orderId} |
| | | </update> |
| | | |
| | | <update id="updateflowcard"> |
| | | update pp.flow_card |
| | | set received_quantity=received_quantity+${inventoryQuantity} |
| | | where order_number=#{orderNumber} and process_id=#{processId} |
| | | where order_number=#{orderNumber} and process_id=#{processId} and order_id=#{order.orderId} |
| | | </update> |
| | | |
| | | <update id="updateInventory"> |
| | | update mm.finished_goods_inventory |
| | | set inventory=inventory+${inventoryQuantity},quantity_available=quantity_available+${inventoryQuantity}, |
| | | update_time=now(),area=area+actual_signal_area*${inventoryQuantity} |
| | | where order_number=#{orderNumber} |
| | | set inventory=inventory+${flowCard.inventoryQuantity},quantity_available=quantity_available+${flowCard.inventoryQuantity}, |
| | | update_time=now(),area=actual_signal_area*quantity_available |
| | | <if test="storageRegion != null and storageRegion != ''"> |
| | | , storage_region= #{storageRegion} |
| | | </if> |
| | | <if test="remark != null and remark != ''"> |
| | | , remark= #{remark} |
| | | </if> |
| | | where order_number=#{flowCard.orderNumber} and order_id=#{flowCard.order.orderId} |
| | | </update> |
| | | |
| | | <insert id="insertFinishedGoodsInventory" useGeneratedKeys="true" > |
| | |
| | | <select id="findOrderNumberdcount" > |
| | | select count(*) |
| | | from mm.`finished_goods_inventory` |
| | | where order_number = #{orderNumber} |
| | | where order_number = #{orderNumber} and order_id=#{orderId}; |
| | | |
| | | </select> |
| | | |
| | | <select id="findOrderNumberd" > |
| | | select * |
| | | from sd.finished_goods_inventory |
| | | where order_number = #{orderNumber} |
| | | <select id="finishedGoodsInventorybycount" > |
| | | select quantity_available |
| | | from mm.`finished_goods_inventory` |
| | | where order_number = #{orderNumber} and order_id=#{orderId}; |
| | | |
| | | </select> |
| | | |
| | | |
| | | <select id="getseletwarehousing" resultMap="selectFlowCard"> |
| | | select |
| | |
| | | od.product_name, |
| | | od.width, |
| | | od.height, |
| | | o.creater, |
| | | o.creator, |
| | | o.project, |
| | | fc.order_number, |
| | | od.quantity, |
| | |
| | | fc.process_id, |
| | | fc.received_quantity, |
| | | o.batch |
| | | from pp.flow_card fc left join sd.order_detail od on fc.order_number=od.order_number inner join sd.`order` o on |
| | | from pp.flow_card fc left join sd.order_detail od on fc.order_id=od.order_id and fc.order_number=od.order_number inner join sd.`order` o on |
| | | o.order_id=fc.order_id |
| | | <where> |
| | | and fc.received_quantity <![CDATA[<]]> fc.inventory_quantity |
| | |
| | | <if test="flowCard.orderDetail.height != null and flowCard.orderDetail.height != ''"> |
| | | and od.height regexp #{flowCard.orderDetail.height} |
| | | </if> |
| | | <if test="flowCard.order.creater != null and flowCard.order.creater != ''"> |
| | | and o.creater regexp #{flowCard.order.creater} |
| | | <if test="flowCard.order.creator != null and flowCard.order.creator != ''"> |
| | | and o.creator regexp #{flowCard.order.creator} |
| | | </if> |
| | | <if test="flowCard.order.project != null and flowCard.order.project != ''"> |
| | | and o.project regexp #{flowCard.order.project} |
| | |
| | | </if> |
| | | |
| | | </where> |
| | | group by fc.order_number,fc.process_id order by fc.create_time |
| | | group by fc.order_id,fc.order_number,fc.process_id order by fc.create_time |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | <select id="getseletwarehousingPageTotal" > |
| | | select CEILING(count(zu.order_number)/#{pageSize}) from ( |
| | | select fc.order_number as order_number,fc.process_id from pp.flow_card fc left join sd.order_detail od on |
| | | fc.order_number=od.order_number inner join sd.`order` o on o.order_id=fc.order_id |
| | | fc.order_id=od.order_id and fc.order_number=od.order_number inner join sd.`order` o on o.order_id=fc.order_id |
| | | <where> |
| | | and fc.received_quantity <![CDATA[<]]> fc.inventory_quantity |
| | | <if test="flowCard.order.orderId != null and flowCard.order.orderId != ''"> |
| | |
| | | <if test="flowCard.orderDetail.height != null and flowCard.orderDetail.height != ''"> |
| | | and od.height regexp #{flowCard.orderDetail.height} |
| | | </if> |
| | | <if test="flowCard.order.creater != null and flowCard.order.creater != ''"> |
| | | and o.creater regexp #{flowCard.order.creater} |
| | | <if test="flowCard.order.creator != null and flowCard.order.creator != ''"> |
| | | and o.creator regexp #{flowCard.order.creator} |
| | | </if> |
| | | <if test="flowCard.order.project != null and flowCard.order.project != ''"> |
| | | and o.project regexp #{flowCard.order.project} |
| | |
| | | </if> |
| | | |
| | | </where> |
| | | group by fc.order_number,fc.process_id order by fc.create_time) as zu |
| | | group by fc.order_id,fc.order_number,fc.process_id order by fc.create_time) as zu |
| | | </select> |
| | | |
| | | |
| | |
| | | fgi.end_time, |
| | | fgi.remark |
| | | from finished_goods_inventory fgi |
| | | left join sd.order_detail od on fgi.order_number = od.order_number |
| | | inner join sd.`order` o on fgi.order_id = o.order_id |
| | | left join sd.order_detail od on fgi.order_id = od.order_id and fgi.order_number = od.order_number |
| | | left join sd.`order` o on fgi.order_id = o.order_id |
| | | <where> |
| | | and fgi.status = 0 and fgi.quantity_available>0 |
| | | <if test="finishedGoodsInventory.orderDetail.width != null and finishedGoodsInventory.orderDetail.width != ''"> |
| | | and od.width regexp #{finishedGoodsInventory.orderDetail.width} |
| | | </if> |
| | |
| | | select |
| | | CEILING(count(fgi.id)/#{pageSize}) |
| | | from finished_goods_inventory fgi |
| | | left join sd.order_detail od on fgi.order_number = od.order_number |
| | | inner join sd.`order` o on fgi.order_id = o.order_id |
| | | left join sd.order_detail od on fgi.order_id = od.order_id and fgi.order_number = od.order_number |
| | | left join sd.`order` o on fgi.order_id = o.order_id |
| | | <where> |
| | | and fgi.status = 0 and fgi.quantity_available>0 |
| | | <if test="finishedGoodsInventory.orderDetail.width != null and finishedGoodsInventory.orderDetail.width != ''"> |
| | | and od.width regexp #{finishedGoodsInventory.orderDetail.width} |
| | | </if> |
| | |
| | | <resultMap id="selectFinishedGoodsInventory" type="com.example.erp.entity.mm.FinishedOperateLog" > |
| | | <id column="id" property="id"/> |
| | | <result column="operation_order_number" property="operationOrderNumber"/> |
| | | <result column="product_number" property="productNumber"/> |
| | | <result column="order_id" property="orderId"/> |
| | | <result column="operation_number" property="operationNumber"/> |
| | | <result column="quantity" property="quantity"/> |
| | | <result column="operate_type" property="operateType"/> |
| | | <result column="operator" property="operator"/> |
| | | <result column="operate_time" property="operateTime"/> |
| | | <result column="stater_operation_order_number" property="staterOperationOrderNumber"/> |
| | | <result column="end_operation_order_number" property="endOperationOrderNumber"/> |
| | | <result column="status" property="status"/> |
| | | <result column="type" property="type"/> |
| | | <result column="reviewed" property="reviewed"/> |
| | | <result column="reviewed_time" property="reviewedTime"/> |
| | | <result column="remarks" property="remarks"/> |
| | | <result column="is_state" property="isState"/> |
| | | |
| | | <!--<result column="g_typeId" property="glassTypes.typeId"/> |
| | | <result column="g_type" property="glassTypes.type"/>--> |
| | | <result column="width" property="orderDetail.width"/> |
| | | <result column="height" property="orderDetail.height"/> |
| | | <result column="product_id" property="orderDetail.productId"/> |
| | | <result column="product_name" property="orderDetail.productName"/> |
| | | |
| | | </resultMap> |
| | | |
| | | <select id="getSelectOperateRecord" resultMap="selectFinishedGoodsInventory"> |
| | | select fol.operation_order_number, |
| | | fol.order_id, |
| | | fol.operation_number, |
| | | fol.quantity, |
| | | fol.operator, |
| | | od.product_id, |
| | | od.product_name, |
| | | od.width, |
| | | od.height, |
| | | fol.operate_time, |
| | | fol.`status`, |
| | | fol.is_state, |
| | | fol.reviewed, |
| | | fol.reviewed_time, |
| | | fol.type, |
| | | fol.remarks |
| | | from (select * |
| | | from mm.finished_operate_log aa where aa.operate_type = '领出' or aa.operate_type = '返工') fol |
| | | left join sd.order_detail od on fol.order_id = od.order_id and fol.operation_number = od.order_number |
| | | <where> |
| | | <if test="finishedOperateLog.operationOrderNumber != null and finishedOperateLog.operationOrderNumber != ''"> |
| | | and fol.operation_order_number regexp #{finishedOperateLog.operationOrderNumber} |
| | | </if> |
| | | <if test="finishedOperateLog.orderId != null and finishedOperateLog.orderId != ''"> |
| | | and fol.order_id regexp #{finishedOperateLog.orderId} |
| | | </if> |
| | | <if test="finishedOperateLog.operationNumber != null and finishedOperateLog.operationNumber != ''"> |
| | | and fol.operation_number regexp #{finishedOperateLog.operationNumber} |
| | | </if> |
| | | <if test="finishedOperateLog.quantity != null and finishedOperateLog.quantity != ''"> |
| | | and fol.quantity regexp #{finishedOperateLog.quantity} |
| | | </if> |
| | | <if test="finishedOperateLog.operator != null and finishedOperateLog.operator != ''"> |
| | | and fol.operator regexp #{finishedOperateLog.operator} |
| | | </if> |
| | | <if test="finishedOperateLog.orderDetail.productId != null and finishedOperateLog.orderDetail.productId != ''"> |
| | | and od.product_id regexp #{finishedOperateLog.orderDetail.productId} |
| | | </if> |
| | | <if test="finishedOperateLog.orderDetail.productName != null and finishedOperateLog.orderDetail.productName != ''"> |
| | | and od.product_name regexp #{finishedOperateLog.orderDetail.productName} |
| | | </if> |
| | | <if test="finishedOperateLog.orderDetail.width != null and finishedOperateLog.orderDetail.width != ''"> |
| | | and od.width regexp #{finishedOperateLog.orderDetail.width} |
| | | </if> |
| | | <if test="finishedOperateLog.orderDetail.height != null and finishedOperateLog.orderDetail.height != ''"> |
| | | and od.height regexp #{finishedOperateLog.orderDetail.height} |
| | | </if> |
| | | <if test="finishedOperateLog.operateTime != null and finishedOperateLog.operateTime != ''"> |
| | | and fol.operate_time regexp #{finishedOperateLog.operateTime} |
| | | </if> |
| | | <if test="finishedOperateLog.status != null and finishedOperateLog.status != ''"> |
| | | and fol.`status` regexp #{finishedOperateLog.status} |
| | | </if> |
| | | <if test="finishedOperateLog.reviewed != null and finishedOperateLog.reviewed != ''"> |
| | | and fol.reviewed regexp #{finishedOperateLog.reviewed} |
| | | </if> |
| | | <if test="finishedOperateLog.reviewedTime != null and finishedOperateLog.reviewedTime != ''"> |
| | | and fol.reviewed_time regexp #{finishedOperateLog.reviewedTime} |
| | | </if> |
| | | <if test="finishedOperateLog.type != null and finishedOperateLog.type != ''"> |
| | | and fol.type regexp #{finishedOperateLog.type} |
| | | </if> |
| | | <if test="finishedOperateLog.remarks != null and finishedOperateLog.remarks != ''"> |
| | | and fol.remarks regexp #{finishedOperateLog.remarksr} |
| | | </if> |
| | | </where> |
| | | |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | <select id="getSelectOperateRecordLogPageTotal" > |
| | | select CEILING(count(fol.id)/#{pageSize}) |
| | | from (select * |
| | | from mm.finished_operate_log aa where aa.operate_type = '领出' or aa.operate_type = '返工') fol |
| | | left join sd.order_detail od on fol.order_id = od.order_id and fol.operation_number = od.order_number |
| | | <where> |
| | | <if test="finishedOperateLog.operationOrderNumber != null and finishedOperateLog.operationOrderNumber != ''"> |
| | | and fol.operation_order_number regexp #{finishedOperateLog.operationOrderNumber} |
| | | </if> |
| | | <if test="finishedOperateLog.orderId != null and finishedOperateLog.orderId != ''"> |
| | | and fol.order_id regexp #{finishedOperateLog.orderId} |
| | | </if> |
| | | <if test="finishedOperateLog.operationNumber != null and finishedOperateLog.operationNumber != ''"> |
| | | and fol.operation_number regexp #{finishedOperateLog.operationNumber} |
| | | </if> |
| | | <if test="finishedOperateLog.quantity != null and finishedOperateLog.quantity != ''"> |
| | | and fol.quantity regexp #{finishedOperateLog.quantity} |
| | | </if> |
| | | <if test="finishedOperateLog.operator != null and finishedOperateLog.operator != ''"> |
| | | and fol.operator regexp #{finishedOperateLog.operator} |
| | | </if> |
| | | <if test="finishedOperateLog.orderDetail.productId != null and finishedOperateLog.orderDetail.productId != ''"> |
| | | and od.product_id regexp #{finishedOperateLog.orderDetail.productId} |
| | | </if> |
| | | <if test="finishedOperateLog.orderDetail.productName != null and finishedOperateLog.orderDetail.productName != ''"> |
| | | and od.product_name regexp #{finishedOperateLog.orderDetail.productName} |
| | | </if> |
| | | <if test="finishedOperateLog.orderDetail.width != null and finishedOperateLog.orderDetail.width != ''"> |
| | | and od.width regexp #{finishedOperateLog.orderDetail.width} |
| | | </if> |
| | | <if test="finishedOperateLog.orderDetail.height != null and finishedOperateLog.orderDetail.height != ''"> |
| | | and od.height regexp #{finishedOperateLog.orderDetail.height} |
| | | </if> |
| | | <if test="finishedOperateLog.operateTime != null and finishedOperateLog.operateTime != ''"> |
| | | and fol.operate_time regexp #{finishedOperateLog.operateTime} |
| | | </if> |
| | | <if test="finishedOperateLog.status != null and finishedOperateLog.status != ''"> |
| | | and fol.`status` regexp #{finishedOperateLog.status} |
| | | </if> |
| | | <if test="finishedOperateLog.reviewed != null and finishedOperateLog.reviewed != ''"> |
| | | and fol.reviewed regexp #{finishedOperateLog.reviewed} |
| | | </if> |
| | | <if test="finishedOperateLog.reviewedTime != null and finishedOperateLog.reviewedTime != ''"> |
| | | and fol.reviewed_time regexp #{finishedOperateLog.reviewedTime} |
| | | </if> |
| | | <if test="finishedOperateLog.type != null and finishedOperateLog.type != ''"> |
| | | and fol.type regexp #{finishedOperateLog.type} |
| | | </if> |
| | | <if test="finishedOperateLog.remarks != null and finishedOperateLog.remarks != ''"> |
| | | and fol.remarks regexp #{finishedOperateLog.remarksr} |
| | | </if> |
| | | </where> |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | <select id="getselectAllocateFinishedOperateLog" resultMap="selectFinishedGoodsInventory" > |
| | | select fol.operation_order_number, |
| | | fol.order_id, |
| | | fol.operation_number, |
| | | fol.stater_operation_order_number, |
| | | fol.end_operation_order_number, |
| | | fol.quantity, |
| | | fol.operator, |
| | | od.product_id, |
| | | od.product_name, |
| | | od.width, |
| | | od.height, |
| | | fol.operate_time |
| | | from (select * |
| | | from mm.finished_operate_log aa where aa.operate_type = '调拨') fol |
| | | left join sd.order_detail od on fol.order_id = od.order_id and fol.operation_number = od.order_number |
| | | <where> |
| | | <if test="finishedOperateLog.operationOrderNumber != null and finishedOperateLog.operationOrderNumber != ''"> |
| | | and fol.operation_order_number regexp #{finishedOperateLog.operationOrderNumber} |
| | | </if> |
| | | <if test="finishedOperateLog.orderId != null and finishedOperateLog.orderId != ''"> |
| | | and fol.order_id regexp #{finishedOperateLog.orderId} |
| | | </if> |
| | | <if test="finishedOperateLog.operationNumber != null and finishedOperateLog.operationNumber != ''"> |
| | | and fol.operation_number regexp #{finishedOperateLog.operationNumber} |
| | | </if> |
| | | <if test="finishedOperateLog.staterOperationOrderNumber != null and finishedOperateLog.staterOperationOrderNumber != ''"> |
| | | and fol.stater_operation_order_number regexp #{finishedOperateLog.staterOperationOrderNumber} |
| | | </if> |
| | | <if test="finishedOperateLog.endOperationOrderNumber != null and finishedOperateLog.endOperationOrderNumber != ''"> |
| | | and fol.end_operation_order_number regexp #{finishedOperateLog.endOperationOrderNumber} |
| | | </if> |
| | | <if test="finishedOperateLog.quantity != null and finishedOperateLog.quantity != ''"> |
| | | and fol.quantity regexp #{finishedOperateLog.quantity} |
| | | </if> |
| | | <if test="finishedOperateLog.operator != null and finishedOperateLog.operator != ''"> |
| | | and fol.operator regexp #{finishedOperateLog.operator} |
| | | </if> |
| | | <if test="finishedOperateLog.orderDetail.productId != null and finishedOperateLog.orderDetail.productId != ''"> |
| | | and od.product_id regexp #{finishedOperateLog.orderDetail.productId} |
| | | </if> |
| | | <if test="finishedOperateLog.orderDetail.productName != null and finishedOperateLog.orderDetail.productName != ''"> |
| | | and od.product_name regexp #{finishedOperateLog.orderDetail.productName} |
| | | </if> |
| | | <if test="finishedOperateLog.orderDetail.width != null and finishedOperateLog.orderDetail.width != ''"> |
| | | and od.width regexp #{finishedOperateLog.orderDetail.width} |
| | | </if> |
| | | <if test="finishedOperateLog.orderDetail.height != null and finishedOperateLog.orderDetail.height != ''"> |
| | | and od.height regexp #{finishedOperateLog.orderDetail.height} |
| | | </if> |
| | | <if test="finishedOperateLog.operateTime != null and finishedOperateLog.operateTime != ''"> |
| | | and fol.operate_time regexp #{finishedOperateLog.operateTime} |
| | | </if> |
| | | </where> |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | <select id="getselectAllocateFinishedOperateLogPageTotal" > |
| | | select CEILING(count(fol.id)/#{pageSize}) |
| | | from (select * |
| | | from mm.finished_operate_log aa where aa.operate_type = '调拨') fol |
| | | left join sd.order_detail od on fol.order_id = od.order_id and fol.end_operation_order_number = od.order_number |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | <select id="getselectFinishedOperateLog" > |
| | | select |
| | | * |
| | |
| | | mm.finished_operate_log limit 0,1; |
| | | </select> |
| | | |
| | | <insert id="insertFinishedOperateLog" useGeneratedKeys="true" keyProperty="id" > |
| | | |
| | | |
| | | <select id="getmaximum" > |
| | | select count(*) from mm.finished_operate_log where operate_type =#{type} and date(operate_time)=CURDATE() |
| | | </select> |
| | | |
| | | <insert id="insertIntFinishedOperateLog" useGeneratedKeys="true" > |
| | | insert into mm.finished_operate_log(operation_order_number, |
| | | product_number, |
| | | order_id, |
| | | operation_number, |
| | | operate_type, |
| | | operator, |
| | |
| | | operate_time |
| | | ) |
| | | values ( |
| | | #{processId} ,#{orderDetail.productId},#{orderNumber},"入库","王五",#{inventoryQuantity},now() |
| | | #{oddNumber} ,#{flowCard.order.orderId},#{flowCard.orderNumber},"入库",#{userName},#{flowCard.inventoryQuantity},now() |
| | | ) |
| | | </insert> |
| | | |
| | | <insert id="insertOutFinishedOperateLog" useGeneratedKeys="true" > |
| | | insert into mm.finished_operate_log(operation_order_number, |
| | | order_id, |
| | | operation_number, |
| | | operate_type, |
| | | operator, |
| | | quantity, |
| | | operate_time |
| | | ) |
| | | values ( |
| | | #{orderDetail.deliveryDetail.deliveryId} ,#{orderDetail.deliveryDetail.order_id},#{orderDetail.deliveryDetail.orderNumber} |
| | | ,"出库",#{userName},#{orderDetail.warehouseNum},now() |
| | | ) |
| | | </insert> |
| | | |
| | | <insert id="insertFinishedOperateLogTakeOut" useGeneratedKeys="true" > |
| | | insert into mm.finished_operate_log(operation_order_number, |
| | | order_id, |
| | | operation_number, |
| | | operate_type, |
| | | operator, |
| | | quantity, |
| | | operate_time, |
| | | status, |
| | | type, |
| | | remarks |
| | | ) |
| | | values ( |
| | | #{oddNumber} ,#{orderDetail.finishedGoodsInventory.orderId},#{orderDetail.finishedGoodsInventory.orderNumber} |
| | | ,"领出",#{userName},#{orderDetail.quantity},now(),"未审核",#{operateType},#{remarks} |
| | | ) |
| | | </insert> |
| | | |
| | | <insert id="insertFinishedOperateLogAllocate" useGeneratedKeys="true" > |
| | | insert into mm.finished_operate_log(operation_order_number, |
| | | order_id, |
| | | operation_number, |
| | | operate_type, |
| | | operator, |
| | | quantity, |
| | | operate_time, |
| | | stater_operation_order_number, |
| | | end_operation_order_number |
| | | ) |
| | | values ( |
| | | #{oddNumber} ,#{orderDetail.finishedGoodsInventory.orderId},#{orderDetail.finishedGoodsInventory.orderNumber} |
| | | ,"调拨",#{userName},#{orderDetail.quantity},now(),#{orderDetail.orderId},#{orderDetail.orderNumber} |
| | | ) |
| | | </insert> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | <resultMap id="flowCardMap" type="com.example.erp.entity.pp.FlowCard"> |
| | | |
| | | <result column="order_id" property="orderId"/> |
| | | <result column="production_id" property="productionId"/> |
| | | <result column="splitting_status" property="splittingStatus"/> |
| | | <result column="create_time" property="createTime"/> |
| | | <result column="process_Id" property="processId"/> |
| | | <result column="binning_quantity" property="binningQuantity"/> |
| | | <result column="founder" property="founder"/> |
| | | <!--接收其他外键实体类数据--> |
| | | <association property="order" javaType="com.example.erp.entity.sd.Order"> |
| | | <result column="batch" property="batch"/> |
| | | <result column="project" property="project"/> |
| | | </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"/> |
| | | <result column="compute_gross_area" property="computeGrossArea"/> |
| | | <result column="perimeter" property="perimeter"/> |
| | | <result column="bend_radius" property="bendRadius"/> |
| | | <result column="processing_note" property="processingNote"/> |
| | | </association> |
| | | |
| | |
| | | </resultMap> |
| | | <select id="selectFlowCard" resultMap="flowCardMap"> |
| | | 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 |
| | | a.order_Id, |
| | | a.process_Id, |
| | | c.product_id, |
| | | c.product_name, |
| | | b.project, |
| | | a.binning_quantity, |
| | | c.compute_gross_area, |
| | | a.founder, |
| | | 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="orderGlassDetail.orderId != null and orderGlassDetail.orderId != ''"> |
| | | and a.order_id regexp #{orderGlassDetail.orderId} |
| | | <if test="flowCard.orderId != null and flowCard.orderId != ''"> |
| | | and a.order_id regexp #{flowCard.orderId} |
| | | </if> |
| | | <if test="orderGlassDetail.productionId != null and orderGlassDetail.productionId != ''"> |
| | | and a.production_id regexp #{orderGlassDetail.productionId} |
| | | <if test="flowCard.productionId != null and flowCard.productionId != ''"> |
| | | and a.process_Id regexp #{flowCard.productionId} |
| | | </if> |
| | | <if test="orderGlassDetail.order.batch != null and orderGlassDetail.order.batch != ''"> |
| | | and c.batch regexp #{orderGlassDetail.order.batch} |
| | | <if test="flowCard.orderDetail.productId != null and flowCard.orderDetail.productId != ''"> |
| | | and c.product_id regexp #{flowCard.orderDetail.productId} |
| | | </if> |
| | | <if test="orderGlassDetail.orderDetail.productName != null and orderGlassDetail.orderDetail.productName!= ''"> |
| | | and b.product_name regexp #{orderGlassDetail.orderDetail.productName} |
| | | <if test="flowCard.orderDetail.productName != null and flowCard.orderDetail.productName!= ''"> |
| | | and c.product_name regexp #{flowCard.orderDetail.productName} |
| | | </if> |
| | | <if test="orderGlassDetail.splittingStatus=0 " > |
| | | and a.splitting_status regexp #{state} |
| | | |
| | | <if test="flowCard.order.project != null and flowCard.order.project!= ''"> |
| | | and b.project regexp #{flowCard.order.project} |
| | | </if> |
| | | <if test="orderGlassDetail.splittingStatus=1"> |
| | | and a.splitting_status regexp #{state} |
| | | </if> |
| | | <if test="orderGlassDetail.createTime != ''"> |
| | | |
| | | <if test="flowCard.createTime != ''"> |
| | | 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 |
| | | group by a.process_Id |
| | | |
| | | |
| | | |
| | | ; |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.example.erp.mapper.pp.ReportingWorkDetailMapper"> |
| | | <!--返工新增--> |
| | | <resultMap id="reworkAdd" type="com.example.erp.entity.pp.ReportingWorkDetail"> |
| | | <id column="id" property="id"/> |
| | | <result column="rework_team" property="reworkTeam"/> |
| | | <result column="breakage_number" property="breakageNumber"/> |
| | | <result column="return_process" property="returnProcess"/> |
| | | <result column="breakage_reason" property="breakageReason"/> |
| | | <result column="responsible_equipment" property="responsibleEquipment"/> |
| | | <result column="responsible_team" property="responsibleTeam"/> |
| | | <!--接收其他外键实体类数据--> |
| | | <association property="reportingWork" javaType="com.example.erp.entity.pp.ReportingWork"> |
| | | <result column="process_id" property="processId"/> |
| | | </association> |
| | | |
| | | <association property="order" javaType="com.example.erp.entity.sd.Order"> |
| | | <result column="order_id" property="orderId"/> |
| | | <result column="project" property="project"/> |
| | | <result column="batch" property="batch"/> |
| | | </association> |
| | | |
| | | <association property="orderDetail" javaType="com.example.erp.entity.sd.OrderDetail"> |
| | | <result column="shape" property="shape"/> |
| | | |
| | | </association> |
| | | |
| | | <association property="orderGlassDetail" javaType="com.example.erp.entity.sd.OrderGlassDetail"> |
| | | <result column="glass_child" property="glassChild"/> |
| | | <result column="order_number" property="orderNumber"/> |
| | | <result column="technology_number" property="technologyNumber"/> |
| | | <result column="glass_address" property="glassAddress"/> |
| | | <result column="child_height" property="childHeight"/> |
| | | |
| | | </association> |
| | | |
| | | <!-- <result column="order_id" property="orderId"/>--> |
| | | |
| | | </resultMap> |
| | | |
| | | <!--返工管理页面--> |
| | | <resultMap id="reworkManage" type="com.example.erp.entity.pp.ReportingWorkDetail"> |
| | | |
| | | <id column="id" property="id"/> |
| | | <result column="rework_team" property="reworkTeam"/> |
| | | <result column="breakage_number" property="breakageNumber"/> |
| | | <result column="return_process" property="returnProcess"/> |
| | | <result column="breakage_reason" property="breakageReason"/> |
| | | <result column="breakage_type" property="breakageType"/> |
| | | <result column="responsible_equipment" property="responsibleEquipment"/> |
| | | <result column="responsible_team" property="responsibleTeam"/> |
| | | <result column="rework_area" property="reworkArea"/> |
| | | <result column="order_number" property="orderNumber"/> |
| | | <result column="quality_inspector" property="qualityInspector"/> |
| | | |
| | | <!--接收其他外键实体类数据--> |
| | | <association property="reportingWork" javaType="com.example.erp.entity.pp.ReportingWork"> |
| | | <result column="process_id" property="processId"/> |
| | | </association> |
| | | |
| | | <association property="order" javaType="com.example.erp.entity.sd.Order"> |
| | | <result column="order_id" property="orderId"/> |
| | | <result column="project" property="project"/> |
| | | <result column="batch" property="batch"/> |
| | | </association> |
| | | |
| | | <association property="orderDetail" javaType="com.example.erp.entity.sd.OrderDetail"> |
| | | <result column="shape" property="shape"/> |
| | | </association> |
| | | |
| | | <association property="orderGlassDetail" javaType="com.example.erp.entity.sd.OrderGlassDetail"> |
| | | <result column="glass_child" property="glassChild"/> |
| | | <!--<result column="order_number" property="orderNumber"/>--> |
| | | <result column="technology_number" property="technologyNumber"/> |
| | | <result column="glass_address" property="glassAddress"/> |
| | | <result column="child_height" property="childHeight"/> |
| | | <result column="child_width" property="childWidth"/> |
| | | |
| | | </association> |
| | | |
| | | |
| | | </resultMap> |
| | | |
| | | <!--获取返工新增数据--> |
| | | <select id="queryReworkAdd" resultMap="reworkAdd"> |
| | | select * from v_rework |
| | | <where> |
| | | rework_team is null |
| | | |
| | | <if test="order_id != null and order_id != ''"> |
| | | and order_id = #{order_id} |
| | | </if> |
| | | |
| | | <if test="process_id != null and process_id != ''"> |
| | | and process_id = #{process_id} |
| | | </if> |
| | | |
| | | <if test="project != null and project != ''"> |
| | | and project = #{project} |
| | | </if> |
| | | </where> |
| | | |
| | | order by id desc |
| | | limit #{pageNum},#{pageSize} |
| | | ; |
| | | </select> |
| | | |
| | | |
| | | <!--返工管理--> |
| | | <select id="reworkDataManage" resultMap="reworkManage"> |
| | | select * from v_rework |
| | | |
| | | |
| | | |
| | | order by id desc |
| | | limit #{pageNum},#{pageSize} |
| | | ; |
| | | </select> |
| | | |
| | | |
| | | <!--返工管理--> |
| | | <select id="reworkDataManage2" resultMap="reworkManage"> |
| | | select * from v_rework |
| | | |
| | | <where> |
| | | |
| | | /*create_time <![CDATA[>=]]> #{sDate} and create_time <![CDATA[<=]]> #{eDate}}*/ |
| | | /*大于等于,小于等于*/ |
| | | create_time >= #{sDate} and create_time <= #{eDate}} |
| | | |
| | | and rework_team is not null |
| | | |
| | | <if test="order_id != null and order_id != ''"> |
| | | and order_id = #{order_id} |
| | | </if> |
| | | |
| | | <if test="process_id != null and process_id != ''"> |
| | | and process_id = #{process_id} |
| | | </if> |
| | | |
| | | <if test="project != null and project != ''"> |
| | | and project = #{project} |
| | | </if> |
| | | |
| | | |
| | | </where> |
| | | |
| | | order by id desc |
| | | limit #{pageNum},#{pageSize} |
| | | ; |
| | | </select> |
| | | |
| | | |
| | | <!--<where> |
| | | |
| | | create_time <![CDATA[>=]]> #{startTime} and create_time <![CDATA[<=]]> #{endTime}} |
| | | <!–返工编号–> |
| | | <if test="rework_id!=null and rework != ''"> |
| | | and rework_id = #{reworkId} |
| | | </if> |
| | | <!–流程卡号–> |
| | | <if test="process_id != null and process_id != ''"> |
| | | and process_id=#{processId} |
| | | </if> |
| | | <!–返工类型–> |
| | | <if test="rework_Type != null and rework_Type!=''"> |
| | | and rework_Type=#{rework_Type} |
| | | </if> |
| | | <!–返工原因–> |
| | | <if test="rework_Reason != null and rework_Reason!=''"> |
| | | and rework_Reason=#{rework_Reason} |
| | | </if> |
| | | <!–返工工序–> |
| | | <if test="rework_Processes != null and rework_Processes!=''"> |
| | | and rework_Processes=#{rework_Processes} |
| | | </if> |
| | | <!–返工数量–> |
| | | <if test="rework_Num != null and rework_Num!=''"> |
| | | and rework_Num=#{rework_Num} |
| | | </if> |
| | | <!–返工班组–> |
| | | <if test="rework_Team != null and rework_Team!=''"> |
| | | and rework_Team=#{rework_Team} |
| | | </if> |
| | | <!–审核人–> |
| | | <if test="reviewer != null and reviewer!=''"> |
| | | and reviewer=#{reviewer} |
| | | </if> |
| | | <!–审核状态–> |
| | | <if test="review_Status != null and review_Status!=''"> |
| | | and review_Status=#{review_Status} |
| | | </if> |
| | | <!–返工面积–> |
| | | <if test="rework_Area != null and rework_Area!=''"> |
| | | and rework_Area=#{rework_Area} |
| | | </if> |
| | | |
| | | </where>--> |
| | | |
| | | <!--获取返工新增数据--> |
| | | <!--<select id="getReworkAdd"> |
| | | SELECT `b`.`id` AS `id`, |
| | | `b`.`rework_team` AS `rework_team`, |
| | | `c`.`order_id` AS `order_id`, |
| | | `a`.`process_id` AS `process_id`, |
| | | `c`.`project` AS `project`, |
| | | `c`.`batch` AS `batch`, |
| | | `d`.`glass_child` AS `glass_child`, |
| | | `d`.`order_number` AS `order_Number`, |
| | | `d`.`technology_number` AS `technology_number`, |
| | | `d`.`glass_address` AS `glass_address`, |
| | | `b`.`breakage_number` AS `breakage_number`, |
| | | `d`.`child_width` AS `child_width`, |
| | | `d`.`child_height` AS `child_height`, |
| | | `e`.`shape` AS `shape`, |
| | | `b`.`return_process` AS `return_process`, |
| | | `b`.`breakage_reason` AS `breakage_reason`, |
| | | `b`.`responsible_equipment` AS `responsible_equipment`, |
| | | `b`.`responsible_team` AS `responsible_team`, |
| | | round((((`d`.`child_width` * `d`.`child_height`) * `b`.`breakage_number`) / 1000000), |
| | | 2) AS `rework_area`, |
| | | `b`.`qualityIns_pector` AS `qualityIns_pector` |
| | | FROM (((( |
| | | `reporting_work_detail` `b` |
| | | LEFT JOIN `reporting_work` `a` ON (( |
| | | `a`.`reporting_work_id` = `b`.`reporting_work_id` |
| | | ))) |
| | | LEFT JOIN `sd`.`order` `c` ON (( |
| | | `a`.`order_id` = `c`.`order_id` |
| | | ))) |
| | | LEFT JOIN `sd`.`order_detail` `e` ON ((( |
| | | `c`.`order_id` = `e`.`order_id` |
| | | ) |
| | | AND (`e`.`order_number` = `b`.`order_number`)))) |
| | | LEFT JOIN `sd`.`order_glass_detail` `d` ON ((( |
| | | `d`.`order_id` = `c`.`order_id` |
| | | ) |
| | | AND (`b`.`order_number` = `d`.`order_number`) |
| | | AND (`b`.`technology_number` = `d`.`technology_number`)))) |
| | | WHERE ( |
| | | `b`.`available` = 1) |
| | | </select>--> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <!--返工数据--> |
| | | |
| | | <mapper namespace="com.example.erp.mapper.pp.ReworkMapper"> |
| | | <resultMap id="reworkDataTitle" type="com.example.erp.entity.pp.Rework"> |
| | | |
| | | |
| | | </resultMap> |
| | | |
| | | |
| | | <!--获取返工数据--> |
| | | <select id="queryRework" resultMap="reworkDataTitle"> |
| | | select * from rework |
| | | <!--<where> |
| | | |
| | | create_time <![CDATA[>=]]> #{startTime} and create_time <![CDATA[<=]]> #{endTime}} |
| | | <!–返工编号–> |
| | | <if test="rework_id!=null and rework != ''"> |
| | | and rework_id = #{reworkId} |
| | | </if> |
| | | <!–流程卡号–> |
| | | <if test="process_id != null and process_id != ''"> |
| | | and process_id=#{processId} |
| | | </if> |
| | | <!–返工类型–> |
| | | <if test="rework_Type != null and rework_Type!=''"> |
| | | and rework_Type=#{rework_Type} |
| | | </if> |
| | | <!–返工原因–> |
| | | <if test="rework_Reason != null and rework_Reason!=''"> |
| | | and rework_Reason=#{rework_Reason} |
| | | </if> |
| | | <!–返工工序–> |
| | | <if test="rework_Processes != null and rework_Processes!=''"> |
| | | and rework_Processes=#{rework_Processes} |
| | | </if> |
| | | <!–返工数量–> |
| | | <if test="rework_Num != null and rework_Num!=''"> |
| | | and rework_Num=#{rework_Num} |
| | | </if> |
| | | <!–返工班组–> |
| | | <if test="rework_Team != null and rework_Team!=''"> |
| | | and rework_Team=#{rework_Team} |
| | | </if> |
| | | <!–审核人–> |
| | | <if test="reviewer != null and reviewer!=''"> |
| | | and reviewer=#{reviewer} |
| | | </if> |
| | | <!–审核状态–> |
| | | <if test="review_Status != null and review_Status!=''"> |
| | | and review_Status=#{review_Status} |
| | | </if> |
| | | <!–返工面积–> |
| | | <if test="rework_Area != null and rework_Area!=''"> |
| | | and rework_Area=#{rework_Area} |
| | | </if> |
| | | |
| | | </where>--> |
| | | |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
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> |
New file |
| | |
| | | package com.example.erp.service.pp; |
| | | |
| | | import org.junit.jupiter.api.Test; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.boot.test.context.SpringBootTest; |
| | | |
| | | import static org.junit.jupiter.api.Assertions.*; |
| | | @SpringBootTest |
| | | class ReworkServiceTest { |
| | | @Autowired |
| | | private ReworkService reworkService; |
| | | |
| | | |
| | | @Test |
| | | void queryReworkTest(){ |
| | | reworkService.queryRework(1,2,"2024-01-01","2024-01-25",null); |
| | | } |
| | | |
| | | |
| | | @Test |
| | | void queryReworkAddTest(){ |
| | | reworkService.queryRework(1,2,"2024-01-01","2024-01-25",null); |
| | | } |
| | | } |
| | |
| | | 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); |
| | | } |
| | | |
| | | } |
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.mm.BasicWarehouseTypeMapper"> |
| | | |
| | | <select id="getBasicWarehouseTypeTakeOut" > |
| | | select * from mm.basic_warehouse_type where operate_type='领出'; |
| | | </select> |
| | | |
| | | |
| | | |
| | | |
| | | </mapper> |
| | |
| | | "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="order_id" property="order.orderId"/> |
| | | <result column="project" property="order.project"/> |
| | | <result column="creater" property="order.creater"/> |
| | | <result column="creator" property="order.creator"/> |
| | | <result column="area" property="order.area"/> |
| | | <result column="batch" property="order.batch"/> |
| | | <result column="order_quantity" property="order.quantity"/> |
| | | |
| | | <result column="building_number" property="orderDetail.buildingNumber"/> |
| | | <result column="width" property="orderDetail.width"/> |
| | |
| | | <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"/> |
| | | <result column="width" property="width"/> |
| | | <result column="height" property="height"/> |
| | | <result column="product_name" property="productName"/> |
| | | <result column="product_id" property="productId"/> |
| | | <result column="warehouse_num" property="warehouseNum"/> |
| | | |
| | | <result column="order_number" property="deliveryDetail.orderNumber"/> |
| | | <result column="delivery_id" property="deliveryDetail.deliveryId"/> |
| | | <result column="delivery_number" property="deliveryDetail.deliveryNumber"/> |
| | | <result column="delivery_detail_remakes" property="deliveryDetail.deliveryDetailRemakes"/> |
| | | <result column="order_id" property="deliveryDetail.orderId"/> |
| | | <result column="create_time" property="deliveryDetail.createTime"/> |
| | | |
| | | <result column="project" property="order.project"/> |
| | | |
| | | <result column="creator" property="delivery.creator"/> |
| | | <result column="customer_name" property="delivery.customerName"/> |
| | | <result column="quantity" property="delivery.quantity"/> |
| | | <result column="area" property="delivery.area"/> |
| | | |
| | | |
| | | </resultMap> |
| | | |
| | | <!--映射订单调拨--> |
| | | <resultMap id="selectDeliveryFinishedGoodsInventory" type="com.example.erp.entity.sd.OrderDetail"> |
| | | |
| | | <result column="width" property="width"/> |
| | | <result column="height" property="height"/> |
| | | <result column="product_name" property="productName"/> |
| | | <result column="product_id" property="productId"/> |
| | | |
| | | <result column="order_id" property="finishedGoodsInventory.orderId"/> |
| | | <result column="order_number" property="finishedGoodsInventory.orderNumber"/> |
| | | <result column="quantity_available" property="finishedGoodsInventory.quantityAvailable"/> |
| | | <result column="actual_signal_area" property="finishedGoodsInventory.actualSignalArea"/> |
| | | <result column="area" property="finishedGoodsInventory.area"/> |
| | | <result column="storage_region" property="finishedGoodsInventory.storageRegion"/> |
| | | |
| | | <result column="project" property="order.project"/> |
| | | <result column="customer_id" property="order.customerId"/> |
| | | <result column="customer_name" property="order.customerName"/> |
| | | |
| | | |
| | | </resultMap> |
| | | <update id="updateInventoryquantityAllocateInt"> |
| | | update mm.finished_goods_inventory |
| | | set inventory=inventory+#{quantity},quantity_available=quantity_available+#{quantity}, |
| | | update_time=now(),area=actual_signal_area*quantity_available |
| | | where order_number=#{orderNumber} and order_id=#{orderId} |
| | | </update> |
| | | |
| | | <update id="updateInventoryquantityAllocateOut"> |
| | | update mm.finished_goods_inventory |
| | | set inventory=inventory-#{quantity},quantity_available=quantity_available-#{quantity}, |
| | | update_time=now(),area=actual_signal_area*quantity_available |
| | | where order_number=#{orderNumber} and order_id=#{orderId} |
| | | </update> |
| | | |
| | | <select id="getSelectAllocate" resultMap="selectDeliveryFinishedGoodsInventory"> |
| | | select fgi.order_id, |
| | | o.project, |
| | | fgi.order_number, |
| | | fgi.quantity_available, |
| | | od.product_id, |
| | | od.product_name, |
| | | od.width, |
| | | od.height, |
| | | o.customer_id, |
| | | o.customer_name, |
| | | fgi.actual_signal_area, |
| | | fgi.area, |
| | | fgi.storage_region |
| | | from mm.finished_goods_inventory fgi |
| | | left join sd.order_detail od on fgi.order_id = od.order_id and fgi.order_number = od.order_number |
| | | left join sd.`order` o on fgi.order_id = o.order_id |
| | | <where> |
| | | and fgi.quantity_available>0 |
| | | <if test="orderDetail.finishedGoodsInventory.orderId != null and orderDetail.finishedGoodsInventory.orderId != ''"> |
| | | and fgi.order_id regexp #{orderDetail.finishedGoodsInventory.orderId} |
| | | </if> |
| | | <if test="orderDetail.order.project != null and orderDetail.order.project != ''"> |
| | | and o.project regexp #{orderDetail.order.project} |
| | | </if> |
| | | <if test="orderDetail.finishedGoodsInventory.orderNumber != null and orderDetail.finishedGoodsInventory.orderNumber != ''"> |
| | | and fgi.order_number regexp #{orderDetail.finishedGoodsInventory.orderNumber} |
| | | </if> |
| | | <if test="orderDetail.finishedGoodsInventory.quantityAvailable != null and orderDetail.finishedGoodsInventory.quantityAvailable != ''"> |
| | | and fgi.quantity_available regexp #{orderDetail.finishedGoodsInventory.quantityAvailable} |
| | | </if> |
| | | <if test="orderDetail.productId != null and orderDetail.productId != ''"> |
| | | and od.product_id regexp #{orderDetail.productId} |
| | | </if> |
| | | <if test="orderDetail.productName != null and orderDetail.productName != ''"> |
| | | and od.product_name regexp #{orderDetail.productName} |
| | | </if> |
| | | <if test="orderDetail.width != null and orderDetail.width != ''"> |
| | | and od.width regexp #{orderDetail.width} |
| | | </if> |
| | | <if test="orderDetail.height != null and orderDetail.height != ''"> |
| | | and od.height regexp #{orderDetail.height} |
| | | </if> |
| | | <if test="orderDetail.order.customerId != null and orderDetail.order.customerId != ''"> |
| | | and o.customer_id regexp #{orderDetail.order.customerId} |
| | | </if> |
| | | <if test="orderDetail.order.customerName != null and orderDetail.order.customerName != ''"> |
| | | and o.customer_name regexp #{orderDetail.order.customerName} |
| | | </if> |
| | | <if test="orderDetail.finishedGoodsInventory.actualSignalArea != null and orderDetail.finishedGoodsInventory.actualSignalArea != ''"> |
| | | and fgi.actual_signal_area regexp #{orderDetail.finishedGoodsInventory.actualSignalArea} |
| | | </if> |
| | | <if test="orderDetail.finishedGoodsInventory.area != null and orderDetail.finishedGoodsInventory.area != ''"> |
| | | and fgi.area regexp #{orderDetail.finishedGoodsInventory.area} |
| | | </if> |
| | | <if test="orderDetail.finishedGoodsInventory.storageRegion != null and orderDetail.finishedGoodsInventory.storageRegion != ''"> |
| | | and fgi.storage_region regexp #{orderDetail.finishedGoodsInventory.storageRegion} |
| | | </if> |
| | | </where> |
| | | group by fgi.order_id, fgi.order_number |
| | | |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | <select id="getSelectAllocatePageTotal" > |
| | | select CEILING(count(zu.order_number)/#{pageSize}) from |
| | | (select fgi.order_number as order_number |
| | | from mm.finished_goods_inventory fgi |
| | | left join sd.order_detail od on fgi.order_id = od.order_id and fgi.order_number = od.order_number |
| | | left join sd.`order` o on fgi.order_id = o.order_id |
| | | group by fgi.order_id, fgi.order_number) as zu |
| | | |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | <update id="updateDeliveryDetailState"> |
| | | update sd.delivery_detail |
| | | set delivery_detail_state=#{state} |
| | | where order_number=#{orderDetail.deliveryDetail.orderNumber} and order_id=#{orderDetail.deliveryDetail.orderId} |
| | | </update> |
| | | |
| | | <update id="updateInventoryquantityavailable"> |
| | | update mm.finished_goods_inventory |
| | | set inventory=0,quantity_available=0, |
| | | update_time=now(),area=0,status=1 |
| | | where order_number=#{orderDetail.deliveryDetail.orderNumber} and order_id=#{orderDetail.deliveryDetail.orderId} |
| | | </update> |
| | | |
| | | |
| | | <select id="getseletdeliveryDetailPageTotal" > |
| | | select CEILING(count(dd.id)/#{pageSize}) |
| | | from sd.delivery_detail dd |
| | | left join sd.delivery d on dd.delivery_id = d.delivery_id |
| | | left join sd.order_detail od on od.order_id = dd.order_id and dd.order_number = od.order_number |
| | | left join sd.`order` o on o.order_id = dd.order_id |
| | | <where> |
| | | <if test="orderDetail.deliveryDetail.deliveryId != null and orderDetail.deliveryDetail.deliveryId != ''"> |
| | | and dd.delivery_id regexp #{orderDetail.deliveryDetail.deliveryId} |
| | | </if> |
| | | <if test="orderDetail.deliveryDetail.orderId != null and orderDetail.deliveryDetail.orderId != ''"> |
| | | and dd.order_id regexp #{orderDetail.deliveryDetail.orderId} |
| | | </if> |
| | | <if test="orderDetail.order.project != null and orderDetail.order.project != ''"> |
| | | and o.project regexp #{orderDetail.order.project} |
| | | </if> |
| | | <if test="orderDetail.productId != null and orderDetail.productId != ''"> |
| | | and od.product_id regexp #{orderDetail.productId} |
| | | </if> |
| | | <if test="orderDetail.productName != null and orderDetail.productName != ''"> |
| | | and od.product_name regexp #{orderDetail.productName} |
| | | </if> |
| | | <if test="orderDetail.delivery.customerName != null and orderDetail.delivery.customerName != ''"> |
| | | and d.customer_name regexp #{orderDetail.delivery.customerName} |
| | | </if> |
| | | <if test="orderDetail.width != null and orderDetail.width != ''"> |
| | | and od.width regexp #{orderDetail.width} |
| | | </if> |
| | | <if test="orderDetail.height != null and orderDetail.height != ''"> |
| | | and od.height regexp #{orderDetail.height} |
| | | </if> |
| | | <if test="orderDetail.delivery.quantity != null and orderDetail.delivery.quantity != ''"> |
| | | and d.quantity regexp #{orderDetail.delivery.quantity} |
| | | </if> |
| | | <if test="orderDetail.warehouseNum != null and orderDetail.warehouseNum != ''"> |
| | | and od.warehouseNum regexp #{orderDetail.warehouseNum} |
| | | </if> |
| | | <if test="orderDetail.buildingNumber != null and orderDetail.buildingNumber != ''"> |
| | | and od.building_number regexp #{orderDetail.buildingNumber} |
| | | </if> |
| | | <if test="orderDetail.delivery.area != null and orderDetail.delivery.area != ''"> |
| | | and d.area regexp #{orderDetail.delivery.area} |
| | | </if> |
| | | <if test="orderDetail.deliveryDetail.orderNumber != null and orderDetail.deliveryDetail.orderNumber != ''"> |
| | | and dd.order_number regexp #{orderDetail.deliveryDetail.orderNumber} |
| | | </if> |
| | | <if test="orderDetail.delivery.creator != null and orderDetail.delivery.creator != ''"> |
| | | and d.creator regexp #{orderDetail.delivery.creator} |
| | | </if> |
| | | <if test="orderDetail.deliveryDetail.createTime != null and orderDetail.deliveryDetail.createTime != ''"> |
| | | and dd.create_time regexp #{orderDetail.deliveryDetail.createTime} |
| | | </if> |
| | | <if test="orderDetail.deliveryDetail.deliveryDetailRemakes != null and orderDetail.deliveryDetail.deliveryDetailRemakes != ''"> |
| | | and dd.delivery_detail_remakes regexp #{orderDetail.deliveryDetail.deliveryDetailRemakes} |
| | | </if> |
| | | </where> |
| | | order by dd.id |
| | | |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | <select id="getseletdeliveryDetail" resultMap="selectDelivery"> |
| | | select dd.delivery_id, |
| | | dd.order_number, |
| | | dd.order_id, |
| | | o.project, |
| | | od.product_id, |
| | | od.product_name, |
| | | d.customer_name, |
| | | od.width, |
| | | od.height, |
| | | d.quantity, |
| | | od.warehouse_num, |
| | | d.area, |
| | | od.building_number, |
| | | d.creator, |
| | | dd.delivery_detail_remakes, |
| | | dd.create_time |
| | | from sd.delivery_detail dd |
| | | left join sd.delivery d on dd.delivery_id = d.delivery_id |
| | | left join sd.order_detail od on od.order_id = dd.order_id and dd.order_number = od.order_number |
| | | left join sd.`order` o on o.order_id = dd.order_id where dd.delivery_detail_state=1 |
| | | |
| | | <where> |
| | | <if test="orderDetail.deliveryDetail.deliveryId != null and orderDetail.deliveryDetail.deliveryId != ''"> |
| | | and dd.delivery_id regexp #{orderDetail.deliveryDetail.deliveryId} |
| | | </if> |
| | | <if test="orderDetail.deliveryDetail.orderId != null and orderDetail.deliveryDetail.orderId != ''"> |
| | | and dd.order_id regexp #{orderDetail.deliveryDetail.orderId} |
| | | </if> |
| | | <if test="orderDetail.order.project != null and orderDetail.order.project != ''"> |
| | | and o.project regexp #{orderDetail.order.project} |
| | | </if> |
| | | <if test="orderDetail.productId != null and orderDetail.productId != ''"> |
| | | and od.product_id regexp #{orderDetail.productId} |
| | | </if> |
| | | <if test="orderDetail.productName != null and orderDetail.productName != ''"> |
| | | and od.product_name regexp #{orderDetail.productName} |
| | | </if> |
| | | <if test="orderDetail.delivery.customerName != null and orderDetail.delivery.customerName != ''"> |
| | | and d.customer_name regexp #{orderDetail.delivery.customerName} |
| | | </if> |
| | | <if test="orderDetail.width != null and orderDetail.width != ''"> |
| | | and od.width regexp #{orderDetail.width} |
| | | </if> |
| | | <if test="orderDetail.height != null and orderDetail.height != ''"> |
| | | and od.height regexp #{orderDetail.height} |
| | | </if> |
| | | <if test="orderDetail.delivery.quantity != null and orderDetail.delivery.quantity != ''"> |
| | | and d.quantity regexp #{orderDetail.delivery.quantity} |
| | | </if> |
| | | <if test="orderDetail.warehouseNum != null and orderDetail.warehouseNum != ''"> |
| | | and od.warehouseNum regexp #{orderDetail.warehouseNum} |
| | | </if> |
| | | <if test="orderDetail.buildingNumber != null and orderDetail.buildingNumber != ''"> |
| | | and od.building_number regexp #{orderDetail.buildingNumber} |
| | | </if> |
| | | <if test="orderDetail.delivery.area != null and orderDetail.delivery.area != ''"> |
| | | and d.area regexp #{orderDetail.delivery.area} |
| | | </if> |
| | | <if test="orderDetail.deliveryDetail.orderNumber != null and orderDetail.deliveryDetail.orderNumber != ''"> |
| | | and dd.order_number regexp #{orderDetail.deliveryDetail.orderNumber} |
| | | </if> |
| | | <if test="orderDetail.delivery.creator != null and orderDetail.delivery.creator != ''"> |
| | | and d.creator regexp #{orderDetail.delivery.creator} |
| | | </if> |
| | | <if test="orderDetail.deliveryDetail.createTime != null and orderDetail.deliveryDetail.createTime != ''"> |
| | | and dd.create_time regexp #{orderDetail.deliveryDetail.createTime} |
| | | </if> |
| | | <if test="orderDetail.deliveryDetail.deliveryDetailRemakes != null and orderDetail.deliveryDetail.deliveryDetailRemakes != ''"> |
| | | and dd.delivery_detail_remakes regexp #{orderDetail.deliveryDetail.deliveryDetailRemakes} |
| | | </if> |
| | | </where> |
| | | |
| | | order by dd.id |
| | | |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | <select id="findOrderQuantity" > |
| | | select quantity from sd.`order` where order_id=#{orderId} |
| | | </select> |
| | | |
| | | <select id="findOrderNumberdsum" > |
| | | select sum(warehouse_num) from sd.order_detail where order_id=#{orderId} |
| | | </select> |
| | | |
| | | <update id="updateOrderWarehousingState"> |
| | | update sd.`order` |
| | | set warehousing=#{state} |
| | | where order_id=#{orderId} |
| | | </update> |
| | | |
| | | <update id="updateOrderDeliveryState"> |
| | | update sd.`order` |
| | | set delivery=#{state} |
| | | where order_id=#{orderId} |
| | | </update> |
| | | |
| | | <update id="updateIntOrderNumberConut"> |
| | | update sd.order_detail |
| | | set warehouse_num=warehouse_num+${quantity} |
| | | where order_number=#{orderNumber} and order_id=#{orderId} |
| | | </update> |
| | | |
| | | <update id="updateOutOrderNumberConut"> |
| | | update sd.order_detail |
| | | set warehouse_num=warehouse_num-${quantity} |
| | | where order_number=#{orderNumber} and order_id=#{orderId} |
| | | </update> |
| | | |
| | | <update id="updateflowcard"> |
| | | update pp.flow_card |
| | | set received_quantity=received_quantity+${inventoryQuantity} |
| | | where order_number=#{orderNumber} and process_id=#{processId} |
| | | where order_number=#{orderNumber} and process_id=#{processId} and order_id=#{order.orderId} |
| | | </update> |
| | | |
| | | <update id="updateInventory"> |
| | | update mm.finished_goods_inventory |
| | | set inventory=inventory+${inventoryQuantity},quantity_available=quantity_available+${inventoryQuantity}, |
| | | update_time=now(),area=area+actual_signal_area*${inventoryQuantity} |
| | | where order_number=#{orderNumber} |
| | | set inventory=inventory+${flowCard.inventoryQuantity},quantity_available=quantity_available+${flowCard.inventoryQuantity}, |
| | | update_time=now(),area=actual_signal_area*quantity_available |
| | | <if test="storageRegion != null and storageRegion != ''"> |
| | | , storage_region= #{storageRegion} |
| | | </if> |
| | | <if test="remark != null and remark != ''"> |
| | | , remark= #{remark} |
| | | </if> |
| | | where order_number=#{flowCard.orderNumber} and order_id=#{flowCard.order.orderId} |
| | | </update> |
| | | |
| | | <insert id="insertFinishedGoodsInventory" useGeneratedKeys="true" > |
| | |
| | | <select id="findOrderNumberdcount" > |
| | | select count(*) |
| | | from mm.`finished_goods_inventory` |
| | | where order_number = #{orderNumber} |
| | | where order_number = #{orderNumber} and order_id=#{orderId}; |
| | | |
| | | </select> |
| | | |
| | | <select id="findOrderNumberd" > |
| | | select * |
| | | from sd.finished_goods_inventory |
| | | where order_number = #{orderNumber} |
| | | <select id="finishedGoodsInventorybycount" > |
| | | select quantity_available |
| | | from mm.`finished_goods_inventory` |
| | | where order_number = #{orderNumber} and order_id=#{orderId}; |
| | | |
| | | </select> |
| | | |
| | | |
| | | <select id="getseletwarehousing" resultMap="selectFlowCard"> |
| | | select |
| | |
| | | od.product_name, |
| | | od.width, |
| | | od.height, |
| | | o.creater, |
| | | o.creator, |
| | | o.project, |
| | | fc.order_number, |
| | | od.quantity, |
| | |
| | | fc.process_id, |
| | | fc.received_quantity, |
| | | o.batch |
| | | from pp.flow_card fc left join sd.order_detail od on fc.order_number=od.order_number inner join sd.`order` o on |
| | | from pp.flow_card fc left join sd.order_detail od on fc.order_id=od.order_id and fc.order_number=od.order_number inner join sd.`order` o on |
| | | o.order_id=fc.order_id |
| | | <where> |
| | | and fc.received_quantity <![CDATA[<]]> fc.inventory_quantity |
| | |
| | | <if test="flowCard.orderDetail.height != null and flowCard.orderDetail.height != ''"> |
| | | and od.height regexp #{flowCard.orderDetail.height} |
| | | </if> |
| | | <if test="flowCard.order.creater != null and flowCard.order.creater != ''"> |
| | | and o.creater regexp #{flowCard.order.creater} |
| | | <if test="flowCard.order.creator != null and flowCard.order.creator != ''"> |
| | | and o.creator regexp #{flowCard.order.creator} |
| | | </if> |
| | | <if test="flowCard.order.project != null and flowCard.order.project != ''"> |
| | | and o.project regexp #{flowCard.order.project} |
| | |
| | | </if> |
| | | |
| | | </where> |
| | | group by fc.order_number,fc.process_id order by fc.create_time |
| | | group by fc.order_id,fc.order_number,fc.process_id order by fc.create_time |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | <select id="getseletwarehousingPageTotal" > |
| | | select CEILING(count(zu.order_number)/#{pageSize}) from ( |
| | | select fc.order_number as order_number,fc.process_id from pp.flow_card fc left join sd.order_detail od on |
| | | fc.order_number=od.order_number inner join sd.`order` o on o.order_id=fc.order_id |
| | | fc.order_id=od.order_id and fc.order_number=od.order_number inner join sd.`order` o on o.order_id=fc.order_id |
| | | <where> |
| | | and fc.received_quantity <![CDATA[<]]> fc.inventory_quantity |
| | | <if test="flowCard.order.orderId != null and flowCard.order.orderId != ''"> |
| | |
| | | <if test="flowCard.orderDetail.height != null and flowCard.orderDetail.height != ''"> |
| | | and od.height regexp #{flowCard.orderDetail.height} |
| | | </if> |
| | | <if test="flowCard.order.creater != null and flowCard.order.creater != ''"> |
| | | and o.creater regexp #{flowCard.order.creater} |
| | | <if test="flowCard.order.creator != null and flowCard.order.creator != ''"> |
| | | and o.creator regexp #{flowCard.order.creator} |
| | | </if> |
| | | <if test="flowCard.order.project != null and flowCard.order.project != ''"> |
| | | and o.project regexp #{flowCard.order.project} |
| | |
| | | </if> |
| | | |
| | | </where> |
| | | group by fc.order_number,fc.process_id order by fc.create_time) as zu |
| | | group by fc.order_id,fc.order_number,fc.process_id order by fc.create_time) as zu |
| | | </select> |
| | | |
| | | |
| | |
| | | fgi.end_time, |
| | | fgi.remark |
| | | from finished_goods_inventory fgi |
| | | left join sd.order_detail od on fgi.order_number = od.order_number |
| | | inner join sd.`order` o on fgi.order_id = o.order_id |
| | | left join sd.order_detail od on fgi.order_id = od.order_id and fgi.order_number = od.order_number |
| | | left join sd.`order` o on fgi.order_id = o.order_id |
| | | <where> |
| | | and fgi.status = 0 and fgi.quantity_available>0 |
| | | <if test="finishedGoodsInventory.orderDetail.width != null and finishedGoodsInventory.orderDetail.width != ''"> |
| | | and od.width regexp #{finishedGoodsInventory.orderDetail.width} |
| | | </if> |
| | |
| | | select |
| | | CEILING(count(fgi.id)/#{pageSize}) |
| | | from finished_goods_inventory fgi |
| | | left join sd.order_detail od on fgi.order_number = od.order_number |
| | | inner join sd.`order` o on fgi.order_id = o.order_id |
| | | left join sd.order_detail od on fgi.order_id = od.order_id and fgi.order_number = od.order_number |
| | | left join sd.`order` o on fgi.order_id = o.order_id |
| | | <where> |
| | | and fgi.status = 0 and fgi.quantity_available>0 |
| | | <if test="finishedGoodsInventory.orderDetail.width != null and finishedGoodsInventory.orderDetail.width != ''"> |
| | | and od.width regexp #{finishedGoodsInventory.orderDetail.width} |
| | | </if> |
| | |
| | | <resultMap id="selectFinishedGoodsInventory" type="com.example.erp.entity.mm.FinishedOperateLog" > |
| | | <id column="id" property="id"/> |
| | | <result column="operation_order_number" property="operationOrderNumber"/> |
| | | <result column="product_number" property="productNumber"/> |
| | | <result column="order_id" property="orderId"/> |
| | | <result column="operation_number" property="operationNumber"/> |
| | | <result column="quantity" property="quantity"/> |
| | | <result column="operate_type" property="operateType"/> |
| | | <result column="operator" property="operator"/> |
| | | <result column="operate_time" property="operateTime"/> |
| | | <result column="stater_operation_order_number" property="staterOperationOrderNumber"/> |
| | | <result column="end_operation_order_number" property="endOperationOrderNumber"/> |
| | | <result column="status" property="status"/> |
| | | <result column="type" property="type"/> |
| | | <result column="reviewed" property="reviewed"/> |
| | | <result column="reviewed_time" property="reviewedTime"/> |
| | | <result column="remarks" property="remarks"/> |
| | | <result column="is_state" property="isState"/> |
| | | |
| | | <!--<result column="g_typeId" property="glassTypes.typeId"/> |
| | | <result column="g_type" property="glassTypes.type"/>--> |
| | | <result column="width" property="orderDetail.width"/> |
| | | <result column="height" property="orderDetail.height"/> |
| | | <result column="product_id" property="orderDetail.productId"/> |
| | | <result column="product_name" property="orderDetail.productName"/> |
| | | |
| | | </resultMap> |
| | | |
| | | <select id="getSelectOperateRecord" resultMap="selectFinishedGoodsInventory"> |
| | | select fol.operation_order_number, |
| | | fol.order_id, |
| | | fol.operation_number, |
| | | fol.quantity, |
| | | fol.operator, |
| | | od.product_id, |
| | | od.product_name, |
| | | od.width, |
| | | od.height, |
| | | fol.operate_time, |
| | | fol.`status`, |
| | | fol.is_state, |
| | | fol.reviewed, |
| | | fol.reviewed_time, |
| | | fol.type, |
| | | fol.remarks |
| | | from (select * |
| | | from mm.finished_operate_log aa where aa.operate_type = '领出' or aa.operate_type = '返工') fol |
| | | left join sd.order_detail od on fol.order_id = od.order_id and fol.operation_number = od.order_number |
| | | <where> |
| | | <if test="finishedOperateLog.operationOrderNumber != null and finishedOperateLog.operationOrderNumber != ''"> |
| | | and fol.operation_order_number regexp #{finishedOperateLog.operationOrderNumber} |
| | | </if> |
| | | <if test="finishedOperateLog.orderId != null and finishedOperateLog.orderId != ''"> |
| | | and fol.order_id regexp #{finishedOperateLog.orderId} |
| | | </if> |
| | | <if test="finishedOperateLog.operationNumber != null and finishedOperateLog.operationNumber != ''"> |
| | | and fol.operation_number regexp #{finishedOperateLog.operationNumber} |
| | | </if> |
| | | <if test="finishedOperateLog.quantity != null and finishedOperateLog.quantity != ''"> |
| | | and fol.quantity regexp #{finishedOperateLog.quantity} |
| | | </if> |
| | | <if test="finishedOperateLog.operator != null and finishedOperateLog.operator != ''"> |
| | | and fol.operator regexp #{finishedOperateLog.operator} |
| | | </if> |
| | | <if test="finishedOperateLog.orderDetail.productId != null and finishedOperateLog.orderDetail.productId != ''"> |
| | | and od.product_id regexp #{finishedOperateLog.orderDetail.productId} |
| | | </if> |
| | | <if test="finishedOperateLog.orderDetail.productName != null and finishedOperateLog.orderDetail.productName != ''"> |
| | | and od.product_name regexp #{finishedOperateLog.orderDetail.productName} |
| | | </if> |
| | | <if test="finishedOperateLog.orderDetail.width != null and finishedOperateLog.orderDetail.width != ''"> |
| | | and od.width regexp #{finishedOperateLog.orderDetail.width} |
| | | </if> |
| | | <if test="finishedOperateLog.orderDetail.height != null and finishedOperateLog.orderDetail.height != ''"> |
| | | and od.height regexp #{finishedOperateLog.orderDetail.height} |
| | | </if> |
| | | <if test="finishedOperateLog.operateTime != null and finishedOperateLog.operateTime != ''"> |
| | | and fol.operate_time regexp #{finishedOperateLog.operateTime} |
| | | </if> |
| | | <if test="finishedOperateLog.status != null and finishedOperateLog.status != ''"> |
| | | and fol.`status` regexp #{finishedOperateLog.status} |
| | | </if> |
| | | <if test="finishedOperateLog.reviewed != null and finishedOperateLog.reviewed != ''"> |
| | | and fol.reviewed regexp #{finishedOperateLog.reviewed} |
| | | </if> |
| | | <if test="finishedOperateLog.reviewedTime != null and finishedOperateLog.reviewedTime != ''"> |
| | | and fol.reviewed_time regexp #{finishedOperateLog.reviewedTime} |
| | | </if> |
| | | <if test="finishedOperateLog.type != null and finishedOperateLog.type != ''"> |
| | | and fol.type regexp #{finishedOperateLog.type} |
| | | </if> |
| | | <if test="finishedOperateLog.remarks != null and finishedOperateLog.remarks != ''"> |
| | | and fol.remarks regexp #{finishedOperateLog.remarksr} |
| | | </if> |
| | | </where> |
| | | |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | <select id="getSelectOperateRecordLogPageTotal" > |
| | | select CEILING(count(fol.id)/#{pageSize}) |
| | | from (select * |
| | | from mm.finished_operate_log aa where aa.operate_type = '领出' or aa.operate_type = '返工') fol |
| | | left join sd.order_detail od on fol.order_id = od.order_id and fol.operation_number = od.order_number |
| | | <where> |
| | | <if test="finishedOperateLog.operationOrderNumber != null and finishedOperateLog.operationOrderNumber != ''"> |
| | | and fol.operation_order_number regexp #{finishedOperateLog.operationOrderNumber} |
| | | </if> |
| | | <if test="finishedOperateLog.orderId != null and finishedOperateLog.orderId != ''"> |
| | | and fol.order_id regexp #{finishedOperateLog.orderId} |
| | | </if> |
| | | <if test="finishedOperateLog.operationNumber != null and finishedOperateLog.operationNumber != ''"> |
| | | and fol.operation_number regexp #{finishedOperateLog.operationNumber} |
| | | </if> |
| | | <if test="finishedOperateLog.quantity != null and finishedOperateLog.quantity != ''"> |
| | | and fol.quantity regexp #{finishedOperateLog.quantity} |
| | | </if> |
| | | <if test="finishedOperateLog.operator != null and finishedOperateLog.operator != ''"> |
| | | and fol.operator regexp #{finishedOperateLog.operator} |
| | | </if> |
| | | <if test="finishedOperateLog.orderDetail.productId != null and finishedOperateLog.orderDetail.productId != ''"> |
| | | and od.product_id regexp #{finishedOperateLog.orderDetail.productId} |
| | | </if> |
| | | <if test="finishedOperateLog.orderDetail.productName != null and finishedOperateLog.orderDetail.productName != ''"> |
| | | and od.product_name regexp #{finishedOperateLog.orderDetail.productName} |
| | | </if> |
| | | <if test="finishedOperateLog.orderDetail.width != null and finishedOperateLog.orderDetail.width != ''"> |
| | | and od.width regexp #{finishedOperateLog.orderDetail.width} |
| | | </if> |
| | | <if test="finishedOperateLog.orderDetail.height != null and finishedOperateLog.orderDetail.height != ''"> |
| | | and od.height regexp #{finishedOperateLog.orderDetail.height} |
| | | </if> |
| | | <if test="finishedOperateLog.operateTime != null and finishedOperateLog.operateTime != ''"> |
| | | and fol.operate_time regexp #{finishedOperateLog.operateTime} |
| | | </if> |
| | | <if test="finishedOperateLog.status != null and finishedOperateLog.status != ''"> |
| | | and fol.`status` regexp #{finishedOperateLog.status} |
| | | </if> |
| | | <if test="finishedOperateLog.reviewed != null and finishedOperateLog.reviewed != ''"> |
| | | and fol.reviewed regexp #{finishedOperateLog.reviewed} |
| | | </if> |
| | | <if test="finishedOperateLog.reviewedTime != null and finishedOperateLog.reviewedTime != ''"> |
| | | and fol.reviewed_time regexp #{finishedOperateLog.reviewedTime} |
| | | </if> |
| | | <if test="finishedOperateLog.type != null and finishedOperateLog.type != ''"> |
| | | and fol.type regexp #{finishedOperateLog.type} |
| | | </if> |
| | | <if test="finishedOperateLog.remarks != null and finishedOperateLog.remarks != ''"> |
| | | and fol.remarks regexp #{finishedOperateLog.remarksr} |
| | | </if> |
| | | </where> |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | <select id="getselectAllocateFinishedOperateLog" resultMap="selectFinishedGoodsInventory" > |
| | | select fol.operation_order_number, |
| | | fol.order_id, |
| | | fol.operation_number, |
| | | fol.stater_operation_order_number, |
| | | fol.end_operation_order_number, |
| | | fol.quantity, |
| | | fol.operator, |
| | | od.product_id, |
| | | od.product_name, |
| | | od.width, |
| | | od.height, |
| | | fol.operate_time |
| | | from (select * |
| | | from mm.finished_operate_log aa where aa.operate_type = '调拨') fol |
| | | left join sd.order_detail od on fol.order_id = od.order_id and fol.operation_number = od.order_number |
| | | <where> |
| | | <if test="finishedOperateLog.operationOrderNumber != null and finishedOperateLog.operationOrderNumber != ''"> |
| | | and fol.operation_order_number regexp #{finishedOperateLog.operationOrderNumber} |
| | | </if> |
| | | <if test="finishedOperateLog.orderId != null and finishedOperateLog.orderId != ''"> |
| | | and fol.order_id regexp #{finishedOperateLog.orderId} |
| | | </if> |
| | | <if test="finishedOperateLog.operationNumber != null and finishedOperateLog.operationNumber != ''"> |
| | | and fol.operation_number regexp #{finishedOperateLog.operationNumber} |
| | | </if> |
| | | <if test="finishedOperateLog.staterOperationOrderNumber != null and finishedOperateLog.staterOperationOrderNumber != ''"> |
| | | and fol.stater_operation_order_number regexp #{finishedOperateLog.staterOperationOrderNumber} |
| | | </if> |
| | | <if test="finishedOperateLog.endOperationOrderNumber != null and finishedOperateLog.endOperationOrderNumber != ''"> |
| | | and fol.end_operation_order_number regexp #{finishedOperateLog.endOperationOrderNumber} |
| | | </if> |
| | | <if test="finishedOperateLog.quantity != null and finishedOperateLog.quantity != ''"> |
| | | and fol.quantity regexp #{finishedOperateLog.quantity} |
| | | </if> |
| | | <if test="finishedOperateLog.operator != null and finishedOperateLog.operator != ''"> |
| | | and fol.operator regexp #{finishedOperateLog.operator} |
| | | </if> |
| | | <if test="finishedOperateLog.orderDetail.productId != null and finishedOperateLog.orderDetail.productId != ''"> |
| | | and od.product_id regexp #{finishedOperateLog.orderDetail.productId} |
| | | </if> |
| | | <if test="finishedOperateLog.orderDetail.productName != null and finishedOperateLog.orderDetail.productName != ''"> |
| | | and od.product_name regexp #{finishedOperateLog.orderDetail.productName} |
| | | </if> |
| | | <if test="finishedOperateLog.orderDetail.width != null and finishedOperateLog.orderDetail.width != ''"> |
| | | and od.width regexp #{finishedOperateLog.orderDetail.width} |
| | | </if> |
| | | <if test="finishedOperateLog.orderDetail.height != null and finishedOperateLog.orderDetail.height != ''"> |
| | | and od.height regexp #{finishedOperateLog.orderDetail.height} |
| | | </if> |
| | | <if test="finishedOperateLog.operateTime != null and finishedOperateLog.operateTime != ''"> |
| | | and fol.operate_time regexp #{finishedOperateLog.operateTime} |
| | | </if> |
| | | </where> |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | <select id="getselectAllocateFinishedOperateLogPageTotal" > |
| | | select CEILING(count(fol.id)/#{pageSize}) |
| | | from (select * |
| | | from mm.finished_operate_log aa where aa.operate_type = '调拨') fol |
| | | left join sd.order_detail od on fol.order_id = od.order_id and fol.end_operation_order_number = od.order_number |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | <select id="getselectFinishedOperateLog" > |
| | | select |
| | | * |
| | |
| | | mm.finished_operate_log limit 0,1; |
| | | </select> |
| | | |
| | | <insert id="insertFinishedOperateLog" useGeneratedKeys="true" keyProperty="id" > |
| | | |
| | | |
| | | <select id="getmaximum" > |
| | | select count(*) from mm.finished_operate_log where operate_type =#{type} and date(operate_time)=CURDATE() |
| | | </select> |
| | | |
| | | <insert id="insertIntFinishedOperateLog" useGeneratedKeys="true" > |
| | | insert into mm.finished_operate_log(operation_order_number, |
| | | product_number, |
| | | order_id, |
| | | operation_number, |
| | | operate_type, |
| | | operator, |
| | |
| | | operate_time |
| | | ) |
| | | values ( |
| | | #{processId} ,#{orderDetail.productId},#{orderNumber},"入库","王五",#{inventoryQuantity},now() |
| | | #{oddNumber} ,#{flowCard.order.orderId},#{flowCard.orderNumber},"入库",#{userName},#{flowCard.inventoryQuantity},now() |
| | | ) |
| | | </insert> |
| | | |
| | | <insert id="insertOutFinishedOperateLog" useGeneratedKeys="true" > |
| | | insert into mm.finished_operate_log(operation_order_number, |
| | | order_id, |
| | | operation_number, |
| | | operate_type, |
| | | operator, |
| | | quantity, |
| | | operate_time |
| | | ) |
| | | values ( |
| | | #{orderDetail.deliveryDetail.deliveryId} ,#{orderDetail.deliveryDetail.order_id},#{orderDetail.deliveryDetail.orderNumber} |
| | | ,"出库",#{userName},#{orderDetail.warehouseNum},now() |
| | | ) |
| | | </insert> |
| | | |
| | | <insert id="insertFinishedOperateLogTakeOut" useGeneratedKeys="true" > |
| | | insert into mm.finished_operate_log(operation_order_number, |
| | | order_id, |
| | | operation_number, |
| | | operate_type, |
| | | operator, |
| | | quantity, |
| | | operate_time, |
| | | status, |
| | | type, |
| | | remarks |
| | | ) |
| | | values ( |
| | | #{oddNumber} ,#{orderDetail.finishedGoodsInventory.orderId},#{orderDetail.finishedGoodsInventory.orderNumber} |
| | | ,"领出",#{userName},#{orderDetail.quantity},now(),"未审核",#{operateType},#{remarks} |
| | | ) |
| | | </insert> |
| | | |
| | | <insert id="insertFinishedOperateLogAllocate" useGeneratedKeys="true" > |
| | | insert into mm.finished_operate_log(operation_order_number, |
| | | order_id, |
| | | operation_number, |
| | | operate_type, |
| | | operator, |
| | | quantity, |
| | | operate_time, |
| | | stater_operation_order_number, |
| | | end_operation_order_number |
| | | ) |
| | | values ( |
| | | #{oddNumber} ,#{orderDetail.finishedGoodsInventory.orderId},#{orderDetail.finishedGoodsInventory.orderNumber} |
| | | ,"调拨",#{userName},#{orderDetail.quantity},now(),#{orderDetail.orderId},#{orderDetail.orderNumber} |
| | | ) |
| | | </insert> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | <resultMap id="flowCardMap" type="com.example.erp.entity.pp.FlowCard"> |
| | | |
| | | <result column="order_id" property="orderId"/> |
| | | <result column="production_id" property="productionId"/> |
| | | <result column="splitting_status" property="splittingStatus"/> |
| | | <result column="create_time" property="createTime"/> |
| | | <result column="process_Id" property="processId"/> |
| | | <result column="binning_quantity" property="binningQuantity"/> |
| | | <result column="founder" property="founder"/> |
| | | <!--接收其他外键实体类数据--> |
| | | <association property="order" javaType="com.example.erp.entity.sd.Order"> |
| | | <result column="batch" property="batch"/> |
| | | <result column="project" property="project"/> |
| | | </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"/> |
| | | <result column="compute_gross_area" property="computeGrossArea"/> |
| | | <result column="perimeter" property="perimeter"/> |
| | | <result column="bend_radius" property="bendRadius"/> |
| | | <result column="processing_note" property="processingNote"/> |
| | | </association> |
| | | |
| | |
| | | </resultMap> |
| | | <select id="selectFlowCard" resultMap="flowCardMap"> |
| | | 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 |
| | | a.order_Id, |
| | | a.process_Id, |
| | | c.product_id, |
| | | c.product_name, |
| | | b.project, |
| | | a.binning_quantity, |
| | | c.compute_gross_area, |
| | | a.founder, |
| | | 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="orderGlassDetail.orderId != null and orderGlassDetail.orderId != ''"> |
| | | and a.order_id regexp #{orderGlassDetail.orderId} |
| | | <if test="flowCard.orderId != null and flowCard.orderId != ''"> |
| | | and a.order_id regexp #{flowCard.orderId} |
| | | </if> |
| | | <if test="orderGlassDetail.productionId != null and orderGlassDetail.productionId != ''"> |
| | | and a.production_id regexp #{orderGlassDetail.productionId} |
| | | <if test="flowCard.productionId != null and flowCard.productionId != ''"> |
| | | and a.process_Id regexp #{flowCard.productionId} |
| | | </if> |
| | | <if test="orderGlassDetail.order.batch != null and orderGlassDetail.order.batch != ''"> |
| | | and c.batch regexp #{orderGlassDetail.order.batch} |
| | | <if test="flowCard.orderDetail.productId != null and flowCard.orderDetail.productId != ''"> |
| | | and c.product_id regexp #{flowCard.orderDetail.productId} |
| | | </if> |
| | | <if test="orderGlassDetail.orderDetail.productName != null and orderGlassDetail.orderDetail.productName!= ''"> |
| | | and b.product_name regexp #{orderGlassDetail.orderDetail.productName} |
| | | <if test="flowCard.orderDetail.productName != null and flowCard.orderDetail.productName!= ''"> |
| | | and c.product_name regexp #{flowCard.orderDetail.productName} |
| | | </if> |
| | | <if test="orderGlassDetail.splittingStatus=0 " > |
| | | and a.splitting_status regexp #{state} |
| | | |
| | | <if test="flowCard.order.project != null and flowCard.order.project!= ''"> |
| | | and b.project regexp #{flowCard.order.project} |
| | | </if> |
| | | <if test="orderGlassDetail.splittingStatus=1"> |
| | | and a.splitting_status regexp #{state} |
| | | </if> |
| | | <if test="orderGlassDetail.createTime != ''"> |
| | | |
| | | <if test="flowCard.createTime != ''"> |
| | | 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 |
| | | group by a.process_Id |
| | | |
| | | |
| | | |
| | | ; |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.example.erp.mapper.pp.ReportingWorkDetailMapper"> |
| | | <!--返工新增--> |
| | | <resultMap id="reworkAdd" type="com.example.erp.entity.pp.ReportingWorkDetail"> |
| | | <id column="id" property="id"/> |
| | | <result column="rework_team" property="reworkTeam"/> |
| | | <result column="breakage_number" property="breakageNumber"/> |
| | | <result column="return_process" property="returnProcess"/> |
| | | <result column="breakage_reason" property="breakageReason"/> |
| | | <result column="responsible_equipment" property="responsibleEquipment"/> |
| | | <result column="responsible_team" property="responsibleTeam"/> |
| | | <!--接收其他外键实体类数据--> |
| | | <association property="reportingWork" javaType="com.example.erp.entity.pp.ReportingWork"> |
| | | <result column="process_id" property="processId"/> |
| | | </association> |
| | | |
| | | <association property="order" javaType="com.example.erp.entity.sd.Order"> |
| | | <result column="order_id" property="orderId"/> |
| | | <result column="project" property="project"/> |
| | | <result column="batch" property="batch"/> |
| | | </association> |
| | | |
| | | <association property="orderDetail" javaType="com.example.erp.entity.sd.OrderDetail"> |
| | | <result column="shape" property="shape"/> |
| | | |
| | | </association> |
| | | |
| | | <association property="orderGlassDetail" javaType="com.example.erp.entity.sd.OrderGlassDetail"> |
| | | <result column="glass_child" property="glassChild"/> |
| | | <result column="order_number" property="orderNumber"/> |
| | | <result column="technology_number" property="technologyNumber"/> |
| | | <result column="glass_address" property="glassAddress"/> |
| | | <result column="child_height" property="childHeight"/> |
| | | |
| | | </association> |
| | | |
| | | <!-- <result column="order_id" property="orderId"/>--> |
| | | |
| | | </resultMap> |
| | | |
| | | <!--返工管理页面--> |
| | | <resultMap id="reworkManage" type="com.example.erp.entity.pp.ReportingWorkDetail"> |
| | | |
| | | <id column="id" property="id"/> |
| | | <result column="rework_team" property="reworkTeam"/> |
| | | <result column="breakage_number" property="breakageNumber"/> |
| | | <result column="return_process" property="returnProcess"/> |
| | | <result column="breakage_reason" property="breakageReason"/> |
| | | <result column="breakage_type" property="breakageType"/> |
| | | <result column="responsible_equipment" property="responsibleEquipment"/> |
| | | <result column="responsible_team" property="responsibleTeam"/> |
| | | <result column="rework_area" property="reworkArea"/> |
| | | <result column="order_number" property="orderNumber"/> |
| | | <result column="quality_inspector" property="qualityInspector"/> |
| | | |
| | | <!--接收其他外键实体类数据--> |
| | | <association property="reportingWork" javaType="com.example.erp.entity.pp.ReportingWork"> |
| | | <result column="process_id" property="processId"/> |
| | | </association> |
| | | |
| | | <association property="order" javaType="com.example.erp.entity.sd.Order"> |
| | | <result column="order_id" property="orderId"/> |
| | | <result column="project" property="project"/> |
| | | <result column="batch" property="batch"/> |
| | | </association> |
| | | |
| | | <association property="orderDetail" javaType="com.example.erp.entity.sd.OrderDetail"> |
| | | <result column="shape" property="shape"/> |
| | | </association> |
| | | |
| | | <association property="orderGlassDetail" javaType="com.example.erp.entity.sd.OrderGlassDetail"> |
| | | <result column="glass_child" property="glassChild"/> |
| | | <!--<result column="order_number" property="orderNumber"/>--> |
| | | <result column="technology_number" property="technologyNumber"/> |
| | | <result column="glass_address" property="glassAddress"/> |
| | | <result column="child_height" property="childHeight"/> |
| | | <result column="child_width" property="childWidth"/> |
| | | |
| | | </association> |
| | | |
| | | |
| | | </resultMap> |
| | | |
| | | <!--获取返工新增数据--> |
| | | <select id="queryReworkAdd" resultMap="reworkAdd"> |
| | | select * from v_rework |
| | | <where> |
| | | rework_team is null |
| | | |
| | | <if test="order_id != null and order_id != ''"> |
| | | and order_id = #{order_id} |
| | | </if> |
| | | |
| | | <if test="process_id != null and process_id != ''"> |
| | | and process_id = #{process_id} |
| | | </if> |
| | | |
| | | <if test="project != null and project != ''"> |
| | | and project = #{project} |
| | | </if> |
| | | </where> |
| | | |
| | | order by id desc |
| | | limit #{pageNum},#{pageSize} |
| | | ; |
| | | </select> |
| | | |
| | | |
| | | <!--返工管理--> |
| | | <select id="reworkDataManage" resultMap="reworkManage"> |
| | | select * from v_rework |
| | | |
| | | |
| | | |
| | | order by id desc |
| | | limit #{pageNum},#{pageSize} |
| | | ; |
| | | </select> |
| | | |
| | | |
| | | <!--返工管理--> |
| | | <select id="reworkDataManage2" resultMap="reworkManage"> |
| | | select * from v_rework |
| | | |
| | | <where> |
| | | |
| | | /*create_time <![CDATA[>=]]> #{sDate} and create_time <![CDATA[<=]]> #{eDate}}*/ |
| | | /*大于等于,小于等于*/ |
| | | create_time >= #{sDate} and create_time <= #{eDate}} |
| | | |
| | | and rework_team is not null |
| | | |
| | | <if test="order_id != null and order_id != ''"> |
| | | and order_id = #{order_id} |
| | | </if> |
| | | |
| | | <if test="process_id != null and process_id != ''"> |
| | | and process_id = #{process_id} |
| | | </if> |
| | | |
| | | <if test="project != null and project != ''"> |
| | | and project = #{project} |
| | | </if> |
| | | |
| | | |
| | | </where> |
| | | |
| | | order by id desc |
| | | limit #{pageNum},#{pageSize} |
| | | ; |
| | | </select> |
| | | |
| | | |
| | | <!--<where> |
| | | |
| | | create_time <![CDATA[>=]]> #{startTime} and create_time <![CDATA[<=]]> #{endTime}} |
| | | <!–返工编号–> |
| | | <if test="rework_id!=null and rework != ''"> |
| | | and rework_id = #{reworkId} |
| | | </if> |
| | | <!–流程卡号–> |
| | | <if test="process_id != null and process_id != ''"> |
| | | and process_id=#{processId} |
| | | </if> |
| | | <!–返工类型–> |
| | | <if test="rework_Type != null and rework_Type!=''"> |
| | | and rework_Type=#{rework_Type} |
| | | </if> |
| | | <!–返工原因–> |
| | | <if test="rework_Reason != null and rework_Reason!=''"> |
| | | and rework_Reason=#{rework_Reason} |
| | | </if> |
| | | <!–返工工序–> |
| | | <if test="rework_Processes != null and rework_Processes!=''"> |
| | | and rework_Processes=#{rework_Processes} |
| | | </if> |
| | | <!–返工数量–> |
| | | <if test="rework_Num != null and rework_Num!=''"> |
| | | and rework_Num=#{rework_Num} |
| | | </if> |
| | | <!–返工班组–> |
| | | <if test="rework_Team != null and rework_Team!=''"> |
| | | and rework_Team=#{rework_Team} |
| | | </if> |
| | | <!–审核人–> |
| | | <if test="reviewer != null and reviewer!=''"> |
| | | and reviewer=#{reviewer} |
| | | </if> |
| | | <!–审核状态–> |
| | | <if test="review_Status != null and review_Status!=''"> |
| | | and review_Status=#{review_Status} |
| | | </if> |
| | | <!–返工面积–> |
| | | <if test="rework_Area != null and rework_Area!=''"> |
| | | and rework_Area=#{rework_Area} |
| | | </if> |
| | | |
| | | </where>--> |
| | | |
| | | <!--获取返工新增数据--> |
| | | <!--<select id="getReworkAdd"> |
| | | SELECT `b`.`id` AS `id`, |
| | | `b`.`rework_team` AS `rework_team`, |
| | | `c`.`order_id` AS `order_id`, |
| | | `a`.`process_id` AS `process_id`, |
| | | `c`.`project` AS `project`, |
| | | `c`.`batch` AS `batch`, |
| | | `d`.`glass_child` AS `glass_child`, |
| | | `d`.`order_number` AS `order_Number`, |
| | | `d`.`technology_number` AS `technology_number`, |
| | | `d`.`glass_address` AS `glass_address`, |
| | | `b`.`breakage_number` AS `breakage_number`, |
| | | `d`.`child_width` AS `child_width`, |
| | | `d`.`child_height` AS `child_height`, |
| | | `e`.`shape` AS `shape`, |
| | | `b`.`return_process` AS `return_process`, |
| | | `b`.`breakage_reason` AS `breakage_reason`, |
| | | `b`.`responsible_equipment` AS `responsible_equipment`, |
| | | `b`.`responsible_team` AS `responsible_team`, |
| | | round((((`d`.`child_width` * `d`.`child_height`) * `b`.`breakage_number`) / 1000000), |
| | | 2) AS `rework_area`, |
| | | `b`.`qualityIns_pector` AS `qualityIns_pector` |
| | | FROM (((( |
| | | `reporting_work_detail` `b` |
| | | LEFT JOIN `reporting_work` `a` ON (( |
| | | `a`.`reporting_work_id` = `b`.`reporting_work_id` |
| | | ))) |
| | | LEFT JOIN `sd`.`order` `c` ON (( |
| | | `a`.`order_id` = `c`.`order_id` |
| | | ))) |
| | | LEFT JOIN `sd`.`order_detail` `e` ON ((( |
| | | `c`.`order_id` = `e`.`order_id` |
| | | ) |
| | | AND (`e`.`order_number` = `b`.`order_number`)))) |
| | | LEFT JOIN `sd`.`order_glass_detail` `d` ON ((( |
| | | `d`.`order_id` = `c`.`order_id` |
| | | ) |
| | | AND (`b`.`order_number` = `d`.`order_number`) |
| | | AND (`b`.`technology_number` = `d`.`technology_number`)))) |
| | | WHERE ( |
| | | `b`.`available` = 1) |
| | | </select>--> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <!--返工数据--> |
| | | |
| | | <mapper namespace="com.example.erp.mapper.pp.ReworkMapper"> |
| | | <resultMap id="reworkDataTitle" type="com.example.erp.entity.pp.Rework"> |
| | | |
| | | |
| | | </resultMap> |
| | | |
| | | |
| | | <!--获取返工数据--> |
| | | <select id="queryRework" resultMap="reworkDataTitle"> |
| | | select * from rework |
| | | <!--<where> |
| | | |
| | | create_time <![CDATA[>=]]> #{startTime} and create_time <![CDATA[<=]]> #{endTime}} |
| | | <!–返工编号–> |
| | | <if test="rework_id!=null and rework != ''"> |
| | | and rework_id = #{reworkId} |
| | | </if> |
| | | <!–流程卡号–> |
| | | <if test="process_id != null and process_id != ''"> |
| | | and process_id=#{processId} |
| | | </if> |
| | | <!–返工类型–> |
| | | <if test="rework_Type != null and rework_Type!=''"> |
| | | and rework_Type=#{rework_Type} |
| | | </if> |
| | | <!–返工原因–> |
| | | <if test="rework_Reason != null and rework_Reason!=''"> |
| | | and rework_Reason=#{rework_Reason} |
| | | </if> |
| | | <!–返工工序–> |
| | | <if test="rework_Processes != null and rework_Processes!=''"> |
| | | and rework_Processes=#{rework_Processes} |
| | | </if> |
| | | <!–返工数量–> |
| | | <if test="rework_Num != null and rework_Num!=''"> |
| | | and rework_Num=#{rework_Num} |
| | | </if> |
| | | <!–返工班组–> |
| | | <if test="rework_Team != null and rework_Team!=''"> |
| | | and rework_Team=#{rework_Team} |
| | | </if> |
| | | <!–审核人–> |
| | | <if test="reviewer != null and reviewer!=''"> |
| | | and reviewer=#{reviewer} |
| | | </if> |
| | | <!–审核状态–> |
| | | <if test="review_Status != null and review_Status!=''"> |
| | | and review_Status=#{review_Status} |
| | | </if> |
| | | <!–返工面积–> |
| | | <if test="rework_Area != null and rework_Area!=''"> |
| | | and rework_Area=#{rework_Area} |
| | | </if> |
| | | |
| | | </where>--> |
| | | |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
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> |