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