廖井涛
2025-03-03 aa3bd3741b94f50f0c1d7e3a137bb681d7421294
north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java
@@ -219,7 +219,7 @@
        return map;
    }
    public Object selectPrintFlowCardSv(Date selectTime1, Date selectTime2, String orderId, String project, String userId, FlowCard flowCard) {
    public Object selectPrintFlowCardSv(Date selectTime1, Date selectTime2, String orderId, String project, String userId, Integer state, FlowCard flowCard) {
        if ("null".equals(orderId)) {
            orderId = "";
        }
@@ -227,7 +227,7 @@
            project = "";
        }
        Map<String, Object> map = new HashMap<>();
        map.put("data", flowCardMapper.selectPrintFlowCardMp(selectTime1, selectTime2, orderId, project, flowCard));
        map.put("data", flowCardMapper.selectPrintFlowCardMp(selectTime1, selectTime2, orderId, project,state, flowCard));
        String roleId = flowCardMapper.selectUserMp(userId);
        map.put("user", roleId);
        return map;
@@ -776,10 +776,12 @@
        if (!flowCardList.isEmpty()) {
            for (FlowCard flowCard : flowCardList) {
                Map<String, Object> itemmap = new HashMap<>();
                if (type == 1) {
                if (type == 1) {//明细打印
                    itemmap.put("detail", flowCardMapper.selectPrintDetailsMp(flowCard.getOrderId()));
                } else if (type == 2) {
                } else if (type == 2) {//明细分架打印
                    itemmap.put("detail", flowCardMapper.selectPrintDetailsMp1(flowCard.getOrderId()));
                }else if (type == 3) {//订单打印
                    itemmap.put("detail", flowCardMapper.selectPrintDetailsMp2(flowCard.getOrderId()));
                }
                list.add(itemmap);
@@ -799,20 +801,28 @@
            if (lableType != 2) {//成品标签
                for (FlowCard flowCard : flowCardList) {
                    String orderId = flowCard.getOrderId();
                    String processId = flowCard.getProcessId();
                    String orderNumber = flowCard.getOrderNumber().toString();
                       if (processId!=null){
                           // 检查是否已经处理过该 processId,如果处理过则跳过
                           if (processedProcessIds.contains(processId) && processedProcessIds.contains(orderNumber)) {
                               continue;
                           }
                           Map<String, Object> itemmap = new HashMap<>();
                           itemmap.put("data", flowCardMapper.getPrintCustomDataDetails(flowCard.getProcessId(), flowCard.getOrderNumber(), flowCard.getPrintQuantity()));
                           list.add(itemmap);
                    // 检查是否已经处理过该 processId,如果处理过则跳过
                    if (processedProcessIds.contains(processId) && processedProcessIds.contains(orderNumber)) {
                        continue;
                    }
                    Map<String, Object> itemmap = new HashMap<>();
                    itemmap.put("data", flowCardMapper.getPrintCustomDataDetails(flowCard.getProcessId(), flowCard.getOrderNumber(), flowCard.getPrintQuantity()));
                    list.add(itemmap);
                           // 将该 processId 加入已处理集合
                           processedProcessIds.add(processId);
                           processedProcessIds.add(orderNumber);
                       } else{
                    // 将该 processId 加入已处理集合
                    processedProcessIds.add(processId);
                    processedProcessIds.add(orderNumber);
                           Map<String, Object> itemmap = new HashMap<>();
                           itemmap.put("data", flowCardMapper.getPrintOrderDataDetails(flowCard.getOrderId(), flowCard.getOrderNumber(), flowCard.getPrintQuantity()));
                           list.add(itemmap);
                       }
                }
            } else {//小片标签
                for (FlowCard flowCard : flowCardList) {