1
yangpeixing
2026-03-02 4a1765ea61fb8706bddbf90b91b310e2ce0e9f7d
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
using AutoMapper;
using OfficeOpenXml.FormulaParsing.Excel.Functions.RefAndLookup;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core;
using WIDESEA_Core.BaseServices;
using WIDESEA_Core.Enums;
using WIDESEA_Core.Helper;
using WIDESEA_DTO.Stock;
using WIDESEA_IBasicRepository;
using WIDESEA_IRecordRepository;
using WIDESEA_IRecordService;
using WIDESEA_IStockRepository;
using WIDESEA_IStockService;
using WIDESEA_Model.Models;
 
namespace WIDESEA_StockService
{
    public partial class StockInfoService : ServiceBase<Dt_StockInfo, IStockInfoRepository>, IStockInfoService
    {
        private readonly IMapper _mapper;
 
        private readonly IBasicRepository _basicRepository;
        private readonly IStockRepository _stockRepository;
        private readonly IRecordService _recordService;
        private readonly IStockInfoDetailRepository _stockInfoDetail;
 
        public IStockInfoRepository Repository => BaseDal;
 
        public StockInfoService(IStockInfoRepository BaseDal, IMapper mapper, IBasicRepository basicRepository, IStockRepository stockRepository,IRecordService recordService, IStockInfoDetailRepository stockInfoDetail) : base(BaseDal)
        {
            _mapper = mapper;
            _basicRepository = basicRepository;
            _stockRepository = stockRepository;
            _recordService = recordService;
            _stockInfoDetail = stockInfoDetail;
 
        }
        public override WebResponseContent UpdateData(SaveModel saveModel)
        {
            var id = saveModel.MainData["id"].ObjToInt();
            var palletCode = saveModel.MainData["palletCode"].ToString();
            var materialType = saveModel.MainData["materialType"].ObjToInt();
            var locationCode = saveModel.MainData["locationCode"].ToString();
            var stockStatus = saveModel.MainData["stockStatus"].ObjToInt();
            var materialweight = saveModel.MainData["materialweight"].ObjToInt();
            var wlstatus = saveModel.MainData["wlstatus"].ObjToInt();
            var remark = saveModel.MainData["remark"].ToString();
 
            Dt_StockInfo stockInfo = BaseDal.QueryFirst(x => x.Id == id);
            stockInfo.PalletCode = palletCode;
            stockInfo.MaterialType = materialType;
            stockInfo.LocationCode = locationCode;
            stockInfo.StockStatus = stockStatus;
            stockInfo.Materialweight = materialweight;
            stockInfo.Wlstatus = wlstatus;
            stockInfo.Remark = remark;
            return base.UpdateData(stockInfo);
        }
    }
}