Commit 62a5eb61 authored by 刘凡's avatar 刘凡

*)修改报错

parent 3db4d641
......@@ -8,6 +8,7 @@ import io.swagger.annotations.ApiOperation;
import org.springframework.util.Assert;
import org.springframework.web.bind.annotation.*;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
......@@ -44,7 +45,12 @@ public class DPSubController {
Assert.notNull(param.get("record"), "设备ID不能为空");
Assert.notNull(param.get("equList"), "设备种类不能为空");
template = template + "_" + param.get("equList");
} else if (template.equals("emergency") || template.equals("problem") || template.equals("registration")) {
} else if (template.equals("emergency") || template.equals("registration")) {
Assert.notNull(param.get("sequenceNbr"), "sequenceNbr不能为空");
} else if(template.equals("problem")) {
if (ValidationUtil.isEmpty(param.get("sequenceNbr"))){
param.put("sequenceNbr", param.get("alertId"));
}
Assert.notNull(param.get("sequenceNbr"), "sequenceNbr不能为空");
} else {
throw new RuntimeException("暂无模板");
......
......@@ -133,7 +133,7 @@ public class DPSubServiceImpl {
log.info("{}tab页获取详情接口,共耗时:{} 毫秒", tab.get("displayName"), (e - s));
}
if ((!tab.getString("template").contains("equip") || !tab.getString("template").contains("company")) && tab.getString("key").equals("keyinfo")){
if (!tab.getString("template").contains("equip") && !tab.getString("template").contains("company") && tab.getString("key").equals("keyinfo")){
content.put(tab.getString("key"), JSONObject.parseObject(apiResult.toString()));
return;
}
......
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