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
3052f66f
Commit
3052f66f
authored
May 13, 2022
by
liudong1993
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/Kui2/education
parents
e27d05bf
85e87afe
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
79 additions
and
23 deletions
+79
-23
RB_Student_ViewModel.cs
Edu.Model/ViewModel/User/RB_Student_ViewModel.cs
+5
-0
ActivitySurveyModule.cs
Edu.Module.Goods/ActivitySurveyModule.cs
+2
-2
StudentModule.cs
Edu.Module.User/StudentModule.cs
+31
-10
RB_Student_AppointmentRepository.cs
Edu.Repository/Customer/RB_Student_AppointmentRepository.cs
+20
-8
RB_StudentRepository.cs
Edu.Repository/User/RB_StudentRepository.cs
+5
-1
UserCenterController.cs
Edu.WebApi/Controllers/User/UserCenterController.cs
+16
-2
No files found.
Edu.Model/ViewModel/User/RB_Student_ViewModel.cs
View file @
3052f66f
...
...
@@ -450,5 +450,10 @@ namespace Edu.Model.ViewModel.User
/// 查询未跟进学员
/// </summary>
public
int
IsQueryNotFollow
{
get
;
set
;
}
/// <summary>
/// 查询未跟进的线索
/// </summary>
public
int
IsQueryNotAppointment
{
get
;
set
;
}
}
}
\ No newline at end of file
Edu.Module.Goods/ActivitySurveyModule.cs
View file @
3052f66f
...
...
@@ -52,6 +52,7 @@ namespace Edu.Module.Goods
public
bool
SetActivitySurveyGuestModule
(
RB_ActivitySurvey_Guest_Extend
model
)
{
bool
flag
=
false
;
bool
isAdd
=
model
.
Id
>
0
;
foreach
(
var
item
in
model
.
GuestIdList
)
{
//var oldModel = activitySurvey_GuestRepository.GetActivitySurveyGuestListRepository(new RB_ActivitySurvey_Guest_Extend()
...
...
@@ -62,7 +63,7 @@ namespace Edu.Module.Goods
//model.Id = oldModel?.Id ?? 0;
model
.
GuestId
=
item
.
GuestId
;
if
(
model
.
Id
>
0
)
if
(
isAdd
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
...
...
@@ -76,7 +77,6 @@ namespace Edu.Module.Goods
else
{
var
newId
=
activitySurvey_GuestRepository
.
Insert
(
model
);
model
.
Id
=
newId
;
flag
=
newId
>
0
;
}
}
...
...
Edu.Module.User/StudentModule.cs
View file @
3052f66f
...
...
@@ -1376,12 +1376,13 @@ namespace Edu.Module.User
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="CreateBy"></param>
/// <param name="UserType">1-课程顾问,2-老师</param>
/// <returns></returns>
public
List
<
object
>
GetTodayConnectPageModule
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
int
CreateBy
)
public
List
<
object
>
GetTodayConnectPageModule
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
int
CreateBy
,
int
UserType
=
0
)
{
List
<
object
>
result
=
new
List
<
object
>();
var
list
=
student_AppointmentRepository
.
GetTodayConnectPageRepository
(
pageIndex
,
pageSize
,
out
rowsCount
,
Common
.
ConvertHelper
.
FormatDate
(
DateTime
.
Now
),
CreateBy
);
var
list
=
student_AppointmentRepository
.
GetTodayConnectPageRepository
(
pageIndex
,
pageSize
,
out
rowsCount
,
Common
.
ConvertHelper
.
FormatDate
(
DateTime
.
Now
),
CreateBy
,
UserType
:
UserType
);
if
(
list
!=
null
&&
list
.
Count
>
0
)
{
//客户阶段列表
...
...
@@ -1497,9 +1498,10 @@ namespace Edu.Module.User
rowsCount
=
0
;
var
query
=
new
RB_Student_ViewModel
()
{
IsQueryNotFollow
=
1
,
IsQueryMyStu
=
1
,
CreateBy
=
UserId
IsQueryNotAppointment
=
1
,
BelongType
=
1
,
CreateBy
=
UserId
,
QStudentStatus
=
1
,
};
List
<
object
>
result
=
new
List
<
object
>();
var
list
=
studentRepository
.
GetStudentPageListRepository
(
pageIndex
,
pageSize
,
out
rowsCount
,
query
);
...
...
@@ -1731,8 +1733,9 @@ namespace Edu.Module.User
var
query
=
new
RB_Student_ViewModel
()
{
IsQueryNotFollow
=
1
,
IsQueryMyStu
=
1
,
CreateBy
=
UserId
BelongType
=
1
,
CreateBy
=
UserId
,
QStudentStatus
=
1
,
};
List
<
object
>
result
=
new
List
<
object
>();
var
list
=
studentRepository
.
GetStudentPageListRepository
(
pageIndex
,
pageSize
,
out
rowsCount
,
query
);
...
...
@@ -2150,9 +2153,27 @@ namespace Edu.Module.User
item
.
ClassNo
,
item
.
ClassSchoolId
,
item
.
SchoolName
,
item
.
SaleRemarkList
,
item
.
GuestList
,
item
.
ContractList
,
SaleRemarkList
=
item
?.
SaleRemarkList
.
Select
(
qitem
=>
new
{
qitem
.
Content
,
qitem
.
CreateByName
,
CreateTime
=
Common
.
ConvertHelper
.
FormatTime
(
qitem
.
CreateTime
)
}),
GuestList
=
item
?.
GuestList
.
Select
(
qitem
=>
new
{
qitem
.
Id
,
qitem
.
GuestName
,
qitem
.
ClassName
,
qitem
.
ClassNo
,
qitem
.
CourseName
,
qitem
.
GuestState
,
qitem
.
GuestStateStr
,
qitem
.
ContractId
,
qitem
.
ContractStatusStr
,
qitem
.
ContractNo
,
qitem
.
TotalHours
,
qitem
.
CompleteHours
,
qitem
.
ValidClassHours
,
}),
item
.
CourseName
,
item
.
CourseImg
,
item
.
CourseSubject
,
...
...
Edu.Repository/Customer/RB_Student_AppointmentRepository.cs
View file @
3052f66f
...
...
@@ -107,19 +107,21 @@ WHERE 1=1
return
Get
<
RB_Student_Appointment_Extend
>(
builder
.
ToString
()).
ToList
();
}
/// <summary>
/// 今日需联系学员(之前预约的跟进学员或本周期内需要跟进的学员)
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name=""></param>
/// <param name="date">日期</param>
/// <param name="CreateBy">创建人</param>
/// <param name="UserType">1-课程顾问,2-老师</param>
/// <returns></returns>
public
List
<
RB_Student_ViewModel
>
GetTodayConnectPageRepository
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
string
date
,
int
CreateBy
)
public
List
<
RB_Student_ViewModel
>
GetTodayConnectPageRepository
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
string
date
,
int
CreateBy
,
int
UserType
=
0
)
{
StringBuilder
builder
=
new
StringBuilder
();
string
where1
=
""
,
where2
=
""
;
string
where1
=
""
,
where2
=
""
,
tempWhere
=
""
;
if
(!
string
.
IsNullOrEmpty
(
date
))
{
//指定日期的约访统计
...
...
@@ -129,7 +131,7 @@ WHERE 1=1
date
);
}
if
(
CreateBy
>
0
)
{
where1
+=
string
.
Format
(
" AND B.{0}={1} "
,
nameof
(
RB_Student_Appointment_Extend
.
CreateBy
),
CreateBy
);
...
...
@@ -140,6 +142,16 @@ WHERE 1=1
"
,
CreateBy
);
}
//课程顾问
if
(
UserType
==
1
)
{
tempWhere
+=
string
.
Format
(
@" AND DATE_FORMAT(CreateTime, '%Y%m' )=DATE_FORMAT(NOW() , '%Y%m' ) "
);
}
else
if
(
UserType
==
2
)
{
tempWhere
+=
string
.
Format
(
@" AND WEEK(CreateTime,1)=WEEK(NOW(),1) "
);
}
builder
.
AppendFormat
(
@"
SELECT *
FROM
...
...
@@ -150,10 +162,10 @@ FROM
UNION ALL
SELECT A.*
FROM rb_student AS A
LEFT JOIN (SELECT StuId,COUNT(1) AS FollowCount FROM rb_student_follow WHERE
WEEK(CreateTime,1)=WEEK(NOW(),1)
GROUP BY StuId ) AS B ON A.StuId=B.StuId
LEFT JOIN (SELECT StuId,COUNT(1) AS FollowCount FROM rb_student_follow WHERE
1=1 {2}
GROUP BY StuId ) AS B ON A.StuId=B.StuId
WHERE 1=1 AND IFNULL(B.FollowCount,0)=0 {1}
) AS A
"
,
where1
,
where2
);
) AS A
WHERE A.School_Id NOT IN(1,6,9) AND A.`Status`=0 AND A.StuStage<>7 AND A.AdvisorStatus<>7
"
,
where1
,
where2
,
tempWhere
);
return
GetPage
<
RB_Student_ViewModel
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
()).
ToList
();
}
}
...
...
Edu.Repository/User/RB_StudentRepository.cs
View file @
3052f66f
...
...
@@ -458,7 +458,11 @@ WHERE 1=1
nameof
(
RB_Student_ViewModel
.
StuSourceId
),
query
.
StuSourceId
);
}
//查询未未跟进的线索
if
(
query
.
IsQueryNotAppointment
==
1
)
{
builder
.
AppendFormat
(
" AND Exists(SELECT StuId FROM RB_Student_Appointment WHERE `Status`=0 AND t.StuId=StuId AND IFNULL(Feedback,'')='') "
);
}
//查询未跟进学员
if
(
query
.
IsQueryNotFollow
==
1
)
{
...
...
Edu.WebApi/Controllers/User/UserCenterController.cs
View file @
3052f66f
...
...
@@ -3338,8 +3338,19 @@ namespace Edu.WebApi.Controllers.User
/// </summary>
public
ApiResult
GetTodayConnect
()
{
var
userId
=
0
;
//userId = base.UserInfo.Id;
int
UserType
=
0
;
if
(
base
.
UserInfo
.
IsCourseConsultant
==
1
)
{
UserType
=
1
;
}
else
if
(
base
.
UserInfo
.
AccountType
==
AccountTypeEnum
.
Teacher
)
{
UserType
=
2
;
}
var
pageModel
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
Msg
.
ToString
());
var
list
=
studentModule
.
GetTodayConnectPageModule
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
rowsCount
,
base
.
UserInfo
.
Id
);
var
list
=
studentModule
.
GetTodayConnectPageModule
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
rowsCount
,
userId
,
UserType
:
UserType
);
pageModel
.
PageData
=
list
;
pageModel
.
Count
=
rowsCount
;
return
ApiResult
.
Success
(
data
:
pageModel
);
...
...
@@ -3351,8 +3362,10 @@ namespace Edu.WebApi.Controllers.User
/// <returns></returns>
public
ApiResult
MyClue
()
{
var
userId
=
0
;
userId
=
base
.
UserInfo
.
Id
;
var
pageModel
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
Msg
.
ToString
());
var
list
=
studentModule
.
GetMyClueModule
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
rowsCount
,
base
.
UserInfo
.
Id
);
var
list
=
studentModule
.
GetMyClueModule
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
rowsCount
,
user
Id
);
pageModel
.
PageData
=
list
;
pageModel
.
Count
=
rowsCount
;
return
ApiResult
.
Success
(
data
:
pageModel
);
...
...
@@ -3365,6 +3378,7 @@ namespace Edu.WebApi.Controllers.User
public
ApiResult
MyStudent
()
{
var
userId
=
0
;
userId
=
2855
;
//userId = base.UserInfo.Id;
var
pageModel
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
Msg
.
ToString
());
var
list
=
studentModule
.
GetMyStudentModule
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
rowsCount
,
userId
);
...
...
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