Browse Source

Merge branch 'dev'

dev_shibei_match
sunyuchao 5 years ago
parent
commit
d81d541380
  1. 18
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java
  2. 1
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml

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

@ -237,11 +237,21 @@ public class AgencyServiceImpl implements AgencyService {
@Override
public Result<SubAgencyResultDTO> subAgencyList(SubAgencyFormDTO formDTO) {
SubAgencyResultDTO subAgencyResultDTO = new SubAgencyResultDTO();
//1:根据当前机关Id查询直属下一级机关列表
//1:根据当前机关Id查询直属下一级机关列表,只返回前十条
List<SubListResultDTO> agencyList = customerAgencyDao.selectSubAgencyById(formDTO.getAgencyId());
subAgencyResultDTO.setAgencyList(null == agencyList ? new ArrayList<SubListResultDTO>() : agencyList);
//2:统计下一级机关数
subAgencyResultDTO.setSubAgencyCount(agencyList.size());
if (null == agencyList || agencyList.size() < NumConstant.ONE) {
subAgencyResultDTO.setAgencyList(new ArrayList<SubListResultDTO>());
subAgencyResultDTO.setSubAgencyCount(NumConstant.ZERO);
} else {
subAgencyResultDTO.setSubAgencyCount(agencyList.size());
if (agencyList.size() > NumConstant.TEN) {
List<SubListResultDTO> newList = agencyList.subList(NumConstant.ZERO, NumConstant.TEN);
subAgencyResultDTO.setAgencyList(newList);
} else {
subAgencyResultDTO.setAgencyList(agencyList);
}
}
return new Result<SubAgencyResultDTO>().ok(subAgencyResultDTO);
}

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

@ -67,7 +67,6 @@
WHERE del_flag = '0'
AND pid = #{pId}
ORDER BY created_time DESC
LIMIT 10
</select>
<select id="selectAgencyList" resultType="com.epmet.dto.result.AgencyListResultDTO">

Loading…
Cancel
Save