Browse Source

疫苗接种点,核酸检测点 pc 管理

feature/teamB_zz_wgh
wanggongfeng 3 years ago
parent
commit
da9a41d85f
  1. 14
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/AgencyController.java
  2. 2
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java
  3. 11
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/AgencyService.java
  4. 10
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java
  5. 11
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml

14
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/AgencyController.java

@ -468,7 +468,19 @@ public class AgencyController {
} }
/** /**
* Desc: 查询工作人员所属组织下的所有街道社区 * Desc: 查询客户下的所有社区
*
* @param tokenDto
* @author wgf
* @date 2022/6/23 09:13
*/
@PostMapping("communityListByCustomerId")
public Result<List<CommunityListResultDTO>> communityListByCustomerId(@LoginUser TokenDto tokenDto) {
return new Result<List<CommunityListResultDTO>>().ok(agencyService.communityListByCustomerId(tokenDto));
}
/**
* Desc: 查询客户下的所有街道社区
* *
* @param tokenDto * @param tokenDto
* @author wgf * @author wgf

2
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java

@ -320,6 +320,8 @@ public interface CustomerAgencyDao extends BaseDao<CustomerAgencyEntity> {
*/ */
List<CommunityListResultDTO> getCommunityList(@Param("customerId") String customerId, @Param("agencyId") String agencyId); List<CommunityListResultDTO> getCommunityList(@Param("customerId") String customerId, @Param("agencyId") String agencyId);
List<CommunityListResultDTO> communityListByCustomerId(@Param("customerId") String customerId);
List<SubOrgResDTO> selectSubOrg(String agencyId); List<SubOrgResDTO> selectSubOrg(String agencyId);
/** /**

11
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/AgencyService.java

@ -151,7 +151,16 @@ public interface AgencyService {
List<CommunityListResultDTO> getCommunityList(TokenDto tokenDto); List<CommunityListResultDTO> getCommunityList(TokenDto tokenDto);
/** /**
* Desc: 查询工作人员所属组织下的所有街道社区 * Desc: 查询客户下的所有社区
*
* @param tokenDto
* @author wgf
* @date 2022/6/23 09:13
*/
List<CommunityListResultDTO> communityListByCustomerId(TokenDto tokenDto);
/**
* Desc: 查询客户下的所有街道社区
* *
* @param tokenDto * @param tokenDto
* @author wgf * @author wgf

10
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java

@ -870,10 +870,18 @@ public class AgencyServiceImpl implements AgencyService {
return customerAgencyDao.getCommunityList(tokenDto.getCustomerId(), agencyId); return customerAgencyDao.getCommunityList(tokenDto.getCustomerId(), agencyId);
} }
@Override
public List<CommunityListResultDTO> communityListByCustomerId(TokenDto tokenDto) {
if (null == tokenDto.getCustomerId()) {
throw new EpmetException("未查询到客户信息");
}
return customerAgencyDao.communityListByCustomerId(tokenDto.getCustomerId());
}
@Override @Override
public List<OrgListTreeResultDTO> getOrgTreeListByCustomerId(TokenDto tokenDto) { public List<OrgListTreeResultDTO> getOrgTreeListByCustomerId(TokenDto tokenDto) {
if (null == tokenDto.getCustomerId()) { if (null == tokenDto.getCustomerId()) {
throw new EpmetException("未查询到工作人员信息"); throw new EpmetException("未查询到客户信息");
} }
List<OrgListTreeResultDTO> list = customerAgencyDao.getOrgTreeListByCustomerId(tokenDto.getCustomerId()); List<OrgListTreeResultDTO> list = customerAgencyDao.getOrgTreeListByCustomerId(tokenDto.getCustomerId());
return NodeTreeUtils.build(list); return NodeTreeUtils.build(list);

11
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml

@ -756,6 +756,17 @@
AND CUSTOMER_ID = #{customerId} AND CUSTOMER_ID = #{customerId}
AND CONCAT(PIDS,':',ID) LIKE CONCAT('%',#{agencyId},'%') AND CONCAT(PIDS,':',ID) LIKE CONCAT('%',#{agencyId},'%')
</select> </select>
<select id="communityListByCustomerId" resultType="com.epmet.dto.result.CommunityListResultDTO">
SELECT
ID AS orgId,
ORGANIZATION_NAME AS orgName
FROM customer_agency
WHERE DEL_FLAG = '0'
AND `LEVEL` = 'community'
AND CUSTOMER_ID = #{customerId}
</select>
<select id="getOrgTreeListByCustomerId" resultType="com.epmet.dto.result.OrgListTreeResultDTO"> <select id="getOrgTreeListByCustomerId" resultType="com.epmet.dto.result.OrgListTreeResultDTO">
select select
ID, ID,

Loading…
Cancel
Save