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
525cd98d
Commit
525cd98d
authored
Mar 03, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
43832651
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
111 additions
and
3 deletions
+111
-3
StudentStatController.cs
Edu.WebApi/Controllers/User/StudentStatController.cs
+111
-3
No files found.
Edu.WebApi/Controllers/User/StudentStatController.cs
View file @
525cd98d
...
...
@@ -775,7 +775,6 @@ namespace Edu.WebApi.Controllers.User
return
ApiResult
.
Success
(
data
:
list
);
}
/// <summary>
/// 下载客户数据月份统计
/// </summary>
...
...
@@ -852,8 +851,6 @@ namespace Edu.WebApi.Controllers.User
}
}
/// <summary>
/// 客户数据年份统计
/// </summary>
...
...
@@ -870,6 +867,62 @@ namespace Edu.WebApi.Controllers.User
return
ApiResult
.
Success
(
data
:
list
);
}
/// <summary>
/// 下载客户数据年度统计
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
Obsolete
]
public
FileContentResult
DownLoadStudentStaticYear
()
{
var
query
=
new
RB_Student_Static_Extend
()
{
YearStr
=
base
.
ParmJObj
.
GetInt
(
"YearStr"
),
};
query
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
var
list
=
studentStatModule
.
GetStudentStaticListYearModule
(
query
);
string
excelName
=
"课程顾问部年度数据统计.xls"
;
List
<
ExcelDataSource
>
slist
=
new
List
<
ExcelDataSource
>();
try
{
ExcelDataSource
header
=
new
ExcelDataSource
{
ExcelRows
=
new
List
<
ExcelColumn
>()
{
new
ExcelColumn
(
"名称"
){
CellWidth
=
25
},
new
ExcelColumn
(
"2021"
){
CellWidth
=
15
},
new
ExcelColumn
(
"2022"
){
CellWidth
=
15
},
new
ExcelColumn
(
"成长率"
){
CellWidth
=
10
},
}
};
slist
.
Add
(
header
);
foreach
(
var
item
in
list
)
{
var
columns
=
new
List
<
ExcelColumn
>
{
new
ExcelColumn
(
item
.
ItemName
)
};
columns
.
Add
(
new
ExcelColumn
(
item
.
FirstYear
.
ToString
()
));
columns
.
Add
(
new
ExcelColumn
(
item
.
SecondYear
.
ToString
()));
columns
.
Add
(
new
ExcelColumn
(
item
.
YearRate
+
"%"
));
var
dataRow
=
new
ExcelDataSource
()
{
ExcelRows
=
columns
};
slist
.
Add
(
dataRow
);
}
var
byteData
=
ExcelTempLateHelper
.
ToExcelExtend
(
slist
);
return
File
(
byteData
,
"application/octet-stream"
,
excelName
);
}
catch
(
Exception
ex
)
{
LogHelper
.
Write
(
ex
,
"OutToExcelOrderStudentClassHoursList"
);
var
byteData1
=
ExcelTempLateHelper
.
ToExcelExtend
(
slist
);
return
File
(
byteData1
,
"application/octet-stream"
,
excelName
);
}
}
/// <summary>
/// 客户数据年份统计
/// </summary>
...
...
@@ -886,6 +939,61 @@ namespace Edu.WebApi.Controllers.User
return
ApiResult
.
Success
(
data
:
list
);
}
/// <summary>
/// 下载客户数据年度成长率统计
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
Obsolete
]
public
FileContentResult
DownLoadStudentStaticYearRate
()
{
var
query
=
new
RB_Student_Static_Extend
()
{
YearStr
=
base
.
ParmJObj
.
GetInt
(
"YearStr"
),
};
query
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
var
list
=
studentStatModule
.
GetStudentStaticListYearRateModule
(
query
);
string
excelName
=
"课程顾问部年度成长率统计.xls"
;
List
<
ExcelDataSource
>
slist
=
new
List
<
ExcelDataSource
>();
try
{
ExcelDataSource
header
=
new
ExcelDataSource
{
ExcelRows
=
new
List
<
ExcelColumn
>()
{
new
ExcelColumn
(
"名称"
){
CellWidth
=
25
},
new
ExcelColumn
(
"2021"
){
CellWidth
=
15
},
new
ExcelColumn
(
"2022"
){
CellWidth
=
15
},
new
ExcelColumn
(
"成长率"
){
CellWidth
=
10
},
}
};
slist
.
Add
(
header
);
foreach
(
var
item
in
list
)
{
var
columns
=
new
List
<
ExcelColumn
>
{
new
ExcelColumn
(
item
.
ItemName
)
};
columns
.
Add
(
new
ExcelColumn
(
item
.
FirstYear
.
ToString
()));
columns
.
Add
(
new
ExcelColumn
(
item
.
SecondYear
.
ToString
()));
columns
.
Add
(
new
ExcelColumn
(
item
.
YearRate
+
"%"
));
var
dataRow
=
new
ExcelDataSource
()
{
ExcelRows
=
columns
};
slist
.
Add
(
dataRow
);
}
var
byteData
=
ExcelTempLateHelper
.
ToExcelExtend
(
slist
);
return
File
(
byteData
,
"application/octet-stream"
,
excelName
);
}
catch
(
Exception
ex
)
{
LogHelper
.
Write
(
ex
,
"OutToExcelOrderStudentClassHoursList"
);
var
byteData1
=
ExcelTempLateHelper
.
ToExcelExtend
(
slist
);
return
File
(
byteData1
,
"application/octet-stream"
,
excelName
);
}
}
/// <summary>
/// 初始化学员统计数据
/// </summary>
...
...
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