wanshenmean
2024-09-11 28f1259ec675a191d2a852f74566400e6cc40b50
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicRepository/Location/LocationStatusChangeRecordRepository.cs
@@ -1,9 +1,31 @@
namespace WIDESEA_StorageBasicRepository
using WIDESEA_DTO;
namespace WIDESEA_StorageBasicRepository
{
    public class LocationStatusChangeRecordRepository : RepositoryBase<DtLocationStatusChangeRecord>, ILocationStatusChangeRecordRepository
    {
        public LocationStatusChangeRecordRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage)
        {
        }
        /// <summary>
        /// 添加货位变动记录
        /// </summary>
        /// <param name="changeRecordDto">数据模型</param>
        /// <returns></returns>
        public bool AddStatusChangeRecord(LocationChangeRecordDto changeRecordDto)
        {
            DtLocationStatusChangeRecord dtLocationStatusChangeRecord = new DtLocationStatusChangeRecord()
            {
                ChangeType = changeRecordDto.ChangeType,
                LocationCode = changeRecordDto.LocationCode,
                LocationId = changeRecordDto.LocationId,
                Creater = "System",
                TaskNum = changeRecordDto.TaskNum,
                AfterStatus = changeRecordDto.AfterStatus,
                BeforeStatus = changeRecordDto.BeforeStatus,
            };
            return AddData(dtLocationStatusChangeRecord) > 0;
        }
    }
}