|
@@ -319,14 +319,22 @@ func GeCygxEnterScoreResearcherListById(enterScoreId int) (items []*CygxEnterSco
|
|
|
}
|
|
|
|
|
|
// 根据多个录分ID获取研究员列表
|
|
|
-func GeCygxEnterScoreResearcherListByIds(enterScoreIds []int) (items []*CygxEnterScoreResearcher, err error) {
|
|
|
+func GeCygxEnterScoreResearcherListByIds(enterScoreIds, newcompanyIds []int) (items []*CygxEnterScoreResearcher, err error) {
|
|
|
lenArr := len(enterScoreIds)
|
|
|
if lenArr == 0 {
|
|
|
return
|
|
|
}
|
|
|
o := orm.NewOrmUsingDB("hz_cygx")
|
|
|
sql := `SELECT * FROM cygx_enter_score_researcher WHERE enter_score_id IN (` + utils.GetOrmInReplace(lenArr) + `) AND proportion > 0 `
|
|
|
- _, err = o.Raw(sql, enterScoreIds).QueryRows(&items)
|
|
|
+
|
|
|
+ //过滤销售可见的公司与研究员
|
|
|
+ lenCompany := len(newcompanyIds)
|
|
|
+ if lenCompany > 0 {
|
|
|
+ sql += ` AND company_id IN (` + utils.GetOrmInReplace(lenCompany) + `) `
|
|
|
+ _, err = o.Raw(sql, enterScoreIds, newcompanyIds).QueryRows(&items)
|
|
|
+ } else {
|
|
|
+ _, err = o.Raw(sql, enterScoreIds).QueryRows(&items)
|
|
|
+ }
|
|
|
return
|
|
|
}
|
|
|
|