|
@@ -21,13 +21,26 @@ class TalentLogApi {
|
|
|
return $list = TalentLog::whereOr([$where, $whr])->order("createTime desc")->select()->toArray();
|
|
|
}
|
|
|
|
|
|
- public static function getPassDepts($mainId) {
|
|
|
+ public static function getPassDepts($mainId, $fst_dept_check_time = null) {
|
|
|
+ $dept_pass_state = TalentState::DEPT_VERIFY_PASS;
|
|
|
$where[] = ["type", "=", 1];
|
|
|
$where[] = ["mainId", "=", $mainId];
|
|
|
- $where[] = ["active", "=", 1];
|
|
|
$where[] = ["step", "=", 3];
|
|
|
- $where[] = ["new_state", "=", TalentState::DEPT_VERIFY_PASS];
|
|
|
- return TalentLog::where($where)->column("companyId");
|
|
|
+ if ($fst_dept_check_time) {
|
|
|
+ $where[] = ["createTime", ">=", $fst_dept_check_time];
|
|
|
+ }
|
|
|
+ $dept_logs = TalentLog::where($where)->order("createTime desc")->select();
|
|
|
+ $check_depts = [];
|
|
|
+ $pass_depts = [];
|
|
|
+ foreach ($dept_logs as $dept_log) {
|
|
|
+ if (!in_array($dept_log["companyId"], $check_depts)) {
|
|
|
+ $check_depts[] = $dept_log["companyId"];
|
|
|
+ if ($dept_log["new_state"] == $dept_pass_state && $dept_log["active"] == 1) {
|
|
|
+ $pass_depts[] = $dept_log["companyId"];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return array_unique($pass_depts);
|
|
|
}
|
|
|
|
|
|
public static function getUnCheckDepts($mainId) {
|
|
@@ -35,7 +48,7 @@ class TalentLogApi {
|
|
|
$where[] = ["mainId", "=", $mainId];
|
|
|
$where[] = ["active", "=", 0];
|
|
|
$where[] = ["step", "=", 3];
|
|
|
- $where[] = ["new_state", "in", [TalentState::DEPT_VERIFY_PASS, TalentState::FST_VERIFY_PASS]];
|
|
|
+ //$where[] = ["new_state", "in", [TalentState::DEPT_VERIFY_PASS, TalentState::FST_VERIFY_PASS]];
|
|
|
return TalentLog::where($where)->column("companyId");
|
|
|
}
|
|
|
|