Commit 572034e9 authored by liudong1993's avatar liudong1993

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

parents 24bfa636 97d10775
......@@ -347,5 +347,29 @@ namespace Edu.Common
return BackClassFlowId;
}
}
/// <summary>
/// 分区校长岗位编号
/// </summary>
public static int SchoolPostId
{
get
{
int.TryParse(ReadConfigKey("SchoolPostId"), out int SchoolPostId);
return SchoolPostId;
}
}
/// <summary>
/// 教务长岗位编号
/// </summary>
public static int JiaoWuZhang
{
get
{
int.TryParse(ReadConfigKey("JiaoWuZhang"), out int JiaoWuZhang);
return JiaoWuZhang;
}
}
}
}
\ No newline at end of file
......@@ -20,7 +20,7 @@ namespace Edu.Model.Entity.Course
/// <summary>
/// 工作流id
/// </summary>
public int FlowId { get; set; }
public int BackrelevanceId { get; set; }
/// <summary>
/// 审核id
......
......@@ -48,7 +48,7 @@ namespace Edu.Model.Entity.Flow
public int IsSpecNode { get; set; }
/// <summary>
/// 1-班级教师,2-关联销售,3-分区校长 AuditType为2时使用
/// 1-班级教师,2-关联销售,3-分区校长,4-教务长 AuditType为2时使用
/// </summary>
public int PostType { get; set; }
......
......@@ -7,6 +7,7 @@ using System;
using System.Collections.Generic;
using System.Text;
using System.Linq;
using Edu.Model.Entity.Course;
namespace Edu.Module.Course
{
......@@ -36,7 +37,6 @@ namespace Edu.Module.Course
private readonly RB_FlowRepository flowRepository = new RB_FlowRepository();
/// <summary>
/// 创建退课流程
/// </summary>
......@@ -117,23 +117,89 @@ namespace Edu.Module.Course
{
if (item.FlowAduitList != null && item.FlowAduitList.Count > 0)
{
string AuditDescription = "";//审核人名称
string AuditedId = "";//审核人
foreach (var subItem in item.FlowAduitList)
{
//指定人员
if (subItem.AuditType == 1)
{
AuditedId += subItem.UserId + ",";
}
//指定角色
else if (subItem.AuditType == 2)
{
//本班教师审核
if (subItem.PostType == 1)
{
AuditedId += teacherId + ",";
subItem.UserId = teacherId;
}
//关联销售审核
else if (subItem.PostType == 2)
{
AuditedId += orderModel.EnterID + ",";
subItem.UserId = orderModel.EnterID;
}
//分区校长审核
else if (subItem.PostType == 3)
{
var headmaster = accountRepository.GetAccountListExtRepository(new Model.ViewModel.User.RB_Account_ViewModel()
{
Post_Id = Common.Config.SchoolPostId,
School_Id = classModel.School_Id,
})?.FirstOrDefault();
AuditedId += (headmaster?.Id ?? 0) + ",";
subItem.UserId = (headmaster?.Id ?? 0);
}
else if (subItem.PostType == 4)
{
var headmaster = accountRepository.GetAccountListExtRepository(new Model.ViewModel.User.RB_Account_ViewModel()
{
Post_Id = Common.Config.JiaoWuZhang,
School_Id = classModel.School_Id,
})?.FirstOrDefault();
AuditedId += (headmaster?.Id ?? 0) + ",";
subItem.UserId = (headmaster?.Id ?? 0);
}
}
}
var backLevance = new RB_Student_BackRelevance()
{
ConditionId = backClassModel.BackId,
AuditDescription = AuditDescription,
AuditedId = "",
AuditWay = item.FlowAduitList[0].AuditWay,
AuditType = 0,
OriginalAuditId = 0,
RoleOrInitiator = 0,
ToAuditId = AuditedId.TrimEnd(','),
Sort = item.SortNum,
SpecialNode = item.FlowAduitList[0].IsSpecNode,
Stauts = 1,
WorkFlowId = Common.Config.BackClassFlowId,
};
var backLevanceId = student_BackRelevanceRepository.Insert(backLevance);
backLevance.Id = backLevanceId;
foreach (var subItem in item.FlowAduitList)
{
var recordModel = new RB_Student_BackRecord_ViewModel()
{
AuditStatus = 1,
AuditId = subItem.UserId,
AuditEmId = subItem.UserId,
CreateBy = userinfo.Id,
CreateTime = DateTime.Now,
UpdateBy = userinfo.Id,
UpdateTime = DateTime.Now,
Description = "",
BackrelevanceId = backLevance.Id,
};
student_BackRecordRepository.Insert(recordModel);
}
}
}
return flag;
}
}
......
......@@ -125,6 +125,14 @@ WHERE 1=1
{
where.AppendFormat(" AND A.{0}={1} ", nameof(RB_Account_ViewModel.AccountId), query.AccountId);
}
if (!string.IsNullOrEmpty(query.PostName))
{
where.AppendFormat(" AND p.{0}='{1}' ", nameof(RB_Account_ViewModel.PostName), query.PostName);
}
if (query.Post_Id>0)
{
where.AppendFormat(" AND p.{0}={1} ", nameof(RB_Account_ViewModel.Post_Id), query.Post_Id);
}
}
StringBuilder builder = new StringBuilder();
......
......@@ -44,5 +44,9 @@
//是否是线上环境
"IsOnline": false,
//退课流程编号
"BackClassFlowId": 1
"BackClassFlowId": 1,
//分区校长岗位编号
"SchoolPostId": 2,
//教务长
"JiaoWuZhang": 8
}
\ No newline at end of file
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