parent
7e3cd7857f
commit
f56821459a
9 changed files with 301 additions and 2 deletions
@ -0,0 +1,109 @@ |
||||
package org.springblade.desk.logistics.pojo.entity; |
||||
|
||||
/** |
||||
* @author: liweidong |
||||
* @create: 2026-03-03 |
||||
*/ |
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import io.swagger.v3.oas.annotations.media.Schema; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import org.springblade.core.mp.base.BaseEntity; |
||||
|
||||
import java.io.Serial; |
||||
|
||||
/** |
||||
* 物流库位实体类 |
||||
* |
||||
* @author |
||||
* @since |
||||
*/ |
||||
@Data |
||||
@TableName("LM_TASK_EXECUTE_RECORD") |
||||
@Schema(description = "AGV小车对接表") |
||||
@EqualsAndHashCode(callSuper = true) |
||||
public class TaskExecuteRecord extends BaseEntity { |
||||
|
||||
@Serial |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
|
||||
/** |
||||
* 状态常量:任务开始 |
||||
*/ |
||||
public static final String STATUS_START = "start"; |
||||
|
||||
/** |
||||
* 状态常量:走出储位 |
||||
*/ |
||||
public static final String STATUS_END = "end"; |
||||
|
||||
/** |
||||
* 状态常量:任务单取消 |
||||
*/ |
||||
public static final String STATUS_CANCEL = "cancel"; |
||||
|
||||
/** |
||||
* 状态常量:走出储位 |
||||
*/ |
||||
public static final String STATUS_OUTBIN = "outbin"; |
||||
|
||||
/** |
||||
* 状态常量:CTU料箱取放申请 |
||||
*/ |
||||
public static final String STATUS_APPLY = "apply"; |
||||
|
||||
/** |
||||
* 状态常量:送料申请 |
||||
*/ |
||||
public static final String STATUS_FROMAGV = "fromAgv"; |
||||
|
||||
/** |
||||
* 状态常量:对接结束释放 |
||||
*/ |
||||
public static final String STATUS_RELEASE = "release"; |
||||
|
||||
/** |
||||
* 状态常量:放料申请 |
||||
*/ |
||||
public static final String STATUS_TOAGV = "toAgv"; |
||||
|
||||
/** |
||||
* 任务的ID |
||||
*/ |
||||
@Schema(description = "任务的ID") |
||||
private Long taskId; |
||||
|
||||
/** |
||||
* 默认使用方式: start:任务开始 outbin:走出储位 end:任务结束 cancel:任务单取消 apply:CTU料箱取放申请 |
||||
*/ |
||||
@Schema(description = "默认使用方式: start:任务开始 outbin:走出储位 end:任务结束 cancel:任务单取消 apply:CTU料箱取放申请") |
||||
private String method; |
||||
|
||||
/** |
||||
* 开始位置 |
||||
*/ |
||||
@Schema(description = "开始位置") |
||||
private String startPos; |
||||
|
||||
/** |
||||
* 结束位置 |
||||
*/ |
||||
@Schema(description = "结束位置") |
||||
private String endPos; |
||||
|
||||
/** |
||||
* AGV编号 |
||||
*/ |
||||
@Schema(description = "AGV编号") |
||||
private String robotCode; |
||||
|
||||
|
||||
/** |
||||
* 备注 |
||||
*/ |
||||
@Schema(description = "备注") |
||||
private String remark; |
||||
|
||||
} |
||||
@ -0,0 +1,19 @@ |
||||
package org.springblade.desk.logistics.controller; |
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag; |
||||
import lombok.AllArgsConstructor; |
||||
import org.springframework.web.bind.annotation.RequestMapping; |
||||
import org.springframework.web.bind.annotation.RestController; |
||||
|
||||
/** |
||||
* 订单箱子 控制器 |
||||
* |
||||
* @author BladeX |
||||
* @since 2026-03-03 |
||||
*/ |
||||
@RestController |
||||
@AllArgsConstructor |
||||
@RequestMapping("/order") |
||||
@Tag(name = "订单箱子", description = "订单箱子称重接口") |
||||
public class AGVDockingController { |
||||
} |
||||
@ -0,0 +1,10 @@ |
||||
package org.springblade.desk.logistics.mapper; |
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import org.springblade.desk.logistics.pojo.entity.TaskExecuteRecord; |
||||
|
||||
import java.util.List; |
||||
|
||||
public interface TaskExecuteRecordMapper extends BaseMapper<TaskExecuteRecord> { |
||||
|
||||
} |
||||
@ -0,0 +1,15 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<!DOCTYPE mapper |
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
<mapper namespace = "org.springblade.desk.logistics.mapper.TaskMapper"> |
||||
|
||||
|
||||
<select id="selectByBoxBarcode" resultType="org.springblade.desk.logistics.pojo.entity.Task"> |
||||
SELECT id, box_barcode, station_id, location_id, task_status, weight, machine_weight, status, create_user, create_time, create_dept, update_user, update_time, is_deleted, wc_id,remark |
||||
FROM LM_TASK |
||||
WHERE IS_DELETED = 0 |
||||
AND BOX_BARCODE = #{boxBarcode} |
||||
AND TASK_STATUS NOT IN (2, 9); |
||||
</select> |
||||
</mapper> |
||||
@ -0,0 +1,6 @@ |
||||
package org.springblade.desk.logistics.service; |
||||
|
||||
public interface IStorageMonitoringService { |
||||
void monitoringStation(); |
||||
|
||||
} |
||||
@ -0,0 +1,40 @@ |
||||
/** |
||||
* BladeX Commercial License Agreement |
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p> |
||||
* Use of this software is governed by the Commercial License Agreement |
||||
* obtained after purchasing a license from BladeX. |
||||
* <p> |
||||
* 1. This software is for development use only under a valid license |
||||
* from BladeX. |
||||
* <p> |
||||
* 2. Redistribution of this software's source code to any third party |
||||
* without a commercial license is strictly prohibited. |
||||
* <p> |
||||
* 3. Licensees may copyright their own code but cannot use segments |
||||
* from this software for such purposes. Copyright of this software |
||||
* remains with BladeX. |
||||
* <p> |
||||
* Using this software signifies agreement to this License, and the software |
||||
* must not be used for illegal purposes. |
||||
* <p> |
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is |
||||
* not liable for any claims arising from secondary or illegal development. |
||||
* <p> |
||||
* Author: Chill Zhuang (bladejava@qq.com) |
||||
*/ |
||||
package org.springblade.desk.logistics.service; |
||||
|
||||
import org.springblade.core.mp.base.BaseService; |
||||
import org.springblade.desk.logistics.pojo.entity.OrderBind; |
||||
import org.springblade.desk.logistics.pojo.entity.TaskExecuteRecord; |
||||
|
||||
/** |
||||
* 物流小车对接实体类 服务类 |
||||
* |
||||
* @author BladeX |
||||
* @since 2025-11-12 |
||||
*/ |
||||
public interface ITaskExecuteRecordService extends BaseService<TaskExecuteRecord> { |
||||
|
||||
} |
||||
@ -0,0 +1,50 @@ |
||||
package org.springblade.desk.logistics.service.impl; |
||||
|
||||
import org.springblade.desk.logistics.pojo.entity.Task; |
||||
import org.springblade.desk.logistics.service.ILocationService; |
||||
import org.springblade.desk.logistics.service.IStationService; |
||||
import org.springblade.desk.logistics.service.IStorageMonitoringService; |
||||
import org.springblade.desk.logistics.service.ITaskService; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import java.util.HashSet; |
||||
import java.util.Set; |
||||
|
||||
@Service |
||||
public class StorageMonitoringServiceImpl implements IStorageMonitoringService { |
||||
private static final Set<Integer> RUNNING_STATUSES = new HashSet<>(); |
||||
|
||||
static { |
||||
// 初始化运行中任务状态
|
||||
RUNNING_STATUSES.add(Task.STATUS_START); // 任务启动
|
||||
RUNNING_STATUSES.add(Task.STATUS_CONVEYOR_START); // 输送机启动
|
||||
RUNNING_STATUSES.add(Task.STATUS_CONVEYOR_END); // 输送机结束
|
||||
RUNNING_STATUSES.add(Task.STATUS_STATION); // 站点状态
|
||||
RUNNING_STATUSES.add(Task.STATUS_LOCATION); // 库位状态
|
||||
RUNNING_STATUSES.add(Task.STATUS_WAITING); // 等待状态
|
||||
RUNNING_STATUSES.add(Task.STATUS_STATION_RECEIVE);// 站点接收
|
||||
RUNNING_STATUSES.add(Task.STATUS_BACK_TO_STORAGE);// 返库状态
|
||||
} |
||||
/** |
||||
* 任务服务:处理箱绑定任务的创建、状态更新、删除等 |
||||
*/ |
||||
private final ITaskService iTaskService; |
||||
/** |
||||
* 站点服务:处理站点状态(占用/空闲)管理 |
||||
*/ |
||||
private final IStationService iStationService; |
||||
/** |
||||
* 库位服务:处理库位状态(占用/空闲)管理 |
||||
*/ |
||||
private final ILocationService iLocationService; |
||||
public StorageMonitoringServiceImpl(ITaskService iTaskService, IStationService iStationService, ILocationService iLocationService) { |
||||
this.iTaskService = iTaskService; |
||||
this.iStationService = iStationService; |
||||
this.iLocationService = iLocationService; |
||||
} |
||||
|
||||
@Override |
||||
public void monitoringStation() { |
||||
|
||||
} |
||||
} |
||||
@ -0,0 +1,49 @@ |
||||
/** |
||||
* BladeX Commercial License Agreement |
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p> |
||||
* Use of this software is governed by the Commercial License Agreement |
||||
* obtained after purchasing a license from BladeX. |
||||
* <p> |
||||
* 1. This software is for development use only under a valid license |
||||
* from BladeX. |
||||
* <p> |
||||
* 2. Redistribution of this software's source code to any third party |
||||
* without a commercial license is strictly prohibited. |
||||
* <p> |
||||
* 3. Licensees may copyright their own code but cannot use segments |
||||
* from this software for such purposes. Copyright of this software |
||||
* remains with BladeX. |
||||
* <p> |
||||
* Using this software signifies agreement to this License, and the software |
||||
* must not be used for illegal purposes. |
||||
* <p> |
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is |
||||
* not liable for any claims arising from secondary or illegal development. |
||||
* <p> |
||||
* Author: Chill Zhuang (bladejava@qq.com) |
||||
*/ |
||||
package org.springblade.desk.logistics.service.impl; |
||||
|
||||
import lombok.extern.slf4j.Slf4j; |
||||
import org.springblade.core.mp.base.BaseServiceImpl; |
||||
import org.springblade.desk.logistics.mapper.OrderBindMapper; |
||||
import org.springblade.desk.logistics.mapper.TaskExecuteRecordMapper; |
||||
import org.springblade.desk.logistics.pojo.entity.OrderBind; |
||||
import org.springblade.desk.logistics.pojo.entity.TaskExecuteRecord; |
||||
import org.springblade.desk.logistics.service.IOrderBindService; |
||||
import org.springblade.desk.logistics.service.ITaskExecuteRecordService; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
/** |
||||
* 物流小车对接实体类 服务实现类 |
||||
* |
||||
* @author BladeX |
||||
* @since 2025-11-12 |
||||
*/ |
||||
@Service |
||||
@Slf4j |
||||
public class TaskExecuteRecordServiceImpl extends BaseServiceImpl<TaskExecuteRecordMapper, TaskExecuteRecord> implements ITaskExecuteRecordService { |
||||
|
||||
|
||||
} |
||||
Loading…
Reference in new issue