Browse Source

更新版本

FoShanPG
Administrator 3 years ago
parent
commit
09070ebafb
  1. 4
      .gitignore
  2. 6
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/SettleAccounts/SettleAccountAppService.cs
  3. 23
      src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs
  4. 43
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/FisUpdateStateDapperRepository.cs
  5. 37
      src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/FisUpdateExportService.cs
  6. 8
      src/Modules/SettleAccount/src/SettleAccount.Job/Services/SettleAccount/SettleAccountImportService.cs
  7. 4
      src/Modules/SettleAccount/src/SettleAccount.Job/SettleAccountJobModule.cs

4
.gitignore

@ -10,3 +10,7 @@
/*.rar
/src/Shared
/.vs/Win.Sfs.SmartSettlementSystem.PG/v17/.suo
/src/.vs/SettleAccount/v17/.suo
/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Logs/log-20220226.txt

6
src/Modules/SettleAccount/src/SettleAccount.Application/Entities/SettleAccounts/SettleAccountAppService.cs

@ -302,6 +302,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
});
@ -700,13 +701,8 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
{
var entities = await _versionRepository.GetListByFilterAsync(input.BranchId, input.Filters, input.Sorting, int.MaxValue,
input.SkipCount, true);
var totalCount = await GetCountAsync(input);
var dtos = ObjectMapper.Map<List<SettleAccountVersion>, List<SettleAccountVersionDto>>(entities);
return new PagedResultDto<SettleAccountVersionDto>(totalCount, dtos);
}

23
src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs

@ -933,6 +933,29 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices
[HttpPost]
[Route("FisUpdateExportService")]
[DisableRequestSizeLimit]
public async Task<string> FisUpdateExportServiceMake(
HQKanbanRequestDto input
)
{
List<CustomCondition> customConditionList = new List<CustomCondition>();
customConditionList.Add(new CustomCondition() { Name = "Version", Value = input.Version });
customConditionList.Add(new CustomCondition() { Name = "BeginTime", Value = input.Begin });
customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = input.End });
var _taskid = await _service.ExportEnqueueAsync("Fis发货数据更新状态", ExportExtentsion.Excel, input.Version, null, CurrentUser, typeof(FisUpdateExportService), customConditionList, (rs) =>
{
});
return _taskid;
}

43
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/FisUpdateStateDapperRepository.cs

@ -0,0 +1,43 @@
using Dapper;
using Magicodes.ExporterAndImporter.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Domain.Repositories.Dapper;
using Volo.Abp.EntityFrameworkCore;
using Win.Sfs.SettleAccount.Entities;
using Win.Sfs.SettleAccount.Entities.Materials;
using Win.Sfs.SettleAccount.Entities.Prices;
using Win.Sfs.SettleAccount.Reports;
namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
{
/// <summary>
/// 主数据Dapper表
/// </summary>
public class FisUpdateDapperRepository : DapperRepository<SettleAccountDbContext>, ITransientDependency
{
public FisUpdateDapperRepository(IDbContextProvider<SettleAccountDbContext> dbContextProvider) : base(dbContextProvider)
{
}
public virtual void UpdateFisSettle()
{
DbConnection.Execute("EXEC sp_settle_fis_update", null, null, 1200, null);
}
}
}

37
src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/FisUpdateExportService.cs

@ -0,0 +1,37 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TaskJob.EventArgs;
using TaskJob.Interfaces;
using Volo.Abp.DependencyInjection;
using Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report;
namespace SettleAccount.Job.Services.Report
{
public class FisUpdateExportService : ITransientDependency, IExportJob
{
private readonly FisUpdateDapperRepository _dapperRepository;
public FisUpdateExportService(
FisUpdateDapperRepository dapperRepository
//HQHSettledDetailDapperRepository dapperRepository,
//OutputService outputService,
//InputService inputService
//, IBlobContainer<MyFileContainer> fileContainer
)
{
_dapperRepository = dapperRepository;
}
public string ExportFile(Guid id, List<string> exportName, List<CustomCondition> property)
{
_dapperRepository.UpdateFisSettle();
return id.ToString();
}
}
}

8
src/Modules/SettleAccount/src/SettleAccount.Job/Services/SettleAccount/SettleAccountImportService.cs

@ -51,8 +51,6 @@ namespace TaskJob.Services
var year = customConditions.Where(p => p.Name == "Year").FirstOrDefault().Value;
var period = customConditions.Where(p => p.Name == "Period").FirstOrDefault().Value;
var factory = customConditions.Where(p => p.Name == "Factory").FirstOrDefault().Value;
//_versionRepository.Delete(version);
//_repository.Delete(version);
List<Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccount> _setls = new List<Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccount>();
var _id = Guid.NewGuid();
foreach (var itm in fileName)
@ -92,9 +90,9 @@ namespace TaskJob.Services
_setls = _setls.GroupBy(p => new { p.ChassisNumber, p.MaterialCode, p.KENNCode }).Select(p => p.FirstOrDefault()).ToList();
_repository.Insert(_setls);
_versionRepository.Insert(_id, version, customerCode, customerCode);
_repository.GetDbContext().Database.ExecuteSqlRaw(
"EXEC sp_settle_fis_update"
);
//_repository.GetDbContext().Database.ExecuteSqlRaw(
// "EXEC sp_settle_fis_update"
// );
return id.ToString();
}

4
src/Modules/SettleAccount/src/SettleAccount.Job/SettleAccountJobModule.cs

@ -205,6 +205,10 @@ namespace Win.Sfs.SettleAccount
{
return implementationFactory.GetService<KanBanUnSettledExport>();
}
if (key.Equals(typeof(FisUpdateExportService).FullName))
{
return implementationFactory.GetService<FisUpdateExportService>();
}
else
{
throw new ArgumentException($"Not Support key:{key}");

Loading…
Cancel
Save