Commit 67dd45a5 by 向延琳

Merge remote-tracking branch 'origin/master'

2 parents f6121b71 410af133
......@@ -13,6 +13,7 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
......@@ -58,7 +59,7 @@ public class DashboardController {
@GetMapping("/getActiveDeviceWeekReport")
@ApiOperation(value = "一周激活设备报表统计", response = DeviceActiveVO.class)
@SysLog(module = "一周激活设备报表统计", value = "一周激活设备报表统计", action = OperateType.QUERY, saveLog = false)
public R<DeviceActiveVO> getActiveDeviceWeekReport(DeviceActiveSearch search) {
public R<DeviceActiveVO> getActiveDeviceWeekReport(@Validated DeviceActiveSearch search) {
List<DeviceActiveVO> deviceActiveList = dashboardService.getActiveDeviceWeekReport(search);
return R.ok().data(deviceActiveList);
}
......
......@@ -4,6 +4,9 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
/**
* 设备激活查询
*
......@@ -17,11 +20,13 @@ public class DeviceActiveSearch extends BasicSearch {
* 查询开始时间
*/
@ApiModelProperty("查询开始时间")
@NotBlank(message = "startTime不能为空")
String startTime;
/**
* 查询结束时间
*/
@ApiModelProperty("查询结束时间")
@NotBlank(message = "endTime不能为空")
String endTime;
}
......@@ -33,7 +33,7 @@
</select>
<select id="selectByUserIds" resultType="cn.com.glsx.app.modules.model.CTerminalUserModel">
select tcuar.user_id userId, tcu.rel_user_id relUserId, tcuta.openid account, tcuwa.wechat_name username, tcuwa.wechat_avatar avatar
select tcuar.user_id userId, tcu.rel_user_id relUserId, tcuta.openid account, ifnull(tcuwa.wechat_name, 'wechat_user') username, tcuwa.wechat_avatar avatar
from t_cust_user_auth_rel tcuar
inner join t_cust_user_third_auth tcuta on tcuar.auth_id = tcuta.id
left join t_cust_user tcu on tcuar.user_id = tcu.id
......
......@@ -90,8 +90,8 @@
tv.vin,
tv.owner_name as ownerName,
tw.partner_order_no workOrderNo,
group_concat(tvd.sn) as sns,
group_concat(td.source) as sources,
group_concat(distinct td.sn order by td.source desc) as sns,
group_concat(distinct td.source order by td.source desc) as sources,
tcusd.permit_type as permitType,
group_concat(tvs.receiver_id) as receiverIds
from t_vehicle tv
......@@ -140,33 +140,33 @@
<select id="selectVehicleDeviceByVehicleId" resultType="cn.com.glsx.app.modules.model.view.VehicleDeviceDTO">
select tv.id,
tv.vin,
tv.owner_name ownerName,
tw.partner_order_no workOrderNo,
group_concat(tvd.sn) as sns,
group_concat(td.source) as sources
tv.vin,
tv.owner_name ownerName,
tw.partner_order_no workOrderNo,
group_concat(tvd.sn) as sns,
group_concat(td.source) as sources
from t_vehicle tv
left join t_vehicle_device tvd on tv.id = tvd.vehicle_id
left join t_device td on td.sn = tvd.sn
left join t_workorder tw on tw.id = tv.workorder_id
left join t_vehicle_device tvd on tv.id = tvd.vehicle_id
left join t_device td on td.sn = tvd.sn
left join t_workorder tw on tw.id = tv.workorder_id
where tv.del_flag = 0
and tvd.del_flag = 0
and tvd.bind_status = 1
and tv.id = #{vehicleId}
and tvd.del_flag = 0
and tvd.bind_status = 1
and tv.id = #{vehicleId}
group by tv.id
order by tv.id desc
</select>
<select id="getAllTrackAlarmDataByAuth" resultType="cn.com.glsx.app.modules.model.view.TrackAlarmVO">
select tv.id as vehicleId,
tv.owner_name as ownerName,
tv.vin,
tvd.sn
select tv.id as vehicleId,
tv.owner_name as ownerName,
tv.vin,
tvd.sn
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
where tv.del_flag = 0
and tvd.bind_status = 1
and tvd.del_flag = 0
and tvd.bind_status = 1
and tvd.del_flag = 0
</select>
<select id="getAllDeviceSnByAuth" resultType="String">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!