zwxi 1 year ago
parent
commit
dea459a5e6
1 changed files with 19 additions and 1 deletions
  1. 19 1
      controllers/roadshow/calendar.go

+ 19 - 1
controllers/roadshow/calendar.go

@@ -604,7 +604,16 @@ func (this *CalendarController) Edit() {
 	for _, ev := range existList {
 		existResearcherMap[ev.ResearcherId] = ev.ResearcherName
 	}
-
+	sysUserList, err := cygx.GetAskEmailList()
+	if err != nil {
+		br.Msg = "获取失败"
+		br.ErrMsg = "获取失败,GetAskEmailList Err: " + err.Error()
+		return
+	}
+	raiAskadminMap := make(map[int]bool, 0)
+	for _, v := range sysUserList {
+		raiAskadminMap[v.AdminId] = true
+	}
 	if rsCalendarItem.ActivityType == "路演" || rsCalendarItem.ActivityType == "公开会议" {
 		// 更新研究员信息
 		//go roadshowService.UpdateSHCalendar(req.RsCalendarId, req.RsCalendarResearcherId, req.ActivityType, req.RoadshowType, req.ActivityCategory, req.RoadshowPlatform, req.Province, req.City, req.ResearcherList)
@@ -631,6 +640,11 @@ func (this *CalendarController) Edit() {
 				calendarResearcherUpdateParams["status"] = 1
 				rsCalendarResearcherItem.Status = 1
 			}
+			//CRM15.5 权益研究员直接通过
+			if raiAskadminMap[v.ResearcherId] {
+				calendarResearcherUpdateParams["status"] = 2
+				rsCalendarResearcherItem.Status = 2
+			}
 			calendarResearcherUpdateParams["start_date"] = v.StartDate
 			rsCalendarResearcherItem.StartDate = v.StartDate
 			calendarResearcherUpdateParams["end_date"] = v.EndDate
@@ -749,6 +763,10 @@ func (this *CalendarController) Edit() {
 			} else {
 				researcher.Status = 2
 			}
+			//CRM15.5 权益研究员直接通过
+			if raiAskadminMap[v.ResearcherId] {
+				researcher.Status = 2
+			}
 			rsCalendarResearcherId, err := roadshow.AddRsCalendarResearcher(researcher)
 			if err != nil {
 				br.Msg = "保存失败!"