Merge branch 'master' of http://10.153.19.25:10105/r/YiWuProject
# Conflicts:
# hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollowtask/service/impl/HollowBigStorageCageHistoryTaskServiceImpl.java
| | |
| | | }, |
| | | ] |
| | | }, |
| | | { |
| | | path: '/upreturnhistory2', |
| | | name: 'upreturnhistory2', |
| | | component: () => import('../views/Returns/upreturnhistory2.vue'), |
| | | children: [ |
| | | { |
| | | path: '/Returns/upreturnhistory2', |
| | | name: 'upreturnhistory2', |
| | | component: () => import('../views/Returns/upreturnhistory2.vue') |
| | | }, |
| | | ] |
| | | }, |
| | | ] |
| | | }) |
| | | // 导航守卫 |
| | |
| | | const taskState = ref(''); |
| | | const taskType = ref(''); |
| | | let getglobalDate = window.localStorage.getItem('getglobalDate') |
| | | const historical = async (page) => { |
| | | const historical = async () => { |
| | | try { |
| | | let startTime = window.localStorage.getItem('startTime') |
| | | const response = await request.post("/cacheGlass/edgStorageDeviceTaskHistory", { |
| | |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | | tableDatax.value = response.data.records; |
| | | console.log(response.data.pages); |
| | | totalRecords.value = response.data.total/2 || 0 |
| | | } else { |
| | | ElMessage.error(response.message); |
| | |
| | | pageNo: page, |
| | | pageSize: 20, |
| | | glassId: glassId.value, |
| | | taskState: '', |
| | | taskType: '', |
| | | startTime: startTime, |
| | | endTime: getglobalDate |
| | | taskState: taskState.value, |
| | | taskType: taskType.value, |
| | | startTime: (timeRange.value && timeRange.value[0]) || '', |
| | | endTime: (timeRange.value && timeRange.value[1]) || '', |
| | | }) |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | | tableDatax.value = response.data.records; |
| | | console.log(response.data.pages); |
| | | |
| | | totalRecords.value = response.data.total/2 || 0 |
| | | } else { |
| | | ElMessage.error(response.message); |
| | |
| | | console.log(page); |
| | | const response = await request.post("/cacheGlass/edgStorageDeviceTaskHistory", { |
| | | deviceId: 1, |
| | | pageNo: page, |
| | | pageNo: 1, |
| | | pageSize: 20, |
| | | glassId: glassId.value, |
| | | taskState: taskState.value, |
| | |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | | tableDatax.value = response.data.records; |
| | | totalRecords.value = response.data.total/2 || 0 |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | |
| | | ] |
| | | onMounted(() => { |
| | | parseAndSetTime(); |
| | | historical(1); |
| | | historical(); |
| | | }); |
| | | </script> |
| | | <style scoped> |
| | |
| | | const taskState = ref(''); |
| | | const taskType = ref(''); |
| | | let getglobalDate = window.localStorage.getItem('getglobalDate') |
| | | const historical = async (page) => { |
| | | const historical = async () => { |
| | | try { |
| | | let startTime = window.localStorage.getItem('startTime') |
| | | const response = await request.post("/cacheGlass/edgStorageDeviceTaskHistory", { |
| | |
| | | pageNo: page, |
| | | pageSize: 20, |
| | | glassId: glassId.value, |
| | | taskState: '', |
| | | taskType: '', |
| | | startTime: startTime, |
| | | endTime: getglobalDate |
| | | taskState: taskState.value, |
| | | taskType: taskType.value, |
| | | startTime: (timeRange.value && timeRange.value[0]) || '', |
| | | endTime: (timeRange.value && timeRange.value[1]) || '', |
| | | }) |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | | tableDatax.value = response.data.records; |
| | | console.log(response.data.pages); |
| | | |
| | | totalRecords.value = response.data.total/2 || 0 |
| | | } else { |
| | | ElMessage.error(response.message); |
| | |
| | | console.log(page); |
| | | const response = await request.post("/cacheGlass/edgStorageDeviceTaskHistory", { |
| | | deviceId: 2, |
| | | pageNo: page, |
| | | pageNo: 1, |
| | | pageSize: 20, |
| | | glassId: glassId.value, |
| | | taskState: taskState.value, |
| | | taskType: taskType.value, |
| | | startTime: (timeRange.value && timeRange.value[0]) || '', |
| | | endTime: (timeRange.value && timeRange.value[1]) || '', |
| | | startTime: (timeRange.value && timeRange.value[0]) || '', |
| | | endTime: (timeRange.value && timeRange.value[1]) || '', |
| | | }) |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | | tableDatax.value = response.data.records; |
| | | totalRecords.value = response.data.total/2 || 0 |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | |
| | | ] |
| | | onMounted(() => { |
| | | parseAndSetTime(); |
| | | historical(1); |
| | | historical(); |
| | | }); |
| | | </script> |
| | | <style scoped> |
| | |
| | | ElMessage.error(response.message); |
| | | } |
| | | }; |
| | | // 历史任务查询 |
| | | const sethistorical = async () => { |
| | | let celllista=[] |
| | | let stateLista=[] |
| | | if(selectValuesb[0]!=null&&selectValuesb[0]!='undefined'){ |
| | | if(selectValuesb[0]!=""){ |
| | | celllista=[selectValuesb[0]]; |
| | | } |
| | | } |
| | | if(selectValuesb[1]!=null&&selectValuesb[1]!='undefined'){ |
| | | if(selectValuesb[1]!=""){ |
| | | stateLista=[selectValuesb[1]]; |
| | | } |
| | | } |
| | | const response = await request.post("/glassStorage/rawGlassStorageTask/queryRawGlassHistoryTask", { |
| | | beginDate: (timeRangea.value && timeRangea.value[0]) || '', |
| | | endDate: (timeRangea.value && timeRangea.value[1]) || '', |
| | | taskState: celllista, |
| | | taskType: stateLista |
| | | }) |
| | | if (response.code === 200) { |
| | | tableDatad.value = response.data; |
| | | ElMessage.success(response.message); |
| | | } |
| | | else { |
| | | ElMessage.error(response.message); |
| | | } |
| | | }; |
| | | // 是否禁用 |
| | | const toggleEnableState = async (row: any) => { |
| | | if (!row.deviceId) { |
| | |
| | | // 历史任务 |
| | | const iframeUrl = ref(''); |
| | | const handlehistorical = (row) => { |
| | | // historical() |
| | | // window.localStorage.setItem('pagenumber', 1) |
| | | blindb.value = true; |
| | | iframeUrl.value = `${window.location.origin}/#/GlassStorage/rawhistory`; |
| | | }; |
| | | // const historical = async () => { |
| | | // try { |
| | | // let startTime = window.localStorage.getItem('startTime') |
| | | // const response = await request.post("/glassStorage/rawGlassStorageTask/queryRawGlassHistoryTask", { |
| | | // pageNo: 1, |
| | | // pageSize: 20, |
| | | // taskState: [], |
| | | // taskType: [], |
| | | // beginDate: startTime, |
| | | // endDate: globalDate |
| | | // }) |
| | | // if (response.code == 200) { |
| | | // window.localStorage.setItem('pagenumber', 1) |
| | | // } else { |
| | | // } |
| | | // } |
| | | // catch (error) { |
| | | // console.error(error); |
| | | // } |
| | | // } |
| | | // 任务成功处理 |
| | | const successfull = async(row) => { |
| | | try { |
| | |
| | | frameborder="0" |
| | | ></iframe> |
| | | </el-dialog> |
| | | <!-- <el-dialog v-model="blindb" top="10vh" width="90%"> |
| | | <div style="display: flex;"> |
| | | <el-date-picker style="margin-left: 10px;" v-model="timeRangea" type="datetimerange" |
| | | format="YYYY/MM/DD HH:mm:ss" |
| | | value-format="YYYY-MM-DD HH:mm:ss" |
| | | :start-placeholder="$t('film.starttime')" |
| | | :end-placeholder="$t('film.endtime')" |
| | | :default-time="defaultTime" /> |
| | | <el-select v-model="selectValuesb[0]" clearable :placeholder="$t('film.taskstatus')" style="margin-left: 10px;" > |
| | | <el-option :label="$t('film.built')" value="0"></el-option> |
| | | <el-option :label="$t('film.finish')" value="1"></el-option> |
| | | <el-option :label="$t('film.fail')" value="2"></el-option> |
| | | </el-select> |
| | | <el-select v-model="selectValuesb[1]" clearable :placeholder="$t('film.tasktype')" style="margin-left: 10px;" > |
| | | <el-option :label="$t('sorter.advancetask')" value="1"></el-option> |
| | | <el-option :label="$t('sorter.outputtasks')" value="2"></el-option> |
| | | <el-option :label="$t('sorter.schedulingtasks')" value="3"></el-option> |
| | | <el-option :label="$t('sorter.advancerequests')" value="4"></el-option> |
| | | <el-option :label="$t('sorter.releaserequest')" value="5"></el-option> |
| | | </el-select> |
| | | <el-button type="primary" style="margin-left: 10px;margin-bottom: 10px;" @click="sethistorical()">{{ |
| | | $t('reportmanage.inquire') |
| | | }}</el-button> |
| | | </div> |
| | | <el-table ref="table" style="margin-top: 20px;height: 650px;" :data="tableDatad" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="id" align="center" :label="$t('film.enableid')"/> |
| | | <el-table-column prop="startSlot" align="center" :label="$t('film.originateslot')"/> |
| | | <el-table-column prop="endSlot" align="center" :label="$t('film.endslot')"/> |
| | | <el-table-column prop="patternQuantity" align="center" :label="$t('film.patternquantity')"/> |
| | | <el-table-column |
| | | align="center" |
| | | :label="$t('film.enabletype')" |
| | | prop="taskType" |
| | | > |
| | | <template #default="scope"> |
| | | <el-tag :type="getStatusType1(scope.row.taskType)"> |
| | | {{ getStatusText1(scope.row.taskType) }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | align="center" |
| | | :label="$t('film.taskstatus')" |
| | | prop="taskState" |
| | | > |
| | | <template #default="scope"> |
| | | <el-tag :type="getStatusType2(scope.row.taskState)"> |
| | | {{ getStatusText2(scope.row.taskState) }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="createTime" align="center" :label="$t('film.createtime')" /> |
| | | <el-table-column fixed="right" :label="$t('film.operate')" align="center"> |
| | | <template #default="scope"> |
| | | <el-button size="mini" :disabled="!scope.row.taskState == 0" type="text" plain @click="successfull(scope.row)">{{ $t('searchOrder.successfullyprocessed') }}</el-button> |
| | | <el-button size="mini" :disabled="!scope.row.taskState == 0" type="text" plain @click="handleptask(scope.row)">{{ $t('searchOrder.taskfailure') }}</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <template #footer> |
| | | <div id="dialog-footer"> |
| | | <el-button @click="blindb = false">{{ $t('large.close') }}</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> --> |
| | | <el-dialog v-model="dialogFormVisibleb" top="23vh" width="55%" :title="$t('film.addglass')" > |
| | | <div style="margin-left: -50px;margin-top: 10px;margin-bottom: 10px;"> |
| | | <el-form size="mini" label-width="150px"> |
| | |
| | | prop="taskType" |
| | | > |
| | | <template #default="scope"> |
| | | <el-tag :type="getStatusText1(scope.row.taskType)"> |
| | | {{ getStatusType1(scope.row.taskType) }} |
| | | <el-tag :type="getStatusType1(scope.row.taskType)"> |
| | | {{ getStatusText1(scope.row.taskType) }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="createTime" align="center" :label="$t('reportmanage.starttime')" min-width="100" /> |
| | | <el-table-column prop="updateTime" align="center" :label="$t('reportmanage.endtime')" min-width="100" /> |
| | | <el-table-column prop="formattedCreateTime" align="center" :label="$t('reportmanage.starttime')" min-width="100" /> |
| | | <el-table-column prop="formattedUpdateTime" align="center" :label="$t('reportmanage.endtime')" min-width="100" /> |
| | | </el-table> |
| | | <div style="margin-top: 20px;margin-left: 40%;"> |
| | | <el-pagination |
| | |
| | | }) |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | | tableDatax.value = response.data.records; |
| | | console.log(response.data.pages); |
| | | |
| | | const formattedData = response.data.records.map(record => ({ |
| | | ...record, |
| | | formattedCreateTime: formatTimestamp(record.createTime), |
| | | formattedUpdateTime: formatTimestamp(record.updateTime), |
| | | })); |
| | | // tableDatax.value = response.data.records; |
| | | tableDatax.value = formattedData; |
| | | totalRecords.value = response.data.total/2 || 0 |
| | | } else { |
| | | ElMessage.error(response.message); |
| | |
| | | historicala(currentPage2.value); |
| | | }; |
| | | const historicala = async (page) => { |
| | | try { |
| | | let page = window.localStorage.getItem('pagenumber') |
| | | let startTime = window.localStorage.getItem('startTime') |
| | | const response = await request.post("/glassStorage/rawGlassStorageTask/queryRawGlassHistoryTask", { |
| | | pageNo: page, |
| | | pageSize: 20, |
| | | taskState: [], |
| | | taskType: [], |
| | | beginDate: startTime, |
| | | endDate: getglobalDate |
| | | }) |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | | tableDatax.value = response.data.records; |
| | | console.log(response.data.pages); |
| | | |
| | | totalRecords.value = response.data.total/2 || 0 |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | | } |
| | | catch (error) { |
| | | console.error(error); |
| | | } |
| | | } |
| | | // 历史查询点击 |
| | | const sethistorical = async () => { |
| | | try { |
| | | let startTime = window.localStorage.getItem('startTime') |
| | | let celllist=[] |
| | |
| | | ptargetSlot = '0' |
| | | } |
| | | let page = window.localStorage.getItem('pagenumber') |
| | | const response = await request.post("/glassStorage/rawGlassStorageTask/queryRawGlassHistoryTask", { |
| | | const response = await request.post("/glassStorage/rawGlassStorageTask/queryRawGlassHistoryTask", { |
| | | pageNo: page, |
| | | pageSize: 20, |
| | | taskState: celllist, |
| | | taskType: stateList, |
| | | beginDate: startTime, |
| | | endDate: getglobalDate |
| | | beginDate: (timeRange.value && timeRange.value[0]) || '', |
| | | endDate: (timeRange.value && timeRange.value[1]) || '', |
| | | }) |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | | tableDatax.value = response.data.records; |
| | | const formattedData = response.data.records.map(record => ({ |
| | | ...record, |
| | | formattedCreateTime: formatTimestamp(record.createTime), |
| | | formattedUpdateTime: formatTimestamp(record.updateTime), |
| | | })); |
| | | // tableDatax.value = response.data.records; |
| | | tableDatax.value = formattedData; |
| | | totalRecords.value = response.data.total/2 || 0 |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | | } |
| | | catch (error) { |
| | | console.error(error); |
| | | } |
| | | } |
| | | // 历史查询点击 |
| | | const sethistorical = async () => { |
| | | try { |
| | | let startTime = window.localStorage.getItem('startTime') |
| | | let celllist=[] |
| | | let stateList=[] |
| | | let pstartSlot= '' |
| | | let ptargetSlot='' |
| | | if(selectValuesa[0]!=null&&selectValuesa[0]!='undefined'){ |
| | | if(selectValuesa[0]!=""){ |
| | | celllist=[selectValuesa[0]]; |
| | | } |
| | | } |
| | | if(selectValuesa[1]!=null&&selectValuesa[1]!='undefined'){ |
| | | if(selectValuesa[1]!=""){ |
| | | stateList=[selectValuesa[1]]; |
| | | } |
| | | } |
| | | if(startSlot.value != ""){ |
| | | pstartSlot = startSlot.value |
| | | }else{ |
| | | pstartSlot = '0' |
| | | } |
| | | if(targetSlot.value != ""){ |
| | | ptargetSlot = targetSlot.value |
| | | }else{ |
| | | ptargetSlot = '0' |
| | | } |
| | | let page = window.localStorage.getItem('pagenumber') |
| | | const response = await request.post("/glassStorage/rawGlassStorageTask/queryRawGlassHistoryTask", { |
| | | pageNo: 1, |
| | | pageSize: 20, |
| | | taskState: celllist, |
| | | taskType: stateList, |
| | | beginDate: (timeRange.value && timeRange.value[0]) || '', |
| | | endDate: (timeRange.value && timeRange.value[1]) || '', |
| | | }) |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | | currentPage2.value = 1; |
| | | const formattedData = response.data.records.map(record => ({ |
| | | ...record, |
| | | formattedCreateTime: formatTimestamp(record.createTime), |
| | | formattedUpdateTime: formatTimestamp(record.updateTime), |
| | | })); |
| | | // tableDatax.value = response.data.records; |
| | | tableDatax.value = formattedData; |
| | | totalRecords.value = response.data.total/2 || 0 |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="createTime" align="center" :label="$t('reportmanage.starttime')" min-width="100" /> |
| | | <el-table-column prop="updateTime" align="center" :label="$t('reportmanage.endtime')" min-width="100" /> |
| | | <el-table-column prop="formattedCreateTime" align="center" :label="$t('reportmanage.starttime')" min-width="100" /> |
| | | <el-table-column prop="formattedUpdateTime" align="center" :label="$t('reportmanage.endtime')" min-width="100" /> |
| | | </el-table> |
| | | <div style="margin-top: 20px;margin-left: 40%;"> |
| | | <el-pagination |
| | |
| | | const rawGlassWidth = ref(''); |
| | | const rawGlassfilmsId = ref(''); |
| | | const slot = ref(''); |
| | | let getglobalDate = window.localStorage.getItem('globalDate') |
| | | const historical = async (page) => { |
| | | let getglobalDate = window.localStorage.getItem('getglobalDate') |
| | | const historical = async () => { |
| | | try { |
| | | let startTime = window.localStorage.getItem('startTime') |
| | | const response = await request.post("/loadGlass/loadglassdevicetaskhistory/queryLoadGlassHistoryTask", { |
| | |
| | | }) |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | | tableDatax.value = response.data.records; |
| | | const formattedData = response.data.records.map(record => ({ |
| | | ...record, |
| | | formattedCreateTime: formatTimestamp(record.createTime), |
| | | formattedUpdateTime: formatTimestamp(record.updateTime), |
| | | })); |
| | | // tableDatax.value = response.data.records; |
| | | tableDatax.value = formattedData; |
| | | console.log(response.data.pages); |
| | | totalRecords.value = response.data.total/2 || 0 |
| | | } else { |
| | |
| | | }) |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | | tableDatax.value = response.data.records; |
| | | console.log(response.data.pages); |
| | | |
| | | const formattedData = response.data.records.map(record => ({ |
| | | ...record, |
| | | formattedCreateTime: formatTimestamp(record.createTime), |
| | | formattedUpdateTime: formatTimestamp(record.updateTime), |
| | | })); |
| | | // tableDatax.value = response.data.records; |
| | | tableDatax.value = formattedData; |
| | | totalRecords.value = response.data.total/2 || 0 |
| | | } else { |
| | | ElMessage.error(response.message); |
| | |
| | | let page = window.localStorage.getItem('pagenumber') |
| | | console.log(page); |
| | | const response = await request.post("/loadGlass/loadglassdevicetaskhistory/queryLoadGlassHistoryTask", { |
| | | pageNo: page, |
| | | pageNo: 1, |
| | | pageSize: 20, |
| | | rawGlassHeight: rawGlassHeight.value, |
| | | rawGlassThickness: rawGlassThickness.value, |
| | |
| | | }) |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | | tableDatax.value = response.data.records; |
| | | const formattedData = response.data.records.map(record => ({ |
| | | ...record, |
| | | formattedCreateTime: formatTimestamp(record.createTime), |
| | | formattedUpdateTime: formatTimestamp(record.updateTime), |
| | | })); |
| | | // tableDatax.value = response.data.records; |
| | | tableDatax.value = formattedData; |
| | | totalRecords.value = response.data.total/2 || 0 |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | |
| | | ] |
| | | onMounted(() => { |
| | | parseAndSetTime(); |
| | | historical(1); |
| | | historical(); |
| | | }); |
| | | </script> |
| | | <style scoped> |
New file |
| | |
| | | <template> |
| | | <div> |
| | | <div style="display: flex;width: 1770px;"> |
| | | <el-input v-model="rawGlassWidth" clearable style="margin-left: 10px;margin-bottom: 10px;width: 200px;" :placeholder="$t('Mounting.width')" /> |
| | | <el-input v-model="rawGlassHeight" clearable style="margin-left: 10px;margin-bottom: 10px;width: 200px;" :placeholder="$t('Mounting.height')" /> |
| | | <el-input v-model="rawGlassThickness" clearable style="margin-left: 10px;margin-bottom: 10px;width: 200px;" :placeholder="$t('Mounting.thickness')" /> |
| | | <el-input v-model="rawGlassfilmsId" clearable style="margin-left: 10px;margin-bottom: 10px;width: 200px;" :placeholder="$t('workOrder.coatingtypesbe')" /> |
| | | <el-input v-model="slot" clearable style="margin-left: 10px;margin-bottom: 10px;width: 200px;" :placeholder="$t('workOrder.upnumber')" /> |
| | | <el-select |
| | | :placeholder="$t('searchOrder.taskstatus')" |
| | | clearable |
| | | style="width: 270px;margin-left: 10px;" |
| | | v-model="taskStateList"> |
| | | <el-option |
| | | v-for="item in optionsa" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | <el-date-picker v-model="timeRange" type="datetimerange" range-separator="至" :start-placeholder="$t('reportmanage.starttime')" |
| | | style="margin-left: 15px;" value-format = "YYYY-MM-DD hh:mm:ss" |
| | | :end-placeholder="$t('reportmanage.endtime')"> |
| | | </el-date-picker> |
| | | <el-button type="primary" style="margin-left: 10px;margin-bottom: 10px;" @click="sethistorical()">{{$t('reportmanage.inquire')}}</el-button> |
| | | </div> |
| | | <el-table ref="table" style="margin-top: 20px;height: 580px;width: 1770px;" :data="tableDatax" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="rawGlassWidth" align="center" :label="$t('Mounting.width')" min-width="80" /> |
| | | <el-table-column prop="rawGlassHeight" align="center" :label="$t('Mounting.height')" min-width="80" /> |
| | | <el-table-column prop="rawGlassThickness" align="center" :label="$t('Mounting.thickness')" min-width="80" /> |
| | | <el-table-column prop="slot" align="center" :label="$t('workOrder.upnumber')" min-width="80" /> |
| | | <el-table-column prop="totalCount" align="center" :label="$t('basicData.tonumber')" min-width="80" /> |
| | | <el-table-column prop="finishCount" align="center" :label="$t('basicData.finishnumber')" min-width="80" /> |
| | | <el-table-column prop="damageCount" align="center" :label="$t('hellow.damagenumber')" min-width="80" /> |
| | | <el-table-column |
| | | align="center" |
| | | :label="$t('film.taskstatus')" |
| | | min-width="80" |
| | | prop="taskState" |
| | | > |
| | | <template #default="scope"> |
| | | <el-tag :type="getStatusTypeb(scope.row.taskState)"> |
| | | {{ getStatusTextb(scope.row.taskState) }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | align="center" |
| | | :label="$t('sorter.taskRunning')" |
| | | min-width="80" |
| | | prop="taskRunning" |
| | | > |
| | | <template #default="scope"> |
| | | <el-tag :type="getStatusTypea(scope.row.taskRunning)"> |
| | | {{ getStatusTexta(scope.row.taskRunning) }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="formattedCreateTime" align="center" :label="$t('reportmanage.starttime')" min-width="100" /> |
| | | <el-table-column prop="formattedUpdateTime" align="center" :label="$t('reportmanage.endtime')" min-width="100" /> |
| | | </el-table> |
| | | <div style="margin-top: 20px;margin-left: 40%;"> |
| | | <el-pagination |
| | | v-model:current-page="currentPage2" |
| | | :page-size="pageSize" |
| | | :size="large" |
| | | :disabled="disabled" |
| | | layout="prev, pager, next, jumper" |
| | | :total="totalRecords" |
| | | @current-change="handlePageChange2" |
| | | style="margin-top: 10px;" |
| | | /> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | <script lang="ts" setup> |
| | | import {useI18n} from 'vue-i18n' |
| | | import {useRouter} from "vue-router" |
| | | import request from "@/utils/request" |
| | | import {host, WebSocketHost} from '@/utils/constants' |
| | | import {onBeforeUnmount, onMounted, onUnmounted, reactive, ref} from "vue"; |
| | | import {closeWebSocket, initializeWebSocket} from '@/utils/WebSocketService'; |
| | | import {ElMessage, ElMessageBox} from 'element-plus' |
| | | const {t} = useI18n() |
| | | let language = ref(localStorage.getItem('lang') || 'zh') |
| | | import { inject } from 'vue'; |
| | | const globalDate = inject('globalDate'); |
| | | const router = useRouter() |
| | | const timeRange = ref([]) |
| | | const taskStateList = reactive([]); |
| | | const tableDatax = ref([]) |
| | | const currentPage2 = ref(1) |
| | | const totalRecords = ref(0) |
| | | const rawGlassHeight = ref(''); |
| | | const rawGlassThickness = ref(''); |
| | | const rawGlassWidth = ref(''); |
| | | const rawGlassfilmsId = ref(''); |
| | | const slot = ref(''); |
| | | let getglobalDate = window.localStorage.getItem('getglobalDate') |
| | | const historical = async () => { |
| | | try { |
| | | let startTime = window.localStorage.getItem('startTime') |
| | | const response = await request.post("/loadGlass/loadglassdevicetaskhistory/queryLoadGlassHistoryTask", { |
| | | pageNo: 1, |
| | | pageSize: 20, |
| | | rawGlassHeight: '', |
| | | rawGlassThickness: '', |
| | | rawGlassWidth: '', |
| | | rawGlassfilmsId: '', |
| | | slot: '', |
| | | station: 2, |
| | | taskStateList: '', |
| | | beginDate: startTime, |
| | | endDate: getglobalDate |
| | | }) |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | | const formattedData = response.data.records.map(record => ({ |
| | | ...record, |
| | | formattedCreateTime: formatTimestamp(record.createTime), |
| | | formattedUpdateTime: formatTimestamp(record.updateTime), |
| | | })); |
| | | // tableDatax.value = response.data.records; |
| | | tableDatax.value = formattedData; |
| | | console.log(response.data.pages); |
| | | totalRecords.value = response.data.total/2 || 0 |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | | } |
| | | catch (error) { |
| | | console.error(error); |
| | | } |
| | | } |
| | | const handlePageChange2 = (newPage) => { |
| | | currentPage2.value = newPage; |
| | | console.log(currentPage2.value); |
| | | window.localStorage.setItem('pagenumber', currentPage2.value) |
| | | historicala(currentPage2.value); |
| | | }; |
| | | const historicala = async (page) => { |
| | | try { |
| | | let page = window.localStorage.getItem('pagenumber') |
| | | let startTime = window.localStorage.getItem('startTime') |
| | | const response = await request.post("/loadGlass/loadglassdevicetaskhistory/queryLoadGlassHistoryTask", { |
| | | pageNo: page, |
| | | pageSize: 20, |
| | | rawGlassHeight: '', |
| | | rawGlassThickness: '', |
| | | rawGlassWidth: '', |
| | | rawGlassfilmsId: '', |
| | | slot: '', |
| | | station: 2, |
| | | taskStateList: '', |
| | | beginDate: startTime, |
| | | endDate: getglobalDate |
| | | }) |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | | const formattedData = response.data.records.map(record => ({ |
| | | ...record, |
| | | formattedCreateTime: formatTimestamp(record.createTime), |
| | | formattedUpdateTime: formatTimestamp(record.updateTime), |
| | | })); |
| | | // tableDatax.value = response.data.records; |
| | | tableDatax.value = formattedData; |
| | | totalRecords.value = response.data.total/2 || 0 |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | | } |
| | | catch (error) { |
| | | console.error(error); |
| | | } |
| | | } |
| | | // 历史查询点击 |
| | | const sethistorical = async () => { |
| | | try { |
| | | let startTime = window.localStorage.getItem('startTime') |
| | | let page = window.localStorage.getItem('pagenumber') |
| | | console.log(page); |
| | | const response = await request.post("/loadGlass/loadglassdevicetaskhistory/queryLoadGlassHistoryTask", { |
| | | pageNo: 1, |
| | | pageSize: 20, |
| | | rawGlassHeight: rawGlassHeight.value, |
| | | rawGlassThickness: rawGlassThickness.value, |
| | | rawGlassWidth: rawGlassWidth.value, |
| | | rawGlassfilmsId: rawGlassfilmsId.value, |
| | | slot: slot.value, |
| | | station: 2, |
| | | taskStateList: '', |
| | | beginDate: (timeRange.value && timeRange.value[0]) || '', |
| | | endDate: (timeRange.value && timeRange.value[1]) || '', |
| | | }) |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | | const formattedData = response.data.records.map(record => ({ |
| | | ...record, |
| | | formattedCreateTime: formatTimestamp(record.createTime), |
| | | formattedUpdateTime: formatTimestamp(record.updateTime), |
| | | })); |
| | | // tableDatax.value = response.data.records; |
| | | tableDatax.value = formattedData; |
| | | totalRecords.value = response.data.total/2 || 0 |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | | } |
| | | catch (error) { |
| | | console.error(error); |
| | | } |
| | | } |
| | | // 格式化时间戳为年月日时间字符串的函数 |
| | | function formatTimestamp(timestamp) { |
| | | const date = new Date(timestamp); |
| | | const year = date.getFullYear(); |
| | | const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始,需要加1,并补零 |
| | | const day = String(date.getDate()).padStart(2, '0'); // 补零 |
| | | const hours = String(date.getHours()).padStart(2, '0'); // 补零(如果需要显示时间) |
| | | const minutes = String(date.getMinutes()).padStart(2, '0'); // 补零(如果需要显示时间) |
| | | const seconds = String(date.getSeconds()).padStart(2, '0'); // 补零(如果需要显示时间) |
| | | return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; |
| | | } |
| | | // 格式化后端时间并计算一周前的时间 |
| | | const defaultTime = ref<[Date, Date]>([new Date(), new Date()]); |
| | | function parseAndSetTime() { |
| | | const backendTime = new Date(getglobalDate); |
| | | const oneWeekAgo = new Date(backendTime.getTime() - 7 * 24 * 60 * 60 * 1000); // 减去7天 |
| | | console.log(formatTimestamp(oneWeekAgo)); |
| | | console.log(oneWeekAgo); |
| | | timeRange.value = [formatTimestamp(oneWeekAgo), formatTimestamp(backendTime)]; |
| | | window.localStorage.setItem('startTime', formatTimestamp(oneWeekAgo)) |
| | | } |
| | | function getStatusTypeb(taskState: number) { |
| | | switch (taskState) { |
| | | case 0: |
| | | return 'primary'; |
| | | case 1: |
| | | return 'success'; |
| | | case 2: |
| | | return 'success'; |
| | | } |
| | | } |
| | | function getStatusTextb(taskState: number) { |
| | | switch (taskState) { |
| | | case 0: |
| | | return t('searchOrder.empty'); |
| | | case 1: |
| | | return t('film.execution'); |
| | | case 2: |
| | | return t('searchOrder.endtask'); |
| | | } |
| | | } |
| | | function getStatusTypea(taskRunning: number) { |
| | | switch (taskRunning) { |
| | | case 0: |
| | | return 'primary'; |
| | | case 1: |
| | | return 'success'; |
| | | } |
| | | } |
| | | function getStatusTexta(taskRunning: number) { |
| | | switch (taskRunning) { |
| | | case 0: |
| | | return t('basicData.untask'); |
| | | case 1: |
| | | return t('basicData.up'); |
| | | } |
| | | } |
| | | const optionsa = [ |
| | | { |
| | | value: 0, |
| | | label: t('searchOrder.empty'), |
| | | }, |
| | | { |
| | | value: 1, |
| | | label: t('film.execution'), |
| | | }, |
| | | { |
| | | value: 2, |
| | | label: t('searchOrder.endtask'), |
| | | } |
| | | ] |
| | | onMounted(() => { |
| | | parseAndSetTime(); |
| | | historical(); |
| | | }); |
| | | </script> |
| | | <style scoped> |
| | | </style> |
| | |
| | | |
| | | // }); |
| | | // } |
| | | |
| | | |
| | | |
| | | |
| | | if(data.loadTask1!=null){ |
| | | tableData.value = data.loadTask1[0] |
| | | window.localStorage.setItem('engineeringIda', tableData.value[0].engineeringId) |
| | |
| | | console.error(error); |
| | | } |
| | | } |
| | | |
| | | // 开始上片 |
| | | const handleon = async () => { |
| | | let filmRemove = window.localStorage.getItem('filmRemove') |
| | |
| | | const blinda = ref(false) |
| | | const ReportData = ref(true); |
| | | const blindb = ref(false) |
| | | const dialoglea = ref(false) |
| | | const blindbd = ref(false) |
| | | const canSelectProjecta = ref(true); |
| | | const canSelectProjectb = ref(true); |
| | | const canSelectProjectc = ref(false); |
| | |
| | | console.error('发生错误:', error); |
| | | } |
| | | }; |
| | | // 历史任务 |
| | | const iframeUrl = ref(''); |
| | | const handlehistorical = (row) => { |
| | | blindbd.value = true; |
| | | iframeUrl.value = `${window.location.origin}/#/Returns/upreturnhistory`; |
| | | }; |
| | | function getStatusType2(filmRemove) { |
| | | switch (filmRemove) { |
| | | case 0: |
| | |
| | | <el-button :disabled="!canSelectProjectb" style="margin-top: 5px;margin-left: 20px;" type="success" @click="handleBind">{{ $t('basicData.startloading') }}</el-button> |
| | | <el-button :disabled="!canSelectProjectc" style="margin-top: 5px;margin-left: 20px;" id="searchButton" type="warning" @click="handleBinda">{{ $t('basicData.stop') }}</el-button> |
| | | <el-button :disabled="!canSelectProjectc" style="margin-top: 5px;margin-left: 20px;" id="searchButton" type="danger" @click="deleteTask">{{ $t('searchOrder.deleteTask') }}</el-button> |
| | | <el-button style="margin-top: 5px;margin-left: 20px;" id="searchButton" type="info" @click="handlehistorical">{{ $t('searchOrder.historicaltasks') }}</el-button> |
| | | <el-select disabled v-model="selectValuesa[1]" clearable :placeholder="$t('Mounting.oneloadingline')" |
| | | style="margin-top: 5px;margin-left: 20px;"> |
| | | <el-option :label="$t('Mounting.all')" value="0"></el-option> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!-- 历史任务 --> |
| | | <el-dialog v-model="blindbd" top="10vh" width="90%"> |
| | | <iframe |
| | | :src="iframeUrl" |
| | | marginwidth="2000px" |
| | | marginheight="2000px" |
| | | width="100%" |
| | | height="700px" |
| | | frameborder="0" |
| | | ></iframe> |
| | | </el-dialog> |
| | | <el-dialog v-model="blind" top="30vh" width="25%" :title="$t('basicData.startfilm')"> |
| | | <template #footer> |
| | | <div id="dialog-footer"> |
| | |
| | | <div> |
| | | <div style="display: flex;width: 1770px;"> |
| | | <el-input v-model="glassId" clearable style="margin-left: 10px;margin-bottom: 10px;width: 200px;" :placeholder="$t('searchOrder.inglassID')" /> |
| | | <el-input v-model="startSlot" clearable style="margin-left: 10px;margin-bottom: 10px;width: 200px;" :placeholder="$t('film.originateslot')" /> |
| | | <el-input v-model="targetSlot" clearable style="margin-left: 10px;margin-bottom: 10px;width: 200px;" :placeholder="$t('film.endslot')" /> |
| | | <el-input v-model="startSlot" clearable style="margin-left: 10px;margin-bottom: 10px;width: 200px;" @input="handleInputa" :placeholder="$t('film.originateslot')" /> |
| | | <el-input v-model="targetSlot" clearable style="margin-left: 10px;margin-bottom: 10px;width: 200px;" @input="handleInputb" :placeholder="$t('film.endslot')" /> |
| | | <el-select v-model="selectValuesa[0]" filterable :placeholder="$t('searchOrder.taskstatus')" clearable |
| | | style="width: 200px;margin-left: 10px;"> |
| | | <el-option :label="$t('searchOrder.begin')" value="0"></el-option> |
| | |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="createTime" align="center" :label="$t('reportmanage.starttime')" min-width="100" /> |
| | | <el-table-column prop="updateTime" align="center" :label="$t('reportmanage.endtime')" min-width="100" /> |
| | | <el-table-column prop="formattedCreateTime" align="center" :label="$t('reportmanage.starttime')" min-width="100" /> |
| | | <el-table-column prop="formattedUpdateTime" align="center" :label="$t('reportmanage.endtime')" min-width="100" /> |
| | | </el-table> |
| | | <div style="margin-top: 20px;margin-left: 40%;"> |
| | | <el-pagination |
| | |
| | | }) |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | | tableDatax.value = response.data.records; |
| | | const formattedData = response.data.records.map(record => ({ |
| | | ...record, |
| | | formattedCreateTime: formatTimestamp(record.createTime), |
| | | formattedUpdateTime: formatTimestamp(record.updateTime), |
| | | })); |
| | | // tableDatax.value = response.data.records; |
| | | tableDatax.value = formattedData; |
| | | console.log(response.data.pages); |
| | | |
| | | totalRecords.value = response.data.total/2 || 0 |
| | |
| | | }; |
| | | const historicala = async (page) => { |
| | | try { |
| | | let page = window.localStorage.getItem('pagenumber') |
| | | let startTime = window.localStorage.getItem('startTime') |
| | | const response = await request.post("/cacheVerticalGlass/bigStorageCageHistoryTask/queryBigStorageCageHistoryTask", { |
| | | pageNo: page, |
| | | pageSize: 20, |
| | | glassId: glassId.value, |
| | | startSlot: 0, |
| | | targetSlot: 0, |
| | | taskStateList: [], |
| | | taskTypeList: [], |
| | | beginDate: startTime, |
| | | endDate: getglobalDate |
| | | }) |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | | tableDatax.value = response.data.records; |
| | | console.log(response.data.pages); |
| | | |
| | | totalRecords.value = response.data.total/2 || 0 |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | | } |
| | | catch (error) { |
| | | console.error(error); |
| | | } |
| | | } |
| | | // 历史查询点击 |
| | | const sethistorical = async () => { |
| | | try { |
| | | let startTime = window.localStorage.getItem('startTime') |
| | | let celllist=[] |
| | | let stateList=[] |
| | | let pstartSlot= '' |
| | |
| | | stateList=[selectValuesa[1]]; |
| | | } |
| | | } |
| | | console.log(startSlot.value); |
| | | |
| | | if(startSlot.value != ""){ |
| | | pstartSlot = startSlot.value |
| | | }else{ |
| | |
| | | ptargetSlot = '0' |
| | | } |
| | | let page = window.localStorage.getItem('pagenumber') |
| | | const response = await request.post("/cacheVerticalGlass/bigStorageCageHistoryTask/queryBigStorageCageHistoryTask", { |
| | | let startTime = window.localStorage.getItem('startTime') |
| | | const response = await request.post("/cacheVerticalGlass/bigStorageCageHistoryTask/queryBigStorageCageHistoryTask", { |
| | | pageNo: page, |
| | | pageSize: 20, |
| | | glassId: glassId.value, |
| | |
| | | targetSlot: ptargetSlot, |
| | | taskStateList: celllist, |
| | | taskTypeList: stateList, |
| | | beginDate: startTime, |
| | | endDate: getglobalDate |
| | | beginDate: (timeRange.value && timeRange.value[0]) || '', |
| | | endDate: (timeRange.value && timeRange.value[1]) || '', |
| | | }) |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | | tableDatax.value = response.data.records; |
| | | const formattedData = response.data.records.map(record => ({ |
| | | ...record, |
| | | formattedCreateTime: formatTimestamp(record.createTime), |
| | | formattedUpdateTime: formatTimestamp(record.updateTime), |
| | | })); |
| | | // tableDatax.value = response.data.records; |
| | | tableDatax.value = formattedData; |
| | | console.log(response.data.pages); |
| | | |
| | | totalRecords.value = response.data.total/2 || 0 |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | |
| | | console.error(error); |
| | | } |
| | | } |
| | | // 历史查询点击 |
| | | const sethistorical = async () => { |
| | | try { |
| | | let celllist=[] |
| | | let stateList=[] |
| | | let pstartSlot= '' |
| | | let ptargetSlot='' |
| | | if(selectValuesa[0]!=null&&selectValuesa[0]!='undefined'){ |
| | | if(selectValuesa[0]!=""){ |
| | | celllist=[selectValuesa[0]]; |
| | | } |
| | | } |
| | | if(selectValuesa[1]!=null&&selectValuesa[1]!='undefined'){ |
| | | if(selectValuesa[1]!=""){ |
| | | stateList=[selectValuesa[1]]; |
| | | } |
| | | } |
| | | if(startSlot.value != ""){ |
| | | pstartSlot = startSlot.value |
| | | }else{ |
| | | pstartSlot = '0' |
| | | } |
| | | if(targetSlot.value != ""){ |
| | | ptargetSlot = targetSlot.value |
| | | }else{ |
| | | ptargetSlot = '0' |
| | | } |
| | | const response = await request.post("/cacheVerticalGlass/bigStorageCageHistoryTask/queryBigStorageCageHistoryTask", { |
| | | pageNo: 1, |
| | | pageSize: 20, |
| | | glassId: glassId.value, |
| | | startSlot: pstartSlot, |
| | | targetSlot: ptargetSlot, |
| | | taskStateList: celllist, |
| | | taskTypeList: stateList, |
| | | beginDate: (timeRange.value && timeRange.value[0]) || '', |
| | | endDate: (timeRange.value && timeRange.value[1]) || '', |
| | | }) |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | | currentPage2.value = 1 |
| | | totalRecords.value = response.data.total/2 || 0 |
| | | const formattedData = response.data.records.map(record => ({ |
| | | ...record, |
| | | formattedCreateTime: formatTimestamp(record.createTime), |
| | | formattedUpdateTime: formatTimestamp(record.updateTime), |
| | | })); |
| | | // tableDatax.value = response.data.records; |
| | | tableDatax.value = formattedData; |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | | } |
| | | catch (error) { |
| | | console.error(error); |
| | | } |
| | | } |
| | | const handleInputa = (value: string) => { |
| | | const isNumeric = /^\d*$/.test(value); |
| | | if (isNumeric) { |
| | | startSlot.value = value; |
| | | } else { |
| | | startSlot.value = ''; |
| | | } |
| | | }; |
| | | const handleInputb = (value: string) => { |
| | | const isNumeric = /^\d*$/.test(value); |
| | | if (isNumeric) { |
| | | targetSlot.value = value; |
| | | } else { |
| | | targetSlot.value = ''; |
| | | } |
| | | }; |
| | | // 格式化时间戳为年月日时间字符串的函数 |
| | | function formatTimestamp(timestamp) { |
| | | const date = new Date(timestamp); |
| | |
| | | const taskState = ref(''); |
| | | const taskType = ref(''); |
| | | let getglobalDate = window.localStorage.getItem('getglobalDate') |
| | | const historical = async (page) => { |
| | | const historical = async () => { |
| | | try { |
| | | let startTime = window.localStorage.getItem('startTime') |
| | | const response = await request.post("/cacheGlass/edgStorageDeviceTaskHistory", { |
| | |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | | tableDatax.value = response.data.records; |
| | | console.log(response.data.pages); |
| | | totalRecords.value = response.data.total/2 || 0 |
| | | } else { |
| | | ElMessage.error(response.message); |
| | |
| | | } |
| | | } |
| | | const handlePageChange2 = (newPage) => { |
| | | currentPage2.value = newPage; |
| | | console.log(currentPage2.value); |
| | | window.localStorage.setItem('pagenumber', currentPage2.value) |
| | | historicala(currentPage2.value); |
| | | currentPage2.value = newPage; |
| | | console.log(newPage); |
| | | window.localStorage.setItem('pagenumber', currentPage2.value) |
| | | historicala(currentPage2.value); |
| | | }; |
| | | const historicala = async (page) => { |
| | | try { |
| | |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | | tableDatax.value = response.data.records; |
| | | console.log(response.data.pages); |
| | | |
| | | totalRecords.value = response.data.total/2 || 0 |
| | | } else { |
| | | ElMessage.error(response.message); |
| | |
| | | try { |
| | | let startTime = window.localStorage.getItem('startTime') |
| | | let page = window.localStorage.getItem('pagenumber') |
| | | console.log(page); |
| | | const response = await request.post("/cacheGlass/edgStorageDeviceTaskHistory", { |
| | | deviceId: 2, |
| | | pageNo: page, |
| | | pageNo: 1, |
| | | pageSize: 20, |
| | | glassId: glassId.value, |
| | | taskState: taskState.value, |
| | |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | | tableDatax.value = response.data.records; |
| | | totalRecords.value = response.data.total/2 || 0 |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | |
| | | ] |
| | | onMounted(() => { |
| | | parseAndSetTime(); |
| | | historical(1); |
| | | historical(); |
| | | }); |
| | | </script> |
| | | <style scoped> |
| | |
| | | <div> |
| | | <div style="display: flex;width: 1770px;"> |
| | | <el-input v-model="glassId" clearable style="margin-left: 10px;margin-bottom: 10px;width: 200px;" :placeholder="$t('searchOrder.inglassID')" /> |
| | | <el-input v-model="startSlot" clearable style="margin-left: 10px;margin-bottom: 10px;width: 200px;" :placeholder="$t('film.originateslot')" /> |
| | | <el-input v-model="targetSlot" clearable style="margin-left: 10px;margin-bottom: 10px;width: 200px;" :placeholder="$t('film.endslot')" /> |
| | | <el-input v-model="startSlot" clearable style="margin-left: 10px;margin-bottom: 10px;width: 200px;" @input="handleInputa" :placeholder="$t('film.originateslot')" /> |
| | | <el-input v-model="targetSlot" clearable style="margin-left: 10px;margin-bottom: 10px;width: 200px;" @input="handleInputb" :placeholder="$t('film.endslot')" /> |
| | | <el-select v-model="selectValuesa[0]" filterable :placeholder="$t('searchOrder.taskstatus')" clearable |
| | | style="width: 200px;margin-left: 10px;"> |
| | | <el-option :label="$t('searchOrder.begin')" value="0"></el-option> |
| | |
| | | </el-select> |
| | | <el-select v-model="selectValuesa[1]" filterable :placeholder="$t('film.enabletype')" clearable |
| | | style="width: 200px;margin-left: 10px;"> |
| | | <el-option :label="$t('searchOrder.inkage')" value="1"></el-option> |
| | | <el-option :label="$t('searchOrder.outfilm')" value="2"></el-option> |
| | | <el-option :label="$t('film.dispatch')" value="3"></el-option> |
| | | <el-option :label="$t('searchOrder.inkage')" value="4"></el-option> |
| | | <el-option :label="$t('searchOrder.outfilm')" value="5"></el-option> |
| | | <el-option :label="$t('film.dispatch')" value="6"></el-option> |
| | | </el-select> |
| | | <el-date-picker v-model="timeRange" type="datetimerange" range-separator="至" :start-placeholder="$t('reportmanage.starttime')" |
| | | style="margin-left: 15px;" value-format = "YYYY-MM-DD hh:mm:ss" |
| | |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="createTime" align="center" :label="$t('reportmanage.starttime')" min-width="100" /> |
| | | <el-table-column prop="updateTime" align="center" :label="$t('reportmanage.endtime')" min-width="100" /> |
| | | <el-table-column prop="formattedCreateTime" align="center" :label="$t('reportmanage.starttime')" min-width="100" /> |
| | | <el-table-column prop="formattedUpdateTime" align="center" :label="$t('reportmanage.endtime')" min-width="100" /> |
| | | </el-table> |
| | | <div style="margin-top: 20px;margin-left: 40%;"> |
| | | <el-pagination |
| | |
| | | const startSlot = ref(''); |
| | | const targetSlot = ref(''); |
| | | let getglobalDate = window.localStorage.getItem('getglobalDate') |
| | | // 处理输入事件 |
| | | const handleInputa = (value: string) => { |
| | | const isNumeric = /^\d*$/.test(value); |
| | | if (isNumeric) { |
| | | startSlot.value = value; |
| | | } else { |
| | | startSlot.value = ''; |
| | | } |
| | | }; |
| | | const handleInputb = (value: string) => { |
| | | const isNumeric = /^\d*$/.test(value); |
| | | if (isNumeric) { |
| | | targetSlot.value = value; |
| | | } else { |
| | | targetSlot.value = ''; |
| | | } |
| | | }; |
| | | const historical = async () => { |
| | | try { |
| | | let startTime = window.localStorage.getItem('startTime') |
| | |
| | | }) |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | | tableDatax.value = response.data.records; |
| | | console.log(response.data.pages); |
| | | |
| | | const formattedData = response.data.records.map(record => ({ |
| | | ...record, |
| | | formattedCreateTime: formatTimestamp(record.createTime), |
| | | formattedUpdateTime: formatTimestamp(record.updateTime), |
| | | })); |
| | | // tableDatax.value = response.data.records; |
| | | tableDatax.value = formattedData; |
| | | totalRecords.value = response.data.total/2 || 0 |
| | | } else { |
| | | ElMessage.error(response.message); |
| | |
| | | }; |
| | | const historicala = async (page) => { |
| | | try { |
| | | let celllist=[] |
| | | let stateList=[] |
| | | let pstartSlot= '' |
| | | let ptargetSlot='' |
| | | if(selectValuesa[0]!=null&&selectValuesa[0]!='undefined'){ |
| | | if(selectValuesa[0]!=""){ |
| | | celllist=[selectValuesa[0]]; |
| | | } |
| | | } |
| | | if(selectValuesa[1]!=null&&selectValuesa[1]!='undefined'){ |
| | | if(selectValuesa[1]!=""){ |
| | | stateList=[selectValuesa[1]]; |
| | | } |
| | | } |
| | | if(startSlot.value != ""){ |
| | | pstartSlot = startSlot.value |
| | | }else{ |
| | | pstartSlot = '0' |
| | | } |
| | | if(targetSlot.value != ""){ |
| | | ptargetSlot = targetSlot.value |
| | | }else{ |
| | | ptargetSlot = '0' |
| | | } |
| | | let page = window.localStorage.getItem('pagenumber') |
| | | let startTime = window.localStorage.getItem('startTime') |
| | | const response = await request.post("/hollowGlass/hollowBigStorageCageHistoryTask/queryHollowBigStorageCageHistoryTask", { |
| | | pageNo: page, |
| | | pageSize: 20, |
| | | glassId: glassId.value, |
| | | startSlot: 0, |
| | | targetSlot: 0, |
| | | taskStateList: [], |
| | | taskTypeList: [], |
| | | beginDate: startTime, |
| | | endDate: getglobalDate |
| | | startSlot: pstartSlot, |
| | | targetSlot: ptargetSlot, |
| | | taskStateList: celllist, |
| | | taskTypeList: stateList, |
| | | beginDate: (timeRange.value && timeRange.value[0]) || '', |
| | | endDate: (timeRange.value && timeRange.value[1]) || '', |
| | | }) |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | | tableDatax.value = response.data.records; |
| | | console.log(response.data.pages); |
| | | |
| | | const formattedData = response.data.records.map(record => ({ |
| | | ...record, |
| | | formattedCreateTime: formatTimestamp(record.createTime), |
| | | formattedUpdateTime: formatTimestamp(record.updateTime), |
| | | })); |
| | | // tableDatax.value = response.data.records; |
| | | tableDatax.value = formattedData; |
| | | totalRecords.value = response.data.total/2 || 0 |
| | | } else { |
| | | ElMessage.error(response.message); |
| | |
| | | } |
| | | let page = window.localStorage.getItem('pagenumber') |
| | | const response = await request.post("/hollowGlass/hollowBigStorageCageHistoryTask/queryHollowBigStorageCageHistoryTask", { |
| | | pageNo: page, |
| | | pageNo: 1, |
| | | pageSize: 20, |
| | | glassId: glassId.value, |
| | | startSlot: pstartSlot, |
| | | targetSlot: ptargetSlot, |
| | | taskStateList: celllist, |
| | | taskTypeList: stateList, |
| | | beginDate: startTime, |
| | | endDate: getglobalDate |
| | | beginDate: (timeRange.value && timeRange.value[0]) || '', |
| | | endDate: (timeRange.value && timeRange.value[1]) || '', |
| | | }) |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | | tableDatax.value = response.data.records; |
| | | currentPage2.value = 1 |
| | | ElMessage.success(response.message); |
| | | const formattedData = response.data.records.map(record => ({ |
| | | ...record, |
| | | formattedCreateTime: formatTimestamp(record.createTime), |
| | | formattedUpdateTime: formatTimestamp(record.updateTime), |
| | | })); |
| | | // tableDatax.value = response.data.records; |
| | | tableDatax.value = formattedData; |
| | | totalRecords.value = response.data.total/2 || 0 |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | |
| | | } |
| | | function getStatusTypea(taskType: number) { |
| | | switch (taskType) { |
| | | case 1: |
| | | case 4: |
| | | return 'primary'; |
| | | case 2: |
| | | case 5: |
| | | return 'success'; |
| | | case 3: |
| | | case 6: |
| | | return 'warning'; |
| | | } |
| | | } |
| | | function getStatusTexta(taskType: number) { |
| | | switch (taskType) { |
| | | case 1: |
| | | case 4: |
| | | return t('searchOrder.inkage'); |
| | | case 2: |
| | | case 5: |
| | | return t('searchOrder.outfilm'); |
| | | case 3: |
| | | case 6: |
| | | return t('film.dispatch'); |
| | | } |
| | | } |
| | |
| | | import com.mes.bigstoragecagetask.entity.BigStorageCageHistoryTask; |
| | | import com.mes.bigstoragecagetask.entity.request.BigStorageCageHistoryRequest; |
| | | import com.mes.bigstoragecagetask.service.BigStorageCageHistoryTaskService; |
| | | import com.mes.largenscreen.entity.DailyProductionVO; |
| | | import com.mes.utils.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Author : zhoush |
| | |
| | | public Result<Page<BigStorageCageHistoryTask>> queryBigStorageCageHistoryTask(@RequestBody @Validated BigStorageCageHistoryRequest request) { |
| | | return Result.build(200, "查询成功", bigStorageCageHistoryTaskService.queryBigStorageCageHistoryTask(request)); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询本条线历史指定日期的日生产数据", notes = "查询本条线历史指定日期的日生产数据") |
| | | @PostMapping("/queryBigDailyProduction") |
| | | public Result<DailyProductionVO> queryBigDailyProduction(@RequestBody BigStorageCageHistoryRequest request) { |
| | | return Result.success(bigStorageCageHistoryTaskService.queryBigDailyProduction(request)); |
| | | } |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.mes.bigstoragecagetask.entity.BigStorageCageHistoryTask; |
| | | import com.mes.largenscreen.entity.DailyProductionVO; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * (BigStorageCageHistoryTask)表数据库访问层 |
| | |
| | | */ |
| | | public interface BigStorageCageHistoryTaskMapper extends BaseMapper<BigStorageCageHistoryTask> { |
| | | |
| | | DailyProductionVO queryBigDailyProduction(@Param("beginDate") String beginDate, @Param("endDate") String endDate); |
| | | } |
| | | |
| | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.mes.bigstoragecagetask.entity.BigStorageCageHistoryTask; |
| | | import com.mes.bigstoragecagetask.entity.request.BigStorageCageHistoryRequest; |
| | | |
| | | import java.util.List; |
| | | import com.mes.largenscreen.entity.DailyProductionVO; |
| | | |
| | | /** |
| | | * (BigStorageCageHistoryTask)表服务接口 |
| | |
| | | public interface BigStorageCageHistoryTaskService extends IService<BigStorageCageHistoryTask> { |
| | | |
| | | Page<BigStorageCageHistoryTask> queryBigStorageCageHistoryTask(BigStorageCageHistoryRequest request); |
| | | |
| | | DailyProductionVO queryBigDailyProduction(BigStorageCageHistoryRequest request); |
| | | } |
| | | |
| | |
| | | import com.mes.bigstoragecagetask.entity.request.BigStorageCageHistoryRequest; |
| | | import com.mes.bigstoragecagetask.mapper.BigStorageCageHistoryTaskMapper; |
| | | import com.mes.bigstoragecagetask.service.BigStorageCageHistoryTaskService; |
| | | import com.mes.largenscreen.entity.DailyProductionVO; |
| | | import com.mes.tools.DateUtil; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | |
| | | /** |
| | | * (BigStorageCageHistoryTask)表服务实现类 |
| | |
| | | .orderByDesc(BigStorageCageHistoryTask::getCreateTime); |
| | | return this.page(page, wrapper); |
| | | } |
| | | |
| | | @Override |
| | | public DailyProductionVO queryBigDailyProduction(BigStorageCageHistoryRequest request) { |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| | | String beginDate = null; |
| | | String endDate = null; |
| | | if (com.baomidou.mybatisplus.core.toolkit.StringUtils.checkValNotNull(request.getBeginDate())) { |
| | | beginDate = sdf.format(request.getBeginDate()); |
| | | endDate = sdf.format(request.getEndDate()); |
| | | } |
| | | return baseMapper.queryBigDailyProduction(beginDate, endDate); |
| | | } |
| | | } |
| | | |
| | |
| | | password: 123456 |
| | | kangaroohy: |
| | | milo: |
| | | enabled: false |
| | | enabled: true |
| | | primary: default |
| | | config: |
| | | default: |
| | |
| | | thread-name-prefix: task-cacheVertical |
| | | mybatis-plus: |
| | | mapper-locations: classpath*:mapper/*.xml |
| | | # configuration: |
| | | # log-impl: org.apache.ibatis.logging.stdout.StdOutImpl |
| | | configuration: |
| | | log-impl: org.apache.ibatis.logging.stdout.StdOutImpl |
| | | mes: |
| | | sequence: |
| | | order: true |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
| | | <mapper namespace="com.mes.bigstoragecagetask.mapper.BigStorageCageHistoryTaskMapper"> |
| | | |
| | | <resultMap id="baseMap" type="com.mes.largenscreen.entity.DailyProductionVO"> |
| | | <result column="date" property="date"/> |
| | | <result column="count_out_one" property="countOutOne"/> |
| | | <result column="total_area_out_one" property="totalAreaOutOne"/> |
| | | <result column="count_out_two" property="countOutTwo"/> |
| | | <result column="total_area_out_two" property="totalAreaOutTwo"/> |
| | | <result column="count_in" property="countIn"/> |
| | | <result column="total_area_in" property="totalAreaIn"/> |
| | | <result column="count_out" property="countOut"/> |
| | | <result column="total_area_out" property="totalAreaOut"/> |
| | | <result column="hollow_count_out_one" property="hollowCountOutOne"/> |
| | | <result column="hollow_total_area_out_one" property="hollowTotalAreaOutOne"/> |
| | | <result column="hollow_count_out_two" property="hollowCountOutTwo"/> |
| | | <result column="hollow_total_area_out_two" property="hollowTotalAreaOutTwo"/> |
| | | </resultMap> |
| | | |
| | | <select id="queryBigDailyProduction" resultMap="baseMap"> |
| | | with big_storage_in_temp as ( |
| | | select count(t.glass_id) as count_in, round(sum(t1.width * t1.height) / 1000000, 2) as total_area_in |
| | | from big_storage_cage_history_task t |
| | | INNER JOIN glass_info t1 on t.glass_id = t1.glass_id |
| | | where t.task_type = 1 |
| | | <if test="beginDate != null and beginDate != ''"> |
| | | AND STR_TO_DATE( t.create_time, '%Y-%m-%d' ) BETWEEN #{beginDate} |
| | | AND #{endDate} |
| | | </if> |
| | | ), |
| | | big_storage_out_temp as ( |
| | | select count(t.glass_id) as count_out, round(sum(t1.width * t1.height) / 1000000, 2) as total_area_out |
| | | from big_storage_cage_history_task t |
| | | INNER JOIN glass_info t1 on t.glass_id = t1.glass_id |
| | | where t.task_type = 2 |
| | | <if test="beginDate != null and beginDate != ''"> |
| | | AND STR_TO_DATE( t.create_time, '%Y-%m-%d' ) BETWEEN #{beginDate} |
| | | AND #{endDate} |
| | | </if> |
| | | ) |
| | | select * |
| | | from big_storage_in_temp |
| | | INNER join big_storage_out_temp on 1 = 1 |
| | | |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | engineer_id |
| | | ORDER BY |
| | | percent DESC, |
| | | thickness DESC, |
| | | countSlot DESC |
| | | countSlot DESC, |
| | | thickness DESC |
| | | </select> |
| | | |
| | | |
| | |
| | | |
| | | mybatis-plus: |
| | | mapper-locations: classpath*:mapper/*.xml |
| | | # configuration: |
| | | # log-impl: org.apache.ibatis.logging.stdout.StdOutImpl |
| | | |
| | |
| | | enabled: false |
| | | mybatis-plus: |
| | | mapper-locations: classpath*:mapper/*.xml |
| | | configuration: |
| | | log-impl: org.apache.ibatis.logging.stdout.StdOutImpl |
| | | # configuration: |
| | | # log-impl: org.apache.ibatis.logging.stdout.StdOutImpl |
| | | mes: |
| | | width: 2800 |
| | | height: 5000 |
| | |
| | | glassAndFrame.setFrameList(frameList); |
| | | glassAndFrameList.add(glassAndFrame); |
| | | }); |
| | | Collections.sort(glassAndFrameList, (s1, s2) -> Integer.parseInt(s1.getItemNum()) - Integer.parseInt(s2.getItemNum())); |
| | | details.setGlassAndFrameList(glassAndFrameList); |
| | | |
| | | |
| | |
| | | if (930 == request.getCell()) { |
| | | Map<Integer, List<HollowBigStorageCageDetails>> listMap = hollowBigStorageCageDetailsList.stream() |
| | | .collect(Collectors.groupingBy(HollowBigStorageCageDetails::getHollowSequence)); |
| | | List<List<HollowGlassQueueInfo>> disorderList = new ArrayList<>(); |
| | | for (Map.Entry<Integer, List<HollowBigStorageCageDetails>> entry : listMap.entrySet()) { |
| | | //创建队列接收不满足成对情况下:一对玻璃分几次上车的次序问题 |
| | | List<HollowGlassQueueInfo> tempList = new ArrayList<>(); |
| | |
| | | for (HollowBigStorageCageDetails item : reverse) { |
| | | remainWidth = remainWidth - (int) Math.max(item.getWidth(), item.getHeight()); |
| | | if (remainWidth < 0) { |
| | | hollowQueues.addAll(CollectionUtil.reverse(tempList)); |
| | | disorderList.add(CollectionUtil.reverse(tempList)); |
| | | tempList = new ArrayList<>(); |
| | | remainWidth = carWidth - (int) Math.max(item.getWidth(), item.getHeight()); |
| | | } |
| | |
| | | tempList.add(queueInfo); |
| | | remainWidth = remainWidth - glassGap; |
| | | } |
| | | hollowQueues.addAll(CollectionUtil.reverse(tempList)); |
| | | disorderList.add(CollectionUtil.reverse(tempList)); |
| | | HollowBigStorageCageDetails cageDetails = entry.getValue().get(0); |
| | | if (cageDetails.getIsPair() == 1) { |
| | | isPairCount = isPairCount - cageDetails.getTotalLayer(); |
| | |
| | | } |
| | | } |
| | | } |
| | | //防止玻璃中空线玻璃无序,将玻璃按照顺序重新排序 |
| | | Collections.sort(disorderList, (s1, s2) -> s1.get(0).getHollowSequence() - s2.get(0).getHollowSequence()); |
| | | for (List<HollowGlassQueueInfo> list : disorderList) { |
| | | hollowQueues.addAll(list); |
| | | } |
| | | } else { |
| | | loop: |
| | | for (HollowBigStorageCageDetails item : hollowBigStorageCageDetailsList) { |
| | |
| | | import com.mes.hollowtask.entity.HollowBigStorageCageHistoryTask; |
| | | import com.mes.hollowtask.entity.request.HollowBigStorageCageHistoryRequest; |
| | | import com.mes.hollowtask.service.HollowBigStorageCageHistoryTaskService; |
| | | import com.mes.largenscreen.entity.DailyProductionVO; |
| | | import com.mes.utils.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * (HollowBigStorageCageHistoryTask)表控制层 |
| | |
| | | public Result<Page<HollowBigStorageCageHistoryTask>> queryHollowBigStorageCageHistoryTask(@RequestBody @Validated HollowBigStorageCageHistoryRequest request) { |
| | | return Result.build(200, "查询成功", hollowBigStorageCageHistoryTaskService.queryHollowBigStorageCageHistoryTask(request)); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询本条线历史指定日期的日生产数据", notes = "查询本条线历史指定日期的日生产数据") |
| | | @PostMapping("/queryHollowDailyProduction") |
| | | public Result<DailyProductionVO> queryHollowDailyProduction(@RequestBody HollowBigStorageCageHistoryRequest request) { |
| | | return Result.success(hollowBigStorageCageHistoryTaskService.queryHollowDailyProduction(request)); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.mes.hollowtask.entity.HollowBigStorageCageHistoryTask; |
| | | import com.mes.largenscreen.entity.DailyProductionVO; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * (HollowBigStorageCageHistoryTask)表数据库访问层 |
| | |
| | | */ |
| | | public interface HollowBigStorageCageHistoryTaskMapper extends BaseMapper<HollowBigStorageCageHistoryTask> { |
| | | |
| | | DailyProductionVO queryHollowDailyProduction(@Param("beginDate") String beginDate, @Param("endDate") String endDate); |
| | | } |
| | | |
| | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.mes.hollowtask.entity.HollowBigStorageCageHistoryTask; |
| | | import com.mes.hollowtask.entity.request.HollowBigStorageCageHistoryRequest; |
| | | import com.mes.largenscreen.entity.DailyProductionVO; |
| | | |
| | | /** |
| | | * (HollowBigStorageCageHistoryTask)表服务接口 |
| | |
| | | public interface HollowBigStorageCageHistoryTaskService extends IService<HollowBigStorageCageHistoryTask> { |
| | | |
| | | Page<HollowBigStorageCageHistoryTask> queryHollowBigStorageCageHistoryTask(HollowBigStorageCageHistoryRequest request); |
| | | |
| | | DailyProductionVO queryHollowDailyProduction(HollowBigStorageCageHistoryRequest request); |
| | | } |
| | | |
| | |
| | | import com.mes.hollowtask.entity.request.HollowBigStorageCageHistoryRequest; |
| | | import com.mes.hollowtask.mapper.HollowBigStorageCageHistoryTaskMapper; |
| | | import com.mes.hollowtask.service.HollowBigStorageCageHistoryTaskService; |
| | | import com.mes.largenscreen.entity.DailyProductionVO; |
| | | import com.mes.tools.DateUtil; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | |
| | | /** |
| | | * (HollowBigStorageCageHistoryTask)表服务实现类 |
| | |
| | | } |
| | | LambdaQueryWrapper<HollowBigStorageCageHistoryTask> wrapper = new LambdaQueryWrapper<HollowBigStorageCageHistoryTask>() |
| | | .like(StringUtils.isNotBlank(request.getGlassId()), HollowBigStorageCageHistoryTask::getGlassId, request.getGlassId()) |
| | | .eq(request.getStartSlot() !=0, HollowBigStorageCageHistoryTask::getStartSlot, request.getStartSlot()) |
| | | .eq(request.getTargetSlot() !=0, HollowBigStorageCageHistoryTask::getTargetSlot, request.getTargetSlot()) |
| | | .in(CollectionUtil.isNotEmpty(request.getTaskStateList()) , HollowBigStorageCageHistoryTask::getTaskState, request.getTaskStateList()) |
| | | .in(CollectionUtil.isNotEmpty(request.getTaskTypeList()) , HollowBigStorageCageHistoryTask::getTaskType, request.getTaskTypeList()) |
| | | .eq(request.getStartSlot() != 0, HollowBigStorageCageHistoryTask::getStartSlot, request.getStartSlot()) |
| | | .eq(request.getTargetSlot() != 0, HollowBigStorageCageHistoryTask::getTargetSlot, request.getTargetSlot()) |
| | | .in(CollectionUtil.isNotEmpty(request.getTaskStateList()), HollowBigStorageCageHistoryTask::getTaskState, request.getTaskStateList()) |
| | | .in(CollectionUtil.isNotEmpty(request.getTaskTypeList()), HollowBigStorageCageHistoryTask::getTaskType, request.getTaskTypeList()) |
| | | .between(HollowBigStorageCageHistoryTask::getCreateTime, request.getBeginDate(), request.getEndDate()) |
| | | .orderByDesc(HollowBigStorageCageHistoryTask::getCreateTime); |
| | | return this.page(page,wrapper); |
| | | return this.page(page, wrapper); |
| | | } |
| | | |
| | | @Override |
| | | public DailyProductionVO queryHollowDailyProduction(HollowBigStorageCageHistoryRequest request) { |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| | | String beginDate = null; |
| | | String endDate = null; |
| | | if (com.baomidou.mybatisplus.core.toolkit.StringUtils.checkValNotNull(request.getBeginDate())) { |
| | | beginDate = sdf.format(request.getBeginDate()); |
| | | endDate = sdf.format(request.getEndDate()); |
| | | } |
| | | return baseMapper.queryHollowDailyProduction(beginDate, endDate); |
| | | } |
| | | } |
| | | |
| | |
| | | # thread-name-prefix: task-hollowGlass |
| | | mybatis-plus: |
| | | mapper-locations: classpath*:mapper/*.xml |
| | | configuration: |
| | | log-impl: org.apache.ibatis.logging.stdout.StdOutImpl |
| | | # configuration: |
| | | # log-impl: org.apache.ibatis.logging.stdout.StdOutImpl |
| | | mes: |
| | | sequence: |
| | | order: true |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
| | | <mapper namespace="com.mes.hollowtask.mapper.HollowBigStorageCageHistoryTaskMapper"> |
| | | |
| | | <resultMap id="baseMap" type="com.mes.largenscreen.entity.DailyProductionVO"> |
| | | <result column="date" property="date"/> |
| | | <result column="count_out_one" property="countOutOne"/> |
| | | <result column="total_area_out_one" property="totalAreaOutOne"/> |
| | | <result column="count_out_two" property="countOutTwo"/> |
| | | <result column="total_area_out_two" property="totalAreaOutTwo"/> |
| | | <result column="count_in" property="countIn"/> |
| | | <result column="total_area_in" property="totalAreaIn"/> |
| | | <result column="count_out" property="countOut"/> |
| | | <result column="total_area_out" property="totalAreaOut"/> |
| | | <result column="hollow_count_out_one" property="hollowCountOutOne"/> |
| | | <result column="hollow_total_area_out_one" property="hollowTotalAreaOutOne"/> |
| | | <result column="hollow_count_out_two" property="hollowCountOutTwo"/> |
| | | <result column="hollow_total_area_out_two" property="hollowTotalAreaOutTwo"/> |
| | | </resultMap> |
| | | |
| | | <select id="queryHollowDailyProduction" resultMap="baseMap"> |
| | | with hollow_out_one_temp as ( |
| | | select count(t.glass_id) as hollow_count_out_one, |
| | | round(sum(t1.width * t1.height) / 1000000, 2) as hollow_total_area_out_one |
| | | from hollow_big_storage_cage_history_task t |
| | | INNER JOIN glass_info t1 on t.glass_id = t1.glass_id |
| | | where t.task_type = 5 |
| | | and t.target_slot = 930 |
| | | <if test="beginDate != null and beginDate != ''"> |
| | | AND STR_TO_DATE( t.create_time, '%Y-%m-%d' ) BETWEEN #{beginDate} |
| | | AND #{endDate} |
| | | </if> |
| | | ), |
| | | hollow_out_two_temp as ( |
| | | select count(t.glass_id) as hollow_count_out_two, |
| | | round(sum(t1.width * t1.height) / 1000000, 2) as hollow_total_area_out_two |
| | | from hollow_big_storage_cage_history_task t |
| | | INNER JOIN glass_info t1 on t.glass_id = t1.glass_id |
| | | where t.task_type = 5 |
| | | and t.target_slot = 931 |
| | | <if test="beginDate != null and beginDate != ''"> |
| | | AND STR_TO_DATE( t.create_time, '%Y-%m-%d' ) BETWEEN #{beginDate} |
| | | AND #{endDate} |
| | | </if> |
| | | ) |
| | | select * |
| | | from hollow_out_one_temp |
| | | inner join hollow_out_two_temp on 1 = 1 |
| | | </select> |
| | | </mapper> |