From 75567528930481551aa612a14a7b91516ccd27dd Mon Sep 17 00:00:00 2001 From: mitao <2763622819@qq.com> Date: 星期二, 18 三月 2025 16:25:48 +0800 Subject: [PATCH] bug修改 --- springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/ComplaintServiceImpl.java | 27 +++++++++++++++++++++++++++ 1 files changed, 27 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 ca73787..ae5b5bf 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 @@ -820,6 +820,7 @@ SystemUser systemUser = systemUserService.getSystemUserAdminByPhone(loginUserInfoVO.getPhone()).orElse(null); Long superiorId; int reportType; + String departmentName = ""; if (identityInformation.getIdentity() == 1) { PartyMember partyMember = partyMemberService.getPartyMemberByPhone(loginUserInfoVO.getPhone()); superiorId = partyMember.getCommunityId(); @@ -827,6 +828,7 @@ throw new ServiceException("延期申请失败,请绑定社区"); } reportType = ReportTypeEnum.COMMUNITY.getCode(); + departmentName = partyMember.getDistricts() + "-" + partyMember.getStreet() + "-" + partyMember.getCommunity(); } else if (identityInformation.getIdentity() == 2 && systemUser != null) { int accountLevel = systemUser.getAccountLevel(); // 改为基本类型 if (accountLevel == 1) { @@ -846,6 +848,30 @@ } else { // 处理未预期的账号等级 throw new ServiceException("未知的账号等级"); + } + //查询社区信息 + switch (accountLevel) { + case 2: + BcRegion region = bcRegionService.getDistrictByCode(systemUser.getDistrictsCode().toString()); + if (Objects.nonNull(region)) { + departmentName = region.getRegionName(); + } + break; + case 3: + 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(systemUser.getCommunityId()); + if (Objects.nonNull(act)) { + 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(); + } + break; } } else { throw new ServiceException("无权申请"); @@ -870,6 +896,7 @@ record1.setSuperiorId(superiorId); record1.setSort(count + 1); record1.setComment(dto.getComment()); + record1.setDepartmentName(departmentName); complaintAuditRecordService.save(record1); } -- Gitblit v1.7.1