fix:任务拆解

This commit is contained in:
2026-07-15 14:59:05 +08:00
parent a066ec3637
commit 90c4a9e8e9
16 changed files with 206 additions and 9 deletions

View File

@@ -0,0 +1,10 @@
package cn.code.nl.framework.execute.biz;
/**
*
* @Author: liyongde
* @Date: 2026/7/15 14:54
*/
public interface TaskCommonApi {
void doHandlePicked();
}

View File

@@ -0,0 +1,16 @@
package cn.code.nl.framework.execute.biz.lms;
import cn.code.nl.framework.common.enums.RpcConstants;
import cn.code.nl.framework.execute.biz.TaskCommonApi;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.cloud.openfeign.FeignClient;
/**
* lms通用API
* @Author: liyongde
* @Date: 2026/7/15 14:39
*/
@FeignClient(name = RpcConstants.LMS_NAME, primary = false) // TODO 芋艿fallbackFactory =
@Tag(name = "RPC 服务 - lms任务")
public interface LmsTaskCommonApi extends TaskCommonApi {
}

View File

@@ -0,0 +1,6 @@
/**
* 业务实现的API
* @Author: liyongde
* @Date: 2026/7/15 14:38
*/
package cn.code.nl.framework.execute.biz;

View File

@@ -0,0 +1,16 @@
package cn.code.nl.framework.execute.biz.wms;
import cn.code.nl.framework.common.enums.RpcConstants;
import cn.code.nl.framework.execute.biz.TaskCommonApi;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.cloud.openfeign.FeignClient;
/**
*
* @Author: liyongde
* @Date: 2026/7/15 14:48
*/
@FeignClient(name = RpcConstants.WMS_NAME, primary = false) // TODO 芋艿fallbackFactory =
@Tag(name = "RPC 服务 - wms任务")
public interface WmsTaskCommonApi extends TaskCommonApi {
}

View File

@@ -0,0 +1,28 @@
package cn.code.nl.framework.execute.core;
/**
* 抽象类任务契约
* LMS/WMS子类遵守
*
* @Author: liyongde
* @Date: 2026/7/15 11:21
*/
public abstract class AbstractTask {
// ========== 取货完成、完成、取消的逻辑 ==========
public void doHandlePicked(Long taskId) {
// 子类实现取货完成业务
}
public abstract void doHandleFinish(Long taskId);
public abstract void doHandleCancel(Long taskId);
/**
* 二次请求
* @param taskId任务id
*/
public Long againApply(Long taskId) {
return null;
}
}

View File

@@ -0,0 +1,6 @@
/**
* 任务模板父类
* @Author: liyongde
* @Date: 2026/7/15 11:03
*/
package cn.code.nl.framework.execute;