huanghongfeng
23 小时以前 bce2cc310d462ffbe56ee3d9f3d9368abf481aad
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
using WIDESEA_Core.BaseRepository;
using WIDESEA_Core.BaseServices;
using WIDESEA_IRecordService;
using WIDESEA_Model.Models;
 
namespace WIDESEA_RecordService
{
    public partial class LocationStatusChangeRecordService : ServiceBase<Dt_LocationStatusChangeRecord, IRepository<Dt_LocationStatusChangeRecord>>, ILocationStatusChangeRecordService
    {
        public LocationStatusChangeRecordService(IRepository<Dt_LocationStatusChangeRecord> BaseDal) : base(BaseDal)
        {
        }
 
        public IRepository<Dt_LocationStatusChangeRecord> Repository => BaseDal;
 
        public void AddLocationStatusChangeRecord(Dt_LocationInfo locationInfo, int lastStatus, int changeType, string? orderNo, int? taskNum)
        {
            Dt_LocationStatusChangeRecord locationStatusChangeRecord = new Dt_LocationStatusChangeRecord()
            {
                AfterStatus = locationInfo.LocationStatus,
                BeforeStatus = lastStatus,
                ChangeType = changeType,
                LocationCode = locationInfo.LocationCode,
                LocationId = locationInfo.Id,
                TaskNum = taskNum,
                Creater = "WMS",
                OrderNo = orderNo ?? ""
            };
 
            BaseDal.AddData(locationStatusChangeRecord);
        }
    }
}