From ffa35fb167b55e0b937abfdee875bbc9b48fc813 Mon Sep 17 00:00:00 2001 From: mahao Date: Mon, 31 Jul 2023 14:01:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E6=AF=94Job?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Entities/TaskJobs/JobAppService.cs | 154 ++++++------------ 1 file changed, 49 insertions(+), 105 deletions(-) diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/TaskJobs/JobAppService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/TaskJobs/JobAppService.cs index 484d33b4..b492ede7 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/TaskJobs/JobAppService.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/TaskJobs/JobAppService.cs @@ -1,135 +1,79 @@ - - using System; using System.Collections.Generic; -using System.IO; -using System.Linq; using System.Threading.Tasks; -using EFCore.BulkExtensions; -using Magicodes.ExporterAndImporter.Core; -using Magicodes.ExporterAndImporter.Excel; using Microsoft.AspNetCore.Authorization; -using Microsoft.AspNetCore.Http; 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.BackgroundJobs; -using Volo.Abp.Caching; -using Volo.Abp.Domain.Repositories; -using Volo.Abp.Guids; -using Volo.Abp.ObjectMapping; 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; - /// - /// 根据筛选条件获取实体列表 - /// - /// - /// 请求条件包括:筛选条件列表,排序条件,数据数量,页码 - /// - /// 请求条件 - /// 实体DTO列表 - [HttpPost] - [Route("list")] - //[Authorize(SettleAccountPermissions.Materials.Default)] - [UnitOfWork(false)] - virtual public async Task> GetListAsync(JobRequestDto input) - { - - - //SettleAccount.Job.Services.Report.SettleKBWithCodeExportService - //switch (input.ServiceName) - //{ - // case typeof(InvoiceSettledDetailDiffExportService).FullName: - // break; - // case "": - // break; - // case "": - // break; - // case "": - // break; - //} - +[AllowAnonymous] +[Route("api/settleaccount/Job")] +public class JobAppService: ApplicationService +{ + private readonly TaskJobService _service; - return await _service.GetListAsync(input); - } + public JobAppService(TaskJobService service) + { + _service = service; + } + /// + /// 根据筛选条件获取实体列表 + /// + /// + [HttpPost] + [Route("list")] + [UnitOfWork(false)] + public virtual async Task> GetListAsync(JobRequestDto input) + { + return await _service.GetListAsync(input); + } - [HttpGet] - [Route("{id}")] + [HttpGet] + [Route("{id}")] - //[Authorize(SettleAccountPermissions.Materials.Default)] - [UnitOfWork(false)] - virtual public async Task> GetUploadListAsync(string id) - { - return await _service.GetUpFileListAsync(id); - } + //[Authorize(SettleAccountPermissions.Materials.Default)] + [UnitOfWork(false)] + virtual public async Task> GetUploadListAsync(string id) + { + return await _service.GetUpFileListAsync(id); + } - [HttpPost] - [Route("versionlist")] + [HttpPost] + [Route("versionlist")] - [UnitOfWork(false)] - virtual public async Task> GetVersionListAsync() - { - return await _service.GetVersionListAsync(); - } + [UnitOfWork(false)] + virtual public async Task> GetVersionListAsync() + { + return await _service.GetVersionListAsync(); + } - [HttpPost] - [Route("delete")] + [HttpPost] + [Route("delete")] - - virtual public async Task DeleteListAsync(List ids) - { - return await _service.DeleteListAsync(ids); - } + + virtual public async Task DeleteListAsync(List ids) + { + return await _service.DeleteListAsync(ids); + } - [HttpGet] - [Route("updateRemark")] + [HttpGet] + [Route("updateRemark")] - virtual public async Task UpdateRemarkAsync(Guid p_id,string remark) - { - return await _service.UpdateAsync(p_id,remark); - } + virtual public async Task UpdateRemarkAsync(Guid p_id,string remark) + { + return await _service.UpdateAsync(p_id,remark); + } - } }