修改日期查询问题
This commit is contained in:
1 parent
8cd210fd20
commit
89bb6d9e83
1 file changed
+10
-3
@@ -2063,9 +2063,16 @@ public class EsRecordReportServiceImpl implements EsRecordReportService {
|
||||
}
|
||||
}
|
||||
if (!flag) {
|
||||
LocalDate localDate = LocalDate.now();
|
||||
dateFrom = localDate.with(TemporalAdjusters.firstDayOfMonth()).toString();
|
||||
dateTo = localDate.with(TemporalAdjusters.lastDayOfMonth()).toString();
|
||||
String strFrom = param.getString("dateFrom");
|
||||
String strTo = param.getString("dateTo");
|
||||
if (strFrom != null && !strFrom.isEmpty() && strTo != null && !strTo.isEmpty()) {
|
||||
dateFrom = strFrom;
|
||||
dateTo = strTo;
|
||||
} else {
|
||||
LocalDate localDate = LocalDate.now();
|
||||
dateFrom = localDate.with(TemporalAdjusters.firstDayOfMonth()).toString();
|
||||
dateTo = localDate.with(TemporalAdjusters.lastDayOfMonth()).toString();
|
||||
}
|
||||
}
|
||||
queryParam.put("dateFrom", dateFrom);
|
||||
queryParam.put("dateTo", dateTo);
|
||||
|
||||
Reference in new issue
Block a user