This commit is contained in:
2020-08-15 21:47:14 +08:00
parent 990f649724
commit 55f98eed02
20 changed files with 1451 additions and 3754 deletions

View File

@@ -110,6 +110,9 @@ class Form extends Base {
* @return html 页面
*/
public function lists($form_id = '') {
if(!$form_id){
return $this->error('无此表单!');
}
$form = $this->modelInfo;
$list = $this->model->order('id desc')->paginate(25);
@@ -118,6 +121,7 @@ class Form extends Base {
'grid' => $this->modelInfo['grid_list'],
'meta_title' => $this->modelInfo['title'] . '列表',
'form_id' => $form_id,
'require' => ['jsname' => 'form', 'actionname' => 'lists'],
'list' => $list,
'page' => $list->render(),
);

View File

@@ -0,0 +1,72 @@
<?php
// +----------------------------------------------------------------------
// | SentCMS [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013 http://www.tensent.cn All rights reserved.
// +----------------------------------------------------------------------
// | Author: molong <molong@tensent.cn> <http://www.tensent.cn>
// +----------------------------------------------------------------------
namespace app\controller\admin;
use QL\QueryList;
use app\model\Company;
/**
* @title 住建管理
* @description 住建管理
*/
class Hcloud extends Base {
/**
* @title 住建列表
*/
public function index(){
$map = array();
$order = "compId desc";
$list = Company::with(['apt'])->where($map)->order($order)->paginate($this->request->pageConfig);
$this->data = array(
'list' => $list,
'page' => $list->render(),
);
return $this->fetch();
}
public function get_comp_date(){
$param = $this->request->param();
// $param['qyType'] = 'QY_TYPE_0001';
$client = new \GuzzleHttp\Client();
$res = $client->request('post', 'http://zjy.jxjst.gov.cn/w/dataQuery/getCompDate', ['form_params' => $param])->getBody()->getContents();
$list = json_decode($res, true);
$data = [];
foreach($list['rows'] as $key => $val){
// $apt = $client->request('get', 'http://zjy.jxjst.gov.cn/w/cms/qy/getQyAptListData/'.$val['qyCompId'])->getBody()->getContents();
// $apt_list = json_decode($apt, true);
$detail = QueryList::get('http://zjy.jxjst.gov.cn/w/dataQuery/compDetailInfo/'.$val['qyCompId']);
$val['registerDate'] = $detail->find('.introduce-body:eq(0) table.daBg tr:eq(2) td:eq(1)')->text();
$val['registerGov'] = $detail->find('.introduce-body:eq(0) table.daBg tr:eq(3) td:eq(3)')->text();
$val['businessScope'] = $detail->find('.introduce-body:eq(0) table.daBg tr:eq(7) td:eq(1)')->text();
$val['safetyCode'] = $detail->find('.introduce-body:eq(1) table.daBg tr:eq(0) td:eq(1)')->text();
$val['safetyBdate'] = $detail->find('.introduce-body:eq(1) table.daBg tr:eq(1) td:eq(1)')->text();
$val['safetyEdate'] = $detail->find('.introduce-body:eq(1) table.daBg tr:eq(2) td:eq(1)')->text();
$val['safetyContent'] = $detail->find('.introduce-body:eq(1) table.daBg tr:eq(1) td:eq(3)')->text();
$val['safetyGov'] = $detail->find('.introduce-body:eq(1) table.daBg tr:eq(2) td:eq(3)')->text();
// $val['apt'] = $apt_list;
Company::create($val, [], true);
// if(count($apt_list['rows']) > 0){
// foreach($apt_list['rows'] as $k => $v){
// }
// }
// $list['rows'][$key] = $val;
// $data[] = $val;
}
// dump($list);
// (new Company())->saveAll($data, true);
}
public function list_ba_pubic(){
}
}

View File

@@ -8,6 +8,8 @@
// +----------------------------------------------------------------------
namespace app\controller\front;
use QL\QueryList;
class Index extends Base {
/**
@@ -16,7 +18,7 @@ class Index extends Base {
*/
public function index() {
$this->setSeo("网站首页", '网站首页', '网站首页');
return $this->fetch();
// return $this->fetch();
}
public function miss(){