修改对账逻辑

This commit is contained in:
2024-10-10 13:50:22 +08:00
parent c36a352bbf
commit 8e0c99ae9b

View File

@@ -513,11 +513,11 @@ where 二次过磅时间>='%s' and 二次过磅时间<='%s'
String where = "where 1 = 1 ";
if (request.getStartTime() != null) {
where += " and d.mz_time >= :startTime ";
where += " and d.ecgb_time >= :startTime ";
}
if (request.getEndTime() != null) {
where += " and d.mz_time <= :endTime ";
where += " and d.ecgb_time <= :endTime ";
}
if (StringUtils.isNotEmpty(request.getPlateNo())) {
@@ -578,7 +578,7 @@ where 二次过磅时间>='%s' and 二次过磅时间<='%s'
var sql =
"select DATE_TRUNC('"
+ request.getTimeDimension()
+ "', d.mz_time) as time,\n"
+ "', d.ecgb_time) as time,\n"
+ groupSql
+ ",\n"
+ fieldSql
@@ -590,7 +590,7 @@ where 二次过磅时间>='%s' and 二次过磅时间<='%s'
+ "\n"
+ "group by DATE_TRUNC('"
+ request.getTimeDimension()
+ "', d.mz_time), "
+ "', d.ecgb_time), "
+ groupSql
+ "\n"
+ "order by time desc ";