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

页面修改

parent 2644c67a
......@@ -83,8 +83,9 @@ namespace Edu.Model.ViewModel.BackClass
/// </summary>
public string ProtocolNum { get; set; }
/// <summary>
/// 是否盖章
/// </summary>
public int IsCompanySeal { get; set; }
}
}
......@@ -20,6 +20,11 @@ namespace Edu.Model.ViewModel.Contract
/// </summary>
public int QCreateBy { get; set; }
/// <summary>
/// 退课编号
/// </summary>
public string QBackIds { get; set; }
/// <summary>
/// 订单编号
/// </summary>
......@@ -107,6 +112,11 @@ namespace Edu.Model.ViewModel.Contract
/// </summary>
public string BackAccount { get; set; }
/// <summary>
/// 学员编号
/// </summary>
public int GuestId { get; set; }
/// <summary>
/// 合同章图片
/// </summary>
......
......@@ -95,6 +95,11 @@ namespace Edu.Module.Course
/// </summary>
private readonly RB_Student_BackClassRepository student_BackClassRepository = new RB_Student_BackClassRepository();
/// <summary>
/// 学员单据处理类
/// </summary>
private StudentBillModule studentBillModule = new StudentBillModule();
/// <summary>
/// 获取学员信息
/// </summary>
......@@ -790,15 +795,16 @@ namespace Edu.Module.Course
}
/// <summary>
/// 退课协议,销售确认
/// 退课协议,销售确认【0826新增生成财务单据】
/// </summary>
/// <param name="Id">协议编号</param>
/// <param name="IsSure">是否销售确认(1-是)</param>
/// <returns></returns>
[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;
message = "";
var extModel = backClass_ProtocolRepository.GetEntity<RB_BackClass_Protocol_ViewModel>(Id);
if (extModel != null && extModel.Id > 0)
{
......@@ -821,10 +827,17 @@ namespace Edu.Module.Course
};
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;
}
/// <summary>
/// 根据学生id获取学生的有效合同信息
/// </summary>
......
......@@ -149,14 +149,14 @@ namespace Edu.Module.Course
/// 退课一键制单
/// </summary>
/// <param name="backClassId"></param>
/// <param name="IsPublic"></param>
/// <param name="CurrencyId"></param>
/// <param name="clientType"></param>
/// <param name="clientId"></param>
/// <param name="userInfo"></param>
/// <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 BackClassProtocolModel = backClass_ProtocolRepository.GetBackClassProtocolListRepository(new RB_BackClass_Protocol_ViewModel()
{
......
......@@ -7,12 +7,14 @@ using Edu.Common.Plugin;
using Edu.Model.CacheModel;
using Edu.Model.Entity.EduTask;
using Edu.Model.ViewModel.BackClass;
using Edu.Model.ViewModel.Contract;
using Edu.Model.ViewModel.EduTask;
using Edu.Model.ViewModel.Exam;
using Edu.Model.ViewModel.Grade;
using Edu.Model.ViewModel.Sell;
using Edu.Model.ViewModel.User;
using Edu.Repository.BackClass;
using Edu.Repository.Contract;
using Edu.Repository.Course;
using Edu.Repository.EduTask;
using Edu.Repository.Exam;
......@@ -123,6 +125,11 @@ namespace Edu.Module.EduTask
/// </summary>
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>
......@@ -139,6 +146,8 @@ namespace Edu.Module.EduTask
{
//退课详情
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>();
//停课申请
......@@ -193,6 +202,19 @@ namespace Edu.Module.EduTask
{
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
......
......@@ -33,6 +33,10 @@ WHERE 1=1
{
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)
{
builder.AppendFormat(@" AND A.{0}={1} ", nameof(RB_BackClass_Protocol_ViewModel.CreateBy), query.QCreateBy);
......@@ -54,7 +58,7 @@ WHERE 1=1
var parameters = new DynamicParameters();
StringBuilder builder = new StringBuilder();
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
LEFT JOIN rb_education_receipt AS C ON B.BackId=C.RelationId AND C.ReceiptType=2
WHERE 1=1
......@@ -69,6 +73,10 @@ WHERE 1=1
{
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)
{
builder.AppendFormat(@" AND A.{0}={1} ", nameof(RB_BackClass_Protocol_ViewModel.CreateBy), query.QCreateBy);
......
......@@ -458,6 +458,7 @@ namespace Edu.WebApi.Controllers.Course
ProtocolNum = base.ParmJObj.GetStringValue("ProtocolNum"),
IsQueryAll=base.ParmJObj.GetInt("IsQueryAll"),
QCreateBy=base.ParmJObj.GetInt("QCreateBy"),
Id=base.ParmJObj.GetInt("Id"),
};
query.Group_Id = userInfo.Group_Id;
if (query.IsQueryAll == 0)
......@@ -481,6 +482,9 @@ namespace Edu.WebApi.Controllers.Course
x.IsCompanySeal,
x.IsSure,
x.PartyASign,
x.BackAccount,
x.BackAccountName,
x.GuestId,
});
return ApiResult.Success("", pageModel);
}
......@@ -520,8 +524,9 @@ namespace Edu.WebApi.Controllers.Course
{
int Id = base.ParmJObj.GetInt("Id");
int IsSure = base.ParmJObj.GetInt("IsSure");
var flag = educationContractModule.SetBackClassProtocolSureModule(Id, IsSure);
return flag ? ApiResult.Success() : ApiResult.Failed();
int ClientId = base.ParmJObj.GetInt("ClientId", 0);
var flag = educationContractModule.SetBackClassProtocolSureModule(Id, IsSure, ClientId,base.UserInfo,out string message);
return flag ? ApiResult.Success() : ApiResult.Failed(message: message);
}
/// <summary>
......
......@@ -92,9 +92,6 @@ namespace Edu.WebApi.Controllers.Course
var userInfo = base.UserInfo;
JObject parms = JObject.Parse(RequestParm.Msg.ToString());
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);
if (BackClassId <= 0)
{
......@@ -104,7 +101,7 @@ namespace Edu.WebApi.Controllers.Course
{
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);
}
......
......@@ -34,8 +34,8 @@
"MongoDBName": "Edu",
"WkHtmlToPdfPath": "D:/wkhtmltopdf/bin/",
"FinanceKey": "FinanceMallInsertToERPViitto2020",
"PaymentFinanceApi": "http://192.168.20.7:8083/api/Mall/InsertFinanceBatchForMallOut",
"IncomeFinanceApi": "http://192.168.20.7:8083/api/Mall/InsertFinanceBatchForMallIn",
"PaymentFinanceApi": "http://192.168.20.6:8083/api/Mall/InsertFinanceBatchForMallOut",
"IncomeFinanceApi": "http://192.168.20.6:8083/api/Mall/InsertFinanceBatchForMallIn",
"sTenpayNotifyUrl": "http://eduapi.oytour.com/api/WeChatPay/WxPayCallback", //下单回调地址
"sTenpayNotifyRefundUrl": "http://eduapi.oytour.com/api/WeChatPay/Refunds", //退款回调地址
"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