|
@@ -571,6 +571,20 @@ func employInfoPerson(v, table, id, employKey, findKey string, source int64, in
|
|
|
"position_id": in.PositionId,
|
|
|
"source": source,
|
|
|
}, "is_ignore,status,id,type", "")
|
|
|
+ employData := &map[string]interface{}{}
|
|
|
+ if in.EmployType == 1 {
|
|
|
+ employData = MC.CrmMysql.FindOne(table, map[string]interface{}{
|
|
|
+ employKey: sourceId,
|
|
|
+ "position_id": in.PositionId,
|
|
|
+ "source": source,
|
|
|
+ }, "is_ignore,status,id,type", "")
|
|
|
+ } else {
|
|
|
+ employData = MC.CrmMysql.FindOne(table, map[string]interface{}{
|
|
|
+ employKey: sourceId,
|
|
|
+ "position_id": in.PositionId,
|
|
|
+ "source": source,
|
|
|
+ }, "is_ignore,status,id", "")
|
|
|
+ }
|
|
|
employId := int64(0)
|
|
|
if employData != nil && len(*employData) > 0 {
|
|
|
valueMap["isIgnore"] = common.If(common.Int64All((*employData)["is_ignore"]) == 1, true, false)
|
|
@@ -632,7 +646,12 @@ func employInfoEnt(v, table, id, employKey, findKey, depIDArr string, source int
|
|
|
} else {
|
|
|
sourceId = id
|
|
|
}
|
|
|
- employData := MC.CrmMysql.SelectBySql(fmt.Sprintf("select GROUP_CONCAT(id) as employIdArr,MAX(is_ignore) as is_ignore,MAX(status) as status,type from %s where %s=? and source=? and ent_dept_id in (%s) and status=1", table, employKey, depIDArr), sourceId, source)
|
|
|
+ employData := &[]map[string]interface{}{}
|
|
|
+ if in.EmployType == 1 {
|
|
|
+ employData = MC.CrmMysql.SelectBySql(fmt.Sprintf("select GROUP_CONCAT(id) as employIdArr,MAX(is_ignore) as is_ignore,MAX(status) as status,type from %s where %s=? and source=? and ent_dept_id in (%s) and status=1", table, employKey, depIDArr), sourceId, source)
|
|
|
+ } else {
|
|
|
+ employData = MC.CrmMysql.SelectBySql(fmt.Sprintf("select GROUP_CONCAT(id) as employIdArr,MAX(is_ignore) as is_ignore,MAX(status) as status from %s where %s=? and source=? and ent_dept_id in (%s) and status=1", table, employKey, depIDArr), sourceId, source)
|
|
|
+ }
|
|
|
employArrStr := ""
|
|
|
if employData != nil && len(*employData) > 0 {
|
|
|
valueMap["isIgnore"] = common.If(common.Int64All((*employData)[0]["is_ignore"]) == 1, true, false)
|