コード例 #1
0
 public function queryWarnInfo($batteryId)
 {
     $m = new \Home\Model\BatteryWarnModel();
     $this->ajaxReturn($m->getWarnInfo($batteryId));
 }
コード例 #2
0
 public function getWarnTypes()
 {
     $m = new \Home\Model\BatteryWarnModel();
     $ret = $m->getWarnTypes();
     $this->myAjaxOkReturn($ret);
 }
コード例 #3
0
 public function warn()
 {
     $dbTableName = "event_warn";
     $types = I('type', "%");
     $m_warn = new \Home\Model\BatteryWarnModel();
     $types = $m_warn->getWarnTypeByDetail($types);
     $condition = array();
     if ($types != '%' && $types != "所有类型") {
         $condition['e_stype'] = $types;
     }
     $m_eventWarn = M($dbTableName);
     $tableHead = array("ID", "操作人", "电池ID", "告警类型", "发生时间", "详情");
     $tableFields = array("t_" . $dbTableName . ".id", "t_user.username", "t_" . $dbTableName . ".fk_battery_id", "t_data_dic.detail", "t_" . $dbTableName . ".generate_time", "t_" . $dbTableName . ".data");
     //         $this->assign("typesurl",U('/Ajax/event/geteventtypes'));
     //         $this->assign("typesurl",U('/Ajax/battery/getwarntypes'));
     $this->eventView($tableHead, $tableFields, $dbTableName, $condition);
 }