Commit 62e4bc37 authored by xixinzhao's avatar xixinzhao

解决查询预警记录报错

parent 515f43ee
...@@ -20,6 +20,7 @@ import io.swagger.annotations.ApiOperation; ...@@ -20,6 +20,7 @@ import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.checkerframework.checker.units.qual.A; import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
...@@ -117,6 +118,8 @@ public class EquipInformationCardController { ...@@ -117,6 +118,8 @@ public class EquipInformationCardController {
}); });
String cs = ""; String cs = "";
JSONArray list = record.getJSONArray("rectificationProposal"); JSONArray list = record.getJSONArray("rectificationProposal");
//TODO 赋码记录业务迁移到了idx,先解决报错,后续移到idx服务
if (!CollectionUtils.isEmpty(list)) {
for (int i = 0; i < list.size(); i++) { for (int i = 0; i < list.size(); i++) {
if (i != (list.size() - 1)){ if (i != (list.size() - 1)){
cs += list.getJSONObject(i).getString("measuresDesc")+","; cs += list.getJSONObject(i).getString("measuresDesc")+",";
...@@ -124,8 +127,8 @@ public class EquipInformationCardController { ...@@ -124,8 +127,8 @@ public class EquipInformationCardController {
cs += list.getJSONObject(i).getString("measuresDesc"); cs += list.getJSONObject(i).getString("measuresDesc");
} }
} }
}
record.put("measure",cs); record.put("measure",cs);
}); });
HashMap<String, Object> map = new HashMap<>(); HashMap<String, Object> map = new HashMap<>();
......
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