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, 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); } } }