|
@@ -48,6 +48,175 @@ class Talent extends EnterpriseController {
|
|
|
return json($res);
|
|
|
}
|
|
|
|
|
|
+ public function export() {
|
|
|
+ $request = $this->request->param();
|
|
|
+ $name = trim($request["name"]);
|
|
|
+ $idCard = trim($request["card_number"]);
|
|
|
+ $sex = trim($request["sex"]);
|
|
|
+ $nation = trim($request["nation"]);
|
|
|
+ $nationality = trim($request["nationality"]);
|
|
|
+ $talentArrange = trim($request["talent_arrange"]);
|
|
|
+ $checkState = trim($request["checkState"]);
|
|
|
+ $type = $this->user["type"];
|
|
|
+ $where = [];
|
|
|
+ $where[] = ["delete", "=", 0];
|
|
|
+ $where[] = ["enterprise_id", "=", $this->user["uid"]];
|
|
|
+ $where[] = ["checkState", "not in", [TalentState::BASE_REVERIFY_REJECT, TalentState::BASE_REVERIFY_FAIL, TalentState::BASE_VERIFY_FAIL]];
|
|
|
+ switch ($checkState) {
|
|
|
+ case -1:
|
|
|
+ $where[] = ["checkState", "in", [TalentState::FST_VERIFY_FAIL, TalentState::REVERIFY_FAIL, TalentState::ZX_FAIL, TalentState::ANNOUNCED_REVERIFY_FAIL, TalentState::PUBLISH_FAIL]];
|
|
|
+ break;
|
|
|
+ case 1:
|
|
|
+ $where[] = ["checkState", "in", [TalentState::SCND_SAVE, TalentState::FST_SAVE]];
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ $where[] = ["checkState", "in", [TalentState::BASE_REJECT, TalentState::FST_VERIFY_REJECT, TalentState::DEPT_VERIFY_REJECT, TalentState::REVERIFY_REJECT]];
|
|
|
+ break;
|
|
|
+ case 3:
|
|
|
+ $where[] = ["checkState", "in", [TalentState::FST_SUBMIT, TalentState::SCND_SUBMIT, TalentState::BASE_VERIFY_PASS, TalentState::FST_VERIFY_PASS, TalentState::DEPT_VERIFY_PASS, TalentState::REVERIFY_PASS, TalentState::ZX_PASS,
|
|
|
+ TalentState::ANNOUNCED_REVERIFY_PASS, TalentState::PUBLISH_PASS]];
|
|
|
+ break;
|
|
|
+ case 4:
|
|
|
+ $where[] = ["checkState", "=", TalentState::CERTIFICATED];
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ if ($name) {
|
|
|
+ $where[] = ["name", "like", "%" . $name . "%"];
|
|
|
+ }
|
|
|
+ if ($idCard) {
|
|
|
+ $where[] = ["card_number", "like", "%" . $idCard . "%"];
|
|
|
+ }
|
|
|
+ if ($sex) {
|
|
|
+ $where[] = ["sex", "=", $sex];
|
|
|
+ }
|
|
|
+ if ($nation) {
|
|
|
+ $where[] = ["nation", "=", $nation];
|
|
|
+ }
|
|
|
+ if ($nationality) {
|
|
|
+ $where[] = ["nationality", "=", $nationality];
|
|
|
+ }
|
|
|
+ if ($talentArrange) {
|
|
|
+ $where[] = ["talent_arrange", "=", $talentArrange];
|
|
|
+ }
|
|
|
+ $list = TalentModel::where($where)->order("createTime " . $order)->select()->toArray();
|
|
|
+ $talentTagList = DictApi::selectByParentCode("enterprise_tag"); //单位标签
|
|
|
+ $talentArangeList = DictApi::selectByParentCode("talent_arrange"); //人才层次
|
|
|
+ $industries = DictApi::selectByParentCode("industry_field"); //产业
|
|
|
+ $enterprise = \app\common\model\Enterprise::find(session("user")["uid"]);
|
|
|
+ $conditions = TalentConditionApi::getKvList([]);
|
|
|
+ $rows = [];
|
|
|
+ foreach ($list as $key => $item) {
|
|
|
+ $last_log = TalentLogApi::getLastLog($item["id"], 1, 0, ["active", "=", 1]);
|
|
|
+ $checkStateStr = "";
|
|
|
+ if ($last_log["state"] != $item["checkState"]) {
|
|
|
+ switch ($last_log["state"]) {
|
|
|
+ case 4:
|
|
|
+ $checkStateStr = "总院驳回";
|
|
|
+ break;
|
|
|
+ case 6:
|
|
|
+ $checkStateStr = "基础信息复审驳回";
|
|
|
+ break;
|
|
|
+ case 11:
|
|
|
+ $checkStateStr = "初审驳回";
|
|
|
+ break;
|
|
|
+ case 13:
|
|
|
+ $checkStateStr = "部门驳回";
|
|
|
+ break;
|
|
|
+ case 15:
|
|
|
+ $checkStateStr = "复审驳回";
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ switch ($item["checkState"]) {
|
|
|
+ case - 2:
|
|
|
+ $checkStateStr = "初审失败";
|
|
|
+ break;
|
|
|
+ case - 1:
|
|
|
+ $checkStateStr = "基础信息审核失败";
|
|
|
+ break;
|
|
|
+ case 7:
|
|
|
+ $checkStateStr = "基础信息复审失败";
|
|
|
+ break;
|
|
|
+ case 1:
|
|
|
+ $checkStateStr = "保存未提交";
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ if ($last_log["state"] == 4) {
|
|
|
+ $checkStateStr = "待审核(重新提交)";
|
|
|
+ }
|
|
|
+ $checkStateStr = "待审核";
|
|
|
+ break;
|
|
|
+ case 3:
|
|
|
+ $checkStateStr = "待基础条件复审";
|
|
|
+ break;
|
|
|
+ case 5:
|
|
|
+ $checkStateStr = "待详细填报";
|
|
|
+ break;
|
|
|
+ case 8:
|
|
|
+ $checkStateStr = "保存未提交";
|
|
|
+ break;
|
|
|
+ case 9:
|
|
|
+ if ($last_log["last_state"] == 11) {
|
|
|
+ $checkStateStr = "待初审(重新提交)";
|
|
|
+ }
|
|
|
+ $checkStateStr = "待初审";
|
|
|
+ break;
|
|
|
+ case 10:
|
|
|
+ if ($item["companyIds"]) {
|
|
|
+ $checkStateStr = "待部门审核";
|
|
|
+ } else {
|
|
|
+ $checkStateStr = "待复审";
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case 12:
|
|
|
+ $checkStateStr = "待复审";
|
|
|
+ break;
|
|
|
+ case 14:
|
|
|
+ $checkStateStr = "复审通过待核查征信";
|
|
|
+ break;
|
|
|
+ case 16:
|
|
|
+ $checkStateStr = "复审失败";
|
|
|
+ break;
|
|
|
+ case 21:
|
|
|
+ $checkStateStr = "征信通过";
|
|
|
+ break;
|
|
|
+ case 22:
|
|
|
+ $checkStateStr = "征信不通过";
|
|
|
+ break;
|
|
|
+ case 23:
|
|
|
+ $checkStateStr = "公示待审核";
|
|
|
+ break;
|
|
|
+ case 24:
|
|
|
+ $checkStateStr = "待公布审核";
|
|
|
+ break;
|
|
|
+ case 25:
|
|
|
+ $checkStateStr = "公示审核不通过";
|
|
|
+ break;
|
|
|
+ case 26:
|
|
|
+ $checkStateStr = "公布通过";
|
|
|
+ break;
|
|
|
+ case 27:
|
|
|
+ $checkStateStr = "公布不通过";
|
|
|
+ break;
|
|
|
+ case 28:
|
|
|
+ $checkStateStr = "已发放人才码";
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ $rows[] = [
|
|
|
+ $item["apply_year"], $item["name"], isset($talentArangeList[$item["talent_arrange"]]) ? $talentArangeList[$item["talent_arrange"]] : "", $item["card_number"], $conditions[$item["talent_condition"]], $checkStateStr
|
|
|
+ ];
|
|
|
+ }
|
|
|
+ $columns = ["申报年度", "姓名", "人才层次", "证件号码", "认定条件", "审核状态"];
|
|
|
+ $filename = "申报人才基础信息导出";
|
|
|
+ if ($rows) {
|
|
|
+ export($columns, $rows, $filename);
|
|
|
+ exit();
|
|
|
+ }
|
|
|
+ echo "<script>parent.layer.alert('没有可以导出的数据');</script>";
|
|
|
+ }
|
|
|
+
|
|
|
public function zrIndex() {
|
|
|
return view();
|
|
|
}
|