Sfoglia il codice sorgente

2020-02-05 / ct_chen

Actions:
1. Webservice移除cardnumber

Files:
1. 如列表
ct_chen 5 anni fa
parent
commit
dea6c10554
2 ha cambiato i file con 16 aggiunte e 31 eliminazioni
  1. 16 16
      EVSE/Modularization/WebService.c
  2. 0 15
      EVSE/rootfs/var/www/set_charging.php

+ 16 - 16
EVSE/Modularization/WebService.c

@@ -893,7 +893,7 @@ int main(int argc, char *argv[]) {
 		struct json_object *ChargingInfo1;
 		struct json_object *ChargingInfo2;
 		struct json_object *ChargingInfo3;
-		struct json_object *CardNumber[3];
+//		struct json_object *CardNumber[3];
 		struct json_object *StartUserId[3];
 		struct json_object *StartDateTime[3];
 		struct json_object *StopDateTime[3];
@@ -1051,7 +1051,7 @@ int main(int argc, char *argv[]) {
 				Type[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].Type);
 				type_index[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].type_index);
 				EvBatterytargetCurrent[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].EvBatterytargetCurrent);
-				CardNumber[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].CardNumber);
+//				CardNumber[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].CardNumber);
 				StartUserId[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].StartUserId);
 				StartDateTime[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].StartDateTime);
 				StopDateTime[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].StopDateTime);
@@ -1074,7 +1074,7 @@ int main(int argc, char *argv[]) {
 				Type[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].Type);
 				type_index[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].type_index);
 				EvBatterytargetCurrent[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].EvBatterytargetCurrent);
-				CardNumber[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].CardNumber);
+//				CardNumber[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].CardNumber);
 				StartUserId[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].StartUserId);
 				StartDateTime[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].StartDateTime);
 				StopDateTime[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].StopDateTime);
@@ -1097,7 +1097,7 @@ int main(int argc, char *argv[]) {
 				Type[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].Type);
 				type_index[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].type_index);
 				EvBatterytargetCurrent[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].EvBatterytargetCurrent);
-				CardNumber[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].CardNumber);
+//				CardNumber[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].CardNumber);
 				StartUserId[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].StartUserId);
 				StartDateTime[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].StartDateTime);
 				StopDateTime[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].StopDateTime);
@@ -1120,7 +1120,7 @@ int main(int argc, char *argv[]) {
 				Type[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].Type);
 				type_index[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].type_index);
 				EvBatterytargetCurrent[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].EvBatterytargetCurrent);
-				CardNumber[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].CardNumber);
+//				CardNumber[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].CardNumber);
 				StartUserId[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StartUserId);
 				StartDateTime[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StartDateTime);
 				StopDateTime[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StopDateTime);
@@ -1145,7 +1145,7 @@ int main(int argc, char *argv[]) {
 				Type[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].Type);
 				type_index[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].type_index);
 				EvBatterytargetCurrent[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].EvBatterytargetCurrent);
-				CardNumber[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].CardNumber);
+//				CardNumber[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].CardNumber);
 				StartUserId[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].StartUserId);
 				StartDateTime[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].StartDateTime);
 				StopDateTime[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].StopDateTime);
@@ -1168,7 +1168,7 @@ int main(int argc, char *argv[]) {
 				Type[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].Type);
 				type_index[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].type_index);
 				EvBatterytargetCurrent[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].EvBatterytargetCurrent);
-				CardNumber[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].CardNumber);
+//				CardNumber[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].CardNumber);
 				StartUserId[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].StartUserId);
 				StartDateTime[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].StartDateTime);
 				StopDateTime[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].StopDateTime);
@@ -1191,7 +1191,7 @@ int main(int argc, char *argv[]) {
 				Type[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].Type);
 				type_index[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].type_index);
 				EvBatterytargetCurrent[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].EvBatterytargetCurrent);
-				CardNumber[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].CardNumber);
+//				CardNumber[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].CardNumber);
 				StartUserId[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].StartUserId);
 				StartDateTime[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].StartDateTime);
 				StopDateTime[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].StopDateTime);
@@ -1214,7 +1214,7 @@ int main(int argc, char *argv[]) {
 				Type[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].Type);
 				type_index[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].type_index);
 				EvBatterytargetCurrent[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].EvBatterytargetCurrent);
-				CardNumber[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].CardNumber);
+//				CardNumber[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].CardNumber);
 				StartUserId[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StartUserId);
 				StartDateTime[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StartDateTime);
 				StopDateTime[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StopDateTime);
@@ -1239,7 +1239,7 @@ int main(int argc, char *argv[]) {
 				Type[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].Type);
 				type_index[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].type_index);
 				EvBatterytargetCurrent[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].EvBatterytargetCurrent);
-				CardNumber[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].CardNumber);
+//				CardNumber[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].CardNumber);
 				StartUserId[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].StartUserId);
 				StartDateTime[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].StartDateTime);
 				StopDateTime[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].StopDateTime);
@@ -1262,7 +1262,7 @@ int main(int argc, char *argv[]) {
 				Type[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].Type);
 				type_index[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].type_index);
 				EvBatterytargetCurrent[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].EvBatterytargetCurrent);
-				CardNumber[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].CardNumber);
+//				CardNumber[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].CardNumber);
 				StartUserId[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].StartUserId);
 				StartDateTime[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].StartDateTime);
 				StopDateTime[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].StopDateTime);
@@ -1285,7 +1285,7 @@ int main(int argc, char *argv[]) {
 				Type[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].Type);
 				type_index[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].type_index);
 				EvBatterytargetCurrent[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].EvBatterytargetCurrent);
-				CardNumber[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].CardNumber);
+//				CardNumber[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].CardNumber);
 				StartUserId[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].StartUserId);
 				StartDateTime[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].StartDateTime);
 				StopDateTime[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].StopDateTime);
@@ -1308,7 +1308,7 @@ int main(int argc, char *argv[]) {
 				Type[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].Type);
 				type_index[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].type_index);
 				EvBatterytargetCurrent[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].EvBatterytargetCurrent);
-				CardNumber[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].CardNumber);
+//				CardNumber[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].CardNumber);
 				StartUserId[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StartUserId);
 				StartDateTime[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StartDateTime);
 				StopDateTime[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StopDateTime);
@@ -1433,7 +1433,7 @@ int main(int argc, char *argv[]) {
 //		json_object_object_add(jobj2,"CcsAuthentication",CcsAuthentication);
 //		json_object_object_add(jobj2,"AcCcsChargingMode",AcCcsChargingMode);
 		if(connectorType1 != 0){
-			json_object_object_add(ChargingInfo1,"CardNumber",CardNumber[0]);
+//			json_object_object_add(ChargingInfo1,"CardNumber",CardNumber[0]);
 			json_object_object_add(ChargingInfo1,"StartUserId",StartUserId[0]);
 			json_object_object_add(ChargingInfo1,"StartDateTime",StartDateTime[0]);
 			json_object_object_add(ChargingInfo1,"StopDateTime",StopDateTime[0]);
@@ -1456,7 +1456,7 @@ int main(int argc, char *argv[]) {
 			json_object_object_add(jobj2,"ChargingInfo1",ChargingInfo1);
 		}
 		if(connectorType2 != 0){
-			json_object_object_add(ChargingInfo2,"CardNumber",CardNumber[1]);
+//			json_object_object_add(ChargingInfo2,"CardNumber",CardNumber[1]);
 			json_object_object_add(ChargingInfo2,"StartUserId",StartUserId[1]);
 			json_object_object_add(ChargingInfo2,"StartDateTime",StartDateTime[1]);
 			json_object_object_add(ChargingInfo2,"StopDateTime",StopDateTime[1]);
@@ -1479,7 +1479,7 @@ int main(int argc, char *argv[]) {
 			json_object_object_add(jobj2,"ChargingInfo2",ChargingInfo2);
 		}
 		if(connectorType3 != 0){
-			json_object_object_add(ChargingInfo3,"CardNumber",CardNumber[2]);
+//			json_object_object_add(ChargingInfo3,"CardNumber",CardNumber[2]);
 			json_object_object_add(ChargingInfo3,"StartUserId",StartUserId[2]);
 			json_object_object_add(ChargingInfo3,"StartDateTime",StartDateTime[2]);
 			json_object_object_add(ChargingInfo3,"StopDateTime",StopDateTime[2]);

+ 0 - 15
EVSE/rootfs/var/www/set_charging.php

@@ -339,11 +339,6 @@ img {
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo1']['StartUserId'];?>">
 											<input type="hidden" name="UserId1" id="UserId1" value="<?php echo $obj['ChargingInfo1']['StartUserId'];?>">
 										</div>
-										<div class="form-group" style="display:<?php echo $am111;?>">
-											<label>Card Number</label>
-											<input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo1']['CardNumber'];?>">
-											<input type="hidden" name="CardNumber1" id="CardNumber1" value="<?php echo $obj['ChargingInfo1']['CardNumber'];?>">
-										</div>
 										<div class="form-group" style="display:<?php echo $am111;?>">
 											<label>StartDateTime</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo1']['StartDateTime'];?>">
@@ -427,11 +422,6 @@ img {
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo2']['StartUserId'];?>">
 											<input type="hidden" name="UserId2" id="UserId2" value="<?php echo $obj['ChargingInfo2']['StartUserId'];?>">
 										</div>
-										<div class="form-group" style="display:<?php echo $am111;?>">
-											<label>Card Number</label>
-											<input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo2']['CardNumber'];?>">
-											<input type="hidden" name="CardNumber2" id="CardNumber2" value="<?php echo $obj['ChargingInfo2']['CardNumber'];?>">
-										</div>
 										<div class="form-group" style="display:<?php echo $am111;?>">
 											<label>StartDateTime</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo2']['StartDateTime'];?>">
@@ -515,11 +505,6 @@ img {
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo3']['StartUserId'];?>">
 											<input type="hidden" name="UserId3" id="UserId3" value="<?php echo $obj['ChargingInfo3']['StartUserId'];?>">
 										</div>
-										<div class="form-group" style="display:<?php echo $am111;?>">
-											<label>Card Number</label>
-											<input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo3']['CardNumber'];?>">
-											<input type="hidden" name="CardNumber3" id="CardNumber3" value="<?php echo $obj['ChargingInfo3']['CardNumber'];?>">
-										</div>
 										<div class="form-group" style="display:<?php echo $am111;?>">
 											<label>StartDateTime</label>
 											<input type="text" readonly class="form-control" placeholder="<?php echo $obj['ChargingInfo3']['StartDateTime'];?>">