|
@@ -72,6 +72,37 @@ class Worker {
|
|
\app\common\model\TalentLog::create($log);
|
|
\app\common\model\TalentLog::create($log);
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
|
|
+ if (!$ti["talent_condition"]) {
|
|
|
|
+ $oldTi = Db::table("un_talent_info")->where("id", $ti["oldId"])->find();
|
|
|
|
+ $oldCondition = Db::table("un_identify_condition")->where("id", $oldTi["identifyCondition"])->find();
|
|
|
|
+ $where = [];
|
|
|
|
+ $where[] = ["name", "=", $oldCondition["name"]];
|
|
|
|
+ $where[] = ["type", "=", 2];
|
|
|
|
+ $newCondition = Db::table("new_talent_condition")->where($where)->find();
|
|
|
|
+ $newConditionId = $newCondition["id"];
|
|
|
|
+ if (!$newCondition) {
|
|
|
|
+ $condition["source"] = $oldCondition["source"];
|
|
|
|
+ $condition["talentLevel"] = $oldCondition["talentLevel"];
|
|
|
|
+ $condition["type"] = $oldCondition["type"];
|
|
|
|
+ $condition["name"] = $oldCondition["name"];
|
|
|
|
+ $condition["activeYear"] = $oldCondition["activeYear"];
|
|
|
|
+ $condition["notWorkYear"] = $oldCondition["notWorkYear"];
|
|
|
|
+ $condition["active"] = $oldCondition["active"];
|
|
|
|
+ $condition["companyIds"] = $oldCondition["companyIds"];
|
|
|
|
+ $condition["description"] = $oldCondition["description"];
|
|
|
|
+ $condition["createTime"] = $oldCondition["createTime"];
|
|
|
|
+ $condition["createUser"] = $oldCondition["createUser"];
|
|
|
|
+ $condition["updateTime"] = $oldCondition["updateTime"];
|
|
|
|
+ $condition["updateUser"] = $oldCondition["updateUser"];
|
|
|
|
+ $newConditionId = Db::table("new_talent_condition")->insertGetId($condition);
|
|
|
|
+ }
|
|
|
|
+ if ($newConditionId) {
|
|
|
|
+ $updData["id"] = $ti["id"];
|
|
|
|
+ $updData["talent_condition"] = $newConditionId;
|
|
|
|
+ Db::table("new_talent_info")->save($updData);
|
|
|
|
+ }
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
|