1. 禁行区不上电

This commit is contained in:
邱贞招 2024-08-03 21:23:26 +08:00
parent 293c3e580b
commit 6bff182276

View File

@ -263,6 +263,7 @@ public class ReceiveController {
// 判断该车辆是否在进行中的订单,并且车辆的锁状态是关状态是骑行中
Boolean inOrderBySn = etOrderService.isInOrderBySn(device.getSn());
if (inOrderBySn && ServiceConstants.VEHICLE_STATUS_IN_USING.equals(device.getStatus()) && ServiceConstants.LOCK_STATUS_CLOSE.equals(device.getLockStatus())) { // 有正在骑行的订单给车辆上电
if(!noRidingArea){
log.info("返回营运区上电,有正在骑行的订单,给车辆上电--SN" + device.getSn());
asDeviceService.sendCommand(device.getMac(), Token.getToken(), IotConstants.COMMAND_OPEN+IotConstants.COMMAND_FREQUENCY_5, "返回营运区上电",null,null);
// 更新车辆状态和锁状态
@ -276,6 +277,7 @@ public class ReceiveController {
}
}
}
}
/** 4.行程线路添加更新订单中的trip_route字段 */
Integer status = value.getStatus();
if(status == 1){//上电运行