|
@@ -2255,6 +2255,14 @@ func StackCompanyListExport(this *StatisticReportController, dataType string, re
|
|
|
cellDay := titleRow.AddCell()
|
|
|
cellDay.SetStyle(style)
|
|
|
cellDay.SetValue("超出过期天数")
|
|
|
+
|
|
|
+ cellAscribeContent := titleRow.AddCell()
|
|
|
+ cellAscribeContent.SetStyle(style)
|
|
|
+ cellAscribeContent.SetValue("不续约归因")
|
|
|
+
|
|
|
+ cellContent := titleRow.AddCell()
|
|
|
+ cellContent.SetStyle(style)
|
|
|
+ cellContent.SetValue("详细原因")
|
|
|
default:
|
|
|
cellTime := titleRow.AddCell()
|
|
|
cellTime.SetStyle(style)
|
|
@@ -2300,6 +2308,18 @@ func StackCompanyListExport(this *StatisticReportController, dataType string, re
|
|
|
cellDay := dataRow.AddCell()
|
|
|
cellDay.SetStyle(style)
|
|
|
cellDay.SetValue(v.ExpireDay)
|
|
|
+
|
|
|
+ switch dataType {
|
|
|
+ case "未续约客户":
|
|
|
+ cellAscribeContent := dataRow.AddCell()
|
|
|
+ cellAscribeContent.SetStyle(style)
|
|
|
+ cellAscribeContent.SetValue(v.AscribeContent)
|
|
|
+
|
|
|
+ cellContent := dataRow.AddCell()
|
|
|
+ cellContent.SetStyle(style)
|
|
|
+ cellContent.SetValue(v.Content)
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
err = xlsxFile.Save(downLoadnFilePath)
|
|
|
if err != nil {
|
|
@@ -2557,7 +2577,7 @@ func getHistoryStackCompanyList(sysUser *system.Admin, currentIndex, pageSize, i
|
|
|
ascribecompanyIds = append(ascribecompanyIds, item.CompanyId)
|
|
|
}
|
|
|
//归因标签
|
|
|
- mapGetCompanyAscribeContent := services.GetCompanyAscribeContentMap(ascribecompanyIds)
|
|
|
+ mapGetCompanyAscribeContent, mapContent := services.GetCompanyAscribeContentMap(ascribecompanyIds)
|
|
|
mapNoRenewedNote := services.GetCompanyNoRenewedNoteMap(ascribecompanyIds)
|
|
|
if len(ids) > 0 {
|
|
|
idStr := strings.Join(ids, ",")
|
|
@@ -2592,6 +2612,7 @@ func getHistoryStackCompanyList(sysUser *system.Admin, currentIndex, pageSize, i
|
|
|
}
|
|
|
}
|
|
|
item.AscribeContent = mapGetCompanyAscribeContent[fmt.Sprint("CID_", item.CompanyId, "PID_", item.ProductId)]
|
|
|
+ item.Content = mapContent[fmt.Sprint("CID_", item.CompanyId, "PID_", item.ProductId)]
|
|
|
item.IsShowNoRenewedNote = mapNoRenewedNote[fmt.Sprint("CID_", item.CompanyId, "PID_", item.ProductId)]
|
|
|
}
|
|
|
}
|
|
@@ -3216,10 +3237,11 @@ func getTodayStackCompanyListV2(sysUser *system.Admin, currentIndex, pageSize, i
|
|
|
ascribecompanyIds = append(ascribecompanyIds, item.CompanyId)
|
|
|
}
|
|
|
//归因标签
|
|
|
- mapGetCompanyAscribeContent := services.GetCompanyAscribeContentMap(ascribecompanyIds)
|
|
|
+ mapGetCompanyAscribeContent, mapContent := services.GetCompanyAscribeContentMap(ascribecompanyIds)
|
|
|
mapNoRenewedNote := services.GetCompanyNoRenewedNoteMap(ascribecompanyIds)
|
|
|
for _, item := range list {
|
|
|
item.AscribeContent = mapGetCompanyAscribeContent[fmt.Sprint("CID_", item.CompanyId, "PID_", item.ProductId)]
|
|
|
+ item.Content = mapContent[fmt.Sprint("CID_", item.CompanyId, "PID_", item.ProductId)]
|
|
|
item.IsShowNoRenewedNote = mapNoRenewedNote[fmt.Sprint("CID_", item.CompanyId, "PID_", item.ProductId)]
|
|
|
}
|
|
|
|
|
@@ -3268,6 +3290,7 @@ func getTodayStackCompanyListV2(sysUser *system.Admin, currentIndex, pageSize, i
|
|
|
PackageDifference: v.PackageDifference,
|
|
|
AscribeContent: v.AscribeContent,
|
|
|
IsShowNoRenewedNote: v.IsShowNoRenewedNote,
|
|
|
+ Content: v.Content,
|
|
|
}
|
|
|
stackCompanyStatisticList = append(stackCompanyStatisticList, &stackCompanyStatistic)
|
|
|
}
|
|
@@ -3745,11 +3768,12 @@ func (this *StatisticReportController) IncrementalCompanyList() {
|
|
|
ascribecompanyIds = append(ascribecompanyIds, item.CompanyId)
|
|
|
}
|
|
|
//归因标签
|
|
|
- mapGetCompanyAscribeContent := services.GetCompanyAscribeContentMap(ascribecompanyIds)
|
|
|
+ mapGetCompanyAscribeContent, mapContent := services.GetCompanyAscribeContentMap(ascribecompanyIds)
|
|
|
mapNoRenewedNote := services.GetCompanyNoRenewedNoteMap(ascribecompanyIds)
|
|
|
|
|
|
for _, item := range tmpList {
|
|
|
item.AscribeContent = mapGetCompanyAscribeContent[fmt.Sprint("CID_", item.CompanyId, "PID_", item.ProductId)]
|
|
|
+ item.Content = mapContent[fmt.Sprint("CID_", item.CompanyId, "PID_", item.ProductId)]
|
|
|
item.IsShowNoRenewedNote = mapNoRenewedNote[fmt.Sprint("CID_", item.CompanyId, "PID_", item.ProductId)]
|
|
|
}
|
|
|
list = tmpList
|
|
@@ -3978,6 +4002,14 @@ func IncrementalCompanyListExport(this *StatisticReportController, dataType stri
|
|
|
cellTime.SetValue("续约时间")
|
|
|
case "未续约客户":
|
|
|
cellTime.SetValue("最近合同到期时间")
|
|
|
+
|
|
|
+ cellAscribeContent := titleRow.AddCell()
|
|
|
+ cellAscribeContent.SetStyle(style)
|
|
|
+ cellAscribeContent.SetValue("不续约归因")
|
|
|
+
|
|
|
+ cellContent := titleRow.AddCell()
|
|
|
+ cellContent.SetStyle(style)
|
|
|
+ cellContent.SetValue("详细原因")
|
|
|
}
|
|
|
|
|
|
for _, v := range resp.List {
|
|
@@ -4018,6 +4050,14 @@ func IncrementalCompanyListExport(this *StatisticReportController, dataType stri
|
|
|
cellDataTime.SetValue(v.StartDate)
|
|
|
case "未续约客户":
|
|
|
cellDataTime.SetValue(v.EndDate)
|
|
|
+
|
|
|
+ cellAscribeContent := dataRow.AddCell()
|
|
|
+ cellAscribeContent.SetStyle(style)
|
|
|
+ cellAscribeContent.SetValue(v.AscribeContent)
|
|
|
+
|
|
|
+ cellContent := dataRow.AddCell()
|
|
|
+ cellContent.SetStyle(style)
|
|
|
+ cellContent.SetValue(v.Content)
|
|
|
}
|
|
|
|
|
|
}
|