From fe410d91f907e15797e82726b8449958494de0cf Mon Sep 17 00:00:00 2001
From: heshaofeng <heshaofeng@hnkhzn.com>
Date: 星期五, 30 一月 2026 18:56:19 +0800
Subject: [PATCH] Merge branch 'htq20251215' of http://115.159.85.185:8098/r/ZhongRui/ALDbanyunxiangmu into htq20251215
---
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundQueryService.cs | 9 +++-
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs | 9 +++-
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_InboundService/InboundService.cs | 31 +++++++++++++++
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_WMSServer/Jobs/QuartzJobMildd.cs | 8 ++--
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_WMSServer/Jobs/ErpJob.cs | 4 -
5 files changed, 48 insertions(+), 13 deletions(-)
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_InboundService/InboundService.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_InboundService/InboundService.cs"
index 4e18074..41ec61c 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_InboundService/InboundService.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_InboundService/InboundService.cs"
@@ -313,6 +313,16 @@
{
return content.Error($"璇ユ墭鐩樼粍鐩樹粨搴撲负{stockInfo.Details.FirstOrDefault()?.WarehouseCode}涓庡綋鍓嶄粨搴搟palletDto.WarehouseType}涓嶄竴鑷达紝涓嶅厑璁哥粍鐩�");
}
+ var nullpallet = _stockInfoRepository.QueryFirst(x => x.PalletType == -1 && x.PalletCode == palletDto.PalletCode);
+ if (nullpallet != null)
+ {
+ return content.Error($"璇ユ墭鐩榹palletDto.PalletCode}宸茬粡杩涜绌烘墭缁勭洏,涓嶈兘鍦ㄨ繘琛岀粍鐩�");
+ }
+ var outbundPallet = _stockInfoRepository.QueryFirst(x => x.StockStatus == (int)StockStatusEmun.鍑哄簱瀹屾垚 && x.PalletCode == palletDto.PalletCode);
+ if (outbundPallet != null)
+ {
+ return content.Error($"璇ユ墭鐩榹palletDto.PalletCode}鏈繘琛屽彇绌虹,涓嶈兘杩涜缁勭洏");
+ }
Dt_AllocateMaterialInfo allocateMaterialInfo = _allocateMaterialInfo.QueryFirst(x => x.Barcode == palletDto.Barcode);
if(allocateMaterialInfo == null)
{
@@ -757,7 +767,16 @@
{
return content.Error("宸蹭笂鏋剁殑鎵樼洏涓嶈兘鍐嶆缁勭洏");
}
-
+ var nullpallet = _stockInfoRepository.QueryFirst(x => x.PalletType == -1 && x.PalletCode == palletDto.PalletCode);
+ if (nullpallet != null)
+ {
+ return content.Error($"璇ユ墭鐩榹palletDto.PalletCode}宸茬粡杩涜绌烘墭缁勭洏,涓嶈兘鍦ㄨ繘琛岀粍鐩�");
+ }
+ var outbundPallet = _stockInfoRepository.QueryFirst(x => x.StockStatus == (int)StockStatusEmun.鍑哄簱瀹屾垚 && x.PalletCode == palletDto.PalletCode);
+ if (outbundPallet != null)
+ {
+ return content.Error($"璇ユ墭鐩榹palletDto.PalletCode}鏈繘琛屽彇绌虹,涓嶈兘杩涜缁勭洏");
+ }
Dt_StockInfoDetail stockInfoDetail = _stockService.StockInfoDetailService.Db.Queryable<Dt_StockInfoDetail>()
.Where(x => x.Barcode == palletDto.Barcode && x.StockId == 0)
.First();
@@ -877,6 +896,16 @@
{
return content.Error($"璇ユ墭鐩樼粍鐩樹粨搴撲负{stockInfo.Details.FirstOrDefault()?.WarehouseCode}涓庡綋鍓嶄粨搴搟palletDto.WarehouseType}涓嶄竴鑷达紝涓嶅厑璁哥粍鐩�");
}
+ var nullpallet = _stockInfoRepository.QueryFirst(x => x.PalletType == -1 && x.PalletCode == palletDto.PalletCode);
+ if (nullpallet != null)
+ {
+ return content.Error($"璇ユ墭鐩榹palletDto.PalletCode}宸茬粡杩涜绌烘墭缁勭洏,涓嶈兘鍦ㄨ繘琛岀粍鐩�");
+ }
+ var outbundPallet = _stockInfoRepository.QueryFirst(x => x.StockStatus == (int)StockStatusEmun.鍑哄簱瀹屾垚 && x.PalletCode == palletDto.PalletCode);
+ if (outbundPallet != null)
+ {
+ return content.Error($"璇ユ墭鐩榹palletDto.PalletCode}鏈繘琛屽彇绌虹,涓嶈兘杩涜缁勭洏");
+ }
Dt_StockInfoDetail stockInfoDetail = _stockInfoRepository.Db.Queryable<Dt_StockInfoDetail>().Where(x => x.Barcode == palletDto.Barcode && x.Status == StockStatusEmun.閲嶆涓�.ObjToInt()).First();
if(stockInfoDetail == null)
{
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/OutboundQueryService.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/OutboundQueryService.cs"
index 17bcb93..73a7aa1 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/OutboundQueryService.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/OutboundQueryService.cs"
@@ -142,10 +142,15 @@
x.MaterielName,
x.WarehouseCode
}).Count() > 1;
+
+ Dt_OutStockLockInfo outStockLockInfo = _outboundLockInfoRepository.QueryFirst(x=>x.PalletCode == palletCode);
+
+ if (outStockLockInfo != null)
+ {
+ return WebResponseContent.Instance.Error($"璇ユ墭鐩樺湪璇ュ崟鎹腑鏃犳嫞閫夎褰曪紝璇峰墠寰�{outStockLockInfo.OrderNo}鍗曟嵁涓繘琛屾嫞璐ф搷浣�");
+ }
}
}
-
-
return WebResponseContent.Instance.OK(data: new { outStockLockInfos, stockInfo, isMatMixed, orderOver });
}
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 c0034f8..6bb4ae1 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"
@@ -1606,7 +1606,7 @@
_feedbackMesService.BarcodeFeedback(newBarcode);
}
- if (CheckOutboundOrderDetailCompletedByMatCode(request.OrderNo, lockInfo.MaterielCode, outboundOrderDetails.First()))
+ if (CheckOutboundOrderDetailCompletedByMatCode(request.OrderNo, lockInfo.MaterielCode, outboundOrderDetails))
{
Func<Dt_OutStockLockInfo, bool> supWhere = x => string.IsNullOrEmpty(outboundOrderDetails.First().SupplyCode) ? true : x.SupplyCode == outboundOrderDetails.First().SupplyCode;
@@ -1960,13 +1960,16 @@
/// <summary>
/// 妫�鏌ュ嚭搴撳崟鏄庣粏鏄惁瀹屾垚
/// </summary>
- public bool CheckOutboundOrderDetailCompletedByMatCode(string orderNo, string materialCode, Dt_OutboundOrderDetail outboundOrderDetail)
+ public bool CheckOutboundOrderDetailCompletedByMatCode(string orderNo, string materialCode, List<Dt_OutboundOrderDetail> outboundOrderDetails)
{
Dt_OutboundOrder outboundOrder = _outboundRepository.QueryFirst(x => x.OrderNo == orderNo);
if (outboundOrder == null) return false;
+
+ var ids = outboundOrderDetails.Select(x => x.Id).ToList();
- List<Dt_OutboundOrderDetail> details = _detailRepository.QueryData(x => x.OrderId == outboundOrder.Id && x.MaterielCode == materialCode && (string.IsNullOrEmpty(outboundOrderDetail.SupplyCode) || x.SupplyCode == outboundOrderDetail.SupplyCode) && (string.IsNullOrEmpty(outboundOrderDetail.WarehouseCode) || x.WarehouseCode == outboundOrderDetail.WarehouseCode));
+ List<Dt_OutboundOrderDetail> details = _detailRepository.QueryData(x => x.OrderId == outboundOrder.Id && x.MaterielCode == materialCode && ids.Contains(x.Id) && (string.IsNullOrEmpty(outboundOrderDetails.FirstOrDefault().SupplyCode) || x.SupplyCode == outboundOrderDetails.FirstOrDefault().SupplyCode) && (string.IsNullOrEmpty(outboundOrderDetails.FirstOrDefault().WarehouseCode) || x.WarehouseCode == outboundOrderDetails.FirstOrDefault().WarehouseCode));
+
// 妫�鏌ユ墍鏈夋槑缁嗙殑宸插嚭鏁伴噺鏄惁閮界瓑浜庡崟鎹暟閲�
return details.All(x => x.OverOutQuantity >= x.OrderQuantity - x.MoveQty);
}
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_WMSServer/Jobs/ErpJob.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_WMSServer/Jobs/ErpJob.cs"
index e6aabe0..0163f38 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_WMSServer/Jobs/ErpJob.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_WMSServer/Jobs/ErpJob.cs"
@@ -24,14 +24,12 @@
try
{
- await _erpApiService.GetSuppliersAsync();
+ await _erpApiService.GetSuppliersAsync();
await _erpApiService.GetMaterialUnitAsync();
var materialRequest = new MaterialRequest
{
- modifyDateStart = DateTime.Now.AddDays(-10).Date.ToString("yyyy-MM-dd") + " 00:00:01",
- modifyDateEnd = DateTime.Now.ToString("yyyy-MM-dd HH:mm") + ":01",
pageNum = 1,
pageSize = 5000
};
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_WMSServer/Jobs/QuartzJobMildd.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_WMSServer/Jobs/QuartzJobMildd.cs"
index 2630709..6bd2f14 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_WMSServer/Jobs/QuartzJobMildd.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_WMSServer/Jobs/QuartzJobMildd.cs"
@@ -63,10 +63,10 @@
};
- if (App.HostEnvironment.IsDevelopment())
- {
- return;
- }
+ //if (App.HostEnvironment.IsDevelopment())
+ //{
+ // return;
+ //}
foreach (var item in allQzServices)
{
var ResuleModel = schedulerCenter.AddScheduleJobAsync(item).Result;
--
Gitblit v1.9.3