From d5bb894f9be2e0a3b62d475b60b44f2ab138528c Mon Sep 17 00:00:00 2001 From: guoyujie <guoyujie@ng.com> Date: 星期四, 12 六月 2025 16:48:35 +0800 Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override --- north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java | 199 +++++++++++++++++++++++++++++++++---------------- 1 files changed, 132 insertions(+), 67 deletions(-) diff --git a/north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java b/north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java index 5a65f28..7872e80 100644 --- a/north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java +++ b/north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java @@ -19,6 +19,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; import org.springframework.stereotype.Service; +import java.time.LocalDate; import java.util.List; import java.util.Map; @@ -29,6 +30,7 @@ import java.sql.Date; import java.util.*; import java.util.stream.Collectors; +import java.util.stream.IntStream; import static com.example.erp.service.sd.OrderService.getOrderProcessDetails; @@ -52,11 +54,25 @@ } //娴佺▼鍗$鐞嗘煡璇� - public Map<String, Object> selectProcessCard(Integer pageNum, Integer pageSize, Date selectTime1, Date selectTime2, FlowCard flowCard) { + public Map<String, Object> selectProcessCard(Integer pageNum, Integer pageSize,List<String> selectDate, FlowCard flowCard) { Integer offset = (pageNum - 1) * pageSize; + String endDate = LocalDate.now().toString(); + String startDate = LocalDate.now().minusDays(15).toString(); + if(selectDate !=null && selectDate.size()==2){ + if(!selectDate.get(0).isEmpty()){ + startDate = selectDate.get(0); + } + if(!selectDate.get(1).isEmpty()){ + endDate = selectDate.get(1); + } + } Map<String, Object> map = new HashMap<>(); - map.put("data", flowCardMapper.selectFlowCard(offset, pageSize, selectTime1, selectTime2, flowCard)); - map.put("total", flowCardMapper.getPageTotal(offset, pageSize, selectTime1, selectTime2, flowCard)); + map.put("data", flowCardMapper.selectFlowCard(offset, pageSize, startDate, endDate, flowCard)); + map.put("total", flowCardMapper.getPageTotal(offset, pageSize, startDate, endDate, flowCard)); + List<String> list = new ArrayList<>(); + list.add(startDate); + list.add(endDate); + map.put("selectDate",list); return map; } @@ -216,6 +232,7 @@ public Object flowCardDetailSv(String processId, FlowCard flowCard) { Map<String, Object> map = new HashMap<>(); map.put("data", flowCardMapper.flowCardDetailMp(processId, flowCard)); + map.put("merge", flowCardMapper.flowCardDetailMergeMp(processId)); return map; } @@ -287,8 +304,11 @@ 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<>(); //娴佺▼鍗¤〃澶磋〃灏炬暟鎹� //鏄惁浼犲叆鍚堝苟灞傛暟 @@ -296,7 +316,9 @@ //鏄惁鍖呭惈鍒囧壊 //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()); @@ -304,11 +326,11 @@ } 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()); @@ -381,15 +403,20 @@ } 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()); @@ -404,11 +431,11 @@ 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()); @@ -568,14 +595,15 @@ 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<>(); @@ -583,7 +611,7 @@ list.add(itemmap); // 灏嗚 processId 鍔犲叆宸插鐞嗛泦鍚� - processedProcessIds.add(processId); + processedKeys.add(uniqueKey); } } else {//灏忕墖鏍囩 for (FlowCard flowCard : flowCardList) { @@ -603,14 +631,15 @@ 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<>(); @@ -618,7 +647,7 @@ list.add(itemmap); // 灏嗚 processId 鍔犲叆宸插鐞嗛泦鍚� - processedProcessIds.add(processId); + processedKeys.add(uniqueKey); } } else {//灏忕墖鏍囩 for (FlowCard flowCard : flowCardList) { @@ -706,8 +735,10 @@ //宸ヨ壓娴佺▼ 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); @@ -797,16 +828,17 @@ 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 orderId = flowCard.getOrderId(); String processId = flowCard.getProcessId(); String orderNumber = flowCard.getOrderNumber().toString(); + String uniqueKey = processId + "|" + orderNumber; // 鐢ㄧ壒娈婂瓧绗﹁繛鎺ラ槻姝㈠啿绐� if (processId!=null){ // 妫�鏌ユ槸鍚﹀凡缁忓鐞嗚繃璇� processId锛屽鏋滃鐞嗚繃鍒欒烦杩� - if (processedProcessIds.contains(processId) && processedProcessIds.contains(orderNumber)) { + if (processedKeys.contains(uniqueKey)) { continue; } Map<String, Object> itemmap = new HashMap<>(); @@ -814,8 +846,7 @@ list.add(itemmap); // 灏嗚 processId 鍔犲叆宸插鐞嗛泦鍚� - processedProcessIds.add(processId); - processedProcessIds.add(orderNumber); + processedKeys.add(uniqueKey); } else{ Map<String, Object> itemmap = new HashMap<>(); @@ -863,23 +894,27 @@ } - public String mergeFlowCard(Map<String, Object> object) { + public String mergeFlowCard(Map<String, Object> object, Integer merge) { String returns = "false"; List<FlowCard> flowCardList = JSONArray.parseArray(JSONObject.toJSONString(object.get("flowCard")), FlowCard.class); if (!flowCardList.isEmpty()) { List<Map<String, Object>> flowCardList1 = flowCardMapper.selectFlowCardMerge(flowCardList.get(0).getProcessId()); - int index = 1; - for (int i = 0; i < flowCardList1.size(); i++) { - if (Integer.valueOf(flowCardList1.get(i).get("count2").toString()) > 1) { - List<Integer> technologyNumber = Arrays.stream(flowCardList1.get(i).get("count1").toString().split(",")) - .map(Integer::parseInt) - .collect(Collectors.toList()); - flowCardMapper.updateFlowCardMerge(flowCardList.get(0).getProcessId(), technologyNumber, index); - index += 1; - returns = "true"; + if (merge == 0){ + int index = 1; + for (int i = 0; i < flowCardList1.size(); i++) { + if (Integer.valueOf(flowCardList1.get(i).get("count2").toString()) > 1) { + List<Integer> technologyNumber = Arrays.stream(flowCardList1.get(i).get("count1").toString().split(",")) + .map(Integer::parseInt) + .collect(Collectors.toList()); + flowCardMapper.updateFlowCardMerge(flowCardList.get(0).getProcessId(), technologyNumber, index); + index += 1; + returns = "true"; + } } + }else {//鍙栨秷鍚堝苟 + flowCardMapper.updateFlowCardIsMerge(flowCardList.get(0).getProcessId()); + returns = "true"; } - } @@ -895,11 +930,14 @@ } String[] processCardList = processCard.split("/"); + List<String> result = IntStream.range(0, processCardList[1].length()) + .mapToObj(i -> String.valueOf(processCardList[1].charAt(i))) + .collect(Collectors.toList()); List<FlowCard> flowCardList = flowCardMapper.selectList( new QueryWrapper<FlowCard>() .eq("process_id", processCardList[0]) - .eq("technology_number", processCardList[1]) + .in("technology_number", result) ); for (FlowCard flowCard : flowCardList) { flowCard.setOrderGlassDetail( @@ -978,7 +1016,6 @@ 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<>(); //鏄惁鏄伐绋嬫槑缁嗘墦鍗� @@ -1062,27 +1099,37 @@ } public Object processCardAutoRack(Map<String, Object> object) { - String orderId = "NG25000004"; - String productionId = "NG25000004B"; - /*String orderId = object.get("orderId").toString(); + String orderId = object.get("orderId").toString(); String productionId = object.get("productionId").toString(); Integer inMaxQuantity = Integer.parseInt(object.get("inMaxQuantity").toString()); Float inWeight = Float.parseFloat(object.get("inWeight").toString()); - Float shelfThickness = Float.parseFloat(object.get("shelfThickness").toString())*1000; + Float shelfThickness = Float.parseFloat(object.get("shelfThickness").toString()); Float spacerThickness = Float.parseFloat(object.get("spacerThickness").toString()); - */ + Float inLenMax = Float.parseFloat(object.get("inLenMax").toString()); + Float inLenMin = Float.parseFloat(object.get("inLenMin").toString()); + Float inShortMax = Float.parseFloat(object.get("inShortMax").toString()); + Float inShortMin = Float.parseFloat(object.get("inShortMin").toString()); + + /*String orderId = "NG25000004"; + String productionId = "NG25000004A"; Integer inMaxQuantity = 1; - Float inWeight = 100.0f; + Float inWeight = 4000.0f; Float shelfThickness = 2000.0f; - /*鍨墖鍘氬害*/ - Float spacerThickness = 0.0f; + Float maxHeight = 1520.0f; + Float maxWid = 400.0f; + Float spacerThickness = 0.0f;//鍨墖鍘氬害*/ + + Map<String, Object> thickness = flowCardMapper.getGlassThicknessByProdutionId(orderId, productionId); + //鎴愬搧鐜荤拑鎬诲帤搴� Float glassTotalThickness = Float.parseFloat(thickness.get("totalThickness").toString()); + //鎴愬搧鐜荤拑鍘氬害 Float glassThickness = Float.parseFloat(thickness.get("thickness").toString()); //鑾峰彇姝ゅ伐绋嬪彿璁㈠崟鏄庣粏淇℃伅 - List<OrderDetail> orderDetails = flowCardMapper.getOrderDetailByProductionId(orderId, productionId); + List<OrderDetail> orderDetails = flowCardMapper.getOrderDetailByProductionId(orderId, productionId,"scope",inLenMax,inLenMin,inShortMax,inShortMin,glassThickness); + List<OrderDetail> orderDetailsNotScope = flowCardMapper.getOrderDetailByProductionId(orderId, productionId,"notScope",inLenMax,inLenMin,inShortMax,inShortMin,glassThickness); //鏍规嵁鐜荤拑鍘氬害鍜屽灚鐗囧帤搴﹀綋鍓嶆灦瀛愭渶澶у彲鏀炬暟閲� Integer shelfMaxQuantityByThickness = (int) (shelfThickness / (glassTotalThickness + spacerThickness)); @@ -1104,58 +1151,74 @@ ); //褰撳墠璁㈠崟鏄庣粏鍓╀綑鏁伴噺 if (shelfQuantity == 0) { - shelfQuantity = shelfQuantityByWeight; - }else if(shelfQuantity>0){ - String FlowCardId = orderDetailList.get(orderDetailList.size() - 1).getFlowCardId(); + shelfQuantity =Math.min( Math.min(shelfMaxQuantityByThickness,inMaxQuantity),shelfQuantityByWeight); + }else if(shelfQuantity>0){//鏋跺瓙鍓╀綑鏁伴噺澶т簬0鏃讹紝鍒ゆ柇褰撳墠鏋跺瓙鍓╀綑閲嶉噺锛屾槸鍚︽敮鎸佹渶鏂板簭鍙风殑鐨勬垚鍝侀噸閲� + String FlowCardId = orderDetailList.get(orderDetailList.size() - 1).getProcessId(); double flowCardWeight = 0.0; for (OrderDetail orderDetail1 : orderDetailList) { - if (orderDetail1.getFlowCardId().equals(FlowCardId)) { + if (orderDetail1.getProcessId().equals(FlowCardId)) { flowCardWeight += orderDetail1.getHeight()*orderDetail1.getQuantity()* orderDetail1.getWidth()* glassThickness* 2.5 / 1000000; } } if(flowCardWeight>0){ - //System.out.println(inWeight+","+flowCardWeight); flowCardWeight = inWeight - flowCardWeight; - shelfQuantity = (int) (flowCardWeight / + //鎸夌収褰撳墠娴佺▼鍗″墿浣欓噸閲忥紝璁$畻褰撳墠娴佺▼鍗″墿浣欐暟閲� + int remainingQuantity = (int) (flowCardWeight / (orderDetail.getHeight() * orderDetail.getWidth() * glassThickness * 2.5 / 1000000)); + shelfQuantity =Math.min(Math.min(Math.min(shelfQuantityByWeight, Math.min(inMaxQuantity, shelfMaxQuantityByThickness)),shelfQuantity),remainingQuantity); if (shelfQuantity == 0) { - shelfQuantity = shelfQuantityByWeight; + shelfQuantity = Math.min(shelfQuantityByWeight, Math.min(inMaxQuantity, shelfMaxQuantityByThickness)); flowCardNo += 1; } } } //鍙栨渶灏忓�� - Integer maxQuantity = 0; + //Integer maxQuantity = 0; while (orderDetail.getQuantity() > 0) { OrderDetail newOrderDetail = new OrderDetail(); //褰撴寰幆涓紝褰撳墠鏋跺瓙鍓╀綑鏁伴噺涓�0鏃讹紝閲嶆柊璁$畻鏋跺瓙鍓╀綑鏁伴噺 if (shelfQuantity == 0) { - shelfQuantity = shelfQuantityByWeight; + shelfQuantity = Math.min(Math.min(shelfMaxQuantityByThickness,inMaxQuantity),shelfQuantityByWeight); } - String processId = productionId + String.format("%05d", flowCardNo); + String processId = productionId + String.format("%03d", flowCardNo); //鍙栨渶灏忓�� - maxQuantity = Math.min(shelfQuantity, Math.min(inMaxQuantity, shelfMaxQuantityByThickness)); - /*System.out.println(shelfQuantity + "," + inMaxQuantity + "," + shelfMaxQuantityByThickness); + //maxQuantity = Math.min(shelfQuantity, Math.min(inMaxQuantity, shelfMaxQuantityByThickness)); + //maxQuantity = Math.min(shelfQuantity, shelfMaxQuantityByThickness); + + /*System.out.println("璁㈠崟搴忓彿锛�"+orderDetail.getOrderNumber()); + System.out.println(shelfQuantity + "," + "," + shelfMaxQuantityByThickness); System.out.println(flowCardNo + "," + maxQuantity); System.out.println("------");*/ + if(shelfQuantity<=0){ + return false; + } - if (orderDetail.getQuantity() > maxQuantity) { - newOrderDetail.setFlowCardId(processId); - newOrderDetail.setQuantity(Long.valueOf(maxQuantity)); + if (orderDetail.getQuantity() > shelfQuantity) { + newOrderDetail.setProcessId(processId); + newOrderDetail.setQuantity(Long.valueOf(shelfQuantity)); newOrderDetail.setHeight(orderDetail.getHeight()); newOrderDetail.setWidth(orderDetail.getWidth()); + newOrderDetail.setOrderNumber(orderDetail.getOrderNumber()); + newOrderDetail.setShape(orderDetail.getShape()); + newOrderDetail.setLandingSequence(flowCardNo); orderDetailList.add(newOrderDetail); - orderDetail.setQuantity(orderDetail.getQuantity() - maxQuantity); + orderDetail.setQuantity(orderDetail.getQuantity() - shelfQuantity); + orderDetail.setBaiscQuantity(String.valueOf(Integer.valueOf(orderDetail.getBaiscQuantity())-shelfQuantity)); flowCardNo += 1; + shelfQuantity = shelfQuantity - shelfQuantity; } else { - newOrderDetail.setFlowCardId(processId); + newOrderDetail.setProcessId(processId); newOrderDetail.setQuantity(orderDetail.getQuantity()); newOrderDetail.setHeight(orderDetail.getHeight()); newOrderDetail.setWidth(orderDetail.getWidth()); + newOrderDetail.setOrderNumber(orderDetail.getOrderNumber()); + newOrderDetail.setShape(orderDetail.getShape()); + newOrderDetail.setLandingSequence(flowCardNo); + newOrderDetail.setBaiscQuantity(String.valueOf(orderDetail.getBaiscQuantity())); orderDetailList.add(newOrderDetail); //褰撳墠鏋跺瓙鍓╀綑鏁伴噺 shelfQuantity = shelfQuantity - Math.toIntExact(orderDetail.getQuantity()); @@ -1167,9 +1230,11 @@ } } - - - return orderDetailList; + Map<String, Object> map = new HashMap<>(); + Collections.reverse(orderDetailList); + map.put("orderDetailList", orderDetailList); + map.put("orderDetailsNotScope", orderDetailsNotScope); + return map; } -- Gitblit v1.8.0