| | |
| | | // 合并函数:当同一“天”有多个对象时,如何处理(这里示例取第一个) |
| | | (existing, replacement) -> existing // 若有重复键,保留已存在的对象 |
| | | )); |
| | | List<Map<String, Object>> resultList = new ArrayList<>(); |
| | | Map<String, Object> resultMap = new LinkedHashMap<>(); |
| | | for (int i = 1; i <= 31; i++) { |
| | | Map<String, Object> resultMap = new HashMap<>(); |
| | | if (groupMap.containsKey(i)) { |
| | | EamInsOrderDetailUserResponse eamInsOrderDetailUserResponse = groupMap.get(i); |
| | | resultMap.put("operator" + i, sysDictService.queryTableDictTextByKey("sys_user", "realname", "username", eamInsOrderDetailUserResponse.getOperator())); |
| | |
| | | resultMap.put("operator" + i, ""); |
| | | resultMap.put("confirmUser" + i, ""); |
| | | } |
| | | resultList.add(resultMap); |
| | | } |
| | | result.put("data", resultList); |
| | | result.put("data", Collections.singletonList(resultMap)); |
| | | return result; |
| | | } |
| | | |
| | |
| | | // 合并函数:当同一“天”有多个对象时,如何处理(这里示例取第一个) |
| | | (existing, replacement) -> existing // 若有重复键,保留已存在的对象 |
| | | )); |
| | | List<Map<String, Object>> resultList = new ArrayList<>(); |
| | | Map<String, Object> resultMap = new LinkedHashMap<>(); |
| | | for (int i = 1; i <= 5; i++) { |
| | | Map<String, Object> resultMap = new HashMap<>(); |
| | | if (groupMap.containsKey(i)) { |
| | | EamWeekInsDetailUserResponse eamWeekInsDetailUserResponse = groupMap.get(i); |
| | | resultMap.put("operator" + i, sysDictService.queryTableDictTextByKey("sys_user", "realname", "username", eamWeekInsDetailUserResponse.getInspector())); |
| | |
| | | resultMap.put("operator" + i, ""); |
| | | resultMap.put("confirmUser" + i, ""); |
| | | } |
| | | resultList.add(resultMap); |
| | | } |
| | | result.put("data", resultList); |
| | | result.put("data", Collections.singletonList(resultMap)); |
| | | |
| | | return result; |
| | | } |
| | | |