Browse Source

社区自组织详情

master
yinzuomei 3 years ago
parent
commit
59e8a2fdb7
  1. 2
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/CommunitySelfOrganizationListFormDTO.java
  2. 11
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java
  3. 7
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationService.java
  4. 26
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java
  5. 7
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcCommunitySelfOrganizationDao.xml

2
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;
}

11
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<CommunitySelfOrganizationListResultDTO>().ok(icCommunitySelfOrganizationService.communitySelfOrganizationList(tokenDto, formDTO));
}
/**
* 社区自组织详情
* @param orgId 社区自组织id
* @return
*/
@PostMapping("community-self-org-detail/{orgId}")
public Result<CommunitySelfOrganizationListDTO> communitySelfOrganizationDetail(@LoginUser TokenDto tokenDto,@PathVariable("orgId") String orgId){
return new Result<CommunitySelfOrganizationListDTO>().ok(icCommunitySelfOrganizationService.communitySelfOrganizationDetail(orgId,tokenDto.getCustomerId()));
}
/**
* @Description 社区自组织删除
* @param formDTO

7
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationService.java

@ -181,4 +181,11 @@ public interface IcCommunitySelfOrganizationService extends BaseService<IcCommun
* @return
*/
PageData<CommunitySelfOrganizationListDTO> queryCoordinateList(CategorySelfOrgFormDTO formDTO);
/**
* 社区自组织详情
* @param orgId
* @return
*/
CommunitySelfOrganizationListDTO communitySelfOrganizationDetail(String orgId,String customerId);
}

26
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<IcCo
return new PageData<>(list, NumConstant.ONE_NEG);
}
/**
* 社区自组织详情
*
* @param orgId
* @return
*/
@Override
public CommunitySelfOrganizationListDTO communitySelfOrganizationDetail(String orgId,String customerId) {
//获取分类名称字典
Result<Map<String, String>> dictMapRes=adminOpenFeignClient.dictMap(DictTypeEnum.SELF_ORG_CATEGORY.getCode());
Map<String, String> dictMap = dictMapRes.success() && MapUtils.isNotEmpty(dictMapRes.getData()) ? dictMapRes.getData() : new HashMap<>();
CommunitySelfOrganizationListFormDTO formDTO=new CommunitySelfOrganizationListFormDTO();
formDTO.setCustomerId(customerId);
formDTO.setOrgId(orgId);
List<CommunitySelfOrganizationListDTO> 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);
}
}

7
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}
<if test="null != agencyId and agencyId != '' ">
AND so.ORG_ID = #{agencyId}
</if>
AND so.CUSTOMER_ID = #{customerId}
<if test="null != organizationName and organizationName != '' ">
AND so.ORGANIZATION_NAME LIKE CONCAT('%',#{organizationName},'%')
@ -76,6 +78,9 @@
<if test="null != endTime and endTime != '' ">
AND so.ORGANIZATION_CREATED_TIME <![CDATA[ <= ]]> #{endTime}
</if>
<if test="null != orgId and orgId != '' ">
AND so.ID = #{orgId}
</if>
ORDER BY so.ORGANIZATION_CREATED_TIME DESC
</select>

Loading…
Cancel
Save