Commit cd603e50 authored by caotao's avatar caotao

状态显示错误问题处理

parent 470e4383
...@@ -73,7 +73,7 @@ public class MaintenanceResultHandlerMessage extends EmqxListener { ...@@ -73,7 +73,7 @@ public class MaintenanceResultHandlerMessage extends EmqxListener {
HYGFMaintenanceTickets hygfMaintenanceTickets = new HYGFMaintenanceTickets(); HYGFMaintenanceTickets hygfMaintenanceTickets = new HYGFMaintenanceTickets();
String stationid = specialMap.get("stationId") == null ? null : specialMap.get("stationId").toString(); String stationid = specialMap.get("stationId") == null ? null : specialMap.get("stationId").toString();
Long warningId = specialMap.containsKey("warningId") ? Long.valueOf(specialMap.get("warningId").toString()) : 0L; Long warningId = specialMap.containsKey("warningId") ? Long.valueOf(specialMap.get("warningId").toString()) : 0L;
String sncode = specialMap.get("inverterSncode").toString(); String sncode = specialMap.containsKey("inverterSncode")?specialMap.get("inverterSncode").toString():"";
String mantainancePersonId = specialMap.get("maintenancePersonId").toString(); String mantainancePersonId = specialMap.get("maintenancePersonId").toString();
JpStation jpStation = jpStationMapper.selectOne(new QueryWrapper<JpStation>().eq("third_station_id", stationid)); JpStation jpStation = jpStationMapper.selectOne(new QueryWrapper<JpStation>().eq("third_station_id", stationid));
if (ObjectUtil.isEmpty(jpStation)) { if (ObjectUtil.isEmpty(jpStation)) {
...@@ -113,8 +113,13 @@ public class MaintenanceResultHandlerMessage extends EmqxListener { ...@@ -113,8 +113,13 @@ public class MaintenanceResultHandlerMessage extends EmqxListener {
} }
} }
hygfMaintenanceTickets.setInverterSn(sncode); hygfMaintenanceTickets.setInverterSn(sncode);
hygfMaintenanceTickets.setWarningLevel(specialMap.get("warningLevel").toString()); if(specialMap.containsKey("warningLevel")){
hygfMaintenanceTickets.setWarningContent(specialMap.get("warningContent").toString()); hygfMaintenanceTickets.setWarningLevel(specialMap.get("warningLevel").toString());
}
if(specialMap.containsKey("warningContent")){
hygfMaintenanceTickets.setWarningContent(specialMap.get("warningContent").toString());
}
if(ObjectUtil.isNotNull(specialMap.get("taskStartTime"))){ if(ObjectUtil.isNotNull(specialMap.get("taskStartTime"))){
hygfMaintenanceTickets.setTaskStartTime(new Date( Long.valueOf(specialMap.get("taskStartTime").toString()))); hygfMaintenanceTickets.setTaskStartTime(new Date( Long.valueOf(specialMap.get("taskStartTime").toString())));
} }
......
...@@ -16,6 +16,7 @@ import com.yeejoin.amos.boot.module.hygf.api.mapper.HYGFMaintenanceTicketsMapper ...@@ -16,6 +16,7 @@ import com.yeejoin.amos.boot.module.hygf.api.mapper.HYGFMaintenanceTicketsMapper
import com.yeejoin.amos.boot.module.hygf.api.service.ITdHygfJpInverterWarnService; import com.yeejoin.amos.boot.module.hygf.api.service.ITdHygfJpInverterWarnService;
import com.yeejoin.amos.boot.module.hygf.api.tdenginemapper.TdHygfJpInverterWarnMapper; import com.yeejoin.amos.boot.module.hygf.api.tdenginemapper.TdHygfJpInverterWarnMapper;
import com.yeejoin.amos.boot.module.hygf.api.util.TimeUtil; import com.yeejoin.amos.boot.module.hygf.api.util.TimeUtil;
import jdk.nashorn.internal.ir.annotations.Ignore;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.rdbms.service.BaseService; import org.typroject.tyboot.core.rdbms.service.BaseService;
...@@ -134,7 +135,7 @@ public class TdHygfJpInverterWarnServiceImpl ...@@ -134,7 +135,7 @@ public class TdHygfJpInverterWarnServiceImpl
} }
if(hygfMaintenanceTickets.size()>0){ if(hygfMaintenanceTickets.size()>0){
HYGFMaintenanceTickets hygfMaintenanceTickets1 =hygfMaintenanceTickets.get(0); HYGFMaintenanceTickets hygfMaintenanceTickets1 =hygfMaintenanceTickets.get(0);
BeanUtil.copyProperties(hygfMaintenanceTickets1,tdHygfJpInverterWarnDto); BeanUtil.copyProperties(hygfMaintenanceTickets1,tdHygfJpInverterWarnDto, "handlerStatus");
} }
return tdHygfJpInverterWarnDto; return tdHygfJpInverterWarnDto;
} }
......
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