From 29cd467ba62b2bdf49c6546e78ae3ec809c4a723 Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期四, 19 六月 2025 17:50:28 +0800
Subject: [PATCH] 1
---
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_StockRepository/StockInfoRepository.cs | 27 ++++++++++++++++-----------
1 files changed, 16 insertions(+), 11 deletions(-)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockRepository/StockInfoRepository.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockRepository/StockInfoRepository.cs"
index 404a6f3..adef8e2 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockRepository/StockInfoRepository.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockRepository/StockInfoRepository.cs"
@@ -1,11 +1,13 @@
锘縰sing Org.BouncyCastle.Crypto;
using SqlSugar;
+using SqlSugar.Extensions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseRepository;
+using WIDESEA_Core.Enums;
using WIDESEA_DTO.Stock;
using WIDESEA_IBasicRepository;
using WIDESEA_IStockRepository;
@@ -15,10 +17,8 @@
{
public class StockInfoRepository : RepositoryBase<Dt_StockInfo>, IStockInfoRepository
{
- private readonly ILocationInfoRepository _locationInfoRepository;
- public StockInfoRepository(IUnitOfWorkManage unitOfWorkManage, ILocationInfoRepository locationInfoRepository) : base(unitOfWorkManage)
+ public StockInfoRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage)
{
- _locationInfoRepository = locationInfoRepository;
}
public List<StockViewDTO> GetAllStockViews()
@@ -31,24 +31,22 @@
AreaId = a.AreaId,
LocationCode = b.LocationCode,
Column = a.Column,
- CreateDate = a.CreateDate,
- Creater = a.Creater,
+ CreateDate = b.CreateDate,
+ Creater = b.Creater,
Depth = a.Depth,
- EnalbeStatus = a.EnalbeStatus,
- Id = a.Id,
+ EnalbeStatus = a.EnableStatus,
IsFull = b.IsFull,
Layer = a.Layer,
LocationName = a.LocationName,
LocationStatus = a.LocationStatus,
LocationType = a.LocationType,
- Modifier = a.Modifier,
- ModifyDate = a.ModifyDate,
+ Modifier = b.Modifier,
+ ModifyDate = b.ModifyDate,
PalletCode = b.PalletCode,
- Remark = a.Remark,
+ StockRemark = b.Remark,
RoadwayNo = a.RoadwayNo,
Row = a.Row,
StockId = b.Id,
- StockRemark = b.Remark,
StockStatus = b.StockStatus,
Details = b.Details,
}).Includes(x => x.Details).ToList();
@@ -96,5 +94,12 @@
{
return Db.UpdateNav(stockInfo).Include(x => x.Details).ExecuteCommand();
}
+
+ public Dt_StockInfo GetPalletStockInfo(string roadwayNo)
+ {
+ //ISugarQueryable<string> locationCodes = Db.Queryable<Dt_LocationInfo>().Where(x => x.RoadwayNo == roadwayNo && x.LocationStatus == LocationStatusEnum.Pallet.ObjToInt() && (x.EnalbeStatus == LocationEnalbeStatusEnum.OnlyOut.ObjToInt() || LocationEnalbeStatusEnum.Normal.ObjToInt() == x.EnalbeStatus)).Select(x => x.LocationCode);
+
+ return Db.Queryable<Dt_StockInfo>().Where(x => x.StockStatus == StockStatusEmun.宸插叆搴�.ObjToInt() && SqlFunc.Subqueryable<Dt_LocationInfo>().Where(v => v.LocationCode == x.LocationCode && v.RoadwayNo == roadwayNo && v.LocationStatus == LocationStatusEnum.Pallet.ObjToInt() && (v.EnableStatus == EnableStatusEnum.OnlyOut.ObjToInt() || EnableStatusEnum.Normal.ObjToInt() == v.EnableStatus)).Any()).OrderBy(x => x.ModifyDate).First();
+ }
}
}
--
Gitblit v1.9.3