Merge branch 'master' of http://10.153.19.25:10105/r/ERP_override
| | |
| | | import * as XLSX from "xlsx"; |
| | | import {useI18n} from "vue-i18n"; |
| | | import useOrderInfoStore from "@/stores/sd/order/orderInfo"; |
| | | |
| | | import companyInfo from "@/stores/sd/companyInfo"; |
| | | import {VxeUI} from "vxe-pc-ui"; |
| | | const { t } = useI18n() |
| | | const xGrid = ref() |
| | | const company = companyInfo() |
| | | let filterData = ref({}) |
| | | const reportTime=company.reportTime |
| | | const orderInfo = useOrderInfoStore() |
| | | const gridOptions = reactive({ |
| | | loading:true, |
| | |
| | | }) |
| | | return |
| | | } |
| | | request.post(`${props.childrenData.url}/${basicProp.value.pageNum}/${basicProp.value.pageSize}/${orderInfo.brokenDate}`,filterData.value).then(res => { |
| | | request.post(`${props.childrenData.url}/${basicProp.value.pageNum}/${basicProp.value.pageSize}/${orderInfo.brokenDate}/${reportTime}`,filterData.value).then(res => { |
| | | if(res.code === '200'){ |
| | | props.childrenData.data = res.data.data |
| | | basicProp.value.pageTotal = res.data.total.pageTotal |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | const handleCellDblClick = ({ row, column, cell, $event }) => { |
| | | VxeUI.clipboard.copy(row[column.property]) |
| | | } |
| | | </script> |
| | | |
| | | <template> |
| | |
| | | ref="xGrid" |
| | | v-bind="gridOptions" |
| | | v-on="gridEvents" |
| | | @cell-dblclick="handleCellDblClick" |
| | | > |
| | | <!-- 䏿æ¾ç¤ºææä¿¡æ¯ææ§½--> |
| | | <template #content="{ row }"> |
| | |
| | | </tr> |
| | | <tr v-for="(items,index) in item.detail" :key="index"> |
| | | <td class="tdNowrap">客æ·åç§°ï¼</td> |
| | | <td colspan="2">{{ items.customer_name }}</td> |
| | | <td colspan="4">{{ items.customer_name }}</td> |
| | | <td class="tdNowrap">项ç®åç§°ï¼</td> |
| | | <td colspan="4" style="min-width: 250px;">{{ items.projectBatch }}</td> |
| | | <td colspan="3" style="min-width: 250px;">{{ items.projectBatch }}</td> |
| | | <td class="tdNowrap">å·¥èºæµç¨ï¼</td> |
| | | <td :colspan="2+item.processList.length*2" style="width: 500px">{{ items.process }}</td> |
| | | </tr> |
| | | <tr v-for="(itemTr,index) in item.detail" :key="index"> |
| | | <td class="tdNowrap">磨边类åï¼</td> |
| | | <td v-if="name=='天津åç»ç»çå·¥ä¸ææ¯æéå
¬å¸ï¼TJBB-QR7.1-01ï¼'" colspan="2">{{ itemTr.other_remarks }}</td> |
| | | <td v-else colspan="2">{{ itemTr.edging_type }}</td> |
| | | <td v-if="name=='天津åç»ç»çå·¥ä¸ææ¯æéå
¬å¸ï¼TJBB-QR7.1-01ï¼'" colspan="4">{{ itemTr.other_remarks }}</td> |
| | | <td v-else colspan="4">{{ itemTr.edging_type }}</td> |
| | | <td class="tdNowrap">åçåç§°ï¼</td> |
| | | <td colspan="4">{{ itemTr.glass_child }}</td> |
| | | <td colspan="3">{{ itemTr.glass_child }}</td> |
| | | <td class="tdNowrap">产ååç§°ï¼</td> |
| | | <td :colspan="2+item.processList.length*2">{{ itemTr.product_name }}</td> |
| | | </tr> |
| | |
| | | <td rowspan='2'>åºå·</td> |
| | | <td rowspan='2'>å¾å·</td> |
| | | <td rowspan='2'>ç¼å·</td> |
| | | <td rowspan="2">å°ç顺åº</td> |
| | | <td rowspan="2">å±å·</td> |
| | | <td rowspan='2' style="width: 90px">宽(å¼§é¿)*é«</td> |
| | | <td rowspan='2' >æ°é</td> |
| | | <td rowspan='2'>é¢ç§¯</td> |
| | |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="1"></td> |
| | | <template v-for=" n in item.processList.length"> |
| | | <td colspan="2"></td> |
| | | </template> |
| | |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="2"></td> |
| | | <td colspan="1"></td> |
| | | <template v-for=" n in item.processList.length"> |
| | | <td colspan="2"></td> |
| | | </template> |
| | |
| | | |
| | | <tr v-for="(itemtextareas,index) in item.detail" :key="index"> |
| | | <td colspan="31" style="width: 480px;height: 150px "> |
| | | <div style="width: 100%;height: 100%;text-align: left"><textarea style="height: 99%;width: 99%;border: none;;font-size: 16px;font-weight: bold;overflow: hidden;text-align: left;vertical-align: middle">{{itemtextareas.processing_note}}</textarea> |
| | | <div style="width: 100%;height: 100%;text-align: left"> |
| | | <textarea v-if="!company.processFontSize" style="height: 99%;width: 99%;border: none;;font-size: 14px;font-weight: bold;overflow: hidden;text-align: left;vertical-align: middle">{{itemtextareas.processing_note}}</textarea> |
| | | <textarea v-else style="height: 99%;width: 99%;border: none;;font-size: 36px;font-weight: bold;overflow: hidden;text-align: left;vertical-align: middle">{{itemtextareas.processing_note}}</textarea> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | |
| | | finishedProductReport :'ØªÙØ±Ùر اÙÙ
ÙØªØ¬Ø§Øª اÙÙÙØ§Ø¦ÙØ©', |
| | | workProcessName:'å¨å¶ååç§°', |
| | | StorageArea:'å
¥åºé¢ç§¯', |
| | | shippedArea:'åè´§é¢ç§¯' |
| | | shippedArea:'åè´§é¢ç§¯', |
| | | thicknessArea:'å¹³æ¹æ¯«ç±³' |
| | | |
| | | }, |
| | | productionBasicData:{ |
| | |
| | | finishedProductReport :'Finished product report', |
| | | workProcessName:'å¨å¶ååç§°', |
| | | StorageArea:'å
¥åºé¢ç§¯', |
| | | shippedArea:'åè´§é¢ç§¯' |
| | | shippedArea:'åè´§é¢ç§¯', |
| | | thicknessArea:'å¹³æ¹æ¯«ç±³' |
| | | |
| | | }, |
| | | productionBasicData:{ |
| | |
| | | finishedProductReport :'ìì í ë³´ê³ ì', |
| | | workProcessName:'å¨å¶ååç§°', |
| | | StorageArea:'å
¥åºé¢ç§¯', |
| | | shippedArea:'åè´§é¢ç§¯' |
| | | shippedArea:'åè´§é¢ç§¯', |
| | | thicknessArea:'å¹³æ¹æ¯«ç±³' |
| | | |
| | | }, |
| | | productionBasicData:{ |
| | |
| | | finishedProductReport :'ÐÑÑÐµÑ Ð¾ гоÑовой пÑодÑкÑии', |
| | | workProcessName:'å¨å¶ååç§°', |
| | | StorageArea:'å
¥åºé¢ç§¯', |
| | | shippedArea:'åè´§é¢ç§¯' |
| | | shippedArea:'åè´§é¢ç§¯', |
| | | thicknessArea:'å¹³æ¹æ¯«ç±³' |
| | | |
| | | }, |
| | | productionBasicData:{ |
| | |
| | | finishedProductReport :'æåæ¥è¡¨', |
| | | workProcessName:'å¨å¶ååç§°', |
| | | StorageArea:'å
¥åºé¢ç§¯', |
| | | shippedArea:'åè´§é¢ç§¯' |
| | | shippedArea:'åè´§é¢ç§¯', |
| | | thicknessArea:'å¹³æ¹æ¯«ç±³' |
| | | |
| | | }, |
| | | productionBasicData:{ |
| | |
| | | alienFunction:false,//æ¯å¦å¼å¯å¼å½¢åè½ï¼ææ¶é½æ¯false |
| | | replenishQRCode:1,//æ¯å¦è¡¥çäºç»´ç æ¯å¦æåå±,1æåï¼2䏿 |
| | | soleQRCode:false,//æµç¨å¡åå¹¶äºç»´ç æ¾ç¤ºåå±ï¼ä¹ä¹true.å
¶å®false |
| | | reportTime:"08:00",//æ¬¡ç ´ãäº§éæ¥è¡¨é»è®¤æ¶é´ |
| | | processFontSize:false,//æµç¨å¡å å·¥è¦æ±åä½å 大 |
| | | //天津 |
| | | printLabel: { |
| | | custom: (item1) => { |
| | |
| | | alienFunction:false,//æ¯å¦å¼å¯å¼å½¢åè½ï¼ææ¶é½æ¯false |
| | | replenishQRCode:2,//æ¯å¦è¡¥çäºç»´ç æ¯å¦æåå±,1æåï¼2䏿 |
| | | soleQRCode:false,//æµç¨å¡åå¹¶äºç»´ç æ¾ç¤ºåå±ï¼ä¹ä¹true.å
¶å®false |
| | | reportTime:"08:00",//æ¬¡ç ´ãäº§éæ¥è¡¨é»è®¤æ¶é´ |
| | | processFontSize:false,//æµç¨å¡å å·¥è¦æ±åä½å 大 |
| | | //天津 |
| | | printLabel: { |
| | | custom: (item1) => { |
| | |
| | | alienFunction:false,//æ¯å¦å¼å¯å¼å½¢åè½ï¼ææ¶é½æ¯false |
| | | replenishQRCode:1,//æ¯å¦è¡¥çäºç»´ç æ¯å¦æåå±,1æåï¼2䏿 |
| | | soleQRCode:false,//æµç¨å¡åå¹¶äºç»´ç æ¾ç¤ºåå±ï¼ä¹ä¹true.å
¶å®false |
| | | reportTime:"08:00",//æ¬¡ç ´ãäº§éæ¥è¡¨é»è®¤æ¶é´ |
| | | processFontSize:false,//æµç¨å¡å å·¥è¦æ±åä½å 大 |
| | | //天津 |
| | | printLabel: { |
| | | custom: (item1) => { |
| | |
| | | alienFunction:false,//æ¯å¦å¼å¯å¼å½¢åè½ï¼ææ¶é½æ¯false |
| | | replenishQRCode:1,//æ¯å¦è¡¥çäºç»´ç æ¯å¦æåå±,1æåï¼2䏿 |
| | | soleQRCode:false,//æµç¨å¡åå¹¶äºç»´ç æ¾ç¤ºåå±ï¼ä¹ä¹true.å
¶å®false |
| | | reportTime:"08:00",//æ¬¡ç ´ãäº§éæ¥è¡¨é»è®¤æ¶é´ |
| | | processFontSize:false,//æµç¨å¡å å·¥è¦æ±åä½å 大 |
| | | //天津 |
| | | printLabel: { |
| | | custom: (item1) => { |
| | |
| | | alienFunction:false,//æ¯å¦å¼å¯å¼å½¢åè½ï¼ææ¶é½æ¯false |
| | | replenishQRCode:1,//æ¯å¦è¡¥çäºç»´ç æ¯å¦æåå±,1æåï¼2䏿 |
| | | soleQRCode:false,//æµç¨å¡åå¹¶äºç»´ç æ¾ç¤ºåå±ï¼ä¹ä¹true.å
¶å®false |
| | | reportTime:"08:00",//æ¬¡ç ´ãäº§éæ¥è¡¨é»è®¤æ¶é´ |
| | | processFontSize:false,//æµç¨å¡å å·¥è¦æ±åä½å 大 |
| | | //天津 |
| | | printLabel: { |
| | | custom: (item1) => { |
| | |
| | | alienFunction:true,//æ¯å¦å¼å¯å¼å½¢åè½ï¼ææ¶é½æ¯false |
| | | replenishQRCode:1,//æ¯å¦è¡¥çäºç»´ç æ¯å¦æåå±,1æåï¼2䏿 |
| | | soleQRCode:false,//æµç¨å¡åå¹¶äºç»´ç æ¾ç¤ºåå±ï¼ä¹ä¹true.å
¶å®false |
| | | reportTime:"07:30",//æ¬¡ç ´ãäº§éæ¥è¡¨é»è®¤æ¶é´ |
| | | processFontSize:true,//æµç¨å¡å å·¥è¦æ±åä½å 大 |
| | | //天津 |
| | | printLabel: { |
| | | custom: (item1) => { |
| | |
| | | alienFunction:false,//æ¯å¦å¼å¯å¼å½¢åè½ï¼ææ¶é½æ¯false |
| | | replenishQRCode:1,//æ¯å¦è¡¥çäºç»´ç æ¯å¦æåå±,1æåï¼2䏿 |
| | | soleQRCode:true,//æµç¨å¡åå¹¶äºç»´ç æ¾ç¤ºåå±ï¼ä¹ä¹true.å
¶å®false |
| | | reportTime:"08:00",//æ¬¡ç ´ãäº§éæ¥è¡¨é»è®¤æ¶é´ |
| | | processFontSize:false,//æµç¨å¡å å·¥è¦æ±åä½å 大 |
| | | //天津 |
| | | printLabel: { |
| | | custom: (item1) => { |
| | |
| | | ElMessage.error(t('order.msg.pleaseCancelTheFilteringFirst')) |
| | | return |
| | | } |
| | | if (selectRecords.length == 0) { |
| | | ElMessage.warning(t('reportingWorks.selectProcessCardData')) |
| | | return; |
| | | } |
| | | // if (selectRecords.length == 0) { |
| | | // ElMessage.warning(t('reportingWorks.selectProcessCardData')) |
| | | // return; |
| | | // } |
| | | |
| | | let projectData = ref({ |
| | | projectdetail: selectRecords, |
| | |
| | | {field: 'width', |
| | | width: 100, |
| | | title: t('order.width'), |
| | | editRender: { name: 'input' }, |
| | | sortable: true |
| | | }, |
| | | { |
| | | field: 'height', |
| | | width: 100, |
| | | title: t('order.height'), |
| | | editRender: { name: 'input' }, |
| | | sortable: true |
| | | }, |
| | | { |
| | | field: 'quantity', |
| | | width: 150, |
| | | title: t('order.quantity'), |
| | | editRender: { name: 'input' }, |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | sortable: true |
| | |
| | | body: { |
| | | options: [ |
| | | [ |
| | | {code: 'setAmount', name: '设置ç»ä¸ç£¨é',}, |
| | | {code: 'setAmount', name: '设置ç»ä¸ç£¨é',prefixIcon:'vxe-icon-edit'}, |
| | | {code: 'addRow', name: 'æ·»å 临æ¶å°ç', prefixIcon: 'vxe-icon-add', visible: true, disabled: false}, |
| | | {code: 'displayProcessCard', name: 'æ¾ç¤ºæµç¨å¡',}, |
| | | {code: 'hideProcessCard', name: 'éèæµç¨å¡',}, |
| | | {code: 'setShape', name: '设置å¾å½¢',}, |
| | | {code: 'Export', name: 'æ°æ®å¯¼åº', prefixIcon: 'vxe-icon-download', visible: true, disabled: false}, |
| | | {code: 'safeDXF', name: 'å¾å½¢å¦å为DXF',}, |
| | | {code: 'exportOPTIMA', name: 'å¯¼åºæ°æ®å°OPTIMA',}, |
| | | {code: 'copyChecked', name: t('basicData.selectSame'), prefixIcon: 'vxe-icon-copy', visible: true, disabled: false }, |
| | | {code: 'copyAll', name: t('basicData.sameAfterwards'), prefixIcon: 'vxe-icon-feedback', visible: true, disabled: false }, |
| | | { |
| | | code: 'copyChecked', |
| | | name: t('basicData.selectSame'), |
| | | prefixIcon: 'vxe-icon-copy', |
| | | visible: true, |
| | | disabled: false |
| | | }, |
| | | { |
| | | code: 'copyAll', |
| | | name: t('basicData.sameAfterwards'), |
| | | prefixIcon: 'vxe-icon-feedback', |
| | | visible: true, |
| | | disabled: false |
| | | }, |
| | | ], |
| | | [] |
| | | ] |
| | |
| | | } |
| | | }, |
| | | { |
| | | code: 'Export', // å¯¼åºæä»¶æä½çé
ç½® |
| | | successMsg: 'æä»¶å¯¼åºæåï¼', |
| | | code: 'addRow', |
| | | successMsg: '已添å ', |
| | | gridRef: xGrid, |
| | | requiresRow: false, |
| | | addNewRow: async () => { |
| | | // è·åå½åç磨éé
ç½® |
| | | let currentGrindConfig = null; |
| | | try { |
| | | const res = await request.post(`/glassOptimize/getConfiguration/磨é/${username}`); |
| | | if (res.code == "200" && res.data.data && res.data.data.length > 0) { |
| | | const rawData = res.data.data[0]; |
| | | currentGrindConfig = {}; |
| | | for (const key in rawData) { |
| | | if (typeof rawData[key] === 'string') { |
| | | currentGrindConfig[key] = rawData[key].replace(/^\"|\"$/g, ''); |
| | | } else { |
| | | currentGrindConfig[key] = rawData[key]; |
| | | } |
| | | } |
| | | } |
| | | } catch (error) { |
| | | console.warn('è·å磨éé
置失败:', error); |
| | | } |
| | | |
| | | // æ ¹æ®ç£¨éé
置设置é»è®¤å¼ |
| | | let defaultLongGrind1 = 0; |
| | | let defaultLongGrind2 = 0; |
| | | let defaultShortGrind1 = 0; |
| | | let defaultShortGrind2 = 0; |
| | | |
| | | if (currentGrindConfig) { |
| | | defaultLongGrind1 = parseFloat(currentGrindConfig.leftEdge) || 0; |
| | | defaultLongGrind2 = parseFloat(currentGrindConfig.rightEdge) || 0; |
| | | defaultShortGrind1 = parseFloat(currentGrindConfig.upEdge) || 0; |
| | | defaultShortGrind2 = parseFloat(currentGrindConfig.downEdge) || 0; |
| | | } |
| | | |
| | | // å建æ°è¡æ°æ®ï¼å° widthãheightãquantity 设置为æ°å¼ç±»å |
| | | const newRow = { |
| | | order_number: 0, |
| | | width: 0, |
| | | height: 0, |
| | | quantity: 0, |
| | | longGrind1: defaultLongGrind1, |
| | | longGrind2: defaultLongGrind2, |
| | | shortGrind1: defaultShortGrind1, |
| | | shortGrind2: defaultShortGrind2, |
| | | shape: '', |
| | | process_id: '', |
| | | productName: '', |
| | | price: 0, |
| | | remark: '', |
| | | buildingNumber: '', |
| | | perimeter: 0, |
| | | area: 0, |
| | | rackNo: 1, |
| | | layer: 1, |
| | | glass_child: '', |
| | | markIcon: '', |
| | | processId: '', |
| | | totalLayer: 0, |
| | | patchState: 0, |
| | | heatLayoutId: 0, |
| | | process: '', |
| | | orderNo: '', |
| | | customerName: '', |
| | | processingNote: '', |
| | | projectName: '' |
| | | }; |
| | | |
| | | // å°æ°è¡æ·»å å°è¡¨æ ¼æ°æ®ä¸ |
| | | const currentData = gridOptions.data || []; |
| | | const updatedData = [...currentData, newRow]; |
| | | gridOptions.data = updatedData; |
| | | xGrid.value.loadData(updatedData); |
| | | |
| | | // è·åæ°æ·»å è¡çç´¢å¼ |
| | | const newIndex = updatedData.length - 1; |
| | | |
| | | // éä¸å¹¶ç¼è¾æ°è¡ |
| | | await nextTick(); |
| | | xGrid.value.setActiveRow(newRow); |
| | | } |
| | | }, |
| | | { |
| | | code: 'safeDXF', |
| | |
| | | if (config.code === 'Export') { |
| | | config.gridRef.value.exportData(); |
| | | ElMessage.success(config.successMsg); |
| | | return; |
| | | } |
| | | if (config.code === 'addRow') { |
| | | // æ·»å 确认æç¤ºå¼¹çªï¼è¯¢é®ç¨æ·æ¯å¦è¿è¡å½åæä½ |
| | | ElMessageBox.confirm('æ¯å¦æ·»å 临æ¶å°çï¼', '确认æä½', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | config.addNewRow(); |
| | | ElMessage.success(config.successMsg); |
| | | }).catch(() => { |
| | | ElMessage.info('已忶æä½'); |
| | | }); |
| | | return; |
| | | } |
| | | if (config.code === 'copyChecked') { |
| | |
| | | optimizeData.value.glassDetails = []; |
| | | // ä»è¡¨æ ¼ä¸è·å glassDetail æ°æ®ï¼è䏿¯ä»å端æ¥å£è¯»å |
| | | const tableData = xGrid.value.getTableData().fullData; |
| | | let totalQuantity = 0; |
| | | let totalArea = 0; |
| | | |
| | | tableData.forEach(item => { |
| | | const width = parseFloat(item.width) || 0; |
| | | const height = parseFloat(item.height) || 0; |
| | | const quantity = parseInt(item.quantity) || 0; |
| | | |
| | | // 使ç¨é¿Ãå®½Ãæ°éæ¥è®¡ç®æ»é¢ç§¯ |
| | | totalArea += (width * height * quantity) / 1000000; // 转æ¢ä¸ºå¹³æ¹ç±³ |
| | | totalQuantity += quantity; |
| | | }); |
| | | |
| | | quantitys.value = totalQuantity; |
| | | areas.value = totalArea; |
| | | const glassDetailData = tableData.map(item => { |
| | | let rackNoValue = 0; |
| | | if (item.rackNo !== undefined && item.rackNo !== null && item.rackNo !== '') { |
| | | rackNoValue = item.rackNo; |
| | | } |
| | | return { |
| | | width: item.width, |
| | | height: item.height, |
| | | width: parseFloat(item.width) || 0, |
| | | height: parseFloat(item.height) || 0, |
| | | processId: item.processId, |
| | | layer: item.layer, |
| | | totalLayer: item.totalLayer, |
| | | orderSort: item.order_number, |
| | | markIcon: item.markIcon, |
| | | quantity: item.quantity, |
| | | quantity: parseInt(item.quantity) || 0, |
| | | patchState: item.patchState, |
| | | upGrind: item.longGrind1, |
| | | downGrind: item.longGrind2, |
| | |
| | | } |
| | | } |
| | | ); |
| | | |
| | | // åç¬å¤çéä¸åçæ°æ®çé»è¾ |
| | | watch( |
| | | () => props.CheckboxChangeData, |
| | |
| | | |
| | | xGrid.value.loadData(data); |
| | | gridOptions.data = data; |
| | | projectName.value = data[0].project_name; |
| | | projectName.value = res.data.project.project_name; |
| | | quantitys.value=res.data.project.glass_total |
| | | areas.value=res.data.project.glass_total_area |
| | | |
| | |
| | | 'code':'cancelReview' |
| | | } |
| | | ], |
| | | slots: { |
| | | tools: 'toolbar_buttons', |
| | | buttons:'buttons' |
| | | }, |
| | | /*import: false, |
| | | export: true, |
| | | print: true,*/ |
| | |
| | | reserve:true |
| | | } |
| | | |
| | | const exportEvent = () => { |
| | | const $table = xGrid.value |
| | | if ($table) { |
| | | $table.exportData({ |
| | | filename: 'order_export', |
| | | sheetName: 'Sheet1', |
| | | type: 'xlsx' |
| | | }) |
| | | } |
| | | } |
| | | |
| | | function exportExcel(url, fileName,date) { |
| | | gridOptions.loading = true |
| | | if(date===null){ |
| | | ElMessage.warning(t('report.pleaseSelectADateFirst')) |
| | | return |
| | | } |
| | | |
| | | const date1 = new Date(date[0]); |
| | | const date2 = new Date(date[1]); |
| | | const timeDiff = Math.abs(date2.getTime() - date1.getTime()); |
| | | const daysDiff = timeDiff / (1000 * 3600 * 24); |
| | | if(Math.floor(daysDiff)>180){ |
| | | ElMessage.warning(t('report.theFilteringTimeForExportCannotExceed180Days')) |
| | | return |
| | | } |
| | | let dataMp = ref({ |
| | | date: date, |
| | | }) |
| | | request.post(url,date,{responseType :'blob'}).then(res => { |
| | | const blob = new Blob([res]) |
| | | if ('download' in document.createElement('a')) { // éIEä¸è½½ |
| | | const elink = document.createElement('a') |
| | | elink.download = `${fileName}.xlsx` |
| | | elink.style.display = 'none' |
| | | elink.href = URL.createObjectURL(blob) |
| | | document.body.appendChild(elink) |
| | | elink.click() |
| | | URL.revokeObjectURL(elink.href) // éæ¾URL 对象 |
| | | document.body.removeChild(elink) |
| | | gridOptions.loading = false |
| | | } else { // IE10+ä¸è½½ |
| | | navigator.msSaveBlob(blob, fileName) |
| | | } |
| | | |
| | | }) |
| | | } |
| | | </script> |
| | | |
| | | <template> |
| | |
| | | > |
| | | </vxe-pager> |
| | | </template> |
| | | <template #toolbar_buttons> |
| | | <vxe-button icon="vxe-icon-download" circle |
| | | style="margin-right: 0.5rem" |
| | | @click="exportEvent" /> |
| | | |
| | | <vxe-button icon="vxe-icon-cloud-download" style="margin-right: 0.5rem" |
| | | circle |
| | | @click="exportExcel('/Replenish/exportReplenish', |
| | | t('replenish.patchManagement'), |
| | | selectDate)" /> |
| | | |
| | | </template> |
| | | |
| | | </vxe-grid> |
| | | </div> |
| | |
| | | {field: 'breakageReason', width: 120, title: t('reportingWorks.breakageReason'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'thisProcess',width: 120, title: t('reportingWorks.reportingProcess'), sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'creator',width: 120, title: t('product.creator'), sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'childWidth', width: 100, title: t('order.width'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'childHeight', width: 100, title: t('order.height'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'childWidth', width: 100, title: t('order.width')}, |
| | | {field: 'childHeight', width: 100, title: t('order.height')}, |
| | | {field: 'breakageQuantity', width: 120, title: t('reportingWorks.quantityBroken')}, |
| | | {field: 'area', width: 120, title: t('reportingWorks.wornArea')}, |
| | | {field: 'personnel', width: 120, title: t('reportingWorks.responsiblePersonnel')}, |
| | |
| | | gridOptions.loading = false |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | gridOptions.loading = false |
| | | } |
| | | }) |
| | | |
| | |
| | | const selectPageList = () => { |
| | | let startTime = form.date1[0] |
| | | let endTime = form.date1[1] |
| | | |
| | | gridOptions.loading = true |
| | | request.post(`/report/qualityReport/${pageNum.value}/${total.pageSize}/${startTime}/${endTime}/${inputVal}`, filterData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | |
| | | |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.reloadData(produceList) |
| | | gridOptions.loading = false |
| | | } else { |
| | | gridOptions.loading = false |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | |
| | | |
| | | //ç¹å»æ¥è¯¢ |
| | | const getWorkOrder = () => { |
| | | |
| | | gridOptions.loading = true |
| | | let startTime = form.date1[0] |
| | | let endTime = form.date1[1] |
| | | request.post(`/report/qualityReport/${startTime}/${endTime}`, filterData.value).then((res) => { |
| | |
| | | // pageTotal.value = res.data.total |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.reloadData(produceList) |
| | | gridOptions.loading = false |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | gridOptions.loading = false |
| | | } |
| | | }) |
| | | } |
| | |
| | | //åç»ä»¶æ¥æ¶åæ° |
| | | const xGrid = ref() |
| | | const gridOptions = reactive({ |
| | | loading: true, |
| | | border: "full",//è¡¨æ ¼å è¾¹æ¡ |
| | | keepSource: true,//ä¿ææºæ°æ® |
| | | align: 'center',//æåå±
ä¸ |
| | |
| | | import footSum from "@/hook/footSum" |
| | | import {addListener, toolbarButtonClickEvent} from "@/hook/mouseMove" |
| | | import {VxeUI} from "vxe-pc-ui"; |
| | | import companyInfo from "@/stores/sd/companyInfo"; |
| | | //è¯è¨è·å |
| | | const {t} = useI18n() |
| | | let router = useRouter() |
| | | let filterData = ref({}) |
| | | const company = companyInfo() |
| | | //æäº¤ç表å |
| | | const form = reactive({ |
| | | date1: '', |
| | |
| | | return includeEnd ? diffDays + 1 : diffDays |
| | | } |
| | | |
| | | const times=company.reportTime |
| | | //è·åä¸å¤©åå°å½åæ¶é´ |
| | | function getNowTime() { |
| | | const pad = (n) => n.toString().padStart(2, '0'); |
| | |
| | | const year = date.getFullYear(); |
| | | const month = pad(date.getMonth() + 1); |
| | | const day = pad(date.getDate()); |
| | | return `${year}-${month}-${day} 08:00:00`; |
| | | return `${year}-${month}-${day} ${times}`; |
| | | }; |
| | | |
| | | const now = new Date(); |
| | |
| | | let year = date.getFullYear(); |
| | | let month = pad(date.getMonth() + 1); |
| | | let day = pad(date.getDate()); |
| | | let newEndTime = `${year}-${month}-${day} 08:00:00`; |
| | | let newEndTime = `${year}-${month}-${day} ${times}`; |
| | | //ç¬¬ä¸æ¬¡å è½½æ°æ® |
| | | request.post(`/report/teamOutput/1/${total.pageSize}/${startTime}/${newEndTime}/${selectProcesses}`, filterData.value).then((res) => { |
| | | |
| | |
| | | //页è翻页æ¥è¯¢ |
| | | const selectPageList = () => { |
| | | gridOptions.loading = true |
| | | // è§£æ company.reportTime |
| | | const [reportHourStr, reportMinuteStr] = company.reportTime.split(":"); |
| | | const reportHour = parseInt(reportHourStr); |
| | | const reportMinute = parseInt(reportMinuteStr); |
| | | |
| | | // åå§ form.date1 æ¯æ¥æå¯¹è±¡æ°ç» |
| | | const rawStart = new Date(form.date1[0]); |
| | | const rawEnd = new Date(form.date1[1]); |
| | | // 妿æ¶é´é¨åæ¯ 00:00ï¼å设置为 08:00 |
| | | if (rawStart.getHours() === 8 || rawStart.getHours() === 0) { |
| | | rawStart.setHours(8, 0, 0, 0); |
| | | |
| | | // 夿æ¶é´é¨åæ¯å¦éè¦ä¿®æ£ä¸º company.reportTime |
| | | const isZeroOrReport = (dateObj) => { |
| | | const h = dateObj.getHours(); |
| | | const m = dateObj.getMinutes(); |
| | | // 夿æ¡ä»¶ï¼æ¯ 00:00 æè
æ¯ reportTime 对åºçæ¶é´ |
| | | return (h === 0 && m === 0) || (h === reportHour && m === reportMinute); |
| | | }; |
| | | |
| | | if (isZeroOrReport(rawStart)) { |
| | | rawStart.setHours(reportHour, reportMinute, 0, 0); |
| | | } |
| | | if (rawEnd.getHours() === 8 || rawEnd.getHours() === 0) { |
| | | rawEnd.setHours(8, 0, 0, 0); |
| | | if (isZeroOrReport(rawEnd)) { |
| | | rawEnd.setHours(reportHour, reportMinute, 0, 0); |
| | | } |
| | | const startTime = formatDateTime(rawStart); |
| | | const endPlusOne = new Date(rawEnd); |
| | |
| | | |
| | | //ç¹å»æ¥è¯¢ |
| | | const getWorkOrder = () => { |
| | | gridOptions.loading = true |
| | | gridOptions.loading = true; |
| | | |
| | | // è§£æ company.reportTime |
| | | const [reportHourStr, reportMinuteStr] = company.reportTime.split(":"); |
| | | const reportHour = parseInt(reportHourStr); |
| | | const reportMinute = parseInt(reportMinuteStr); |
| | | |
| | | // åå§ form.date1 æ¯æ¥æå¯¹è±¡æ°ç» |
| | | const rawStart = new Date(form.date1[0]); |
| | | const rawEnd = new Date(form.date1[1]); |
| | | // 妿æ¶é´é¨åæ¯ 00:00ï¼å设置为 08:00 |
| | | if (rawStart.getHours() === 8 || rawStart.getHours() === 0) { |
| | | rawStart.setHours(8, 0, 0, 0); |
| | | |
| | | // 夿æ¶é´é¨åæ¯å¦éè¦ä¿®æ£ä¸º company.reportTime |
| | | const isZeroOrReport = (dateObj) => { |
| | | const h = dateObj.getHours(); |
| | | const m = dateObj.getMinutes(); |
| | | // 夿æ¡ä»¶ï¼æ¯ 00:00 æè
æ¯ reportTime 对åºçæ¶é´ |
| | | return (h === 0 && m === 0) || (h === reportHour && m === reportMinute); |
| | | }; |
| | | |
| | | if (isZeroOrReport(rawStart)) { |
| | | rawStart.setHours(reportHour, reportMinute, 0, 0); |
| | | } |
| | | if (rawEnd.getHours() === 8 || rawEnd.getHours() === 0) { |
| | | rawEnd.setHours(8, 0, 0, 0); |
| | | if (isZeroOrReport(rawEnd)) { |
| | | rawEnd.setHours(reportHour, reportMinute, 0, 0); |
| | | } |
| | | |
| | | // æ ¼å¼å |
| | | const startTime = formatDateTime(rawStart); |
| | | |
| | | const endPlusOne = new Date(rawEnd); |
| | | endPlusOne.setDate(endPlusOne.getDate()); |
| | | const newEndTime = formatDateTime(endPlusOne); |
| | | const selectProcesses = procseeValue.value; |
| | | const timeDifference = getDaysBetween(startTime, newEndTime) |
| | | if (timeDifference>180){ |
| | | ElMessage.warning(t('report.theTimeLimitCannotExceed180Days')) |
| | | gridOptions.loading = false |
| | | return |
| | | } |
| | | form.date1 = [startTime, newEndTime]; |
| | | request.post(`/report/teamOutput/${pageNum.value}/${total.pageSize}/${startTime}/${newEndTime}/${selectProcesses}`, filterData.value).then((res) => { |
| | | |
| | | if (res.code == 200) { |
| | | total.value = res.data.footSum |
| | | total.dataTotal = res.data.total.total * 1 |
| | | total.pageTotal = res.data.total.pageTotal |
| | | pageTotal.value = res.data.total |
| | | produceList = res.data.data |
| | | produceList.forEach(item => { |
| | | item.mmTotal = sumMmValues(item.workProcessName); |
| | | const selectProcesses = procseeValue.value; |
| | | |
| | | const timeDifference = getDaysBetween(startTime, newEndTime); |
| | | if (timeDifference > 180) { |
| | | ElMessage.warning(t('report.theTimeLimitCannotExceed180Days')); |
| | | gridOptions.loading = false; |
| | | return; |
| | | } |
| | | |
| | | form.date1 = [startTime, newEndTime]; |
| | | |
| | | request.post(`/report/teamOutput/${pageNum.value}/${total.pageSize}/${startTime}/${newEndTime}/${selectProcesses}`, filterData.value) |
| | | .then((res) => { |
| | | if (res.code == 200) { |
| | | total.value = res.data.footSum; |
| | | total.dataTotal = res.data.total.total * 1; |
| | | total.pageTotal = res.data.total.pageTotal; |
| | | pageTotal.value = res.data.total; |
| | | |
| | | produceList = res.data.data; |
| | | produceList.forEach(item => { |
| | | item.mmTotal = sumMmValues(item.workProcessName); |
| | | }); |
| | | |
| | | xGrid.value.loadData(produceList); |
| | | gridOptions.loading = false; |
| | | } else { |
| | | ElMessage.warning(res.msg); |
| | | } |
| | | }); |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading = false |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | const sumMmValues = (workProcessName) => { |
| | | if (!workProcessName) return 0; |
| | | |
| | |
| | | filterData.value[column.property] = value |
| | | } |
| | | |
| | | // è§£æ company.reportTime |
| | | const [reportHourStr, reportMinuteStr] = company.reportTime.split(":"); |
| | | const reportHour = parseInt(reportHourStr); |
| | | const reportMinute = parseInt(reportMinuteStr); |
| | | |
| | | // åå§ form.date1 æ¯æ¥æå¯¹è±¡æ°ç» |
| | | const rawStart = new Date(form.date1[0]); |
| | | const rawEnd = new Date(form.date1[1]); |
| | | // 妿æ¶é´é¨åæ¯ 00:00ï¼å设置为 08:00 |
| | | if (rawStart.getHours() === 8 || rawStart.getHours() === 0) { |
| | | rawStart.setHours(8, 0, 0, 0); |
| | | |
| | | // 夿æ¶é´é¨åæ¯å¦éè¦ä¿®æ£ä¸º company.reportTime |
| | | const isZeroOrReport = (dateObj) => { |
| | | const h = dateObj.getHours(); |
| | | const m = dateObj.getMinutes(); |
| | | // 夿æ¡ä»¶ï¼æ¯ 00:00 æè
æ¯ reportTime 对åºçæ¶é´ |
| | | return (h === 0 && m === 0) || (h === reportHour && m === reportMinute); |
| | | }; |
| | | |
| | | if (isZeroOrReport(rawStart)) { |
| | | rawStart.setHours(reportHour, reportMinute, 0, 0); |
| | | } |
| | | if (rawEnd.getHours() === 8 || rawEnd.getHours() === 0) { |
| | | rawEnd.setHours(8, 0, 0, 0); |
| | | if (isZeroOrReport(rawEnd)) { |
| | | rawEnd.setHours(reportHour, reportMinute, 0, 0); |
| | | } |
| | | const startTime = formatDateTime(rawStart); |
| | | const endPlusOne = new Date(rawEnd); |
| | |
| | | {field: 'code', width: 100, title: t('reportingWorks.glassNumber')}, |
| | | {field: 'width', width: 90, title: t('order.width')}, |
| | | {field: 'height', width: 90, title: t('order.height')}, |
| | | {field: 'mmTotal', width: 90, title: t('order.totalThickness')}, |
| | | {field: 'thicknessSum',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, width: 90, title: t('order.totalThickness')}, |
| | | {field: 'thicknessArea', width: 90, title: t('report.thicknessArea')}, |
| | | { |
| | | field: 'deviceName', width: 140, title: t('machine.basicName'),filters:[{ data: '' }],slots: { filter: 'num1_filter' } |
| | | }, |
| | |
| | | if (columnIndex === 0) { |
| | | return t('basicData.total') |
| | | } |
| | | const List = ["completedQuantity",'area',] |
| | | const List = ["completedQuantity",'area','thicknessArea'] |
| | | if (List.includes(column.field)) { |
| | | //return footSum(data, column.field) |
| | | return total.value?.[column.field] ?? 0 |
| | |
| | | import DxfParser from 'dxf-parser'; |
| | | import { Leafer, Polygon,Ellipse,Line,Path } from 'leafer-ui' |
| | | import {round} from "xe-utils"; |
| | | import {add} from '@/utils/decimal' |
| | | const { t } = useI18n() |
| | | |
| | | const router = useRouter() |
| | |
| | | const value1 = value*1 |
| | | $grid.getTableData().visibleData.forEach((item,index) =>{ |
| | | if(index>=result.start && index<=result.end){ |
| | | |
| | | item[result.cell] = item[result.cell]*1+value1 |
| | | item[result.cell] =add(item[result.cell]*1,value1) |
| | | } |
| | | |
| | | }) |
| | |
| | | import com.example.erp.common.Result; |
| | | import com.example.erp.dto.pp.PatchLogAddDTO; |
| | | import com.example.erp.dto.pp.PatchLogDTO; |
| | | import com.example.erp.dto.pp.TeamOutputDTO; |
| | | import com.example.erp.dto.pp.exportReplenishDTO; |
| | | import com.example.erp.entity.pp.FlowCard; |
| | | import com.example.erp.entity.pp.PatchLog; |
| | | import com.example.erp.entity.pp.Rework; |
| | | import com.example.erp.exception.ServiceException; |
| | | import com.example.erp.service.pp.ReplenishService; |
| | | import com.example.erp.service.pp.ReworkService; |
| | | import com.example.erp.tools.DownExcel; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.sql.Date; |
| | | import java.time.LocalDate; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | public Result updateCancelReview( @RequestBody Map<String,Object> object){ |
| | | return Result.success(replenishService.updateCancelReviewSv(object)); |
| | | } |
| | | |
| | | @ApiOperation("è¡¥çä¿¡æ¯å¯¼åº") |
| | | @PostMapping("/exportReplenish") |
| | | public void exportReplenish(HttpServletResponse response, |
| | | @RequestBody List<LocalDate> dates |
| | | ) throws IOException, IllegalAccessException, InstantiationException { |
| | | //åæ°ï¼ç¸åºçæ°æ®ï¼å®ä½ç±»ä¿¡æ¯ï¼ç¸åºçæ¹æ³ï¼æ°æ®è·åï¼ï¼çæçexcelåå |
| | | DownExcel.download(response, exportReplenishDTO.class, replenishService.exportReplenishSv(dates), "PatchLogAddDTO"); |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | @ApiOperation("è·¨å·¥åºæ¬¡ç ´") |
| | | @PostMapping("/crossProcessBreaking/{pageNum}/{pageSize}/{selectDate}") |
| | | @PostMapping("/crossProcessBreaking/{pageNum}/{pageSize}/{selectDate}/{reportTime}") |
| | | public Result getOrderReport(@PathVariable Integer pageNum, |
| | | @PathVariable Integer pageSize, |
| | | @PathVariable List<String> selectDate, |
| | | @PathVariable String reportTime, |
| | | @RequestBody CrossProcessBreakingDTO crossProcessBreakingDTO) { |
| | | return Result.success(reportService.crossProcessBreakingSv(pageNum, pageSize, selectDate, crossProcessBreakingDTO)); |
| | | return Result.success(reportService.crossProcessBreakingSv(pageNum, pageSize, selectDate,reportTime, crossProcessBreakingDTO)); |
| | | |
| | | } |
| | | |
| | | @ApiOperation("éè·¨å·¥åºæ¬¡ç ´") |
| | | @PostMapping("/notCrossProcessBreaking/{pageNum}/{pageSize}/{selectDate}") |
| | | @PostMapping("/notCrossProcessBreaking/{pageNum}/{pageSize}/{selectDate}/{reportTime}") |
| | | public Result notCrossProcessBreaking(@PathVariable Integer pageNum, |
| | | @PathVariable Integer pageSize, |
| | | @PathVariable List<String> selectDate, |
| | | @PathVariable String reportTime, |
| | | @RequestBody CrossProcessBreakingDTO crossProcessBreakingDTO) { |
| | | return Result.success(reportService.notCrossProcessBreakingSv(pageNum, pageSize, selectDate, crossProcessBreakingDTO)); |
| | | return Result.success(reportService.notCrossProcessBreakingSv(pageNum, pageSize, selectDate,reportTime, crossProcessBreakingDTO)); |
| | | |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | @ApiOperation("æ¬¡ç ´æç»æ¥è¡¨") |
| | | @PostMapping("/damageReport/{pageNum}/{pageSize}/{selectDate}") |
| | | @PostMapping("/damageReport/{pageNum}/{pageSize}/{selectDate}/{reportTime}") |
| | | public Result damageReport( |
| | | @PathVariable Integer pageNum, |
| | | @PathVariable Integer pageSize, |
| | | @PathVariable List<String> selectDate, |
| | | @PathVariable String reportTime, |
| | | @RequestBody DamageReportDTO damageReportDTO) { |
| | | return Result.success(reportService.selectDamageReportSv(pageNum, pageSize, selectDate, damageReportDTO)); |
| | | return Result.success(reportService.selectDamageReportSv(pageNum, pageSize, selectDate,reportTime, damageReportDTO)); |
| | | |
| | | } |
| | | |
| | |
| | | private String batch; |
| | | @ExcelProperty("订åç±»å") |
| | | private String orderType; |
| | | @ExcelProperty("å¨å¶åå度") |
| | | private String thicknessSum; |
| | | @ExcelProperty("å¹³æ¹æ¯«ç±³") |
| | | private String thicknessArea; |
| | | } |
| New file |
| | |
| | | package com.example.erp.dto.pp; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Data |
| | | public class exportReplenishDTO { |
| | | @ExcelProperty("éå®åå·") |
| | | private String orderId; |
| | | @ExcelProperty("è¡¥çåå·") |
| | | private String patchId; |
| | | @ExcelProperty("æ¥å·¥ç¼å·") |
| | | private String reportingWorkId; |
| | | @ExcelProperty("æµç¨å¡å·") |
| | | private String processId; |
| | | @ExcelProperty("项ç®åç§°") |
| | | private String project; |
| | | @ExcelProperty("æ¹æ¬¡") |
| | | private String batch; |
| | | @ExcelProperty("å®¡æ ¸äºº") |
| | | private String reviewer; |
| | | @ExcelProperty("ç¼å·") |
| | | private String glassNumber; |
| | | @ExcelProperty("订ååºå·") |
| | | private Integer orderSort; |
| | | @ExcelProperty("产ååç§°") |
| | | private String productName; |
| | | @ExcelProperty("å±å·") |
| | | private Integer technologyNumber; |
| | | @ExcelProperty("çæ è®°") |
| | | private String glassAddress; |
| | | @ExcelProperty("åçåç§°") |
| | | private String glassChild; |
| | | @ExcelProperty("æ°é") |
| | | private Integer patchNum; |
| | | @ExcelProperty("宽") |
| | | private Double width; |
| | | @ExcelProperty("é«") |
| | | private Double height; |
| | | @ExcelProperty("å½¢ç¶") |
| | | private String shape; |
| | | @ExcelProperty("æ¥å·¥å·¥åº") |
| | | private String patchProcesses; |
| | | @ExcelProperty("è¡¥çåå ") |
| | | private String patchReason; |
| | | @ExcelProperty("è¡¥çç±»å") |
| | | private String patchType; |
| | | @ExcelProperty("责任信æ¯") |
| | | private String responsiblePersonnel; |
| | | @ExcelProperty("责任设å¤") |
| | | private String responsibleEquipment; |
| | | @ExcelProperty("责任çç»") |
| | | private String responsibleTeam; |
| | | @ExcelProperty("é¢ç§¯") |
| | | private String patchArea; |
| | | @ExcelProperty("å¶åæ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private LocalDateTime createTime; |
| | | @ExcelProperty("å®¡æ ¸æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private LocalDateTime updateTime; |
| | | |
| | | |
| | | } |
| | |
| | | Map<String, Object> getProjectState(String projectNo); |
| | | |
| | | void updateProjectTemperingId(String projectNumber); |
| | | |
| | | List<Map<String, Object>> optimizeTemp(String projectNo); |
| | | |
| | | List<Map<String, Object>> selectTempProject(String processId); |
| | | } |
| | |
| | | |
| | | import com.example.erp.dto.pp.PatchLogAddDTO; |
| | | import com.example.erp.dto.pp.PatchLogDTO; |
| | | import com.example.erp.dto.pp.exportReplenishDTO; |
| | | import com.example.erp.dto.sd.OrderDTO; |
| | | import com.example.erp.entity.pp.PatchLog; |
| | | import com.example.erp.entity.pp.ReportingWork; |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | Boolean updateReplenishCancel(@Param("patchLog") PatchLog patchLog); |
| | | |
| | | Integer selectProjectCount(String processId, String patchId, Integer technologyNumber); |
| | | |
| | | List<exportReplenishDTO> exportReplenishMp(List<LocalDate> dates); |
| | | } |
| | | |
| | |
| | | } else { |
| | | dataList = glassOptimizeMapper.directOptimization(projectNo); |
| | | } |
| | | List<Map<String, Object>> tempDataList = null; |
| | | if (Integer.parseInt(stringObjectMap.get("optimize_state").toString())==1) { |
| | | tempDataList = glassOptimizeMapper.optimizeTemp(projectNo); |
| | | } |
| | | |
| | | // è·å磨éé
ç½®æ°æ® |
| | | List<Map<String, Object>> grindingTrimmingList = glassOptimizeMapper.getGrindingOptimize(username); |
| | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | if (tempDataList != null && !tempDataList.isEmpty()) { |
| | | dataList.addAll(tempDataList); |
| | | } |
| | | map.put("optimizeState", Integer.parseInt(stringObjectMap.get("optimize_state").toString())); |
| | | map.put("data", dataList); |
| | |
| | | int state2 = 0; |
| | | StringBuilder processId= new StringBuilder(); |
| | | List<FlowCard> flowCardList = JSONArray.parseArray(JSONObject.toJSONString(object.get("projectdetail")), FlowCard.class); |
| | | if (!flowCardList.isEmpty()) { |
| | | if(projectType.equals("2")){ |
| | | deleteProject(projectId,2); |
| | | if(projectType.equals("2")){ |
| | | deleteProject(projectId,2); |
| | | } |
| | | |
| | | // å建ä¸ä¸ªæ å°æ¥åå¨ (processId-technologyNumber) ç»åå° rack ç¼å·çæ å° |
| | | Map<String, Integer> rackMap = new HashMap<>(); |
| | | int rackCounter = 1; |
| | | |
| | | // å¦æä¸ºç©ºæµç¨å¡ï¼åå° type 设置为 1 |
| | | if (flowCardList == null || flowCardList.isEmpty()) { |
| | | type = 1; |
| | | } |
| | | for (FlowCard flowCard : flowCardList) { |
| | | // 为æ¯ä¸ªå¯ä¸ç processId-technologyNumber ç»ååé
rack ç¼å· |
| | | String key = flowCard.getProcessId() + "-" + flowCard.getTechnologyNumber(); |
| | | if (!rackMap.containsKey(key)) { |
| | | rackMap.put(key, rackCounter++); |
| | | } |
| | | int rackValue = rackMap.get(key); |
| | | |
| | | if(flowCard.getPatchState().equals(0)){ |
| | | state1=1; |
| | | //ç»æµç¨å¡è¡¨æ·»å 对åºçå·¥ç¨å· |
| | | Boolean a = glassOptimizeMapper.updateFlowCardProject(flowCard.getProcessId(),flowCard.getTechnologyNumber(),projectId); |
| | | // æ´æ°æµç¨å¡çrackåæ®µ |
| | | glassOptimizeMapper.updateFlowCardRack(flowCard.getProcessId(), flowCard.getTechnologyNumber(), rackValue); |
| | | area = glassOptimizeMapper.getSelectArea(flowCard.getProcessId(),flowCard.getTechnologyNumber()).doubleValue(); |
| | | sumArea = sumArea.add(BigDecimal.valueOf(area)); |
| | | sumQuantity +=flowCard.getQuantity(); |
| | | processId.append(flowCard.getProcessId()).append("-").append(flowCard.getTechnologyNumber()).append(";"); |
| | | }else{ |
| | | state2=1; |
| | | Boolean a=glassOptimizeMapper.updatePatchLogProject(flowCard.getProcessId(),flowCard.getTechnologyNumber(),projectId); |
| | | area = glassOptimizeMapper.getSelectAreaPatchLog(flowCard.getProcessId(),flowCard.getTechnologyNumber()).doubleValue(); |
| | | sumArea = sumArea.add(BigDecimal.valueOf(area)); |
| | | sumQuantity +=flowCard.getQuantity(); |
| | | processId.append(flowCard.getProcessId()).append("-").append(flowCard.getTechnologyNumber()).append(";"); |
| | | } |
| | | |
| | | // å建ä¸ä¸ªæ å°æ¥åå¨ (processId-technologyNumber) ç»åå° rack ç¼å·çæ å° |
| | | Map<String, Integer> rackMap = new HashMap<>(); |
| | | int rackCounter = 1; |
| | | } |
| | | if(state1==1&&state2==0){ |
| | | type=1; |
| | | }else if(state1==1&&state2==1){ |
| | | type=2; |
| | | } |
| | | |
| | | for (FlowCard flowCard : flowCardList) { |
| | | // 为æ¯ä¸ªå¯ä¸ç processId-technologyNumber ç»ååé
rack ç¼å· |
| | | String key = flowCard.getProcessId() + "-" + flowCard.getTechnologyNumber(); |
| | | if (!rackMap.containsKey(key)) { |
| | | rackMap.put(key, rackCounter++); |
| | | } |
| | | int rackValue = rackMap.get(key); |
| | | |
| | | if(flowCard.getPatchState().equals(0)){ |
| | | state1=1; |
| | | //ç»æµç¨å¡è¡¨æ·»å 对åºçå·¥ç¨å· |
| | | Boolean a = glassOptimizeMapper.updateFlowCardProject(flowCard.getProcessId(),flowCard.getTechnologyNumber(),projectId); |
| | | // æ´æ°æµç¨å¡çrackåæ®µ |
| | | glassOptimizeMapper.updateFlowCardRack(flowCard.getProcessId(), flowCard.getTechnologyNumber(), rackValue); |
| | | area = glassOptimizeMapper.getSelectArea(flowCard.getProcessId(),flowCard.getTechnologyNumber()).doubleValue(); |
| | | sumArea = sumArea.add(BigDecimal.valueOf(area)); |
| | | sumQuantity +=flowCard.getQuantity(); |
| | | processId.append(flowCard.getProcessId()).append("-").append(flowCard.getTechnologyNumber()).append(";"); |
| | | }else{ |
| | | state2=1; |
| | | Boolean a=glassOptimizeMapper.updatePatchLogProject(flowCard.getProcessId(),flowCard.getTechnologyNumber(),projectId); |
| | | area = glassOptimizeMapper.getSelectAreaPatchLog(flowCard.getProcessId(),flowCard.getTechnologyNumber()).doubleValue(); |
| | | sumArea = sumArea.add(BigDecimal.valueOf(area)); |
| | | sumQuantity +=flowCard.getQuantity(); |
| | | processId.append(flowCard.getProcessId()).append("-").append(flowCard.getTechnologyNumber()).append(";"); |
| | | } |
| | | |
| | | } |
| | | if(state1==1&&state2==0){ |
| | | type=1; |
| | | }else if(state1==1&&state2==1){ |
| | | type=2; |
| | | } |
| | | int index = optionVal.indexOf("mm"); |
| | | // è·å "mm" åé¢çé¨å |
| | | String glass_thickness = optionVal.substring(0, index); |
| | | // è·å "mm" åé¢çé¨å |
| | | String glass_type = optionVal.substring(index + 2); |
| | | if(projectType.equals("2")){ |
| | | glassOptimizeMapper.updateProjectMp(projectId,projectNmae,glass_thickness,glass_type,sumQuantity,sumArea.doubleValue(),userName, |
| | | int index = optionVal.indexOf("mm"); |
| | | // è·å "mm" åé¢çé¨å |
| | | String glass_thickness = optionVal.substring(0, index); |
| | | // è·å "mm" åé¢çé¨å |
| | | String glass_type = optionVal.substring(index + 2); |
| | | if(projectType.equals("2")){ |
| | | glassOptimizeMapper.updateProjectMp(projectId,projectNmae,glass_thickness,glass_type,sumQuantity,sumArea.doubleValue(),userName, |
| | | flowCardList.size(), String.valueOf(processId),type); |
| | | }else{ |
| | | if(glassOptimizeMapper.selectProjectCount(projectId)==null){ |
| | | glassOptimizeMapper.addProjectMp(projectId,projectNmae,glass_thickness,glass_type,sumQuantity,sumArea.doubleValue(),userName, |
| | | flowCardList.size(), String.valueOf(processId),type); |
| | | }else{ |
| | | if(glassOptimizeMapper.selectProjectCount(projectId)==null){ |
| | | glassOptimizeMapper.addProjectMp(projectId,projectNmae,glass_thickness,glass_type,sumQuantity,sumArea.doubleValue(),userName, |
| | | flowCardList.size(), String.valueOf(processId),type); |
| | | }else{ |
| | | TransactionAspectSupport.currentTransactionStatus().rollbackToSavepoint(savePoint); |
| | | return "false1"; |
| | | } |
| | | TransactionAspectSupport.currentTransactionStatus().rollbackToSavepoint(savePoint); |
| | | return "false1"; |
| | | } |
| | | }else { |
| | | return "false2"; |
| | | |
| | | } |
| | | } catch (Exception e) { |
| | | TransactionAspectSupport.currentTransactionStatus().rollbackToSavepoint(savePoint); |
| | |
| | | public Map<String, Object> getProductListSv(String processId) { |
| | | Map<String, Object> productMap = new HashMap<>(); |
| | | List<Map<String, Object>> productInfo = glassOptimizeMapper.selectProjectList(processId); |
| | | List<Map<String, Object>> tempProductInfo = glassOptimizeMapper.selectTempProject(processId); |
| | | productInfo.addAll(tempProductInfo); |
| | | productMap.put("productInfo", productInfo); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | |
| | |
| | | // æç
§ processCard åç» |
| | | Map<String, List<Map<String, Object>>> groupedByProcessCard = new HashMap<>(); |
| | | for (Map<String, Object> item : productInfo) { |
| | | String processCard = (String) item.get("processCard"); |
| | | String processCard = String.valueOf(item.get("processCard")); |
| | | if (processCard != null) { |
| | | groupedByProcessCard.computeIfAbsent(processCard, k -> new ArrayList<>()).add(item); |
| | | } |
| | |
| | | import com.example.erp.common.AsyncQueryExecutor; |
| | | import com.example.erp.dto.pp.PatchLogAddDTO; |
| | | import com.example.erp.dto.pp.PatchLogDTO; |
| | | import com.example.erp.dto.pp.exportReplenishDTO; |
| | | import com.example.erp.dto.sd.OrderDTO; |
| | | import com.example.erp.entity.pp.FlowCard; |
| | | import com.example.erp.entity.pp.PatchLog; |
| | | import com.example.erp.entity.pp.ReportingWork; |
| | |
| | | reportingWorkMapper.updateRWDPatchNum(patchLog1.getReportingWorkId(),patchLog1.getOrderSort(),patchLog1.getTechnologyNumber(),patchLog1.getPatchNum()); |
| | | //æ´æ°æ¥å·¥æµç¨è¡¨æ°æ® |
| | | reportingWorkMapper.updateReplenishWorkProcess(patchLog1.getProcessId(),patchLog1.getOrderSort(),patchLog1.getTechnologyNumber(),patchLog1.getPatchNum(),patchLog1.getPatchProcesses()); |
| | | |
| | | Log log = new Log(); |
| | | log.setContent(object.toString()); |
| | | log.setFunction("deleteReplenishSvè¡¥çå é¤"); |
| | | log.setOperatorId((String) object.get("userId")); |
| | | log.setOperator((String) object.get("userName")); |
| | | logService.saveLog(log); |
| | | } |
| | | else{ |
| | | saveState = false; |
| | |
| | | |
| | | return saveState; |
| | | } |
| | | |
| | | // public List exportReplenishSv(Map<String, Object> dates) { |
| | | // } |
| | | public List<exportReplenishDTO> exportReplenishSv(List<LocalDate> dates) { |
| | | return patchMapper.exportReplenishMp(dates); |
| | | } |
| | | } |
| | | |
| | |
| | | import java.sql.Date; |
| | | import java.sql.SQLOutput; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.time.LocalTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.*; |
| | | import java.util.concurrent.*; |
| | | import java.util.function.Function; |
| | |
| | | // return map; |
| | | // } |
| | | |
| | | private static String to080000(String s) { |
| | | if (s == null || s.isEmpty()) return null; |
| | | String v = s.trim(); |
| | | // åªä¿çæ¥æé¨åï¼å10ä½ yyyy-MM-ddï¼ |
| | | String datePart = v.length() >= 10 ? v.substring(0, 10) : v; |
| | | return datePart + " 08:00:00"; |
| | | |
| | | private static final DateTimeFormatter DATE_TIME_FMT = |
| | | DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); |
| | | |
| | | private String toReportTime(String dateStr, String reportTime) { |
| | | if (dateStr == null || dateStr.isEmpty()) { |
| | | return null; |
| | | } |
| | | |
| | | // åªä¿ç yyyy-MM-ddï¼é²æ¢åç«¯ä¼ å®æ´æ¶é´å¯¼è´ parse å¼å¸¸ |
| | | String onlyDate = dateStr.length() > 10 ? dateStr.substring(0, 10) : dateStr; |
| | | |
| | | |
| | | String[] parts = reportTime.split(":"); |
| | | int hour = Integer.parseInt(parts[0]); |
| | | int minute = parts.length > 1 ? Integer.parseInt(parts[1]) : 0; |
| | | int second = parts.length > 2 ? Integer.parseInt(parts[2]) : 0; |
| | | |
| | | LocalDate date = LocalDate.parse(onlyDate); |
| | | LocalTime time = LocalTime.of(hour, minute, second); |
| | | |
| | | return LocalDateTime.of(date, time).format(DATE_TIME_FMT); |
| | | } |
| | | //è·¨å·¥åºæ¬¡ç ´ |
| | | public Map<String, Object> crossProcessBreakingSv(Integer pageNum, Integer pageSize, |
| | | List<String> selectDate, |
| | | String reportTime, |
| | | CrossProcessBreakingDTO crossProcessBreakingDTO) { |
| | | Integer offset = (pageNum - 1) * pageSize; |
| | | |
| | | // é»è®¤æ¶é´èå´ï¼è¿å» 15 天 |
| | | String startDate = to080000(LocalDate.now().minusDays(15).toString()); |
| | | String endDate = to080000(LocalDate.now().toString()); |
| | | // é»è®¤æ¶é´èå´ï¼è¿å» 15 å¤©ï¼æ¥æ + reportTimeï¼ |
| | | String startDate = toReportTime(LocalDate.now().minusDays(15).toString(), reportTime); |
| | | String endDate = toReportTime(LocalDate.now().toString(), reportTime); |
| | | |
| | | // 妿åç«¯ä¼ äºæ¶é´ï¼å°±ç¨åç«¯æ¥æ + reportTime |
| | | if (selectDate != null && selectDate.size() == 2) { |
| | | if (selectDate.get(0) != null && !selectDate.get(0).isEmpty()) { |
| | | startDate = to080000(selectDate.get(0)); |
| | | startDate = toReportTime(selectDate.get(0), reportTime); |
| | | } |
| | | if (selectDate.get(1) != null && !selectDate.get(1).isEmpty()) { |
| | | endDate = to080000(selectDate.get(1)); |
| | | endDate = toReportTime(selectDate.get(1), reportTime); |
| | | } |
| | | } |
| | | |
| | |
| | | // 使ç¨å¼æ¥çº¿ç¨æ± |
| | | String finalEndDate = endDate; |
| | | String finalStartDate = startDate; |
| | | System.out.println(finalEndDate+"==="+finalStartDate); |
| | | CompletableFuture<List<CrossProcessBreakingDTO>> dataFuture = asyncExecutor.runAsync(() -> |
| | | reportMapper.getProcessBreaking(offset, pageSize, finalStartDate, finalEndDate, crossProcessBreakingDTO)); |
| | | |
| | |
| | | //éè·¨å·¥åºæ¬¡ç ´ |
| | | public Map<String, Object> notCrossProcessBreakingSv(Integer pageNum, Integer pageSize, |
| | | List<String> selectDate, |
| | | String reportTime, |
| | | CrossProcessBreakingDTO crossProcessBreakingDTO) { |
| | | Integer offset = (pageNum - 1) * pageSize; |
| | | |
| | | // é»è®¤æ¶é´èå´ï¼è¿å» 15 天 |
| | | String startDate = to080000(LocalDate.now().minusDays(15).toString()); |
| | | String endDate = to080000(LocalDate.now().toString()); |
| | | // é»è®¤æ¶é´èå´ï¼è¿å» 15 å¤©ï¼æ¥æ + reportTimeï¼ |
| | | String startDate = toReportTime(LocalDate.now().minusDays(15).toString(), reportTime); |
| | | String endDate = toReportTime(LocalDate.now().toString(), reportTime); |
| | | |
| | | // 妿åç«¯ä¼ äºæ¶é´ï¼å°±ç¨åç«¯æ¥æ + reportTime |
| | | if (selectDate != null && selectDate.size() == 2) { |
| | | if (selectDate.get(0) != null && !selectDate.get(0).isEmpty()) { |
| | | startDate = to080000(selectDate.get(0)); |
| | | startDate = toReportTime(selectDate.get(0), reportTime); |
| | | } |
| | | if (selectDate.get(1) != null && !selectDate.get(1).isEmpty()) { |
| | | endDate = to080000(selectDate.get(1)); |
| | | endDate = toReportTime(selectDate.get(1), reportTime); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | public Map<String, Object> selectDamageReportSv(Integer pageNum, Integer pageSize, |
| | | List<String> selectDate, |
| | | String reportTime, |
| | | DamageReportDTO damageReportDTO) { |
| | | Integer offset = (pageNum - 1) * pageSize; |
| | | // é»è®¤æ¶é´èå´ï¼è¿å» 15 天 |
| | | String startDate = to080000(LocalDate.now().minusDays(15).toString()); |
| | | String endDate = to080000(LocalDate.now().toString()); |
| | | |
| | | Integer offset = (pageNum - 1) * pageSize; |
| | | |
| | | |
| | | // é»è®¤æ¶é´èå´ï¼è¿å» 15 å¤©ï¼æ¥æ + reportTimeï¼ |
| | | String startDate = toReportTime(LocalDate.now().minusDays(15).toString(), reportTime); |
| | | String endDate = toReportTime(LocalDate.now().toString(), reportTime); |
| | | |
| | | // 妿åç«¯ä¼ äºæ¶é´ï¼å°±ç¨åç«¯æ¥æ + reportTime |
| | | if (selectDate != null && selectDate.size() == 2) { |
| | | if (selectDate.get(0) != null && !selectDate.get(0).isEmpty()) { |
| | | startDate = to080000(selectDate.get(0)); |
| | | startDate = toReportTime(selectDate.get(0), reportTime); |
| | | } |
| | | if (selectDate.get(1) != null && !selectDate.get(1).isEmpty()) { |
| | | endDate = to080000(selectDate.get(1)); |
| | | endDate = toReportTime(selectDate.get(1), reportTime); |
| | | } |
| | | } |
| | | Map<String, Object> result = new HashMap<>(); |
| | | String finalEndDate = endDate; |
| | | String finalStartDate = startDate; |
| | | // 弿¥ä»»å¡å®ä¹ |
| | | |
| | | Map<String, Object> result = new HashMap<>(); |
| | | String finalStartDate = startDate; |
| | | String finalEndDate = endDate; |
| | | |
| | | // 弿¥ä»»å¡å®ä¹ |
| | | CompletableFuture<List<DamageReportDTO>> dataFuture = asyncExecutor.runAsync(() -> |
| | | reportMapper.selectDamageReportMp(offset, pageSize, finalStartDate, finalEndDate, damageReportDTO)); |
| | | |
| | |
| | | CompletableFuture<Map<String, Float>> footSumFuture = asyncExecutor.runAsync(() -> |
| | | reportMapper.damageReportFootSum(finalStartDate, finalEndDate, damageReportDTO)); |
| | | |
| | | //çå¾
å
¨é¨ä»»å¡å®æ |
| | | // çå¾
å
¨é¨ä»»å¡å®æ |
| | | CompletableFuture.allOf(dataFuture, totalFuture, footSumFuture).join(); |
| | | |
| | | try { |
| | |
| | | result.put("footSum", footSumFuture.get()); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new RuntimeException("å¹¶è¡æ¥è¯¢å¼å¸¸ï¼" + e.getMessage(), e); |
| | | throw new RuntimeException("æ¬¡ç ´æ»è¡¨å¹¶è¡æ¥è¯¢å¼å¸¸ï¼" + e.getMessage(), e); |
| | | } |
| | | |
| | | // åä¼ åç«¯çæ¶é´ï¼ç°å¨æ¯å¸¦æ¶åç§çï¼ |
| | | List<String> list = new ArrayList<>(); |
| | | list.add(startDate); |
| | | list.add(endDate); |
| | |
| | | |
| | | return result; |
| | | } |
| | | |
| | | |
| | | public Map<String, Object> splittingDetailsOutsideSv(String orderId, Report report) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | } |
| | | String inputVal= (String) dates.get("inputVal"); |
| | | String project= (String) dates.get("project"); |
| | | String terminationVals= (String) dates.get("terminationVals"); |
| | | if ("null".equals(inputVal)) { |
| | | String terminationVals= dates.get("terminationVals").toString();; |
| | | if (inputVal==null) { |
| | | inputVal = ""; |
| | | } |
| | | if ("null".equals(project)) { |
| | | if (project==null) { |
| | | project = ""; |
| | | } |
| | | if ("null".equals(terminationVals)) { |
| | | if (terminationVals==null) { |
| | | terminationVals = ""; |
| | | } |
| | | List<WorkInProgressDTO> dataList1 =reportMapper.exportWorkInProgressMp(process,inputVal,project,terminationVals); |
| | |
| | | } |
| | | String inputVal= (String) dates.get("inputVal"); |
| | | String project= (String) dates.get("project"); |
| | | String terminationVals= (String) dates.get("terminationVals"); |
| | | if ("null".equals(inputVal)) { |
| | | String terminationVals= dates.get("terminationVals").toString();; |
| | | if (inputVal==null) { |
| | | inputVal = ""; |
| | | } |
| | | if ("null".equals(project)) { |
| | | if (project==null) { |
| | | project = ""; |
| | | } |
| | | if ("null".equals(terminationVals)) { |
| | | if (terminationVals==null) { |
| | | terminationVals = ""; |
| | | } |
| | | |
| | |
| | | // if (reviewedState==1){//å·²å®¡æ ¸ |
| | | //䏿¯ç¬¬ä¸éå·¥åºï¼æ¥è¯¢æ¥å·¥æ°æ® |
| | | List<Map<String,String>> details = reportingWorkMapper.SelectReworlDetailMp(processIdStr, splitTechNumbers(technologyStr), process,previousProcess,laminating); |
| | | if(process.equals("ä¸ç©º")){ |
| | | if(laminating.equals("stepD")){ |
| | | //è·å该æµç¨å¡è®¢åå· |
| | | String orderId = reportingWorkMapper.selectOrderid(processIdStr); |
| | | details.forEach( detail -> { |
| | |
| | | |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new RuntimeException("å¹¶è¡æ¥è¯¢æ¥å·¥è®°å½å¼å¸¸ï¼" + e.getMessage(), e); |
| | | throw new RuntimeException("æ¥å·¥æ¥è¯¢å¹¶è¡æ¥è¯¢æ¥å·¥è®°å½å¼å¸¸ï¼" + e.getMessage(), e); |
| | | } |
| | | |
| | | return result; |
| | |
| | | // 设置宽度 |
| | | rasterizationOptions.setPageWidth(1000); |
| | | // 设置é«åº¦ |
| | | rasterizationOptions.setPageHeight(1000); |
| | | rasterizationOptions.setPageHeight(700); |
| | | // è°ç¨è¿ä¸ªsetEmbedBackgroundæ¹æ³æ¥è®¾ç½®èæ¯è²æ¯å¦ä¸çäºè¾åºæ ¼å¼çé»è®¤èæ¯è² |
| | | //rasterizationOptions.setEmbedBackground(true); |
| | | // 为çæçå¾åå建ä¸ä¸ªPngOptionsçå®ä¾ï¼å¹¶å°å
¶åé
ç»ImageOptionsBaseç±»çå®ä¾ã |
| | |
| | | c.project_no, |
| | | d.child_width as 'width', |
| | | d.child_height as 'height', |
| | | (d.child_width + d.child_height) * 2 as 'perimeter', |
| | | (d.child_width + d.child_height) * 2/ 1000 as 'perimeter', |
| | | c.quantity, |
| | | od.shape, |
| | | concat( c.process_id, '-', c.technology_number ) AS 'process_id', |
| | |
| | | c.project_no, |
| | | d.child_width as 'width', |
| | | d.child_height as 'height', |
| | | (d.child_width + d.child_height) * 2 as 'perimeter', |
| | | (d.child_width + d.child_height) * 2/ 1000 as 'perimeter', |
| | | c.patch_num as quantity, |
| | | od.shape, |
| | | concat( c.process_id, '-', c.technology_number ) AS 'process_id', |
| | |
| | | # h.layout_id as heatLayoutId, |
| | | h.width AS width, |
| | | h.height AS height, |
| | | (h.width + h.height) * 2 as 'perimeter', |
| | | (h.width + h.height) * 2 / 1000 as 'perimeter', |
| | | od.shape, |
| | | count( 1 ) AS quantity, |
| | | concat( h.process_id, '-', h.layer ) AS process_id, |
| | |
| | | WHERE |
| | | project_no = #{projectNo} |
| | | </select> |
| | | <select id="optimizeTemp" resultType="java.util.Map" parameterType="java.lang.String"> |
| | | SELECT |
| | | project_no, |
| | | layer, |
| | | o_width as width, |
| | | o_height as height, |
| | | rack_no as rackNo, |
| | | COUNT(*) as quantity, |
| | | ROUND((o_width + o_height) * 2 / 1000, 2) as perimeter, |
| | | ROUND(o_width * o_height * COUNT(*) / 1000000, 4) as area |
| | | FROM |
| | | pp.`optimize_detail` |
| | | WHERE |
| | | project_no = #{projectNo} |
| | | AND process_id = '' |
| | | GROUP BY |
| | | project_no, |
| | | layer, |
| | | o_width, |
| | | o_height, |
| | | rack_no |
| | | ORDER BY |
| | | o_width, |
| | | o_height |
| | | </select> |
| | | <select id="selectTempProject" resultType="java.util.Map" parameterType="java.lang.String"> |
| | | SELECT |
| | | project_no, |
| | | o_width as width, |
| | | o_height as height, |
| | | rack_no as order_number, |
| | | layer as processCard, |
| | | COUNT(*) as quantity, |
| | | ROUND(o_width * o_height * COUNT(*) / 1000000, 4) as Area |
| | | FROM |
| | | pp.`optimize_detail` |
| | | WHERE |
| | | project_no = #{processId} |
| | | AND process_id = '' |
| | | GROUP BY |
| | | project_no, |
| | | layer, |
| | | o_width, |
| | | o_height, |
| | | rack_no |
| | | ORDER BY |
| | | o_width, |
| | | o_height |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | and ogd.glass_child regexp #{patchLog.glassChild} |
| | | </if> |
| | | <if test="patchLog.responsibleTeam != null and patchLog.responsibleTeam != ''"> |
| | | and r.responsible_team regexp #{patchLog.responsibleTeam} |
| | | and r.responsible_team like concat('%', #{patchLog.responsibleTeam}, '%') |
| | | </if> |
| | | <if test="patchLog.responsibleEquipment != null and patchLog.responsibleEquipment != ''"> |
| | | and r.responsible_equipment regexp #{patchLog.responsibleEquipment} |
| | |
| | | and r.patch_processes regexp #{patchLog.patchProcesses} |
| | | </if> |
| | | <if test="patchLog.reviewer != null and patchLog.reviewer != ''"> |
| | | and r.reviewer regexp #{patchLog.reviewer} |
| | | and r.reviewer like concat('%', #{patchLog.reviewer}, '%') |
| | | </if> |
| | | </where> |
| | | order by r.review_status,r.id desc |
| | |
| | | and ogd.glass_child regexp #{patchLog.glassChild} |
| | | </if> |
| | | <if test="patchLog.responsibleTeam != null and patchLog.responsibleTeam != ''"> |
| | | and r.responsible_team regexp #{patchLog.responsibleTeam} |
| | | and r.responsible_team like concat('%', #{patchLog.responsibleTeam}, '%') |
| | | </if> |
| | | <if test="patchLog.responsibleEquipment != null and patchLog.responsibleEquipment != ''"> |
| | | and r.responsible_equipment regexp #{patchLog.responsibleEquipment} |
| | |
| | | and r.patch_processes regexp #{patchLog.patchProcesses} |
| | | </if> |
| | | <if test="patchLog.reviewer != null and patchLog.reviewer != ''"> |
| | | and r.reviewer regexp #{patchLog.reviewer} |
| | | and r.reviewer like concat('%', #{patchLog.reviewer}, '%') |
| | | </if> |
| | | </where> |
| | | ) as zu |
| | |
| | | and ogd.glass_child regexp #{patchLogAddDTO.glassChild} |
| | | </if> |
| | | <if test="patchLogAddDTO.responsibleTeam != null and patchLogAddDTO.responsibleTeam != ''"> |
| | | and dd.responsible_team regexp #{patchLogAddDTO.responsibleTeam} |
| | | and dd.responsible_team like concat('%', #{patchLogAddDTO.responsibleTeam}, '%') |
| | | </if> |
| | | <if test="patchLogAddDTO.responsibleEquipment != null and patchLogAddDTO.responsibleEquipment != ''"> |
| | | and dd.responsible_equipment regexp #{patchLogAddDTO.responsibleEquipment} |
| | |
| | | and project_no IS not NULL; |
| | | </select> |
| | | |
| | | <select id="exportReplenishMp"> |
| | | select |
| | | r.id, |
| | | r.review_status, |
| | | r.reporting_work_id, |
| | | r.patch_id, |
| | | r.process_id, |
| | | r.order_id, |
| | | r.order_sort, |
| | | o.project, |
| | | o.batch, |
| | | od.building_number, |
| | | od.product_name, |
| | | r.technology_number, |
| | | ogd.glass_address, |
| | | ogd.glass_child, |
| | | r.patch_num, |
| | | ogd.child_width as width, |
| | | ogd.child_height as height, |
| | | od.shape, |
| | | r.patch_type, |
| | | r.patch_reason, |
| | | r.responsible_team, |
| | | r.responsible_personnel, |
| | | r.responsible_equipment, |
| | | r.patch_area, |
| | | r.quality_inspector, |
| | | r.patch_processes, |
| | | r.reviewer, |
| | | r.create_time as create_time, |
| | | date(r.update_time) as update_time, |
| | | JSON_UNQUOTE( JSON_EXTRACT( od.other_columns, '$.S01' )) AS glassNumber |
| | | from pp.patch_log r left join sd.order_detail od on r.order_id=od.order_id and r.order_sort=od.order_number |
| | | left join sd.`order` o on r.order_id = o.order_id |
| | | left join (select * from sd.order_glass_detail group by order_id,order_number,technology_number) as ogd |
| | | on r.order_id = ogd.order_id and r.order_sort = ogd.order_number and r.technology_number=ogd.technology_number |
| | | <where> |
| | | date(r.create_time)>=#{dates[0]} and date(r.create_time) <= #{dates[1]} |
| | | and o.create_order>0 |
| | | </where> |
| | | order by r.review_status,r.id desc |
| | | </select> |
| | | </mapper> |
| | |
| | | <result column="workProcessName" property="workProcessName"/> |
| | | <result column="device_name" property="deviceName"/> |
| | | <result column="order_type" property="orderType"/> |
| | | <result column="thicknessSum" property="thicknessSum"/> |
| | | <result column="thicknessArea" property="thicknessArea"/> |
| | | </resultMap> |
| | | |
| | | <resultMap id="scheduleProductionScheduleMap" type="com.example.erp.dto.pp.ScheduleProductionScheduleDTO"> |
| | |
| | | and rw.this_process != dd.responsible_process |
| | | and o.create_order>0 |
| | | <if test="crossProcessBreakingDTO.code != null and crossProcessBreakingDTO.code != ''"> |
| | | and JSON_UNQUOTE( JSON_EXTRACT( od.other_columns, '$.S01' )) regexp #{crossProcessBreakingDTO.code} |
| | | and JSON_UNQUOTE( JSON_EXTRACT( od.other_columns, '$.S01' )) like concat('%', #{crossProcessBreakingDTO.code}, '%') |
| | | </if> |
| | | <if test="crossProcessBreakingDTO.processId != null and crossProcessBreakingDTO.processId != ''"> |
| | | and rw.process_id regexp #{crossProcessBreakingDTO.processId} |
| | | and rw.process_id like concat('%', #{crossProcessBreakingDTO.processId}, '%') |
| | | </if> |
| | | <if test="crossProcessBreakingDTO.thisProcess != null and crossProcessBreakingDTO.thisProcess != ''"> |
| | | and rw.this_process regexp #{crossProcessBreakingDTO.thisProcess} |
| | | and rw.this_process like concat('%', #{crossProcessBreakingDTO.thisProcess}, '%') |
| | | </if> |
| | | <if test="crossProcessBreakingDTO.responsibleProcess != null and crossProcessBreakingDTO.responsibleProcess != ''"> |
| | | and dd.responsible_process regexp #{crossProcessBreakingDTO.responsibleProcess} |
| | | and dd.responsible_process like concat('%', #{crossProcessBreakingDTO.responsibleProcess}, '%') |
| | | </if> |
| | | <if test="crossProcessBreakingDTO.responsibleTeam != null and crossProcessBreakingDTO.responsibleTeam != ''"> |
| | | and dd.responsible_team regexp #{crossProcessBreakingDTO.responsibleTeam} |
| | | and dd.responsible_team like concat('%', #{crossProcessBreakingDTO.responsibleTeam}, '%') |
| | | </if> |
| | | <if test="crossProcessBreakingDTO.glassChild != null and crossProcessBreakingDTO.glassChild != ''"> |
| | | and ogd.glass_child regexp #{crossProcessBreakingDTO.glassChild} |
| | | and ogd.glass_child like concat('%', #{crossProcessBreakingDTO.glassChild}, '%') |
| | | </if> |
| | | <if test="crossProcessBreakingDTO.breakageType != null and crossProcessBreakingDTO.breakageType != ''"> |
| | | and dd.breakage_type regexp #{crossProcessBreakingDTO.breakageType} |
| | | and dd.breakage_type like concat('%', #{crossProcessBreakingDTO.breakageType}, '%') |
| | | </if> |
| | | <if test="crossProcessBreakingDTO.project != null and crossProcessBreakingDTO.project != ''"> |
| | | and o.project regexp #{crossProcessBreakingDTO.project} |
| | | and o.project like concat('%', #{crossProcessBreakingDTO.project}, '%') |
| | | </if> |
| | | <if test="crossProcessBreakingDTO.orderId != null and crossProcessBreakingDTO.orderId != ''"> |
| | | and o.order_id regexp #{crossProcessBreakingDTO.orderId} |
| | | and o.order_id like concat('%', #{crossProcessBreakingDTO.orderId}, '%') |
| | | </if> |
| | | <if test="crossProcessBreakingDTO.responsiblePersonnel != null and crossProcessBreakingDTO.responsiblePersonnel != ''"> |
| | | and dd.responsible_personnel regexp #{crossProcessBreakingDTO.responsiblePersonnel} |
| | | and dd.responsible_personnel like concat('%', #{crossProcessBreakingDTO.responsiblePersonnel}, '%') |
| | | </if> |
| | | <if test="crossProcessBreakingDTO.creator != null and crossProcessBreakingDTO.creator != ''"> |
| | | and rw.creator regexp #{crossProcessBreakingDTO.creator} |
| | | and rw.creator like concat('%', #{crossProcessBreakingDTO.creator}, '%') |
| | | </if> |
| | | <if test="crossProcessBreakingDTO.code != null and crossProcessBreakingDTO.code != ''"> |
| | | and ifnull(JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S01')),'') regexp #{crossProcessBreakingDTO.code} |
| | | and ifnull(JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S01')),'') like concat('%', #{crossProcessBreakingDTO.code}, '%') |
| | | </if> |
| | | <if test="crossProcessBreakingDTO.reportingWorkId != null and crossProcessBreakingDTO.reportingWorkId != ''"> |
| | | and rw.reporting_work_id regexp #{crossProcessBreakingDTO.reportingWorkId} |
| | | and rw.reporting_work_id like concat('%', #{crossProcessBreakingDTO.reportingWorkId}, '%') |
| | | </if> |
| | | GROUP BY dd.id |
| | | order by dd.id desc |
| | |
| | | and rw.this_process = dd.responsible_process |
| | | and o.create_order>0 |
| | | <if test="crossProcessBreakingDTO.code != null and crossProcessBreakingDTO.code != ''"> |
| | | and JSON_UNQUOTE( JSON_EXTRACT( od.other_columns, '$.S01' )) regexp #{crossProcessBreakingDTO.code} |
| | | and JSON_UNQUOTE( JSON_EXTRACT( od.other_columns, '$.S01' )) like concat('%', #{crossProcessBreakingDTO.code}, '%') |
| | | </if> |
| | | <if test="crossProcessBreakingDTO.processId != null and crossProcessBreakingDTO.processId != ''"> |
| | | and rw.process_id regexp #{crossProcessBreakingDTO.processId} |
| | | and rw.process_id like concat('%', #{crossProcessBreakingDTO.processId}, '%') |
| | | </if> |
| | | <if test="crossProcessBreakingDTO.thisProcess != null and crossProcessBreakingDTO.thisProcess != ''"> |
| | | and rw.this_process regexp #{crossProcessBreakingDTO.thisProcess} |
| | | and rw.this_process like concat('%', #{crossProcessBreakingDTO.thisProcess}, '%') |
| | | </if> |
| | | <if test="crossProcessBreakingDTO.responsibleProcess != null and crossProcessBreakingDTO.responsibleProcess != ''"> |
| | | and dd.responsible_process regexp #{crossProcessBreakingDTO.responsibleProcess} |
| | | and dd.responsible_process like concat('%', #{crossProcessBreakingDTO.responsibleProcess}, '%') |
| | | </if> |
| | | <if test="crossProcessBreakingDTO.responsibleTeam != null and crossProcessBreakingDTO.responsibleTeam != ''"> |
| | | and dd.responsible_team regexp #{crossProcessBreakingDTO.responsibleTeam} |
| | | and dd.responsible_team like concat('%', #{crossProcessBreakingDTO.responsibleTeam}, '%') |
| | | </if> |
| | | <if test="crossProcessBreakingDTO.glassChild != null and crossProcessBreakingDTO.glassChild != ''"> |
| | | and ogd.glass_child regexp #{crossProcessBreakingDTO.glassChild} |
| | | and ogd.glass_child like concat('%', #{crossProcessBreakingDTO.glassChild}, '%') |
| | | </if> |
| | | <if test="crossProcessBreakingDTO.breakageType != null and crossProcessBreakingDTO.breakageType != ''"> |
| | | and dd.breakage_type regexp #{crossProcessBreakingDTO.breakageType} |
| | | and dd.breakage_type like concat('%', #{crossProcessBreakingDTO.breakageType}, '%') |
| | | </if> |
| | | <if test="crossProcessBreakingDTO.project != null and crossProcessBreakingDTO.project != ''"> |
| | | and o.project regexp #{crossProcessBreakingDTO.project} |
| | | and o.project like concat('%', #{crossProcessBreakingDTO.project}, '%') |
| | | </if> |
| | | <if test="crossProcessBreakingDTO.orderId != null and crossProcessBreakingDTO.orderId != ''"> |
| | | and o.order_id regexp #{crossProcessBreakingDTO.orderId} |
| | | and o.order_id like concat('%', #{crossProcessBreakingDTO.orderId}, '%') |
| | | </if> |
| | | <if test="crossProcessBreakingDTO.responsiblePersonnel != null and crossProcessBreakingDTO.responsiblePersonnel != ''"> |
| | | and dd.responsible_personnel regexp #{crossProcessBreakingDTO.responsiblePersonnel} |
| | | and dd.responsible_personnel like concat('%', #{crossProcessBreakingDTO.responsiblePersonnel}, '%') |
| | | </if> |
| | | <if test="crossProcessBreakingDTO.creator != null and crossProcessBreakingDTO.creator != ''"> |
| | | and rw.creator regexp #{crossProcessBreakingDTO.creator} |
| | | and rw.creator like concat('%', #{crossProcessBreakingDTO.creator}, '%') |
| | | </if> |
| | | <if test="crossProcessBreakingDTO.code != null and crossProcessBreakingDTO.code != ''"> |
| | | and ifnull(JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S01')),'') regexp #{crossProcessBreakingDTO.code} |
| | | and ifnull(JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S01')),'') like concat('%', #{crossProcessBreakingDTO.code}, '%') |
| | | </if> |
| | | <if test="crossProcessBreakingDTO.reportingWorkId != null and crossProcessBreakingDTO.reportingWorkId != ''"> |
| | | and rw.reporting_work_id regexp #{crossProcessBreakingDTO.reportingWorkId} |
| | | and rw.reporting_work_id like concat('%', #{crossProcessBreakingDTO.reportingWorkId}, '%') |
| | | </if> |
| | | GROUP BY dd.id |
| | | order by dd.id desc |
| | |
| | | and rw.reviewed_state>=0 |
| | | and rw.this_process != dd.responsible_process |
| | | <if test="crossProcessBreakingDTO.code != null and crossProcessBreakingDTO.code != ''"> |
| | | and JSON_UNQUOTE( JSON_EXTRACT( od.other_columns, '$.S01' )) regexp #{crossProcessBreakingDTO.code} |
| | | and JSON_UNQUOTE( JSON_EXTRACT( od.other_columns, '$.S01' )) like concat('%', #{crossProcessBreakingDTO.code}, '%') |
| | | </if> |
| | | <if test="crossProcessBreakingDTO.processId != null and crossProcessBreakingDTO.processId != ''"> |
| | | and rw.process_id regexp #{crossProcessBreakingDTO.processId} |
| | | and rw.process_id like concat('%', #{crossProcessBreakingDTO.processId}, '%') |
| | | </if> |
| | | <if test="crossProcessBreakingDTO.thisProcess != null and crossProcessBreakingDTO.thisProcess != ''"> |
| | | and rw.this_process regexp #{crossProcessBreakingDTO.thisProcess} |
| | | and rw.this_process like concat('%', #{crossProcessBreakingDTO.thisProcess}, '%') |
| | | </if> |
| | | <if test="crossProcessBreakingDTO.responsibleProcess != null and crossProcessBreakingDTO.responsibleProcess != ''"> |
| | | and dd.responsible_process regexp #{crossProcessBreakingDTO.responsibleProcess} |
| | | and dd.responsible_process like concat('%', #{crossProcessBreakingDTO.responsibleProcess}, '%') |
| | | </if> |
| | | <if test="crossProcessBreakingDTO.responsibleTeam != null and crossProcessBreakingDTO.responsibleTeam != ''"> |
| | | and dd.responsible_team regexp #{crossProcessBreakingDTO.responsibleTeam} |
| | | and dd.responsible_team like concat('%', #{crossProcessBreakingDTO.responsibleTeam}, '%') |
| | | </if> |
| | | <if test="crossProcessBreakingDTO.glassChild != null and crossProcessBreakingDTO.glassChild != ''"> |
| | | and ogd.glass_child regexp #{crossProcessBreakingDTO.glassChild} |
| | | and ogd.glass_child like concat('%', #{crossProcessBreakingDTO.glassChild}, '%') |
| | | </if> |
| | | <if test="crossProcessBreakingDTO.breakageType != null and crossProcessBreakingDTO.breakageType != ''"> |
| | | and dd.breakage_type regexp #{crossProcessBreakingDTO.breakageType} |
| | | and dd.breakage_type like concat('%', #{crossProcessBreakingDTO.breakageType}, '%') |
| | | </if> |
| | | <if test="crossProcessBreakingDTO.project != null and crossProcessBreakingDTO.project != ''"> |
| | | and o.project regexp #{crossProcessBreakingDTO.project} |
| | | and o.project like concat('%', #{crossProcessBreakingDTO.project}, '%') |
| | | </if> |
| | | <if test="crossProcessBreakingDTO.orderId != null and crossProcessBreakingDTO.orderId != ''"> |
| | | and o.order_id regexp #{crossProcessBreakingDTO.orderId} |
| | | and o.order_id like concat('%', #{crossProcessBreakingDTO.orderId}, '%') |
| | | </if> |
| | | <if test="crossProcessBreakingDTO.responsiblePersonnel != null and crossProcessBreakingDTO.responsiblePersonnel != ''"> |
| | | and dd.responsible_personnel regexp #{crossProcessBreakingDTO.responsiblePersonnel} |
| | | and dd.responsible_personnel like concat('%', #{crossProcessBreakingDTO.responsiblePersonnel}, '%') |
| | | </if> |
| | | <if test="crossProcessBreakingDTO.creator != null and crossProcessBreakingDTO.creator != ''"> |
| | | and rw.creator like concat('%', #{crossProcessBreakingDTO.creator}, '%') |
| | | </if> |
| | | <if test="crossProcessBreakingDTO.code != null and crossProcessBreakingDTO.code != ''"> |
| | | and ifnull(JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S01')),'') regexp #{crossProcessBreakingDTO.code} |
| | | and ifnull(JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S01')),'') like concat('%', #{crossProcessBreakingDTO.code}, '%') |
| | | </if> |
| | | <if test="crossProcessBreakingDTO.reportingWorkId != null and crossProcessBreakingDTO.reportingWorkId != ''"> |
| | | and rw.reporting_work_id regexp #{crossProcessBreakingDTO.reportingWorkId} |
| | | and rw.reporting_work_id like concat('%', #{crossProcessBreakingDTO.reportingWorkId}, '%') |
| | | </if> |
| | | order by dd.id desc |
| | | </select> |
| | |
| | | and reviewed_state != 2 |
| | | and rw.this_process = dd.responsible_process |
| | | <if test="crossProcessBreakingDTO.code != null and crossProcessBreakingDTO.code != ''"> |
| | | and JSON_UNQUOTE( JSON_EXTRACT( od.other_columns, '$.S01' )) regexp #{crossProcessBreakingDTO.code} |
| | | and JSON_UNQUOTE( JSON_EXTRACT( od.other_columns, '$.S01' )) like concat('%', #{crossProcessBreakingDTO.code}, '%') |
| | | </if> |
| | | <if test="crossProcessBreakingDTO.processId != null and crossProcessBreakingDTO.processId != ''"> |
| | | and rw.process_id regexp #{crossProcessBreakingDTO.processId} |
| | | and rw.process_id like concat('%', #{crossProcessBreakingDTO.processId}, '%') |
| | | </if> |
| | | <if test="crossProcessBreakingDTO.thisProcess != null and crossProcessBreakingDTO.thisProcess != ''"> |
| | | and rw.this_process regexp #{crossProcessBreakingDTO.thisProcess} |
| | | and rw.this_process like concat('%', #{crossProcessBreakingDTO.thisProcess}, '%') |
| | | </if> |
| | | <if test="crossProcessBreakingDTO.responsibleProcess != null and crossProcessBreakingDTO.responsibleProcess != ''"> |
| | | and dd.responsible_process regexp #{crossProcessBreakingDTO.responsibleProcess} |
| | | and dd.responsible_process like concat('%', #{crossProcessBreakingDTO.responsibleProcess}, '%') |
| | | </if> |
| | | <if test="crossProcessBreakingDTO.responsibleTeam != null and crossProcessBreakingDTO.responsibleTeam != ''"> |
| | | and dd.responsible_team regexp #{crossProcessBreakingDTO.responsibleTeam} |
| | | and dd.responsible_team like concat('%', #{crossProcessBreakingDTO.responsibleTeam}, '%') |
| | | </if> |
| | | <if test="crossProcessBreakingDTO.glassChild != null and crossProcessBreakingDTO.glassChild != ''"> |
| | | and ogd.glass_child regexp #{crossProcessBreakingDTO.glassChild} |
| | | and ogd.glass_child like concat('%', #{crossProcessBreakingDTO.glassChild}, '%') |
| | | </if> |
| | | <if test="crossProcessBreakingDTO.breakageType != null and crossProcessBreakingDTO.breakageType != ''"> |
| | | and dd.breakage_type regexp #{crossProcessBreakingDTO.breakageType} |
| | | and dd.breakage_type like concat('%', #{crossProcessBreakingDTO.breakageType}, '%') |
| | | </if> |
| | | <if test="crossProcessBreakingDTO.project != null and crossProcessBreakingDTO.project != ''"> |
| | | and o.project regexp #{crossProcessBreakingDTO.project} |
| | | and o.project like concat('%', #{crossProcessBreakingDTO.project}, '%') |
| | | </if> |
| | | <if test="crossProcessBreakingDTO.orderId != null and crossProcessBreakingDTO.orderId != ''"> |
| | | and o.order_id regexp #{crossProcessBreakingDTO.orderId} |
| | | and o.order_id like concat('%', #{crossProcessBreakingDTO.orderId}, '%') |
| | | </if> |
| | | <if test="crossProcessBreakingDTO.responsiblePersonnel != null and crossProcessBreakingDTO.responsiblePersonnel != ''"> |
| | | and dd.responsible_personnel regexp #{crossProcessBreakingDTO.responsiblePersonnel} |
| | | and dd.responsible_personnel like concat('%', #{crossProcessBreakingDTO.responsiblePersonnel}, '%') |
| | | </if> |
| | | <if test="crossProcessBreakingDTO.creator != null and crossProcessBreakingDTO.creator != ''"> |
| | | and rw.creator like concat('%', #{crossProcessBreakingDTO.creator}, '%') |
| | | </if> |
| | | <if test="crossProcessBreakingDTO.code != null and crossProcessBreakingDTO.code != ''"> |
| | | and ifnull(JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S01')),'') regexp #{crossProcessBreakingDTO.code} |
| | | and ifnull(JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S01')),'') like concat('%', #{crossProcessBreakingDTO.code}, '%') |
| | | </if> |
| | | <if test="crossProcessBreakingDTO.reportingWorkId != null and crossProcessBreakingDTO.reportingWorkId != ''"> |
| | | and rw.reporting_work_id like concat('%', #{crossProcessBreakingDTO.reportingWorkId}, '%') |
| | | </if> |
| | | order by dd.id desc |
| | | </select> |
| | |
| | | |
| | | AND dd.available = 0 and rw.reviewed_state>=0 |
| | | <if test="damageReportDTO.orderId != null and damageReportDTO.orderId != ''"> |
| | | and o.order_id regexp #{damageReportDTO.orderId} |
| | | and o.order_id like concat('%', #{damageReportDTO.orderId}, '%') |
| | | </if> |
| | | <if test="damageReportDTO.project != null and damageReportDTO.project != ''"> |
| | | and o.project regexp #{damageReportDTO.project} |
| | | and o.project like concat('%', #{damageReportDTO.project}, '%') |
| | | </if> |
| | | <if test="damageReportDTO.processId != null and damageReportDTO.processId != ''"> |
| | | and rw.process_id regexp #{damageReportDTO.processId} |
| | | and rw.process_id like concat('%', #{damageReportDTO.processId}, '%') |
| | | </if> |
| | | <if test="damageReportDTO.orderNumber != null and damageReportDTO.orderNumber != ''"> |
| | | and dd.order_number regexp #{damageReportDTO.orderNumber} |
| | | and dd.order_number like concat('%', #{damageReportDTO.orderNumber}, '%') |
| | | </if> |
| | | <if test="damageReportDTO.technologyNumber != null and damageReportDTO.technologyNumber != ''"> |
| | | and dd.technology_number regexp #{damageReportDTO.technologyNumber} |
| | | and dd.technology_number like concat('%', #{damageReportDTO.technologyNumber}, '%') |
| | | </if> |
| | | <if test="damageReportDTO.responsibleProcess != null and damageReportDTO.responsibleProcess != ''"> |
| | | and dd.responsible_process regexp #{damageReportDTO.responsibleProcess} |
| | | and dd.responsible_process like concat('%', #{damageReportDTO.responsibleProcess}, '%') |
| | | </if> |
| | | <if test="damageReportDTO.responsibleTeam != null and damageReportDTO.responsibleTeam != ''"> |
| | | and dd.responsible_team regexp #{damageReportDTO.responsibleTeam} |
| | | and dd.responsible_team like concat('%', #{damageReportDTO.responsibleTeam}, '%') |
| | | </if> |
| | | <if test="damageReportDTO.responsibleEquipment != null and damageReportDTO.responsibleEquipment != ''"> |
| | | and dd.responsible_equipment regexp #{damageReportDTO.responsibleEquipment} |
| | | and dd.responsible_equipment like concat('%', #{damageReportDTO.responsibleEquipment}, '%') |
| | | </if> |
| | | <if test="damageReportDTO.breakageType != null and damageReportDTO.breakageType != ''"> |
| | | and dd.breakage_type regexp #{damageReportDTO.breakageType} |
| | | and dd.breakage_type like concat('%', #{damageReportDTO.breakageType}, '%') |
| | | </if> |
| | | <if test="damageReportDTO.breakageReason != null and damageReportDTO.breakageReason != ''"> |
| | | and dd.breakage_reason regexp #{damageReportDTO.breakageReason} |
| | | and dd.breakage_reason like concat('%', #{damageReportDTO.breakageReason}, '%') |
| | | </if> |
| | | <if test="damageReportDTO.glassChild != null and damageReportDTO.glassChild != ''"> |
| | | and ogd.glass_child regexp #{damageReportDTO.glassChild} |
| | | and ogd.glass_child like concat('%', #{damageReportDTO.glassChild}, '%') |
| | | </if> |
| | | <if test="damageReportDTO.glassNumber != null and damageReportDTO.glassNumber != ''"> |
| | | and ifnull(JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S01')),'') regexp #{damageReportDTO.glassNumber} |
| | | and ifnull(JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S01')),'') like concat('%', #{damageReportDTO.glassNumber}, '%') |
| | | </if> |
| | | <if test="damageReportDTO.thisProcess != null and damageReportDTO.thisProcess != ''"> |
| | | and rw.this_process regexp #{damageReportDTO.thisProcess} |
| | | and rw.this_process like concat('%', #{damageReportDTO.thisProcess}, '%') |
| | | </if> |
| | | <if test="damageReportDTO.creator != null and damageReportDTO.creator != ''"> |
| | | and rw.creator regexp #{damageReportDTO.creator} |
| | | and rw.creator like concat('%', #{damageReportDTO.creator}, '%') |
| | | </if> |
| | | <if test="damageReportDTO.reportingWorkId != null and damageReportDTO.reportingWorkId != ''"> |
| | | and rw.reporting_work_id regexp #{damageReportDTO.reportingWorkId} |
| | | and rw.reporting_work_id like concat('%', #{damageReportDTO.reportingWorkId}, '%') |
| | | </if> |
| | | GROUP BY |
| | | dd.id |
| | |
| | | LEFT JOIN pp.damage_details AS dd ON dd.reporting_work_id = rw.reporting_work_id |
| | | AND dd.order_number = ogd.order_number |
| | | AND dd.technology_number = ogd.technology_number |
| | | left join sd.order_detail as od on o.order_id = od.order_id and od.order_number=ogd.order_number |
| | | WHERE |
| | | rw.reporting_work_time >= #{selectTime1} |
| | | AND rw.reporting_work_time <= #{selectTime2} |
| | | AND dd.available = 0 and rw.reviewed_state>=0 |
| | | <if test="damageReportDTO.orderId != null and damageReportDTO.orderId != ''"> |
| | | and o.order_id regexp #{damageReportDTO.orderId} |
| | | and o.order_id like concat('%', #{damageReportDTO.orderId}, '%') |
| | | </if> |
| | | <if test="damageReportDTO.project != null and damageReportDTO.project != ''"> |
| | | and o.project regexp #{damageReportDTO.project} |
| | | and o.project like concat('%', #{damageReportDTO.project}, '%') |
| | | </if> |
| | | <if test="damageReportDTO.processId != null and damageReportDTO.processId != ''"> |
| | | and rw.process_id regexp #{damageReportDTO.processId} |
| | | and rw.process_id like concat('%', #{damageReportDTO.processId}, '%') |
| | | </if> |
| | | <if test="damageReportDTO.orderNumber != null and damageReportDTO.orderNumber != ''"> |
| | | and dd.order_number regexp #{damageReportDTO.orderNumber} |
| | | and dd.order_number like concat('%', #{damageReportDTO.orderNumber}, '%') |
| | | </if> |
| | | <if test="damageReportDTO.technologyNumber != null and damageReportDTO.technologyNumber != ''"> |
| | | and dd.technology_number regexp #{damageReportDTO.technologyNumber} |
| | | and dd.technology_number like concat('%', #{damageReportDTO.technologyNumber}, '%') |
| | | </if> |
| | | <if test="damageReportDTO.responsibleProcess != null and damageReportDTO.responsibleProcess != ''"> |
| | | and dd.responsible_process regexp #{damageReportDTO.responsibleProcess} |
| | | and dd.responsible_process like concat('%', #{damageReportDTO.responsibleProcess}, '%') |
| | | </if> |
| | | <if test="damageReportDTO.responsibleTeam != null and damageReportDTO.responsibleTeam != ''"> |
| | | and dd.responsible_team regexp #{damageReportDTO.responsibleTeam} |
| | | and dd.responsible_team like concat('%', #{damageReportDTO.responsibleTeam}, '%') |
| | | </if> |
| | | <if test="damageReportDTO.responsibleEquipment != null and damageReportDTO.responsibleEquipment != ''"> |
| | | and dd.responsible_equipment regexp #{damageReportDTO.responsibleEquipment} |
| | | and dd.responsible_equipment like concat('%', #{damageReportDTO.responsibleEquipment}, '%') |
| | | </if> |
| | | <if test="damageReportDTO.breakageType != null and damageReportDTO.breakageType != ''"> |
| | | and dd.breakage_type regexp #{damageReportDTO.breakageType} |
| | | and dd.breakage_type like concat('%', #{damageReportDTO.breakageType}, '%') |
| | | </if> |
| | | <if test="damageReportDTO.breakageReason != null and damageReportDTO.breakageReason != ''"> |
| | | and dd.breakage_reason regexp #{damageReportDTO.breakageReason} |
| | | and dd.breakage_reason like concat('%', #{damageReportDTO.breakageReason}, '%') |
| | | </if> |
| | | <if test="damageReportDTO.glassChild != null and damageReportDTO.glassChild != ''"> |
| | | and ogd.glass_child regexp #{damageReportDTO.glassChild} |
| | | and ogd.glass_child like concat('%', #{damageReportDTO.glassChild}, '%') |
| | | </if> |
| | | <if test="damageReportDTO.glassNumber != null and damageReportDTO.glassNumber != ''"> |
| | | and ifnull(JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S01')),'') like concat('%', #{damageReportDTO.glassNumber}, '%') |
| | | </if> |
| | | <if test="damageReportDTO.thisProcess != null and damageReportDTO.thisProcess != ''"> |
| | | and rw.this_process like concat('%', #{damageReportDTO.thisProcess}, '%') |
| | | </if> |
| | | <if test="damageReportDTO.creator != null and damageReportDTO.creator != ''"> |
| | | and rw.creator like concat('%', #{damageReportDTO.creator}, '%') |
| | | </if> |
| | | <if test="damageReportDTO.reportingWorkId != null and damageReportDTO.reportingWorkId != ''"> |
| | | and rw.reporting_work_id like concat('%', #{damageReportDTO.reportingWorkId}, '%') |
| | | </if> |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | |
| | | |
| | | <select id="teamOutputMp" resultMap="teamOutputMap"> |
| | | SELECT |
| | | * |
| | | t.*, |
| | | -- ç»çæ»å度ï¼mmï¼ |
| | | ( |
| | | SELECT SUM(CAST(REGEXP_SUBSTR(seg, '^[0-9]+') AS UNSIGNED)) |
| | | FROM JSON_TABLE( |
| | | CONCAT('["', REPLACE(t.workProcessName, '+', '","'), '"]'), |
| | | '$[*]' COLUMNS (seg VARCHAR(100) PATH '$') |
| | | ) jt |
| | | ) AS thicknessSum, |
| | | ROUND( |
| | | ( |
| | | SELECT SUM(CAST(REGEXP_SUBSTR(seg, '^[0-9]+') AS UNSIGNED)) |
| | | FROM JSON_TABLE( |
| | | CONCAT('["', REPLACE(t.workProcessName, '+', '","'), '"]'), |
| | | '$[*]' COLUMNS (seg VARCHAR(100) PATH '$') |
| | | ) jt2 |
| | | ) * t.area, |
| | | 2 |
| | | ) AS thicknessArea |
| | | FROM |
| | | ( |
| | | SELECT |
| | |
| | | <if test="teamOutputDTO.workProcessName != null and teamOutputDTO.workProcessName != ''"> |
| | | AND t.workProcessName REGEXP #{teamOutputDTO.workProcessName} |
| | | </if> |
| | | HAVING 1 = 1 |
| | | <if test="teamOutputDTO.thicknessSum != null and teamOutputDTO.thicknessSum != ''"> |
| | | AND thicknessSum REGEXP #{teamOutputDTO.thicknessSum} |
| | | </if> |
| | | ORDER BY |
| | | t.this_process, |
| | | t.process_id, |
| | |
| | | |
| | | <select id="teamOutputPageTotal"> |
| | | SELECT |
| | | CEILING(count(*)/#{pageSize}) as 'pageTotal', |
| | | count(*) as 'total' |
| | | FROM |
| | | CEILING(COUNT(*) / #{pageSize}) AS pageTotal, |
| | | COUNT(*) AS total |
| | | FROM ( |
| | | |
| | | SELECT |
| | | t.*, |
| | | |
| | | CASE |
| | | WHEN t.workProcessName IS NULL OR t.workProcessName = '' THEN 0 |
| | | ELSE ( |
| | | SELECT SUM(CAST(REGEXP_SUBSTR(seg, '^[0-9]+') AS UNSIGNED)) |
| | | FROM JSON_TABLE( |
| | | CONCAT('["', REPLACE(t.workProcessName, '+', '","'), '"]'), |
| | | '$[*]' COLUMNS (seg VARCHAR(100) PATH '$') |
| | | ) jt |
| | | ) |
| | | END AS thicknessSum, |
| | | CASE |
| | | WHEN t.workProcessName IS NULL OR t.workProcessName = '' THEN 0 |
| | | ELSE ROUND( |
| | | ( |
| | | SELECT SUM(CAST(REGEXP_SUBSTR(seg2, '^[0-9]+') AS UNSIGNED)) |
| | | FROM JSON_TABLE( |
| | | CONCAT('["', REPLACE(t.workProcessName, '+', '","'), '"]'), |
| | | '$[*]' COLUMNS (seg2 VARCHAR(100) PATH '$') |
| | | ) jt2 |
| | | ) * t.area, |
| | | 2 |
| | | ) |
| | | END AS thicknessArea |
| | | FROM ( |
| | | SELECT |
| | | rw.reporting_work_time, |
| | | rw.this_process, |
| | | rw.teams_groups_name, |
| | | o.project, |
| | | o.order_id, |
| | | rw.process_id, |
| | | fc.order_number, |
| | | MAX( ogd.child_width ) as width, |
| | | MAX( ogd.child_height ) as height, |
| | | MAX(ogd.child_width) AS width, |
| | | MAX(ogd.child_height) AS height, |
| | | od.edging_type, |
| | | rwd.completed_quantity as completed_quantity, |
| | | ROUND(MAX( ogd.child_width )*MAX( ogd.child_height )*rwd.completed_quantity/1000000,2) as area, |
| | | rwd.completed_quantity AS completed_quantity, |
| | | ROUND(MAX(ogd.child_width) * MAX(ogd.child_height) * rwd.completed_quantity / 1000000, 2) AS area, |
| | | od.product_name, |
| | | JSON_UNQUOTE( JSON_EXTRACT( od.other_columns, '$.S01' )) AS code |
| | | JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S01')) AS code, |
| | | rw.reviewed, |
| | | rw.examine_time, |
| | | rw.device_name, |
| | | o.order_type, |
| | | CASE |
| | | WHEN LOCATE('step', #{laminating}) > 0 THEN GROUP_CONCAT(ogd.glass_child SEPARATOR '+') |
| | | ELSE MAX(ogd.glass_child) |
| | | END AS workProcessName, |
| | | o.batch |
| | | FROM |
| | | pp.reporting_work as rw left join pp.reporting_work_detail as rwd on rwd.reporting_work_id=rw.reporting_work_id |
| | | left join pp.flow_card as fc on fc.order_id=rw.order_id and fc.process_id=rw.process_id and fc.order_number=rwd.order_number and fc.technology_number=rwd.technology_number |
| | | left join sd.order_glass_detail as ogd on ogd.order_id=fc.order_id and ogd.order_number=fc.order_number and ogd.technology_number=fc.technology_number |
| | | left join sd.order_detail as od on od.order_id=ogd.order_id and od.order_number=ogd.order_number |
| | | left join sd.`order` as o on o.order_id=od.order_id |
| | | where o.create_order>0 and rw.reviewed_state>=0 and rwd.completed_quantity>0 and |
| | | rw.reporting_work_time >= #{selectTime1} |
| | | pp.reporting_work AS rw |
| | | LEFT JOIN pp.reporting_work_detail AS rwd |
| | | ON rwd.reporting_work_id = rw.reporting_work_id |
| | | LEFT JOIN pp.flow_card AS fc |
| | | ON fc.order_id = rw.order_id |
| | | AND fc.process_id = rw.process_id |
| | | AND fc.order_number = rwd.order_number |
| | | AND fc.technology_number = rwd.technology_number |
| | | LEFT JOIN sd.order_glass_detail AS ogd |
| | | ON ogd.order_id = fc.order_id |
| | | AND ogd.order_number = fc.order_number |
| | | AND ogd.technology_number = fc.technology_number |
| | | LEFT JOIN sd.order_detail AS od |
| | | ON od.order_id = ogd.order_id |
| | | AND od.order_number = ogd.order_number |
| | | LEFT JOIN sd.`order` AS o |
| | | ON o.order_id = od.order_id |
| | | WHERE |
| | | o.create_order > 0 |
| | | AND rw.reviewed_state >= 0 |
| | | AND rwd.completed_quantity > 0 |
| | | AND rw.reporting_work_time >= #{selectTime1} |
| | | AND rw.reporting_work_time < #{selectTime2} |
| | | and position(#{selectProcesses} in rw.this_process) |
| | | <choose> |
| | | <!-- æä¼ å·¥åºï¼ç²¾ç¡®å¹é
--> |
| | | <when test="selectProcesses != null and selectProcesses != ''"> |
| | | AND rw.this_process = #{selectProcesses} |
| | | </when> |
| | | <!-- æªä¼ å·¥åºï¼ä¸å éå¶ --> |
| | | <otherwise> |
| | | </otherwise> |
| | | </choose> |
| | | <if test="teamOutputDTO.thisProcess != null and teamOutputDTO.thisProcess != ''"> |
| | | and rw.this_process regexp #{teamOutputDTO.thisProcess} |
| | | AND rw.this_process REGEXP #{teamOutputDTO.thisProcess} |
| | | </if> |
| | | <if test="teamOutputDTO.teamsGroupsName != null and teamOutputDTO.teamsGroupsName != ''"> |
| | | and rw.teams_groups_name like concat('%', #{teamOutputDTO.teamsGroupsName}, '%') |
| | | AND rw.teams_groups_name LIKE CONCAT('%', #{teamOutputDTO.teamsGroupsName}, '%') |
| | | </if> |
| | | <if test="teamOutputDTO.project != null and teamOutputDTO.project != ''"> |
| | | and o.project regexp #{teamOutputDTO.project} |
| | | AND o.project REGEXP #{teamOutputDTO.project} |
| | | </if> |
| | | <if test="teamOutputDTO.processId != null and teamOutputDTO.processId != ''"> |
| | | and rw.process_id regexp #{teamOutputDTO.processId} |
| | | AND rw.process_id REGEXP #{teamOutputDTO.processId} |
| | | </if> |
| | | <if test="teamOutputDTO.edgingType != null and teamOutputDTO.edgingType != ''"> |
| | | and od.edging_type regexp #{teamOutputDTO.edgingType} |
| | | AND od.edging_type REGEXP #{teamOutputDTO.edgingType} |
| | | </if> |
| | | <if test="teamOutputDTO.deviceName != null and teamOutputDTO.deviceName != ''"> |
| | | AND rw.device_name REGEXP #{teamOutputDTO.deviceName} |
| | | </if> |
| | | <if test="teamOutputDTO.batch != null and teamOutputDTO.batch != ''"> |
| | | AND o.batch REGEXP #{teamOutputDTO.batch} |
| | | </if> |
| | | |
| | | <choose> |
| | | <when test="laminating == ''"> |
| | | GROUP BY |
| | |
| | | rwd.order_number |
| | | </otherwise> |
| | | </choose> |
| | | ORDER BY |
| | | rw.this_process, |
| | | rw.process_id, |
| | | rwd.order_number, |
| | | rw.reporting_work_time, |
| | | rw.teams_groups_name |
| | | ) as page_toal |
| | | ) t |
| | | WHERE 1 = 1 |
| | | <if test="teamOutputDTO.workProcessName != null and teamOutputDTO.workProcessName != ''"> |
| | | AND t.workProcessName REGEXP #{teamOutputDTO.workProcessName} |
| | | </if> |
| | | ) x |
| | | WHERE 1 = 1 |
| | | <if test="teamOutputDTO.thicknessSum != null and teamOutputDTO.thicknessSum != ''"> |
| | | AND x.thicknessSum REGEXP #{teamOutputDTO.thicknessSum} |
| | | </if> |
| | | <if test="teamOutputDTO.thicknessArea != null and teamOutputDTO.thicknessArea != ''"> |
| | | AND x.thicknessArea REGEXP #{teamOutputDTO.thicknessArea} |
| | | </if> |
| | | limit #{offset},#{pageSize} |
| | | </select> |
| | | |
| | |
| | | <if test="terminationVals != '1' and terminationVals != 1"> |
| | | and fc.termination_status !=1 |
| | | </if> |
| | | <if test="workInProgressDTO.thisProcess != null and workInProgressDTO.thisProcess != ''"> |
| | | and d.process like concat('%', #{workInProgressDTO.thisProcess}, '%') |
| | | </if> |
| | | <if test="workInProgressDTO.customerName != null and workInProgressDTO.customerName != ''"> |
| | | and o.customer_name regexp #{workInProgressDTO.customerName} |
| | | and o.customer_name like concat('%', #{workInProgressDTO.customerName}, '%') |
| | | </if> |
| | | <if test="workInProgressDTO.project != null and workInProgressDTO.project != ''"> |
| | | and o.project regexp #{workInProgressDTO.project} |
| | | and o.project like concat('%', #{workInProgressDTO.project}, '%') |
| | | </if> |
| | | <if test="workInProgressDTO.orderId != null and workInProgressDTO.orderId != ''"> |
| | | and o.order_id regexp #{workInProgressDTO.orderId} |
| | | and o.order_id like concat('%', #{workInProgressDTO.orderId}, '%') |
| | | </if> |
| | | <if test="workInProgressDTO.batch != null and workInProgressDTO.batch != ''"> |
| | | and o.batch regexp #{workInProgressDTO.batch} |
| | | and o.batch like concat('%', #{workInProgressDTO.batch}, '%') |
| | | </if> |
| | | <if test="workInProgressDTO.processId != null and workInProgressDTO.processId != ''"> |
| | | and fc.process_id regexp #{workInProgressDTO.processId} |
| | | and fc.process_id like concat('%', #{workInProgressDTO.processId}, '%') |
| | | </if> |
| | | <if test="workInProgressDTO.orderNumber != null and workInProgressDTO.orderNumber != ''"> |
| | | and ogd.order_number regexp #{workInProgressDTO.orderNumber} |
| | | and ogd.order_number like concat('%', #{workInProgressDTO.orderNumber}, '%') |
| | | </if> |
| | | <if test="workInProgressDTO.technologyNumber != null and workInProgressDTO.technologyNumber != ''"> |
| | | and ogd.technology_number regexp #{workInProgressDTO.technologyNumber} |
| | | and ogd.technology_number like concat('%', #{workInProgressDTO.technologyNumber}, '%') |
| | | </if> |
| | | <if test="workInProgressDTO.quantity != null and workInProgressDTO.quantity != ''"> |
| | | and od.quantity like concat('%', #{workInProgressDTO.quantity}, '%') |
| | | </if> |
| | | <if test="workInProgressDTO.childWidth != null and workInProgressDTO.childWidth != ''"> |
| | | and ogd.child_width regexp REGEXP_REPLACE(#{workInProgressDTO.childWidth},'\\.0+$','') |
| | | </if> |
| | | <if test="workInProgressDTO.childHeight != null and workInProgressDTO.childHeight != ''"> |
| | | and ogd.child_height regexp REGEXP_REPLACE(#{workInProgressDTO.childHeight},'\\.0+$','') |
| | | </if> |
| | | <if test="workInProgressDTO.stockNum != null and workInProgressDTO.stockNum != ''"> |
| | | and (d.numCounts + d.patchNumSum - d.numCount -d.broken_num) like concat('%', #{workInProgressDTO.stockNum}, '%') |
| | | </if> |
| | | <if test="workInProgressDTO.stockArea != null and workInProgressDTO.stockArea != ''"> |
| | | and ROUND(ogd.child_width * ogd.child_height * (d.numCounts + d.patchNumSum - d.numCount - |
| | | d.broken_num) / 1000000, 2) regexp REGEXP_REPLACE(#{workInProgressDTO.stockArea},'\\.0+$','') |
| | | </if> |
| | | <if test="workInProgressDTO.glassNumber != null and workInProgressDTO.glassNumber != ''"> |
| | | and ifnull(JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S01')),'') regexp #{workInProgressDTO.glassNumber} |
| | | and ifnull(JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S01')),'') like concat('%', #{workInProgressDTO.glassNumber}, '%') |
| | | </if> |
| | | |
| | | group by fc.process_id, fc.order_number, fc.technology_number,d.process |
| | |
| | | AND rw.reporting_work_time <= #{selectTime2} |
| | | AND dd.available = 0 and rw.reviewed_state>=0 |
| | | <if test="damageReportDTO.orderId != null and damageReportDTO.orderId != ''"> |
| | | and o.order_id regexp #{damageReportDTO.orderId} |
| | | and o.order_id like concat('%', #{damageReportDTO.orderId}, '%') |
| | | </if> |
| | | <if test="damageReportDTO.project != null and damageReportDTO.project != ''"> |
| | | and o.project regexp #{damageReportDTO.project} |
| | | and o.project like concat('%', #{damageReportDTO.project}, '%') |
| | | </if> |
| | | <if test="damageReportDTO.processId != null and damageReportDTO.processId != ''"> |
| | | and rw.process_id regexp #{damageReportDTO.processId} |
| | | and rw.process_id like concat('%', #{damageReportDTO.processId}, '%') |
| | | </if> |
| | | <if test="damageReportDTO.orderNumber != null and damageReportDTO.orderNumber != ''"> |
| | | and dd.order_number regexp #{damageReportDTO.orderNumber} |
| | | and dd.order_number like concat('%', #{damageReportDTO.orderNumber}, '%') |
| | | </if> |
| | | <if test="damageReportDTO.technologyNumber != null and damageReportDTO.technologyNumber != ''"> |
| | | and dd.technology_number regexp #{damageReportDTO.technologyNumber} |
| | | and dd.technology_number like concat('%', #{damageReportDTO.technologyNumber}, '%') |
| | | </if> |
| | | <if test="damageReportDTO.responsibleProcess != null and damageReportDTO.responsibleProcess != ''"> |
| | | and dd.responsible_process regexp #{damageReportDTO.responsibleProcess} |
| | | and dd.responsible_process like concat('%', #{damageReportDTO.responsibleProcess}, '%') |
| | | </if> |
| | | <if test="damageReportDTO.responsibleTeam != null and damageReportDTO.responsibleTeam != ''"> |
| | | and dd.responsible_team regexp #{damageReportDTO.responsibleTeam} |
| | | and dd.responsible_team like concat('%', #{damageReportDTO.responsibleTeam}, '%') |
| | | </if> |
| | | <if test="damageReportDTO.responsibleEquipment != null and damageReportDTO.responsibleEquipment != ''"> |
| | | and dd.responsible_equipment regexp #{damageReportDTO.responsibleEquipment} |
| | | and dd.responsible_equipment like concat('%', #{damageReportDTO.responsibleEquipment}, '%') |
| | | </if> |
| | | <if test="damageReportDTO.breakageType != null and damageReportDTO.breakageType != ''"> |
| | | and dd.breakage_type regexp #{damageReportDTO.breakageType} |
| | | and dd.breakage_type like concat('%', #{damageReportDTO.breakageType}, '%') |
| | | </if> |
| | | <if test="damageReportDTO.breakageReason != null and damageReportDTO.breakageReason != ''"> |
| | | and dd.breakage_reason regexp #{damageReportDTO.breakageReason} |
| | | and dd.breakage_reason like concat('%', #{damageReportDTO.breakageReason}, '%') |
| | | </if> |
| | | <if test="damageReportDTO.glassChild != null and damageReportDTO.glassChild != ''"> |
| | | and ogd.glass_child regexp #{damageReportDTO.glassChild} |
| | | and ogd.glass_child like concat('%', #{damageReportDTO.glassChild}, '%') |
| | | </if> |
| | | <if test="damageReportDTO.glassNumber != null and damageReportDTO.glassNumber != ''"> |
| | | and ifnull(JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S01')),'') regexp #{damageReportDTO.glassNumber} |
| | | and ifnull(JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S01')),'') like concat('%', #{damageReportDTO.glassNumber}, '%') |
| | | </if> |
| | | <if test="damageReportDTO.thisProcess != null and damageReportDTO.thisProcess != ''"> |
| | | and rw.this_process like concat('%', #{damageReportDTO.thisProcess}, '%') |
| | | </if> |
| | | <if test="damageReportDTO.creator != null and damageReportDTO.creator != ''"> |
| | | and rw.creator like concat('%', #{damageReportDTO.creator}, '%') |
| | | </if> |
| | | <if test="damageReportDTO.reportingWorkId != null and damageReportDTO.reportingWorkId != ''"> |
| | | and rw.reporting_work_id like concat('%', #{damageReportDTO.reportingWorkId}, '%') |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="teamOutputFootSum"> |
| | | SELECT |
| | | SUM(completed_quantity) as completedQuantity, |
| | | ifnull(SUM(ROUND(width * height * completed_quantity / 1000000, 2)),0) AS area |
| | | FROM |
| | | -- æ°éå计 |
| | | SUM(x.completed_quantity) AS completedQuantity, |
| | | -- é¢ç§¯å计 |
| | | IFNULL(SUM(x.area), 0) AS area, |
| | | -- å度Ãé¢ç§¯å计 |
| | | IFNULL(SUM(x.thicknessArea), 0) AS thicknessArea |
| | | FROM ( |
| | | /* 第 2 å±ï¼å¨è¿éæ ¹æ® workProcessName è®¡ç® thicknessSum / thicknessArea */ |
| | | SELECT |
| | | t.*, |
| | | /* ç»çæ»å度ï¼åªåæ¯æ®µåé¢çæ°åç¸å */ |
| | | CASE |
| | | WHEN t.workProcessName IS NULL OR t.workProcessName = '' THEN 0 |
| | | ELSE ( |
| | | SELECT SUM(CAST(REGEXP_SUBSTR(seg, '^[0-9]+') AS UNSIGNED)) |
| | | FROM JSON_TABLE( |
| | | CAST(CONCAT('["', REPLACE(t.workProcessName, '+', '","'), '"]') AS JSON), |
| | | '$[*]' COLUMNS (seg VARCHAR(100) PATH '$') |
| | | ) jt |
| | | ) |
| | | END AS thicknessSum, |
| | | /* å度 à é¢ç§¯ */ |
| | | CASE |
| | | WHEN t.workProcessName IS NULL OR t.workProcessName = '' THEN 0 |
| | | ELSE ROUND( |
| | | ( |
| | | SELECT SUM(CAST(REGEXP_SUBSTR(seg2, '^[0-9]+') AS UNSIGNED)) |
| | | FROM JSON_TABLE( |
| | | CAST(CONCAT('["', REPLACE(t.workProcessName, '+', '","'), '"]') AS JSON), |
| | | '$[*]' COLUMNS (seg2 VARCHAR(100) PATH '$') |
| | | ) jt2 |
| | | ) * t.area, |
| | | 2 |
| | | ) |
| | | END AS thicknessArea |
| | | FROM ( |
| | | /* 第 1 å±ï¼åªè´è´£ç®å¥½ workProcessNameãarea çåºç¡å段 */ |
| | | SELECT |
| | | rw.reporting_work_time, |
| | | rw.this_process, |
| | |
| | | AND rw.this_process REGEXP #{teamOutputDTO.thisProcess} |
| | | </if> |
| | | <if test="teamOutputDTO.teamsGroupsName != null and teamOutputDTO.teamsGroupsName != ''"> |
| | | and rw.teams_groups_name like concat('%', #{teamOutputDTO.teamsGroupsName}, '%') |
| | | AND rw.teams_groups_name LIKE CONCAT('%', #{teamOutputDTO.teamsGroupsName}, '%') |
| | | </if> |
| | | <if test="teamOutputDTO.project != null and teamOutputDTO.project != ''"> |
| | | AND o.project REGEXP #{teamOutputDTO.project} |
| | |
| | | <if test="teamOutputDTO.workProcessName != null and teamOutputDTO.workProcessName != ''"> |
| | | AND t.workProcessName REGEXP #{teamOutputDTO.workProcessName} |
| | | </if> |
| | | ORDER BY |
| | | t.this_process, |
| | | t.process_id, |
| | | t.order_number, |
| | | t.reporting_work_time, |
| | | t.teams_groups_name |
| | | ) x |
| | | WHERE 1 = 1 |
| | | <if test="teamOutputDTO.thicknessSum != null and teamOutputDTO.thicknessSum != ''"> |
| | | AND x.thicknessSum REGEXP #{teamOutputDTO.thicknessSum} |
| | | </if> |
| | | <if test="teamOutputDTO.thicknessArea != null and teamOutputDTO.thicknessArea != ''"> |
| | | AND x.thicknessArea REGEXP #{teamOutputDTO.thicknessArea} |
| | | </if> |
| | | ; |
| | | |
| | | |
| | | </select> |
| | | |
| | | <select id="getLaminating"> |
| | |
| | | and fc.termination_status !=1 |
| | | </if> |
| | | <if test="workInProgressDTO.thisProcess != null and workInProgressDTO.thisProcess != ''"> |
| | | and d.process regexp #{workInProgressDTO.thisProcess} |
| | | and d.process like concat('%', #{workInProgressDTO.thisProcess}, '%') |
| | | </if> |
| | | <if test="workInProgressDTO.customerName != null and workInProgressDTO.customerName != ''"> |
| | | and o.customer_name regexp #{workInProgressDTO.customerName} |
| | | and o.customer_name like concat('%', #{workInProgressDTO.customerName}, '%') |
| | | </if> |
| | | <if test="workInProgressDTO.project != null and workInProgressDTO.project != ''"> |
| | | and o.project regexp #{workInProgressDTO.project} |
| | | and o.project like concat('%', #{workInProgressDTO.project}, '%') |
| | | </if> |
| | | <if test="workInProgressDTO.orderId != null and workInProgressDTO.orderId != ''"> |
| | | and o.order_id regexp #{workInProgressDTO.orderId} |
| | | and o.order_id like concat('%', #{workInProgressDTO.orderId}, '%') |
| | | </if> |
| | | <if test="workInProgressDTO.batch != null and workInProgressDTO.batch != ''"> |
| | | and o.batch regexp #{workInProgressDTO.batch} |
| | | and o.batch like concat('%', #{workInProgressDTO.batch}, '%') |
| | | </if> |
| | | <if test="workInProgressDTO.processId != null and workInProgressDTO.processId != ''"> |
| | | and fc.process_id regexp #{workInProgressDTO.processId} |
| | | and fc.process_id like concat('%', #{workInProgressDTO.processId}, '%') |
| | | </if> |
| | | <if test="workInProgressDTO.orderNumber != null and workInProgressDTO.orderNumber != ''"> |
| | | and ogd.order_number regexp #{workInProgressDTO.orderNumber} |
| | | and ogd.order_number like concat('%', #{workInProgressDTO.orderNumber}, '%') |
| | | </if> |
| | | <if test="workInProgressDTO.technologyNumber != null and workInProgressDTO.technologyNumber != ''"> |
| | | and ogd.technology_number regexp #{workInProgressDTO.technologyNumber} |
| | | and ogd.technology_number like concat('%', #{workInProgressDTO.technologyNumber}, '%') |
| | | </if> |
| | | <if test="workInProgressDTO.quantity != null and workInProgressDTO.quantity != ''"> |
| | | and od.quantity regexp #{workInProgressDTO.quantity} |
| | | and od.quantity like concat('%', #{workInProgressDTO.quantity}, '%') |
| | | </if> |
| | | <if test="workInProgressDTO.childWidth != null and workInProgressDTO.childWidth != ''"> |
| | | and ogd.child_width regexp #{workInProgressDTO.childWidth} |
| | | and ogd.child_width regexp REGEXP_REPLACE(#{workInProgressDTO.childWidth},'\\.0+$','') |
| | | </if> |
| | | <if test="workInProgressDTO.childHeight != null and workInProgressDTO.childHeight != ''"> |
| | | and ogd.child_height regexp #{workInProgressDTO.childHeight} |
| | | and ogd.child_height regexp REGEXP_REPLACE(#{workInProgressDTO.childHeight},'\\.0+$','') |
| | | </if> |
| | | <if test="workInProgressDTO.stockNum != null and workInProgressDTO.stockNum != ''"> |
| | | and (d.numCounts + d.patchNumSum - d.numCount -d.broken_num) regexp #{workInProgressDTO.stockNum} |
| | | and (d.numCounts + d.patchNumSum - d.numCount -d.broken_num) like concat('%', #{workInProgressDTO.stockNum}, '%') |
| | | </if> |
| | | <if test="workInProgressDTO.stockArea != null and workInProgressDTO.stockArea != ''"> |
| | | and ROUND(ogd.child_width * ogd.child_height * (d.numCounts + d.patchNumSum - d.numCount - |
| | | d.broken_num) / 1000000, 2) regexp #{workInProgressDTO.stockArea} |
| | | d.broken_num) / 1000000, 2) regexp REGEXP_REPLACE(#{workInProgressDTO.stockArea},'\\.0+$','') |
| | | </if> |
| | | <if test="workInProgressDTO.glassNumber != null and workInProgressDTO.glassNumber != ''"> |
| | | and ifnull(JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S01')),'') regexp #{workInProgressDTO.glassNumber} |
| | | and ifnull(JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S01')),'') like concat('%', #{workInProgressDTO.glassNumber}, '%') |
| | | </if> |
| | | <choose> |
| | | <when test="laminating != null and laminating == 'stepC'"> |
| | |
| | | and o.order_id regexp #{reportingWork.orderId} |
| | | </if> |
| | | <if test="reportingWork.processId != null and reportingWork.processId != ''"> |
| | | and rw.process_id regexp #{reportingWork.processId} |
| | | and CONCAT(rw.process_id,'/',rwd.goup) LIKE CONCAT('%', #{reportingWork.processId}, '%') |
| | | </if> |
| | | <if test="reportingWork.order.project != null and reportingWork.order.project != ''"> |
| | | and o.project regexp #{reportingWork.order.project} |
| | |
| | | and rw.device_name regexp #{reportingWork.deviceName} |
| | | </if> |
| | | <if test="reportingWork.teamsGroupsName != null and reportingWork.teamsGroupsName != ''"> |
| | | and rw.teams_groups_name regexp #{reportingWork.teamsGroupsName} |
| | | and rw.teams_groups_name like concat('%', #{reportingWork.teamsGroupsName}, '%') |
| | | </if> |
| | | </select> |
| | | |
| | |
| | | and r.rework_id regexp #{rework.reworkId} |
| | | </if> |
| | | <if test="rework.reworkTeam != null and rework.reworkTeam != ''"> |
| | | and r.rework_team regexp #{rework.reworkTeam} |
| | | and r.rework_team like concat('%', #{rework.reworkTeam}, '%') |
| | | </if> |
| | | <if test="rework.orderId != null and rework.orderId != ''"> |
| | | and r.order_id regexp #{rework.orderId} |
| | |
| | | and ogd.glass_address regexp #{rework.glassAddress} |
| | | </if> |
| | | <if test="rework.responsibleTeam != null and rework.responsibleTeam != ''"> |
| | | and r.responsible_team regexp #{rework.responsibleTeam} |
| | | and r.responsible_team like concat('%', #{rework.responsibleTeam}, '%') |
| | | </if> |
| | | <if test="rework.responsibleEquipment != null and rework.responsibleEquipment != ''"> |
| | | and r.responsible_equipment regexp #{rework.responsibleEquipment} |
| | |
| | | and r.rework_processes regexp #{rework.reworkProcesses} |
| | | </if> |
| | | <if test="rework.reviewer != null and rework.reviewer != ''"> |
| | | and r.reviewer regexp #{rework.reviewer} |
| | | and r.reviewer like concat('%', #{rework.reviewer}, '%') |
| | | </if> |
| | | </where> |
| | | order by r.review_status,r.id desc limit #{offset},#{pageSize}; |
| | |
| | | and r.rework_id regexp #{rework.reworkId} |
| | | </if> |
| | | <if test="rework.reworkTeam != null and rework.reworkTeam != ''"> |
| | | and r.rework_team regexp #{rework.reworkTeam} |
| | | and r.rework_team like concat('%', #{rework.reworkTeam}, '%') |
| | | </if> |
| | | <if test="rework.orderId != null and rework.orderId != ''"> |
| | | and r.order_id regexp #{rework.orderId} |
| | |
| | | and ogd.glass_address regexp #{rework.glassAddress} |
| | | </if> |
| | | <if test="rework.responsibleTeam != null and rework.responsibleTeam != ''"> |
| | | and r.responsible_team regexp #{rework.responsibleTeam} |
| | | and r.responsible_team like concat('%', #{rework.responsibleTeam}, '%') |
| | | </if> |
| | | <if test="rework.responsibleEquipment != null and rework.responsibleEquipment != ''"> |
| | | and r.responsible_equipment regexp #{rework.responsibleEquipment} |
| | |
| | | and r.rework_processes regexp #{rework.reworkProcesses} |
| | | </if> |
| | | <if test="rework.reviewer != null and rework.reviewer != ''"> |
| | | and r.reviewer regexp #{rework.reviewer} |
| | | and r.reviewer like concat('%', #{rework.reviewer}, '%') |
| | | </if> |
| | | </where> |
| | | ) as zu; |
| | |
| | | when 'stepD' then 4 |
| | | when 'stepB' then 4 |
| | | else 1 |
| | | end as sort, |
| | | end as sortByprocess, |
| | | b.sort as 'sort2' |
| | | |
| | | |
| | |
| | | group by opd.id) as a |
| | | GROUP BY process) as sort1 |
| | | on sort1.process = a.process |
| | | order by sort,sort2,sort1.count,id |
| | | order by sortByprocess,sort1.count,sort2,id |
| | | |
| | | </select> |
| | | |