#region << 版 本 注 释 >> /*---------------------------------------------------------------- * 命名空间:WIDESEAWCS_WCSServer.Controllers.TaskInfo * 创建者:系统自动生成 * 创建时间:2024/11/14 * 版本:V1.0.0 * 描述:任务历史控制器 * * ---------------------------------------------------------------- * 修改人: * 修改时间: * 版本:V1.0.1 * 修改说明: * *----------------------------------------------------------------*/ #endregion << 版 本 注 释 >> using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using WIDESEAWCS_Core.BaseController; using WIDESEAWCS_ITaskInfoService; using WIDESEAWCS_Model.Models; namespace WIDESEAWCS_WCSServer.Controllers.TaskInfo { /// /// 任务历史 /// [Route("api/Task_Hty")] [ApiController] public class Task_HtyController : ApiBaseController { public Task_HtyController(ITaskHtyService service) : base(service) { } /// /// 根据任务号查询历史记录 /// /// 任务号 /// 历史记录列表 [HttpGet("GetHistoryByTaskNum/{taskNum}")] [AllowAnonymous] public IActionResult GetHistoryByTaskNum(int taskNum) { try { var historyList = Service.GetHistoryByTaskNum(taskNum); return Json(new { status = true, data = historyList }); } catch (Exception ex) { return Json(new { status = false, message = ex.Message }); } } /// /// 根据原任务ID查询历史记录 /// /// 原任务ID /// 历史记录列表 [HttpGet("GetHistoryBySourceId/{sourceId}")] [AllowAnonymous] public IActionResult GetHistoryBySourceId(int sourceId) { try { var historyList = Service.GetHistoryBySourceId(sourceId); return Json(new { status = true, data = historyList }); } catch (Exception ex) { return Json(new { status = false, message = ex.Message }); } } } }