|
@@ -8,6 +8,7 @@ use app\common\api\TalentLogApi;
|
|
|
use app\common\api\TalentState;
|
|
|
use app\enterprise\model\Talent as TalentModel;
|
|
|
use app\common\api\TalentConditionApi;
|
|
|
+use app\common\api\DictApi;
|
|
|
|
|
|
/**
|
|
|
* Description of Talent
|
|
@@ -322,7 +323,9 @@ class Talent extends AdminController {
|
|
|
TalentLogApi::setActive($log["id"], 1);
|
|
|
$condition = TalentConditionApi::getOne($talent_info["talent_condition"]);
|
|
|
$companyIds = array_filter(explode(",", $condition["companyIds"]));
|
|
|
- TalentLogApi::writeDeptLogs($talent_info["id"], $companyIds, TalentState::FST_VERIFY_PASS);
|
|
|
+ if ($log["new_state"] == TalentState::FST_VERIFY_PASS) {
|
|
|
+ TalentLogApi::writeDeptLogs($talent_info["id"], $companyIds, TalentState::FST_VERIFY_PASS);
|
|
|
+ }
|
|
|
return json(["code" => 200, "msg" => "审核成功"]);
|
|
|
}
|
|
|
|
|
@@ -541,7 +544,7 @@ class Talent extends AdminController {
|
|
|
switch ($checkState) {
|
|
|
case 2:
|
|
|
$enterprise = \app\common\model\Enterprise::findOrEmpty($talent_info["enterprise_id"]);
|
|
|
- $fields = \app\common\api\DictApi::getTalentFields(1);
|
|
|
+ $fields = DictApi::getTalentFields(1);
|
|
|
$field_tmp = [];
|
|
|
foreach ($fields as $key => $field) {
|
|
|
$field_tmp[] = ["key" => $key, "value" => $field];
|
|
@@ -558,27 +561,37 @@ class Talent extends AdminController {
|
|
|
$process = 2;
|
|
|
break;
|
|
|
case 7:
|
|
|
- $fields = \app\common\api\DictApi::getTalentFields(3);
|
|
|
+ $fields = DictApi::getTalentFields(3);
|
|
|
$process = 3;
|
|
|
break;
|
|
|
case 9:
|
|
|
- $fields = \app\common\api\DictApi::getTalentFields(3);
|
|
|
+ $fields = DictApi::getTalentFields(3);
|
|
|
$process = 4;
|
|
|
break;
|
|
|
}
|
|
|
if ($checkState != 2) {
|
|
|
$enterprise = \app\common\model\Enterprise::findOrEmpty($talent_info["enterprise_id"]);
|
|
|
- $fields = \app\common\api\DictApi::getTalentFields(3);
|
|
|
+ $fields = DictApi::getTalentFields(2);
|
|
|
$field_tmp = [];
|
|
|
foreach ($fields as $key => $field) {
|
|
|
$field_tmp[] = ["key" => $key, "value" => $field];
|
|
|
}
|
|
|
+ $where = [];
|
|
|
+ $whr = [];
|
|
|
+ $condition = TalentConditionApi::getOne($talent_info["talent_condition"]);
|
|
|
$where[] = ["project", "=", 1];
|
|
|
+ $where[] = ["step", "=", 2];
|
|
|
$where[] = ["active", "=", 1];
|
|
|
$where[] = ["type", "=", $enterprise["type"]];
|
|
|
-
|
|
|
- $files = \think\facade\Db::table("new_common_filetype")->where($where)->select();
|
|
|
+ if ($condition && $condition["bindFileTypes"]) {
|
|
|
+ $whr[] = ["id", "in", explode(",", $condition["bindFileTypes"])];
|
|
|
+ $files = \think\facade\Db::table("new_common_filetype")->whereOr([$where, $whr])->select();
|
|
|
+ } else {
|
|
|
+ $files = \think\facade\Db::table("new_common_filetype")->where($where)->select();
|
|
|
+ }
|
|
|
}
|
|
|
+ $talent_info["files"] = array_filter(explode(",", $talent_info["modify_files"]));
|
|
|
+ $talent_info["fields"] = array_filter(explode(",", $talent_info["modify_fields"]));
|
|
|
return json(["code" => 200, "obj" => ["process" => $process, "talentInfo" => $talent_info, "fieldList" => $field_tmp, "fileList" => $files]]);
|
|
|
} else {
|
|
|
return json(["msg" => "该申报不在审核范围内,无法审核"]);
|