| | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.sangeshenbian.annotation.DistributedLock; |
| | | import com.panzhihua.sangeshenbian.model.dto.ComplaintCompletionDTO; |
| | | import com.panzhihua.sangeshenbian.model.dto.ComplaintProcessDTO; |
| | | import com.panzhihua.sangeshenbian.model.dto.*; |
| | | import com.panzhihua.sangeshenbian.model.entity.Complaint; |
| | | import com.panzhihua.sangeshenbian.model.entity.ComplaintProgress; |
| | | import com.panzhihua.sangeshenbian.model.query.ComplaintQuery; |
| | | import com.panzhihua.sangeshenbian.dto.ComplaintReport; |
| | | import com.panzhihua.sangeshenbian.entity.Complaint; |
| | | import com.panzhihua.sangeshenbian.enums.ProcessStatusEnum; |
| | | import com.panzhihua.sangeshenbian.service.IComplaintService; |
| | | import com.panzhihua.sangeshenbian.model.vo.ComplaintVO; |
| | | import com.panzhihua.sangeshenbian.service.IComplaintService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.RequiredArgsConstructor; |
| | | 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 org.springframework.web.bind.annotation.*; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @ApiOperation(value = "录入诉求") |
| | | @DistributedLock(lockName = "complaint_serial_number_lock") |
| | | public void save(Complaint complaint) { |
| | | complaintService.saveComplaint(complaint,getUserId()); |
| | | complaintService.saveComplaint(complaint, getUserId()); |
| | | } |
| | | |
| | | @PostMapping("/list") |
| | |
| | | public R<Page<ComplaintVO>> complaintList(@RequestBody ComplaintQuery query) { |
| | | return R.ok(complaintService.complaintList(query)); |
| | | } |
| | | |
| | | @ApiOperation("办理进度录入") |
| | | @PostMapping("/saveProcess") |
| | | public R<?> saveProcess(@RequestBody ComplaintProcessDTO dto){ |
| | | public R<?> saveProcess(@RequestBody ComplaintProcessDTO dto) { |
| | | complaintService.saveProcess(dto); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @ApiOperation("办理结果录入") |
| | | @PostMapping("/saveResult") |
| | | public R<?> saveResult(@RequestBody ComplaintCompletionDTO dto){ |
| | | public R<?> saveResult(@RequestBody ComplaintCompletionDTO dto) { |
| | | complaintService.saveResult(dto); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 问题上报 |
| | | */ |
| | | @PostMapping("/report") |
| | | @ApiOperation(value = "问题上报") |
| | | public void report(@RequestBody ComplaintReport complaintReport) { |
| | | // TODO |
| | | public R<?> report(@RequestBody ComplaintReportDTO complaintReportDTO) { |
| | | complaintService.saveReport(complaintReportDTO, getLoginUserInfo()); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 诉求下派 |
| | | */ |
| | | @PostMapping("/saveDispatch") |
| | | public R<?> saveDispatch(@RequestBody ComplaintDispatch dto){ |
| | | complaintService.saveDispatch(dto, getLoginUserInfo()); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 延期申请 |
| | | */ |
| | | @PostMapping("/saveDelay") |
| | | public R<?> saveDelay(@RequestBody ComplaintDelayDTO dto){ |
| | | complaintService.saveDelay(dto, getLoginUserInfo()); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 延期审核 |
| | | */ |
| | | @PostMapping("/delayAudit") |
| | | @ApiOperation(value = "延期审核") |
| | | public R<?> delayAudit(@RequestBody ComplaintDelayAuditDTO dto) { |
| | | complaintService.delayAudit(dto, getLoginUserInfo()); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 上报审核 |
| | | */ |
| | | @PostMapping("/reportAudit") |
| | | @ApiOperation(value = "问题上报审核") |
| | | public R<?> reportAudit(@RequestBody ComplaintReporAuditDTO dto) { |
| | | complaintService.reportAudit(dto, getLoginUserInfo()); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 获取下派单位列表 |
| | | */ |
| | | @GetMapping("/getDispatchList") |
| | | @ApiOperation(value = "获取下派单位列表") |
| | | public R<?> getDispatchList() { |
| | | return R.ok(complaintService.getDispatchList(getLoginUserInfo())); |
| | | } |
| | | |
| | | |