|
@@ -28,14 +28,13 @@ class TalentBankChange extends AdminController {
|
|
|
$limit = $params["limit"] ?: 10;
|
|
|
$where = $this->setTalentBank($params);
|
|
|
$where[] = ["type", "=", $this->user["type"]];
|
|
|
+ $where[] = ["delete", "=", 0];
|
|
|
//获取字典表人才层次
|
|
|
$levelMap = DictApi::selectByParentCode("talent_arrange");
|
|
|
- $typeMap = DictApi::selectByParentCode("enterprise_tag");
|
|
|
$count = TbcModel::where($where)->count();
|
|
|
$list = TbcModel::where($where)->limit($offset, $limit)->order("createTime {$order}")->select()->toArray();
|
|
|
foreach ($list as $key => $item) {
|
|
|
$list[$key]["talentArrangeName"] = $levelMap[$item["talentArrange"]];
|
|
|
- $list[$key]["talentTypeName"] = $typeMap[$item["talentType"]];
|
|
|
}
|
|
|
|
|
|
return json(["rows" => $list, "total" => $count]);
|
|
@@ -80,29 +79,51 @@ class TalentBankChange extends AdminController {
|
|
|
$log["description"] = $checkMsg;
|
|
|
$log["createUser"] = $user ? sprintf("%s(%s)", $user["account"], $user["companyName"] ?: $user["rolename"]) : "系统";
|
|
|
$log["createTime"] = date("Y-m-d H:i:s");
|
|
|
- $updTalentQuit["id"] = $id;
|
|
|
- $updTalentQuit["checkState"] = $checkState;
|
|
|
- $updTalentQuit["checkMsg"] = $checkMsg;
|
|
|
+ $updTalentBank["id"] = $id;
|
|
|
+ $updTalentBank["checkState"] = $checkState;
|
|
|
+ $updTalentBank["checkMsg"] = $checkMsg;
|
|
|
if ($checkState == 3) {
|
|
|
//修改人才库信息
|
|
|
$upd["id"] = $info["talentId"];
|
|
|
- $upd["active"] = 2;
|
|
|
- $upd["cur_quit_time"] = $info["quitTime"];
|
|
|
+ $upd["bank"] = $info["newBank"];
|
|
|
+ $upd["bank_number"] = $info["newBankNumber"];
|
|
|
+ $upd["bank_branch_name"] = $info["newBankNerPoint"];
|
|
|
+ $upd["bank_account"] = $info["newBankAccount"];
|
|
|
Db::table("new_talent_info")->save($upd);
|
|
|
|
|
|
+ //修改津补贴
|
|
|
+ $updAllowance["bank"] = $info["newBank"];
|
|
|
+ $updAllowance["bankNumber"] = $info["newBankNumber"];
|
|
|
+ $updAllowance["bankNetPoint"] = $info["newBankNerPoint"];
|
|
|
+ $updAllowance["bankAccount"] = $info["newBankAccount"];
|
|
|
+ $where = [];
|
|
|
+ $where[] = ["talentId", "=", $info["talentId"]];
|
|
|
+ $where[] = ["publicState", "<=", 3];
|
|
|
+ Db::table("un_talent_allowance_info")->where($where)->save($updAllowance);
|
|
|
+
|
|
|
+ //修改购房补贴
|
|
|
+ $updHousepurchase["bank"] = $info["newBank"];
|
|
|
+ $updHousepurchase["bankNumber"] = $info["newBankNumber"];
|
|
|
+ $updHousepurchase["bankNetPoint"] = $info["newBankNerPoint"];
|
|
|
+ $updHousepurchase["bankAccount"] = $info["newBankAccount"];
|
|
|
+ $where = [];
|
|
|
+ $where[] = ["talentId", "=", $info["talentId"]];
|
|
|
+ $where[] = ["publicState", "<=", 2];
|
|
|
+ Db::table("un_housepurchase")->where($where)->save($updHousepurchase);
|
|
|
+
|
|
|
$talentLog["id"] = getStringId();
|
|
|
$talentLog["active"] = 1;
|
|
|
- $talentLog["step"] = 22;
|
|
|
+ $talentLog["step"] = 23;
|
|
|
$talentLog["type"] = ProjectState::TALENT;
|
|
|
$talentLog["mainId"] = $info["talentId"];
|
|
|
- $talentLog["description"] = "离职变更通过,同步到人才库";
|
|
|
+ $talentLog["description"] = "银行账号变更通过,同步到人才库";
|
|
|
$talentLog["createUser"] = $user ? sprintf("%s(%s)", $user["account"], $user["companyName"] ?: $user["rolename"]) : "系统";
|
|
|
$talentLog["createTime"] = date("Y-m-d H:i:s");
|
|
|
Db::table("new_talent_checklog")->insert($talentLog);
|
|
|
- $updTalentQuit["passTime"] = date("Y-m-d H:i:s");
|
|
|
+ $updTalentBank["passTime"] = date("Y-m-d H:i:s");
|
|
|
}
|
|
|
Db::table("new_talent_checklog")->insert($log);
|
|
|
- Db::table("un_talent_quit")->save($updTalentQuit);
|
|
|
+ Db::table("un_talent_quit")->save($updTalentBank);
|
|
|
$responseObj->code = 200;
|
|
|
$responseObj->msg = "审核成功";
|
|
|
|
|
@@ -123,11 +144,17 @@ class TalentBankChange extends AdminController {
|
|
|
if (\StrUtil::isNotEmpAndNull($data["idCard"])) {
|
|
|
$where[] = ["idCard", "=", $data["IdCard"]];
|
|
|
}
|
|
|
- if (\StrUtil::isNotEmpAndNull($data["enterpriseName"])) {
|
|
|
- $where[] = ["enterpriseName", "=", $data["enterpriseName"]];
|
|
|
+ if (\StrUtil::isNotEmpAndNull($data["oldBankName"])) {
|
|
|
+ $where[] = ["oldBankName", "=", $data["oldBankName"]];
|
|
|
+ }
|
|
|
+ if (\StrUtil::isNotEmpAndNull($data["newBankName"])) {
|
|
|
+ $where[] = ["newBankName", "=", $data["newBankName"]];
|
|
|
+ }
|
|
|
+ if (\StrUtil::isNotEmpAndNull($data["oldBankAccount"])) {
|
|
|
+ $where[] = ["oldBankAccount", "=", $data["oldBankAccount"]];
|
|
|
}
|
|
|
- if (\StrUtil::isNotEmpAndNull($data["talentArrange"])) {
|
|
|
- $where[] = ["talentArrange", "=", $data["talentArrange"]];
|
|
|
+ if (\StrUtil::isNotEmpAndNull($data["newBankAccount"])) {
|
|
|
+ $where[] = ["newBankAccount", "=", $data["newBankAccount"]];
|
|
|
}
|
|
|
if ($data["checkState"] != null) {
|
|
|
$where[] = ["checkState", "=", $data["checkState"]];
|