|
@@ -114,199 +114,6 @@ func (this *UserController) List() {
|
|
|
//流失客户统计
|
|
|
lossCondition += ` AND status='流失' `
|
|
|
|
|
|
- //productId := services.GetProductId(roleTypeCode)
|
|
|
- //productId := 2
|
|
|
- //权限控制
|
|
|
- //{
|
|
|
- // //如果不是超级管理员或者财务
|
|
|
- // if roleTypeCode != utils.ROLE_TYPE_CODE_ADMIN && roleTypeCode != utils.ROLE_TYPE_CODE_FINANCE {
|
|
|
- // //如果是部门管理员
|
|
|
- // if roleTypeCode == utils.ROLE_TYPE_CODE_FICC_ADMIN || roleTypeCode == utils.ROLE_TYPE_CODE_RAI_ADMIN {
|
|
|
- // condition += ` AND b.product_id= '` + strconv.Itoa(productId) + `'`
|
|
|
- //
|
|
|
- // lossCondition += ` AND b.product_id= '` + strconv.Itoa(productId) + `'`
|
|
|
- //
|
|
|
- // permissionCondition += ` AND b.product_id= '` + strconv.Itoa(productId) + `'`
|
|
|
- //
|
|
|
- // } else {
|
|
|
- // condition += ` AND b.product_id= '` + strconv.Itoa(productId) + `'`
|
|
|
- //
|
|
|
- // lossCondition += ` AND b.product_id= '` + strconv.Itoa(productId) + `'`
|
|
|
- //
|
|
|
- // permissionCondition += ` AND b.product_id= '` + strconv.Itoa(productId) + `'`
|
|
|
- //
|
|
|
- // if status == "全部" {
|
|
|
- // ////如果是筛选了流失客户状态
|
|
|
- // if sysUser.Authority <= 0 {
|
|
|
- // condition += ` AND (b.seller_id= '` + strconv.Itoa(sysUser.AdminId) + `' OR status='流失') `
|
|
|
- //
|
|
|
- // permissionCondition += ` AND b.seller_id= ` + strconv.Itoa(sysUser.AdminId)
|
|
|
- // } else {
|
|
|
- // if sysUser.Authority == 1 {
|
|
|
- // condition += ` AND (b.department_id=` + strconv.Itoa(sysUser.DepartmentId) + ` OR status='流失')`
|
|
|
- // permissionCondition += ` AND b.department_id=` + strconv.Itoa(sysUser.DepartmentId)
|
|
|
- // }
|
|
|
- // if sysUser.Authority == 2 && sysUser.RoleTypeCode == utils.ROLE_TYPE_CODE_RAI_GROUP {
|
|
|
- // if status != utils.COMPANY_STATUS_LOSE {
|
|
|
- // condition += ` AND (b.group_id=` + strconv.Itoa(sysUser.GroupId) + ` OR status='流失') `
|
|
|
- // }
|
|
|
- // permissionCondition += ` AND b.group_id=` + strconv.Itoa(sysUser.GroupId)
|
|
|
- //
|
|
|
- // }
|
|
|
- //
|
|
|
- // if sysUser.Authority == 2 && sysUser.RoleTypeCode == utils.ROLE_TYPE_CODE_FICC_GROUP {
|
|
|
- // pid, err := company.GetParentIdFromGroup(sysUser.GroupId)
|
|
|
- // if err != nil {
|
|
|
- // br.Msg = "获取失败"
|
|
|
- // br.ErrMsg = "查询父级id异常" + err.Error()
|
|
|
- // return
|
|
|
- // }
|
|
|
- // var ids []*string
|
|
|
- // if pid != nil {
|
|
|
- // if *pid != 0 {
|
|
|
- // //销售主管放在三级列表中
|
|
|
- // ids, err = company.GetGroupIdsByParentId(*pid)
|
|
|
- // if err != nil {
|
|
|
- // fmt.Println(err.Error())
|
|
|
- // }
|
|
|
- // } else {
|
|
|
- // //销售主管放在二级列表中
|
|
|
- // ids, err = company.GetGroupIdsByParentId(sysUser.GroupId)
|
|
|
- // if err != nil {
|
|
|
- // fmt.Println(err.Error())
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
- // var idSlice []string
|
|
|
- // var sid string
|
|
|
- // for _, id := range ids {
|
|
|
- // idSlice = append(idSlice, *id)
|
|
|
- // }
|
|
|
- // //加入父级groupId
|
|
|
- // if *pid > 0 {
|
|
|
- // idSlice = append(idSlice, strconv.Itoa(*pid))
|
|
|
- // } else {
|
|
|
- // idSlice = append(idSlice, strconv.Itoa(sysUser.GroupId))
|
|
|
- // }
|
|
|
- //
|
|
|
- // sid = strings.Join(idSlice, ",")
|
|
|
- // if len(sid) > 0 {
|
|
|
- // if status != utils.COMPANY_STATUS_LOSE {
|
|
|
- // condition += ` AND (b.group_id IN (` + sid + `) OR status='流失') `
|
|
|
- // }
|
|
|
- //
|
|
|
- // permissionCondition += ` AND b.group_id IN (` + sid + `) `
|
|
|
- // } else {
|
|
|
- // if status != utils.COMPANY_STATUS_LOSE {
|
|
|
- // condition += ` AND (b.group_id IN (` + strconv.Itoa(sysUser.GroupId) + `) OR status='流失') `
|
|
|
- // }
|
|
|
- // permissionCondition += ` AND b.group_id IN (` + strconv.Itoa(sysUser.GroupId) + `) `
|
|
|
- // }
|
|
|
- // }
|
|
|
- // if sysUser.Authority == 4 {
|
|
|
- // if status != utils.COMPANY_STATUS_LOSE {
|
|
|
- // condition += ` AND (b.group_id =` + strconv.Itoa(sysUser.GroupId) + ` OR status='流失') `
|
|
|
- // //pars = append(pars, sysUser.GroupId)
|
|
|
- // }
|
|
|
- // permissionCondition += ` AND b.group_id=` + strconv.Itoa(sysUser.GroupId)
|
|
|
- // //permissionPars = append(permissionPars, sysUser.GroupId)
|
|
|
- // }
|
|
|
- // }
|
|
|
- // } else {
|
|
|
- // //如果没有筛选了流失客户状态,那么需要加客户归属条件加入到查询中去
|
|
|
- // if sysUser.Authority <= 0 {
|
|
|
- // if status != utils.COMPANY_STATUS_LOSE {
|
|
|
- // condition += ` AND b.seller_id=` + strconv.Itoa(sysUser.AdminId)
|
|
|
- // //pars = append(pars, sysUser.AdminId)
|
|
|
- // }
|
|
|
- //
|
|
|
- // permissionCondition += ` AND b.seller_id=` + strconv.Itoa(sysUser.AdminId)
|
|
|
- // //permissionPars = append(permissionPars, sysUser.AdminId)
|
|
|
- // } else {
|
|
|
- // if sysUser.Authority == 1 {
|
|
|
- // if status != utils.COMPANY_STATUS_LOSE {
|
|
|
- // condition += ` AND b.department_id=` + strconv.Itoa(sysUser.DepartmentId)
|
|
|
- // //pars = append(pars, sysUser.DepartmentId)
|
|
|
- // }
|
|
|
- // permissionCondition += ` AND b.department_id=` + strconv.Itoa(sysUser.DepartmentId)
|
|
|
- // //permissionPars = append(permissionPars, sysUser.DepartmentId)
|
|
|
- // }
|
|
|
- // if sysUser.Authority == 2 && sysUser.RoleTypeCode == utils.ROLE_TYPE_CODE_RAI_GROUP {
|
|
|
- // if status != utils.COMPANY_STATUS_LOSE {
|
|
|
- // condition += ` AND b.group_id= ` + strconv.Itoa(sysUser.GroupId)
|
|
|
- // //pars = append(pars, sysUser.GroupId)
|
|
|
- // }
|
|
|
- // permissionCondition += ` AND b.group_id=` + strconv.Itoa(sysUser.GroupId)
|
|
|
- // //permissionPars = append(permissionPars, sysUser.GroupId)
|
|
|
- // }
|
|
|
- // if sysUser.Authority == 2 && sysUser.RoleTypeCode == utils.ROLE_TYPE_CODE_FICC_GROUP {
|
|
|
- // pid, err := company.GetParentIdFromGroup(sysUser.GroupId)
|
|
|
- // if err != nil {
|
|
|
- // br.Msg = "获取失败"
|
|
|
- // br.ErrMsg = "查询父级id异常" + err.Error()
|
|
|
- // return
|
|
|
- // }
|
|
|
- // var ids []*string
|
|
|
- // if pid != nil {
|
|
|
- // if *pid != 0 {
|
|
|
- // //销售主管放在三级列表中
|
|
|
- // ids, err = company.GetGroupIdsByParentId(*pid)
|
|
|
- // if err != nil {
|
|
|
- // fmt.Println(err.Error())
|
|
|
- // }
|
|
|
- // } else {
|
|
|
- // //销售主管放在二级列表中
|
|
|
- // ids, err = company.GetGroupIdsByParentId(sysUser.GroupId)
|
|
|
- // if err != nil {
|
|
|
- // fmt.Println(err.Error())
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
- // var idSlice []string
|
|
|
- // var sid string
|
|
|
- // for _, id := range ids {
|
|
|
- // idSlice = append(idSlice, *id)
|
|
|
- // }
|
|
|
- // //加入父级groupId
|
|
|
- // if *pid > 0 {
|
|
|
- // idSlice = append(idSlice, strconv.Itoa(*pid))
|
|
|
- // } else {
|
|
|
- // idSlice = append(idSlice, strconv.Itoa(sysUser.GroupId))
|
|
|
- // }
|
|
|
- //
|
|
|
- // sid = strings.Join(idSlice, ",")
|
|
|
- // if len(sid) > 0 {
|
|
|
- // if status != utils.COMPANY_STATUS_LOSE {
|
|
|
- // condition += ` AND (b.group_id IN (` + sid + `) OR status='流失') `
|
|
|
- // //pars = append(pars, sysUser.GroupId)
|
|
|
- // }
|
|
|
- //
|
|
|
- // permissionCondition += ` AND b.group_id IN (` + sid + `) `
|
|
|
- // } else {
|
|
|
- // if status != utils.COMPANY_STATUS_LOSE {
|
|
|
- // condition += ` AND (b.group_id IN (` + strconv.Itoa(sysUser.GroupId) + `) OR status='流失') `
|
|
|
- // //pars = append(pars, sysUser.GroupId)
|
|
|
- // }
|
|
|
- //
|
|
|
- // permissionCondition += ` AND b.group_id IN (` + strconv.Itoa(sysUser.GroupId) + `) `
|
|
|
- // }
|
|
|
- // }
|
|
|
- //
|
|
|
- // if sysUser.Authority == 4 {
|
|
|
- // if status != utils.COMPANY_STATUS_LOSE {
|
|
|
- // condition += ` AND b.group_id =` + strconv.Itoa(sysUser.GroupId)
|
|
|
- // //pars = append(pars, sysUser.GroupId)
|
|
|
- // }
|
|
|
- //
|
|
|
- // permissionCondition += ` AND b.group_id=` + strconv.Itoa(sysUser.GroupId)
|
|
|
- // //permissionPars = append(permissionPars, sysUser.GroupId)
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
- //}
|
|
|
-
|
|
|
if sysUser.RoleTypeCode == utils.ROLE_TYPE_CODE_RAI_SELLER { //权益销售的查询逻辑
|
|
|
condition += ` AND ( cp.seller_id = ` + strconv.Itoa(sysUser.AdminId) + ` OR cp.share_seller_id = ` + strconv.Itoa(sysUser.AdminId) + `)`
|
|
|
} else if sysUser.RoleTypeCode == utils.ROLE_TYPE_CODE_RAI_GROUP { // 权益销售组长查询逻辑
|
|
@@ -440,6 +247,7 @@ func (this *UserController) List() {
|
|
|
}
|
|
|
var userIds string
|
|
|
var userIdArr []int
|
|
|
+ var companyIds []int
|
|
|
if list != nil {
|
|
|
for k, v := range list {
|
|
|
if v.RegisterTime != "" {
|
|
@@ -477,6 +285,7 @@ func (this *UserController) List() {
|
|
|
if !isAdminRole {
|
|
|
list[k].CompanyInteractionNum = v.CompanyInteractionNumSeller
|
|
|
}
|
|
|
+ companyIds = append(companyIds, v.CompanyId)
|
|
|
}
|
|
|
userIds = strings.TrimRight(userIds, ",")
|
|
|
splitList, err := cygx.GetCygxCompanyUserListSplit(userIds)
|
|
@@ -500,7 +309,7 @@ func (this *UserController) List() {
|
|
|
}
|
|
|
|
|
|
UserRemindListMap := cygxService.GetCygxUserRemindListMap(userIdArr)
|
|
|
-
|
|
|
+ mapIsUserMaker := cygxService.GetCompanyProductIsUserMakerByCompanyIds(companyIds) //根据公司ID获取近四周之内有决策人互动的客户
|
|
|
for k, v := range list {
|
|
|
for _, vsplit := range splitList {
|
|
|
if vsplit.UserId == v.UserId {
|
|
@@ -523,6 +332,7 @@ func (this *UserController) List() {
|
|
|
list[k].Content = mapUserRemarks[int(v.UserId)]
|
|
|
}
|
|
|
list[k].IsRemind = UserRemindListMap[int(v.UserId)]
|
|
|
+ list[k].IsUserMaker = mapIsUserMaker[v.CompanyId]
|
|
|
}
|
|
|
for k := range list {
|
|
|
list[k].InteractionNum = list[k].HistoryNum + list[k].CountNum + list[k].IndustryFllowNum + list[k].DepartmentFollowNum + list[k].KeyWordNum + list[k].OnLineNum + list[k].OfficeNum + list[k].ChartNum + list[k].TripNum + list[k].RoadshowVideoNum + list[k].ActivityVideoNum + list[k].ActivityVoiceNum + list[k].YanxuanspecialNum
|
|
@@ -731,7 +541,8 @@ func (this *UserController) TableList() {
|
|
|
// @Param StartDate query string true "开始时间"
|
|
|
// @Param EndDate query string true "结束时间"
|
|
|
// @Param KeyWord query string true "搜索关键词"
|
|
|
-// @Param ClassType query int true "列表类型,1:权益,2:研选,默认1"
|
|
|
+// @Param ClassType query int true "列表类型,1:权益,2:研选,默认1"
|
|
|
+// @Param IsExport query bool false "是否导出excel,默认是false"
|
|
|
// @Success 200 {object} cygx.UserInteractionListResp
|
|
|
// @router /user/interaction/detail [get]
|
|
|
func (this *UserController) TableDetail() {
|
|
@@ -766,6 +577,12 @@ func (this *UserController) TableDetail() {
|
|
|
source, _ := this.GetInt("Source")
|
|
|
identityType, _ := this.GetInt("IdentityType")
|
|
|
classType, _ := this.GetInt("ClassType", 1)
|
|
|
+ //是否导出报表
|
|
|
+ isExport, _ := this.GetBool("IsExport")
|
|
|
+ if isExport {
|
|
|
+ pageSize = 10000
|
|
|
+ currentIndex = 1
|
|
|
+ }
|
|
|
if userId < 1 {
|
|
|
br.Msg = "用户不存在"
|
|
|
return
|
|
@@ -875,6 +692,13 @@ func (this *UserController) TableDetail() {
|
|
|
list[k].HttpUrl = utils.CYGX_MFYX_URL + "/material/info/" + strconv.Itoa(v.ArticleId)
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ //导出excel
|
|
|
+ if isExport {
|
|
|
+ exportListArticle(this, list, 1, br)
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
} else if source == 2 {
|
|
@@ -948,6 +772,11 @@ func (this *UserController) TableDetail() {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ //导出excel
|
|
|
+ if isExport {
|
|
|
+ exportListActivity(this, list, 1, br)
|
|
|
+ return
|
|
|
+ }
|
|
|
} else if source == 3 {
|
|
|
if classType == 1 {
|
|
|
condition += " AND art.article_type_id = 0 "
|
|
@@ -1173,6 +1002,11 @@ func (this *UserController) TableDetail() {
|
|
|
list[k].HttpUrl = utils.CYGX_MFYX_URL + "/column/detail/" + strconv.Itoa(v.ArticleId)
|
|
|
}
|
|
|
}
|
|
|
+ //导出excel
|
|
|
+ if isExport {
|
|
|
+ exportListYanxuanSpecial(this, list, 1, br)
|
|
|
+ return
|
|
|
+ }
|
|
|
} else if source == 12 { //收藏的专栏文章
|
|
|
if startDate != "" {
|
|
|
startDate += " 00:00:00"
|
|
@@ -1244,11 +1078,9 @@ func (this *UserController) TableDetail() {
|
|
|
}
|
|
|
} else if source == 15 { //1V1路演
|
|
|
if startDate != "" {
|
|
|
- //startDate += " 00:00:00"
|
|
|
condition += ` AND b.start_date >= '` + startDate + `' `
|
|
|
}
|
|
|
if endDate != "" {
|
|
|
- //endDate += " 23:59:59"
|
|
|
condition += ` AND b.start_date <= '` + endDate + `' `
|
|
|
}
|
|
|
if wxUser.Mobile == "" {
|
|
@@ -1270,6 +1102,12 @@ func (this *UserController) TableDetail() {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
+ //导出excel
|
|
|
+ if isExport {
|
|
|
+ exportListRsCalendar(this, list, 1, br)
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
page := paging.GetPaging(currentIndex, pageSize, total)
|
|
|
resp := new(cygx.UserInteractionListResp)
|
|
@@ -2567,6 +2405,7 @@ func (this *UserController) CompanyTableList() {
|
|
|
// @Param KeyWord query string false "搜索关键词"
|
|
|
// @Param ActivityName query string false "活动名称"
|
|
|
// @Param ClassType query int true "列表类型,1:权益,2:研选,默认1"
|
|
|
+// @Param IsExport query bool false "是否导出excel,默认是false"
|
|
|
// @Success 200 {object} cygx.UserInteractionListResp
|
|
|
// @router /user/company/interaction/detail [get]
|
|
|
func (this *UserController) CompanyTableDetail() {
|
|
@@ -2605,6 +2444,11 @@ func (this *UserController) CompanyTableDetail() {
|
|
|
br.Msg = "用户不存在"
|
|
|
return
|
|
|
}
|
|
|
+ isExport, _ := this.GetBool("IsExport")
|
|
|
+ if isExport {
|
|
|
+ pageSize = 10000
|
|
|
+ currentIndex = 1
|
|
|
+ }
|
|
|
|
|
|
// 1.标记用户表
|
|
|
//操作权限校验
|
|
@@ -2685,6 +2529,11 @@ func (this *UserController) CompanyTableDetail() {
|
|
|
list[k].HttpUrl = utils.CYGX_MFYX_URL + "/material/info/" + strconv.Itoa(v.ArticleId)
|
|
|
}
|
|
|
}
|
|
|
+ //导出excel
|
|
|
+ if isExport {
|
|
|
+ exportListArticle(this, list, 2, br)
|
|
|
+ return
|
|
|
+ }
|
|
|
} else if source == 2 {
|
|
|
|
|
|
if isMeeting == "1" {
|
|
@@ -2768,6 +2617,11 @@ func (this *UserController) CompanyTableDetail() {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ //导出excel
|
|
|
+ if isExport {
|
|
|
+ exportListActivity(this, list, 2, br)
|
|
|
+ return
|
|
|
+ }
|
|
|
} else if source == 3 {
|
|
|
if classType == 1 {
|
|
|
condition += " AND art.article_type_id = 0 "
|
|
@@ -3087,6 +2941,11 @@ func (this *UserController) CompanyTableDetail() {
|
|
|
list[k].HttpUrl = utils.CYGX_MFYX_URL + "/column/detail/" + strconv.Itoa(v.ArticleId)
|
|
|
}
|
|
|
}
|
|
|
+ //导出excel
|
|
|
+ if isExport {
|
|
|
+ exportListYanxuanSpecial(this, list, 2, br)
|
|
|
+ return
|
|
|
+ }
|
|
|
} else if source == 12 { //收藏的专栏文章
|
|
|
if isAdminRole {
|
|
|
total, list, err = cygx.GetCygxYanxuanSpecialCollectByUser(condition, startSize, pageSize)
|
|
@@ -3150,6 +3009,12 @@ func (this *UserController) CompanyTableDetail() {
|
|
|
}
|
|
|
}
|
|
|
} else if source == 15 { //1V1路演
|
|
|
+ if startDate != "" {
|
|
|
+ condition += ` AND b.start_date >= '` + startDate + `' `
|
|
|
+ }
|
|
|
+ if endDate != "" {
|
|
|
+ condition += ` AND b.start_date <= '` + endDate + `' `
|
|
|
+ }
|
|
|
var totalRsCalendar int
|
|
|
var listRsCalendar []*roadshow.RsCalendarMeetingUserByRai
|
|
|
if isAdminRole {
|
|
@@ -3174,6 +3039,11 @@ func (this *UserController) CompanyTableDetail() {
|
|
|
br.ErrMsg = "HandleListRsCalendar,Err:" + err.Error()
|
|
|
return
|
|
|
}
|
|
|
+ //导出excel
|
|
|
+ if isExport {
|
|
|
+ exportListRsCalendar(this, list, 2, br)
|
|
|
+ return
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
page := paging.GetPaging(currentIndex, pageSize, total)
|
|
@@ -3608,6 +3478,7 @@ func (this *UserController) CompanyExportInteraction() {
|
|
|
// @Param KeyWord query string false "搜索关键词"
|
|
|
// @Param ActivityName query string false "活动名称"
|
|
|
// @Param ClassType query int true "列表类型,1:权益,2:研选,默认1"
|
|
|
+// @Param IsExport query bool false "是否导出excel,默认是false"
|
|
|
// @Success 200 {object} cygx.UserInteractionListResp
|
|
|
// @router /user/company/list [get]
|
|
|
func (this *UserController) CompanyList() {
|
|
@@ -3640,6 +3511,11 @@ func (this *UserController) CompanyList() {
|
|
|
//packageType, _ := this.GetInt("PackageType")
|
|
|
keyWord = strings.Trim(keyWord, " ")
|
|
|
keyWord = strings.Replace(keyWord, "'", "", -1)
|
|
|
+ isExport, _ := this.GetBool("IsExport")
|
|
|
+ if isExport {
|
|
|
+ pageSize = 10000
|
|
|
+ currentIndex = 1
|
|
|
+ }
|
|
|
|
|
|
var total int
|
|
|
|
|
@@ -3955,6 +3831,11 @@ func (this *UserController) CompanyList() {
|
|
|
list[k].HttpUrl = utils.CYGX_MFYX_URL + "/material/info/" + strconv.Itoa(v.ArticleId)
|
|
|
}
|
|
|
}
|
|
|
+ //导出excel
|
|
|
+ if isExport {
|
|
|
+ exportListArticle(this, list, 3, br)
|
|
|
+ return
|
|
|
+ }
|
|
|
} else if source == 2 {
|
|
|
|
|
|
if isMeeting == "1" {
|
|
@@ -4040,6 +3921,11 @@ func (this *UserController) CompanyList() {
|
|
|
v.SellerName = sellNameMap[v.CompanyId]
|
|
|
}
|
|
|
}
|
|
|
+ //导出excel
|
|
|
+ if isExport {
|
|
|
+ exportListActivity(this, list, 3, br)
|
|
|
+ return
|
|
|
+ }
|
|
|
} else if source == 3 {
|
|
|
if classType == 1 {
|
|
|
condition += " AND art.article_type_id = 0 "
|
|
@@ -4409,6 +4295,16 @@ func (this *UserController) CompanyList() {
|
|
|
list[k].RegisterPlatformText = cygxService.GetArticleSourcePlatformText(v.RegisterPlatform)
|
|
|
list[k].HttpUrl = utils.CYGX_MFYX_URL + "/column/detail/" + strconv.Itoa(v.ArticleId)
|
|
|
}
|
|
|
+ for k, v := range list {
|
|
|
+ list[k].RegisterPlatform = cygxService.GetArticleSourcePlatform(v.SourcePlatform)
|
|
|
+ list[k].RegisterPlatformText = cygxService.GetArticleSourcePlatformText(v.RegisterPlatform)
|
|
|
+ list[k].HttpUrl = utils.CYGX_MFYX_URL + "/column/detail/" + strconv.Itoa(v.ArticleId)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //导出excel
|
|
|
+ if isExport {
|
|
|
+ exportListYanxuanSpecial(this, list, 3, br)
|
|
|
+ return
|
|
|
}
|
|
|
} else if source == 12 { //收藏的专栏文章
|
|
|
if isAdminRole {
|
|
@@ -4473,6 +4369,12 @@ func (this *UserController) CompanyList() {
|
|
|
}
|
|
|
}
|
|
|
} else if source == 15 {
|
|
|
+ if startDate != "" {
|
|
|
+ condition += ` AND b.start_date >= '` + startDate + `' `
|
|
|
+ }
|
|
|
+ if endDate != "" {
|
|
|
+ condition += ` AND b.start_date <= '` + endDate + `' `
|
|
|
+ }
|
|
|
var totalRsCalendar int
|
|
|
var listRsCalendar []*roadshow.RsCalendarMeetingUserByRai
|
|
|
if isAdminRole {
|
|
@@ -4497,6 +4399,11 @@ func (this *UserController) CompanyList() {
|
|
|
br.ErrMsg = "HandleListRsCalendar,Err:" + err.Error()
|
|
|
return
|
|
|
}
|
|
|
+ //导出excel
|
|
|
+ if isExport {
|
|
|
+ exportListRsCalendar(this, list, 3, br)
|
|
|
+ return
|
|
|
+ }
|
|
|
}
|
|
|
page := paging.GetPaging(currentIndex, pageSize, total)
|
|
|
|
|
@@ -5826,3 +5733,481 @@ func (this *UserController) UserRemind() {
|
|
|
br.Success = true
|
|
|
br.Data = resp
|
|
|
}
|
|
|
+
|
|
|
+// exportListRsCalendar 1v1路演导出Excel
|
|
|
+func exportListRsCalendar(this *UserController, list []*cygx.UserInteraction, excelType int, br *models.BaseResponse) {
|
|
|
+ dir, err := os.Executable()
|
|
|
+ exPath := filepath.Dir(dir)
|
|
|
+ downLoadnFilePath := exPath + "/" + time.Now().Format(utils.FormatDateTimeUnSpace) + ".xlsx"
|
|
|
+ xlsxFile := xlsx.NewFile()
|
|
|
+ if err != nil {
|
|
|
+ br.Msg = "生成文件失败"
|
|
|
+ br.ErrMsg = "生成文件失败"
|
|
|
+ return
|
|
|
+ }
|
|
|
+ style := xlsx.NewStyle()
|
|
|
+ border := xlsx.NewBorder("thin", "thin", "thin", "thin")
|
|
|
+ alignment := xlsx.Alignment{
|
|
|
+ Horizontal: "center",
|
|
|
+ Vertical: "center",
|
|
|
+ WrapText: true,
|
|
|
+ }
|
|
|
+
|
|
|
+ redStyle := xlsx.NewStyle()
|
|
|
+ redStyle.Alignment = alignment
|
|
|
+ redStyle.ApplyAlignment = true
|
|
|
+ redStyle.Font.Color = "ff0000"
|
|
|
+ redStyle.Border = *border
|
|
|
+
|
|
|
+ style.Alignment = alignment
|
|
|
+ style.ApplyAlignment = true
|
|
|
+
|
|
|
+ sheel, err := xlsxFile.AddSheet("1V1路演")
|
|
|
+ if err != nil {
|
|
|
+ br.Msg = "新增Sheet失败"
|
|
|
+ br.ErrMsg = "新增Sheet失败,Err:" + err.Error()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ sheel.SetColWidth(0, 0, 30)
|
|
|
+ sheel.SetColWidth(1, 1, 15)
|
|
|
+ sheel.SetColWidth(2, 2, 15)
|
|
|
+ sheel.SetColWidth(3, 3, 18)
|
|
|
+
|
|
|
+ titleRow := sheel.AddRow()
|
|
|
+
|
|
|
+ if excelType > 2 {
|
|
|
+ cellA := titleRow.AddCell()
|
|
|
+ cellA.SetStyle(style)
|
|
|
+ cellA.SetValue("客户名称")
|
|
|
+ }
|
|
|
+
|
|
|
+ if excelType > 1 {
|
|
|
+ cellB := titleRow.AddCell()
|
|
|
+ cellB.SetStyle(style)
|
|
|
+ cellB.SetValue("姓名")
|
|
|
+
|
|
|
+ cellC := titleRow.AddCell()
|
|
|
+ cellC.SetStyle(style)
|
|
|
+ cellC.SetValue("手机号")
|
|
|
+ }
|
|
|
+
|
|
|
+ cellD := titleRow.AddCell()
|
|
|
+ cellD.SetStyle(style)
|
|
|
+ cellD.SetValue("路演时间")
|
|
|
+
|
|
|
+ cellE := titleRow.AddCell()
|
|
|
+ cellE.SetStyle(style)
|
|
|
+ cellE.SetValue("研究员")
|
|
|
+
|
|
|
+ cellF := titleRow.AddCell()
|
|
|
+ cellF.SetStyle(style)
|
|
|
+ cellF.SetValue("路演形式")
|
|
|
+
|
|
|
+ cellG := titleRow.AddCell()
|
|
|
+ cellG.SetStyle(style)
|
|
|
+ cellG.SetValue("主题标签")
|
|
|
+
|
|
|
+ for _, v := range list {
|
|
|
+ dataRow := sheel.AddRow()
|
|
|
+ dataRow.SetHeight(20)
|
|
|
+
|
|
|
+ if excelType > 2 {
|
|
|
+ cellAData := dataRow.AddCell()
|
|
|
+ cellAData.SetStyle(style)
|
|
|
+ cellAData.Value = v.CompanyName
|
|
|
+ }
|
|
|
+
|
|
|
+ if excelType > 1 {
|
|
|
+ cellBData := dataRow.AddCell()
|
|
|
+ cellBData.SetStyle(style)
|
|
|
+ cellBData.Value = v.RealName
|
|
|
+
|
|
|
+ cellCData := dataRow.AddCell()
|
|
|
+ cellCData.SetStyle(style)
|
|
|
+ cellCData.Value = v.Mobile
|
|
|
+ }
|
|
|
+
|
|
|
+ cellDData := dataRow.AddCell()
|
|
|
+ cellDData.SetStyle(style)
|
|
|
+ cellDData.Value = v.ActivityTimeText
|
|
|
+
|
|
|
+ cellEData := dataRow.AddCell()
|
|
|
+ cellEData.SetStyle(style)
|
|
|
+ cellEData.Value = v.ResearcherName
|
|
|
+
|
|
|
+ cellFData := dataRow.AddCell()
|
|
|
+ cellFData.SetStyle(style)
|
|
|
+ if v.ActivityType == 1 {
|
|
|
+ cellFData.Value = "线上"
|
|
|
+ } else {
|
|
|
+ cellFData.Value = "线下"
|
|
|
+ }
|
|
|
+
|
|
|
+ cellGData := dataRow.AddCell()
|
|
|
+ cellGData.SetStyle(style)
|
|
|
+ cellGData.Value = v.LabelKeyWord
|
|
|
+
|
|
|
+ }
|
|
|
+ err = xlsxFile.Save(downLoadnFilePath)
|
|
|
+ if err != nil {
|
|
|
+ br.Msg = "保存文件失败"
|
|
|
+ br.ErrMsg = "保存文件失败"
|
|
|
+ return
|
|
|
+ }
|
|
|
+ randStr := time.Now().Format(utils.FormatDateTimeUnSpace)
|
|
|
+ downloadFileName := "1V1路演导出数据_" + randStr + ".xlsx"
|
|
|
+ this.Ctx.Output.Download(downLoadnFilePath, downloadFileName)
|
|
|
+ defer func() {
|
|
|
+ os.Remove(downLoadnFilePath)
|
|
|
+ }()
|
|
|
+ br.Ret = 200
|
|
|
+ br.Success = true
|
|
|
+ br.Msg = "导出成功"
|
|
|
+}
|
|
|
+
|
|
|
+// exportListArticle 文章阅读数据导出
|
|
|
+func exportListArticle(this *UserController, list []*cygx.UserInteraction, excelType int, br *models.BaseResponse) {
|
|
|
+ //创建excel
|
|
|
+ dir, err := os.Executable()
|
|
|
+ exPath := filepath.Dir(dir)
|
|
|
+ downLoadnFilePath := exPath + "/" + time.Now().Format(utils.FormatDateTimeUnSpace) + ".xlsx"
|
|
|
+ xlsxFile := xlsx.NewFile()
|
|
|
+ if err != nil {
|
|
|
+ br.Msg = "生成文件失败"
|
|
|
+ br.ErrMsg = "生成文件失败"
|
|
|
+ return
|
|
|
+ }
|
|
|
+ style := xlsx.NewStyle()
|
|
|
+ alignment := xlsx.Alignment{
|
|
|
+ Horizontal: "center",
|
|
|
+ Vertical: "center",
|
|
|
+ WrapText: true,
|
|
|
+ }
|
|
|
+ style.Alignment = alignment
|
|
|
+ style.ApplyAlignment = true
|
|
|
+ sheet, err := xlsxFile.AddSheet("报告阅读列表")
|
|
|
+ if err != nil {
|
|
|
+ br.Msg = "新增Sheet失败"
|
|
|
+ br.ErrMsg = "新增Sheet失败,Err:" + err.Error()
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ //标头
|
|
|
+ rowTitle := sheet.AddRow()
|
|
|
+ if excelType > 2 {
|
|
|
+ cellA := rowTitle.AddCell()
|
|
|
+ cellA.Value = "客户名称"
|
|
|
+ cellB := rowTitle.AddCell()
|
|
|
+ cellB.Value = "所属销售"
|
|
|
+ }
|
|
|
+ if excelType > 1 {
|
|
|
+ cellC := rowTitle.AddCell()
|
|
|
+ cellC.Value = "姓名"
|
|
|
+ cellD := rowTitle.AddCell()
|
|
|
+ cellD.Value = "手机号"
|
|
|
+ }
|
|
|
+ cellE := rowTitle.AddCell()
|
|
|
+ cellE.Value = "报告标题"
|
|
|
+ cellF := rowTitle.AddCell()
|
|
|
+ cellF.Value = "所属行业"
|
|
|
+ cellG := rowTitle.AddCell()
|
|
|
+ cellG.Value = "所属产业"
|
|
|
+ cellH := rowTitle.AddCell()
|
|
|
+ cellH.Value = "关联标的"
|
|
|
+ cellI := rowTitle.AddCell()
|
|
|
+ cellI.Value = "发布时间"
|
|
|
+ cellJ := rowTitle.AddCell()
|
|
|
+ cellJ.Value = "阅读时间"
|
|
|
+ cellK := rowTitle.AddCell()
|
|
|
+ cellK.Value = "阅读时长"
|
|
|
+
|
|
|
+ for _, item := range list {
|
|
|
+ row := sheet.AddRow()
|
|
|
+ if excelType > 2 {
|
|
|
+ cellA := row.AddCell()
|
|
|
+ cellA.Value = item.CompanyName
|
|
|
+ cellB := row.AddCell()
|
|
|
+ cellB.Value = item.SellerName
|
|
|
+ }
|
|
|
+ if excelType > 1 {
|
|
|
+ cellC := row.AddCell()
|
|
|
+ cellC.Value = item.RealName
|
|
|
+ cellD := row.AddCell()
|
|
|
+ cellD.Value = item.Mobile
|
|
|
+ }
|
|
|
+ cellEData := row.AddCell()
|
|
|
+ cellEData.Value = item.Title
|
|
|
+ cellFData := row.AddCell()
|
|
|
+ cellFData.Value = item.PermissionName
|
|
|
+ cellGData := row.AddCell()
|
|
|
+ cellGData.Value = item.IndustryName
|
|
|
+ cellHData := row.AddCell()
|
|
|
+ cellHData.Value = item.SubjectNameStr
|
|
|
+ cellIData := row.AddCell()
|
|
|
+ cellIData.Value = item.PublishDate
|
|
|
+ cellJData := row.AddCell()
|
|
|
+ cellJData.Value = item.CreateTime
|
|
|
+ cellKData := row.AddCell()
|
|
|
+ cellKData.Value = item.StopTime
|
|
|
+ }
|
|
|
+ err = xlsxFile.Save(downLoadnFilePath)
|
|
|
+ if err != nil {
|
|
|
+ br.Msg = "保存文件失败"
|
|
|
+ br.ErrMsg = "保存文件失败"
|
|
|
+ return
|
|
|
+ }
|
|
|
+ randStr := time.Now().Format(utils.FormatDateTimeUnSpace)
|
|
|
+ downloadFileName := "报告阅读列表导出数据_" + randStr + ".xlsx"
|
|
|
+ this.Ctx.Output.Download(downLoadnFilePath, downloadFileName)
|
|
|
+ defer func() {
|
|
|
+ os.Remove(downLoadnFilePath)
|
|
|
+ }()
|
|
|
+ br.Ret = 200
|
|
|
+ br.Success = true
|
|
|
+ br.Msg = "导出成功"
|
|
|
+}
|
|
|
+
|
|
|
+// exportListArticle 文章阅读数据导出
|
|
|
+func exportListActivity(this *UserController, list []*cygx.UserInteraction, excelType int, br *models.BaseResponse) {
|
|
|
+ //创建excel
|
|
|
+ dir, err := os.Executable()
|
|
|
+ exPath := filepath.Dir(dir)
|
|
|
+ downLoadnFilePath := exPath + "/" + time.Now().Format(utils.FormatDateTimeUnSpace) + ".xlsx"
|
|
|
+ xlsxFile := xlsx.NewFile()
|
|
|
+ if err != nil {
|
|
|
+ br.Msg = "生成文件失败"
|
|
|
+ br.ErrMsg = "生成文件失败"
|
|
|
+ return
|
|
|
+ }
|
|
|
+ style := xlsx.NewStyle()
|
|
|
+ alignment := xlsx.Alignment{
|
|
|
+ Horizontal: "center",
|
|
|
+ Vertical: "center",
|
|
|
+ WrapText: true,
|
|
|
+ }
|
|
|
+ style.Alignment = alignment
|
|
|
+ style.ApplyAlignment = true
|
|
|
+ sheet, err := xlsxFile.AddSheet("客户参会记录")
|
|
|
+ if err != nil {
|
|
|
+ br.Msg = "新增Sheet失败"
|
|
|
+ br.ErrMsg = "新增Sheet失败,Err:" + err.Error()
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ //标头
|
|
|
+ rowTitle := sheet.AddRow()
|
|
|
+
|
|
|
+ if excelType > 2 {
|
|
|
+ cellA := rowTitle.AddCell()
|
|
|
+ cellA.Value = "客户名称"
|
|
|
+ cellB := rowTitle.AddCell()
|
|
|
+ cellB.Value = "所属销售"
|
|
|
+ }
|
|
|
+
|
|
|
+ if excelType > 1 {
|
|
|
+ cellC := rowTitle.AddCell()
|
|
|
+ cellC.Value = "姓名"
|
|
|
+ cellD := rowTitle.AddCell()
|
|
|
+ cellD.Value = "手机号"
|
|
|
+ }
|
|
|
+
|
|
|
+ cellE := rowTitle.AddCell()
|
|
|
+ cellE.Value = "活动名称"
|
|
|
+ cellF := rowTitle.AddCell()
|
|
|
+ cellF.Value = "所属行业"
|
|
|
+ cellG := rowTitle.AddCell()
|
|
|
+ cellG.Value = "活动类型"
|
|
|
+ cellH := rowTitle.AddCell()
|
|
|
+ cellH.Value = "活动主题"
|
|
|
+ cellI := rowTitle.AddCell()
|
|
|
+ cellI.Value = "活动时间"
|
|
|
+ cellJ := rowTitle.AddCell()
|
|
|
+ cellJ.Value = "是否到会"
|
|
|
+ cellK := rowTitle.AddCell()
|
|
|
+ cellK.Value = "首次入会时间"
|
|
|
+ cellL := rowTitle.AddCell()
|
|
|
+ cellL.Value = "最后退出时间"
|
|
|
+ cellM := rowTitle.AddCell()
|
|
|
+ cellM.Value = "参与总时长"
|
|
|
+ cellN := rowTitle.AddCell()
|
|
|
+ cellN.Value = "参会方式"
|
|
|
+ cellO := rowTitle.AddCell()
|
|
|
+ cellO.Value = "参会权鉴"
|
|
|
+ cellP := rowTitle.AddCell()
|
|
|
+ cellP.Value = "参会状态"
|
|
|
+
|
|
|
+ for _, item := range list {
|
|
|
+ row := sheet.AddRow()
|
|
|
+ if excelType > 2 {
|
|
|
+ cellAData := row.AddCell()
|
|
|
+ cellAData.Value = item.CompanyName
|
|
|
+ cellBData := row.AddCell()
|
|
|
+ cellBData.Value = item.SellerName
|
|
|
+ }
|
|
|
+
|
|
|
+ if excelType > 1 {
|
|
|
+ cellCData := row.AddCell()
|
|
|
+ cellCData.Value = item.RealName
|
|
|
+ cellDData := row.AddCell()
|
|
|
+ cellDData.Value = item.Mobile
|
|
|
+ }
|
|
|
+
|
|
|
+ cellEData := row.AddCell()
|
|
|
+ cellEData.Value = item.ActivityName
|
|
|
+ cellFData := row.AddCell()
|
|
|
+ cellFData.Value = item.PermissionName
|
|
|
+ cellGData := row.AddCell()
|
|
|
+ cellGData.Value = item.ActivityTypeName
|
|
|
+ cellHData := row.AddCell()
|
|
|
+ cellHData.Value = item.Label
|
|
|
+ cellIData := row.AddCell()
|
|
|
+ cellIData.Value = item.ActivityTime
|
|
|
+ cellJData := row.AddCell()
|
|
|
+ if item.IsMeeting == 1 {
|
|
|
+ cellJData.Value = "到会"
|
|
|
+ } else {
|
|
|
+ cellJData.Value = "未到会"
|
|
|
+ }
|
|
|
+ cellKData := row.AddCell()
|
|
|
+ cellKData.Value = item.FirstMeetingTime
|
|
|
+ cellLData := row.AddCell()
|
|
|
+ cellLData.Value = item.LastMeetingTime
|
|
|
+ cellMData := row.AddCell()
|
|
|
+ cellMData.Value = item.Duration
|
|
|
+ cellNData := row.AddCell()
|
|
|
+ cellNData.Value = item.LastMeetingTime
|
|
|
+ cellOData := row.AddCell()
|
|
|
+ cellOData.Value = item.MeetingTypeStr
|
|
|
+ cellPData := row.AddCell()
|
|
|
+ cellPData.Value = item.MeetingStatusStr
|
|
|
+ }
|
|
|
+
|
|
|
+ err = xlsxFile.Save(downLoadnFilePath)
|
|
|
+ if err != nil {
|
|
|
+ br.Msg = "保存文件失败"
|
|
|
+ br.ErrMsg = "保存文件失败"
|
|
|
+ return
|
|
|
+ }
|
|
|
+ randStr := time.Now().Format(utils.FormatDateTimeUnSpace)
|
|
|
+ downloadFileName := "客户参会记录导出数据_" + randStr + ".xlsx"
|
|
|
+ this.Ctx.Output.Download(downLoadnFilePath, downloadFileName)
|
|
|
+ defer func() {
|
|
|
+ os.Remove(downLoadnFilePath)
|
|
|
+ }()
|
|
|
+ br.Ret = 200
|
|
|
+ br.Success = true
|
|
|
+ br.Msg = "导出成功"
|
|
|
+}
|
|
|
+
|
|
|
+// exportListYanxuanSpecial 研选专栏阅读记录
|
|
|
+func exportListYanxuanSpecial(this *UserController, list []*cygx.UserInteraction, excelType int, br *models.BaseResponse) {
|
|
|
+ //创建excel
|
|
|
+ dir, err := os.Executable()
|
|
|
+ exPath := filepath.Dir(dir)
|
|
|
+ downLoadnFilePath := exPath + "/" + time.Now().Format(utils.FormatDateTimeUnSpace) + ".xlsx"
|
|
|
+ xlsxFile := xlsx.NewFile()
|
|
|
+ if err != nil {
|
|
|
+ br.Msg = "生成文件失败"
|
|
|
+ br.ErrMsg = "生成文件失败"
|
|
|
+ return
|
|
|
+ }
|
|
|
+ style := xlsx.NewStyle()
|
|
|
+ alignment := xlsx.Alignment{
|
|
|
+ Horizontal: "center",
|
|
|
+ Vertical: "center",
|
|
|
+ WrapText: true,
|
|
|
+ }
|
|
|
+ style.Alignment = alignment
|
|
|
+ style.ApplyAlignment = true
|
|
|
+ sheet, err := xlsxFile.AddSheet("客户参会记录")
|
|
|
+ if err != nil {
|
|
|
+ br.Msg = "新增Sheet失败"
|
|
|
+ br.ErrMsg = "新增Sheet失败,Err:" + err.Error()
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ //标头
|
|
|
+ rowTitle := sheet.AddRow()
|
|
|
+
|
|
|
+ if excelType > 2 {
|
|
|
+ cellAy := rowTitle.AddCell()
|
|
|
+ cellAy.Value = "客户名称"
|
|
|
+ cellBy := rowTitle.AddCell()
|
|
|
+ cellBy.Value = "所属销售"
|
|
|
+ }
|
|
|
+
|
|
|
+ if excelType > 1 {
|
|
|
+ cellC := rowTitle.AddCell()
|
|
|
+ cellC.Value = "姓名"
|
|
|
+ cellD := rowTitle.AddCell()
|
|
|
+ cellD.Value = "手机号"
|
|
|
+ }
|
|
|
+
|
|
|
+ cellA := rowTitle.AddCell()
|
|
|
+ cellA.Value = "文章标题"
|
|
|
+ cellB := rowTitle.AddCell()
|
|
|
+ cellB.Value = "文章类型"
|
|
|
+ cellC := rowTitle.AddCell()
|
|
|
+ cellC.Value = "标签"
|
|
|
+ cellD := rowTitle.AddCell()
|
|
|
+ cellD.Value = "发布时间"
|
|
|
+ cellE := rowTitle.AddCell()
|
|
|
+ cellE.Value = "阅读时间"
|
|
|
+ cellF := rowTitle.AddCell()
|
|
|
+ cellF.Value = "阅读时长"
|
|
|
+ cellG := rowTitle.AddCell()
|
|
|
+ cellG.Value = "阅读来源"
|
|
|
+
|
|
|
+ for _, item := range list {
|
|
|
+ row := sheet.AddRow()
|
|
|
+
|
|
|
+ if excelType > 2 {
|
|
|
+ cellADatay := row.AddCell()
|
|
|
+ cellADatay.Value = item.CompanyName
|
|
|
+ cellBDatay := row.AddCell()
|
|
|
+ cellBDatay.Value = item.SellerName
|
|
|
+ }
|
|
|
+
|
|
|
+ if excelType > 1 {
|
|
|
+ cellCData := row.AddCell()
|
|
|
+ cellCData.Value = item.RealName
|
|
|
+ cellDData := row.AddCell()
|
|
|
+ cellDData.Value = item.Mobile
|
|
|
+ }
|
|
|
+
|
|
|
+ cellAData := row.AddCell()
|
|
|
+ cellAData.Value = item.Title
|
|
|
+ cellBData := row.AddCell()
|
|
|
+ if item.SpecialType == 1 {
|
|
|
+ cellBData.Value = "笔记"
|
|
|
+ } else {
|
|
|
+ cellBData.Value = "观点"
|
|
|
+ }
|
|
|
+ cellCData := row.AddCell()
|
|
|
+ cellCData.Value = item.IndustryName
|
|
|
+ cellDData := row.AddCell()
|
|
|
+ cellDData.Value = item.PublishDate
|
|
|
+ cellEData := row.AddCell()
|
|
|
+ cellEData.Value = item.CreateTime
|
|
|
+ cellFData := row.AddCell()
|
|
|
+ cellFData.Value = item.StopTime
|
|
|
+ cellGData := row.AddCell()
|
|
|
+ cellGData.Value = cygxService.GetArticleSourcePlatformText(item.RegisterPlatform)
|
|
|
+ }
|
|
|
+
|
|
|
+ err = xlsxFile.Save(downLoadnFilePath)
|
|
|
+ if err != nil {
|
|
|
+ br.Msg = "保存文件失败"
|
|
|
+ br.ErrMsg = "保存文件失败"
|
|
|
+ return
|
|
|
+ }
|
|
|
+ randStr := time.Now().Format(utils.FormatDateTimeUnSpace)
|
|
|
+ downloadFileName := "客户参会记录导出数据_" + randStr + ".xlsx"
|
|
|
+ this.Ctx.Output.Download(downLoadnFilePath, downloadFileName)
|
|
|
+ defer func() {
|
|
|
+ os.Remove(downLoadnFilePath)
|
|
|
+ }()
|
|
|
+ br.Ret = 200
|
|
|
+ br.Success = true
|
|
|
+ br.Msg = "导出成功"
|
|
|
+}
|