From 1dca57c0f15c3cdfbebf14ad1e9e04d8c84e775c Mon Sep 17 00:00:00 2001
From: skyouc <958836976@qq.com>
Date: 星期六, 07 三月 2026 09:51:47 +0800
Subject: [PATCH] no message
---
src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java | 46 +++++++++++++++++++++++++++++++++++-----------
1 files changed, 35 insertions(+), 11 deletions(-)
diff --git a/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
index e87e8f8..f2664f7 100644
--- a/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
@@ -31,7 +31,6 @@
import com.zy.common.utils.HttpHandler;
import com.zy.system.entity.Config;
import com.zy.system.service.ConfigService;
-import com.zy.system.service.impl.ConfigServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
@@ -1328,8 +1327,12 @@
throw new CoolException("璇锋鏌ョ洰鏍囧簱浣嶆槸鍚﹂棽缃腑锛侊紒");
}
+ String taskType = "M2";
+ if (!params.getIsNewIn().isEmpty()) {
+ taskType = "M1";
+ }
try {
- generateAgvTask("agv", locCache, params.getOrgSite(), params.getBarcode(), userId);
+ generateAgvTask("agv", locCache, params.getOrgSite(), params.getBarcode(), userId, taskType);
} catch (Exception e) {
throw new CoolException(e.getMessage());
}
@@ -1420,7 +1423,7 @@
generateCacheOutTask(station, locCache, userId);
/**鐢熸垚绔嬪簱鍑哄簱浠诲姟*/
- generateCRNOutTask(station, locCache, userId);
+ // generateCRNOutTask(station, locCache, userId);
return R.ok();
}
@@ -1510,7 +1513,7 @@
Task task = new Task();
task.setWrkNo(workNo)
.setIoTime(new Date())
- .setWrkSts(1L) // 宸ヤ綔鐘舵�侊細11.鐢熸垚鍑哄簱ID
+ .setWrkSts(201L) // 宸ヤ綔鐘舵�侊細11.鐢熸垚鍏ュ簱搴揑D
.setIoType(1) // 鍏ュ嚭搴撶姸鎬侊細 11.搴撴牸绉昏浇
.setTaskType("agv")
.setIoPri(10D)
@@ -1817,12 +1820,14 @@
throw new CoolException("瀹瑰櫒缂栫爜鏈淮鎶わ紝璇风淮鎶ゅ悗鍐嶆搷浣滐紒锛�");
}
- Integer whsType = 1;
+ Integer whsType = 2;
+ Short lcoType = 1;
//鐢ㄤ簬鍒ゆ柇鏂欑鎵樼洏锛屾枡绠憋紝绗兼
- if (container.getType().equals(ContainerType.CONTAINER_TYPE_SALVER.type)) {
- whsType = 3;
- } else if (container.getType().equals(ContainerType.CONTAINER_TYPE_CAGE.type)) {
+ if (!container.getType().equals(ContainerType.CONTAINER_TYPE_BOX.type)) {
whsType = 2;
+ if (container.getType().equals(ContainerType.CONTAINER_TYPE_SALVER.type)) {
+ lcoType = 2;
+ }
}
WrkMast barcode = wrkMastService.selectOne(new EntityWrapper<WrkMast>().eq("barcode", param.getBarcode()));
@@ -1855,7 +1860,7 @@
throw new CoolException("鏁版嵁閿欒,缁勬嫋妗e凡涓嶅瓨鍦�!!");
}
- WrkMast wrkMast = generateCrnInTask(waitPakins, whsType, station, param.getLocType1(), userId);
+ WrkMast wrkMast = generateCrnInTask(waitPakins, whsType, station, lcoType, userId);
response.put("taskNo", wrkMast.getWrkNo());
response.put("locNo", wrkMast.getLocNo());
@@ -2484,7 +2489,7 @@
* @version 1.0
*/
@Transactional(rollbackFor = Exception.class)
- public void generateAgvTask(String type, LocCache loc, String orgSite, String barcode, Long userId) {
+ public void generateAgvTask(String type, LocCache loc, String orgSite, String barcode, Long userId, String isNewIn) {
List<Task> tasks = taskService.selectList(new EntityWrapper<Task>().eq("barcode", barcode));
if (!tasks.isEmpty()) {
throw new CoolException("鎵樼洏宸插湪浠诲姟鎵ц涓�..");
@@ -2499,6 +2504,7 @@
.setIoType(1) // 鍏ュ嚭搴撶姸鎬侊細 11.搴撴牸绉昏浇
.setTaskType("agv")
.setIoPri(10D)
+ .setIsNewIn(isNewIn)
.setLocNo(loc.getLocNo()) // 鐩爣搴撲綅
.setFullPlt("Y") // 婊℃澘锛歒
.setPicking("N") // 鎷f枡
@@ -2665,7 +2671,7 @@
try {
//绌哄彴杞﹀洖搴�
- generateAgvTask("agv_back", locCache, callAgvBackParam.getOrgSite(), station.getBarcode(), userId);
+ generateAgvTask("agv_back", locCache, callAgvBackParam.getOrgSite(), station.getBarcode(), userId, "M2");
} catch (Exception e) {
e.printStackTrace();
return R.error(e.getMessage());
@@ -2800,6 +2806,24 @@
}
/**
+ * 鑾峰彇缂撳瓨绔欑偣淇℃伅
+ * @param type
+ * @return
+ */
+ @Override
+ public R getCacheSites(String type) {
+ BasAreas areas = basAreasService.selectOne(new EntityWrapper<BasAreas>().eq("whs_type_id", type));
+ if (Objects.isNull(areas)) {
+ return R.error("搴撳尯涓嶅瓨鍦紒");
+ }
+ List<BasStation> stations = basStationService.selectList(new EntityWrapper<BasStation>().eq("area_id", areas.getId()));
+ if (Objects.isNull(stations) || stations.isEmpty()) {
+ return R.error("绔欑偣涓嶅瓨鍦紒");
+ }
+ return R.ok("鏌ヨ鎴愬姛").add(stations);
+ }
+
+ /**
* 鐢熸垚绉诲簱浠诲姟
*
* @param result
--
Gitblit v1.9.1