|
@@ -220,8 +220,26 @@ class TalentApi {
|
|
if ($talentArrange) {
|
|
if ($talentArrange) {
|
|
$where[] = ["ti.talent_arrange", "=", $talentArrange];
|
|
$where[] = ["ti.talent_arrange", "=", $talentArrange];
|
|
}
|
|
}
|
|
- $count = Talent::where($where)->alias("ti")->leftJoin("un_enterprise e", "e.id=ti.enterprise_id")->count();
|
|
|
|
- $list = Talent::where($where)->alias("ti")->leftJoin("un_enterprise e", "e.id=ti.enterprise_id")
|
|
|
|
|
|
+ if ($checkState) {
|
|
|
|
+ switch ($checkState) {
|
|
|
|
+ case 1:
|
|
|
|
+ $where[] = ["tl.state", "=", TalentState::FST_SUBMIT];
|
|
|
|
+ break;
|
|
|
|
+ case 2:
|
|
|
|
+ $where[] = ["tl.state", "=", TalentState::BASE_REJECT];
|
|
|
|
+ break;
|
|
|
|
+ case 3:
|
|
|
|
+ $where[] = ["tl.state", "=", TalentState::SCND_SUBMIT];
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ $count = Talent::where($where)->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 md5(concat(createTime,mainId,`type`)) in (select md5(concat(max(createTime),mainId,`type`)) 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")
|
|
|
|
+ ->count();
|
|
|
|
+ $list = Talent::where($where)->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 md5(concat(createTime,mainId,`type`)) in (select md5(concat(max(createTime),mainId,`type`)) 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")
|
|
->field("ti.*,e.name as enterpriseName,e.type")
|
|
->field("ti.*,e.name as enterpriseName,e.type")
|
|
->limit($offset, $limit)->order("ti.createTime " . $order)->select()->toArray();
|
|
->limit($offset, $limit)->order("ti.createTime " . $order)->select()->toArray();
|
|
$talentArangeList = DictApi::selectByParentCode("talent_arrange"); //人才层次
|
|
$talentArangeList = DictApi::selectByParentCode("talent_arrange"); //人才层次
|