提交 4e946641 作者: 轩辕玉

解决统计值无数据问题

上级 7223c306
...@@ -24,15 +24,15 @@ public interface RecMapper extends BaseMapper<RecExcel> { ...@@ -24,15 +24,15 @@ public interface RecMapper extends BaseMapper<RecExcel> {
"</script>") "</script>")
List<RecExcel> getRecAll2(String table); List<RecExcel> getRecAll2(String table);
@Select("select count(*), tbrq from (select TO_CHAR(t.tbrq,'yyyy-MM') tbrq from ${table} t)a group by tbrq ") @Select("select count(*) value, tbrq from (select TO_CHAR(t.tbrq,'yyyy-MM') tbrq from ${table} t)a group by tbrq ")
List<RecExcel> getRecMon1(String table); List<RecExcel> getRecMon1(String table);
@Select("select count(*), tbrq from (select TO_CHAR(t.tbrq,'yyyy-MM') tbrq from ${table} t,${table}_D d where t.recordid=d.recordid)a group by tbrq") @Select("select count(*) value, tbrq from (select TO_CHAR(t.tbrq,'yyyy-MM') tbrq from ${table} t,${table}_D d where t.recordid=d.recordid)a group by tbrq")
List<RecExcel> getRecMon2(String table); List<RecExcel> getRecMon2(String table);
@Select("select count(*), tbrq from (select TO_CHAR(t.tbrq,'yyyy-MM-dd') tbrq from ${table} t where t.tbrq>= to_char(now() - interval '30' day,'yyyy-MM-dd') and t.tbrq < to_char(now(),'yyyy-MM-dd'))a group by tbrq") @Select("select count(*) value, tbrq from (select TO_CHAR(t.tbrq,'yyyy-MM-dd') tbrq from ${table} t where t.tbrq>= to_char(now() - interval '30' day,'yyyy-MM-dd') and t.tbrq < to_char(now(),'yyyy-MM-dd'))a group by tbrq")
List<RecExcel> getRecDay1(String table); List<RecExcel> getRecDay1(String table);
@Select("select count(*), tbrq from (select TO_CHAR(t.tbrq,'yyyy-MM-dd') tbrq from ${table} t,${table}_D d where t.recordid=d.recordid and t.tbrq>= to_char(now() - interval '30' day,'yyyy-MM-dd') and t.tbrq < to_char(now(),'yyyy-MM-dd'))a group by tbrq") @Select("select count(*) value, tbrq from (select TO_CHAR(t.tbrq,'yyyy-MM-dd') tbrq from ${table} t,${table}_D d where t.recordid=d.recordid and t.tbrq>= to_char(now() - interval '30' day,'yyyy-MM-dd') and t.tbrq < to_char(now(),'yyyy-MM-dd'))a group by tbrq")
List<RecExcel> getRecDay2(String table); List<RecExcel> getRecDay2(String table);
} }
...@@ -206,7 +206,7 @@ public class RecService { ...@@ -206,7 +206,7 @@ public class RecService {
recExcel.setExecDate(now); recExcel.setExecDate(now);
recExcel.setDataArea(recTable.getSysTable()); recExcel.setDataArea(recTable.getSysTable());
recExcel.setOtherDimension(recTable.getTableName()); recExcel.setOtherDimension(recTable.getTableName());
recExcel.setValue(recExcel.getValue()); recExcel.setValue(recAll.getValue());
return recExcel; return recExcel;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论