Commit 27b773ce authored by wujiang's avatar wujiang

修改固德威逆变器状态

parent 3306d465
......@@ -530,18 +530,21 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
requestInfo2.put("page_size", 1);
requestInfo2.put("sn", jpInverter.getSnCode());
String requstParam2 = JSON.toJSONString(requestInfo2);
List<GoodWeStationDetail> goodWeStationDetails = goodWeRequestUtil.getResPonse(GoodWeConstant.snStatusURL,
GoodWeConstant.requestPost, requstParam2, GoodWeConstant.resovleRule_data_list,
GoodWeStationDetail.class);
if (goodWeStationDetails != null&&!goodWeStationDetails.isEmpty()) {
List<GoodWeStationDetail> goodWeStationDetails = goodWeRequestUtil.getResPonse(
GoodWeConstant.snStatusURL, GoodWeConstant.requestPost, requstParam2,
GoodWeConstant.resovleRule_data_list, GoodWeStationDetail.class);
if (goodWeStationDetails != null && !goodWeStationDetails.isEmpty()) {
Integer s = goodWeStationDetails.get(0).getStatus();
//(“” or null:全部,-1:离线 0:待机 1:发电中 2:停机 -2:无设备)
// (“” or null:全部,-1:离线 0:待机 1:发电中 2:停机 -2:无设备)
if (s == 0 || s == 1) {
jpInverter.setState("在线");
} else if (s == null || s == -1 || s == 2 | s == -2) {
jpInverter.setState("离线");
} else {
jpInverter.setState("离线");
}
} else {
jpInverter.setState("离线");
}
if (!org.springframework.util.ObjectUtils.isEmpty(jpInverter.getSequenceNbr())) {
......
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