You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
1.3 KiB
45 lines
1.3 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.Web.Http;
|
|
using FactorySystemApi.Sap_Group;
|
|
using FactorySystemBll;
|
|
using FactorySystemCommon;
|
|
using FactorySystemModel.BusinessModel;
|
|
using FactorySystemModel.EnumModel;
|
|
using FactorySystemModel.RequestModel;
|
|
using FactorySystemModel.ResponseModel;
|
|
using FactorySystemModel.SqlSugarModel;
|
|
|
|
namespace FactorySystemApi.Controllers
|
|
{
|
|
/// <summary>
|
|
/// 任务
|
|
/// </summary>
|
|
[UserLoginFilter]
|
|
public class MaterialTaskController : ApiController
|
|
{
|
|
private readonly MaterialTaskBll _taskBll = new MaterialTaskBll();
|
|
|
|
/// <summary>
|
|
/// 根据当前用户获取任务列表
|
|
/// </summary>
|
|
[HttpPost]
|
|
public ApiResult GetPageList(MaterialTaskQuery mtq)
|
|
{
|
|
ApiResult apiResult = new ApiResult();
|
|
return ExceptionHelper.TryReturnException(() =>
|
|
{
|
|
if (mtq.FIsUser && Request.Properties["token"] is ApiAuthInfo user)
|
|
{
|
|
mtq.FUserID = user.FID.ToString();
|
|
}
|
|
apiResult.Data = new
|
|
{
|
|
List = _taskBll.GetList(mtq, out var totalNumber),
|
|
Total = totalNumber
|
|
};
|
|
}, apiResult, Request);
|
|
}
|
|
}
|
|
}
|