Example #1
0
 public function actionProcessreport()
 {
     $running = SysProcessRunning::find()->one();
     if ($running->running === 'false') {
         $bgd = "'2014-04-01'";
         $this->call("start_process", NULL);
         $this->call("call_all_run_report_process", $bgd);
         $this->call("end_process", NULL);
     }
 }
Example #2
0
 public function actionProcessreport()
 {
     $running = \backend\models\SysProcessRunning::find()->one();
     if ($running->is_running == 'false') {
         //$running->is_running = 'true';
         //$running->update();
         //ใส่  store;
         $this->call("start_process", NULL);
         $bdg = '2014-09-30';
         $model = \backend\models\Sysconfigmain::find()->one();
         if ($model) {
             $bdg = $model->note2;
         }
         $bdg = "'" . $bdg . "'";
         $this->call("merge_newborncare", NULL);
         $this->call("clear_upload_error", NULL);
         $this->call("clear_null_hospcode", NULL);
         //$this->call("cal_chart_dial_1", $bdg);
         $this->call("cal_chart_dial_2", $bdg);
         $this->call("cal_chart_dial_3", $bdg);
         $this->call("cal_chart_dial_4", NULL);
         //$this->call("cal_chart_dial_5", NULL);
         $this->call("cal_chart_dial_6", NULL);
         $this->call("cal_ncd_cholesteral_colorchart", $bdg);
         $this->call("cal_ncd_nocholesteral_colorchart", $bdg);
         $this->call("cal_pyramid_level_1", $bdg);
         $this->call("cal_pyramid_level_2");
         $this->call("cal_pyramid_level_3");
         $this->call("cal_sys_person_type");
         $y = date('Y');
         $this->call("cal_count_service", $y - 1);
         $this->call("cal_count_service", $y);
         $this->call("cal_rpt_visit_oldman", $y - 1);
         $this->call("cal_rpt_visit_oldman", $y);
         //รายงานแผนไทย-knott
         $this->call("cal_rpt_panth_visit_ratio", $y - 1);
         $this->call("cal_rpt_panth_visit_ratio", $y);
         $this->call("cal_rpt_panth_drug_value", $y - 1);
         $this->call("cal_rpt_panth_drug_value", $y);
         $this->call("cal_rpt_cervical_cancer_screening", $y - 1);
         $this->call("cal_rpt_cervical_cancer_screening", $y);
         $this->call("cal_rpt_breast_cancer_screening", $y - 1);
         $this->call("cal_rpt_breast_cancer_screening", $y);
         // sos store
         $this->call("cal_chart_dial_7", $bdg);
         $this->call("cal_chart_dial_8", $bdg);
         $this->call("cal_chart_dial_9", NULL);
         $this->call("end_process", NULL);
         //
         //จบใส่ store
         //$running->is_running = 'false';
         // $running->update();
     }
 }
Example #3
0
use backend\models\SysProcessRunning;
?>
<div class="site-index">

    <div class="jumbotron">
        <div id="resp_data" style="display: none">
            <p>Data</p>
            <img src="images/Processing.gif">
        </div>
        <div id="resp_report" style="display: none">
            <p>Report</p>
            <img src="images/Processing.gif">
        </div>

        <?php 
$checkProcess = SysProcessRunning::find()->one();
$check = $checkProcess->running;
?>

    </div>

    <div class="body-content">

        <div class="row">
            <div class="col-lg-4">
                <?php 
if ($check === 'false') {
    ?>
                    <p><a class="btn btn-lg btn-success" id="btn_data_process" href="#">Data Process</a></p>
                <?php 
} else {
Example #4
0
$username = '';
if (!Yii::$app->user->isGuest) {
    $username = '******' . Html::encode(Yii::$app->user->identity->username) . ')';
}
$menuItems = [['label' => '<span class="glyphicon glyphicon-plus"></span> Hosxp-คลินิกเรื้อรัง', 'items' => $report_hosmnu_itms, 'visible' => !Yii::$app->user->isGuest], ['label' => '<span class="glyphicon glyphicon-floppy-open"></span> นำเข้าข้อมูล', 'url' => ['/uploadfortythree/index'], 'visible' => !Yii::$app->user->isGuest], ['label' => '<span class="glyphicon glyphicon-folder-open"></span> ปริมาณข้อมูล', 'url' => ['syscountall/index'], 'visible' => !Yii::$app->user->isGuest], ['label' => '<span class="glyphicon glyphicon-list-alt"></span> รายงาน', 'items' => $report_mnu_itms, 'visible' => !Yii::$app->user->isGuest], ['label' => '<span class="glyphicon glyphicon-user"></span>  ' . $username, 'items' => $submenuItems]];
$config_main = backend\models\Sysconfigmain::find()->one();
$center = isset($config_main->district_name) ? $config_main->district_name : 'Not set';
echo Nav::widget(['options' => ['class' => 'navbar-nav navbar-left'], 'encodeLabels' => false, 'items' => [['label' => 'SWLDHDC : ศูนย์ข้อมูล43แฟ้ม อ.' . Html::encode($center)]]]);
echo Nav::widget(['options' => ['class' => 'navbar-nav navbar-right'], 'encodeLabels' => false, 'items' => $menuItems]);
echo Nav::widget(['options' => ['class' => 'navbar-nav navbar-right'], 'encodeLabels' => false]);
NavBar::end();
?>

            <div class="container">
                <?php 
$process = \backend\models\SysProcessRunning::find()->one();
if ($process->is_running === 'true') {
    $log_time = \frontend\models\SysEventLog::find()->orderBy(['id' => SORT_DESC])->one();
    $log_time = isset($log_time->start_at) ? $log_time->start_at : 'NA';
    ?>
                <div class="alert alert-warning">
                    <i class="glyphicon glyphicon-refresh"></i> เวลา <?php 
    echo $log_time;
    ?>
 กำลังประมวลผลรายงาน
                    
                </div>
                <?php 
}
?>