From a42feaaf6cec14828b291214cc10cf72ab26b309 Mon Sep 17 00:00:00 2001
From: zc <zyzc>
Date: 星期三, 12 十一月 2025 16:41:14 +0800
Subject: [PATCH] 波次下发功能优化
---
rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/WaveServiceImpl.java | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/WaveServiceImpl.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/WaveServiceImpl.java
index b833343..42fe873 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/WaveServiceImpl.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/WaveServiceImpl.java
@@ -95,6 +95,7 @@
params.add(locParams);
}
List<OrderOutItemDto> results = LocManageUtil.getOutOrderList(params, null);
+ /**鐢熸垚娉㈡浠诲姟**/
generateOutTask(results, loginUserId, waves);
} catch (Exception e) {
log.error(e.getMessage());
@@ -129,7 +130,7 @@
throw new CoolException("鏁版嵁閿欒锛� 娉㈡涓嶅瓨鍦紒锛�");
}
for (Wave wave : waves) {
- if (wave.getExceStatus() >= WaveExceStatus.WAVE_EXCE_STATUS_EXCING.val) {
+ if (wave.getExceStatus() > WaveExceStatus.WAVE_EXCE_STATUS_EXCING.val) {
throw new CoolException("褰撳墠鐘舵�佹棤娉曚笅鍙戞墽琛岋紒锛�");
}
@@ -207,6 +208,7 @@
.set(Wave::getExceStatus, WaveExceStatus.WAVE_EXCE_STATUS_TASK.val)
.set(Wave::getWorkQty, taskItems.stream().mapToDouble(TaskItem::getAnfme).sum())
.set(Wave::getUpdateBy, loginUserId)
+ .set(Wave::getMemo, null)
.set(Wave::getUpdateTime, new Date())
.eq(Wave::getId, wave.getId()))) {
throw new CoolException("娉㈡鐘舵�佷慨鏀瑰け璐ワ紒锛�");
@@ -284,10 +286,12 @@
continue;
}
taskParams.setItems(Arrays.asList(itemDto.getLocItem()))
- .setSiteNo(itemDto.getSiteNo())
+ .setSiteNo(itemDto.getSitesNo())
.setType(Constants.TASK_TYPE_WAVE_OUT_STOCK)
.setSourceId(wave.getId())
.setTarLoc(loc.getCode());
+
+ //TODO 鐢熸垚鍑哄簱浠诲姟锛岃幏鍙栨尝娆″崟鎹俊鎭�
locItemService.generateTask(TaskResouceType.TASK_RESOUCE_WAVE_TYPE.val, taskParams, loginUserId);
}
}
@@ -349,9 +353,9 @@
.select("id", "loc_id", "loc_code", "order_id", "SUM(anfme) anfme", "SUM(qty) qty", "SUM(work_qty) work_qty", "splr_batch", "fields_index", "matnr_code")
.lambda()
.eq(LocItem::getMatnrCode, waveItem.getMatnrCode())
- .eq(LocItem::getSplrBatch, waveItem.getSplrBatch())
- .eq(StringUtils.isNotBlank(waveItem.getFieldsIndex()), LocItem::getFieldsIndex, waveItem.getFieldsIndex())
- .groupBy(LocItem::getMatnrCode, LocItem::getSplrBatch, LocItem::getFieldsIndex, LocItem::getId));
+ .eq(StringUtils.isNotEmpty(waveItem.getSplrBatch()), LocItem::getSplrBatch, waveItem.getSplrBatch())
+// .eq(StringUtils.isNotBlank(waveItem.getFieldsIndex()), LocItem::getFieldsIndex, waveItem.getFieldsIndex())
+ .groupBy(LocItem::getMatnrCode, LocItem::getSplrBatch, LocItem::getId));
List<Double> doubles1 = locItems.stream().map(LocItem::getAnfme).collect(Collectors.toList());
double[] doubles = doubles1.stream().mapToDouble(Double::doubleValue).toArray();
--
Gitblit v1.9.1