| | |
| | | import com.panzhihua.westcommittee.annotation.DistributedLock; |
| | | import com.panzhihua.westcommittee.model.dto.*; |
| | | import com.panzhihua.westcommittee.model.entity.*; |
| | | import com.panzhihua.westcommittee.model.query.BasePage; |
| | | import com.panzhihua.westcommittee.model.query.ComplaintQuery; |
| | | import com.panzhihua.westcommittee.model.vo.ComplaintVO; |
| | | import com.panzhihua.westcommittee.model.vo.DispatchVO; |
| | | import com.panzhihua.westcommittee.model.vo.SysUserVO; |
| | | import com.panzhihua.westcommittee.service.IComplaintCommentService; |
| | | import com.panzhihua.westcommittee.service.IComplaintService; |
| | | import com.panzhihua.westcommittee.service.IProblemTypeService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import io.swagger.annotations.*; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.checkerframework.checker.units.qual.C; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.context.annotation.Lazy; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | |
| | | @GetMapping("/detail") |
| | | @ApiOperation("工单详情") |
| | | public R<ComplaintVO> detail(@ApiParam(name = "id", value = "工单id", required = true) Long id) { |
| | | public R<ComplaintVO> detail(Long id) { |
| | | return R.ok(complaintService.detail(id,getLoginUserInfo())); |
| | | } |
| | | |
| | |
| | | * 上报审核 |
| | | */ |
| | | @PostMapping("/reportAudit") |
| | | @ApiOperation(value = "问题上报审核") |
| | | @ApiOperation(value = "问题上报审核并指派") |
| | | public R<?> reportAudit(@RequestBody ComplaintReporAuditDTO dto) { |
| | | complaintService.reportAudit(dto, getLoginUserInfo()); |
| | | return R.ok(); |
| | |
| | | public R<List<DispatchVO>> getDispatchList() { |
| | | return R.ok(complaintService.getDispatchList(getLoginUserInfo())); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @GetMapping("/getDeptUserList") |
| | | @ApiOperation(value = "获取当前单位用户列表") |
| | | public R<Page<SysUserVO>> getDeptUserList(BasePage page) { |
| | | return R.ok(complaintService.getDeptUserList(getLoginUserInfo(),page)); |
| | | } |
| | | |
| | | |
| | | |
| | | @PostMapping("/assignComplain") |
| | | @ApiOperation(value = "分配诉求") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "complainId", value = "诉求id", required = true), |
| | | @ApiImplicitParam(name = "deptId", value = "单位id", required = true), |
| | | @ApiImplicitParam(name = "remark", value = "说明", required = true), |
| | | }) |
| | | public R<?> assignComplain(@RequestParam Long complainId,@RequestParam Integer deptId,@RequestParam String remark) { |
| | | complaintService.assignComplain(getLoginUserInfo(),complainId,deptId,remark); |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 评价诉求 |
| | | * @param complaintComment |
| | |
| | | complaint.setStatus(8); |
| | | complaint.setCommentRate(complaintComment.getRate()); |
| | | complaintService.updateById(complaint); |
| | | // 不满意 重新生成诉求 |
| | | if(complaintComment.getRate()==0){ |
| | | Complaint complaint1 = new Complaint(); |
| | | BeanUtils.copyProperties(complaint,complaint1); |
| | | complaint1.setStatus(0); |
| | | complaint1.setAssignStatus(0); |
| | | complaint1.setId(null); |
| | | complaint1.setCompletionTime(null); |
| | | complaint1.setCompletionUserId(null); |
| | | complaint1.setCompletionUsername(null); |
| | | complaint1.setCompletionUserPhone(null); |
| | | complaint1.setCompletionImages(null); |
| | | complaint1.setCompletionUserLevel(null); |
| | | complaint1.setCompletionDescription(null); |
| | | complaint1.setCompletionVideos(null); |
| | | complaint1.setCompletionOtherDescription(null); |
| | | complaintService.save(complaint1); |
| | | } |
| | | |
| | | return R.ok(); |
| | | } |
| | | |