| | |
| | | |
| | | @Resource |
| | | private CommonService commonService; |
| | | |
| | | |
| | | |
| | | |
| | | @Override |
| | | public ResultVO queryAll(PageQuery<ExamineMngQueryCriteria> pageQuery) { |
| | | PageUtils.checkCheck(pageQuery); |
| | |
| | | List<CurrentExamineDto> list = JSONObject.parseArray( examineMng.getNumberDetailJson(), CurrentExamineDto.class); |
| | | List<Long> idList = list.stream().map(CurrentExamineDto::getId).collect(Collectors.toList()); |
| | | |
| | | List<ExamineItem> itemList = examineItemBaseService.selectBatchIds(idList); |
| | | Map<Long,ExamineItem> itemMap = itemList.stream().collect( |
| | | Collectors.toMap(ExamineItem::getId, Function.identity(),(k1, k2)->k1)); |
| | | if(!idList.isEmpty()) { |
| | | List<ExamineItem> itemList = examineItemBaseService.selectBatchIds(idList); |
| | | Map<Long, ExamineItem> itemMap = itemList.stream().collect( |
| | | Collectors.toMap(ExamineItem::getId, Function.identity(), (k1, k2) -> k1)); |
| | | |
| | | if(itemMap != null){ |
| | | list.forEach(f->{ |
| | | ExamineItem item = itemMap.get(f.getId()); |
| | | if(item != null){ |
| | | f.setItemDetail(item.getItemDetail()); |
| | | f.setContent(item.getContent()); |
| | | f.setJudgeStandard(item.getJudgeStandard()); |
| | | } |
| | | }); |
| | | if (itemMap != null) { |
| | | list.forEach(f -> { |
| | | ExamineItem item = itemMap.get(f.getId()); |
| | | if (item != null) { |
| | | f.setItemDetail(item.getItemDetail()); |
| | | f.setContent(item.getContent()); |
| | | f.setJudgeStandard(item.getJudgeStandard()); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | dto.setCurrentExamineDtoList(list); |
| | | |
| | |
| | | }); |
| | | examineMngBaseService.updateBatchById(delList); |
| | | } |
| | | } |
| | | } |