Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dt_analysis
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
haoyanbin
dt_analysis
Commits
08a74e17
Commit
08a74e17
authored
Sep 13, 2023
by
haoyanbin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
fd26df33
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
24 deletions
+31
-24
survey.go
api/mobile/survey.go
+31
-24
No files found.
api/mobile/survey.go
View file @
08a74e17
...
@@ -112,6 +112,7 @@ func CreateSurveyLog(c *gin.Context) {
...
@@ -112,6 +112,7 @@ func CreateSurveyLog(c *gin.Context) {
return
return
}
}
// 留资数据
func
ExportSurveyUserExcel
(
c
*
gin
.
Context
)
{
func
ExportSurveyUserExcel
(
c
*
gin
.
Context
)
{
var
req
request
.
GetSurveyUserListReq
var
req
request
.
GetSurveyUserListReq
_
=
c
.
ShouldBindQuery
(
&
req
)
_
=
c
.
ShouldBindQuery
(
&
req
)
...
@@ -142,31 +143,34 @@ func ExportSurveyUserExcel(c *gin.Context) {
...
@@ -142,31 +143,34 @@ func ExportSurveyUserExcel(c *gin.Context) {
f
.
SetCellValue
(
fileName
,
"E2"
,
"区"
)
f
.
SetCellValue
(
fileName
,
"E2"
,
"区"
)
f
.
SetCellValue
(
fileName
,
"F2"
,
"留资时间"
)
f
.
SetCellValue
(
fileName
,
"F2"
,
"留资时间"
)
f
.
SetCellValue
(
fileName
,
"G2"
,
"留资选配产品"
)
f
.
SetCellValue
(
fileName
,
"G2"
,
"留资选配产品"
)
f
.
SetCellValue
(
fileName
,
"H2"
,
"备注"
)
f
.
SetCellValue
(
fileName
,
"H2"
,
"总价"
)
f
.
SetCellValue
(
fileName
,
"I2"
,
"电话沟通"
)
f
.
SetCellValue
(
fileName
,
"I2"
,
"备注"
)
f
.
SetCellValue
(
fileName
,
"J2"
,
"沟通日期"
)
f
.
SetCellValue
(
fileName
,
"J2"
,
"电话沟通"
)
f
.
SetCellValue
(
fileName
,
"K2"
,
"医院名称"
)
f
.
SetCellValue
(
fileName
,
"K2"
,
"沟通日期"
)
f
.
SetCellValue
(
fileName
,
"L2"
,
"医院状态"
)
f
.
SetCellValue
(
fileName
,
"L2"
,
"医院名称"
)
f
.
SetCellValue
(
fileName
,
"M2"
,
"开业时间"
)
f
.
SetCellValue
(
fileName
,
"M2"
,
"医院状态"
)
f
.
SetCellValue
(
fileName
,
"N2"
,
"所属省份"
)
f
.
SetCellValue
(
fileName
,
"N2"
,
"开业时间"
)
f
.
SetCellValue
(
fileName
,
"O2"
,
"签单状态"
)
f
.
SetCellValue
(
fileName
,
"O2"
,
"所属省份"
)
f
.
SetCellValue
(
fileName
,
"P2"
,
"转介绍渠道状态"
)
f
.
SetCellValue
(
fileName
,
"P2"
,
"签单状态"
)
f
.
SetCellValue
(
fileName
,
"Q2"
,
"签约金额"
)
f
.
SetCellValue
(
fileName
,
"Q2"
,
"转介绍渠道状态"
)
f
.
SetCellValue
(
fileName
,
"R2"
,
"签约选配产品"
)
f
.
SetCellValue
(
fileName
,
"R2"
,
"签约金额"
)
f
.
SetCellValue
(
fileName
,
"S2"
,
"电销人员"
)
f
.
SetCellValue
(
fileName
,
"S2"
,
"签约选配产品"
)
f
.
SetCellValue
(
fileName
,
"T2"
,
"转介绍人"
)
f
.
SetCellValue
(
fileName
,
"T2"
,
"电销人员"
)
f
.
SetCellValue
(
fileName
,
"U2"
,
"转介绍人电话"
)
f
.
SetCellValue
(
fileName
,
"U2"
,
"转介绍人"
)
f
.
SetCellValue
(
fileName
,
"V2"
,
"渠道类型"
)
f
.
SetCellValue
(
fileName
,
"V2"
,
"转介绍人电话"
)
f
.
SetCellValue
(
fileName
,
"W2"
,
"渠道"
)
f
.
SetCellValue
(
fileName
,
"Z2"
,
"渠道类型"
)
f
.
SetCellValue
(
fileName
,
"X2"
,
"渠道链接"
)
f
.
SetCellValue
(
fileName
,
"X2"
,
"渠道"
)
f
.
SetCellValue
(
fileName
,
"Y2"
,
"渠道链接"
)
for
k
,
v
:=
range
list
{
for
k
,
v
:=
range
list
{
surveyData
:=
service
.
GetSurveyUserDataList
(
v
.
Id
)
surveyData
:=
service
.
GetSurveyUserDataList
(
v
.
Id
)
optionData
:=
""
optionData
:=
""
price
:=
0
for
_
,
v2
:=
range
surveyData
{
for
_
,
v2
:=
range
surveyData
{
optionData
+=
v2
.
OptionValue
+
" * "
+
strconv
.
Itoa
(
v2
.
OptionNum
)
+
"; "
optionData
+=
v2
.
OptionValue
+
" * "
+
strconv
.
Itoa
(
v2
.
OptionNum
)
+
"; "
price
+=
v2
.
Price
}
}
region
:=
v
.
CRegion
region
:=
v
.
CRegion
...
@@ -188,8 +192,8 @@ func ExportSurveyUserExcel(c *gin.Context) {
...
@@ -188,8 +192,8 @@ func ExportSurveyUserExcel(c *gin.Context) {
f
.
SetCellValue
(
fileName
,
"D"
+
a
,
city
)
f
.
SetCellValue
(
fileName
,
"D"
+
a
,
city
)
f
.
SetCellValue
(
fileName
,
"E"
+
a
,
v
.
CZone
)
f
.
SetCellValue
(
fileName
,
"E"
+
a
,
v
.
CZone
)
f
.
SetCellValue
(
fileName
,
"F"
+
a
,
utils
.
StringToTime
(
v
.
CreateTime
))
f
.
SetCellValue
(
fileName
,
"F"
+
a
,
utils
.
StringToTime
(
v
.
CreateTime
))
f
.
SetCellValue
(
fileName
,
"G"
+
a
,
optionData
)
f
.
SetCellValue
(
fileName
,
"G"
+
a
,
utils
.
FeeToString
(
price
)
)
f
.
SetCellValue
(
fileName
,
"H"
+
a
,
""
)
f
.
SetCellValue
(
fileName
,
"H"
+
a
,
optionData
)
f
.
SetCellValue
(
fileName
,
"I"
+
a
,
""
)
f
.
SetCellValue
(
fileName
,
"I"
+
a
,
""
)
f
.
SetCellValue
(
fileName
,
"J"
+
a
,
""
)
f
.
SetCellValue
(
fileName
,
"J"
+
a
,
""
)
f
.
SetCellValue
(
fileName
,
"K"
+
a
,
""
)
f
.
SetCellValue
(
fileName
,
"K"
+
a
,
""
)
...
@@ -201,11 +205,12 @@ func ExportSurveyUserExcel(c *gin.Context) {
...
@@ -201,11 +205,12 @@ func ExportSurveyUserExcel(c *gin.Context) {
f
.
SetCellValue
(
fileName
,
"Q"
+
a
,
""
)
f
.
SetCellValue
(
fileName
,
"Q"
+
a
,
""
)
f
.
SetCellValue
(
fileName
,
"R"
+
a
,
""
)
f
.
SetCellValue
(
fileName
,
"R"
+
a
,
""
)
f
.
SetCellValue
(
fileName
,
"S"
+
a
,
""
)
f
.
SetCellValue
(
fileName
,
"S"
+
a
,
""
)
f
.
SetCellValue
(
fileName
,
"T"
+
a
,
v
.
Reference
)
f
.
SetCellValue
(
fileName
,
"T"
+
a
,
""
)
f
.
SetCellValue
(
fileName
,
"U"
+
a
,
v
.
ReferenceMobile
)
f
.
SetCellValue
(
fileName
,
"U"
+
a
,
v
.
Reference
)
f
.
SetCellValue
(
fileName
,
"V"
+
a
,
mocData
[
v
.
MocId
])
f
.
SetCellValue
(
fileName
,
"V"
+
a
,
v
.
ReferenceMobile
)
f
.
SetCellValue
(
fileName
,
"W"
+
a
,
"短信"
)
f
.
SetCellValue
(
fileName
,
"W"
+
a
,
mocData
[
v
.
MocId
])
f
.
SetCellValue
(
fileName
,
"X"
+
a
,
url
)
f
.
SetCellValue
(
fileName
,
"X"
+
a
,
"短信"
)
f
.
SetCellValue
(
fileName
,
"Y"
+
a
,
url
)
}
}
// Set active sheet of the workbook.
// Set active sheet of the workbook.
...
@@ -222,6 +227,7 @@ func ExportSurveyUserExcel(c *gin.Context) {
...
@@ -222,6 +227,7 @@ func ExportSurveyUserExcel(c *gin.Context) {
return
return
}
}
// 汇总
func
ExportMocDataExcel
(
c
*
gin
.
Context
)
{
func
ExportMocDataExcel
(
c
*
gin
.
Context
)
{
var
req
request
.
GetSurveyUserListReq
var
req
request
.
GetSurveyUserListReq
_
=
c
.
ShouldBindQuery
(
&
req
)
_
=
c
.
ShouldBindQuery
(
&
req
)
...
@@ -285,6 +291,7 @@ func ExportMocDataExcel(c *gin.Context) {
...
@@ -285,6 +291,7 @@ func ExportMocDataExcel(c *gin.Context) {
return
return
}
}
// 明细
func
ExportSurveyLogPageList
(
c
*
gin
.
Context
)
{
func
ExportSurveyLogPageList
(
c
*
gin
.
Context
)
{
var
req
request
.
GetSurveyLogListReq
var
req
request
.
GetSurveyLogListReq
_
=
c
.
ShouldBindQuery
(
&
req
)
_
=
c
.
ShouldBindQuery
(
&
req
)
...
...
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