Commit 86ef6709 by 杨林龙

开发 1.9.0 设备调频功能

1 parent 8d1634f2
......@@ -46,4 +46,10 @@ public class DeviceFreq extends BaseEntity {
//星期模式下上点时间.如1000
@Column(name = "week_timer")
private String weekTimer;
/**
* 用户类型 兼容小程序分享用户添加字段 1:有账户的用户 2:分享的用户
*/
@Column(name = "user_type")
private Integer userType;
}
......@@ -1728,6 +1728,7 @@ public class VehicleService extends AbstractCommonService {
df.setBatteryLevel(devicePower.getSoc() + "");
}
df.setStatus(1);
df.setUserType(1);
df.setCreatedBy(ShieldContextHolder.getUserId());
df.setCreatedDate(new Date());
df.setUpdatedDate(new Date());
......
......@@ -29,7 +29,7 @@
tdf.freq_type AS freqType,
LEFT(tv.created_date,19) AS activeTime,
tdf.channel ,
tu.username AS operation,
IF(tdf.user_type = 1, tu.username, tcula.username) AS operation,
tdf.catching_timer AS catchingTimer,
tdf.timer ,
tdf.week ,
......@@ -43,6 +43,8 @@
FROM t_device_freq tdf
LEFT JOIN t_vehicle tv ON tv.id = tdf.vehicle_id
LEFT JOIN t_user tu ON tu.id = tdf.created_by
LEFT JOIN t_cust_user_auth_rel tcuar ON tcuar.user_id = tdf.created_by and tcuar.auth_type = 'local'
LEFT JOIN t_cust_user_local_account tcula ON tcula.auth_id = tcuar.auth_id
WHERE tdf.sn = #{sn,jdbcType=VARCHAR}
AND tdf.status = 2
AND tdf.del_flag = 0
......
......@@ -568,7 +568,7 @@
ddf.week_timer AS weekTimer,
tv.created_by createdBy,
tu2.username,
tu.account operation
IF(ddf.user_type = 1, tu.username, tcula.username) AS 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
......@@ -577,6 +577,8 @@
left join t_device_power tdp on tdp.sn = tvd.sn and tvd.id = tdp.vd_id
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 tu on tu.id = ddf.created_by
left join t_cust_user_auth_rel tcuar on tcuar.user_id = ddf.created_by and tcuar.auth_type = 'local'
left join t_cust_user_local_account tcula on tcula.auth_id = tcuar.auth_id
left join t_user tu2 on tu2.id = tv.updated_by
where tv.del_flag = 0
and tvd.bind_status = 1
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!