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
1797e725
Commit
1797e725
authored
Jan 14, 2022
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
d1a44042
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
4 deletions
+32
-4
RB_Student_OrderGuestRepository.cs
Edu.Repository/User/RB_Student_OrderGuestRepository.cs
+32
-4
No files found.
Edu.Repository/User/RB_Student_OrderGuestRepository.cs
View file @
1797e725
...
...
@@ -273,7 +273,11 @@ INNER JOIN rb_order o on sog.OrderId = o.OrderId
if
(
demodel
.
StuType
>
0
)
{
where
+=
$" and s.
{
nameof
(
RB_Student_ViewModel
.
StuType
)}
=
{
demodel
.
StuType
}
"
;
}
}
if
(
demodel
.
StuChannel
>
0
)
{
where
+=
$" and s.
{
nameof
(
RB_Student_ViewModel
.
StuChannel
)}
=
{
demodel
.
StuChannel
}
"
;
}
if
(
demodel
.
StuGuestState
>
0
)
{
where
+=
$" and org.GuestState =
{(
int
)
demodel
.
StuGuestState
}
"
;
...
...
@@ -411,6 +415,10 @@ LEFT JOIN rb_education_contract ec on ec.GuestId = og.GuestId";
{
where
+=
$" and org.GuestState =
{(
int
)
demodel
.
StuGuestState
}
"
;
}
if
(
demodel
.
StuChannel
>
0
)
{
where
+=
$" and s.
{
nameof
(
RB_Student_ViewModel
.
StuChannel
)}
=
{
demodel
.
StuChannel
}
"
;
}
if
(
demodel
.
StuStage
>
0
)
{
where
+=
$" and s.
{
nameof
(
RB_Student_ViewModel
.
StuStage
)}
=
{
demodel
.
StuStage
}
"
;
...
...
@@ -553,6 +561,10 @@ LEFT JOIN rb_education_contract ec on ec.GuestId = og.GuestId";
{
where
+=
$" and s.
{
nameof
(
RB_Student_ViewModel
.
StuType
)}
=
{
demodel
.
StuType
}
"
;
}
if
(
demodel
.
StuChannel
>
0
)
{
where
+=
$" and s.
{
nameof
(
RB_Student_ViewModel
.
StuChannel
)}
=
{
demodel
.
StuChannel
}
"
;
}
if
(
demodel
.
StuGuestState
>
0
)
{
where
+=
$" and og.GuestState =
{(
int
)
demodel
.
StuGuestState
}
"
;
...
...
@@ -574,6 +586,17 @@ LEFT JOIN rb_education_contract ec on ec.GuestId = og.GuestId";
{
where
+=
$@" AND s.StuId IN (SELECT StuId FROM rb_student_assist WHERE AssistId =
{
demodel
.
ConsultantId
}
AND `Status`=0)"
;
}
if
(!
string
.
IsNullOrEmpty
(
demodel
.
SFTime
)
&&
!
string
.
IsNullOrEmpty
(
demodel
.
EFTime
))
{
if
(
demodel
.
Q_FType
==
1
)
{
where
+=
$" and f.Id is not null"
;
}
else
{
where
+=
$" and f.Id is null"
;
}
}
if
(
demodel
.
BelongType
>
0
)
{
//全部
...
...
@@ -622,13 +645,18 @@ LEFT JOIN (
SELECT sog.Student_Id,MAX(og.Id) AS GuestId FROM rb_student_orderguest sog
INNER JOIN rb_order o on sog.OrderId = o.OrderId
INNER JOIN rb_order_guest og on sog.GuestId = og.Id
WHERE o.Group_Id =
100000
and sog.`Status` =0 and o.OrderState <>3 and og.`Status` =0 GROUP BY sog.Student_Id
WHERE o.Group_Id =
{
demodel
.
Group_Id
}
and sog.`Status` =0 and o.OrderState <>3 and og.`Status` =0 GROUP BY sog.Student_Id
) ot on s.StuId = ot.Student_Id
LEFT JOIN rb_order_guest og on ot.GuestId = og.Id
LEFT JOIN rb_order o on og.OrderId = o.OrderId
LEFT JOIN rb_course c on o.CourseId = c.CourseId
LEFT JOIN rb_channel ch on s.StuChannel = ch.Id
WHERE
{
where
}
LEFT JOIN rb_channel ch on s.StuChannel = ch.Id"
;
if
(!
string
.
IsNullOrEmpty
(
demodel
.
SFTime
)
&&
!
string
.
IsNullOrEmpty
(
demodel
.
EFTime
))
{
//增加跟进链表
sql
+=
$@" LEFT JOIN rb_student_follow f on s.StuId = f.StuId and f.`Status` =0 and f.AssistType =2 and f.CreateTime >='
{
demodel
.
SFTime
}
' and f.CreateTime <='
{
demodel
.
EFTime
}
23:59:59'"
;
}
sql
+=
$@" WHERE
{
where
}
GROUP BY s.StuId order by s.StuId desc"
;
return
GetPage
<
RB_Student_ViewModel
>(
pageIndex
,
pageSize
,
out
count
,
sql
,
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