overall.CONSTANT_DB_KPI.Model(&modelskpi.PostSonTarget{}).Select("`id`,`parent_id`").Where("`state` = 1 AND `depart` = ? AND `depart_post` = ? AND `parent_id` = ?",orgid,postid,targetIdInt64).Find(&postSonTarget)
overall.CONSTANT_DB_KPI.Model(&modelskpi.PostSonTarget{}).Select("`id`,`parent_id`").Where("`state` = 1 AND `depart` = ? AND `depart_post` = ? AND `parent_id` = ?",orgid,postid,targetIdInt64).Find(&postSonTarget)
overall.CONSTANT_DB_KPI.Where("`state` = 1 AND `parentid` = ? AND `parentid_sun` = ? AND `paretment` = ? AND `paretment_post` = ?",targetId,sonTargetId,orgid,postid).Find(&postTargetDetailsCont)
overall.CONSTANT_DB_KPI.Where("`state` = 1 AND `parentid` = ? AND `parentid_sun` = ? AND `paretment` = ? AND `paretment_post` = ?",targetId,sonTargetId,orgid,postid).Find(&postTargetDetailsCont)
@ -96,7 +96,7 @@ func (a *ApiMethod) GetPostNature(c *gin.Context) {
//获取被考核人本岗位的考核项目
//获取被考核人本岗位的考核项目
varitemList[]modelskpi.ShemePeople
varitemList[]modelskpi.ShemePeople
err=overall.CONSTANT_DB_KPI.Where("`state` IN (1,3) AND `type` = 2 AND `attribute` = 1 AND `run_state` <> 2 AND `org_id` = ? AND `post_id` = ? AND `man_key` = ?",userCont.MainDeparment,userCont.Position,context.Key).Find(&itemList).Error
err=overall.CONSTANT_DB_KPI.Where("`state` = 1 AND `tr_type` = 2 AND `attribute` = 1 AND `run_state` <> 2 AND `org_id` = ? AND `post_id` = ? AND `man_key` = ?",userCont.AdminOrg,userCont.Position,context.Key).Find(&itemList).Error
iferr!=nil||len(itemList)<1{
iferr!=nil||len(itemList)<1{
publicmethod.Result(107,err,c)
publicmethod.Result(107,err,c)
return
return
@ -106,9 +106,11 @@ func (a *ApiMethod) GetPostNature(c *gin.Context) {
@ -151,7 +182,7 @@ func (a *ApiMethod) GetPostRation(c *gin.Context) {
//获取被考核人本岗位的考核项目
//获取被考核人本岗位的考核项目
varitemList[]modelskpi.ShemePeople
varitemList[]modelskpi.ShemePeople
err=overall.CONSTANT_DB_KPI.Where("`state` IN (1,3) AND `type` = 2 AND `attribute` = 2 AND `run_state` <> 2 AND `org_id` = ? AND `post_id` = ? AND `man_key` = ?",userCont.MainDeparment,userCont.Position,context.Key).Find(&itemList).Error
err=overall.CONSTANT_DB_KPI.Where("`state` = 1 AND `tr_type` = 2 AND `attribute` = 2 AND `run_state` <> 2 AND `org_id` = ? AND `post_id` = ? AND `man_key` = ?",userCont.AdminOrg,userCont.Position,context.Key).Find(&itemList).Error
iferr!=nil||len(itemList)<1{
iferr!=nil||len(itemList)<1{
publicmethod.Result(107,err,c)
publicmethod.Result(107,err,c)
return
return
@ -205,7 +236,10 @@ func (a *ApiMethod) GetPostDeimensoInfo(c *gin.Context) {
//获取被考核人本岗位的考核项目
//获取被考核人本岗位的考核项目
varitemList[]modelskpi.ShemePeople
varitemList[]modelskpi.ShemePeople
gormDb:=overall.CONSTANT_DB_KPI.Where("`state` IN (1,3) AND `type` = 2 AND `attribute` = 1 AND `run_state` <> 2 AND `dimension_id` = ? AND `target_id` = ? AND `org_id` = ? AND `post_id` = ? AND `man_key` = ?",receivedValue.DimensionId,receivedValue.TargetId,userCont.MainDeparment,userCont.Position,context.Key)
gormDb:=overall.CONSTANT_DB_KPI.Where("`state` = 1 AND `tr_type` = 2 AND `attribute` = 1 AND `run_state` <> 2 AND `dimension_id` = ? AND `target_id` = ? AND `org_id` = ? AND `post_id` = ? AND `man_key` = ?",receivedValue.DimensionId,receivedValue.TargetId,userCont.AdminOrg,userCont.Position,context.Key)
err=overall.CONSTANT_DB_Master.Model(&modelsschool.SystemMenu{}).Distinct("`m_url`").Where("`m_steat` = 1 AND `m_id` IN ?",menuIdAry).Find(&empowerMenuUrl).Error
err=overall.CONSTANT_DB_Master.Model(&modelsschool.SystemMenuSchool{}).Distinct("`m_url`").Where("`m_steat` = 1 AND `m_id` IN ?",menuIdAry).Find(&empowerMenuUrl).Error