Commit 0a0edbb8 authored by 黄奎's avatar 黄奎

页面西修改

parent 094cf17d
......@@ -682,6 +682,7 @@ namespace Edu.Module.Course
{
new WhereHelper (nameof(RB_Class_Plan_ViewModel.ClassId),extModel.ClassId),
new WhereHelper (nameof(RB_Class_Plan_ViewModel.ClassDate),extModel.ClassDate),
new WhereHelper (nameof(RB_Class_Plan_ViewModel.Status),(int)DateStateEnum.Normal),
};
if (extModel.ClassPlanId > 0)
{
......
......@@ -148,12 +148,12 @@ namespace Edu.Module.Course
foreach (var subItem in item.FlowAduitList)
{
//指定人员
if (subItem.AuditType == 1)
if (subItem.AuditType == Common.Enum.User.WFTAuditTypeEnum.SpecifiedMember)
{
AuditedId += subItem.UserId + ",";
}
//指定角色
else if (subItem.AuditType == 2)
else if (subItem.AuditType == Common.Enum.User.WFTAuditTypeEnum.Role)
{
//本班教师审核
if (subItem.PostType == 1)
......
......@@ -98,17 +98,6 @@ namespace Edu.Module.Course
ConditionId = backModel.BackId
});
#region 更新审核记录表
Dictionary<string, object> recordFileds = new Dictionary<string, object>()
{
{ nameof(RB_Student_BackRecord_ViewModel.AuditStatus),AuditStatus},
{ nameof(RB_Student_BackRecord_ViewModel.Description),Description},
{ nameof(RB_Student_BackRecord_ViewModel.UpdateBy),user.Id},
{ nameof(RB_Student_BackRecord_ViewModel.UpdateTime),DateTime.Now},
};
#endregion
//驳回处理
if (AuditStatus == 3)
{
......@@ -164,7 +153,7 @@ namespace Edu.Module.Course
return false;
}
#region 更新审核记录表状态
flag = student_BackRecordRepository.Update(recordFileds, new WhereHelper(nameof(RB_Student_BackRecord_ViewModel.Id), amodel.Id));
flag = UpdateStuRecordModule(WFRrocessStatus.AuditThrough, Description, user.Id, amodel.Id);
#endregion
int AuditCount = RecordList.Where(x => x.AuditStatus == WFRrocessStatus.NotAudit && x.AuditEmId != user.Id).Count();
......@@ -181,10 +170,7 @@ namespace Edu.Module.Course
model.AuditedId = user.Id.ToString();
}
#region 更新审核关联表状态
relevanceFileds = new Dictionary<string, object>();
relevanceFileds.Add(nameof(RB_Student_BackRelevance_ViewModel.Stauts), model.Stauts);
relevanceFileds.Add(nameof(RB_Student_BackRelevance_ViewModel.AuditedId), model.AuditedId);
flag = student_BackRelevanceRepository.Update(relevanceFileds, new WhereHelper(nameof(RB_Student_BackRelevance_ViewModel.Id), model.Id));
flag = UpdateStuRelevanceModule(model.Stauts, model.AuditedId, model.Id);
#endregion
//更新主表状态
......@@ -232,7 +218,7 @@ namespace Edu.Module.Course
model.AuditedId = user.Id.ToString();
}
#region 更新审核记录表状态
flag = student_BackRecordRepository.Update(recordFileds, new WhereHelper(nameof(RB_Student_BackRecord_ViewModel.Id), amodel.Id));
flag = UpdateStuRecordModule(WFRrocessStatus.AuditThrough, Description, user.Id, amodel.Id);
#endregion
#region 更新审核关联表状态
......@@ -248,14 +234,7 @@ namespace Edu.Module.Course
{
foreach (var item in list)
{
recordFileds = new Dictionary<string, object>
{
{ nameof(RB_Student_BackRecord_ViewModel.AuditStatus), WFRrocessStatus.OtherHaveAudit },
{ nameof(RB_Student_BackRecord_ViewModel.Description),Description},
{ nameof(RB_Student_BackRecord_ViewModel.UpdateBy),user.Id},
{ nameof(RB_Student_BackRecord_ViewModel.UpdateTime),DateTime.Now}
};
flag = student_BackRecordRepository.Update(recordFileds, new WhereHelper(nameof(RB_Student_BackRecord_ViewModel.Id), item.Id));
flag = UpdateStuRecordModule(WFRrocessStatus.OtherHaveAudit, Description, user.Id, item.Id);
}
}
Dictionary<string, object> backFileds = new Dictionary<string, object>()
......@@ -291,15 +270,7 @@ namespace Edu.Module.Course
model.AuditedId = user.Id.ToString();
}
#region 更新审核记录表状态
recordFileds = new Dictionary<string, object>
{
{ nameof(RB_Student_BackRecord_ViewModel.AuditStatus), WFRrocessStatus.AuditThrough },
{ nameof(RB_Student_BackRecord_ViewModel.Description),Description} ,
{ nameof(RB_Student_BackRecord_ViewModel.UpdateBy),user.Id} ,
{ nameof(RB_Student_BackRecord_ViewModel.UpdateTime),DateTime.Now}
};
flag = student_BackRecordRepository.Update(recordFileds, new WhereHelper(nameof(RB_Student_BackRecord_ViewModel.Id), amodel.Id));
flag = UpdateStuRecordModule(WFRrocessStatus.AuditThrough, Description, user.Id, amodel.Id);
#endregion
#region 更新审核关联表状态
relevanceFileds = new Dictionary<string, object>
......@@ -332,8 +303,9 @@ namespace Edu.Module.Course
var model = ToAuditFlow[0];
var RecordList = aurList.Where(x => x.AuditId == model.Id).ToList();
//会签 所有人必须审核完该流程才算完成
if (model.AuditWay == WFTAuditWayEnum.Countersign)
{//会签 所有人必须审核完该流程才算完成
{
var amodel = RecordList.Where(x => x.AuditStatus == WFRrocessStatus.NotAudit && x.AuditEmId == user.Id).FirstOrDefault();
if (amodel == null)
{
......@@ -342,14 +314,8 @@ namespace Edu.Module.Course
}
//审核记录状态
#region 更新审核记录表状态
recordFileds = new Dictionary<string, object>
{
{ nameof(RB_Student_BackRecord_ViewModel.AuditStatus), WFRrocessStatus.AuditThrough },
{ nameof(RB_Student_BackRecord_ViewModel.Description),Description} ,
{ nameof(RB_Student_BackRecord_ViewModel.UpdateBy),user.Id},
{ nameof(RB_Student_BackRecord_ViewModel.UpdateTime),DateTime.Now}
};
flag= student_BackRecordRepository.Update(recordFileds, new WhereHelper(nameof(RB_Student_BackRecord_ViewModel.Id), amodel.Id));
flag = UpdateStuRecordModule(WFRrocessStatus.AuditThrough, Description, user.Id, amodel.Id);
#endregion
int AuditCount = RecordList.Where(x => x.AuditStatus == WFRrocessStatus.NotAudit && x.AuditEmId != user.Id).Count();
......@@ -424,14 +390,7 @@ namespace Edu.Module.Course
}
#region 更新审核记录表状态
recordFileds = new Dictionary<string, object>
{
{ nameof(RB_Student_BackRecord_ViewModel.AuditStatus), WFRrocessStatus.AuditThrough },
{ nameof(RB_Student_BackRecord_ViewModel.Description),Description},
{ nameof(RB_Student_BackRecord_ViewModel.UpdateBy),user.Id},
{ nameof(RB_Student_BackRecord_ViewModel.UpdateTime),DateTime.Now}
};
flag= student_BackRecordRepository.Update(recordFileds, new WhereHelper(nameof(RB_Student_BackRecord_ViewModel.Id), amodel.Id));
flag = UpdateStuRecordModule(WFRrocessStatus.AuditThrough, Description, user.Id, amodel.Id);
#endregion
#region 更新审核关联表状态
......@@ -444,20 +403,13 @@ namespace Edu.Module.Course
flag = student_BackRelevanceRepository.Update(relevanceFileds, new WhereHelper(nameof(RB_Student_BackRelevance_ViewModel.Id), model.Id));
#endregion
var list = RecordList.Where(x => x.AuditStatus == WFRrocessStatus.NotAudit && x.AuditEmId != empId).ToList();
var list = RecordList.Where(x => x.AuditStatus == WFRrocessStatus.NotAudit && x.AuditEmId != user.Id).ToList();
int AuditCount = list.Count();
if (AuditCount > 0)//表示最后一个人就是子集审核 申请单 通过
{
foreach (var item in list)
{
recordFileds = new Dictionary<string, object>
{
{ nameof(RB_Student_BackRecord_ViewModel.AuditStatus), WFRrocessStatus.OtherHaveAudit },
{ nameof(RB_Student_BackRecord_ViewModel.Description),Description},
{ nameof(RB_Student_BackRecord_ViewModel.UpdateBy),user.Id},
{ nameof(RB_Student_BackRecord_ViewModel.UpdateTime),DateTime.Now}
};
flag = student_BackRecordRepository.Update(recordFileds, new WhereHelper(nameof(RB_Student_BackRecord_ViewModel.Id), item.Id));
flag = UpdateStuRecordModule(WFRrocessStatus.OtherHaveAudit, Description, user.Id, item.Id);
}
}
//赋值下一步到审核记录中 并更新这一步的待审核人
......@@ -495,16 +447,7 @@ namespace Edu.Module.Course
model.AuditedId = user.Id.ToString();
}
#region 更新审核记录表状态
recordFileds = new Dictionary<string, object>
{
{ nameof(RB_Student_BackRecord_ViewModel.AuditStatus), WFRrocessStatus.AuditThrough },
{ nameof(RB_Student_BackRecord_ViewModel.Description),Description} ,
{ nameof(RB_Student_BackRecord_ViewModel.UpdateBy),user.Id} ,
{ nameof(RB_Student_BackRecord_ViewModel.UpdateTime),DateTime.Now}
};
flag= student_BackRecordRepository.Update(recordFileds, new WhereHelper(nameof(RB_Student_BackRecord_ViewModel.Id), amodel.Id));
flag = UpdateStuRecordModule(WFRrocessStatus.AuditThrough, Description, user.Id, amodel.Id);
#endregion
#region 更新审核关联表状态
relevanceFileds = new Dictionary<string, object>
......@@ -531,6 +474,49 @@ namespace Edu.Module.Course
return flag;
}
/// <summary>
/// 更新审核记录表信息
/// </summary>
/// <param name="wFRrocessStatus">审核状态</param>
/// <param name="Description">审核意见</param>
/// <param name="UserId">审核人Id</param>
/// <param name="Id">审核记录编号</param>
/// <returns></returns>
private bool UpdateStuRecordModule(WFRrocessStatus wFRrocessStatus, string Description, int UserId, int Id)
{
var recordFileds = new Dictionary<string, object>
{
{ nameof(RB_Student_BackRecord_ViewModel.AuditStatus), wFRrocessStatus },
{ nameof(RB_Student_BackRecord_ViewModel.Description),Description} ,
{ nameof(RB_Student_BackRecord_ViewModel.UpdateBy),UserId},
{ nameof(RB_Student_BackRecord_ViewModel.UpdateTime),DateTime.Now}
};
bool flag = student_BackRecordRepository.Update(recordFileds, new WhereHelper(nameof(RB_Student_BackRecord_ViewModel.Id), Id));
return flag;
}
/// <summary>
/// 更新审核流程信息
/// </summary>
/// <param name="status"></param>
/// <param name="AuditedId"></param>
/// <param name="Id"></param>
/// <returns></returns>
private bool UpdateStuRelevanceModule(WFRrocessStatus status, string AuditedId, int Id)
{
var relevanceFileds = new Dictionary<string, object>
{
{ nameof(RB_Student_BackRelevance_ViewModel.Stauts), status },
};
if (!string.IsNullOrEmpty(AuditedId))
{
relevanceFileds.Add(nameof(RB_Student_BackRelevance_ViewModel.AuditedId), AuditedId);
}
bool flag = student_BackRelevanceRepository.Update(relevanceFileds, new WhereHelper(nameof(RB_Student_BackRelevance_ViewModel.Id), Id));
return flag;
}
/// <summary>
/// 添加拷贝审核节点
/// </summary>
......
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