|
@@ -99,14 +99,16 @@ class VerifyApi {
|
|
|
$count = Talent::alias("ti")
|
|
|
->leftJoin("new_talent_condition tc", "tc.id=ti.talent_condition")
|
|
|
->leftJoin("new_enterprise e", "e.id=ti.enterprise_id")
|
|
|
+ ->leftJoin("new_talent_checklog tl", "tl.mainId=ti.id and tl.id=(select id from new_talent_checklog where mainId=ti.id and `step` is null and active=1 and typeFileId is null order by createTime desc limit 1)")
|
|
|
->where($where)
|
|
|
->whereRaw("find_in_set(:companyId,companyIds)", ["companyId" => $companyId])->count();
|
|
|
$list = Talent::alias("ti")
|
|
|
->leftJoin("new_talent_condition tc", "tc.id=ti.talent_condition")
|
|
|
->leftJoin("new_enterprise e", "e.id=ti.enterprise_id")
|
|
|
+ ->leftJoin("new_talent_checklog tl", "tl.mainId=ti.id and tl.id=(select id from new_talent_checklog where mainId=ti.id and `step` is null and active=1 and typeFileId is null order by createTime desc limit 1)")
|
|
|
->where($where)
|
|
|
->whereRaw("find_in_set(:companyId,companyIds)", ["companyId" => $companyId])
|
|
|
- ->field("ti.*,e.name as enterprise_name,e.type as enterprise_type,enterpriseTag")
|
|
|
+ ->field("ti.*,tl.last_state as 'lastState',tl.state as 'realState',e.name as enterprise_name,e.type as enterprise_type,enterpriseTag")
|
|
|
->limit($offset, $limit)->order("ti.createTime " . $order)
|
|
|
->select()->toArray();
|
|
|
foreach ($list as &$item) {
|