Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Education
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄奎
Education
Commits
1e506e3f
Commit
1e506e3f
authored
Sep 11, 2023
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
bc7ca74a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
571 additions
and
19 deletions
+571
-19
RB_Student_ViewModel.cs
Edu.Model/ViewModel/User/RB_Student_ViewModel.cs
+9
-2
StudentModule.cs
Edu.Module.User/StudentModule.cs
+261
-0
RB_StudentRepository.cs
Edu.Repository/User/RB_StudentRepository.cs
+107
-3
StudentStatController.cs
Edu.WebApi/Controllers/User/StudentStatController.cs
+194
-14
No files found.
Edu.Model/ViewModel/User/RB_Student_ViewModel.cs
View file @
1e506e3f
...
...
@@ -125,6 +125,7 @@ namespace Edu.Model.ViewModel.User
/// </summary>
public
int
EnterID
{
get
;
set
;
}
/// <summary>
/// 剩余课时
/// </summary>
...
...
@@ -150,6 +151,12 @@ namespace Edu.Model.ViewModel.User
/// </summary>
public
decimal
OrderIncome
{
get
;
set
;
}
/// <summary>
/// 订单退款
/// </summary>
public
decimal
Refund
{
get
;
set
;
}
/// <summary>
/// 续费订单数量
/// </summary>
...
...
@@ -232,7 +239,7 @@ namespace Edu.Model.ViewModel.User
/// <summary>
/// 试听次数
/// </summary>
public
int
TrialLessonCount
{
get
;
set
;
}
public
int
TrialLessonCount
{
get
;
set
;
}
/// <summary>
/// 同行
...
...
@@ -292,7 +299,7 @@ namespace Edu.Model.ViewModel.User
/// <summary>
/// 学习目的名称
/// </summary>
public
string
StuPurposeName
{
get
;
set
;}
public
string
StuPurposeName
{
get
;
set
;
}
/// <summary>
/// 客户需求名称
...
...
Edu.Module.User/StudentModule.cs
View file @
1e506e3f
This diff is collapsed.
Click to expand it.
Edu.Repository/User/RB_StudentRepository.cs
View file @
1e506e3f
...
...
@@ -462,7 +462,8 @@ WHERE 1=1
{
builder
.
AppendFormat
(
" AND t.{0}={1} "
,
nameof
(
RB_Student_ViewModel
.
IsSureConsultTime
),
1
);
}
else
{
else
{
builder
.
AppendFormat
(
" AND t.{0}<>{1} "
,
nameof
(
RB_Student_ViewModel
.
IsSureConsultTime
),
1
);
}
}
...
...
@@ -594,8 +595,8 @@ GROUP BY GuestId";
//内部介绍=>直接修改内部介绍人为学员创建人【HK2023-06-15调整为不改变原创建人员】
else
if
(
model
.
CreateType
==
StuCreateTypeEnum
.
InternalIntroduction
)
{
//创建人不变
// model.CreateBy = model.StuSourceId;
//创建人不变
// model.CreateBy = model.StuSourceId;
}
model
.
StuTel
=
Common
.
Plugin
.
StringHelper
.
ReplaceMobile
(
model
.
StuRealMobile
);
...
...
@@ -1253,5 +1254,108 @@ group by s.StuId";
WHERE Group_Id =
{
group_Id
}
and `Status` =0 and IsSureConsultTime =1 and CreateTime>='
{
sDate
}
' and CreateTime <='
{
eDate
}
23:59:59' GROUP BY CreateBy"
;
return
Get
<
RB_Student_ViewModel
>(
sql
).
ToList
();
}
/// <summary>
/// 获取学生分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Student_ViewModel
>
GetStudentMonthPageListRepository
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Student_ViewModel
query
)
{
var
parameters
=
new
DynamicParameters
();
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT t.StuId, t.StuName, t.StuTel, t.StuIcon, t.StuSex, t.StuBirth, t.Group_Id, t.School_Id, t.Status, t.CreateBy, t.IsDisable, t.StuStatus, t.Interest, t.JapanBaseInfo,t. CustomerId,t. StuProfession, t.StuEducation, t.StuPurpose, t.StuSource, t.StuAddress, t.StuContract, t.StuContractMobile, t.StuIDCard, t.StuIDCardAddress,t. CreateType, t.StuStage, t.StuChannel,t. PlatformName, t.StuSourceId,t. QQ, t.WeChatNo, t.StuType,t. StuNeeds, t.StuRealMobile, t.ConsultDate, t.PlanPrice, t.BaseCondition,t. DemandPoint, t.ResistPoint,t. ConsultingResults, t.FirstEnrollDate, t.AdvisorStatus, t.AdvisorWinRate,t. AdvisorExpectDate, t.FileVoucher, t.IsSureConsultTime,g.GroupName,s.SName,IFNULL(a.Account,'') AS StudentAccount ,c.CustomerName,IFNULL(B.Name,'') AS AdvisorStatusName,cou.CourseName,o.PreferPrice as OrderIncome,o.Refund,o.CreateTime
FROM rb_order as o LEFT JOIN rb_order_guest as og on og.OrderId=o.OrderId
left JOIN rb_student_orderguest as sog on og.Id=sog.GuestId
left JOIN rb_student AS t on t.StuId=sog.Student_Id
LEFT JOIN rb_group AS g ON t.Group_Id=g.GId
LEFT JOIN rb_school AS s ON t.School_Id=s.SId
LEFT JOIN rb_customer c on (c.CustomerId = t.StuSourceId AND t.CreateType=2)
LEFT JOIN rb_account as a ON (t.StuId=a.AccountId AND a.AccountType=4 )
LEFT JOIN rb_student_advisorconfig AS b ON t.AdvisorStatus=B.Id
LEFT JOIN rb_course as cou on o.CourseId=cou.CourseId where 1=1
"
);
if
(
query
!=
null
)
{
if
(
query
.
Group_Id
>
0
)
{
builder
.
AppendFormat
(
" AND t.{0}={1} "
,
nameof
(
RB_Student_ViewModel
.
Group_Id
),
query
.
Group_Id
);
}
if
(
query
.
School_Id
>
0
)
{
builder
.
AppendFormat
(
" AND t.{0}={1} "
,
nameof
(
RB_Student_ViewModel
.
School_Id
),
query
.
School_Id
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
StartTime
))
{
builder
.
AppendFormat
(
" AND o.CreateTime>='{0}' "
,
query
.
StartTime
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
EndTime
))
{
builder
.
AppendFormat
(
" AND o.CreateTime<='{0} 23:59:59' "
,
query
.
EndTime
);
}
}
builder
.
AppendFormat
(
" ORDER BY o.CreateTime asc "
);
return
GetPage
<
RB_Student_ViewModel
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
(),
parameters
).
ToList
();
}
/// <summary>
/// 获取学生分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Student_ViewModel
>
GetStudentMonthListRepository
(
RB_Student_ViewModel
query
)
{
var
parameters
=
new
DynamicParameters
();
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT t.StuId, t.StuName, t.StuTel, t.StuIcon, t.StuSex, t.StuBirth, t.Group_Id, t.School_Id, t.Status, t.CreateBy, t.IsDisable, t.StuStatus, t.Interest, t.JapanBaseInfo,t. CustomerId,t. StuProfession, t.StuEducation, t.StuPurpose, t.StuSource, t.StuAddress, t.StuContract, t.StuContractMobile, t.StuIDCard, t.StuIDCardAddress,t. CreateType, t.StuStage, t.StuChannel,t. PlatformName, t.StuSourceId,t. QQ, t.WeChatNo, t.StuType,t. StuNeeds, t.StuRealMobile, t.ConsultDate, t.PlanPrice, t.BaseCondition,t. DemandPoint, t.ResistPoint,t. ConsultingResults, t.FirstEnrollDate, t.AdvisorStatus, t.AdvisorWinRate,t. AdvisorExpectDate, t.FileVoucher, t.IsSureConsultTime,g.GroupName,s.SName,IFNULL(a.Account,'') AS StudentAccount ,c.CustomerName,IFNULL(B.Name,'') AS AdvisorStatusName,cou.CourseName,o.PreferPrice as OrderIncome,o.Refund,o.CreateTime
FROM rb_order as o LEFT JOIN rb_order_guest as og on og.OrderId=o.OrderId
left JOIN rb_student_orderguest as sog on og.Id=sog.GuestId
left JOIN rb_student AS t on t.StuId=sog.Student_Id
LEFT JOIN rb_group AS g ON t.Group_Id=g.GId
LEFT JOIN rb_school AS s ON t.School_Id=s.SId
LEFT JOIN rb_customer c on (c.CustomerId = t.StuSourceId AND t.CreateType=2)
LEFT JOIN rb_account as a ON (t.StuId=a.AccountId AND a.AccountType=4 )
LEFT JOIN rb_student_advisorconfig AS b ON t.AdvisorStatus=B.Id
LEFT JOIN rb_course as cou on o.CourseId=cou.CourseId where 1=1
"
);
if
(
query
!=
null
)
{
if
(
query
.
Group_Id
>
0
)
{
builder
.
AppendFormat
(
" AND t.{0}={1} "
,
nameof
(
RB_Student_ViewModel
.
Group_Id
),
query
.
Group_Id
);
}
if
(
query
.
School_Id
>
0
)
{
builder
.
AppendFormat
(
" AND t.{0}={1} "
,
nameof
(
RB_Student_ViewModel
.
School_Id
),
query
.
School_Id
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
StartTime
))
{
builder
.
AppendFormat
(
" AND o.CreateTime>='{0}' "
,
query
.
StartTime
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
EndTime
))
{
builder
.
AppendFormat
(
" AND o.CreateTime<='{0} 23:59:59' "
,
query
.
EndTime
);
}
}
builder
.
AppendFormat
(
" ORDER BY o.CreateTime asc "
);
return
Get
<
RB_Student_ViewModel
>(
builder
.
ToString
(),
parameters
).
ToList
();
}
}
}
\ No newline at end of file
Edu.WebApi/Controllers/User/StudentStatController.cs
View file @
1e506e3f
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment