Commit 9d100207 authored by 黄奎's avatar 黄奎

页面修改

parent 1a37cad7
......@@ -345,5 +345,30 @@ namespace Edu.Model.Entity.Sell
/// 是否已回归原班(1-是)
/// </summary>
public int IsBackClass { get; set; }
/// <summary>
/// 同业ID
/// </summary>
public int CustomerId { get; set; }
/// <summary>
/// 付款状态 1已付款 2未付款
/// </summary>
public int PayState { get; set; }
/// <summary>
/// 付款时间
/// </summary>
public DateTime? PayDate { get; set; }
/// <summary>
/// 兑换奖品人数
/// </summary>
public int ExchangeNum { get; set; }
/// <summary>
/// 兑换奖品金额
/// </summary>
public decimal ExchangeMoney { get; set; }
}
}
......@@ -141,5 +141,10 @@ namespace Edu.Model.ViewModel.User
/// 学员状态
/// </summary>
public GuestStateEnum StuGuestState { get; set; }
/// <summary>
/// 账号表主键编号
/// </summary>
public int Account_Id { get; set; }
}
}
\ No newline at end of file
This diff is collapsed.
......@@ -31,7 +31,7 @@ namespace Edu.Module.Course
/// </summary>
private readonly RB_Student_BackClassRepository student_BackClassRepository = new RB_Student_BackClassRepository();
/// <summary>
/// 学员签到仓储层对象
/// </summary>
......@@ -52,7 +52,7 @@ namespace Edu.Module.Course
/// </summary>
private readonly RB_BackClass_ProtocolRepository backClass_ProtocolRepository = new RB_BackClass_ProtocolRepository();
/// <summary>
/// 创建退课流程
......@@ -67,7 +67,7 @@ namespace Edu.Module.Course
/// <param name="StateMent">退课协议申明</param>
/// <param name="message"></param>
/// <returns></returns>
public virtual bool CreateBackClassApplyModule(int GuestId, int OrderId, string reason, UserInfo userinfo,string receiptFile,string BackAccountName,string BackAccount,string StateMent,out string message)
public virtual bool CreateBackClassApplyModule(int GuestId, int OrderId, string reason, UserInfo userinfo, string receiptFile, string BackAccountName, string BackAccount, string StateMent, out string message)
{
bool flag;
message = "";
......@@ -90,7 +90,7 @@ namespace Edu.Module.Course
message = "未找到对应的班级信息!";
return false;
}
//获取教师实体信息
var teacherModel = accountRepository.GetAccountListExtRepository(new Model.ViewModel.User.RB_Account_ViewModel()
{
......@@ -98,7 +98,8 @@ namespace Edu.Module.Course
AccountType = Common.Enum.User.AccountTypeEnum.Teacher
})?.FirstOrDefault();
var teacherId = teacherModel?.Id ?? 0;
var saleMan = accountRepository.GetAccountListExtRepository(new Model.ViewModel.User.RB_Account_ViewModel() {
var saleMan = accountRepository.GetAccountListExtRepository(new Model.ViewModel.User.RB_Account_ViewModel()
{
Id = orderModel.EnterID
})?.FirstOrDefault();
var totalBackCount = student_BackClassRepository.GetStudentBackClassNumRepository();
......@@ -123,12 +124,12 @@ namespace Edu.Module.Course
{
courseModel = courseRepository.GetEntity(classModel.CouseId);
}
//预计退款金额
decimal backMoney =0;
backMoney = orderRepository.CalcBackMoneyRepository(orderModel, courseModel, FinishHours,out _);
decimal backMoney = 0;
backMoney = orderRepository.CalcBackMoneyRepository(orderModel, courseModel, FinishHours, out _);
var backClassModel = new RB_Student_BackClass_ViewModel()
{
BackId = 0,
......@@ -147,8 +148,8 @@ namespace Edu.Module.Course
OrderId = OrderId,
ApplyReason = reason,
FlowId = Common.Config.BackClassFlowId,
BackAccountName=BackAccountName,
BackAccount=BackAccount,
BackAccountName = BackAccountName,
BackAccount = BackAccount,
};
var newBackId = student_BackClassRepository.Insert(backClassModel);
backClassModel.BackId = newBackId;
......@@ -157,21 +158,21 @@ namespace Edu.Module.Course
{
flag = education_ReceiptRepository.SetEducationReceiptRepository(new RB_Education_Receipt()
{
Id=0,
Title="退课单据",
ClassId=orderModel.ClassId,
OrderId=orderModel.OrderId,
ReceiptType= Common.Enum.Finance.ReceiptTypeEnum.BackClass,
RelationId= backClassModel.BackId,
Group_Id=orderModel.Group_Id,
School_Id=orderModel.School_Id,
CreateBy=userinfo.Id,
CreateTime=DateTime.Now,
UpdateBy=userinfo.Id,
UpdateTime=DateTime.Now,
RecipientIds="",
VerifyStatus= Common.Enum.EduTask.EduTaskRrocessStatus.NotAudit,
ReceiptFile= receiptFile
Id = 0,
Title = "退课单据",
ClassId = orderModel.ClassId,
OrderId = orderModel.OrderId,
ReceiptType = Common.Enum.Finance.ReceiptTypeEnum.BackClass,
RelationId = backClassModel.BackId,
Group_Id = orderModel.Group_Id,
School_Id = orderModel.School_Id,
CreateBy = userinfo.Id,
CreateTime = DateTime.Now,
UpdateBy = userinfo.Id,
UpdateTime = DateTime.Now,
RecipientIds = "",
VerifyStatus = Common.Enum.EduTask.EduTaskRrocessStatus.NotAudit,
ReceiptFile = receiptFile
}, out message);
if (flag)
{
......@@ -200,33 +201,33 @@ namespace Edu.Module.Course
string ProtocolNum = (contractModel?.ContractNo ?? "") + "-T";
RB_BackClass_Protocol model = new RB_BackClass_Protocol()
{
Id=0,
BackId= newBackId,
ProtocolNum= ProtocolNum,
PartyAName=guestModel.GuestName,
PartyAGuardian="",
PartyBName= "成都市锦江区甲鹤外语培训学校有限公司",
PartyBLegal="",
SignDate=null,
OldSaleMan= saleMan?.AccountName??"",
OldCourseName=courseModel?.CourseName??"",
OldSellPrice=courseModel?.SellPrice??0,
OldDiscountMoney=orderModel?.PerDiscountMoney??0,
OldIncome=((orderModel?.Income ?? 0) + (orderModel?.PlatformTax ?? 0) - (orderModel?.Refund ?? 0))/orderModel.GuestNum,
OldFinaceNum= FinaceNum,
OldReceiveMan=saleMan?.AccountName??"",
TotalClassHours=guestModel.TotalHours,
CompleteHours=guestModel.CompleteHours,
SurplusHours= guestModel.TotalHours- guestModel.CompleteHours,
BackMoney= backClassModel.BackMoney,
AuditStatus=(int)Common.Enum.EduTask.EduTaskRrocessStatus.NotAudit,
CreateBy=orderModel.EnterID,
CreateTime=DateTime.Now,
Group_Id= classModel.Group_Id,
School_Id=classModel.School_Id,
StateMent=StateMent
Id = 0,
BackId = newBackId,
ProtocolNum = ProtocolNum,
PartyAName = guestModel.GuestName,
PartyAGuardian = "",
PartyBName = "成都市锦江区甲鹤外语培训学校有限公司",
PartyBLegal = "",
SignDate = null,
OldSaleMan = saleMan?.AccountName ?? "",
OldCourseName = courseModel?.CourseName ?? "",
OldSellPrice = courseModel?.SellPrice ?? 0,
OldDiscountMoney = orderModel?.PerDiscountMoney ?? 0,
OldIncome = ((orderModel?.Income ?? 0) + (orderModel?.PlatformTax ?? 0) - (orderModel?.Refund ?? 0)) / orderModel.GuestNum,
OldFinaceNum = FinaceNum,
OldReceiveMan = saleMan?.AccountName ?? "",
TotalClassHours = guestModel.TotalHours,
CompleteHours = guestModel.CompleteHours,
SurplusHours = guestModel.TotalHours - guestModel.CompleteHours,
BackMoney = backClassModel.BackMoney,
AuditStatus = (int)Common.Enum.EduTask.EduTaskRrocessStatus.NotAudit,
CreateBy = orderModel.EnterID,
CreateTime = DateTime.Now,
Group_Id = classModel.Group_Id,
School_Id = classModel.School_Id,
StateMent = StateMent
};
flag = backClass_ProtocolRepository.Insert(model) > 0;
flag = backClass_ProtocolRepository.Insert(model) > 0;
}
return flag;
}
......@@ -298,4 +299,4 @@ namespace Edu.Module.Course
return flag;
}
}
}
}
\ No newline at end of file
......@@ -146,39 +146,7 @@ namespace Edu.Module.User
/// <returns></returns>
public bool SetStudentModule(RB_Student_ViewModel model)
{
bool flag;
if (model.StuId > 0)
{
Dictionary<string, object> fileds = new Dictionary<string, object>()
{
{nameof(RB_Student_ViewModel.StuName),model.StuName.Trim() },
{nameof(RB_Student_ViewModel.StuTel),model.StuTel.Trim() },
{nameof(RB_Student_ViewModel.StuIcon),model.StuIcon.Trim() },
{nameof(RB_Student_ViewModel.StuSex),model.StuSex },
{nameof(RB_Student_ViewModel.StuBirth),model.StuBirth },
{nameof(RB_Student_ViewModel.ProviceId),model.ProviceId },
{nameof(RB_Student_ViewModel.CityId),model.CityId },
{nameof(RB_Student_ViewModel.AreaId),model.AreaId },
{nameof(RB_Student_ViewModel.Interest),model.Interest },
{nameof(RB_Student_ViewModel.JapanBaseInfo),model.JapanBaseInfo },
{nameof(RB_Student_ViewModel.StuProfession),model.StuProfession },
{nameof(RB_Student_ViewModel.StuEducation),model.StuEducation },
{nameof(RB_Student_ViewModel.StuPurpose),model.StuPurpose },
{nameof(RB_Student_ViewModel.StuSource),model.StuSource },
{nameof(RB_Student_ViewModel.StuAddress),model.StuAddress },
{nameof(RB_Student_ViewModel.StuContract),model.StuContract },
{nameof(RB_Student_ViewModel.StuContractMobile),model.StuContractMobile },
{nameof(RB_Student_ViewModel.StuIDCard),model.StuIDCard },
{nameof(RB_Student_ViewModel.StuIDCardAddress),model.StuIDCardAddress },
};
flag = studentRepository.Update(fileds, new WhereHelper(nameof(RB_Student_ViewModel.StuId), model.StuId));
}
else
{
var newId = studentRepository.Insert(model);
model.StuId = newId;
flag = newId > 0;
}
bool flag = studentRepository.SetStudentRepository(model);
return flag;
}
......
......@@ -26,10 +26,6 @@ namespace Edu.Repository.Sell
{
where += $@" and o.{nameof(RB_Order_ViewModel.Group_Id)} ={demodel.Group_Id}";
}
//if (demodel.School_Id > 0)
//{
// where += $@" and o.{nameof(RB_Order_ViewModel.School_Id)} ={demodel.School_Id}";
//}
if (demodel.OrderId > 0)
{
where += $@" and o.{nameof(RB_Order_ViewModel.OrderId)} ={demodel.OrderId}";
......@@ -256,6 +252,10 @@ ORDER BY {orderBy}
{
where += $@" and course.{nameof(RB_Order_ViewModel.CourseSubject)} = {demodel.CourseSubject}";
}
if (demodel.CustomerId > 0)
{
where += $@" and o.{nameof(RB_Order_ViewModel.CustomerId)} = {demodel.CustomerId}";
}
string orderBy = " o.OrderId asc";
if (demodel.Q_OrderBy == 1)
{
......@@ -842,7 +842,6 @@ GROUP BY o.EnterID
#endregion
#region 未完成的订单
/// <summary>
/// 获取我的未完成的订单
......
......@@ -251,10 +251,6 @@ WHERE 1=1 AND A.Status=0
{
where += $@" and A.{nameof(RB_Order_Guest_ViewModel.Group_Id)} ={demodel.Group_Id}";
}
//if (demodel.School_Id > 0)
//{
// where += $@" and A.{nameof(RB_Order_Guest_ViewModel.School_Id)} ={demodel.School_Id}";
//}
if (demodel.Id > 0)
{
where += $@" and A.{nameof(RB_Order_Guest_ViewModel.Id)} ={demodel.Id}";
......@@ -568,7 +564,6 @@ WHERE {where}";
return Get<RB_Order_Guest_ViewModel>(sql).ToList();
}
#region 临时上课邀请学生查询
/// <summary>
/// 获取列表
......@@ -638,8 +633,6 @@ WHERE {where}";
#endregion
#region 学员名单
/// <summary>
/// 获取学员名单分页列表
......
using Edu.Common.Enum;
using Edu.Model.ViewModel.User;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using VT.FW.DB;
using VT.FW.DB.Dapper;
namespace Edu.Repository.User
......@@ -12,6 +14,11 @@ namespace Edu.Repository.User
/// </summary>
public class RB_StudentRepository : BaseRepository<Model.Entity.User.RB_Student>
{
/// <summary>
/// 账号
/// </summary>
private readonly RB_AccountRepository accountRepository = new RB_AccountRepository();
/// <summary>
/// 获取学生列表
/// </summary>
......@@ -161,7 +168,6 @@ where b.`Status`=0 and b.ClassStatus in(1,2) and a.status=0 and a.Account_Id={
}
/// <summary>
/// 根据学生id获取学生的班级课程学校信息
/// </summary>
......@@ -183,5 +189,62 @@ FROM rb_student as s LEFT JOIN rb_student_orderguest as sog on s.StuId=sog.Stude
WHERE o.OrderState=1 and og.`Status`=0 and sog.`Status`=0 and og.GuestState=1 and cou.`Status`=0 and c.`Status`=0 and s.`Status`=0 and s.StuId={Student_Id} and s.Group_Id={Group_Id}");
return Get<RB_Student_ViewModel>(builder.ToString(), parameters).ToList();
}
public bool SetStudentRepository(RB_Student_ViewModel model)
{
bool flag;
if (model.StuId > 0)
{
Dictionary<string, object> fileds = new Dictionary<string, object>()
{
{nameof(RB_Student_ViewModel.StuName),model.StuName.Trim() },
{nameof(RB_Student_ViewModel.StuTel),model.StuTel.Trim() },
{nameof(RB_Student_ViewModel.StuIcon),model.StuIcon.Trim() },
{nameof(RB_Student_ViewModel.StuSex),model.StuSex },
{nameof(RB_Student_ViewModel.StuBirth),model.StuBirth },
{nameof(RB_Student_ViewModel.ProviceId),model.ProviceId },
{nameof(RB_Student_ViewModel.CityId),model.CityId },
{nameof(RB_Student_ViewModel.AreaId),model.AreaId },
{nameof(RB_Student_ViewModel.Interest),model.Interest },
{nameof(RB_Student_ViewModel.JapanBaseInfo),model.JapanBaseInfo },
{nameof(RB_Student_ViewModel.StuProfession),model.StuProfession },
{nameof(RB_Student_ViewModel.StuEducation),model.StuEducation },
{nameof(RB_Student_ViewModel.StuPurpose),model.StuPurpose },
{nameof(RB_Student_ViewModel.StuSource),model.StuSource },
{nameof(RB_Student_ViewModel.StuAddress),model.StuAddress },
{nameof(RB_Student_ViewModel.StuContract),model.StuContract },
{nameof(RB_Student_ViewModel.StuContractMobile),model.StuContractMobile },
{nameof(RB_Student_ViewModel.StuIDCard),model.StuIDCard },
{nameof(RB_Student_ViewModel.StuIDCardAddress),model.StuIDCardAddress },
};
flag = base.Update(fileds, new WhereHelper(nameof(RB_Student_ViewModel.StuId), model.StuId));
}
else
{
var newId = base.Insert(model);
model.StuId = newId;
flag = newId > 0;
//创建学生账号
model.Account_Id = accountRepository.Insert(new Model.Entity.User.RB_Account()
{
Id = 0,
Account = model.StuTel,
AccountId = model.StuId,
AccountType = Common.Enum.User.AccountTypeEnum.Student,
AnnualLeaveDay = 0,
CreateBy = model.CreateBy,
CreateTime = DateTime.Now,
Group_Id = model.Group_Id,
School_Id = model.School_Id,
Status = DateStateEnum.Normal,
UpdateBy = model.UpdateBy,
UpdateTime = DateTime.Now,
Password = Common.DES.Encrypt(Common.Config.DefaultPwd)
});
}
return flag;
}
}
}
\ No newline at end of file
using Edu.Common.API;
using Edu.Common.Plugin;
using Edu.Model.ViewModel.Sell;
using Edu.Module.Course;
using Edu.WebApi.Filter;
using Microsoft.AspNetCore.Cors;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Edu.WebApi.Controllers.B2BApp
{
/// <summary>
/// 甲鹤同业小程序相关接口
/// </summary>
[Route("api/[controller]/[action]")]
[ApiExceptionFilter]
[ApiController]
[EnableCors("AllowCors")]
public class B2BAppController : BaseController
{
/// <summary>
/// 订单处理类对象
/// </summary>
private readonly OrderModule orderModule = new OrderModule();
/// <summary>
/// 同行获取学员订单分页列表
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult GetCustomerGetStudentOrderPage()
{
var pageModel = JsonHelper.DeserializeObject<ResultPageModel>(RequestParm.Msg.ToString());
var customer = base.AppletCustomerInfo;
var query = new RB_Order_ViewModel()
{
Group_Id=customer.GroupId,
CustomerId=customer.CustomerId,
};
var list = orderModule.GetMyOrderPageList(pageModel.PageIndex, pageModel.PageSize, out long rowsCount, query);
pageModel.PageData = list;
pageModel.Count = rowsCount;
return ApiResult.Success(data: pageModel);
}
}
}
......@@ -647,7 +647,6 @@ namespace Edu.WebApi.Controllers.User
var pageModel = Common.Plugin.JsonHelper.DeserializeObject<ResultPageModel>(RequestParm.Msg.ToString());
var query = Common.Plugin.JsonHelper.DeserializeObject<RB_Student_ViewModel>(RequestParm.Msg.ToString());
query.Group_Id = base.UserInfo.Group_Id;
//query.School_Id = base.UserInfo.School_Id;
var list = studentModule.GetStudentPageListModule(pageModel.PageIndex, pageModel.PageSize, out long rowsCount, query);
foreach (var item in list)
{
......
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