|
@@ -5,6 +5,7 @@ import (
|
|
|
"github.com/rdlucklib/rdluck_tools/paging"
|
|
|
"hongze/hz_crm_api/models"
|
|
|
"hongze/hz_crm_api/models/company"
|
|
|
+ "hongze/hz_crm_api/models/overseas_custom"
|
|
|
"hongze/hz_crm_api/models/roadshow"
|
|
|
"hongze/hz_crm_api/models/system"
|
|
|
"hongze/hz_crm_api/services"
|
|
@@ -1645,6 +1646,24 @@ func (this *CalendarController) OverseasCalendarList() {
|
|
|
adminIdsArr = append(adminIdsArr, id)
|
|
|
}
|
|
|
|
|
|
+ //客户状态维度
|
|
|
+ companylist, err := overseas_custom.GetOverseasCustomList("", nil)
|
|
|
+ if err != nil {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ formalIdsArr := make([]int, 0)
|
|
|
+ tryoutIdsArr := make([]int, 0)
|
|
|
+ closeIdsArr := make([]int, 0)
|
|
|
+ for _, v := range companylist {
|
|
|
+ if v.OverseasStatus == "正式" {
|
|
|
+ formalIdsArr = append(formalIdsArr, v.CompanyId)
|
|
|
+ } else if v.OverseasStatus == "试用" {
|
|
|
+ tryoutIdsArr = append(tryoutIdsArr, v.CompanyId)
|
|
|
+ } else if v.OverseasStatus == "关闭" {
|
|
|
+ closeIdsArr = append(closeIdsArr, v.CompanyId)
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
//正式客户
|
|
|
var condition string
|
|
|
var pars []interface{}
|
|
@@ -1671,14 +1690,14 @@ func (this *CalendarController) OverseasCalendarList() {
|
|
|
//获取列表
|
|
|
switch dataType {
|
|
|
case "try_out":
|
|
|
- condition += ` and a.company_status = ? `
|
|
|
- pars = append(pars, "试用")
|
|
|
+ condition += ` and a.company_status = ? and a.company_id IN (` + utils.GetOrmInReplace(len(tryoutIdsArr)) + `)`
|
|
|
+ pars = append(pars, "试用", tryoutIdsArr)
|
|
|
case "formal":
|
|
|
- condition += ` and a.company_status = ? `
|
|
|
- pars = append(pars, "正式")
|
|
|
+ condition += ` and a.company_status = ? and a.company_id IN (` + utils.GetOrmInReplace(len(formalIdsArr)) + `)`
|
|
|
+ pars = append(pars, "正式", formalIdsArr)
|
|
|
case "close":
|
|
|
- condition += ` and a.company_status = ? `
|
|
|
- pars = append(pars, "关闭")
|
|
|
+ condition += ` and a.company_status = ? and a.company_id IN (` + utils.GetOrmInReplace(len(closeIdsArr)) + `)`
|
|
|
+ pars = append(pars, "关闭", closeIdsArr)
|
|
|
case "online":
|
|
|
condition += ` and a.roadshow_type = ? `
|
|
|
pars = append(pars, "线上")
|