Talent.php 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635
  1. <?php
  2. namespace app\admin\controller;
  3. use app\admin\common\AdminController;
  4. use app\common\api\VerifyApi;
  5. use app\common\api\TalentLogApi;
  6. use app\common\api\TalentState;
  7. use app\enterprise\model\Talent as TalentModel;
  8. use app\common\api\TalentConditionApi;
  9. use app\common\api\DictApi;
  10. /**
  11. * Description of Talent
  12. *
  13. * @author sgq
  14. */
  15. class Talent extends AdminController {
  16. public function selectNeedCheckData() {
  17. $params = $this->request->param();
  18. return json(VerifyApi::getPublicList($params));
  19. }
  20. public function common_check() {
  21. $request = $this->request;
  22. $params = $request->param();
  23. $id = $params["id"];
  24. $info = VerifyApi::getTalentInfoById($id);
  25. if ($info["checkState"] == 2) {
  26. return view("talentInfo_base_check", ["info" => $info]);
  27. } else {
  28. return view("talentInfo_common_check", ["info" => $info]);
  29. }
  30. }
  31. public function cancel_verify() {
  32. $params = $this->request->param();
  33. $ids = $params["ids"];
  34. $msg = $params["msg"];
  35. if ($msg == "") {
  36. return json(["msg" => "请填写审核不通过的原因"]);
  37. }
  38. $ids_arr = array_filter(explode(",", $ids));
  39. $counts = 0;
  40. foreach ($ids_arr as $id) {
  41. $ti = VerifyApi::getOne($id);
  42. $data["id"] = $id;
  43. if ($ti["checkState"] == TalentState::FST_SUBMIT) {
  44. $data["checkState"] = TalentState::BASE_VERIFY_FAIL;
  45. TalentLogApi::write(1, $id, TalentState::BASE_VERIFY_FAIL, $msg, 1);
  46. TalentModel::update($data);
  47. $counts++;
  48. } else if ($ti["checkState"] == TalentState::SCND_SAVE) {
  49. $data["checkState"] = TalentState::FST_VERIFY_FAIL;
  50. TalentLogApi::write(1, $id, TalentState::FST_VERIFY_FAIL, $msg, 1);
  51. TalentModel::update($data);
  52. $counts++;
  53. } else {
  54. return json(["msg" => "不在审核范围"]);
  55. }
  56. }
  57. return json(["code" => 200, sprintf("%d个申请已审核失败", $counts)]);
  58. }
  59. public function base_verify() {
  60. return view();
  61. }
  62. public function base_verify_list() {
  63. $request = $this->request;
  64. return json(VerifyApi::getList($request));
  65. }
  66. /**
  67. * 部门初审
  68. * @auth {{/talentInfo/gotoIndex/-1}}
  69. */
  70. public function dept_fst_verify() {
  71. return view();
  72. }
  73. /**
  74. * 初审
  75. * @auth {{/talentInfo/gotoIndex/1}}
  76. */
  77. public function fst_verify() {
  78. return view();
  79. }
  80. /**
  81. * 初审-审核
  82. * @auth {{/talentInfo/firstCheck}}
  83. */
  84. public function fst_check() {
  85. }
  86. /**
  87. * 初审-修改驳回字段
  88. * @auth {{/talentInfo/updateFieldsAndFiles}}
  89. */
  90. public function updateFieldsAndFiles() {
  91. }
  92. /**
  93. * 初审-审核不通过
  94. * @auth {{/talentInfo/setNotPass}}
  95. */
  96. public function dis_pass() {
  97. }
  98. /**
  99. * 部门审核
  100. * @auth {{/talentInfo/gotoIndex/2}}
  101. */
  102. public function dept_verify() {
  103. return view();
  104. }
  105. /**
  106. * 复审
  107. * @auth {{/talentInfo/gotoIndex/3}}
  108. */
  109. public function re_verify() {
  110. return view();
  111. }
  112. /**
  113. * 复审-撤销复核
  114. * @auth {{/talentInfo/cancleThirdCheck}}
  115. */
  116. public function cancel_check() {
  117. }
  118. /**
  119. * 预备人才库
  120. * @auth {{/talentInfo/gotoIndex/4}}
  121. */
  122. public function pre_list() {
  123. return view();
  124. }
  125. /**
  126. * 预备人才库-公示
  127. * @auth {{/talentInfo/preparePublic}}
  128. */
  129. public function pre_public() {
  130. }
  131. /**
  132. * 预备人才库-核查征信
  133. * @auth {{/talentInfo/prepareHczx}}
  134. */
  135. public function pre_hczx() {
  136. }
  137. /**
  138. * 预备人才库-征信通过
  139. * @auth {{/talentInfo/hczxPass}}
  140. */
  141. public function pre_zx_pass() {
  142. }
  143. /**
  144. * 预备人才库-征信失信
  145. * @auth {{/talentInfo/hczxReject}}
  146. */
  147. public function pre_zx_reject() {
  148. }
  149. /**
  150. * 预备人才库-公示再审核
  151. * @auth {{/talentInfo/prepareCheck}}
  152. */
  153. public function pre_check() {
  154. }
  155. /**
  156. * 预备人才库-公示通过
  157. * @auth {{/talentInfo/publicPass}}
  158. */
  159. public function pre_public_pass() {
  160. }
  161. /**
  162. * 预备人才库-公布
  163. * @auth {{/talentInfo/preparePublish}}
  164. */
  165. public function pre_publish() {
  166. }
  167. /**
  168. * 预备人才库-发证
  169. * @auth {{/talentInfo/prepareCertification}}
  170. */
  171. public function pre_certification() {
  172. }
  173. /**
  174. * 预备人才库-撤销公布
  175. * @auth {{/talentInfo/prepareCanclePublish}}
  176. */
  177. public function pre_cancel_publish() {
  178. }
  179. /**
  180. * 预备人才库-公示预览
  181. * @auth {{/talentInfo/publicExportBefore}}
  182. */
  183. public function pre_public_preview() {
  184. }
  185. /**
  186. * 预备人才库-公布预览
  187. * @auth {{/talentInfo/publishExportBefore}}
  188. */
  189. public function pre_publish_preview() {
  190. }
  191. /**
  192. * 基本条件审核-提交未保存
  193. * @param \think\Request $request
  194. * @param type $talent_info
  195. * @return type json
  196. */
  197. private function baseCheck(\think\Request $request, $talent_info) {
  198. $params = $request->param();
  199. if ($params["checkState"] == 3) {
  200. //审核成功
  201. $log_checkState = $checkState = TalentState::BASE_VERIFY_PASS; //初审成功
  202. } else {
  203. //审核驳回并记录需要修改的字段和上传文件
  204. $checkState = TalentState::FST_SAVE; //退回提交材料阶段
  205. $log_checkState = TalentState::BASE_REJECT; //日志记录拒绝状态
  206. }
  207. $log = TalentLogApi::getLastLog($talent_info["id"], 1);
  208. if (!$log)
  209. return json(["msg" => "日志数据异常,保存失败"]);
  210. if ($log["active"] == 0) {
  211. TalentLogApi::rewrite($log["id"], [$log_checkState, $checkState], $params["checkMsg"]);
  212. } else {
  213. TalentLogApi::write(1, $talent_info["id"], [$log_checkState, $checkState], $params["checkMsg"]);
  214. }
  215. $data["id"] = $talent_info["id"];
  216. $data["modify_files"] = $params["files"];
  217. $data["modify_fields"] = $params["fields"];
  218. TalentModel::update($data);
  219. return json(["code" => 200, "msg" => "保存成功"]);
  220. }
  221. /**
  222. * 基本条件审核-提交审核
  223. * @param type $talent_info
  224. * @return type json
  225. */
  226. private function baseSubmitCheck($talent_info) {
  227. return $this->commonSubmitCheck($talent_info, 1);
  228. }
  229. /**
  230. * 初审-提交未保存
  231. * @param \think\Request $request
  232. * @param type $talent_info
  233. * @return type json
  234. */
  235. private function fstCheck(\think\Request $request, $talent_info) {
  236. $params = $request->param();
  237. if ($params["checkState"] == 3) {
  238. //审核成功
  239. $log_checkState = $checkState = TalentState::FST_VERIFY_PASS; //初审成功
  240. } else {
  241. //审核驳回并记录需要修改的字段和上传文件
  242. $checkState = TalentState::SCND_SAVE; //退回材料编辑状态
  243. $log_checkState = TalentState::FST_VERIFY_REJECT; //日志记录拒绝状态
  244. }
  245. $log = TalentLogApi::getLastLog($talent_info["id"], 1);
  246. if (!$log)
  247. return json(["msg" => "日志数据异常,保存失败"]);
  248. if ($log["active"] == 0) {
  249. TalentLogApi::rewrite($log["id"], [$log_checkState, $checkState], $params["checkMsg"]);
  250. } else {
  251. TalentLogApi::write(1, $talent_info["id"], [$log_checkState, $checkState], $params["checkMsg"]);
  252. }
  253. $data["id"] = $talent_info["id"];
  254. $data["modify_files"] = $params["files"];
  255. $data["modify_fields"] = $params["fields"];
  256. TalentModel::update($data);
  257. return json(["code" => 200, "msg" => "保存成功"]);
  258. }
  259. /**
  260. * 初审-提交审核
  261. * @param type $talent_info
  262. * @return type json
  263. */
  264. private function fstSubmitCheck($talent_info) {
  265. $nowProcess = 2;
  266. $log = TalentLogApi::getLastLog($talent_info["id"], 1);
  267. if (!$log || $log["active"] == 1)
  268. return json(["msg" => "日志数据异常,审核失败"]);
  269. if (in_array($log["new_state"], [TalentState::BASE_VERIFY_PASS, TalentState::FST_VERIFY_PASS, TalentState::REVERIFY_PASS])) {
  270. $data["highProcess"] = $nowProcess > $talent_info["highProcess"] ? $nowProcess : $talent_info["highProcess"];
  271. }
  272. $data["id"] = $talent_info["id"];
  273. $data["checkState"] = $log["new_state"];
  274. $data["first_dept_check_time"] = date("Y-m-d H:i:s");
  275. TalentModel::update($data);
  276. TalentLogApi::setActive($log["id"], 1);
  277. $condition = TalentConditionApi::getOne($talent_info["talent_condition"]);
  278. $companyIds = array_filter(explode(",", $condition["companyIds"]));
  279. if ($log["new_state"] == TalentState::FST_VERIFY_PASS) {
  280. TalentLogApi::writeDeptLogs($talent_info["id"], $companyIds, TalentState::FST_VERIFY_PASS);
  281. }
  282. return json(["code" => 200, "msg" => "审核成功"]);
  283. }
  284. /**
  285. * 部门审核-提交未保存
  286. * @param \think\Request $request
  287. * @param type $talent_info
  288. * @return type json
  289. */
  290. private function deptCheck(\think\Request $request, $talent_info, $companys) {
  291. $params = $request->param();
  292. if ($params["checkState"] == 3) {
  293. //审核成功
  294. $log_checkState = TalentState::FST_VERIFY_PASS; //当前状态不变
  295. $checkState = TalentState::DEPT_VERIFY_PASS; //审核成功
  296. } else {
  297. //审核驳回并记录需要修改的字段和上传文件
  298. $checkState = TalentState::SCND_SUBMIT; //退回待初审
  299. $log_checkState = TalentState::FST_VERIFY_PASS; //当前状态不变
  300. }
  301. $fst_dept_check_time = $talent_info["first_dept_check_time"];
  302. $dept_log = TalentLogApi::getLogByCompanyId($talent_info["id"], $this->user["companyId"], $fst_dept_check_time);
  303. if (!$dept_log)
  304. return json(["msg" => "未匹配日志,审核失败"]);
  305. if ($dept_log["active"] == 1)
  306. return json(["msg" => "您的部门已经审核过了"]);
  307. $data["id"] = $talent_info["id"];
  308. $data["modify_files"] = $params["files"];
  309. $data["modify_fields"] = $params["fields"];
  310. TalentModel::update($data);
  311. //修改日志
  312. TalentLogApi::rewrite($dept_log["id"], [$log_checkState, $checkState], $params["checkMsg"]);
  313. return json(["code" => 200, "msg" => "保存成功"]);
  314. }
  315. /**
  316. * 部门审核-提交审核
  317. * @param type $talent_info
  318. * @return type json
  319. */
  320. private function deptSubmitCheck($talent_info, $companys) {
  321. $dept_log = TalentLogApi::getLogByCompanyId($talent_info["id"], $this->user["companyId"], $talent_info["first_dept_check_time"]);
  322. $over = 0; //完成度
  323. $error = 0; //失败数
  324. $nowProcess = 3;
  325. if (!$dept_log)
  326. return json(["msg" => "未匹配日志,审核失败"]);
  327. if ($dept_log["active"] == 1)
  328. return json(["msg" => "您的部门已经审核过了"]);
  329. $over++;
  330. if ($dept_log["new_state"] == TalentState::SCND_SUBMIT) {
  331. $error++;
  332. }
  333. $logs = TalentLogApi::getListLogByTime($talent_info["id"], $talent_info["first_dept_check_time"]);
  334. for ($i = 0; $i < count($logs); $i++) {
  335. $over += $logs[$i]["active"] == 1 ? 1 : 0;
  336. if ($logs["new_state"] == TalentState::SCND_SUBMIT) {
  337. $error++;
  338. }
  339. }
  340. if ($over == count($companys)) {
  341. //全部已审核
  342. $checkState = TalentState::SCND_SUBMIT;
  343. $log_checkState = TalentState::DEPT_VERIFY_REJECT;
  344. if ($error == 0) {
  345. $log_checkState = $checkState = TalentState::DEPT_VERIFY_PASS;
  346. $data["highProcess"] = $nowProcess > $talent_info["highProcess"] ? $nowProcess : $talent_info["highProcess"];
  347. }
  348. $data["id"] = $talent_info["id"];
  349. $data["checkState"] = $checkState;
  350. $data["first_dept_check_time"] = null;
  351. TalentModel::update($data);
  352. TalentLogApi::write(1, $talent_info["id"], [$log_checkState, $checkState], "部门审核结束", 1);
  353. }
  354. TalentLogApi::setActive($dept_log["id"], 1);
  355. return json(["code" => 200, "msg" => "审核成功"]);
  356. }
  357. /**
  358. * 复审-提交未保存
  359. * @param \think\Request $request
  360. * @param type $talent_info
  361. * @param type json
  362. */
  363. private function reCheck(\think\Request $request, $talent_info) {
  364. $params = $request->param();
  365. if ($params["checkState"] == 3) {
  366. //审核成功
  367. $log_checkState = $checkState = TalentState::REVERIFY_PASS; //复核成功
  368. } else if ($params["checkState"] == 2) {
  369. //审核驳回并记录需要修改的字段和上传文件
  370. $checkState = TalentState::SCND_SUBMIT; //退回待初审
  371. $log_checkState = TalentState::REVERIFY_REJECT; //日志记录拒绝状态
  372. } else {
  373. $log_checkState = $checkState = TalentState::REVERIFY_FAIL; //审核失败
  374. }
  375. $log = TalentLogApi::getLastLog($talent_info["id"], 1);
  376. if (!$log)
  377. return json(["msg" => "日志数据异常,保存失败"]);
  378. if ($log["active"] == 0) {
  379. TalentLogApi::rewrite($log["id"], [$log_checkState, $checkState], $params["checkMsg"]);
  380. } else {
  381. TalentLogApi::write(1, $talent_info["id"], [$log_checkState, $checkState], $params["checkMsg"]);
  382. }
  383. $data["id"] = $talent_info["id"];
  384. $data["modify_files"] = $params["files"];
  385. $data["modify_fields"] = $params["fields"];
  386. TalentModel::update($data);
  387. return json(["code" => 200, "msg" => "保存成功"]);
  388. }
  389. /**
  390. * 复审-提交审核
  391. * @param type $talent_info
  392. * @return type json
  393. */
  394. private function reSubmitCheck($talent_info) {
  395. return $this->commonSubmitCheck($talent_info, 4);
  396. }
  397. private function commonSubmitCheck($talent_info, $nowProcess) {
  398. $log = TalentLogApi::getLastLog($talent_info["id"], 1);
  399. if (!$log || $log["active"] == 1)
  400. return json(["msg" => "日志数据异常,审核失败"]);
  401. if (in_array($log["new_state"], [TalentState::BASE_VERIFY_PASS, TalentState::FST_VERIFY_PASS, TalentState::REVERIFY_PASS])) {
  402. $data["highProcess"] = $nowProcess > $talent_info["highProcess"] ? $nowProcess : $talent_info["highProcess"];
  403. }
  404. $data["id"] = $talent_info["id"];
  405. $data["checkState"] = $log["new_state"];
  406. TalentModel::update($data);
  407. TalentLogApi::setActive($log["id"], 1);
  408. return json(["code" => 200, "msg" => "审核成功"]);
  409. }
  410. public function check() {
  411. //公共调度方法
  412. $request = $this->request;
  413. $params = $request->param();
  414. $check = $params["checkState"];
  415. $check_msg = trim($params["checkMsg"]);
  416. $files = $params["files"];
  417. $fields = $params["fields"];
  418. $id = $params["id"];
  419. $talent_info = VerifyApi::getOne($id);
  420. $checkState = $talent_info["checkState"];
  421. if (!$talent_info) {
  422. return json(["msg" => "数据错误"]);
  423. }
  424. if (!$check) {
  425. return json(["msg" => "请选择审核状态"]);
  426. }
  427. if (!$check_msg) {
  428. return json(["msg" => "请填写审核说明"]);
  429. }
  430. if ($checkState == TalentState::FST_SUBMIT) {
  431. return $this->baseCheck($request, $talent_info);
  432. } else if ($checkState == TalentState::SCND_SUBMIT) {
  433. return $this->fstCheck($request, $talent_info);
  434. } else if ($checkState == TalentState::FST_VERIFY_PASS) {
  435. $condition = TalentConditionApi::getOne($talent_info["talent_condition"]);
  436. $companys = array_filter(explode(",", $condition["companyIds"]));
  437. if ($companys) {
  438. if (!in_array($this->user["companyId"], $companys))
  439. return json(["msg" => "你的部门不在并审部门列表"]);
  440. return $this->deptCheck($request, $talent_info, $companys);
  441. } else {
  442. return $this->reCheck($request, $talent_info);
  443. }
  444. } else if ($checkState == TalentState::DEPT_VERIFY_PASS) {
  445. return $this->reCheck($request, $talent_info);
  446. } else {
  447. return json(["msg" => "不在审核范围内,保存失败"]);
  448. }
  449. }
  450. public function submitCheck() {
  451. //公共调度方法
  452. $id = $this->request->param("id");
  453. $talent_info = VerifyApi::getOne($id);
  454. $checkState = $talent_info["checkState"];
  455. if (!$talent_info) {
  456. return json(["msg" => "数据错误"]);
  457. }
  458. if ($checkState == TalentState::FST_SUBMIT) {
  459. return $this->baseSubmitCheck($talent_info);
  460. } else if ($checkState == TalentState::SCND_SUBMIT) {
  461. return $this->fstSubmitCheck($talent_info);
  462. } else if ($checkState == TalentState::FST_VERIFY_PASS) {
  463. $condition = TalentConditionApi::getOne($talent_info["talent_condition"]);
  464. $companys = array_filter(explode(",", $condition["companyIds"]));
  465. if ($companys) {
  466. if (!in_array($this->user["companyId"], $companys))
  467. return json(["msg" => "你的部门不在并审部门列表"]);
  468. return $this->deptSubmitCheck($talent_info, $companys);
  469. } else {
  470. return $this->reSubmitCheck($talent_info);
  471. }
  472. } else if ($checkState == TalentState::DEPT_VERIFY_PASS) {
  473. return $this->reSubmitCheck($talent_info);
  474. } else {
  475. return json(["msg" => "不在审核范围内,审核失败"]);
  476. }
  477. }
  478. public function validateIsCheck() {
  479. $params = $this->request->param();
  480. $id = $params["id"];
  481. $talent_info = VerifyApi::getOne($id);
  482. if ($talent_info) {
  483. $checkState = $talent_info["checkState"];
  484. // 0正在填写 1保存未提交 2已提交未审核 3已审核 4驳回 5保存补充材料未提交 6提交补充材料进入初审 7初审通过 8初审驳回 9部门审核通过 10部门审核驳回 11复核通过 12复核驳回 13复核失败
  485. $process = 0;
  486. if (in_array($checkState, [2, 6, 7, 9])) {
  487. switch ($checkState) {
  488. case 2:
  489. $enterprise = \app\common\model\Enterprise::findOrEmpty($talent_info["enterprise_id"]);
  490. $fields = DictApi::getTalentFields(1);
  491. $field_tmp = [];
  492. foreach ($fields as $key => $field) {
  493. $field_tmp[] = ["key" => $key, "value" => $field];
  494. }
  495. $where[] = ["project", "=", 1];
  496. $where[] = ["step", "=", 1];
  497. $where[] = ["active", "=", 1];
  498. $where[] = ["type", "=", $enterprise["type"]];
  499. $files = \think\facade\Db::table("new_common_filetype")->where($where)->select();
  500. $process = 1;
  501. break;
  502. case 6:
  503. $process = 2;
  504. break;
  505. case 7:
  506. $fields = DictApi::getTalentFields(3);
  507. $process = 3;
  508. break;
  509. case 9:
  510. $fields = DictApi::getTalentFields(3);
  511. $process = 4;
  512. break;
  513. }
  514. if ($checkState != 2) {
  515. $enterprise = \app\common\model\Enterprise::findOrEmpty($talent_info["enterprise_id"]);
  516. $fields = DictApi::getTalentFields(2);
  517. $field_tmp = [];
  518. foreach ($fields as $key => $field) {
  519. $field_tmp[] = ["key" => $key, "value" => $field];
  520. }
  521. $where = [];
  522. $whr = [];
  523. $condition = TalentConditionApi::getOne($talent_info["talent_condition"]);
  524. $where[] = ["project", "=", 1];
  525. $where[] = ["step", "=", 2];
  526. $where[] = ["active", "=", 1];
  527. $where[] = ["type", "=", $enterprise["type"]];
  528. if ($condition && $condition["bindFileTypes"]) {
  529. $whr[] = ["id", "in", explode(",", $condition["bindFileTypes"])];
  530. $files = \think\facade\Db::table("new_common_filetype")->whereOr([$where, $whr])->select();
  531. } else {
  532. $files = \think\facade\Db::table("new_common_filetype")->where($where)->select();
  533. }
  534. }
  535. $talent_info["files"] = array_filter(explode(",", $talent_info["modify_files"]));
  536. $talent_info["fields"] = array_filter(explode(",", $talent_info["modify_fields"]));
  537. return json(["code" => 200, "obj" => ["process" => $process, "talentInfo" => $talent_info, "fieldList" => $field_tmp, "fileList" => $files]]);
  538. } else {
  539. return json(["msg" => "该申报不在审核范围内,无法审核"]);
  540. }
  541. }
  542. }
  543. public function findFieldsAndFiles() {
  544. }
  545. public function commonExport() {
  546. $params = $this->request->param();
  547. $fields = $params["export"];
  548. if (!$fields)
  549. return json(["msg" => "请选择要导出的数据"]);
  550. $names = DictApi::getTalentFields(3);
  551. $names["industryFieldNew"] = "产业领域";
  552. $names["enterpriseName"] = "单位名称";
  553. $names["enterpriseTag"] = "单位标签";
  554. $names["street"] = "所属镇街";
  555. $names["checkState"] = "审核状态";
  556. $list = VerifyApi::getExportDatas($fields);
  557. foreach ($fields as $field) {
  558. $columns[] = $names[$field];
  559. }
  560. $datas = [];
  561. for ($i = 0; $i < count($list); $i++) {
  562. $data = [];
  563. for ($n = 0; $n < count($fields); $n++) {
  564. $data[] = $list[$i][$fields[$n]];
  565. }
  566. $datas[] = $data;
  567. }
  568. if ($datas) {
  569. export($columns, $datas);
  570. }
  571. }
  572. }