|
@@ -1985,9 +1985,9 @@ func (this *IndustrialSubjectController) ReportMappingAdd() {
|
|
|
br.IsAddLog = true
|
|
|
}
|
|
|
|
|
|
-//func init() {
|
|
|
-// initart()
|
|
|
-//}
|
|
|
+func init() {
|
|
|
+ initart()
|
|
|
+}
|
|
|
|
|
|
func initart() {
|
|
|
//行业
|
|
@@ -2070,6 +2070,8 @@ func initart() {
|
|
|
cellTc := rowTitle.AddCell()
|
|
|
cellTc.Value = "签约套餐"
|
|
|
|
|
|
+ hasmobile := make(map[string]bool)
|
|
|
+
|
|
|
for _, v := range listart {
|
|
|
articleId := v.ArticleId
|
|
|
condition = ` AND h.company_id != ` + strconv.Itoa(utils.HZ_COMPANY_ID) // 过滤弘则
|
|
@@ -2092,7 +2094,8 @@ func initart() {
|
|
|
if !utils.ValidateMobileFormatat(vPv.Mobile) {
|
|
|
continue
|
|
|
}
|
|
|
- mapArticle_H[fmt.Sprint("m_", vPv.Mobile, "a_", vPv.ArticleId)] = true
|
|
|
+ mapArticle_H[fmt.Sprint("m_", vPv.Mobile)] = true
|
|
|
+
|
|
|
}
|
|
|
|
|
|
listClPv, err := cygx.GetCygxCelueArticleHistoryRecordPvAll(strconv.Itoa(articleId))
|
|
@@ -2110,7 +2113,8 @@ func initart() {
|
|
|
if !utils.ValidateMobileFormatat(vPv.Mobile) {
|
|
|
continue
|
|
|
}
|
|
|
- mapArticle_H[fmt.Sprint("m_", vPv.Mobile, "a_", vPv.ArticleId)] = true
|
|
|
+ mapArticle_H[fmt.Sprint("m_", vPv.Mobile)] = true
|
|
|
+
|
|
|
}
|
|
|
|
|
|
var listDate []*cygx.ArticleHistoryRep
|
|
@@ -2124,7 +2128,7 @@ func initart() {
|
|
|
if !utils.ValidateMobileFormatat(vPv.Mobile) {
|
|
|
continue
|
|
|
}
|
|
|
- if mapArticle_H[fmt.Sprint("m_", vPv.Mobile, "a_", vPv.ArticleId)] {
|
|
|
+ if mapArticle_H[fmt.Sprint("m_", vPv.Mobile)] {
|
|
|
continue
|
|
|
}
|
|
|
|
|
@@ -2144,9 +2148,10 @@ func initart() {
|
|
|
//if vPv.Mobile != "" {
|
|
|
mobiles = append(mobiles, vPv.Mobile)
|
|
|
//}
|
|
|
- if mapArticle_H[fmt.Sprint("m_", vPv.Mobile, "a_", vPv.ArticleId)] {
|
|
|
+ if mapArticle_H[fmt.Sprint("m_", vPv.Mobile)] {
|
|
|
continue
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -2199,10 +2204,15 @@ func initart() {
|
|
|
if !utils.ValidateMobileFormatat(vPv.Mobile) || mapMobileCy[vPv.Mobile] {
|
|
|
continue
|
|
|
}
|
|
|
- if mapArticle_H[fmt.Sprint("m_", vPv.Mobile, "a_", vPv.ArticleId)] {
|
|
|
+ if mapArticle_H[fmt.Sprint("m_", vPv.Mobile)] {
|
|
|
continue
|
|
|
}
|
|
|
+ if hasmobile[vPv.Mobile] {
|
|
|
+ continue
|
|
|
+ }
|
|
|
+ hasmobile[vPv.Mobile] = true
|
|
|
mapMobileCy[vPv.Mobile] = true
|
|
|
+
|
|
|
listDate = append(listDate, vPv)
|
|
|
}
|
|
|
}
|
|
@@ -2212,9 +2222,13 @@ func initart() {
|
|
|
if !utils.ValidateMobileFormatat(vPv.Mobile) || mapMobileCl[vPv.Mobile] {
|
|
|
continue
|
|
|
}
|
|
|
- if mapArticle_H[fmt.Sprint("m_", vPv.Mobile, "a_", vPv.ArticleId)] {
|
|
|
+ if mapArticle_H[fmt.Sprint("m_", vPv.Mobile)] {
|
|
|
continue
|
|
|
}
|
|
|
+ if hasmobile[vPv.Mobile] {
|
|
|
+ continue
|
|
|
+ }
|
|
|
+ hasmobile[vPv.Mobile] = true
|
|
|
mapMobileCl[vPv.Mobile] = true
|
|
|
listDate = append(listDate, vPv)
|
|
|
}
|
|
@@ -2286,74 +2300,139 @@ func initAct() {
|
|
|
var condition string
|
|
|
mapMobile := make(map[string]bool)
|
|
|
mapuserMapbil := make(map[int]*models.WxUserSller)
|
|
|
- var activityIds []int
|
|
|
- activityIds = []int{5590, 5658, 5734, 5747, 5805, 5833, 5832, 5865, 5887, 5872, 5889, 5870, 5892, 5890, 5935, 5976, 5946} // 2024-10-31 17:15
|
|
|
+ //var activityIds []int
|
|
|
+ //activityIds = []int{5590, 5658, 5734, 5747, 5805, 5833, 5832, 5865, 5887, 5872, 5889, 5870, 5892, 5890, 5935, 5976, 5946, 6005} // 2024-11-07 16:45
|
|
|
//activityIds = []int{6005} // 2024-10-31 17:15
|
|
|
+ //activityIds = []int{6052} // 2024-11-07 16:45
|
|
|
|
|
|
- var listData []*cygx.UserInteraction
|
|
|
- for _, vid := range activityIds {
|
|
|
- activityId := strconv.Itoa(vid)
|
|
|
+ condition = " AND s.activity_id IN (5590, 5658, 5734, 5747, 5805, 5833, 5832, 5865, 5887, 5872, 5889, 5870, 5892, 5890, 5935, 5976, 5946) AND ( is_meeting = 1 OR duration != '' ) AND s.create_time < '2024-10-31 17:15' "
|
|
|
+ listH, err := cygx.GetActivityMeetByUser(condition, 0, 9999)
|
|
|
+ if err != nil {
|
|
|
+ fmt.Println(err)
|
|
|
+ return
|
|
|
+ }
|
|
|
+ mobileMap := make(map[string]bool)
|
|
|
|
|
|
- //activityId := "5865"
|
|
|
- //condition = " AND s.activity_id = " + activityId + " AND duration != '' AND s.create_time < '2024-09-06 09:20' "
|
|
|
- //condition = " AND s.activity_id = " + activityId + " AND (is_meeting = 1 OR AND duration != '' ) AND s.create_time < '2024-09-13 10:30' "
|
|
|
- //list_H, err := cygx.GetActivityMeetByUser(condition, 0, 1000)
|
|
|
- //if err != nil && err.Error() != utils.ErrNoRow() {
|
|
|
- // fmt.Println(err)
|
|
|
- // return
|
|
|
- //}
|
|
|
- //
|
|
|
- //for _, v := range list_H {
|
|
|
- // mapMobile[v.Mobile+"_"+activityId] = true
|
|
|
- //}
|
|
|
+ for _, v := range listH {
|
|
|
+ mobileMap[v.Mobile] = true
|
|
|
+ }
|
|
|
+ fmt.Println(mobileMap)
|
|
|
|
|
|
- //condition = " AND s.activity_id = 5833 AND duration != '' "
|
|
|
- //condition = " AND s.activity_id = " + activityId + " AND duration != '' " // 2024-09-06 09:20
|
|
|
- condition = " AND s.activity_id = " + activityId + " AND ( is_meeting = 1 OR duration != '' ) AND s.create_time > '2024-10-25 18:15' "
|
|
|
- list, err := cygx.GetActivityMeetByUser(condition, 0, 1000)
|
|
|
- if err != nil && err.Error() != utils.ErrNoRow() {
|
|
|
- fmt.Println(err)
|
|
|
- return
|
|
|
- }
|
|
|
+ condition = " AND s.activity_id = 6052 AND ( is_meeting = 1 OR duration != '' ) AND s.create_time > '2024-10-31 17:15' "
|
|
|
+ list, err := cygx.GetActivityMeetByUser(condition, 0, 1000)
|
|
|
+ fmt.Println(list)
|
|
|
+ fmt.Println()
|
|
|
+ if err != nil && err.Error() != utils.ErrNoRow() {
|
|
|
+ fmt.Println(err)
|
|
|
+ return
|
|
|
+ }
|
|
|
|
|
|
- var companyIds []int
|
|
|
- for _, vuser := range list {
|
|
|
- //mapuserMapbil[vuser.Mobile] = vuser
|
|
|
- companyIds = append(companyIds, vuser.CompanyId)
|
|
|
- listData = append(listData, vuser)
|
|
|
- }
|
|
|
+ var listData []*cygx.UserInteraction
|
|
|
+ //for _, vid := range activityIds {
|
|
|
+ // activityId := strconv.Itoa(vid)
|
|
|
+ //
|
|
|
+ // //activityId := "5865"
|
|
|
+ // //condition = " AND s.activity_id = " + activityId + " AND duration != '' AND s.create_time < '2024-09-06 09:20' "
|
|
|
+ // //condition = " AND s.activity_id = " + activityId + " AND (is_meeting = 1 OR AND duration != '' ) AND s.create_time < '2024-09-13 10:30' "
|
|
|
+ // //list_H, err := cygx.GetActivityMeetByUser(condition, 0, 1000)
|
|
|
+ // //if err != nil && err.Error() != utils.ErrNoRow() {
|
|
|
+ // // fmt.Println(err)
|
|
|
+ // // return
|
|
|
+ // //}
|
|
|
+ // //
|
|
|
+ // //for _, v := range list_H {
|
|
|
+ // // mapMobile[v.Mobile+"_"+activityId] = true
|
|
|
+ // //}
|
|
|
+ //
|
|
|
+ // //condition = " AND s.activity_id = 5833 AND duration != '' "
|
|
|
+ // //condition = " AND s.activity_id = " + activityId + " AND duration != '' " // 2024-09-06 09:20
|
|
|
+ // condition = " AND s.activity_id = " + activityId + " AND ( is_meeting = 1 OR duration != '' ) AND s.create_time > '2024-10-31 17:15' "
|
|
|
+ // list, err := cygx.GetActivityMeetByUser(condition, 0, 1000)
|
|
|
+ // if err != nil && err.Error() != utils.ErrNoRow() {
|
|
|
+ // fmt.Println(err)
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ //
|
|
|
+ // var companyIds []int
|
|
|
+ // for _, vuser := range list {
|
|
|
+ // //mapuserMapbil[vuser.Mobile] = vuser
|
|
|
+ // companyIds = append(companyIds, vuser.CompanyId)
|
|
|
+ // listData = append(listData, vuser)
|
|
|
+ // }
|
|
|
+ //
|
|
|
+ // listCompany, err := models.GetWxUserRaiSllerListByUserComapnyId(companyIds)
|
|
|
+ // if err != nil {
|
|
|
+ // fmt.Println(err)
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ //
|
|
|
+ // //合并合同所对应的权限
|
|
|
+ // mappermissionName, err := cygxService.GetCompanyContractPermissionNameMapByIds(companyIds)
|
|
|
+ // if err != nil {
|
|
|
+ // fmt.Println(err)
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // for _, v := range listCompany {
|
|
|
+ // v.ChartPermissionName = mappermissionName[v.CompanyId]
|
|
|
+ // mapuserMapbil[v.CompanyId] = v
|
|
|
+ // }
|
|
|
+ //
|
|
|
+ // listCompanyFicc, err := models.GetWxUserRaiSllerListByUserComapnyIdFicc(companyIds)
|
|
|
+ // if err != nil {
|
|
|
+ // fmt.Println(err)
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ //
|
|
|
+ // for _, v := range listCompanyFicc {
|
|
|
+ // if mapuserMapbil[v.CompanyId] != nil {
|
|
|
+ // continue
|
|
|
+ // }
|
|
|
+ // v.Status = ""
|
|
|
+ // v.SellerName = ""
|
|
|
+ // mapuserMapbil[v.CompanyId] = v
|
|
|
+ // }
|
|
|
+ //}
|
|
|
|
|
|
- listCompany, err := models.GetWxUserRaiSllerListByUserComapnyId(companyIds)
|
|
|
- if err != nil {
|
|
|
- fmt.Println(err)
|
|
|
- return
|
|
|
+ var companyIds []int
|
|
|
+ for _, vuser := range list {
|
|
|
+ fmt.Println(vuser.Mobile)
|
|
|
+ if mobileMap[vuser.Mobile] {
|
|
|
+ continue
|
|
|
}
|
|
|
+ companyIds = append(companyIds, vuser.CompanyId)
|
|
|
+ listData = append(listData, vuser)
|
|
|
+ }
|
|
|
|
|
|
- //合并合同所对应的权限
|
|
|
- mappermissionName, err := cygxService.GetCompanyContractPermissionNameMapByIds(companyIds)
|
|
|
- if err != nil {
|
|
|
- fmt.Println(err)
|
|
|
- return
|
|
|
- }
|
|
|
- for _, v := range listCompany {
|
|
|
- v.ChartPermissionName = mappermissionName[v.CompanyId]
|
|
|
- mapuserMapbil[v.CompanyId] = v
|
|
|
- }
|
|
|
+ listCompany, err := models.GetWxUserRaiSllerListByUserComapnyId(companyIds)
|
|
|
+ if err != nil {
|
|
|
+ fmt.Println(err)
|
|
|
+ return
|
|
|
+ }
|
|
|
|
|
|
- listCompanyFicc, err := models.GetWxUserRaiSllerListByUserComapnyIdFicc(companyIds)
|
|
|
- if err != nil {
|
|
|
- fmt.Println(err)
|
|
|
- return
|
|
|
- }
|
|
|
+ //合并合同所对应的权限
|
|
|
+ mappermissionName, err := cygxService.GetCompanyContractPermissionNameMapByIds(companyIds)
|
|
|
+ if err != nil {
|
|
|
+ fmt.Println(err)
|
|
|
+ return
|
|
|
+ }
|
|
|
+ for _, v := range listCompany {
|
|
|
+ v.ChartPermissionName = mappermissionName[v.CompanyId]
|
|
|
+ mapuserMapbil[v.CompanyId] = v
|
|
|
+ }
|
|
|
|
|
|
- for _, v := range listCompanyFicc {
|
|
|
- if mapuserMapbil[v.CompanyId] != nil {
|
|
|
- continue
|
|
|
- }
|
|
|
- v.Status = ""
|
|
|
- v.SellerName = ""
|
|
|
- mapuserMapbil[v.CompanyId] = v
|
|
|
+ listCompanyFicc, err := models.GetWxUserRaiSllerListByUserComapnyIdFicc(companyIds)
|
|
|
+ if err != nil {
|
|
|
+ fmt.Println(err)
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ for _, v := range listCompanyFicc {
|
|
|
+ if mapuserMapbil[v.CompanyId] != nil {
|
|
|
+ continue
|
|
|
}
|
|
|
+ v.Status = ""
|
|
|
+ v.SellerName = ""
|
|
|
+ mapuserMapbil[v.CompanyId] = v
|
|
|
}
|
|
|
|
|
|
//创建excel
|