Commit 8d10690f authored by 黄奎's avatar 黄奎

页面修改

parent 5468707b
...@@ -10,5 +10,9 @@ namespace Edu.Model.ViewModel.Bonus ...@@ -10,5 +10,9 @@ namespace Edu.Model.ViewModel.Bonus
/// </summary> /// </summary>
public class RB_Personnel_BonusDetail_Extend : RB_Personnel_BonusDetail public class RB_Personnel_BonusDetail_Extend : RB_Personnel_BonusDetail
{ {
/// <summary>
/// 奖励主表编号【查询使用】
/// </summary>
public string QBonusIds { get; set; }
} }
} }
...@@ -10,6 +10,9 @@ namespace Edu.Model.ViewModel.Bonus ...@@ -10,6 +10,9 @@ namespace Edu.Model.ViewModel.Bonus
/// </summary> /// </summary>
public class RB_Personnel_Deduction_Extend: RB_Personnel_Deduction public class RB_Personnel_Deduction_Extend: RB_Personnel_Deduction
{ {
/// <summary>
/// 奖励主表编号【查询使用】
/// </summary>
public string QBonusIds { get; set; }
} }
} }
\ No newline at end of file
using Edu.Model.Entity.Bonus; using Edu.Model.Entity.Bonus;
using Edu.Model.ViewModel.Bonus;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using System.Text; using System.Text;
namespace Edu.Repository.Bonus namespace Edu.Repository.Bonus
...@@ -10,5 +12,31 @@ namespace Edu.Repository.Bonus ...@@ -10,5 +12,31 @@ namespace Edu.Repository.Bonus
/// </summary> /// </summary>
public class RB_Personnel_BonusDetailRepository : BaseRepository<RB_Personnel_BonusDetail> public class RB_Personnel_BonusDetailRepository : BaseRepository<RB_Personnel_BonusDetail>
{ {
/// <summary>
/// 获取员工人头奖励详情列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public List<RB_Personnel_BonusDetail_Extend> GetPersonnelBonusDetailListRepository(RB_Personnel_BonusDetail_Extend query)
{
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@"
SELECT A.*
FROM RB_Personnel_BonusDetail AS A
WHERE 1=1
");
if (query != null)
{
if (query.BonusId > 0)
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Personnel_BonusDetail_Extend.BonusId), query.BonusId);
}
if (!string.IsNullOrEmpty(query.QBonusIds))
{
builder.AppendFormat(" AND A.{0} IN({1}) ", nameof(RB_Personnel_BonusDetail_Extend.BonusId), query.QBonusIds);
}
}
return Get<RB_Personnel_BonusDetail_Extend>(builder.ToString()).ToList();
}
} }
} }
using Edu.Model.Entity.Bonus; using Edu.Model.Entity.Bonus;
using Edu.Model.ViewModel.Bonus;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using System.Text; using System.Text;
namespace Edu.Repository.Bonus namespace Edu.Repository.Bonus
...@@ -10,6 +12,39 @@ namespace Edu.Repository.Bonus ...@@ -10,6 +12,39 @@ namespace Edu.Repository.Bonus
/// </summary> /// </summary>
public class RB_Personnel_BonusRepository : BaseRepository<RB_Personnel_Bonus> public class RB_Personnel_BonusRepository : BaseRepository<RB_Personnel_Bonus>
{ {
/// <summary>
/// 获取员工人头奖励分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <returns></returns>
public List<RB_Personnel_Bonus_Extend> GetPersonnelBonusPageRepository(int pageIndex,int pageSize,out long rowsCount, RB_Personnel_Bonus_Extend query)
{
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@"
SELECT A.*
FROM RB_Personnel_Bonus AS A
WHERE 1=1
");
if (query != null)
{
if (query.Group_Id > 0)
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Personnel_Bonus_Extend.Group_Id), query.Group_Id);
}
if (query.YearNum>0)
{
builder.AppendFormat(" AND A.{0} IN({1}) ", nameof(RB_Personnel_Bonus_Extend.YearNum), query.YearNum);
}
if (query.MonthNum > 0)
{
builder.AppendFormat(" AND A.{0} IN({1}) ", nameof(RB_Personnel_Bonus_Extend.MonthNum), query.MonthNum);
}
}
return GetPage<RB_Personnel_Bonus_Extend>(pageIndex,pageSize,out rowsCount,builder.ToString()).ToList();
}
} }
} }
using Edu.Model.Entity.Bonus; using Edu.Model.Entity.Bonus;
using Edu.Model.ViewModel.Bonus;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using System.Text; using System.Text;
namespace Edu.Repository.Bonus namespace Edu.Repository.Bonus
...@@ -10,6 +12,31 @@ namespace Edu.Repository.Bonus ...@@ -10,6 +12,31 @@ namespace Edu.Repository.Bonus
/// </summary> /// </summary>
public class RB_Personnel_DeductionRepository : BaseRepository<RB_Personnel_Deduction> public class RB_Personnel_DeductionRepository : BaseRepository<RB_Personnel_Deduction>
{ {
/// <summary>
/// 获取员工人头奖励抵扣列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public List<RB_Personnel_Deduction_Extend> GetPersonnelBonusListRepository(RB_Personnel_Deduction_Extend query)
{
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@"
SELECT A.*
FROM RB_Personnel_Deduction AS A
WHERE 1=1
");
if (query != null)
{
if (query.BonusId > 0)
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Personnel_Deduction_Extend.BonusId), query.BonusId);
}
if (!string.IsNullOrEmpty(query.QBonusIds))
{
builder.AppendFormat(" AND A.{0} IN({1}) ", nameof(RB_Personnel_Deduction_Extend.BonusId), query.QBonusIds);
}
}
return Get<RB_Personnel_Deduction_Extend>(builder.ToString()).ToList();
}
} }
} }
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