| | |
| | | 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.model.query.ComplaintQuery; |
| | | import com.panzhihua.sangeshenbian.model.vo.ComplaintVO; |
| | | import com.panzhihua.sangeshenbian.service.IComplaintService; |
| | | 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.GetMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.io.IOException; |
| | | |
| | | /** |
| | | * @author mitao |
| | |
| | | */ |
| | | @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 ComplaintQuery 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 ComplaintQuery query) { |
| | | SystemUserVo loginUserInfo = getLoginUserInfoSanGeShenBian(); |
| | | try { |
| | | complaintService.export(query,loginUserInfo); |
| | | } catch (IOException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | } |
| | | @ApiOperation("社区问题单") |
| | | @GetMapping("/community-problem/{id}") |
| | | public void communityProblem(@ApiParam(name = "id", value = "诉求id", required = true) @PathVariable("id") Long id) { |
| | | try { |
| | | complaintService.communityProblem(id); |
| | | } catch (IOException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | } |
| | | @ApiOperation("问题处理单") |
| | | @GetMapping("/problem-handle/{id}") |
| | | public void problemHandle(@ApiParam(name = "id", value = "诉求id", required = true) @PathVariable("id") Long id) { |
| | | complaintService.problemHandle(id); |
| | | } |
| | | @ApiOperation("协调通知单") |
| | | @GetMapping("/coordination-notice/{id}") |
| | | public void coordinationNotice(@ApiParam(name = "id", value = "诉求id", required = true) @PathVariable("id") Long id) { |
| | | complaintService.coordinationNotice(id); |
| | | } |
| | | } |