Commit 823f85eb authored by hezhuozhi's avatar hezhuozhi

27559 大屏统计,总览-起重机械设备统计数字,查询陕西汉中的桥式起重机,查看监管码F4100-0000704/F4100-0000705两个设备详情,报网络错误

parent a8a9e9d5
...@@ -648,18 +648,20 @@ public class DPSubServiceImpl { ...@@ -648,18 +648,20 @@ public class DPSubServiceImpl {
if (!ValidationUtil.isEmpty(value) && !"null".equals(value)) { if (!ValidationUtil.isEmpty(value) && !"null".equals(value)) {
JSONObject attachmentUploadDatasObj = new JSONObject(); JSONObject attachmentUploadDatasObj = new JSONObject();
log.info("附件数据:{}", value); log.info("附件数据:{}", value);
((JSONArray)value).stream().forEach(y -> { if(value instanceof JSONArray){
JSONObject yObj = (JSONObject) y; ((JSONArray)value).stream().forEach(y -> {
if(!ValidationUtil.isEmpty(yObj.getString("url"))) { JSONObject yObj = (JSONObject) y;
String[] str = yObj.getString("url").split("\\."); if(!ValidationUtil.isEmpty(yObj.getString("url"))) {
if (ValidationUtil.isEmpty(str)) { String[] str = yObj.getString("url").split("\\.");
yObj.put("thumb", yObj.getString("url")); if (ValidationUtil.isEmpty(str)) {
} else { yObj.put("thumb", yObj.getString("url"));
MatinfoEnum iconUrl = MatinfoEnum.getIconUrl(str[1]); } else {
yObj.put("thumb", ValidationUtil.isEmpty(iconUrl) ? yObj.getString("url") : iconUrl.getIcon()); MatinfoEnum iconUrl = MatinfoEnum.getIconUrl(str[1]);
yObj.put("thumb", ValidationUtil.isEmpty(iconUrl) ? yObj.getString("url") : iconUrl.getIcon());
}
} }
} });
}); }
attachmentUploadDatasObj.put("value", value); attachmentUploadDatasObj.put("value", value);
String accept = visualParams.getString("accept"); String accept = visualParams.getString("accept");
String label = visualParams.getString("label"); String label = visualParams.getString("label");
......
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