| | |
| | | return false; |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public Boolean updateTaskPlaceSelfCheck(TaskPlaceSelfCheckVO taskPlaceSelfCheck) throws Exception { |
| | | // 1.更新任务表 |
| | | ITaskService bean2 = SpringUtils.getBean(ITaskService.class); |
| | | Long aLong = bean2.updateTask(null, null, null, taskPlaceSelfCheck.getReasonFailure(), AuthUtil.getUserId(), taskPlaceSelfCheck.getTaskId(), taskPlaceSelfCheck.getStatus()); |
| | | if (aLong <= 0) { |
| | | return false; |
| | | } |
| | | // 2.更新任务详情 |
| | | boolean save = updateById(taskPlaceSelfCheck); |
| | | if (save) { |
| | | // 3.更新题目记录 |
| | | List<TaskPlaceRecordVO> taskPlaceRecordList = taskPlaceSelfCheck.getTaskPlaceRecordVOList(); |
| | | ITaskPlaceRecordService bean = SpringUtil.getBean(ITaskPlaceRecordService.class); |
| | | List<TaskPlaceRecordEntity> collect = taskPlaceRecordList.stream().filter(item -> item.getState().equals(0)).collect(Collectors.toList()); |
| | | boolean b = bean.updateBatchById(collect); |
| | | if (b) { |
| | | return b; |
| | | } |
| | | throw new Exception("保存失败!"); |
| | | } |
| | | throw new Exception("保存失败!"); |
| | | } |
| | | } |