修改成单数据不正确的问题
This commit is contained in:
parent
130089bf61
commit
f7ecda456e
|
|
@ -451,6 +451,7 @@ import java.util.concurrent.atomic.AtomicInteger;
|
|||
boolean isQValueMatch = matchesQValue(data, targetDate);
|
||||
boolean isSourceMatch = matchesSource(data);
|
||||
boolean isTimelyOrder = isTimelyOrder(data);
|
||||
boolean isNoTimelyOrder = isNoTimelyOrder(data);
|
||||
String customerAttr = data.getTagGroup6();
|
||||
boolean isParent = customerAttr != null && !customerAttr.trim().isEmpty() && customerAttr.contains("家长");
|
||||
boolean isStudent = customerAttr != null && !customerAttr.trim().isEmpty() && customerAttr.contains("学生");
|
||||
|
|
@ -473,12 +474,12 @@ import java.util.concurrent.atomic.AtomicInteger;
|
|||
stats.setTotalOrderCount(stats.getTotalOrderCount() + 1);
|
||||
if (isTimelyOrder) {
|
||||
stats.setTimelyOrderCount(stats.getTimelyOrderCount() + 1);
|
||||
} else {
|
||||
} else if(isNoTimelyOrder){
|
||||
stats.setNonTimelyOrderCount(stats.getNonTimelyOrderCount() + 1);
|
||||
}
|
||||
}
|
||||
|
||||
if (isSourceMatch) {
|
||||
if (isSourceMatch && data.getAddDate().compareTo(targetDate) == 0) {
|
||||
stats.setTotalAcceptCount(stats.getTotalAcceptCount() + 1);
|
||||
if (isParent) {
|
||||
stats.setParentDailyCount(stats.getParentDailyCount() + 1);
|
||||
|
|
@ -659,7 +660,7 @@ import java.util.concurrent.atomic.AtomicInteger;
|
|||
private boolean matchOrderCompleted(CustomerExportData data,Date curDate) {
|
||||
String orderStatus = data.getTagGroup7(); // T列:成交状态
|
||||
// 校验成交状态
|
||||
if (!orderStatus.contains("已成交及时单9元+") && !orderStatus.contains("已成交非及时单9元+")) {
|
||||
if (!orderStatus.equals("已成交及时单9元+") && !orderStatus.equals("已成交非及时单9元+")) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
|
@ -670,9 +671,14 @@ import java.util.concurrent.atomic.AtomicInteger;
|
|||
if (orderStatus == null || orderStatus.trim().isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
String[] split = orderStatus.split(",");
|
||||
String statusInfo = split[split.length - 1];
|
||||
return statusInfo.contains("已成交及时单9元+");
|
||||
return orderStatus.equals("已成交及时单9元+");
|
||||
}
|
||||
private boolean isNoTimelyOrder(CustomerExportData data) {
|
||||
String orderStatus = data.getTagGroup7();
|
||||
if (orderStatus == null || orderStatus.trim().isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
return orderStatus.equals("已成交非及时单9元+");
|
||||
}
|
||||
/**
|
||||
* 处理单条数据记录,累加到所有相关组的统计中
|
||||
|
|
@ -729,11 +735,9 @@ import java.util.concurrent.atomic.AtomicInteger;
|
|||
stats.setOrderCount(stats.getOrderCount() + 1);
|
||||
String orderStatus = data.getTagGroup7();
|
||||
if (orderStatus != null) {
|
||||
String[] split = orderStatus.split(",");
|
||||
String statusInfo = split[split.length - 1];
|
||||
if (statusInfo.contains("已成交及时单9元+")) {
|
||||
if (orderStatus.equals("已成交及时单9元+")) {
|
||||
stats.setTimelyOrderCount(stats.getTimelyOrderCount() + 1);
|
||||
} else if (statusInfo.contains("已成交非及时单9元+")) {
|
||||
} else if (orderStatus.equals("已成交非及时单9元+")) {
|
||||
stats.setNonTimelyOrderCount(stats.getNonTimelyOrderCount() + 1);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -618,9 +618,7 @@ public class HandleAllDataV2 {
|
|||
if (orderStatus == null || orderStatus.trim().isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
String[] split = orderStatus.split(",");
|
||||
String statusInfo = split[split.length - 1];
|
||||
return statusInfo.contains("已成交及时单9元+");
|
||||
return orderStatus.equals("已成交及时单9元+");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -68,9 +68,18 @@ public class WeComTask {
|
|||
});
|
||||
}
|
||||
|
||||
public void createCurDateCustomerReportV2() throws IOException {
|
||||
Date from = Date.from(LocalDate.now().atStartOfDay()
|
||||
.atZone(ZoneId.systemDefault()).toInstant());
|
||||
System.out.println("计算" + JSON.toJSONString(from) + "流量看板数据");
|
||||
List<CorpInfo> corpInfos = corpInfoMapper.selectCorpInfoList(new CorpInfo());
|
||||
corpInfos.forEach(item->{
|
||||
handleAllDataV2.createReportDataV2(item.getCorpId(), from);
|
||||
});
|
||||
}
|
||||
|
||||
//昨天的 流量v2数据
|
||||
public void createCurDateCustomerReportV2() throws IOException {
|
||||
public void createYestodayCustomerReportV2() throws IOException {
|
||||
Date from = Date.from(LocalDate.now().minusDays(1L).atStartOfDay()
|
||||
.atZone(ZoneId.systemDefault()).toInstant());
|
||||
System.out.println("计算V2" + JSON.toJSONString(from) + "流量看板数据");
|
||||
|
|
|
|||
Loading…
Reference in New Issue