sugangqiang 2 years ago
parent
commit
046371f754
2 changed files with 7 additions and 2 deletions
  1. 1 0
      app/common/api/VerifyApi.php
  2. 6 2
      app/enterprise/controller/Talent.php

+ 1 - 0
app/common/api/VerifyApi.php

@@ -244,6 +244,7 @@ class VerifyApi {
                     $_where = [];
                     $_where[] = ["type", "=", 1];
                     $_where[] = ["active", "=", 1];
+                    $_where[] = ["step", "=", 3];
                     $_where[] = ["companyId", "=", session("user")["companyId"]];
                     $mainIds = \app\common\model\TalentChecklog::where($_where)->group("mainId")->order("createTime desc")->column("mainId");
                     if ($mainIds) {

+ 6 - 2
app/enterprise/controller/Talent.php

@@ -244,9 +244,13 @@ class Talent extends EnterpriseController {
             }
             $data["checkState"] = $checkState;
             $data["id"] = $info["id"];
+            $success_msg = "提交成功";
+            $error_msg = "提交失败";
             if ($checkState == TalentState::SCND_SAVE) {
-                $success_msg = "提交成功";
-                $error_msg = "提交失败";
+                $last_log = TalentLogApi::getLastLog($data["id"], 1);
+                if ($last_log["new_state"] != TalentState::SCND_SAVE) {
+                    TalentLogApi::write(1, $data["id"], $checkState, "保存认定材料未提交", 1);
+                }
                 TalentModel::update($data);
             } else if ($checkState == TalentState::SCND_SUBMIT) {
                 $success_msg = "提交成功";