Browse Source

更新版本

FoShanPG
Administrator 3 years ago
parent
commit
aba0311664
  1. 7
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs
  2. 4
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQFSharePartAppService .cs
  3. 4
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHSharePartAppService.cs
  4. 16
      src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/Prices/PriceListManager.cs

7
src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs

@ -161,10 +161,15 @@ namespace Win.Sfs.SettleAccount.Entities.Prices
{
ExportImporter _exportImporter = new ExportImporter();
var result = await _exportImporter.UploadExcelImport<PriceListImportDto>(files, _excelImportService);
var list=result.Where(p => p.Type == 20).ToList();
var result = await _exportImporter.UploadExcelImport<PriceListImportDto>(files, _excelImportService);
var entityList = ObjectMapper.Map<List<PriceListImportDto>, List<PriceList>>(result);
var _ls = entityList.Where(p=>p.EndDate.ToString().Contains("9999")).GroupBy(p => new { p.MaterialCode, p.CustomerCode,p.Type }).Select(p=>p.FirstOrDefault());

4
src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQFSharePartAppService .cs

@ -265,15 +265,12 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
var _version = new WmsHQFSharePartOutPut(GuidGenerator.Create(), input.Version, _billNum, CurrentUser.Email);
await _wmsVersionRepository.InsertAsync(_version, true);
}
foreach (var job in _joblist)
{
job.FileName = _billNum;
await _job.UpdateAsync(job);
}
}
else
{
@ -290,7 +287,6 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
await _job.UpdateAsync(job);
}
}
}
return ApplicationConsts.SuccessStr;

4
src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHSharePartAppService.cs

@ -376,8 +376,8 @@ into temp1
var sql = "DECLARE @return_value int\n" +
"EXEC @return_value = [dbo].[p_wms_output]\n" +
" @billnum = N'{0}',\n" +
" @type = 4\n" +
" @date = N'{1}',\n"+
" @type = 4 ,\n" +
" @date = N'{1}'\n"+
"SELECT 'Return Value' = @return_value";
await _wmsRepository.GetDbContext().Database.ExecuteSqlRawAsync(
string.Format(sql, input.BillNum,input.AccountDate.ToShortDateString()));

16
src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/Prices/PriceListManager.cs

@ -95,18 +95,6 @@ namespace Win.Sfs.SettleAccount.Entities.Prices
where itm1.Price != itm2.Price
select new PriceList(itm2.Id, itm2.BeginDate, itm2.EndDate, itm1.Price, itm2.MaterialCode,itm2.Type, itm2.ParentId, itm2.Version);
await _repository.GetDbContext().BulkUpdateAsync(update.ToList());
await _repository.GetDbContext().BulkInsertAsync<PriceList>(add.ToList());
@ -118,10 +106,6 @@ namespace Win.Sfs.SettleAccount.Entities.Prices
List<PriceListVersion> _versionList = new List<PriceListVersion>() { new PriceListVersion(GuidGenerator.Create(), DateTime.Now.Year.ToString(), DateTime.Now.Month.ToString(), version) };
await _versionRepository.GetDbContext().BulkInsertAsync(_versionList);
}
return _errorList;
}

Loading…
Cancel
Save