|
@@ -104,7 +104,7 @@ class TalentTypeChange extends AdminController {
|
|
|
|
|
|
$levelMap = DictApi::selectByParentCode("talent_arrange");
|
|
|
$count = ttcModel::whereRaw($whereRaw)->where($where)->count();
|
|
|
- $list = ttcModel::whereRaw($whereRaw)->where($where)->limit($offset, $limit)->order("createTime {$order}")->select();
|
|
|
+ $list = ttcModel::whereRaw($whereRaw)->where($where)->limit($offset, $limit)->order("createTime {$order}")->select()->toArray();
|
|
|
foreach ($list as $key => $item) {
|
|
|
if ($item["beforeCheckCompany"]) {
|
|
|
$list[$key]["beforeCheckCompanyName"] = getCacheById("Company", $item["beforeCheckCompany"]);
|
|
@@ -304,6 +304,7 @@ class TalentTypeChange extends AdminController {
|
|
|
$response->code = 200;
|
|
|
return $response;
|
|
|
} catch (\think\db\exception\DbException $e) {
|
|
|
+ Db::rollback();
|
|
|
$response->msg = "审核失败:" . $e->getMessage();
|
|
|
return $response;
|
|
|
}
|
|
@@ -447,6 +448,7 @@ class TalentTypeChange extends AdminController {
|
|
|
$response->code = 200;
|
|
|
return $response;
|
|
|
} catch (\think\db\exception\DbException $e) {
|
|
|
+ Db::rollback();
|
|
|
$response->msg = "提交审核失败:" . $e->getMessage();
|
|
|
return $response;
|
|
|
}
|
|
@@ -590,6 +592,7 @@ class TalentTypeChange extends AdminController {
|
|
|
Db::commit();
|
|
|
return $response;
|
|
|
} catch (\think\db\exception\DbException $e) {
|
|
|
+ Db::rollback();
|
|
|
$response->msg = "核查征信失败:" . $e->getMessage();
|
|
|
return $response;
|
|
|
}
|
|
@@ -638,6 +641,7 @@ class TalentTypeChange extends AdminController {
|
|
|
$response->msg = "核查征信通过成功";
|
|
|
return $response;
|
|
|
} catch (\think\db\exception\DbException $e) {
|
|
|
+ Db::rollback();
|
|
|
$response->msg = "核查征信通过失败:" . $e->getMessage();
|
|
|
return $response;
|
|
|
}
|
|
@@ -646,13 +650,13 @@ class TalentTypeChange extends AdminController {
|
|
|
/**
|
|
|
* 公示预览
|
|
|
*/
|
|
|
- public function publicExport() {
|
|
|
+ public function publicPreview() {
|
|
|
$params = $this->request->param();
|
|
|
$ids_arr = array_filter(explode(",", $params["ids"]));
|
|
|
$columns = ["序号", "姓名", "工作单位", "本人具备的认定条件", "拟认定人才层次", "审核状态", "备注"];
|
|
|
if ($ids_arr) {
|
|
|
- $where[] = ["id", "in", $ids_arr];
|
|
|
- $list = ttcModel::where($where)->select()->toArray();
|
|
|
+ $where[] = ["ttc.id", "in", $ids_arr];
|
|
|
+ $list = ttcModel::alias("ttc")->leftJoin("new_talent_condition tc", "ttc.newIdentifyCondition=tc.id")->field("ttc.*,tc.name as identifyConditionZH")->where($where)->select()->toArray();
|
|
|
$rows = [];
|
|
|
$talentArranges = DictApi::selectByParentCode("talent_arrange");
|
|
|
for ($i = 0; $i < count($list); $i++) {
|
|
@@ -660,7 +664,6 @@ class TalentTypeChange extends AdminController {
|
|
|
$whereLastLog = [];
|
|
|
$whereLastLog[] = ["step", "=", 3];
|
|
|
$whereLastLog[] = ["state", "<>", 8];
|
|
|
- $talent_condition = TalentConditionApi::getOne($item["newIdentifyCondition"]);
|
|
|
$description = $item["description"];
|
|
|
$stateName = "";
|
|
|
if ($item["checkState"] == MainState::NOTPASS) {
|
|
@@ -677,7 +680,7 @@ class TalentTypeChange extends AdminController {
|
|
|
$stateName = "审核通过";
|
|
|
}
|
|
|
$row = [
|
|
|
- $i + 1, $item["talentName"], $item["enterpriseName"], $talent_condition["name"], $talentArranges[$item["newTalentArrange"]], $stateName, $description
|
|
|
+ $i + 1, $item["talentName"], $item["enterpriseName"], $item["identifyConditionZH"], $talentArranges[$item["newTalentArrange"]], $stateName, $description
|
|
|
];
|
|
|
$rows[] = $row;
|
|
|
}
|
|
@@ -693,69 +696,665 @@ class TalentTypeChange extends AdminController {
|
|
|
* 公示
|
|
|
*/
|
|
|
public function publicBatch() {
|
|
|
+ $response = new \stdClass();
|
|
|
+ $response->code = 500;
|
|
|
//查询需要公示的数据(勾选)
|
|
|
$params = $this->request->param();
|
|
|
- $ids = array_filter(implode(",", $params["ids"]));
|
|
|
- $list = ttcModel::where(["id", "in", $ids])->select()->toArray();
|
|
|
+ $ids = array_filter(explode(",", $params["ids"]));
|
|
|
+ $publicBatch = $params["batch"];
|
|
|
+ $isMessage = $params["isMessage"] == 1 ? true : false;
|
|
|
+ if (!$publicBatch || strlen($publicBatch) != 6 || !is_numeric($publicBatch)) {
|
|
|
+ $response->msg = "公示批次错误";
|
|
|
+ return $response;
|
|
|
+ }
|
|
|
+ $where = [];
|
|
|
+ $where[] = ["ttc.id", "in", $ids];
|
|
|
+ $list = ttcModel::alias("ttc")->leftJoin("un_enterprise e", "e.id=ttc.enterpriseId")->where($where)->field("ttc.*,e.agentPhone")->select()->toArray();
|
|
|
$logList = [];
|
|
|
- $recordList = [];
|
|
|
+ $phones = [];
|
|
|
+ $success = 0;
|
|
|
+ $failure = 0;
|
|
|
+ Db::startTrans();
|
|
|
+ try {
|
|
|
+ for ($i = 0; $i < count($list); $i++) {
|
|
|
+ $obj = $list[$i];
|
|
|
+ $data = [];
|
|
|
+ $data["id"] = $obj["id"];
|
|
|
+ if ($obj["checkState"] == MainState::PASS && $obj["isPublic"] == 2) {
|
|
|
+ $data["publicBatch"] = $publicBatch;
|
|
|
+ $data["isPublic"] = 3;
|
|
|
+ Db::table("un_talent_type_change")->update($data);
|
|
|
+ $logList[] = [
|
|
|
+ "id" => getStringId(),
|
|
|
+ "type" => ProjectState::LEVELCHANGE,
|
|
|
+ "mainId" => $obj["id"],
|
|
|
+ "companyId" => $this->user["companyId"],
|
|
|
+ "active" => 1,
|
|
|
+ "state" => MainState::BASIC_PASS,
|
|
|
+ "step" => 5,
|
|
|
+ "stateChange" => "<span class='label label-success'>待公示</span>-><span class='label label-primary'>公示中</span>",
|
|
|
+ "description" => "",
|
|
|
+ "createTime" => date("Y-m-d H:i:s"),
|
|
|
+ "createUser" => sprintf("%s(%s)", $this->user["account"], $this->user["companyName"] ?: $this->user["rolename"])
|
|
|
+ ];
|
|
|
+ $phones[$obj["enterpriseId"]] = $obj["agentPhone"];
|
|
|
+ $success++;
|
|
|
+ } else {
|
|
|
+ $failure++;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ $effect = Db::table("new_talent_checklog")->insertAll($logList);
|
|
|
+ Db::commit();
|
|
|
+ if ($phones && $isMessage && $effect) {
|
|
|
+ $tpl_content = sprintf("【晋江市人才服务平台】您好!您提交申请的%s已完成初步审核,现通过%s将审核结果予以公示,公示时间%s至%s。公示期间如有异议,请及时向%s反映。电话%s,电子邮箱%s。",
|
|
|
+ $params["typeName"], $params["address"], $params["publicStartTime"], $params["publicEndTime"], $params["dep"], $params["phone"], $params["email"]);
|
|
|
+ foreach ($phones as $enterpriseId => $phone) {
|
|
|
+ queue("app\job\Messenger", ["type" => 5, "userId" => $enterpriseId, "phone" => $phone, "template" => $tpl_content]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ $response->msg = "公示成功";
|
|
|
+ $response->code = 200;
|
|
|
+ return $response;
|
|
|
+ } catch (\think\db\exception\DbException $e) {
|
|
|
+ Db::rollback();
|
|
|
+ $response->msg = "公示失败:" . $e->getMessage();
|
|
|
+ return $response;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 公示导出
|
|
|
+ * @return type
|
|
|
+ */
|
|
|
+ public function publicExport() {
|
|
|
+ $response = new \stdClass();
|
|
|
+ $response->code = 500;
|
|
|
+
|
|
|
+ $params = $this->request->param();
|
|
|
+ $columns = ["序号", "公示批次", "姓名", "工作单位", "申请认定时间", "本人具备的认定条件", "拟认定人才层次", "审核状态", "备注"];
|
|
|
+ $startTime = $params["startTime"];
|
|
|
+ $endTime = $params["endTime"];
|
|
|
+ if (!strtotime($startTime) || !strtotime($endTime))
|
|
|
+ return json(["msg" => "时间格式错误"]);
|
|
|
+ $where = [];
|
|
|
+ $where[] = ["ttc.type", "=", $this->user["type"]];
|
|
|
+ $where[] = ["publicBatch", "between", [$startTime, $endTime]];
|
|
|
+ $list = ttcModel::alias("ttc")->leftJoin("new_talent_condition tc", "ttc.newIdentifyCondition=tc.id")->field("ttc.*,tc.name as identifyConditionZH")->where($where)->order("publicBatch")->select()->toArray();
|
|
|
+ if (!$list) {
|
|
|
+ $response->msg = "所选时间段内无公示数据";
|
|
|
+ return \StrUtil::back($response, "TalentTypeChange.callBack");
|
|
|
+ }
|
|
|
+ $rows = [];
|
|
|
+ $i = 1;
|
|
|
+ $talentArranges = DictApi::selectByParentCode("talent_arrange");
|
|
|
+ for ($i = 0; $i < count($list); $i++) {
|
|
|
+ $item = $list[$i];
|
|
|
+ $whereLastLog = [];
|
|
|
+ $whereLastLog[] = ["step", "=", 3];
|
|
|
+ $whereLastLog[] = ["state", "<>", 8];
|
|
|
+ $description = $item["description"];
|
|
|
+ $stateName = "";
|
|
|
+ if ($item["checkState"] == MainState::NOTPASS) {
|
|
|
+ $lastLog = TalentLogApi::getLastLogEx($item["id"], ProjectState::LEVELCHANGE, 0, $whereLastLog);
|
|
|
+ if ($lastLog && $lastLog["state"] == MainState::NOTPASS) {
|
|
|
+ $description = $lastLog["description"];
|
|
|
+ }
|
|
|
+ if (\StrUtil::isNotEmpAndNull($item["outMsg"])) {
|
|
|
+ $description = !$item["description"] ? "" : $item["description"] . $item["outMsg"];
|
|
|
+ }
|
|
|
+ $stateName = "审核不通过";
|
|
|
+ }
|
|
|
+ if ($item["checkState"] == MainState::PASS) {
|
|
|
+ $stateName = "审核通过";
|
|
|
+ }
|
|
|
+ $row = [
|
|
|
+ $i + 1, $item["publicBatch"], $item["talentName"], $item["enterpriseName"], $item["newIdentifyMonth"], $item["identifyConditionZH"], $talentArranges[$item["newTalentArrange"]], $stateName, $description
|
|
|
+ ];
|
|
|
+ $rows[] = $row;
|
|
|
+ }
|
|
|
+ if ($rows) {
|
|
|
+ $filename = "人才层次变更公示导出";
|
|
|
+ export($columns, $rows, $filename);
|
|
|
+ exit();
|
|
|
+ }
|
|
|
+ $response->msg = "所选时间段内无公示数据";
|
|
|
+ return \StrUtil::back($response, "TalentTypeChange.callBack");
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 公示再审核
|
|
|
+ */
|
|
|
+ public function afterCheck() {
|
|
|
+ $response = new \stdClass();
|
|
|
+ $response->code = 500;
|
|
|
+
|
|
|
+ $obj = $this->request->param();
|
|
|
+ if (!$obj) {
|
|
|
+ $response->msg = "系统错误,请联系管理员";
|
|
|
+ return $response;
|
|
|
+ }
|
|
|
+ $old = ttcModel::find($obj["id"]);
|
|
|
+ if ($old["isPublic"] != 3) {
|
|
|
+ $response->msg = "当前记录不是公示中状态,无法审核";
|
|
|
+ return $response;
|
|
|
+ }
|
|
|
+ $desc = null;
|
|
|
+ $state = $obj["checkState"];
|
|
|
+ $data = [];
|
|
|
+ $data["id"] = $obj["id"];
|
|
|
+ if ($obj["checkState"] == MainState::BASIC_REJECT) {
|
|
|
+ $data["checkState"] = MainState::THIRD_REJECT;
|
|
|
+ $data["isPublic"] = 1;
|
|
|
+ $data["outMsg"] = "";
|
|
|
+ $desc = "(公示再审核驳回)审核状态:" . MainState::getStateDesc($old["checkState"]) . "->" . MainState::getStateDesc(MainState::THIRD_REJECT) .
|
|
|
+ ";公示状态:<span class='label label-success'>公示中</span>-><span class='label label-primary'>待核查征信</span>;审核意见:" . $obj["checkMsg"];
|
|
|
+ } else {
|
|
|
+ $data["checkState"] = MainState::OBJECTION;
|
|
|
+ $data["checkMsg"] = $obj["checkMsg"];
|
|
|
+ $desc = "(公示再审核通过)审核状态:" . MainState::getStateDesc($old["checkState"]) . "->" . MainState::getStateDesc(MainState::OBJECTION) .
|
|
|
+ ";公示状态:<span class='label label-success'>公示中</span>-><span class='label label-primary'>待公布</span>";
|
|
|
+ }
|
|
|
+ //添加日志
|
|
|
+ $log = [
|
|
|
+ "id" => getStringId(),
|
|
|
+ "type" => ProjectState::LEVELCHANGE,
|
|
|
+ "mainId" => $obj["id"],
|
|
|
+ "companyId" => $this->user["companyId"],
|
|
|
+ "active" => 1,
|
|
|
+ "state" => $state,
|
|
|
+ "step" => 6,
|
|
|
+ "stateChange" => $desc,
|
|
|
+ "description" => $obj["checkMsg"],
|
|
|
+ "createTime" => date("Y-m-d H:i:s"),
|
|
|
+ "createUser" => sprintf("%s(%s)", $this->user["account"], $this->user["companyName"] ?: $this->user["rolename"])
|
|
|
+ ];
|
|
|
+ Db::startTrans();
|
|
|
+ try {
|
|
|
+ Db::table("un_talent_type_change")->update($data);
|
|
|
+ Db::table("new_talent_checklog")->insert($log);
|
|
|
+ Db::commit();
|
|
|
+ $response->code = 200;
|
|
|
+ $response->msg = "审核成功";
|
|
|
+ return $response;
|
|
|
+ } catch (\think\db\exception\DbException $e) {
|
|
|
+ Db::rollback();
|
|
|
+ $response->msg = "审核失败:" . $e->getMessage();
|
|
|
+ return $response;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 公示通过
|
|
|
+ */
|
|
|
+ public function publicPass($ids) {
|
|
|
+ $response = new \stdClass();
|
|
|
+ $response->code = 500;
|
|
|
+ $where = [];
|
|
|
+ $where[] = ["id", "in", explode(",", $ids)];
|
|
|
+ $list = ttcModel::where($where)->select()->toArray();
|
|
|
+ if (!$list) {
|
|
|
+ $response->msg = "系统错误,请联系管理员";
|
|
|
+ return $response;
|
|
|
+ }
|
|
|
+ //添加日志
|
|
|
+ $logList = [];
|
|
|
+ Db::startTrans();
|
|
|
+ foreach ($list as $obj) {
|
|
|
+ //添加日志
|
|
|
+ $logList[] = [
|
|
|
+ "id" => getStringId(),
|
|
|
+ "type" => ProjectState::LEVELCHANGE,
|
|
|
+ "mainId" => $obj["id"],
|
|
|
+ "companyId" => $this->user["companyId"],
|
|
|
+ "active" => 1,
|
|
|
+ "state" => 3,
|
|
|
+ "step" => 6,
|
|
|
+ "stateChange" => "<span class='label label-success'>公示中</span>-><span class='label label-primary'>待公布</span>",
|
|
|
+ "description" => "",
|
|
|
+ "createTime" => date("Y-m-d H:i:s"),
|
|
|
+ "createUser" => sprintf("%s(%s)", $this->user["account"], $this->user["companyName"] ?: $this->user["rolename"])
|
|
|
+ ];
|
|
|
+ }
|
|
|
+ $data["isPublic"] = 4;
|
|
|
+ try {
|
|
|
+ $res1 = Db::table("un_talent_type_change")->where($where)->update($data);
|
|
|
+ $res2 = Db::table("new_talent_checklog")->insertAll($logList);
|
|
|
+ if ($res1 && $res2) {
|
|
|
+ Db::commit();
|
|
|
+ $response->msg = "批量公示通过成功";
|
|
|
+ $response->code = 200;
|
|
|
+ return $response;
|
|
|
+ }
|
|
|
+ $response->msg = "批量公示通过失败,没有可更新内容";
|
|
|
+ Db::rollback();
|
|
|
+ return $response;
|
|
|
+ } catch (\think\db\exception\DbException $e) {
|
|
|
+ Db::rollback();
|
|
|
+ $response->msg = "批量公示通过失败:" . $e->getMessage();
|
|
|
+ return $response;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 公布
|
|
|
+ */
|
|
|
+ public function publish($ids, $batch) {
|
|
|
+ $response = new \stdClass();
|
|
|
+ $response->code = 500;
|
|
|
+ $where = [];
|
|
|
+ $where[] = ["id", "in", explode(",", $ids)];
|
|
|
+ $list = ttcModel::where($where)->select()->toArray();
|
|
|
+ if (!$list) {
|
|
|
+ $response->msg = "系统错误,请联系管理员";
|
|
|
+ return $response;
|
|
|
+ }
|
|
|
+ //添加日志
|
|
|
+ $logList = [];
|
|
|
+ Db::startTrans();
|
|
|
+ try {
|
|
|
+ for ($i = 0; $i < count($list); $i++) {
|
|
|
+ $obj = $list[$i];
|
|
|
+ $desc = "";
|
|
|
+ $stateChange = "";
|
|
|
+ $data = [];
|
|
|
+ $data["id"] = $obj["id"];
|
|
|
+ if ($obj["checkState"] == MainState::NOTPASS) {
|
|
|
+ $stateChange = "<span class='label label-success'>待公布</span>->" . MainState::getStateDesc(MainState::NOTPASS);
|
|
|
+ $desc = "审核不通过";
|
|
|
+ } else {
|
|
|
+ $stateChange = "<span class='label label-success'>待公布</span>-><span class='label label-primary'>待发证</span>";
|
|
|
+ $desc = "批量公布";
|
|
|
+ }
|
|
|
+ //添加日志
|
|
|
+ $logList[] = [
|
|
|
+ "id" => getStringId(),
|
|
|
+ "type" => ProjectState::LEVELCHANGE,
|
|
|
+ "mainId" => $obj["id"],
|
|
|
+ "companyId" => $this->user["companyId"],
|
|
|
+ "active" => 1,
|
|
|
+ "state" => 3,
|
|
|
+ "step" => 7,
|
|
|
+ "stateChange" => $stateChange,
|
|
|
+ "description" => $desc,
|
|
|
+ "createTime" => date("Y-m-d H:i:s"),
|
|
|
+ "createUser" => sprintf("%s(%s)", $this->user["account"], $this->user["companyName"] ?: $this->user["rolename"])
|
|
|
+ ];
|
|
|
+ if (\StrUtil::isEmpOrNull($obj["newCertificateOutTime"])) {
|
|
|
+ $startDate = date("Y-m-d");
|
|
|
+ $expiredDate = date("Y-m-d", strtotime("+6 years -1 days {$startDate}"));
|
|
|
+ $data["newIdentifyOutTime"] = $expiredDate;
|
|
|
+ $data["newCertificateOutTime"] = $expiredDate;
|
|
|
+ $data["newCertificateStartTime"] = $startDate;
|
|
|
+ }
|
|
|
+ $data["isPublic"] = 5;
|
|
|
+ $data["newIdentifyMonth"] = $batch;
|
|
|
+ Db::table("un_talent_type_change")->update($data);
|
|
|
+ }
|
|
|
+ Db::table("new_talent_checklog")->insertAll($logList);
|
|
|
+ Db::commit();
|
|
|
+ $response->msg = "公布成功";
|
|
|
+ $response->code = 200;
|
|
|
+ return $response;
|
|
|
+ } catch (\think\db\exception\DbException $e) {
|
|
|
+ Db::rollback();
|
|
|
+ $response->msg = "公布失败:" . $e->getMessage();
|
|
|
+ return $response;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 公布预览导出
|
|
|
+ */
|
|
|
+ public function publishExportBefore($ids) {
|
|
|
+ $where = [];
|
|
|
+ $where[] = ["ttc.id", "in", explode(",", $ids)];
|
|
|
+ $list = ttcModel::alias("ttc")->leftJoin("new_talent_condition tc", "ttc.newIdentifyCondition=tc.id")->field("ttc.*,tc.name as identifyConditionZH")->where($where)->select()->toArray();
|
|
|
+ if (!$list) {
|
|
|
+ $response->msg = "系统错误,请联系管理员";
|
|
|
+ return $response;
|
|
|
+ }
|
|
|
+ $columns = ["序号", "批次", "姓名", "工作单位", "申请认定时间", "本人具备的认定条件", "拟认定人才层次", "审核状态", "备注"];
|
|
|
+ $rows = [];
|
|
|
+ $levelMap = DictApi::selectByParentCode("talent_arrange");
|
|
|
for ($i = 0; $i < count($list); $i++) {
|
|
|
$obj = $list[$i];
|
|
|
-
|
|
|
- }
|
|
|
- /* StringBuilder sb = new StringBuilder();
|
|
|
- MessageRecord sendRecord = new MessageRecord(null, 2, 2, null, null, null, SmsProperties . CHECK_PUBLIC);
|
|
|
- sendRecord . setId(IdWorker . getIdStr());
|
|
|
- for (int i = 0;
|
|
|
- i < list.size();
|
|
|
- i++) {
|
|
|
- TalentTypeChange obj = list.get(i);
|
|
|
- obj . setPublicBatch(batch);
|
|
|
- obj . setIsPublic(3);
|
|
|
- //添加日志
|
|
|
- TalentChecklog log = new TalentChecklog(Integer . parseInt(ProjectConst . LEVELCHANGE), obj . getId(), null,
|
|
|
- StateConst . ACTIVE_YES, BasicStateEnum . RCRD_BASIC_PASS . getCode(), StepEnum . RCRD_STEP_PUBLIC . getCode(),
|
|
|
- "<span class='label label-success'>待公示</span>-><span class='label label-primary'>公示中</span>",
|
|
|
- null, DateUtil . getTime(), ShiroKit . getUser() . getAccount() + "(" + company . getName() + ")");
|
|
|
- logList . add(log);
|
|
|
- sb . append(obj . getPhone() + "," + typeName + "," + address + "," + publicStartTime + "," + publicEndTime + "," + dep + "," + phone + "," + email + ";");
|
|
|
-
|
|
|
- String param = obj . getPhone() + "," + typeName + "," + address + "," + publicStartTime + "," + publicEndTime + "," + dep + "," + phone + "," + email + ";";
|
|
|
- sb . append(param);
|
|
|
- MessageRecord record = new MessageRecord(null, 2, 2, obj . getTalentName(), obj . getPhone(), param . substring(0, param . length() - 1), SmsProperties . CHECK_PUBLIC);
|
|
|
- record . setState(1);
|
|
|
- record . setBizId(sendRecord . getId());
|
|
|
- record . setSendingDate(DateUtil . getTime());
|
|
|
- record . setCreateTime(DateUtil . getTime());
|
|
|
- recordList . add(record);
|
|
|
- }
|
|
|
- if (isMessage != null && isMessage == 1) {
|
|
|
- if (list.size() > 1000) {
|
|
|
- return new ResponseObj(ResponseObj . FAILD, "需要发送短信时公示量不能超过1000个");
|
|
|
- }
|
|
|
- //发送短信
|
|
|
- Map map = new HashMap();
|
|
|
- map . put("account", smsProperties . getAccount());
|
|
|
- map . put("password", smsProperties . getPassword());
|
|
|
- map . put("msg", sendRecord . getTemplateCode());
|
|
|
- map . put("params", sb . substring(0, sb . length() - 1));
|
|
|
- map . put("report", "true");
|
|
|
- map . put("uid", sendRecord . getId());
|
|
|
- String sendUrl = smsProperties . getBaseUrl() + "variable/json";
|
|
|
- JSONObject js = (JSONObject) JSONObject . toJSON(map);
|
|
|
- String res = HttpUtil . sendSmsByPost(sendUrl, js . toString());
|
|
|
- JSONObject jsonObject = JSONObject . parseObject(res);
|
|
|
- String code = jsonObject . getString("code");
|
|
|
- String errorMsg = jsonObject . getString("errorMsg");
|
|
|
- if (!"0" . equals(code)) {
|
|
|
- return new ResponseObj(ResponseObj . FAILD, "短信发送失败,原因为:" + errorMsg);
|
|
|
- }
|
|
|
- this . messageRecordService . insertBatch(recordList);
|
|
|
- }
|
|
|
- this.talentTypeChangeService.updateBatchById(list);
|
|
|
- this . talentChecklogService . insertBatch(logList);
|
|
|
- return new ResponseObj(ResponseObj . SUCCESS, "公示成功");
|
|
|
- */
|
|
|
+ $description = $obj["description"];
|
|
|
+ $stateName = "";
|
|
|
+ $whereLastLog = [];
|
|
|
+ $whereLastLog[] = ["step", "=", 3];
|
|
|
+ $whereLastLog[] = ["state", "<>", 8];
|
|
|
+ if ($obj["checkState"] == MainState::NOTPASS) {
|
|
|
+ $lastLog = TalentLogApi::getLastLogEx($obj["id"], ProjectState::LEVELCHANGE, 0, $whereLastLog);
|
|
|
+ if ($lastLog && $lastLog["state"] == MainState::NOTPASS) {
|
|
|
+ $description = $lastLog["description"];
|
|
|
+ }
|
|
|
+ if (\StrUtil::isNotEmpAndNull($obj["outMsg"])) {
|
|
|
+ $description = !$obj["description"] ? "" : $obj["description"] . $obj["outMsg"];
|
|
|
+ }
|
|
|
+ $stateName = "审核不通过";
|
|
|
+ }
|
|
|
+ if ($obj["checkState"] == MainState::PASS) {
|
|
|
+ $stateName = "审核通过";
|
|
|
+ }
|
|
|
+
|
|
|
+ $rows[] = [
|
|
|
+ $i + 1, $obj["publicBatch"], $obj["talentName"], $obj["enterpriseName"], $obj["newIdentifyMonth"], $obj["identifyConditionZH"], $levelMap[$obj["newTalentArrange"]], $stateName, $description
|
|
|
+ ];
|
|
|
+ }
|
|
|
+ $filename = "人才层次变更公布名单导出";
|
|
|
+ if ($rows) {
|
|
|
+ export($columns, $rows, $filename);
|
|
|
+ exit();
|
|
|
+ }
|
|
|
+ echo "<script>parent.layer.alert('没有可以导出的数据');</script>";
|
|
|
+ }
|
|
|
+
|
|
|
+ public function publishExport() {
|
|
|
+ $response = new \stdClass();
|
|
|
+ $response->code = 500;
|
|
|
+
|
|
|
+ $params = $this->request->param();
|
|
|
+ $columns = ["序号", "姓名", "工作单位", "公布入选月份", "本人具备的认定条件", "认定人才层次", "审核状态", "备注"];
|
|
|
+ $startTime = $params["startTime"];
|
|
|
+ $endTime = $params["endTime"];
|
|
|
+ if (!strtotime($startTime) || !strtotime($endTime))
|
|
|
+ return json(["msg" => "时间格式错误"]);
|
|
|
+ $where = [];
|
|
|
+ $where[] = ["ttc.type", "=", $this->user["type"]];
|
|
|
+ $where[] = ["newIdentifyMonth", "between", [$startTime, $endTime]];
|
|
|
+ $list = ttcModel::alias("ttc")->leftJoin("new_talent_condition tc", "ttc.newIdentifyCondition=tc.id")->field("ttc.*,tc.name as identifyConditionZH")->where($where)->order("newIdentifyMonth")->select()->toArray();
|
|
|
+ if (!$list) {
|
|
|
+ $response->msg = "所选时间段内无公布数据";
|
|
|
+ return \StrUtil::back($response, "TalentTypeChange.callBack");
|
|
|
+ }
|
|
|
+ $rows = [];
|
|
|
+ $i = 1;
|
|
|
+ $talentArranges = DictApi::selectByParentCode("talent_arrange");
|
|
|
+ for ($i = 0; $i < count($list); $i++) {
|
|
|
+ $item = $list[$i];
|
|
|
+ $whereLastLog = [];
|
|
|
+ $whereLastLog[] = ["step", "=", 3];
|
|
|
+ $whereLastLog[] = ["state", "<>", 8];
|
|
|
+ $description = $item["description"];
|
|
|
+ $stateName = "";
|
|
|
+ if ($item["checkState"] == MainState::NOTPASS) {
|
|
|
+ $lastLog = TalentLogApi::getLastLogEx($item["id"], ProjectState::LEVELCHANGE, 0, $whereLastLog);
|
|
|
+ if ($lastLog && $lastLog["state"] == MainState::NOTPASS) {
|
|
|
+ $description = $lastLog["description"];
|
|
|
+ }
|
|
|
+ if (\StrUtil::isNotEmpAndNull($item["outMsg"])) {
|
|
|
+ $description = !$item["description"] ? "" : $item["description"] . $item["outMsg"];
|
|
|
+ }
|
|
|
+ $stateName = "审核不通过";
|
|
|
+ }
|
|
|
+ if ($item["checkState"] == MainState::PASS) {
|
|
|
+ $stateName = "审核通过";
|
|
|
+ }
|
|
|
+ $row = [
|
|
|
+ $i + 1, $item["talentName"], $item["enterpriseName"], $item["newIdentifyMonth"], $item["identifyConditionZH"], $talentArranges[$item["newTalentArrange"]], $stateName, $description
|
|
|
+ ];
|
|
|
+ $rows[] = $row;
|
|
|
+ }
|
|
|
+ if ($rows) {
|
|
|
+ $filename = "人才层次变更公布导出";
|
|
|
+ export($columns, $rows, $filename);
|
|
|
+ exit();
|
|
|
+ }
|
|
|
+ $response->msg = "所选时间段内无公示数据";
|
|
|
+ return \StrUtil::back($response, "TalentTypeChange.callBack");
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 撤销公布
|
|
|
+ */
|
|
|
+ public function canclePublish($id) {
|
|
|
+ $response = new \stdClass();
|
|
|
+ $response->code = 500;
|
|
|
+ if (\StrUtil::isEmpOrNull($id)) {
|
|
|
+ $response->msg = "请选择需要撤销公布的数据";
|
|
|
+ return $response;
|
|
|
+ }
|
|
|
+ $info = ttcModel::find($id);
|
|
|
+ if ($info["isPublic"] != 5) {
|
|
|
+ $response->msg = "该数据未处于待发证状态,无法撤销";
|
|
|
+ return $response;
|
|
|
+ }
|
|
|
+ try {
|
|
|
+ $data["id"] = $id;
|
|
|
+ $data["isPublic"] = 4;
|
|
|
+ $data["newIdentifyMonth"] = "";
|
|
|
+ //添加日志
|
|
|
+ $log = [
|
|
|
+ "id" => getStringId(),
|
|
|
+ "type" => ProjectState::LEVELCHANGE,
|
|
|
+ "mainId" => $id,
|
|
|
+ "companyId" => $this->user["companyId"],
|
|
|
+ "active" => 1,
|
|
|
+ "state" => 3,
|
|
|
+ "step" => 55,
|
|
|
+ "stateChange" => "<span class='label label-success'>待发证</span>-><span class='label label-primary'>待公布</span>",
|
|
|
+ "description" => "撤销公布",
|
|
|
+ "createTime" => date("Y-m-d H:i:s"),
|
|
|
+ "createUser" => sprintf("%s(%s)", $this->user["account"], $this->user["companyName"] ?: $this->user["rolename"])
|
|
|
+ ];
|
|
|
+ $res1 = Db::table("new_talent_checklog")->insert($log);
|
|
|
+ $res2 = Db::table("un_talent_type_change")->update($data);
|
|
|
+ if ($res1 && $res2) {
|
|
|
+ Db::commit();
|
|
|
+ $response->code = 200;
|
|
|
+ $response->msg = "撤销公布成功";
|
|
|
+ } else {
|
|
|
+ Db::rollback();
|
|
|
+ $response->msg = "撤销公布失败";
|
|
|
+ }
|
|
|
+ return $response;
|
|
|
+ } catch (\think\db\exception\DbException $e) {
|
|
|
+ Db::rollback();
|
|
|
+ $response->msg = "撤销公布失败:" . $e->getMessage();
|
|
|
+ return $response;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 发证
|
|
|
+ */
|
|
|
+ public function sendCard() {
|
|
|
+ $lockFile = fopen("send_certificate.lock", "a");
|
|
|
+ if (flock($lockFile, LOCK_EX | LOCK_NB)) {//文件锁(独占)
|
|
|
+//查询所有待发放人才码的数据
|
|
|
+ $params = $this->request->param();
|
|
|
+ $ids = array_filter(explode(",", $params["ids"]));
|
|
|
+//晋江市优秀人才证书:当前年份+层次+四位递增数字
|
|
|
+//集成电路优秀人才证书:IC+当前年份+递增四位数,如IC20190001
|
|
|
+ Db::startTrans();
|
|
|
+ $talent_max_no = [];
|
|
|
+ $logList = [];
|
|
|
+ $logList2 = [];
|
|
|
+ $user = $this->user;
|
|
|
+ $_prefix_type = "";
|
|
|
+ $subindex = 5;
|
|
|
+ switch ($user["type"]) {
|
|
|
+ case CommonConst::ENTERPRISE_JC:
|
|
|
+ $_prefix_type = "IC";
|
|
|
+ $subindex += strlen($_prefix_type);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ try {
|
|
|
+ $where = [];
|
|
|
+ $where[] = ["id", "in", $ids];
|
|
|
+ $changeList = ttcModel::where($where)->select()->toArray();
|
|
|
+ $year = date("Y");
|
|
|
+ foreach ($changeList as $change) {
|
|
|
+ if ($change["checkState"] != MainState::PASS || $change["isPublic"] != 5) {
|
|
|
+ Db::rollback();
|
|
|
+ return json(["msg" => "只能对公布通过的对象发放人才码,请核查待发放人才码名单后再重新发放人才码"]);
|
|
|
+ }
|
|
|
+ $no_prefix = $_prefix_type . $year . $change["newTalentArrange"];
|
|
|
+ $where = [];
|
|
|
+ $where[] = ["certificateNo", "like", $no_prefix . "%"];
|
|
|
+ $max_no = $talent_max_no[$change["newTalentArrange"]] ?: Db::table("new_talent_info")->where($where)->max("certificateNo", false);
|
|
|
+ if (!$max_no) {
|
|
|
+ $max_no = $no_prefix . "0001";
|
|
|
+ } else {
|
|
|
+ $new_no = intval(substr($max_no, $subindex)) + 1;
|
|
|
+ $max_no = $no_prefix . str_pad($new_no, 4, "0", STR_PAD_LEFT);
|
|
|
+ }
|
|
|
+ $data["id"] = $change["talentId"];
|
|
|
+ $data["talent_arrange"] = $change["newTalentArrange"];
|
|
|
+ $data["talent_condition"] = $change["newIdentifyCondition"];
|
|
|
+ $data["identifyConditionName"] = $change["newIdentifyConditionName"];
|
|
|
+ $data["source"] = $change["newSource"];
|
|
|
+ $data["source_city"] = $change["newFromCity"];
|
|
|
+ $data["source_county"] = $change["newFromCounty"];
|
|
|
+ $data["annual_salary"] = $change["newAnnualSalary"];
|
|
|
+ $data["import_way"] = $change["newIntroductionMode"];
|
|
|
+ $data["apply_year"] = $change["newYear"];
|
|
|
+ $data["identifyGetTime"] = $change["newIdentifyGetTime"];
|
|
|
+ $data["identifyExpireTime"] = $change["newIdentifyOutTime"];
|
|
|
+ $data["certificateNo"] = $max_no;
|
|
|
+ $data["certificateGetTime"] = $change["newCertificateStartTime"];
|
|
|
+ $data["certificateExpireTime"] = $change["newCertificateOutTime"];
|
|
|
+ $data["identifyMonth"] = $change["newIdentifyMonth"];
|
|
|
+ $data["isEffect"] = 1;
|
|
|
+ Db::table("new_talent_info")->update($data);
|
|
|
+
|
|
|
+ //写入日志
|
|
|
+ $talentLog["id"] = getStringId();
|
|
|
+ $talentLog["active"] = 1;
|
|
|
+ $talentLog["step"] = 20;
|
|
|
+ $talentLog["type"] = ProjectState::TALENT;
|
|
|
+ $talentLog["mainId"] = $change["talentId"];
|
|
|
+ $talentLog["description"] = "人才层次变更通过,同步到人才库";
|
|
|
+ $talentLog["createUser"] = sprintf("%s(%s)", $user["account"], $user["companyName"] ?: $user["rolename"]);
|
|
|
+ $talentLog["createTime"] = date("Y-m-d H:i:s");
|
|
|
+ $logList2[] = $talentLog;
|
|
|
+
|
|
|
+ $updChangeData["id"] = $change["id"];
|
|
|
+ $updChangeData["isPublic"] = 6;
|
|
|
+ $updChangeData["newCertificateNO"] = $max_no;
|
|
|
+ Db::table("un_talent_type_change")->update($updChangeData);
|
|
|
+ //写入日志
|
|
|
+ $log["id"] = getStringId();
|
|
|
+ $log["state"] = 3;
|
|
|
+ $log["type"] = ProjectState::LEVELCHANGE;
|
|
|
+ $log["step"] = 8;
|
|
|
+ $log["mainId"] = $change["id"];
|
|
|
+ $log["companyId"] = $user["companyId"];
|
|
|
+ $log["active"] = 1;
|
|
|
+ $log["stateChange"] = "<span class='label label-success'>待发证</span>-><span class='label label-primary'>已发证</span>";
|
|
|
+ $log["description"] = "人才码为:" . $max_no;
|
|
|
+ $log["createUser"] = sprintf("%s(%s)", $user["account"], $user["companyName"] ?: $user["rolename"]);
|
|
|
+ $log["createTime"] = date("Y-m-d H:i:s");
|
|
|
+ $logList[] = $log;
|
|
|
+ }
|
|
|
+ Db::table("new_talent_checklog")->insertAll($logList2);
|
|
|
+ Db::table("new_talent_checklog")->insertAll($logList);
|
|
|
+ Db::commit();
|
|
|
+ if ($user["type"] == 2) {
|
|
|
+ //办法上只写电路人才,所以暂时只给电路增加基础分
|
|
|
+ $_ids = array_column($changeList, "talentId");
|
|
|
+ for ($i = 0; $i < count($_ids); $i++) {
|
|
|
+ queue("app\job\Talent", ["type" => 4, "id" => $_ids[$i]]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return json(["code" => 200, "msg" => "发放人才码成功"]);
|
|
|
+ } catch (\Exception $e) {
|
|
|
+ Db::rollback();
|
|
|
+ return json(["msg" => "发放人才码失败:" . $e->getMessage()]);
|
|
|
+ }
|
|
|
+ flock($lockFile, LOCK_UN);
|
|
|
+ } else {
|
|
|
+ return json(["msg" => "同一时间只能有一个管理员进行发放人才码操作"]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public function commonExport() {
|
|
|
+ $where = [];
|
|
|
+ $where[] = ["type", "=", $this->user["type"]];
|
|
|
+ $request = $this->request;
|
|
|
+ $talentName = \StrUtil::getRequestDecodeParam($request, "talentName");
|
|
|
+ $idCard = \StrUtil::getRequestDecodeParam($request, "idCard");
|
|
|
+ $enterpriseName = \StrUtil::getRequestDecodeParam($request, "enterpriseName");
|
|
|
+ $oldTalentArrange = \StrUtil::getRequestDecodeParam($request, "oldTalentArrange");
|
|
|
+ $oldIdentifyCondition = \StrUtil::getRequestDecodeParam($request, "oldIdentifyCondition");
|
|
|
+ $newTalentArrange = \StrUtil::getRequestDecodeParam($request, "newTalentArrange");
|
|
|
+ $newIdentifyCondition = \StrUtil::getRequestDecodeParam($request, "newIdentifyCondition");
|
|
|
+ $checkStateStr = \StrUtil::getRequestDecodeParam($request, "checkState");
|
|
|
+ $isPublicStr = \StrUtil::getRequestDecodeParam($request, "isPublic");
|
|
|
+ $process = intval(\StrUtil::getRequestDecodeParam($request, "process"));
|
|
|
+ $oldIdentifyMonth = \StrUtil::getRequestDecodeParam($request, "oldIdentifyMonth");
|
|
|
+ $newIdentifyMonth = \StrUtil::getRequestDecodeParam($request, "newIdentifyMonth");
|
|
|
+ $oldYearStr = \StrUtil::getRequestDecodeParam($request, "oldYear");
|
|
|
+ $newYearStr = \StrUtil::getRequestDecodeParam($request, "newYear");
|
|
|
+ $checkState = null;
|
|
|
+ $isPublic = null;
|
|
|
+ $oldYear = null;
|
|
|
+ $newYear = null;
|
|
|
+ if (\StrUtil::isNotEmpAndNull($checkStateStr)) {
|
|
|
+ $checkState = intval($checkStateStr);
|
|
|
+ }
|
|
|
+ if (\StrUtil::isNotEmpAndNull($isPublicStr)) {
|
|
|
+ $isPublic = intval($isPublicStr);
|
|
|
+ }
|
|
|
+ if (\StrUtil::isNotEmpAndNull($oldYearStr)) {
|
|
|
+ $oldYear = intval($oldYearStr);
|
|
|
+ }
|
|
|
+ if (\StrUtil::isNotEmpAndNull($newYearStr)) {
|
|
|
+ $newYear = intval($newYearStr);
|
|
|
+ }
|
|
|
+ $filters = [
|
|
|
+ "talentName" => $talentName,
|
|
|
+ "idCard" => $idCard,
|
|
|
+ "enterpriseName" => $enterpriseName,
|
|
|
+ "oldTalentArrange" => $oldTalentArrange,
|
|
|
+ "oldIdentifyCondition" => $oldIdentifyCondition,
|
|
|
+ "newTalentArrange" => $newTalentArrange,
|
|
|
+ "newIdentifyCondition" => $newIdentifyCondition,
|
|
|
+ "checkState" => $checkState,
|
|
|
+ "isPublic" => $isPublic,
|
|
|
+ "oldYear" => $oldYear,
|
|
|
+ "newYear" => $newYear,
|
|
|
+ "oldIdentifyMonth" => $oldIdentifyMonth,
|
|
|
+ "newIdentifyMonth" => $newIdentifyMonth,
|
|
|
+ ];
|
|
|
+ $this->setTalentTypeChange($where, $filters);
|
|
|
+ $this->setTypeChangeCheckStateCondition($where, $filters, $process);
|
|
|
+ switch ($process) {
|
|
|
+ case -1:
|
|
|
+ break;
|
|
|
+ case 1:
|
|
|
+ $where[] = ["checkState", "not in", [3, 5]];
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ break;
|
|
|
+ case 3:
|
|
|
+ $where[] = ["checkState", "in", [-1, 35]];
|
|
|
+ break;
|
|
|
+ case 4:
|
|
|
+ $where[] = ["checkState", "in", [-1, 35]];
|
|
|
+ break;
|
|
|
+ case 5:
|
|
|
+ $where[] = ["checkState", "=", 35];
|
|
|
+ $where[] = ["isPublic", "=", 6];
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ $list = ttcModel::where($where)->select()->toArray();
|
|
|
+ $list = $this->translateToChinese($list, $process);
|
|
|
+ $column = [
|
|
|
+ "姓名", "证件号码", "工作单位", "所属街道", "原申报年度", "原申报来源", "原公布入选来源", "原入选来源县市", "原入选名单批次", "原人才层次", "原认定条件", "原认定条件证书取得时间", "原认定条件过期时间", "原认定条件名称",
|
|
|
+ "原泉州高层次人才证书发证日期", "原泉州高层次人才证书的有效期", "原引进方式", "原公布入选月份", "原人才编号", "新申报年度", "新申报来源", "新公布入选来源", "新入选来源县市", "新入选名单批次",
|
|
|
+ "新人才层次", "新认定条件", "新认定条件证书取得时间", "新认定条件过期时间", "新认定条件名称",
|
|
|
+ "新泉州高层次人才证书发证日期", "新泉州高层次人才证书的有效期", "新引进方式", "新公布入选月份", "新人才编号",
|
|
|
+ "审核状态", "公示状态"
|
|
|
+ ];
|
|
|
+ $title = [
|
|
|
+ "talentName", "idCard", "enterpriseName", "streetName", "oldYear", "oldSourceName", "oldOurCitySourceName", "oldFromCityName", "newQzBath", "oldTalentArrangeName", "oldIdentifyConditionCH", "oldIdentifyGetTime", "oldIdentifyOutTime", "oldIdentifyConditionName",
|
|
|
+ "oldCertificateStartTime", "oldCertificateOutTime", "oldIntroductionModeName", "oldIdentifyMonth", "oldCertificateNO", "newYear", "newSourceName", "newOurCitySourceName", "newFromCityName", "newQzBath",
|
|
|
+ "newTalentArrangeName", "newIdentifyConditionCH", "newIdentifyGetTime", "newIdentifyOutTime", "newIdentifyConditionName",
|
|
|
+ "newCertificateStartTime", "newCertificateOutTime", "newIntroductionModeName", "newIdentifyMonth", "newCertificateNO",
|
|
|
+ "checkStateName", "isPublicName"
|
|
|
+ ];
|
|
|
+ $fileName = "人才层次变更导出";
|
|
|
}
|
|
|
|
|
|
private function setTalentTypeChange(&$where, $data) {
|
|
@@ -849,4 +1448,95 @@ class TalentTypeChange extends AdminController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ private function translateToChinese($list, $process) {
|
|
|
+ //获取字典表人才层次
|
|
|
+ $sourceMap = DictApi::selectByParentCode("source");
|
|
|
+ $levelMap = DictApi::selectByParentCode("talent_arrange");
|
|
|
+ $importWayMap = DictApi::selectByParentCode("import_way");
|
|
|
+ $streetMap = DictApi::selectByParentCode("street");
|
|
|
+ $conditions = Db::table("new_talent_condition")->where("type", $this->user["type"])->column("name", "id");
|
|
|
+ $whereEp = [];
|
|
|
+ $whereEp[] = ["id", "in", array_column($list, "enterpriseId")];
|
|
|
+ $enterpriseList = \app\common\model\Enterprise::where($whereEp)->column("street", "id");
|
|
|
+ foreach ($list as &$talentTypeChange) {
|
|
|
+ $talentTypeChange["oldSourceName"] = $sourceMap[$talentTypeChange["oldSource"]] ?: "无";
|
|
|
+ $talentTypeChange["newSourceName"] = $sourceMap[$talentTypeChange["newSource"]] ?: "无";
|
|
|
+ $talentTypeChange["oldTalentArrangeName"] = $levelMap[$talentTypeChange["oldTalentArrange"]];
|
|
|
+ $talentTypeChange["newTalentArrangeName"] = $levelMap[$talentTypeChange["newTalentArrange"]];
|
|
|
+ $talentTypeChange["oldIntroductionModeName"] = $importWayMap[$talentTypeChange["oldIntroductionMode"]];
|
|
|
+ $talentTypeChange["newIntroductionModeName"] = $importWayMap[$talentTypeChange["newIntroductionMode"]];
|
|
|
+ $talentTypeChange["oldIdentifyConditionCH"] = $conditions[$talentTypeChange["oldIdentifyCondition"]];
|
|
|
+ $talentTypeChange["newIdentifyConditionCH"] = $conditions[$talentTypeChange["newIdentifyCondition"]];
|
|
|
+ switch ($talentTypeChange["isPublic"]) {
|
|
|
+ case 1:
|
|
|
+ $talentTypeChange["isPublicName"] = "待核查征信";
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ $talentTypeChange["isPublicName"] = "待公示";
|
|
|
+ break;
|
|
|
+ case 3:
|
|
|
+ $talentTypeChange["isPublicName"] = "公示中";
|
|
|
+ break;
|
|
|
+ case 4:
|
|
|
+ $talentTypeChange["isPublicName"] = "待发布";
|
|
|
+ break;
|
|
|
+ case 5:
|
|
|
+ $talentTypeChange["isPublicName"] = "待发证";
|
|
|
+ break;
|
|
|
+ case 6:
|
|
|
+ $talentTypeChange["isPublicName"] = "已发证";
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ $talentTypeChange["streetName"] = $streetMap[$enterpriseList[$talentTypeChange["enterpriseId"]]];
|
|
|
+ if ($process != null) {
|
|
|
+ switch ($process) {
|
|
|
+ case -1:
|
|
|
+ break;
|
|
|
+ case 1:
|
|
|
+ if ($talentTypeChange["checkState"] == -1) {
|
|
|
+ $talentTypeChange["checkStateName"] = "审核不通过";
|
|
|
+ } else if ($talentTypeChange["checkState"] == 1) {
|
|
|
+ $talentTypeChange["checkStateName"] = "待提交";
|
|
|
+ } else if ($talentTypeChange["checkState"] == 10) {
|
|
|
+ $talentTypeChange["checkStateName"] = "已驳回";
|
|
|
+ } else if ($talentTypeChange["checkState"] == 15 || $talentTypeChange["checkState"] >= 25) {
|
|
|
+ $talentTypeChange["checkStateName"] = "待提交";
|
|
|
+ } else if ($talentTypeChange["checkState"] == 7) {
|
|
|
+ $talentTypeChange["checkStateName"] = ($talentTypeChange["highProcess"] != null && $talentTypeChange["highProcess"] >= 1) ? "重新提交" : "待审核";
|
|
|
+ } else if ($talentTypeChange["checkState"] == 20) {
|
|
|
+ $talentTypeChange["checkStateName"] = ($talentTypeChange["highProcess"] != null && $talentTypeChange["highProcess"] >= 1) ? "上级驳回" : "待审核";
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ if ($talentTypeChange["depState"] == 1)
|
|
|
+ $talentTypeChange["checkStateName"] = "待审核";
|
|
|
+ if ($talentTypeChange["depState"] == 2)
|
|
|
+ $talentTypeChange["checkStateName"] = "已驳回";
|
|
|
+ if ($talentTypeChange["depState"] == 3)
|
|
|
+ $talentTypeChange["checkStateName"] = "已通过";
|
|
|
+ break;
|
|
|
+ case 3:
|
|
|
+ if ($talentTypeChange["checkState"] == -1) {
|
|
|
+ $talentTypeChange["checkStateName"] = "审核不通过";
|
|
|
+ } else if ($talentTypeChange["checkState"] == 25) {
|
|
|
+ $talentTypeChange["checkStateName"] = ($talentTypeChange["highProcess"] != null && $talentTypeChange["highProcess"] >= 3) ? "重新提交" : "待审核";
|
|
|
+ } else if ($talentTypeChange["checkState"] == 30 || $talentTypeChange["checkState"] <= 20) {
|
|
|
+ $talentTypeChange["checkStateName"] = "已驳回";
|
|
|
+ } else if ($talentTypeChange["checkState"] == 35) {
|
|
|
+ $talentTypeChange["checkStateName"] = "已通过";
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case 4:
|
|
|
+ if ($talentTypeChange["checkState"] == -1) {
|
|
|
+ $talentTypeChange["checkStateName"] = "审核不通过";
|
|
|
+ } else if ($talentTypeChange["checkState"] == 35) {
|
|
|
+ $talentTypeChange["checkStateName"] = "已通过";
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }unset($talentTypeChange);
|
|
|
+ return $list;
|
|
|
+ }
|
|
|
+
|
|
|
}
|