| | |
| | | @PostMapping(value = "/addOrUpdate") |
| | | public ResultVO update(Authentication authentication, @RequestBody ExamineMng examineMng) { |
| | | // 获取当前用户 |
| | | ContextCacheUser currentUser = (ContextCacheUser) authentication.getPrincipal(); |
| | | /* ContextCacheUser currentUser = (ContextCacheUser) authentication.getPrincipal(); |
| | | examineMng.setExamineDepartmentId(currentUser.getDepId()); |
| | | examineMng.setExaminePersonId(currentUser.getUid()); |
| | | examineMng.setExaminePersonId(currentUser.getUid());*/ |
| | | if (examineMng.getId() == null) { |
| | | return new ResultVO<>(ResultCodes.OK,examineMngBaseService.save(examineMng)); |
| | | } else { |
| | |
| | | List<CurrentExamineDto> list = JSONObject.parseArray( examineMng.getNumberDetailJson(), CurrentExamineDto.class); |
| | | List<Long> idList = list.stream().map(CurrentExamineDto::getId).collect(Collectors.toList()); |
| | | |
| | | 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)); |
| | |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | dto.setCurrentExamineDtoList(list); |
| | | |
| | | //获取合格分数 |