Commit bb9cf165 authored by 黄奎's avatar 黄奎

流程测试修改

parent fddbaf09
......@@ -79,7 +79,7 @@ namespace Edu.Model.Entity.EduTask
public int SpecialNode { get; set; }
/// <summary>
/// 多个定角色编号
/// 定角色编号
/// </summary>
public string PostIds { get; set; }
......@@ -87,5 +87,10 @@ namespace Edu.Model.Entity.EduTask
/// 指定的人员编号
/// </summary>
public string UserIds { get; set; }
/// <summary>
/// 系统角色编号
/// </summary>
public string SysPostIds { get; set; }
}
}
\ No newline at end of file
......@@ -19,5 +19,10 @@ namespace Edu.Model.ViewModel.Flow
/// 流程编号【查询使用】
/// </summary>
public string QFlowIds { get; set; }
/// <summary>
/// 系统角色对应人员编号【逗号分割】
/// </summary>
public string PostUserIds { get; set; }
}
}
......@@ -68,6 +68,11 @@ namespace Edu.Model.ViewModel.User
/// </summary>
public int Post_Id { get; set; }
/// <summary>
/// 岗位编号
/// </summary>
public string QPostIds { get; set; }
/// <summary>
/// 部门名称
/// </summary>
......
......@@ -139,7 +139,7 @@ namespace Edu.Module.Course
Title="退课单据",
ClassId=orderModel.ClassId,
OrderId=orderModel.OrderId,
ReceiptType= Common.Enum.Finance.ReceiptTypeEnum.ChangeClass,
ReceiptType= Common.Enum.Finance.ReceiptTypeEnum.BackClass,
RelationId= backClassModel.BackId,
Group_Id=orderModel.Group_Id,
School_Id=orderModel.School_Id,
......
......@@ -48,11 +48,6 @@ namespace Edu.Repository.EduTask
/// </summary>
private readonly RB_OrderRepository orderRepository = new RB_OrderRepository();
/// <summary>
/// 角色仓储层对象
/// </summary>
private readonly RB_PostRepository postRepository = new RB_PostRepository();
/// <summary>
/// 获取教务单据分页列表
/// </summary>
......@@ -108,7 +103,7 @@ WHERE 1=1
break;
//已审批的
case Common.Enum.Course.EduReceiptConditionEnum.Agree:
builder.AppendFormat(" AND EXISTS (SELECT 1 FROM rb_education_record WHERE ConditionId=A.Id AND AuditStatus IN(2,5) AND AuditEmId={0}) ", query.CreateBy);
builder.AppendFormat(" AND EXISTS (SELECT 1 FROM rb_education_record WHERE ConditionId=A.Id AND AuditStatus NOT IN(1,5) AND AuditEmId={0}) ", query.CreateBy);
break;
//我发起的
case Common.Enum.Course.EduReceiptConditionEnum.Launch:
......@@ -218,11 +213,11 @@ WHERE 1=1
//系统角色
else if (subItem.AuditType == Common.Enum.User.WFTAuditTypeEnum.Post)
{
var postIds= GetPostIdsRepository(model.Group_Id, subItem.PostType);
var postIds= GetPostIdsRepository(model.Group_Id, subItem.PostType.ToString());
if (postIds!=null && postIds.Count>0)
{
AuditedId += string.Join(",", postIds) + ",";
subItem.UserId = postIds[0];
subItem.PostUserIds = string.Join(",", postIds);
}
}
}
......@@ -236,13 +231,31 @@ WHERE 1=1
AuditType = item.FlowAduitList[0].AuditType,
OriginalAuditId = 0,
RoleOrInitiator = 0,
PostIds = string.Join(",", item.FlowAduitList.Where(qitem => qitem.AuditType == Common.Enum.User.WFTAuditTypeEnum.Role).Select(qitem => qitem.PostType)),
UserIds = string.Join(",", item.FlowAduitList.Where(qitem => qitem.AuditType == Common.Enum.User.WFTAuditTypeEnum.SpecifiedMember).Select(qitem => qitem.UserId)),
PostIds ="",
UserIds = "",
SysPostIds="",
ToAuditId = AuditedId.TrimEnd(','),
Sort = item.SortNum,
SpecialNode = item.FlowAduitList[0].IsSpecNode,
Stauts = Common.Enum.User.WFRrocessStatus.NotAudit,
};
//指定人员审核
if (levance.AuditType == Common.Enum.User.WFTAuditTypeEnum.SpecifiedMember)
{
levance.UserIds = string.Join(",", item.FlowAduitList.Where(qitem => qitem.AuditType == Common.Enum.User.WFTAuditTypeEnum.SpecifiedMember).Select(qitem => qitem.UserId));
}
//指定角色审核
else if (levance.AuditType == Common.Enum.User.WFTAuditTypeEnum.Role)
{
levance.PostIds = string.Join(",", item.FlowAduitList.Where(qitem => qitem.AuditType == Common.Enum.User.WFTAuditTypeEnum.Role).Select(qitem => qitem.PostType));
}
//系统角色审核
else if (levance.AuditType == Common.Enum.User.WFTAuditTypeEnum.Post)
{
//系统角色编号
levance.SysPostIds = string.Join(",", item.FlowAduitList.Where(qitem => qitem.AuditType == Common.Enum.User.WFTAuditTypeEnum.Post).Select(qitem => qitem.PostType));
}
if (model.ReceiptType == Common.Enum.Finance.ReceiptTypeEnum.BackClass)
{
levance.WorkFlowId = Common.Config.BackClassFlowId;
......@@ -263,7 +276,6 @@ WHERE 1=1
ConditionId = model.Id,
AuditStatus = Common.Enum.User.WFRrocessStatus.NotAudit,
AuditId = levance.Id,
AuditEmId = subItem.UserId,
CreateBy = model.CreateBy,
CreateTime = DateTime.Now,
UpdateBy = model.CreateBy,
......@@ -271,7 +283,22 @@ WHERE 1=1
Description = "",
BackrelevanceId = levance.Id,
};
flag = student_BackRecordRepository.Insert(recordModel) > 0;
//系统岗位审核;
if (!string.IsNullOrEmpty(subItem.PostUserIds))
{
var userList = Common.ConvertHelper.StringToList(subItem.PostUserIds);
foreach (var tItem in userList)
{
recordModel.Id = 0;
recordModel.AuditEmId = tItem;
flag = student_BackRecordRepository.Insert(recordModel) > 0;
}
}
else
{
recordModel.AuditEmId = subItem.UserId;
flag = student_BackRecordRepository.Insert(recordModel) > 0;
}
}
}
}
......@@ -353,13 +380,13 @@ WHERE 1=1
/// <param name="GroupId"></param>
/// <param name="PostId"></param>
/// <returns></returns>
public List<int> GetPostIdsRepository(int GroupId, int PostId)
public List<int> GetPostIdsRepository(int GroupId, string PostId)
{
List<int> result = new List<int> ();
var list = accountRepository.GetAccountListExtRepository(new Model.ViewModel.User.RB_Account_ViewModel()
{
Group_Id = GroupId,
Post_Id = PostId
QPostIds = PostId
});
if (list!=null &&list.Count > 0)
{
......
......@@ -19,7 +19,7 @@ namespace Edu.Repository.EduTask
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public List<RB_Education_Relevance_ViewModel> GetStudentBackRelevanceListRepository(RB_Education_Relevance_ViewModel query)
public List<RB_Education_Relevance_ViewModel> GetEducationRelevanceListRepository(RB_Education_Relevance_ViewModel query)
{
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@"
......
......@@ -115,6 +115,10 @@ WHERE 1=1
{
where.AppendFormat(" AND B.{0}={1} ", nameof(RB_Account_ViewModel.Post_Id), query.Post_Id);
}
if (!string.IsNullOrEmpty(query.QPostIds))
{
where.AppendFormat(" AND B.{0} IN({1}) ", nameof(RB_Account_ViewModel.Post_Id), query.QPostIds);
}
if (query.Dept_Id > 0)
{
where.AppendFormat(" AND B.{0}={1} ", nameof(RB_Account_ViewModel.Dept_Id), query.Dept_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