| | |
| | | } |
| | | |
| | | Map<String, Object> itemmap = new HashMap<>(); |
| | | itemmap.put("detail", finishedOperateLogMapper.getPrimaryListLimts(finishedOperateLog.getOrder().getCustomerName(),finishedOperateLog.getOrder().getProject(),finishedOperateLog.getRemarks())); |
| | | itemmap.put("detail", finishedOperateLogMapper.getPrimaryListLimts( |
| | | finishedOperateLog.getOrder().getCustomerId(), |
| | | finishedOperateLog.getOrder().getProject(), |
| | | finishedOperateLog.getRemarks())); |
| | | |
| | | List<Map<String, Object>> detailList = finishedOperateLogMapper.getDetailList2(finishedOperateLog.getOrderId(),finishedOperateLog.getProcessId(),finishedOperateLog.getRemarks()); |
| | | |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | public Map<String, Object> getInventoryPrints(List<FinishedGoodsInventory> finishedGoodsInventories) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();//最终结果 |
| | | if (!finishedGoodsInventories.isEmpty()) { |
| | | Set<String> processedProcessIds = new HashSet<>(); |
| | | for (FinishedGoodsInventory finishedGoodsInventory : finishedGoodsInventories) { |
| | | String orderId = finishedGoodsInventory.getOrderId(); |
| | | String boxNo = finishedGoodsInventory.getBoxNo(); |
| | | |
| | | // 检查是否已经处理过该 OrderId,如果处理过则跳过 |
| | | if (processedProcessIds.contains(orderId) && processedProcessIds.contains(boxNo)) { |
| | | continue; |
| | | } |
| | | |
| | | Map<String, Object> itemmap = new HashMap<>(); |
| | | List<Map<String, String>> detail = finishedGoodsInventoryMapper.getPrintTitleByBox( |
| | | finishedGoodsInventory.getOrder().getCustomerId(), |
| | | finishedGoodsInventory.getOrder().getProject(), |
| | | boxNo, |
| | | orderId |
| | | ); |
| | | |
| | | itemmap.put("detail",detail); |
| | | //获取库存里面此订单此箱号的所有产品信息 |
| | | List<Map<String, Object>> detailList = finishedGoodsInventoryMapper |
| | | .getorderProductByBoxNo(orderId,boxNo); |
| | | |
| | | List<Map<String, Object>> detailsmaplist = new ArrayList<Map<String, Object>>(); |
| | | |
| | | for(Map<String, Object> details:detailList){ |
| | | Map<String, Object> detailsmap = new HashMap<>(); |
| | | detailsmap.put("product_name",details.get("product_name").toString()); |
| | | //获取明细数据 |
| | | List<Map<String, Object>> orderDetailList = finishedGoodsInventoryMapper |
| | | .getPrintDetail( |
| | | orderId, |
| | | boxNo, |
| | | Integer.valueOf(details.get("product_id").toString()), |
| | | details.get("thickness").toString() |
| | | ); |
| | | |
| | | detailsmap.put("detailList",orderDetailList); |
| | | detailsmaplist.add(detailsmap); |
| | | |
| | | } |
| | | itemmap.put("detailList", detailsmaplist); |
| | | list.add(itemmap); |
| | | |
| | | |
| | | processedProcessIds.add(orderId); |
| | | processedProcessIds.add(boxNo); |
| | | } |
| | | } |
| | | map.put("data", list); |
| | | return map; |
| | | } |
| | | } |