Commit 8cd82dda authored by 黄奎's avatar 黄奎

页面修改

parent 2644c67a
...@@ -83,8 +83,9 @@ namespace Edu.Model.ViewModel.BackClass ...@@ -83,8 +83,9 @@ namespace Edu.Model.ViewModel.BackClass
/// </summary> /// </summary>
public string ProtocolNum { get; set; } public string ProtocolNum { get; set; }
/// <summary>
/// 是否盖章
/// </summary>
public int IsCompanySeal { get; set; } public int IsCompanySeal { get; set; }
} }
} }
...@@ -20,6 +20,11 @@ namespace Edu.Model.ViewModel.Contract ...@@ -20,6 +20,11 @@ namespace Edu.Model.ViewModel.Contract
/// </summary> /// </summary>
public int QCreateBy { get; set; } public int QCreateBy { get; set; }
/// <summary>
/// 退课编号
/// </summary>
public string QBackIds { get; set; }
/// <summary> /// <summary>
/// 订单编号 /// 订单编号
/// </summary> /// </summary>
...@@ -107,6 +112,11 @@ namespace Edu.Model.ViewModel.Contract ...@@ -107,6 +112,11 @@ namespace Edu.Model.ViewModel.Contract
/// </summary> /// </summary>
public string BackAccount { get; set; } public string BackAccount { get; set; }
/// <summary>
/// 学员编号
/// </summary>
public int GuestId { get; set; }
/// <summary> /// <summary>
/// 合同章图片 /// 合同章图片
/// </summary> /// </summary>
......
...@@ -95,6 +95,11 @@ namespace Edu.Module.Course ...@@ -95,6 +95,11 @@ 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 StudentBillModule studentBillModule = new StudentBillModule();
/// <summary> /// <summary>
/// 获取学员信息 /// 获取学员信息
/// </summary> /// </summary>
...@@ -790,15 +795,16 @@ namespace Edu.Module.Course ...@@ -790,15 +795,16 @@ namespace Edu.Module.Course
} }
/// <summary> /// <summary>
/// 退课协议,销售确认 /// 退课协议,销售确认【0826新增生成财务单据】
/// </summary> /// </summary>
/// <param name="Id">协议编号</param> /// <param name="Id">协议编号</param>
/// <param name="IsSure">是否销售确认(1-是)</param> /// <param name="IsSure">是否销售确认(1-是)</param>
/// <returns></returns> /// <returns></returns>
[TransactionCallHandler] [TransactionCallHandler]
public virtual bool SetBackClassProtocolSureModule(int Id, int IsSure) public virtual bool SetBackClassProtocolSureModule(int Id, int IsSure,int ClientId, UserInfo user,out string message)
{ {
bool flag = false; bool flag = false;
message = "";
var extModel = backClass_ProtocolRepository.GetEntity<RB_BackClass_Protocol_ViewModel>(Id); var extModel = backClass_ProtocolRepository.GetEntity<RB_BackClass_Protocol_ViewModel>(Id);
if (extModel != null && extModel.Id > 0) if (extModel != null && extModel.Id > 0)
{ {
...@@ -821,10 +827,17 @@ namespace Edu.Module.Course ...@@ -821,10 +827,17 @@ namespace Edu.Module.Course
}; };
flag = backClass_ProtocolRepository.Update(keyValues, new WhereHelper(nameof(RB_BackClass_Protocol_ViewModel.Id), Id)); flag = backClass_ProtocolRepository.Update(keyValues, new WhereHelper(nameof(RB_BackClass_Protocol_ViewModel.Id), Id));
} }
if (flag)
{
message= studentBillModule.SetStudentBackFinance(Convert.ToInt32(extModel.BackId), ClientId, user);
if (!string.IsNullOrEmpty(message))
{
flag = false;
}
}
return flag; return flag;
} }
/// <summary> /// <summary>
/// 根据学生id获取学生的有效合同信息 /// 根据学生id获取学生的有效合同信息
/// </summary> /// </summary>
......
...@@ -149,14 +149,14 @@ namespace Edu.Module.Course ...@@ -149,14 +149,14 @@ namespace Edu.Module.Course
/// 退课一键制单 /// 退课一键制单
/// </summary> /// </summary>
/// <param name="backClassId"></param> /// <param name="backClassId"></param>
/// <param name="IsPublic"></param>
/// <param name="CurrencyId"></param>
/// <param name="clientType"></param>
/// <param name="clientId"></param> /// <param name="clientId"></param>
/// <param name="userInfo"></param> /// <param name="userInfo"></param>
/// <returns></returns> /// <returns></returns>
public string SetStudentBackFinance(int backClassId, int IsPublic, int CurrencyId, int clientType, int clientId, UserInfo userInfo) public string SetStudentBackFinance(int backClassId, int clientId, UserInfo userInfo)
{ {
int IsPublic = 1;// //公账、私账(默认工作)
int CurrencyId = 21; //币种(默认人民币)
int clientType = 10;
var backModel = student_BackClassRepository.GetEntity(backClassId); var backModel = student_BackClassRepository.GetEntity(backClassId);
var BackClassProtocolModel = backClass_ProtocolRepository.GetBackClassProtocolListRepository(new RB_BackClass_Protocol_ViewModel() var BackClassProtocolModel = backClass_ProtocolRepository.GetBackClassProtocolListRepository(new RB_BackClass_Protocol_ViewModel()
{ {
......
...@@ -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.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.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;
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.EduTask; using Edu.Repository.EduTask;
using Edu.Repository.Exam; using Edu.Repository.Exam;
...@@ -123,6 +125,11 @@ namespace Edu.Module.EduTask ...@@ -123,6 +125,11 @@ namespace Edu.Module.EduTask
/// </summary> /// </summary>
private readonly RB_Examination_PublishRepository examination_PublishRepository = new RB_Examination_PublishRepository(); private readonly RB_Examination_PublishRepository examination_PublishRepository = new RB_Examination_PublishRepository();
/// <summary>
/// 退课协议仓储层对象
/// </summary>
private readonly RB_BackClass_ProtocolRepository backClass_ProtocolRepository = new RB_BackClass_ProtocolRepository();
/// <summary> /// <summary>
/// 获取教务单据分页列表 /// 获取教务单据分页列表
/// </summary> /// </summary>
...@@ -139,6 +146,8 @@ namespace Edu.Module.EduTask ...@@ -139,6 +146,8 @@ namespace Edu.Module.EduTask
{ {
//退课详情 //退课详情
List<RB_Student_BackClass_ViewModel> backClassLisit = new List<RB_Student_BackClass_ViewModel>(); List<RB_Student_BackClass_ViewModel> backClassLisit = new List<RB_Student_BackClass_ViewModel>();
//退课协议列表
List<RB_BackClass_Protocol_ViewModel> backClassProtocolList = new List<RB_BackClass_Protocol_ViewModel>();
//调课申请 //调课申请
List<RB_Change_ClassPlan_ViewModel> changeClassList = new List<RB_Change_ClassPlan_ViewModel>(); List<RB_Change_ClassPlan_ViewModel> changeClassList = new List<RB_Change_ClassPlan_ViewModel>();
//停课申请 //停课申请
...@@ -193,6 +202,19 @@ namespace Edu.Module.EduTask ...@@ -193,6 +202,19 @@ namespace Edu.Module.EduTask
{ {
QBackIds = backIds QBackIds = backIds
}); });
backClassProtocolList = backClass_ProtocolRepository.GetBackClassProtocolListRepository(new RB_BackClass_Protocol_ViewModel()
{
QBackIds = backIds
});
if (backClassLisit != null && backClassLisit.Count > 0)
{
foreach (var item in backClassLisit)
{
var protocolModel = backClassProtocolList?.Where(qitem => qitem.BackId == item.BackId)?.FirstOrDefault();
item.BackClassProtocolId = protocolModel?.Id ?? 0;
item.ProtocolNum = protocolModel?.ProtocolNum ?? "";
}
}
} }
#endregion #endregion
......
...@@ -33,6 +33,10 @@ WHERE 1=1 ...@@ -33,6 +33,10 @@ WHERE 1=1
{ {
builder.AppendFormat(@" AND A.{0}={1} ", nameof(RB_BackClass_Protocol_ViewModel.BackId), query.BackId); builder.AppendFormat(@" AND A.{0}={1} ", nameof(RB_BackClass_Protocol_ViewModel.BackId), query.BackId);
} }
if (!string.IsNullOrEmpty(query.QBackIds))
{
builder.AppendFormat(@" AND A.{0} IN({1}) ", nameof(RB_BackClass_Protocol_ViewModel.BackId), query.QBackIds);
}
if (query.QCreateBy > 0) if (query.QCreateBy > 0)
{ {
builder.AppendFormat(@" AND A.{0}={1} ", nameof(RB_BackClass_Protocol_ViewModel.CreateBy), query.QCreateBy); builder.AppendFormat(@" AND A.{0}={1} ", nameof(RB_BackClass_Protocol_ViewModel.CreateBy), query.QCreateBy);
...@@ -54,7 +58,7 @@ WHERE 1=1 ...@@ -54,7 +58,7 @@ WHERE 1=1
var parameters = new DynamicParameters(); var parameters = new DynamicParameters();
StringBuilder builder = new StringBuilder(); StringBuilder builder = new StringBuilder();
builder.AppendFormat(@" builder.AppendFormat(@"
SELECT A.*,IFNULL(C.Id,0) AS ReceiptId SELECT A.*,IFNULL(C.Id,0) AS ReceiptId,B.BackAccount,B.BackAccountName,B.GuestId
FROM RB_BackClass_Protocol AS A LEFT JOIN rb_student_backclass AS B ON A.BackId=B.BackId FROM RB_BackClass_Protocol AS A LEFT JOIN rb_student_backclass AS B ON A.BackId=B.BackId
LEFT JOIN rb_education_receipt AS C ON B.BackId=C.RelationId AND C.ReceiptType=2 LEFT JOIN rb_education_receipt AS C ON B.BackId=C.RelationId AND C.ReceiptType=2
WHERE 1=1 WHERE 1=1
...@@ -69,6 +73,10 @@ WHERE 1=1 ...@@ -69,6 +73,10 @@ WHERE 1=1
{ {
builder.AppendFormat(@" AND A.{0}={1} ", nameof(RB_BackClass_Protocol_ViewModel.CreateBy), query.CreateBy); builder.AppendFormat(@" AND A.{0}={1} ", nameof(RB_BackClass_Protocol_ViewModel.CreateBy), query.CreateBy);
} }
if (query.Id > 0)
{
builder.AppendFormat(@" AND A.{0}={1} ", nameof(RB_BackClass_Protocol_ViewModel.Id), query.Id);
}
if (query.QCreateBy > 0) if (query.QCreateBy > 0)
{ {
builder.AppendFormat(@" AND A.{0}={1} ", nameof(RB_BackClass_Protocol_ViewModel.CreateBy), query.QCreateBy); builder.AppendFormat(@" AND A.{0}={1} ", nameof(RB_BackClass_Protocol_ViewModel.CreateBy), query.QCreateBy);
......
...@@ -458,6 +458,7 @@ namespace Edu.WebApi.Controllers.Course ...@@ -458,6 +458,7 @@ namespace Edu.WebApi.Controllers.Course
ProtocolNum = base.ParmJObj.GetStringValue("ProtocolNum"), ProtocolNum = base.ParmJObj.GetStringValue("ProtocolNum"),
IsQueryAll=base.ParmJObj.GetInt("IsQueryAll"), IsQueryAll=base.ParmJObj.GetInt("IsQueryAll"),
QCreateBy=base.ParmJObj.GetInt("QCreateBy"), QCreateBy=base.ParmJObj.GetInt("QCreateBy"),
Id=base.ParmJObj.GetInt("Id"),
}; };
query.Group_Id = userInfo.Group_Id; query.Group_Id = userInfo.Group_Id;
if (query.IsQueryAll == 0) if (query.IsQueryAll == 0)
...@@ -481,6 +482,9 @@ namespace Edu.WebApi.Controllers.Course ...@@ -481,6 +482,9 @@ namespace Edu.WebApi.Controllers.Course
x.IsCompanySeal, x.IsCompanySeal,
x.IsSure, x.IsSure,
x.PartyASign, x.PartyASign,
x.BackAccount,
x.BackAccountName,
x.GuestId,
}); });
return ApiResult.Success("", pageModel); return ApiResult.Success("", pageModel);
} }
...@@ -520,8 +524,9 @@ namespace Edu.WebApi.Controllers.Course ...@@ -520,8 +524,9 @@ namespace Edu.WebApi.Controllers.Course
{ {
int Id = base.ParmJObj.GetInt("Id"); int Id = base.ParmJObj.GetInt("Id");
int IsSure = base.ParmJObj.GetInt("IsSure"); int IsSure = base.ParmJObj.GetInt("IsSure");
var flag = educationContractModule.SetBackClassProtocolSureModule(Id, IsSure); int ClientId = base.ParmJObj.GetInt("ClientId", 0);
return flag ? ApiResult.Success() : ApiResult.Failed(); var flag = educationContractModule.SetBackClassProtocolSureModule(Id, IsSure, ClientId,base.UserInfo,out string message);
return flag ? ApiResult.Success() : ApiResult.Failed(message: message);
} }
/// <summary> /// <summary>
......
...@@ -92,9 +92,6 @@ namespace Edu.WebApi.Controllers.Course ...@@ -92,9 +92,6 @@ namespace Edu.WebApi.Controllers.Course
var userInfo = base.UserInfo; var userInfo = base.UserInfo;
JObject parms = JObject.Parse(RequestParm.Msg.ToString()); JObject parms = JObject.Parse(RequestParm.Msg.ToString());
int BackClassId = parms.GetInt("BackClassId", 0); int BackClassId = parms.GetInt("BackClassId", 0);
int IsPublic = parms.GetInt("IsPublic", 0);
int CurrencyId = parms.GetInt("CurrencyId", 0);
int ClientType = parms.GetInt("ClientType", 0);
int ClientId = parms.GetInt("ClientId", 0); int ClientId = parms.GetInt("ClientId", 0);
if (BackClassId <= 0) if (BackClassId <= 0)
{ {
...@@ -104,7 +101,7 @@ namespace Edu.WebApi.Controllers.Course ...@@ -104,7 +101,7 @@ namespace Edu.WebApi.Controllers.Course
{ {
return ApiResult.ParamIsNull(message: "请传递客户编号!"); return ApiResult.ParamIsNull(message: "请传递客户编号!");
} }
string msg = studentBillModule.SetStudentBackFinance(BackClassId, IsPublic, CurrencyId, ClientType, ClientId, userInfo); string msg = studentBillModule.SetStudentBackFinance(BackClassId, ClientId, userInfo);
return string.IsNullOrEmpty(msg) ? ApiResult.Success() : ApiResult.Failed(msg); return string.IsNullOrEmpty(msg) ? ApiResult.Success() : ApiResult.Failed(msg);
} }
......
...@@ -34,8 +34,8 @@ ...@@ -34,8 +34,8 @@
"MongoDBName": "Edu", "MongoDBName": "Edu",
"WkHtmlToPdfPath": "D:/wkhtmltopdf/bin/", "WkHtmlToPdfPath": "D:/wkhtmltopdf/bin/",
"FinanceKey": "FinanceMallInsertToERPViitto2020", "FinanceKey": "FinanceMallInsertToERPViitto2020",
"PaymentFinanceApi": "http://192.168.20.7:8083/api/Mall/InsertFinanceBatchForMallOut", "PaymentFinanceApi": "http://192.168.20.6:8083/api/Mall/InsertFinanceBatchForMallOut",
"IncomeFinanceApi": "http://192.168.20.7:8083/api/Mall/InsertFinanceBatchForMallIn", "IncomeFinanceApi": "http://192.168.20.6:8083/api/Mall/InsertFinanceBatchForMallIn",
"sTenpayNotifyUrl": "http://eduapi.oytour.com/api/WeChatPay/WxPayCallback", //下单回调地址 "sTenpayNotifyUrl": "http://eduapi.oytour.com/api/WeChatPay/WxPayCallback", //下单回调地址
"sTenpayNotifyRefundUrl": "http://eduapi.oytour.com/api/WeChatPay/Refunds", //退款回调地址 "sTenpayNotifyRefundUrl": "http://eduapi.oytour.com/api/WeChatPay/Refunds", //退款回调地址
"FinanceDateBase": "reborn_finance", "FinanceDateBase": "reborn_finance",
......
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