From f724dbc26925496767356a63b93d9e5fdc77633c Mon Sep 17 00:00:00 2001
From: 1 <1@123>
Date: 星期四, 29 一月 2026 11:07:33 +0800
Subject: [PATCH] lsh#
---
rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/TaskServiceImpl.java | 91 ++++++++++++++++++++++++++++++++++++++-------
1 files changed, 76 insertions(+), 15 deletions(-)
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/TaskServiceImpl.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/TaskServiceImpl.java
index 4c06ba8..c921c1a 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/TaskServiceImpl.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/TaskServiceImpl.java
@@ -125,7 +125,7 @@
@Override
@Transactional(rollbackFor = Exception.class)
- public synchronized R generateAGVTasks(WaitPakin pakins, String locCode, String orgSta, Long loginUserId) {
+ public synchronized R generateAGVTasks(WaitPakin pakins, String locCode, String orgSta,String targSite, Long loginUserId) {
if (Cools.isEmpty(pakins) || Cools.isEmpty(locCode)) {
throw new CoolException("鍙傛暟涓嶈兘涓虹┖锛侊紒");
}
@@ -154,7 +154,7 @@
.setTaskType(TaskType.TASK_TYPE_IN.type)
.setWarehType(WarehType.WAREHOUSE_TYPE_AGV.val)
.setTargLoc(targetLoc)
- .setTargSite(orgSta)
+ .setTargSite(targSite)
.setOrgSite(orgSta)
.setBarcode(pakin.getBarcode())
.setCreateBy(loginUserId)
@@ -183,6 +183,14 @@
.setUpdateBy(loginUserId)
.setExtendFields(item.getExtendFields())
.setOrderId(item.getAsnId())
+ .setBatch(item.getBatch())
+ .setSplrBatch(item.getBatch())
+ .setPlatWorkCode(item.getPlatWorkCode())
+ .setPlatItemId(item.getPlatItemId())
+ .setOrderId(item.getAsnId())
+ .setSplrBatch(item.getBatch())
+ .setPlatWorkCode(item.getPlatWorkCode())
+ .setPlatItemId(item.getPlatItemId())
.setOrderItemId(item.getAsnItemId());
taskItems.add(taskItem);
});
@@ -271,6 +279,9 @@
.setUpdateBy(loginUserId)
.setExtendFields(item.getExtendFields())
.setOrderId(item.getAsnId())
+ .setSplrBatch(item.getBatch())
+ .setPlatWorkCode(item.getPlatWorkCode())
+ .setPlatItemId(item.getPlatItemId())
.setOrderItemId(item.getAsnItemId());
taskItems.add(taskItem);
});
@@ -424,6 +435,9 @@
.setUpdateBy(loginUserId)
.setExtendFields(item.getExtendFields())
.setOrderId(item.getAsnId())
+ .setSplrBatch(item.getBatch())
+ .setPlatWorkCode(item.getPlatWorkCode())
+ .setPlatItemId(item.getPlatItemId())
.setOrderItemId(item.getAsnItemId());
taskItems.add(taskItem);
});
@@ -688,6 +702,9 @@
.setUpdateBy(loginUserId)
.setExtendFields(item.getExtendFields())
.setOrderId(item.getAsnId())
+ .setSplrBatch(item.getBatch())
+ .setPlatWorkCode(item.getPlatWorkCode())
+ .setPlatItemId(item.getPlatItemId())
.setOrderItemId(item.getAsnItemId());
taskItems.add(taskItem);
});
@@ -741,7 +758,7 @@
} else if (task.getTaskType().equals(TaskType.TASK_TYPE_LOC_MOVE.type)) {
//绉诲簱
moveInStock(task, loginUserId);
- } else if (task.getTaskType().equals(TaskType.TASK_TYPE_EMPITY_IN.type)) {
+ } else if (task.getTaskType().equals(TaskType.TASK_TYPE_EMPTY_IN.type)) {
//绉诲簱
complateInstockE(task, loginUserId);
}
@@ -797,7 +814,7 @@
// if (task.getTaskType().equals(TaskType.TASK_TYPE_LOC_MOVE.type)) {
// task.setTaskStatus(TaskStsType.COMPLETE_OUT.id);
// } else {
- task.setTaskStatus(task.getTaskType() < 100 ? TaskStsType.COMPLETE_IN.id : TaskStsType.AWAIT.id);
+ task.setTaskStatus(task.getTaskType() < 100 ? TaskStsType.COMPLETE_IN.id : task.getTaskType()==101? TaskStsType.COMPLETE_OUT.id:TaskStsType.AWAIT.id);
// }
if (!this.updateById(task)) {
throw new CoolException("瀹屾垚浠诲姟澶辫触");
@@ -813,7 +830,7 @@
*/
private Task modiftyTaskSort(Task task, Long loginUserId) {
String curLoc;
- if (task.getTaskType().equals(TaskType.TASK_TYPE_IN.type) || task.getTaskType().equals(TaskType.TASK_TYPE_EMPITY_IN.type)) {
+ if (task.getTaskType().equals(TaskType.TASK_TYPE_IN.type) || task.getTaskType().equals(TaskType.TASK_TYPE_EMPTY_IN.type)) {
curLoc = task.getTargLoc();
} else {
curLoc = task.getOrgLoc();
@@ -964,7 +981,12 @@
for (Task task : tasks) {
//鍑哄簱浠诲姟
try {
- complateOutStock(task, loginUserId);
+ if (task.getTaskType().equals(TaskType.TASK_TYPE_EMPTY_OUT.type)) {
+ //110.绌烘澘鍑哄簱
+ complateOutStockEmpty(task, loginUserId);
+ } else {
+ complateOutStock(task, loginUserId);
+ }
} catch (Exception e) {
log.error(e.getMessage(), e);
// throw new CoolException(e.getMessage());
@@ -1051,8 +1073,8 @@
public R removeTask(Long[] ids, Long loginUserId) {
List<Integer> longs = Arrays.asList(TaskStsType.GENERATE_IN.id, TaskStsType.GENERATE_OUT.id);
List<Integer> list = Arrays.asList(TaskType.TASK_TYPE_IN.type, TaskType.TASK_TYPE_OUT.type, TaskType.TASK_TYPE_PICK_AGAIN_OUT.type,
- TaskType.TASK_TYPE_CHECK_OUT.type, TaskType.TASK_TYPE_EMPITY_IN.type, TaskType.TASK_TYPE_LOC_MOVE.type,
- TaskType.TASK_TYPE_EMPITY_OUT.type, TaskType.TASK_TYPE_MERGE_OUT.type);
+ TaskType.TASK_TYPE_CHECK_OUT.type, TaskType.TASK_TYPE_EMPTY_IN.type, TaskType.TASK_TYPE_LOC_MOVE.type,
+ TaskType.TASK_TYPE_EMPTY_OUT.type, TaskType.TASK_TYPE_MERGE_OUT.type);
List<Task> tasks = this.list(new LambdaQueryWrapper<Task>()
.in(Task::getTaskType, list)
.in(Task::getId, ids)
@@ -1126,7 +1148,7 @@
if (!Objects.isNull(task.getWarehType()) && task.getWarehType().equals(WarehType.WAREHOUSE_TYPE_AGV.val)) {
BasStation basStation = null;
- if (task.getTaskType().equals(TaskType.TASK_TYPE_IN.type) || task.getTaskType().equals(TaskType.TASK_TYPE_EMPITY_IN.type)) {
+ if (task.getTaskType().equals(TaskType.TASK_TYPE_IN.type) || task.getTaskType().equals(TaskType.TASK_TYPE_EMPTY_IN.type)) {
basStation = basStationService.getOne(new LambdaQueryWrapper<BasStation>()
.eq(BasStation::getStationName, task.getOrgSite())
.eq(BasStation::getUseStatus, LocStsType.LOC_STS_TYPE_R.type));
@@ -1134,7 +1156,7 @@
|| task.getTaskType().equals(TaskType.TASK_TYPE_PICK_AGAIN_OUT.type)
|| task.getTaskType().equals(TaskType.TASK_TYPE_MERGE_OUT.type)
|| task.getTaskType().equals(TaskType.TASK_TYPE_CHECK_OUT.type)
- || task.getTaskType().equals(TaskType.TASK_TYPE_EMPITY_OUT.type)) {
+ || task.getTaskType().equals(TaskType.TASK_TYPE_EMPTY_OUT.type)) {
basStation = basStationService.getOne(new LambdaQueryWrapper<BasStation>()
.eq(BasStation::getStationName, task.getTargLoc())
.eq(BasStation::getUseStatus, LocStsType.LOC_STS_TYPE_R.type));
@@ -1545,6 +1567,45 @@
/**
* @author Ryan
* @date 2025/5/20
+ * @description: 瀹屾垚鍑哄簱浠诲姟锛屾洿鏂板嚭搴撳簱瀛樹俊鎭�
+ * @version 1.0
+ */
+ @Synchronized
+ @Transactional(rollbackFor = Exception.class)
+ public void complateOutStockEmpty(Task task, Long loginUserId) throws Exception {
+ if (Objects.isNull(task)) {
+ throw new CoolException("鍙傛暟涓嶈兘涓虹┖锛侊紒");
+ }
+ Loc loc = locService.getOne(new LambdaQueryWrapper<Loc>().eq(Loc::getCode, task.getOrgLoc()));
+ if (Objects.isNull(loc)) {
+ throw new CoolException("搴撲綅涓嶅瓨鍦紒锛�");
+ }
+ if (!loc.getUseStatus().equals(LocStsType.LOC_STS_TYPE_R.type)) {
+ throw new CoolException("搴撲綅鐘舵�佷笉澶勭悊浜嶳.鍑哄簱棰勭害锛侊紒");
+ }
+
+ /**淇敼涓哄簱浣嶇姸鎬佷负O.绌哄簱*/
+ if (!locService.update(new LambdaUpdateWrapper<Loc>()
+ .set(Loc::getUseStatus, LocStsType.LOC_STS_TYPE_O.type)
+ .set(Loc::getBarcode, null)
+ .set(Loc::getUpdateBy, loginUserId)
+ .set(Loc::getUpdateTime, new Date())
+ .eq(Loc::getId, loc.getId()))) {
+ throw new CoolException("搴撲綅鐘舵�佷慨鏀瑰け璐ワ紒锛�");
+ }
+
+ if (!this.update(new LambdaUpdateWrapper<Task>()
+ .eq(Task::getId, task.getId())
+ .set(Task::getUpdateBy, loginUserId)
+ .set(Task::getUpdateTime, new Date())
+ .set(Task::getTaskStatus, TaskStsType.WAVE_SEED.id))) {
+ throw new CoolException("搴撳瓨鐘舵�佹洿鏂板け璐ワ紒锛�");
+ }
+ }
+
+ /**
+ * @author Ryan
+ * @date 2025/5/20
* @description: 鍑哄簱淇℃伅淇濆瓨鑷冲簱瀛樻槑缁嗚〃
* @version 1.0
*/
@@ -1698,7 +1759,7 @@
itemParam.setOriLoc(task.getOrgLoc()).setDestLoc(task.getTargLoc());
} else if (task.getTaskType().equals(TaskType.TASK_TYPE_IN.type)
|| task.getTaskType().equals(TaskType.TASK_TYPE_MERGE_IN.type)
- || task.getTaskType().equals(TaskType.TASK_TYPE_EMPITY_IN.type)) {
+ || task.getTaskType().equals(TaskType.TASK_TYPE_EMPTY_IN.type)) {
/**鍏ㄦ澘鍏ュ簱鍙傛暟*/
itemParam.setDestLoc(task.getTargLoc())
.setOriSta(task.getOrgSite());
@@ -1708,7 +1769,7 @@
.setOriSta(task.getTargSite());
} else if (task.getTaskType().equals(TaskType.TASK_TYPE_OUT.type)
|| task.getTaskType().equals(TaskType.TASK_TYPE_PICK_AGAIN_OUT.type)
- || task.getTaskType().equals(TaskType.TASK_TYPE_EMPITY_OUT.type)
+ || task.getTaskType().equals(TaskType.TASK_TYPE_EMPTY_OUT.type)
|| task.getTaskType().equals(TaskType.TASK_TYPE_CHECK_OUT.type)
|| task.getTaskType().equals(TaskType.TASK_TYPE_MERGE_OUT.type)) {
/**鍑哄簱鍙傛暟*/
@@ -1760,7 +1821,7 @@
if (task.getTaskType().equals(TaskType.TASK_TYPE_IN.type)
|| task.getTaskType().equals(TaskType.TASK_TYPE_PICK_IN.type)
|| task.getTaskType().equals(TaskType.TASK_TYPE_CHECK_IN.type)
- || task.getTaskType().equals(TaskType.TASK_TYPE_EMPITY_IN.type)
+ || task.getTaskType().equals(TaskType.TASK_TYPE_EMPTY_IN.type)
|| task.getTaskType().equals(TaskType.TASK_TYPE_MERGE_IN.type)
|| task.getTaskType().equals(TaskType.TASK_TYPE_LOC_MOVE.type)) {
@@ -1786,7 +1847,7 @@
} else if (task.getTaskType().equals(TaskType.TASK_TYPE_OUT.type)
|| task.getTaskType().equals(TaskType.TASK_TYPE_CHECK_OUT.type)
|| task.getTaskType().equals(TaskType.TASK_TYPE_MERGE_OUT.type)
- || task.getTaskType().equals(TaskType.TASK_TYPE_EMPITY_OUT.type)
+ || task.getTaskType().equals(TaskType.TASK_TYPE_EMPTY_OUT.type)
|| task.getTaskType().equals(TaskType.TASK_TYPE_PICK_AGAIN_OUT.type)) {
BasStation curSta = basStationService.getOne(new LambdaQueryWrapper<BasStation>().eq(BasStation::getStationName, task.getTargSite()));
if (Objects.isNull(curSta)) {
@@ -2027,7 +2088,7 @@
if (task.getTaskType().equals(TaskType.TASK_TYPE_IN.type) ||
task.getTaskType().equals(TaskType.TASK_TYPE_MERGE_IN.type) ||
task.getTaskType().equals(TaskType.TASK_TYPE_LOC_MOVE.type) ||
- task.getTaskType().equals(TaskType.TASK_TYPE_EMPITY_IN.type) ||
+ task.getTaskType().equals(TaskType.TASK_TYPE_EMPTY_IN.type) ||
task.getTaskType().equals(TaskType.TASK_TYPE_CHECK_IN.type)) {
stock.setLocCode(task.getTargLoc());
} else {
--
Gitblit v1.9.1