Browse Source

社区列表

dev
lichao 2 years ago
parent
commit
0d37f89d24
  1. 24
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/CommunityListByAgencyIdResultDTO.java
  2. 16
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java
  3. 9
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java
  4. 16
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java

24
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/CommunityListByAgencyIdResultDTO.java

@ -0,0 +1,24 @@
package com.epmet.dto.result;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @Description:
* @Author: lichao
* @Date: 2023/4/7 16:43
*/
@Data
public class CommunityListByAgencyIdResultDTO implements Serializable {
private static final long serialVersionUID = -1677303397440121269L;
private String name;
private String streeName;
private String districtName;
private String createTime;
}

16
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java

@ -541,10 +541,16 @@ public class CustomerAgencyController {
return new Result<List<CommunityCountCensusResultDTO>>().ok(customerAgencyService.getCommunityCountList(dto));
}
/**
* @Description: 根据agencyId获取下级社区列表
* @param dto:
* @Return com.epmet.commons.tools.utils.Result<java.util.List < com.epmet.dto.result.CommunityListByAgencyIdResultDTO>>
* @Author: lichao
* @Date: 2023/4/7 16:49
*/
@GetMapping("getCommunityList")
public Result<List<CommunityListByAgencyIdResultDTO>> getCommunityList(@RequestBody CommunityCountCensusFormDTO dto){
return new Result<List<CommunityListByAgencyIdResultDTO>>().ok(customerAgencyService.getCommunityList(dto));
}
}

9
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java

@ -378,4 +378,13 @@ public interface CustomerAgencyService extends BaseService<CustomerAgencyEntity>
* @Date: 2023/4/7 15:09
*/
List<CommunityCountCensusResultDTO> getCommunityCountList(CommunityCountCensusFormDTO dto);
/**
* @Description: 根据agencyId获取下级社区列表
* @param dto:
* @Return java.util.List<com.epmet.dto.result.CommunityListByAgencyIdResultDTO>
* @Author: lichao
* @Date: 2023/4/7 16:49
*/
List<CommunityListByAgencyIdResultDTO> getCommunityList(CommunityCountCensusFormDTO dto);
}

16
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java

@ -1688,4 +1688,20 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl<CustomerAgencyDao
return resultDTOS;
}
@Override
public List<CommunityListByAgencyIdResultDTO> getCommunityList(CommunityCountCensusFormDTO dto) {
CustomerAgencyEntity customerAgency = baseDao.selectById(dto.getAgencyId());
if (customerAgency!=null){
String pids = PidUtils.convertPid2OrgIdPath(customerAgency.getId(),customerAgency.getPids());
}else {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"获取用户组织信息异常","获取用户组织信息异常");
}
return null;
}
}

Loading…
Cancel
Save