|
|
@ -4,17 +4,21 @@ using Magicodes.ExporterAndImporter.Excel; |
|
|
|
using Microsoft.AspNetCore.Authorization; |
|
|
|
using Microsoft.AspNetCore.Http; |
|
|
|
using Microsoft.AspNetCore.Mvc; |
|
|
|
using SettleAccount.Job.Services.Report; |
|
|
|
using Shouldly; |
|
|
|
using System; |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Linq; |
|
|
|
using System.Text; |
|
|
|
using System.Threading.Tasks; |
|
|
|
using TaskJob.EventArgs; |
|
|
|
using Volo.Abp.Application.Dtos; |
|
|
|
using Volo.Abp.Application.Services; |
|
|
|
using Volo.Abp.Uow; |
|
|
|
using Win.Sfs.BaseData.ImportExcelCommon; |
|
|
|
using Win.Sfs.SettleAccount.Constant; |
|
|
|
using Win.Sfs.SettleAccount.Entities.ImportMap; |
|
|
|
using Win.Sfs.SettleAccount.Entities.TaskJobs; |
|
|
|
using Win.Sfs.SettleAccount.ExcelImporter; |
|
|
|
using Win.Sfs.Shared.Filter; |
|
|
|
|
|
|
@ -32,15 +36,53 @@ namespace Win.Sfs.SettleAccount.Entities.Prices |
|
|
|
private readonly PriceListManager _mng; |
|
|
|
private readonly IExcelImportAppService _excelImportService; |
|
|
|
private readonly ISettleAccountBranchEfCoreRepository<ImportColumnMap, Guid> _mapRepository; |
|
|
|
private readonly TaskJobService _service; |
|
|
|
public PriceListAppService( |
|
|
|
IExcelImportAppService excelImportService, |
|
|
|
ISettleAccountBranchEfCoreRepository<ImportColumnMap, Guid> mapRepository, |
|
|
|
PriceListManager mng |
|
|
|
PriceListManager mng, |
|
|
|
TaskJobService service |
|
|
|
) |
|
|
|
{ |
|
|
|
_mapRepository = mapRepository; |
|
|
|
_excelImportService = excelImportService; |
|
|
|
_mng = mng; |
|
|
|
_service = service; |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 结算总成和ERP总成价格对比
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
|
|
|
|
/// <returns></returns>
|
|
|
|
[HttpGet] |
|
|
|
[Route("BomDiffPrice-Make")] |
|
|
|
[DisableRequestSizeLimit] |
|
|
|
[Authorize(SettleAccountPermissions.PriceLists.Default)] |
|
|
|
|
|
|
|
public async Task<string> SettledPartAndErpPartPriceDiffMake(string version, string customerCode) |
|
|
|
{ |
|
|
|
|
|
|
|
List<CustomCondition> customConditionList = new List<CustomCondition>(); |
|
|
|
|
|
|
|
customConditionList.Add(new CustomCondition() { Name = "ProjectName", Value = "Bom定价差异明细" }); |
|
|
|
customConditionList.Add(new CustomCondition() { Name = "Version", Value = string.IsNullOrEmpty(version) ? string.Empty : version }); |
|
|
|
customConditionList.Add(new CustomCondition() { Name = "CustomerCode", Value = string.IsNullOrEmpty(customerCode) ? string.Empty : customerCode }); |
|
|
|
|
|
|
|
var _taskid = await _service.ExportEnqueueAsync("Bom定价差异明细", ExportExtentsion.Excel, version, string.Empty, CurrentUser, typeof(SettledPartAndErpPartPriceDiffExportService), customConditionList, (rs) => |
|
|
|
{ |
|
|
|
|
|
|
|
}); |
|
|
|
return _taskid; |
|
|
|
} |
|
|
|
|
|
|
|
[HttpPost] |
|
|
|
[Route("job/list")] |
|
|
|
[Authorize(SettleAccountPermissions.PriceLists.Default)] |
|
|
|
[UnitOfWork(false)] |
|
|
|
virtual public async Task<List<JobDto>> GetListAsync(JobRequestDto input) |
|
|
|
{ |
|
|
|
return await _service.GetListAsync(input); |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|