From cfe049492f81d2c650a2b17348593edbc5054498 Mon Sep 17 00:00:00 2001
From: zhou zhou <3272660260@qq.com>
Date: 星期三, 18 三月 2026 07:52:44 +0800
Subject: [PATCH] #3.5
---
rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/WaitPakinServiceImpl.java | 27 +++++++++++++--------------
1 files changed, 13 insertions(+), 14 deletions(-)
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/WaitPakinServiceImpl.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/WaitPakinServiceImpl.java
index 26810ba..552d605 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/WaitPakinServiceImpl.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/WaitPakinServiceImpl.java
@@ -8,6 +8,7 @@
import com.vincent.rsf.server.manager.controller.params.WaitPakinParam;
import com.vincent.rsf.server.manager.entity.*;
import com.vincent.rsf.server.manager.enums.PakinIOStatus;
+import com.vincent.rsf.server.manager.mapper.AsnOrderMapper;
import com.vincent.rsf.server.manager.mapper.WaitPakinMapper;
import com.vincent.rsf.server.manager.service.*;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -15,6 +16,7 @@
import com.vincent.rsf.server.system.utils.SerialRuleUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -26,11 +28,9 @@
@Autowired
- private AsnOrderService asnOrderService;
+ private AsnOrderMapper asnOrderMapper;
@Autowired
private AsnOrderItemService asnOrderItemService;
- @Autowired
- private WaitPakinService waitPakinService;
@Autowired
private WaitPakinItemService waitPakinItemService;
@Autowired
@@ -38,10 +38,9 @@
@Autowired
private LocService locService;
@Autowired
- private TaskService taskService;
- @Autowired
private TaskItemService taskItemService;
@Autowired
+ @Lazy
private AgvService agvService;
@@ -63,7 +62,7 @@
throw new CoolException("鍙傛暟閿欒锛氭墭鐩樼爜涓虹┖锛侊紒");
}
// List<Short> asList = Arrays.asList(Short.valueOf(PakinIOStatus.PAKIN_IO_STATUS_DONE.val), Short.valueOf(PakinIOStatus.PAKIN_IO_STATUS_DONE.val));
- WaitPakin pakin = waitPakinService.getOne(new LambdaQueryWrapper<WaitPakin>()
+ WaitPakin pakin = this.getOne(new LambdaQueryWrapper<WaitPakin>()
.eq(WaitPakin::getBarcode, waitPakin.getBarcode()));
if (!Objects.isNull(pakin)) {
throw new CoolException("鎵樼洏鐮侊細" + waitPakin.getBarcode() + "宸茶缁勬墭鍗曪細" + pakin.getCode() + "浣跨敤锛侊紒");
@@ -129,7 +128,7 @@
.setUpdateBy(userId)
.setCreateBy(userId)
.setMatnrCode(warehouseAreasItems.getMatnrCode());
- WkOrder order = asnOrderService.getById(warehouseAreasItems.getAsnId());
+ WkOrder order = asnOrderMapper.selectById(warehouseAreasItems.getAsnId());
if (!Objects.isNull(order)) {
pakinItem.setType(null == order.getType() ? null : order.getType())
.setWkType(null == order.getWkType() ? null : Short.parseShort(order.getWkType()));
@@ -189,7 +188,7 @@
if (StringUtils.isBlank(waitPakin.getBarcode())) {
throw new CoolException("鍙傛暟閿欒锛氭墭鐩樼爜涓虹┖锛侊紒");
}
- WaitPakin pakin = waitPakinService.getOne(new LambdaQueryWrapper<WaitPakin>()
+ WaitPakin pakin = this.getOne(new LambdaQueryWrapper<WaitPakin>()
.eq(WaitPakin::getBarcode, waitPakin.getBarcode()));
if (!Objects.isNull(pakin)) {
throw new CoolException("鎵樼洏鐮侊細" + waitPakin.getBarcode() + "宸茶缁勬墭鍗曪細" + pakin.getCode() + "浣跨敤锛侊紒");
@@ -227,7 +226,7 @@
throw new CoolException("鍙傛暟閿欒锛氭墭鐩樼爜涓虹┖锛侊紒");
}
// List<Short> asList = Arrays.asList(Short.valueOf(PakinIOStatus.PAKIN_IO_STATUS_DONE.val), Short.valueOf(PakinIOStatus.PAKIN_IO_STATUS_DONE.val));
- WaitPakin pakin = waitPakinService.getOne(new LambdaQueryWrapper<WaitPakin>()
+ WaitPakin pakin = this.getOne(new LambdaQueryWrapper<WaitPakin>()
.eq(WaitPakin::getBarcode, waitPakin.getBarcode()));
if (!Objects.isNull(pakin)) {
throw new CoolException("鎵樼洏鐮侊細" + waitPakin.getBarcode() + "宸茶缁勬墭鍗曪細" + pakin.getCode() + "浣跨敤锛侊紒");
@@ -282,7 +281,7 @@
.setUpdateBy(userId)
.setCreateBy(userId)
.setMatnrCode(warehouseAreasItems.getMatnrCode());
- WkOrder order = asnOrderService.getById(warehouseAreasItems.getAsnId());
+ WkOrder order = asnOrderMapper.selectById(warehouseAreasItems.getAsnId());
if (!Objects.isNull(order)) {
pakinItem.setType(null == order.getType() ? null : order.getType())
.setWkType(null == order.getWkType() ? null : Short.parseShort(order.getWkType()));
@@ -348,7 +347,7 @@
public synchronized WaitPakin unBind(WaitPakinParam param) {
String barcode = param.getBarcode();
if (StringUtils.isNotBlank(barcode)) {
- WaitPakin waitPakins = waitPakinService.getOne(new LambdaQueryWrapper<WaitPakin>().eq(WaitPakin::getBarcode, barcode));
+ WaitPakin waitPakins = this.getOne(new LambdaQueryWrapper<WaitPakin>().eq(WaitPakin::getBarcode, barcode));
if (Objects.isNull(waitPakins)) {
throw new CoolException("缁勬墭涓嶅瓨鍦紒锛�");
}
@@ -408,13 +407,13 @@
double anfmes = paramItems.stream().mapToDouble(PakinItem::getReceiptQty).sum();
// double anfmes = warehouseAreasItems.stream().mapToDouble(WarehouseAreasItem::getAnfme).sum();
if (waitPakins.getAnfme().compareTo(anfmes) <= 0) {
- if (!waitPakinService.removeById(waitPakins.getId())) {
+ if (!this.removeById(waitPakins.getId())) {
throw new CoolException("缁勬墭鍒犻櫎澶辫触锛侊紒");
}
} else {
Double anfme = Math.round((waitPakins.getAnfme() - anfmes) * 10000) / 10000.0;
waitPakins.setAnfme(anfme);
- if (!waitPakinService.updateById(waitPakins)) {
+ if (!this.updateById(waitPakins)) {
throw new CoolException("缁勬墭鏁版嵁淇敼澶辫触锛侊紒");
}
}
@@ -471,7 +470,7 @@
}
}
- if (!waitPakinService.removeByIds(pakinIds)) {
+ if (!this.removeByIds(pakinIds)) {
return R.error("Delete Fail");
}
--
Gitblit v1.9.1