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.

46 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 HalfMaterialTaskController : ApiController
{
private readonly HalfMaterialTaskBll _taskBll = new HalfMaterialTaskBll();
/// <summary>
/// 根据当前用户获取任务列表
/// </summary>
[HttpPost]
public ApiResult GetPageList(TaskQuery tq)
{
ApiResult apiResult = new ApiResult();
return ExceptionHelper.TryReturnException(() =>
{
if (tq.FIsUser && Request.Properties["token"] is ApiAuthInfo user)
{
tq.FUserID = user.FID.ToString();
}
apiResult.Data = new
{
List = _taskBll.GetList(tq, out var totalNumber),
Total = totalNumber
};
}, apiResult, Request);
}
}
}