JjhcController.php 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293
  1. <?php
  2. namespace App\Http\Controllers\Web\Talent;
  3. use App\Http\Controllers\Web\WebBaseController;
  4. use App\Models\RecruitAppointSelect;
  5. use App\Models\RecruitPost;
  6. use App\Models\RecruitTicket;
  7. use App\Services\Common\SmsService;
  8. use Illuminate\Support\Facades\Cache;
  9. use PhpOffice\PhpSpreadsheet\Spreadsheet;
  10. use PhpOffice\PhpSpreadsheet\IOFactory;
  11. use PhpOffice\PhpSpreadsheet\Cell\DataType;
  12. use PhpOffice\PhpWord\IOFactory as WordIOFactory;
  13. use PhpOffice\PhpWord\Settings;
  14. use PhpOffice\PhpWord\TemplateProcessor;
  15. use Illuminate\Support\Facades\DB;
  16. use App\Exceptions\ResponseException;
  17. use Illuminate\Http\Request;
  18. use App\Services\Common\BaiduService;
  19. class JjhcController extends WebBaseController
  20. {
  21. private $smsService;
  22. public function __construct(SmsService $smsService)
  23. {
  24. $this->smsService = $smsService;
  25. }
  26. public function yqfk()
  27. {
  28. return view("app.talent.jjhc.yqfk");
  29. }
  30. public function chaxun(Request $request)
  31. {
  32. $data = array('msg'=>'查无此用户!','status' => 0);
  33. return response()->json($data);
  34. $info = DB::connection('fangyi')->table('fillinfo')
  35. ->where(['lxdh'=>$request->tel])->first();
  36. if($info){
  37. $data = array('status'=>1,'msg'=>'查到已存在数据!','info'=>$info);
  38. }else{
  39. $data = array('msg'=>'查无此用户!','status' => 0);
  40. }
  41. return response()->json($data);
  42. }
  43. public function test(Request $request)
  44. {
  45. $keyword = $request->input('keyword');
  46. if($keyword != "j0vOW5mBREZxdo3P"){
  47. throw new ResponseException("who are you?", [], 404);
  48. }
  49. $str = "202201012011516
  50. 202201012010129
  51. 202201012011708
  52. 202201012010229
  53. 202201012010511
  54. 202201012010212
  55. 202201012013802
  56. 202201012012804
  57. 202201012010411
  58. 202201012011916
  59. 202201012010324
  60. 202201012013518
  61. 202201012010818
  62. 202201012012801
  63. 202201012011729
  64. 202201012014126
  65. 202201012012116
  66. 202201012014614
  67. 202201012011616
  68. 202201012011017
  69. 202201012014618
  70. 202201012014309
  71. 202201012010708
  72. 202201012014612
  73. 202201012010419
  74. 202201012012625
  75. 202201012011025
  76. 202201012012018
  77. 202201012011503
  78. 202201012013701
  79. 202201012014317
  80. 202201012011109
  81. 202201012013418
  82. 202201012014723
  83. 202201012012521
  84. 202201012013530
  85. 202201012013720
  86. 202201012012321
  87. 202201012010315
  88. 202201012012405
  89. 202201012014503
  90. 202201012012313
  91. 202201012014730
  92. 202201012011113
  93. 202201012011203
  94. 202201012010902
  95. 202201012013318
  96. 202201012012019
  97. 202201012012004
  98. 202201012010728
  99. 202201012010809
  100. 202201012014916
  101. 202201012014218
  102. 202201012012328
  103. 202201012010203
  104. 202201012013926
  105. 202201012014701
  106. 202201012013413
  107. 202201012012630
  108. 202201012014111
  109. 202201012013509
  110. 202201012014625
  111. 202201012012901
  112. 202201012010925
  113. 202201012012604
  114. 202201012014515
  115. 202201012010119
  116. 202201012014629
  117. 202201012012530
  118. 202201012013003
  119. 202201012012211
  120. 202201012011507
  121. 202201012011701
  122. 202201012011730
  123. 202201012011905
  124. 202201012011415
  125. 202201012015025
  126. 202201012014113
  127. 202201012013712
  128. 202201012011228
  129. 202201012014127
  130. 202201012014215
  131. 202201012010823
  132. 202201012010209
  133. 202201012012219
  134. 202201012012612
  135. 202201012011818
  136. 202201012012622
  137. 202201012013227
  138. 202201012013127
  139. 202201012013706
  140. 202201012010808
  141. 202201012011607
  142. 202201012013104
  143. 202201012013214
  144. 202201012012029
  145. 202201012013611
  146. 202201012010605
  147. 202201012013407
  148. 202201012012519
  149. 202201012015026
  150. 202201012010819
  151. 202201012014721
  152. 202201012013005
  153. 202201012013901
  154. 202201012014926
  155. 202201012012203
  156. 202201012012416
  157. 202201012012618
  158. 202201012010920
  159. 202201012013426
  160. 202201012011711
  161. 202201012012508
  162. 202201012011919
  163. 202201012010214
  164. 202201012011318
  165. 202201012010524
  166. 202201012013816
  167. 202201012014424
  168. 202201012014607
  169. 202201012011926
  170. 202201012012620
  171. 202201012011404
  172. 202201012012012
  173. 202201012010801
  174. 202201012014803
  175. 202201012012217
  176. 202201012013911
  177. 202201012014102
  178. 202201012010225
  179. 202201012011427
  180. 202201012012210
  181. 202201012011322
  182. 202201012013305
  183. 202201012014314
  184. 202201012011012
  185. 202201012010713
  186. 202201012012629
  187. 202201012011702
  188. 202201012011225
  189. 202201012011309
  190. 202201012011014
  191. 202201012013219
  192. 202201012010929
  193. 202201012010115
  194. 202201012014402
  195. 202201012013520
  196. 202201012014711
  197. 202201012010917
  198. 202201012010903
  199. 202201012013607
  200. 202201012011016
  201. 202201012013015
  202. 202201012010516
  203. 202201012011011
  204. 202201012010924
  205. 202201012013008
  206. 202201012011222
  207. 202201012011713
  208. 202201012013908
  209. 202201012011126
  210. 202201012010410
  211. 202201012014414
  212. 202201012013619
  213. 202201012011422
  214. 202201012010506
  215. 202201012014012
  216. 202201012011724
  217. 202201012014702
  218. 202201012010615
  219. 202201012013630
  220. 202201012012714
  221. 202201012012427
  222. 202201012014227
  223. 202201012012510
  224. 202201012013514
  225. 202201012013522
  226. 202201012010709
  227. 202201012010720
  228. 202201012011403
  229. 202201012013810
  230. 202201012012514
  231. 202201012010718
  232. 202201012011512
  233. 202201012011301
  234. 202201012010730
  235. 202201012010326
  236. 202201012014313
  237. 202201012010127
  238. 202201012013625
  239. 202201012013814
  240. 202201012013915
  241. 202201012011227
  242. 202201012013512
  243. 202201012013309
  244. 202201012011922
  245. 202201012014019
  246. 202201012012726
  247. 202201012011320
  248. 202201012011015
  249. 202201012011913
  250. 202201012013012
  251. 202201012012208
  252. 202201012010919
  253. 202201012010522
  254. 202201012012606
  255. 202201012012206
  256. 202201012013715
  257. 202201012011429
  258. 202201012011305
  259. 202201012012614
  260. 202201012011828
  261. 202201012012602
  262. 202201012014525
  263. 202201012011217
  264. 202201012012915
  265. 202201012014528
  266. 202201012012501
  267. 202201012011220
  268. 202201012013824
  269. 202201012012015
  270. 202201012014024
  271. 202201012014213
  272. 202201012012409
  273. 202201012013618
  274. 202201012013705
  275. 202201012013913
  276. 202201012010208
  277. 202201012013714
  278. 202201012012817
  279. 202201012011409
  280. 202201012015108
  281. 202201012013306
  282. 202201012010428
  283. 202201012011620
  284. 202201012012202
  285. 202201012013710
  286. 202201012013408
  287. 202201012012011
  288. 202201012012511
  289. 202201012015019
  290. 202201012010328
  291. 202201012014216
  292. 202201012012415
  293. 202201012010109
  294. 202201012013529
  295. 202201012011130
  296. 202201012012125
  297. 202201012011211
  298. 202201012010813
  299. 202201012014129
  300. 202201012014805
  301. 202201012014917
  302. 202201012013628
  303. 202201012011824
  304. 202201012011510
  305. 202201012013506
  306. 202201012010112
  307. 202201012010223
  308. 202201012011105
  309. 202201012012310
  310. 202201012010916
  311. 202201012014505
  312. 202201012014508
  313. 202201012013325
  314. 202201012011005
  315. 202201012012928
  316. 202201012013919
  317. 202201012010122
  318. 202201012012220
  319. 202201012010308
  320. 202201012010519
  321. 202201012011602
  322. 202201012012827
  323. 202201012011423
  324. 202201012012722
  325. 202201012010317
  326. 202201012010124
  327. 202201012013007
  328. 202201012011621
  329. 202201012010305
  330. 202201012010826
  331. 202201012010211
  332. 202201012013212
  333. 202201012011714
  334. 202201012015115
  335. 202201012011408
  336. 202201012010102
  337. 202201012011722
  338. 202201012013803
  339. 202201012013412
  340. 202201012012522
  341. 202201012011721
  342. 202201012010613
  343. 202201012012129
  344. 202201012013216
  345. 202201012014526
  346. 202201012011608
  347. 202201012010621
  348. 202201012013709
  349. 202201012010113
  350. 202201012013921
  351. 202201012012115
  352. 202201012011328
  353. 202201012013808
  354. 202201012010907
  355. 202201012013902
  356. 202201012014324
  357. 202201012013019
  358. 202201012011615
  359. 202201012011906
  360. 202201012011108
  361. 202201012012317
  362. 202201012011718
  363. 202201012012728
  364. 202201012012315
  365. 202201012013801
  366. 202201012011303
  367. 202201012010423
  368. 202201012010128
  369. 202201012011230
  370. 202201012013302
  371. 202201012010307
  372. 202201012011716
  373. 202201012012421
  374. 202201012012716
  375. 202201012014130
  376. 202201012012829
  377. 202201012012925
  378. 202201012012112
  379. 202201012011618
  380. 202201012013228
  381. 202201012012330
  382. 202201012013327
  383. 202201012012426
  384. 202201012010412
  385. 202201012010505
  386. 202201012011925
  387. 202201012013117
  388. 202201012012711
  389. 202201012012105
  390. 202201012014305
  391. 202201012011419
  392. 202201012013728
  393. 202201012011402
  394. 202201012010729
  395. 202201012014413
  396. 202201012013601
  397. 202201012014422
  398. 202201012010403
  399. 202201012015109
  400. 202201012011827
  401. 202201012011521
  402. 202201012012102
  403. 202201012012226
  404. 202201012014123
  405. 202201012010323
  406. 202201012015029
  407. 202201012013704
  408. 202201012012826
  409. 202201012011418
  410. 202201012014029
  411. 202201012014104
  412. 202201012013120
  413. 202201012013819
  414. 202201012011514
  415. 202201012013920
  416. 202201012014527
  417. 202201012015021
  418. 202201012010301
  419. 202201012014303
  420. 202201012013527
  421. 202201012014122
  422. 202201012012615
  423. 202201012012014
  424. 202201012014109
  425. 202201012014230
  426. 202201012011028
  427. 202201012013021
  428. 202201012011216
  429. 202201012014623
  430. 202201012012425
  431. 202201012012619
  432. 202201012012126
  433. 202201012013330
  434. 202201012012020
  435. 202201012013612
  436. 202201012013220
  437. 202201012011501
  438. 202201012013304
  439. 202201012014223
  440. 202201012010616
  441. 202201012010817
  442. 202201012010407
  443. 202201012012828
  444. 202201012014322
  445. 202201012012025
  446. 202201012010607
  447. 202201012011201
  448. 202201012013605
  449. 202201012012708
  450. 202201012012808
  451. 202201012014719
  452. 202201012014504
  453. 202201012010219
  454. 202201012015101
  455. 202201012010430
  456. 202201012011821
  457. 202201012011007
  458. 202201012010706
  459. 202201012012221
  460. 202201012014722
  461. 202201012011312
  462. 202201012010909
  463. 202201012013606
  464. 202201012010629
  465. 202201012012130
  466. 202201012013719
  467. 202201012010427
  468. 202201012014105
  469. 202201012011314
  470. 202201012014329
  471. 202201012012929
  472. 202201012011705
  473. 202201012010404
  474. 202201012010530
  475. 202201012011013
  476. 202201012012701
  477. 202201012014819
  478. 202201012013102
  479. 202201012011125
  480. 202201012013602
  481. 202201012014405
  482. 202201012010416
  483. 202201012012504
  484. 202201012013504
  485. 202201012012523
  486. 202201012010126
  487. 202201012012812
  488. 202201012014417
  489. 202201012012204
  490. 202201012011304
  491. 202201012013415
  492. 202201012013004
  493. 202201012011528
  494. 202201012013918
  495. 202201012012616
  496. 202201012011218
  497. 202201012013621
  498. 202201012011810
  499. 202201012011119
  500. 202201012012706
  501. 202201012015120
  502. 202201012015010
  503. 202201012013608
  504. 202201012012905
  505. 202201012010727
  506. 202201012010429
  507. 202201012015103
  508. 202201012014018
  509. 202201012011122
  510. 202201012015110
  511. 202201012012723
  512. 202201012011806
  513. 202201012010425
  514. 202201012013507
  515. 202201012011912
  516. 202201012013416
  517. 202201012013524
  518. 202201012010316
  519. 202201012010906
  520. 202201012011610
  521. 202201012012502
  522. 202201012012717
  523. 202201012014206
  524. 202201012010510
  525. 202201012011612
  526. 202201012015113
  527. 202201012014220
  528. 202201012014810
  529. 202201012011425
  530. 202201012012429";
  531. $record_str = "83.9
  532. 82.1
  533. 81.7
  534. 81.5
  535. 81.4
  536. 80.4
  537. 79.3
  538. 79
  539. 78.8
  540. 78.4
  541. 78
  542. 77.8
  543. 77.1
  544. 76.9
  545. 76.7
  546. 76.6
  547. 76.5
  548. 76.4
  549. 76.2
  550. 76.1
  551. 76
  552. 75.9
  553. 75.8
  554. 75.8
  555. 75.7
  556. 75.4
  557. 75.2
  558. 75.1
  559. 75
  560. 74.9
  561. 74.8
  562. 74.2
  563. 74.1
  564. 73.9
  565. 73.8
  566. 73.8
  567. 73.8
  568. 73.7
  569. 73.5
  570. 73.3
  571. 73.1
  572. 73
  573. 73
  574. 72.7
  575. 72.7
  576. 72.6
  577. 72.5
  578. 72.5
  579. 72.4
  580. 72.3
  581. 72.3
  582. 72.2
  583. 72.2
  584. 72.2
  585. 72.1
  586. 71.9
  587. 71.9
  588. 71.9
  589. 71.8
  590. 71.1
  591. 71.1
  592. 71
  593. 71
  594. 71
  595. 70.9
  596. 70.9
  597. 70.8
  598. 70.6
  599. 70.6
  600. 70.5
  601. 70.4
  602. 70.4
  603. 70.3
  604. 70.3
  605. 70.2
  606. 70.2
  607. 70.1
  608. 70.1
  609. 70.1
  610. 69.9
  611. 69.6
  612. 69.5
  613. 69.4
  614. 69.3
  615. 69.3
  616. 69.2
  617. 69.2
  618. 69.1
  619. 69.1
  620. 69
  621. 69
  622. 69
  623. 68.9
  624. 68.9
  625. 68.9
  626. 68.8
  627. 68.7
  628. 68.6
  629. 68.6
  630. 68.5
  631. 68.5
  632. 68.5
  633. 68.5
  634. 68.4
  635. 68.4
  636. 68.3
  637. 68.3
  638. 68.3
  639. 68.2
  640. 68.1
  641. 68
  642. 68
  643. 67.9
  644. 67.9
  645. 67.8
  646. 67.6
  647. 67.5
  648. 67.5
  649. 67.1
  650. 67.1
  651. 67.1
  652. 67
  653. 67
  654. 66.9
  655. 66.9
  656. 66.9
  657. 66.7
  658. 66.7
  659. 66.6
  660. 66.6
  661. 66.6
  662. 66.5
  663. 66.5
  664. 66.5
  665. 66.5
  666. 66.4
  667. 66.4
  668. 66.3
  669. 66.3
  670. 66.3
  671. 66.3
  672. 66.2
  673. 66.2
  674. 66.2
  675. 66.1
  676. 66.1
  677. 66
  678. 66
  679. 65.8
  680. 65.7
  681. 65.6
  682. 65.5
  683. 65.5
  684. 65.3
  685. 65.1
  686. 65.1
  687. 65
  688. 65
  689. 65
  690. 65
  691. 64.9
  692. 64.9
  693. 64.8
  694. 64.8
  695. 64.8
  696. 64.7
  697. 64.5
  698. 64.5
  699. 64.4
  700. 64.3
  701. 64.3
  702. 64.3
  703. 64.3
  704. 64.2
  705. 64.1
  706. 64.1
  707. 64.1
  708. 64.1
  709. 64.1
  710. 64.1
  711. 64
  712. 63.9
  713. 63.9
  714. 63.8
  715. 63.8
  716. 63.8
  717. 63.8
  718. 63.8
  719. 63.7
  720. 63.7
  721. 63.7
  722. 63.7
  723. 63.6
  724. 63.5
  725. 63.5
  726. 63.5
  727. 63.4
  728. 63.4
  729. 63.4
  730. 63.3
  731. 63.3
  732. 63.2
  733. 63.2
  734. 63.2
  735. 63.1
  736. 63.1
  737. 63.1
  738. 63.1
  739. 63.1
  740. 63
  741. 62.9
  742. 62.9
  743. 62.8
  744. 62.8
  745. 62.8
  746. 62.8
  747. 62.7
  748. 62.7
  749. 62.6
  750. 62.6
  751. 62.5
  752. 62.5
  753. 62.5
  754. 62.5
  755. 62.4
  756. 62.3
  757. 62.3
  758. 62.2
  759. 62.2
  760. 62.2
  761. 62.2
  762. 62.1
  763. 62.1
  764. 62.1
  765. 62
  766. 62
  767. 62
  768. 62
  769. 61.9
  770. 61.9
  771. 61.9
  772. 61.9
  773. 61.9
  774. 61.9
  775. 61.8
  776. 61.8
  777. 61.8
  778. 61.8
  779. 61.8
  780. 61.8
  781. 61.7
  782. 61.7
  783. 61.6
  784. 61.6
  785. 61.6
  786. 61.5
  787. 61.5
  788. 61.5
  789. 61.5
  790. 61.4
  791. 61.4
  792. 61.4
  793. 61.3
  794. 61.3
  795. 61.3
  796. 61.3
  797. 61.3
  798. 61.2
  799. 61.2
  800. 61.2
  801. 61.2
  802. 61.1
  803. 61
  804. 61
  805. 61
  806. 60.9
  807. 60.9
  808. 60.8
  809. 60.7
  810. 60.7
  811. 60.7
  812. 60.7
  813. 60.6
  814. 60.6
  815. 60.6
  816. 60.6
  817. 60.6
  818. 60.5
  819. 60.5
  820. 60.5
  821. 60.5
  822. 60.4
  823. 60.4
  824. 60.3
  825. 60.3
  826. 60.3
  827. 60.2
  828. 60.1
  829. 60.1
  830. 60.1
  831. 60
  832. 59.9
  833. 59.9
  834. 59.9
  835. 59.9
  836. 59.9
  837. 59.9
  838. 59.9
  839. 59.8
  840. 59.8
  841. 59.8
  842. 59.7
  843. 59.6
  844. 59.5
  845. 59.5
  846. 59.5
  847. 59.5
  848. 59.5
  849. 59.4
  850. 59.3
  851. 59.3
  852. 59.2
  853. 59.1
  854. 59.1
  855. 59.1
  856. 58.8
  857. 58.8
  858. 58.8
  859. 58.8
  860. 58.7
  861. 58.7
  862. 58.7
  863. 58.7
  864. 58.7
  865. 58.7
  866. 58.6
  867. 58.6
  868. 58.6
  869. 58.5
  870. 58.5
  871. 58.4
  872. 58.4
  873. 58.4
  874. 58.3
  875. 58.3
  876. 58.2
  877. 58.1
  878. 58.1
  879. 58
  880. 58
  881. 57.9
  882. 57.9
  883. 57.8
  884. 57.8
  885. 57.8
  886. 57.7
  887. 57.7
  888. 57.6
  889. 57.5
  890. 57.5
  891. 57.5
  892. 57.4
  893. 57.4
  894. 57.4
  895. 57.4
  896. 57.3
  897. 57.3
  898. 57.3
  899. 57.3
  900. 57.3
  901. 57.3
  902. 57.2
  903. 57.2
  904. 57.1
  905. 57
  906. 57
  907. 57
  908. 56.9
  909. 56.9
  910. 56.9
  911. 56.9
  912. 56.9
  913. 56.8
  914. 56.8
  915. 56.8
  916. 56.7
  917. 56.7
  918. 56.7
  919. 56.7
  920. 56.6
  921. 56.6
  922. 56.5
  923. 56.5
  924. 56.5
  925. 56.5
  926. 56.5
  927. 56.4
  928. 56.3
  929. 56.3
  930. 56.3
  931. 56.3
  932. 56.3
  933. 56.3
  934. 56.2
  935. 56.1
  936. 56.1
  937. 56.1
  938. 56
  939. 56
  940. 55.9
  941. 55.9
  942. 55.9
  943. 55.8
  944. 55.8
  945. 55.7
  946. 55.6
  947. 55.6
  948. 55.6
  949. 55.6
  950. 55.5
  951. 55.5
  952. 55.5
  953. 55.4
  954. 55.4
  955. 55.4
  956. 55.3
  957. 55.2
  958. 55.2
  959. 55.2
  960. 55.1
  961. 55.1
  962. 55.1
  963. 55.1
  964. 55
  965. 55
  966. 54.9
  967. 54.8
  968. 54.8
  969. 54.8
  970. 54.7
  971. 54.7
  972. 54.7
  973. 54.7
  974. 54.6
  975. 54.6
  976. 54.5
  977. 54.5
  978. 54.5
  979. 54.5
  980. 54.5
  981. 54.4
  982. 54.4
  983. 54.4
  984. 54.3
  985. 54.3
  986. 54.3
  987. 54.2
  988. 54.2
  989. 54.1
  990. 54
  991. 54
  992. 54
  993. 54
  994. 54
  995. 54
  996. 53.9
  997. 53.9
  998. 53.9
  999. 53.8
  1000. 53.8
  1001. 53.8
  1002. 53.7
  1003. 53.6
  1004. 53.6
  1005. 53.6
  1006. 53.6
  1007. 53.5
  1008. 53.5
  1009. 53.4
  1010. 53.4
  1011. 53.4
  1012. 53.4";
  1013. $arr = explode("\r\n",$str);
  1014. $record = explode("\r\n",$record_str);
  1015. $list = DB::table("Recruit_ticket as a")->leftJoin("recruit_appoint_info as b","a.appoint_id",'=','b.id')->where("a.ex_number","in",$arr)->get();
  1016. foreach ($list as $k => $v){
  1017. $data = [];
  1018. $data = [
  1019. 'batch' => 1,
  1020. 'appoint_id' => $v->appoint_id,
  1021. 'recruit_id' => $v->recruit_id,
  1022. 'uid' => $v->uid,
  1023. 'record' => $record[$k],
  1024. 'status' => 0,
  1025. 'result' => null,
  1026. 'select_result' => null
  1027. ];
  1028. RecruitAppointSelect::create($data);
  1029. }
  1030. $redis = Cache::getRedis();
  1031. $quota = [
  1032. [
  1033. 'name' => '青阳街道',
  1034. 'value' => 29,
  1035. ],
  1036. [
  1037. 'name' => '梅岭街道',
  1038. 'value' => 41
  1039. ],
  1040. [
  1041. 'name' => '西园街道',
  1042. 'value' => 16
  1043. ],
  1044. [
  1045. 'name' => '罗山街道',
  1046. 'value' => 30
  1047. ],
  1048. [
  1049. 'name' => '灵源街道',
  1050. 'value' => 18
  1051. ],
  1052. [
  1053. 'name' => '新塘街道',
  1054. 'value' => 29
  1055. ],
  1056. [
  1057. 'name' => '陈埭镇',
  1058. 'value' => 112
  1059. ],
  1060. [
  1061. 'name' => '池店镇',
  1062. 'value' => 80
  1063. ],
  1064. [
  1065. 'name' => '安海镇',
  1066. 'value' => 86
  1067. ],
  1068. [
  1069. 'name' => '磁灶镇',
  1070. 'value' => 46
  1071. ],
  1072. [
  1073. 'name' => '内坑镇',
  1074. 'value' => 38
  1075. ],
  1076. [
  1077. 'name' => '紫帽镇',
  1078. 'value' => 9
  1079. ],
  1080. [
  1081. 'name' => '东石镇',
  1082. 'value' => 29
  1083. ],
  1084. [
  1085. 'name' => '永和镇',
  1086. 'value' => 43
  1087. ],
  1088. [
  1089. 'name' => '英林镇',
  1090. 'value' => 25
  1091. ],
  1092. [
  1093. 'name' => '金井镇',
  1094. 'value' => 28
  1095. ],
  1096. [
  1097. 'name' => '龙湖镇',
  1098. 'value' => 63
  1099. ],
  1100. [
  1101. 'name' => '深沪镇',
  1102. 'value' => 29
  1103. ],
  1104. [
  1105. 'name' => '西滨镇',
  1106. 'value' => 9
  1107. ]
  1108. ];
  1109. $redis->set('recruit_quota',json_encode($quota));
  1110. dd($arr);
  1111. // $option_list = [
  1112. // '青阳街道','梅岭街道','西园街道','罗山街道','灵源街道','新塘街道','陈埭镇','池店镇','安海镇','磁灶镇','内坑镇','紫帽镇','东石镇','永和镇','英林镇','金井镇','龙湖镇','深沪镇','西滨镇'
  1113. // ];
  1114. // $list = DB::table("recruit_appoint_info")->where('recruit_id',18)->where('audit',3)->where('pen_audit',1)->where('post_id',309)->get();
  1115. // foreach ($list as $k => $v){
  1116. // $uid = $v->uid;
  1117. // $recruit_id = 18;
  1118. // $appoint_id = $v->id;
  1119. //// $info = RecruitAppointSelect::where('uid',$uid)->where('recruit_id',$recruit_id)->where('appoint_id',$appoint_id)->first();
  1120. //// if($info){
  1121. //// return ['status' => 0, 'msg' => "测试数据重复,请重新点击生成测试数据!"];
  1122. //// }
  1123. // $data = [
  1124. // 'recruit_id' => $recruit_id,
  1125. // 'appoint_id' => $appoint_id,
  1126. // 'uid' => $uid,
  1127. // 'status' => 1,
  1128. // 'record' => mt_rand(50.0,100)
  1129. // ];
  1130. // shuffle($option_list);
  1131. // $select = array_slice($option_list,0,rand(1,19));
  1132. // $result = [];
  1133. // if(is_array($select) && count($select) > 0){
  1134. // foreach ($select as $v) {
  1135. // array_push($result,$v);
  1136. // }
  1137. // }
  1138. // $data['result'] = json_encode($result);
  1139. // RecruitAppointSelect::create($data);
  1140. //
  1141. // }
  1142. // for ($room = 1;$room <= 78; $room++){
  1143. // $list = DB::table("recruit_ticket")->leftJoin("recruit_appoint_info","recruit_ticket.appoint_id",'=','recruit_appoint_info.id')->where("recruit_ticket.ex_start",'2022-08-05 08:00:00')->where('recruit_ticket.ex_room',$room)->orderBy('ex_seat','ASC')->get()->toArray();
  1144. //
  1145. // $objPHPExcel = IOFactory::load(base_path() . "/public/cunwu.xlsx");
  1146. // $sheet = $objPHPExcel->getActiveSheet();
  1147. // $row = 4;
  1148. // $sheet->setCellValue('A1', "晋江市公开招聘第十三批村务(社区)专职工作者笔试参考情况一览表(第".intval($room)."考场)");
  1149. //
  1150. // foreach ($list as $k => $v){
  1151. // $sheet->setCellValueByColumnAndRow('1',$row, $v->ex_seat);
  1152. // $sheet->setCellValueByColumnAndRow('2',$row, $v->realname);
  1153. // $sheet->setCellValueExplicitByColumnAndRow('3',$row, $v->ex_number,DataType::TYPE_STRING);
  1154. // $row++;
  1155. // }
  1156. //
  1157. // $writer = IOFactory::createWriter($objPHPExcel, 'Xlsx');
  1158. // $writer->save(base_path() . "/public/excel/cunwu{$room}.xlsx");
  1159. // }
  1160. // for ($room = 1;$room <= 78; $room++){
  1161. // $word = new TemplateProcessor(base_path() . "/public/cunwu1.docx");
  1162. // $word->setValue('room', $room);
  1163. // if($room<10){
  1164. // $room = sprintf('%02s', $room);
  1165. // }
  1166. // $list = DB::table("recruit_ticket")->leftJoin("recruit_appoint_info","recruit_ticket.appoint_id",'=','recruit_appoint_info.id')->where("recruit_ticket.ex_start",'2022-08-05 08:00:00')->where('recruit_ticket.ex_room',$room)->orderBy('ex_seat','ASC')->get()->toArray();
  1167. // $rows = count($list);//总行数
  1168. // $word->cloneRow('id', $rows);//复制行
  1169. // for ($i = 0; $i < $rows; $i++) {
  1170. // $word->setValue("id#" . ($i + 1), $i + 1);//替换变量
  1171. // $word->setValue("realname#" . ($i + 1), $list[$i]->realname);
  1172. // $word->setValue("ex_number#" . ($i + 1), $list[$i]->ex_number);
  1173. // }
  1174. // $word->saveAs(base_path() ."/public/excel/cunwu_{$room}.docx");//另存为
  1175. // }
  1176. // $spreadsheet = new Spreadsheet();
  1177. // $sheet = $spreadsheet->getActiveSheet();
  1178. // $header = ['姓名','身份证','准考证','报考岗位'];
  1179. // foreach ($header as $key => $value) {
  1180. // $sheet->setCellValueByColumnAndRow($key+1, 1, $value);
  1181. // }
  1182. // $row = 2;
  1183. // $sheet->getStyle('S')->getNumberFormat()->setFormatCode('0');
  1184. // $list = DB::table("recruit_ticket")->leftJoin("recruit_appoint_info","recruit_ticket.appoint_id",'=','recruit_appoint_info.id')->where("recruit_appoint_info.recruit_id",'16')->orderBy('recruit_appoint_info.post_id','ASC')->orderBy('recruit_appoint_info.id','ASC')->get()->toArray();
  1185. // $post_data = RecruitPost::where('recruit_id',16)->where('status',1)->selectRaw('id, CONCAT(code," ",name) as post')->pluck('post', 'id');
  1186. // foreach ($list as $k => $v){
  1187. // $sheet->setCellValueByColumnAndRow('1',$row, $v->realname);
  1188. // $sheet->setCellValueExplicitByColumnAndRow('2',$row, $v->card,DataType::TYPE_STRING);
  1189. // $sheet->setCellValueExplicitByColumnAndRow('3',$row, $v->ex_number,DataType::TYPE_STRING);
  1190. // $sheet->setCellValueByColumnAndRow('4',$row, $post_data[$v->post_id]);
  1191. // $row++;
  1192. // }
  1193. // header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
  1194. // header('Content-Disposition: attachment;filename="'.time().'.xlsx"');
  1195. // header('Cache-Control: max-age=0');
  1196. // // If you're serving to IE 9, then the following may be needed
  1197. // header('Cache-Control: max-age=1');
  1198. // // If you're serving to IE over SSL, then the following may be needed
  1199. // header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); // Date in the past
  1200. // header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); // always modified
  1201. // header('Cache-Control: cache, must-revalidate'); // HTTP/1.1
  1202. // header('Pragma: public'); // HTTP/1.0
  1203. // $writer = IOFactory::createWriter($spreadsheet, 'Xlsx');
  1204. // $writer->save('php://output');
  1205. echo "success";
  1206. // $list = DB::table('lt_apppointment')->distinct()->pluck('card')->toArray();
  1207. // $all = DB::table('lt_apppointment')->pluck('card')->toArray();
  1208. // $all = array_count_values($all);
  1209. // $time = time();
  1210. // $data = [
  1211. // 'idCards' => $list,
  1212. // 'sign' => strtoupper(md5("timestr={$time}&key=rsKVyec52fqEKpk4RRD2TU8fKvPxt6ombKg0qSq1velPQtBHVi")),
  1213. // 'timeStr' => $time,
  1214. // ];
  1215. // $data_string = json_encode($data);
  1216. // $ch = curl_init ();
  1217. // curl_setopt( $ch, CURLOPT_URL, "http://rc.jucai.gov.cn/api/dataInterface/findTalentInfoByIdCards" );
  1218. // curl_setopt($ch, CURLOPT_HTTPHEADER, array(
  1219. // 'Content-Type: application/json',
  1220. // 'Content-Length: ' . strlen($data_string))
  1221. // );
  1222. // curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4); //若果报错 name lookup timed out 报错时添加这一行代码
  1223. // curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );
  1224. // curl_setopt( $ch, CURLOPT_TIMEOUT,60);
  1225. // curl_setopt( $ch, CURLOPT_SSL_VERIFYHOST, 0);
  1226. // curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, 0);
  1227. // curl_setopt( $ch, CURLOPT_POST, 1);
  1228. // curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
  1229. // $result = curl_exec ( $ch );
  1230. // curl_close ( $ch );
  1231. // $ret = json_decode($result,true);
  1232. // $res = [];
  1233. // if(count($ret['obj']) > 0){
  1234. // foreach ($ret['obj'] as $k => $v){
  1235. // if(array_key_exists($v['street'],$res)){
  1236. // $res[$v['street']]['number']++;
  1237. // $res[$v['street']]['count'] += $all[$v['idCard']];
  1238. // }else{
  1239. // $res[$v['street']] = [
  1240. // 'number' => 1,
  1241. // 'count' => $all[$v['idCard']]
  1242. // ];
  1243. // }
  1244. // }
  1245. // }
  1246. //
  1247. // $spreadsheet = new Spreadsheet();
  1248. // $sheet = $spreadsheet->getActiveSheet();
  1249. // $header = ['镇街','使用人数','使用次数'];
  1250. // foreach ($header as $key => $value) {
  1251. // $sheet->setCellValueByColumnAndRow($key+1, 1, $value);
  1252. // }
  1253. // $row = 2;
  1254. // foreach ($res as $k => $v){
  1255. // $sheet->setCellValueByColumnAndRow(1, $row, $k);
  1256. // $sheet->setCellValueByColumnAndRow(2, $row, $v['number']);
  1257. // $sheet->setCellValueByColumnAndRow(3, $row, $v['count']);
  1258. // $row++;
  1259. // }
  1260. // $file_name = date("Y-m-d",time()) . '码上服务数据';
  1261. // header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
  1262. // header('Content-Disposition: attachment;filename="'.$file_name.'.xlsx"');
  1263. // header('Cache-Control: max-age=0');
  1264. // // If you're serving to IE 9, then the following may be needed
  1265. // header('Cache-Control: max-age=1');
  1266. // // If you're serving to IE over SSL, then the following may be needed
  1267. // header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); // Date in the past
  1268. // header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); // always modified
  1269. // header('Cache-Control: cache, must-revalidate'); // HTTP/1.1
  1270. // header('Pragma: public'); // HTTP/1.0
  1271. // $writer = IOFactory::createWriter($spreadsheet, 'Xlsx');
  1272. // $writer->save('php://output');
  1273. //
  1274. // //dd($res);
  1275. }
  1276. }