Commit c676c83e authored by tangwei's avatar tangwei

解决冲突

parents 59a81b64 4e16d157
...@@ -32,7 +32,14 @@ ...@@ -32,7 +32,14 @@
i.alert_type_code groupCode, i.alert_type_code groupCode,
i.rec_date recDate, i.rec_date recDate,
<foreach collection="fieldCodes" item="item" index="key" separator=","> <foreach collection="fieldCodes" item="item" index="key" separator=",">
MAX(CASE WHEN i.FIELD_CODE = #{item} THEN i.FIELD_VALUE ELSE '' END) as ${item} <choose>
<when test="item == 'flightNumber'">
MAX(CASE WHEN i.FIELD_CODE = #{item} THEN i.FIELD_VALUE_CODE ELSE '' END) as ${item}
</when>
<otherwise>
MAX(CASE WHEN i.FIELD_CODE = #{item} THEN i.FIELD_VALUE ELSE '' END) as ${item}
</otherwise>
</choose>
</foreach> </foreach>
from from
jc_alert_form_value i jc_alert_form_value i
......
...@@ -788,39 +788,42 @@ public class TopographyController extends AbstractBaseController { ...@@ -788,39 +788,42 @@ public class TopographyController extends AbstractBaseController {
for (int i = 0; i < timeList.size(); i++) { for (int i = 0; i < timeList.size(); i++) {
TopographyIotVo iotVo = new TopographyIotVo(); TopographyIotVo iotVo = new TopographyIotVo();
List<TopographyIotDataVO> lists = new ArrayList<>(); List<TopographyIotDataVO> lists = new ArrayList<>();
TopographyIotDataVO dataVO = new TopographyIotDataVO();
// if (i == 0) { // if (i == 0) {
// map.put(iotDatalist.get(i).getKey(), iotDatalist.get(i).getValue()); // map.put(iotDatalist.get(i).getKey(), iotDatalist.get(i).getValue());
// } // }
// if (map.containsKey(iotDatalist.get(i).getKey())) { // if (map.containsKey(iotDatalist.get(i).getKey())) {
// j++; // j++;
// } // }
for (EquipmentSpecificIndex x : indexes) { for (IotDataVO iotDataVO : iotDatalist) {
if (x.getNameKey().equals(iotDatalist.get(i).getKey())) { for (EquipmentSpecificIndex x : indexes) {
TopographyIotDataVO dataVO = new TopographyIotDataVO(); if (x.getNameKey().equals(iotDataVO.getKey())) {
dataVO.setId(x.getId()); dataVO.setId(x.getId());
dataVO.setName(x.getIndexName()); dataVO.setName(x.getIndexName());
dataVO.setValue(x.getValue()); dataVO.setValue(x.getValue());
dataVO.setUnit(x.getIndexUnitName()); dataVO.setUnit(x.getIndexUnitName());
lists.add(dataVO); try {
iotVo.setList(lists); //Date date = DateUtils.dateParse(String.valueOf(timeList.get(j-1).getValue()), DateUtils.DATE_TIME_T_PATTERN);
try { String value = String.valueOf(timeList.get(i).getValue());
//Date date = DateUtils.dateParse(String.valueOf(timeList.get(j-1).getValue()), DateUtils.DATE_TIME_T_PATTERN); String strDate = value.substring(0, 19);
SimpleDateFormat sdf = new SimpleDateFormat(ISO8601_DATE_HOUR_MIN_SEC);
String value = String.valueOf(timeList.get(i).getValue()); SimpleDateFormat sdf1 = new SimpleDateFormat(DateUtils.DATE_TIME_PATTERN);
String strDate = value.substring(0, 19); sdf.setTimeZone(TimeZone.getTimeZone("UTC"));
SimpleDateFormat sdf = new SimpleDateFormat(ISO8601_DATE_HOUR_MIN_SEC); Date date1 = sdf.parse(strDate);
SimpleDateFormat sdf1 = new SimpleDateFormat(DateUtils.DATE_TIME_PATTERN); String time = DateTimeUtil.format(date1, DateTimeUtil.ISO_DATE_HOUR24_MIN_SEC);
sdf.setTimeZone(TimeZone.getTimeZone("UTC"));
Date date1 = sdf.parse(strDate); iotVo.setTime(sdf1.parse(time));
String time = DateTimeUtil.format(date1, DateTimeUtil.ISO_DATE_HOUR24_MIN_SEC); } catch (Exception e) {
e.printStackTrace();
iotVo.setTime(sdf1.parse(time)); }
} catch (Exception e) {
e.printStackTrace();
} }
list.add(iotVo);
} }
} }
lists.add(dataVO);
iotVo.setList(lists);
list.add(iotVo);
} }
} }
List<TopographyIotVo> result = list.stream().sorted(Comparator.comparing(TopographyIotVo::getTime).reversed()).collect(Collectors.toList()); List<TopographyIotVo> result = list.stream().sorted(Comparator.comparing(TopographyIotVo::getTime).reversed()).collect(Collectors.toList());
......
...@@ -751,7 +751,13 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal ...@@ -751,7 +751,13 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
// 增加非空判断 cz 2021-10-08 // 增加非空判断 cz 2021-10-08
if (calledMap.get(Long.parseLong(i.get("instanceId").toString())) != null) { if (calledMap.get(Long.parseLong(i.get("instanceId").toString())) != null) {
AlertCalled alertCalled = calledMap.get(Long.parseLong(i.get("instanceId").toString())); AlertCalled alertCalled = calledMap.get(Long.parseLong(i.get("instanceId").toString()));
i.putAll(Bean.BeantoMap(alertCalled)); Map<String, Object> map = Bean.BeantoMap(alertCalled);
map.remove("forcedLandingTrack");
map.remove("flightNumber");
map.remove("landingTime");
map.remove("taskTime");
map.remove("seat");
i.putAll(map);
} }
}); });
} }
......
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