陈勇
2026-04-06 9de6c7c6d835ba5161d64114d154bfc7676244a1
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
34
35
36
37
38
39
40
using AutoMapper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseServices;
using WIDESEA_Core.Enums;
using WIDESEA_Core.Helper;
using WIDESEA_IRecordRepository;
using WIDESEA_IRecordService;
using WIDESEA_Model.Models;
 
namespace WIDESEA_StorageBasicService
{
    public partial class StockQuantityChangeRecordService : ServiceBase<Dt_StockQuantityChangeRecord, IStockQuantityChangeRecordRepository>, IStockQuantityChangeRecordService
    {
        private readonly IMapper _mapper;
        public StockQuantityChangeRecordService(IStockQuantityChangeRecordRepository BaseDal, IMapper mapper) : base(BaseDal)
        {
            _mapper = mapper;
        }
 
        public void AddStockChangeRecord(VV_StockInfo stockInfo,  StockChangeType changeType,int taskNum)
        {
            try
            {
                Dt_StockQuantityChangeRecord stockQuantityChangeRecords = new Dt_StockQuantityChangeRecord();
                stockQuantityChangeRecords = _mapper.Map<Dt_StockQuantityChangeRecord>(stockInfo);
                stockQuantityChangeRecords.TaskNum = taskNum;
                stockQuantityChangeRecords.ChangeType = Convert.ToInt32(changeType);
                BaseDal.AddData(stockQuantityChangeRecords);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }
    }
}