Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override
| | |
| | | teamsGroupsName:'上工序报工', |
| | | productionReport:'生产报表', |
| | | workInProgressReport:'在制品报表', |
| | | WorkInProgressCombination:'在制品汇总报表', |
| | | processToBeCompleted:'工序待完成报表', |
| | | productionAndShippingProgress:'生产发货进度报表', |
| | | processCardProgress:'流程卡进度报表', |
| | |
| | | component: () => import('../views/pp/report/WorkInProgress.vue'), |
| | | }, |
| | | { |
| | | //在制品汇总报表 |
| | | path: 'workInProgressCombination', |
| | | name: 'workInProgressCombination', |
| | | component: () => import('../views/pp/report/WorkInProgressCombination.vue'), |
| | | }, |
| | | { |
| | | //成品率报表 |
| | | path: 'yield', |
| | | name: 'yield', |
| | |
| | | |
| | | <el-sub-menu index="1" > |
| | | <template #title >{{$t('report.productionReport')}}</template> |
| | | <!-- <el-menu-item index="/main/report/WorkInProgressCombination">{{$t('report.WorkInProgressCombination')}}</el-menu-item>--> |
| | | <el-menu-item index="/main/report/WorkInProgress">{{$t('report.workInProgressReport')}}</el-menu-item> |
| | | <el-menu-item index="/main/report/ProcessToBeCompleted">{{$t('report.processToBeCompleted')}}</el-menu-item> |
| | | <el-menu-item index="/main/report/ProductionSchedule">{{$t('report.productionAndShippingProgress')}}</el-menu-item> |
| New file |
| | |
| | | <script setup> |
| | | |
| | | import {reactive, ref} from "vue"; |
| | | import {useRouter} from 'vue-router' |
| | | import request from "@/utils/request"; |
| | | import deepClone from "@/utils/deepClone"; |
| | | import {ElCheckbox, ElDatePicker, ElMessage} from "element-plus"; |
| | | import {useI18n} from 'vue-i18n' |
| | | //import {changeFilterEvent, filterChanged} from "@/hook" |
| | | import footSum from "@/hook/footSum" |
| | | //语言获取 |
| | | const {t} = useI18n() |
| | | let router = useRouter() |
| | | let filterData = ref({}) |
| | | //提交的表单 |
| | | const form = reactive({ |
| | | date1: '', |
| | | orderId: '', |
| | | project: '' |
| | | }) |
| | | |
| | | //项目名称汇总 |
| | | let projectSummary= ref(1) |
| | | //工序 |
| | | const value = ref() |
| | | |
| | | //根据以下字段汇总查询 |
| | | const stateValue = ref('') |
| | | const stateOptions = [ |
| | | { |
| | | value: 1, |
| | | label: t('order.orderId'), |
| | | }, |
| | | { |
| | | value: 2, |
| | | label: t('processCard.processId'), |
| | | }, |
| | | // { |
| | | // value: 3, |
| | | // label: t('order.project'), |
| | | // }, |
| | | { |
| | | value: 4, |
| | | label: t('processCard.technologyNumber'), |
| | | }, |
| | | ] |
| | | |
| | | //表尾求和 |
| | | const sumNum = (list, field) => { |
| | | let count = 0 |
| | | list.forEach(item => { |
| | | count += Number(item[field]) |
| | | }) |
| | | return count.toFixed(2) |
| | | } |
| | | |
| | | //定义滚动条高度 |
| | | let scrollTop = ref(null) |
| | | let scrollHeight = ref(null) |
| | | let clientHeight = ref(null) |
| | | const scrollEvnt = (row) => { |
| | | // 内容高度 |
| | | scrollTop.value = row.$event.target.scrollTop |
| | | scrollHeight.value = row.$event.target.scrollHeight |
| | | clientHeight.value = row.$event.target.clientHeight |
| | | } |
| | | |
| | | |
| | | //定义页面总页数 |
| | | let pageTotal = ref('') |
| | | //定义数据返回结果 |
| | | let produceList = ref([]) |
| | | //定义当前页数 |
| | | let pageNum = ref(1) |
| | | let pageState = null |
| | | |
| | | |
| | | |
| | | //第一次加载 |
| | | let selectProcesses = value.value |
| | | let inputVal = form.orderId |
| | | if (inputVal == '') { |
| | | inputVal = null |
| | | } |
| | | let inputProject = form.project |
| | | if (inputProject == '') { |
| | | inputProject = null |
| | | } |
| | | let total = reactive({ |
| | | pageTotal: 0, |
| | | dataTotal: 0, |
| | | pageSize: 100 |
| | | }) |
| | | let newItem= ref({ |
| | | basic_name: '全部', |
| | | basic_type: 'product', |
| | | basic_category: 'process', |
| | | id: "001" |
| | | }) |
| | | //定义接收加载表头下拉数据 |
| | | const titleSelectJson = ref({ |
| | | processType: [], |
| | | }) |
| | | let optionVal=projectSummary.value |
| | | if (optionVal == '') { |
| | | optionVal = null |
| | | } |
| | | //第一次加载数据 |
| | | request.post(`/report/workInProgressCombination/1/${total.pageSize}/${selectProcesses}/${optionVal}`, filterData.value).then((res) => { |
| | | |
| | | if (res.code == 200) { |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | pageTotal.value = res.data.total |
| | | total.value = res.data.total |
| | | produceList = produceList.value.concat(deepClone(res.data.data)) |
| | | titleSelectJson.value.processType = res.data.process |
| | | titleSelectJson.value.processType.splice(0,1) |
| | | titleSelectJson.value.processType.unshift(newItem.value) |
| | | //xGrid.value.reloadData(produceList) |
| | | gridOptions.loading = false |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | |
| | | //页脚翻页查询 |
| | | const selectPageList = () => { |
| | | let inputVal = form.orderId |
| | | let selectProcesses = value.value |
| | | if (inputVal == '') { |
| | | inputVal = null |
| | | } |
| | | let inputProject = form.project |
| | | if (inputProject == '') { |
| | | inputProject = null |
| | | } |
| | | let optionVal=projectSummary.value |
| | | if (optionVal == '') { |
| | | optionVal = null |
| | | } |
| | | request.post(`/report/workInProgressCombination/${pageNum.value}/${total.pageSize}/${inputVal}/${inputProject}/${selectProcesses}/${optionVal}`, filterData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | total.value = res.data.total |
| | | produceList = deepClone(res.data.data) |
| | | produceList.forEach(item => { |
| | | // 如果 shape 可能是字符串就用 ==,如果一定是数字就用 === |
| | | item.shape = (item.shape == 2) ? t('order.alien') : t('order.universalShape'); |
| | | }); |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading = false |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //点击查询 |
| | | const getWorkOrder = () => { |
| | | gridOptions.loading = true |
| | | let selectProcesses = value.value |
| | | let inputVal = form.orderId |
| | | if (inputVal == '') { |
| | | inputVal = null |
| | | } |
| | | let inputProject = form.project |
| | | if (inputProject == '') { |
| | | inputProject = null |
| | | } |
| | | let optionVal=projectSummary.value |
| | | if (optionVal == '') { |
| | | optionVal = null |
| | | } |
| | | request.post(`/report/workInProgressCombination/${pageNum.value}/${total.pageSize}/${inputVal}/${inputProject}/${selectProcesses}/${optionVal}`, filterData.value).then((res) => { |
| | | |
| | | if (res.code == 200) { |
| | | total.dataTotal = res.data.total.total * 1 |
| | | total.pageTotal = res.data.total.pageTotal |
| | | pageTotal.value = res.data.total |
| | | total.value = res.data.total |
| | | res.data.data.forEach(item => { |
| | | // 如果 shape 可能是字符串就用 ==,如果一定是数字就用 === |
| | | item.shape = (item.shape == 2) ? t('order.alien') : t('order.universalShape'); |
| | | }); |
| | | xGrid.value.loadData(res.data.data) |
| | | gridOptions.loading = false |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | //handleUpdateData(produceList) |
| | | }) |
| | | } |
| | | |
| | | //页脚跳转 |
| | | const handlePageChange = ({currentPage, pageSize}) => { |
| | | pageNum.value = currentPage |
| | | total.pageTotal = pageSize |
| | | selectPageList() |
| | | } |
| | | |
| | | |
| | | /*使用筛选,后端获取数据*/ |
| | | const changeFilterEvent = (event, option, $panel,) => { |
| | | // 手动触发筛选 |
| | | $panel.changeOption(event, !!option.data, option) |
| | | } |
| | | |
| | | function filterChanged(column){ |
| | | gridOptions.loading = true |
| | | //筛选条件发生变化条件发生变化 |
| | | let value = column.datas[0] != undefined ? column.datas[0] : '' |
| | | value = value.trim() |
| | | //判断是否存在外键 |
| | | if (column.property.indexOf('.') > -1) { |
| | | const columnArr = column.property.split('.') |
| | | filterData.value[columnArr[0]] = { |
| | | [columnArr[1]]: value |
| | | } |
| | | } else { |
| | | filterData.value[column.property] = value |
| | | } |
| | | |
| | | getWorkOrder() |
| | | |
| | | |
| | | } |
| | | |
| | | /*后端返回结果多层嵌套展示*/ |
| | | const hasDecimal = (value) => { |
| | | const regex = /\./; // 定义正则表达式,查找小数点 |
| | | return regex.test(value); // 返回true/false |
| | | } |
| | | |
| | | //子组件接收参数 |
| | | const xGrid = ref() |
| | | const gridOptions = reactive({ |
| | | loading: true, |
| | | border: "full",//表格加边框 |
| | | keepSource: true,//保持源数据 |
| | | align: 'center',//文字居中 |
| | | stripe: true,//斑马纹 |
| | | rowConfig: {isCurrent: true, isHover: true, height: 30},//鼠标移动或选择高亮 |
| | | id: 'WorkInProgress', |
| | | showFooter: true,//显示脚 |
| | | printConfig: {}, |
| | | importConfig: {}, |
| | | exportConfig: {}, |
| | | scrollY: {enabled: true},//开启虚拟滚动 |
| | | showOverflow: true, |
| | | columnConfig: { |
| | | resizable: true, |
| | | useKey: true |
| | | }, |
| | | filterConfig: { //筛选配置项 |
| | | // remote: true |
| | | }, |
| | | customConfig: { |
| | | storage: true |
| | | }, |
| | | editConfig: { |
| | | trigger: 'click', |
| | | mode: 'row', |
| | | showStatus: true |
| | | },//表头参数 |
| | | columns: [ |
| | | {type: 'expand', fixed: "left", slots: {content: 'content'}, width: 50}, |
| | | {type: 'seq', fixed: "left", title: t('basicData.Number'), width: 50}, |
| | | { |
| | | field: 'thisProcess', width: 120, title: t('report.workingProcedure'), |
| | | visible: true |
| | | }, |
| | | { |
| | | field: 'project', width: 120, title: t('order.project'), filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | visible: true |
| | | }, |
| | | {field: 'stockNum', width: 120, title: t('productStock.inventoryQuantity'),visible: true}, |
| | | {field: 'stockArea', width: 120, title: t('report.inventoryArea'),visible: true}, |
| | | {field: 'glassName', width: 120, title: t('report.workProcessName'),visible: true}, |
| | | ],//表头按钮 |
| | | |
| | | toolbarConfig: { |
| | | // buttons: [{ |
| | | // |
| | | // }], |
| | | slots: { |
| | | tools: 'toolbar_buttons' |
| | | }, |
| | | // import: false, |
| | | // export: true, |
| | | // print: true, |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | | data: [],//table body实际数据 |
| | | //脚部求和 |
| | | footerMethod ({ columns, data }) {//页脚函数 |
| | | return[ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return t('basicData.total') |
| | | } |
| | | const List = ["quantity",'stockNum','stockArea',] |
| | | if (List.includes(column.field)) { |
| | | //return footSum(data, column.field) |
| | | return total.value?.[column.field] ?? 0 |
| | | } |
| | | return '' |
| | | }) |
| | | ] |
| | | }, |
| | | |
| | | }) |
| | | |
| | | function exportExcel(url, fileName,date) { |
| | | let processes = value.value |
| | | let inputVal = form.orderId |
| | | if (inputVal == '') { |
| | | inputVal = null |
| | | } |
| | | let inputProject = form.project |
| | | if (inputProject == '') { |
| | | inputProject = null |
| | | } |
| | | if(date===null){ |
| | | ElMessage.warning(t('report.pleaseSelectADateFirst')) |
| | | return |
| | | } |
| | | |
| | | if(processes===null){ |
| | | ElMessage.warning(t('report.pleaseSelectAProcessFirst')) |
| | | return |
| | | } |
| | | |
| | | const date1 = new Date(date[0]); |
| | | const date2 = new Date(date[1]); |
| | | const timeDiff = Math.abs(date2.getTime() - date1.getTime()); |
| | | const daysDiff = timeDiff / (1000 * 3600 * 24); |
| | | if(Math.floor(daysDiff)>180){ |
| | | ElMessage.warning(t('report.theFilteringTimeForExportCannotExceed180Days')) |
| | | return |
| | | } |
| | | let dataMp = ref({ |
| | | date: date, |
| | | processes: processes, |
| | | orderId: inputVal, |
| | | project: inputProject |
| | | }) |
| | | request.post(url,dataMp.value,{responseType :'blob'}).then(res => { |
| | | const blob = new Blob([res]) |
| | | if ('download' in document.createElement('a')) { // 非IE下载 |
| | | const elink = document.createElement('a') |
| | | elink.download = `${fileName}.xlsx` |
| | | elink.style.display = 'none' |
| | | elink.href = URL.createObjectURL(blob) |
| | | document.body.appendChild(elink) |
| | | elink.click() |
| | | URL.revokeObjectURL(elink.href) // 释放URL 对象 |
| | | document.body.removeChild(elink) |
| | | } else { // IE10+下载 |
| | | navigator.msSaveBlob(blob, fileName) |
| | | } |
| | | |
| | | }) |
| | | } |
| | | |
| | | const handleUpdateData = (data) =>{ |
| | | |
| | | // const usedColumns = new Set(); |
| | | // data.forEach(row => { |
| | | // Object.keys(row).forEach(key => { |
| | | // usedColumns.add(key); |
| | | // }); |
| | | // }); |
| | | // // 更新 columns 数组的 visible 属性来控制列的显示 |
| | | // gridOptions.columns.forEach(column => { |
| | | // |
| | | // column.visible = usedColumns.has(column.field); |
| | | // }); |
| | | |
| | | //const columns = gridOptions.columns; |
| | | // const ageColumn = columns.find(col => col.property === 'age'); |
| | | // if (ageColumn) { |
| | | // ageColumn.visible = !ageColumn.visible; |
| | | // VXETable.updateColumns(tableRef.value, columns); |
| | | // } |
| | | } |
| | | function onlandingSequenceChange(checked) { |
| | | projectSummary.value = checked ? 0 : 1 |
| | | } |
| | | </script> |
| | | |
| | | <template> |
| | | <div style="width: 100%;height: 100%"> |
| | | <div class="head"> |
| | | |
| | | <el-select v-model="value" clearable :placeholder="$t('reportingWorks.selectProcess')" default-value="default_city" style="width: 120px"> |
| | | <el-option |
| | | v-for="item in titleSelectJson['processType']" |
| | | :key="item.id" |
| | | :label="item.basic_name" |
| | | :value="item.basic_name" |
| | | /> |
| | | </el-select> |
| | | |
| | | <el-checkbox |
| | | :model-value="projectSummary === 0" |
| | | @change="onlandingSequenceChange" |
| | | > |
| | | {{ t('order.project') }} |
| | | </el-checkbox> |
| | | |
| | | <el-button type="primary" @click="getWorkOrder">{{$t('basicData.search')}}</el-button> |
| | | </div> |
| | | <div class="main-table"> |
| | | <vxe-grid |
| | | ref="xGrid" |
| | | class="mytable-scrollbar" |
| | | height="100%" |
| | | v-bind="gridOptions" |
| | | :optimize="true" |
| | | @filter-change="filterChanged" |
| | | |
| | | > |
| | | <!-- @toolbar-button-click="toolbarButtonClickEvent"--> |
| | | <!-- 下拉显示所有信息插槽--> |
| | | <template #content="{ row }"> |
| | | <ul class="expand-wrapper"> |
| | | <li v-for="(item,index) in gridOptions.columns" v-show="item.field!=undefined "> |
| | | <span style="font-weight: bold">{{ item.title + ': ' }}</span> |
| | | <span>{{ row[item.field] }}</span> |
| | | </li> |
| | | </ul> |
| | | </template> |
| | | |
| | | <!--左边固定显示的插槽--> |
| | | <template #button_slot="{ row }"> |
| | | <el-button link size="small" type="primary" @click="getTableRow(row,'edit')">{{$t('basicData.edit')}}</el-button> |
| | | <el-button link size="small" type="primary" @click="getTableRow(row,'setType')">{{$t('basicData.cancelReview')}}</el-button> |
| | | <el-button link size="small" type="primary" @click="getTableRow(row,'delete')">{{$t('basicData.delete')}}</el-button> |
| | | </template> |
| | | |
| | | <template #num1_filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | | <input v-model="option.data" type="text" |
| | | @keyup.enter.native="$panel.confirmFilter()" |
| | | @input="changeFilterEvent($event, option, $panel)"/> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | <template #pager> |
| | | <!--使用 pager 插槽--> |
| | | <!-- 'PrevJump','NextJump', --> |
| | | <vxe-pager |
| | | v-model:current-page="pageNum" |
| | | v-model:page-size="total.pageSize" |
| | | v-model:pager-count="total.pageTotal" |
| | | :layouts="[ 'PrevPage', 'Jump','PageCount', 'NextPage', 'Total']" |
| | | :total="total.dataTotal" |
| | | @page-change="handlePageChange" |
| | | > |
| | | </vxe-pager> |
| | | </template> |
| | | <template #toolbar_buttons> |
| | | <vxe-button style="margin-right: 0.5rem" |
| | | @click="exportExcel('/report/exportWorkInProgress', |
| | | t('report.workInProgressReport'), |
| | | form.date1)"> |
| | | {{t('basicData.export')}}</vxe-button> |
| | | </template> |
| | | |
| | | </vxe-grid> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | .head{ |
| | | width: 100%; |
| | | height: 35px; |
| | | } |
| | | |
| | | .main-table{ |
| | | width: 100%; |
| | | height: calc(100% - 35px); |
| | | } |
| | | </style> |
| | |
| | | //参数:相应的数据,实体类信息,相应的方法(数据获取),生成的excel名字 |
| | | DownExcel.download(response, TeamOutputDTO.class, reportService.exportTeamOutputSv(dates), "TeamOutput"); |
| | | } |
| | | |
| | | @ApiOperation("在制品汇总报表") |
| | | @SaCheckPermission("workInProgress.search") |
| | | @PostMapping("/workInProgressCombination/{pageNum}/{pageSize}/{selectProcesses}/{optionVal}") |
| | | public Result workInProgressCombination( |
| | | @PathVariable Integer pageNum, |
| | | @PathVariable Integer pageSize, |
| | | @PathVariable String selectProcesses, |
| | | @PathVariable String optionVal, |
| | | @RequestBody WorkInProgressDTO workInProgressDTO) { |
| | | return Result.seccess(reportService.workInProgressCombinationSv(pageNum, pageSize, selectProcesses,optionVal, workInProgressDTO)); |
| | | |
| | | } |
| | | } |
| | |
| | | |
| | | List<Map<String, Object>> getCustomLabelDetailMp(String name, String form, String id, FlowCard flowCard); |
| | | |
| | | List<Map<String, Object>> getPrintCustomData(String processId, Integer orderNumber); |
| | | List<Map<String, Object>> getPrintCustomData(String processId, Integer orderNumber, Integer printQuantity); |
| | | |
| | | List<Map<String, Object>> getPrintCustomData2(String processId); |
| | | |
| | |
| | | List<Map<String, Object>> getDetailCompoundList(String processId, String technologyNumber, String process, String flashback, String compound, String landingSequence); |
| | | |
| | | List<Map<String, Object>> getDetailListLikeCompound(String processId, String s, String process, String flashback, String compound, String landingSequence); |
| | | |
| | | List<Map<String, Object>> getPrintCustomDataSemiTj(String processId, String technologyNumber, String process); |
| | | } |
| | |
| | | |
| | | List<WorkInProgressDTO> exportWorkInProgressMpdataList2(String process); |
| | | |
| | | List<WorkInProgressDTO> workInProgressCombinationMpdataList2(Integer offset, Integer pageSize, String selectProcesses, WorkInProgressDTO workInProgressDTO); |
| | | |
| | | List<WorkInProgressDTO> workInProgressCombinationMpdataList1(Integer offset, Integer pageSize, String selectProcesses, WorkInProgressDTO workInProgressDTO); |
| | | |
| | | Map<String,Float> workInProgressCombinationOrderFootSum(Integer offset, Integer pageSize, String selectProcesses, WorkInProgressDTO workInProgressDTO); |
| | | |
| | | |
| | | // Map<String, Integer> getWorkInProgressTotal( |
| | | // @Param("selectTime1") Date selectTime1, @Param("selectTime2") Date selectTime2, |
| | |
| | | continue; |
| | | } |
| | | Map<String, Object> itemmap = new HashMap<>(); |
| | | itemmap.put("data", flowCardMapper.getPrintCustomData(flowCard.getProcessId(), flowCard.getOrderNumber())); |
| | | itemmap.put("data", flowCardMapper.getPrintCustomData(flowCard.getProcessId(), flowCard.getOrderNumber(), flowCard.getPrintQuantity())); |
| | | list.add(itemmap); |
| | | |
| | | // 将该 processId 加入已处理集合 |
| | |
| | | } else {//小片标签 |
| | | for (FlowCard flowCard : flowCardList) { |
| | | Map<String, Object> itemmap = new HashMap<>(); |
| | | itemmap.put("data", flowCardMapper.getPrintCustomDataSemi(flowCard.getProcessId(), flowCard.getTechnologyNumber(), flowCard.getProcess(),flowCard.getOrderNumber())); |
| | | String orderNumber = ""; |
| | | if (flowCard.getOrderNumber() != null) { |
| | | orderNumber = String.valueOf(flowCard.getOrderNumber()); |
| | | } |
| | | // 判断是否为非空字符串 |
| | | if (orderNumber != null && !orderNumber.trim().isEmpty()) { |
| | | |
| | | itemmap.put("data", flowCardMapper.getPrintCustomDataSemi( |
| | | flowCard.getProcessId(), |
| | | flowCard.getTechnologyNumber(), |
| | | flowCard.getProcess(), |
| | | flowCard.getOrderNumber() |
| | | )); |
| | | } else { |
| | | |
| | | itemmap.put("data", flowCardMapper.getPrintCustomDataSemiTj( |
| | | flowCard.getProcessId(), |
| | | flowCard.getTechnologyNumber(), |
| | | flowCard.getProcess() |
| | | )); |
| | | } |
| | | list.add(itemmap); |
| | | } |
| | | } |
| | |
| | | .eq("order_number", dto1.getOrderNumber()) |
| | | .eq("technology_number",dto1.getTechnologyNumber()) |
| | | ); |
| | | System.out.println(orderGlassDetailGroup.getGroup()); |
| | | |
| | | String glassName = productDetailMapper.getGlassNameByGroup( |
| | | orderDetail.getProductId(), |
| | |
| | | String laminating = reportMapper.getLaminating(process); |
| | | return reportMapper.exportTeamOutputMp(date,process,laminating); |
| | | } |
| | | |
| | | public Map<String, Object> workInProgressCombinationSv(Integer pageNum, Integer pageSize, String selectProcesses, String optionVal, WorkInProgressDTO workInProgressDTO) { |
| | | Integer offset = (pageNum - 1) * pageSize; |
| | | |
| | | if ("null".equals(optionVal)) { |
| | | optionVal = (""); |
| | | } |
| | | if (selectProcesses.equals("全部")){ |
| | | selectProcesses=""; |
| | | } |
| | | Map<String, Object> map = new HashMap<>(); |
| | | List<WorkInProgressDTO> dataList2 =reportMapper.workInProgressCombinationMpdataList2(offset, pageSize, selectProcesses, workInProgressDTO); |
| | | |
| | | //没有选择分组 |
| | | //map.put("data", reportMapper.workInProgressMp(offset, pageSize, orderId, inputProject, selectProcesses, workInProgressDTO)); |
| | | List<WorkInProgressDTO> dataList1 =reportMapper.workInProgressCombinationMpdataList1(offset, pageSize, selectProcesses, workInProgressDTO); |
| | | mergeTeamsGroupsName(dataList1, dataList2); |
| | | map.put("data",dataList1); |
| | | //map.put("total", reportMapper.workInProgressTotal(offset, pageSize, orderId, inputProject, selectProcesses, workInProgressDTO)); |
| | | map.put("total" ,reportMapper.workInProgressCombinationOrderFootSum(offset, pageSize, selectProcesses, workInProgressDTO)); |
| | | |
| | | |
| | | map.put("process", productionSchedulingMapper.selectProcess()); |
| | | return map; |
| | | } |
| | | } |
| | |
| | | od.processing_note as processingNote, |
| | | width, |
| | | height, |
| | | fc.quantity, |
| | | #{printQuantity} as quantity, |
| | | od.order_number as orderNumber, |
| | | fc.technology_number as technologyNumber, |
| | | od.building_number as buildingNumber, |
| | |
| | | </otherwise> |
| | | </choose> |
| | | </select> |
| | | |
| | | <select id="getPrintCustomDataSemiTj"> |
| | | select o.order_id as orderId, |
| | | project, |
| | | customer_id as customerId, |
| | | o.customer_name as customerName, |
| | | order_type as orderType, |
| | | order_classify as orderClassify, |
| | | batch, |
| | | o.icon, |
| | | pack_type as packType, |
| | | delivery_date as deliveryDate, |
| | | al_type as alType, |
| | | money, |
| | | contract_id as contractId, |
| | | customer_batch customerBatch, |
| | | contacts, |
| | | delivery_address as deliveryAddress, |
| | | od.processing_note as processingNote, |
| | | ogd.child_width as width, |
| | | ogd.child_height as height, |
| | | fc.quantity, |
| | | CONCAT(ogd.child_width , ' X ', ogd.child_height ,' = ',fc.quantity ) as size, |
| | | od.order_number as orderNumber, |
| | | fc.technology_number as technologyNumber, |
| | | od.building_number as buildingNumber, |
| | | od.product_name as productName, |
| | | od.edging_type as edgingType, |
| | | od.remarks, |
| | | c.customer_abbreviation as customerAbbreviation, |
| | | p.product_abbreviation as productAbbreviation, |
| | | CONCAT(fc.process_id, '/', fc.technology_number) as processId, |
| | | SUBSTRING(fc.process_id,12 ) as processIdAD ,/*-流程卡简写-*/ |
| | | o.create_time as createTime, |
| | | JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S01')) AS glassNumber, |
| | | JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S02')) AS figureNumber, |
| | | JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S03')) AS colourCeramicGlaze, |
| | | JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S04')) AS remarks1, |
| | | JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S05')) AS remarks2, |
| | | JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S06')) AS remarks3, |
| | | JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S07')) AS remarks4, |
| | | JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S08')) AS remarks5, |
| | | p.remarks as filmNumber, |
| | | od.bend_radius as bendRadius, |
| | | ogd.glass_child as glassChild, |
| | | ogd.glass_address as glassAddress, |
| | | JSON_UNQUOTE(JSON_EXTRACT(pd.separation, '$.color')) AS color, |
| | | CONCAT( |
| | | od.order_number,') ', |
| | | TRIM(TRAILING '.' FROM TRIM(TRAILING '0' FROM CAST(ogd.child_width AS CHAR))), |
| | | ' X ', |
| | | TRIM(TRAILING '.' FROM TRIM(TRAILING '0' FROM CAST(ogd.child_height AS CHAR))), |
| | | ' = ',fc.quantity ) as numberSize, |
| | | CONCAT( |
| | | od.order_number,')',' ', |
| | | TRIM(TRAILING '.' FROM TRIM(TRAILING '0' FROM CAST(ogd.child_width AS CHAR))), |
| | | ' X ', |
| | | TRIM(TRAILING '.' FROM TRIM(TRAILING '0' FROM CAST(ogd.child_height AS CHAR)))) as numberSizeQuantity |
| | | from sd.order as o |
| | | left join sd.order_detail as od on o.order_id = od.order_id |
| | | left join flow_card as fc on o.order_id = fc.order_id and |
| | | od.order_number = fc.order_number |
| | | left join sd.product as p on p.id = od.product_id |
| | | left join sd.customer as c on c.id = o.customer_id |
| | | left join sd.product_detail as pd on pd.prod_id = p.id and pd.sort_num = od.order_number |
| | | left join sd.order_glass_detail ogd |
| | | on ogd.order_id = o.order_id and ogd.order_number = od.order_number and |
| | | ogd.technology_number = fc.technology_number |
| | | left join flow_card_sort as fcs |
| | | on fcs.process_id = fc.process_id and fcs.order_number = fc.order_number and |
| | | fcs.technology_number = fc.technology_number |
| | | and fcs.process = #{process} |
| | | where fc.process_id = #{processId} |
| | | and position(fc.technology_number in #{technologyNumber}) |
| | | group by fc.process_id,od.order_number, ogd.technology_number, ogd.child_width, ogd.child_height |
| | | order by IF(fcs.sort != NULL or fcs.sort != '', fcs.sort, fc.order_number) |
| | | </select> |
| | | </mapper> |
| | |
| | | where position(#{process} in a.next_process) and a.next_process!='切割' |
| | | GROUP BY a.reporting_work_id |
| | | </select> |
| | | |
| | | <select id="workInProgressCombinationMpdataList2"> |
| | | select |
| | | a.process_id,a.teams_groups_name,a.next_process,b.technology_number,b.order_number |
| | | from pp.reporting_work as a |
| | | left join pp.reporting_work_detail as b on a.reporting_work_id=b.reporting_work_id |
| | | where position(#{selectProcesses} in a.next_process) and a.next_process!='切割' |
| | | GROUP BY a.reporting_work_id |
| | | </select> |
| | | |
| | | <select id="workInProgressCombinationMpdataList1"> |
| | | select if(#{selectProcesses}='',d.process,#{selectProcesses}) as thisProcess, |
| | | o.project, |
| | | SUM(d.numCounts + d.patchNumSum - d.numCount -d.broken_num) as stockNum, |
| | | SUM(ROUND(ogd.child_width * ogd.child_height * |
| | | (d.numCounts + d.patchNumSum - d.numCount - |
| | | d.broken_num) / 1000000, 2)) as stockArea |
| | | from sd.order_detail AS od |
| | | LEFT JOIN sd.order_glass_detail AS ogd |
| | | ON od.order_id = ogd.order_id |
| | | AND od.order_number = ogd.order_number |
| | | LEFT JOIN pp.flow_card AS fc |
| | | ON fc.order_id = ogd.order_id |
| | | and fc.production_id = ogd.production_id |
| | | AND fc.order_number = ogd.order_number |
| | | AND fc.technology_number = ogd.technology_number |
| | | left join ( |
| | | SELECT |
| | | odpd.process, |
| | | odpd.process_id, |
| | | odpd.order_number, |
| | | odpd.technology_number, |
| | | odpds.reporting_work_num_count as numCounts, |
| | | ifnull( c.patchNumSum, 0 ) as patchNumSum, |
| | | odpd.reporting_work_num_count as numCount, |
| | | odpd.broken_num |
| | | FROM |
| | | sd.order_process_detail AS odpd |
| | | LEFT JOIN sd.order_process_detail AS odpds ON odpds.id = odpd.id - 1 |
| | | LEFT JOIN ( |
| | | SELECT |
| | | sum( rw.rework_num ) AS 'patchNumSum', |
| | | rw.process_id, |
| | | rw.order_sort, |
| | | rw.technology_number, |
| | | rwk.this_process |
| | | FROM |
| | | pp.rework AS rw |
| | | LEFT JOIN pp.reporting_work AS rwk ON rw.reporting_work_id = rwk.reporting_work_id |
| | | WHERE |
| | | position( #{selectProcesses} IN rwk.this_process ) |
| | | AND rw.review_status >= 0 |
| | | GROUP BY |
| | | rw.process_id, |
| | | rw.order_sort, |
| | | rw.technology_number |
| | | ) AS c ON c.process_id = odpd.process_id |
| | | AND c.order_sort = odpd.order_number |
| | | AND c.technology_number = odpd.technology_number |
| | | WHERE |
| | | position(#{selectProcesses} IN odpd.process ) and odpds.reporting_work_num_count is not null |
| | | GROUP BY |
| | | odpd.process_id, |
| | | odpd.order_number, |
| | | odpd.technology_number, |
| | | odpd.process |
| | | |
| | | ) as d |
| | | on d.process_id=fc.process_id and d.order_number=fc.order_number and d.technology_number=fc.technology_number |
| | | and position(#{selectProcesses} in d.process) |
| | | left join sd.`order` as o on o.order_id=od.order_id |
| | | where o.create_order>0 |
| | | and d.numCounts +d.patchNumSum - d.numCount - d.broken_num != 0 |
| | | and d.process!=SUBSTRING_INDEX(ogd.process, '->', 1) |
| | | and position(#{selectProcesses} in d.process) |
| | | |
| | | <if test="workInProgressDTO.project != null and workInProgressDTO.project != ''"> |
| | | and o.project regexp #{workInProgressDTO.project} |
| | | </if> |
| | | |
| | | group by d.process |
| | | order by d.process |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | </mapper> |
| | |
| | | -ifnull(g.completed_quantity,0)) |
| | | > |
| | | a.completed_quantity, |
| | | 0, |
| | | a.completed_quantity, |
| | | (f.completed_quantity |
| | | -ifnull(g.completed_quantity,0)) |
| | | ) as minQuantity -- 修改最小数 |