From 4c9460fbe6e2f39dddb99e43b7506b34e99bffe9 Mon Sep 17 00:00:00 2001 From: mitao <2763622819@qq.com> Date: 星期二, 18 三月 2025 14:34:53 +0800 Subject: [PATCH] 上报部门bug修改 --- springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/ComplaintServiceImpl.java | 28 ++++++++++++++++++++++++++++ 1 files changed, 28 insertions(+), 0 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/ComplaintServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/ComplaintServiceImpl.java index 9068d65..ee0d927 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/ComplaintServiceImpl.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/ComplaintServiceImpl.java @@ -592,10 +592,12 @@ Long superiorId; int reportType; + String departmentName = ""; if (adminUser == null) { PartyMember partyMember = partyMemberService.getPartyMemberByPhone(phone); superiorId = partyMember.getCommunityId(); reportType = 4; + departmentName = partyMember.getDistricts() + "-" + partyMember.getStreet() + "-" + partyMember.getCommunity(); } else { int accountLevel = adminUser.getAccountLevel(); // 改为基本类型 if (accountLevel == 1) { @@ -616,6 +618,31 @@ // 处理未预期的账号等级 throw new ServiceException("未知的账号等级"); } + //查询社区信息 + switch (accountLevel){ + case 2: + BcRegion region = bcRegionService.getDistrictByCode(adminUser.getDistrictsCode().toString()); + if (Objects.nonNull(region)) { + departmentName = region.getRegionName(); + } + break; + case 3: + ComStreet street = comStreetService.getById(adminUser.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(adminUser.getCommunityId()); + if (Objects.nonNull(act)) { + ComStreet street2 = comStreetService.getById(adminUser.getStreetId().toString()); + BcRegion district = bcRegionService.getDistrictByCode(act.getAreaCode()); + departmentName = Objects.nonNull(district) && Objects.nonNull(street2)? district.getRegionName() + "-" + street2.getName() + "-" + act.getName() : act.getName(); + } + break; + } + } Complaint complaint = getById(dto.getComplaintId()); @@ -645,6 +672,7 @@ complaintAuditRecord.setSuperiorId(superiorId); complaintAuditRecord.setComment(dto.getComment()); complaintAuditRecord.setSort(count + 1); + complaintAuditRecord.setDepartmentName(departmentName); complaintAuditRecordService.save(complaintAuditRecord); } -- Gitblit v1.7.1