mahao
1 year ago
1 changed files with 49 additions and 105 deletions
@ -1,135 +1,79 @@ |
|||||
|
|
||||
|
|
||||
using System; |
using System; |
||||
using System.Collections.Generic; |
using System.Collections.Generic; |
||||
using System.IO; |
|
||||
using System.Linq; |
|
||||
using System.Threading.Tasks; |
using System.Threading.Tasks; |
||||
using EFCore.BulkExtensions; |
|
||||
using Magicodes.ExporterAndImporter.Core; |
|
||||
using Magicodes.ExporterAndImporter.Excel; |
|
||||
using Microsoft.AspNetCore.Authorization; |
using Microsoft.AspNetCore.Authorization; |
||||
using Microsoft.AspNetCore.Http; |
|
||||
using Microsoft.AspNetCore.Mvc; |
using Microsoft.AspNetCore.Mvc; |
||||
using Microsoft.Extensions.Caching.Distributed; |
|
||||
using SettleAccount.Job.Services; |
|
||||
using Shouldly; |
|
||||
using Volo.Abp; |
|
||||
using Volo.Abp.Application.Dtos; |
|
||||
using Volo.Abp.Application.Services; |
using Volo.Abp.Application.Services; |
||||
using Volo.Abp.BackgroundJobs; |
|
||||
using Volo.Abp.Caching; |
|
||||
using Volo.Abp.Domain.Repositories; |
|
||||
using Volo.Abp.Guids; |
|
||||
using Volo.Abp.ObjectMapping; |
|
||||
using Volo.Abp.Uow; |
using Volo.Abp.Uow; |
||||
using Win.Abp.Snowflakes; |
|
||||
using Win.Sfs.BaseData.ImportExcelCommon; |
|
||||
using Win.Sfs.SettleAccount.CommonManagers; |
|
||||
using Win.Sfs.SettleAccount.Constant; |
|
||||
using Win.Sfs.SettleAccount.Entities.TaskJobs; |
|
||||
using Win.Sfs.SettleAccount.ExcelImporter; |
|
||||
using Win.Sfs.SettleAccount.ExportReports; |
|
||||
|
|
||||
using Win.Sfs.SettleAccount.MaterialRelationships; |
|
||||
using Win.Sfs.Shared.CacheBase; |
|
||||
using Win.Utils; |
|
||||
|
|
||||
namespace Win.Sfs.SettleAccount.Entities.TaskJobs |
|
||||
{ |
|
||||
//调整权限-派格张影导入数据时此模块她要看
|
|
||||
[Authorize(SettleAccountPermissions.HQ_FPlatform.Default)] |
|
||||
//[AllowAnonymous]
|
|
||||
[Route("api/settleaccount/Job")] |
|
||||
public class JobAppService: ApplicationService |
|
||||
{ |
|
||||
|
|
||||
private readonly TaskJobService _service; |
|
||||
public JobAppService(TaskJobService service) |
|
||||
{ |
|
||||
|
|
||||
_service = service; |
|
||||
} |
|
||||
|
|
||||
|
namespace Win.Sfs.SettleAccount.Entities.TaskJobs; |
||||
|
|
||||
/// <summary>
|
[AllowAnonymous] |
||||
/// 根据筛选条件获取实体列表
|
[Route("api/settleaccount/Job")] |
||||
/// </summary>
|
public class JobAppService: ApplicationService |
||||
/// <remarks>
|
{ |
||||
/// 请求条件包括:筛选条件列表,排序条件,数据数量,页码
|
private readonly TaskJobService _service; |
||||
/// </remarks>
|
|
||||
/// <param name="input">请求条件</param>
|
|
||||
/// <returns>实体DTO列表</returns>
|
|
||||
[HttpPost] |
|
||||
[Route("list")] |
|
||||
//[Authorize(SettleAccountPermissions.Materials.Default)]
|
|
||||
[UnitOfWork(false)] |
|
||||
virtual public async Task<List<JobDto>> GetListAsync(JobRequestDto input) |
|
||||
{ |
|
||||
|
|
||||
|
|
||||
//SettleAccount.Job.Services.Report.SettleKBWithCodeExportService
|
|
||||
//switch (input.ServiceName)
|
|
||||
//{
|
|
||||
// case typeof(InvoiceSettledDetailDiffExportService).FullName:
|
|
||||
// break;
|
|
||||
// case "":
|
|
||||
// break;
|
|
||||
// case "":
|
|
||||
// break;
|
|
||||
// case "":
|
|
||||
// break;
|
|
||||
//}
|
|
||||
|
|
||||
|
|
||||
return await _service.GetListAsync(input); |
public JobAppService(TaskJobService service) |
||||
} |
{ |
||||
|
_service = service; |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根据筛选条件获取实体列表
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
[HttpPost] |
||||
|
[Route("list")] |
||||
|
[UnitOfWork(false)] |
||||
|
public virtual async Task<List<JobDto>> GetListAsync(JobRequestDto input) |
||||
|
{ |
||||
|
return await _service.GetListAsync(input); |
||||
|
} |
||||
|
|
||||
|
|
||||
[HttpGet] |
[HttpGet] |
||||
[Route("{id}")] |
[Route("{id}")] |
||||
|
|
||||
//[Authorize(SettleAccountPermissions.Materials.Default)]
|
//[Authorize(SettleAccountPermissions.Materials.Default)]
|
||||
[UnitOfWork(false)] |
[UnitOfWork(false)] |
||||
virtual public async Task<List<string>> GetUploadListAsync(string id) |
virtual public async Task<List<string>> GetUploadListAsync(string id) |
||||
{ |
{ |
||||
return await _service.GetUpFileListAsync(id); |
return await _service.GetUpFileListAsync(id); |
||||
} |
} |
||||
|
|
||||
|
|
||||
[HttpPost] |
[HttpPost] |
||||
[Route("versionlist")] |
[Route("versionlist")] |
||||
|
|
||||
[UnitOfWork(false)] |
[UnitOfWork(false)] |
||||
virtual public async Task<List<string>> GetVersionListAsync() |
virtual public async Task<List<string>> GetVersionListAsync() |
||||
{ |
{ |
||||
return await _service.GetVersionListAsync(); |
return await _service.GetVersionListAsync(); |
||||
} |
} |
||||
|
|
||||
|
|
||||
[HttpPost] |
[HttpPost] |
||||
[Route("delete")] |
[Route("delete")] |
||||
|
|
||||
|
|
||||
virtual public async Task<bool> DeleteListAsync(List<Guid> ids) |
virtual public async Task<bool> DeleteListAsync(List<Guid> ids) |
||||
{ |
{ |
||||
return await _service.DeleteListAsync(ids); |
return await _service.DeleteListAsync(ids); |
||||
} |
} |
||||
|
|
||||
|
|
||||
|
|
||||
[HttpGet] |
[HttpGet] |
||||
[Route("updateRemark")] |
[Route("updateRemark")] |
||||
|
|
||||
|
|
||||
virtual public async Task<bool> UpdateRemarkAsync(Guid p_id,string remark) |
virtual public async Task<bool> UpdateRemarkAsync(Guid p_id,string remark) |
||||
{ |
{ |
||||
return await _service.UpdateAsync(p_id,remark); |
return await _service.UpdateAsync(p_id,remark); |
||||
} |
} |
||||
|
|
||||
|
|
||||
} |
|
||||
} |
} |
||||
|
|
||||
|
|
||||
|
Loading…
Reference in new issue