Commit 5fef62fd authored by 黄奎's avatar 黄奎

新增查询

parent 8355763d
......@@ -127,6 +127,11 @@ namespace Edu.Model.ViewModel.User
/// </summary>
public string Address { get; set; }
/// <summary>
/// 在职状态(1-在职,2-离职)
/// </summary>
public int IsLeave { get; set; }
/// <summary>
/// 在职状态
/// </summary>
......
using Edu.Common.Enum;
using Edu.Common.Enum.User;
using Edu.Model.ViewModel.User;
using System.Collections.Generic;
using System.Linq;
......@@ -261,6 +262,14 @@ WHERE 1=1 {1}
{
where.AppendFormat(" AND B.{0}={1} ", nameof(Employee_ViewModel.LeaveStatus), (int)query.LeaveStatus);
}
if (query.IsLeave == 1)
{
where.AppendFormat(" AND B.{0}<>{1} ", nameof(Employee_ViewModel.LeaveStatus), (int)LeaveStatusEnum.Departure);
}
if (query.IsLeave == 2)
{
where.AppendFormat(" AND B.{0}={1} ", nameof(Employee_ViewModel.LeaveStatus), (int)LeaveStatusEnum.Departure);
}
if (!string.IsNullOrEmpty(query.QPostIds))
{
where.AppendFormat(" AND B.{0} IN({1}) ", nameof(Employee_ViewModel.Post_Id), query.QPostIds);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment