Browse Source

补充医院审核状态

sugangqiang 1 year ago
parent
commit
20be2a8c06

+ 20 - 2
app/enterprise/api/TalentApi.php

@@ -220,8 +220,26 @@ class TalentApi {
             if ($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")
                             ->limit($offset, $limit)->order("ti.createTime " . $order)->select()->toArray();
             $talentArangeList = DictApi::selectByParentCode("talent_arrange"); //人才层次

+ 3 - 0
app/enterprise/view/talent/hospital/examine_center.html

@@ -106,6 +106,9 @@
                                     </div>
                                     <select class="form-control" id="checkState">
                                         <option value="">---请选择---</option>
+                                        <option value="1">待审核</option>
+                                        <option value="3">审核通过</option>
+                                        <option value="2">审核驳回</option>
                                     </select>
                                 </div>                            
                             </div>