Commit 5762fa7c authored by tianyiming's avatar tianyiming

修改bug

parent 1e631481
...@@ -41,8 +41,6 @@ import java.net.NetworkInterface; ...@@ -41,8 +41,6 @@ import java.net.NetworkInterface;
import java.net.SocketException; import java.net.SocketException;
import java.text.ParseException; import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatter;
import java.time.temporal.TemporalAccessor; import java.time.temporal.TemporalAccessor;
import java.util.*; import java.util.*;
...@@ -192,8 +190,8 @@ public class EquipmentSpecificAlarmServiceImpl extends ServiceImpl<EquipmentSpec ...@@ -192,8 +190,8 @@ public class EquipmentSpecificAlarmServiceImpl extends ServiceImpl<EquipmentSpec
Page<Map<String, Object>> resultPage = this.baseMapper.page(result, param); Page<Map<String, Object>> resultPage = this.baseMapper.page(result, param);
if (resultPage.getTotal() > 0) { if (resultPage.getTotal() > 0) {
for (Map<String, Object> x : resultPage.getRecords()) { for (Map<String, Object> x : resultPage.getRecords()) {
LocalDateTime createDate = (LocalDateTime) x.get("createDate"); // LocalDateTime createDate = (LocalDateTime) x.get("createDate");
x.put("createDate", Date.from(createDate.atZone(ZoneId.systemDefault()).toInstant())); // x.put("createDate", Date.from(createDate.atZone(ZoneId.systemDefault()).toInstant()));
if (ObjectUtils.isEmpty(x.get("handleType"))) { if (ObjectUtils.isEmpty(x.get("handleType"))) {
x.put("handleType", null); x.put("handleType", null);
} else { } else {
...@@ -760,8 +758,8 @@ public class EquipmentSpecificAlarmServiceImpl extends ServiceImpl<EquipmentSpec ...@@ -760,8 +758,8 @@ public class EquipmentSpecificAlarmServiceImpl extends ServiceImpl<EquipmentSpec
Page<Map<String, Object>> resultPage = this.baseMapper.page(result, param); Page<Map<String, Object>> resultPage = this.baseMapper.page(result, param);
if (resultPage.getTotal() > 0) { if (resultPage.getTotal() > 0) {
for (Map<String, Object> x : resultPage.getRecords()) { for (Map<String, Object> x : resultPage.getRecords()) {
LocalDateTime createDate = (LocalDateTime) x.get("createDate"); // LocalDateTime createDate = (LocalDateTime) x.get("createDate");
x.put("createDate", Date.from(createDate.atZone(ZoneId.systemDefault()).toInstant())); // x.put("createDate", Date.from(createDate.atZone(ZoneId.systemDefault()).toInstant()));
if (ObjectUtils.isEmpty(x.get("handleType"))) { if (ObjectUtils.isEmpty(x.get("handleType"))) {
x.put("handleType", null); x.put("handleType", null);
} else { } else {
...@@ -777,7 +775,7 @@ public class EquipmentSpecificAlarmServiceImpl extends ServiceImpl<EquipmentSpec ...@@ -777,7 +775,7 @@ public class EquipmentSpecificAlarmServiceImpl extends ServiceImpl<EquipmentSpec
for (Map<String, Object> stringObjectMap : list) { for (Map<String, Object> stringObjectMap : list) {
records.add(stringObjectMap); records.add(stringObjectMap);
} }
resultPage.setRecords(records); records.sort((t1, t2) -> t2.get("createDate").toString().compareTo(t1.get("createDate").toString()));
return resultPage; return resultPage;
} }
......
...@@ -195,7 +195,10 @@ ...@@ -195,7 +195,10 @@
AS fireEquipmentPointValue, AS fireEquipmentPointValue,
wlesal.type AS typeCode, wlesal.type AS typeCode,
(select type_name from wl_signal_classify sc where sc.type_code = wlesal.type limit 1) as type, (select type_name from wl_signal_classify sc where sc.type_code = wlesal.type limit 1) as type,
wlesal.create_date AS createDate, date_format(
wlesal.create_date,
'%Y-%m-%d %H:%i:%s'
) createDate,
CONCAT_WS(' ', wles.position,wled.area) AS warehouseStructureName, /*告警列表拼接详细地址*/ CONCAT_WS(' ', wles.position,wled.area) AS warehouseStructureName, /*告警列表拼接详细地址*/
(select (select
group_concat(fet.`name`) group_concat(fet.`name`)
......
...@@ -4,13 +4,16 @@ ...@@ -4,13 +4,16 @@
<select id="selectAll" resultType="java.util.Map"> <select id="selectAll" resultType="java.util.Map">
select select
id message_id, id messageId,
type fireEquipmentSpecificIndexName, type equipmentSpecificIndexName,
position, position,
name equipmentSpecificName, name equipmentSpecificName,
create_date createDate, date_format(
message_type, create_date,
is_read, '%Y-%m-%d %H:%i:%s'
) createDate,
message_type messageType,
is_read isRead,
equipment_specific_id id equipment_specific_id id
from from
wl_marquee_data wl_marquee_data
......
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