Commit cab0851e by 王祖波

周月报不用实时查当前未建联数

parent 865d4d31
......@@ -184,7 +184,14 @@ public class PotentialDataController {
return RestResponse.successResult(new Page<>());
}
List<String> storeIds = getStoreIds(potentialOverviewQO).getValue();
Page<PotentialContactOverviewVO> page = potentialDataAdaptor.pagePotentialContactOverview(potentialOverviewQO, storeIds);
Page<PotentialContactOverviewVO> page = null;
// 是否周月报 周月报不用实时查当前未建联数
boolean weekMonth = StringUtils.isNotBlank(potentialOverviewQO.getBizDate());
if (weekMonth) {
page = potentialDataAdaptor.pagePotentialContactOverview(potentialOverviewQO, storeIds);
}else {
page = potentialDataAdaptor.pagePotentialContactDetail(potentialOverviewQO, storeIds);
}
List<PotentialContactOverviewVO> result = page.getResult();
List<PotentialContactDetailOverviewVO> list = null;
if (CollectionUtils.isNotEmpty(result)) {
......@@ -194,11 +201,11 @@ public class PotentialDataController {
list = result.stream().map(x -> {
ClerkDTO clerkDTO = clerkMap.get(x.getClerkId());
StoreDTO storeDTO = storeMap.get(x.getStoreId());
// 实时获取当前未建联数 todo
Integer potCusNum = getPotCusNum(potentialResponse, enterpriseId, wxEnterpriseId, storeDTO.getStoreId(), clerkDTO);
x.setPotCusNum(potCusNum);
if (!weekMonth) {
// 实时获取当前未建联数 todo
Integer noConnPotCusNum = getNoConnPotCusNum(potentialResponse, enterpriseId, wxEnterpriseId, storeDTO.getStoreId(), clerkDTO);
x.setNoConnPotCusNum(noConnPotCusNum);
}
PotentialContactDetailOverviewVO overviewVO = new PotentialContactDetailOverviewVO();
overviewVO.setContact(x);
overviewVO.setStore(storeDTO);
......@@ -215,7 +222,7 @@ public class PotentialDataController {
return RestResponse.successResult(res);
}
private Integer getPotCusNum(ServiceResponse<PlatformPotentialCustomerOutDTO> potentialResponse, String enterpriseId,String wxEnterpriseId,String storeId,ClerkDTO clerkDTO) {
private Integer getNoConnPotCusNum(ServiceResponse<PlatformPotentialCustomerOutDTO> potentialResponse, String enterpriseId,String wxEnterpriseId,String storeId,ClerkDTO clerkDTO) {
if (StringUtils.isBlank(storeId) && clerkDTO == null) {
return 0;
}
......
......@@ -30,6 +30,10 @@ public class PotentialDataAdaptor {
*/
private static final String POTENTIAL_CONTACT_OVERVIEW = "data_mkt_pos_cut_haoban_overview";
/**
* 潜客建联-详情
*/
private static final String POTENTIAL_CONTACT_DETAIL = "data_mkt_pos_cut_haoban_pos";
/**
* 潜客转化
*/
private static final String POTENTIAL_CONV_OVERVIEW = "data_mkt_pos_cut_haoban_conv";
......@@ -139,6 +143,14 @@ public class PotentialDataAdaptor {
}
/**
* 潜客建联明细概览
* @return
*/
public Page<PotentialContactOverviewVO> pagePotentialContactDetail(PotentialOverviewQO potentialOverviewQO, List<String> storeIds) {
return fetchPageData(potentialOverviewQO, storeIds, POTENTIAL_CONTACT_DETAIL, PotentialContactOverviewVO.class);
}
/**
* 潜客转化明细概览
* @return
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment