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