Commit 6a60e4bd by songyinghui

feat: 月报周期

parent a6f60719
......@@ -242,7 +242,7 @@ public class MaterialDataAdaptor {
// 获取当前时间周期
DateTime startTime = null;
DateTime endTime = null;
String bizDate = this.calcBizDate(reportType);
String bizDate = materialReportQO.getBizDate();
String apolloKey = MATERIAL_CLERK_WEEK_DATA;
if (MaterialReportType.WEEK.getCode().equals(reportType)) {
// 周报
......@@ -307,7 +307,7 @@ public class MaterialDataAdaptor {
// 获取当前时间周期
DateTime startTime = null;
DateTime endTime = null;
String bizDate = this.calcBizDate(reportType);
String bizDate = materialReportQO.getBizDate();
String apolloKey = MATERIAL_STORE_WEEK_DATA;
if (MaterialReportType.WEEK.getCode().equals(reportType)) {
// 周报
......@@ -448,19 +448,4 @@ public class MaterialDataAdaptor {
.collect(Collectors.toMap(MemberVisitMaterialBO::getCustomerId, item -> Optional.ofNullable(item.getMatlNum30Day())
.map(Integer::new).orElse(0), (v1, v2) -> v1));
}
private String calcBizDate(Integer reportType){
String bizDate = null;
if (MaterialReportType.WEEK.getCode().equals(reportType)) {
// 周报
bizDate = DateUtil.beginOfWeek(DateUtil.yesterday()).toString("yyyy-MM-dd");
} else {
// 月报
bizDate = DateUtil.beginOfMonth(DateUtil.yesterday()).toString("yyyy-MM-dd");
}
return bizDate;
}
}
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