| | |
| | | List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();//最终结果 |
| | | List<FinishedOperateLog> finishedOperateLogList = JSONArray.parseArray(JSONObject.toJSONString(object.get("printList")), FinishedOperateLog.class); |
| | | if (!finishedOperateLogList.isEmpty()) { |
| | | Set<String> processedProcessIds = new HashSet<>(); |
| | | for (FinishedOperateLog finishedOperateLog : finishedOperateLogList) { |
| | | String OrderId = finishedOperateLog.getOrderId(); |
| | | |
| | | // 检查是否已经处理过该 OrderId,如果处理过则跳过 |
| | | if (processedProcessIds.contains(OrderId)) { |
| | | continue; |
| | | } |
| | | |
| | | Map<String, Object> itemmap = new HashMap<>(); |
| | | itemmap.put("detail", finishedOperateLogMapper.getPrimaryListLimt(finishedOperateLog.getOrderId(),finishedOperateLog.getProcessId(),finishedOperateLog.getRemarks())); |
| | | |
| | |
| | | itemmap.put("detailList", detailList); |
| | | |
| | | list.add(itemmap); |
| | | |
| | | processedProcessIds.add(OrderId); |
| | | } |
| | | } |
| | | map.put("data", list); |
| | |
| | | o.customer_name, |
| | | o.project, |
| | | fol.remarks, |
| | | fol.quantity |
| | | SUM(fol.quantity) as quantity |
| | | from (select * |
| | | from mm.finished_operate_log aa where aa.operate_type = '入库' and aa.status!='已作废') fol |
| | | left join sd.order_detail od on fol.order_id = od.order_id and fol.operation_number = od.order_number |
| | | left join sd.`order` o on o.order_id=fol.order_id |
| | | where |
| | | o.order_id=#{orderId} and fol.process_id=#{processId} and fol.remarks=#{remarks} |
| | | o.order_id=#{orderId} and fol.remarks=#{remarks} |
| | | and (fol.remarks is not null and fol.remarks !="") and (fol.process_id !="" and fol.process_id is not null) |
| | | |
| | | group by fol.remarks,od.order_id,fol.process_id |
| | | group by fol.remarks,od.order_id |
| | | order by fol.operate_time desc |
| | | </select> |
| | | |
| | |
| | | AND fol.operation_number = od.order_number |
| | | LEFT JOIN sd.`order` o ON o.order_id = fol.order_id |
| | | WHERE |
| | | o.order_id=#{orderId} and fol.process_id=#{processId} and fol.remarks=#{remarks} |
| | | o.order_id=#{orderId} and fol.remarks=#{remarks} |
| | | ORDER BY |
| | | fol.operate_time DESC |
| | | |