Merge remote-tracking branch 'origin/feature/20260713/task-module'
# Conflicts: # nl-module-system/nl-module-system-server/src/main/resources/application-dev.yaml # pom.xml
This commit is contained in:
@@ -0,0 +1,80 @@
|
||||
package cn.code.nl.module.lms.demo;
|
||||
|
||||
import cn.code.nl.framework.common.pojo.CommonResult;
|
||||
import cn.code.nl.framework.execute.biz.api.lms.LmsTaskCommonApi;
|
||||
import cn.code.nl.framework.execute.biz.dto.TaskStatusCallApiReqDTO;
|
||||
import cn.code.nl.framework.execute.biz.vo.AcsApplyActionRespVO;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import static cn.code.nl.framework.common.pojo.CommonResult.success;
|
||||
|
||||
/**
|
||||
*
|
||||
* @Author: liyongde
|
||||
* @Date: 2026/7/15 15:25
|
||||
*/
|
||||
@RestController // 提供 RESTful API 接口,给 Feign 调用
|
||||
@Validated
|
||||
public class DemoApi implements LmsTaskCommonApi {
|
||||
@Override
|
||||
public CommonResult<AcsApplyActionRespVO> doHandlePicked(TaskStatusCallApiReqDTO taskStatusCallApiReqDTO) {
|
||||
// 构建外层VO
|
||||
AcsApplyActionRespVO respVO = new AcsApplyActionRespVO();
|
||||
respVO.setTaskId(10001L);
|
||||
respVO.setTaskCode("ACS20260716001");
|
||||
// 内层data赋值 "success"
|
||||
return success(respVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<AcsApplyActionRespVO> doHandleApplyAgain(TaskStatusCallApiReqDTO taskStatusCallApiReqDTO) {
|
||||
DemoRespVO demoRespVO = new DemoRespVO();
|
||||
demoRespVO.setTargetPoint("A_10001");
|
||||
|
||||
// 构建外层VO
|
||||
AcsApplyActionRespVO respVO = new AcsApplyActionRespVO();
|
||||
respVO.setTaskId(10001L);
|
||||
respVO.setTaskCode("ACS20260716001");
|
||||
// 内层data赋值 "success"
|
||||
respVO.setData(JSON.parseObject(JSON.toJSONString(demoRespVO)));
|
||||
return success(respVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<AcsApplyActionRespVO> doHandleRequestRelease(TaskStatusCallApiReqDTO taskStatusCallApiReqDTO) {
|
||||
// 构建外层VO
|
||||
AcsApplyActionRespVO respVO = new AcsApplyActionRespVO();
|
||||
respVO.setTaskId(10001L);
|
||||
respVO.setTaskCode("ACS20260716001");
|
||||
return success(respVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<AcsApplyActionRespVO> doHandleRequestPick(TaskStatusCallApiReqDTO taskStatusCallApiReqDTO) {
|
||||
// 构建外层VO
|
||||
AcsApplyActionRespVO respVO = new AcsApplyActionRespVO();
|
||||
respVO.setTaskId(10001L);
|
||||
respVO.setTaskCode("ACS20260716001");
|
||||
return success(respVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<AcsApplyActionRespVO> doHandleRequestLeave(TaskStatusCallApiReqDTO taskStatusCallApiReqDTO) {
|
||||
// 构建外层VO
|
||||
AcsApplyActionRespVO respVO = new AcsApplyActionRespVO();
|
||||
respVO.setTaskId(10001L);
|
||||
respVO.setTaskCode("ACS20260716001");
|
||||
return success(respVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<AcsApplyActionRespVO> doHandleRequestEnter(TaskStatusCallApiReqDTO taskStatusCallApiReqDTO) {
|
||||
// 构建外层VO
|
||||
AcsApplyActionRespVO respVO = new AcsApplyActionRespVO();
|
||||
respVO.setTaskId(10001L);
|
||||
respVO.setTaskCode("ACS20260716001");
|
||||
return success(respVO);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package cn.code.nl.module.lms.demo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
* @Author: liyongde
|
||||
* @Date: 2026/7/16 17:51
|
||||
*/
|
||||
@Data
|
||||
public class DemoRespVO {
|
||||
private String targetPoint;
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package cn.code.nl.module.lms.demo;
|
||||
|
||||
import cn.code.nl.framework.execute.core.AbstractTask;
|
||||
import cn.code.nl.framework.execute.core.dto.TaskExecuteDTO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 案例代码
|
||||
* @Author: liyongde
|
||||
* @Date: 2026/7/15 14:30
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class DemoTask extends AbstractTask {
|
||||
|
||||
@Override
|
||||
public void doHandleFinish(TaskExecuteDTO taskExecuteDTO) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doHandleCancel(TaskExecuteDTO taskExecuteDTO) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String againApply(TaskExecuteDTO taskExecuteDTO) {
|
||||
return "A_0001";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user