|
@@ -114,24 +114,26 @@ public class AccuracyPassRateServiceImpl extends ServiceImpl<AccuracyPassRateMap
|
|
|
@Override
|
|
|
public List<Map<String,String>> finfBySingleMonthBetweenAndForecastTypeAndStationCode(Long startTime, Long endTime, ForecastTypeEnum forecastType, DataSourcesEnum dataSources, String stationCode,String stationName,String uploadDataSources) {
|
|
|
List<Map<String,String>> list = new ArrayList<>();
|
|
|
- QueryWrapper<AccuracyPassRate> wrapper = new QueryWrapper<>();
|
|
|
- QueryWrapper<AccuracyPassRate> wrapper2 = new QueryWrapper<>();
|
|
|
+
|
|
|
List<long[]> longs = StartAndEndMonthUtil.singleMonth(startTime, endTime);
|
|
|
Collections.reverse(longs);
|
|
|
- if (stationCode != null && !stationCode.equals("")) {
|
|
|
- wrapper.eq("station_code", stationCode);
|
|
|
- wrapper2.eq("station_code", stationCode);
|
|
|
- }
|
|
|
|
|
|
- if (forecastType != null && !forecastType.equals("")) {
|
|
|
- wrapper.eq("forecast_type", forecastType);
|
|
|
- wrapper2.eq("forecast_type", forecastType);
|
|
|
- }
|
|
|
- if (dataSources != null && !dataSources.equals("")) {
|
|
|
- wrapper.eq("data_sources", dataSources);
|
|
|
- wrapper2.eq("data_sources", uploadDataSources);
|
|
|
- }
|
|
|
for (long[] aLong : longs) {
|
|
|
+ QueryWrapper<AccuracyPassRate> wrapper = new QueryWrapper<>();
|
|
|
+ QueryWrapper<AccuracyPassRate> wrapper2 = new QueryWrapper<>();
|
|
|
+ if (stationCode != null && !stationCode.equals("")) {
|
|
|
+ wrapper.eq("station_code", stationCode);
|
|
|
+ wrapper2.eq("station_code", stationCode);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (forecastType != null && !forecastType.equals("")) {
|
|
|
+ wrapper.eq("forecast_type", forecastType);
|
|
|
+ wrapper2.eq("forecast_type", forecastType);
|
|
|
+ }
|
|
|
+ if (dataSources != null && !dataSources.equals("")) {
|
|
|
+ wrapper.eq("data_sources", dataSources);
|
|
|
+ wrapper2.eq("data_sources", uploadDataSources);
|
|
|
+ }
|
|
|
int count = 0;
|
|
|
if (startTime != null && endTime != null) {
|
|
|
wrapper.between("time", new Date(aLong[0]), new Date(aLong[1]));
|
|
@@ -140,6 +142,8 @@ public class AccuracyPassRateServiceImpl extends ServiceImpl<AccuracyPassRateMap
|
|
|
wrapper2.orderByDesc("time");
|
|
|
}
|
|
|
List<AccuracyPassRate> accuracyPassRateList = baseMapper.selectList(wrapper);
|
|
|
+ System.out.println("---------------");
|
|
|
+ System.out.println(accuracyPassRateList);
|
|
|
List<AccuracyPassRate> accuracyPassRateList2 = baseMapper.selectList(wrapper2);
|
|
|
|
|
|
accuracyPassRateList = accuracyPassRateList.stream().filter(f -> !"无可用数据计算".equals(f.getAccuracy()) && !"无计算公式".equals(f.getAccuracy())).collect(Collectors.toList());
|