feat:出库单一键设置功能及移库单CRUD

This commit is contained in:
zhouz
2026-07-28 16:21:22 +08:00
parent 9e43129c37
commit 04ffd865a3
56 changed files with 2638 additions and 23 deletions

View File

@@ -69,4 +69,9 @@ public class TransportTaskApiImpl implements TransportTaskApi {
public CommonResult<List<TaskInfoDTO>> getRunningTaskByMaterialCode(String materialCode, String ownerService) {
return success(transportTaskService.getRunningTaskInfoByMaterialCode(materialCode, ownerService));
}
@Override
public CommonResult<Long> countUnfinishedByDestination(String pointCode, String ownerService) {
return success(transportTaskService.countUnfinishedByDestination(pointCode, ownerService));
}
}

View File

@@ -109,6 +109,14 @@ public interface TransportTaskMapper extends BaseMapperX<TransportTaskDO> {
.orderByDesc(TransportTaskDO::getTaskId));
}
default Long selectUnfinishedCountByDestination(String pointCode, String ownerService) {
return selectCount(new LambdaQueryWrapperX<TransportTaskDO>()
.eq(TransportTaskDO::getPointCode2, pointCode)
.eq(TransportTaskDO::getOwnerService, ownerService)
.lt(TransportTaskDO::getTaskStatus,
TransportTaskStatusEnum.FINISHED_CALLBACK_PENDING.getCode()));
}
/**
* 条件更新任务状态CAS 抢占)
*/

View File

@@ -1,11 +1,16 @@
package cn.code.nl.module.task.framework.rpc.config;
import cn.code.nl.module.base.api.classstandard.ClassStandardApi;
import cn.code.nl.module.base.api.codegen.CodeGenApi;
import cn.code.nl.module.infra.api.config.ConfigApi;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Configuration;
/**
* Task 服务 RPC 配置
* Feign Client 注册已移至框架层 {@link cn.code.nl.framework.execute.config.NlExecuteRpcAutoConfiguration}
* 框架通用 Feign Client 由框架层注册Task 业务直接依赖的 Client 在此注册。
*/
@Configuration(value = "taskRpcConfiguration", proxyBeanMethods = false)
@EnableFeignClients(clients = {ConfigApi.class, ClassStandardApi.class, CodeGenApi.class})
public class RpcConfiguration {
}

View File

@@ -123,6 +123,8 @@ public interface TransportTaskService {
*/
List<TaskInfoDTO> getRunningTaskInfoByMaterialCode(String materialCode, String ownerService);
Long countUnfinishedByDestination(String pointCode, String ownerService);
/**
* 自动下发待下发任务到 ACS
*/

View File

@@ -230,6 +230,11 @@ public class TransportTaskServiceImpl implements TransportTaskService {
return TransportTaskConvert.INSTANCE.convertList(tasks);
}
@Override
public Long countUnfinishedByDestination(String pointCode, String ownerService) {
return transportTaskMapper.selectUnfinishedCountByDestination(pointCode, ownerService);
}
/**
* 查询待下发任务,并委托下发管理器按生产区域下发到 ACS
*/

View File

@@ -7,12 +7,12 @@ spring:
username: nacos
password: nacos
discovery: # 【注册中心】配置项
namespace: dev # 命名空间。这里使用 dev 开发环境
namespace: 91c8ac41-7fb0-423b-947e-2caad4c87d41 # 命名空间。这里使用 dev 开发环境
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
metadata:
version: 1.0.0 # 服务实例的版本号,可用于灰度发布
config: # 【配置中心】配置项
namespace: dev # 命名空间。这里使用 dev 开发环境
namespace: 91c8ac41-7fb0-423b-947e-2caad4c87d41 # 命名空间。这里使用 dev 开发环境
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
--- #################### 数据库相关配置 ####################
@@ -57,12 +57,12 @@ spring:
primary: master
datasource:
master:
url: jdbc:mysql://192.168.81.193:3306/huachuang_lms_dev?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
url: jdbc:mysql://127.0.0.1:3306/huachuang_lms_dev?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
username: root
password: root
slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
lazy: true # 开启懒加载,保证启动速度
url: jdbc:mysql://192.168.81.193:3306/huachuang_lms_dev?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
url: jdbc:mysql://127.0.0.1:3306/huachuang_lms_dev?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
username: root
password: root
@@ -100,11 +100,11 @@ spring:
xxl:
job:
admin:
addresses: http://192.168.10.2:8080/xxl-job-admin # 调度中心部署跟地址
accessToken: 123456 # 执行器通讯TOKEN
addresses: http://192.168.81.193:8080/xxl-job-admin # 调度中心部署跟地址
accessToken: default_token # 执行器通讯TOKEN
executor:
ip: 192.168.10.2
port: 9994
ip: localhost
port: 8995
--- #################### 服务保障相关配置 ####################

View File

@@ -36,7 +36,7 @@ spring:
time-to-live: 1h # 设置过期时间为 1 小时
server:
port: 48084
port: 48086
logging:
file: