|
@@ -296,14 +296,6 @@ class Talent extends AdminController {
|
|
|
return view($tpl, $assigns);
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 复审-撤销复核
|
|
|
- * @auth {{/talentInfo/cancleThirdCheck}}
|
|
|
- */
|
|
|
- public function cancel_check() {
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
/**
|
|
|
* 预备人才库
|
|
|
* @auth {{/talentInfo/gotoIndex/4}}
|
|
@@ -1574,6 +1566,58 @@ class Talent extends AdminController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 撤销初审失败
|
|
|
+ * @auth {{/talentInfo/cancleFirstCheck}}
|
|
|
+ */
|
|
|
+ public function cancleFirstCheck() {
|
|
|
+ $returnObj = new \stdClass();
|
|
|
+ $returnObj->code = 500;
|
|
|
+ $id = \StrUtil::getRequestDecodeParam($this->request, "id");
|
|
|
+ $msg = \StrUtil::getRequestDecodeParam($this->request, "checkMsg");
|
|
|
+ $old = VerifyApi::getOne($id);
|
|
|
+ if (!$old) {
|
|
|
+ $returnObj->msg = "请选择需要撤销的对象";
|
|
|
+ return json($returnObj);
|
|
|
+ }
|
|
|
+ if ($old["checkState"] != TalentState::FST_VERIFY_FAIL) {
|
|
|
+ $returnObj->msg = "当前对象不是\"初审不通过\"状态,无法撤销";
|
|
|
+ return json($returnObj);
|
|
|
+ }
|
|
|
+ $where = [];
|
|
|
+ $lastLog = TalentLogApi::getLastLogEx($id, ProjectState::TALENT);
|
|
|
+ if ($lastLog["state"] != TalentState::FST_VERIFY_FAIL || $lastLog["active"] != 1) {
|
|
|
+ $returnObj->msg = "当前对象不是\"初审不通过\"状态,无法撤销";
|
|
|
+ return json($returnObj);
|
|
|
+ }
|
|
|
+ if ($old["isPublic"] != 1) {
|
|
|
+ $returnObj->msg = "当前对象已核查征信,无法撤销";
|
|
|
+ return json($returnObj);
|
|
|
+ }
|
|
|
+ try {
|
|
|
+ if (in_array($lastLog["last_state"], [TalentState::SCND_SUBMIT, TalentState::DEPT_VERIFY_REJECT, TalentState::REVERIFY_REJECT])) {
|
|
|
+ $checkState = TalentState::SCND_SUBMIT;
|
|
|
+ } else if (in_array($lastLog["last_state"], [TalentState::SCND_SAVE, TalentState::FST_VERIFY_REJECT])) {
|
|
|
+ $checkState = TalentState::SCND_SAVE;
|
|
|
+ } else {
|
|
|
+ $returnObj->msg = "当前对象日志异常,无法撤销";
|
|
|
+ return json($returnObj);
|
|
|
+ }
|
|
|
+
|
|
|
+ $upd["id"] = $id;
|
|
|
+ $upd["checkState"] = $checkState;
|
|
|
+ if (TalentModel::update($upd)) {
|
|
|
+ TalentLogApi::write(ProjectState::TALENT, $id, [$lastLog["last_state"], $checkState], "撤销原因:" . $msg, 1);
|
|
|
+ }
|
|
|
+ $returnObj->msg = "撤销成功";
|
|
|
+ $returnObj->code = 200;
|
|
|
+ return json($returnObj);
|
|
|
+ } catch (\think\db\exception\DbException $e) {
|
|
|
+ $responseObj->msg = $e->getMessage();
|
|
|
+ return json($responseObj);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 撤销复核
|
|
|
* @auth {{/talentInfo/cancleThirdCheck}}
|