wanshenmean
2026-03-31 9b77acb859f0866f3a854d2a2842072b2fe9cca8
Code/WMS/WIDESEA_WMSServer/WIDESEA_RecordService/RecordService.cs
@@ -1,4 +1,7 @@
using WIDESEA_IRecordService;
using WIDESEA_Common.LocationEnum;
using WIDESEA_Common.StockEnum;
using WIDESEA_IRecordService;
using WIDESEA_Model.Models;
namespace WIDESEA_RecordService
{
@@ -20,8 +23,6 @@
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="locationStatusChangeRecordService">货位状态变更记录服务</param>
        /// <param name="stockQuantityChangeRecordService">库存数量变更记录服务</param>
        public RecordService(
            ILocationStatusChangeRecordService locationStatusChangeRecordService,
            IStockQuantityChangeRecordService stockQuantityChangeRecordService)
@@ -29,5 +30,47 @@
            LocationStatusChangeRecordService = locationStatusChangeRecordService;
            StockQuantityChangeRecordService = stockQuantityChangeRecordService;
        }
        /// <summary>
        /// 新增货位状态变更记录
        /// </summary>
        public Task<bool> AddLocationChangeRecordAsync(
            Dt_LocationInfo beforeLocation,
            Dt_LocationInfo afterLocation,
            LocationChangeType changeType,
            int? taskNum = null,
            string? orderNo = null,
            int? orderId = null,
            string? remark = null)
        {
            return LocationStatusChangeRecordService.AddChangeRecordAsync(
                beforeLocation,
                afterLocation,
                changeType,
                taskNum,
                orderNo,
                orderId,
                remark);
        }
        /// <summary>
        /// 新增库存变更记录
        /// </summary>
        public Task<bool> AddStockChangeRecordAsync(
            Dt_StockInfo? beforeStock,
            Dt_StockInfo? afterStock,
            StockChangeTypeEnum changeType,
            int? taskNum = null,
            string? orderNo = null,
            string? remark = null)
        {
            return StockQuantityChangeRecordService.AddChangeRecordAsync(
                beforeStock,
                afterStock,
                changeType,
                taskNum,
                orderNo,
                remark);
        }
    }
}