From 29de5e9bf0fcd2771836f3135214e9de9e7f5204 Mon Sep 17 00:00:00 2001
From: 1 <1@123>
Date: 星期三, 14 一月 2026 16:46:55 +0800
Subject: [PATCH] lsh#
---
rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/PdaOutStockServiceImpl.java | 58 +++++++++++++++++++++++++++++++++++++++++++++-------------
1 files changed, 45 insertions(+), 13 deletions(-)
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/PdaOutStockServiceImpl.java b/rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/PdaOutStockServiceImpl.java
index 69e3f30..893c0c6 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/PdaOutStockServiceImpl.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/PdaOutStockServiceImpl.java
@@ -1,6 +1,8 @@
package com.vincent.rsf.server.api.service.impl;
+import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.generator.config.IFileCreate;
import com.vincent.rsf.framework.common.Cools;
import com.vincent.rsf.framework.common.R;
import com.vincent.rsf.framework.exception.CoolException;
@@ -13,6 +15,7 @@
import com.vincent.rsf.server.manager.enums.StationTypeEnum;
import com.vincent.rsf.server.manager.enums.TaskStsType;
import com.vincent.rsf.server.manager.service.*;
+import com.vincent.rsf.server.manager.service.impl.BasContainerServiceImpl;
import lombok.Synchronized;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
@@ -41,6 +44,10 @@
private WaveOrderRelaService waveOrderRelaService;
@Autowired
private BasStationService basStationService;
+ @Autowired
+ private LocService locService;
+ @Autowired
+ private BasContainerServiceImpl basContainerService;
@Override
public R getOutStockTaskItem(String barcode) {
@@ -239,22 +246,47 @@
if (!basStation.getUseStatus().equals("O")) {
throw new CoolException("绔欑偣鐘舵�佷笉涓虹┖闂�");
}
- //瀹瑰櫒绫诲瀷鏌ヨ 璧风偣
- if (basStation.getType().equals(StationTypeEnum.STATION_TYPE_MUTI.type)) {
- //鍏夌數绔欑偣锛�
- Long area = basStation.getArea();
- //鏄惁闇�瑕佽浆闈炲厜鐢电珯鐐�
- //绔嬪簱鍑哄簱==銆嬬粨鏉�
- //AGV==銆嬬珛搴�==銆嬬粨鏉�
- } else {
- //闈炲厜鐢电珯鐐�
- //鏄惁闇�瑕佽浆鍏夌數绔欑偣
- //AGV==銆嬬粨鏉�
- //绔嬪簱鍑哄簱==銆婣GV==銆嬬粨鏉�
+ List<Long> areaList = JSONObject.parseArray(basStation.getCrossZoneArea(), Long.class);
+ if (Cools.isEmpty(areaList)){
+ throw new CoolException("褰撳墠绔欑偣搴撳尯鏈厤缃�");
}
- return R.ok();
+ BasContainer basContainer = basContainerService.getOne(new LambdaQueryWrapper<BasContainer>()
+ .in(BasContainer::getContainerType, containerWaveParam.getType(), false));
+ if (Cools.isEmpty(basContainer)){
+ throw new CoolException("鏈煡璇㈠埌鐩稿叧瀹瑰櫒瑙勫垯");
+ }
+ String barcodeType = "barcode REGEXP "+basContainer.getCodeType();
+ //瀹瑰櫒绫诲瀷鏌ヨ 璧风偣
+ Loc loc = locService.getOne(new LambdaQueryWrapper<Loc>()
+ .apply(barcodeType)
+ .eq(Loc::getDeleted, 0)
+ .eq(Loc::getStatus, 1)
+ .in(Loc::getAreaId, areaList)
+ .eq(Loc::getUseStatus, "O")
+ .orderByDesc(Loc::getId)
+ .last("LIMIT 1"),
+ false);
+
+ if (Cools.isEmpty(loc)){
+ throw new CoolException("鏈煡璇㈠埌绗﹀悎鏉′欢鐨勬墭鐩�");
+ }
+// if (basStation.getType().equals(StationTypeEnum.STATION_TYPE_MUTI.type)) {
+// //鍏夌數绔欑偣锛�
+// Long area = basStation.getArea();
+// //鏄惁闇�瑕佽浆闈炲厜鐢电珯鐐�
+// //绔嬪簱鍑哄簱==銆嬬粨鏉�
+// //AGV==銆嬬珛搴�==銆嬬粨鏉�
+// } else {
+// //闈炲厜鐢电珯鐐�
+// //鏄惁闇�瑕佽浆鍏夌數绔欑偣
+// //AGV==銆嬬粨鏉�
+// //绔嬪簱鍑哄簱==銆婣GV==銆嬬粨鏉�
+//
+// }
+
+ return R.ok().add(loc);
}
--
Gitblit v1.9.1