chenlu
2025-09-23 62914e8c873328712742f789e5fdea1a1a46c121
north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java
@@ -65,6 +65,25 @@
        this.reportingWorkMapper = reportingWorkMapper;
    }
    //将层数字符串用逗号隔开
    public static String splitTechNumbers(String input) {
        if (input == null || input.isEmpty()) {
            return "";
        }
        List<String> result = new ArrayList<>();
        for (int i = 0; i < input.length(); i++) {
            // 特殊处理 "10"
            if (input.charAt(i) == '1' && i + 1 < input.length() && input.charAt(i + 1) == '0') {
                result.add("10");
                i++; // 跳过下一个字符
            } else {
                result.add(String.valueOf(input.charAt(i)));
            }
        }
        return String.join(",", result);
    }
    //流程卡管理查询
    public Map<String, Object> selectProcessCard(Integer pageNum, Integer pageSize,List<String> selectDate, FlowCard flowCard) {
        Integer offset = (pageNum - 1) * pageSize;
@@ -383,10 +402,10 @@
                        if (compound == null
                                || "null".equals(compound)
                                || compound.trim().isEmpty()){
                            List<Map<String, Object>> detailList = flowCardMapper.getDetailList(flowCard.getProcessId(), flowCard.getTechnologyNumber(), flowCard.getProcess(),flashback,landingSequence);
                            List<Map<String, Object>> detailList = flowCardMapper.getDetailList(flowCard.getProcessId(), splitTechNumbers(flowCard.getTechnologyNumber()), flowCard.getProcess(),flashback,landingSequence);
                            itemmap.put("detailList", detailList);
                        }else {//有需要同架的层
                            List<Map<String, Object>> detailList = flowCardMapper.getDetailCompoundList(flowCard.getProcessId(), flowCard.getTechnologyNumber(), flowCard.getProcess(),flashback,compound,landingSequence);
                            List<Map<String, Object>> detailList = flowCardMapper.getDetailCompoundList(flowCard.getProcessId(), splitTechNumbers(flowCard.getTechnologyNumber()), flowCard.getProcess(),flashback,splitTechNumbers(compound),landingSequence);
                            itemmap.put("detailList", detailList);
                        }
                    } else {
@@ -409,10 +428,11 @@
                            if (compound == null
                                    || "null".equals(compound)
                                    || compound.trim().isEmpty()){
                                List<Map<String, Object>> detailList = flowCardMapper.getDetailListLike(flowCard.getProcessId(), String.valueOf(flowCard.getTechnologyNumber()), flowCard.getProcess(),flashback,landingSequence);
                                List<Map<String, Object>> detailList = flowCardMapper.getDetailListLike(flowCard.getProcessId(), splitTechNumbers(flowCard.getTechnologyNumber()), flowCard.getProcess(),flashback,landingSequence);
                                itemmap.put("detailList", detailList);
                            }else {//有需要同架的层
                                List<Map<String, Object>> detailList = flowCardMapper.getDetailListLikeCompound(flowCard.getProcessId(), String.valueOf(flowCard.getTechnologyNumber()), flowCard.getProcess(),flashback,compound,landingSequence);
                                List<Map<String, Object>> detailList = flowCardMapper.getDetailListLikeCompound(flowCard.getProcessId(), splitTechNumbers(flowCard.getTechnologyNumber()), flowCard.getProcess(),flashback,splitTechNumbers(compound),landingSequence);
                                itemmap.put("detailList", detailList);
                            }
                        }