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
1a92329a
Commit
1a92329a
authored
Feb 14, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
b189644f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
65 additions
and
51 deletions
+65
-51
StudentStatController.cs
Edu.WebApi/Controllers/User/StudentStatController.cs
+65
-51
No files found.
Edu.WebApi/Controllers/User/StudentStatController.cs
View file @
1a92329a
...
...
@@ -164,70 +164,84 @@ namespace Edu.WebApi.Controllers.User
ExcelRows
=
new
List
<
ExcelColumn
>()
{
new
ExcelColumn
(
"学生"
){
CellWidth
=
15
},
new
ExcelColumn
(
"状态"
){
CellWidth
=
15
},
new
ExcelColumn
(
"课程顾问"
){
CellWidth
=
15
},
new
ExcelColumn
(
"生日"
){
CellWidth
=
10
},
new
ExcelColumn
(
"电话"
){
CellWidth
=
15
},
new
ExcelColumn
(
"地址"
){
CellWidth
=
15
},
new
ExcelColumn
(
"渠道来源"
){
CellWidth
=
20
},
new
ExcelColumn
(
"日语基础"
){
CellWidth
=
20
},
new
ExcelColumn
(
"课程顾问"
){
CellWidth
=
15
},
new
ExcelColumn
(
"协助老师"
){
CellWidth
=
10
},
new
ExcelColumn
(
"合同时间"
){
CellWidth
=
15
},
new
ExcelColumn
(
"所报课程"
){
CellWidth
=
15
},
new
ExcelColumn
(
"当前级别"
){
CellWidth
=
20
},
new
ExcelColumn
(
"生日"
){
CellWidth
=
20
},
new
ExcelColumn
(
"规划课程及报价"
){
CellWidth
=
20
},
new
ExcelColumn
(
"客户情况分析"
){
CellWidth
=
50
},
new
ExcelColumn
(
"顾问跟进备注"
){
CellWidth
=
50
},
}
};
slist
.
Add
(
header
);
foreach
(
var
item
in
list
)
var
rootObj
=
JObject
.
Parse
(
JsonHelper
.
Serialize
(
list
));
JArray
arrayList
=
JArray
.
Parse
(
rootObj
.
GetStringValue
(
"RList"
));
if
(
arrayList
!=
null
&&
arrayList
.
Count
>
0
)
{
JObject
dObj
=
JObject
.
Parse
(
JsonHelper
.
Serialize
(
item
));
var
columns
=
new
List
<
ExcelColumn
>
foreach
(
var
jItem
in
arrayList
)
{
new
ExcelColumn
(
dObj
.
GetStringValue
(
"StuName"
))
};
string
EnrollState
=
dObj
.
GetInt
(
"EnrollState"
)
==
1
?
"已报名"
:
"未成交"
;
columns
.
Add
(
new
ExcelColumn
(
EnrollState
));
columns
.
Add
(
new
ExcelColumn
(
dObj
.
GetStringValue
(
"AssistName"
)));
columns
.
Add
(
new
ExcelColumn
(
dObj
.
GetStringValue
(
"StuBirthStr"
)));
columns
.
Add
(
new
ExcelColumn
(
dObj
.
GetStringValue
(
"StuRealMobile"
)));
columns
.
Add
(
new
ExcelColumn
(
dObj
.
GetStringValue
(
"StuAddress"
)));
columns
.
Add
(
new
ExcelColumn
(
dObj
.
GetStringValue
(
"StuChannelName"
)));
columns
.
Add
(
new
ExcelColumn
(
dObj
.
GetStringValue
(
"JapanBaseInfo"
)));
columns
.
Add
(
new
ExcelColumn
(
dObj
.
GetStringValue
(
"PlanPrice"
)));
string
baseCondition
=
dObj
.
GetStringValue
(
"BaseCondition"
);
string
demandPoint
=
dObj
.
GetStringValue
(
"DemandPoint"
);
string
resistPoint
=
dObj
.
GetStringValue
(
"ResistPoint"
);
string
consultingResults
=
dObj
.
GetStringValue
(
"ConsultingResults"
);
JObject
dObj
=
JObject
.
Parse
(
JsonHelper
.
Serialize
(
jItem
));
var
columns
=
new
List
<
ExcelColumn
>
{
new
ExcelColumn
(
dObj
.
GetStringValue
(
"StuName"
)),
new
ExcelColumn
(
dObj
.
GetStringValue
(
"StuRealMobile"
)),
};
string
courseManager
=
""
;
columns
.
Add
(
new
ExcelColumn
(
courseManager
));
string
teacherNamager
=
""
;
columns
.
Add
(
new
ExcelColumn
(
teacherNamager
));
columns
.
Add
(
new
ExcelColumn
(
dObj
.
GetStringValue
(
"ContractSTime"
)));
columns
.
Add
(
new
ExcelColumn
(
dObj
.
GetStringValue
(
"CourseName"
)));
columns
.
Add
(
new
ExcelColumn
(
dObj
.
GetStringValue
(
"JapanBaseInfo"
)));
baseCondition
=
!
string
.
IsNullOrEmpty
(
baseCondition
)
?
baseCondition
:
"暂无"
;
demandPoint
=
!
string
.
IsNullOrEmpty
(
demandPoint
)
?
demandPoint
:
"暂无"
;
resistPoint
=
!
string
.
IsNullOrEmpty
(
resistPoint
)
?
resistPoint
:
"暂无"
;
consultingResults
=
!
string
.
IsNullOrEmpty
(
consultingResults
)
?
consultingResults
:
"暂无"
;
string
baseInfo
=
"基本情况:"
+
baseCondition
+
"\r\n"
+
"需求点:"
+
consultingResults
+
"\r\n"
+
"抗拒点:"
+
resistPoint
+
"\r\n"
+
"咨询结果:"
+
consultingResults
;
columns
.
Add
(
new
ExcelColumn
(
baseInfo
));
// columns.Add(new ExcelColumn(dObj.GetStringValue("StuBirthStr")));
// columns.Add(new ExcelColumn(dObj.GetStringValue("StuRealMobile")));
// columns.Add(new ExcelColumn(dObj.GetStringValue("StuAddress")));
// columns.Add(new ExcelColumn(dObj.GetStringValue("StuChannelName")));
// columns.Add(new ExcelColumn(dObj.GetStringValue("JapanBaseInfo")));
// columns.Add(new ExcelColumn(dObj.GetStringValue("PlanPrice")));
// string baseCondition = dObj.GetStringValue("BaseCondition");
// string demandPoint = dObj.GetStringValue("DemandPoint");
// string resistPoint = dObj.GetStringValue("ResistPoint");
// string consultingResults = dObj.GetStringValue("ConsultingResults");
string
remark
=
""
;
string
FUTime
=
dObj
.
GetStringValue
(
"FUTime"
);
if
(!
string
.
IsNullOrEmpty
(
FUTime
))
{
remark
+=
FUTime
;
}
string
FURemark
=
dObj
.
GetStringValue
(
"FURemark"
);
if
(!
string
.
IsNullOrEmpty
(
FURemark
))
{
remark
+=
"\r\n"
+
StringHelper
.
FilterHtml
(
FURemark
);
}
columns
.
Add
(
new
ExcelColumn
()
{
Value
=
remark
});
// baseCondition = !string.IsNullOrEmpty(baseCondition) ? baseCondition : "暂无";
// demandPoint = !string.IsNullOrEmpty(demandPoint) ? demandPoint : "暂无";
// resistPoint = !string.IsNullOrEmpty(resistPoint) ? resistPoint : "暂无";
// consultingResults = !string.IsNullOrEmpty(consultingResults) ? consultingResults : "暂无";
// string baseInfo = "基本情况:" + baseCondition + "\r\n" + "需求点:" + consultingResults + "\r\n" + "抗拒点:" + resistPoint + "\r\n" + "咨询结果:" + consultingResults;
// columns.Add(new ExcelColumn(baseInfo));
var
dataRow
=
new
ExcelDataSource
()
{
ExcelRows
=
columns
};
slist
.
Add
(
dataRow
);
// string remark = "";
// string FUTime = dObj.GetStringValue("FUTime");
// if (!string.IsNullOrEmpty(FUTime))
// {
// remark += FUTime;
// }
// string FURemark = dObj.GetStringValue("FURemark");
// if (!string.IsNullOrEmpty(FURemark))
// {
// remark += "\r\n" + StringHelper.FilterHtml(FURemark);
// }
// columns.Add(new ExcelColumn()
// {
// Value = remark
// });
var
dataRow
=
new
ExcelDataSource
()
{
ExcelRows
=
columns
};
slist
.
Add
(
dataRow
);
}
}
var
byteData
=
ExcelTempLateHelper
.
ToExcelExtend
(
slist
);
return
File
(
byteData
,
"application/octet-stream"
,
excelName
);
}
...
...
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