$this->user["name"], "rolename" => $this->user["rolename"], "avatar" => $this->user["avatar"], "sex" => $this->user["sex"] ]; $menus = \app\common\api\MenuApi::getMenuListByRoleid($this->user["roleid"]); $vars["menus"] = $menus; $codes = \app\common\api\MenuApi::getCodesByRoleId($this->user["roleid"]); $backLogCount = 0; if (in_array("talentInfo_first", $codes)) { $where[] = ["e.type", "=", session("user")["type"]]; $where[] = ["ti.checkState", "=", TalentState::SCND_SUBMIT]; $where[] = ["tl.state", "in", [TalentState::SCND_SUBMIT, TalentState::DEPT_VERIFY_REJECT, TalentState::REVERIFY_REJECT]]; $count = Talent::alias("ti") ->leftJoin("un_enterprise e", "e.id=ti.enterprise_id") ->leftJoin("(select mainId,last_state,new_state,state,createTime from new_talent_checklog where createTime in (select max(createTime) from `new_talent_checklog` where `type`=1 and `step` is null and active=1 and typeFileId is null group by mainId,`type`)) tl", "`tl`.`mainId`=ti.id") //->leftJoin("(select mainId,last_state,new_state,state,createTime,row_number() over (partition by mainId order by createTime desc) as rowIndex from `new_talent_checklog` where `type`=1 and `step` is null and active=1 and typeFileId is null) tl", "tl.mainId=ti.id and tl.rowIndex=1") ->where($where)->count(); $backlog = ["title" => "【人才认定申报】待初审", "url" => "$('a.J_menuItem[href=\"/admin/talent/fst_verify\"]').click()", "count" => $count]; $vars["backlog"][] = $backlog; $backLogCount += $count; } $vars["backLogCount"] = $backLogCount; return view("", $vars); } }