diff --git a/servo/src/main/java/com/yvan/workbench/controller/DeviceManager.java b/servo/src/main/java/com/yvan/workbench/controller/DeviceManager.java
new file mode 100644
index 0000000..34b57a2
--- /dev/null
+++ b/servo/src/main/java/com/yvan/workbench/controller/DeviceManager.java
@@ -0,0 +1,82 @@
+package com.yvan.workbench.controller;
+
+import com.galaxis.rcs.common.entity.LccBasExecutor;
+import com.galaxis.rcs.common.entity.LccBasLocation;
+import com.galaxis.rcs.common.entity.LccInvLedger;
+import com.querydsl.sql.SQLQuery;
+import com.yvan.workbench.model.request.QueryExecutorReq;
+import com.yvan.workbench.model.request.QueryInvLedgerReq;
+import com.yvan.workbench.model.request.QueryInvLpnReq;
+import com.yvan.workbench.model.request.QueryLocationReq;
+import org.apache.commons.lang3.StringUtils;
+import org.clever.core.model.request.QueryByPage;
+import org.clever.core.model.request.page.Page;
+import org.clever.data.jdbc.DaoFactory;
+import org.clever.data.jdbc.QueryDSL;
+import org.clever.data.jdbc.querydsl.utils.QueryDslUtils;
+
+import java.util.LinkedHashMap;
+import java.util.List;
+
+import static com.galaxis.rcs.common.query.QLccBasContainer.lccBasContainer;
+import static com.galaxis.rcs.common.query.QLccBasExecutor.lccBasExecutor;
+import static com.galaxis.rcs.common.query.QLccBasLocation.lccBasLocation;
+import static com.galaxis.rcs.common.query.QLccInvLedger.lccInvLedger;
+import static com.galaxis.rcs.common.query.QLccInvLpn.lccInvLpn;
+
+/**
+ * 作者:lizw
+ * 创建时间:2025/07/03 14:33
+ */
+public class DeviceManager {
+ private static final QueryDSL QUERY_DSL = DaoFactory.getQueryDSL();
+
+ public static List queryLocation(QueryLocationReq req) {
+ SQLQuery query = QUERY_DSL.selectFrom(lccBasLocation).orderBy(lccBasLocation.locCode.asc());
+ if (StringUtils.isNotBlank(req.getLocCode())) {
+ query.where(lccBasLocation.locCode.eq(req.getLocCode().trim()));
+ }
+ return query.fetch();
+ }
+
+ public static List queryExecutor(QueryExecutorReq req) {
+ SQLQuery query = QUERY_DSL.selectFrom(lccBasExecutor).orderBy(lccBasExecutor.executorId.asc());
+ if (StringUtils.isNotBlank(req.getVirtualFloorCode())) {
+ query.where(lccBasExecutor.executorId.eq(req.getVirtualFloorCode().trim()));
+ }
+ if (req.getIsActive() != null) {
+ query.where(lccBasExecutor.isActive.eq(req.getIsActive()));
+ }
+ return query.fetch();
+ }
+
+ public static Page> queryInvLpn(QueryInvLpnReq req) {
+ SQLQuery> query = QUERY_DSL.select(QueryDslUtils.linkedMap(lccInvLpn, lccBasLocation, lccBasContainer))
+ .from(lccInvLpn)
+ .innerJoin(lccBasLocation).on(
+ lccInvLpn.locCode.eq(lccBasLocation.locCode).and(
+ lccBasLocation.envId.eq(lccBasLocation.envId)
+ )
+ )
+ .innerJoin(lccBasContainer).on(
+ lccInvLpn.lpn.eq(lccInvLpn.lpn).and(
+ lccBasContainer.envId.eq(lccInvLpn.envId)
+ )
+ ).orderBy(lccInvLpn.lpn.asc());
+ if (StringUtils.isNotBlank(req.getLpn())) {
+ query.where(lccInvLpn.lpn.eq(req.getLpn().trim()));
+ }
+ if (StringUtils.isNotBlank(req.getLocCode())) {
+ query.where(lccInvLpn.locCode.eq(req.getLocCode().trim()));
+ }
+ return QueryDslUtils.queryByPage(query, QueryByPage.getCurrent());
+ }
+
+ public static Page queryInvLedger(QueryInvLedgerReq req) {
+ SQLQuery query = QUERY_DSL.selectFrom(lccInvLedger).orderBy(lccInvLedger.ledgerId.asc());
+ if (StringUtils.isNotBlank(req.getLpn())) {
+ query.where(lccInvLedger.lpn.eq(req.getLpn().trim()));
+ }
+ return QueryDslUtils.queryByPage(query, QueryByPage.getCurrent());
+ }
+}
diff --git a/servo/src/main/java/com/yvan/workbench/controller/RcsController.java b/servo/src/main/java/com/yvan/workbench/controller/RcsController.java
index c79b177..026d892 100644
--- a/servo/src/main/java/com/yvan/workbench/controller/RcsController.java
+++ b/servo/src/main/java/com/yvan/workbench/controller/RcsController.java
@@ -25,6 +25,17 @@ import java.util.Map;
public class RcsController {
static final SnowFlake snowFlake = new SnowFlake();
+ public static R> agvIsFree(@RequestBody Map params) {
+ Object ret = getCommonParamAndCreateBizTask(params);
+ if (ret instanceof R) {
+ // 异常
+ return (R