增加选择SPGW ID

This commit is contained in:
lai
2024-11-22 14:38:41 +08:00
parent fa794775bc
commit 0a8e0b0de5
2 changed files with 19 additions and 4 deletions

View File

@@ -32,7 +32,9 @@ function sel_date_from_change()
{
keyTwo=document.myform.keyTwo.value;
}
else if(sysTypeNo == 362 && page_id == 0){
keyTwo=document.myform.keyTwo.value;
}
//var scrollY=document.body.scrollTop;
if(down_date_from<=down_date_to)
down_date_to=down_date_from;
@@ -240,6 +242,17 @@ else if($sysTypeNo == 364)
}//if page==1
}
else if($sysTypeNo == 362){
echo "System ID <select name=\"keyTwo\" onchange=\"javascript:sel_date_from_change();\">";
for($i=0;$i<2;$i++)
{
if($keyTwo == $i)
echo "<option selected value=$i>{$i}</option>";
else
echo "<option value=$i>{$i}</option>";
}
echo "</select>&nbsp";
}
else
{
echo "<input type=\"hidden\" name=\"keyTwo\" value=0>";

View File

@@ -3,6 +3,7 @@ $cstaConf=GetCstaConf($sysTypeNo);
if(0)
{
echo "sel_date_from=$sel_date_from,sel_date_to=$sel_date_to<br>";
echo "keyTwo=$keyTwo<br>";
echo "<pre>";
print_r($cstaConf);
echo "</pre>";
@@ -14,7 +15,7 @@ $endTime=date("Y-m-d H:i:s",mktime(23,59,59,date("m"),date("d")-$sel_date_to,dat
//echo "startTime=$startTime,endTime=$endTime<br>";
$cstaData=GetCstaDataByDay($cstaConf,$startTime,$endTime,"detail");
$cstaData=GetCstaDataByDay($cstaConf,$startTime,$endTime,"detail",-1,"key_sys_id=$keyTwo");
if(0)
{
echo "<pre>";
@@ -41,15 +42,16 @@ function printVolumeWithUnits($bytes) {
$echartDown=printVolumeWithUnits($cstaData[0][downlink_total_volume]+0);
$echartUp=printVolumeWithUnits($cstaData[0][uplink_total_volume]+0);
//echo $_REQUEST['keyTwo'];
global $cstaDbConn;
$dataTable=$cstaConf[DataObject][0][DetailDataTable];
$fieldList=$cstaConf[DataObject][0][DetailFieldList];
if(strlen($fieldList)){
$fieldList="$fieldList,csta_datetime";
}
$sql="select {$fieldList} from CSTA_DB.{$dataTable} where csta_datetime >= '{$startTime}' and csta_datetime <= '{$endTime}' order by csta_datetime asc ";
$sql="select {$fieldList} from CSTA_DB.{$dataTable} where csta_datetime >= '{$startTime}' and csta_datetime <= '{$endTime}' and key_sys_id = {$keyTwo} order by csta_datetime asc ";
$res=mysqli_query($cstaDbConn,$sql);
//echo $sql;
//echo mysqli_error($cstaDbConn);
$num=mysqli_num_rows($res);
//set downArr upArr