Commit 6846fcff authored by 麻笑宇's avatar 麻笑宇

中屏-设备总览-设备详情-详细信息,涉及到日期字段,时间格式调整为年-月-日,去掉时分秒显示

parent 16be5c57
......@@ -641,7 +641,8 @@ public class DPSubServiceImpl {
}
} else if ("dateTime".equals(xObj.getString("componentKey"))) {
if (!ValidationUtil.isEmpty(value)) {
SimpleDateFormat sdf = new SimpleDateFormat(visualParams.getString("format"));
String f = visualParams.getString("format").replace("Y","y").replace("D","d");
SimpleDateFormat sdf = new SimpleDateFormat(f);
Date date = null;
try {
date = sdf.parse(ValidationUtil.validateString(value));
......@@ -649,6 +650,7 @@ public class DPSubServiceImpl {
throw new RuntimeException(e);
}
jsonObject.put("value",sdf.format(date));
}
} else if ("checkbox".equals(xObj.getString("componentKey"))) {
ResponseModel checkboxResult = this.getApiResult(visualParams.getJSONObject("api"), null);
......
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