Commit 10c154f6 LN

bug修改

1 个父辈 00b067af
...@@ -6,6 +6,7 @@ import com.neotel.smfcore.core.equipment.bean.EquipStatusBean; ...@@ -6,6 +6,7 @@ import com.neotel.smfcore.core.equipment.bean.EquipStatusBean;
import com.neotel.smfcore.core.equipment.bean.EquipStatusDto; import com.neotel.smfcore.core.equipment.bean.EquipStatusDto;
import com.neotel.smfcore.core.equipment.service.po.Equipment; ; import com.neotel.smfcore.core.equipment.service.po.Equipment; ;
import com.neotel.smfcore.core.message.enums.MessageType; import com.neotel.smfcore.core.message.enums.MessageType;
import com.neotel.smfcore.core.message.service.po.Message;
import com.neotel.smfcore.core.system.util.EquipStatusUtil; import com.neotel.smfcore.core.system.util.EquipStatusUtil;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
...@@ -51,13 +52,21 @@ public class EquipViewController { ...@@ -51,13 +52,21 @@ public class EquipViewController {
dto.setOnLine(false); dto.setOnLine(false);
}else{ }else{
dto.setOnLine(true); dto.setOnLine(true);
if(bean.getMsgList()!=null){ dto.setStatus(bean.getStatus());
for (EquipMsg msg : bean.getMsgList()){ EquipMsg showMsg= bean.getMsgByType(MessageType.ERROR.name());
if(msg.getType().equals(MessageType.ERROR.name())){ if(showMsg==null){
dto.setMsg(msg.getShowMsg(locale)); showMsg=bean.getMsgByType(MessageType.WARNING.name());
}
} }
if(showMsg!=null){
dto.setMsg(showMsg.getShowMsg(locale));
} }
// if(bean.getMsgList()!=null){
// for (EquipMsg msg : bean.getMsgList()){
// if(msg.getType().equals(MessageType.ERROR.name())){
// dto.setMsg(msg.getShowMsg(locale));
// }
// }
// }
} }
} }
resultList.add(dto); resultList.add(dto);
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!