Commit 4622980a authored by tangwei's avatar tangwei

修改监盘统计接口参数

parent 6500f21e
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
#{item} #{item}
</foreach> </foreach>
and year = #{date} and year = #{date}
GROUP BY `hour` GROUP BY `year`
</select> </select>
......
...@@ -189,10 +189,11 @@ public class JpStationServiceImpl extends BaseService<JpStationDto,JpStation,JpS ...@@ -189,10 +189,11 @@ public class JpStationServiceImpl extends BaseService<JpStationDto,JpStation,JpS
} }
@Override @Override
@UserLimits
public Map<String, List<Object>> getGenerateqx(String date, String type, JpStationDto reviewDto) { public Map<String, List<Object>> getGenerateqx(String date, String type, JpStationDto reviewDto) {
List<String> statioId=new ArrayList(); List<String> statioId=new ArrayList();
List<JpStation> dataJpStation= this.getJpStation(reviewDto); List<JpStation> dataJpStation=jpStationMapper.getJpStation(reviewDto);
for (JpStation jpStation : dataJpStation) { for (JpStation jpStation : dataJpStation) {
statioId.add(jpStation.getThirdStationId()); statioId.add(jpStation.getThirdStationId());
} }
...@@ -201,6 +202,7 @@ public class JpStationServiceImpl extends BaseService<JpStationDto,JpStation,JpS ...@@ -201,6 +202,7 @@ public class JpStationServiceImpl extends BaseService<JpStationDto,JpStation,JpS
List<Object> listx =new ArrayList<>(); List<Object> listx =new ArrayList<>();
List<Object> listy =new ArrayList<>(); List<Object> listy =new ArrayList<>();
Map<String, List<Object>> map =new HashMap<>(); Map<String, List<Object>> map =new HashMap<>();
Map<String, List<Object>> map1 =new HashMap<>();
try { try {
if(type.equals("month")){ if(type.equals("month")){
...@@ -233,14 +235,14 @@ public class JpStationServiceImpl extends BaseService<JpStationDto,JpStation,JpS ...@@ -233,14 +235,14 @@ public class JpStationServiceImpl extends BaseService<JpStationDto,JpStation,JpS
listx= listx.stream().map(e-> String.valueOf(e).substring(String.valueOf(e).length()-2)).collect(Collectors.toList()); listx= listx.stream().map(e-> String.valueOf(e).substring(String.valueOf(e).length()-2)).collect(Collectors.toList());
} }
map.put("x",listx); map1.put("axisData",listx);
map.put("y",listy); map1.put("seriesData",listy);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
throw new BadRequest("系统异常!"); throw new BadRequest("系统异常!");
} }
return map; return map1;
} }
@Override @Override
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment