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
0d2ff303
Commit
0d2ff303
authored
Jan 14, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
ab51663f
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
91 additions
and
5 deletions
+91
-5
RB_Student_Visit_Extend.cs
Edu.Model/ViewModel/Customer/RB_Student_Visit_Extend.cs
+5
-0
RB_Visitor_Reserve_Extend.cs
Edu.Model/ViewModel/Reserve/RB_Visitor_Reserve_Extend.cs
+5
-0
MarketConsultantModule.cs
Edu.Module.Customer/MarketConsultantModule.cs
+71
-3
RB_Student_VisitRepository.cs
Edu.Repository/Customer/RB_Student_VisitRepository.cs
+4
-0
RB_Visitor_ReserveRepository.cs
Edu.Repository/Reserve/RB_Visitor_ReserveRepository.cs
+4
-0
UserCenterController.cs
Edu.WebApi/Controllers/User/UserCenterController.cs
+2
-2
No files found.
Edu.Model/ViewModel/Customer/RB_Student_Visit_Extend.cs
View file @
0d2ff303
...
...
@@ -75,5 +75,10 @@ namespace Edu.Model.ViewModel.Customer
/// 到访次数
/// </summary>
public
int
VisitCount
{
get
;
set
;
}
/// <summary>
/// 创建人【查询使用】
/// </summary>
public
string
QCreateByIds
{
get
;
set
;
}
}
}
Edu.Model/ViewModel/Reserve/RB_Visitor_Reserve_Extend.cs
View file @
0d2ff303
...
...
@@ -180,5 +180,10 @@ namespace Edu.Model.ViewModel.Reserve
/// 查询日期
/// </summary>
public
string
QDate
{
get
;
set
;
}
/// <summary>
/// 创建人
/// </summary>
public
string
QCreateByIds
{
get
;
set
;
}
}
}
Edu.Module.Customer/MarketConsultantModule.cs
View file @
0d2ff303
using
Edu.Repository.User
;
using
Edu.Repository.Customer
;
using
Edu.Repository.Reserve
;
using
Edu.Repository.User
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
System.Linq
;
using
Edu.Model.ViewModel.Customer
;
using
Edu.Repository.Sell
;
namespace
Edu.Module.Customer
{
...
...
@@ -15,6 +20,27 @@ namespace Edu.Module.Customer
/// </summary>
private
readonly
RB_StudentRepository
studentRepository
=
new
RB_StudentRepository
();
/// <summary>
/// 学员跟进仓储层对象
/// </summary>
private
readonly
RB_Student_FollowRepository
student_FollowRepository
=
new
RB_Student_FollowRepository
();
/// <summary>
/// 学员试听仓储层对象
/// </summary>
private
readonly
RB_Visitor_ReserveRepository
visitor_ReserveRepository
=
new
RB_Visitor_ReserveRepository
();
/// <summary>
/// 学员到访仓储层对象
/// </summary>
private
readonly
RB_Student_VisitRepository
student_VisitRepository
=
new
RB_Student_VisitRepository
();
/// <summary>
/// 订单仓储层对象
/// </summary>
private
readonly
RB_OrderRepository
orderRepository
=
new
RB_OrderRepository
();
/// <summary>
/// 市场人员统计
/// </summary>
...
...
@@ -22,9 +48,51 @@ namespace Edu.Module.Customer
public
object
MarketStaticModule
(
string
EmpIds
,
string
StartTime
,
string
EndTime
)
{
object
obj
=
new
object
();
var
totalTotal
=
studentRepository
.
GetStudentClueRepository
(
EmpIds
,
StartTime
,
EndTime
);
DateTime
start
=
Convert
.
ToDateTime
(
StartTime
);
DateTime
end
=
Convert
.
ToDateTime
(
EndTime
);
var
days
=
(
end
-
start
).
Days
;
//线索列表
var
studentList
=
studentRepository
.
GetStudentClueRepository
(
EmpIds
,
StartTime
,
EndTime
);
//试听列表
var
trialLessonList
=
visitor_ReserveRepository
.
GetVisitorReserveStaticRepository
(
new
Model
.
ViewModel
.
Reserve
.
RB_Visitor_Reserve_Extend
()
{
QCreateByIds
=
EmpIds
,
StartClassDate
=
StartTime
,
EndClassDate
=
EndTime
});
//到访列表
var
visitList
=
student_VisitRepository
.
GetStudentVisitStaticRepository
(
new
RB_Student_Visit_Extend
()
{
QCreateByIds
=
EmpIds
,
StartDate
=
StartTime
,
EndDate
=
EndTime
});
List
<
object
>
dayList
=
new
List
<
object
>();
for
(
var
i
=
0
;
i
<
days
;
i
++)
{
DateTime
newDate
=
start
.
AddDays
(
i
);
var
tempStuList
=
studentList
?.
Where
(
qitem
=>
Common
.
ConvertHelper
.
FormatMonthDay
(
qitem
.
CreateTime
)
==
Common
.
ConvertHelper
.
FormatMonthDay
(
newDate
))?.
ToList
();
var
tempTrialLessonList
=
trialLessonList
?.
Where
(
qitem
=>
Common
.
ConvertHelper
.
FormatMonthDay
(
qitem
.
CreateTime
)
==
Common
.
ConvertHelper
.
FormatMonthDay
(
newDate
))?.
ToList
();
var
tempVisitList
=
visitList
?.
Where
(
qitem
=>
Common
.
ConvertHelper
.
FormatMonthDay
(
qitem
.
CreateTime
)
==
Common
.
ConvertHelper
.
FormatMonthDay
(
newDate
))?.
ToList
();
dayList
.
Add
(
new
{
DayStr
=
Common
.
ConvertHelper
.
FormatMonthDay
(
newDate
),
//新增线索条数
ClueCount
=
tempStuList
?.
FirstOrDefault
()?.
ClueCount
??
0
,
//试听人数
TrialLessonCount
=
tempTrialLessonList
?.
Sum
(
qitem
=>
qitem
.
TrialLessonCount
)
??
0
,
//到访人数
VisitCount
=
tempVisitList
?.
Sum
(
qitem
=>
qitem
.
VisitCount
)
??
0
,
});
}
obj
=
new
{
dayList
};
return
obj
;
}
...
...
@@ -35,7 +103,7 @@ namespace Edu.Module.Customer
public
object
ConsultantStaticModule
(
string
EmpIds
,
string
StartTime
,
string
EndTime
)
{
object
obj
=
new
object
();
var
totalTotal
=
studentRepository
.
GetStudentClueRepository
(
EmpIds
,
StartTime
,
EndTime
);
return
obj
;
}
}
...
...
Edu.Repository/Customer/RB_Student_VisitRepository.cs
View file @
0d2ff303
...
...
@@ -116,6 +116,10 @@ WHERE 1=1
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Student_Visit_Extend
.
CreateBy
),
query
.
CreateBy
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
QCreateByIds
))
{
builder
.
AppendFormat
(
" AND A.{0} IN({1}) "
,
nameof
(
RB_Student_Visit_Extend
.
CreateBy
),
query
.
QCreateByIds
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
StartDate
))
{
builder
.
AppendFormat
(
" AND A.{0}>='{1}' "
,
nameof
(
RB_Student_Visit_Extend
.
CreateTime
),
Common
.
ConvertHelper
.
FormatDate
(
query
.
StartDate
));
...
...
Edu.Repository/Reserve/RB_Visitor_ReserveRepository.cs
View file @
0d2ff303
...
...
@@ -283,6 +283,10 @@ WHERE 1=1
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Visitor_Reserve_Extend
.
CreateBy
),
query
.
CreateBy
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
QCreateByIds
))
{
builder
.
AppendFormat
(
" AND A.{0} IN({1}) "
,
nameof
(
RB_Visitor_Reserve_Extend
.
CreateBy
),
query
.
QCreateByIds
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
QDate
))
{
//指定日期的试听课数量
...
...
Edu.WebApi/Controllers/User/UserCenterController.cs
View file @
0d2ff303
...
...
@@ -2531,8 +2531,8 @@ namespace Edu.WebApi.Controllers.User
public
ApiResult
MarketStatic
()
{
string
employeeIds
=
""
;
string
startTime
=
""
;
string
endTime
=
""
;
string
startTime
=
"
2022-01-01
"
;
string
endTime
=
"
2022-01-30
"
;
var
obj
=
marketConsultantModule
.
MarketStaticModule
(
employeeIds
,
startTime
,
endTime
);
return
ApiResult
.
Success
(
data
:
obj
);
}
...
...
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