Commit f08f6ac4 authored by tangwei's avatar tangwei

修改sn——code

parent 1e423742
...@@ -1035,8 +1035,8 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -1035,8 +1035,8 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
} }
// List<JpInverter> jpInverter1 = jpInverterMapper.selectList(new QueryWrapper<JpInverter>(). List<JpInverter> jpInverter1 = jpInverterMapper.selectList(new QueryWrapper<JpInverter>().
// eq("third_code", PVProducerInfoEnum.KSOLAR.getCode())); eq("third_code", PVProducerInfoEnum.KSOLAR.getCode()));
...@@ -1059,8 +1059,19 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -1059,8 +1059,19 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
SimpleDateFormat sdf = new SimpleDateFormat(pattern); SimpleDateFormat sdf = new SimpleDateFormat(pattern);
Date startTimeL = sdf.parse(startTime); Date startTimeL = sdf.parse(startTime);
Date recoverTimeL = sdf.parse(recoverTime); Date recoverTimeL = sdf.parse(recoverTime);
String snCode=null;
if(jpInverter1!=null&&!jpInverter1.isEmpty()){
for (JpInverter jpInverter : jpInverter1) {
if(jpInverter.getCollectorId().equals(ksolarAlarmDto.getDeviceId())){
snCode=jpInverter.getCollectorSnCode();
break;
}
}
}
HYGFJPInverterWarn hygfjpInverterWarn = hygfjpInverterWarnMapper.selectOne(new QueryWrapper<HYGFJPInverterWarn>() HYGFJPInverterWarn hygfjpInverterWarn = hygfjpInverterWarnMapper.selectOne(new QueryWrapper<HYGFJPInverterWarn>()
.eq("sn_code", ksolarAlarmDto.getAlarmId()) .eq("sn_code",snCode)
.eq("start_time", startTimeL.getTime()) .eq("start_time", startTimeL.getTime())
.eq("third_code", PVProducerInfoEnum.KSOLAR.getCode()) .eq("third_code", PVProducerInfoEnum.KSOLAR.getCode())
.eq("third_station_id", ksolarAlarmDto.getStationId()) .eq("third_station_id", ksolarAlarmDto.getStationId())
...@@ -1071,15 +1082,7 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe ...@@ -1071,15 +1082,7 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
hygfjpInverterWarn.setTime(System.currentTimeMillis()); hygfjpInverterWarn.setTime(System.currentTimeMillis());
hygfjpInverterWarn.setTimeLong(System.currentTimeMillis()); hygfjpInverterWarn.setTimeLong(System.currentTimeMillis());
hygfjpInverterWarn.setSnCode(snCode);
// if(jpInverter1!=null&&!jpInverter1.isEmpty()){
// for (JpInverter jpInverter : jpInverter1) {
// if(jpInverter.getCollectorId().equals(ksolarAlarmDto.getDeviceId())){
// hygfjpInverterWarn.setSnCode(jpInverter.getCollectorSnCode());
// break;
// }
// }
// }
hygfjpInverterWarn.setThirdStationId(ksolarAlarmDto.getStationId()); hygfjpInverterWarn.setThirdStationId(ksolarAlarmDto.getStationId());
hygfjpInverterWarn.setLevel(KSolarConstant.alarmLevel.get(ksolarAlarmDto.getLevels())); hygfjpInverterWarn.setLevel(KSolarConstant.alarmLevel.get(ksolarAlarmDto.getLevels()));
hygfjpInverterWarn.setContent(ksolarAlarmDto.getMessage()); hygfjpInverterWarn.setContent(ksolarAlarmDto.getMessage());
......
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