using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Mvc;
|
using WIDESEAWCS_Common;
|
using WIDESEAWCS_Core;
|
using WIDESEAWCS_DTO;
|
using WIDESEAWCS_DTO.WMS;
|
using WIDESEAWCS_ITaskInfoService;
|
|
namespace WIDESEAWCS_Server.Controllers.AGV
|
{
|
[Route("api/[controller]")]
|
[ApiController]
|
public class KLSAGVController : ControllerBase
|
{
|
private readonly ITaskService _taskService;
|
public KLSAGVController(ITaskService taskService)
|
{
|
_taskService = taskService;
|
}
|
|
/// <summary>
|
/// 任务状态更新
|
/// </summary>
|
/// <param name="taskDTOs"></param>
|
/// <returns></returns>
|
[HttpPost, Route("UpdateTaskStatus"), AllowAnonymous]
|
public ReturnGALAXIS UpdateTaskStatus([FromBody] object TaskDTO)
|
{
|
ReturnGALAXIS returnGALAXIS = new ReturnGALAXIS();
|
var take= _taskService.UpdateTaskStatus(TaskDTO, DeviceTypeEnum.GALAXIS);
|
if (take.Status)
|
{
|
returnGALAXIS.returnStatus = 0;
|
returnGALAXIS.msgTime=DateTime.Now.ToString();
|
returnGALAXIS.returnInfo = "";
|
}
|
else
|
{
|
returnGALAXIS.returnStatus=take.Code;
|
returnGALAXIS.msgTime=DateTime.Now.ToString();
|
returnGALAXIS.returnInfo = take.Message;
|
}
|
|
return returnGALAXIS;
|
}
|
}
|
}
|