Commit 4d0f2994 authored by zhangyingbin's avatar zhangyingbin

增加错误提示

parent 7ea37e71
......@@ -31,7 +31,7 @@ public class TechInfoService {
String type = techInfo.getString("type");
String entityClasspath = EquipTypeEnum.classPathmap.get(type);
if(ValidationUtil.isEmpty(entityClasspath)){
failSupervisoryCode.add(techInfo.getString("type")+":"+techInfo.getString("supervisoryCode"));
failSupervisoryCode.add("type类型错误{"+"type:"+type+",supervisoryCode:"+techInfo.getString("supervisoryCode")+"}");
}
String serviceClasspath = EquipTypeEnum.servicePathmap.get(type);
try {
......@@ -44,12 +44,12 @@ public class TechInfoService {
service.save(entity);
} catch (Exception e) {
e.printStackTrace();
failSupervisoryCode.add(techInfo.getString("type")+":"+techInfo.getString("supervisoryCode"));
failSupervisoryCode.add("数据错误{"+"type:"+type+",supervisoryCode:"+techInfo.getString("supervisoryCode")+"}");
}
}
String result = "ok";
if(!ValidationUtil.isEmpty(failSupervisoryCode)){
result = "supervisoryCode为"+JSON.toJSONString(failSupervisoryCode)+"的参数添加失败,请检查参数。";
result = "数据添加失败:"+JSON.toJSONString(failSupervisoryCode);
}
return result;
}
......
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