bug修复
This commit is contained in:
parent
7bb4abe584
commit
012149b1dc
@ -1,11 +1,13 @@
|
||||
package com.zhgd.xmgl.base.entity.vo;
|
||||
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.zhgd.xmgl.util.DateUtils;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@ -51,7 +53,7 @@ public class FlexibleBigScreenVo {
|
||||
public static FlexibleBigScreenVo fillTrendVos(FlexibleBigScreenVo rtVo, List<String> days, String format) {
|
||||
List<String> dimensions = rtVo.getDimensions();
|
||||
String timeKey = dimensions.get(0);
|
||||
Map<String, HashMap<String, Object>> voMap = rtVo.getSource().stream().collect(Collectors.toMap(o -> o.get(timeKey).toString(), Function.identity()));
|
||||
Map<String, HashMap<String, Object>> voMap = rtVo.getSource().stream().filter(o -> o.get(timeKey) != null).collect(Collectors.toMap(o -> o.get(timeKey).toString(), Function.identity()));
|
||||
List<HashMap<String, Object>> rtList = new ArrayList<>();
|
||||
for (String day : days) {
|
||||
HashMap<String, Object> vo = voMap.get(day);
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
</select>
|
||||
|
||||
<select id="countRtToolTrend" resultType="java.util.HashMap">
|
||||
select t1.day,t1.当日入库量,t2.当日出库量 from (
|
||||
select t1.day,ifnull(t1.当日入库量,0) as 当日入库量,ifnull(t2.当日出库量,0) as 当日出库量 from (
|
||||
select date_format(entry_time, '%Y-%m-%d') day, count(*) 当日入库量
|
||||
from rt_tool
|
||||
where project_sn = #{projectSn}
|
||||
@ -29,7 +29,7 @@
|
||||
</if>
|
||||
)t2 on t1.day=t2.day
|
||||
union
|
||||
select t1.day,t1.当日入库量,t2.当日出库量 from (
|
||||
select t1.day,ifnull(t1.当日入库量,0) as 当日入库量,ifnull(t2.当日出库量,0) as 当日出库量 from (
|
||||
select date_format(entry_time, '%Y-%m-%d') day, count(*) 当日入库量
|
||||
from rt_tool
|
||||
where project_sn = #{projectSn}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user