Commit 206a413b by levphon

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

1 parent 498d1e3d
......@@ -174,8 +174,10 @@ public class VehicleInfoExport {
@ExcelProperty(value = "调频操作人", index = 19)
private String operation;
@ExcelIgnore
private Integer diffDayTime;
@ExcelIgnore
private Integer diffMinuteTime;
/**
......
......@@ -469,7 +469,8 @@
<if test="deviceState != null">
<choose>
<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 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
......@@ -517,15 +518,14 @@
ddf.`week` AS `week`,
ddf.week_timer AS weekTimer,
tu.username,
tu2.username operation
tu.account operation
from t_vehicle tv
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_device td on td.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 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
and tvd.bind_status = 1
and tvd.del_flag = 0
......@@ -559,7 +559,8 @@
<if test="deviceState != null">
<choose>
<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 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
......@@ -1006,17 +1007,15 @@
<select id="getBindDeviceInfoWithAuth" resultType="cn.com.glsx.admin.modules.model.DeviceBindVo">
SELECT count(temp.id) AS bindDeviceNumber,
DATE_FORMAT(temp.created_date, '%Y-%m-%d') as bindDate
FROM (
SELECT distinct tv.id,
tvd.created_date,
tv.created_by
FROM t_vehicle tv
left join t_vehicle_device tvd on tvd.vehicle_id = tv.id
WHERE tvd.bind_status = 1
and tv.del_flag = 0
and tvd.del_flag = 0
${appendSql}
) temp
FROM (SELECT distinct tv.id,
tvd.created_date,
tv.created_by
FROM t_vehicle tv
left join t_vehicle_device tvd on tvd.vehicle_id = tv.id
WHERE tvd.bind_status = 1
and tv.del_flag = 0
and tvd.del_flag = 0
${appendSql}) temp
GROUP BY DATE_FORMAT(temp.created_date, '%Y-%m-%d')
</select>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!