Jessica Tseng 1 year ago
parent
commit
9363473b27

+ 1 - 1
EVCB_OCPP.TaskScheduler/GitVersion.yml

@@ -1,6 +1,6 @@
 assembly-versioning-scheme: MajorMinorPatch
 assembly-informational-format: '{ShortSha}'
-next-version: 0.1.0
+next-version: 1.3.0
 branches: {}
 ignore:
   sha: []

+ 10 - 0
EVCB_OCPP.TaskScheduler/Models/Transaction.cs

@@ -122,5 +122,15 @@ namespace EVCB_OCPP.TaskScheduler.Models
 
         public decimal Cost { set; get; }
 
+
+        /// <summary>
+        /// Option Value
+        /// </summary>
+        public string StartSOC { set; get; }
+
+        /// <summary>
+        /// Option Value
+        /// </summary>
+        public string StopSOC { set; get; }
     }
 }

+ 4 - 0
EVCB_OCPP.TaskScheduler/Services/CommonCustomerService.cs

@@ -255,6 +255,10 @@ namespace EVCB_OCPP.TaskScheduler.Services
                                     Receipt = r.Receipt,
                                     TotalCost = r.Cost,
                                     Fee = r.Fee,
+
+                                    StartSOC = int.TryParse(r.StartSOC, out var startSOCint) ? startSOCint : 0,
+                                    StopSOC = int.TryParse(r.StopSOC, out var stopSOCint) ? stopSOCint : 0 ,
+
                                     CarNum = CarNum
                                 };
 

+ 3 - 3
EVCB_OCPP.TaskScheduler/Services/DatabaseService.cs

@@ -143,17 +143,17 @@ namespace EVCB_OCPP.TaskScheduler.Services
                     // 20220211 revised
                     if (isgoing)
                     {
-                        sqlString = "SELECT Top(" + size + ") Id,ReservationId, ChargeBoxId,ConnectorId,StartTime,MeterStart,StartIdTag FROM [dbo].[TransactionRecord] where CustomerId=@CustomerId and StopTime='1991/1/1' and StartTransactionReportedOn='1991/1/1' ";
+                        sqlString = "SELECT Top(" + size + ") Id,ReservationId, ChargeBoxId,ConnectorId,StartTime,MeterStart,StartIdTag,StartSOC,StopSOC FROM [dbo].[TransactionRecord] where CustomerId=@CustomerId and StopTime='1991/1/1' and StartTransactionReportedOn='1991/1/1' ";
                     }
                     else
                     {
                         if (customerId == new Guid("009E603C-79CD-4620-A2B8-D9349C0E8AD8"))
                         {
-                            sqlString = "SELECT Top(" + size + ") Id,ReservationId,ChargeBoxId,ConnectorId,StartTime,StopTime,MeterStart,MeterStop,StartIdTag ,StopReasonId,Receipt,Cost,Fee FROM [dbo].[TransactionRecord] where CustomerId=@CustomerId and StopTime!='1991/1/1' and StopTransactionReportedOn='1991/1/1' and  BillingDone=1";
+                            sqlString = "SELECT Top(" + size + ") Id,ReservationId,ChargeBoxId,ConnectorId,StartTime,StopTime,MeterStart,MeterStop,StartIdTag ,StopReasonId,Receipt,Cost,Fee,StartSOC,StopSOC FROM [dbo].[TransactionRecord] where CustomerId=@CustomerId and StopTime!='1991/1/1' and StopTransactionReportedOn='1991/1/1' and  BillingDone=1";
                         }
                         else
                         {
-                            sqlString = "SELECT Top(" + size + ") Id,ReservationId,ChargeBoxId,ConnectorId,StartTime,StopTime,MeterStart,MeterStop,StartIdTag ,StopReasonId,Receipt,Cost,Fee FROM [dbo].[TransactionRecord] where CustomerId=@CustomerId and StopTime!='1991/1/1' and StopTransactionReportedOn='1991/1/1' ";
+                            sqlString = "SELECT Top(" + size + ") Id,ReservationId,ChargeBoxId,ConnectorId,StartTime,StopTime,MeterStart,MeterStop,StartIdTag ,StopReasonId,Receipt,Cost,Fee,StartSOC,StopSOC FROM [dbo].[TransactionRecord] where CustomerId=@CustomerId and StopTime!='1991/1/1' and StopTransactionReportedOn='1991/1/1' ";
                         }
                     }