Commit 319acca9 authored by 吴春's avatar 吴春

提交代码

parent 01c759eb
...@@ -31,6 +31,8 @@ namespace Edu.Model.ViewModel.OKR ...@@ -31,6 +31,8 @@ namespace Edu.Model.ViewModel.OKR
/// </summary> /// </summary>
public int Dept_Id { get; set; } public int Dept_Id { get; set; }
public string QDeptIds { get; set; }
/// <summary> /// <summary>
/// 员工部门 /// 员工部门
......
...@@ -363,7 +363,7 @@ GROUP BY a.CreateBy"; ...@@ -363,7 +363,7 @@ GROUP BY a.CreateBy";
/// <param name="periodId"></param> /// <param name="periodId"></param>
/// <param name="id"></param> /// <param name="id"></param>
/// <returns></returns> /// <returns></returns>
public List<RB_OKR_Objective_ViewModel> GetOKRPersonalRelationAlignList(int group_Id, int periodId, string CreateBys,int id) public List<RB_OKR_Objective_ViewModel> GetOKRPersonalRelationAlignList(int group_Id, int periodId, string CreateBys, int id)
{ {
string sql = $@"SELECT COUNT(0) as ChildNum,o2.CreateBy FROM string sql = $@"SELECT COUNT(0) as ChildNum,o2.CreateBy FROM
rb_okr_objectiverelation or1 rb_okr_objectiverelation or1
...@@ -415,6 +415,10 @@ WHERE o1.CreateBy in({CreateBys}) and o2.CreateBy ={id} and o1.`Status`=2 and ...@@ -415,6 +415,10 @@ WHERE o1.CreateBy in({CreateBys}) and o2.CreateBy ={id} and o1.`Status`=2 and
{ {
whereperiodId.AppendFormat(" AND a.{0}={1} ", nameof(OKRPersonalDimension.PeriodId), query.PeriodId); whereperiodId.AppendFormat(" AND a.{0}={1} ", nameof(OKRPersonalDimension.PeriodId), query.PeriodId);
} }
if (!string.IsNullOrWhiteSpace(query.Dept_Ids))
{
where.AppendFormat(" AND B.{0} in ({1}) ", nameof(OKRPersonalDimension.Dept_Id), query.Dept_Ids);
}
//if (!string.IsNullOrEmpty(query.StartEntryTime)) //if (!string.IsNullOrEmpty(query.StartEntryTime))
//{ //{
// where.AppendFormat(" AND b.{0}>='{1}' ", nameof(Employee_ViewModel.EntryTime), query.StartEntryTime); // where.AppendFormat(" AND b.{0}>='{1}' ", nameof(Employee_ViewModel.EntryTime), query.StartEntryTime);
...@@ -494,7 +498,7 @@ WHERE 1=1 {5} ...@@ -494,7 +498,7 @@ WHERE 1=1 {5}
{ {
DynamicParameters parameters = new DynamicParameters(); DynamicParameters parameters = new DynamicParameters();
string sql = GetEmployeeSqlReposiroty(query, parameters); string sql = GetEmployeeSqlReposiroty(query, parameters);
var list = Get<OKRPersonalDimension>( sql, parameters).ToList(); var list = Get<OKRPersonalDimension>(sql, parameters).ToList();
return list; return list;
} }
......
...@@ -1883,7 +1883,9 @@ namespace Edu.WebApi.Controllers.OKR ...@@ -1883,7 +1883,9 @@ namespace Edu.WebApi.Controllers.OKR
{ {
School_Id = base.ParmJObj.GetInt("School_Id"), School_Id = base.ParmJObj.GetInt("School_Id"),
PeriodId = base.ParmJObj.GetInt("PeriodId", 0)
PeriodId = base.ParmJObj.GetInt("PeriodId", 0),
QDeptIds = base.ParmJObj.GetStringValue("QDeptIds"),
}; };
query.Group_Id = base.UserInfo.Group_Id; query.Group_Id = base.UserInfo.Group_Id;
......
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