From 1f9a89458a66c12c1f7dfbceb2588ada8fbf16f4 Mon Sep 17 00:00:00 2001
From: huangxiaoqiang <huangxiaoqiang@hnkhzn.com>
Date: 星期四, 13 十一月 2025 17:35:36 +0800
Subject: [PATCH] 新增移库页面与WebSocket支持,优化任务逻辑新增移库页面支持移库任务输入与提交。新增 WebSocket 支持(`websocket.js`、`WebSocketSetup.cs`),实现实时通信功能。 在任务状态枚举中新增 AGV 移库任务状`TaskStatusEnum.cs`)- 重构库存数据展示页面(`Home.vue`),新增数据总览与图表展示功能。 - 新增库存数据接口(`StockInfoService.cs`、`StockInfoController.cs`),支持库存统计与展示。 - 优化任务状态管理逻辑,支持 AGV 移库任务(`Dt_TaskService.cs`)。
---
项目代码/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Stock/StockInfoHtyService.cs | 28 ++++++----------------------
1 files changed, 6 insertions(+), 22 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Stock/StockInfoHtyService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Stock/StockInfoHtyService.cs"
index 43f0030..cd49b05 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Stock/StockInfoHtyService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Stock/StockInfoHtyService.cs"
@@ -1,6 +1,7 @@
锘縰sing AngleSharp.Dom;
using Mapster;
using Masuit.Tools;
+using OfficeOpenXml.FormulaParsing.Excel.Functions.Math;
using SqlSugar;
using System.Collections;
using System.Collections.Generic;
@@ -10,17 +11,15 @@
using WIDESEA_Cache;
using WIDESEA_Common;
using WIDESEA_Core;
+using WIDESEA_Core.Enums;
namespace WIDESEA_StorageBasicService;
public class StockInfoHtyService : ServiceBase<DtStockInfo_Hty, IStockInfoHtyRepository>, IStockInfoHtyService
{
-
- private readonly ISimpleCacheService _simpleCacheService;
private readonly ILocationStatusChangeRecordRepository _locationStatusChangeRecordRepository;
- public StockInfoHtyService(IStockInfoHtyRepository BaseDal, ISimpleCacheService simpleCacheService, ILocationStatusChangeRecordRepository locationStatusChangeRecordRepository) : base(BaseDal)
+ public StockInfoHtyService(IStockInfoHtyRepository BaseDal, ILocationStatusChangeRecordRepository locationStatusChangeRecordRepository) : base(BaseDal)
{
- _simpleCacheService = simpleCacheService;
_locationStatusChangeRecordRepository = locationStatusChangeRecordRepository;
}
@@ -57,34 +56,19 @@
}
catch { }
}
-
- Expression<Func<DtStockInfo_Hty, bool>> locationStatus = null;
- Expression<Func<DtStockInfo_Hty, bool>> roadwayNo = null;
Expression<Func<DtStockInfo_Hty, bool>> materielCode = null;
foreach (var item in searchParametersList)
{
- if (item.Name.Contains("locationStatus"))
+ if (item.Name.Contains("materielCode"))
{
- 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));
+ materielCode = x => x.StockInfoDetails.Any(d => d.MaterielCode == item.Value);
}
}
- //.IncludesAllFirstLayer()
var data = BaseDal.Db.Queryable<DtStockInfo_Hty>()
.Includes(x => x.StockInfoDetails)
- .Includes(x => x.LocationInfo)
.Where(x=>x.CreateDate>DateTime.Now.AddMonths(-1))
.WhereIF(!wheres.IsNullOrEmpty(), wheres)
- .WhereIF(locationStatus != null, locationStatus)
- .WhereIF(roadwayNo != null, roadwayNo)
- .WhereIF(materielCode != null, materielCode)
+ .WhereIF(materielCode != null, materielCode)
.OrderBy(orderByModels)
.ToPageList(options.Page, options.Rows, ref totalCount);
return new PageGridData<DtStockInfo_Hty>(totalCount, data);
--
Gitblit v1.9.3