| | |
| | | import com.ruoyi.system.vo.system.AppealListVO; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | List<Long> patrolInspectorIds = sysUsers.stream().filter(sysUser -> |
| | | sysUser.getPhonenumber().equals(query.getPhonenumber()) |
| | | ).map(SysUser::getUserId).collect(Collectors.toList()); |
| | | if (!query.getPatrolInspectorIds().isEmpty()){ |
| | | if (!CollectionUtils.isEmpty(query.getPatrolInspectorIds())){ |
| | | // 取交集 |
| | | patrolInspectorIds = patrolInspectorIds.stream().filter(query.getPatrolInspectorIds()::contains).collect(Collectors.toList()); |
| | | } |
| | |
| | | appealDetailVO.setLocationIcon(byId2.getLocationIcon()); |
| | | appealDetailVO.setLocationName(byId2.getLocationName()); |
| | | appealDetailVO.setTaskId(byId.getId()); |
| | | SysUser sysUser = sysUserService.selectUserById(Long.valueOf(appeal.getAuditPerson())); |
| | | if (sysUser!=null){ |
| | | appealDetailVO.setAuditPersonName(sysUser.getUserName()); |
| | | if (appeal.getAuditPerson()!=null){ |
| | | SysUser sysUser = sysUserService.selectUserById(Long.valueOf(appeal.getAuditPerson())); |
| | | if (sysUser!=null){ |
| | | appealDetailVO.setAuditPersonName(sysUser.getUserName()); |
| | | } |
| | | } |
| | | appealDetailVO.setTaskName(byId.getTaskName()); |
| | | appealDetailVO.setTaskCode(byId.getTaskCode()); |
| | |
| | | @ApiOperation(value = "审核申诉记录") |
| | | @PostMapping(value = "/audit") |
| | | public R<Boolean> audit(@RequestBody @Valid TAppealAuditDTO dto) { |
| | | TTask task = taskCleanService.getById(dto.getTaskId()); |
| | | TAppeal appeal = appealService.getById(dto.getId()); |
| | | dto.setStatus(dto.getStatus()); |
| | | dto.setAuditPerson(tokenService.getLoginUser().getUserId()+""); |
| | | dto.setAuditTime(LocalDateTime.now()); |
| | | TTask task = taskCleanService.getById(appeal.getTaskId()); |
| | | TLocation location = locationService.getById(task.getLocationId()); |
| | | TNotice tNotice = new TNotice(); |
| | | tNotice.setUserId(dto.getAppealPerson()); |