guoyuji
2024-07-11 381c0218343114eaabd393c33b3d35d0b6e26f7c
north-glass-erp/src/main/java/com/example/erp/service/pp/ReportingWorkService.java
@@ -102,6 +102,9 @@
            }
        }
        //工艺流程
        map.put("technologicalProcess", technologicalProcess);
        //设备下拉框
        map.put("device", reportingWorkMapper.SelectWorkBasicDeviceMp(process));
        //班组下拉框
@@ -112,6 +115,8 @@
        //查询本工序报工需要哪几层,上工序是什么
        String obtainTechnology = reportingWorkMapper.SelectWorkTechnologyMp(processIdStr);
        map.put("numberList", flowCardMapper.getGlassNumber(Integer.valueOf(technologyStr),processIdStr));
        //判断本工序是不是第一道工序
        if (interceptProcess.equals(process)) {
@@ -201,8 +206,15 @@
            String technologicalProcess = reportingWorkMapper.SelectTechnologicalProcess(reportingWork.getProcessId());
            int index = technologicalProcess.indexOf("-");
            //获取工艺流程第一个工序
            String interceptProcess = technologicalProcess.substring(0, index);
            String interceptProcess = "";
            if (index <0){
                 interceptProcess = technologicalProcess;
            }
            else {
                //获取工艺流程第一个工序
                 interceptProcess = technologicalProcess.substring(0, index);
            }
            //判断当前工序是否为第一道工序工序,使用流程卡表数量或者小片流程表上工序数量
            int processNum = 0;
@@ -303,6 +315,8 @@
                        .eq(Order::getOrderId, reportingWork.getOrderId())));
        reportingWork.setFlowCard(new FlowCard());
        List<Map<String, Object>> reportingWorkDetails = reportingWorkMapper.selectByReportingWorkId(reportingWorkId, reportingWork.getNextProcess());
        reportingWorkDetails.forEach(reportingWorkDetail -> {
            List<DamageDetails> damageDetailsList = new ArrayList<>();
@@ -312,8 +326,8 @@
                    .eq(DamageDetails::getTechnologyNumber, reportingWorkDetail.get("technology_number"))
            );
            reportingWorkDetail.put("damageDetails", damageDetailsList);
        });
        });
        Map<String, Object> map = new HashMap<>();
        map.put("reportingWork", reportingWork);
@@ -321,7 +335,7 @@
        map.put("basic", getReportingWorkBase(reportingWork.getProcessId(), reportingWork.getThisProcess()));
        //根据报工编号获取层
        map.put("layer", reportingWorkMapper.selectLayerByReportingWorkId(reportingWorkId));
        map.put("numberList", flowCardMapper.getGlassNumber(reportingWorkMapper.selectLayerByReportingWorkId(reportingWorkId),reportingWork.getProcessId()));
        return map;