From d151d7af6ebab17d7de4ee2941448f634f0d0d8f Mon Sep 17 00:00:00 2001 From: mitao <2763622819@qq.com> Date: 星期五, 09 五月 2025 18:18:16 +0800 Subject: [PATCH] 编辑删除办理进度接口 --- springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/api/MgtComplaintController.java | 72 +++++++++++++++++++++++++++++++++++- 1 files changed, 70 insertions(+), 2 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/api/MgtComplaintController.java b/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/api/MgtComplaintController.java index ffb3ffa..309bc6b 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/api/MgtComplaintController.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/api/MgtComplaintController.java @@ -1,9 +1,23 @@ package com.panzhihua.sangeshenbian.api; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.panzhihua.common.controller.BaseController; +import com.panzhihua.common.model.vos.R; +import com.panzhihua.common.model.vos.sangeshenbian.SystemUserVo; +import com.panzhihua.sangeshenbian.annotation.SysLog; +import com.panzhihua.sangeshenbian.model.dto.ComplaintProcessUpdateDto; +import com.panzhihua.sangeshenbian.model.vo.ComplaintVO; +import com.panzhihua.sangeshenbian.service.IComplaintService; +import com.panzhihua.sangeshenbian.warpper.MgtComplaintQuery; import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; import lombok.RequiredArgsConstructor; import org.springframework.context.annotation.Lazy; -import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.*; + +import javax.validation.Valid; +import java.io.IOException; /** * @author mitao @@ -11,7 +25,61 @@ */ @Api(tags = {"三个身边后台-诉求管理"}) @RequestMapping("/complaint") +@RestController @RequiredArgsConstructor(onConstructor_ = {@Lazy}) -public class MgtComplaintController { +public class MgtComplaintController extends BaseController { + private final IComplaintService complaintService; + @ApiOperation("诉求列表") + @PostMapping("/page") + public R<Page<ComplaintVO>> pageList(@RequestBody MgtComplaintQuery query) { + SystemUserVo loginUserInfo = getLoginUserInfoSanGeShenBian(); + return R.ok(complaintService.pageList(query,loginUserInfo)); + } + @ApiOperation("诉求详情") + @GetMapping("/detail/{id}") + public R<ComplaintVO> detail(@ApiParam(name = "id", value = "诉求id", required = true) @PathVariable("id") Long id) { + return R.ok(complaintService.getDetailMgt(id)); + } + @ApiOperation("导出") + @PostMapping("/export") + public void export(@RequestBody MgtComplaintQuery query) { + SystemUserVo loginUserInfo = getLoginUserInfoSanGeShenBian(); + try { + complaintService.export(query,loginUserInfo); + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + + + @PostMapping("/update-progress") + @ApiOperation("办理进度修改2.0.1") + public R<?> updateProgress(@Valid @RequestBody ComplaintProcessUpdateDto dto) { + complaintService.updateProgress(dto); + return R.ok(); + } + + @DeleteMapping("del-progress/{id}") + @ApiOperation("办理进度删除2.0.1") + public R<?> delProgress(@ApiParam(name = "id", value = "办理进度id", required = true) @PathVariable("id") Long id) { + complaintService.delProgress(id); + return R.ok(); + } + + + + @ApiOperation("社区问题单、问题处理单、协调通知单 下载") + @GetMapping("/download-file/{id}/{type}") + @SysLog(operatorCategory = "单导出",operId = 10) + public R<?> communityProblem(@ApiParam(name = "id", value = "诉求id", required = true) @PathVariable("id") Long id, + @ApiParam(name = "type", value = "类型:1:社区问题单 2:问题处理单 3:协调通知单", required = true) @PathVariable("type") Integer type) { + try { + String name = complaintService.downloadFile(id, type, getLoginUserInfoSanGeShenBian()); + return R.ok(name); + } catch (IOException e) { + throw new RuntimeException(e); + } + } } -- Gitblit v1.7.1