|
@@ -3,6 +3,10 @@
|
|
|
$tag_header = 'set';
|
|
|
include 'head.php';
|
|
|
$obj = json_decode(trim($output[1]),true);//var_dump($obj);
|
|
|
+ $system = json_decode(trim($output[0]),true);//var_dump($obj);
|
|
|
+ $RatingCurrent = $system['RatingCurrent'];
|
|
|
+ $ModelName = $system['ModelName'];
|
|
|
+ $RatingPower = substr($ModelName,4,2)*pow(10,-1+substr($ModelName,6,1));
|
|
|
$ChargingInfo3=$obj['ChargingInfo3'];//var_dump($ChargingInfo3);
|
|
|
$idx=0;
|
|
|
if($obj['ChargingInfo1']){
|
|
@@ -17,20 +21,59 @@
|
|
|
$SystemStatus1='authorizing';
|
|
|
break;
|
|
|
case 3:
|
|
|
- $SystemStatus1='preparing';
|
|
|
+ $SystemStatus1='reassign check';
|
|
|
break;
|
|
|
case 4:
|
|
|
- $SystemStatus1='charging';
|
|
|
+ $SystemStatus1='reassign';
|
|
|
break;
|
|
|
case 5:
|
|
|
- $SystemStatus1='terminating';
|
|
|
+ $SystemStatus1='preparing';
|
|
|
break;
|
|
|
case 6:
|
|
|
- $SystemStatus1='alarm';
|
|
|
+ $SystemStatus1='preparing for EV';
|
|
|
break;
|
|
|
case 7:
|
|
|
+ $SystemStatus1='preparing for evse';
|
|
|
+ break;
|
|
|
+ case 8:
|
|
|
+ $SystemStatus1='charging';
|
|
|
+ break;
|
|
|
+ case 9:
|
|
|
+ $SystemStatus1='terminating';
|
|
|
+ break;
|
|
|
+ case 10:
|
|
|
+ $SystemStatus1='complete';
|
|
|
+ break;
|
|
|
+ case 11:
|
|
|
+ $SystemStatus1='alarm';
|
|
|
+ break;
|
|
|
+ case 12:
|
|
|
$SystemStatus1='fault';
|
|
|
break;
|
|
|
+ case 13:
|
|
|
+ $SystemStatus1='reservation';
|
|
|
+ break;
|
|
|
+ case 14:
|
|
|
+ $SystemStatus1='booking';
|
|
|
+ break;
|
|
|
+ case 15:
|
|
|
+ $SystemStatus1='maintain';
|
|
|
+ break;
|
|
|
+ case 16:
|
|
|
+ $SystemStatus1='debug';
|
|
|
+ break;
|
|
|
+ case 17:
|
|
|
+ $SystemStatus1='precharge step 0';
|
|
|
+ break;
|
|
|
+ case 18:
|
|
|
+ $SystemStatus1='precharge step 1';
|
|
|
+ break;
|
|
|
+ case 19:
|
|
|
+ $SystemStatus1='single run';
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ $SystemStatus1='unknown';
|
|
|
+ break;
|
|
|
}
|
|
|
}
|
|
|
if($obj['ChargingInfo2']){
|
|
@@ -45,20 +88,59 @@
|
|
|
$SystemStatus2='authorizing';
|
|
|
break;
|
|
|
case 3:
|
|
|
- $SystemStatus2='preparing';
|
|
|
+ $SystemStatus2='reassign check';
|
|
|
break;
|
|
|
case 4:
|
|
|
- $SystemStatus2='charging';
|
|
|
+ $SystemStatus2='reassign';
|
|
|
break;
|
|
|
case 5:
|
|
|
- $SystemStatus2='terminating';
|
|
|
+ $SystemStatus2='preparing';
|
|
|
break;
|
|
|
case 6:
|
|
|
- $SystemStatus2='alarm';
|
|
|
+ $SystemStatus2='preparing for EV';
|
|
|
break;
|
|
|
case 7:
|
|
|
+ $SystemStatus2='preparing for evse';
|
|
|
+ break;
|
|
|
+ case 8:
|
|
|
+ $SystemStatus2='charging';
|
|
|
+ break;
|
|
|
+ case 9:
|
|
|
+ $SystemStatus2='terminating';
|
|
|
+ break;
|
|
|
+ case 10:
|
|
|
+ $SystemStatus2='complete';
|
|
|
+ break;
|
|
|
+ case 11:
|
|
|
+ $SystemStatus2='alarm';
|
|
|
+ break;
|
|
|
+ case 12:
|
|
|
$SystemStatus2='fault';
|
|
|
break;
|
|
|
+ case 13:
|
|
|
+ $SystemStatus2='reservation';
|
|
|
+ break;
|
|
|
+ case 14:
|
|
|
+ $SystemStatus2='booking';
|
|
|
+ break;
|
|
|
+ case 15:
|
|
|
+ $SystemStatus2='maintain';
|
|
|
+ break;
|
|
|
+ case 16:
|
|
|
+ $SystemStatus2='debug';
|
|
|
+ break;
|
|
|
+ case 17:
|
|
|
+ $SystemStatus2='precharge step 0';
|
|
|
+ break;
|
|
|
+ case 18:
|
|
|
+ $SystemStatus2='precharge step 1';
|
|
|
+ break;
|
|
|
+ case 19:
|
|
|
+ $SystemStatus2='single run';
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ $SystemStatus2='unknown';
|
|
|
+ break;
|
|
|
}
|
|
|
}
|
|
|
if($obj['ChargingInfo3']){
|
|
@@ -73,20 +155,59 @@
|
|
|
$SystemStatus3='authorizing';
|
|
|
break;
|
|
|
case 3:
|
|
|
- $SystemStatus3='preparing';
|
|
|
+ $SystemStatus3='reassign check';
|
|
|
break;
|
|
|
case 4:
|
|
|
- $SystemStatus3='charging';
|
|
|
+ $SystemStatus3='reassign';
|
|
|
break;
|
|
|
case 5:
|
|
|
- $SystemStatus3='terminating';
|
|
|
+ $SystemStatus3='preparing';
|
|
|
break;
|
|
|
case 6:
|
|
|
- $SystemStatus3='alarm';
|
|
|
+ $SystemStatus3='preparing for EV';
|
|
|
break;
|
|
|
case 7:
|
|
|
+ $SystemStatus3='preparing for evse';
|
|
|
+ break;
|
|
|
+ case 8:
|
|
|
+ $SystemStatus3='charging';
|
|
|
+ break;
|
|
|
+ case 9:
|
|
|
+ $SystemStatus3='terminating';
|
|
|
+ break;
|
|
|
+ case 10:
|
|
|
+ $SystemStatus3='complete';
|
|
|
+ break;
|
|
|
+ case 11:
|
|
|
+ $SystemStatus3='alarm';
|
|
|
+ break;
|
|
|
+ case 12:
|
|
|
$SystemStatus3='fault';
|
|
|
break;
|
|
|
+ case 13:
|
|
|
+ $SystemStatus3='reservation';
|
|
|
+ break;
|
|
|
+ case 14:
|
|
|
+ $SystemStatus3='booking';
|
|
|
+ break;
|
|
|
+ case 15:
|
|
|
+ $SystemStatus3='maintain';
|
|
|
+ break;
|
|
|
+ case 16:
|
|
|
+ $SystemStatus3='debug';
|
|
|
+ break;
|
|
|
+ case 17:
|
|
|
+ $SystemStatus3='precharge step 0';
|
|
|
+ break;
|
|
|
+ case 18:
|
|
|
+ $SystemStatus3='precharge step 1';
|
|
|
+ break;
|
|
|
+ case 19:
|
|
|
+ $SystemStatus3='single run';
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ $SystemStatus3='unknown';
|
|
|
+ break;
|
|
|
}
|
|
|
}
|
|
|
?>
|
|
@@ -134,10 +255,12 @@ img {
|
|
|
<div class="form-group" style="display:<?php echo $am001;?>">
|
|
|
<label>MaxChargingPower</label>
|
|
|
<input type="text" name="MaxChargingPower" id="MaxChargingPower" class="form-control" value="<?php echo $obj['MaxChargingPower'];?>">
|
|
|
+ <input type="hidden" name="RatingPower" id="RatingPower" value="<?php echo $RatingPower;?>">
|
|
|
</div>
|
|
|
<div class="form-group" style="display:<?php echo $am111;?>">
|
|
|
<label>MaxChargingCurrent</label>
|
|
|
<input type="text" name="MaxChargingCurrent" id="MaxChargingCurrent" class="form-control" value="<?php echo $obj['MaxChargingCurrent'];?>">
|
|
|
+ <input type="hidden" name="RatingCurrent" id="RatingCurrent" value="<?php echo $RatingCurrent;?>">
|
|
|
</div>
|
|
|
<div class="form-group" style="display:<?php echo $am111;?>">
|
|
|
<label>MaxChargingDuration</label>
|
|
@@ -536,6 +659,8 @@ img {
|
|
|
|
|
|
function formCheck()
|
|
|
{
|
|
|
+ var RatingCurrent = document.getElementById("RatingCurrent").value;
|
|
|
+ var RatingPower = document.getElementById("RatingPower").value;
|
|
|
var MaxChargingEnergy = document.getElementById("MaxChargingEnergy").value;
|
|
|
var MaxChargingPower = document.getElementById("MaxChargingPower").value;
|
|
|
var MaxChargingCurrent = document.getElementById("MaxChargingCurrent").value;
|
|
@@ -553,11 +678,21 @@ img {
|
|
|
document.getElementById("MaxChargingEnergy").focus();
|
|
|
return false;
|
|
|
}
|
|
|
- if(MaxChargingPower >65535)
|
|
|
- {
|
|
|
- alert("MaxChargingPower must <= 65535!");
|
|
|
- document.getElementById("MaxChargingPower").focus();
|
|
|
- return false;
|
|
|
+ if(RatingPower!="" && RatingPower!=0){
|
|
|
+ if(MaxChargingPower > RatingPower)
|
|
|
+ {
|
|
|
+ alert("MaxChargingPower must be less than RatingPower("+RatingPower+")!");
|
|
|
+ document.getElementById("MaxChargingPower").focus();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ if(MaxChargingPower >65535)
|
|
|
+ {
|
|
|
+ alert("MaxChargingPower must <= 65535!");
|
|
|
+ document.getElementById("MaxChargingPower").focus();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
}
|
|
|
if(MaxChargingPower < 0)
|
|
|
{
|
|
@@ -565,11 +700,21 @@ img {
|
|
|
document.getElementById("MaxChargingPower").focus();
|
|
|
return false;
|
|
|
}
|
|
|
- if(MaxChargingCurrent >65535)
|
|
|
- {
|
|
|
- alert("MaxChargingCurrent must <= 65535!");
|
|
|
- document.getElementById("MaxChargingCurrent").focus();
|
|
|
- return false;
|
|
|
+ if(RatingCurrent!="" && RatingCurrent!=0){
|
|
|
+ if(MaxChargingCurrent > RatingCurrent)
|
|
|
+ {
|
|
|
+ alert("MaxChargingCurrent must be less than RatingCurrent("+RatingCurrent+")!");
|
|
|
+ document.getElementById("MaxChargingCurrent").focus();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ if(MaxChargingCurrent >65535)
|
|
|
+ {
|
|
|
+ alert("MaxChargingCurrent must <= 65535!");
|
|
|
+ document.getElementById("MaxChargingCurrent").focus();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
}
|
|
|
if(MaxChargingCurrent < 0)
|
|
|
{
|