| | |
| | | |
| | | import java.sql.Date; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import static com.example.erp.service.sd.OrderService.getOrderProcessDetails; |
| | | |
| | |
| | | return map; |
| | | } |
| | | |
| | | public Map<String, Object> getPrintCustomDataProjectNo(String type, String projectNo) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", flowCardMapper.getPrintCustomDataProjectNo(projectNo)); |
| | | map.put("title", flowCardMapper.getPrintTitle(type)); |
| | | return map; |
| | | } |
| | | |
| | | public Object selectSortTableSv(Map<String, Object> object) { |
| | | 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("flowCard")), FlowCard.class); |
| | | if (!flowCardList.isEmpty()) { |
| | | List<Map<String, Object>> flowCardList1=flowCardMapper.selectFlowCardMerge(flowCardList.get(0).getProcessId()); |
| | | if(flowCardList1.size()==1){ |
| | | flowCardMapper.updateFlowCardMerge(flowCardList.get(0).getProcessId()); |
| | | returns="true"; |
| | | 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"; |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | |
| | | |
| | | |
| | | } |
| | | |
| | | public Map<String, Object> getPrintProjectDetails(String projectNo) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", flowCardMapper.getPrintProjectDetailsMp(projectNo)); |
| | | return map; |
| | | } |
| | | |
| | | public Map<String, Object> getPrintCustomDataProjectNoDetailSv(String type, Map<String, Object> object) { |
| | | 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()) { |
| | | Set<String> processedProcessIds = new HashSet<>(); // 用来存放已处理过的 processId |
| | | for (FlowCard flowCard : flowCardList) { |
| | | Map<String, Object> itemmap = new HashMap<>(); |
| | | itemmap.put("data", flowCardMapper.getPrintCustomDataProjectDetail(flowCard.getProjectNo(),flowCard.getStockId())); |
| | | list.add(itemmap); |
| | | } |
| | | } |
| | | map.put("data", list); |
| | | map.put("title", flowCardMapper.getPrintTitle(type)); |
| | | return map; |
| | | } |
| | | } |
| | | |
| | | |