Commit 62e4bc37 authored by xixinzhao's avatar xixinzhao

解决查询预警记录报错

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