Commit a0bdcbfb by 杨林龙

优化首页报警列表排序

1 parent 47853d8b
...@@ -38,8 +38,8 @@ public class RemoteAlarmService { ...@@ -38,8 +38,8 @@ public class RemoteAlarmService {
public PageInfo searchCommonByPage(Collection<String> sns, Page page) { public PageInfo searchCommonByPage(Collection<String> sns, Page page) {
CommonAlarmBo commonAlarmBo = new CommonAlarmBo(); CommonAlarmBo commonAlarmBo = new CommonAlarmBo();
commonAlarmBo.setSnList(sns); commonAlarmBo.setSnList(sns);
// commonAlarmBo.setAlarmStartTime(DateUtil.getTodayFirstDateTimeStr()); commonAlarmBo.setAlarmStartTime(DateUtil.getTodayFirstDateTimeStr());
// commonAlarmBo.setAlarmEndTime(DateUtil.getTodayLastDateTimeStr()); commonAlarmBo.setAlarmEndTime(DateUtil.getTodayLastDateTimeStr());
commonAlarmBo.setPageNumber(page.getPageNumber()); commonAlarmBo.setPageNumber(page.getPageNumber());
commonAlarmBo.setPageSize(page.getPageSize()); commonAlarmBo.setPageSize(page.getPageSize());
// 设置防拆报警生效查询状态 // 设置防拆报警生效查询状态
......
...@@ -38,7 +38,9 @@ ...@@ -38,7 +38,9 @@
</sql> </sql>
<select id="getFenceAlarmInfo" resultType="cn.com.glsx.app.modules.model.view.FenceAlarmVO"> <select id="getFenceAlarmInfo" resultType="cn.com.glsx.app.modules.model.view.FenceAlarmVO">
select tv.id as vehicleId, select
taef.id as taefId,
tv.id as vehicleId,
tv.owner_name as ownerName, tv.owner_name as ownerName,
tv.vin as vin, tv.vin as vin,
tvd.sn as sn, tvd.sn as sn,
...@@ -54,7 +56,8 @@ ...@@ -54,7 +56,8 @@
and tvd.del_flag = 0 and tvd.del_flag = 0
and td.source = 1 and td.source = 1
and tef.del_flag = 0 and tef.del_flag = 0
order by taef.alarm_time desc and DATE_FORMAT(taef.alarm_time, '%Y-%m-%d') = DATE_FORMAT(NOW(), '%Y-%m-%d')
order by taef.alarm_time desc,taefId desc
</select> </select>
<select id="countActiveDeviceFenceAlarm" resultType="java.lang.Integer"> <select id="countActiveDeviceFenceAlarm" resultType="java.lang.Integer">
......
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
and tvd.del_flag = 0 and tvd.del_flag = 0
and tvd.bind_status = 1 and tvd.bind_status = 1
and tatr.alarm_type in (1, 99) and tatr.alarm_type in (1, 99)
and DATE_FORMAT(tatr.begin_time, '%Y-%m-%d') = DATE_FORMAT(NOW(), '%Y-%m-%d')
order by tatr.begin_time desc order by tatr.begin_time desc
</select> </select>
......
...@@ -24,7 +24,9 @@ ...@@ -24,7 +24,9 @@
</sql> </sql>
<select id="getOfflineAlarmInfo" resultType="cn.com.glsx.app.modules.model.view.OfflineAlarmVO"> <select id="getOfflineAlarmInfo" resultType="cn.com.glsx.app.modules.model.view.OfflineAlarmVO">
select tv.id as vehicleId, select
tv.id as vehicleId,
tvd.id as vdId,
tv.owner_name as ownerName, tv.owner_name as ownerName,
tvd.sn as sn, tvd.sn as sn,
tv.vin as vin, tv.vin as vin,
...@@ -47,6 +49,6 @@ ...@@ -47,6 +49,6 @@
or (tdl.last_gps_time &lt; #{offlineStartTime} and tdl.last_bs_time is null) or (tdl.last_gps_time &lt; #{offlineStartTime} and tdl.last_bs_time is null)
) )
</if> </if>
order by tdl.last_gps_time desc order by tv.created_date desc,vdId desc
</select> </select>
</mapper> </mapper>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!