|
@@ -282,6 +282,9 @@ func HandleListRsCalendar(list []*roadshow.RsCalendarMeetingUserByRai) (items []
|
|
rsCalendarIds = append(rsCalendarIds, v.RsCalendarId)
|
|
rsCalendarIds = append(rsCalendarIds, v.RsCalendarId)
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ mapRsCalendarLabel := make(map[int][]string) //1v1 路演标签
|
|
|
|
+ mapRsCalendarLabel = GetRsCalendarLabelByRsCalendarIds(rsCalendarIds)
|
|
|
|
+
|
|
//获取研究员信息
|
|
//获取研究员信息
|
|
researchers, err := roadshow.GetRsCalendarResearcherListByIds(rsCalendarIds)
|
|
researchers, err := roadshow.GetRsCalendarResearcherListByIds(rsCalendarIds)
|
|
if err != nil && err.Error() != utils.ErrNoRow() {
|
|
if err != nil && err.Error() != utils.ErrNoRow() {
|
|
@@ -292,61 +295,62 @@ func HandleListRsCalendar(list []*roadshow.RsCalendarMeetingUserByRai) (items []
|
|
mapResearcherName[v.RsCalendarId] = append(mapResearcherName[v.RsCalendarId], v.ResearcherName)
|
|
mapResearcherName[v.RsCalendarId] = append(mapResearcherName[v.RsCalendarId], v.ResearcherName)
|
|
}
|
|
}
|
|
|
|
|
|
- listGroup, err := roadshow.GetRsCalendarMeetingLabelGroupDetailByRsCalendarIds(rsCalendarIds)
|
|
|
|
- if err != nil && err.Error() != utils.ErrNoRow() {
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- var industrialManagementIds []int
|
|
|
|
- var industrialSubjectIds []int
|
|
|
|
-
|
|
|
|
- mapindustrialManagementName := make(map[int]string)
|
|
|
|
- mapindustrialSubjectName := make(map[int]string)
|
|
|
|
- mapCelueName := make(map[int]string)
|
|
|
|
- for _, v := range listGroup {
|
|
|
|
- switch v.TagType {
|
|
|
|
- case 1:
|
|
|
|
- industrialManagementIds = append(industrialManagementIds, v.TagId)
|
|
|
|
- case 2:
|
|
|
|
- industrialSubjectIds = append(industrialSubjectIds, v.TagId)
|
|
|
|
- case 3:
|
|
|
|
- mapCelueName[v.RsCalendarId] = "策略"
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if len(industrialManagementIds) > 0 {
|
|
|
|
- IndustryList, e := cygx.GetIndustryListByConditionByIds(industrialManagementIds)
|
|
|
|
- if e != nil {
|
|
|
|
- err = errors.New("GetIndustryListByConditionByIds" + e.Error())
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
|
|
+ //listGroup, err := roadshow.GetRsCalendarMeetingLabelGroupDetailByRsCalendarIds(rsCalendarIds)
|
|
|
|
+ //if err != nil && err.Error() != utils.ErrNoRow() {
|
|
|
|
+ // return
|
|
|
|
+ //}
|
|
|
|
+ //
|
|
|
|
+ //var industrialManagementIds []int
|
|
|
|
+ //var industrialSubjectIds []int
|
|
|
|
+ //
|
|
|
|
+ //mapindustrialManagementName := make(map[int]string)
|
|
|
|
+ //mapindustrialSubjectName := make(map[int]string)
|
|
|
|
+ //mapCelueName := make(map[int]string)
|
|
|
|
+ //for _, v := range listGroup {
|
|
|
|
+ // fmt.Println(v)
|
|
|
|
+ // switch v.TagType {
|
|
|
|
+ // case 1:
|
|
|
|
+ // industrialManagementIds = append(industrialManagementIds, v.TagId)
|
|
|
|
+ // case 2:
|
|
|
|
+ // industrialSubjectIds = append(industrialSubjectIds, v.TagId)
|
|
|
|
+ // case 3:
|
|
|
|
+ // mapCelueName[v.RsCalendarId] = "策略"
|
|
|
|
+ // }
|
|
|
|
+ //}
|
|
|
|
|
|
- for _, v := range IndustryList {
|
|
|
|
- mapindustrialManagementName[v.IndustrialManagementId] = v.IndustryName
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ //if len(industrialManagementIds) > 0 {
|
|
|
|
+ // IndustryList, e := cygx.GetIndustryListByConditionByIds(industrialManagementIds)
|
|
|
|
+ // if e != nil {
|
|
|
|
+ // err = errors.New("GetIndustryListByConditionByIds" + e.Error())
|
|
|
|
+ // return
|
|
|
|
+ // }
|
|
|
|
+ //
|
|
|
|
+ // for _, v := range IndustryList {
|
|
|
|
+ // mapindustrialManagementName[v.IndustrialManagementId] = v.IndustryName
|
|
|
|
+ // }
|
|
|
|
+ //}
|
|
|
|
|
|
- if len(industrialSubjectIds) > 0 {
|
|
|
|
- SubjectList, e := cygx.GetIndustrialSubjectDetailByIds(industrialSubjectIds)
|
|
|
|
- if e != nil {
|
|
|
|
- err = errors.New("GetIndustryListByConditionByIds" + e.Error())
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- for _, v := range SubjectList {
|
|
|
|
- mapindustrialSubjectName[v.IndustrialSubjectId] = v.SubjectName
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ //if len(industrialSubjectIds) > 0 {
|
|
|
|
+ // SubjectList, e := cygx.GetIndustrialSubjectDetailByIds(industrialSubjectIds)
|
|
|
|
+ // if e != nil {
|
|
|
|
+ // err = errors.New("GetIndustryListByConditionByIds" + e.Error())
|
|
|
|
+ // return
|
|
|
|
+ // }
|
|
|
|
+ // for _, v := range SubjectList {
|
|
|
|
+ // mapindustrialSubjectName[v.IndustrialSubjectId] = v.SubjectName
|
|
|
|
+ // }
|
|
|
|
+ //}
|
|
|
|
|
|
- mapGroupindustrialManagementName := make(map[int][]string)
|
|
|
|
- mapGroupindustrialSubjectName := make(map[int][]string)
|
|
|
|
- for _, v := range listGroup {
|
|
|
|
- switch v.TagType {
|
|
|
|
- case 1:
|
|
|
|
- mapGroupindustrialManagementName[v.RsCalendarId] = append(mapGroupindustrialManagementName[v.RsCalendarId], mapindustrialManagementName[v.TagId])
|
|
|
|
- case 2:
|
|
|
|
- mapGroupindustrialSubjectName[v.RsCalendarId] = append(mapGroupindustrialSubjectName[v.RsCalendarId], mapindustrialSubjectName[v.TagId])
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ //mapGroupindustrialManagementName := make(map[int][]string)
|
|
|
|
+ //mapGroupindustrialSubjectName := make(map[int][]string)
|
|
|
|
+ //for _, v := range listGroup {
|
|
|
|
+ // switch v.TagType {
|
|
|
|
+ // case 1:
|
|
|
|
+ // mapGroupindustrialManagementName[v.RsCalendarId] = append(mapGroupindustrialManagementName[v.RsCalendarId], mapindustrialManagementName[v.TagId])
|
|
|
|
+ // case 2:
|
|
|
|
+ // mapGroupindustrialSubjectName[v.RsCalendarId] = append(mapGroupindustrialSubjectName[v.RsCalendarId], mapindustrialSubjectName[v.TagId])
|
|
|
|
+ // }
|
|
|
|
+ //}
|
|
|
|
|
|
for _, v := range list {
|
|
for _, v := range list {
|
|
item := new(cygx.UserInteraction)
|
|
item := new(cygx.UserInteraction)
|
|
@@ -355,14 +359,16 @@ func HandleListRsCalendar(list []*roadshow.RsCalendarMeetingUserByRai) (items []
|
|
item.Mobile = v.Mobile
|
|
item.Mobile = v.Mobile
|
|
item.CompanyId = v.CompanyId
|
|
item.CompanyId = v.CompanyId
|
|
item.CompanyName = v.CompanyName
|
|
item.CompanyName = v.CompanyName
|
|
- switch v.TagType {
|
|
|
|
- case 1:
|
|
|
|
- item.LabelKeyWord = strings.Join(mapGroupindustrialManagementName[v.RsCalendarId], ",")
|
|
|
|
- case 2:
|
|
|
|
- item.LabelKeyWord = strings.Join(mapGroupindustrialSubjectName[v.RsCalendarId], ",")
|
|
|
|
- case 3:
|
|
|
|
- item.LabelKeyWord = mapCelueName[v.RsCalendarId]
|
|
|
|
- }
|
|
|
|
|
|
+ //switch v.TagType {
|
|
|
|
+ //case 1:
|
|
|
|
+ // item.LabelKeyWord = strings.Join(mapGroupindustrialManagementName[v.RsCalendarId], ",")
|
|
|
|
+ //case 2:
|
|
|
|
+ // item.LabelKeyWord = strings.Join(mapGroupindustrialSubjectName[v.RsCalendarId], ",")
|
|
|
|
+ //case 3:
|
|
|
|
+ // item.LabelKeyWord = mapCelueName[v.RsCalendarId]
|
|
|
|
+ //}
|
|
|
|
+
|
|
|
|
+ item.LabelKeyWord = strings.Join(mapRsCalendarLabel[v.RsCalendarId], ",")
|
|
item.ActivityTimeText = v.StartDate + "(" + v.StartWeek + ")" + v.StartTime + "-" + v.EndTime
|
|
item.ActivityTimeText = v.StartDate + "(" + v.StartWeek + ")" + v.StartTime + "-" + v.EndTime
|
|
item.ResearcherName = strings.Join(mapResearcherName[v.RsCalendarId], ",")
|
|
item.ResearcherName = strings.Join(mapResearcherName[v.RsCalendarId], ",")
|
|
items = append(items, item)
|
|
items = append(items, item)
|
|
@@ -383,6 +389,22 @@ func GetRsCalendarLabelByRsCalendarIds(rsCalendarIds []int) (respMap map[int][]s
|
|
go alarm_msg.SendAlarmMsg(fmt.Sprint("获取1V1路演标签信息 失败 GetRsCalendarLabelByRsCalendarIds rsCalendarIds: ", rsCalendarIds, err.Error()), 2)
|
|
go alarm_msg.SendAlarmMsg(fmt.Sprint("获取1V1路演标签信息 失败 GetRsCalendarLabelByRsCalendarIds rsCalendarIds: ", rsCalendarIds, err.Error()), 2)
|
|
}
|
|
}
|
|
}()
|
|
}()
|
|
|
|
+
|
|
|
|
+ listEmail, err := cygx.GetAskEmail()
|
|
|
|
+ if err != nil && err.Error() != utils.ErrNoRow() {
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ var ceLueResearcherName []string
|
|
|
|
+ var guShouResearcherName []string
|
|
|
|
+ for _, v := range listEmail {
|
|
|
|
+ if v.ChartPermissionName == utils.CE_LUE_NAME {
|
|
|
|
+ ceLueResearcherName = append(ceLueResearcherName, v.Name)
|
|
|
|
+ }
|
|
|
|
+ if v.ChartPermissionName == utils.GU_SHOU_NAME {
|
|
|
|
+ guShouResearcherName = append(guShouResearcherName, v.Name)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
//获取研究员信息
|
|
//获取研究员信息
|
|
researchers, err := roadshow.GetRsCalendarResearcherListByIds(rsCalendarIds)
|
|
researchers, err := roadshow.GetRsCalendarResearcherListByIds(rsCalendarIds)
|
|
if err != nil && err.Error() != utils.ErrNoRow() {
|
|
if err != nil && err.Error() != utils.ErrNoRow() {
|
|
@@ -390,7 +412,12 @@ func GetRsCalendarLabelByRsCalendarIds(rsCalendarIds []int) (respMap map[int][]s
|
|
}
|
|
}
|
|
mapResearcherName := make(map[int][]string)
|
|
mapResearcherName := make(map[int][]string)
|
|
for _, v := range researchers {
|
|
for _, v := range researchers {
|
|
- mapResearcherName[v.RsCalendarId] = append(mapResearcherName[v.RsCalendarId], v.ResearcherName)
|
|
|
|
|
|
+ if utils.InArrayByStr(ceLueResearcherName, v.ResearcherName) {
|
|
|
|
+ mapResearcherName[v.RsCalendarId] = append(mapResearcherName[v.RsCalendarId], "策略")
|
|
|
|
+ }
|
|
|
|
+ if utils.InArrayByStr(guShouResearcherName, v.ResearcherName) {
|
|
|
|
+ mapResearcherName[v.RsCalendarId] = append(mapResearcherName[v.RsCalendarId], "固收")
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
listGroup, err := roadshow.GetRsCalendarMeetingLabelGroupDetailByRsCalendarIds(rsCalendarIds)
|
|
listGroup, err := roadshow.GetRsCalendarMeetingLabelGroupDetailByRsCalendarIds(rsCalendarIds)
|
|
@@ -448,5 +475,11 @@ func GetRsCalendarLabelByRsCalendarIds(rsCalendarIds []int) (respMap map[int][]s
|
|
respMap[v.RsCalendarId] = append(respMap[v.RsCalendarId], mapCelueName[v.RsCalendarId])
|
|
respMap[v.RsCalendarId] = append(respMap[v.RsCalendarId], mapCelueName[v.RsCalendarId])
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ for _, v := range rsCalendarIds {
|
|
|
|
+ if len(respMap[v]) == 0 && len(mapResearcherName[v]) > 0 {
|
|
|
|
+ respMap[v] = mapResearcherName[v]
|
|
|
|
+ }
|
|
|
|
+ }
|
|
return
|
|
return
|
|
}
|
|
}
|