Commit 18024c5f authored by 黄奎's avatar 黄奎

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

parents b60446c7 3361ed64
...@@ -436,6 +436,43 @@ namespace Edu.Common ...@@ -436,6 +436,43 @@ namespace Edu.Common
return OrderSplitClassFlowId; return OrderSplitClassFlowId;
} }
} }
/// <summary>
/// 学生请假流程编号
/// </summary>
public static int StudentLeaveFlowId
{
get
{
int.TryParse(ReadConfigKey("StudentLeaveFlowId"), out int StudentLeaveFlowId);
return StudentLeaveFlowId;
}
}
/// <summary>
/// 组卷审批流程编号
/// </summary>
public static int ZuJuanFlowId
{
get
{
int.TryParse(ReadConfigKey("ZuJuanFlowId"), out int ZuJuanFlowId);
return ZuJuanFlowId;
}
}
/// <summary>
/// 考试申请流程编号
/// </summary>
public static int ExamApplyFlowId
{
get
{
int.TryParse(ReadConfigKey("ExamApplyFlowId"), out int ExamApplyFlowId);
return ExamApplyFlowId;
}
}
/// <summary> /// <summary>
......
using System;
using System.Collections.Generic;
using System.Text;
using Edu.Common.Plugin;
namespace Edu.Common.Enum.Exam
{
/// <summary>
/// 考试单据审核流程
/// </summary>
public enum ExamineStatusEnum
{
/// <summary>
/// 未审核
/// </summary>
[EnumField("未审核")]
NotAudit = 0,
/// <summary>
/// 审核中
/// </summary>
[EnumField("审核中")]
AuditIng = 1,
/// <summary>
/// 通过
/// </summary>
[EnumField("审核通过")]
AuditThrough = 2,
/// <summary>
/// 不通过
/// </summary>
[EnumField("审核不通过")]
AuditNotThrough = 3,
/// <summary>
/// 驳回
/// </summary>
[EnumField("驳回")]
Rejected = 4,
/// <summary>
/// 作废
/// </summary>
[EnumField("作废")]
Invalid = 5,
}
}
...@@ -48,5 +48,15 @@ namespace Edu.Common.Enum.Finance ...@@ -48,5 +48,15 @@ namespace Edu.Common.Enum.Finance
/// </summary> /// </summary>
[EnumField("学生请假")] [EnumField("学生请假")]
LeaveClass = 7, LeaveClass = 7,
/// <summary>
/// 组卷审批
/// </summary>
[EnumField("组卷审批")]
ZuJuan = 8,
/// <summary>
/// 考试申请
/// </summary>
[EnumField("考试申请")]
ExamApply = 9
} }
} }
...@@ -13,74 +13,86 @@ namespace Edu.Model.Entity.Exam ...@@ -13,74 +13,86 @@ namespace Edu.Model.Entity.Exam
[DB(ConnectionName = "DefaultConnection")] [DB(ConnectionName = "DefaultConnection")]
public class RB_Examination_Paper public class RB_Examination_Paper
{ {
/// <summary> /// <summary>
/// 试卷编号 /// 试卷编号
/// </summary> /// </summary>
public int PaperId { get; set; } public int PaperId { get; set; }
/// <summary> /// <summary>
/// 试卷名称 /// 试卷名称
/// </summary> /// </summary>
public string PaperName { get; set; } public string PaperName { get; set; }
/// <summary> /// <summary>
/// 关联题库编号 /// 关联题库编号
/// </summary> /// </summary>
public string QuestionBandIds { get; set; } public string QuestionBandIds { get; set; }
/// <summary> /// <summary>
/// 难易程度(1-易,2-中,3-难) /// 难易程度(1-易,2-中,3-难)
/// </summary> /// </summary>
public DifficultyTypeEnum DifficultyType { get; set; } public DifficultyTypeEnum DifficultyType { get; set; }
/// <summary> /// <summary>
/// 创建时间 /// 创建时间
/// </summary> /// </summary>
public DateTime CreateTime { get; set; } public DateTime CreateTime { get; set; }
/// <summary> /// <summary>
/// 创建人 /// 创建人
/// </summary> /// </summary>
public int CreateBy { get; set; } public int CreateBy { get; set; }
/// <summary> /// <summary>
/// 发布次数 /// 发布次数
/// </summary> /// </summary>
public int PublishCount { get; set; } public int PublishCount { get; set; }
/// <summary> /// <summary>
/// 集团编号 /// 集团编号
/// </summary> /// </summary>
public int Group_Id { get; set; } public int Group_Id { get; set; }
/// <summary> /// <summary>
/// 学校编号 /// 学校编号
/// </summary> /// </summary>
public int School_Id { get; set; } public int School_Id { get; set; }
/// <summary> /// <summary>
/// 删除状态 /// 删除状态
/// </summary> /// </summary>
public int Status { get; set; } public int Status { get; set; }
/// <summary> /// <summary>
/// 组卷类型(1-智能组卷,2-手动组卷,3-智能导入) /// 组卷类型(1-智能组卷,2-手动组卷,3-智能导入)
/// </summary> /// </summary>
public int GenerateType { get; set; } public int GenerateType { get; set; }
/// <summary> /// <summary>
/// 生成试卷套数 /// 生成试卷套数
/// </summary> /// </summary>
public int CreateNum { get; set; } public int CreateNum { get; set; }
/// <summary> /// <summary>
/// 试卷类型(1-文件夹,2-试卷) /// 试卷类型(1-文件夹,2-试卷)
/// </summary> /// </summary>
public int PaperType { get; set; } public int PaperType { get; set; }
/// <summary> /// <summary>
/// 父节点编号 /// 父节点编号
/// </summary> /// </summary>
public int ParentId { get; set; } public int ParentId { get; set; }
}
/// <summary>
/// 审核状态
/// </summary>
public Common.Enum.EduTask.EduTaskRrocessStatus ExamineStatus { get; set; }
/// <summary>
/// 审核人
/// </summary>
public int Reviewer { get; set; }
}
} }
...@@ -139,5 +139,15 @@ namespace Edu.Model.Entity.Exam ...@@ -139,5 +139,15 @@ namespace Edu.Model.Entity.Exam
/// 多选题未选全给一半分(1-是) /// 多选题未选全给一半分(1-是)
/// </summary> /// </summary>
public int IsHalfScore { get; set; } public int IsHalfScore { get; set; }
/// <summary>
/// 审核状态
/// </summary>
public Common.Enum.EduTask.EduTaskRrocessStatus ExamineStatus { get; set; }
/// <summary>
/// 审核人
/// </summary>
public int Reviewer { get; set; }
} }
} }
...@@ -10,6 +10,14 @@ namespace Edu.Model.ViewModel.Exam ...@@ -10,6 +10,14 @@ namespace Edu.Model.ViewModel.Exam
/// </summary> /// </summary>
public class RB_Examination_Configure_ViewModel : RB_Examination_Configure public class RB_Examination_Configure_ViewModel : RB_Examination_Configure
{ {
/// <summary>
/// 审核人名称
/// </summary>
public string ZuJuanReviewerName { get; set; }
/// <summary>
/// 考试申请审核人名称
/// </summary>
public string ExamApplyReviewerName { get; set; }
} }
} }
...@@ -10,8 +10,10 @@ namespace Edu.Model.ViewModel.Exam ...@@ -10,8 +10,10 @@ namespace Edu.Model.ViewModel.Exam
/// </summary> /// </summary>
public class RB_Examination_Paper_ViewModel : RB_Examination_Paper public class RB_Examination_Paper_ViewModel : RB_Examination_Paper
{ {
/// <summary>
/// 是否从新发起审核0-否,1-是
/// </summary>
public int IsExamine { get; set; }
/// <summary> /// <summary>
/// 试卷题目分组列表 /// 试卷题目分组列表
/// </summary> /// </summary>
......
...@@ -24,5 +24,15 @@ namespace Edu.Model.ViewModel.Exam ...@@ -24,5 +24,15 @@ namespace Edu.Model.ViewModel.Exam
/// 考生人数 /// 考生人数
/// </summary> /// </summary>
public int StudentCount { get; set; } public int StudentCount { get; set; }
/// <summary>
/// 重新发起审核
/// </summary>
public int IsExamine { get; set; }
/// <summary>
/// 查询id
/// </summary>
public string QPublishIds { get; set; }
} }
} }
...@@ -8,12 +8,14 @@ using Edu.Model.CacheModel; ...@@ -8,12 +8,14 @@ using Edu.Model.CacheModel;
using Edu.Model.Entity.EduTask; using Edu.Model.Entity.EduTask;
using Edu.Model.ViewModel.BackClass; using Edu.Model.ViewModel.BackClass;
using Edu.Model.ViewModel.EduTask; using Edu.Model.ViewModel.EduTask;
using Edu.Model.ViewModel.Exam;
using Edu.Model.ViewModel.Grade; using Edu.Model.ViewModel.Grade;
using Edu.Model.ViewModel.Sell; using Edu.Model.ViewModel.Sell;
using Edu.Model.ViewModel.User; using Edu.Model.ViewModel.User;
using Edu.Repository.BackClass; using Edu.Repository.BackClass;
using Edu.Repository.Course; using Edu.Repository.Course;
using Edu.Repository.EduTask; using Edu.Repository.EduTask;
using Edu.Repository.Exam;
using Edu.Repository.Grade; using Edu.Repository.Grade;
using Edu.Repository.Sell; using Edu.Repository.Sell;
using Edu.Repository.User; using Edu.Repository.User;
...@@ -111,6 +113,15 @@ namespace Edu.Module.EduTask ...@@ -111,6 +113,15 @@ namespace Edu.Module.EduTask
/// </summary> /// </summary>
private readonly RB_AccountRepository accountRepository = new RB_AccountRepository(); private readonly RB_AccountRepository accountRepository = new RB_AccountRepository();
/// <summary>
/// 试卷仓储层对象
/// </summary>
private readonly RB_Examination_PaperRepository examination_PaperRepository = new RB_Examination_PaperRepository();
/// <summary>
/// 考试发布仓储层对象
/// </summary>
private readonly RB_Examination_PublishRepository examination_PublishRepository = new RB_Examination_PublishRepository();
/// <summary> /// <summary>
/// 获取教务单据分页列表 /// 获取教务单据分页列表
...@@ -160,6 +171,11 @@ namespace Edu.Module.EduTask ...@@ -160,6 +171,11 @@ namespace Edu.Module.EduTask
List<RB_Class_Time_ViewModel> timeList = new List<RB_Class_Time_ViewModel>(); List<RB_Class_Time_ViewModel> timeList = new List<RB_Class_Time_ViewModel>();
//订单转班列表 //订单转班列表
List<RB_Order_Change_ViewModel> orderTransList = new List<RB_Order_Change_ViewModel>(); List<RB_Order_Change_ViewModel> orderTransList = new List<RB_Order_Change_ViewModel>();
///试卷列表(组卷审核)
List<RB_Examination_Paper_ViewModel> ExaminationPaperList = new List<RB_Examination_Paper_ViewModel>();
//考试申请列表(考试申请审核)
List<RB_Examination_Publish_ViewModel> ExaminationPublishList = new List<RB_Examination_Publish_ViewModel>();
var groupList = list.GroupBy(qitem => new { qitem.ReceiptType }).Select(qitem => new { qitem.Key.ReceiptType }); var groupList = list.GroupBy(qitem => new { qitem.ReceiptType }).Select(qitem => new { qitem.Key.ReceiptType });
string Ids = string.Join(",", list.Select(qitem => qitem.Id)); string Ids = string.Join(",", list.Select(qitem => qitem.Id));
var recordList = education_RecordRepository.GetEducationRecordListRepository(new RB_Education_Record_ViewModel() var recordList = education_RecordRepository.GetEducationRecordListRepository(new RB_Education_Record_ViewModel()
...@@ -406,7 +422,29 @@ namespace Edu.Module.EduTask ...@@ -406,7 +422,29 @@ namespace Edu.Module.EduTask
} }
} }
#endregion
#region 组卷审批
if (subItem.ReceiptType == Common.Enum.Finance.ReceiptTypeEnum.ZuJuan)
{
string transClassIds = string.Join(",", list.Where(qitem => qitem.ReceiptType == subItem.ReceiptType).Select(qitem => qitem.RelationId));
ExaminationPaperList = examination_PaperRepository.GetExaminationPaperListRepository(new RB_Examination_Paper_ViewModel()
{
QPaperIds = transClassIds
});
}
#endregion
#region 考试申请
if (subItem.ReceiptType == Common.Enum.Finance.ReceiptTypeEnum.ExamApply)
{
string transClassIds = string.Join(",", list.Where(qitem => qitem.ReceiptType == subItem.ReceiptType).Select(qitem => qitem.RelationId));
ExaminationPublishList = examination_PublishRepository.GetExaminationPublishListRepository(new RB_Examination_Publish_ViewModel()
{
QPublishIds = transClassIds
});
}
#endregion #endregion
} }
...@@ -527,6 +565,17 @@ namespace Edu.Module.EduTask ...@@ -527,6 +565,17 @@ namespace Edu.Module.EduTask
DataObj = tempModel; DataObj = tempModel;
accountName = tempModel.Order_Guest_ViewModel.GuestName; accountName = tempModel.Order_Guest_ViewModel.GuestName;
} }
//组卷
if (item.ReceiptType == Common.Enum.Finance.ReceiptTypeEnum.ZuJuan)
{
DataObj = ExaminationPaperList?.Where(qitem => qitem.PaperId == item.RelationId)?.FirstOrDefault();
}
//考试发布
if (item.ReceiptType == Common.Enum.Finance.ReceiptTypeEnum.ExamApply)
{
DataObj = ExaminationPublishList?.Where(qitem => qitem.Id == item.RelationId)?.FirstOrDefault();
}
object AuditObj = new object(); object AuditObj = new object();
if (item.VerifyStatus == EduTaskRrocessStatus.NotAudit || item.VerifyStatus == EduTaskRrocessStatus.AuditIng) if (item.VerifyStatus == EduTaskRrocessStatus.NotAudit || item.VerifyStatus == EduTaskRrocessStatus.AuditIng)
{ {
...@@ -625,6 +674,22 @@ namespace Edu.Module.EduTask ...@@ -625,6 +674,22 @@ namespace Edu.Module.EduTask
{ {
student_StopClassRepository.UpdateStudentStopClass(model.Id, 4); student_StopClassRepository.UpdateStudentStopClass(model.Id, 4);
} }
if (model != null && model.ReceiptType == Common.Enum.Finance.ReceiptTypeEnum.ZuJuan)
{
Dictionary<string, object> filedsZuJuan = new Dictionary<string, object>()
{
{nameof(RB_Examination_Paper_ViewModel.ExamineStatus),(int)EduTaskRrocessStatus.Invalid}
};
flag = education_ReceiptRepository.Update(filedsZuJuan, new WhereHelper(nameof(RB_Examination_Paper_ViewModel.PaperId), model.RelationId));
}
if (model != null && model.ReceiptType == Common.Enum.Finance.ReceiptTypeEnum.ExamApply)
{
Dictionary<string, object> filedsZuJuan = new Dictionary<string, object>()
{
{nameof(RB_Examination_Publish_ViewModel.ExamineStatus),(int)EduTaskRrocessStatus.Invalid}
};
flag = examination_PublishRepository.Update(filedsZuJuan, new WhereHelper(nameof(RB_Examination_Publish_ViewModel.Id), model.RelationId));
}
} }
return flag; return flag;
} }
...@@ -1326,13 +1391,55 @@ namespace Edu.Module.EduTask ...@@ -1326,13 +1391,55 @@ namespace Edu.Module.EduTask
//student_BackClassRepository.UpdateGuestStateRepository(receiptModel, auditModel); //student_BackClassRepository.UpdateGuestStateRepository(receiptModel, auditModel);
} }
} }
if (receiptModel.ReceiptType == Common.Enum.Finance.ReceiptTypeEnum.OrderSplitClass) if (receiptModel.ReceiptType == Common.Enum.Finance.ReceiptTypeEnum.LeaveClass)
{ {
if (auditModel.AuditStatus == 2) if (auditModel.AuditStatus == 2)
{ {
studentLeaveRepository.UpdateStundetLeave(receiptModel.Id, user.Id); studentLeaveRepository.UpdateStundetLeave(receiptModel.Id, user.Id);
} }
} }
if (receiptModel.ReceiptType == Common.Enum.Finance.ReceiptTypeEnum.ZuJuan)
{
if (auditModel.AuditStatus == 2)
{
Dictionary<string, object> fileds = new Dictionary<string, object>()
{
{nameof(RB_Examination_Paper_ViewModel.ExamineStatus),(int)EduTaskRrocessStatus.AuditThrough}
};
flag = education_ReceiptRepository.Update(fileds, new WhereHelper(nameof(RB_Examination_Paper_ViewModel.PaperId), receiptModel.RelationId));
}
if (auditModel.AuditStatus == 3)
{
Dictionary<string, object> fileds = new Dictionary<string, object>()
{
{nameof(RB_Examination_Paper_ViewModel.ExamineStatus),(int)EduTaskRrocessStatus.Rejected}
};
flag = education_ReceiptRepository.Update(fileds, new WhereHelper(nameof(RB_Examination_Paper_ViewModel.PaperId), receiptModel.RelationId));
}
}
if (receiptModel.ReceiptType == Common.Enum.Finance.ReceiptTypeEnum.ExamApply)
{
if (auditModel.AuditStatus == 2)
{
Dictionary<string, object> fileds = new Dictionary<string, object>()
{
{nameof(RB_Examination_Paper_ViewModel.ExamineStatus),(int)EduTaskRrocessStatus.AuditThrough}
};
flag = examination_PublishRepository.Update(fileds, new WhereHelper(nameof(RB_Examination_Paper_ViewModel.PaperId), receiptModel.RelationId));
}
if (auditModel.AuditStatus == 3)
{
Dictionary<string, object> fileds = new Dictionary<string, object>()
{
{nameof(RB_Examination_Paper_ViewModel.ExamineStatus),(int)EduTaskRrocessStatus.Rejected}
};
flag = examination_PublishRepository.Update(fileds, new WhereHelper(nameof(RB_Examination_Paper_ViewModel.PaperId), receiptModel.RelationId));
}
}
return flag; return flag;
......
...@@ -64,6 +64,11 @@ namespace Edu.Module.Exam ...@@ -64,6 +64,11 @@ namespace Edu.Module.Exam
/// </summary> /// </summary>
private readonly RB_Examination_StudentRepository examination_StudentRepository = new RB_Examination_StudentRepository(); private readonly RB_Examination_StudentRepository examination_StudentRepository = new RB_Examination_StudentRepository();
/// <summary>
/// 教务单据仓储层对象
/// </summary>
private readonly Repository.EduTask.RB_Education_ReceiptRepository education_ReceiptRepository = new Repository.EduTask.RB_Education_ReceiptRepository();
/// <summary> /// <summary>
/// 获取试卷分页列表 /// 获取试卷分页列表
/// </summary> /// </summary>
...@@ -209,9 +214,9 @@ namespace Edu.Module.Exam ...@@ -209,9 +214,9 @@ namespace Edu.Module.Exam
/// <param name="model"></param> /// <param name="model"></param>
/// <returns></returns> /// <returns></returns>
[TransactionCallHandler] [TransactionCallHandler]
public virtual bool SetExaminationPaperModule(RB_Examination_Paper_ViewModel model) public virtual bool SetExaminationPaperModule(RB_Examination_Paper_ViewModel model, RB_Examination_Configure_ViewModel obj)
{ {
bool flag = SetExaminationPaperFolderModule(model); bool flag = SetExaminationPaperFolderModule(model, obj);
if (model.GroupList != null && model.GroupList.Count > 0) if (model.GroupList != null && model.GroupList.Count > 0)
{ {
foreach (var gitem in model.GroupList) foreach (var gitem in model.GroupList)
...@@ -444,9 +449,9 @@ namespace Edu.Module.Exam ...@@ -444,9 +449,9 @@ namespace Edu.Module.Exam
/// </summary> /// </summary>
/// <param name="model"></param> /// <param name="model"></param>
/// <returns></returns> /// <returns></returns>
public virtual bool SetExaminationPaperFolderModule(RB_Examination_Paper_ViewModel model) public virtual bool SetExaminationPaperFolderModule(RB_Examination_Paper_ViewModel model, RB_Examination_Configure_ViewModel obj)
{ {
return SetExaminationPaperCommonModule(model); return SetExaminationPaperCommonModule(model, obj);
} }
/// <summary> /// <summary>
...@@ -454,21 +459,22 @@ namespace Edu.Module.Exam ...@@ -454,21 +459,22 @@ namespace Edu.Module.Exam
/// </summary> /// </summary>
/// <param name="model"></param> /// <param name="model"></param>
/// <returns></returns> /// <returns></returns>
public bool SetExaminationPaperCommonModule(RB_Examination_Paper_ViewModel model) public bool SetExaminationPaperCommonModule(RB_Examination_Paper_ViewModel model, RB_Examination_Configure_ViewModel obj)
{ {
bool flag; bool flag;
if (model.PaperId > 0) if (model.PaperId > 0)
{ {
Dictionary<string, object> fileds = new Dictionary<string, object>() Dictionary<string, object> fileds = new Dictionary<string, object>()
{ {
{nameof(RB_Examination_Paper_ViewModel.PaperName),model.PaperName }, {nameof(RB_Examination_Paper_ViewModel.PaperName),model.PaperName },
{nameof(RB_Examination_Paper_ViewModel.QuestionBandIds),model.QuestionBandIds }, {nameof(RB_Examination_Paper_ViewModel.QuestionBandIds),model.QuestionBandIds },
{nameof(RB_Examination_Paper_ViewModel.DifficultyType),model.DifficultyType }, {nameof(RB_Examination_Paper_ViewModel.DifficultyType),model.DifficultyType },
{nameof(RB_Examination_Paper_ViewModel.GenerateType),model.GenerateType }, {nameof(RB_Examination_Paper_ViewModel.GenerateType),model.GenerateType },
{nameof(RB_Examination_Paper_ViewModel.CreateNum),model.CreateNum }, {nameof(RB_Examination_Paper_ViewModel.CreateNum),model.CreateNum },
{nameof(RB_Examination_Paper_ViewModel.PaperType),model.PaperType }, {nameof(RB_Examination_Paper_ViewModel.PaperType),model.PaperType },
{nameof(RB_Examination_Paper_ViewModel.ParentId),model.ParentId }, {nameof(RB_Examination_Paper_ViewModel.ParentId),model.ParentId },
}; {nameof(RB_Examination_Paper_ViewModel.ExamineStatus),model.ExamineStatus }
};
flag = examination_PaperRepository.Update(fileds, new WhereHelper(nameof(RB_Examination_Paper_ViewModel.PaperId), model.PaperId)); flag = examination_PaperRepository.Update(fileds, new WhereHelper(nameof(RB_Examination_Paper_ViewModel.PaperId), model.PaperId));
} }
else else
...@@ -476,6 +482,36 @@ namespace Edu.Module.Exam ...@@ -476,6 +482,36 @@ namespace Edu.Module.Exam
var newPaperId = examination_PaperRepository.Insert(model); var newPaperId = examination_PaperRepository.Insert(model);
model.PaperId = newPaperId; model.PaperId = newPaperId;
flag = newPaperId > 0; flag = newPaperId > 0;
model.IsExamine = 1;
}
if (flag && obj.IsOpenZuJuan == 1 && model.IsExamine == 1)
{
Dictionary<string, object> fileds = new Dictionary<string, object>()
{
{nameof(RB_Examination_Paper_ViewModel.ExamineStatus),Common.Enum.EduTask.EduTaskRrocessStatus.AuditIng },
{nameof(RB_Examination_Paper_ViewModel.Reviewer),obj.ZuJuanReviewer }
};
flag = examination_PaperRepository.Update(fileds, new WhereHelper(nameof(RB_Examination_Paper_ViewModel.PaperId), model.PaperId));
var educationReceipt = new Model.Entity.EduTask.RB_Education_Receipt()
{
Id = 0,
Title = "组卷审批",
ReceiptType = Common.Enum.Finance.ReceiptTypeEnum.ZuJuan,
RelationId = model.PaperId,
ClassId = 0,
Group_Id = model.Group_Id,
School_Id = model.School_Id,
CreateBy = model.CreateBy,
CreateTime = model.CreateTime,
UpdateBy = model.CreateBy,
UpdateTime = model.CreateTime,
VerifyStatus = Common.Enum.EduTask.EduTaskRrocessStatus.AuditIng,
ReceiptFile = ""
};
flag = education_ReceiptRepository.SetEducationReceiptRepository(educationReceipt, out string message);
} }
return flag; return flag;
} }
...@@ -558,7 +594,7 @@ namespace Edu.Module.Exam ...@@ -558,7 +594,7 @@ namespace Edu.Module.Exam
} }
if (flag && QuestionTypeId > 0) if (flag && QuestionTypeId > 0)
{ {
examination_DetailsRepository.DeleteOne(new WhereHelper(nameof(RB_Examination_Details_ViewModel.QuestionTypeId), QuestionTypeId)); examination_DetailsRepository.DeleteOne(new WhereHelper(nameof(RB_Examination_Details_ViewModel.QuestionTypeId), QuestionTypeId));
} }
return flag; return flag;
} }
...@@ -636,7 +672,23 @@ namespace Edu.Module.Exam ...@@ -636,7 +672,23 @@ namespace Edu.Module.Exam
} }
} }
} }
flag = SetExaminationPaperModule(model);
var configureModel = new RB_Examination_Configure_ViewModel()
{
Group_Id = model.Group_Id,
};
var obj = GetExaminationConfigureModel(configureModel);
if (obj.IsOpenZuJuan == 0)
{
model.Reviewer = 0;
model.ExamineStatus = Common.Enum.EduTask.EduTaskRrocessStatus.AuditThrough;
}
else
{
model.Reviewer = obj.ZuJuanReviewer;
model.ExamineStatus = Common.Enum.EduTask.EduTaskRrocessStatus.AuditIng;
}
flag = SetExaminationPaperModule(model, obj);
return flag; return flag;
} }
...@@ -751,7 +803,7 @@ namespace Edu.Module.Exam ...@@ -751,7 +803,7 @@ namespace Edu.Module.Exam
/// </summary> /// </summary>
/// <param name="model"></param> /// <param name="model"></param>
/// <returns></returns> /// <returns></returns>
public bool SetExaminationPublishModule(RB_Examination_Publish_ViewModel model) public bool SetExaminationPublishModule(RB_Examination_Publish_ViewModel model, RB_Examination_Configure_ViewModel obj)
{ {
bool flag = true; bool flag = true;
if (model.Id > 0) if (model.Id > 0)
...@@ -778,6 +830,7 @@ namespace Edu.Module.Exam ...@@ -778,6 +830,7 @@ namespace Edu.Module.Exam
{nameof(RB_Examination_Publish_ViewModel.FillInIsSubject), model.FillInIsSubject }, {nameof(RB_Examination_Publish_ViewModel.FillInIsSubject), model.FillInIsSubject },
{nameof(RB_Examination_Publish_ViewModel.FillInIsIgnore), model.FillInIsIgnore }, {nameof(RB_Examination_Publish_ViewModel.FillInIsIgnore), model.FillInIsIgnore },
{nameof(RB_Examination_Publish_ViewModel.IsHalfScore), model.IsHalfScore }, {nameof(RB_Examination_Publish_ViewModel.IsHalfScore), model.IsHalfScore },
{nameof(RB_Examination_Publish_ViewModel.ExamineStatus), model.ExamineStatus },
}; };
flag = examination_PublishRepository.Update(fileds, new WhereHelper(nameof(RB_Examination_Publish_ViewModel.Id), model.Id)); flag = examination_PublishRepository.Update(fileds, new WhereHelper(nameof(RB_Examination_Publish_ViewModel.Id), model.Id));
} }
...@@ -785,9 +838,36 @@ namespace Edu.Module.Exam ...@@ -785,9 +838,36 @@ namespace Edu.Module.Exam
{ {
var newId = examination_PublishRepository.Insert(model); var newId = examination_PublishRepository.Insert(model);
model.Id = newId; model.Id = newId;
flag = newId > 0; model.IsExamine = 1;
flag = newId > 0;
} }
if (flag && obj.IsOpenExamApply == 1 && model.IsExamine == 1)
{
Dictionary<string, object> fileds = new Dictionary<string, object>()
{
{nameof(RB_Examination_Publish_ViewModel.ExamineStatus),Common.Enum.EduTask.EduTaskRrocessStatus.AuditIng },
{nameof(RB_Examination_Publish_ViewModel.Reviewer),obj.ZuJuanReviewer }
};
flag = examination_PublishRepository.Update(fileds, new WhereHelper(nameof(RB_Examination_Publish_ViewModel.Id), model.Id));
var educationReceipt = new Model.Entity.EduTask.RB_Education_Receipt()
{
Id = 0,
Title = "考试申请",
ReceiptType = Common.Enum.Finance.ReceiptTypeEnum.ExamApply,
RelationId = model.Id,
ClassId = 0,
Group_Id = model.Group_Id,
School_Id = model.School_Id,
CreateBy = model.CreateBy,
CreateTime = model.CreateTime,
UpdateBy = model.CreateBy,
UpdateTime = model.CreateTime,
VerifyStatus = Common.Enum.EduTask.EduTaskRrocessStatus.AuditIng,
ReceiptFile = ""
};
flag = education_ReceiptRepository.SetEducationReceiptRepository(educationReceipt, out string message);
}
var oldStudentList = examination_StudentRepository.GetExaminationStudentListRepository(new RB_Examination_Student_ViewModel() { PublishId = model.Id }); var oldStudentList = examination_StudentRepository.GetExaminationStudentListRepository(new RB_Examination_Student_ViewModel() { PublishId = model.Id });
//以前没有学员【直接新增】 //以前没有学员【直接新增】
if (oldStudentList == null || (oldStudentList != null && oldStudentList.Count == 0)) if (oldStudentList == null || (oldStudentList != null && oldStudentList.Count == 0))
......
...@@ -153,7 +153,7 @@ WHERE 1=1 ...@@ -153,7 +153,7 @@ WHERE 1=1
public List<RB_Education_Receipt_ViewModel> GetEducationReceiptListRepository(EducationReceiptQuery query) public List<RB_Education_Receipt_ViewModel> GetEducationReceiptListRepository(EducationReceiptQuery query)
{ {
var parameters = new DynamicParameters(); var parameters = new DynamicParameters();
StringBuilder builder = new StringBuilder(); StringBuilder builder = new StringBuilder();
builder.AppendFormat(@" builder.AppendFormat(@"
SELECT A.*,IFNULL(B.ClassName,'') AS ClassName,IFNULL(B.ClassNo,'') AS ClassNo,IFNULL(C.TeacherName,'') AS TeacherName SELECT A.*,IFNULL(B.ClassName,'') AS ClassName,IFNULL(B.ClassNo,'') AS ClassNo,IFNULL(C.TeacherName,'') AS TeacherName
...@@ -174,7 +174,7 @@ WHERE 1=1 ...@@ -174,7 +174,7 @@ WHERE 1=1
{ {
builder.AppendFormat(@" AND A.{0} IN ({1}) ", nameof(RB_Education_Receipt_ViewModel.Id), query.QIds); builder.AppendFormat(@" AND A.{0} IN ({1}) ", nameof(RB_Education_Receipt_ViewModel.Id), query.QIds);
} }
if (query.RelationId>0) if (query.RelationId > 0)
{ {
builder.AppendFormat(@" AND A.{0} IN ({1}) ", nameof(RB_Education_Receipt_ViewModel.RelationId), query.RelationId); builder.AppendFormat(@" AND A.{0} IN ({1}) ", nameof(RB_Education_Receipt_ViewModel.RelationId), query.RelationId);
} }
...@@ -279,13 +279,31 @@ WHERE 1=1 ...@@ -279,13 +279,31 @@ WHERE 1=1
} }
else if (model.ReceiptType == Common.Enum.Finance.ReceiptTypeEnum.LeaveClass) else if (model.ReceiptType == Common.Enum.Finance.ReceiptTypeEnum.LeaveClass)
{ {
flowModel = flowRepository.GetFlowRepository(Common.Config.OrderSplitClassFlowId); flowModel = flowRepository.GetFlowRepository(Common.Config.StudentLeaveFlowId);
if (flowModel == null) if (flowModel == null)
{ {
message = "未配置学生请假流程!"; message = "未配置学生请假流程!";
return false; return false;
} }
} }
else if (model.ReceiptType == Common.Enum.Finance.ReceiptTypeEnum.ZuJuan)
{
flowModel = flowRepository.GetFlowRepository(Common.Config.ZuJuanFlowId);
if (flowModel == null)
{
message = "未配置组卷审批流程!";
return false;
}
}
else if (model.ReceiptType == Common.Enum.Finance.ReceiptTypeEnum.ExamApply)
{
flowModel = flowRepository.GetFlowRepository(Common.Config.ExamApplyFlowId);
if (flowModel == null)
{
message = "未配置考试申请审批流程!";
return false;
}
}
if (flowModel?.FlowNodeList?.Count == 0) if (flowModel?.FlowNodeList?.Count == 0)
{ {
message = "未配置审核流程!"; message = "未配置审核流程!";
...@@ -424,7 +442,7 @@ WHERE 1=1 ...@@ -424,7 +442,7 @@ WHERE 1=1
flag = student_BackRecordRepository.Insert(recordModel) > 0; flag = student_BackRecordRepository.Insert(recordModel) > 0;
#region 审核通知 #region 审核通知
var account = new RB_AccountRepository().GetEmployeeInfo(tItem); var account = new RB_AccountRepository().GetEmployeeInfo(tItem);
if (account!=null && !string.IsNullOrEmpty(account.WorkUserId)) if (account != null && !string.IsNullOrEmpty(account.WorkUserId))
{ {
var recipientPath = HttpUtility.UrlEncode($"/teacher/change-class-manager?tab=3&id={model.Id}"); var recipientPath = HttpUtility.UrlEncode($"/teacher/change-class-manager?tab=3&id={model.Id}");
var content = $"待审通知 你有一张业务单据等待审核\n>**概要信息** \n>单据信息:<font color='comment'>{EnumHelper.ToName(model.ReceiptType)}单据 ({model.Id})</font>\n>创 建 人:<font color='comment'>{account.EmployeeName}</font>\n>创建时间:<font color='comment'>{DateTime.Now.ToString("MM-dd HH-mm")}</font>\n>请点击:[查看详情]({Config.ErpUrl}/autologin?loginId={tItem}&target={recipientPath})"; var content = $"待审通知 你有一张业务单据等待审核\n>**概要信息** \n>单据信息:<font color='comment'>{EnumHelper.ToName(model.ReceiptType)}单据 ({model.Id})</font>\n>创 建 人:<font color='comment'>{account.EmployeeName}</font>\n>创建时间:<font color='comment'>{DateTime.Now.ToString("MM-dd HH-mm")}</font>\n>请点击:[查看详情]({Config.ErpUrl}/autologin?loginId={tItem}&target={recipientPath})";
......
...@@ -44,5 +44,40 @@ WHERE 1=1 ...@@ -44,5 +44,40 @@ WHERE 1=1
} }
return GetPage<RB_Examination_Publish_ViewModel>(pageIndex, pageSize, out rowsCount, builder.ToString()).ToList(); return GetPage<RB_Examination_Publish_ViewModel>(pageIndex, pageSize, out rowsCount, builder.ToString()).ToList();
} }
/// <summary>
/// 获取发布试卷列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public List<RB_Examination_Publish_ViewModel> GetExaminationPublishListRepository(RB_Examination_Publish_ViewModel query)
{
var parameters = new DynamicParameters();
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@"
SELECT A.*,IFNULL(B.PaperName,'') AS PaperName
FROM RB_Examination_Publish AS A LEFT JOIN rb_examination_paper AS B ON A.PaperId=B.PaperId
WHERE 1=1
");
if (query != null)
{
if (query.Group_Id > 0)
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Examination_Publish_ViewModel.Group_Id), query.Group_Id);
}
if (!string.IsNullOrEmpty(query.PaperName))
{
builder.AppendFormat(" AND B.{0} LIKE @PaperName ", nameof(RB_Examination_Publish_ViewModel.PaperName));
parameters.Add("PaperName", "%" + query.PaperName.Trim() + "%");
}
if (!string.IsNullOrEmpty(query.QPublishIds))
{
builder.AppendFormat(" AND A.{0} in ({1}) ", nameof(RB_Examination_Publish_ViewModel.Id), query.QPublishIds);
}
}
return Get<RB_Examination_Publish_ViewModel>(builder.ToString(), parameters).ToList();
}
} }
} }
...@@ -43,7 +43,7 @@ WHERE 1=1 ...@@ -43,7 +43,7 @@ WHERE 1=1
} }
if (!string.IsNullOrWhiteSpace(query.GuestName)) if (!string.IsNullOrWhiteSpace(query.GuestName))
{ {
builder.AppendFormat(" AND B.{0}={1} ", nameof(RB_Examination_Student_ViewModel.GuestName), query.GuestName); builder.AppendFormat(" AND B.{0} like '%{1}%' ", nameof(RB_Examination_Student_ViewModel.GuestName), query.GuestName);
} }
} }
return GetPage<RB_Examination_Student_ViewModel>(pageIndex, pageSize, out rowsCount, builder.ToString()).ToList(); return GetPage<RB_Examination_Student_ViewModel>(pageIndex, pageSize, out rowsCount, builder.ToString()).ToList();
......
using Edu.Cache.User; using Edu.Cache.User;
using Edu.Common;
using Edu.Common.API; using Edu.Common.API;
using Edu.Common.Enum.Course; using Edu.Common.Enum.Course;
using Edu.Common.Enum.Question; using Edu.Common.Enum.Question;
using Edu.Common.Plugin; using Edu.Common.Plugin;
using Edu.Model.ViewModel.Exam; using Edu.Model.ViewModel.Exam;
using Edu.Model.ViewModel.Flow;
using Edu.Module.Exam; using Edu.Module.Exam;
using Edu.Module.System;
using Edu.WebApi.Filter; using Edu.WebApi.Filter;
using Microsoft.AspNetCore.Cors; using Microsoft.AspNetCore.Cors;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json.Linq; using Newtonsoft.Json.Linq;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
namespace Edu.WebApi.Controllers.Exam namespace Edu.WebApi.Controllers.Exam
{ {
...@@ -28,6 +32,11 @@ namespace Edu.WebApi.Controllers.Exam ...@@ -28,6 +32,11 @@ namespace Edu.WebApi.Controllers.Exam
/// </summary> /// </summary>
private readonly PaperModule paperModule = AOP.AOPHelper.CreateAOPObject<PaperModule>(); private readonly PaperModule paperModule = AOP.AOPHelper.CreateAOPObject<PaperModule>();
/// <summary>
/// 流程设置处理类对象
/// </summary>
private readonly BasicFlowModule basicFlowModule = AOP.AOPHelper.CreateAOPObject<BasicFlowModule>();
/// <summary> /// <summary>
/// 获取试卷分页列表 /// 获取试卷分页列表
/// </summary> /// </summary>
...@@ -60,6 +69,7 @@ namespace Edu.WebApi.Controllers.Exam ...@@ -60,6 +69,7 @@ namespace Edu.WebApi.Controllers.Exam
item.PaperType, item.PaperType,
item.DifficultyTypeName, item.DifficultyTypeName,
item.ChildList, item.ChildList,
}); });
} }
pageModel.Count = rowsCount; pageModel.Count = rowsCount;
...@@ -107,7 +117,7 @@ namespace Edu.WebApi.Controllers.Exam ...@@ -107,7 +117,7 @@ namespace Edu.WebApi.Controllers.Exam
QuestionTypeId = jobj.GetInt("QuestionTypeId"), QuestionTypeId = jobj.GetInt("QuestionTypeId"),
QuestionTypeKey = jobj.GetStringValue("QuestionTypeKey"), QuestionTypeKey = jobj.GetStringValue("QuestionTypeKey"),
GSortNum = gSortNum, GSortNum = gSortNum,
GScore=jobj.GetDecimal("GScore"), GScore = jobj.GetDecimal("GScore"),
DetailsList = new List<RB_Examination_Details_ViewModel>(), DetailsList = new List<RB_Examination_Details_ViewModel>(),
}; };
gSortNum++; gSortNum++;
...@@ -153,7 +163,22 @@ namespace Edu.WebApi.Controllers.Exam ...@@ -153,7 +163,22 @@ namespace Edu.WebApi.Controllers.Exam
} }
} }
} }
bool flag = paperModule.SetExaminationPaperModule(extModel); var configureModel = new RB_Examination_Configure_ViewModel()
{
Group_Id = base.UserInfo.Group_Id,
};
var obj = paperModule.GetExaminationConfigureModel(configureModel);
if (obj.IsOpenZuJuan == 0)
{
extModel.Reviewer = 0;
extModel.ExamineStatus = Edu.Common.Enum.EduTask.EduTaskRrocessStatus.AuditThrough;
}
else
{
extModel.Reviewer = obj.ZuJuanReviewer;
extModel.ExamineStatus = Edu.Common.Enum.EduTask.EduTaskRrocessStatus.AuditIng;
}
bool flag = paperModule.SetExaminationPaperModule(extModel, obj);
return flag ? ApiResult.Success(data: extModel) : ApiResult.Failed(); return flag ? ApiResult.Success(data: extModel) : ApiResult.Failed();
} }
...@@ -276,7 +301,22 @@ namespace Edu.WebApi.Controllers.Exam ...@@ -276,7 +301,22 @@ namespace Edu.WebApi.Controllers.Exam
PaperType = base.ParmJObj.GetInt("PaperType"), PaperType = base.ParmJObj.GetInt("PaperType"),
ParentId = base.ParmJObj.GetInt("ParentId"), ParentId = base.ParmJObj.GetInt("ParentId"),
}; };
bool flag = paperModule.SetExaminationPaperFolderModule(extModel); var configureModel = new RB_Examination_Configure_ViewModel()
{
Group_Id = base.UserInfo.Group_Id,
};
var obj = paperModule.GetExaminationConfigureModel(configureModel);
if (obj.IsOpenZuJuan == 0)
{
extModel.Reviewer = 0;
extModel.ExamineStatus = Common.Enum.EduTask.EduTaskRrocessStatus.AuditThrough;
}
else
{
extModel.Reviewer = obj.ZuJuanReviewer;
extModel.ExamineStatus = Common.Enum.EduTask.EduTaskRrocessStatus.AuditIng;
}
bool flag = paperModule.SetExaminationPaperFolderModule(extModel,obj);
return flag ? ApiResult.Success(data: extModel) : ApiResult.Failed(); return flag ? ApiResult.Success(data: extModel) : ApiResult.Failed();
} }
...@@ -415,7 +455,22 @@ namespace Edu.WebApi.Controllers.Exam ...@@ -415,7 +455,22 @@ namespace Edu.WebApi.Controllers.Exam
model.Group_Id = base.UserInfo.Group_Id; model.Group_Id = base.UserInfo.Group_Id;
model.School_Id = base.UserInfo.School_Id; model.School_Id = base.UserInfo.School_Id;
model.Status = 0; model.Status = 0;
var flag = paperModule.SetExaminationPublishModule(model);
var obj = paperModule.GetExaminationConfigureModel(new RB_Examination_Configure_ViewModel()
{
Group_Id = base.UserInfo.Group_Id,
});
if (obj.IsOpenExamApply == 0)
{
model.Reviewer = 0;
model.ExamineStatus = Common.Enum.EduTask.EduTaskRrocessStatus.AuditThrough;
}
else
{
model.Reviewer = obj.ExamApplyReviewer;
model.ExamineStatus = Common.Enum.EduTask.EduTaskRrocessStatus.AuditIng;
}
var flag = paperModule.SetExaminationPublishModule(model, obj);
return flag ? ApiResult.Success() : ApiResult.Failed(); return flag ? ApiResult.Success() : ApiResult.Failed();
} }
...@@ -426,7 +481,7 @@ namespace Edu.WebApi.Controllers.Exam ...@@ -426,7 +481,7 @@ namespace Edu.WebApi.Controllers.Exam
[HttpPost] [HttpPost]
public ApiResult GetExamPublish() public ApiResult GetExamPublish()
{ {
var Id = base.ParmJObj.GetInt("Id"); var Id = base.ParmJObj.GetInt("Id");
var model = paperModule.GetExaminationPublishModule(Id); var model = paperModule.GetExaminationPublishModule(Id);
return ApiResult.Success(data: model); return ApiResult.Success(data: model);
} }
...@@ -485,7 +540,8 @@ namespace Edu.WebApi.Controllers.Exam ...@@ -485,7 +540,8 @@ namespace Edu.WebApi.Controllers.Exam
{ {
obj = new RB_Examination_Configure_ViewModel(); obj = new RB_Examination_Configure_ViewModel();
} }
var result = new { var result = new
{
obj.IsOpenZuJuan, obj.IsOpenZuJuan,
obj.IsOpenAutoMarking, obj.IsOpenAutoMarking,
obj.IsOpenExamApply, obj.IsOpenExamApply,
...@@ -508,25 +564,137 @@ namespace Edu.WebApi.Controllers.Exam ...@@ -508,25 +564,137 @@ namespace Edu.WebApi.Controllers.Exam
IsOpenAutoMarking = base.ParmJObj.GetInt("IsOpenAutoMarking"), IsOpenAutoMarking = base.ParmJObj.GetInt("IsOpenAutoMarking"),
IsOpenExamApply = base.ParmJObj.GetInt("IsOpenExamApply"), IsOpenExamApply = base.ParmJObj.GetInt("IsOpenExamApply"),
ZuJuanReviewer = base.ParmJObj.GetInt("ZuJuanReviewer"), ZuJuanReviewer = base.ParmJObj.GetInt("ZuJuanReviewer"),
ZuJuanReviewerName = base.ParmJObj.GetStringValue("ZuJuanReviewerName"),
ExamApplyReviewerName = base.ParmJObj.GetStringValue("ExamApplyReviewerName"),
CreateBy = UserInfo.Id, CreateBy = UserInfo.Id,
CreateTime = DateTime.Now, CreateTime = DateTime.Now,
Group_Id = base.UserInfo.Group_Id, Group_Id = base.UserInfo.Group_Id,
ExamApplyReviewer = base.ParmJObj.GetInt("ExamApplyReviewer") ExamApplyReviewer = base.ParmJObj.GetInt("ExamApplyReviewer")
}; };
List<RB_Flow_ViewModel> listFlow = new List<RB_Flow_ViewModel>();//通用审核流程配置
if (extModel.IsOpenZuJuan == 1 && extModel.ZuJuanReviewer == 0) if (extModel.IsOpenZuJuan == 1 && extModel.ZuJuanReviewer == 0)
{ {
return ApiResult.Failed("请选择试卷组卷审批主管"); return ApiResult.Failed("请选择试卷组卷审批主管");
} }
if (extModel.IsOpenZuJuan == 1 && extModel.ZuJuanReviewer > 0)
{
var flowViewModel = basicFlowModule.GetFlowModule(Config.ZuJuanFlowId);
if (flowViewModel != null && flowViewModel.FlowId > 0)
{
if (flowViewModel.FlowNodeList != null && flowViewModel.FlowNodeList.Any())//之前已经存在
{
foreach (var item in flowViewModel.FlowNodeList)
{
item.NodeName = extModel.ZuJuanReviewerName;
if (item.FlowAduitList != null && item.FlowAduitList.Any())
{
item.FlowAduitList.ForEach(x => x.AduitName = extModel.ZuJuanReviewerName);
item.FlowAduitList.ForEach(x => x.UserId = extModel.ZuJuanReviewer);
}
}
}
else
{ //不存在
flowViewModel.FlowNodeList = new List<RB_Flow_Node_ViewModel>();
RB_Flow_Node_ViewModel flowNodeViewModel = new RB_Flow_Node_ViewModel()
{
NodeId = 0,
NodeName = extModel.ZuJuanReviewerName,
FlowId = Config.ZuJuanFlowId,
SortNum = 1
};
flowNodeViewModel.FlowAduitList = new List<RB_Flow_AduitInfo_ViewModel>();
RB_Flow_AduitInfo_ViewModel auditModel = new RB_Flow_AduitInfo_ViewModel()
{
CheckId = 0,
NodeId = 0,
FlowId = Config.ZuJuanFlowId,
AduitName = extModel.ZuJuanReviewerName,
AuditType = Common.Enum.User.WFTAuditTypeEnum.SpecifiedMember,
UserId = extModel.ZuJuanReviewer,
IsSpecNode = 0,
PostType = 0,
AuditWay = Common.Enum.User.WFTAuditWayEnum.Countersign
};
flowNodeViewModel.FlowAduitList.Add(auditModel);
flowViewModel.FlowNodeList.Add(flowNodeViewModel);
}
listFlow.Add(flowViewModel);
}
}
if (extModel.IsOpenExamApply == 1 && extModel.ExamApplyReviewer == 0) if (extModel.IsOpenExamApply == 1 && extModel.ExamApplyReviewer == 0)
{ {
return ApiResult.Failed("请选择试卷申请审批主管"); return ApiResult.Failed("请选择试卷申请审批主管");
} }
if (extModel.IsOpenExamApply == 1 && extModel.ExamApplyReviewer > 0)
{
var flowViewModel = basicFlowModule.GetFlowModule(Config.ExamApplyFlowId);
if (flowViewModel != null && flowViewModel.FlowId > 0)
{
if (flowViewModel.FlowNodeList != null && flowViewModel.FlowNodeList.Any())//之前已经存在
{
foreach (var item in flowViewModel.FlowNodeList)
{
item.NodeName = extModel.ExamApplyReviewerName;
if (item.FlowAduitList != null && item.FlowAduitList.Any())
{
item.FlowAduitList.ForEach(x => x.AduitName = extModel.ExamApplyReviewerName);
item.FlowAduitList.ForEach(x => x.UserId = extModel.ExamApplyReviewer);
}
}
}
else
{ //不存在
flowViewModel.FlowNodeList = new List<RB_Flow_Node_ViewModel>();
RB_Flow_Node_ViewModel flowNodeViewModel = new RB_Flow_Node_ViewModel()
{
NodeId = 0,
NodeName = extModel.ExamApplyReviewerName,
FlowId = Config.ZuJuanFlowId,
SortNum = 1
};
flowNodeViewModel.FlowAduitList = new List<RB_Flow_AduitInfo_ViewModel>();
RB_Flow_AduitInfo_ViewModel auditModel = new RB_Flow_AduitInfo_ViewModel()
{
CheckId = 0,
NodeId = 0,
FlowId = Config.ZuJuanFlowId,
AduitName = extModel.ExamApplyReviewerName,
AuditType = Common.Enum.User.WFTAuditTypeEnum.SpecifiedMember,
UserId = extModel.ExamApplyReviewer,
IsSpecNode = 0,
PostType = 0,
AuditWay = Common.Enum.User.WFTAuditWayEnum.Countersign
};
flowNodeViewModel.FlowAduitList.Add(auditModel);
flowViewModel.FlowNodeList.Add(flowNodeViewModel);
}
listFlow.Add(flowViewModel);
}
}
var obj = paperModule.GetExaminationConfigureModel(extModel); var obj = paperModule.GetExaminationConfigureModel(extModel);
if (obj != null && obj.Id > 0) if (obj != null && obj.Id > 0)
{ {
extModel.Id = obj.Id; extModel.Id = obj.Id;
} }
bool flag = paperModule.SetExaminationConfigure(extModel); bool flag = paperModule.SetExaminationConfigure(extModel);
if (flag)
{
try
{
foreach (var item in listFlow)
{
basicFlowModule.SetFlowModule(item);
}
}
catch (Exception ex)
{
}
}
return flag ? ApiResult.Success(data: extModel) : ApiResult.Failed(); return flag ? ApiResult.Success(data: extModel) : ApiResult.Failed();
} }
#endregion #endregion
......
...@@ -97,11 +97,15 @@ ...@@ -97,11 +97,15 @@
"OrderSplitClassFlowId": 6, "OrderSplitClassFlowId": 6,
//学生请假流程编号 //学生请假流程编号
"StudentLeaveFlowId": 7, "StudentLeaveFlowId": 7,
"ErpUrl": "http://localhost:8181/#", //组卷审批流程编号
//是否开启调课数据验证 "ZuJuanFlowId": 8,
"IsOpenChangeClassVerify": 1, //考试申请流程编号
//是否是本地服务 "ExamApplyFlowId": 9,
"IsLocal": "1", "ErpUrl": "http://localhost:8181/#",
//临时Token //是否开启调课数据验证
"TempToken": "47_oXN2xrKRE9InhFMtcCuFx_8Psl2i9TgCYhdHIsvuii5TweFkXvM1J0miUS1sLiRO5GggPOSQqCL1mfVK_ZR9HzV0JAn12TUKctzrBf2p6cFN0gzSUP88Q-iEA3yNgVkL9-DtNpzPL2stAfD7GTRaAIAANL" "IsOpenChangeClassVerify": 1,
//是否是本地服务
"IsLocal": "1",
//临时Token
"TempToken": "47_oXN2xrKRE9InhFMtcCuFx_8Psl2i9TgCYhdHIsvuii5TweFkXvM1J0miUS1sLiRO5GggPOSQqCL1mfVK_ZR9HzV0JAn12TUKctzrBf2p6cFN0gzSUP88Q-iEA3yNgVkL9-DtNpzPL2stAfD7GTRaAIAANL"
} }
\ 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