bug修复

This commit is contained in:
guo 2024-03-25 17:57:35 +08:00
parent f55a15e140
commit 45233e402e
2 changed files with 2 additions and 1 deletions

View File

@ -31,7 +31,7 @@ public class TrendOneVo {
* @return * @return
*/ */
public static List<TrendOneVo> fillTrendVos(List<TrendOneVo> list, List<String> days, String format) { public static List<TrendOneVo> fillTrendVos(List<TrendOneVo> list, List<String> days, String format) {
Map<String, TrendOneVo> voMap = list.stream().collect(Collectors.toMap(TrendOneVo::getX, Function.identity())); Map<String, TrendOneVo> voMap = list.stream().collect(Collectors.toMap(TrendOneVo::getX, Function.identity(), (trendOneVo, trendOneVo2) -> trendOneVo));
List<TrendOneVo> rtList = new ArrayList<>(); List<TrendOneVo> rtList = new ArrayList<>();
for (String day : days) { for (String day : days) {
TrendOneVo vo = voMap.get(day); TrendOneVo vo = voMap.get(day);

View File

@ -18,6 +18,7 @@
where project_sn = #{projectSn} where project_sn = #{projectSn}
<if test="type == '1'.toString()"> <if test="type == '1'.toString()">
and discharge_time > current_date and discharge_time > current_date
and discharge_time &lt; date_add(current_date, interval 1 day)
group by dev_sn, date_format(discharge_time, '%Y-%m-%d %H:00') group by dev_sn, date_format(discharge_time, '%Y-%m-%d %H:00')
</if> </if>
<if test="type == '2'.toString()"> <if test="type == '2'.toString()">