| | |
| | | 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; |
| | |
| | | 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 { |
| | |
| | | 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); |
| | | } |
| | | } |