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
c2e113d1
Commit
c2e113d1
authored
Feb 25, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
035f9290
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
94 additions
and
76 deletions
+94
-76
MarketConsultantModule.cs
Edu.Module.Customer/MarketConsultantModule.cs
+61
-43
RB_Student_FollowRepository.cs
Edu.Repository/Customer/RB_Student_FollowRepository.cs
+12
-12
RB_Student_VisitRepository.cs
Edu.Repository/Customer/RB_Student_VisitRepository.cs
+4
-4
RB_Visitor_ReserveRepository.cs
Edu.Repository/Reserve/RB_Visitor_ReserveRepository.cs
+4
-4
RB_OrderRepository.cs
Edu.Repository/Sell/RB_OrderRepository.cs
+4
-4
RB_StudentRepository.cs
Edu.Repository/User/RB_StudentRepository.cs
+5
-5
UserCenterController.cs
Edu.WebApi/Controllers/User/UserCenterController.cs
+4
-4
No files found.
Edu.Module.Customer/MarketConsultantModule.cs
View file @
c2e113d1
This diff is collapsed.
Click to expand it.
Edu.Repository/Customer/RB_Student_FollowRepository.cs
View file @
c2e113d1
...
...
@@ -209,11 +209,11 @@ WHERE A.Status=0 AND C.Status=0 AND C.StuStage<>7 {0}
string
curWeek
=
""
;
if
(!
string
.
IsNullOrEmpty
(
query
.
STime
))
{
curWeek
+=
string
.
Format
(
" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d'
)) = YEARWEEK('{0}'
) "
,
query
.
STime
);
curWeek
+=
string
.
Format
(
" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d'
),1) = YEARWEEK('{0}',1
) "
,
query
.
STime
);
}
else
{
curWeek
+=
string
.
Format
(
" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d')
) = YEARWEEK(now()
) "
);
curWeek
+=
string
.
Format
(
" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d')
,1) = YEARWEEK(now(),1
) "
);
}
var
curWeekList
=
Get
<
RB_Student_Follow_Extend
>(
string
.
Format
(
sql
,
curWeek
)).
ToList
();
dicList
.
Add
(
"currentWeek"
,
curWeekList
);
...
...
@@ -222,11 +222,11 @@ WHERE A.Status=0 AND C.Status=0 AND C.StuStage<>7 {0}
string
lastWeek
=
""
;
if
(!
string
.
IsNullOrEmpty
(
query
.
STime
))
{
lastWeek
+=
string
.
Format
(
" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d')
) = YEARWEEK('{0}'
)-1 "
,
query
.
STime
);
lastWeek
+=
string
.
Format
(
" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d')
,1) = YEARWEEK('{0}',1
)-1 "
,
query
.
STime
);
}
else
{
lastWeek
+=
string
.
Format
(
" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d')
) = YEARWEEK(now()
)-1 "
);
lastWeek
+=
string
.
Format
(
" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d')
,1) = YEARWEEK(now(),1
)-1 "
);
}
var
lastWeekList
=
Get
<
RB_Student_Follow_Extend
>(
string
.
Format
(
sql
,
lastWeek
)).
ToList
();
dicList
.
Add
(
"lastWeek"
,
lastWeekList
);
...
...
@@ -308,11 +308,11 @@ WHERE A.Status=0 {0}
string
curWeek
=
""
;
if
(!
string
.
IsNullOrEmpty
(
query
.
STime
))
{
curWeek
+=
string
.
Format
(
" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d' )
) = YEARWEEK('{0}'
) "
,
query
.
STime
);
curWeek
+=
string
.
Format
(
" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d' )
,1) = YEARWEEK('{0}',1
) "
,
query
.
STime
);
}
else
{
curWeek
+=
string
.
Format
(
" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d')
) = YEARWEEK(now()
) "
);
curWeek
+=
string
.
Format
(
" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d')
,1) = YEARWEEK(now(),1
) "
);
}
var
curWeekList
=
Get
<
RB_Student_Follow_Extend
>(
string
.
Format
(
sql
,
curWeek
)).
ToList
();
dicList
.
Add
(
"currentWeek"
,
curWeekList
);
...
...
@@ -321,11 +321,11 @@ WHERE A.Status=0 {0}
string
lastWeek
=
""
;
if
(!
string
.
IsNullOrEmpty
(
query
.
STime
))
{
lastWeek
+=
string
.
Format
(
" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d')
) = YEARWEEK('{0}'
)-1 "
,
query
.
STime
);
lastWeek
+=
string
.
Format
(
" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d')
,1) = YEARWEEK('{0}',1
)-1 "
,
query
.
STime
);
}
else
{
lastWeek
+=
string
.
Format
(
" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d')
) = YEARWEEK(now()
)-1 "
);
lastWeek
+=
string
.
Format
(
" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d')
,1) = YEARWEEK(now(),1
)-1 "
);
}
var
lastWeekList
=
Get
<
RB_Student_Follow_Extend
>(
string
.
Format
(
sql
,
lastWeek
)).
ToList
();
dicList
.
Add
(
"lastWeek"
,
lastWeekList
);
...
...
@@ -413,11 +413,11 @@ SELECT Avg(FollowCount) AS FollowEffectiveCount FROM
string
curWeek
=
""
;
if
(!
string
.
IsNullOrEmpty
(
query
.
STime
))
{
curWeek
+=
string
.
Format
(
" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d'
)) = YEARWEEK('{0}'
) "
,
query
.
STime
);
curWeek
+=
string
.
Format
(
" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d'
),1) = YEARWEEK('{0}',1
) "
,
query
.
STime
);
}
else
{
curWeek
+=
string
.
Format
(
" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d')
) = YEARWEEK(now()
) "
);
curWeek
+=
string
.
Format
(
" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d')
,1) = YEARWEEK(now(),1
) "
);
}
var
curWeekList
=
Get
<
RB_Student_Follow_Extend
>(
string
.
Format
(
sql
,
curWeek
)).
ToList
();
dicList
.
Add
(
"currentWeek"
,
curWeekList
);
...
...
@@ -426,11 +426,11 @@ SELECT Avg(FollowCount) AS FollowEffectiveCount FROM
string
lastWeek
=
""
;
if
(!
string
.
IsNullOrEmpty
(
query
.
STime
))
{
lastWeek
+=
string
.
Format
(
" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d')
) = YEARWEEK('{0}'
)-1 "
,
query
.
STime
);
lastWeek
+=
string
.
Format
(
" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d')
,1) = YEARWEEK('{0}',1
)-1 "
,
query
.
STime
);
}
else
{
lastWeek
+=
string
.
Format
(
" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d')
) = YEARWEEK(now()
)-1 "
);
lastWeek
+=
string
.
Format
(
" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d')
,1) = YEARWEEK(now(),1
)-1 "
);
}
var
lastWeekList
=
Get
<
RB_Student_Follow_Extend
>(
string
.
Format
(
sql
,
lastWeek
)).
ToList
();
dicList
.
Add
(
"lastWeek"
,
lastWeekList
);
...
...
Edu.Repository/Customer/RB_Student_VisitRepository.cs
View file @
c2e113d1
...
...
@@ -239,11 +239,11 @@ WHERE 1=1 AND B.Status=0 {0}
string
curWeek
=
""
;
if
(!
string
.
IsNullOrEmpty
(
query
.
StartDate
))
{
curWeek
+=
string
.
Format
(
" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d'
)) = YEARWEEK('{0}'
) "
,
query
.
StartDate
);
curWeek
+=
string
.
Format
(
" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d'
),1) = YEARWEEK('{0}',1
) "
,
query
.
StartDate
);
}
else
{
curWeek
+=
string
.
Format
(
" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d')
) = YEARWEEK(now()
) "
);
curWeek
+=
string
.
Format
(
" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d')
,1) = YEARWEEK(now(),1
) "
);
}
var
curWeekList
=
Get
<
RB_Student_Visit_Extend
>(
string
.
Format
(
sql
,
curWeek
)).
ToList
();
dicList
.
Add
(
"currentWeek"
,
curWeekList
);
...
...
@@ -252,11 +252,11 @@ WHERE 1=1 AND B.Status=0 {0}
string
lastWeek
=
""
;
if
(!
string
.
IsNullOrEmpty
(
query
.
StartDate
))
{
lastWeek
+=
string
.
Format
(
" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d')
) = YEARWEEK('{0}'
)-1 "
,
query
.
StartDate
);
lastWeek
+=
string
.
Format
(
" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d')
,1) = YEARWEEK('{0}',1
)-1 "
,
query
.
StartDate
);
}
else
{
lastWeek
+=
string
.
Format
(
" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d')
) = YEARWEEK(now()
)-1 "
);
lastWeek
+=
string
.
Format
(
" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d')
,1) = YEARWEEK(now(),1
)-1 "
);
}
var
lastWeekList
=
Get
<
RB_Student_Visit_Extend
>(
string
.
Format
(
sql
,
lastWeek
)).
ToList
();
dicList
.
Add
(
"lastWeek"
,
lastWeekList
);
...
...
Edu.Repository/Reserve/RB_Visitor_ReserveRepository.cs
View file @
c2e113d1
...
...
@@ -355,11 +355,11 @@ WHERE 1=1 AND A.Status=0 {0}
string
curWeek
=
""
;
if
(!
string
.
IsNullOrEmpty
(
query
.
StartClassDate
))
{
curWeek
+=
string
.
Format
(
" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d'
)) = YEARWEEK('{0}'
) "
,
query
.
StartClassDate
);
curWeek
+=
string
.
Format
(
" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d'
),1) = YEARWEEK('{0}',1
) "
,
query
.
StartClassDate
);
}
else
{
curWeek
+=
string
.
Format
(
" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d')
) = YEARWEEK(now()
) "
);
curWeek
+=
string
.
Format
(
" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d')
,1) = YEARWEEK(now(),1
) "
);
}
var
curWeekList
=
Get
<
RB_Visitor_Reserve_Extend
>(
string
.
Format
(
sql
,
curWeek
)).
ToList
();
dicList
.
Add
(
"currentWeek"
,
curWeekList
);
...
...
@@ -368,11 +368,11 @@ WHERE 1=1 AND A.Status=0 {0}
string
lastWeek
=
""
;
if
(!
string
.
IsNullOrEmpty
(
query
.
StartClassDate
))
{
lastWeek
+=
string
.
Format
(
" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d')
) = YEARWEEK('{0}'
)-1 "
,
query
.
StartClassDate
);
lastWeek
+=
string
.
Format
(
" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d')
,1) = YEARWEEK('{0}',1
)-1 "
,
query
.
StartClassDate
);
}
else
{
lastWeek
+=
string
.
Format
(
" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d')
) = YEARWEEK(now()
)-1 "
);
lastWeek
+=
string
.
Format
(
" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d')
,1) = YEARWEEK(now(),1
)-1 "
);
}
var
lastWeekList
=
Get
<
RB_Visitor_Reserve_Extend
>(
string
.
Format
(
sql
,
lastWeek
)).
ToList
();
dicList
.
Add
(
"lastWeek"
,
lastWeekList
);
...
...
Edu.Repository/Sell/RB_OrderRepository.cs
View file @
c2e113d1
...
...
@@ -1297,11 +1297,11 @@ WHERE 1=1 AND A.OrderState IN(1,2) {0}
string
curWeek
=
""
;
if
(!
string
.
IsNullOrEmpty
(
query
.
StartTime
))
{
curWeek
+=
string
.
Format
(
" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d'
)) = YEARWEEK('{0}'
) "
,
query
.
StartTime
);
curWeek
+=
string
.
Format
(
" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d'
),1) = YEARWEEK('{0}',1
) "
,
query
.
StartTime
);
}
else
{
curWeek
+=
string
.
Format
(
" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d')
) = YEARWEEK(now()
) "
);
curWeek
+=
string
.
Format
(
" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d')
,1) = YEARWEEK(now(),1
) "
);
}
var
curWeekList
=
Get
<
RB_Order_ViewModel
>(
string
.
Format
(
sql
,
curWeek
)).
ToList
();
dicList
.
Add
(
"currentWeek"
,
curWeekList
);
...
...
@@ -1310,11 +1310,11 @@ WHERE 1=1 AND A.OrderState IN(1,2) {0}
string
lastWeek
=
""
;
if
(!
string
.
IsNullOrEmpty
(
query
.
StartTime
))
{
lastWeek
+=
string
.
Format
(
" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d')
) = YEARWEEK('{0}'
)-1 "
,
query
.
StartTime
);
lastWeek
+=
string
.
Format
(
" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d')
,1) = YEARWEEK('{0}',1
)-1 "
,
query
.
StartTime
);
}
else
{
lastWeek
+=
string
.
Format
(
" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d')
) = YEARWEEK(now()
)-1 "
);
lastWeek
+=
string
.
Format
(
" AND YEARWEEK(date_format(A.CreateTime,'%Y-%m-%d')
,1) = YEARWEEK(now(),1
)-1 "
);
}
var
lastWeekList
=
Get
<
RB_Order_ViewModel
>(
string
.
Format
(
sql
,
lastWeek
)).
ToList
();
dicList
.
Add
(
"lastWeek"
,
lastWeekList
);
...
...
Edu.Repository/User/RB_StudentRepository.cs
View file @
c2e113d1
...
...
@@ -866,7 +866,7 @@ GROUP BY A.StuStage ";
SELECT t.*,g.GroupName,s.SName
FROM rb_student AS t LEFT JOIN rb_group AS g ON t.Group_Id=g.GId
LEFT JOIN rb_school AS s ON t.School_Id=s.SId
WHERE 1=1 AND YEARWEEK(date_format(t.CreateTime, '%Y-%m-%d')
) = YEARWEEK(now()
)
WHERE 1=1 AND YEARWEEK(date_format(t.CreateTime, '%Y-%m-%d')
,1) = YEARWEEK(now(),1
)
"
);
builder
.
AppendFormat
(
" AND t.{0}={1} "
,
nameof
(
RB_Student_ViewModel
.
Status
),
(
int
)
DateStateEnum
.
Normal
);
if
(
query
!=
null
)
...
...
@@ -1047,11 +1047,11 @@ WHERE 1=1
string
curWeek
=
""
;
if
(!
string
.
IsNullOrEmpty
(
query
.
StartTime
))
{
curWeek
+=
string
.
Format
(
" AND YEARWEEK(date_format(CreateTime,'%Y-%m-%d'
)) = YEARWEEK('{0}'
) "
,
query
.
StartTime
);
curWeek
+=
string
.
Format
(
" AND YEARWEEK(date_format(CreateTime,'%Y-%m-%d'
),1) = YEARWEEK('{0}',1
) "
,
query
.
StartTime
);
}
else
{
curWeek
+=
string
.
Format
(
" AND YEARWEEK(date_format(CreateTime,'%Y-%m-%d')
) = YEARWEEK(now()
) "
);
curWeek
+=
string
.
Format
(
" AND YEARWEEK(date_format(CreateTime,'%Y-%m-%d')
,1) = YEARWEEK(now(),1
) "
);
}
var
curWeekList
=
Get
<
RB_Student_ViewModel
>(
string
.
Format
(
builder
.
ToString
(),
curWeek
)).
ToList
();
dicList
.
Add
(
"currentWeek"
,
curWeekList
);
...
...
@@ -1060,11 +1060,11 @@ WHERE 1=1
string
lastWeek
=
""
;
if
(!
string
.
IsNullOrEmpty
(
query
.
StartTime
))
{
lastWeek
+=
string
.
Format
(
" AND YEARWEEK(date_format(CreateTime,'%Y-%m-%d')
) = YEARWEEK('{0}'
)-1 "
,
query
.
StartTime
);
lastWeek
+=
string
.
Format
(
" AND YEARWEEK(date_format(CreateTime,'%Y-%m-%d')
,1) = YEARWEEK('{0}',1
)-1 "
,
query
.
StartTime
);
}
else
{
lastWeek
+=
string
.
Format
(
" AND YEARWEEK(date_format(CreateTime,'%Y-%m-%d')
) = YEARWEEK(now()
)-1 "
);
lastWeek
+=
string
.
Format
(
" AND YEARWEEK(date_format(CreateTime,'%Y-%m-%d')
,1) = YEARWEEK(now(),1
)-1 "
);
}
var
lastWeekList
=
Get
<
RB_Student_ViewModel
>(
string
.
Format
(
builder
.
ToString
(),
lastWeek
)).
ToList
();
dicList
.
Add
(
"lastWeek"
,
lastWeekList
);
...
...
Edu.WebApi/Controllers/User/UserCenterController.cs
View file @
c2e113d1
...
...
@@ -2672,8 +2672,8 @@ namespace Edu.WebApi.Controllers.User
ExcelDataSource
subHeader
=
new
ExcelDataSource
()
{
ExcelRows
=
new
List
<
ExcelColumn
>()
};
header
.
ExcelRows
.
Add
(
new
ExcelColumn
(
"员工"
)
{
Rowspan
=
2
,
CellWidth
=
15
});
subHeader
.
ExcelRows
.
Add
(
new
ExcelColumn
());
header
.
ExcelRows
.
Add
(
new
ExcelColumn
(
"
名单"
)
{
CellWidth
=
25
});
subHeader
.
ExcelRows
.
Add
(
new
ExcelColumn
(
"
本月
"
));
header
.
ExcelRows
.
Add
(
new
ExcelColumn
(
"
本月名单"
)
{
CellWidth
=
25
,
Rowspan
=
2
});
subHeader
.
ExcelRows
.
Add
(
new
ExcelColumn
(
""
));
header
.
ExcelRows
.
Add
(
new
ExcelColumn
(
"试听"
)
{
CellWidth
=
15
,
Colspan
=
2
});
subHeader
.
ExcelRows
.
Add
(
new
ExcelColumn
(
"本周"
));
...
...
@@ -2715,8 +2715,8 @@ namespace Edu.WebApi.Controllers.User
excelRows
.
Add
(
new
ExcelColumn
(
UserReidsCache
.
GetUserLoginInfo
(
item
.
CreateBy
)?.
AccountName
));
string
curWeekStu
=
string
.
Join
(
","
,
item
?.
CurWeekStuList
?.
Select
(
qitem
=>
qitem
.
StuName
));
string
curMonthStu
=
string
.
Join
(
","
,
item
?.
CurMonthStuList
?.
Select
(
qitem
=>
qitem
.
StuName
));
excelRows
.
Add
(
new
ExcelColumn
(
cur
Week
Stu
));
excelRows
.
Add
(
new
ExcelColumn
(
curWeekStu
));
excelRows
.
Add
(
new
ExcelColumn
(
cur
Month
Stu
));
//
excelRows.Add(new ExcelColumn(curWeekStu));
excelRows
.
Add
(
new
ExcelColumn
(
item
.
CurWeekTrialLesson
.
ToString
()));
excelRows
.
Add
(
new
ExcelColumn
(
item
.
CurMonthTrialLesson
.
ToString
()));
...
...
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