Commit f692d327 LN

1. 上传的WARNING消息在消息记录中都是ERROR

2. panacim验证失败中文问题
3. 看板消息优先显示ERROR,无ERROR时显示WARNING.
1 个父辈 99695d1b
......@@ -703,15 +703,23 @@ public class StatusBean {
return returnMsg;
}
public String getErrorMsg(Locale locale) {
public String getErrorMsg(Locale locale){
String msg=getMsgByType(locale,MessageType.ERROR.name() );
if(ObjectUtil.isEmpty(msg)){
msg=getMsgByType(locale,MessageType.WARNING.name());
}
return msg;
}
public String getMsgByType(Locale locale,String msgType) {
if (ObjectUtil.isEmpty(this.msgList)) {
return "";
}
for (MsgInfo msg :
msgList) {
if (msg.getType().toUpperCase().equals(MessageType.ERROR.name())) {
return msg.getMsg();
if (msg.getType().toUpperCase().equals(msgType)) {
return GetMsgStr(msg,locale);
}
}
return "";
......
......@@ -195,7 +195,11 @@ public class DevicesStatusUtil {
}
}
if (newMsg) {
DeviceMessageUtil.addDeviceMessage(cid, MessageType.ERROR.name(), msg.getMoudle(), msg.getMsgKey(), msg.getMsg(), msg.getMsgParam(),msg.getAlarmType(),msg.getAlarmCode());
String msgType= msg.getType();
if(ObjectUtil.isEmpty(msgType)){
msgType=MessageType.ERROR.name();
}
DeviceMessageUtil.addDeviceMessage(cid, msgType, msg.getMoudle(), msg.getMsgKey(), msg.getMsg(), msg.getMsgParam(),msg.getAlarmType(),msg.getAlarmCode());
}
}
......
......@@ -466,7 +466,8 @@ public class PanaApiController extends BaseSmfApiListener {
return barcode;
}else{
String errorMsg = "PanaCIM [" + barcode.getBarcode() + "] NG:"+ ErrorCode;
throw new ValidateException(errorMsg, "PanaCIM验证失败");
log.error(errorMsg);
throw new ValidateException(errorMsg, errorMsg);
}
}
......@@ -551,7 +552,12 @@ public class PanaApiController extends BaseSmfApiListener {
}
}
}
throw new ValidateException(errorMsg, "PanaCIM验证失败");
if(ObjectUtil.isEmpty(errorMsg)){
//
errorMsg="PanaCIM verification failure";
log.error(errorMsg);
}
throw new ValidateException(errorMsg, errorMsg);
}else{
log.info("没有配置PanaCIM条码检测接口,查找setConfiguration注册的IP 及端口");
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!