parent
12a941a2b6
commit
bb90d13180
@ -0,0 +1,44 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,30 @@
|
||||
using System.Collections.Generic;
|
||||
using FactorySystemModel.ResponseModel;
|
||||
|
||||
namespace FactorySystemModel.RequestModel
|
||||
{
|
||||
public class MaterialTaskQuery : MaterialTaskRow
|
||||
{
|
||||
public MaterialTaskQuery()
|
||||
{
|
||||
FIsUser = true;
|
||||
}
|
||||
/// <summary>
|
||||
/// Desc:发起时间的时间段
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public List<string> FDateRange { get; set; }
|
||||
|
||||
// 路线类型
|
||||
public int FTeamworkType { get; set; }
|
||||
|
||||
public int FPageIndex { get; set; }
|
||||
|
||||
public int FPageSize { get; set; }
|
||||
/// <summary>
|
||||
/// 是否根据全选出数据
|
||||
/// </summary>
|
||||
public bool FIsUser { get; set; }
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,31 @@
|
||||
using System.Collections.Generic;
|
||||
using FactorySystemModel.ResponseModel;
|
||||
|
||||
namespace FactorySystemModel.RequestModel
|
||||
{
|
||||
public class MaterialTeamworkQuery : MaterialTeamworkRow
|
||||
{
|
||||
public MaterialTeamworkQuery()
|
||||
{
|
||||
FIsUser = true;
|
||||
}
|
||||
|
||||
// 用户
|
||||
public int FUserID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:发起时间的时间段
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public List<string> FDateRange { get; set; }
|
||||
|
||||
public int FPageIndex { get; set; }
|
||||
|
||||
public int FPageSize { get; set; }
|
||||
/// <summary>
|
||||
/// 是否根据全选出数据
|
||||
/// </summary>
|
||||
public bool FIsUser { get; set; }
|
||||
}
|
||||
}
|
||||
Loading…
Reference in new issue