From 0800daaeefdc7761ace0ae895f5a0273eb023e46 Mon Sep 17 00:00:00 2001
From: skyouc <creaycat@gmail.com>
Date: 星期四, 27 十一月 2025 11:10:34 +0800
Subject: [PATCH] 相同票号入收货区判断
---
rsf-server/src/main/java/com/vincent/rsf/server/manager/schedules/ScheduleJobs.java | 18 +++++++++++++++++-
1 files changed, 17 insertions(+), 1 deletions(-)
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/manager/schedules/ScheduleJobs.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/schedules/ScheduleJobs.java
index 35d85b4..618be12 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/manager/schedules/ScheduleJobs.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/schedules/ScheduleJobs.java
@@ -13,7 +13,10 @@
import com.vincent.rsf.server.system.constant.GlobalConfigCode;
import com.vincent.rsf.server.system.constant.SerialRuleCode;
import com.vincent.rsf.server.system.entity.Config;
+import com.vincent.rsf.server.system.entity.FieldsItem;
import com.vincent.rsf.server.system.service.ConfigService;
+import com.vincent.rsf.server.system.service.FieldsItemService;
+import com.vincent.rsf.server.system.service.impl.FieldsItemServiceImpl;
import com.vincent.rsf.server.system.utils.SerialRuleUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
@@ -62,6 +65,8 @@
private TransferService transferService;
@Autowired
private OutStockService outStockService;
+ @Autowired
+ private FieldsItemService fieldsItemService;
/**
* @author Ryan
@@ -185,6 +190,17 @@
.setFieldsIndex(orderItem.getFieldsIndex())
.setShipperId(matnr.getShipperId());
+
+ WarehouseAreasItem warehousItem = warehouseAreasItemService.getOne(new LambdaQueryWrapper<WarehouseAreasItem>().eq(StringUtils.isNotBlank(orderItem.getFieldsIndex()), WarehouseAreasItem::getFieldsIndex, orderItem.getFieldsIndex()));
+ if (!Objects.isNull(warehousItem)) {
+ //甯屾棩鐩稿悓绁ㄥ彿锛屾敹璐у尯涓嶅彲鏂板鐩稿悓绁ㄥ彿鏁版嵁
+ FieldsItem fieldsItem = fieldsItemService.getOne(new LambdaQueryWrapper<FieldsItem>()
+ .eq(FieldsItem::getUuid, orderItem.getFieldsIndex()).last("LIMIT 1"));
+ if (!Objects.isNull(fieldsItem)) {
+ throw new CoolException("绁ㄥ彿锛�" + fieldsItem.getValue() + "宸插湪鏀惰揣鍖猴紝涓嶅彲鎺ㄩ�佺浉褰撶エ鍙锋暟鎹�傝鑱旂郴绠$悊鍛橈紒锛�" );
+ }
+ }
+
LambdaQueryWrapper<WarehouseAreasItem> queryWrapper = new LambdaQueryWrapper<WarehouseAreasItem>()
.eq(WarehouseAreasItem::getMatnrCode, orderItem.getMatnrCode())
.eq(!Cools.isEmpty(orderItem.getFieldsIndex()), WarehouseAreasItem::getFieldsIndex, orderItem.getFieldsIndex())
@@ -198,7 +214,7 @@
WarehouseAreasItem serviceOne = warehouseAreasItemService.getOne(queryWrapper);
if (!Objects.isNull(serviceOne)) {
item.setId(serviceOne.getId());
- Double anfme = Math.round((item.getAnfme() + serviceOne.getAnfme()) * 10000) / 10000.0;
+ Double anfme = Math.round((item.getAnfme() + serviceOne.getAnfme()) * 100) / 100.0;
item.setAnfme(anfme);
}
//鏈川妫�
--
Gitblit v1.9.1