Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override
| | |
| | | <script setup> |
| | | import {computed, onMounted, reactive, ref, watch} from "vue"; |
| | | import {addListener,destroyAreaBox} from "@/hook/mouseMoveHomePage"; |
| | | import {changeFilterEvent, filterChanged} from "@/hook" |
| | | import {useI18n} from "vue-i18n" |
| | | import request from "@/utils/request" |
| | | import {ElMessage} from "element-plus" |
| | | import VxeUI from "vxe-pc-ui"; |
| | | import {copyTableCellValue,copyTableCellValueShow} from "@/hook/copyTableCellValue"; |
| | | const { t } = useI18n() |
| | | const xGrid = ref() |
| | | const gridOptions = reactive({ |
| | |
| | | filterConfig: { //çéé
置项 |
| | | // remote: true |
| | | }, |
| | | mouseConfig:{selected: true}, |
| | | columnConfig: { |
| | | resizable: true, |
| | | useKey: true |
| | |
| | | ] |
| | | } |
| | | }) |
| | | const gridEvents = { |
| | | cellDblclick ({row,column}) { |
| | | if(orderType.value===1){ |
| | | copyTableCellValue(row,column) |
| | | }else{ |
| | | copyTableCellValueShow(row,column) |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | const list = ref([]) |
| | | |
| | | let props = defineProps({ |
| | |
| | | {field: 'glassQuantity', width: 90,title: t('order.glassQuantity')}, |
| | | {field: 'grossArea',slots: { default: 'show'}, width: 90,title: t('order.area')}, |
| | | {field: 'shippedQuantity',slots: { default: 'show'},width: 120, title: t('delivery.deliveryQuantity')}, |
| | | {field: 'inventory',slots: { default: 'show'},width: 120, title: t('productStock.inventoryQuantity')}, |
| | | {field: 'inventoryArea',slots: { default: 'show'},width: 120, title: t('report.inventoryArea')}, |
| | | {field: 'shippedArea',slots: { default: 'show'},width: 120, title: t('report.shippedArea')}, |
| | | {field: 'Storage',slots: { default: 'show'},width: 120, title: t('report.inventoryNum')}, |
| | | // {field: 'inventoryArea',slots: { default: 'show'},width: 120, title: t('report.inventoryArea')}, |
| | | {field: 'StorageArea',slots: { default: 'show'},width: 120, title: t('report.StorageArea')}, |
| | | {field: 'broken_num',width: 90, title: t('reportingWorks.quantityBroken')}, |
| | | ] |
| | |
| | | |
| | | onMounted(()=>{ |
| | | getWorkOrder() |
| | | //addListener(xGrid.value,gridOptions) |
| | | }) |
| | | |
| | | watch(()=>props.orderId,(newValue)=>{ |
| | |
| | | gridOptions.columns.forEach(item =>{ |
| | | item.filterMethod = filterChanged |
| | | }) |
| | | list.value = ['quantity','inventory','inventoryArea','gross_area','shippedQuantity','glassQuantity','StorageArea'] |
| | | list.value = ['quantity','Storage','gross_area','shippedQuantity','shippedArea','glassQuantity','StorageArea'] |
| | | title.value = res.data.title |
| | | res.data.title.forEach((item,index) =>{ |
| | | list.value.push('reportWorkQuantity.'+item.process) |
| | |
| | | class="mytable-scrollbar" |
| | | ref="xGrid" |
| | | v-bind="gridOptions" |
| | | v-on="gridEvents" |
| | | > |
| | | <template #num1_filter="{ column, $panel }"> |
| | | <div> |
| | |
| | | ::v-deep(.vxe-grid .vxe-body--column.row-green) { |
| | | background-color: #D5EAFF; |
| | | } |
| | | .vxe-grid { |
| | | /* ç¦ç¨æµè§å¨é»è®¤éä¸ */ |
| | | -webkit-user-select: none; |
| | | -moz-user-select: none; |
| | | -ms-user-select: none; |
| | | user-select: none; |
| | | transform: translateZ(0); |
| | | } |
| | | |
| | | </style> |
| New file |
| | |
| | | import VxeUI from "vxe-pc-ui"; |
| | | |
| | | function copyTableCellValueShow(row, column) { |
| | | if(column.field.indexOf('.')>-1){ |
| | | let array = column.field.split('.') |
| | | if (row[array[0]][array[1]+'Show']!==null){ |
| | | VxeUI.clipboard.copy(row[array[0]+'Show'][array[1]]) |
| | | } |
| | | |
| | | }else { |
| | | if (row[column.field+'Show']!==null){ |
| | | VxeUI.clipboard.copy(row[column.field+'Show']) |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | function copyTableCellValue(row, column) { |
| | | if(column.field.indexOf('.')>-1){ |
| | | let array = column.field.split('.') |
| | | if (row[array[0]][array[1]]!==null){ |
| | | VxeUI.clipboard.copy(row[array[0]][array[1]]) |
| | | } |
| | | |
| | | }else { |
| | | if (row[column.field]!==null){ |
| | | VxeUI.clipboard.copy(row[column.field]) |
| | | } |
| | | |
| | | } |
| | | } |
| | | export {copyTableCellValue,copyTableCellValueShow} |
| | |
| | | copy:'å¤å¶', |
| | | msg:{ |
| | | max255:'أدخ٠255 ØØ±ÙÙØ§ ÙØØ¯ Ø£ÙØµÙ', |
| | | max10:"æå¤è¾å
¥10个å符", |
| | | range99999Dec2: |
| | | 'ÙØ±Ø¬Ù إدخا٠رÙÙ
بÙÙ 0 Ù99999 Ø¨ØØ¯ Ø£ÙØµÙ رÙÙ
Ù٠عشرÙÙÙ', |
| | | range99999Dec3: |
| | |
| | | finished :'Ù
عد٠اÙÙ
ÙØªØ¬Ø§Øª اÙÙÙØ§Ø¦ÙØ©', |
| | | finishedProductReport :'ØªÙØ±Ùر اÙÙ
ÙØªØ¬Ø§Øª اÙÙÙØ§Ø¦ÙØ©', |
| | | workProcessName:'å¨å¶ååç§°', |
| | | StorageArea:'å
¥åºé¢ç§¯' |
| | | StorageArea:'å
¥åºé¢ç§¯', |
| | | shippedArea:'åè´§é¢ç§¯' |
| | | }, |
| | | productionBasicData:{ |
| | | page:{ |
| | |
| | | copy:'Copy', |
| | | msg:{ |
| | | max255:"The value contains a maximum of 255 characters", |
| | | max10:"æå¤è¾å
¥10个å符", |
| | | range99999Dec2: |
| | | "Please enter a number between 0 and 99999 with a maximum of two decimals", |
| | | range99999Dec3: |
| | |
| | | finished :'Rate of finished product', |
| | | finishedProductReport :'Finished product report', |
| | | workProcessName:'å¨å¶ååç§°', |
| | | StorageArea:'å
¥åºé¢ç§¯' |
| | | StorageArea:'å
¥åºé¢ç§¯', |
| | | shippedArea:'åè´§é¢ç§¯' |
| | | }, |
| | | productionBasicData:{ |
| | | page:{ |
| | |
| | | copy:'주문 ë³µì ', |
| | | msg:{ |
| | | max255:"ìµë 255ì ì
ë ¥ ê°ë¥", |
| | | max10:"æå¤è¾å
¥10个å符", |
| | | range99999Dec2: |
| | | "0ë¶í° 99,999ê¹ì§ì ì«ì ì
ë ¥. ììì ë째 ì리ê¹ì§ íì©", |
| | | range99999Dec3: |
| | |
| | | finished :'ìíë¥ ', |
| | | finishedProductReport :'ìì í ë³´ê³ ì', |
| | | workProcessName:'å¨å¶ååç§°', |
| | | StorageArea:'å
¥åºé¢ç§¯' |
| | | StorageArea:'å
¥åºé¢ç§¯', |
| | | shippedArea:'åè´§é¢ç§¯' |
| | | }, |
| | | productionBasicData:{ |
| | | page:{ |
| | |
| | | copy:'å¤å¶', |
| | | msg:{ |
| | | max255:"ÐведиÑе 255 Ñимволов.", |
| | | max10:"æå¤è¾å
¥10个å符", |
| | | range99999Dec2: |
| | | "ÐведиÑе ÑиÑло Ð¼ÐµÐ¶Ð´Ñ 0 - 99999 и ÑоÑ
ÑаниÑе до двÑÑ
деÑÑÑиÑнÑÑ
знаков.", |
| | | range99999Dec3: |
| | |
| | | finished :'ÐоÑÑÑиÑÐ¸ÐµÐ½Ñ Ð³Ð¾Ñовой пÑодÑкÑии', |
| | | finishedProductReport :'ÐÑÑÐµÑ Ð¾ гоÑовой пÑодÑкÑии', |
| | | workProcessName:'å¨å¶ååç§°', |
| | | StorageArea:'å
¥åºé¢ç§¯' |
| | | StorageArea:'å
¥åºé¢ç§¯', |
| | | shippedArea:'åè´§é¢ç§¯' |
| | | }, |
| | | productionBasicData:{ |
| | | page:{ |
| | |
| | | copy:'å¤å¶', |
| | | msg:{ |
| | | max255:"æå¤è¾å
¥255个å符", |
| | | max10:"æå¤è¾å
¥10个å符", |
| | | range99999Dec2: |
| | | "请è¾å
¥0-99999ä¹é´çæ°åï¼æå¤ä¿ç两ä½å°æ°", |
| | | range99999Dec3: |
| | |
| | | finished :'æåç', |
| | | finishedProductReport :'æåæ¥è¡¨', |
| | | workProcessName:'å¨å¶ååç§°', |
| | | StorageArea:'å
¥åºé¢ç§¯' |
| | | StorageArea:'å
¥åºé¢ç§¯', |
| | | shippedArea:'åè´§é¢ç§¯' |
| | | |
| | | }, |
| | | productionBasicData:{ |
| | |
| | | export default defineStore('companyInfo', { |
| | | |
| | | state: () => ({ |
| | | edgingType:false,//产ååå»ºç£¨è¾¹ç±»åæ¯å¦å¿
é |
| | | hollow:'*', |
| | | notChangeProduct:true,//天津trueï¼å
¶ä»falseï¼æ¯å¦å¼å¯éæ¬äººå建ç产åä¸è½ä¿®æ¹ |
| | | timeOut:false,//éåtrueï¼å
¶ä»falseï¼æ¯å¦å¼å¯è¶
æ¶æ¹åå¤éæ¡ç¶æ |
| | |
| | | export default defineStore('companyInfo', { |
| | | |
| | | state: () => ({ |
| | | edgingType:false,//产ååå»ºç£¨è¾¹ç±»åæ¯å¦å¿
é |
| | | hollow:'*', |
| | | notChangeProduct:false,//天津trueï¼å
¶ä»falseï¼æ¯å¦å¼å¯éæ¬äººå建ç产åä¸è½ä¿®æ¹ |
| | | timeOut:false,//éåtrueï¼å
¶ä»falseï¼æ¯å¦å¼å¯è¶
æ¶æ¹åå¤éæ¡ç¶æ |
| | |
| | | export default defineStore('companyInfo', { |
| | | |
| | | state: () => ({ |
| | | edgingType:false,//产ååå»ºç£¨è¾¹ç±»åæ¯å¦å¿
é |
| | | hollow:'*', |
| | | notChangeProduct:false,//天津trueï¼å
¶ä»falseï¼æ¯å¦å¼å¯éæ¬äººå建ç产åä¸è½ä¿®æ¹ |
| | | timeOut:false,//éåtrueï¼å
¶ä»falseï¼æ¯å¦å¼å¯è¶
æ¶æ¹åå¤éæ¡ç¶æ |
| | |
| | | export default defineStore('companyInfo', { |
| | | |
| | | state: () => ({ |
| | | hollow:'+', |
| | | edgingType:true,//产ååå»ºç£¨è¾¹ç±»åæ¯å¦å¿
é |
| | | hollow:'+',//产åå建ä¸ç©ºç¨+å·ææå· |
| | | notChangeProduct:false,//天津trueï¼å
¶ä»falseï¼æ¯å¦å¼å¯éæ¬äººå建ç产åä¸è½ä¿®æ¹ |
| | | timeOut:false,//éåtrueï¼å
¶ä»falseï¼æ¯å¦å¼å¯åè´§è¶
æ¶æ¹åå¤éæ¡ç¶æé¢è² |
| | | connectMes:false,//常å·,ä¹ä¹trueï¼å
¶ä»falseï¼æ¾ç¤ºè®¢åæ¥å·¥è½¬ç§»æ¯å¦å¯ç¨ |
| | |
| | | export default defineStore('companyInfo', { |
| | | |
| | | state: () => ({ |
| | | edgingType:false,//产ååå»ºç£¨è¾¹ç±»åæ¯å¦å¿
é |
| | | hollow:'*', |
| | | notChangeProduct:false,//天津trueï¼å
¶ä»falseï¼æ¯å¦å¼å¯éæ¬äººå建ç产åä¸è½ä¿®æ¹ |
| | | timeOut:true,//éåtrueï¼å
¶ä»falseï¼æ¯å¦å¼å¯åè´§è¶
æ¶æ¹åå¤éæ¡ç¶æé¢è² |
| | |
| | | adjustGrayRectangles(layoutIndex);
|
| | | };
|
| | |
|
| | | const mergeAdjacentGrayRects = (glassDetails,totalWidth,totalHeight) => {
|
| | | const mergeAdjacentGrayRects = (glassDetails, totalWidth, totalHeight) => {
|
| | | const grayRects = glassDetails.filter(r => r.isRemain);
|
| | | const grayRects2 = glassDetails.filter(r => r.isRemain);
|
| | | let merged = [];
|
| | | const nonGrayRects = glassDetails.filter(r => !r.isRemain);
|
| | |
|
| | | // æåæ æåºï¼ä¼å
æxåæ ï¼å
¶æ¬¡æyåæ
|
| | | grayRects.sort((a, b) => {
|
| | | if (a.x !== b.x) return a.x - b.x;
|
| | | return a.y - b.y;
|
| | |
| | |
|
| | | if (grayRects.length === 0) return;
|
| | |
|
| | | merged.push({ ...grayRects[0] });
|
| | | const merged = [];
|
| | |
|
| | | // ä»ç¬¬ä¸ä¸ªç©å½¢å¼å§
|
| | | let current = { ...grayRects[0] };
|
| | |
|
| | | // é忿使ç©å½¢è¿è¡åå¹¶
|
| | | for (let i = 1; i < grayRects.length; i++) {
|
| | | const last = merged[merged.length-1];
|
| | | const current = grayRects[i];
|
| | | const next = grayRects[i];
|
| | |
|
| | |
|
| | | if (current.x === last.x + last.width &&
|
| | | current.y === last.y &&
|
| | | current.height === last.height) {
|
| | | last.width += current.width;
|
| | | last.x = Math.round(last.x);
|
| | | last.y = Math.round(last.y);
|
| | | last.width = Math.round(last.width);
|
| | | last.height = Math.round(last.height);
|
| | | } else if (current.y === last.y + last.height &&
|
| | | current.x === last.x &&
|
| | | current.width === last.width) {
|
| | | last.height += current.height;
|
| | | last.x = Math.round(last.x);
|
| | | last.y = Math.round(last.y);
|
| | | last.width = Math.round(last.width);
|
| | | last.height = Math.round(last.height);
|
| | | } else {
|
| | | // æ£æ¥æ¯å¦å¯ä»¥æ°´å¹³åå¹¶ï¼åä¸è¡ï¼é«åº¦ç¸åï¼ç¸é»ï¼
|
| | | if (current.y === next.y &&
|
| | | current.height === next.height &&
|
| | | current.x + current.width === next.x) {
|
| | | // æ°´å¹³åå¹¶
|
| | | current.width += next.width;
|
| | | }
|
| | | // æ£æ¥æ¯å¦å¯ä»¥åç´åå¹¶ï¼åä¸åï¼å®½åº¦ç¸åï¼ç¸é»ï¼
|
| | | else if (current.x === next.x &&
|
| | | current.width === next.width &&
|
| | | current.y + current.height === next.y) {
|
| | | // åç´åå¹¶
|
| | | current.height += next.height;
|
| | | }
|
| | | else {
|
| | | // æ æ³åå¹¶ï¼ä¿åå½åç©å½¢ï¼å¼å§æ°çåå¹¶
|
| | | merged.push({
|
| | | x: Math.round(current.x),
|
| | | y: Math.round(current.y),
|
| | |
| | | height: Math.round(current.height),
|
| | | isRemain: true
|
| | | });
|
| | | current = { ...next };
|
| | | }
|
| | | }
|
| | |
|
| | | const nonGray = glassDetails.filter(r => !r.isRemain);
|
| | | //å é¤åæ°ç»æ¼æ¥æ°çå°çè·ä½æ
|
| | | glassDetails.splice(0, glassDetails.length, ...nonGray, ...merged);
|
| | | // éæ°æå»ºæ°ç»ï¼é使 + åå¹¶åç使
|
| | | glassDetails.splice(0, glassDetails.length, ...nonGrayRects, ...merged);
|
| | | };
|
| | |
|
| | | // ç¡®ä¿è¿åçåºåä¸éå
|
| | | const calculateRemainingAreas = (totalWidth, totalHeight, obstacles) => {
|
| | | // 仿´ä¸ªåçå¼å§
|
| | | let remaining = [{ x: 0, y: 0, width: totalWidth, height: totalHeight }];
|
| | |
|
| | | // é个å¤çéç¢ç©ï¼å·²æ¾ç½®çç»ççï¼
|
| | | obstacles.forEach(obstacle => {
|
| | | remaining = cutRemainingAreas(remaining, obstacle, totalWidth, totalHeight);
|
| | | });
|
| | |
|
| | | // å¯¹ç»æè¿è¡æåºï¼ç¡®ä¿ä¸è´æ§
|
| | | remaining.sort((a, b) => {
|
| | | if (a.x !== b.x) return a.x - b.x;
|
| | | return a.y - b.y;
|
| | | });
|
| | |
|
| | | return remaining;
|
| | | };
|
| | |
|
| | |
|
| | | // è°æ´åéæ°è®¡ç®ç°è²ä½æ
|
| | | const adjustGrayRectangles = (layoutIndex) => {
|
| | | const layout = layouts.value[layoutIndex];
|
| | | const glassDetails = layout.glassDetails;
|
| | | //å°ççæ°æ®
|
| | |
|
| | | // 1. çéåºé使çç»ççï¼å³å®é
è¦åå²çç»ççï¼
|
| | | const nonGrayRects = glassDetails.filter(glassDetail => !glassDetail.isRemain);
|
| | |
|
| | | //ææçå°çä½æåæ è·å°ºå¯¸
|
| | | // 2. 计ç®å©ä½å¯ç¨åºå
|
| | | let remainingAreas = calculateRemainingAreas(layout.width, layout.height, nonGrayRects);
|
| | | const uniqueArr = Array.from(
|
| | | new Set(remainingAreas.map(item => JSON.stringify(item)))
|
| | | ).map(item => JSON.parse(item));
|
| | | //ä½æçæ°æ®
|
| | |
|
| | | // 3. å»éå¤ç - æ´ä¸¥æ ¼çå»éé»è¾
|
| | | const uniqueArr = removeDuplicateAreas(remainingAreas);
|
| | |
|
| | | // 4. è·åå½åå·²åå¨ç使ç©å½¢ï¼éè¦ä¿çå¼ç¨ä»¥ä¾¿æ´æ°ï¼
|
| | | const currentGrayRects = glassDetails.filter(r => r.isRemain);
|
| | | //循ç¯ä½ææ°æ®è·å
¨é¨ç对æ¯
|
| | | currentGrayRects.forEach((_, index) => {
|
| | | if (index >= remainingAreas.length) {
|
| | | glassDetails.splice(index, 1);
|
| | | }
|
| | |
|
| | | // 5. æ¸
餿æç°æç使ç©å½¢
|
| | | // å
æ¶éé使ç©å½¢
|
| | | const nonRemainRects = glassDetails.filter(r => !r.isRemain);
|
| | |
|
| | | // 6. éæ°æå»ºç»ç详æ
æ°ç»
|
| | | // ä¿çé使ç©å½¢
|
| | | const newGlassDetails = [...nonRemainRects];
|
| | |
|
| | | // æ·»å æ°ç使ç©å½¢
|
| | | uniqueArr.forEach((area) => {
|
| | | newGlassDetails.push({
|
| | | x: Math.round(area.x),
|
| | | y: Math.round(area.y),
|
| | | width: Math.round(area.width),
|
| | | height: Math.round(area.height),
|
| | | isRemain: true
|
| | | });
|
| | | });
|
| | |
|
| | | uniqueArr.forEach((area, index) => {
|
| | | if (index < currentGrayRects.length) {
|
| | | currentGrayRects[index].x = Math.round(area.x);
|
| | | currentGrayRects[index].y = Math.round(area.y);
|
| | | currentGrayRects[index].width = Math.round(area.width);
|
| | | currentGrayRects[index].height = Math.round(area.height);
|
| | | } else {
|
| | | glassDetails.push({
|
| | | x: Math.round(area.x),
|
| | | y: Math.round(area.y),
|
| | | width: Math.round(area.width),
|
| | | height: Math.round(area.height),
|
| | | isRemain: true
|
| | | });
|
| | | }
|
| | | });
|
| | | // 7. æ´æ°å¸å±çç»ç详æ
|
| | | layout.glassDetails = newGlassDetails;
|
| | |
|
| | | mergeAdjacentGrayRects(glassDetails,layout.width, layout.height);
|
| | | // 8. åå¹¶ç¸é»ç使ç©å½¢
|
| | | mergeAdjacentGrayRects(layout.glassDetails, layout.width, layout.height);
|
| | | };
|
| | |
|
| | |
|
| | | const removeDuplicateAreas = (areas) => {
|
| | | const result = [];
|
| | |
|
| | | areas.forEach(area => {
|
| | | // æ£æ¥æ¯å¦ä¸å·²åå¨çåºåéå æç¸ç
|
| | | const isDuplicate = result.some(existingArea => {
|
| | | return (
|
| | | existingArea.x === area.x &&
|
| | | existingArea.y === area.y &&
|
| | | existingArea.width === area.width &&
|
| | | existingArea.height === area.height
|
| | | );
|
| | | });
|
| | |
|
| | | if (!isDuplicate) {
|
| | | result.push(area);
|
| | | }
|
| | | });
|
| | |
|
| | | return result;
|
| | | };
|
| | |
|
| | |
|
| | |
|
| | | //æè½¬æ¹æ³
|
| | | const rotateRect = (layoutIndex, rectIndex) => {
|
| | |
| | | };
|
| | |
|
| | | //éæ°è®¡ç®ä½æåæ 以å尺寸1
|
| | | const calculateRemainingAreas = (totalWidth, totalHeight, obstacles) => {
|
| | | let remaining = [{ x: 0, y: 0, width: totalWidth, height: totalHeight }];
|
| | | obstacles.forEach(glassDetail => {
|
| | | remaining = cutRemainingAreas(remaining, glassDetail,totalWidth,totalHeight);
|
| | | });
|
| | | return remaining;
|
| | | };
|
| | | // const calculateRemainingAreas = (totalWidth, totalHeight, obstacles) => {
|
| | | // let remaining = [{ x: 0, y: 0, width: totalWidth, height: totalHeight }];
|
| | | // obstacles.forEach(glassDetail => {
|
| | | // remaining = cutRemainingAreas(remaining, glassDetail,totalWidth,totalHeight);
|
| | | // });
|
| | | // return remaining;
|
| | | // };
|
| | |
|
| | | //éæ°è®¡ç®ä½æåæ 以å尺寸2
|
| | | const cutRemainingAreas = (remainingAreas, obstacle,totalWidth,totalHeight) => {
|
| | | const cutRemainingAreas = (remainingAreas, obstacle, totalWidth, totalHeight) => {
|
| | | const newRemaining = [];
|
| | |
|
| | | remainingAreas.forEach(area => {
|
| | | // 妿éç¢ç©ä¸å½ååºåæéå
|
| | | if (checkOverlap(area, obstacle)) {
|
| | | // ååå½ååºå为æå¤4个æ°åºå
|
| | |
|
| | | // 左侧åºå
|
| | | if (obstacle.x > area.x) {
|
| | | newRemaining.push({
|
| | | x: area.x,
|
| | |
| | | height: area.height
|
| | | });
|
| | | }
|
| | |
|
| | | // å³ä¾§åºå
|
| | | if (obstacle.x + obstacle.width < area.x + area.width) {
|
| | | newRemaining.push({
|
| | | x: obstacle.x + obstacle.width,
|
| | | y: area.y,
|
| | | width: area.width - (obstacle.x + obstacle.width - area.x),
|
| | | width: area.x + area.width - (obstacle.x + obstacle.width),
|
| | | height: area.height
|
| | | });
|
| | | }
|
| | | if (obstacle.y > area.y) {
|
| | | newRemaining.push({
|
| | | x: area.x,
|
| | | y: area.y,
|
| | | width: area.width,
|
| | | height: obstacle.y - area.y
|
| | | });
|
| | | }
|
| | | if (obstacle.y + obstacle.height < area.y + area.height ) {
|
| | | newRemaining.push({
|
| | | x: area.x,
|
| | | y: obstacle.y + obstacle.height,
|
| | | width: area.width,
|
| | | height: area.height - (obstacle.y + obstacle.height - area.y)
|
| | | });
|
| | |
|
| | | // 䏿¹åºåï¼ä»
å¨éç¢ç©å·¦å³è¾¹çä¹é´çåºåï¼
|
| | | if (obstacle.y > area.y) {
|
| | | const startX = Math.max(area.x, obstacle.x);
|
| | | const endX = Math.min(area.x + area.width, obstacle.x + obstacle.width);
|
| | | if (endX > startX) {
|
| | | newRemaining.push({
|
| | | x: startX,
|
| | | y: area.y,
|
| | | width: endX - startX,
|
| | | height: obstacle.y - area.y
|
| | | });
|
| | | }
|
| | | }
|
| | |
|
| | | // 䏿¹åºåï¼ä»
å¨éç¢ç©å·¦å³è¾¹çä¹é´çåºåï¼
|
| | | if (obstacle.y + obstacle.height < area.y + area.height) {
|
| | | const startX = Math.max(area.x, obstacle.x);
|
| | | const endX = Math.min(area.x + area.width, obstacle.x + obstacle.width);
|
| | | if (endX > startX) {
|
| | | newRemaining.push({
|
| | | x: startX,
|
| | | y: obstacle.y + obstacle.height,
|
| | | width: endX - startX,
|
| | | height: area.y + area.height - (obstacle.y + obstacle.height)
|
| | | });
|
| | | }
|
| | | }
|
| | | } else {
|
| | | // 没æéå ï¼ä¿çååºå
|
| | | newRemaining.push(area);
|
| | | }
|
| | | });
|
| | |
|
| | | return newRemaining;
|
| | | };
|
| | |
|
| | |
| | | //ç¹å»æ¥è¯¢ |
| | | const getWorkOrder = () => { |
| | | gridOptions.columns = gridOptions.columns.slice(0, 11); //æ¸
é¤å¨æçæçåéæ°æ¥è¯¢ |
| | | request.post(`/report/processCardProgress/${form.orderId}`, column).then((res) => { |
| | | request.post(`/report/processCardProgressReport/${form.orderId}`, column).then((res) => { |
| | | if (res.code == 200) { |
| | | if (res.data.data.length === 0) { |
| | | ElMessage.warning(t('report.noDataFoundForThisOrder')) |
| | |
| | | id="print" |
| | | v-model="dialogTableVisible" |
| | | destroy-on-close |
| | | style="width: 40%;height:40%;" |
| | | style="width: 400px;height:280px;margin-top: 200px" |
| | | :close-on-click-modal="false" |
| | | :close-on-press-escape="false" |
| | | > |
| | | <el-form |
| | | ref="ruleFormRef" |
| | | style="max-width: 600px" |
| | | style="max-width: 600px;" |
| | | :model="ruleForm" |
| | | status-icon |
| | | :rules="rules" |
| | |
| | | </el-form-item> |
| | | |
| | | <el-form-item> |
| | | <el-button type="primary" @click="submitForm(ruleFormRef)"> |
| | | <el-button style="margin-left: 235px" @click="resetForm(ruleFormRef)">éç½®</el-button> |
| | | <el-button style="float: right" type="primary" @click="submitForm(ruleFormRef)"> |
| | | æäº¤ |
| | | </el-button> |
| | | <el-button @click="resetForm(ruleFormRef)">éç½®</el-button> |
| | | |
| | | </el-form-item> |
| | | </el-form> |
| | | |
| | |
| | | id="print" |
| | | v-model="dialogTableVisible" |
| | | destroy-on-close |
| | | style="width: 90%;height:90%;margin-top: 3vh " |
| | | style="width: 600px;height: 600px" |
| | | :close-on-click-modal="false" |
| | | :close-on-press-escape="false" |
| | | > |
| | | <el-card style="max-width: 480px"> |
| | | <template #header> |
| | | <div class="card-header"> |
| | | <span>产å1</span> |
| | | </div> |
| | | </template> |
| | | <p v-for="o in 4" :key="o" class="text item">{{ 'ç¨æ ' + o +":xxå
" }}</p> |
| | | <template #footer>å计xxå
</template> |
| | | </el-card> |
| | | <el-card style="max-width: 480px;margin-left: 45px"> |
| | | <template #header> |
| | | <div class="card-header"> |
| | | <span style="font-weight: bold">æåå计</span> |
| | |       |
| | | <span>é¢ç§¯ï¼1312.48ã¡</span> |
| | |       |
| | | <span>æ°éï¼200</span> |
| | |       |
| | | <span>å¨é¿ï¼5325.7m</span> |
| | | </div> |
| | | </template> |
| | | <el-row > |
| | | <el-col :span="8">6mmè¶
ç½ï¼</el-col> |
| | | <el-col :span="8">3149.72ã¡</el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="8">8mmè¶
ç½ï¼</el-col> |
| | | <el-col :span="8">787.72ã¡</el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="8">éæ¡ï¼</el-col> |
| | | <el-col :span="8">2662.85m</el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="8">0.76PVBï¼</el-col> |
| | | <el-col :span="8">1706.22ã¡</el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="8">å
¶ä»ï¼</el-col> |
| | | <el-col :span="8">5</el-col> |
| | | </el-row> |
| | | </el-card> |
| | | |
| | | |
| | | <el-card style="max-width: 480px;margin-left: 45px;margin-top: 20px"> |
| | | <template #header> |
| | | <div class="card-header"> |
| | | <span style="font-weight: bold">6mmè¶
ç½é¢å+12A+6mmè¶
ç½é¢å+0.76PVB+6mmè¶
ç½é¢å</span> |
| | | <br/> |
| | | <span>é¢ç§¯ï¼656.24ã¡</span> |
| | |       |
| | | <span>æ°éï¼100</span> |
| | |       |
| | | <span>å¨é¿ï¼2662.85m</span> |
| | | </div> |
| | | </template> |
| | | <el-row > |
| | | <el-col :span="8">6mmè¶
ç½ï¼</el-col> |
| | | <el-col :span="8">2362.464ã¡</el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="8">éæ¡ï¼</el-col> |
| | | <el-col :span="8">2662.85m</el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="8">0.76PVBï¼</el-col> |
| | | <el-col :span="8">853.11ã¡</el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="8">å
¶ä»ï¼</el-col> |
| | | <el-col :span="8">5</el-col> |
| | | </el-row> |
| | | |
| | | <!-- <template #footer>å计xxå
</template>--> |
| | | </el-card> |
| | | |
| | | <el-card style="max-width: 480px;margin-left: 45px;margin-top: 20px"> |
| | | <template #header> |
| | | <div class="card-header"> |
| | | <span style="font-weight: bold">8mmè¶
ç½é¢å+0.76PVB+6mmè¶
ç½é¢å</span> |
| | | <br/> |
| | | <span>é¢ç§¯ï¼656.24ã¡</span> |
| | |       |
| | | <span>æ°éï¼100</span> |
| | |       |
| | | <span>å¨é¿ï¼2662.85m</span> |
| | | </div> |
| | | </template> |
| | | <el-row > |
| | | <el-col :span="8">6mmè¶
ç½ï¼</el-col> |
| | | <el-col :span="8">787.72ã¡</el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="8">8mmè¶
ç½ï¼</el-col> |
| | | <el-col :span="8">787.72ã¡</el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="8">0.76PVBï¼</el-col> |
| | | <el-col :span="8">853.11ã¡</el-col> |
| | | </el-row> |
| | | |
| | | <!-- <template #footer>å计xxå
</template>--> |
| | | </el-card> |
| | | </el-dialog> |
| | | |
| | | |
| | |
| | | background-color: orangered; |
| | | border-color: orangered; |
| | | } |
| | | |
| | | .el-row{ |
| | | text-align: center |
| | | } |
| | | |
| | | </style> |
| | |
| | | ], |
| | | //表åéªè¯ |
| | | editRules: { |
| | | edgingType: [ |
| | | { required: company.edgingType}, |
| | | { min: 0, max: 10, message: t('basicData.msg.max10') } |
| | | ], |
| | | buildingNumber: [ |
| | | { required: false}, |
| | | { min: 0, max: 255, message: t('basicData.msg.max255') } |
| | |
| | | } |
| | | |
| | | //æµç¨å¡è¿åº¦ |
| | | @ApiOperation("æµç¨å¡è¿åº¦") |
| | | @ApiOperation("è®¢åæµç¨å¡è¿åº¦") |
| | | @PostMapping("/processCardProgress/{orderId}") |
| | | public Result processCardProgress(@PathVariable String orderId, @RequestBody List<Integer> columns) { |
| | | return Result.seccess(reportService.processCardProgressSv(orderId, columns)); |
| | | } |
| | | @ApiOperation("æ¥è¡¨æµç¨å¡è¿åº¦") |
| | | @PostMapping("/processCardProgressReport/{orderId}") |
| | | public Result processCardProgressReport(@PathVariable String orderId, @RequestBody List<Integer> columns) { |
| | | return Result.seccess(reportService.processCardProgressReportSv(orderId, columns)); |
| | | } |
| | | @ApiOperation("æµç¨å¡è¿åº¦æ±æ»") |
| | | @SaCheckPermission("selectOrder.search") |
| | | @PostMapping("/processCardProgressCollect/{orderId}") |
| | |
| | | |
| | | List<Map<String, String>> processCardProgressCollectMp(String orderId); |
| | | |
| | | List<Map<String, String>> processCardProgressReportMp(String orderId); |
| | | |
| | | |
| | | // Map<String, Integer> getWorkInProgressTotal( |
| | | // @Param("selectTime1") Date selectTime1, @Param("selectTime2") Date selectTime2, |
| | |
| | | .eq("basic_name",uniqueList.get(i).get("process")) |
| | | .last("limit 1") |
| | | ); |
| | | //å¤æç£¨è¾¹å磨边åå·¥åº |
| | | //夿夹è¶å夹è¶åå·¥åº |
| | | //Objects.equals(basicData.getNickname(), "stepA") || Objects.equals(basicData.getNickname(), "stepC") |
| | | if(Objects.equals(basicData.getNickname(), "stepA") || Objects.equals(basicData.getNickname(), "stepC")){ |
| | | clos.put(uniqueList.get(i).get("process"), 16+i); |
| | |
| | | //夿ä¸ç©ºåä¸ç©ºåå·¥åº |
| | | //Objects.equals(basicData.getNickname(), "stepB") || Objects.equals(basicData.getNickname(), "stepD") |
| | | if(Objects.equals(basicData.getNickname(), "stepB") || Objects.equals(basicData.getNickname(), "stepD")){ |
| | | columns.add(15+i); |
| | | columns.add(16+i); |
| | | } |
| | | } |
| | | |
| | |
| | | rowCount.add(getRow); |
| | | }); |
| | | }); |
| | | if(!clos.isEmpty()){ |
| | | //循ç¯ç»æ |
| | | for (int i=0;i<dataList.size();i++ ) { |
| | | Map<String, String> data = JSON.parseObject(dataList.get(i).get("reportWorkQuantity"), |
| | | new TypeReference<Map<String, String>>() { |
| | | }); |
| | | Map<String, String> dataShow = JSON.parseObject(dataList.get(i).get("reportWorkQuantityShow"), |
| | | new TypeReference<Map<String, String>>() { |
| | | }); |
| | | //夿åå·¥åºæ¤æµç¨å¡å·æ¯å¦ææ¬¡ç ´ |
| | | List<DamageDetails> hasBreak = damageDetailsMapper |
| | | .selectList(new LambdaQueryWrapper<DamageDetails>() |
| | | .eq(DamageDetails::getProcessId, dataList.get(i).get("processId")) |
| | | .eq(DamageDetails::getOrderNumber, dataList.get(i).get("order_number")) |
| | | .eq(DamageDetails::getTechnologyNumber, dataList.get(i).get("technology_number")) |
| | | .eq(DamageDetails::getPatchStatus, 0) |
| | | .gt(DamageDetails::getBreakageQuantity,0) |
| | | |
| | | ); |
| | | if(!hasBreak.isEmpty()){ |
| | | int finalI = i; |
| | | data.forEach((thisProcess, index)->{ |
| | | String behindProcess = orderProcessDetailMapper.getBehindProcess( |
| | | //循ç¯ç»æ |
| | | for (int i=0;i<dataList.size();i++ ) { |
| | | Map<String, String> data = JSON.parseObject(dataList.get(i).get("reportWorkQuantity"), |
| | | new TypeReference<Map<String, String>>() { |
| | | }); |
| | | Map<String, String> dataShow = JSON.parseObject(dataList.get(i).get("reportWorkQuantityShow"), |
| | | new TypeReference<Map<String, String>>() { |
| | | }); |
| | | //夿åå·¥åºæ¤æµç¨å¡å·æ¯å¦ææ¬¡ç ´ |
| | | List<DamageDetails> hasBreak = damageDetailsMapper |
| | | .selectList(new LambdaQueryWrapper<DamageDetails>() |
| | | .eq(DamageDetails::getProcessId, dataList.get(i).get("processId")) |
| | | .eq(DamageDetails::getOrderNumber, dataList.get(i).get("order_number")) |
| | | .eq(DamageDetails::getTechnologyNumber, dataList.get(i).get("technology_number")) |
| | | .eq(DamageDetails::getPatchStatus, 0) |
| | | .gt(DamageDetails::getBreakageQuantity,0) |
| | | |
| | | ); |
| | | if(!hasBreak.isEmpty()){ |
| | | int finalI = i; |
| | | data.forEach((thisProcess, index)->{ |
| | | String behindProcess = orderProcessDetailMapper.getBehindProcess( |
| | | dataList.get(finalI).get("processId"), |
| | | String.valueOf(dataList.get(finalI).get("order_number")), |
| | | String.valueOf(dataList.get(finalI).get("technology_number")), |
| | | thisProcess, |
| | | orderId |
| | | ); |
| | | if(behindProcess!=null &&!behindProcess.isEmpty()){ |
| | | Integer behindDamageSum = damageDetailsMapper.getBehindDamageSum( |
| | | dataList.get(finalI).get("processId"), |
| | | String.valueOf(dataList.get(finalI).get("order_number")), |
| | | String.valueOf(dataList.get(finalI).get("technology_number")), |
| | | thisProcess, |
| | | orderId |
| | | behindProcess |
| | | ); |
| | | if(behindProcess!=null &&!behindProcess.isEmpty()){ |
| | | Integer behindDamageSum = damageDetailsMapper.getBehindDamageSum( |
| | | dataList.get(finalI).get("processId"), |
| | | String.valueOf(dataList.get(finalI).get("order_number")), |
| | | String.valueOf(dataList.get(finalI).get("technology_number")), |
| | | behindProcess |
| | | ); |
| | | if(behindDamageSum>0){ |
| | | data.put(thisProcess, String.valueOf(Integer.parseInt(data.get(thisProcess) )- behindDamageSum)); |
| | | dataShow.put(thisProcess, String.valueOf(Integer.parseInt(dataShow.get(thisProcess) )- behindDamageSum)); |
| | | } |
| | | |
| | | if(behindDamageSum>0){ |
| | | data.put(thisProcess, String.valueOf(Integer.parseInt(data.get(thisProcess) )- behindDamageSum)); |
| | | dataShow.put(thisProcess, String.valueOf(Integer.parseInt(dataShow.get(thisProcess) )- behindDamageSum)); |
| | | } |
| | | }); |
| | | |
| | | } |
| | | } |
| | | }); |
| | | |
| | | } |
| | | |
| | | if(!clos.isEmpty()){ |
| | | |
| | | Integer max = orderGlassDetailMapper |
| | | .getMaxTechnologyNumberByGroup(dataList.get(i).get("order_id"), |
| | |
| | | String.valueOf(dataList.get(i).get("order_number")), |
| | | String.valueOf(dataList.get(i).get("group")) |
| | | ); |
| | | |
| | | for (String key : clos.keySet()) { |
| | | if(data.get(key) != null){ |
| | | |
| | |
| | | |
| | | } |
| | | } |
| | | dataList.get(i).put("reportWorkQuantity",JSON.toJSONString(data)); |
| | | dataList.get(i).put("reportWorkQuantityShow",JSON.toJSONString(dataShow)); |
| | | |
| | | } |
| | | dataList.get(i).put("reportWorkQuantity",JSON.toJSONString(data)); |
| | | dataList.get(i).put("reportWorkQuantityShow",JSON.toJSONString(dataShow)); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | |
| | | map.put("title", uniqueList); |
| | | return null; |
| | | } |
| | | |
| | | public Map<String, Object> processCardProgressReportSv(String orderId, List<Integer> columns) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | //è·åè¡¨æ ¼å
å®¹æ°æ® |
| | | map.put("data", reportMapper.processCardProgressReportMp(orderId)); |
| | | |
| | | //è·å表头工åºçéæ°æ® |
| | | List<Map<String, String>> processFilterList = orderProcessDetailMapper.filterOrderProcess(orderId); |
| | | List<Map<String, String>> processList = processFilterList; |
| | | |
| | | List<String> filterList = new ArrayList<>(); |
| | | //循ç¯éåæ°ç»ï¼å¤ææ¤åºå·å½åçå·¥åº |
| | | for (int i = 1; i < processFilterList.size(); i++) { |
| | | filterList.add(processFilterList.get(i).get("process")); |
| | | List<Map<String, String>> lastProcessList = |
| | | orderProcessDetailMapper.filterLastProcess( |
| | | orderId, |
| | | String.valueOf(processFilterList.get(i).get("order_number")), |
| | | String.valueOf(processFilterList.get(i).get("technology_number")), |
| | | String.valueOf(processFilterList.get(i).get("id")) |
| | | ); |
| | | if (!lastProcessList.isEmpty()) { |
| | | int finalI = i; |
| | | lastProcessList.forEach(lastProcess -> { |
| | | if (filterList.contains(lastProcess.get("process"))) { |
| | | processList.add(lastProcess); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | } |
| | | // 使ç¨HashSetæ¥è®°å½å·²ç»éå°çvalueå¼ |
| | | Set<String> seenValues = new HashSet<>(); |
| | | // å建ä¸ä¸ªæ°çListæ¥åå¨ç»æ |
| | | List<Map<String, String>> uniqueList = new ArrayList<>(); |
| | | |
| | | // ååéååå§List |
| | | for (int i = processList.size() - 1; i >= 0; i--) { |
| | | Map<String, String> maps = processList.get(i); |
| | | String value = maps.values().iterator().next(); // å设æ¯ä¸ªMapåªæä¸ä¸ªvalue |
| | | |
| | | // 妿valueè¿æ²¡æè¢«çå°è¿ï¼å°±æ·»å å°ç»æListåHashSetä¸ |
| | | if (!seenValues.contains(value)) { |
| | | uniqueList.add(0, maps); // æ·»å å°ç»æListçå¼å¤´ï¼ä»¥ä¿æåé¡ºåº |
| | | seenValues.add(value); |
| | | } |
| | | } |
| | | map.put("title", uniqueList); |
| | | |
| | | |
| | | List<Map<String, Object>> getRowCount = orderProcessDetailMapper.getGlassLRow(orderId); |
| | | List<Map<String, Integer>> rowCount = new ArrayList<>(); |
| | | columns.forEach(col -> { |
| | | getRowCount.forEach(row -> { |
| | | Map<String, Integer> getRow = new HashMap<>(); |
| | | // { row: 0, col: 1, rowspan: 3, colspan: 0}, |
| | | Object rowNumObj = row.get("RowNum"); |
| | | if (rowNumObj instanceof Double) { |
| | | getRow.put("row", ((Double) rowNumObj).intValue()); |
| | | } else if (rowNumObj instanceof Integer) { |
| | | getRow.put("row", (Integer) rowNumObj); |
| | | } |
| | | getRow.put("col", col); |
| | | getRow.put("rowspan", (Integer) row.get("rowCount")); |
| | | getRow.put("colspan", 0); |
| | | rowCount.add(getRow); |
| | | }); |
| | | }); |
| | | |
| | | |
| | | map.put("mergeCells", rowCount); |
| | | |
| | | return map; |
| | | } |
| | | } |
| | |
| | | and a.breakage_quantity>0 |
| | | and a.patch_status=0 |
| | | and b.reviewed_state>=0 |
| | | and b.this_process in (SUBSTRING_INDEX(#{behindProcess},',',1)) |
| | | and b.this_process in (WITH RECURSIVE cte AS ( |
| | | SELECT 1 AS n |
| | | UNION ALL |
| | | SELECT n + 1 FROM cte WHERE n < 20 -- è¿éç 20 æ¯æå¤§æåä¸ªæ° |
| | | ) |
| | | SELECT REGEXP_SUBSTR(#{behindProcess}, '[^,]+', 1, n) AS process |
| | | FROM cte |
| | | WHERE REGEXP_SUBSTR(#{behindProcess}, '[^,]+', 1, n) IS NOT NULL) |
| | | |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | c.quantity-ifnull(c.termination_quantity,0) as glassQuantity, |
| | | |
| | | c.quantity-ifnull(c.termination_quantity,0) as quantityShow, |
| | | (c.quantity-ifnull(c.termination_quantity,0))*a.compute_area as grossAreaShow, |
| | | ifnull(f.inventory, 0) as inventoryShow, |
| | | round(ifnull(f.inventory, 0) * a.compute_area, 2) as inventoryAreaShow, -- åºåé¢ç§¯ |
| | | round( (c.quantity-ifnull(c.termination_quantity,0))*a.compute_area,2) as grossAreaShow, |
| | | ifnull(c.received_quantity, 0) as StorageShow, |
| | | ifnull(dd.quantity, 0) as shippedQuantityShow, -- åè´§æ°é |
| | | (ifnull(c.received_quantity, 0))*a.compute_area as StorageAreaShow,-- å
¥åºé¢ç§¯ |
| | | round(ifnull(dd.quantity, 0)*a.compute_area,2) as shippedAreaShow, -- åè´§é¢ç§¯ |
| | | round((ifnull(c.received_quantity, 0))*a.compute_area,2) as StorageAreaShow,-- å
¥åºé¢ç§¯ |
| | | |
| | | if(c.technology_number=1,(c.quantity-ifnull(c.termination_quantity,0))*a.compute_area,0) as grossArea, |
| | | if(c.technology_number=1,ifnull(f.inventory, 0) ,0) as inventory, |
| | | if(c.technology_number=1,round(ifnull(f.inventory, 0) * a.compute_area, 2),0) as inventoryArea, |
| | | if(c.technology_number=1, round((c.quantity-ifnull(c.termination_quantity,0))*a.compute_area,2),0) as grossArea, |
| | | if(c.technology_number=1,ifnull(c.received_quantity, 0) ,0) as Storage, |
| | | if(c.technology_number=1,ifnull(dd.quantity, 0) ,0) as shippedQuantity, |
| | | if(c.technology_number=1,(ifnull(c.received_quantity, 0))*a.compute_area,0) as StorageArea, |
| | | if(c.technology_number=1,round(ifnull(dd.quantity, 0)*a.compute_area,2),0) as shippedArea, |
| | | if(c.technology_number=1, round((ifnull(c.received_quantity, 0))*a.compute_area,2),0) as StorageArea, |
| | | |
| | | |
| | | ifnull(JSON_UNQUOTE(JSON_EXTRACT(a.other_columns, '$.S01')),'') AS glassNumber, |
| | |
| | | and c.technology_number = b.technology_number |
| | | left join sd.`order` as d |
| | | on c.order_id = d.order_id |
| | | left join mm.finished_goods_inventory as f |
| | | on c.order_id = f.order_id and f.order_number = c.order_number |
| | | # left join mm.finished_goods_inventory as f |
| | | # on c.order_id = f.order_id and f.order_number = c.order_number |
| | | left join sd.delivery_detail as dd on dd.order_id = a.order_id and dd.order_number = a.order_number |
| | | left join (SELECT process_id, |
| | | order_number, |
| | |
| | | order by a.process_id |
| | | |
| | | </select> |
| | | |
| | | <select id="processCardProgressReportMp"> |
| | | select a.product_name, |
| | | b.glass_child, |
| | | d.order_type, |
| | | concat(c.process_id, '/', c.technology_number) as process_id, |
| | | c.process_id as 'processId', |
| | | c.order_id, |
| | | c.order_number, |
| | | c.technology_number, |
| | | b.child_width, |
| | | b.child_height, |
| | | c.quantity, |
| | | c.quantity-ifnull(c.termination_quantity,0) as thisQuantity,/*ç¨äºå¤ææ¯å¦æ¹åé¢è²*/ |
| | | e.reportWorkQuantity, |
| | | e.reportWorkQuantityShow, |
| | | e.reportWorkQuantityCount, |
| | | e.reportWorkTime, |
| | | e.broken_num, |
| | | c.quantity-ifnull(c.termination_quantity,0) as glassQuantity, |
| | | c.quantity*a.area as gross_area, |
| | | c.quantity-ifnull(c.termination_quantity,0) as quantityShow, |
| | | (c.quantity-ifnull(c.termination_quantity,0))*a.compute_area as grossAreaShow, |
| | | ifnull(f.inventory, 0) as inventoryShow, |
| | | round(ifnull(f.inventory, 0) * a.compute_area, 2) as inventoryAreaShow, -- åºåé¢ç§¯ |
| | | ifnull(dd.quantity, 0) as shippedQuantityShow, -- åè´§æ°é |
| | | (ifnull(c.received_quantity, 0))*a.compute_area as StorageAreaShow,-- å
¥åºé¢ç§¯ |
| | | |
| | | if(c.technology_number=1,(c.quantity-ifnull(c.termination_quantity,0))*a.compute_area,0) as grossArea, |
| | | if(c.technology_number=1,ifnull(f.inventory, 0) ,0) as inventory, |
| | | if(c.technology_number=1,round(ifnull(f.inventory, 0) * a.compute_area, 2),0) as inventoryArea, |
| | | if(c.technology_number=1,ifnull(dd.quantity, 0) ,0) as shippedQuantity, |
| | | if(c.technology_number=1,(ifnull(c.received_quantity, 0))*a.compute_area,0) as StorageArea, |
| | | |
| | | |
| | | ifnull(JSON_UNQUOTE(JSON_EXTRACT(a.other_columns, '$.S01')),'') AS glassNumber, |
| | | b.`group` |
| | | |
| | | from pp.flow_card as c |
| | | left join |
| | | sd.order_detail as a |
| | | on c.order_id = a.order_id |
| | | and c.order_number = a.order_number |
| | | left join sd.order_glass_detail as b |
| | | on c.order_id = b.order_id |
| | | and b.order_number = c.order_number |
| | | and c.technology_number = b.technology_number |
| | | left join sd.`order` as d |
| | | on c.order_id = d.order_id |
| | | left join mm.finished_goods_inventory as f |
| | | on c.order_id = f.order_id and f.order_number = c.order_number |
| | | left join sd.delivery_detail as dd on dd.order_id = a.order_id and dd.order_number = a.order_number |
| | | left join (SELECT process_id, |
| | | order_number, |
| | | technology_number, |
| | | sum(a.broken_num) as broken_num, |
| | | concat('{', |
| | | GROUP_CONCAT(concat("\"", process, "\":\"", if(technology_number!=1 and (bd.nickname='stepD' || bd.nickname='stepB' ) ,0,reporting_work_num), "\"")), |
| | | '}' |
| | | ) as reportWorkQuantity, |
| | | concat('{', |
| | | GROUP_CONCAT(concat("\"", process, "\":\"", reporting_work_num, "\"")), |
| | | '}' |
| | | ) as reportWorkQuantityShow, |
| | | concat('{', |
| | | GROUP_CONCAT(concat("\"", process, "\":\"", reporting_work_num_count, "\"")), |
| | | '}' |
| | | ) as reportWorkQuantityCount, |
| | | concat('{', |
| | | GROUP_CONCAT(concat("\"", process, "\":\"", IFNULL(date(update_time),''), "\"")), |
| | | '}' |
| | | ) as reportWorkTime |
| | | FROM sd.order_process_detail as a |
| | | left join (SELECT DISTINCT basic_name,nickname from sd.basic_data as bd where bd.basic_category = 'process') as bd |
| | | on a.process = bd.basic_name |
| | | where a.order_id = #{orderId} |
| | | GROUP BY process_id, a.order_number, a.technology_number |
| | | |
| | | |
| | | ) as e |
| | | on e.process_id = c.process_id |
| | | and e.technology_number = c.technology_number |
| | | and e.order_number = c.order_number |
| | | where a.order_id = #{orderId} and d.create_order>0 and c.quantity-ifnull(c.termination_quantity,0)>0 |
| | | group by c.order_number, |
| | | c.technology_number, |
| | | c.process_id |
| | | order by c.process_id, c.order_number, c.technology_number |
| | | </select> |
| | | </mapper> |
| | |
| | | select |
| | | max(a.technology_number) as rowCount, |
| | | RowNum |
| | | from sd.order_process_detail as a |
| | | from pp.flow_card as a |
| | | left join |
| | | (select min((@i:=@i+1)) AS RowNum,c.* |
| | | from sd.order_glass_detail as c, |
| | | from pp.flow_card as c, |
| | | (SELECT @i:=-1) as d |
| | | where order_id = #{orderId} |
| | | GROUP BY order_number |
| | | GROUP BY order_number,process_id |
| | | ) as b |
| | | on b.order_number = a.order_number |
| | | on b.id = a.id |
| | | where a.order_id = #{orderId} |
| | | group by a.order_number |
| | | group by a.order_number,a.process_id |
| | | order by RowNum |
| | | |
| | | </select> |
| | | <update id="insertByReportingWorkDetail"> |