Kaynağa Gözat

Merge branch 'CRM_15.5' into debug

zwxi 1 yıl önce
ebeveyn
işleme
b658d80c23
1 değiştirilmiş dosya ile 16 ekleme ve 0 silme
  1. 16 0
      controllers/roadshow/calendar.go

+ 16 - 0
controllers/roadshow/calendar.go

@@ -174,6 +174,16 @@ func (this *CalendarController) Add() {
 		br.IsSendEmail = false
 		return
 	}
+	sysUserList, err := system.GetAdminList()
+	if err != nil {
+		br.Msg = "获取失败"
+		br.ErrMsg = "获取admin列表失败, Err:" + err.Error()
+		return
+	}
+	adminMap := make(map[int]*system.Admin, 0)
+	for _, v := range sysUserList {
+		adminMap[v.AdminId] = v
+	}
 
 	rsCalendar := new(roadshow.RsCalendar)
 	rsCalendar.SysUserId = sysUser.AdminId
@@ -222,6 +232,12 @@ func (this *CalendarController) Add() {
 		} else {
 			researcher.Status = 2
 		}
+
+		//CRM15.5 权益研究员直接通过
+		if adminMap[v.ResearcherId].DepartmentId == utils.RAI_DEPARTMENT_ID {
+			researcher.Status = 2
+		}
+
 		rsCalendarResearcherId, err := roadshow.AddRsCalendarResearcher(researcher)
 		if err != nil {
 			br.Msg = "保存失败!"