Commit b2999ff6 authored by tangwei's avatar tangwei

修改bug

parent 53b35b13
......@@ -778,7 +778,23 @@ public class TopographyController extends AbstractBaseController {
}
}
List<IotDataVO> timeList = iotDatalist.stream().filter(x -> "time".equals(x.getKey())).collect(Collectors.toList());
List<EquipmentSpecificIndex> indexes = equipmentSpecificIndexMapper.getEquipmentSpeIndexByIotCode(iotCode);
List<EquipmentSpecificIndex> indexes = equipmentSpecificIndexMapper.getEquipmentSpeIndexByIotCode(iotCode);
List<IotDataVO> timeList1 =new ArrayList<>();
for (IotDataVO iotDataVO : iotDatalist) {
boolean flag= false;
for (EquipmentSpecificIndex x : indexes) {
if (x.getNameKey().equals(iotDataVO.getKey())) {
timeList1.add(iotDataVO);
}
}
}
if (0 < indexes.size()) {
int j = 0;
......@@ -789,19 +805,13 @@ public class TopographyController extends AbstractBaseController {
TopographyIotVo iotVo = new TopographyIotVo();
List<TopographyIotDataVO> lists = new ArrayList<>();
TopographyIotDataVO dataVO = new TopographyIotDataVO();
// if (i == 0) {
// map.put(iotDatalist.get(i).getKey(), iotDatalist.get(i).getValue());
// }
// if (map.containsKey(iotDatalist.get(i).getKey())) {
// j++;
// }
for (IotDataVO iotDataVO : iotDatalist) {
for (EquipmentSpecificIndex x : indexes) {
if (x.getNameKey().equals(iotDataVO.getKey())) {
if (x.getNameKey().equals(timeList1.get(i).getKey())) {
dataVO.setId(x.getId());
dataVO.setName(x.getIndexName());
dataVO.setValue(iotDataVO.getValue());
dataVO.setValue(timeList1.get(i).getValue());
dataVO.setUnit(x.getIndexUnitName());
try {
//Date date = DateUtils.dateParse(String.valueOf(timeList.get(j-1).getValue()), DateUtils.DATE_TIME_T_PATTERN);
......@@ -820,7 +830,6 @@ public class TopographyController extends AbstractBaseController {
}
}
}
lists.add(dataVO);
iotVo.setList(lists);
list.add(iotVo);
......
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