Commit 206a413b by levphon

车辆管理-车辆导出excel调整

1 parent 498d1e3d
...@@ -174,8 +174,10 @@ public class VehicleInfoExport { ...@@ -174,8 +174,10 @@ public class VehicleInfoExport {
@ExcelProperty(value = "调频操作人", index = 19) @ExcelProperty(value = "调频操作人", index = 19)
private String operation; private String operation;
@ExcelIgnore
private Integer diffDayTime; private Integer diffDayTime;
@ExcelIgnore
private Integer diffMinuteTime; private Integer diffMinuteTime;
/** /**
......
...@@ -469,7 +469,8 @@ ...@@ -469,7 +469,8 @@
<if test="deviceState != null"> <if test="deviceState != null">
<choose> <choose>
<when test="deviceState == 0"> <!-- 行驶中--> <when test="deviceState == 0"> <!-- 行驶中-->
and (td.source=1) and speed>0 and ((timestampdiff(SECOND,tdl.last_gps_time,now())) <![CDATA[<]]> 360 or (timestampdiff(SECOND,tdl.last_bs_time,now())) <![CDATA[<]]> 360) and (td.source=1) and speed>0 and ((timestampdiff(SECOND,tdl.last_gps_time,now())) <![CDATA[<]]> 360 or (timestampdiff(SECOND,tdl.last_bs_time,now()))
<![CDATA[<]]> 360)
</when> </when>
<when test="deviceState == 1"> <!-- 静止--> <when test="deviceState == 1"> <!-- 静止-->
and (td.source=1) and (speed=0 or speed is null) and ((timestampdiff(SECOND,tdl.last_gps_time,now())) <![CDATA[<]]> 360 or and (td.source=1) and (speed=0 or speed is null) and ((timestampdiff(SECOND,tdl.last_gps_time,now())) <![CDATA[<]]> 360 or
...@@ -517,15 +518,14 @@ ...@@ -517,15 +518,14 @@
ddf.`week` AS `week`, ddf.`week` AS `week`,
ddf.week_timer AS weekTimer, ddf.week_timer AS weekTimer,
tu.username, tu.username,
tu2.username operation tu.account operation
from t_vehicle tv from t_vehicle tv
left join t_vehicle_device tvd on tvd.vehicle_id = tv.id left join t_vehicle_device tvd on tvd.vehicle_id = tv.id
left join t_workorder tw on tw.id = tv.workorder_id left join t_workorder tw on tw.id = tv.workorder_id
left join t_device td on td.sn = tvd.sn left join t_device td on td.sn = tvd.sn
left join t_device_location tdl on tdl.sn = tvd.sn left join t_device_location tdl on tdl.sn = tvd.sn
left join t_user tu on tu.id = tv.created_by
left join (select * from (SELECT * FROM t_device_freq order by created_date desc) temp GROUP BY temp.sn) ddf on ddf.vehicle_id = tv.id and ddf.sn = td.sn left join (select * from (SELECT * FROM t_device_freq order by created_date desc) temp GROUP BY temp.sn) ddf on ddf.vehicle_id = tv.id and ddf.sn = td.sn
left join t_user tu2 on tu2.id = ddf.created_by left join t_user tu on tu.id = ddf.created_by
where tv.del_flag = 0 where tv.del_flag = 0
and tvd.bind_status = 1 and tvd.bind_status = 1
and tvd.del_flag = 0 and tvd.del_flag = 0
...@@ -559,7 +559,8 @@ ...@@ -559,7 +559,8 @@
<if test="deviceState != null"> <if test="deviceState != null">
<choose> <choose>
<when test="deviceState == 0"> <!-- 行驶中--> <when test="deviceState == 0"> <!-- 行驶中-->
and (td.source=1) and speed>0 and ((timestampdiff(SECOND,tdl.last_gps_time,now())) <![CDATA[<]]> 360 or (timestampdiff(SECOND,tdl.last_bs_time,now())) <![CDATA[<]]> 360) and (td.source=1) and speed>0 and ((timestampdiff(SECOND,tdl.last_gps_time,now())) <![CDATA[<]]> 360 or (timestampdiff(SECOND,tdl.last_bs_time,now()))
<![CDATA[<]]> 360)
</when> </when>
<when test="deviceState == 1"> <!-- 静止--> <when test="deviceState == 1"> <!-- 静止-->
and (td.source=1) and (speed=0 or speed is null) and ((timestampdiff(SECOND,tdl.last_gps_time,now())) <![CDATA[<]]> 360 or and (td.source=1) and (speed=0 or speed is null) and ((timestampdiff(SECOND,tdl.last_gps_time,now())) <![CDATA[<]]> 360 or
...@@ -1006,8 +1007,7 @@ ...@@ -1006,8 +1007,7 @@
<select id="getBindDeviceInfoWithAuth" resultType="cn.com.glsx.admin.modules.model.DeviceBindVo"> <select id="getBindDeviceInfoWithAuth" resultType="cn.com.glsx.admin.modules.model.DeviceBindVo">
SELECT count(temp.id) AS bindDeviceNumber, SELECT count(temp.id) AS bindDeviceNumber,
DATE_FORMAT(temp.created_date, '%Y-%m-%d') as bindDate DATE_FORMAT(temp.created_date, '%Y-%m-%d') as bindDate
FROM ( FROM (SELECT distinct tv.id,
SELECT distinct tv.id,
tvd.created_date, tvd.created_date,
tv.created_by tv.created_by
FROM t_vehicle tv FROM t_vehicle tv
...@@ -1015,8 +1015,7 @@ ...@@ -1015,8 +1015,7 @@
WHERE tvd.bind_status = 1 WHERE tvd.bind_status = 1
and tv.del_flag = 0 and tv.del_flag = 0
and tvd.del_flag = 0 and tvd.del_flag = 0
${appendSql} ${appendSql}) temp
) temp
GROUP BY DATE_FORMAT(temp.created_date, '%Y-%m-%d') GROUP BY DATE_FORMAT(temp.created_date, '%Y-%m-%d')
</select> </select>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!