Commit 80dffa17 authored by chenzhao's avatar chenzhao

Merge remote-tracking branch 'origin/developer' into developer

parents 815531de 4686d111
...@@ -128,6 +128,7 @@ public class SofarRequestUtil { ...@@ -128,6 +128,7 @@ public class SofarRequestUtil {
} while (true); } while (true);
} catch (Exception exception) { } catch (Exception exception) {
exception.printStackTrace(); exception.printStackTrace();
return result;
} }
return result; return result;
} }
...@@ -157,6 +158,7 @@ public class SofarRequestUtil { ...@@ -157,6 +158,7 @@ public class SofarRequestUtil {
} }
} catch (Exception exception) { } catch (Exception exception) {
exception.printStackTrace(); exception.printStackTrace();
return result;
} }
return result; return result;
} }
......
...@@ -260,9 +260,8 @@ public class SunlightUtil { ...@@ -260,9 +260,8 @@ public class SunlightUtil {
} }
} while (true); } while (true);
} catch (Exception e) { } catch (Exception e) {
log.error("失败,msg={}", e.getMessage()); log.error("失败,msg["+e.getMessage()+"]", e);
e.printStackTrace(); return resultData;
throw new RuntimeException(e.getMessage());
} }
return resultData; return resultData;
...@@ -299,9 +298,8 @@ public class SunlightUtil { ...@@ -299,9 +298,8 @@ public class SunlightUtil {
return resultData; return resultData;
} catch (Exception e) { } catch (Exception e) {
log.error("失败,msg={}", e.getMessage()); log.error("失败,msg["+e.getMessage()+"]", e);
e.printStackTrace(); return new JSONObject();
throw new RuntimeException(e.getMessage());
} }
......
...@@ -465,7 +465,7 @@ public class SunlightServiceImpl implements SunlightService { ...@@ -465,7 +465,7 @@ public class SunlightServiceImpl implements SunlightService {
} }
if (listd != null) { if (listd != null) {
this.collectorDetail(listd, jpStation); this.collectorDetail(listdtx, jpStation);
} }
// 电站报表 // 电站报表
...@@ -625,6 +625,8 @@ public class SunlightServiceImpl implements SunlightService { ...@@ -625,6 +625,8 @@ public class SunlightServiceImpl implements SunlightService {
jpInverter.setModel(device.getDevice_model_code()); jpInverter.setModel(device.getDevice_model_code());
jpInverter.setCapacity(jpStation.getCapacity()); jpInverter.setCapacity(jpStation.getCapacity());
jpInverter.setCurrentPower(jpStation.getRealTimePower()); jpInverter.setCurrentPower(jpStation.getRealTimePower());
jpInverter.setRatedPower(jpStation.getRatedPower());
jpInverter.setFisTimeStr(device.getGrid_connection_date());
if (devicestx != null) { if (devicestx != null) {
...@@ -999,7 +1001,7 @@ public class SunlightServiceImpl implements SunlightService { ...@@ -999,7 +1001,7 @@ public class SunlightServiceImpl implements SunlightService {
// 出场日期 // 出场日期
// jpCollector.setDischargeDate(new Date(collectorDetailDto.getFactoryTime())); // jpCollector.setDischargeDate(new Date(collectorDetailDto.getFactoryTime()));
// //生产日期 // //生产日期
// jpCollector.setProductDate(new Date(collectorDetailDto.getFactoryTime())); // jpCollector.setProductDate(new Date(collectorDetailDto.getFactordyTime()));
// //数据上传间隔 // //数据上传间隔
// jpCollector.setDataPeriod(collectorDetailDto.getDataUploadCycle()); // jpCollector.setDataPeriod(collectorDetailDto.getDataUploadCycle());
// //本次上电时间 // //本次上电时间
...@@ -1057,7 +1059,7 @@ public class SunlightServiceImpl implements SunlightService { ...@@ -1057,7 +1059,7 @@ public class SunlightServiceImpl implements SunlightService {
Map<String, HYGFJPInverterWarn> bodyparam = new HashMap<>(); Map<String, HYGFJPInverterWarn> bodyparam = new HashMap<>();
if (hygfjpInverterWarnlist != null && hygfjpInverterWarnlist.size() > 0) { if (hygfjpInverterWarnlist != null && hygfjpInverterWarnlist.size() > 0) {
bodyparam = hygfjpInverterWarnlist.stream() bodyparam = hygfjpInverterWarnlist.stream()
.collect(Collectors.toMap(HYGFJPInverterWarn::getWarnId, Function.identity())); .collect(Collectors.toMap(HYGFJPInverterWarn::getWarnId, Function.identity(),(value1, value2) -> value1));
} }
// 获取所有逆变器 // 获取所有逆变器
List<JpInverter> jpInverter = jpInverterMapper List<JpInverter> jpInverter = jpInverterMapper
...@@ -1065,7 +1067,7 @@ public class SunlightServiceImpl implements SunlightService { ...@@ -1065,7 +1067,7 @@ public class SunlightServiceImpl implements SunlightService {
Map<String, String> jpInverterbodyparam = new HashMap<>(); Map<String, String> jpInverterbodyparam = new HashMap<>();
if (jpInverter != null && jpInverter.size() > 0) { if (jpInverter != null && jpInverter.size() > 0) {
jpInverterbodyparam = jpInverter.stream() jpInverterbodyparam = jpInverter.stream()
.collect(Collectors.toMap(JpInverter::getId, JpInverter::getSnCode)); .collect(Collectors.toMap(JpInverter::getId, JpInverter::getSnCode,(value1, value2) -> value1));
} }
if (listd != null && !listd.isEmpty()) { if (listd != null && !listd.isEmpty()) {
for (SunlightWarm sunlightWarm : listd) { for (SunlightWarm sunlightWarm : listd) {
......
...@@ -762,9 +762,33 @@ public class TDBigScreenAnalyseController extends BaseController implements Appl ...@@ -762,9 +762,33 @@ public class TDBigScreenAnalyseController extends BaseController implements Appl
jgMapResult.put("data", jgList); jgMapResult.put("data", jgList);
jgMapResult.put("name", "警告"); jgMapResult.put("name", "警告");
List<Map<String, Object>> hashMaps = Arrays.asList(wxMapResult, zyMapResult, jgMapResult); //为了页面显示 此处只取前30条
resultMap.put("axisData", list); if(list.size() > 30){
resultMap.put("seriesData", hashMaps); List<String> newAxisData = list.subList(0, 29);
Collections.reverse(newAxisData);
List<Integer> newWxList = wxList.subList(0, 29);
Collections.reverse(newWxList);
List<Integer> newZyList = zyList.subList(0, 29);
Collections.reverse(newZyList);
List<Integer> newJgList = jgList.subList(0, 29);
Collections.reverse(newJgList);
HashMap<String, Object> newWxMapResult = new HashMap<>();
newWxMapResult.put("data", newWxList);
newWxMapResult.put("name", "危险");
HashMap<String, Object> newZyMapResult = new HashMap<>();
newZyMapResult.put("data", newZyList);
newZyMapResult.put("name", "注意");
HashMap<String, Object> newJgMapResult = new HashMap<>();
newJgMapResult.put("data", newJgList);
newJgMapResult.put("name", "警告");
List<Map<String, Object>> hashMaps = Arrays.asList(newWxMapResult, newZyMapResult, newJgMapResult);
resultMap.put("axisData", newAxisData);
resultMap.put("seriesData", hashMaps);
}else {
List<Map<String, Object>> hashMaps = Arrays.asList(wxMapResult, zyMapResult, jgMapResult);
resultMap.put("axisData", list);
resultMap.put("seriesData", hashMaps);
}
return ResponseHelper.buildResponse(resultMap); return ResponseHelper.buildResponse(resultMap);
} }
......
...@@ -567,7 +567,7 @@ ...@@ -567,7 +567,7 @@
and b.arae like #{araeCode} and b.arae like #{araeCode}
</if> </if>
</where> </where>
order by b.`sort` ASC order by b.`sort` DESC
</select> </select>
<select id="getAllEquipAlarmInfoByStation" resultType="map"> <select id="getAllEquipAlarmInfoByStation" resultType="map">
......
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