| | |
| | | List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();//最终结果 |
| | | List<FlowCard> flowCardList = JSONArray.parseArray(JSONObject.toJSONString(object.get("printList")), FlowCard.class); |
| | | if (!flowCardList.isEmpty()) { |
| | | Set<String> processedProcessIds = new HashSet<>(); // 用来存放已处理过的 processId |
| | | Set<String> processedKeys = new HashSet<>(); |
| | | for (FlowCard flowCard : flowCardList) { |
| | | String processId = flowCard.getProcessId(); |
| | | Integer orderNumber = flowCard.getOrderNumber(); |
| | | String uniqueKey = processId + "|" + orderNumber; // 用特殊字符连接防止冲突 |
| | | Map<String, Object> itemmap = new HashMap<>(); |
| | | //流程卡表头表尾数据 |
| | | //是否传入合并层数 |
| | |
| | | //是否包含切割 |
| | | //boolean containsCutting = flowCard.getProcess().contains("切割"); |
| | | String processSub = flowCard.getProcess().substring(0, 2); |
| | | if (processSub.equals("夹胶") || processSub.equals("中空")) {//工艺是否包含夹胶中空 |
| | | //获取工序对应的别称 |
| | | String processName = flowCardMapper.getProcessName(processSub); |
| | | if (processName.equals("stepC") || processName.equals("stepD")) {//工艺是否包含夹胶中空 |
| | | itemmap.put("detail", flowCardMapper.getPrimaryListLimt(flowCard.getProcessId(), String.valueOf(flowCard.getTechnologyNumber()), flowCard.getGlassChild(), flowCard.getProcess(), flowCard.getOrderId())); |
| | | |
| | | List<Map<String, Object>> detailList = flowCardMapper.getDetailList(flowCard.getProcessId(), flowCard.getTechnologyNumber(), flowCard.getProcess()); |
| | |
| | | } else { |
| | | if (merge.equals("1") && flowCard.getMerge().equals(1)) { |
| | | // 检查是否已经处理过该 processId,如果处理过则跳过 |
| | | if (processedProcessIds.contains(flowCard.getProcessId())) { |
| | | if (processedKeys.contains(uniqueKey)) { |
| | | continue; |
| | | } |
| | | // 将该 processId 加入已处理集合 |
| | | processedProcessIds.add(flowCard.getProcessId()); |
| | | processedKeys.add(uniqueKey); |
| | | itemmap.put("detail", flowCardMapper.getPrimaryList(flowCard.getProcessId(), String.valueOf(flowCard.getTechnologyNumber()), flowCard.getGlassChild(), flowCard.getProcess(), flowCard.getOrderId())); |
| | | |
| | | List<Map<String, Object>> detailList = flowCardMapper.getDetailListMerge(flowCard.getProcessId(), flowCard.getProcess()); |
| | |
| | | } |
| | | List<FlowCard> flowCardList = flowCardMapper.getFlowCardListPrintProject(printProject); |
| | | if (!flowCardList.isEmpty()) { |
| | | Set<String> processedProcessIds = new HashSet<>(); // 用来存放已处理过的 processId |
| | | Set<String> processedKeys = new HashSet<>(); |
| | | |
| | | for (FlowCard flowCard : flowCardList) { |
| | | Map<String, Object> itemmap = new HashMap<>(); |
| | | |
| | | |
| | | String processId = flowCard.getProcessId(); |
| | | Integer orderNumber = flowCard.getOrderNumber(); |
| | | String uniqueKey = processId + "|" + orderNumber; // 用特殊字符连接防止冲突 |
| | | //是否包含切割 |
| | | //boolean containsCutting = flowCard.getProcess().contains("切割"); |
| | | String processSub = flowCard.getProcess().substring(0, 2); |
| | | if (processSub.equals("夹胶") || processSub.equals("中空")) { |
| | | //获取工序对应的别称 |
| | | String processName = flowCardMapper.getProcessName(processSub); |
| | | if (processName.equals("stepC") || processName.equals("stepD")) {//工艺是否包含夹胶中空 |
| | | itemmap.put("detail", flowCardMapper.getPrimaryListLimt(flowCard.getProcessId(), String.valueOf(flowCard.getTechnologyNumber()), flowCard.getGlassChild(), flowCard.getProcess(), flowCard.getOrderId())); |
| | | if (flowCard.getPatchState().equals(0)) { |
| | | List<Map<String, Object>> detailList = flowCardMapper.getDetailList(flowCard.getProcessId(), flowCard.getTechnologyNumber(), flowCard.getProcess()); |
| | |
| | | if (flowCard.getPatchState().equals(0)) { |
| | | if (merge.equals("1") && flowCard.getMerge().equals(1)) { |
| | | // 检查是否已经处理过该 processId,如果处理过则跳过 |
| | | if (processedProcessIds.contains(flowCard.getProcessId())) { |
| | | if (processedKeys.contains(uniqueKey)) { |
| | | continue; |
| | | } |
| | | // 将该 processId 加入已处理集合 |
| | | processedProcessIds.add(flowCard.getProcessId()); |
| | | processedKeys.add(uniqueKey); |
| | | itemmap.put("detail", flowCardMapper.getPrimaryList(flowCard.getProcessId(), String.valueOf(flowCard.getTechnologyNumber()), flowCard.getGlassChild(), flowCard.getProcess(), flowCard.getOrderId())); |
| | | |
| | | List<Map<String, Object>> detailList = flowCardMapper.getDetailListMerge(flowCard.getProcessId(), flowCard.getProcess()); |
| | |
| | | List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();//最终结果 |
| | | List<FlowCard> flowCardList = JSONArray.parseArray(JSONObject.toJSONString(object.get("printList")), FlowCard.class); |
| | | if (!flowCardList.isEmpty()) { |
| | | Set<String> processedProcessIds = new HashSet<>(); // 用来存放已处理过的 processId |
| | | |
| | | Set<String> processedKeys = new HashSet<>(); |
| | | if (lableType != 2) {//成品标签 |
| | | for (FlowCard flowCard : flowCardList) { |
| | | String processId = flowCard.getProcessId(); |
| | | |
| | | Integer orderNumber = flowCard.getOrderNumber(); |
| | | String uniqueKey = processId + "|" + orderNumber; // 用特殊字符连接防止冲突 |
| | | // 检查是否已经处理过该 processId,如果处理过则跳过 |
| | | if (processedProcessIds.contains(processId)) { |
| | | if (processedKeys.contains(uniqueKey)) { |
| | | continue; |
| | | } |
| | | Map<String, Object> itemmap = new HashMap<>(); |
| | |
| | | list.add(itemmap); |
| | | |
| | | // 将该 processId 加入已处理集合 |
| | | processedProcessIds.add(processId); |
| | | processedKeys.add(uniqueKey); |
| | | } |
| | | } else {//小片标签 |
| | | for (FlowCard flowCard : flowCardList) { |
| | |
| | | List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();//最终结果 |
| | | List<FlowCard> flowCardList = JSONArray.parseArray(JSONObject.toJSONString(object.get("printList")), FlowCard.class); |
| | | if (!flowCardList.isEmpty()) { |
| | | Set<String> processedProcessIds = new HashSet<>(); // 用来存放已处理过的 processId |
| | | |
| | | Set<String> processedKeys = new HashSet<>(); |
| | | if (lableType != 2) {//成品标签 |
| | | for (FlowCard flowCard : flowCardList) { |
| | | String processId = flowCard.getProcessId(); |
| | | Integer orderNumber = flowCard.getOrderNumber(); |
| | | String uniqueKey = processId + "|" + orderNumber; // 用特殊字符连接防止冲突 |
| | | |
| | | // 检查是否已经处理过该 processId,如果处理过则跳过 |
| | | if (processedProcessIds.contains(processId)) { |
| | | if (processedKeys.contains(uniqueKey)) { |
| | | continue; |
| | | } |
| | | Map<String, Object> itemmap = new HashMap<>(); |
| | |
| | | list.add(itemmap); |
| | | |
| | | // 将该 processId 加入已处理集合 |
| | | processedProcessIds.add(processId); |
| | | processedKeys.add(uniqueKey); |
| | | } |
| | | } else {//小片标签 |
| | | for (FlowCard flowCard : flowCardList) { |
| | |
| | | |
| | | //工艺流程 |
| | | List<Map<String, Object>> processList = flowCardMapper.getProcessList(flowCard.getProcessId(), flowCard.getTechnologyNumber()); |
| | | |
| | | //工序列表 |
| | | List<Map<String, Object>> processNameList = flowCardMapper.getProcessNameList(); |
| | | itemmap.put("processList", processList); |
| | | itemmap.put("processNameList", processNameList); |
| | | // itemmap.put("numberList", numberList); |
| | | list.add(itemmap); |
| | | |
| | |
| | | List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();//最终结果 |
| | | List<FlowCard> flowCardList = JSONArray.parseArray(JSONObject.toJSONString(object.get("printList")), FlowCard.class); |
| | | if (!flowCardList.isEmpty()) { |
| | | Set<String> processedProcessIds = new HashSet<>(); // 用来存放已处理过的 processId |
| | | for (FlowCard flowCard : flowCardList) { |
| | | Map<String, Object> itemmap = new HashMap<>(); |
| | | //是否是工程明细打印 |