guoyuji
2024-09-26 26633e17d9e9a612e4744405d214cf513d13bffd
north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java
@@ -417,7 +417,7 @@
                // 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);
                //}
@@ -628,14 +628,19 @@
        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);
            }
        }
@@ -649,12 +654,24 @@
        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{