|
@@ -107,6 +107,26 @@ namespace EVCB_OCPP.TaskScheduler.Services
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
+ internal List<Guid> GetNotifyStopTransactionCustomers()
|
|
|
+ {
|
|
|
+ List<Guid> result = new List<Guid>();
|
|
|
+ try
|
|
|
+ {
|
|
|
+ using (var dbConn = new SqlConnection(mainDBConnectString))
|
|
|
+ {
|
|
|
+ dbConn.Open();
|
|
|
+ result = dbConn.Query<Guid>("SELECT Id FROM [dbo].[Customer] where CallPartnerApiOnSchedule=1 and InstantStopTxReport=0").ToList();
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ catch (Exception ex)
|
|
|
+ {
|
|
|
+ logger.Error("Query Data Error " + ex.ToString());
|
|
|
+ }
|
|
|
+
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
internal List<Transaction> GetNeedReportSession(Guid customerId, bool isgoing, int size)
|
|
|
{
|
|
@@ -129,7 +149,7 @@ namespace EVCB_OCPP.TaskScheduler.Services
|
|
|
{
|
|
|
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";
|
|
|
+ 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 BillingDone=1";
|
|
|
}
|
|
|
else
|
|
|
{
|