From 18ca3750ce28d407afb518cadecdd29d79876c8b Mon Sep 17 00:00:00 2001
From: heshaofeng <heshaofeng@hnkhzn.com>
Date: 星期二, 09 十二月 2025 19:40:15 +0800
Subject: [PATCH] Merge branch 'master' of http://115.159.85.185:8098/r/ZhongRui/ALDbanyunxiangmu
---
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_StockService/StockViewService.cs | 32 +++++++++++++++++++++++++++-----
1 files changed, 27 insertions(+), 5 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_StockService/StockViewService.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_StockService/StockViewService.cs"
index 98cd527..c2eac42 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_StockService/StockViewService.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_StockService/StockViewService.cs"
@@ -31,6 +31,7 @@
try
{
ISugarQueryable<Dt_StockInfo> sugarQueryable1 = _dbBase.Queryable<Dt_StockInfo>().Includes(x => x.Details);
+ ISugarQueryable<Dt_LocationInfo> sugarQueryable = _dbBase.Queryable<Dt_LocationInfo>();
if (!string.IsNullOrEmpty(options.Wheres))
{
try
@@ -56,12 +57,33 @@
.Where(x => x.Details.Any(v => v.BatchNo.Contains(param.Value.ToString())));
}
break;
-
- case var name when name == nameof(Dt_StockInfo.LocationCode).FirstLetterToLower():
+ case var name when name == nameof(Dt_StockInfoDetail.SupplyCode).FirstLetterToLower():
if (!string.IsNullOrEmpty(param.Value?.ToString()))
{
sugarQueryable1 = sugarQueryable1
- .Where(x => x.LocationCode == param.Value.ToString());
+ .Where(x => x.Details.Any(v => v.SupplyCode.Contains(param.Value.ToString())));
+ }
+ break;
+ case var name when name == nameof(Dt_StockInfoDetail.Barcode).FirstLetterToLower():
+ if (!string.IsNullOrEmpty(param.Value?.ToString()))
+ {
+ sugarQueryable1 = sugarQueryable1
+ .Where(x => x.Details.Any(v => v.Barcode.Contains(param.Value.ToString())));
+ }
+ break;
+ case var name when name == nameof(Dt_StockInfoDetail.OrderNo).FirstLetterToLower():
+ if (!string.IsNullOrEmpty(param.Value?.ToString()))
+ {
+ sugarQueryable1 = sugarQueryable1
+ .Where(x => x.Details.Any(v => v.OrderNo.Contains(param.Value.ToString())));
+ }
+ break;
+
+ case var name when name == nameof(Dt_LocationInfo.LocationStatus).FirstLetterToLower():
+ if (!string.IsNullOrEmpty(param.Value?.ToString()))
+ {
+ sugarQueryable = sugarQueryable
+ .Where(x => x.LocationStatus == param.Value.ObjToInt());
}
break;
case var name when name == nameof(Dt_StockInfo.CreateDate).FirstLetterToLower():
@@ -87,7 +109,7 @@
}
}
EntityProperties.ValidatePageOptions(options, ref sugarQueryable1);
- ISugarQueryable<Dt_LocationInfo> sugarQueryable = _dbBase.Queryable<Dt_LocationInfo>();
+
ISugarQueryable<StockViewDTO> list = sugarQueryable1.InnerJoin(sugarQueryable, (b, a) => a.LocationCode == b.LocationCode).Select((b, a) => new StockViewDTO
{
LocationCode = b.LocationCode,
@@ -100,7 +122,7 @@
Layer = a.Layer,
LocationName = a.LocationName,
LocationStatus = a.LocationStatus,
- LocationType = a.LocationType,
+ LocationType = b.LocationType,
Modifier = b.Modifier,
ModifyDate = b.ModifyDate,
PalletCode = b.PalletCode,
--
Gitblit v1.9.3