debug
This commit is contained in:
parent
f26dd92ba9
commit
ddf0f37951
|
@ -1,6 +1,7 @@
|
|||
package com.ruoyi.bst.device.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalTime;
|
||||
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
@ -67,7 +68,7 @@ public class DeviceVO extends Device {
|
|||
@ApiModelProperty("是否必须停车点还车")
|
||||
private Boolean areaParkingReturn;
|
||||
|
||||
// 订单
|
||||
// 订单设备
|
||||
@ApiModelProperty("当前订单ID")
|
||||
private Long orderId;
|
||||
@ApiModelProperty("当前订单状态")
|
||||
|
@ -76,8 +77,18 @@ public class DeviceVO extends Device {
|
|||
private String orderNo;
|
||||
@ApiModelProperty("当前订单设备状态")
|
||||
private String orderDeviceStatus;
|
||||
@ApiModelProperty("当前订单设备开始时间")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime orderDeviceStartTime;
|
||||
@ApiModelProperty("当前订单设备结束时间")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime orderDeviceEndTime;
|
||||
@ApiModelProperty("当前订单用户ID")
|
||||
private Long orderUserId;
|
||||
@ApiModelProperty("当前订单用户名称")
|
||||
private String orderUserName;
|
||||
@ApiModelProperty("当前订单用户手机号")
|
||||
private String orderUserPhone;
|
||||
|
||||
// 硬件版本
|
||||
@ApiModelProperty("硬件版本")
|
||||
|
|
|
@ -44,7 +44,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
bd.last_online_time,
|
||||
bd.order_device_id,
|
||||
bd.software_version,
|
||||
bd.last_user_id,
|
||||
mch.nick_name as mch_name,
|
||||
mch.point as mch_point,
|
||||
bm.name as model_name,
|
||||
|
@ -73,10 +72,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
bo.user_id as order_user_id,
|
||||
bod.status as order_device_status,
|
||||
bod.order_id as order_id,
|
||||
bod.start_time as order_device_start_time,
|
||||
bod.end_time as order_device_end_time,
|
||||
bhv.version as hardware_version,
|
||||
bhv.instructions as hardware_version_instructions,
|
||||
bul.nick_name as last_user_name,
|
||||
bul.user_name as last_user_phone
|
||||
suo.nick_name as order_user_name,
|
||||
suo.user_name as order_user_phone
|
||||
from <include refid="searchTables"/>
|
||||
</sql>
|
||||
|
||||
|
@ -84,13 +85,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
bst_device bd
|
||||
left join sys_user mch on bd.mch_id = mch.user_id
|
||||
left join bst_model bm on bd.model_id = bm.id
|
||||
left join bst_hardware_version bhv on bhv.id = bd.hardware_version_id
|
||||
left join bst_area ba on bd.area_id = ba.id
|
||||
left join sys_user basu on basu.user_id = ba.user_id
|
||||
left join sys_user basua on basua.user_id = basu.agent_id
|
||||
left join sys_user bul on bul.user_id = bd.last_user_id
|
||||
left join bst_order_device bod on bod.id = bd.order_device_id
|
||||
left join bst_order bo on bo.id = bod.order_id
|
||||
left join bst_hardware_version bhv on bhv.id = bd.hardware_version_id
|
||||
left join sys_user suo on suo.user_id = bo.user_id
|
||||
</sql>
|
||||
|
||||
<sql id="searchCondition">
|
||||
|
@ -122,11 +123,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="query.areaAgentName != null and query.areaAgentName != ''"> and basua.nick_name like concat('%', #{query.areaAgentName}, '%')</if>
|
||||
<if test="query.orderNo != null and query.orderNo != ''"> and bo.no like concat('%', #{query.orderNo}, '%')</if>
|
||||
<if test="query.excludeId != null">and bd.id != #{query.excludeId}</if>
|
||||
<if test="query.lastUserId != null">and bd.last_user_id = #{query.lastUserId}</if>
|
||||
<if test="query.lastUserName != null and query.lastUserName != ''">and bul.nick_name like concat('%', #{query.lastUserName}, '%')</if>
|
||||
<if test="query.lastUserPhone != null and query.lastUserPhone != ''">and bul.user_name like concat('%', #{query.lastUserPhone}, '%')</if>
|
||||
<if test="query.mchName != null and query.mchName != ''">and mch.nick_name like concat('%', #{query.mchName}, '%')</if>
|
||||
<if test="query.modelName != null and query.modelName != ''">and bm.name like concat('%', #{query.modelName}, '%')</if>
|
||||
<if test="query.orderUserName != null and query.orderUserName != ''">and suo.nick_name like concat('%', #{query.orderUserName}, '%')</if>
|
||||
<if test="query.orderUserPhone != null and query.orderUserPhone != ''">and suo.user_name like concat('%', #{query.orderUserPhone}, '%')</if>
|
||||
<if test="query.lastTimeEnd != null">and bd.last_location_time <= #{query.lastTimeEnd}</if>
|
||||
<if test="query.lastTimeStart != null">and bd.last_location_time >= #{query.lastTimeStart}</if>
|
||||
<if test="query.keyword != null and query.keyword != ''">
|
||||
|
@ -230,7 +230,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="lastOnlineTime != null">last_online_time,</if>
|
||||
<if test="orderDeviceId != null">order_device_id,</if>
|
||||
<if test="softwareVersion != null">software_version,</if>
|
||||
<if test="lastUserId != null">last_user_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="modelId != null">#{modelId},</if>
|
||||
|
@ -265,7 +264,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="lastOnlineTime != null">#{lastOnlineTime},</if>
|
||||
<if test="orderDeviceId != null">#{orderDeviceId},</if>
|
||||
<if test="softwareVersion != null">#{softwareVersion},</if>
|
||||
<if test="lastUserId != null">#{lastUserId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
@ -310,7 +308,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="data.lastOnlineTime != null">bd.last_online_time = #{data.lastOnlineTime},</if>
|
||||
<if test="data.orderDeviceId != null">bd.order_device_id = #{data.orderDeviceId},</if>
|
||||
<if test="data.softwareVersion != null">bd.software_version = #{data.softwareVersion},</if>
|
||||
<if test="data.lastUserId != null">bd.last_user_id = #{data.lastUserId},</if>
|
||||
</sql>
|
||||
|
||||
<delete id="deleteDeviceById" parameterType="Long">
|
||||
|
|
|
@ -182,11 +182,11 @@ public class OrderDeviceServiceImpl implements OrderDeviceService
|
|||
query.setStatusList(OrderDeviceStatus.canStart());
|
||||
int rows = orderDeviceMapper.updateByQuery(data, query);
|
||||
|
||||
if (rows > 0 ) {
|
||||
// 更新设备最后一次使用的用户ID
|
||||
int update = deviceService.updateLastUserId(orderDevice.getDeviceId(), orderDevice.getOrderUserId());
|
||||
ServiceUtil.assertion(update != 1, "更新设备最后一次使用的用户ID失败");
|
||||
}
|
||||
// if (rows > 0 ) {
|
||||
// // 更新设备最后一次使用的用户ID
|
||||
// int update = deviceService.updateLastUserId(orderDevice.getDeviceId(), orderDevice.getOrderUserId());
|
||||
// ServiceUtil.assertion(update != 1, "更新设备最后一次使用的用户ID失败");
|
||||
// }
|
||||
|
||||
return rows;
|
||||
});
|
||||
|
@ -236,8 +236,8 @@ public class OrderDeviceServiceImpl implements OrderDeviceService
|
|||
int rows = orderDeviceMapper.updateByQuery(data, query);
|
||||
|
||||
// 清除设备当前订单设备ID
|
||||
int clear = deviceService.clearCurrentOrderDevice(orderDevice.getDeviceId(), orderDevice.getId());
|
||||
ServiceUtil.assertion(clear != 1, "清除设备当前订单ID失败");
|
||||
// int clear = deviceService.clearCurrentOrderDevice(orderDevice.getDeviceId(), orderDevice.getId());
|
||||
// ServiceUtil.assertion(clear != 1, "清除设备当前订单ID失败");
|
||||
|
||||
return rows;
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user