Commit a872dad4 authored by 黄奎's avatar 黄奎

页面修改

parent 5dd93d2f
......@@ -65,5 +65,10 @@ namespace Edu.Model.ViewModel.EduTask
/// 查询生效时间
/// </summary>
public string QEffectiveDate { get; set; }
/// <summary>
/// 关联单号
/// </summary>
public int RelationId { get; set; }
}
}
......@@ -9,6 +9,7 @@ using Edu.Model.Entity.BackClass;
using Edu.Model.Entity.Course;
using Edu.Model.ViewModel.Contract;
using Edu.Model.ViewModel.Course;
using Edu.Model.ViewModel.EduTask;
using Edu.Model.ViewModel.Finance;
using Edu.Model.ViewModel.Grade;
using Edu.Model.ViewModel.Sell;
......@@ -16,6 +17,7 @@ using Edu.Model.ViewModel.User;
using Edu.Repository.BackClass;
using Edu.Repository.Contract;
using Edu.Repository.Course;
using Edu.Repository.EduTask;
using Edu.Repository.Finance;
using Edu.Repository.Flow;
using Edu.Repository.Grade;
......@@ -96,6 +98,11 @@ namespace Edu.Module.Course
/// </summary>
private readonly RB_BackClass_ProtocolRepository backClass_ProtocolRepository = new RB_BackClass_ProtocolRepository();
/// <summary>
/// 业务单据仓储层对象
/// </summary>
private readonly RB_Education_ReceiptRepository education_ReceiptRepository = new RB_Education_ReceiptRepository();
/// <summary>
/// 计算学员退课金额
/// </summary>
......@@ -151,6 +158,11 @@ namespace Edu.Module.Course
{
BackId = backClassId
})?.FirstOrDefault();
var eduReceipt = education_ReceiptRepository.GetEducationReceiptListRepository(new EducationReceiptQuery()
{
ReceiptType = 2,
RelationId= backClassId
})?.FirstOrDefault();
if (backModel == null || backModel.AuditStatus != WFRrocessStatus.AuditThrough) { return "退课流程未审核通过"; }
if (backModel.FinanceId > 0) { return "已制单,无法再次生成财务单据"; }
var guestModel = order_GuestRepository.GetEntity(backModel.GuestId);
......@@ -176,7 +188,7 @@ namespace Edu.Module.Course
var financeObj = new
{
OtherType = 28,
ReFinanceId = backClassId,
ReFinanceId = eduReceipt?.Id ?? 0,
ReFinanceId2 = BackClassProtocolModel?.Id ?? 0,
IsPublic,
ClientType = clientType,
......
......@@ -171,6 +171,10 @@ WHERE 1=1
{
builder.AppendFormat(@" AND A.{0} IN ({1}) ", nameof(RB_Education_Receipt_ViewModel.Id), query.QIds);
}
if (query.RelationId>0)
{
builder.AppendFormat(@" AND A.{0} IN ({1}) ", nameof(RB_Education_Receipt_ViewModel.RelationId), query.RelationId);
}
if (!string.IsNullOrEmpty(query.Title))
{
builder.AppendFormat(@" AND A.{0} LIKE @Title ", nameof(RB_Education_Receipt_ViewModel.Title));
......
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