JjhcController.php 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456
  1. <?php
  2. namespace App\Http\Controllers\Web\Talent;
  3. libxml_disable_entity_loader(false);
  4. use App\Http\Controllers\Web\WebBaseController;
  5. use App\Models\RecruitAppointInfo;
  6. use App\Models\RecruitAppointSelect;
  7. use App\Models\RecruitPost;
  8. use App\Models\RecruitTicket;
  9. use App\Services\Common\SmsService;
  10. use Illuminate\Support\Facades\Cache;
  11. use PhpOffice\PhpSpreadsheet\Spreadsheet;
  12. use PhpOffice\PhpSpreadsheet\IOFactory;
  13. use PhpOffice\PhpSpreadsheet\Cell\DataType;
  14. use PhpOffice\PhpWord\IOFactory as WordIOFactory;
  15. use PhpOffice\PhpWord\Settings;
  16. use PhpOffice\PhpWord\TemplateProcessor;
  17. use Illuminate\Support\Facades\DB;
  18. use App\Exceptions\ResponseException;
  19. use Illuminate\Http\Request;
  20. use App\Services\Common\BaiduService;
  21. class JjhcController extends WebBaseController
  22. {
  23. private $smsService;
  24. public function __construct(SmsService $smsService)
  25. {
  26. $this->smsService = $smsService;
  27. }
  28. public function yqfk()
  29. {
  30. return view("app.talent.jjhc.yqfk");
  31. }
  32. public function chaxun(Request $request)
  33. {
  34. $data = array('msg'=>'查无此用户!','status' => 0);
  35. return response()->json($data);
  36. $info = DB::connection('fangyi')->table('fillinfo')
  37. ->where(['lxdh'=>$request->tel])->first();
  38. if($info){
  39. $data = array('status'=>1,'msg'=>'查到已存在数据!','info'=>$info);
  40. }else{
  41. $data = array('msg'=>'查无此用户!','status' => 0);
  42. }
  43. return response()->json($data);
  44. }
  45. public function getGuid(){
  46. $redis = Cache::getRedis();
  47. $guid = $redis->get('sjhj_guid');
  48. if(!$guid){
  49. $client = new \SoapClient("http://222.77.0.158:8090/Convergence/webservice/ConvergenceService?wsdl");
  50. // 组织参数 根据接口具体提供参数组织对应参数
  51. $param = [
  52. 'userid'=>'jjswzzb_cxz',
  53. 'password'=>'Cxz@1234'
  54. ];
  55. $guid =$client->LoginByAccount ($param);
  56. $redis->set('sjhj_guid',$guid->return);
  57. $redis->expire('sjhj_guid',1800);
  58. return $guid->return;
  59. }
  60. return $guid;
  61. }
  62. public function push(){
  63. ini_set('display_errors',1);
  64. error_reporting(E_ALL);
  65. $guid = $this->getGuid();
  66. $index = 0;
  67. for ($i = 1;$i<=5;$i++){
  68. $list = DB::connection('report_system')->table("un_talent_info")->offset($index)->limit(500)->get();
  69. if($list && count($list) > 0){
  70. $str = '<?xml version="1.0" encoding="UTF-8"?><table>';
  71. $template = '<row type="add">
  72. <id name="主键" isattachment="false"><![CDATA[%s]]></id>
  73. <enterpriseid name="企业id" isattachment="false"><![CDATA[%s]]></enterpriseid>
  74. <year name="申报年度" isattachment="false"><![CDATA[%s]]></year>
  75. <type name="人才类型" isattachment="false"><![CDATA[%s]]></type>
  76. <source name="来源" isattachment="false"><![CDATA[%s]]></source>
  77. <ourcitysource name="是否我市" isattachment="false"><![CDATA[%s]]></ourcitysource>
  78. <talenttype name="申报人才类型" isattachment="false"><![CDATA[%s]]></talenttype>
  79. <cardtype name="证件类型" isattachment="false"><![CDATA[%s]]></cardtype>
  80. <idcard name="证件号码" isattachment="false"><![CDATA[%s]]></idcard>
  81. <name name="姓名" isattachment="false"><![CDATA[%s]]></name>
  82. <photo name="头像" isattachment="false"><![CDATA[%s]]></photo>
  83. <sex name="性别" isattachment="false"><![CDATA[%s]]></sex>
  84. <nation name="民族" isattachment="false"><![CDATA[%s]]></nation>
  85. <nationality name="国籍" isattachment="false"><![CDATA[%s]]></nationality>
  86. <provincename name="籍贯省名称" isattachment="false"><![CDATA[%s]]></provincename>
  87. <cityname name="籍贯市名称" isattachment="false"><![CDATA[%s]]></cityname>
  88. <countyname name="籍贯县名称" isattachment="false"><![CDATA[%s]]></countyname>
  89. <birthday name="出生日期" isattachment="false"><![CDATA[%s]]></birthday>
  90. <address name="现居地址" isattachment="false"><![CDATA[%s]]></address>
  91. <politics name="政治面貌" isattachment="false"><![CDATA[%s]]></politics>
  92. <higheducation name="最高学历" isattachment="false"><![CDATA[%s]]></higheducation>
  93. <graduateschool name="毕业学校" isattachment="false"><![CDATA[%s]]></graduateschool>
  94. <major name="专业" isattachment="false"><![CDATA[%s]]></major>
  95. <post name="职务" isattachment="false"><![CDATA[%s]]></post>
  96. <phone name="手机号码" isattachment="false"><![CDATA[%s]]></phone>
  97. <email name="电子邮箱" isattachment="false"><![CDATA[%s]]></email>
  98. <bank name="开户银行" isattachment="false"><![CDATA[%s]]></bank>
  99. <banknetwork name="开户银行网点" isattachment="false"><![CDATA[%s]]></banknetwork>
  100. <bankaccount name="银行账号" isattachment="false"><![CDATA[%s]]></bankaccount>
  101. <banknumber name="银行行号" isattachment="false"><![CDATA[%s]]></banknumber>
  102. <entrytime name="入职时间" isattachment="false"><![CDATA[%s]]></entrytime>
  103. <starttime name="工作合同开始时间" isattachment="false"><![CDATA[%s]]></starttime>
  104. <endtime name="工作合同结束时间" isattachment="false"><![CDATA[%s]]></endtime>
  105. <talentarrange name="人才层次" isattachment="false"><![CDATA[%s]]></talentarrange>
  106. <identifycondition name="认定条件" isattachment="false"><![CDATA[%s]]></identifycondition>
  107. <identifygettime name="认定条件获得时间" isattachment="false"><![CDATA[%s]]></identifygettime>
  108. <identifyconditionname name="认定条件名称" isattachment="false"><![CDATA[%s]]></identifyconditionname>
  109. <identifymonth name="认定月份" isattachment="false"><![CDATA[%s]]></identifymonth>
  110. <certificateno name="证书编号" isattachment="false"><![CDATA[%s]]></certificateno>
  111. <lettertime name="行政介绍信时间" isattachment="false"><![CDATA[%s]]></lettertime>
  112. <gygb name="是否为我市本级国有股比超过50%%" isattachment="false"><![CDATA[%s]]></gygb>
  113. <certificatestarttime name="人才证书开始时间" isattachment="false"><![CDATA[%s]]></certificatestarttime>
  114. <qzgccrcactivetime name="人才证书的有效期" isattachment="false"><![CDATA[%s]]></qzgccrcactivetime>
  115. <mainhonours name="主要业绩及取得的荣誉" isattachment="false"><![CDATA[%s]]></mainhonours>
  116. <educationandresume name="教育背景及工作简历" isattachment="false"><![CDATA[%s]]></educationandresume>
  117. <firstinjjtime name="首次来晋工作时间" isattachment="false"><![CDATA[%s]]></firstinjjtime>
  118. <isintroduction name="是否引进" isattachment="false"><![CDATA[%s]]></isintroduction>
  119. <introductionmode name="引进方式" isattachment="false"><![CDATA[%s]]></introductionmode>
  120. <industryfield name="行业领域" isattachment="false"><![CDATA[%s]]></industryfield>
  121. <title name="职称" isattachment="false"><![CDATA[%s]]></title>
  122. <professionalqualifications name="国家职业资格" isattachment="false"><![CDATA[%s]]></professionalqualifications>
  123. <studyabroad name="是否有留学经历" isattachment="false"><![CDATA[%s]]></studyabroad>
  124. <studyabroadcountry name="留学国家" isattachment="false"><![CDATA[%s]]></studyabroadcountry>
  125. <fromcity name="来源县市" isattachment="false"><![CDATA[%s]]></fromcity>
  126. <qzbatch name="入选泉州高层次人才批次" isattachment="false"><![CDATA[%s]]></qzbatch>
  127. <breakfaith name="曾被相关部门列为失信人员" isattachment="false"><![CDATA[%s]]></breakfaith>
  128. </row>';
  129. foreach ($list as $k => $v){
  130. $item_str = sprintf($template,$v->id,$v->enterpriseId,$v->year,$v->type,$v->source,$v->ourCitySource,$v->talentType,$v->cardType,$v->idCard
  131. ,$v->name,$v->photo,$v->sex,$v->nation,$v->nationality,$v->provinceName,$v->cityName,$v->countyName,$v->birthday
  132. ,$v->address,$v->politics,$v->highEducation,$v->graduateSchool,$v->major,$v->post,$v->phone,$v->email,$v->bank
  133. ,$v->bankNetwork,$v->bankAccount,$v->bankNumber,$v->entryTime,$v->startTime,$v->endTime,$v->talentArrange,$v->identifyCondition,$v->identifyGetTime
  134. ,$v->identifyConditionName,$v->identifyMonth,$v->certificateNO,$v->letterTime,$v->gygb,$v->certificateStartTime,$v->qzgccrcActiveTime,$v->mainHonours,$v->educationAndResume
  135. ,$v->firstInJJTime,$v->isIntroduction,$v->introductionMode,$v->industryField,$v->title,$v->professionalQualifications,$v->studyAbroad,$v->studyAbroadCountry,$v->fromCity
  136. ,$v->qzBatch,$v->breakFaith);
  137. // dd($item_str);
  138. $str .= $item_str;
  139. }
  140. $str .= '</table>';
  141. try{
  142. $client = new \SoapClient('http://61.131.47.134:8756/Convergence/webservice/ConvergenceService?wsdl');
  143. // 组织参数 根据接口具体提供参数组织对应参数
  144. $param = [
  145. 'guid'=>$guid,
  146. 'catalogid'=>'WEB2448',
  147. 'xmlstr' => $str
  148. ];
  149. $res = $client->pushXml($param);
  150. echo $res->return;
  151. } catch (\Exception $e){
  152. dd($e->getMessage());
  153. }
  154. }
  155. $index += 500;
  156. }
  157. echo $index;
  158. }
  159. public function test(Request $request)
  160. {
  161. $keyword = $request->input('keyword');
  162. if($keyword != "j0vOW5mBREZxdo3P"){
  163. throw new ResponseException("who are you?", [], 404);
  164. }
  165. // $redis = Cache::getRedis();
  166. // $quota = $redis->get('recruit_quota');
  167. // if(!$quota){
  168. // $quota = [
  169. // [
  170. // 'name' => '新塘街道',
  171. // 'value' => 13
  172. // ],
  173. // [
  174. // 'name' => '陈埭镇',
  175. // 'value' => 88
  176. // ],
  177. // [
  178. // 'name' => '池店镇',
  179. // 'value' => 10
  180. // ],
  181. // [
  182. // 'name' => '安海镇',
  183. // 'value' => 10
  184. // ],
  185. // [
  186. // 'name' => '磁灶镇',
  187. // 'value' => 21
  188. // ],
  189. // [
  190. // 'name' => '内坑镇',
  191. // 'value' => 22
  192. // ],
  193. // [
  194. // 'name' => '东石镇',
  195. // 'value' => 4
  196. // ],
  197. // [
  198. // 'name' => '永和镇',
  199. // 'value' => 27
  200. // ],
  201. // [
  202. // 'name' => '英林镇',
  203. // 'value' => 5
  204. // ],
  205. // [
  206. // 'name' => '金井镇',
  207. // 'value' => 13
  208. // ],
  209. // [
  210. // 'name' => '龙湖镇',
  211. // 'value' => 53
  212. // ],
  213. // [
  214. // 'name' => '深沪镇',
  215. // 'value' => 23
  216. // ],
  217. // [
  218. // 'name' => '西滨镇',
  219. // 'value' => 3
  220. // ]
  221. // ];
  222. // $redis->set('recruit_quota',json_encode($quota));
  223. // }else{
  224. // $quota = json_decode($quota,true);
  225. // }
  226. // $list = DB::table('recruit_appoint_select as a')->leftJoin('recruit_appoint_info as b','a.appoint_id','=','b.id')->leftJoin('recruit_ticket as c','a.appoint_id','=','c.appoint_id')->whereRaw('a.select_result is null and a.result is not null and a.status = 1')->select(['b.realname','c.ex_number','a.result','a.select_result','a.id'])->orderBy('record','desc')->get();
  227. //
  228. // $array_column = array_column($quota,'name');
  229. // foreach ($list as $k => $v){
  230. // $person_select_result = json_decode($v->result,true);
  231. // foreach ($person_select_result as $val){
  232. // //寻找下标
  233. // $index = array_search($val,$array_column);
  234. // if($quota[$index]['value'] > 0){
  235. // $quota_data = [
  236. // 'index' => $index,
  237. // 'old_value' => $quota[$index]['value']
  238. // ];
  239. // //有名额允许择岗
  240. // DB::table('recruit_appoint_select')->where('id',$v->id)->update(['select_result'=>$val,'status' => 1]);
  241. // $v->select_result = $val;
  242. // $quota[$index]['value']--;
  243. // $quota_data['new_value'] = $quota[$index]['value'];
  244. // break;
  245. // }
  246. // }
  247. //
  248. //
  249. // }
  250. // $option_list = [
  251. // '青阳街道','梅岭街道','西园街道','罗山街道','灵源街道','新塘街道','陈埭镇','池店镇','安海镇','磁灶镇','内坑镇','紫帽镇','东石镇','永和镇','英林镇','金井镇','龙湖镇','深沪镇','西滨镇'
  252. // ];
  253. // $list = DB::table("recruit_appoint_info")->where('recruit_id',18)->where('audit',3)->where('pen_audit',1)->where('post_id',309)->get();
  254. // foreach ($list as $k => $v){
  255. // $uid = $v->uid;
  256. // $recruit_id = 18;
  257. // $appoint_id = $v->id;
  258. //// $info = RecruitAppointSelect::where('uid',$uid)->where('recruit_id',$recruit_id)->where('appoint_id',$appoint_id)->first();
  259. //// if($info){
  260. //// return ['status' => 0, 'msg' => "测试数据重复,请重新点击生成测试数据!"];
  261. //// }
  262. // $data = [
  263. // 'recruit_id' => $recruit_id,
  264. // 'appoint_id' => $appoint_id,
  265. // 'uid' => $uid,
  266. // 'status' => 1,
  267. // 'record' => mt_rand(50.0,100)
  268. // ];
  269. // shuffle($option_list);
  270. // $select = array_slice($option_list,0,rand(1,19));
  271. // $result = [];
  272. // if(is_array($select) && count($select) > 0){
  273. // foreach ($select as $v) {
  274. // array_push($result,$v);
  275. // }
  276. // }
  277. // $data['result'] = json_encode($result);
  278. // RecruitAppointSelect::create($data);
  279. //
  280. // }
  281. $redis = Cache::getRedis();
  282. $redis->set('recruit_quota',false);
  283. // $list = DB::table("recruit_temp")->get();
  284. // foreach ($list as $k => $v){
  285. // $appoint_info = RecruitAppointInfo::where('card',$v->f3)->where('recruit_id',18)->first();
  286. // $data = [
  287. // 'batch' => 2,
  288. // 'appoint_id' => $appoint_info->id,
  289. // 'recruit_id' => 18,
  290. // 'uid' => $appoint_info->uid,
  291. // 'record' => $v->f6,
  292. // 'status' => 0
  293. // ];
  294. //
  295. // RecruitAppointSelect::create($data);
  296. // }
  297. // for ($room = 1;$room <= 78; $room++){
  298. // $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();
  299. //
  300. // $objPHPExcel = IOFactory::load(base_path() . "/public/cunwu.xlsx");
  301. // $sheet = $objPHPExcel->getActiveSheet();
  302. // $row = 4;
  303. // $sheet->setCellValue('A1', "晋江市公开招聘第十三批村务(社区)专职工作者笔试参考情况一览表(第".intval($room)."考场)");
  304. //
  305. // foreach ($list as $k => $v){
  306. // $sheet->setCellValueByColumnAndRow('1',$row, $v->ex_seat);
  307. // $sheet->setCellValueByColumnAndRow('2',$row, $v->realname);
  308. // $sheet->setCellValueExplicitByColumnAndRow('3',$row, $v->ex_number,DataType::TYPE_STRING);
  309. // $row++;
  310. // }
  311. //
  312. // $writer = IOFactory::createWriter($objPHPExcel, 'Xlsx');
  313. // $writer->save(base_path() . "/public/excel/cunwu{$room}.xlsx");
  314. // }
  315. // for ($room = 1;$room <= 78; $room++){
  316. // $word = new TemplateProcessor(base_path() . "/public/cunwu1.docx");
  317. // $word->setValue('room', $room);
  318. // if($room<10){
  319. // $room = sprintf('%02s', $room);
  320. // }
  321. // $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();
  322. // $rows = count($list);//总行数
  323. // $word->cloneRow('id', $rows);//复制行
  324. // for ($i = 0; $i < $rows; $i++) {
  325. // $word->setValue("id#" . ($i + 1), $i + 1);//替换变量
  326. // $word->setValue("realname#" . ($i + 1), $list[$i]->realname);
  327. // $word->setValue("ex_number#" . ($i + 1), $list[$i]->ex_number);
  328. // }
  329. // $word->saveAs(base_path() ."/public/excel/cunwu_{$room}.docx");//另存为
  330. // }
  331. // $spreadsheet = new Spreadsheet();
  332. // $sheet = $spreadsheet->getActiveSheet();
  333. // $header = ['姓名','身份证','准考证','报考岗位'];
  334. // foreach ($header as $key => $value) {
  335. // $sheet->setCellValueByColumnAndRow($key+1, 1, $value);
  336. // }
  337. // $row = 2;
  338. // $sheet->getStyle('S')->getNumberFormat()->setFormatCode('0');
  339. // $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();
  340. // $post_data = RecruitPost::where('recruit_id',16)->where('status',1)->selectRaw('id, CONCAT(code," ",name) as post')->pluck('post', 'id');
  341. // foreach ($list as $k => $v){
  342. // $sheet->setCellValueByColumnAndRow('1',$row, $v->realname);
  343. // $sheet->setCellValueExplicitByColumnAndRow('2',$row, $v->card,DataType::TYPE_STRING);
  344. // $sheet->setCellValueExplicitByColumnAndRow('3',$row, $v->ex_number,DataType::TYPE_STRING);
  345. // $sheet->setCellValueByColumnAndRow('4',$row, $post_data[$v->post_id]);
  346. // $row++;
  347. // }
  348. // header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
  349. // header('Content-Disposition: attachment;filename="'.time().'.xlsx"');
  350. // header('Cache-Control: max-age=0');
  351. // // If you're serving to IE 9, then the following may be needed
  352. // header('Cache-Control: max-age=1');
  353. // // If you're serving to IE over SSL, then the following may be needed
  354. // header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); // Date in the past
  355. // header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); // always modified
  356. // header('Cache-Control: cache, must-revalidate'); // HTTP/1.1
  357. // header('Pragma: public'); // HTTP/1.0
  358. // $writer = IOFactory::createWriter($spreadsheet, 'Xlsx');
  359. // $writer->save('php://output');
  360. echo "success";
  361. // $list = DB::table('lt_apppointment')->distinct()->pluck('card')->toArray();
  362. // $all = DB::table('lt_apppointment')->pluck('card')->toArray();
  363. // $all = array_count_values($all);
  364. // $time = time();
  365. // $data = [
  366. // 'idCards' => $list,
  367. // 'sign' => strtoupper(md5("timestr={$time}&key=rsKVyec52fqEKpk4RRD2TU8fKvPxt6ombKg0qSq1velPQtBHVi")),
  368. // 'timeStr' => $time,
  369. // ];
  370. // $data_string = json_encode($data);
  371. // $ch = curl_init ();
  372. // curl_setopt( $ch, CURLOPT_URL, "http://rc.jucai.gov.cn/api/dataInterface/findTalentInfoByIdCards" );
  373. // curl_setopt($ch, CURLOPT_HTTPHEADER, array(
  374. // 'Content-Type: application/json',
  375. // 'Content-Length: ' . strlen($data_string))
  376. // );
  377. // curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4); //若果报错 name lookup timed out 报错时添加这一行代码
  378. // curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );
  379. // curl_setopt( $ch, CURLOPT_TIMEOUT,60);
  380. // curl_setopt( $ch, CURLOPT_SSL_VERIFYHOST, 0);
  381. // curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, 0);
  382. // curl_setopt( $ch, CURLOPT_POST, 1);
  383. // curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
  384. // $result = curl_exec ( $ch );
  385. // curl_close ( $ch );
  386. // $ret = json_decode($result,true);
  387. // $res = [];
  388. // if(count($ret['obj']) > 0){
  389. // foreach ($ret['obj'] as $k => $v){
  390. // if(array_key_exists($v['street'],$res)){
  391. // $res[$v['street']]['number']++;
  392. // $res[$v['street']]['count'] += $all[$v['idCard']];
  393. // }else{
  394. // $res[$v['street']] = [
  395. // 'number' => 1,
  396. // 'count' => $all[$v['idCard']]
  397. // ];
  398. // }
  399. // }
  400. // }
  401. //
  402. // $spreadsheet = new Spreadsheet();
  403. // $sheet = $spreadsheet->getActiveSheet();
  404. // $header = ['镇街','使用人数','使用次数'];
  405. // foreach ($header as $key => $value) {
  406. // $sheet->setCellValueByColumnAndRow($key+1, 1, $value);
  407. // }
  408. // $row = 2;
  409. // foreach ($res as $k => $v){
  410. // $sheet->setCellValueByColumnAndRow(1, $row, $k);
  411. // $sheet->setCellValueByColumnAndRow(2, $row, $v['number']);
  412. // $sheet->setCellValueByColumnAndRow(3, $row, $v['count']);
  413. // $row++;
  414. // }
  415. // $file_name = date("Y-m-d",time()) . '码上服务数据';
  416. // header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
  417. // header('Content-Disposition: attachment;filename="'.$file_name.'.xlsx"');
  418. // header('Cache-Control: max-age=0');
  419. // // If you're serving to IE 9, then the following may be needed
  420. // header('Cache-Control: max-age=1');
  421. // // If you're serving to IE over SSL, then the following may be needed
  422. // header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); // Date in the past
  423. // header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); // always modified
  424. // header('Cache-Control: cache, must-revalidate'); // HTTP/1.1
  425. // header('Pragma: public'); // HTTP/1.0
  426. // $writer = IOFactory::createWriter($spreadsheet, 'Xlsx');
  427. // $writer->save('php://output');
  428. //
  429. // //dd($res);
  430. }
  431. }