Browse Source

更新

master
zhaoxinyu 4 months ago
parent
commit
22c944c742
  1. 2
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.json
  2. 86
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAppService.cs
  3. 4
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/SHIP_REC_SUM.cs

2
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.json

@ -5,7 +5,7 @@
"ConnectionStrings": { "ConnectionStrings": {
"Default": "Server=dev.ccwin-in.com,13326;Database=BJABP;User ID=sa;Password=Microsoft@2022;Trusted_Connection=False;TrustServerCertificate=True", "Default": "Server=dev.ccwin-in.com,13326;Database=BJABP;User ID=sa;Password=Microsoft@2022;Trusted_Connection=False;TrustServerCertificate=True",
//"SettleAccountService": "Server=dev.ccwin-in.com,13326;Database=BQ_SA;User ID=ccwin-in;Password=Microsoft@2022;Trusted_Connection=False;TrustServerCertificate=True;", //"SettleAccountService": "Server=dev.ccwin-in.com,13326;Database=BQ_SA;User ID=ccwin-in;Password=Microsoft@2022;Trusted_Connection=False;TrustServerCertificate=True;",
"SettleAccountService": "Server=dev.ccwin-in.com,13326;Database=BQ_SA_TEMP;User ID=sa;Password=Microsoft@2022;Trusted_Connection=False;TrustServerCertificate=True;Connection Timeout=120", "SettleAccountService": "Server=dev.ccwin-in.com,13326;Database=BQ_SA;User ID=sa;Password=Microsoft@2022;Trusted_Connection=False;TrustServerCertificate=True;Connection Timeout=120",
"ExChangeCenterService": "Server=dev.ccwin-in.com,13326;Database=ExChangeCenter;User ID=ccwin-in;Password=Microsoft@2022;Trusted_Connection=False;TrustServerCertificate=True;", "ExChangeCenterService": "Server=dev.ccwin-in.com,13326;Database=ExChangeCenter;User ID=ccwin-in;Password=Microsoft@2022;Trusted_Connection=False;TrustServerCertificate=True;",
"WMSBJBMPT": "Server=dev.ccwin-in.com,6208;Database=WMS_BJBMPT_2;User ID=sa;Password=ChangkeTec@2021;Trusted_Connection=False;TrustServerCertificate=True;", "WMSBJBMPT": "Server=dev.ccwin-in.com,6208;Database=WMS_BJBMPT_2;User ID=sa;Password=ChangkeTec@2021;Trusted_Connection=False;TrustServerCertificate=True;",
"questdb": "host=dev.ccwin-in.com;port=10580;username=admin;password=quest;database=vmi;ServerCompatibilityMode=NoTypeLoading;" "questdb": "host=dev.ccwin-in.com;port=10580;username=admin;password=quest;database=vmi;ServerCompatibilityMode=NoTypeLoading;"

86
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAppService.cs

@ -94,6 +94,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
private readonly INormalEfCoreRepository<VmiBalanceSum, Guid> _vmiBalanceSumRepository; private readonly INormalEfCoreRepository<VmiBalanceSum, Guid> _vmiBalanceSumRepository;
private readonly INormalEfCoreRepository<BalanceSum, Guid> _balanceSumRepository; private readonly INormalEfCoreRepository<BalanceSum, Guid> _balanceSumRepository;
private readonly INormalEfCoreRepository<REC_SHIP_SUM, Guid> _recRepository;
private readonly IBlobContainer<MyFileContainer> _fileContainer; private readonly IBlobContainer<MyFileContainer> _fileContainer;
private readonly IHubContext<PageHub> _hubContext; private readonly IHubContext<PageHub> _hubContext;
private readonly ICurrentUser _currentUser; private readonly ICurrentUser _currentUser;
@ -111,6 +113,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
INormalEfCoreRepository<CodeSetting, Guid> codeRepository, INormalEfCoreRepository<CodeSetting, Guid> codeRepository,
INormalEfCoreRepository<VmiBalanceSumDetail, Guid> vmiBalanceSumDetailRepository, INormalEfCoreRepository<VmiBalanceSumDetail, Guid> vmiBalanceSumDetailRepository,
INormalEfCoreRepository<BalanceSum, Guid> balanceSumRepository, INormalEfCoreRepository<BalanceSum, Guid> balanceSumRepository,
INormalEfCoreRepository<REC_SHIP_SUM, Guid> recRepository,
IBlobContainer<MyFileContainer> fileContainer, IBlobContainer<MyFileContainer> fileContainer,
Volo.Abp.ObjectMapping.IObjectMapper maper, Volo.Abp.ObjectMapping.IObjectMapper maper,
IHubContext<PageHub> hubContext, IHubContext<PageHub> hubContext,
@ -123,6 +126,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
) )
{ {
_recRepository = recRepository;
_balanceSumRepository = balanceSumRepository; _balanceSumRepository = balanceSumRepository;
_vmiBalanceSumRepository = vmiBalanceSumRepository; _vmiBalanceSumRepository = vmiBalanceSumRepository;
_vmiBalanceSumDetailRepository = vmiBalanceSumDetailRepository; _vmiBalanceSumDetailRepository = vmiBalanceSumDetailRepository;
@ -1717,6 +1721,23 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
connection.Close(); connection.Close();
return ls; return ls;
} }
[HttpPost]
public async Task<List<REC_SHIP_SUM>> GetSHIP_REC_SUMListAsync(RequestDto input)
{
return await _recRepository.ToListAsync().ConfigureAwait(false);
//var entities = await _recRepository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount, true).ConfigureAwait(false);
//var totalCount = await _recRepository.GetCountByFilterAsync(input.Filters).ConfigureAwait(false);
////var dtos = ObjectMapper.Map<List<HBPO_SA_DETAIL>, List<HBPO_SA_DETAIL_DTO>>(entities);
//return new PagedResultDto<HBPO_SA_DETAIL_DTO>(totalCount, entities);
}
/// <summary> /// <summary>
/// jisbbac收发汇总 /// jisbbac收发汇总
/// </summary> /// </summary>
@ -1731,9 +1752,24 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
public async Task<string> GetReceiveShipSum(RequestDto input) public async Task<string> GetReceiveShipSum(RequestDto input)
{ {
ConcurrentBag<REC_SHIP_SUM> bagList = new ConcurrentBag<REC_SHIP_SUM>();
// ConcurrentBag<ShipReceiveSum> bagList = new ConcurrentBag<ShipReceiveSum>(); var sebegin= input.Filters.Any(p => p.Column == "sebegin")? input.Filters.FirstOrDefault(p => p.Column == "sebegin").Value : "";
var seend = input.Filters.Any(p => p.Column == "seend")? input.Filters.FirstOrDefault(p => p.Column == "seend").Value : "";
var sabegin = input.Filters.Any(p => p.Column == "sabegin")? input.Filters.FirstOrDefault(p => p.Column == "sabegin").Value : "";
var saend = input.Filters.Any(p => p.Column == "saend")? input.Filters.FirstOrDefault(p => p.Column == "saend").Value : "";
var parcode = input.Filters.Any(p => p.Column == "partcode")? input.Filters.FirstOrDefault(p => p.Column == "partcode").Value : "";
List<EnumBusinessType> list = new List<EnumBusinessType>();
list.Add(EnumBusinessType.JisBBAC);
list.Add(EnumBusinessType.JisHBPO);
list.Add(EnumBusinessType.MaiDanJianHBPO);
list.Add(EnumBusinessType.MaiDanJianBBAC);
list.Add(EnumBusinessType.BeiJian);
list.Add(EnumBusinessType.ZhiGongJianHBPO);
list.Add(EnumBusinessType.ZhiGongJianBBAC);
list.Add(EnumBusinessType.YinDuJian);
ConcurrentBag<REC_SHIP_SUM> bagList = new ConcurrentBag<REC_SHIP_SUM>();
Parallel.ForEach(list, async chunk => Parallel.ForEach(list, async chunk =>
{ {
@ -1743,23 +1779,35 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
bagList.Add(itm); bagList.Add(itm);
} }
}); });
var entities=bagList.ToList();
var entities = bagList.ToList();
// IExporter _csv = new CsvExporter(); await _recRepository.BatchDeleteAsync().ConfigureAwait(false);
// IExporter _excel = new ExcelExporter(); foreach (var entity in entities)
// byte[] result = null; {
// result = await _excel.ExportAsByteArray(entities).ConfigureAwait(false); entity.SetId(Guid.NewGuid());
// result.ShouldNotBeNull(); entity.CreationTime = DateTime.Now;
// string _fileName = $"收发存汇总{DateTime.Now.ToString("yyyyMMddHHmmss")}.xlsx"; }
// //保存导出文件到服务器存成二进制
// await _excelImportService.SaveBlobAsync( await _recRepository.DbContext.BulkInsertAsync(entities).ConfigureAwait(false);
// new SaveExcelImportInputDto
// {
// Name = _fileName,
// Content = result
// } IExporter _csv = new CsvExporter();
// ).ConfigureAwait(false); IExporter _excel = new ExcelExporter();
// return _fileName; byte[] result = null;
result = await _excel.ExportAsByteArray(entities).ConfigureAwait(false);
result.ShouldNotBeNull();
string _fileName = $"收发存汇总{DateTime.Now.ToString("yyyyMMddHHmmss")}.xlsx";
//保存导出文件到服务器存成二进制
await _excelImportService.SaveBlobAsync(
new SaveExcelImportInputDto
{
Name = _fileName,
Content = result
}
).ConfigureAwait(false);
return _fileName;
} }

4
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/SHIP_REC_SUM.cs

@ -39,6 +39,10 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
[Display(Name = "已开票数量")] [Display(Name = "已开票数量")]
public string INVQty { set; get; } public string INVQty { set; get; }
public void SetId(Guid setId)
{
Id = setId;
}
public REC_SHIP_SUM() public REC_SHIP_SUM()
{ {

Loading…
Cancel
Save