Commit 08a74e17 authored by haoyanbin's avatar haoyanbin

1

parent fd26df33
......@@ -112,6 +112,7 @@ func CreateSurveyLog(c *gin.Context) {
return
}
// 留资数据
func ExportSurveyUserExcel(c *gin.Context) {
var req request.GetSurveyUserListReq
_ = c.ShouldBindQuery(&req)
......@@ -142,31 +143,34 @@ func ExportSurveyUserExcel(c *gin.Context) {
f.SetCellValue(fileName, "E2", "区")
f.SetCellValue(fileName, "F2", "留资时间")
f.SetCellValue(fileName, "G2", "留资选配产品")
f.SetCellValue(fileName, "H2", "备注")
f.SetCellValue(fileName, "I2", "电话沟通")
f.SetCellValue(fileName, "J2", "沟通日期")
f.SetCellValue(fileName, "K2", "医院名称")
f.SetCellValue(fileName, "L2", "医院状态")
f.SetCellValue(fileName, "M2", "开业时间")
f.SetCellValue(fileName, "N2", "所属省份")
f.SetCellValue(fileName, "O2", "签单状态")
f.SetCellValue(fileName, "P2", "转介绍渠道状态")
f.SetCellValue(fileName, "Q2", "签约金额")
f.SetCellValue(fileName, "R2", "签约选配产品")
f.SetCellValue(fileName, "S2", "电销人员")
f.SetCellValue(fileName, "T2", "转介绍人")
f.SetCellValue(fileName, "U2", "转介绍人电话")
f.SetCellValue(fileName, "V2", "渠道类型")
f.SetCellValue(fileName, "W2", "渠道")
f.SetCellValue(fileName, "X2", "渠道链接")
f.SetCellValue(fileName, "H2", "总价")
f.SetCellValue(fileName, "I2", "备注")
f.SetCellValue(fileName, "J2", "电话沟通")
f.SetCellValue(fileName, "K2", "沟通日期")
f.SetCellValue(fileName, "L2", "医院名称")
f.SetCellValue(fileName, "M2", "医院状态")
f.SetCellValue(fileName, "N2", "开业时间")
f.SetCellValue(fileName, "O2", "所属省份")
f.SetCellValue(fileName, "P2", "签单状态")
f.SetCellValue(fileName, "Q2", "转介绍渠道状态")
f.SetCellValue(fileName, "R2", "签约金额")
f.SetCellValue(fileName, "S2", "签约选配产品")
f.SetCellValue(fileName, "T2", "电销人员")
f.SetCellValue(fileName, "U2", "转介绍人")
f.SetCellValue(fileName, "V2", "转介绍人电话")
f.SetCellValue(fileName, "Z2", "渠道类型")
f.SetCellValue(fileName, "X2", "渠道")
f.SetCellValue(fileName, "Y2", "渠道链接")
for k, v := range list {
surveyData := service.GetSurveyUserDataList(v.Id)
optionData := ""
price := 0
for _, v2 := range surveyData {
optionData += v2.OptionValue + " * " + strconv.Itoa(v2.OptionNum) + "; "
price += v2.Price
}
region := v.CRegion
......@@ -188,8 +192,8 @@ func ExportSurveyUserExcel(c *gin.Context) {
f.SetCellValue(fileName, "D"+a, city)
f.SetCellValue(fileName, "E"+a, v.CZone)
f.SetCellValue(fileName, "F"+a, utils.StringToTime(v.CreateTime))
f.SetCellValue(fileName, "G"+a, optionData)
f.SetCellValue(fileName, "H"+a, "")
f.SetCellValue(fileName, "G"+a, utils.FeeToString(price))
f.SetCellValue(fileName, "H"+a, optionData)
f.SetCellValue(fileName, "I"+a, "")
f.SetCellValue(fileName, "J"+a, "")
f.SetCellValue(fileName, "K"+a, "")
......@@ -201,11 +205,12 @@ func ExportSurveyUserExcel(c *gin.Context) {
f.SetCellValue(fileName, "Q"+a, "")
f.SetCellValue(fileName, "R"+a, "")
f.SetCellValue(fileName, "S"+a, "")
f.SetCellValue(fileName, "T"+a, v.Reference)
f.SetCellValue(fileName, "U"+a, v.ReferenceMobile)
f.SetCellValue(fileName, "V"+a, mocData[v.MocId])
f.SetCellValue(fileName, "W"+a, "短信")
f.SetCellValue(fileName, "X"+a, url)
f.SetCellValue(fileName, "T"+a, "")
f.SetCellValue(fileName, "U"+a, v.Reference)
f.SetCellValue(fileName, "V"+a, v.ReferenceMobile)
f.SetCellValue(fileName, "W"+a, mocData[v.MocId])
f.SetCellValue(fileName, "X"+a, "短信")
f.SetCellValue(fileName, "Y"+a, url)
}
// Set active sheet of the workbook.
......@@ -222,6 +227,7 @@ func ExportSurveyUserExcel(c *gin.Context) {
return
}
// 汇总
func ExportMocDataExcel(c *gin.Context) {
var req request.GetSurveyUserListReq
_ = c.ShouldBindQuery(&req)
......@@ -285,6 +291,7 @@ func ExportMocDataExcel(c *gin.Context) {
return
}
// 明细
func ExportSurveyLogPageList(c *gin.Context) {
var req request.GetSurveyLogListReq
_ = c.ShouldBindQuery(&req)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment