Commit c1137338 authored by 黄奎's avatar 黄奎

页面修改

parent fd4ccea0
...@@ -2615,7 +2615,7 @@ namespace Edu.Module.Course ...@@ -2615,7 +2615,7 @@ namespace Edu.Module.Course
//{ //{
// item.UseClassHours = (int)Math.Ceiling(Convert.ToDecimal(stuModel?.MinutesNum ?? 0) / configModel.BasicMinutes);// 已上课时 (暂时向上取整) // item.UseClassHours = (int)Math.Ceiling(Convert.ToDecimal(stuModel?.MinutesNum ?? 0) / configModel.BasicMinutes);// 已上课时 (暂时向上取整)
//} //}
item.UseClassHours = Convert.ToInt32(stuModel?.CurrentDeductionHours ?? 0); item.UseClassHours = (stuModel?.CurrentDeductionHours ?? 0);
item.Unit_Price = 0; item.Unit_Price = 0;
item.UseCourseFee = 0; item.UseCourseFee = 0;
if (item.TotalClassHours > 0) if (item.TotalClassHours > 0)
......
...@@ -7,12 +7,14 @@ using Edu.Common.Plugin; ...@@ -7,12 +7,14 @@ using Edu.Common.Plugin;
using Edu.Model.CacheModel; using Edu.Model.CacheModel;
using Edu.Model.Entity.BackClass; using Edu.Model.Entity.BackClass;
using Edu.Model.Entity.Course; using Edu.Model.Entity.Course;
using Edu.Model.ViewModel.Contract;
using Edu.Model.ViewModel.Course; using Edu.Model.ViewModel.Course;
using Edu.Model.ViewModel.Finance; using Edu.Model.ViewModel.Finance;
using Edu.Model.ViewModel.Grade; using Edu.Model.ViewModel.Grade;
using Edu.Model.ViewModel.Sell; using Edu.Model.ViewModel.Sell;
using Edu.Model.ViewModel.User; using Edu.Model.ViewModel.User;
using Edu.Repository.BackClass; using Edu.Repository.BackClass;
using Edu.Repository.Contract;
using Edu.Repository.Course; using Edu.Repository.Course;
using Edu.Repository.Finance; using Edu.Repository.Finance;
using Edu.Repository.Flow; using Edu.Repository.Flow;
...@@ -89,6 +91,11 @@ namespace Edu.Module.Course ...@@ -89,6 +91,11 @@ namespace Edu.Module.Course
/// </summary> /// </summary>
private readonly RB_Course_PreferentialRepository course_PreferentialRepository = new RB_Course_PreferentialRepository(); private readonly RB_Course_PreferentialRepository course_PreferentialRepository = new RB_Course_PreferentialRepository();
/// <summary>
/// 退课协议仓储层对象
/// </summary>
private readonly RB_BackClass_ProtocolRepository backClass_ProtocolRepository = new RB_BackClass_ProtocolRepository();
/// <summary> /// <summary>
/// 计算学员退课金额 /// 计算学员退课金额
/// </summary> /// </summary>
...@@ -140,6 +147,10 @@ namespace Edu.Module.Course ...@@ -140,6 +147,10 @@ namespace Edu.Module.Course
public string SetStudentBackFinance(int backClassId, int IsPublic, int CurrencyId, int clientType, int clientId, UserInfo userInfo) public string SetStudentBackFinance(int backClassId, int IsPublic, int CurrencyId, int clientType, int clientId, UserInfo userInfo)
{ {
var backModel = student_BackClassRepository.GetEntity(backClassId); var backModel = student_BackClassRepository.GetEntity(backClassId);
var BackClassProtocolModel = backClass_ProtocolRepository.GetBackClassProtocolListRepository(new RB_BackClass_Protocol_ViewModel()
{
BackId = backClassId
})?.FirstOrDefault();
if (backModel == null || backModel.AuditStatus != WFRrocessStatus.AuditThrough) { return "退课流程未审核通过"; } if (backModel == null || backModel.AuditStatus != WFRrocessStatus.AuditThrough) { return "退课流程未审核通过"; }
if (backModel.FinanceId > 0) { return "已制单,无法再次生成财务单据"; } if (backModel.FinanceId > 0) { return "已制单,无法再次生成财务单据"; }
var guestModel = order_GuestRepository.GetEntity(backModel.GuestId); var guestModel = order_GuestRepository.GetEntity(backModel.GuestId);
...@@ -164,6 +175,9 @@ namespace Edu.Module.Course ...@@ -164,6 +175,9 @@ namespace Edu.Module.Course
string Remark = backModel.ApplyReason+ "【" + (classModel?.ClassName ?? "") + "】下,订单" + backModel.OrderId + " 客人退课"; string Remark = backModel.ApplyReason+ "【" + (classModel?.ClassName ?? "") + "】下,订单" + backModel.OrderId + " 客人退课";
var financeObj = new var financeObj = new
{ {
OtherType = 28,
ReFinanceId = backClassId,
ReFinanceId2 = BackClassProtocolModel?.Id ?? 0,
IsPublic, IsPublic,
ClientType = clientType, ClientType = clientType,
ClientID = clientId, ClientID = clientId,
...@@ -174,8 +188,6 @@ namespace Edu.Module.Course ...@@ -174,8 +188,6 @@ namespace Edu.Module.Course
OrderSource = 17, OrderSource = 17,
OrderID = backModel.OrderId, OrderID = backModel.OrderId,
TCIDList = new List<int>() { backModel.ClassId }, TCIDList = new List<int>() { backModel.ClassId },
OtherType = 28,
ReFinanceId = backModel.BackId,
Remark, Remark,
detailList, detailList,
CreateBy = userInfo.Id, CreateBy = userInfo.Id,
...@@ -193,7 +205,6 @@ namespace Edu.Module.Course ...@@ -193,7 +205,6 @@ namespace Edu.Module.Course
{ {
msg = sign msg = sign
}; };
string apiResult = HttpHelper.HttpPost(Config.ReadConfigKey("PaymentFinanceApi"), JsonHelper.Serialize(resultInfo), ""); string apiResult = HttpHelper.HttpPost(Config.ReadConfigKey("PaymentFinanceApi"), JsonHelper.Serialize(resultInfo), "");
JObject parmsJob = JObject.Parse(apiResult); JObject parmsJob = JObject.Parse(apiResult);
string resultCode = parmsJob.GetStringValue("resultCode"); string resultCode = parmsJob.GetStringValue("resultCode");
......
...@@ -29,7 +29,13 @@ WHERE 1=1 ...@@ -29,7 +29,13 @@ WHERE 1=1
"); ");
if (query != null) if (query != null)
{ {
if (query.BackId > 0)
{
if (query.QCreateBy > 0)
{
builder.AppendFormat(@" AND A.{0}={1} ", nameof(RB_BackClass_Protocol_ViewModel.BackId), query.BackId);
}
}
} }
return Get<RB_BackClass_Protocol_ViewModel>(builder.ToString()).ToList(); return Get<RB_BackClass_Protocol_ViewModel>(builder.ToString()).ToList();
} }
......
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