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

配置文件修改

parent 8beb4a17
......@@ -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>
/// okr关注事项配置
......
......@@ -62,6 +62,12 @@ namespace Edu.Common.Enum.Finance
/// 投稿审批
/// </summary>
[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;
using Edu.Model.Entity.EduTask;
using Edu.Model.ViewModel.BackClass;
using Edu.Model.ViewModel.Contract;
using Edu.Model.ViewModel.Course;
using Edu.Model.ViewModel.EduTask;
using Edu.Model.ViewModel.Exam;
using Edu.Model.ViewModel.Grade;
......@@ -141,6 +142,11 @@ namespace Edu.Module.EduTask
/// </summary>
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>
/// 获取教务单据分页列表
......@@ -197,6 +203,10 @@ namespace Edu.Module.EduTask
List<RB_Examination_Paper_ViewModel> ExaminationPaperList = new List<RB_Examination_Paper_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 });
string Ids = string.Join(",", list.Select(qitem => qitem.Id));
var recordList = education_RecordRepository.GetEducationRecordListRepository(new RB_Education_Record_ViewModel()
......@@ -460,7 +470,6 @@ namespace Edu.Module.EduTask
}
#endregion
#region 组卷审批
if (subItem.ReceiptType == Common.Enum.Finance.ReceiptTypeEnum.ZuJuan)
{
......@@ -539,6 +548,17 @@ namespace Edu.Module.EduTask
}
}
#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)
......@@ -675,6 +695,12 @@ namespace Edu.Module.EduTask
}
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();
if (item.VerifyStatus == EduTaskRrocessStatus.NotAudit || item.VerifyStatus == EduTaskRrocessStatus.AuditIng)
{
......
......@@ -33,17 +33,7 @@ namespace Edu.Module.EduTask
/// 订单学员仓储层对象
/// </summary>
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>
/// 定时处理停课申请生效日期以及学员的上课状态
......@@ -66,7 +56,6 @@ namespace Edu.Module.EduTask
return true;
}
/// <summary>
/// 新增修改停课申请
/// </summary>
......@@ -122,9 +111,5 @@ namespace Edu.Module.EduTask
}
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
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)
{
message = "未配置审核流程!";
......
......@@ -33,6 +33,12 @@ namespace Edu.WebApi.Controllers.EduTask
/// 班级处理类对象
/// </summary>
private readonly ClassModule classModule = AOP.AOPHelper.CreateAOPObject<ClassModule>();
/// <summary>
/// Vip课程申请处理类
/// </summary>
private readonly CourseVipModule courseVipModule = AOP.AOPHelper.CreateAOPObject<CourseVipModule>();
/// <summary>
/// 新增修改班级调课
/// </summary>
......@@ -47,7 +53,7 @@ namespace Edu.WebApi.Controllers.EduTask
CourseId = base.ParmJObj.GetInt("CourseId"),
OrderGuestId = base.ParmJObj.GetInt("OrderGuestId"),
Remarks = base.ParmJObj.GetStringValue("Remarks"),
OldStudentStatus= base.ParmJObj.GetInt("OldStudentStatus")
OldStudentStatus = base.ParmJObj.GetInt("OldStudentStatus")
};
var classModel = classModule.GetClassModule(model.ClassId);
string receiptFile = string.Empty;
......@@ -73,8 +79,7 @@ namespace Edu.WebApi.Controllers.EduTask
{
Common.Plugin.LogHelper.Write(ex, "SetStudentStopClass");
}
if (model.Id == 0)
{
model.CreateBy = base.UserInfo.Id;
......@@ -89,15 +94,33 @@ namespace Edu.WebApi.Controllers.EduTask
return flag ? ApiResult.Success() : ApiResult.Failed();
}
//public ApiResult TestUpdateClassPlan()
//{
// int id = base.ParmJObj.GetInt("Id");
// var result = changeClassPlanModule.UpdateChangeClassPlan(id);
// return ApiResult.Success("");
//}
/// <summary>
/// 新增修改Vip课程申请
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult SetVipCourseApply()
{
var model = new RB_Course_Vip_Extend()
{
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 @@
//投稿审批流程编号
"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