|
@@ -954,25 +954,25 @@ class Talent extends AdminController {
|
|
|
if (!$params["companys"])
|
|
|
return json(["msg" => "请选择需要再次审核的部门"]);
|
|
|
|
|
|
-
|
|
|
- $pass_companyIds = TalentLogApi::getPassDepts($talent_info["id"]); //已经通过的单位
|
|
|
+ //以下注释12部分为重审部门的限制,未通过并未选择的部门需要选择才能保存审核,注释备用
|
|
|
+ //1$pass_companyIds = TalentLogApi::getPassDepts($talent_info["id"]); //已经通过的单位
|
|
|
|
|
|
$condition = TalentConditionApi::getOne($talent_info["talent_condition"]);
|
|
|
$companyIds = array_filter(explode(",", $condition["companyIds"])); //该条件下需要审核的所有单位
|
|
|
$re_check_companys = array_filter(explode(",", $params["companys"]));
|
|
|
- $unpass_companyIds = array_diff($companyIds, $pass_companyIds);
|
|
|
- $unselect_companyIds = [];
|
|
|
- foreach ($unpass_companyIds as $unpass_companyId) {
|
|
|
- if (!in_array($unpass_companyId, $re_check_companys))
|
|
|
- $unselect_companyIds[] = $unpass_companyId;
|
|
|
- }
|
|
|
- if ($unselect_companyIds) {
|
|
|
- $unselect_companyName = [];
|
|
|
- foreach ($unselect_companyIds as $unselect_companyId) {
|
|
|
- $unselect_companyName[] = getCacheById("Company", $unselect_companyId)["name"];
|
|
|
- }
|
|
|
- return json(["msg" => "以下部门未通过,需要勾选重新审核:<br>" . implode("<br>", $unselect_companyName)]);
|
|
|
- }
|
|
|
+ /* 2$unpass_companyIds = array_diff($companyIds, $pass_companyIds);
|
|
|
+ $unselect_companyIds = [];
|
|
|
+ foreach ($unpass_companyIds as $unpass_companyId) {
|
|
|
+ if (!in_array($unpass_companyId, $re_check_companys))
|
|
|
+ $unselect_companyIds[] = $unpass_companyId;
|
|
|
+ }
|
|
|
+ if ($unselect_companyIds) {
|
|
|
+ $unselect_companyName = [];
|
|
|
+ foreach ($unselect_companyIds as $unselect_companyId) {
|
|
|
+ $unselect_companyName[] = getCacheById("Company", $unselect_companyId)["name"];
|
|
|
+ }
|
|
|
+ return json(["msg" => "以下部门未通过,需要勾选重新审核:<br>" . implode("<br>", $unselect_companyName)]);
|
|
|
+ } */
|
|
|
foreach ($re_check_companys as $reCompanyId) {
|
|
|
if (!in_array($reCompanyId, $companyIds)) {
|
|
|
return json(["msg" => "错误的部门"]);
|
|
@@ -1529,17 +1529,17 @@ class Talent extends AdminController {
|
|
|
$returnObj->msg = "请选择需要撤销的对象";
|
|
|
return json($returnObj);
|
|
|
}
|
|
|
- if ($old["checkState"] != TalentState::REVERIFY_PASS || $old["checkState"] != TalentState::REVERIFY_FAIL) {
|
|
|
+ if ($old["checkState"] != TalentState::REVERIFY_PASS && $old["checkState"] != TalentState::REVERIFY_FAIL) {
|
|
|
$returnObj->msg = "当前对象不是\"复核通过\"或者\"复核不通过\"状态,无法撤销";
|
|
|
return json($returnObj);
|
|
|
}
|
|
|
$where = [];
|
|
|
$where[] = ["last_state", "in", [TalentState::FST_VERIFY_PASS, TalentState::DEPT_VERIFY_PASS]];
|
|
|
- $where[] = ["state", "=", TalentState::REVERIFY_PASS];
|
|
|
+ $where[] = ["state", "in", [TalentState::REVERIFY_PASS, TalentState::REVERIFY_FAIL]];
|
|
|
$where[] = ["active", "=", 1];
|
|
|
$lastLog = TalentLogApi::getLastLogEx($id, ProjectState::TALENT, 0, $where);
|
|
|
- if ($lastLog["state"] != TalentState::REVERIFY_PASS && $lastLog["active"] != 1) {
|
|
|
- $returnObj->msg = "当前对象不是复核通过状态,无法撤销";
|
|
|
+ if (($lastLog["state"] != TalentState::REVERIFY_PASS && $lastLog["state"] != TalentState::REVERIFY_FAIL) || $lastLog["active"] != 1) {
|
|
|
+ $returnObj->msg = "当前对象不是\"2复核通过\"或者\"复核不通过\"状态,无法撤销";
|
|
|
return json($returnObj);
|
|
|
}
|
|
|
if ($old["isPublic"] != 1) {
|
|
@@ -1647,9 +1647,14 @@ class Talent extends AdminController {
|
|
|
}
|
|
|
$condition = TalentConditionApi::getOne($talent_info["talent_condition"]);
|
|
|
$companys = array_filter(explode(",", $condition["companyIds"]));
|
|
|
+ $pass_companyIds = TalentLogApi::getPassDepts($talent_info["id"]); //已经通过的单位
|
|
|
+ $unpass_companyIds = array_diff($companys, $pass_companyIds);
|
|
|
$_companys = [];
|
|
|
foreach ($companys as $companyId) {
|
|
|
$company = CompanyApi::getOne($companyId);
|
|
|
+ if (in_array($companyId, $unpass_companyIds)) {
|
|
|
+ $company["uncheck"] = true;
|
|
|
+ }
|
|
|
$_companys[] = $company;
|
|
|
}
|
|
|
if ($process == 4 && $enterprise["type"] == 1) {
|