/*
*接口编写处...
*如果接口需要做Action的权限验证,请在Action上使用属性
*如: [ApiActionPermission("Dt_taskinfo",Enums.ActionPermissionOptions.Search)]
*/
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.AspNetCore.Http;
using WIDESEA.Entity.DomainModels;
using WIDESEA.Services.IServices;
using WIDESEA.Core.Filters;
using WIDESEA.Core.Utilities;
using WIDESEA.Common.Modbus;
using Microsoft.AspNetCore.Authorization;
using WIDESEA.Services.Services;
using WIDESEA.Services.Repositories;
namespace WIDESEA.Services.Controllers
{
public partial class Dt_taskinfoController
{
private readonly IDt_taskinfoService _service;//访问业务代码
private readonly IHttpContextAccessor _httpContextAccessor;
[ActivatorUtilitiesConstructor]
public Dt_taskinfoController(
IDt_taskinfoService service,
IHttpContextAccessor httpContextAccessor
)
: base(service)
{
_service = service;
_httpContextAccessor = httpContextAccessor;
}
///
/// 获取空托盘出库的任务列表,给前端的PDA展示
///
///
[HttpPost, JWTAuthorize, Route("GetEmptyPalletTaskList")]
public WebResponseContent GetEmptyPalletTaskList()
{
return Dt_taskinfoService.GetEmptyPalletTaskList();
}
///
/// 取消某一条未开始的任务
///
///
[HttpPost, JWTAuthorize, Route("CancelATask")]
public WebResponseContent CancelATask([FromBody] SaveModel saveModel)
{
return Dt_taskinfoService.CancelATask(saveModel);
}
///
/// 完成某一条未开始的任务
///
///
[HttpPost, JWTAuthorize, Route("CompletedTask")]
public WebResponseContent CompletedTask([FromBody] SaveModel saveModel)
{
return Dt_taskinfoService.CompletedTask(saveModel);
}
///
/// 取消测量,直接回库
///
///
[HttpPost, JWTAuthorize, Route("CancelAMeasureTask")]
public WebResponseContent CancelAMeasureTask([FromBody] SaveModel saveModel)
{
return Dt_taskinfoService.CancelAMeasureTask(saveModel);
}
}
}