| | |
| | | |
| | | <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 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> |
| | | </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) => { |
| | |
| | | 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 |
| | |
| | | private String batch; |
| | | @ExcelProperty("订åç±»å") |
| | | private String orderType; |
| | | @ExcelProperty("å¨å¶åå度") |
| | | private String thicknessSum; |
| | | @ExcelProperty("å¹³æ¹æ¯«ç±³") |
| | | private String thicknessArea; |
| | | } |
| | |
| | | // 设置宽度 |
| | | rasterizationOptions.setPageWidth(1000); |
| | | // 设置é«åº¦ |
| | | rasterizationOptions.setPageHeight(1000); |
| | | rasterizationOptions.setPageHeight(700); |
| | | // è°ç¨è¿ä¸ªsetEmbedBackgroundæ¹æ³æ¥è®¾ç½®èæ¯è²æ¯å¦ä¸çäºè¾åºæ ¼å¼çé»è®¤èæ¯è² |
| | | //rasterizationOptions.setEmbedBackground(true); |
| | | // 为çæçå¾åå建ä¸ä¸ªPngOptionsçå®ä¾ï¼å¹¶å°å
¶åé
ç»ImageOptionsBaseç±»çå®ä¾ã |
| | |
| | | <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"> |
| | |
| | | |
| | | <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> |
| | | |
| | |
| | | |
| | | <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"> |