springcloud_k8s_panzhihuazhihuishequ/service_westcommittee/src/main/java/com/panzhihua/westcommittee/api/SystemUserController.java
@@ -99,6 +99,12 @@ if(2 == systemUser.getStatus()){ return R.fail("当前账号已冻结。"); } Integer oneDepartmentId = systemUser.getOneDepartmentId(); Department byId = departmentService.getById(oneDepartmentId); if(byId.getStatus()==2){ return R.fail("当前单位已关闭。"); } //创建token R<LoginReturnVO> reult = tokenService.loginWest(systemUser.getId()); redisTemplate.delete(key); @@ -422,6 +428,13 @@ } @GetMapping("/getDept") @ApiOperation(value = "获取所有单位",tags = {"西区纪委后台-人员管理"}) public R<List<Department>> getDept(){ List<Department> list4 = departmentService.list(); return R.ok(list4); } @GetMapping("/regionTree") @ApiOperation(value = "获取区县-街道-社区树",tags = {"西区纪委后台-人员管理"}) springcloud_k8s_panzhihuazhihuishequ/service_westcommittee/src/main/java/com/panzhihua/westcommittee/controller/ComplaintController.java
@@ -18,6 +18,8 @@ import com.panzhihua.westcommittee.service.IProblemTypeService; 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.*; @@ -203,10 +205,11 @@ @ApiOperation(value = "分配诉求") @ApiImplicitParams({ @ApiImplicitParam(name = "complainId", value = "诉求id", required = true), @ApiImplicitParam(name = "deptId", 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) { complaintService.assignComplain(getLoginUserInfo(),complainId,deptId); public R<?> assignComplain(@RequestParam Long complainId,@RequestParam Integer deptId,@RequestParam String remark) { complaintService.assignComplain(getLoginUserInfo(),complainId,deptId,remark); return R.ok(); } @@ -236,6 +239,25 @@ 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(); } springcloud_k8s_panzhihuazhihuishequ/service_westcommittee/src/main/java/com/panzhihua/westcommittee/controller/HomeController.java
@@ -13,7 +13,6 @@ import com.panzhihua.westcommittee.model.entity.Banner; import com.panzhihua.westcommittee.model.entity.PartyMember; import com.panzhihua.westcommittee.model.entity.SystemUser; import com.panzhihua.westcommittee.model.entity.SystemUserLevel; import com.panzhihua.westcommittee.model.query.BasePage; import com.panzhihua.westcommittee.model.vo.ComplaintTodoVO; import com.panzhihua.westcommittee.model.vo.MessageNotificationVO; @@ -93,26 +92,8 @@ @ApiOperation("获取西区纪委当前用户信息 用于判断用户是否是上级") public R<SystemUser> getCurrentUserInfo() { SystemUser systemUser = systemUserService.getSystemUserAdminByPhone(getLoginUserInfo().getPhone()).orElse(null); Object o1 = redisUtils.get("identity:" + getLoginUserInfo().getPhone()); if(o1!=null){ UserIdentityDTO o2 = (UserIdentityDTO) o1; Integer levelId = o2.getLevelId(); if(levelId!=null) { SystemUserLevel systemUserLevel = systemUserLevelService.getById(levelId); if (systemUserLevel == null) { List<SystemUserLevel> list = systemUserLevelService.list(new LambdaQueryWrapper<SystemUserLevel>().eq(SystemUserLevel::getSystemUserId, systemUser.getId()).eq(SystemUserLevel::getStatus, 1)); if (list.size() > 0) { systemUser.setLevelId(list.get(0).getLevel()); } } else { systemUser.setLevelId(systemUserLevel.getLevel()); } }else { List<SystemUserLevel> list = systemUserLevelService.list(new LambdaQueryWrapper<SystemUserLevel>().eq(SystemUserLevel::getSystemUserId, systemUser.getId()).eq(SystemUserLevel::getStatus, 1)); if (list.size() > 0) { systemUser.setLevelId(list.get(0).getLevel()); } } if(systemUser!=null){ systemUser.setLevelId(systemUser.getAccountLevel()); } return R.ok(systemUser); } springcloud_k8s_panzhihuazhihuishequ/service_westcommittee/src/main/java/com/panzhihua/westcommittee/model/dto/UserIdentityDTO.java
@@ -1,6 +1,7 @@ package com.panzhihua.westcommittee.model.dto; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -23,5 +24,6 @@ /** * 上级所属层级id */ @ApiModelProperty("层级 2区 3街道 4社区") private Integer levelId; } springcloud_k8s_panzhihuazhihuishequ/service_westcommittee/src/main/java/com/panzhihua/westcommittee/model/entity/Complaint.java
@@ -243,4 +243,8 @@ @TableField("last_level") @ApiModelProperty(value = "上报前层级") private Integer lastLevel; @ApiModelProperty("分配说明") private String remark; } springcloud_k8s_panzhihuazhihuishequ/service_westcommittee/src/main/java/com/panzhihua/westcommittee/model/query/ComplaintQuery.java
@@ -12,7 +12,7 @@ @ApiModel("工单查询数据传输对象") public class ComplaintQuery extends BasePage{ @ApiModelProperty("全部:不传,上报待审核:5,正在办理:0, 办结:3") @ApiModelProperty("全部:不传,上报待审核:5,正在办理:0, 办结:3 -1 待分配") private Integer status; /** springcloud_k8s_panzhihuazhihuishequ/service_westcommittee/src/main/java/com/panzhihua/westcommittee/scheduled/ComplaintTasks.java
@@ -35,7 +35,7 @@ /** * 诉求超时处理(每天凌晨两点执行) */ @Scheduled(cron = "0 0 2 * * ?") // @Scheduled(cron = "0 0 2 * * ?") public void complaintTimeout() { WorkOrderItemConfig config = workOrderItemConfigService.getById(1); @@ -82,7 +82,7 @@ /** * 自动完成诉求评价 */ @Scheduled(cron = "0 1 0 * * ?") // @Scheduled(cron = "0 1 0 * * ?") public void automaticEvaluation() { // 诉求超时提醒 List<Complaint> complaintList = complaintService.getTimeoutAndNotComment(); springcloud_k8s_panzhihuazhihuishequ/service_westcommittee/src/main/java/com/panzhihua/westcommittee/service/IComplaintService.java
@@ -234,6 +234,6 @@ * @param complainId * @param userId */ void assignComplain(LoginUserInfoVO loginUserInfo, Long complainId, Integer userId); void assignComplain(LoginUserInfoVO loginUserInfo, Long complainId, Integer userId,String remark); } springcloud_k8s_panzhihuazhihuishequ/service_westcommittee/src/main/java/com/panzhihua/westcommittee/service/impl/ComplaintServiceImpl.java
@@ -64,7 +64,7 @@ */ @Slf4j @Service @RequiredArgsConstructor(onConstructor_ = {@Lazy}) @RequiredArgsConstructor(onConstructor_ ={@Lazy}) public class ComplaintServiceImpl extends ServiceImpl<ComplaintMapper, Complaint> implements IComplaintService { private final ISystemUserService systemUserService; private final IComplaintFlowService complaintFlowService; @@ -1899,8 +1899,9 @@ } @Override public void assignComplain(LoginUserInfoVO loginUserInfo, Long complainId, Integer userId) { public void assignComplain(LoginUserInfoVO loginUserInfo, Long complainId, Integer userId,String remark) { IdentityInformation currentIdentityInformation = identityInformationService.getCurrentIdentityInformation(loginUserInfo); if (currentIdentityInformation.getIdentity().equals(2)) { SystemUser systemUser = currentIdentityInformation.getSystemUser(); @@ -1909,12 +1910,12 @@ complaint.setAssignPersonId(userId); complaint.setFirstStatus(1); complaint.setAssignStatus(1); baseMapper.updateById(complaint); complaint.setRemark(remark); baseMapper.updateById(complaint); }else { throw new ServiceException("你没有分配权限"); } } }