| | |
| | | printLike=null; |
| | | return map; |
| | | } |
| | | |
| | | public Map<String, Object> getSelectPrinReworkSv(Map<String, Object> object, String printMerge, String printLike) { |
| | | if (printMerge == null){ |
| | | printMerge= ""; |
| | | } |
| | | if (printLike == null){ |
| | | printLike= ""; |
| | | } |
| | | 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<>(); |
| | | //流程卡表头表尾数据 |
| | | //是否传入合并层数 |
| | | if (printMerge.equals("")||printMerge.equals("null") ){ |
| | | itemmap.put("detail", flowCardMapper.getPrimaryListRework(flowCard.getProcessId(), String.valueOf(flowCard.getTechnologyNumber()),flowCard.getOrderNumber())); |
| | | List<Map<String, Object>> detailList = flowCardMapper.getDetailListRework(flowCard.getProcessId(), flowCard.getTechnologyNumber(),flowCard.getOrderNumber()); |
| | | itemmap.put("detailList", detailList); |
| | | } |
| | | else { |
| | | |
| | | //流程卡明细数据 |
| | | if (printLike.equals("")||printLike.equals("null") ){ |
| | | itemmap.put("detail", flowCardMapper.getPrimaryListMergeRework(flowCard.getProcessId(), printMerge,flowCard.getOrderNumber())); |
| | | |
| | | List<Map<String, Object>> detailList = flowCardMapper.getDetailListRework(flowCard.getProcessId(), flowCard.getTechnologyNumber(),flowCard.getOrderNumber()); |
| | | itemmap.put("detailList", detailList); |
| | | } |
| | | else { |
| | | itemmap.put("detail", flowCardMapper.getPrimaryListRework(flowCard.getProcessId(), String.valueOf(flowCard.getTechnologyNumber()),flowCard.getOrderNumber())); |
| | | |
| | | List<Map<String, Object>> detailList = flowCardMapper.getDetailListLikeRework(flowCard.getProcessId(), printMerge,flowCard.getOrderNumber()); |
| | | itemmap.put("detailList", detailList); |
| | | } |
| | | } |
| | | |
| | | //工艺流程 |
| | | List<Map<String, Object>> processList = flowCardMapper.getProcessList(flowCard.getProcessId(), flowCard.getTechnologyNumber()); |
| | | |
| | | itemmap.put("processList", processList); |
| | | // itemmap.put("numberList", numberList); |
| | | list.add(itemmap); |
| | | |
| | | } |
| | | } |
| | | map.put("data", list); |
| | | //初始化值 |
| | | printLike=null; |
| | | return map; |
| | | } |
| | | } |
| | | |
| | | |