Commit f576872f by 王祖波

周月报格式化时间修改

parent b2290f1c
......@@ -225,11 +225,11 @@ public class WeekMonthDataAdaptor {
String endDate = bizDate;
String beginDate = bizDate;
if (MaterialReportType.MONTH.getCode().equals(reportType)) {
DateTime date = cn.hutool.core.date.DateUtil.parse("yyyy-MM");
DateTime date = cn.hutool.core.date.DateUtil.parse(bizDate,"yyyy-MM");
beginDate = cn.hutool.core.date.DateUtil.format(cn.hutool.core.date.DateUtil.beginOfMonth(date), "yyyy-MM-dd");
endDate = cn.hutool.core.date.DateUtil.format(cn.hutool.core.date.DateUtil.endOfMonth(date), "yyyy-MM-dd");
}else {
DateTime date = cn.hutool.core.date.DateUtil.parse("yyyy-MM-dd");
DateTime date = cn.hutool.core.date.DateUtil.parse(bizDate,"yyyy-MM-dd");
endDate = cn.hutool.core.date.DateUtil.format(cn.hutool.core.date.DateUtil.endOfWeek(date), "yyyy-MM-dd");
}
Map<String, Object> inlineParams = new HashMap<>();
......@@ -251,11 +251,10 @@ public class WeekMonthDataAdaptor {
if (result.get("data") == null) {
return null;
}
List<JSONObject> dataList = DataApiUtils.getDataList(result);
if (CollectionUtils.isEmpty(dataList)) {
JSONObject jsonObject = DataApiUtils.getPageOne(result);
if (jsonObject == null) {
return null;
}
JSONObject jsonObject = dataList.get(0);
BigDecimal potCusConnRate = Optional.ofNullable(jsonObject.getBigDecimal("potCusConnRate")).orElse(BigDecimal.ZERO);
BigDecimal convSalesAmt = Optional.ofNullable(jsonObject.getBigDecimal("connConvsAmt")).orElse(BigDecimal.ZERO);
return formatDecimal(potCusConnRate, convSalesAmt);
......
......@@ -126,7 +126,6 @@ public class WeekMonthReportBuilder {
String bizDate = this.calcBizDate(context.getReportType());
context.setBizDate(bizDate);
// todo 潜客雷达数据
if (StringUtils.isBlank(context.getMainStoreId())) {
// 区经
List<String> storeIds = this.queryClerkStoreIds(clerkId, context.getStaffInfo().getWxEnterpriseId());
......
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