|
@@ -120,13 +120,21 @@ namespace EVCB_OCPP.TaskScheduler.Services
|
|
|
parameters.Add("@CustomerId", customerId.ToString(), System.Data.DbType.String);
|
|
|
string sqlString = string.Empty;
|
|
|
|
|
|
+ // 20220211 revised
|
|
|
if (isgoing)
|
|
|
{
|
|
|
sqlString = "SELECT Top(" + size + ") Id, ChargeBoxId,ConnectorId,StartTime,MeterStart,StartIdTag FROM [dbo].[TransactionRecord] where CustomerId=@CustomerId and StopTime='1991/1/1' and StartTransactionReportedOn='1991/1/1' ";
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- sqlString = "SELECT Top(" + size + ") Id,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' ";
|
|
|
+ if (customerId == new Guid("009E603C-79CD-4620-A2B8-D9349C0E8AD8"))
|
|
|
+ {
|
|
|
+ sqlString = "SELECT Top(" + size + ") Id,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 UploadedtoTTIA=1";
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ sqlString = "SELECT Top(" + size + ") Id,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' ";
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
result = dbConn.Query<Transaction>(sqlString, parameters).ToList();
|