Commit 7cceffee authored by 黄奎's avatar 黄奎

页面修改

parent 58294349
...@@ -114,9 +114,11 @@ WHERE 1=1 ...@@ -114,9 +114,11 @@ WHERE 1=1
/// <returns></returns> /// <returns></returns>
public int CheckStudentMakeUpExistsRepository(RB_Student_Makeup model) public int CheckStudentMakeUpExistsRepository(RB_Student_Makeup model)
{ {
List<WhereHelper> whereHelpers = new List<WhereHelper>(); List<WhereHelper> whereHelpers = new List<WhereHelper>
whereHelpers.Add(new WhereHelper(nameof(RB_Student_Makeup.ClassCheckId), model.ClassCheckId)); {
whereHelpers.Add(new WhereHelper(nameof(RB_Student_Makeup.OrderGuestId), model.OrderGuestId)); new WhereHelper(nameof(RB_Student_Makeup.ClassCheckId), model.ClassCheckId),
new WhereHelper(nameof(RB_Student_Makeup.OrderGuestId), model.OrderGuestId)
};
return base.Exists("Id", whereHelpers); return base.Exists("Id", whereHelpers);
} }
} }
......
...@@ -60,7 +60,7 @@ namespace Edu.Repository.EduTask ...@@ -60,7 +60,7 @@ namespace Edu.Repository.EduTask
{ {
var parameters = new DynamicParameters(); var parameters = new DynamicParameters();
string isSpecNode = ""; string isSpecNode = "";
if (query.Conditon == Common.Enum.Course.EduReceiptConditionEnum.WaitAgree) if (query.Conditon == Common.Enum.Course.EduReceiptConditionEnum.WaitAgree)
{ {
isSpecNode = string.Format(",IFNULL((SELECT SpecialNode FROM rb_Education_relevance WHERE Id IN(SELECT BackrelevanceId FROM rb_education_record WHERE ConditionId=A.Id AND AuditStatus=1 AND AuditEmId={0})),0) AS SpecialNode ", query.CreateBy); isSpecNode = string.Format(",IFNULL((SELECT SpecialNode FROM rb_Education_relevance WHERE Id IN(SELECT BackrelevanceId FROM rb_education_record WHERE ConditionId=A.Id AND AuditStatus=1 AND AuditEmId={0})),0) AS SpecialNode ", query.CreateBy);
} }
...@@ -69,13 +69,17 @@ namespace Edu.Repository.EduTask ...@@ -69,13 +69,17 @@ namespace Edu.Repository.EduTask
SELECT A.* {0} SELECT A.* {0}
FROM RB_Education_Receipt AS A FROM RB_Education_Receipt AS A
WHERE 1=1 WHERE 1=1
",isSpecNode); ", isSpecNode);
if (query != null) if (query != null)
{ {
if (query.Group_Id > 0) if (query.Group_Id > 0)
{ {
builder.AppendFormat(@" AND A.{0}={1} ", nameof(RB_Education_Receipt_ViewModel.Group_Id), query.Group_Id); builder.AppendFormat(@" AND A.{0}={1} ", nameof(RB_Education_Receipt_ViewModel.Group_Id), query.Group_Id);
} }
if (!string.IsNullOrEmpty(query.QIds))
{
builder.AppendFormat(@" AND A.{0}IN({1}) ", nameof(RB_Education_Receipt_ViewModel.Id), query.QIds);
}
if (!string.IsNullOrEmpty(query.Title)) if (!string.IsNullOrEmpty(query.Title))
{ {
builder.AppendFormat(@" AND A.{0} LIKE @Title ", nameof(RB_Education_Receipt_ViewModel.Title)); builder.AppendFormat(@" AND A.{0} LIKE @Title ", nameof(RB_Education_Receipt_ViewModel.Title));
...@@ -98,7 +102,7 @@ WHERE 1=1 ...@@ -98,7 +102,7 @@ WHERE 1=1
switch (query.Conditon) switch (query.Conditon)
{ {
//待我审批 //待我审批
case Common.Enum.Course.EduReceiptConditionEnum.WaitAgree: case Common.Enum.Course.EduReceiptConditionEnum.WaitAgree:
builder.AppendFormat(" AND EXISTS (SELECT 1 FROM rb_education_record WHERE ConditionId=A.Id AND AuditStatus=1 AND AuditEmId={0}) ", query.CreateBy); builder.AppendFormat(" AND EXISTS (SELECT 1 FROM rb_education_record WHERE ConditionId=A.Id AND AuditStatus=1 AND AuditEmId={0}) ", query.CreateBy);
break; break;
//已审批的 //已审批的
...@@ -213,8 +217,8 @@ WHERE 1=1 ...@@ -213,8 +217,8 @@ WHERE 1=1
//系统角色 //系统角色
else if (subItem.AuditType == Common.Enum.User.WFTAuditTypeEnum.Post) else if (subItem.AuditType == Common.Enum.User.WFTAuditTypeEnum.Post)
{ {
var postIds= GetPostIdsRepository(model.Group_Id, subItem.PostType.ToString()); var postIds = GetPostIdsRepository(model.Group_Id, subItem.PostType.ToString());
if (postIds!=null && postIds.Count>0) if (postIds != null && postIds.Count > 0)
{ {
AuditedId += string.Join(",", postIds) + ","; AuditedId += string.Join(",", postIds) + ",";
subItem.PostUserIds = string.Join(",", postIds); subItem.PostUserIds = string.Join(",", postIds);
...@@ -231,9 +235,9 @@ WHERE 1=1 ...@@ -231,9 +235,9 @@ WHERE 1=1
AuditType = item.FlowAduitList[0].AuditType, AuditType = item.FlowAduitList[0].AuditType,
OriginalAuditId = 0, OriginalAuditId = 0,
RoleOrInitiator = 0, RoleOrInitiator = 0,
PostIds ="", PostIds = "",
UserIds = "", UserIds = "",
SysPostIds="", SysPostIds = "",
ToAuditId = AuditedId.TrimEnd(','), ToAuditId = AuditedId.TrimEnd(','),
Sort = item.SortNum, Sort = item.SortNum,
SpecialNode = item.FlowAduitList[0].IsSpecNode, SpecialNode = item.FlowAduitList[0].IsSpecNode,
...@@ -382,13 +386,13 @@ WHERE 1=1 ...@@ -382,13 +386,13 @@ WHERE 1=1
/// <returns></returns> /// <returns></returns>
public List<int> GetPostIdsRepository(int GroupId, string PostId) public List<int> GetPostIdsRepository(int GroupId, string PostId)
{ {
List<int> result = new List<int> (); List<int> result = new List<int>();
var list = accountRepository.GetAccountListExtRepository(new Model.ViewModel.User.RB_Account_ViewModel() var list = accountRepository.GetAccountListExtRepository(new Model.ViewModel.User.RB_Account_ViewModel()
{ {
Group_Id = GroupId, Group_Id = GroupId,
QPostIds = PostId QPostIds = PostId
}); });
if (list!=null &&list.Count > 0) if (list != null && list.Count > 0)
{ {
foreach (var item in list) foreach (var item in list)
{ {
......
...@@ -45,6 +45,11 @@ namespace Edu.WebApi.Controllers.EduTask ...@@ -45,6 +45,11 @@ namespace Edu.WebApi.Controllers.EduTask
ReceiptType = base.ParmJObj.GetInt("ReceiptType"), ReceiptType = base.ParmJObj.GetInt("ReceiptType"),
Title = base.ParmJObj.GetStringValue("Title"), Title = base.ParmJObj.GetStringValue("Title"),
}; };
var id = base.ParmJObj.GetInt("Id");
if (id > 0)
{
query.QIds = id.ToString();
}
query.CreateBy = base.UserInfo.Id; query.CreateBy = base.UserInfo.Id;
var list = educationReceiptModule.GetEducationReceiptPageModule(pageModel.PageIndex, pageModel.PageSize, out long rowsCount, query); var list = educationReceiptModule.GetEducationReceiptPageModule(pageModel.PageIndex, pageModel.PageSize, out long rowsCount, query);
pageModel.PageData = list; pageModel.PageData = list;
......
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