You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

165 lines
4.3 KiB
C#

using DS.Module.Core;
using DS.WMS.Core.App.Dtos;
using DS.WMS.Core.App.Entity;
using DS.WMS.Core.App.Interface;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
namespace DS.WMS.WebApi.Controllers;
public class AppController : ApiController
{
private readonly IAppService _invokeService;
/// <summary>
/// 构造函数
/// </summary>
/// <param name="invokeService"></param>
public AppController(IAppService invokeService)
{
_invokeService = invokeService;
}
/// <summary>
/// 用户登录
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
[HttpPost]
[AllowAnonymous]
[Route("Login")]
public DataResult<CurrentAppUserViewModel> Login([FromBody] AppLoginModel model)
{
var res = _invokeService.AppUserLogin(model);
return res;
}
/// <summary>
/// 查询客户业务明细列表
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
[HttpPost]
[Route("GetCustomerWorkList")]
public DataResult GetCustomerWorkList([FromBody] CustWorkQueryModel model)
{
var res = _invokeService.GetCustomerWorkList(model);
return res;
}
/// <summary>
/// 获取业务明细
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpGet]
[Route("GetCustomerWorkInfo")]
public DataResult GetCustomerWorkInfo([FromQuery]string id)
{
var res = _invokeService.GetCustomerWorkInfo(id);
return res;
}
/// <summary>
/// 客户业务处理
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
[HttpPost]
[Route("CustomerWorkDeal")]
public async Task<DataResult> CustomerWorkDeal([FromBody] CustCheckInput model)
{
var res = await _invokeService.CustomerWorkDeal(model);
return res;
}
/// <summary>
/// 查询班列业务明细列表
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
[HttpPost]
[Route("GetTrainWorkList")]
public DataResult GetTrainWorkList([FromBody] TrainWorkQueryModel model)
{
var res = _invokeService.GetTrainWorkList(model);
return res;
}
/// <summary>
/// 获取班列业务信息
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpGet]
[Route("GetTrainWorkInfo")]
public DataResult GetTrainWorkInfo([FromQuery]string id)
{
var res = _invokeService.GetTrainWorkInfo(id);
return res;
}
/// <summary>
/// 班列业务处理
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
[HttpPost]
[Route("TrainWorkDeal")]
public async Task<DataResult> TrainWorkDeal([FromBody] TrainCheckInput model)
{
var res = await _invokeService.TrainWorkDeal(model);
return res;
}
/// <summary>
/// 获取箱号所在库位
/// </summary>
/// <param name="boxNo"></param>
/// <returns></returns>
[HttpGet]
[Route("GetBoxAreaInfo")]
public DataResult GetBoxAreaInfo([FromQuery]string boxNo)
{
var res = _invokeService.GetBoxAreaInfo(boxNo);
return res;
}
/// <summary>
/// 获取箱号移位 所需库位列表
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpGet]
[Route("GetBoxMoveAreaInfo")]
public DataResult GetBoxMoveAreaInfo([FromQuery]string id)
{
var res = _invokeService.GetBoxMoveAreaInfo(id);
return res;
}
/// <summary>
/// 箱号移位
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
[HttpPost]
[Route("BoxMove")]
public DataResult BoxMove([FromBody] BoxMoveInput model)
{
var res = _invokeService.BoxMove(model);
return res;
}
/// <summary>
/// 获取装卸工装箱明细
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
[HttpPost]
[Route("GetOpWorkDetail")]
public DataResult<List<OpWorkDetail>> GetOpWorkDetail([FromBody] WorkDetailQueryModel query)
{
var res = _invokeService.GetOpWorkDetail(query);
return res;
}
}