From 1cc3dec76dab6fdd0c56649a028f5f98e839f983 Mon Sep 17 00:00:00 2001
From: huangxiaoqiang <huangxiaoqiang@hnkhzn.com>
Date: 星期一, 22 十二月 2025 10:59:32 +0800
Subject: [PATCH] Merge branch 'htq20251215' of http://115.159.85.185:8098/r/ZhongRui/ALDbanyunxiangmu into htq20251215
---
项目代码/WMS无仓储版/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1204.46620/SemanticSymbols.db | 0
项目代码/WMS无仓储版/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1204.46620/CodeChunks.db | 0
项目代码/WIDESEA_WMSClient/src/api/http.js | 4 ++--
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs | 34 +++++++++++++++++++++-------------
4 files changed, 23 insertions(+), 15 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/api/http.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/api/http.js"
index f61383c..02caf1c 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/api/http.js"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/api/http.js"
@@ -13,8 +13,8 @@
let loadingInstance;
let loadingStatus = false;
if (process.env.NODE_ENV == 'development') {
- axios.defaults.baseURL = 'http://127.0.0.1:9291/';
- // axios.defaults.baseURL = window.webConfig.webApiBaseUrl;
+ // axios.defaults.baseURL = 'http://127.0.0.1:9291/';
+ axios.defaults.baseURL = window.webConfig.webApiBaseUrl;
}
else if (process.env.NODE_ENV == 'debug') {
axios.defaults.baseURL = 'http://127.0.0.1:8098/';
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1204.46620/CodeChunks.db" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1204.46620/CodeChunks.db"
index ca687f8..fdaab99 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1204.46620/CodeChunks.db"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1204.46620/CodeChunks.db"
Binary files differ
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1204.46620/SemanticSymbols.db" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1204.46620/SemanticSymbols.db"
index 44b6fcd..b492550 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1204.46620/SemanticSymbols.db"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1204.46620/SemanticSymbols.db"
Binary files differ
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs"
index fb99433..be08ce1 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs"
@@ -171,7 +171,8 @@
pickedDetails.AddRange(materielPickedDetails.PickedDetails);
- decimal allallocatedQuantity = materielCalc.UnallocatedQuantity;
+ decimal allallocatedQuantity = Math.Min(materielCalc.UnallocatedQuantity, materielPickedDetails.PickedDetails.Sum(x => x.OutboundQuantity));
+ materielCalc.UnallocatedQuantity = allallocatedQuantity;
// 鏇存柊鍑哄簱鍗曟槑缁嗭紙澧炲姞閿佸畾鏁伴噺锛屼笉澧炲姞宸插嚭鏁伴噺锛�
foreach (var detail in materielCalc.Details)
{
@@ -249,9 +250,18 @@
}
result.FactoryArea = outboundOrder.FactoryArea;
+ List<Dt_OutboundOrderDetail> selectedDetails = new List<Dt_OutboundOrderDetail>();
- // 鑾峰彇閫夋嫨鐨勫嚭搴撴槑缁�
- List<Dt_OutboundOrderDetail> selectedDetails = _detailRepository.QueryData(x => x.OrderId == outboundOrder.Id && request.DetailIds.Contains(x.Id));
+ if(request.DetailIds == null || !request.DetailIds.Any())
+ {
+ selectedDetails = _detailRepository.QueryData(x => x.OrderId == outboundOrder.Id);
+ }
+ else
+ {
+ // 鑾峰彇閫夋嫨鐨勫嚭搴撴槑缁�
+ selectedDetails = _detailRepository.QueryData(x => x.OrderId == outboundOrder.Id && request.DetailIds.Contains(x.Id));
+ }
+
//if (outboundOrder.IsBatch == 1 && request.DetailIds.Count == 1)
//{
@@ -277,7 +287,7 @@
result.OutboundOrder = outboundOrder;
result.SelectedDetails = selectedDetails;
- if (outboundOrder.IsBatch == 0 || request.DetailIds.Count > 1)
+ if (outboundOrder.IsBatch == 0 || request.DetailIds.Count != 1)
{
// 澶氭槑缁嗗嚭搴擄細鎸夌墿鏂欏垎缁勫鐞�
result.MaterielCalculations = CalcMaterielOutboundQuantities(outboundOrder, selectedDetails.ToList());
@@ -364,7 +374,6 @@
.GroupBy(x => new
{
x.MaterielCode,
- x.MaterielName,
x.BatchNo,
x.SupplyCode,
x.WarehouseCode
@@ -372,7 +381,6 @@
.Select(g => new MaterielOutboundCalculationDTO
{
MaterielCode = g.Key.MaterielCode,
- MaterielName = g.Key.MaterielName,
BatchNo = g.Key.BatchNo,
SupplyCode = g.Key.SupplyCode,
WarehouseCode = g.Key.WarehouseCode,
@@ -424,15 +432,15 @@
Dictionary<int, List<Dt_OutStockLockInfo>> lockStockMap = data.LockStockMap;
// 楠岃瘉鎬诲彲鐢ㄥ簱瀛樻槸鍚︽弧瓒冲嚭搴撻渶姹�
- if (totalAvailableStock < materielCalc.UnallocatedQuantity)
- {
- throw new Exception($"鐗╂枡 {materielCalc.MaterielCode} 鍙敤搴撳瓨 {totalAvailableStock} 涓嶈冻鍑哄簱鏁伴噺 {materielCalc.UnallocatedQuantity}");
- }
-
- //decimal remainingQuantity = Math.Min(totalAvailableStock, materielCalc.UnallocatedQuantity);
+ //if (totalAvailableStock < materielCalc.UnallocatedQuantity)
+ //{
+ // throw new Exception($"鐗╂枡 {materielCalc.MaterielCode} 鍙敤搴撳瓨 {totalAvailableStock} 涓嶈冻鍑哄簱鏁伴噺 {materielCalc.UnallocatedQuantity}");
+ //}
+ // 闇�鍒嗛厤鏁伴噺
+ decimal remainingQuantity = Math.Min(totalAvailableStock, materielCalc.UnallocatedQuantity);
// 闇�鍒嗛厤鏁伴噺
- decimal remainingQuantity = materielCalc.UnallocatedQuantity;
+ //decimal remainingQuantity = materielCalc.UnallocatedQuantity;
// 宸插垎閰嶇殑鎵樼洏鍒楄〃
List<string> allocatedPallets = new List<string>();
--
Gitblit v1.9.3