|
@@ -264,12 +264,24 @@ class Talent extends AdminController {
|
|
* @auth {{/talentInfo/gotoIndex/2}}
|
|
* @auth {{/talentInfo/gotoIndex/2}}
|
|
*/
|
|
*/
|
|
public function dept_verify() {
|
|
public function dept_verify() {
|
|
|
|
+ $tpl = "";
|
|
$companys = CompanyApi::getAll();
|
|
$companys = CompanyApi::getAll();
|
|
$superpriv = VerifyApi::chkUserInSuperDeptUsers();
|
|
$superpriv = VerifyApi::chkUserInSuperDeptUsers();
|
|
$commonAssigns = $this->getCommonAssigns();
|
|
$commonAssigns = $this->getCommonAssigns();
|
|
$assigns = ["companys" => $companys, "superpriv" => $superpriv];
|
|
$assigns = ["companys" => $companys, "superpriv" => $superpriv];
|
|
$newAssigns = array_merge($assigns, $commonAssigns);
|
|
$newAssigns = array_merge($assigns, $commonAssigns);
|
|
- return view("", $newAssigns);
|
|
|
|
|
|
+ switch ($this->user["type"]) {
|
|
|
|
+ case CommonConst::ENTERPRISE_WJ:
|
|
|
|
+ $tpl = "/talent/hospital/dept_verify";
|
|
|
|
+ $medicalCommunities = \app\common\api\Nhc::getMedicalCommunityList();
|
|
|
|
+ $newAssigns["medicalCommunities"] = $medicalCommunities;
|
|
|
|
+ break;
|
|
|
|
+ case CommonConst::ENTERPRISE_GJ:
|
|
|
|
+ //$tpl = "/talent/school/dept_verify";
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return view($tpl, $newAssigns);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -277,7 +289,20 @@ class Talent extends AdminController {
|
|
* @auth {{/talentInfo/gotoIndex/3}}
|
|
* @auth {{/talentInfo/gotoIndex/3}}
|
|
*/
|
|
*/
|
|
public function re_verify() {
|
|
public function re_verify() {
|
|
- return view("", $this->getCommonAssigns());
|
|
|
|
|
|
+ $tpl = "";
|
|
|
|
+ $assigns = $this->getCommonAssigns();
|
|
|
|
+ switch ($this->user["type"]) {
|
|
|
|
+ case CommonConst::ENTERPRISE_WJ:
|
|
|
|
+ $tpl = "/talent/hospital/re_verify";
|
|
|
|
+ $medicalCommunities = \app\common\api\Nhc::getMedicalCommunityList();
|
|
|
|
+ $_assigns = ["medicalCommunities" => $medicalCommunities];
|
|
|
|
+ $assigns = array_merge($assigns, $_assigns);
|
|
|
|
+ break;
|
|
|
|
+ case CommonConst::ENTERPRISE_GJ:
|
|
|
|
+ $tpl = "/talent/school/re_verify";
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ return view($tpl, $assigns);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -775,7 +800,7 @@ class Talent extends AdminController {
|
|
$_prefix_type = "";
|
|
$_prefix_type = "";
|
|
$subindex = 5;
|
|
$subindex = 5;
|
|
switch ($user["type"]) {
|
|
switch ($user["type"]) {
|
|
- case 2:
|
|
|
|
|
|
+ case CommonConst::ENTERPRISE_JC:
|
|
$_prefix_type = "IC";
|
|
$_prefix_type = "IC";
|
|
$subindex += strlen($_prefix_type);
|
|
$subindex += strlen($_prefix_type);
|
|
break;
|
|
break;
|
|
@@ -948,7 +973,7 @@ class Talent extends AdminController {
|
|
* @param type $talent_info
|
|
* @param type $talent_info
|
|
* @return type json
|
|
* @return type json
|
|
*/
|
|
*/
|
|
- private function fstCheck(\think\Request $request, $talent_info) {
|
|
|
|
|
|
+ private function fstCheck(\think\Request $request, $talent_info, $ep) {
|
|
$params = $request->param();
|
|
$params = $request->param();
|
|
$data["pass_dept_check"] = 0;
|
|
$data["pass_dept_check"] = 0;
|
|
if ($params["checkState"] == 3) {
|
|
if ($params["checkState"] == 3) {
|
|
@@ -999,7 +1024,24 @@ class Talent extends AdminController {
|
|
$log_checkState = $checkState = TalentState::FST_VERIFY_PASS; //初审成功
|
|
$log_checkState = $checkState = TalentState::FST_VERIFY_PASS; //初审成功
|
|
} else {
|
|
} else {
|
|
//审核驳回并记录需要修改的字段和上传文件
|
|
//审核驳回并记录需要修改的字段和上传文件
|
|
- $checkState = TalentState::SCND_SAVE; //退回材料编辑状态
|
|
|
|
|
|
+ if ($ep["type"] == CommonConst::ENTERPRISE_WJ) {
|
|
|
|
+ if ($params["checkState"] == 6) {
|
|
|
|
+ //驳回到分院
|
|
|
|
+ if ($ep["isGeneral"] == 1) {
|
|
|
|
+ return json(["msg" => "总院不能驳回到分院"]);
|
|
|
|
+ } else {
|
|
|
|
+ $checkState = TalentState::FST_SAVE;
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ if ($ep["isGeneral"] == 1) {
|
|
|
|
+ $checkState = TalentState::SCND_SAVE; //退回材料编辑状态
|
|
|
|
+ } else {
|
|
|
|
+ $checkState = TalentState::FST_SUBMIT;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ $checkState = TalentState::SCND_SAVE; //退回材料编辑状态
|
|
|
|
+ }
|
|
$log_checkState = TalentState::FST_VERIFY_REJECT; //日志记录拒绝状态
|
|
$log_checkState = TalentState::FST_VERIFY_REJECT; //日志记录拒绝状态
|
|
}
|
|
}
|
|
$log = TalentLogApi::getLastLog($talent_info["id"], 1);
|
|
$log = TalentLogApi::getLastLog($talent_info["id"], 1);
|
|
@@ -1023,7 +1065,7 @@ class Talent extends AdminController {
|
|
* @param type $talent_info
|
|
* @param type $talent_info
|
|
* @return type json
|
|
* @return type json
|
|
*/
|
|
*/
|
|
- private function fstSubmitCheck($talent_info) {
|
|
|
|
|
|
+ private function fstSubmitCheck($talent_info, $ep) {
|
|
$nowProcess = 3;
|
|
$nowProcess = 3;
|
|
$log = TalentLogApi::getLastLog($talent_info["id"], 1);
|
|
$log = TalentLogApi::getLastLog($talent_info["id"], 1);
|
|
if (!$log || $log["active"] == 1)
|
|
if (!$log || $log["active"] == 1)
|
|
@@ -1469,10 +1511,14 @@ class Talent extends AdminController {
|
|
$fields = $params["fields"];
|
|
$fields = $params["fields"];
|
|
$id = $params["id"];
|
|
$id = $params["id"];
|
|
$talent_info = VerifyApi::getOne($id);
|
|
$talent_info = VerifyApi::getOne($id);
|
|
|
|
+ $ep = EnterpriseApi::getOne($talent_info["enterprise_id"]);
|
|
$checkState = $talent_info["checkState"];
|
|
$checkState = $talent_info["checkState"];
|
|
- if (!$talent_info) {
|
|
|
|
|
|
+ if (!$talent_info || !$ep) {
|
|
return json(["msg" => "数据错误"]);
|
|
return json(["msg" => "数据错误"]);
|
|
}
|
|
}
|
|
|
|
+ if ($ep["type"] != $this->user["type"]) {
|
|
|
|
+ return json(["msg" => "不能审核的人才类型"]);
|
|
|
|
+ }
|
|
if (!$check) {
|
|
if (!$check) {
|
|
return json(["msg" => "请选择审核状态"]);
|
|
return json(["msg" => "请选择审核状态"]);
|
|
}
|
|
}
|
|
@@ -1484,7 +1530,7 @@ class Talent extends AdminController {
|
|
} else if ($checkState == TalentState::BASE_VERIFY_PASS) {
|
|
} else if ($checkState == TalentState::BASE_VERIFY_PASS) {
|
|
return $this->baseReCheck($request, $talent_info);
|
|
return $this->baseReCheck($request, $talent_info);
|
|
} else if ($checkState == TalentState::SCND_SUBMIT) {
|
|
} else if ($checkState == TalentState::SCND_SUBMIT) {
|
|
- return $this->fstCheck($request, $talent_info);
|
|
|
|
|
|
+ return $this->fstCheck($request, $talent_info, $ep);
|
|
} else if ($checkState == TalentState::FST_VERIFY_PASS) {
|
|
} else if ($checkState == TalentState::FST_VERIFY_PASS) {
|
|
$condition = TalentConditionApi::getOne($talent_info["talent_condition"]);
|
|
$condition = TalentConditionApi::getOne($talent_info["talent_condition"]);
|
|
$companys = array_filter(explode(",", $condition["companyIds"]));
|
|
$companys = array_filter(explode(",", $condition["companyIds"]));
|
|
@@ -1506,16 +1552,20 @@ class Talent extends AdminController {
|
|
//公共调度方法
|
|
//公共调度方法
|
|
$id = $this->request->param("id");
|
|
$id = $this->request->param("id");
|
|
$talent_info = VerifyApi::getOne($id);
|
|
$talent_info = VerifyApi::getOne($id);
|
|
|
|
+ $ep = EnterpriseApi::getOne($talent_info["enterprise_id"]);
|
|
$checkState = $talent_info["checkState"];
|
|
$checkState = $talent_info["checkState"];
|
|
- if (!$talent_info) {
|
|
|
|
|
|
+ if (!$talent_info || !$ep) {
|
|
return json(["msg" => "数据错误"]);
|
|
return json(["msg" => "数据错误"]);
|
|
}
|
|
}
|
|
|
|
+ if ($ep["type"] != $this->user["type"]) {
|
|
|
|
+ return json(["msg" => "不能审核的人才类型"]);
|
|
|
|
+ }
|
|
if ($checkState == TalentState::FST_SUBMIT) {
|
|
if ($checkState == TalentState::FST_SUBMIT) {
|
|
return $this->baseSubmitCheck($talent_info);
|
|
return $this->baseSubmitCheck($talent_info);
|
|
} else if ($checkState == TalentState::BASE_VERIFY_PASS) {
|
|
} else if ($checkState == TalentState::BASE_VERIFY_PASS) {
|
|
return $this->baseReSubmitCheck($talent_info);
|
|
return $this->baseReSubmitCheck($talent_info);
|
|
} else if ($checkState == TalentState::SCND_SUBMIT) {
|
|
} else if ($checkState == TalentState::SCND_SUBMIT) {
|
|
- return $this->fstSubmitCheck($talent_info);
|
|
|
|
|
|
+ return $this->fstSubmitCheck($talent_info, $ep);
|
|
} else if ($checkState == TalentState::FST_VERIFY_PASS) {
|
|
} else if ($checkState == TalentState::FST_VERIFY_PASS) {
|
|
$condition = TalentConditionApi::getOne($talent_info["talent_condition"]);
|
|
$condition = TalentConditionApi::getOne($talent_info["talent_condition"]);
|
|
$companys = array_filter(explode(",", $condition["companyIds"]));
|
|
$companys = array_filter(explode(",", $condition["companyIds"]));
|
|
@@ -1584,73 +1634,29 @@ class Talent extends AdminController {
|
|
$id = $params["id"];
|
|
$id = $params["id"];
|
|
$process = $params["process"];
|
|
$process = $params["process"];
|
|
$talent_info = VerifyApi::getOne($id);
|
|
$talent_info = VerifyApi::getOne($id);
|
|
- $fstLog = TalentLogApi::getFstLog($id, 1);
|
|
|
|
- $isMix = false;
|
|
|
|
- if (in_array($fstLog["state"], [TalentState::SCND_SAVE, TalentState::SCND_SUBMIT])) {
|
|
|
|
- //初次提交是待初审状态,则为新的混合基础信息和人才认证信息的申报
|
|
|
|
- $isMix = true;
|
|
|
|
- }
|
|
|
|
$enterprise = \app\common\model\Enterprise::findOrEmpty($talent_info["enterprise_id"]);
|
|
$enterprise = \app\common\model\Enterprise::findOrEmpty($talent_info["enterprise_id"]);
|
|
if ($talent_info) {
|
|
if ($talent_info) {
|
|
$checkState = $talent_info["checkState"];
|
|
$checkState = $talent_info["checkState"];
|
|
if (!$process || ($process == 3 && $checkState != TalentState::SCND_SUBMIT) || ($process == 4 && ($checkState != TalentState::FST_VERIFY_PASS || $talent_info["pass_dept_check"] == 1)) || ($process == 5 && !in_array($checkState, [TalentState::DEPT_VERIFY_PASS, TalentState::FST_VERIFY_PASS]))) {
|
|
if (!$process || ($process == 3 && $checkState != TalentState::SCND_SUBMIT) || ($process == 4 && ($checkState != TalentState::FST_VERIFY_PASS || $talent_info["pass_dept_check"] == 1)) || ($process == 5 && !in_array($checkState, [TalentState::DEPT_VERIFY_PASS, TalentState::FST_VERIFY_PASS]))) {
|
|
return json(["msg" => "该申报不在审核范围内,无法审核"]);
|
|
return json(["msg" => "该申报不在审核范围内,无法审核"]);
|
|
}
|
|
}
|
|
- $process = 0;
|
|
|
|
- switch ($checkState) {
|
|
|
|
- case TalentState::FST_SUBMIT:
|
|
|
|
- $fields = DictApi::getTalentFields(1, $talent_info["isImport"]);
|
|
|
|
- $field_tmp = [];
|
|
|
|
- foreach ($fields as $key => $field) {
|
|
|
|
- $field_tmp[] = ["key" => $key, "value" => $field];
|
|
|
|
- }
|
|
|
|
- $where[] = ["project", "=", 1];
|
|
|
|
- $where[] = ["step", "=", 1];
|
|
|
|
- $where[] = ["active", "=", 1];
|
|
|
|
- $where[] = ["type", "=", $enterprise["type"]];
|
|
|
|
-
|
|
|
|
- $files = \think\facade\Db::table("new_common_filetype")->where($where)->select();
|
|
|
|
- $process = 1;
|
|
|
|
- break;
|
|
|
|
- case TalentState::BASE_VERIFY_PASS:
|
|
|
|
- $fields = DictApi::getTalentFields(1, $talent_info["isImport"]);
|
|
|
|
- $field_tmp = [];
|
|
|
|
- foreach ($fields as $key => $field) {
|
|
|
|
- $field_tmp[] = ["key" => $key, "value" => $field];
|
|
|
|
- }
|
|
|
|
- $where[] = ["project", "=", 1];
|
|
|
|
- $where[] = ["step", "=", 1];
|
|
|
|
- $where[] = ["active", "=", 1];
|
|
|
|
- $where[] = ["type", "=", $enterprise["type"]];
|
|
|
|
-
|
|
|
|
- $files = \think\facade\Db::table("new_common_filetype")->where($where)->select();
|
|
|
|
- $process = 2;
|
|
|
|
- break;
|
|
|
|
- case TalentState::SCND_SUBMIT:
|
|
|
|
- $fields = DictApi::getTalentFields(2, $talent_info["isImport"]);
|
|
|
|
- $process = 3;
|
|
|
|
- break;
|
|
|
|
- case TalentState::FST_VERIFY_PASS:
|
|
|
|
- $tc = TalentConditionApi::getOne($talent_info["talent_condition"]);
|
|
|
|
- if ($tc["companyIds"] && $talent_info["pass_dept_check"] != 1) {
|
|
|
|
- $process = 4;
|
|
|
|
- $fields = DictApi::getTalentFields(3, $talent_info["isImport"]);
|
|
|
|
- } else {
|
|
|
|
- $process = 5;
|
|
|
|
- $fields = DictApi::getTalentFields(2, $talent_info["isImport"]);
|
|
|
|
- }
|
|
|
|
- break;
|
|
|
|
- case TalentState::DEPT_VERIFY_PASS:
|
|
|
|
- $process = 5;
|
|
|
|
- $fields = DictApi::getTalentFields(2, $talent_info["isImport"]);
|
|
|
|
- break;
|
|
|
|
- }
|
|
|
|
- if ($isMix && $process != 4) {
|
|
|
|
- if ($enterprise["type"] == 2) {
|
|
|
|
- $fields = DictApi::getTalentFields_IC();
|
|
|
|
- } else {
|
|
|
|
- $fields = DictApi::getTalentFields(4, $talent_info["isImport"]);
|
|
|
|
|
|
+ if ($process != 4) {
|
|
|
|
+ switch ($enterprise["type"]) {
|
|
|
|
+ case CommonConst::ENTERPRISE_NORMAL:
|
|
|
|
+ $fields = DictApi::getTalentFields(4, $talent_info["isImport"]);
|
|
|
|
+ break;
|
|
|
|
+ case CommonConst::ENTERPRISE_JC:
|
|
|
|
+ $fields = DictApi::getTalentFields_IC();
|
|
|
|
+ break;
|
|
|
|
+ case CommonConst::ENTERPRISE_WJ:
|
|
|
|
+ $fields = DictApi::getTalentFields_WJ();
|
|
|
|
+ break;
|
|
|
|
+ case CommonConst::ENTERPRISE_GJ:
|
|
|
|
+ $fields = DictApi::getTalentFields_GJ();
|
|
|
|
+ break;
|
|
}
|
|
}
|
|
|
|
+ } else {
|
|
|
|
+ $fields = null; //部门审核不需要审核字段
|
|
}
|
|
}
|
|
if ($fields["fst_work_time"] && in_array($enterprise['enterpriseTag'], ['mtdw', 'gyqyh', 'mbfqy', 'jrjg']) && $enterprise["type"] == 1) {
|
|
if ($fields["fst_work_time"] && in_array($enterprise['enterpriseTag'], ['mtdw', 'gyqyh', 'mbfqy', 'jrjg']) && $enterprise["type"] == 1) {
|
|
$fields["fst_work_time"] = $talent_info['talent_type'] == 1 ? "近三年来晋工作时间" : "近三年(首次)来晋工作时间";
|
|
$fields["fst_work_time"] = $talent_info['talent_type'] == 1 ? "近三年来晋工作时间" : "近三年(首次)来晋工作时间";
|
|
@@ -1675,7 +1681,7 @@ class Talent extends AdminController {
|
|
}
|
|
}
|
|
$_companys[] = $company;
|
|
$_companys[] = $company;
|
|
}
|
|
}
|
|
- if ($process == 4 && $enterprise["type"] == 1) {
|
|
|
|
|
|
+ if ($process == 4 && in_array($enterprise["type"], [CommonConst::ENTERPRISE_NORMAL, CommonConst::ENTERPRISE_WJ])) {
|
|
$where = [];
|
|
$where = [];
|
|
$cwfts = explode(";", $condition["companyWithFileType"]);
|
|
$cwfts = explode(";", $condition["companyWithFileType"]);
|
|
foreach ($cwfts as $cwft) {
|
|
foreach ($cwfts as $cwft) {
|
|
@@ -1694,9 +1700,6 @@ class Talent extends AdminController {
|
|
} else {
|
|
} else {
|
|
$where = [];
|
|
$where = [];
|
|
$whr = [];
|
|
$whr = [];
|
|
- if (!$isMix) {
|
|
|
|
- $where[] = ["step", "=", 2];
|
|
|
|
- }
|
|
|
|
$where[] = ["project", "=", 1];
|
|
$where[] = ["project", "=", 1];
|
|
$where[] = ["active", "=", 1];
|
|
$where[] = ["active", "=", 1];
|
|
$where[] = ["type", "=", $enterprise["type"]];
|
|
$where[] = ["type", "=", $enterprise["type"]];
|
|
@@ -1758,7 +1761,7 @@ class Talent extends AdminController {
|
|
$check["checkState"] = -1; //复审失败
|
|
$check["checkState"] = -1; //复审失败
|
|
}
|
|
}
|
|
/* 保存的审核内容end */
|
|
/* 保存的审核内容end */
|
|
- return json(["code" => 200, "obj" => ["process" => $process, "talentInfo" => $talent_info, "check" => $check, "fieldList" => $field_tmp, "fileList" => $files, "companys" => $_companys]]);
|
|
|
|
|
|
+ return json(["code" => 200, "obj" => ["process" => $process, "type" => $enterprise["type"], "talentInfo" => $talent_info, "check" => $check, "fieldList" => $field_tmp, "fileList" => $files, "companys" => $_companys]]);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1768,8 +1771,12 @@ class Talent extends AdminController {
|
|
$lastLog = TalentLogApi::getLastLog($id, ProjectState::TALENT);
|
|
$lastLog = TalentLogApi::getLastLog($id, ProjectState::TALENT);
|
|
$responseObj = new \stdClass();
|
|
$responseObj = new \stdClass();
|
|
if ($talentInfo["checkState"] == TalentState::SCND_SAVE && $lastLog["state"] == TalentState::FST_VERIFY_REJECT) {
|
|
if ($talentInfo["checkState"] == TalentState::SCND_SAVE && $lastLog["state"] == TalentState::FST_VERIFY_REJECT) {
|
|
- if ($this->user["type"] == 2) {
|
|
|
|
|
|
+ if ($this->user["type"] == CommonConst::ENTERPRISE_JC) {
|
|
$fields = DictApi::getTalentFields_IC();
|
|
$fields = DictApi::getTalentFields_IC();
|
|
|
|
+ } else if ($this->user["type"] == CommonConst::ENTERPRISE_WJ) {
|
|
|
|
+ $fields = DictApi::getTalentFields_WJ();
|
|
|
|
+ } else if ($this->user["type"] == CommonConst::ENTERPRISE_GJ) {
|
|
|
|
+ $fields = DictApi::getTalentFields_GJ();
|
|
} else {
|
|
} else {
|
|
$fields = DictApi::getTalentFields(4, $talentInfo["isImport"]);
|
|
$fields = DictApi::getTalentFields(4, $talentInfo["isImport"]);
|
|
}
|
|
}
|
|
@@ -2004,7 +2011,7 @@ class Talent extends AdminController {
|
|
}
|
|
}
|
|
|
|
|
|
public function getPhones() {
|
|
public function getPhones() {
|
|
- $list = VerifyApi::getListByProcess($this->request->param("process"));
|
|
|
|
|
|
+ $list = VerifyApi::getListByProcess($this->request->param());
|
|
$result = [];
|
|
$result = [];
|
|
if ($list) {
|
|
if ($list) {
|
|
foreach ($list as $item) {
|
|
foreach ($list as $item) {
|
|
@@ -2017,7 +2024,7 @@ class Talent extends AdminController {
|
|
}
|
|
}
|
|
|
|
|
|
public function getEnterprisePhones() {
|
|
public function getEnterprisePhones() {
|
|
- $list = VerifyApi::getListByProcess($this->request->param("process"));
|
|
|
|
|
|
+ $list = VerifyApi::getListByProcess($this->request->param());
|
|
$result = [];
|
|
$result = [];
|
|
if ($list) {
|
|
if ($list) {
|
|
foreach ($list as $item) {
|
|
foreach ($list as $item) {
|