From effe9fa26b86de56258755c2d9de096048f01b23 Mon Sep 17 00:00:00 2001 From: xuhy <3313886187@qq.com> Date: 星期四, 03 七月 2025 15:37:48 +0800 Subject: [PATCH] bug修改 --- ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TAppealController.java | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TAppealController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TAppealController.java index 26ffa5b..8e4dc69 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TAppealController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TAppealController.java @@ -169,17 +169,31 @@ appealDetailVO.setTaskCode(byId.getTaskCode()); return R.ok(appealDetailVO); } + @Resource + private TNoticeService noticeService; @Log(title = "审核申诉记录", businessType = BusinessType.UPDATE) @ApiOperation(value = "审核申诉记录") @PostMapping(value = "/audit") public R<Boolean> audit(@RequestBody @Valid TAppealAuditDTO dto) { + TTask task = taskCleanService.getById(dto.getTaskId()); + TLocation location = locationService.getById(task.getLocationId()); + TNotice tNotice = new TNotice(); + tNotice.setUserId(dto.getAppealPerson()); + tNotice.setStatus(1); + tNotice.setDataId(dto.getId()); dto.setAuditTime(LocalDateTime.now()); if (dto.getStatus()==2){ // 通过 TTask byId = taskCleanService.getById(dto.getTaskId()); byId.setStatus(6); taskCleanService.updateById(byId); + tNotice.setNoticeType(5); + tNotice.setNoticeContent("【"+location.getLocationName()+"】任务申诉通过"); + }else{ + tNotice.setNoticeType(4); + tNotice.setNoticeContent("【"+location.getLocationName()+"】任务申诉驳回"); } + noticeService.save(tNotice); dto.setAuditPerson(tokenService.getLoginUser().getUserId()+""); appealService.updateById(dto); return R.ok(); -- Gitblit v1.7.1