diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/CommunitySelfOrganizationListFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/CommunitySelfOrganizationListFormDTO.java index 7a8fba0899..30c0584e95 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/CommunitySelfOrganizationListFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/CommunitySelfOrganizationListFormDTO.java @@ -50,4 +50,6 @@ public class CommunitySelfOrganizationListFormDTO implements Serializable { private String remark; private String categoryCode; + //查详情时候用 + private String orgId; } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java index 399e9c7e81..ccdc9c79d7 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java @@ -255,6 +255,17 @@ public class IcCommunitySelfOrganizationController { return new Result().ok(icCommunitySelfOrganizationService.communitySelfOrganizationList(tokenDto, formDTO)); } + /** + * 社区自组织详情 + * @param orgId 社区自组织id + * @return + */ + @PostMapping("community-self-org-detail/{orgId}") + public Result communitySelfOrganizationDetail(@LoginUser TokenDto tokenDto,@PathVariable("orgId") String orgId){ + return new Result().ok(icCommunitySelfOrganizationService.communitySelfOrganizationDetail(orgId,tokenDto.getCustomerId())); + } + + /** * @Description 社区自组织删除 * @param formDTO diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationService.java index 14008a7ce2..1da3a3137e 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationService.java @@ -181,4 +181,11 @@ public interface IcCommunitySelfOrganizationService extends BaseService queryCoordinateList(CategorySelfOrgFormDTO formDTO); + + /** + * 社区自组织详情 + * @param orgId + * @return + */ + CommunitySelfOrganizationListDTO communitySelfOrganizationDetail(String orgId,String customerId); } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java index 52b11d72a1..7f6eee3a8f 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java @@ -800,4 +800,30 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl(list, NumConstant.ONE_NEG); } + /** + * 社区自组织详情 + * + * @param orgId + * @return + */ + @Override + public CommunitySelfOrganizationListDTO communitySelfOrganizationDetail(String orgId,String customerId) { + //获取分类名称字典 + Result> dictMapRes=adminOpenFeignClient.dictMap(DictTypeEnum.SELF_ORG_CATEGORY.getCode()); + Map dictMap = dictMapRes.success() && MapUtils.isNotEmpty(dictMapRes.getData()) ? dictMapRes.getData() : new HashMap<>(); + CommunitySelfOrganizationListFormDTO formDTO=new CommunitySelfOrganizationListFormDTO(); + formDTO.setCustomerId(customerId); + formDTO.setOrgId(orgId); + List list=baseDao.selectCommunitySelfOrganizationList(formDTO); + if(CollectionUtils.isEmpty(list)){ + return null; + } + for (CommunitySelfOrganizationListDTO l : list) { + //赋值分类名称 + l.setCategoryName(dictMap.get(l.getCategoryCode())); + } + return list.get(NumConstant.ZERO); + } + + } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml index d7b90133a4..bb705fc32a 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml @@ -62,7 +62,9 @@ so.remark FROM ic_community_self_organization so WHERE so.DEL_FLAG = 0 - AND so.ORG_ID = #{agencyId} + + AND so.ORG_ID = #{agencyId} + AND so.CUSTOMER_ID = #{customerId} AND so.ORGANIZATION_NAME LIKE CONCAT('%',#{organizationName},'%') @@ -76,6 +78,9 @@ AND so.ORGANIZATION_CREATED_TIME #{endTime} + + AND so.ID = #{orgId} + ORDER BY so.ORGANIZATION_CREATED_TIME DESC