CodeManagement/WMS/WIDESEA_WMSClient/src/views/widesea_wms/stock/Dt_OutTime.vue
@@ -21,7 +21,7 @@ footer: "Foots", cnName: '瓒呮椂淇℃伅', name: 'stock/Dt_BillGroupStock', url: "/Task/GetTimeout", url:"/StockInfoTimeout/", sortName: "createDate" }); const editFormFields = ref({ CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_IStoragIntegrationRepository/obj/Debug/net6.0/WIDESEA_IStoragIntegrationRepository.AssemblyInfo.cs
@@ -14,7 +14,7 @@ [assembly: System.Reflection.AssemblyCompanyAttribute("WIDESEA_IStoragIntegrationRepository")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+12b786bdece4bde3716279ff386b58d776090bdb")] [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+37b28e4f6b8c865c1df06543f124fd1c1ba244d9")] [assembly: System.Reflection.AssemblyProductAttribute("WIDESEA_IStoragIntegrationRepository")] [assembly: System.Reflection.AssemblyTitleAttribute("WIDESEA_IStoragIntegrationRepository")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_IStorageBasicRepository/Stock/IStockInfoTimeoutRepository.cs
对比新文件 @@ -0,0 +1,6 @@ 锘縩amespace WIDESEA_IStorageBasicRepository { public interface IStockInfoTimeoutRepository : IRepository<DtStockInfo> { } } CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_IStorageBasicService/Stock/IStockInfoTimeoutService.cs
对比新文件 @@ -0,0 +1,5 @@ 锘縩amespace WIDESEA_IStorageBasicService; public interface IStockInfoTimeoutService : IService<DtStockInfo> { } CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationRepository/obj/Debug/net6.0/WIDESEA_StoragIntegrationRepository.AssemblyInfo.cs
@@ -14,7 +14,7 @@ [assembly: System.Reflection.AssemblyCompanyAttribute("WIDESEA_StoragIntegrationRepository")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+12b786bdece4bde3716279ff386b58d776090bdb")] [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+37b28e4f6b8c865c1df06543f124fd1c1ba244d9")] [assembly: System.Reflection.AssemblyProductAttribute("WIDESEA_StoragIntegrationRepository")] [assembly: System.Reflection.AssemblyTitleAttribute("WIDESEA_StoragIntegrationRepository")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicRepository/Stock/StockInfoTimeoutRepository.cs
对比新文件 @@ -0,0 +1,9 @@ 锘縩amespace WIDESEA_StorageBasicRepository { public class StockInfoTimeoutRepository : RepositoryBase<DtStockInfo>, IStockInfoTimeoutRepository { public StockInfoTimeoutRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) { } } } CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Stock/StockInfoTimeoutService.cs
对比新文件 @@ -0,0 +1,88 @@ 锘縰sing SqlSugar; using System; using System.Collections.Generic; using System.Linq; using System.Linq.Expressions; using System.Text; using System.Threading.Tasks; using WIDESEA_Cache; namespace WIDESEA_StorageBasicServices.Stock { public class StockInfoTimeoutService : ServiceBase<DtStockInfo, IStockInfoRepository>, IStockInfoTimeoutService { private readonly ISimpleCacheService _simpleCacheService; private readonly ILocationStatusChangeRecordRepository _locationStatusChangeRecordRepository; public StockInfoTimeoutService(IStockInfoRepository BaseDal, ISimpleCacheService simpleCacheService, ILocationStatusChangeRecordRepository locationStatusChangeRecordRepository) : base(BaseDal) { _simpleCacheService = simpleCacheService; _locationStatusChangeRecordRepository = locationStatusChangeRecordRepository; } public override PageGridData<DtStockInfo> GetPageData(PageDataOptions options) { string wheres = ValidatePageOptions(options); //鑾峰彇鎺掑簭瀛楁 Dictionary<string, SqlSugar.OrderByType> orderbyDic = GetPageDataSort(options, TProperties); List<OrderByModel> orderByModels = new List<OrderByModel>(); foreach (var item in orderbyDic) { OrderByModel orderByModel = new() { FieldName = item.Key, OrderByType = item.Value }; orderByModels.Add(orderByModel); } int totalCount = 0; List<SearchParameters> searchParametersList = new List<SearchParameters>(); if (!string.IsNullOrEmpty(options.Wheres)) { try { searchParametersList = options.Wheres.DeserializeObject<List<SearchParameters>>(); options.Filter = searchParametersList; } catch { } } Expression<Func<DtStockInfo, bool>> locationStatus = null; Expression<Func<DtStockInfo, bool>> roadwayNo = null; Expression<Func<DtStockInfo, bool>> materielCode = null; foreach (var item in searchParametersList) { if (item.Name.Contains("locationStatus")) { locationStatus = x => x.LocationInfo.LocationStatus == Convert.ToInt32(item.Value); } else if (item.Name.Contains("roadwayNo")) { roadwayNo = x => x.LocationInfo.RoadwayNo.Contains(item.Value); } else if (item.Name.Contains("materielCode")) { materielCode = x => x.StockInfoDetails.Any(d => d.MaterielCode.Contains(item.Value)); } } var now = DateTime.Now; // 浣跨敤Subtract鏂规硶 var threeHoursAgo = now.Subtract(TimeSpan.FromHours(3)); var data = BaseDal.Db.Queryable<DtStockInfo>() .Includes(x => x.StockInfoDetails) .Includes(x => x.LocationInfo) .Where(x => x.OutboundTime < threeHoursAgo) .WhereIF(!wheres.IsNullOrEmpty(), wheres) .WhereIF(locationStatus != null, locationStatus) .WhereIF(roadwayNo != null, roadwayNo) .WhereIF(materielCode != null, materielCode) .OrderBy(orderByModels) .ToPageList(options.Page, options.Rows, ref totalCount); return new PageGridData<DtStockInfo>(totalCount, data); } } } CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs
@@ -2,6 +2,7 @@ using Masuit.Tools; using SixLabors.Fonts.Tables.AdvancedTypographic; using SqlSugar; using System.Linq.Expressions; using System.Text.RegularExpressions; using System.Threading.Tasks; using WIDESEA_Cache; CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/StockInfoTimeoutController.cs
对比新文件 @@ -0,0 +1,13 @@ 锘縰sing WIDESEA_IStorageBasicService; namespace WIDESEA_WMSServer.Controllers; [Route("api/StockInfoTimeout")] [ApiController] public class StockInfoTimeoutController : ApiBaseController<IStockInfoTimeoutService, DtStockInfo> { public StockInfoTimeoutController(IStockInfoTimeoutService service) : base(service) { } }