|
@@ -1608,6 +1608,9 @@ class Lampcontrol extends Base_Controller {
|
|
|
|
|
|
|
|
|
$download = intval($this->input->post('download'));
|
|
|
+
|
|
|
+ $where = ['lampid'=>$lamp_id,'updatetime >='=>$beginDate,'updatetime <='=>$endDate];
|
|
|
+
|
|
|
if (!empty($download)) {
|
|
|
if (empty($date)) exit(json_result('0007',$this->response['0007']));
|
|
|
$dataList = array();
|
|
@@ -1768,8 +1771,8 @@ class Lampcontrol extends Base_Controller {
|
|
|
$table = !empty($datatype) ? $datatype : 'system_info_log';
|
|
|
if ($table == 'lamp_info_log') {
|
|
|
$table = 'realtime_info_log';
|
|
|
- $total = $this->RealtimeInfoLog_model->get_count(['lampid'=>$lamp_id,'updatetime >='=>$beginDate,'updatetime <='=>$endDate]);
|
|
|
- $res = $this->RealtimeInfoLog_model->get_list(['lampid'=>$lamp_id,'updatetime >='=>$beginDate,'updatetime <='=>$endDate], 'loadvoltage as lampvoltage,lighteness,loadcurrent as lampcurrent,loadpower as lamppower,updatetime,loadWorkTimeDay as daychargemincurrent,daydischarmaxpow',$count, ($page-1)*$count, 'updatetime desc,id desc', NUll);
|
|
|
+ $total = $this->RealtimeInfoLog_model->get_count($where);
|
|
|
+ $res = $this->RealtimeInfoLog_model->get_list($where, 'loadvoltage as lampvoltage,lighteness,loadcurrent as lampcurrent,loadpower as lamppower,updatetime,loadWorkTimeDay as daychargemincurrent,daydischarmaxpow',$count, ($page-1)*$count, 'updatetime desc,id desc', NUll);
|
|
|
// $res = $this->Lamp_model->getListForInfoLog($lamp_id, $table, ($page-1)*$count, $count,$beginDate,$endDate);
|
|
|
}elseif ($table == 'system_info_log') {
|
|
|
$total = $this->Lamp_model->getCountForInfoLog($lamp_id, $table,$beginDate,$endDate);
|
|
@@ -1778,7 +1781,7 @@ class Lampcontrol extends Base_Controller {
|
|
|
$join = [
|
|
|
// ['table'=>'history_info_log as HI','cond'=>'HI.lampid = RI.lampid and HI.updatetime = RI.updatetime','type'=>'inner'],
|
|
|
];
|
|
|
- $where = ['lampid'=>$lamp_id,'updatetime >='=>$beginDate,'updatetime <='=>$endDate];
|
|
|
+ // $where = ['lampid'=>$lamp_id,'updatetime >='=>$beginDate,'updatetime <='=>$endDate];
|
|
|
$total = $this->RealtimeInfoLog_model->get_count($where,'count(*) as total');
|
|
|
$fields = 'batvoltage as battvoltage,chgtemper as batttemper,updatetime,DayOverDisChgTimes as overtimes,battstatus,chargestage,voltagedaymin,voltagedaymax,daybattmintemper,daybattmaxtemper';
|
|
|
$res = $this->RealtimeInfoLog_model->get_list($where, $fields,$count, ($page-1)*$count, 'updatetime desc,id desc');
|
|
@@ -1787,7 +1790,7 @@ class Lampcontrol extends Base_Controller {
|
|
|
$join = [
|
|
|
// ['table'=>'history_info_log as HI','cond'=>'HI.lampid = RI.lampid and HI.updatetime = RI.updatetime','type'=>'inner'],
|
|
|
];
|
|
|
- $where = ['lampid'=>$lamp_id,'updatetime >='=>$beginDate,'updatetime <='=>$endDate];
|
|
|
+ // $where = ['lampid'=>$lamp_id,'updatetime >='=>$beginDate,'updatetime <='=>$endDate];
|
|
|
$total = $this->RealtimeInfoLog_model->get_count($where,'count(*) as total');
|
|
|
$fields = 'panelvoltage as solarvoltage,updatetime,panelcurrent as solarcurrent,panelpower as solarpower,daychargemaxpow';
|
|
|
$res = $this->RealtimeInfoLog_model->get_list($where, $fields,$count, ($page-1)*$count, 'updatetime desc,id desc');
|