|
@@ -1,6 +1,7 @@
|
|
|
package roadshow
|
|
|
|
|
|
import (
|
|
|
+ "context"
|
|
|
"errors"
|
|
|
"fmt"
|
|
|
"hongze/hongze_task/models"
|
|
@@ -8,7 +9,6 @@ import (
|
|
|
"hongze/hongze_task/utils"
|
|
|
"strconv"
|
|
|
"time"
|
|
|
- "context"
|
|
|
)
|
|
|
|
|
|
func AddReportRecord(cont context.Context) (err error) {
|
|
@@ -31,11 +31,23 @@ func AddReportRecord(cont context.Context) (err error) {
|
|
|
if err != nil {
|
|
|
return
|
|
|
}
|
|
|
+
|
|
|
+ companyListRai, err := roadshow.RsCompanyListRai() //权益销售
|
|
|
+ if err != nil {
|
|
|
+ return
|
|
|
+ }
|
|
|
companyMap := make(map[int]*roadshow.CompanySearchView)
|
|
|
for _, v := range companyList {
|
|
|
companyMap[v.CompanyId] = v
|
|
|
}
|
|
|
|
|
|
+ for _, v := range companyListRai {
|
|
|
+ if companyMap[v.CompanyId] != nil {
|
|
|
+ continue
|
|
|
+ }
|
|
|
+ companyMap[v.CompanyId] = v
|
|
|
+ }
|
|
|
+
|
|
|
endDate := time.Now().AddDate(-1, 0, 0).Format(utils.FormatDate)
|
|
|
|
|
|
existList, err := roadshow.GetExistRsReportRecord(endDate)
|