/*
|
*接口编写处...
|
*如果接口需要做Action的权限验证,请在Action上使用属性
|
*如: [ApiActionPermission("VV_ContainerInfo",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 Microsoft.AspNetCore.Authorization;
|
using WIDESEA.Core.Utilities;
|
using WIDESEA.Services.Services;
|
using WIDESEA.Core.Filters;
|
using WIDESEA.Services.Repositories;
|
|
namespace WIDESEA.Services.Controllers
|
{
|
public partial class VV_ContainerInfoController
|
{
|
private readonly IVV_ContainerInfoService _service;//访问业务代码
|
private readonly IHttpContextAccessor _httpContextAccessor;
|
|
[ActivatorUtilitiesConstructor]
|
public VV_ContainerInfoController(
|
IVV_ContainerInfoService service,
|
IHttpContextAccessor httpContextAccessor
|
)
|
: base(service)
|
{
|
_service = service;
|
_httpContextAccessor = httpContextAccessor;
|
}
|
|
|
/// <summary>
|
/// 前端调用的轴承手动指定出库功能
|
/// </summary>
|
/// <returns></returns>
|
[HttpPost, JWTAuthorize, Route("BoxOutboundByManual")]
|
public WebResponseContent BoxOutboundByManual([FromBody] SaveModel saveModel)
|
{
|
|
return Service.BoxOutboundByManual(saveModel);
|
}
|
|
|
/// <summary>
|
/// 供前端的库存平面图调用,获取数据
|
/// </summary>
|
/// <param name="saveModel"></param>
|
/// <returns></returns>
|
[HttpPost, Authorize, Route("SelectContainerList"), AllowAnonymous]
|
public WebResponseContent SelectContainerList([FromBody] SaveModel saveModel)
|
{
|
return Service.SelectContainerList(saveModel);
|
}
|
|
|
/// <summary>
|
/// 锁定或者取消锁定库存
|
/// </summary>
|
/// <param name="saveModel"></param>
|
/// <returns></returns>
|
[HttpPost, Authorize, Route("UpdateLockStateForContianer")]
|
public WebResponseContent UpdateLockStateForContianer([FromBody] SaveModel saveModel)
|
{
|
return Service.UpdateLockStateForContianer(saveModel);
|
}
|
|
|
/// <summary>
|
/// 添加一条库存记录
|
/// </summary>
|
/// <param name="saveModel"></param>
|
/// <returns></returns>
|
[HttpPost, Authorize, Route("addGoodsRecord")]
|
public WebResponseContent addGoodsRecord([FromBody] SaveModel saveModel)
|
{
|
return Service.addGoodsRecord(saveModel);
|
}
|
|
|
/// <summary>
|
/// 手动指定添加一条测量记录(手动选中的测量轴承不计算时间)
|
/// </summary>
|
/// <param name="saveModel"></param>
|
/// <returns></returns>
|
[HttpPost, Authorize, Route("addMeasureTaskByMannual")]
|
public WebResponseContent addMeasureTaskByMannual([FromBody] SaveModel saveModel)
|
{
|
return Service.addMeasureTaskByMannual(saveModel);
|
}
|
|
|
/// <summary>
|
/// 移库出库
|
/// </summary>
|
/// <param name="saveModel"></param>
|
/// <returns></returns>
|
[HttpPost, Authorize, Route("MoveContainerAction")]
|
public WebResponseContent MoveContainerAction([FromBody] SaveModel saveModel)
|
{
|
return Service.MoveContainerAction(saveModel);
|
}
|
|
[HttpPost, Authorize, Route("addCheckTaskByMannual")]
|
public WebResponseContent AddCheckTaskAction([FromBody] SaveModel saveModel)
|
{
|
return Service.AddCheckTaskAction(saveModel);
|
}
|
|
|
/// <summary>
|
/// 供前端的库存平面图调用,获取数据
|
/// </summary>
|
/// <param name="saveModel"></param>
|
/// <returns></returns>
|
[HttpPost, Authorize, Route("QueryHomeInfo"), AllowAnonymous]
|
public WebResponseContent QueryHomeInfo()
|
{
|
return Service.QueryHomeInfo(new SaveModel());
|
}
|
|
/// <summary>
|
/// 获取库存内超过180天,且有不合格,的
|
/// </summary>
|
/// <param name="saveModel"></param>
|
/// <returns></returns>
|
[HttpPost, Authorize, Route("Getgqrkts"), AllowAnonymous]
|
public WebResponseContent Getgqrkts()
|
{
|
return Service.Getgqrkts();
|
}
|
}
|
}
|