| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Common.LocationEnum; |
| | | using WIDESEA_Common.StockEnum; |
| | | using WIDESEA_IRecordService; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_RecordService |
| | | { |
| | | /// <summary> |
| | | /// 记录服务聚合实现类 |
| | | /// </summary> |
| | | public class RecordService : IRecordService |
| | | { |
| | | public ILocationStatusChangeRecordService LocationStatusChangeRecordSetvice { get; } |
| | | /// <summary> |
| | | /// 货位状态变更记录服务 |
| | | /// </summary> |
| | | public ILocationStatusChangeRecordService LocationStatusChangeRecordService { get; } |
| | | |
| | | /// <summary> |
| | | /// 库存数量变更记录服务 |
| | | /// </summary> |
| | | public IStockQuantityChangeRecordService StockQuantityChangeRecordService { get; } |
| | | |
| | | public RecordService(ILocationStatusChangeRecordService locationStatusChangeRecordSetvice, IStockQuantityChangeRecordService stockQuantityChangeRecordService) |
| | | /// <summary> |
| | | /// 构造函数 |
| | | /// </summary> |
| | | public RecordService( |
| | | ILocationStatusChangeRecordService locationStatusChangeRecordService, |
| | | IStockQuantityChangeRecordService stockQuantityChangeRecordService) |
| | | { |
| | | LocationStatusChangeRecordSetvice = locationStatusChangeRecordSetvice; |
| | | 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); |
| | | } |
| | | } |
| | | } |