Commit 421d1dc3 authored by 黄奎's avatar 黄奎

页面修改

parent 3ba8677a
......@@ -4,9 +4,11 @@ using Edu.Common.Enum.Course;
using Edu.Common.Enum.User;
using Edu.Common.Plugin;
using Edu.Model.CacheModel;
using Edu.Model.Entity.Course;
using Edu.Model.ViewModel.Course;
using Edu.Repository.Course;
using Edu.Repository.Flow;
using Edu.Repository.User;
using System;
using System.Collections.Generic;
using System.Linq;
......@@ -40,11 +42,21 @@ namespace Edu.Module.Course
/// </summary>
private readonly RB_Order_GuestRepository order_GuestRepository = new RB_Order_GuestRepository();
/// <summary>
/// 订单仓储层对象
/// </summary>
private readonly RB_OrderRepository orderRepository = new RB_OrderRepository();
/// <summary>
/// 流程仓储层对象
/// </summary>
private readonly RB_FlowRepository flowRepository = new RB_FlowRepository();
/// <summary>
/// 账号
/// </summary>
private readonly RB_AccountRepository accountRepository = new RB_AccountRepository();
/// <summary>
/// 获取学员退课单据分页列表
/// </summary>
......@@ -376,7 +388,7 @@ namespace Edu.Module.Course
#endregion
//赋值下一步到审核记录中 并更新这一步的待审核人
var modelNext = ToAuditFlow[1];
flag = InsertAuditRelevanceNext(backModel.CreateBy, backModel.BackId, backModel.FlowId, modelNext);
flag = InsertAuditRelevanceNext(backModel, modelNext);
if (flag == false)
{
message = "审核流程不完整无法审核,请联系相关负责人!";
......@@ -441,7 +453,7 @@ namespace Edu.Module.Course
}
//赋值下一步到审核记录中 并更新这一步的待审核人
var modelNext = ToAuditFlow[1];
flag = InsertAuditRelevanceNext(backModel.CreateBy, backModel.BackId, backModel.FlowId, modelNext);
flag = InsertAuditRelevanceNext(backModel, modelNext);
if (flag == false)
{
message = "审核流程不完整无法审核,请联系相关负责人!";
......@@ -483,7 +495,7 @@ namespace Edu.Module.Course
#endregion
//赋值下一步到审核记录中 并更新这一步的待审核人
var modelNext = ToAuditFlow[1];
flag = InsertAuditRelevanceNext(backModel.CreateBy, backModel.BackId, backModel.FlowId, modelNext);
flag = InsertAuditRelevanceNext(backModel, modelNext);
if (flag == false)
{
message = "审核流程不完整无法审核,请联系相关负责人!";
......@@ -542,23 +554,66 @@ namespace Edu.Module.Course
/// <summary>
/// 添加拷贝审核节点
/// </summary>
/// <param name="empId">员工id</param>
/// <param name="wfId"></param>
/// <param name="flowId">工作流id</param>
/// <param name="backModel">员工id</param>
/// <param name="modelNext">审核关联</param>
private bool InsertAuditRelevanceNext(int empId, int sourceId, int flowId, RB_Student_BackRelevance_ViewModel modelNext)
{
if (empId <= 0)
private bool InsertAuditRelevanceNext(RB_Student_BackClass backModel, RB_Student_BackRelevance_ViewModel modelNext)
{
return false;
}
if (modelNext != null)
{
RB_Student_BackRelevance_ViewModel auditRelevance = modelNext.RefMapperTo<RB_Student_BackRelevance_ViewModel>();
if (auditRelevance != null)
{
List<int> empList = Common.ConvertHelper.StringToList(auditRelevance.ToAuditId);
InsertBatcheAuditRecord(empList, sourceId, auditRelevance);
List<int> empList = new List<int>();
if (!string.IsNullOrEmpty(auditRelevance.PostIds))
{
var postList = Common.ConvertHelper.StringToList(auditRelevance.PostIds);
if (postList != null&& postList.Count>0)
{
foreach (var item in postList)
{
//本班教师审核
if (item == 1)
{
empList.Add(backModel.TeacherId);
}
//关联销售审核
else if (item == 2)
{
var orderModel = orderRepository.GetEntity(backModel.OrderId);
empList.Add(orderModel.EnterID);
}
//分区校长审核
else if (item == 3)
{
var headmaster = accountRepository.GetAccountListExtRepository(new Model.ViewModel.User.RB_Account_ViewModel()
{
Post_Id = Common.Config.SchoolPostId,
Group_Id = backModel.Group_Id
})?.FirstOrDefault();
if (headmaster != null && headmaster.Id > 0)
{
empList.Add(headmaster.Id);
}
}
else if (item == 4)
{
var headmaster = accountRepository.GetAccountListExtRepository(new Model.ViewModel.User.RB_Account_ViewModel()
{
Post_Id = Common.Config.JiaoWuZhang,
Group_Id = backModel.Group_Id
})?.FirstOrDefault();
if (headmaster != null && headmaster.Id > 0)
{
empList.Add(headmaster.Id);
}
}
}
}
}
//empList = Common.ConvertHelper.StringToList(auditRelevance.ToAuditId);
InsertBatcheAuditRecord(empList, backModel.BackId, auditRelevance);
}
}
return true;
......
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