| | |
| | | |
| | | Long superiorId; |
| | | int reportType; |
| | | int reporterLevel; |
| | | Long reporterId = null; |
| | | String departmentName = ""; |
| | | if (identityInformationVO.getIdentity() == 1) { |
| | | PartyMember partyMember = partyMemberService.getPartyMemberByPhone(phone); |
| | | superiorId = partyMember.getCommunityId(); |
| | | reporterId = partyMember.getId(); |
| | | reportType = 4; |
| | | reporterLevel = 5; |
| | | departmentName = partyMember.getDistricts() + "-" + partyMember.getStreet() + "-" + partyMember.getCommunity(); |
| | | } else if (identityInformationVO.getIdentity() == 2) { |
| | | int accountLevel = adminUser.getAccountLevel(); // 改为基本类型 |
| | |
| | | throw new ServiceException("市级账号,无法上报!"); |
| | | } |
| | | reportType = accountLevel - 1; |
| | | reporterLevel = accountLevel; |
| | | |
| | | // 使用基本类型比较并补充默认分支 |
| | | if (accountLevel == ReportTypeEnum.COMMUNITY.getCode()) { |
| | | superiorId = Long.parseLong(adminUser.getStreetId()); |
| | | reporterId = adminUser.getCommunityId(); |
| | | } else if (accountLevel == ReportTypeEnum.STREET.getCode()) { |
| | | superiorId = Long.parseLong(adminUser.getDistrictsCode()); |
| | | reporterId = Long.parseLong(adminUser.getStreetId()); |
| | | } else if (accountLevel == ReportTypeEnum.DISTRICT.getCode()) { |
| | | superiorId = 510400L; // 攀枝花市 |
| | | reporterId = Long.parseLong(adminUser.getDistrictsCode()); |
| | | } else if (accountLevel == ReportTypeEnum.PARTY.getCode()) { |
| | | superiorId = adminUser.getCommunityId(); |
| | | } else { |
| | |
| | | complaintAuditRecord.setComment(dto.getComment()); |
| | | complaintAuditRecord.setSort(count + 1); |
| | | complaintAuditRecord.setDepartmentName(departmentName); |
| | | complaintAuditRecord.setReporterLevel(reporterLevel); |
| | | complaintAuditRecord.setReporterId(reporterId); |
| | | complaintAuditRecordService.save(complaintAuditRecord); |
| | | } |
| | | |
| | |
| | | complaintAuditRecord.setAuditorId(loginUserInfoVO.getUserId()); |
| | | complaintAuditRecordService.updateById(complaintAuditRecord); |
| | | //创建流程 |
| | | complaintFlowService.createFlow(complaintAuditRecord, 0, loginUserInfoVO.getUserId()); |
| | | ComplaintAuditRecord complaintAuditRecord2 = new ComplaintAuditRecord(); |
| | | complaintAuditRecord2.setComplaintId(complaintReporAuditDTO.getId()); |
| | | complaintAuditRecord2.setSuperiorId(complaintAuditRecord.getReporterId()); |
| | | complaintAuditRecord2.setReportType(complaintAuditRecord.getReporterLevel()); |
| | | complaintFlowService.createFlow(complaintAuditRecord2, 0, loginUserInfoVO.getUserId()); |
| | | } else { |
| | | complaintAuditRecord.setRejectReason(complaintReporAuditDTO.getRejectReason()); |
| | | complaintAuditRecord.setAuditStatus(2); |
| | |
| | | map.put("community", community); |
| | | map.put("problemType", complaint.getProblemType()); |
| | | map.put("descriptionContent", complaint.getDescriptionContent()); |
| | | map.put("reportType", ReportTypeEnum.getDescriptionByCode(reportType)); |
| | | map.put("reportType", reportType == null ? "" : ReportTypeEnum.getDescriptionByCode(reportType)); |
| | | map.put("partyOrganization", Objects.nonNull(partyMember) ? partyMember.getPartyOrganization() : ""); |
| | | map.put("name", complaint.getName()); |
| | | map.put("contactNumber", complaint.getContactNumber()); |