From ca54833cebd878d27d411edab28c3a2850415074 Mon Sep 17 00:00:00 2001 From: Huangxiaoqiang-03 <1247017146@qq.com> Date: 星期一, 21 十月 2024 17:34:02 +0800 Subject: [PATCH] 更新前端页面 --- 代码管理/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