Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override
| | |
| | | let filterData = ref({}) |
| | | |
| | | const data = ref({ |
| | | printList: [] |
| | | printList: [], |
| | | isRepeat:false |
| | | }) |
| | | |
| | | let props = defineProps({ |
| | |
| | | |
| | | //倒叙 |
| | | let flashback = ref(1) |
| | | //落架顺序 |
| | | let landingSequence= ref(1) |
| | | //合架打印 |
| | | let compound = ref(null) |
| | | |
| | |
| | | project:null, |
| | | merge: null, |
| | | flashback:null, |
| | | compound:null |
| | | compound:null, |
| | | landingSequence:null, |
| | | }) |
| | | const getTableRow = (row, type) => { |
| | | switch (type) { |
| | |
| | | printRow.value.merge = company.flowCardMerge |
| | | printRow.value.flashback = flashback.value |
| | | printRow.value.compound = compound.value |
| | | printRow.value.landingSequence=landingSequence.value |
| | | if(company.companyName=='常州市吉利玻璃有限公司'){ |
| | | dialogTableVisibleStraight.value = true |
| | | }else{ |
| | |
| | | :merges="printRow.merge" |
| | | :flashback = "printRow.flashback" |
| | | :compound = "printRow.compound" |
| | | :landingSequence = "printRow.landingSequence" |
| | | style="width: 100%;height: 100%"/> |
| | | </el-dialog> |
| | | |
| | |
| | | optionVal = null |
| | | } |
| | | //第一次加载数据 |
| | | request.post(`/report/workInProgressCombination/1/${total.pageSize}/${selectProcesses}/${optionVal}`, filterData.value).then((res) => { |
| | | request.post(`/report/workInProgressCombination/1/${total.pageSize}/${selectProcesses}/${inputVal}/${inputProject}/${optionVal}`, filterData.value).then((res) => { |
| | | |
| | | if (res.code == 200) { |
| | | total.dataTotal = res.data.total.total*1 |
| | |
| | | request.post(`/report/workInProgressCombination/${pageNum.value}/${total.pageSize}/${inputVal}/${inputProject}/${selectProcesses}/${optionVal}`, filterData.value).then((res) => { |
| | | |
| | | if (res.code == 200) { |
| | | console.log(res.data.data) |
| | | total.dataTotal = res.data.total.total * 1 |
| | | total.pageTotal = res.data.total.pageTotal |
| | | pageTotal.value = res.data.total |
| | |
| | | <template> |
| | | <div style="width: 100%;height: 100%"> |
| | | <div class="head"> |
| | | |
| | | <el-input v-model="form.orderId" :placeholder="$t('order.orderId')" clearable style="width: 130px"></el-input> |
| | | |
| | | <el-input v-model="form.project" clearable :placeholder="$t('order.project')" style="width: 130px"></el-input> |
| | | |
| | | <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']" |
| | |
| | | |
| | | @ApiOperation("在制品汇总报表") |
| | | @SaCheckPermission("workInProgress.search") |
| | | @PostMapping("/workInProgressCombination/{pageNum}/{pageSize}/{selectProcesses}/{optionVal}") |
| | | @PostMapping("/workInProgressCombination/{pageNum}/{pageSize}/{orderId}/{inputProject}/{selectProcesses}/{optionVal}") |
| | | public Result workInProgressCombination( |
| | | @PathVariable Integer pageNum, |
| | | @PathVariable Integer pageSize, |
| | | @PathVariable String orderId, |
| | | @PathVariable String inputProject, |
| | | @PathVariable String selectProcesses, |
| | | @PathVariable String optionVal, |
| | | @RequestBody WorkInProgressDTO workInProgressDTO) { |
| | | return Result.seccess(reportService.workInProgressCombinationSv(pageNum, pageSize, selectProcesses,optionVal, workInProgressDTO)); |
| | | return Result.seccess(reportService.workInProgressCombinationSv(pageNum, pageSize, orderId, inputProject,selectProcesses,optionVal, workInProgressDTO)); |
| | | |
| | | } |
| | | } |
| | |
| | | package com.example.erp.mapper.pp; |
| | | |
| | | |
| | | import cn.hutool.core.date.DateTime; |
| | | import com.example.erp.dto.pp.*; |
| | | import com.example.erp.entity.pp.Report; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | |
| | | |
| | | 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,Float> workInProgressCombinationOrderFootSum(Integer offset, Integer pageSize, String orderId, String inputProject, String selectProcesses, WorkInProgressDTO workInProgressDTO); |
| | | |
| | | |
| | | // Map<String, Integer> getWorkInProgressTotal( |
| | |
| | | |
| | | |
| | | public Map<String, Object> getSelectPrintCustomLabelSv(String type, Integer lableType, Map<String, Object> object) { |
| | | //根据mse传过来的值,如果不存在 赋值false |
| | | String isRepeat = Optional.ofNullable(object.get("isRepeat")) |
| | | .map(Object::toString) |
| | | .orElse("false"); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();//最终结果 |
| | | List<FlowCard> flowCardList = JSONArray.parseArray(JSONObject.toJSONString(object.get("printList")), FlowCard.class); |
| | |
| | | String processId = flowCard.getProcessId(); |
| | | Integer orderNumber = flowCard.getOrderNumber(); |
| | | String uniqueKey = processId + "|" + orderNumber; // 用特殊字符连接防止冲突 |
| | | // 检查是否已经处理过该 processId,如果处理过则跳过 |
| | | if (processedKeys.contains(uniqueKey)) { |
| | | continue; |
| | | if (isRepeat=="false"){//根据mse传过来的值判断是否去除重复 |
| | | // 检查是否已经处理过该 processId,如果处理过则跳过 |
| | | if (processedKeys.contains(uniqueKey)) { |
| | | continue; |
| | | } |
| | | } |
| | | |
| | | Map<String, Object> itemmap = new HashMap<>(); |
| | | itemmap.put("data", flowCardMapper.getPrintCustomData(flowCard.getProcessId(), flowCard.getOrderNumber(), flowCard.getPrintQuantity())); |
| | | list.add(itemmap); |
| | |
| | | return reportMapper.exportTeamOutputMp(date,process,laminating); |
| | | } |
| | | |
| | | public Map<String, Object> workInProgressCombinationSv(Integer pageNum, Integer pageSize, String selectProcesses, String optionVal, WorkInProgressDTO workInProgressDTO) { |
| | | public Map<String, Object> workInProgressCombinationSv(Integer pageNum, Integer pageSize,String orderId, String inputProject, String selectProcesses, String optionVal, WorkInProgressDTO workInProgressDTO) { |
| | | Integer offset = (pageNum - 1) * pageSize; |
| | | |
| | | if ("null".equals(orderId)) { |
| | | orderId = ""; |
| | | } |
| | | if ("null".equals(inputProject)) { |
| | | inputProject = ""; |
| | | } |
| | | if ("null".equals(optionVal)) { |
| | | optionVal = (""); |
| | | } |
| | |
| | | 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); |
| | | List<WorkInProgressDTO> dataList2 =reportMapper.workInProgressMpdataList2(offset, pageSize,orderId, inputProject, selectProcesses, workInProgressDTO); |
| | | List<WorkInProgressDTO> dataList1 =reportMapper.workInProgressMpdataList1(offset, pageSize,orderId, inputProject, 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("total" ,reportMapper.workInProgressCombinationOrderFootSum(offset, pageSize,orderId, inputProject, selectProcesses, workInProgressDTO)); |
| | | map.put("total" ,reportMapper.workInProgressOrderFootSum(offset, pageSize,orderId, inputProject, selectProcesses, workInProgressDTO)); |
| | | |
| | | map.put("process", productionSchedulingMapper.selectProcess()); |
| | | return map; |
| | |
| | | sum(aa.stockNum) AS stockNum, |
| | | SUM(aa.stockArea) AS stockArea, |
| | | count(* ) AS 'total', |
| | | CEILING( count(* )/100 ) AS 'pageTotal' |
| | | CEILING( count(* )/#{pageSize} ) AS 'pageTotal' |
| | | from |
| | | ( |
| | | SELECT (od.quantity) AS quantity, |
| | |
| | | order by d.process |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | <select id="workInProgressCombinationOrderFootSum"> |
| | | SELECT SUM(aa.quantity) AS quantity, |
| | | sum(aa.stockNum) AS stockNum, |
| | | SUM(aa.stockArea) AS stockArea, |
| | | count(* ) AS 'total', |
| | | CEILING( count(* )/#{pageSize} ) AS 'pageTotal' |
| | | from |
| | | ( |
| | | SELECT (od.quantity) AS quantity, |
| | | d.numCounts + d.patchNumSum - d.numCount -d.broken_num as stockNum, |
| | | 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 |
| | | ) as aa |
| | | </select> |
| | | </mapper> |