Commit 5365d0d3 authored by 黄奎's avatar 黄奎

页面修改

parent 8fff8c62
...@@ -23,6 +23,16 @@ namespace Edu.Model.Entity.EduTask ...@@ -23,6 +23,16 @@ namespace Edu.Model.Entity.EduTask
/// </summary> /// </summary>
public string Title { get; set; } public string Title { get; set; }
/// <summary>
/// 班级编号
/// </summary>
public int ClassId { get; set; }
/// <summary>
/// 订单编号
/// </summary>
public int OrderId { get; set; }
/// <summary> /// <summary>
/// 单据类型 /// 单据类型
/// </summary> /// </summary>
...@@ -63,6 +73,11 @@ namespace Edu.Model.Entity.EduTask ...@@ -63,6 +73,11 @@ namespace Edu.Model.Entity.EduTask
/// </summary> /// </summary>
public DateTime UpdateTime { get; set; } public DateTime UpdateTime { get; set; }
/// <summary>
/// 抄送人(多个逗号分隔)
/// </summary>
public string RecipientIds { get; set; }
/// <summary> /// <summary>
/// 审核状态(见枚举) /// 审核状态(见枚举)
/// </summary> /// </summary>
......
...@@ -4,14 +4,14 @@ using System.Collections.Generic; ...@@ -4,14 +4,14 @@ using System.Collections.Generic;
using System.Text; using System.Text;
using VT.FW.DB; using VT.FW.DB;
namespace Edu.Model.Entity.Course namespace Edu.Model.Entity.EduTask
{ {
/// <summary> /// <summary>
/// 学员退课单据审核记录表 /// 教务单据审核记录表
/// </summary> /// </summary>
[Serializable] [Serializable]
[DB(ConnectionName = "DefaultConnection")] [DB(ConnectionName = "DefaultConnection")]
public class RB_Student_BackRecord public class RB_Education_Record
{ {
/// <summary> /// <summary>
/// 审核记录表主键编号 /// 审核记录表主键编号
......
...@@ -4,14 +4,14 @@ using System.Collections.Generic; ...@@ -4,14 +4,14 @@ using System.Collections.Generic;
using System.Text; using System.Text;
using VT.FW.DB; using VT.FW.DB;
namespace Edu.Model.Entity.Course namespace Edu.Model.Entity.EduTask
{ {
/// <summary> /// <summary>
/// 退款单据审核人员信息实体类 /// 教务单据审核人员信息实体类
/// </summary> /// </summary>
[Serializable] [Serializable]
[DB(ConnectionName = "DefaultConnection")] [DB(ConnectionName = "DefaultConnection")]
public class RB_Student_BackRelevance public class RB_Education_Relevance
{ {
/// <summary> /// <summary>
/// 主键编号 /// 主键编号
......
using System;
using System.Collections.Generic;
using System.Text;
namespace Edu.Model.ViewModel.EduTask
{
/// <summary>
/// 教务单据审核实体类
/// </summary>
public class EduReceiptAudit
{
/// <summary>
/// 单据编号
/// </summary>
public int Id { get; set; }
/// <summary>
/// 审核状态(1-待审核,2-审核通过,3-驳回)
/// </summary>
public int AuditStatus { get; set; }
/// <summary>
/// 审核备注
/// </summary>
public string Description { get; set; }
/// <summary>
/// 是否特殊节点
/// </summary>
public int SpecialNode { get; set; }
/// <summary>
/// 抄送人
/// </summary>
public string RecipientIds { get; set; }
/// <summary>
/// 退款金额【退课单据】
/// </summary>
public decimal BackMoney { get; set; }
}
}
using Edu.Model.Entity.Course; using Edu.Model.Entity.Course;
using Edu.Model.Entity.EduTask;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
namespace Edu.Model.ViewModel.Course namespace Edu.Model.ViewModel.EduTask
{ {
/// <summary> /// <summary>
/// 学员退课单据审核记录表视图实体类 /// 教务单据审核记录表视图实体类
/// </summary> /// </summary>
public class RB_Student_BackRecord_ViewModel : RB_Student_BackRecord public class RB_Education_Record_ViewModel : RB_Education_Record
{ {
} }
......
using Edu.Model.Entity.Course; using Edu.Model.Entity.Course;
using Edu.Model.Entity.EduTask;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
namespace Edu.Model.ViewModel.Course namespace Edu.Model.ViewModel.EduTask
{ {
/// <summary> /// <summary>
/// 退款单据审核人员信息视图实体类 /// 教务单据审核人员信息视图实体类
/// </summary> /// </summary>
public class RB_Student_BackRelevance_ViewModel : RB_Student_BackRelevance public class RB_Education_Relevance_ViewModel : RB_Education_Relevance
{ {
} }
} }
...@@ -3006,7 +3006,7 @@ namespace Edu.Module.Course ...@@ -3006,7 +3006,7 @@ namespace Edu.Module.Course
result.Add(new result.Add(new
{ {
Id = item?.ClassTimeId ?? 0, Id = item?.ClassTimeId ?? 0,
ClassType = item.ClassType, item.ClassType,
item.ClassId, item.ClassId,
item.ClassName, item.ClassName,
item.CourseName, item.CourseName,
......
...@@ -9,6 +9,8 @@ using System.Text; ...@@ -9,6 +9,8 @@ using System.Text;
using System.Linq; using System.Linq;
using Edu.Model.Entity.Course; using Edu.Model.Entity.Course;
using VT.FW.DB; using VT.FW.DB;
using Edu.Model.Entity.EduTask;
using Edu.Repository.EduTask;
namespace Edu.Module.Course namespace Edu.Module.Course
{ {
...@@ -22,16 +24,7 @@ namespace Edu.Module.Course ...@@ -22,16 +24,7 @@ namespace Edu.Module.Course
/// </summary> /// </summary>
private readonly RB_Student_BackClassRepository student_BackClassRepository = new RB_Student_BackClassRepository(); private readonly RB_Student_BackClassRepository student_BackClassRepository = new RB_Student_BackClassRepository();
/// <summary>
/// 退款单据审核人员信息仓储层对象
/// </summary>
private readonly RB_Student_BackRelevanceRepository student_BackRelevanceRepository = new RB_Student_BackRelevanceRepository();
/// <summary>
/// 学员退课单据审核记录仓储层对象
/// </summary>
private readonly RB_Student_BackRecordRepository student_BackRecordRepository = new RB_Student_BackRecordRepository();
/// <summary> /// <summary>
/// 学员签到仓储层对象 /// 学员签到仓储层对象
/// </summary> /// </summary>
...@@ -43,9 +36,9 @@ namespace Edu.Module.Course ...@@ -43,9 +36,9 @@ namespace Edu.Module.Course
private readonly RB_Class_ConfigRepository class_ConfigRepository = new RB_Class_ConfigRepository(); private readonly RB_Class_ConfigRepository class_ConfigRepository = new RB_Class_ConfigRepository();
/// <summary> /// <summary>
/// 流程仓储层对象 /// 教务单据
/// </summary> /// </summary>
private readonly RB_FlowRepository flowRepository = new RB_FlowRepository(); private readonly RB_Education_ReceiptRepository education_ReceiptRepository = new RB_Education_ReceiptRepository();
/// <summary> /// <summary>
...@@ -80,20 +73,14 @@ namespace Edu.Module.Course ...@@ -80,20 +73,14 @@ namespace Edu.Module.Course
message = "未找到对应的班级信息!"; message = "未找到对应的班级信息!";
return false; return false;
} }
//获取退课流程
var flowModel = flowRepository.GetFlowRepository(Common.Config.BackClassFlowId);
if (flowModel == null)
{
message = "未配置退课流程!";
return false;
}
//获取教师实体信息 //获取教师实体信息
var teacherModel = accountRepository.GetAccountListExtRepository(new Model.ViewModel.User.RB_Account_ViewModel() var teacherModel = accountRepository.GetAccountListExtRepository(new Model.ViewModel.User.RB_Account_ViewModel()
{ {
AccountId = classModel.Teacher_Id, AccountId = classModel.Teacher_Id,
AccountType = Common.Enum.User.AccountTypeEnum.Teacher AccountType = Common.Enum.User.AccountTypeEnum.Teacher
})?.FirstOrDefault(); })?.FirstOrDefault();
var teacherId = teacherModel?.Id ?? 0;
var totalBackCount = student_BackClassRepository.GetStudentBackClassNumRepository(); var totalBackCount = student_BackClassRepository.GetStudentBackClassNumRepository();
string backNum; string backNum;
if (totalBackCount < 10000) if (totalBackCount < 10000)
...@@ -104,7 +91,7 @@ namespace Edu.Module.Course ...@@ -104,7 +91,7 @@ namespace Edu.Module.Course
{ {
backNum = totalBackCount.ToString(); backNum = totalBackCount.ToString();
} }
var teacherId = teacherModel?.Id ?? 0;
//基础课时分钟数 //基础课时分钟数
var BasicMinutes = class_ConfigRepository.GetClassMinutesRepository(orderModel.ClassId); var BasicMinutes = class_ConfigRepository.GetClassMinutesRepository(orderModel.ClassId);
var stuCheckList = class_CheckRepository.GetGuestFinishMinutesRepository(GuestId.ToString()); var stuCheckList = class_CheckRepository.GetGuestFinishMinutesRepository(GuestId.ToString());
...@@ -144,108 +131,33 @@ namespace Edu.Module.Course ...@@ -144,108 +131,33 @@ namespace Edu.Module.Course
var newBackId = student_BackClassRepository.Insert(backClassModel); var newBackId = student_BackClassRepository.Insert(backClassModel);
backClassModel.BackId = newBackId; backClassModel.BackId = newBackId;
flag = newBackId > 0; flag = newBackId > 0;
int index = 0; if (flag)
foreach (var item in flowModel.FlowNodeList)
{ {
if (item.FlowAduitList != null && item.FlowAduitList.Count > 0) flag = education_ReceiptRepository.SetEducationReceiptRepository(new RB_Education_Receipt()
{ {
string AuditedId = "";//审核人 Id=0,
foreach (var subItem in item.FlowAduitList) Title="退课单据",
{ ClassId=orderModel.ClassId,
//指定人员 OrderId=orderModel.OrderId,
if (subItem.AuditType == Common.Enum.User.WFTAuditTypeEnum.SpecifiedMember) ReceiptType= Common.Enum.Finance.ReceiptTypeEnum.BackClass,
{ RelationId= backClassModel.BackId,
AuditedId += subItem.UserId + ","; Group_Id=orderModel.Group_Id,
} School_Id=orderModel.School_Id,
//指定角色 CreateBy=userinfo.Id,
else if (subItem.AuditType == Common.Enum.User.WFTAuditTypeEnum.Role) CreateTime=DateTime.Now,
{ UpdateBy=userinfo.Id,
//本班教师审核 UpdateTime=DateTime.Now,
if (subItem.PostType == 1) RecipientIds="",
{ VerifyStatus= Common.Enum.Finance.WFRrocessStatus.NotAudit
AuditedId += teacherId + ","; }, out message);
subItem.UserId = teacherId; if (flag)
} {
//关联销售审核 Dictionary<string, object> fileds = new Dictionary<string, object>()
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,
Group_Id = classModel.Group_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,
Group_Id = classModel.Group_Id
})?.FirstOrDefault();
AuditedId += (headmaster?.Id ?? 0) + ",";
subItem.UserId = (headmaster?.Id ?? 0);
}
}
}
var backLevance = new RB_Student_BackRelevance()
{ {
ConditionId = backClassModel.BackId, {nameof(RB_Order_Guest_ViewModel.GuestState),3 }
AuditDescription = item.NodeName,
AuditedId = "",
AuditWay = item.FlowAduitList[0].AuditWay,
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)),
ToAuditId = AuditedId.TrimEnd(','),
Sort = item.SortNum,
SpecialNode = item.FlowAduitList[0].IsSpecNode,
Stauts = Common.Enum.User.WFRrocessStatus.NotAudit,
WorkFlowId = Common.Config.BackClassFlowId,
}; };
var backLevanceId = student_BackRelevanceRepository.Insert(backLevance); flag = order_GuestRepository.Update(fileds, new WhereHelper(nameof(RB_Order_Guest_ViewModel.Id), GuestId));
backLevance.Id = backLevanceId;
flag = backLevanceId > 0;
if (index == 0)
{
foreach (var subItem in item.FlowAduitList)
{
var recordModel = new RB_Student_BackRecord_ViewModel()
{
ConditionId = backClassModel.BackId,
AuditStatus = Common.Enum.User.WFRrocessStatus.NotAudit,
AuditId = backLevance.Id,
AuditEmId = subItem.UserId,
CreateBy = userinfo.Id,
CreateTime = DateTime.Now,
UpdateBy = userinfo.Id,
UpdateTime = DateTime.Now,
Description = "",
BackrelevanceId = backLevance.Id,
};
flag = student_BackRecordRepository.Insert(recordModel) > 0;
}
}
} }
index++;
}
if (flag)
{
Dictionary<string, object> fileds = new Dictionary<string, object>()
{
{nameof(RB_Order_Guest_ViewModel.GuestState),3 }
};
flag = order_GuestRepository.Update(fileds, new WhereHelper(nameof(RB_Order_Guest_ViewModel.Id), GuestId));
} }
return flag; return flag;
} }
......
This diff is collapsed.
using Edu.Model.Entity.EduTask; using Edu.Model.Entity.EduTask;
using Edu.Model.ViewModel.EduTask; using Edu.Model.ViewModel.EduTask;
using Edu.Repository.EduTask; using Edu.Repository.EduTask;
using Edu.Repository.Flow;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
...@@ -24,6 +25,8 @@ namespace Edu.Module.EduTask ...@@ -24,6 +25,8 @@ namespace Edu.Module.EduTask
/// </summary> /// </summary>
private readonly RB_Change_ClassPlanRepository change_ClassPlanRepository = new RB_Change_ClassPlanRepository(); private readonly RB_Change_ClassPlanRepository change_ClassPlanRepository = new RB_Change_ClassPlanRepository();
/// <summary> /// <summary>
/// 获取调课计划列表 /// 获取调课计划列表
/// </summary> /// </summary>
...@@ -77,7 +80,7 @@ namespace Edu.Module.EduTask ...@@ -77,7 +80,7 @@ namespace Edu.Module.EduTask
UpdateTime=extModel.UpdateTime, UpdateTime=extModel.UpdateTime,
VerifyStatus= Common.Enum.Finance.WFRrocessStatus.NotAudit VerifyStatus= Common.Enum.Finance.WFRrocessStatus.NotAudit
}; };
flag= education_ReceiptRepository.SetEducationReceiptRepository(educationReceipt); flag= education_ReceiptRepository.SetEducationReceiptRepository(educationReceipt,out string message);
} }
} }
return flag; return flag;
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Edu.Aop\Edu.Aop.csproj" />
<ProjectReference Include="..\Edu.Repository\Edu.Repository.csproj" /> <ProjectReference Include="..\Edu.Repository\Edu.Repository.csproj" />
</ItemGroup> </ItemGroup>
......
...@@ -28,7 +28,7 @@ namespace Edu.Repository.Course ...@@ -28,7 +28,7 @@ namespace Edu.Repository.Course
string isSpecNode = ""; string isSpecNode = "";
if (query.Conditon == Common.Enum.Course.BackClassConditionEnum.WaitAgree) if (query.Conditon == Common.Enum.Course.BackClassConditionEnum.WaitAgree)
{ {
isSpecNode = string.Format(",IFNULL((SELECT SpecialNode FROM rb_student_backrelevance WHERE Id IN(SELECT BackrelevanceId FROM rb_student_backrecord WHERE ConditionId=A.BackId AND AuditStatus=1 AND AuditEmId={0})),0) AS SpecialNode ", query.CreateBy); //isSpecNode = string.Format(",IFNULL((SELECT SpecialNode FROM rb_student_backrelevance WHERE Id IN(SELECT BackrelevanceId FROM rb_student_backrecord WHERE ConditionId=A.BackId AND AuditStatus=1 AND AuditEmId={0})),0) AS SpecialNode ", query.CreateBy);
} }
builder.AppendFormat(@" builder.AppendFormat(@"
SELECT A.*,IFNULL(B.GuestName,'') AS GuestName,IFNULL(C.SName,'') AS SchoolName,IFNULL(D.ClassName,'') AS ClassName,IFNULL(T.TeacherName,'') AS TeacherName SELECT A.*,IFNULL(B.GuestName,'') AS GuestName,IFNULL(C.SName,'') AS SchoolName,IFNULL(D.ClassName,'') AS ClassName,IFNULL(T.TeacherName,'') AS TeacherName
......
...@@ -6,6 +6,10 @@ using System.Text; ...@@ -6,6 +6,10 @@ using System.Text;
using System.Linq; using System.Linq;
using VT.FW.DB.Dapper; using VT.FW.DB.Dapper;
using VT.FW.DB; using VT.FW.DB;
using Edu.Repository.Flow;
using Edu.Model.ViewModel.Flow;
using Edu.Repository.User;
using Edu.Repository.Course;
namespace Edu.Repository.EduTask namespace Edu.Repository.EduTask
{ {
...@@ -14,6 +18,36 @@ namespace Edu.Repository.EduTask ...@@ -14,6 +18,36 @@ namespace Edu.Repository.EduTask
/// </summary> /// </summary>
public class RB_Education_ReceiptRepository : BaseRepository<RB_Education_Receipt> public class RB_Education_ReceiptRepository : BaseRepository<RB_Education_Receipt>
{ {
/// <summary>
/// 教务单据审核人员信息仓储层对象
/// </summary>
private readonly RB_Education_RelevanceRepository student_BackRelevanceRepository = new RB_Education_RelevanceRepository();
/// <summary>
/// 教务单据审核记录仓储层对象
/// </summary>
private readonly RB_Education_RecordRepository student_BackRecordRepository = new RB_Education_RecordRepository();
/// <summary>
/// 流程仓储层对象
/// </summary>
private readonly RB_FlowRepository flowRepository = new RB_FlowRepository();
/// <summary>
/// 账号仓储层对象
/// </summary>
private readonly RB_AccountRepository accountRepository = new RB_AccountRepository();
/// <summary>
/// 班级仓储层对象
/// </summary>
private readonly RB_ClassRepository classRepository = new RB_ClassRepository();
/// <summary>
/// 订单仓储层对象
/// </summary>
private readonly RB_OrderRepository orderRepository = new RB_OrderRepository();
/// <summary> /// <summary>
/// 获取教务单据分页列表 /// 获取教务单据分页列表
/// </summary> /// </summary>
...@@ -51,25 +85,136 @@ WHERE 1=1 ...@@ -51,25 +85,136 @@ WHERE 1=1
/// 新增修改教务单据 /// 新增修改教务单据
/// </summary> /// </summary>
/// <param name="model"></param> /// <param name="model"></param>
/// <param name="message"></param>
/// <returns></returns> /// <returns></returns>
public bool SetEducationReceiptRepository(RB_Education_Receipt model) public bool SetEducationReceiptRepository(RB_Education_Receipt model, out string message)
{ {
message = "";
bool flag = false; bool flag = false;
if (model.Id > 0) //审核流程
var flowModel = new RB_Flow_ViewModel();
//退课流程
if (model.ReceiptType == Common.Enum.Finance.ReceiptTypeEnum.BackClass)
{ {
Dictionary<string, object> fileds = new Dictionary<string, object>() flowModel = flowRepository.GetFlowRepository(Common.Config.BackClassFlowId);
{ message = "未配置退课流程!";
{nameof(RB_Education_Receipt.UpdateBy),model.UpdateBy }, return false;
{nameof(RB_Education_Receipt.UpdateTime),model.UpdateTime },
};
flag = base.Update(fileds, new WhereHelper(nameof(RB_Education_Receipt.Id),model.Id));
} }
else
int index = 0;
foreach (var item in flowModel.FlowNodeList)
{ {
var newId = base.Insert(model); if (item.FlowAduitList != null && item.FlowAduitList.Count > 0)
model.Id = newId; {
flag = newId > 0; string AuditedId = "";//审核人
foreach (var subItem in item.FlowAduitList)
{
//指定人员
if (subItem.AuditType == Common.Enum.User.WFTAuditTypeEnum.SpecifiedMember)
{
AuditedId += subItem.UserId + ",";
}
//指定角色
else if (subItem.AuditType == Common.Enum.User.WFTAuditTypeEnum.Role)
{
//本班教师审核
if (subItem.PostType == 1)
{
//班级实体类
var classModel = classRepository.GetEntity(model.ClassId);
if (classModel == null)
{
message = "未找到对应的班级信息!";
return false;
}
//获取教师实体信息
var teacherModel = accountRepository.GetAccountListExtRepository(new Model.ViewModel.User.RB_Account_ViewModel()
{
AccountId = classModel.Teacher_Id,
AccountType = Common.Enum.User.AccountTypeEnum.Teacher
})?.FirstOrDefault();
var teacherId = teacherModel?.Id ?? 0;
AuditedId += teacherId + ",";
subItem.UserId = teacherId;
}
//关联销售审核
else if (subItem.PostType == 2)
{
var orderModel = orderRepository.GetEntity(model.OrderId);
AuditedId += (orderModel?.EnterID ?? 0) + ",";
subItem.UserId = (orderModel?.EnterID ?? 0);
}
//分区校长审核
else if (subItem.PostType == 3)
{
var headmaster = accountRepository.GetAccountListExtRepository(new Model.ViewModel.User.RB_Account_ViewModel()
{
Post_Id = Common.Config.SchoolPostId,
Group_Id = model.Group_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,
Group_Id = model.Group_Id
})?.FirstOrDefault();
AuditedId += (headmaster?.Id ?? 0) + ",";
subItem.UserId = (headmaster?.Id ?? 0);
}
}
}
var levance = new RB_Education_Relevance()
{
ConditionId = model.RelationId,
AuditDescription = item.NodeName,
AuditedId = "",
AuditWay = item.FlowAduitList[0].AuditWay,
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)),
ToAuditId = AuditedId.TrimEnd(','),
Sort = item.SortNum,
SpecialNode = item.FlowAduitList[0].IsSpecNode,
Stauts = Common.Enum.User.WFRrocessStatus.NotAudit,
WorkFlowId = Common.Config.BackClassFlowId,
};
var backLevanceId = student_BackRelevanceRepository.Insert(levance);
levance.Id = backLevanceId;
flag = backLevanceId > 0;
if (index == 0)
{
foreach (var subItem in item.FlowAduitList)
{
var recordModel = new RB_Education_Record_ViewModel()
{
ConditionId = model.RelationId,
AuditStatus = Common.Enum.User.WFRrocessStatus.NotAudit,
AuditId = levance.Id,
AuditEmId = subItem.UserId,
CreateBy = model.CreateBy,
CreateTime = DateTime.Now,
UpdateBy = model.CreateBy,
UpdateTime = DateTime.Now,
Description = "",
BackrelevanceId = levance.Id,
};
flag = student_BackRecordRepository.Insert(recordModel) > 0;
}
}
}
index++;
} }
var newId = base.Insert(model);
model.Id = newId;
flag = newId > 0;
return flag; return flag;
} }
} }
......
using Edu.Model.Entity.Course;  using Edu.Model.Entity.EduTask;
using Edu.Model.ViewModel.Course; using Edu.Model.ViewModel.EduTask;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
namespace Edu.Repository.Course namespace Edu.Repository.EduTask
{ {
/// <summary> /// <summary>
/// 学员退课单据审核记录仓储层 /// 教务单据审核记录仓储层
/// </summary> /// </summary>
public class RB_Student_BackRecordRepository : BaseRepository<RB_Student_BackRecord> public class RB_Education_RecordRepository : BaseRepository<RB_Education_Record>
{ {
/// <summary> /// <summary>
/// 获取学员退课单据审核记录列表 /// 获取教务单据审核记录列表
/// </summary> /// </summary>
/// <param name="query"></param> /// <param name="query"></param>
/// <returns></returns> /// <returns></returns>
public List<RB_Student_BackRecord_ViewModel> GetStudentBackRecordListRepository(RB_Student_BackRecord_ViewModel query) public List<RB_Education_Record_ViewModel> GetEducationRecordListRepository(RB_Education_Record_ViewModel query)
{ {
StringBuilder builder = new StringBuilder(); StringBuilder builder = new StringBuilder();
builder.AppendFormat(@" builder.AppendFormat(@"
SELECT * SELECT *
FROM RB_Student_BackRecord FROM RB_Education_Record
WHERE 1=1 WHERE 1=1
"); ");
if (query != null) if (query != null)
{ {
if (query.ConditionId > 0) if (query.ConditionId > 0)
{ {
builder.AppendFormat(" AND {0}={1} ", nameof(RB_Student_BackRecord_ViewModel.ConditionId), query.ConditionId); builder.AppendFormat(" AND {0}={1} ", nameof(RB_Education_Record_ViewModel.ConditionId), query.ConditionId);
} }
if (query.AuditStatus > 0) if (query.AuditStatus > 0)
{ {
builder.AppendFormat(" AND {0}={1} ", nameof(RB_Student_BackRecord_ViewModel.AuditStatus), query.AuditStatus); builder.AppendFormat(" AND {0}={1} ", nameof(RB_Education_Record_ViewModel.AuditStatus), query.AuditStatus);
} }
} }
return Get<RB_Student_BackRecord_ViewModel>(builder.ToString()).ToList(); return Get<RB_Education_Record_ViewModel>(builder.ToString()).ToList();
} }
} }
} }
using Edu.Model.Entity.Course; using Edu.Model.Entity.Course;
using Edu.Model.Entity.EduTask;
using Edu.Model.ViewModel.Course; using Edu.Model.ViewModel.Course;
using Edu.Model.ViewModel.EduTask;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
namespace Edu.Repository.Course namespace Edu.Repository.EduTask
{ {
/// <summary> /// <summary>
/// 退款单据审核人员信息仓储层 /// 教务单据审核人员信息仓储层
/// </summary> /// </summary>
public class RB_Student_BackRelevanceRepository : BaseRepository<RB_Student_BackRelevance> public class RB_Education_RelevanceRepository : BaseRepository<RB_Education_Relevance>
{ {
/// <summary> /// <summary>
/// 获取学生退课审核列表 /// 获取教务审核列表
/// </summary> /// </summary>
/// <param name="query"></param> /// <param name="query"></param>
/// <returns></returns> /// <returns></returns>
public List<RB_Student_BackRelevance_ViewModel> GetStudentBackRelevanceListRepository(RB_Student_BackRelevance_ViewModel query) public List<RB_Education_Relevance_ViewModel> GetStudentBackRelevanceListRepository(RB_Education_Relevance_ViewModel query)
{ {
StringBuilder builder = new StringBuilder(); StringBuilder builder = new StringBuilder();
builder.AppendFormat(@" builder.AppendFormat(@"
SELECT * SELECT *
FROM RB_Student_BackRelevance FROM RB_Education_Relevance
WHERE 1=1 WHERE 1=1
"); ");
if (query != null) if (query != null)
{ {
if (query.ConditionId > 0) if (query.ConditionId > 0)
{ {
builder.AppendFormat(" AND {0}={1} ", nameof(RB_Student_BackRelevance_ViewModel.ConditionId), query.ConditionId); builder.AppendFormat(" AND {0}={1} ", nameof(RB_Education_Relevance_ViewModel.ConditionId), query.ConditionId);
} }
} }
builder.AppendFormat(" ORDER BY Sort ASC "); builder.AppendFormat(" ORDER BY Sort ASC ");
return Get<RB_Student_BackRelevance_ViewModel>(builder.ToString()).ToList(); return Get<RB_Education_Relevance_ViewModel>(builder.ToString()).ToList();
} }
} }
} }
\ No newline at end of file
...@@ -115,8 +115,12 @@ namespace Edu.WebApi.Controllers.Course ...@@ -115,8 +115,12 @@ namespace Edu.WebApi.Controllers.Course
var SpecialNode = base.ParmJObj.GetInt("SpecialNode"); var SpecialNode = base.ParmJObj.GetInt("SpecialNode");
//抄送人 //抄送人
string RecipientIds = base.ParmJObj.GetStringValue("RecipientIds"); string RecipientIds = base.ParmJObj.GetStringValue("RecipientIds");
var flag = studentBillModule.SetBackBillAduitModule(BackId, AuditStatus, Description, base.UserInfo,out string message, SpecialNode: SpecialNode, BackMoney: BackMoney, RecipientIds: RecipientIds);
return flag ? ApiResult.Success(message: message) : ApiResult.Failed(message: message);
//var flag = studentBillModule.SetBackBillAduitModule(BackId, AuditStatus, Description, base.UserInfo, out string message, SpecialNode: SpecialNode, BackMoney: BackMoney, RecipientIds: RecipientIds);
//return flag ? ApiResult.Success(message: message) : ApiResult.Failed(message: message);
return ApiResult.Failed();
} }
/// <summary> /// <summary>
......
...@@ -531,6 +531,7 @@ namespace Edu.WebApi.Controllers.Duty ...@@ -531,6 +531,7 @@ namespace Edu.WebApi.Controllers.Duty
item.Evaluate, item.Evaluate,
item.VisitTimes, item.VisitTimes,
item.Remark, item.Remark,
item.Age,
CreateTimeStr = Common.ConvertHelper.FormatDate(item.CreateTime) CreateTimeStr = Common.ConvertHelper.FormatDate(item.CreateTime)
}); });
} }
...@@ -559,7 +560,8 @@ namespace Edu.WebApi.Controllers.Duty ...@@ -559,7 +560,8 @@ namespace Edu.WebApi.Controllers.Duty
PlanId = base.ParmJObj.GetInt("PlanId"), PlanId = base.ParmJObj.GetInt("PlanId"),
Remark = base.ParmJObj.GetStringValue("Remark"), Remark = base.ParmJObj.GetStringValue("Remark"),
Evaluate = base.ParmJObj.GetStringValue("Evaluate"), Evaluate = base.ParmJObj.GetStringValue("Evaluate"),
VisitorStatus = base.ParmJObj.GetInt("VisitorStatus") VisitorStatus = base.ParmJObj.GetInt("VisitorStatus"),
Age=base.ParmJObj.GetInt("Age"),
}; };
model.Group_Id = base.UserInfo.Group_Id; model.Group_Id = base.UserInfo.Group_Id;
model.Status = Common.Enum.DateStateEnum.Normal; model.Status = Common.Enum.DateStateEnum.Normal;
......
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