| | |
| | | using Utility.Entity; |
| | | using Utility; |
| | | using Model.ModelVm; |
| | | using Microsoft.AspNetCore.Authorization; |
| | | |
| | | namespace Wms.Controllers |
| | | { |
| | | /// <summary> |
| | | /// 任务调度 |
| | | /// </summary> |
| | | [Route("api/[controller]/[Action]")] |
| | | [EnableCors("AllowSameDomain")] //允许跨域 |
| | | [Route("api/[controller]/[action]")] |
| | | [ApiController] |
| | | [Authorize] |
| | | [ServiceFilter(typeof(ApiResponseActionFilter))] |
| | | public class JobController : ControllerBase |
| | | { |
| | |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpGet] |
| | | public async Task<List<JobInfoEntity>> GetAllJob() |
| | | public async Task<List<JobInfo>> GetAllJob() |
| | | { |
| | | return await scheduler.GetAllJobAsync(); |
| | | var list = await scheduler.GetAllJobAsync(); |
| | | var listJob = new List<JobInfo>(); |
| | | foreach (var mod in list) |
| | | { |
| | | mod.JobInfoList.ForEach(s => s.GroupName = mod.GroupName); |
| | | listJob.AddRange(mod.JobInfoList); |
| | | } |
| | | return listJob; |
| | | } |
| | | |
| | | /// <summary> |