| | |
| | | Map<String, Object> itemmap = new HashMap<>(); |
| | | if ("1".equals(inquiryMode)){ |
| | | itemmap.put("detail", flowCardMapper.selectPrintMp(flowCard.getOrderId())); |
| | | } |
| | | else { |
| | | } else if ("3".equals(inquiryMode)) { |
| | | itemmap.put("detail", flowCardMapper.selectPrintAllMp(flowCard.getOrderId())); |
| | | } else { |
| | | itemmap.put("detail", flowCardMapper.selectPrintNotMp(flowCard.getOrderId())); |
| | | } |
| | | |
| | |
| | | //是否包含切割 |
| | | boolean containsCutting = flowCard.getProcess().contains("切割"); |
| | | if(String.valueOf(flowCard.getTechnologyNumber()).length()>1 && containsCutting){ |
| | | List<Map<String, Object>> detailList = flowCardMapper.getDetailListLike(flowCard.getProcessId(), String.valueOf(flowCard.getTechnologyNumber())); |
| | | List<Map<String, Object>> detailList = flowCardMapper.getDetailListLike(flowCard.getProcessId(), String.valueOf(flowCard.getTechnologyNumber()),flowCard.getProcess()); |
| | | itemmap.put("detailList", detailList); |
| | | } |
| | | else { |
| | | List<Map<String, Object>> detailList = flowCardMapper.getDetailList(flowCard.getProcessId(), flowCard.getTechnologyNumber()); |
| | | List<Map<String, Object>> detailList = flowCardMapper.getDetailList(flowCard.getProcessId(), flowCard.getTechnologyNumber(),flowCard.getProcess()); |
| | | itemmap.put("detailList", detailList); |
| | | } |
| | | |
| | |
| | | if (printLike.equals("")||printLike.equals("null") ){ |
| | | itemmap.put("detail", flowCardMapper.getPrimaryListMerge(flowCard.getProcessId(), printMerge)); |
| | | |
| | | List<Map<String, Object>> detailList = flowCardMapper.getDetailList(flowCard.getProcessId(), flowCard.getTechnologyNumber()); |
| | | List<Map<String, Object>> detailList = flowCardMapper.getDetailList(flowCard.getProcessId(), flowCard.getTechnologyNumber(), flowCard.getProcess()); |
| | | itemmap.put("detailList", detailList); |
| | | } |
| | | else { |
| | | itemmap.put("detail", flowCardMapper.getPrimaryList(flowCard.getProcessId(), String.valueOf(flowCard.getTechnologyNumber()), flowCard.getGlassChild(), flowCard.getProcess())); |
| | | |
| | | List<Map<String, Object>> detailList = flowCardMapper.getDetailListLike(flowCard.getProcessId(), printMerge); |
| | | List<Map<String, Object>> detailList = flowCardMapper.getDetailListLike(flowCard.getProcessId(), printMerge, flowCard.getProcess()); |
| | | itemmap.put("detailList", detailList); |
| | | } |
| | | } |
| | | |
| | | //工艺流程 |
| | | List<Map<String, Object>> processList = flowCardMapper.getProcessList(flowCard.getProcessId(), flowCard.getTechnologyNumber()); |
| | | //List<Map<String, Object>> processList = flowCardMapper.getProcessList(flowCard.getProcessId(), flowCard.getTechnologyNumber()); |
| | | String input = flowCard.getProcess(); |
| | | String delimiter = "->"; |
| | | |
| | | // 分割字符串 |
| | | String[] parts = input.split(delimiter); |
| | | |
| | | // 创建 List<Map<String, Object>> |
| | | List<Map<String, Object>> processList = new ArrayList<>(); |
| | | |
| | | // 遍历分割后的部分并将其存入 List<Map<String, Object>> |
| | | for (int i = 0; i < parts.length; i++) { |
| | | Map<String, Object> maps = new HashMap<>(); |
| | | maps.put("id", i); // 添加一个索引字段 |
| | | maps.put("process", parts[i]); // 添加实际的值 |
| | | |
| | | processList.add(maps); |
| | | } |
| | | |
| | | itemmap.put("processList", processList); |
| | | // itemmap.put("numberList", numberList); |
| | |
| | | return map; |
| | | } |
| | | |
| | | public Map<String, Object> printFlowCardDetailsSv(String processId, String technologyNumber, FlowCard flowCard) { |
| | | public Map<String, Object> printFlowCardDetailsSv(String processId, String technologyNumber, String process, FlowCard flowCard) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", flowCardMapper.printFlowCardDetailsMp(processId, technologyNumber, flowCard)); |
| | | map.put("data", flowCardMapper.printFlowCardDetailsMp(processId, technologyNumber,process, flowCard)); |
| | | return map; |
| | | } |
| | | |
| | |
| | | List<FlowCard> FlowCardList = JSONArray.parseArray(JSONObject.toJSONString(object.get("flowCard")), FlowCard.class); |
| | | if (!FlowCardList.isEmpty()) { |
| | | for (FlowCard flowCard : FlowCardList) { |
| | | flowCardMapper.printSortMp(flowCard.getProcessId(),flowCard.getOrderNumber(),flowCard.getTechnologyNumber(),flowCard.getSort()); |
| | | // flowCardMapper.printSortMp(flowCard.getProcessId(),flowCard.getOrderNumber(),flowCard.getTechnologyNumber(),flowCard.getSort()); |
| | | //判断保存的数据是否已存在 |
| | | Integer count = flowCardMapper.printAddSortCountMp(flowCard.getProcessId(),flowCard.getOrderNumber(),flowCard.getTechnologyNumber(),flowCard.getSort(),flowCard.getProcess()); |
| | | if (count >0){ |
| | | flowCardMapper.printUpdateSortMp(flowCard.getProcessId(),flowCard.getOrderNumber(),flowCard.getTechnologyNumber(),flowCard.getSort(),flowCard.getProcess()); |
| | | }else { |
| | | flowCardMapper.printAddSortMp(flowCard.getProcessId(),flowCard.getOrderNumber(),flowCard.getTechnologyNumber(),flowCard.getSort(),flowCard.getProcess()); |
| | | } |
| | | } |
| | | } |
| | | return true; |
| | |
| | | else{ |
| | | for (FlowCard flowCard : flowCardList) { |
| | | Map<String, Object> itemmap = new HashMap<>(); |
| | | itemmap.put("data", flowCardMapper.getPrintCustomDataSemi(flowCard.getProcessId(),flowCard.getTechnologyNumber())); |
| | | itemmap.put("data", flowCardMapper.getPrintCustomDataSemi(flowCard.getProcessId(),flowCard.getTechnologyNumber(),flowCard.getProcess())); |
| | | list.add(itemmap); |
| | | } |
| | | } |