wangxinhui
2024-12-18 26f2e904ba44c900e6c61ebf15f97b063324f65b
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_RecordService/Service/StockQuantityChangeRecordService.cs
@@ -4,6 +4,7 @@
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Common.StockEnum;
using WIDESEA_Core.BaseServices;
using WIDESEA_Core.Enums;
using WIDESEA_Core.Helper;
@@ -15,14 +16,14 @@
{
    public partial class StockQuantityChangeRecordService : ServiceBase<Dt_StockQuantityChangeRecord, IStockQuantityChangeRecordRepository>, IStockQuantityChangeRecordService
    {
        public void AddStockChangeRecord(Dt_StockInfo stockInfo, List<Dt_StockInfoDetail> stockInfoDetails, decimal beforeQuantity, decimal totalQuantity, StockChangeType changeType,int taskNum)
        public void AddStockChangeRecord(Dt_StockInfo stockInfo, List<Dt_StockInfoDetail> stockInfoDetails, float beforeQuantity, float totalQuantity, StockChangeTypeEnum changeType, int? taskNum = null)
        {
         try
         {
            try
            {
                List<Dt_StockQuantityChangeRecord> stockQuantityChangeRecords = new List<Dt_StockQuantityChangeRecord>();
                stockQuantityChangeRecords = _mapper.Map<List<Dt_StockQuantityChangeRecord>>(stockInfoDetails);
                int index = 0;
                decimal currentQuantity = 0;
                float currentQuantity = 0;
                stockQuantityChangeRecords.ForEach(x =>
                {
                    x.PalleCode = stockInfo.PalletCode;
@@ -46,10 +47,10 @@
                });
                BaseDal.AddData(stockQuantityChangeRecords);
            }
         catch (Exception ex)
         {
            throw new Exception(ex.Message);
         }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }
    }
}