Browse Source

project/mynextagency-multic接口修改

dev_shibei_match
yinzuomei 4 years ago
parent
commit
24f59a001a
  1. 4
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java
  2. 2
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java
  3. 8
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml

4
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java

@ -180,7 +180,7 @@ public interface ScreenCustomerAgencyDao {
* @param pid
* @return java.util.List<com.epmet.dto.result.ScreenCustomerAgencyDTO>
*/
List<ScreenCustomerAgencyDTO> selectNextAgencyList(@Param("areaCode") String areaCode, @Param("pid") String pid, @Param("allSubCustomerIds") List<String> allSubCustomerIds);
List<ScreenCustomerAgencyDTO> selectNextAgencyList(@Param("areaCode") String areaCode, @Param("pid") String pid, @Param("allCustomerIds") List<String> allCustomerIds);
/**
* 查询当前组织的下面的网格可根据areaCode查询也可根据parentAgencyId查询
@ -189,7 +189,7 @@ public interface ScreenCustomerAgencyDao {
* @param parentAgencyId
* @return java.util.List<com.epmet.dto.result.ScreenCustomerAgencyDTO>
*/
List<ScreenCustomerGridDTO> selectGridDTOList(@Param("areaCode") String areaCode, @Param("parentAgencyId") String parentAgencyId,@Param("allSubCustomerIds") List<String> allSubCustomerIds);
List<ScreenCustomerGridDTO> selectGridDTOList(@Param("areaCode") String areaCode, @Param("parentAgencyId") String parentAgencyId,@Param("allCustomerIds") List<String> allCustomerIds);
List<ParentListResultDTO> selectPAgencyById(@Param("listStr")List<String> pidList);

2
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/project/impl/ProjectServiceImpl.java

@ -471,6 +471,7 @@ public class ProjectServiceImpl implements ProjectService {
Result<List<String>> crmRes = operCrmOpenFeignClient.getAllSubCustomerIds(currentCustomerId);
if (crmRes.success() && CollectionUtils.isNotEmpty(crmRes.getData())) {
log.warn("❤当前客户存在子客户❤");
crmRes.getData().add(currentCustomerId);
//如果包含子客户,则根据areaCode查询下一级
agencyDTOList = screenAgencyService.queryNextAgencyList(staffResult.getData().getAreaCode(), StrConstant.EPMETY_STR,crmRes.getData());
} else {
@ -494,6 +495,7 @@ public class ProjectServiceImpl implements ProjectService {
List<ScreenCustomerGridDTO> gridList = new ArrayList<>();
if (crmRes.success() && CollectionUtils.isNotEmpty(crmRes.getData())) {
//如果包含子客户,则根据areaCode查询下一级网格
crmRes.getData().add(currentCustomerId);
gridList=screenAgencyService.queryGridList(staffResult.getData().getAreaCode(), StrConstant.EPMETY_STR,crmRes.getData());
} else {
//当前客户没有子客户,根据agencyId查询下一级网格

8
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml

@ -355,9 +355,9 @@
<if test="areaCode != null and areaCode != ''">
AND sca.PARENT_AREA_CODE =#{areaCode}
</if>
<if test="allSubCustomerIds != null and allSubCustomerIds.size() > 0">
<if test="allCustomerIds != null and allCustomerIds.size() > 0">
and sca.customer_id in
<foreach collection="allSubCustomerIds" item="customerId" open="(" separator="," close=" )">
<foreach collection="allCustomerIds" item="customerId" open="(" separator="," close=" )">
#{customerId}
</foreach>
</if>
@ -377,9 +377,9 @@
<if test="parentAgencyId != null and parentAgencyId != ''">
AND scg.PARENT_AGENCY_ID = #{parentAgencyId}
</if>
<if test="allSubCustomerIds != null and allSubCustomerIds.size() > 0">
<if test="allCustomerIds != null and allCustomerIds.size() > 0">
and scg.customer_id in
<foreach collection="allSubCustomerIds" item="customerId" open="(" separator="," close=" )">
<foreach collection="allCustomerIds" item="customerId" open="(" separator="," close=" )">
#{customerId}
</foreach>
</if>

Loading…
Cancel
Save