|
@@ -1852,6 +1852,7 @@ class Talent extends AdminController {
|
|
|
$responseObj->id = $id;
|
|
|
$responseObj->fileList = $files;
|
|
|
$responseObj->fieldList = $field_tmp;
|
|
|
+ $responseObj->checkMsg = $lastLog["description"];
|
|
|
$responseObj->select = [
|
|
|
"files" => array_filter(explode(",", $talentInfo["modify_files"])),
|
|
|
"fields" => array_filter(explode(",", $talentInfo["modify_fields"]))
|
|
@@ -1870,10 +1871,12 @@ class Talent extends AdminController {
|
|
|
$id = $this->request["id"];
|
|
|
$fields = array_filter(explode(",", $this->request["fields"]));
|
|
|
$files = array_filter(explode(",", $this->request["files"]));
|
|
|
+ $checkMsg = \StrUtil::getRequestDecodeParam($this->request, "checkMsg");
|
|
|
|
|
|
$talentInfo = VerifyApi::getOne($id);
|
|
|
$lastLog = TalentLogApi::getLastLog($id, ProjectState::TALENT);
|
|
|
$responseObj = new \stdClass();
|
|
|
+ Db::startTrans();
|
|
|
if (($talentInfo["checkState"] == TalentState::SCND_SAVE || $talentInfo["checkState"] == TalentState::FST_SAVE || $talentInfo["checkState"] == TalentState::FST_SUBMIT) && $lastLog["state"] == TalentState::FST_VERIFY_REJECT) {
|
|
|
if (!$fields && !$files) {
|
|
|
$responseObj->msg = "请选择可修改的字段或附件!";
|
|
@@ -1883,11 +1886,27 @@ class Talent extends AdminController {
|
|
|
$data["id"] = $id;
|
|
|
$data["modify_fields"] = $fields ? implode(",", $fields) : null;
|
|
|
$data["modify_files"] = $files ? implode(",", $files) : null;
|
|
|
- TalentModel::update($data);
|
|
|
- $responseObj->code = 200;
|
|
|
- $responseObj->msg = "驳回字段修改成功";
|
|
|
+ $res1 = Db::table("new_talent_info")->update($data);
|
|
|
+ if (in_array($this->user["type"], [CommonConst::ENTERPRISE_WJ])) {
|
|
|
+ if (\StrUtil::isEmpOrNull($checkMsg)) {
|
|
|
+ $responseObj->msg = "请填写审核意见!";
|
|
|
+ return json($responseObj);
|
|
|
+ }
|
|
|
+ $updLog["id"] = $lastLog["id"];
|
|
|
+ $updLog["description"] = $checkMsg;
|
|
|
+ $res2 = Db::table("new_talent_checklog")->update($updLog);
|
|
|
+ }
|
|
|
+ if ($res1 || $res2) {
|
|
|
+ Db::commit();
|
|
|
+ $responseObj->code = 200;
|
|
|
+ $responseObj->msg = "驳回字段修改成功";
|
|
|
+ } else {
|
|
|
+ Db::rollback();
|
|
|
+ $responseObj->msg = "没有任何修改,提交失败";
|
|
|
+ }
|
|
|
return json($responseObj);
|
|
|
} catch (\think\db\exception\DbException $e) {
|
|
|
+ Db::rollback();
|
|
|
$responseObj->msg = $e->getMessage();
|
|
|
return json($responseObj);
|
|
|
}
|