| | |
| | | // Integer count=flowCardMapper.getPrintLabelCount(flowCard.getProcessId(), flowCard.getTechnologyNumber()); |
| | | Map<String, Object> itemmap = new HashMap<>(); |
| | | // for (int i = 0; i < count; i++) { |
| | | itemmap.put("data", flowCardMapper.getPrintLabelDetail(flowCard.getProcessId(), flowCard.getOrderNumber())); |
| | | itemmap.put("data", flowCardMapper.getPrintLabelDetail(flowCard)); |
| | | list.add(itemmap); |
| | | //} |
| | | |
| | |
| | | return map; |
| | | } |
| | | |
| | | public Object selectPrintDetailsSv(Map<String, Object> object, String inquiryMode) { |
| | | public Object selectPrintDetailsSv(Map<String, Object> object, String inquiryMode,Integer type) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | 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()) { |
| | | for (FlowCard flowCard : flowCardList) { |
| | | Map<String, Object> itemmap = new HashMap<>(); |
| | | itemmap.put("detail", flowCardMapper.selectPrintDetailsMp(flowCard.getOrderId())); |
| | | if(type==1){ |
| | | itemmap.put("detail", flowCardMapper.selectPrintDetailsMp(flowCard.getOrderId())); |
| | | }else if(type==2){ |
| | | itemmap.put("detail", flowCardMapper.selectPrintDetailsMp1(flowCard.getOrderId())); |
| | | } |
| | | |
| | | 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 |
| | | |
| | | if (lableType != 2){ |
| | | for (FlowCard flowCard : flowCardList) { |
| | | String processId = flowCard.getProcessId(); |
| | | String orderNumber = flowCard.getOrderNumber().toString(); |
| | | |
| | | // 检查是否已经处理过该 processId,如果处理过则跳过 |
| | | if (processedProcessIds.contains(processId)&&processedProcessIds.contains(orderNumber)) { |
| | | continue; |
| | | } |
| | | Map<String, Object> itemmap = new HashMap<>(); |
| | | itemmap.put("data", flowCardMapper.getPrintCustomDataDetails(flowCard.getProcessId(),flowCard.getOrderNumber())); |
| | | list.add(itemmap); |
| | | |
| | | // 将该 processId 加入已处理集合 |
| | | processedProcessIds.add(processId); |
| | | processedProcessIds.add(orderNumber); |
| | | } |
| | | } |
| | | else{ |