57 lines
1.5 KiB
PHP
57 lines
1.5 KiB
PHP
<?php
|
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
|
/**
|
|
* @author luoxuancai 2017/7/13
|
|
*/
|
|
class Report extends CI_Controller {
|
|
|
|
public function __construct()
|
|
{
|
|
parent::__construct();
|
|
//$this->load->model('Model_UsersInfo');
|
|
$this->load->model('report_model');
|
|
}
|
|
|
|
|
|
//新报告检测
|
|
public function index()
|
|
{
|
|
//未完成的检测
|
|
$list = $this->Model_UsersInfo->get_uncompleted_list();
|
|
//扫描目录
|
|
foreach ($list as $userInfo) {
|
|
//print_r($this->report_model->get_report_file($userInfo['device_id']));die;
|
|
if($this->report_model->is_report_ready($userInfo['device_id'])){
|
|
//设置完成
|
|
$this->Model_UsersInfo->set_completed($userInfo['id']);
|
|
//发送微信通知
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
//快递
|
|
public function ship()
|
|
{
|
|
die('dfdfd');
|
|
//未完成的检测
|
|
$list = $this->Model_UsersInfo->get_uncompleted_list();
|
|
//扫描目录
|
|
foreach ($list as $userInfo) {
|
|
//print_r($this->report_model->get_report_file($userInfo['device_id']));die;
|
|
if($this->report_model->is_report_ready($userInfo['device_id'])){
|
|
//设置完成
|
|
$this->Model_UsersInfo->set_completed($userInfo['id']);
|
|
//发送微信通知
|
|
}
|
|
}
|
|
}
|
|
|
|
//快递
|
|
public function test()
|
|
{
|
|
die('dfdfd');
|
|
}
|
|
|
|
}
|