Commit 05403aa7 authored by 黄奎's avatar 黄奎

配置文件修改

parent 8beb4a17
...@@ -486,6 +486,18 @@ namespace Edu.Common ...@@ -486,6 +486,18 @@ namespace Edu.Common
} }
} }
/// <summary>
/// VIP课程申请流程编号
/// </summary>
public static int VipCourseFlowId
{
get
{
int.TryParse(ReadConfigKey("VipCourseFlowId"), out int VipCourseFlowId);
return VipCourseFlowId;
}
}
/// <summary> /// <summary>
/// okr关注事项配置 /// okr关注事项配置
......
...@@ -62,6 +62,12 @@ namespace Edu.Common.Enum.Finance ...@@ -62,6 +62,12 @@ namespace Edu.Common.Enum.Finance
/// 投稿审批 /// 投稿审批
/// </summary> /// </summary>
[EnumField("投稿审批")] [EnumField("投稿审批")]
Contribute = 10 Contribute = 10,
/// <summary>
/// 投稿审批
/// </summary>
[EnumField("VIP课程申请")]
VipCourse = 11
} }
} }
using System;
using VT.FW.DB;
namespace Edu.Model.Entity.Course
{
/// <summary>
/// Vip课程申请实体类
/// </summary>
[Serializable]
[DB(ConnectionName = "DefaultConnection")]
public class RB_Course_Vip
{
/// <summary>
/// 主键编号
/// </summary>
public int Id { get; set; }
/// <summary>
/// 分类
/// </summary>
public int CateId { get; set; }
/// <summary>
/// 课程名称
/// </summary>
public string CourseName { get; set; }
/// <summary>
/// 总课时
/// </summary>
public int TotalHour { get; set; }
/// <summary>
/// 上课时段
/// </summary>
public int CourseTimeId { get; set; }
/// <summary>
/// 价格
/// </summary>
public decimal CoursePrice { get; set; }
/// <summary>
/// 集团编号
/// </summary>
public int Group_Id { get; set; }
/// <summary>
/// 学校编号
/// </summary>
public int School_Id { get; set; }
/// <summary>
/// 创建人
/// </summary>
public int CreateBy { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public DateTime CreateTime { get; set; }
/// <summary>
/// 修改人
/// </summary>
public int UpdateBy { get; set; }
/// <summary>
/// 更新时间
/// </summary>
public DateTime UpdateTime { get; set; }
/// <summary>
/// 审核状态
/// </summary>
public Common.Enum.User.WFRrocessStatus AuditStatus { get; set; }
/// <summary>
/// 申请备注
/// </summary>
public string Remarks { get; set; }
/// <summary>
/// 学员编号
/// </summary>
public int StuId { get; set; }
}
}
using Edu.Model.Entity.Course;
using System;
using System.Collections.Generic;
using System.Text;
namespace Edu.Model.ViewModel.Course
{
/// <summary>
/// Vip课程申请扩展实体类
/// </summary>
public class RB_Course_Vip_Extend : RB_Course_Vip
{
/// <summary>
/// Vip课程申请编号
/// </summary>
public string QCourseVips { get; set;}
/// <summary>
/// 学员姓名
/// </summary>
public string StuName { get; set; }
/// <summary>
/// 上课时段
/// </summary>
public string CourseTimeName { get; set; }
}
}
using Edu.AOP.CustomerAttribute;
using Edu.Model.Entity.EduTask;
using Edu.Model.ViewModel.Course;
using Edu.Repository.Course;
using Edu.Repository.EduTask;
using System;
using System.Collections.Generic;
using System.Text;
using VT.FW.DB;
namespace Edu.Module.EduTask
{
public class CourseVipModule
{
/// <summary>
/// VIP课程申请仓储层
/// </summary>
private readonly RB_Course_VipRepository course_VipRepository = new RB_Course_VipRepository();
/// <summary>
/// 教务单据仓储层对象
/// </summary>
private readonly RB_Education_ReceiptRepository education_ReceiptRepository = new RB_Education_ReceiptRepository();
/// <summary>
/// 新增修改停课申请
/// </summary>
/// <returns></returns>
[TransactionCallHandler]
public virtual bool SetCourseVipModule(RB_Course_Vip_Extend extModel,out string message)
{
message = "";
bool flag = false;
if (extModel.Id > 0)
{
Dictionary<string, object> fileds = new Dictionary<string, object>()
{
{nameof(RB_Course_Vip_Extend.CourseName),extModel.CourseName },
{nameof(RB_Course_Vip_Extend.Remarks),extModel.Remarks },
};
flag = course_VipRepository.Update(fileds, new WhereHelper(nameof(RB_Course_Vip_Extend.Id), extModel.Id));
}
else
{
var newId = course_VipRepository.Insert(extModel);
extModel.Id = newId;
flag = newId > 0;
if (flag)
{
var educationReceipt = new RB_Education_Receipt()
{
Id = 0,
Title = "Vip课程申请",
ReceiptType = Common.Enum.Finance.ReceiptTypeEnum.VipCourse,
RelationId = newId,
ClassId = 0,
Group_Id = extModel.Group_Id,
School_Id = extModel.School_Id,
CreateBy = extModel.CreateBy,
CreateTime = extModel.CreateTime,
UpdateBy = extModel.UpdateBy,
UpdateTime = extModel.UpdateTime,
VerifyStatus = Common.Enum.EduTask.EduTaskRrocessStatus.NotAudit,
ReceiptFile = ""
};
flag = education_ReceiptRepository.SetEducationReceiptRepository(educationReceipt, out message);
}
}
return flag;
}
}
}
...@@ -8,6 +8,7 @@ using Edu.Model.CacheModel; ...@@ -8,6 +8,7 @@ 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.Contract; using Edu.Model.ViewModel.Contract;
using Edu.Model.ViewModel.Course;
using Edu.Model.ViewModel.EduTask; using Edu.Model.ViewModel.EduTask;
using Edu.Model.ViewModel.Exam; using Edu.Model.ViewModel.Exam;
using Edu.Model.ViewModel.Grade; using Edu.Model.ViewModel.Grade;
...@@ -141,6 +142,11 @@ namespace Edu.Module.EduTask ...@@ -141,6 +142,11 @@ namespace Edu.Module.EduTask
/// </summary> /// </summary>
private readonly RB_Contribute_MediumRepository contribute_MediumRepository = new RB_Contribute_MediumRepository(); private readonly RB_Contribute_MediumRepository contribute_MediumRepository = new RB_Contribute_MediumRepository();
/// <summary>
/// Vip课程申请仓储层对象
/// </summary>
private readonly RB_Course_VipRepository course_VipRepository = new RB_Course_VipRepository();
/// <summary> /// <summary>
/// 获取教务单据分页列表 /// 获取教务单据分页列表
...@@ -197,6 +203,10 @@ namespace Edu.Module.EduTask ...@@ -197,6 +203,10 @@ namespace Edu.Module.EduTask
List<RB_Examination_Paper_ViewModel> ExaminationPaperList = new List<RB_Examination_Paper_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>(); List<RB_Examination_Publish_ViewModel> ExaminationPublishList = new List<RB_Examination_Publish_ViewModel>();
//vip课程申请
List<RB_Course_Vip_Extend> vipCourseApplyList = new List<RB_Course_Vip_Extend>();
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()
...@@ -460,7 +470,6 @@ namespace Edu.Module.EduTask ...@@ -460,7 +470,6 @@ namespace Edu.Module.EduTask
} }
#endregion #endregion
#region 组卷审批 #region 组卷审批
if (subItem.ReceiptType == Common.Enum.Finance.ReceiptTypeEnum.ZuJuan) if (subItem.ReceiptType == Common.Enum.Finance.ReceiptTypeEnum.ZuJuan)
{ {
...@@ -539,6 +548,17 @@ namespace Edu.Module.EduTask ...@@ -539,6 +548,17 @@ namespace Edu.Module.EduTask
} }
} }
#endregion #endregion
#region Vip课程申请
if (subItem.ReceiptType == Common.Enum.Finance.ReceiptTypeEnum.VipCourse)
{
string vipCourseIds = string.Join(",", list.Where(qitem => qitem.ReceiptType == subItem.ReceiptType).Select(qitem => qitem.RelationId));
vipCourseApplyList = course_VipRepository.GetCourseVipListRepository(new RB_Course_Vip_Extend()
{
QCourseVips= vipCourseIds
});
}
#endregion
} }
foreach (var item in list) foreach (var item in list)
...@@ -675,6 +695,12 @@ namespace Edu.Module.EduTask ...@@ -675,6 +695,12 @@ namespace Edu.Module.EduTask
} }
DataObj = touGao; DataObj = touGao;
} }
if (item.ReceiptType == Common.Enum.Finance.ReceiptTypeEnum.VipCourse)
{
var vipCourse = vipCourseApplyList?.Where(x => x.Id == item.RelationId)?.FirstOrDefault();
DataObj = vipCourse;
}
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)
{ {
......
...@@ -34,16 +34,6 @@ namespace Edu.Module.EduTask ...@@ -34,16 +34,6 @@ namespace Edu.Module.EduTask
/// </summary> /// </summary>
private readonly RB_Order_GuestRepository order_GuestRepository = new RB_Order_GuestRepository(); private readonly RB_Order_GuestRepository order_GuestRepository = new RB_Order_GuestRepository();
/// <summary>
/// 获取调课计划列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public List<RB_Student_StopClass_ViewModel> GetStudentStopClassListRepository(RB_Student_StopClass_ViewModel query)
{
return student_StopClassRepository.GetStudentStopClassListRepository(query);
}
/// <summary> /// <summary>
/// 定时处理停课申请生效日期以及学员的上课状态 /// 定时处理停课申请生效日期以及学员的上课状态
...@@ -66,7 +56,6 @@ namespace Edu.Module.EduTask ...@@ -66,7 +56,6 @@ namespace Edu.Module.EduTask
return true; return true;
} }
/// <summary> /// <summary>
/// 新增修改停课申请 /// 新增修改停课申请
/// </summary> /// </summary>
...@@ -122,9 +111,5 @@ namespace Edu.Module.EduTask ...@@ -122,9 +111,5 @@ namespace Edu.Module.EduTask
} }
return flag; return flag;
} }
} }
} }
using Edu.Model.Entity.Course;
using Edu.Model.ViewModel.Course;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Edu.Repository.Course
{
/// <summary>
/// Vip课程申请仓储层
/// </summary>
public class RB_Course_VipRepository : BaseRepository<RB_Course_Vip>
{
/// <summary>
/// 获取Vip课程申请列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public List<RB_Course_Vip_Extend> GetCourseVipListRepository(RB_Course_Vip_Extend query)
{
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@"
SELECT A.* ,IFNULL(B.StuName,'') AS StuName,IFNULL(C.Name,'') AS CourseTimeName
FROM RB_Course_Vip AS A LEFT JOIN RB_student AS B ON A.StuId=B.StuId
LEFT JOIN RB_Scroll_CourseTime AS C ON A.CourseTimeId=C.Id
WHERE 1=1
");
if (query != null)
{
if (query.Group_Id > 0)
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Course_Vip_Extend.Group_Id), query.Group_Id);
}
}
return Get<RB_Course_Vip_Extend>(builder.ToString()).ToList();
}
}
}
...@@ -399,6 +399,15 @@ WHERE 1=1 ...@@ -399,6 +399,15 @@ WHERE 1=1
return false; return false;
} }
} }
else if (model.ReceiptType == Common.Enum.Finance.ReceiptTypeEnum.VipCourse)
{
flowModel = flowRepository.GetFlowRepository(Common.Config.VipCourseFlowId);
if (flowModel == null)
{
message = "未配置VIP课程申请流程!";
return false;
}
}
if (flowModel?.FlowNodeList?.Count == 0) if (flowModel?.FlowNodeList?.Count == 0)
{ {
message = "未配置审核流程!"; message = "未配置审核流程!";
......
...@@ -33,6 +33,12 @@ namespace Edu.WebApi.Controllers.EduTask ...@@ -33,6 +33,12 @@ namespace Edu.WebApi.Controllers.EduTask
/// 班级处理类对象 /// 班级处理类对象
/// </summary> /// </summary>
private readonly ClassModule classModule = AOP.AOPHelper.CreateAOPObject<ClassModule>(); private readonly ClassModule classModule = AOP.AOPHelper.CreateAOPObject<ClassModule>();
/// <summary>
/// Vip课程申请处理类
/// </summary>
private readonly CourseVipModule courseVipModule = AOP.AOPHelper.CreateAOPObject<CourseVipModule>();
/// <summary> /// <summary>
/// 新增修改班级调课 /// 新增修改班级调课
/// </summary> /// </summary>
...@@ -47,7 +53,7 @@ namespace Edu.WebApi.Controllers.EduTask ...@@ -47,7 +53,7 @@ namespace Edu.WebApi.Controllers.EduTask
CourseId = base.ParmJObj.GetInt("CourseId"), CourseId = base.ParmJObj.GetInt("CourseId"),
OrderGuestId = base.ParmJObj.GetInt("OrderGuestId"), OrderGuestId = base.ParmJObj.GetInt("OrderGuestId"),
Remarks = base.ParmJObj.GetStringValue("Remarks"), Remarks = base.ParmJObj.GetStringValue("Remarks"),
OldStudentStatus= base.ParmJObj.GetInt("OldStudentStatus") OldStudentStatus = base.ParmJObj.GetInt("OldStudentStatus")
}; };
var classModel = classModule.GetClassModule(model.ClassId); var classModel = classModule.GetClassModule(model.ClassId);
string receiptFile = string.Empty; string receiptFile = string.Empty;
...@@ -74,7 +80,6 @@ namespace Edu.WebApi.Controllers.EduTask ...@@ -74,7 +80,6 @@ namespace Edu.WebApi.Controllers.EduTask
Common.Plugin.LogHelper.Write(ex, "SetStudentStopClass"); Common.Plugin.LogHelper.Write(ex, "SetStudentStopClass");
} }
if (model.Id == 0) if (model.Id == 0)
{ {
model.CreateBy = base.UserInfo.Id; model.CreateBy = base.UserInfo.Id;
...@@ -89,15 +94,33 @@ namespace Edu.WebApi.Controllers.EduTask ...@@ -89,15 +94,33 @@ namespace Edu.WebApi.Controllers.EduTask
return flag ? ApiResult.Success() : ApiResult.Failed(); return flag ? ApiResult.Success() : ApiResult.Failed();
} }
/// <summary>
/// 新增修改Vip课程申请
/// </summary>
//public ApiResult TestUpdateClassPlan() /// <returns></returns>
//{ [HttpPost]
public ApiResult SetVipCourseApply()
// int id = base.ParmJObj.GetInt("Id"); {
// var result = changeClassPlanModule.UpdateChangeClassPlan(id); var model = new RB_Course_Vip_Extend()
// return ApiResult.Success(""); {
//} Id = base.ParmJObj.GetInt("Id"),
CateId = base.ParmJObj.GetInt("CateId"),
CourseName = base.ParmJObj.GetStringValue("CourseName"),
TotalHour = base.ParmJObj.GetInt("TotalHour"),
CourseTimeId = base.ParmJObj.GetInt("CourseTimeId"),
CoursePrice = base.ParmJObj.GetDecimal("CoursePrice"),
Remarks=base.ParmJObj.GetStringValue("Remarks"),
StuId=base.ParmJObj.GetInt("StuId"),
};
model.Group_Id = base.UserInfo.Group_Id;
model.School_Id = base.UserInfo.School_Id;
model.CreateBy = base.UserInfo.Id;
model.CreateTime = DateTime.Now;
model.UpdateBy = base.UserInfo.Id;
model.UpdateTime = DateTime.Now;
model.AuditStatus = Common.Enum.User.WFRrocessStatus.NotAudit;
bool flag = courseVipModule.SetCourseVipModule(model, out string message);
return flag ? ApiResult.Success() : ApiResult.Failed(message: message);
}
} }
} }
\ No newline at end of file
...@@ -116,5 +116,7 @@ ...@@ -116,5 +116,7 @@
//投稿审批流程编号 //投稿审批流程编号
"ContributeFlowId": 10, "ContributeFlowId": 10,
//新业绩提成启用时间 //新业绩提成启用时间
"NewAchievementsEnable": "2022-01-01" "NewAchievementsEnable": "2022-01-01",
//Vip课程申请流程编号
"VipCourseFlowId": 11
} }
\ 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