Browse Source

投药报表, 天维度数据口径对齐

Davidliu 2 days ago
parent
commit
64e53c8d28

+ 4 - 2
src/main/java/com/xlht/xlhtproject/controller/TXlhtAddRecordController.java

@@ -113,8 +113,9 @@ public class TXlhtAddRecordController extends BaseController{
         log.info("进入了 碳源投加 天维度投药聚合报表 接口");
         //2024年10月24日17:24:13 如果没有指定日期,那么这里给默认15天的数据
         Date nowDate = DateUtils.getNowDate();
+        Date tomorrowDate = DateUtils.plusDate(1, nowDate);
         Date dayBefore14 = DateUtils.plusDate(-14, nowDate);
-        timeEnd = StringUtils.isBlank(timeEnd) ? DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD, nowDate) : timeEnd;
+        timeEnd = StringUtils.isBlank(timeEnd) ? DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD, tomorrowDate) : timeEnd;
         timeBegin = StringUtils.isBlank(timeBegin) ? DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD, dayBefore14) : timeBegin;
         TXlhtAddRecord req = TXlhtAddRecord.builder().timeBegin(timeBegin).timeEnd(timeEnd).build();
         startPage();
@@ -131,8 +132,9 @@ public class TXlhtAddRecordController extends BaseController{
         log.info("进入了 碳源投加 天维度投药聚合报表导出 接口");
         //2024年10月24日17:24:13 如果没有指定日期,那么这里给默认15天的数据
         Date nowDate = DateUtils.getNowDate();
+        Date tomorrowDate = DateUtils.plusDate(1, nowDate);
         Date dayBefore14 = DateUtils.plusDate(-14, nowDate);
-        timeEnd = StringUtils.isBlank(timeEnd) ? DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD, nowDate) : timeEnd;
+        timeEnd = StringUtils.isBlank(timeEnd) ? DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD, tomorrowDate) : timeEnd;
         timeBegin = StringUtils.isBlank(timeBegin) ? DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD, dayBefore14) : timeBegin;
         TXlhtAddRecord req = TXlhtAddRecord.builder().timeBegin(timeBegin).timeEnd(timeEnd).build();
         List<TXlhtAddRecord> list = this.txlhtAddRecordService.selectTXlhtAddRecordDayList(req);