Commit 78535e5a by 范富荣

修改策略中心-门店详情查询逻辑(区分子场景)

1 parent 100017b2
...@@ -25,4 +25,7 @@ public class MerchantOperatorDetailDTO implements Serializable { ...@@ -25,4 +25,7 @@ public class MerchantOperatorDetailDTO implements Serializable {
/** 区域运营 */ /** 区域运营 */
private List<MerchantBiMatterDTO.OperatorDTO> areaOperator = Lists.newArrayList(); private List<MerchantBiMatterDTO.OperatorDTO> areaOperator = Lists.newArrayList();
/** 飞行督导 */
private List<MerchantBiMatterDTO.OperatorDTO> flightSupervision = Lists.newArrayList();
} }
...@@ -804,6 +804,8 @@ public class BiAnalyseBackgroundService { ...@@ -804,6 +804,8 @@ public class BiAnalyseBackgroundService {
.ifPresent(r -> result.getAreaOperator().addAll(r)); .ifPresent(r -> result.getAreaOperator().addAll(r));
Optional.ofNullable(directorTypeMapOperator.get(DirectorTypeEnum.AREA_SUPERVISION_1_1.getValue())) Optional.ofNullable(directorTypeMapOperator.get(DirectorTypeEnum.AREA_SUPERVISION_1_1.getValue()))
.ifPresent(r -> result.getAreaOperator().addAll(r)); .ifPresent(r -> result.getAreaOperator().addAll(r));
Optional.ofNullable(directorTypeMapOperator.get(DirectorTypeEnum.FLIGHT_SUPERVISION.getValue()))
.ifPresent(r -> result.getFlightSupervision().addAll(r));
// 无关联的线上运营或区域运营,则无法提交并toast:无可跟进的线上运营或区域运营,请确认后重新操作; // 无关联的线上运营或区域运营,则无法提交并toast:无可跟进的线上运营或区域运营,请确认后重新操作;
...@@ -822,6 +824,10 @@ public class BiAnalyseBackgroundService { ...@@ -822,6 +824,10 @@ public class BiAnalyseBackgroundService {
if (CollUtil.isNotEmpty(areaOperator)) { if (CollUtil.isNotEmpty(areaOperator)) {
result.setAreaOperator(areaOperator.stream().distinct().collect(Collectors.toList())); result.setAreaOperator(areaOperator.stream().distinct().collect(Collectors.toList()));
} }
List<MerchantBiMatterDTO.OperatorDTO> flightSupervision = result.getFlightSupervision();
if (CollUtil.isNotEmpty(flightSupervision)) {
result.setFlightSupervision(flightSupervision.stream().distinct().collect(Collectors.toList()));
}
return result; return result;
} }
...@@ -839,7 +845,8 @@ public class BiAnalyseBackgroundService { ...@@ -839,7 +845,8 @@ public class BiAnalyseBackgroundService {
return Lists.newArrayList(DirectorTypeEnum.DF_DIRECTOR_2_1, return Lists.newArrayList(DirectorTypeEnum.DF_DIRECTOR_2_1,
DirectorTypeEnum.AREA_SUPERVISION_2_1, DirectorTypeEnum.AREA_SUPERVISION_2_1,
DirectorTypeEnum.DF_DIRECTOR, DirectorTypeEnum.DF_DIRECTOR,
DirectorTypeEnum.AREA_SUPERVISION_1_1); DirectorTypeEnum.AREA_SUPERVISION_1_1,
DirectorTypeEnum.FLIGHT_SUPERVISION);
} }
BusinessTypeEnum businessTypeEnum = BusinessTypeEnum.getByCode(businessType); BusinessTypeEnum businessTypeEnum = BusinessTypeEnum.getByCode(businessType);
...@@ -848,7 +855,7 @@ public class BiAnalyseBackgroundService { ...@@ -848,7 +855,7 @@ public class BiAnalyseBackgroundService {
case BUSINESS_TYPE_3: case BUSINESS_TYPE_3:
return Lists.newArrayList(DirectorTypeEnum.DF_DIRECTOR_2_1, DirectorTypeEnum.AREA_SUPERVISION_2_1); return Lists.newArrayList(DirectorTypeEnum.DF_DIRECTOR_2_1, DirectorTypeEnum.AREA_SUPERVISION_2_1);
case BUSINESS_TYPE_2: case BUSINESS_TYPE_2:
return Lists.newArrayList(DirectorTypeEnum.DF_DIRECTOR, DirectorTypeEnum.AREA_SUPERVISION_1_1); return Lists.newArrayList(DirectorTypeEnum.DF_DIRECTOR, DirectorTypeEnum.AREA_SUPERVISION_1_1, DirectorTypeEnum.FLIGHT_SUPERVISION);
default: default:
throw new RpcServiceException(BiErrorEnum.NOT_SUPPORT_BUSINESS_TYPE_ERROR); throw new RpcServiceException(BiErrorEnum.NOT_SUPPORT_BUSINESS_TYPE_ERROR);
} }
...@@ -910,6 +917,8 @@ public class BiAnalyseBackgroundService { ...@@ -910,6 +917,8 @@ public class BiAnalyseBackgroundService {
.ifPresent(r -> item.getAreaOperator().addAll(r)); .ifPresent(r -> item.getAreaOperator().addAll(r));
Optional.ofNullable(directorTypeMapOperator.get(DirectorTypeEnum.AREA_SUPERVISION_1_1.getValue())) Optional.ofNullable(directorTypeMapOperator.get(DirectorTypeEnum.AREA_SUPERVISION_1_1.getValue()))
.ifPresent(r -> item.getAreaOperator().addAll(r)); .ifPresent(r -> item.getAreaOperator().addAll(r));
Optional.ofNullable(directorTypeMapOperator.get(DirectorTypeEnum.FLIGHT_SUPERVISION.getValue()))
.ifPresent(r -> item.getFlightSupervision().addAll(r));
// 去重 // 去重
List<MerchantBiMatterDTO.OperatorDTO> onlineOperator = item.getOnlineOperator(); List<MerchantBiMatterDTO.OperatorDTO> onlineOperator = item.getOnlineOperator();
...@@ -920,6 +929,10 @@ public class BiAnalyseBackgroundService { ...@@ -920,6 +929,10 @@ public class BiAnalyseBackgroundService {
if (CollUtil.isNotEmpty(areaOperator)) { if (CollUtil.isNotEmpty(areaOperator)) {
item.setAreaOperator(areaOperator.stream().distinct().collect(Collectors.toList())); item.setAreaOperator(areaOperator.stream().distinct().collect(Collectors.toList()));
} }
List<MerchantBiMatterDTO.OperatorDTO> flightSupervision = item.getFlightSupervision();
if (CollUtil.isNotEmpty(flightSupervision)) {
item.setFlightSupervision(flightSupervision.stream().distinct().collect(Collectors.toList()));
}
result.add(item); result.add(item);
}); });
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!