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
2c282165
Commit
2c282165
authored
Dec 25, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
982191a2
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
120 additions
and
3 deletions
+120
-3
RB_Customer_Extend.cs
Edu.Model/ViewModel/Customer/RB_Customer_Extend.cs
+10
-0
RB_Visitor_Reserve_Extend.cs
Edu.Model/ViewModel/Reserve/RB_Visitor_Reserve_Extend.cs
+5
-0
StudentModule.cs
Edu.Module.User/StudentModule.cs
+29
-3
RB_CustomerRepository.cs
Edu.Repository/Customer/RB_CustomerRepository.cs
+34
-0
RB_Visitor_ReserveRepository.cs
Edu.Repository/Reserve/RB_Visitor_ReserveRepository.cs
+34
-0
RB_StudentRepository.cs
Edu.Repository/User/RB_StudentRepository.cs
+8
-0
No files found.
Edu.Model/ViewModel/Customer/RB_Customer_Extend.cs
View file @
2c282165
...
@@ -103,5 +103,15 @@ namespace Edu.Model.ViewModel.Customer
...
@@ -103,5 +103,15 @@ namespace Edu.Model.ViewModel.Customer
/// 查询创建人
/// 查询创建人
/// </summary>
/// </summary>
public
int
QCreateBy
{
get
;
set
;
}
public
int
QCreateBy
{
get
;
set
;
}
/// <summary>
/// 查询日期
/// </summary>
public
string
QDate
{
get
;
set
;
}
/// <summary>
/// 同行数量
/// </summary>
public
int
CustomerCount
{
get
;
set
;
}
}
}
}
}
Edu.Model/ViewModel/Reserve/RB_Visitor_Reserve_Extend.cs
View file @
2c282165
...
@@ -155,5 +155,10 @@ namespace Edu.Model.ViewModel.Reserve
...
@@ -155,5 +155,10 @@ namespace Edu.Model.ViewModel.Reserve
/// 试听次数
/// 试听次数
/// </summary>
/// </summary>
public
int
TrialLessonCount
{
get
;
set
;
}
public
int
TrialLessonCount
{
get
;
set
;
}
/// <summary>
/// 查询日期
/// </summary>
public
string
QDate
{
get
;
set
;
}
}
}
}
}
Edu.Module.User/StudentModule.cs
View file @
2c282165
...
@@ -104,6 +104,7 @@ namespace Edu.Module.User
...
@@ -104,6 +104,7 @@ namespace Edu.Module.User
/// </summary>
/// </summary>
private
readonly
RB_Student_AppointmentRepository
student_AppointmentRepository
=
new
RB_Student_AppointmentRepository
();
private
readonly
RB_Student_AppointmentRepository
student_AppointmentRepository
=
new
RB_Student_AppointmentRepository
();
/// <summary>
/// <summary>
/// 获取学生列表
/// 获取学生列表
/// </summary>
/// </summary>
...
@@ -660,20 +661,45 @@ namespace Edu.Module.User
...
@@ -660,20 +661,45 @@ namespace Edu.Module.User
{
{
var
today
=
Common
.
ConvertHelper
.
FormatDate
(
DateTime
.
Now
);
var
today
=
Common
.
ConvertHelper
.
FormatDate
(
DateTime
.
Now
);
//今日新增名单
//今日新增名单
int
todayAdd
=
studentRepository
.
GetStudentStaticRepository
(
createBy
.
ToString
(),
today
,
today
)?.
FirstOrDefault
()?.
ClueCount
??
0
;
int
todayAdd
=
studentRepository
.
GetStudentStaticRepository
(
createBy
.
ToString
(),
today
,
today
)?.
FirstOrDefault
()?.
ClueCount
??
0
;
//今日到访
//今日到访
int
todayVisit
=
student_VisitRepository
.
GetStudentVisitStaticRepository
(
new
RB_Student_Visit_Extend
()
{
CreateBy
=
createBy
,
QueryDate
=
today
})?.
Count
()
??
0
;
int
todayVisit
=
student_VisitRepository
.
GetStudentVisitStaticRepository
(
new
RB_Student_Visit_Extend
()
{
CreateBy
=
createBy
,
QueryDate
=
today
})?.
Count
()
??
0
;
//今日预约
//今日预约
int
A
ppointmentCount
=
student_AppointmentRepository
.
GetStudentVisitStaticRepository
(
new
RB_Student_Appointment_Extend
()
int
a
ppointmentCount
=
student_AppointmentRepository
.
GetStudentVisitStaticRepository
(
new
RB_Student_Appointment_Extend
()
{
{
CreateBy
=
createBy
,
CreateBy
=
createBy
,
QueryDate
=
today
QueryDate
=
today
})?.
FirstOrDefault
()?.
AppointmentCount
??
0
;
})?.
FirstOrDefault
()?.
AppointmentCount
??
0
;
//今日新增同行
var
customerCount
=
customerRepository
.
GetCustomerStaticRepository
(
new
RB_Customer_Extend
()
{
CreateBy
=
createBy
,
QDate
=
today
})?.
FirstOrDefault
()?.
CustomerCount
??
0
;
//今日试听
var
trialLessonCount
=
visitor_ReserveRepository
.
GetVisitorReserveStaticRepository
(
new
Model
.
ViewModel
.
Reserve
.
RB_Visitor_Reserve_Extend
()
{
CreateBy
=
createBy
,
QDate
=
today
})?.
FirstOrDefault
()?.
TrialLessonCount
??
0
;
//未沟通人数
var
notCommunicateCount
=
studentRepository
.
GetStudentListRepository
(
new
RB_Student_ViewModel
()
{
CreateBy
=
createBy
,
StuStage
=
1
})?.
Count
();
object
obj
=
new
object
obj
=
new
{
{
todayAdd
,
todayAdd
,
todayVisit
,
todayVisit
,
AppointmentCount
appointmentCount
,
customerCount
,
trialLessonCount
,
notCommunicateCount
};
};
return
obj
;
return
obj
;
}
}
...
...
Edu.Repository/Customer/RB_CustomerRepository.cs
View file @
2c282165
...
@@ -181,5 +181,39 @@ WHERE s.`Status`=0 and s.Group_Id ={group_Id} and s.CustomerId in({customerIds})
...
@@ -181,5 +181,39 @@ WHERE s.`Status`=0 and s.Group_Id ={group_Id} and s.CustomerId in({customerIds})
WHERE o.OrderState in(1,2) and o.Group_Id =
{
group_Id
}
and o.CustomerId in(
{
customerIds
}
) GROUP BY o.CustomerId"
;
WHERE o.OrderState in(1,2) and o.Group_Id =
{
group_Id
}
and o.CustomerId in(
{
customerIds
}
) GROUP BY o.CustomerId"
;
return
Get
<
RB_Customer_Extend
>(
sql
).
ToList
();
return
Get
<
RB_Customer_Extend
>(
sql
).
ToList
();
}
}
/// <summary>
/// 同行统计
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Customer_Extend
>
GetCustomerStaticRepository
(
RB_Customer_Extend
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT A.CreateBy,COUNT(1) AS CustomerCount
FROM RB_Customer AS A
WHERE 1=1
"
);
builder
.
AppendFormat
(
" A.{0}={1} "
,
nameof
(
RB_Customer_Extend
.
Status
),
(
int
)
DateStateEnum
.
Normal
);
if
(
query
!=
null
)
{
if
(
query
.
Group_Id
>
0
)
{
builder
.
AppendFormat
(
" A.{0}={1} "
,
nameof
(
RB_Customer_Extend
.
Group_Id
),
query
.
Group_Id
);
}
if
(
query
.
CreateBy
>
0
)
{
builder
.
AppendFormat
(
" A.{0}={1} "
,
nameof
(
RB_Customer_Extend
.
CreateBy
),
query
.
CreateBy
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
QDate
))
{
//今日到访
builder
.
AppendFormat
(
" AND DATE_FORMAT(A.{0},'%y/%m/%d')= DATE_FORMAT('{1}','%y/%m/%d') "
,
nameof
(
RB_Customer_Extend
.
CreateTime
),
query
.
QDate
);
}
}
builder
.
AppendFormat
(
@" GROUP BY A.CreateBy "
);
return
Get
<
RB_Customer_Extend
>(
builder
.
ToString
()).
ToList
();
}
}
}
}
}
Edu.Repository/Reserve/RB_Visitor_ReserveRepository.cs
View file @
2c282165
...
@@ -254,5 +254,39 @@ WHERE 1=1
...
@@ -254,5 +254,39 @@ WHERE 1=1
return
Get
<
RB_Visitor_Reserve_Extend
>(
builder
.
ToString
(),
parameters
).
ToList
();
return
Get
<
RB_Visitor_Reserve_Extend
>(
builder
.
ToString
(),
parameters
).
ToList
();
}
}
/// <summary>
/// 试听课统计
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Visitor_Reserve_Extend
>
GetVisitorReserveStaticRepository
(
RB_Visitor_Reserve_Extend
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT A.CreateBy,COUNT(1) AS TrialLessonCount
FROM RB_Visitor_Reserve AS A
WHERE 1=1
"
);
builder
.
AppendFormat
(
" A.{0}={1} "
,
nameof
(
RB_Visitor_Reserve_Extend
.
Status
),
(
int
)
DateStateEnum
.
Normal
);
if
(
query
!=
null
)
{
if
(
query
.
Group_Id
>
0
)
{
builder
.
AppendFormat
(
" A.{0}={1} "
,
nameof
(
RB_Visitor_Reserve_Extend
.
Group_Id
),
query
.
Group_Id
);
}
if
(
query
.
CreateBy
>
0
)
{
builder
.
AppendFormat
(
" A.{0}={1} "
,
nameof
(
RB_Visitor_Reserve_Extend
.
CreateBy
),
query
.
CreateBy
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
QDate
))
{
//今日到访
builder
.
AppendFormat
(
" AND DATE_FORMAT(A.{0},'%y/%m/%d')= DATE_FORMAT('{1}','%y/%m/%d') "
,
nameof
(
RB_Visitor_Reserve_Extend
.
CreateTime
),
query
.
QDate
);
}
}
builder
.
AppendFormat
(
@" GROUP BY A.CreateBy "
);
return
Get
<
RB_Visitor_Reserve_Extend
>(
builder
.
ToString
()).
ToList
();
}
}
}
}
}
Edu.Repository/User/RB_StudentRepository.cs
View file @
2c282165
...
@@ -115,6 +115,14 @@ WHERE 1=1
...
@@ -115,6 +115,14 @@ WHERE 1=1
{
{
builder
.
AppendFormat
(
" AND t.{0} in({1}) "
,
nameof
(
RB_Student_ViewModel
.
StuId
),
query
.
StuIds
);
builder
.
AppendFormat
(
" AND t.{0} in({1}) "
,
nameof
(
RB_Student_ViewModel
.
StuId
),
query
.
StuIds
);
}
}
if
(
query
.
StuStage
>
0
)
{
builder
.
AppendFormat
(
" AND t.{0}={1} "
,
nameof
(
RB_Student_ViewModel
.
StuStage
),
(
int
)
query
.
StuStage
);
}
if
(
query
.
CreateBy
>
0
)
{
builder
.
AppendFormat
(
" AND t.{0}={1} "
,
nameof
(
RB_Student_ViewModel
.
CreateBy
),
query
.
CreateBy
);
}
}
}
return
Get
<
RB_Student_ViewModel
>(
builder
.
ToString
(),
parameters
).
ToList
();
return
Get
<
RB_Student_ViewModel
>(
builder
.
ToString
(),
parameters
).
ToList
();
}
}
...
...
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