/*
|
*接口编写处...
|
*如果接口需要做Action的权限验证,请在Action上使用属性
|
*如: [ApiActionPermission("Dt_general_info",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 Microsoft.AspNetCore.Authorization;
|
using WIDESEA.Core.Utilities;
|
using WIDESEA.Services.Services;
|
|
namespace WIDESEA.Services.Controllers
|
{
|
public partial class Dt_general_infoController
|
{
|
private readonly IDt_general_infoService _service;//访问业务代码
|
private readonly IHttpContextAccessor _httpContextAccessor;
|
|
[ActivatorUtilitiesConstructor]
|
public Dt_general_infoController(
|
IDt_general_infoService service,
|
IHttpContextAccessor httpContextAccessor
|
)
|
: base(service)
|
{
|
_service = service;
|
_httpContextAccessor = httpContextAccessor;
|
}
|
|
|
/// <summary>
|
/// 修改测量间隔时间
|
/// </summary>
|
/// <param name="saveModel"></param>
|
/// <returns></returns>
|
[HttpPost, JWTAuthorize, Route("ModifyGapTime")]
|
public WebResponseContent ModifyGapTime([FromBody] SaveModel saveModel)
|
{
|
return Dt_general_infoService.ModifyGapTime(saveModel);
|
}
|
|
|
/// <summary>
|
/// 切换空托入库和组盘入库的模式
|
/// </summary>
|
/// <param name="saveModel"></param>
|
/// <returns></returns>
|
[HttpPost, JWTAuthorize, Route("ChangeInboundModel")]
|
public WebResponseContent ChangeInboundModel([FromBody] SaveModel saveModel)
|
{
|
return Dt_general_infoService.ChangeInboundModel(saveModel);
|
}
|
|
|
/// <summary>
|
/// 获取当前的入库模式,空托入库和实托入库
|
/// </summary>
|
/// <param name="saveModel"></param>
|
/// <returns></returns>
|
[HttpPost, JWTAuthorize, Route("GetInboundModel"),AllowAnonymous]
|
public WebResponseContent GetInboundModel()
|
{
|
return Dt_general_infoService.GetInboundModel();
|
}
|
|
}
|
}
|