using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Mvc;
|
using WIDESEAWCS_Core;
|
using WIDESEAWCS_Core.BaseController;
|
using WIDESEAWCS_DTO.SerialPort;
|
using WIDESEAWCS_DTO.TaskInfo;
|
using WIDESEAWCS_ITaskInfoService;
|
using WIDESEAWCS_Model.Models;
|
|
namespace WIDESEAWCS_Server.Controllers.SerialPort
|
{
|
[Route("api/[controller]")]
|
[ApiController]
|
public class NjTaskController : ApiBaseController<INjTaskServer, Dt_NjTask>
|
{
|
public NjTaskController(INjTaskServer service) : base(service)
|
{
|
|
}
|
|
/// <summary>
|
/// 提交并保存模板
|
/// </summary>
|
/// <param name="njtakeDTO"></param>
|
/// <returns></returns>
|
[HttpPost, Route("Submtandsave"), AllowAnonymous]
|
public WebResponseContent Submtandsave([FromBody] NjtakeDTO njtakeDTO)
|
{
|
return Service.Submtandsave(njtakeDTO);
|
}
|
|
/// <summary>
|
/// 只提交不保存模板
|
/// </summary>
|
/// <param name="notempDTO"></param>
|
/// <returns></returns>
|
[HttpPost, Route("Submit"), AllowAnonymous]
|
public WebResponseContent Submit([FromBody] NotempDTO notempDTO)
|
{
|
return Service.Submit(notempDTO);
|
}
|
|
/// <summary>
|
/// //添加任务表信息
|
/// </summary>
|
/// <param name="addNjtDTO"></param>
|
/// <returns></returns>
|
[HttpPost, Route("AddNjtake"), AllowAnonymous]
|
public WebResponseContent AddNjtake([FromBody] AddNjtDTO addNjtDTO)
|
{
|
return Service.AddNjtake(addNjtDTO);
|
}
|
|
|
/// <summary>
|
/// 更具NJtaskID返回这一条数据
|
/// <param name="njtaskID"></param>
|
/// <returns></returns>
|
/// </summary>
|
/// <param name="njtaskID"></param>
|
/// <returns></returns>
|
[HttpGet, Route("GetNjdetail"), AllowAnonymous]
|
public WebResponseContent GetNjdetail(string njtaskID)
|
{
|
return Service.GetNjdetail(njtaskID);
|
}
|
|
|
/// <summary>
|
/// 更新任务表
|
/// </summary>
|
/// <param name="putNjtDTO"></param>
|
/// <returns></returns>
|
[HttpPost, Route("PuNjtake"), AllowAnonymous]
|
public WebResponseContent PuNjtake([FromBody] PutNjtDTO putNjtDTO)
|
{
|
return Service.PuNjtake(putNjtDTO);
|
}
|
|
|
|
}
|
}
|