|
@@ -1979,7 +1979,7 @@ func (this *IndustrialSubjectController) ReportMappingAdd() {
|
|
|
}
|
|
|
|
|
|
//func init() {
|
|
|
-// initart()
|
|
|
+// initOrder()
|
|
|
//}
|
|
|
|
|
|
func initart() {
|
|
@@ -2719,6 +2719,66 @@ func initOrder() {
|
|
|
return
|
|
|
}
|
|
|
//标头
|
|
|
+ //rowTitle := sheet.AddRow()
|
|
|
+ //cellA := rowTitle.AddCell()
|
|
|
+ //cellA.Value = "姓名"
|
|
|
+ //cellB := rowTitle.AddCell()
|
|
|
+ //cellB.Value = "手机号"
|
|
|
+ //cellC := rowTitle.AddCell()
|
|
|
+ //cellC.Value = "公司名称"
|
|
|
+ //
|
|
|
+ //cellMoney := rowTitle.AddCell()
|
|
|
+ //cellMoney.Value = "金额"
|
|
|
+ //
|
|
|
+ //cellname := rowTitle.AddCell()
|
|
|
+ //cellname.Value = "活动名称"
|
|
|
+ //
|
|
|
+ //cellTime := rowTitle.AddCell()
|
|
|
+ //cellTime.Value = "支付时间"
|
|
|
+ //
|
|
|
+ //for _, item := range list {
|
|
|
+ //
|
|
|
+ // row := sheet.AddRow()
|
|
|
+ // cellAData := row.AddCell()
|
|
|
+ // cellAData.Value = item.RealName
|
|
|
+ //
|
|
|
+ // cellBData := row.AddCell()
|
|
|
+ // cellBData.Value = item.Mobile
|
|
|
+ // cellCData := row.AddCell()
|
|
|
+ // cellCData.Value = item.CompanyName
|
|
|
+ //
|
|
|
+ // cellCMoneyData := row.AddCell()
|
|
|
+ // cellCMoneyData.Value = fmt.Sprint(item.PayMoney)
|
|
|
+ //
|
|
|
+ // cellCnameData := row.AddCell()
|
|
|
+ // cellCnameData.Value = item.SourceTitle
|
|
|
+ //
|
|
|
+ // cellTimeata := row.AddCell()
|
|
|
+ // cellTimeata.Value = item.PayTime.Format(utils.FormatDateTime)
|
|
|
+ //}
|
|
|
+
|
|
|
+ var mobiles []string
|
|
|
+ var activityIds []int
|
|
|
+ for _, v := range list {
|
|
|
+ mobiles = append(mobiles, v.Mobile)
|
|
|
+ activityIds = append(activityIds, v.SourceId)
|
|
|
+ }
|
|
|
+ pars = make([]interface{}, 0)
|
|
|
+ inviteNameMap := cygxService.GetCygxUserBusinessCardMap(mobiles) // 根据手机号获取邀请人
|
|
|
+ condition = ` AND activity_id IN (` + utils.GetOrmInReplace(len(activityIds)) + `) `
|
|
|
+ pars = append(pars, activityIds)
|
|
|
+
|
|
|
+ listActivity, errList := cygx.GetActivityListAllInit(condition, pars)
|
|
|
+ if errList != nil {
|
|
|
+ fmt.Println(errList)
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ mapHost := make(map[int]string)
|
|
|
+ for _, v := range listActivity {
|
|
|
+ mapHost[v.ActivityId] = v.Host
|
|
|
+ }
|
|
|
+
|
|
|
rowTitle := sheet.AddRow()
|
|
|
cellA := rowTitle.AddCell()
|
|
|
cellA.Value = "姓名"
|
|
@@ -2727,11 +2787,20 @@ func initOrder() {
|
|
|
cellC := rowTitle.AddCell()
|
|
|
cellC.Value = "公司名称"
|
|
|
|
|
|
+ cellSeller := rowTitle.AddCell()
|
|
|
+ cellSeller.Value = "所属销售"
|
|
|
+
|
|
|
+ cellInviteName := rowTitle.AddCell()
|
|
|
+ cellInviteName.Value = "推荐人"
|
|
|
+
|
|
|
cellMoney := rowTitle.AddCell()
|
|
|
cellMoney.Value = "金额"
|
|
|
|
|
|
cellname := rowTitle.AddCell()
|
|
|
- cellname.Value = "活动名称"
|
|
|
+ cellname.Value = "报告标题"
|
|
|
+
|
|
|
+ cellNickename := rowTitle.AddCell()
|
|
|
+ cellNickename.Value = "作者"
|
|
|
|
|
|
cellTime := rowTitle.AddCell()
|
|
|
cellTime.Value = "支付时间"
|
|
@@ -2747,12 +2816,25 @@ func initOrder() {
|
|
|
cellCData := row.AddCell()
|
|
|
cellCData.Value = item.CompanyName
|
|
|
|
|
|
+ cellSellerData := row.AddCell()
|
|
|
+ cellSellerData.Value = item.SellerName
|
|
|
+
|
|
|
+ cellInviteNameData := row.AddCell()
|
|
|
+ if item.ShareName != "" {
|
|
|
+ cellInviteNameData.Value = item.ShareName
|
|
|
+ } else {
|
|
|
+ cellInviteNameData.Value = inviteNameMap[item.Mobile]
|
|
|
+ }
|
|
|
+
|
|
|
cellCMoneyData := row.AddCell()
|
|
|
cellCMoneyData.Value = fmt.Sprint(item.PayMoney)
|
|
|
|
|
|
cellCnameData := row.AddCell()
|
|
|
cellCnameData.Value = item.SourceTitle
|
|
|
|
|
|
+ cellNickenameData := row.AddCell()
|
|
|
+ cellNickenameData.Value = mapHost[item.SourceId]
|
|
|
+
|
|
|
cellTimeata := row.AddCell()
|
|
|
cellTimeata.Value = item.PayTime.Format(utils.FormatDateTime)
|
|
|
}
|
|
@@ -2815,6 +2897,12 @@ func initOrderArticle() {
|
|
|
mapArtcileNickNameYx[v.Id] = v.NickName
|
|
|
}
|
|
|
|
|
|
+ var mobiles []string
|
|
|
+ for _, v := range list {
|
|
|
+ mobiles = append(mobiles, v.Mobile)
|
|
|
+ }
|
|
|
+ inviteNameMap := cygxService.GetCygxUserBusinessCardMap(mobiles) // 根据手机号获取邀请人
|
|
|
+
|
|
|
//创建excel
|
|
|
dir, err := os.Executable()
|
|
|
exPath := filepath.Dir(dir)
|
|
@@ -2858,6 +2946,12 @@ func initOrderArticle() {
|
|
|
cellC := rowTitle.AddCell()
|
|
|
cellC.Value = "公司名称"
|
|
|
|
|
|
+ cellSeller := rowTitle.AddCell()
|
|
|
+ cellSeller.Value = "所属销售"
|
|
|
+
|
|
|
+ cellInviteName := rowTitle.AddCell()
|
|
|
+ cellInviteName.Value = "推荐人"
|
|
|
+
|
|
|
cellMoney := rowTitle.AddCell()
|
|
|
cellMoney.Value = "金额"
|
|
|
|
|
@@ -2881,6 +2975,16 @@ func initOrderArticle() {
|
|
|
cellCData := row.AddCell()
|
|
|
cellCData.Value = item.CompanyName
|
|
|
|
|
|
+ cellSellerData := row.AddCell()
|
|
|
+ cellSellerData.Value = item.SellerName
|
|
|
+
|
|
|
+ cellInviteNameData := row.AddCell()
|
|
|
+ if item.ShareName != "" {
|
|
|
+ cellInviteNameData.Value = item.ShareName
|
|
|
+ } else {
|
|
|
+ cellInviteNameData.Value = inviteNameMap[item.Mobile]
|
|
|
+ }
|
|
|
+
|
|
|
cellCMoneyData := row.AddCell()
|
|
|
cellCMoneyData.Value = fmt.Sprint(item.PayMoney)
|
|
|
|