| | |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.math.BigDecimal; |
| | |
| | | |
| | | // 设置流水号 |
| | | complaint.setSerialNumber(serialNumber); |
| | | Integer accountLevel = 5; |
| | | Integer accountLevel = 4; |
| | | //获取当前身份 |
| | | IdentityInformation identityInformationVO = identityInformationService.getCurrentIdentityInformation(loginUserInfoVO); |
| | | //1=党员,2=管理员 |
| | |
| | | complaint.setPartyMemberId(partyMember.getId()); |
| | | complaint.setReportUserName(partyMember.getName()); |
| | | complaint.setReportUserPhone(partyMember.getPhone()); |
| | | complaint.setSuperiorId( partyMember.getCommunityId()); |
| | | |
| | | // 添加处理人 |
| | | // SystemUser one = systemUserService.getOne(new LambdaQueryWrapper<SystemUser>().eq(SystemUser::getAccountLevel, 4).eq(SystemUser::getIsDeptAdmin, 1).eq(SystemUser::getCommunityId, partyMember.getCommunityId()).ne(SystemUser::getStatus, 3)); |
| | |
| | | } |
| | | complaint.setReportType(accountLevel); |
| | | complaint.setNowLevel(accountLevel); |
| | | complaint.setLastLevel(accountLevel); |
| | | complaint.setLastSuperiorId(complaint.getSuperiorId()); |
| | | |
| | | // 设置其他字段 |
| | | complaint.setStatus(ProcessStatusEnum.PROCESSING.getCode()); |
| | |
| | | Integer identity = identityInformation.getIdentity(); |
| | | query.setUserId(loginUserInfoVO.getUserId()); |
| | | |
| | | SystemUser systemUser = null; |
| | | SystemUser systemUser; |
| | | //上级 |
| | | if (systemUserByPhone.isPresent() && null != identity && identity == 2) { |
| | | systemUserByPhone.get(); |
| | | systemUser= systemUserByPhone.get(); |
| | | accountLevel = systemUser.getAccountLevel(); |
| | | switch (accountLevel) { |
| | | case 2: |
| | |
| | | break; |
| | | } |
| | | } else { |
| | | systemUser = null; |
| | | //党员 |
| | | PartyMember partyMember = partyMemberService.getPartyMemberByPhone(loginUserInfoVO.getPhone()); |
| | | targetId = partyMember.getCommunityId(); |
| | |
| | | }else if(accountLevel==3){ |
| | | // 街道 1 |
| | | if(systemUser.getSystemRoleId()==1){ |
| | | // 获取街道的所有单位 |
| | | List<Department> list = departmentService.list(new LambdaQueryWrapper<Department>().eq(Department::getTier, 3).eq(Department::getStreetId, systemUser.getStreetId())); |
| | | if(list.isEmpty()){ |
| | | return page; |
| | | } |
| | | // 是管理员 可以看到下派来的 也可以看到上派待审核的 |
| | | page = baseMapper.selectComplaintPage5(page, query,systemUser.getStreetId(),list.stream().map(Department::getId).collect(Collectors.toList())); |
| | | page = baseMapper.selectComplaintPage5(page, query,systemUser.getStreetId(),null); |
| | | }else { |
| | | // 不是管理员 看指派给我的 |
| | | page = baseMapper.selectComplaintPage4(page, query, systemUser.getOneDepartmentId()); |
| | |
| | | }else if(accountLevel==4){ |
| | | // 社区 |
| | | if(systemUser.getSystemRoleId()==1){ |
| | | List<Department> list = departmentService.list(new LambdaQueryWrapper<Department>().eq(Department::getTier, 4).eq(Department::getCommunityId, systemUser.getCommunityId())); |
| | | if(list.isEmpty()){ |
| | | return page; |
| | | } |
| | | // 是管理员 |
| | | page = baseMapper.selectComplaintPage6(page, query,systemUser.getCommunityId(),list.stream().map(Department::getId).collect(Collectors.toList())); |
| | | page = baseMapper.selectComplaintPage6(page, query,systemUser.getCommunityId(),null); |
| | | }else { |
| | | // 不是管理员 看到负责社区的所有诉求 和 上级下派来的诉求 |
| | | page = baseMapper.selectComplaintPage4(page, query, systemUser.getOneDepartmentId()); |
| | |
| | | // 获取身份 |
| | | IdentityInformation currentIdentityInformation = identityInformationService.getCurrentIdentityInformation(loginUserInfo); |
| | | Integer identity = currentIdentityInformation.getIdentity(); |
| | | SystemUserLevel systemUserLevel = currentIdentityInformation.getSystemUserLevel(); |
| | | SystemUser systemUser1 = currentIdentityInformation.getSystemUser(); |
| | | ComplaintAuditRecord one = complaintAuditRecordService.getOne(new LambdaQueryWrapper<ComplaintAuditRecord>() |
| | | .eq(ComplaintAuditRecord::getComplaintId, vo.getId()) |
| | |
| | | } |
| | | }*/ |
| | | //当前身份是管理员 |
| | | if (2 == identity && systemUserLevel.getLevel().compareTo(vo.getReportType()) == 0 && (systemUserLevel.getLevel() != 5)) { |
| | | if (2 == identity && systemUser1.getAccountLevel().compareTo(vo.getReportType()) == 0 && (systemUser1.getAccountLevel() != 5)) { |
| | | vo.setListControlsButtonStatus(0); |
| | | } |
| | | //如果当前身份是党员 |
| | |
| | | }*/ |
| | | if (identity == 2) { |
| | | //非党员用户,必须是管理员有权限 |
| | | if (systemUserLevel.getLevel().compareTo(one.getReportType()) == 0) { |
| | | if (systemUser1.getAccountLevel().compareTo(one.getReportType()) == 0) { |
| | | vo.setListControlsButtonStatus(0); |
| | | } |
| | | } |
| | |
| | | .last(" limit 0, 1")); |
| | | if (null != one1) { |
| | | //非党员用户,必须是管理员有权限 |
| | | if (identity == 2 && systemUserLevel.getLevel().compareTo(one1.getReportType()) == 0 && systemUserLevel.getLevel() != 5) { |
| | | if (identity == 2 && systemUser1.getAccountLevel().compareTo(one1.getReportType()) == 0 && systemUser1.getAccountLevel()!= 5) { |
| | | vo.setListControlsButtonStatus(0); |
| | | } |
| | | /*if (systemUserByPhone.isPresent()) { |
| | |
| | | } |
| | | }*/ |
| | | //当前身份是管理员 |
| | | if (2 == identity && systemUserLevel.getLevel().compareTo(vo.getReportType()) == 0 && (systemUserLevel.getLevel() != 5)) { |
| | | if (2 == identity && systemUser1.getAccountLevel().compareTo(vo.getReportType()) == 0 && (systemUser1.getAccountLevel()!= 5)) { |
| | | vo.setListControlsButtonStatus(0); |
| | | } |
| | | //如果当前身份是党员 |
| | |
| | | vo.setListControlsButtonStatus(0); |
| | | } |
| | | }*/ |
| | | if (2 == identity && systemUserLevel.getLevel().compareTo(one.getReportType()) == 0) { |
| | | if (2 == identity && systemUser1.getAccountLevel().compareTo(one.getReportType()) == 0) { |
| | | vo.setListControlsButtonStatus(0); |
| | | } |
| | | } |
| | |
| | | String targetId = ""; |
| | | Integer accountLevel = 5; |
| | | //获取当前身份,1=党员,2=管理员 |
| | | accountLevel = systemUserLevel.getLevel(); |
| | | accountLevel =systemUser1.getAccountLevel(); |
| | | switch (accountLevel) { |
| | | case 1: |
| | | //市级 |
| | |
| | | break; |
| | | case 2: |
| | | //区县级 |
| | | targetId = systemUserLevel.getDistrictsCode(); |
| | | targetId = systemUser1.getDistrictsCode(); |
| | | break; |
| | | case 3: |
| | | //街道 |
| | | targetId = systemUserLevel.getStreetId().toString(); |
| | | targetId = systemUser1.getStreetId().toString(); |
| | | break; |
| | | case 4: |
| | | //社区 |
| | | targetId = systemUserLevel.getCommunityId().toString(); |
| | | targetId = systemUser1.getCommunityId().toString(); |
| | | break; |
| | | case 5: |
| | | //党员 |
| | |
| | | } |
| | | }*/ |
| | | //当前不是党员身份,需要是管理员才有权限 |
| | | if (2 == identity && systemUserLevel.getLevel().compareTo(vo.getReportType()) == 0 && systemUserLevel.getLevel() != 5) { |
| | | if (2 == identity && systemUser1.getAccountLevel().compareTo(vo.getReportType()) == 0 && systemUser1.getAccountLevel()!= 5) { |
| | | vo.setEvaluateButtonStatus(0); |
| | | } |
| | | //当前是党员身份,只有是以党员身份提交的数据才有权限 |
| | |
| | | //获取当前身份,1=党员,2=管理员 |
| | | IdentityInformation identityInformation = identityInformationService.getCurrentIdentityInformation(loginUserInfoVO); |
| | | Integer identity = identityInformation.getIdentity(); |
| | | ComplaintVO detail = baseMapper.getDetail(id); |
| | | SystemUser systemUser = identityInformation.getSystemUser(); |
| | | //上级 |
| | | if (identity == 2) { |
| | | SystemUserLevel systemUserLevel = identityInformation.getSystemUserLevel(); |
| | | accountLevel = systemUserLevel.getLevel(); |
| | | accountLevel = systemUser.getAccountLevel(); |
| | | switch (accountLevel) { |
| | | case 1: |
| | | //市级 |
| | |
| | | break; |
| | | case 2: |
| | | //区县级 |
| | | targetId = systemUserLevel.getDistrictsCode(); |
| | | targetId = systemUser.getDistrictsCode(); |
| | | break; |
| | | case 3: |
| | | //街道 |
| | | targetId = systemUserLevel.getStreetId().toString(); |
| | | targetId = systemUser.getStreetId().toString(); |
| | | break; |
| | | case 4: |
| | | //社区 |
| | | targetId = systemUserLevel.getCommunityId().toString(); |
| | | targetId = systemUser.getCommunityId().toString(); |
| | | break; |
| | | case 5: |
| | | //党员 |
| | |
| | | PartyMember partyMember = partyMemberService.getPartyMemberByPhone(loginUserInfoVO.getPhone()); |
| | | targetId = partyMember.getId().toString(); |
| | | } |
| | | ComplaintVO detail = baseMapper.getDetail(id); |
| | | // 更新状态 此时status是表中的状态 未做变动 |
| | | // 如果是区级 |
| | | if(systemUser!=null) { |
| | | if (systemUser.getAccountLevel() == 2) { |
| | | if(detail.getNowLevel()==2 && detail.getAssignStatus()==0){ |
| | | detail.setStatus(-1); |
| | | } |
| | | if (systemUser.getSystemRoleId() == 0) { |
| | | // 查是否是当前层级处理 不是则都是正在办理 |
| | | if (detail.getNowLevel() != 4 && detail.getStatus() != 3 && detail.getStatus() != 8) { |
| | | detail.setStatus(0); |
| | | } |
| | | } |
| | | } |
| | | if (systemUser.getAccountLevel() == 3) { |
| | | if(detail.getNowLevel()==3 && detail.getAssignStatus()==0){ |
| | | detail.setStatus(-1); |
| | | } |
| | | if (systemUser.getSystemRoleId() == 0) { |
| | | // 查是否是当前层级处理 不是则都是正在办理 |
| | | if (detail.getNowLevel() != 3 && detail.getStatus() != 3 && detail.getStatus() != 8) { |
| | | detail.setStatus(0); |
| | | } |
| | | } |
| | | } |
| | | if (systemUser.getAccountLevel() == 4) { |
| | | if(detail.getNowLevel()==4 && detail.getAssignStatus()==0){ |
| | | detail.setStatus(-1); |
| | | } |
| | | if (systemUser.getSystemRoleId() == 0) { |
| | | // 查是否是当前层级处理 不是则都是正在办理 |
| | | if (detail.getNowLevel() != 4 && detail.getStatus() != 3 && detail.getStatus() != 8) { |
| | | detail.setStatus(0); |
| | | } |
| | | } |
| | | } |
| | | }else { |
| | | if(detail.getFirstStatus()==1){ |
| | | detail.setStatus(0); |
| | | }else { |
| | | detail.setStatus(-2); |
| | | } |
| | | } |
| | | |
| | | |
| | | if (detail.getStatus().equals(0)) { |
| | | List<ComplaintFlow> list = complaintFlowService.lambdaQuery().eq(ComplaintFlow::getComplaintId, id).orderByAsc(ComplaintFlow::getSort).list(); |
| | | detail.setComplaintFlows(list); |
| | |
| | | // } |
| | | |
| | | |
| | | // //已办结,显示评价按钮 |
| | | // int count = complaintCommentService.count(new LambdaQueryWrapper<ComplaintComment>().eq(ComplaintComment::getComplaintId, detail.getId()).eq(ComplaintComment::getDelFlag, 0)); |
| | | // if(detail.getStatus() == 3 && 0 == count){ |
| | | // if(systemUserByPhone.isPresent()){ |
| | | // SystemUser systemUser = systemUserByPhone.get(); |
| | | // Integer isAdmin = systemUser.getIsAdmin(); |
| | | // if(accountLevel.compareTo(detail.getReportType()) == 0 && ((accountLevel != 5 && 1 == isAdmin) || accountLevel == 5)){ |
| | | // detail.setEvaluateButtonStatus(0); |
| | | // } |
| | | // }else{ |
| | | // if(detail.getReportType() == 5){ |
| | | // detail.setEvaluateButtonStatus(0); |
| | | // } |
| | | // } |
| | | // } |
| | | //已办结,显示评价按钮 |
| | | int count = complaintCommentService.count(new LambdaQueryWrapper<ComplaintComment>().eq(ComplaintComment::getComplaintId, detail.getId()).eq(ComplaintComment::getDelFlag, 0)); |
| | | if(detail.getStatus() == 3 && 0 == count){ |
| | | if(systemUserByPhone.isPresent()){ |
| | | Integer isAdmin = systemUser.getIsAdmin(); |
| | | if(accountLevel.compareTo(detail.getReportType()) == 0 && ((accountLevel != 5 && 1 == isAdmin) || accountLevel == 5)){ |
| | | detail.setEvaluateButtonStatus(0); |
| | | } |
| | | }else{ |
| | | if(detail.getReportType() == 5){ |
| | | detail.setEvaluateButtonStatus(0); |
| | | } |
| | | } |
| | | } |
| | | return detail; |
| | | } |
| | | |
| | |
| | | if (identityInformationVO.getIdentity() == 2) { |
| | | //1=党员,2=管理员 |
| | | SystemUser systemUser = identityInformationVO.getSystemUser(); |
| | | SystemUserLevel systemUserLevel = identityInformationVO.getSystemUserLevel(); |
| | | accountLevel = systemUserLevel.getLevel(); |
| | | accountLevel = systemUser.getAccountLevel(); |
| | | name = systemUser.getName(); |
| | | } else if (identityInformationVO.getIdentity() == 1) { |
| | | accountLevel = 5; |
| | |
| | | SystemUser adminUser = identityInformationVO.getSystemUser(); |
| | | |
| | | Long superiorId; |
| | | Long lastSuperiorId; |
| | | int reportType; |
| | | int reporterLevel; |
| | | Long reporterId = null; |
| | |
| | | int nowLevel=0; |
| | | if (identityInformationVO.getIdentity() == 1) { |
| | | PartyMember partyMember = partyMemberService.getPartyMemberByPhone(phone); |
| | | superiorId = partyMember.getCommunityId(); |
| | | superiorId = Long.valueOf(partyMember.getStreetId()); |
| | | lastSuperiorId= partyMember.getCommunityId(); |
| | | |
| | | reporterId = partyMember.getId(); |
| | | reportType = 4; |
| | | reporterLevel = 5; |
| | |
| | | // 使用基本类型比较并补充默认分支 |
| | | if (accountLevel == ReportTypeEnum.COMMUNITY.getCode()) { |
| | | superiorId = Long.parseLong(adminUser.getStreetId()); |
| | | |
| | | lastSuperiorId = adminUser.getCommunityId(); |
| | | |
| | | reporterId = adminUser.getCommunityId(); |
| | | nowLevel = 3; |
| | | |
| | | } else if (accountLevel == ReportTypeEnum.STREET.getCode()) { |
| | | superiorId = Long.parseLong(adminUser.getDistrictsCode()); |
| | | lastSuperiorId = Long.valueOf(adminUser.getStreetId()); |
| | | |
| | | reporterId = Long.parseLong(adminUser.getStreetId()); |
| | | nowLevel = 2; |
| | | } else { |
| | |
| | | complaint.setStatus(0); |
| | | } |
| | | complaint.setSuperiorId(superiorId); |
| | | complaint.setLastSuperiorId(lastSuperiorId); |
| | | complaint.setNowLevel(nowLevel); |
| | | complaint.setLastLevel(nowLevel+1); |
| | | complaint.setAssignStatus(0); |
| | | updateById(complaint); |
| | | |
| | |
| | | complaintAuditRecord.setComment(dto.getComment()); |
| | | complaintAuditRecord.setSort(count + 1); |
| | | complaintAuditRecord.setDepartmentName(departmentName); |
| | | complaintAuditRecord.setReporterLevel(reporterLevel); |
| | | complaintAuditRecord.setReporterLevel(nowLevel); |
| | | complaintAuditRecord.setReporterId(reporterId); |
| | | complaintAuditRecord.setApplyName(reporter); |
| | | complaintAuditRecord.setApplyPhone(phone); |
| | |
| | | break; |
| | | case 4: |
| | | superiorId = systemUser.getCommunityId(); |
| | | nowLevel=4; |
| | | break; |
| | | } |
| | | complaint.setSuperiorId(superiorId); |
| | | complaint.setLastSuperiorId(superiorId); |
| | | complaint.setAssignStatus(0); |
| | | complaint.setNowLevel(nowLevel); |
| | | complaint.setLastLevel( nowLevel); |
| | | this.updateById(complaint); |
| | | |
| | | complaintAuditRecord.setSuperiorId(superiorId); |
| | |
| | | IdentityInformation identityInformation = identityInformationService.getCurrentIdentityInformation(loginUserInfoVO); |
| | | |
| | | SystemUser systemUser = identityInformation.getSystemUser(); |
| | | SystemUserLevel systemUserLevel = identityInformation.getSystemUserLevel(); |
| | | if (identityInformation.getIdentity() != 2) { |
| | | throw new ServiceException("无权审核"); |
| | | } |
| | | |
| | | Long superiorId = 0L; |
| | | switch (systemUserLevel.getLevel()) { |
| | | switch (systemUser.getAccountLevel()) { |
| | | case 1: |
| | | superiorId = 510400L;//默认市级 |
| | | break; |
| | | case 2: |
| | | superiorId = Long.parseLong(systemUserLevel.getDistrictsCode()); |
| | | superiorId = Long.parseLong(systemUser.getDistrictsCode()); |
| | | break; |
| | | case 3: |
| | | superiorId = Long.parseLong(systemUserLevel.getStreetId()); |
| | | superiorId = Long.parseLong(systemUser.getStreetId()); |
| | | break; |
| | | case 4: |
| | | superiorId = systemUserLevel.getCommunityId(); |
| | | superiorId = systemUser.getCommunityId(); |
| | | break; |
| | | } |
| | | |
| | | |
| | | |
| | | //查询上报审核记录 |
| | | ComplaintAuditRecord complaintAuditRecord = complaintAuditRecordService.lambdaQuery() |
| | | .eq(ComplaintAuditRecord::getComplaintId, complaintReporAuditDTO.getId()) |
| | | .eq(ComplaintAuditRecord::getAuditType, 2) |
| | | .eq(ComplaintAuditRecord::getLatestFlag, true) |
| | | .eq(ComplaintAuditRecord::getReportType, systemUserLevel.getLevel()) |
| | | .eq(ComplaintAuditRecord::getReportType, systemUser.getAccountLevel()) |
| | | .eq(ComplaintAuditRecord::getSuperiorId, superiorId) |
| | | .last("LIMIT 1").one(); |
| | | if (Objects.isNull(complaintAuditRecord)) { |
| | |
| | | complaintAuditRecord.setAuditorName(systemUser.getName()); |
| | | complaintAuditRecord.setAuditorPhone(systemUser.getPhone()); |
| | | complaintAuditRecord.setAuditTime(new Date()); |
| | | |
| | | |
| | | if(systemUser.getSystemRoleId()!=1 || systemUser.getAccountLevel()!=complaintAuditRecord.getReporterLevel()){ |
| | | throw new ServiceException("无权审核"); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | if (complaintReporAuditDTO.getAuditResult().equals(1)) { |
| | | complaintAuditRecord.setAuditStatus(1); |
| | |
| | | complaintAuditRecord2.setReportType(complaintAuditRecord.getReporterLevel()); |
| | | complaintFlowService.createFlow(complaintAuditRecord2, 0, loginUserInfoVO.getUserId()); |
| | | |
| | | // 通过修改状态 |
| | | // 通过修改状态 已经修改superiorId 和层级 不需要修改 superiorId |
| | | Complaint complaint = this.getById(complaintReporAuditDTO.getId()); |
| | | complaint.setAssignPersonId(complaintReporAuditDTO.getDeptId()); |
| | | complaint.setAssignStatus(1); |
| | | complaint.setLastSuperiorId(complaint.getSuperiorId()); |
| | | complaint.setLastLevel(complaint.getNowLevel()); |
| | | this.updateById(complaint); |
| | | |
| | | |
| | |
| | | complaintAuditRecord.setAuditStatus(2); |
| | | complaintAuditRecord.setAuditorId(loginUserInfoVO.getUserId()); |
| | | complaintAuditRecordService.updateById(complaintAuditRecord); |
| | | |
| | | // 还原上次的状态 |
| | | Complaint complaint = this.getById(complaintReporAuditDTO.getId()); |
| | | complaint.setAssignPersonId(complaintReporAuditDTO.getDeptId()); |
| | | complaint.setAssignStatus(1); |
| | | complaint.setSuperiorId(complaint.getLastSuperiorId()); |
| | | complaint.setNowLevel(complaint.getLastLevel()); |
| | | this.updateById(complaint); |
| | | |
| | | } |
| | | } |
| | | |
| | |
| | | IdentityInformation identityInformation = identityInformationService.getCurrentIdentityInformation(loginUserInfoVO); |
| | | |
| | | SystemUser systemUser = identityInformation.getSystemUser(); |
| | | SystemUserLevel systemUserLevel = identityInformation.getSystemUserLevel(); |
| | | Long superiorId; |
| | | int reportType; |
| | | String departmentName = ""; |
| | | String reporter = ""; |
| | | int nowLevel=4; |
| | | if (identityInformation.getIdentity() == 1) { |
| | | PartyMember partyMember = partyMemberService.getPartyMemberByPhone(loginUserInfoVO.getPhone()); |
| | | superiorId = partyMember.getCommunityId(); |
| | |
| | | departmentName = partyMember.getDistricts() + "-" + partyMember.getStreet() + "-" + partyMember.getCommunity(); |
| | | reporter = partyMember.getName(); |
| | | } else if (identityInformation.getIdentity() == 2) { |
| | | int accountLevel = systemUserLevel.getLevel(); // 改为基本类型 |
| | | int accountLevel = systemUser.getAccountLevel(); // 改为基本类型 |
| | | if (accountLevel == 2) { |
| | | throw new ServiceException("区级账号,无法延期申请!"); |
| | | } |
| | |
| | | |
| | | // 使用基本类型比较并补充默认分支 |
| | | if (accountLevel == ReportTypeEnum.COMMUNITY.getCode()) { |
| | | superiorId = Long.parseLong(systemUserLevel.getStreetId()); |
| | | superiorId = Long.parseLong(systemUser.getStreetId()); |
| | | } else if (accountLevel == ReportTypeEnum.STREET.getCode()) { |
| | | superiorId = Long.parseLong(systemUserLevel.getDistrictsCode()); |
| | | superiorId = Long.parseLong(systemUser.getDistrictsCode()); |
| | | nowLevel =4; |
| | | } else if (accountLevel == ReportTypeEnum.DISTRICT.getCode()) { |
| | | superiorId = 510400L; // 攀枝花市 |
| | | } else if (accountLevel == ReportTypeEnum.PARTY.getCode()) { |
| | | superiorId = systemUserLevel.getCommunityId(); |
| | | superiorId = Long.valueOf(systemUser.getDistrictsCode()); |
| | | nowLevel =3;// 攀枝花市 |
| | | } else { |
| | | // 处理未预期的账号等级 |
| | | throw new ServiceException("未知的账号等级"); |
| | |
| | | //查询社区信息 |
| | | switch (accountLevel) { |
| | | case 2: |
| | | BcRegion region = bcRegionService.getDistrictByCode(systemUserLevel.getDistrictsCode().toString()); |
| | | BcRegion region = bcRegionService.getDistrictByCode(systemUser.getDistrictsCode().toString()); |
| | | if (Objects.nonNull(region)) { |
| | | departmentName = region.getRegionName(); |
| | | } |
| | | break; |
| | | case 3: |
| | | ComStreet street = comStreetService.getById(systemUserLevel.getStreetId().toString()); |
| | | ComStreet street = comStreetService.getById(systemUser.getStreetId().toString()); |
| | | if (Objects.nonNull(street)) { |
| | | BcRegion district = bcRegionService.getDistrictByCode(street.getAreaCode().toString()); |
| | | departmentName = Objects.nonNull(district) ? district.getRegionName() + "-" + street.getName() : street.getName(); |
| | | } |
| | | break; |
| | | case 4: |
| | | ComAct act = comActService.getById(systemUserLevel.getCommunityId()); |
| | | ComAct act = comActService.getById(systemUser.getCommunityId()); |
| | | if (Objects.nonNull(act)) { |
| | | ComStreet street2 = comStreetService.getById(systemUserLevel.getStreetId().toString()); |
| | | ComStreet street2 = comStreetService.getById(systemUser.getStreetId().toString()); |
| | | BcRegion district = bcRegionService.getDistrictByCode(act.getAreaCode()); |
| | | departmentName = Objects.nonNull(district) && Objects.nonNull(street2) ? |
| | | district.getRegionName() + "-" + street2.getName() + "-" + act.getName() : act.getName(); |
| | |
| | | record1.setApplyName(reporter); |
| | | record1.setApplyPhone(loginUserInfoVO.getPhone()); |
| | | complaintAuditRecordService.save(record1); |
| | | |
| | | Complaint byId = this.getById(dto.getComplaintId()); |
| | | byId.setSuperiorId(superiorId); |
| | | byId.setNowLevel( nowLevel); |
| | | this.updateById(byId); |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | IdentityInformation currentIdentityInformation = identityInformationService.getCurrentIdentityInformation(loginUserInfo); |
| | | if (currentIdentityInformation.getIdentity().equals(2)) { |
| | | SystemUser systemUser = currentIdentityInformation.getSystemUser(); |
| | | if(systemUser.getIsDeptAdmin()==0){ |
| | | if(systemUser.getSystemRoleId()!=1){ |
| | | throw new ServiceException("你没有分配权限"); |
| | | } |
| | | |
| | |
| | | complaint.setAssignPersonId(userId); |
| | | complaint.setFirstStatus(1); |
| | | complaint.setAssignStatus(1); |
| | | baseMapper.updateById(complaint); |
| | | }else { |
| | | throw new ServiceException("你没有分配权限"); |
| | | } |