|
@@ -1056,13 +1056,13 @@ class Talent extends AdminController {
|
|
|
return json(["msg" => "不在审核范围。(初审部门已经选择跳过部门并审阶段)"]);
|
|
|
if (!in_array($this->user["companyId"], $companys))
|
|
|
return json(["msg" => "您的部门不在该申请的并审部门列表中。"]);
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+ $pass_companyIds = TalentLogApi::getPassDepts($talent_info["id"]);
|
|
|
$un_check_companyIds = TalentLogApi::getUnCheckDepts($talent_info["id"]);
|
|
|
- if (!in_array($this->user["companyId"], $un_check_companyIds))
|
|
|
+ if (!in_array($this->user["companyId"], $un_check_companyIds) && in_array($this->user["companyId"], $pass_companyIds)) {
|
|
|
+
|
|
|
+
|
|
|
return json(["msg" => "您的部门已经审核过了,无需重复审核。"]);
|
|
|
+ }
|
|
|
|
|
|
$params = $request->param();
|
|
|
if ($params["checkState"] == 3) {
|
|
@@ -1104,14 +1104,17 @@ class Talent extends AdminController {
|
|
|
|
|
|
$fst_dept_check_time = $talent_info["first_dept_check_time"];
|
|
|
$dept_log = TalentLogApi::getLogByCompanyId($talent_info["id"], $this->user["companyId"], $fst_dept_check_time);
|
|
|
- if (!$dept_log)
|
|
|
- return json(["msg" => "未匹配日志,审核失败"]);
|
|
|
if ($dept_log["active"] == 1)
|
|
|
return json(["msg" => "您的部门已经审核过了"]);
|
|
|
$data["id"] = $talent_info["id"];
|
|
|
TalentModel::update($data);
|
|
|
|
|
|
- TalentLogApi::rewrite($dept_log["id"], [$log_checkState, $checkState], $params["checkMsg"]);
|
|
|
+ if (!$dept_log) {
|
|
|
+ TalentLogApi::write(ProjectState::TALENT, $talent_info["id"], [$log_checkState, $checkState, 3], $params["checkMsg"]);
|
|
|
+
|
|
|
+ } else {
|
|
|
+ TalentLogApi::rewrite($dept_log["id"], [$log_checkState, $checkState], $params["checkMsg"]);
|
|
|
+ }
|
|
|
return json(["code" => 200, "msg" => "保存成功"]);
|
|
|
}
|
|
|
|
|
@@ -1129,9 +1132,9 @@ class Talent extends AdminController {
|
|
|
if (in_array($this->user["companyId"], $pass_companyIds))
|
|
|
return json(["msg" => "您的部门已经审核过了,无需重复审核。"]);
|
|
|
$dept_log = TalentLogApi::getLogByCompanyId($talent_info["id"], $this->user["companyId"], $talent_info["first_dept_check_time"]);
|
|
|
- if (!$dept_log)
|
|
|
- return json(["msg" => "未匹配日志,审核失败"]);
|
|
|
- if ($dept_log["state"] == $dept_log["new_state"])
|
|
|
+
|
|
|
+
|
|
|
+ if ($dept_log["state"] == $dept_log["new_state"] || !$dept_log)
|
|
|
return json(["msg" => "请先保存审核状态,再提交审核"]);
|
|
|
if ($dept_log["active"] == 1)
|
|
|
return json(["msg" => "您的部门已经审核过了"]);
|