设备使用状态
This commit is contained in:
parent
4beceefef7
commit
fc8c96e5c2
@ -35,6 +35,7 @@ management:
|
|||||||
mqtt:
|
mqtt:
|
||||||
# host: tcp://123.57.12.40:1883
|
# host: tcp://123.57.12.40:1883
|
||||||
host: tcp://127.0.0.1:1883
|
host: tcp://127.0.0.1:1883
|
||||||
|
# host: tcp://10.10.7.195:1883
|
||||||
username: adminuser
|
username: adminuser
|
||||||
password: adminuser
|
password: adminuser
|
||||||
qos: 2
|
qos: 2
|
||||||
|
@ -19,4 +19,9 @@ public class RobotSkuInfoDTO {
|
|||||||
* 物料数量
|
* 物料数量
|
||||||
*/
|
*/
|
||||||
private Long skuNumber;
|
private Long skuNumber;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 层数
|
||||||
|
*/
|
||||||
|
private Integer locationStorey;
|
||||||
}
|
}
|
||||||
|
@ -88,7 +88,6 @@ public class PathApiImpl implements PathApi {
|
|||||||
} finally {
|
} finally {
|
||||||
MDC.clear();
|
MDC.clear();
|
||||||
}
|
}
|
||||||
// taskService.ppDistributionTask(message); 废弃了
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -338,6 +338,7 @@ public class RobotTaskStatusApiImpl implements RobotTaskStatusApi {
|
|||||||
robotSkuInfo.setHaveSku(ZeroOneEnum.ONE.getType());
|
robotSkuInfo.setHaveSku(ZeroOneEnum.ONE.getType());
|
||||||
robotSkuInfo.setSkuNumber(wareHouseLocationDO.getSkuNumber());
|
robotSkuInfo.setSkuNumber(wareHouseLocationDO.getSkuNumber());
|
||||||
robotSkuInfo.setSkuInfo(wareHouseLocationDO.getSkuInfo());
|
robotSkuInfo.setSkuInfo(wareHouseLocationDO.getSkuInfo());
|
||||||
|
robotSkuInfo.setLocationStorey(wareHouseLocationDO.getLocationStorey());
|
||||||
redisUtil.set(RobotTaskChcheConstant.ROBOT_TASK_SKU_INFO + robotCompleteTaskDTO.getMac(), JSON.toJSONString(robotSkuInfo));
|
redisUtil.set(RobotTaskChcheConstant.ROBOT_TASK_SKU_INFO + robotCompleteTaskDTO.getMac(), JSON.toJSONString(robotSkuInfo));
|
||||||
wareHouseLocationDO.setSkuInfo(null);
|
wareHouseLocationDO.setSkuInfo(null);
|
||||||
wareHouseLocationDO.setSkuNumber(0L);
|
wareHouseLocationDO.setSkuNumber(0L);
|
||||||
|
@ -74,8 +74,8 @@ public class DeviceInformationPageReqVO extends PageParam {
|
|||||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
private LocalDateTime[] createTime;
|
private LocalDateTime[] createTime;
|
||||||
|
|
||||||
@Schema(description = "设备使用状态(IDLE:空闲、USEING:使用中)")
|
@Schema(description = "设备使用状态(0:空闲、1:使用中)")
|
||||||
private String deviceUseStatus;
|
private Integer deviceUseStatus;
|
||||||
|
|
||||||
@Schema(description = "设备专有属性(1:自动充电类型充电桩、2:手动充电类型充电桩)")
|
@Schema(description = "设备专有属性(1:自动充电类型充电桩、2:手动充电类型充电桩)")
|
||||||
private Integer deviceAttribute;
|
private Integer deviceAttribute;
|
||||||
|
@ -91,9 +91,9 @@ public class DeviceInformationRespVO {
|
|||||||
@ExcelProperty("创建时间")
|
@ExcelProperty("创建时间")
|
||||||
private LocalDateTime createTime;
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
@Schema(description = "设备使用状态(IDLE:空闲、USEING:使用中)")
|
@Schema(description = "设备使用状态(0:空闲、1:使用中)")
|
||||||
@ExcelProperty("设备使用状态(IDLE:空闲、USEING:使用中)")
|
@ExcelProperty("设备使用状态(0:空闲、1:使用中)")
|
||||||
private String deviceUseStatus;
|
private Integer deviceUseStatus;
|
||||||
|
|
||||||
@Schema(description = "设备专有属性(1:自动充电类型充电桩、2:手动充电类型充电桩)")
|
@Schema(description = "设备专有属性(1:自动充电类型充电桩、2:手动充电类型充电桩)")
|
||||||
@ExcelProperty("设备专有属性(1:自动充电类型充电桩、2:手动充电类型充电桩)")
|
@ExcelProperty("设备专有属性(1:自动充电类型充电桩、2:手动充电类型充电桩)")
|
||||||
|
@ -72,8 +72,8 @@ public class DeviceInformationSaveReqVO {
|
|||||||
@Schema(description = "设备最后通讯时间")
|
@Schema(description = "设备最后通讯时间")
|
||||||
private LocalDateTime deviceLastTime;
|
private LocalDateTime deviceLastTime;
|
||||||
|
|
||||||
@Schema(description = "设备使用状态(IDLE:空闲、USEING:使用中)")
|
@Schema(description = "设备使用状态(0:空闲、1:使用中)")
|
||||||
private String deviceUseStatus;
|
private Integer deviceUseStatus;
|
||||||
|
|
||||||
@Schema(description = "设备专有属性(1:自动充电类型充电桩、2:手动充电类型充电桩)")
|
@Schema(description = "设备专有属性(1:自动充电类型充电桩、2:手动充电类型充电桩)")
|
||||||
private Integer deviceAttribute;
|
private Integer deviceAttribute;
|
||||||
|
@ -112,9 +112,9 @@ public class DeviceInformationDO extends BaseDO {
|
|||||||
*/
|
*/
|
||||||
private LocalDateTime deviceLastTime;
|
private LocalDateTime deviceLastTime;
|
||||||
/**
|
/**
|
||||||
* 设备使用状态(IDLE:空闲、USEING:使用中)
|
* 设备使用状态(0:空闲、1:使用中)
|
||||||
*/
|
*/
|
||||||
private String deviceUseStatus;
|
private Integer deviceUseStatus;
|
||||||
/**
|
/**
|
||||||
* 设备专有属性(1:自动充电类型充电桩、2:手动充电类型充电桩)
|
* 设备专有属性(1:自动充电类型充电桩、2:手动充电类型充电桩)
|
||||||
*/
|
*/
|
||||||
|
@ -39,7 +39,7 @@ public interface DeviceInformationMapper extends BaseMapperX<DeviceInformationDO
|
|||||||
* @param lastUser
|
* @param lastUser
|
||||||
*/
|
*/
|
||||||
void updateDeviceUseStatus(@Param("deviceNo") String deviceNo,
|
void updateDeviceUseStatus(@Param("deviceNo") String deviceNo,
|
||||||
@Param("deviceUseStatus") String deviceUseStatus,
|
@Param("deviceUseStatus") Integer deviceUseStatus,
|
||||||
@Param("lastUser") String lastUser);
|
@Param("lastUser") String lastUser);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -47,7 +47,7 @@ public interface DeviceInformationMapper extends BaseMapperX<DeviceInformationDO
|
|||||||
* @param lastUser
|
* @param lastUser
|
||||||
*/
|
*/
|
||||||
void setDeviceReleaseByLastUser(@Param("lastUser") String lastUser,
|
void setDeviceReleaseByLastUser(@Param("lastUser") String lastUser,
|
||||||
@Param("deviceUseStatus") String deviceUseStatus);
|
@Param("deviceUseStatus") Integer deviceUseStatus);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据地图id删除
|
* 根据地图id删除
|
||||||
|
@ -9,13 +9,13 @@ import lombok.Getter;
|
|||||||
@Getter
|
@Getter
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public enum DeviceUseStatusEnum {
|
public enum DeviceUseStatusEnum {
|
||||||
IDLE("IDLE", "空闲"),
|
IDLE(0, "空闲"),
|
||||||
USEING("USEING", "使用中");
|
USEING(1, "使用中");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 类型
|
* 类型
|
||||||
*/
|
*/
|
||||||
private final String type;
|
private final Integer type;
|
||||||
/**
|
/**
|
||||||
* 说明
|
* 说明
|
||||||
*/
|
*/
|
||||||
|
@ -111,7 +111,7 @@ public class AutoChargeServiceImpl implements AutoChargeService {
|
|||||||
|
|
||||||
List<DeviceInformationDO> deviceInformationDOS = deviceInformationMapper.selectList(new LambdaQueryWrapperX<DeviceInformationDO>()
|
List<DeviceInformationDO> deviceInformationDOS = deviceInformationMapper.selectList(new LambdaQueryWrapperX<DeviceInformationDO>()
|
||||||
.eq(DeviceInformationDO::getDeviceEnable, ZeroOneEnum.ONE.getType())
|
.eq(DeviceInformationDO::getDeviceEnable, ZeroOneEnum.ONE.getType())
|
||||||
.eq(DeviceInformationDO::getDeviceUseStatus, DeviceUseStatusEnum.IDLE.getType())
|
.eq(DeviceInformationDO::getDeviceUseStatus, ZeroOneEnum.ZERO.getType())
|
||||||
.eq(DeviceInformationDO::getDeviceType, DeviceTypeEnum.CHARGING_STATION.getType()));
|
.eq(DeviceInformationDO::getDeviceType, DeviceTypeEnum.CHARGING_STATION.getType()));
|
||||||
|
|
||||||
if (ObjectUtil.isEmpty(deviceInformationDOS)) {
|
if (ObjectUtil.isEmpty(deviceInformationDOS)) {
|
||||||
@ -131,7 +131,7 @@ public class AutoChargeServiceImpl implements AutoChargeService {
|
|||||||
}
|
}
|
||||||
List<RobotInformationDO> moveToWaitRobots = getCanLeaveChargingRobots(chargeIngRobots, chargeConfig, robots.size());
|
List<RobotInformationDO> moveToWaitRobots = getCanLeaveChargingRobots(chargeIngRobots, chargeConfig, robots.size());
|
||||||
if (ObjectUtil.isEmpty(moveToWaitRobots)) {
|
if (ObjectUtil.isEmpty(moveToWaitRobots)) {
|
||||||
log.info("充电中的车辆未充满电");
|
log.info("充电中的车辆未达到离开的阀值");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
robotPathPlanningService.moveRobotToWait(moveToWaitRobots);
|
robotPathPlanningService.moveRobotToWait(moveToWaitRobots);
|
||||||
@ -213,6 +213,7 @@ public class AutoChargeServiceImpl implements AutoChargeService {
|
|||||||
|
|
||||||
Boolean adequateBatteryCapacity = remainingElectricityBigger(chargeConfig, robot);
|
Boolean adequateBatteryCapacity = remainingElectricityBigger(chargeConfig, robot);
|
||||||
if (adequateBatteryCapacity) {
|
if (adequateBatteryCapacity) {
|
||||||
|
robot.setRobotStatus(RobotStatusEnum.STAND_BY.getType());
|
||||||
String socKey = RobotTaskChcheConstant.ROBOT_INFORMATION_SOC + robot.getMacAddress();
|
String socKey = RobotTaskChcheConstant.ROBOT_INFORMATION_SOC + robot.getMacAddress();
|
||||||
Object o = redisUtil.get(socKey);
|
Object o = redisUtil.get(socKey);
|
||||||
Integer soc = ObjectUtil.isEmpty(o) ? 0 : Integer.parseInt(o.toString());
|
Integer soc = ObjectUtil.isEmpty(o) ? 0 : Integer.parseInt(o.toString());
|
||||||
|
Loading…
Reference in New Issue
Block a user