Commit c95042c3 authored by 吴春's avatar 吴春

Merge branch 'master' of http://gitlab.oytour.com/Kui2/education

parents ac3f9ef0 cd93417c
...@@ -15,6 +15,11 @@ namespace Edu.Model.ViewModel.Contract ...@@ -15,6 +15,11 @@ namespace Edu.Model.ViewModel.Contract
/// </summary> /// </summary>
public int IsQueryAll { get; set; } public int IsQueryAll { get; set; }
/// <summary>
/// 查询业务员
/// </summary>
public int QCreateBy { get; set; }
/// <summary> /// <summary>
/// 订单编号 /// 订单编号
/// </summary> /// </summary>
......
...@@ -196,9 +196,6 @@ namespace Edu.Model.ViewModel.Contract ...@@ -196,9 +196,6 @@ namespace Edu.Model.ViewModel.Contract
} }
} }
/// <summary> /// <summary>
/// 学员生日字符串 /// 学员生日字符串
/// </summary> /// </summary>
...@@ -234,7 +231,6 @@ namespace Edu.Model.ViewModel.Contract ...@@ -234,7 +231,6 @@ namespace Edu.Model.ViewModel.Contract
} }
} }
/// <summary> /// <summary>
/// 第二期-支付日期 /// 第二期-支付日期
/// </summary> /// </summary>
...@@ -518,10 +514,19 @@ namespace Edu.Model.ViewModel.Contract ...@@ -518,10 +514,19 @@ namespace Edu.Model.ViewModel.Contract
/// </summary> /// </summary>
public string SchoolStatusStr { get; set; } public string SchoolStatusStr { get; set; }
/// <summary> /// <summary>
/// 行政审核状态 /// 行政审核状态
/// </summary> /// </summary>
public string AdminStatusStr { get; set; } public string AdminStatusStr { get; set; }
/// <summary>
/// 是否查询所有
/// </summary>
public int IsQueryAll { get; set; }
/// <summary>
/// 查询合同人员
/// </summary>
public int QCreateBy { get; set; }
} }
} }
...@@ -262,7 +262,6 @@ namespace Edu.Module.Course ...@@ -262,7 +262,6 @@ namespace Edu.Module.Course
var amodel = alist.Where(x => x.Id == item.CreateBy).FirstOrDefault(); var amodel = alist.Where(x => x.Id == item.CreateBy).FirstOrDefault();
item.CreateByName = amodel?.AccountName ?? ""; item.CreateByName = amodel?.AccountName ?? "";
item.CreateByPhoto = amodel?.UserIcon ?? ""; item.CreateByPhoto = amodel?.UserIcon ?? "";
if (item.Status == 0) if (item.Status == 0)
{ {
item.SchoolStatusStr = "草稿"; item.SchoolStatusStr = "草稿";
......
...@@ -62,6 +62,10 @@ WHERE 1=1 ...@@ -62,6 +62,10 @@ WHERE 1=1
{ {
builder.AppendFormat(@" AND A.{0}={1} ", nameof(RB_BackClass_Protocol_ViewModel.CreateBy), query.CreateBy); builder.AppendFormat(@" AND A.{0}={1} ", nameof(RB_BackClass_Protocol_ViewModel.CreateBy), query.CreateBy);
} }
if (query.QCreateBy > 0)
{
builder.AppendFormat(@" AND A.{0}={1} ", nameof(RB_BackClass_Protocol_ViewModel.CreateBy), query.QCreateBy);
}
if (!string.IsNullOrEmpty(query.PartyAName)) if (!string.IsNullOrEmpty(query.PartyAName))
{ {
builder.AppendFormat(" AND A.{0} LIKE @PartyAName ", nameof(RB_BackClass_Protocol_ViewModel.PartyAName)); builder.AppendFormat(" AND A.{0} LIKE @PartyAName ", nameof(RB_BackClass_Protocol_ViewModel.PartyAName));
......
...@@ -91,22 +91,29 @@ namespace Edu.Repository.Contract ...@@ -91,22 +91,29 @@ namespace Edu.Repository.Contract
where += $@" AND {nameof(RB_Education_Contract_ViewModel.Status)} NOT IN(0,4) "; where += $@" AND {nameof(RB_Education_Contract_ViewModel.Status)} NOT IN(0,4) ";
} }
} }
if (demodel.IsQueryAll == 1)
{
if (demodel.QCreateBy > 0)
{
where += $@" AND {nameof(RB_Education_Contract_ViewModel.CreateBy)} ={demodel.QCreateBy}";
}
}
else else
{ {
if (demodel.CreateBy > 0) if (demodel.CreateBy > 0)
{ {
where += $@" AND {nameof(RB_Education_Contract_ViewModel.CreateBy)} ={demodel.CreateBy}"; where += $@" AND {nameof(RB_Education_Contract_ViewModel.CreateBy)} ={demodel.CreateBy}";
} }
if (demodel.Status >= 0) }
if (demodel.Status >= 0)
{
if (demodel.Status == 5)
{ {
if (demodel.Status == 5) where += $@" AND {nameof(RB_Education_Contract_ViewModel.Status)} in(2,5)";
{ }
where += $@" AND {nameof(RB_Education_Contract_ViewModel.Status)} in(2,5)"; else
} {
else where += $@" AND {nameof(RB_Education_Contract_ViewModel.Status)} ={demodel.Status}";
{
where += $@" AND {nameof(RB_Education_Contract_ViewModel.Status)} ={demodel.Status}";
}
} }
} }
string sql = $@" SELECT * FROM RB_Education_Contract WHERE {where} ORDER BY Id DESC "; string sql = $@" SELECT * FROM RB_Education_Contract WHERE {where} ORDER BY Id DESC ";
......
...@@ -108,10 +108,15 @@ namespace Edu.WebApi.Controllers.Course ...@@ -108,10 +108,15 @@ namespace Edu.WebApi.Controllers.Course
CType = (ContractTypeEnum)base.ParmJObj.GetInt("CType"), CType = (ContractTypeEnum)base.ParmJObj.GetInt("CType"),
Status = base.ParmJObj.GetInt("Status"), Status = base.ParmJObj.GetInt("Status"),
StudentName = base.ParmJObj.GetStringValue("StudentName"), StudentName = base.ParmJObj.GetStringValue("StudentName"),
IsAduit = base.ParmJObj.GetInt("IsAduit") IsAduit = base.ParmJObj.GetInt("IsAduit"),
IsQueryAll=base.ParmJObj.GetInt("IsQueryAll"),
QCreateBy=base.ParmJObj.GetInt("QCreateBy"),
}; };
dmodel.Group_Id = userInfo.Group_Id; dmodel.Group_Id = userInfo.Group_Id;
dmodel.CreateBy = userInfo.Id; if (dmodel.IsQueryAll == 0)
{
dmodel.CreateBy = userInfo.Id;
}
var list = educationContractModule.GetEducationContractPageListModule_V3(pageModel.PageIndex, pageModel.PageSize, out long count, dmodel); var list = educationContractModule.GetEducationContractPageListModule_V3(pageModel.PageIndex, pageModel.PageSize, out long count, dmodel);
pageModel.Count = Convert.ToInt32(count); pageModel.Count = Convert.ToInt32(count);
pageModel.PageData = list.Select(x => new pageModel.PageData = list.Select(x => new
...@@ -451,6 +456,7 @@ namespace Edu.WebApi.Controllers.Course ...@@ -451,6 +456,7 @@ namespace Edu.WebApi.Controllers.Course
QOrderId = base.ParmJObj.GetInt("QOrderId"), QOrderId = base.ParmJObj.GetInt("QOrderId"),
ProtocolNum = base.ParmJObj.GetStringValue("ProtocolNum"), ProtocolNum = base.ParmJObj.GetStringValue("ProtocolNum"),
IsQueryAll=base.ParmJObj.GetInt("IsQueryAll"), IsQueryAll=base.ParmJObj.GetInt("IsQueryAll"),
QCreateBy=base.ParmJObj.GetInt("QCreateBy"),
}; };
query.Group_Id = userInfo.Group_Id; query.Group_Id = userInfo.Group_Id;
if (query.IsQueryAll == 0) if (query.IsQueryAll == 0)
......
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