|
@@ -471,7 +471,7 @@ internal partial class ProfileHandler
|
|
|
catch (Exception ex)
|
|
|
{
|
|
|
|
|
|
- Console.WriteLine(string.Format("{0} :{1}", session.ChargeBoxId + " RunningCost", ex.Message));
|
|
|
+ logger.LogTrace(string.Format("{0} :{1}", session.ChargeBoxId + " RunningCost", ex.Message));
|
|
|
|
|
|
}
|
|
|
|
|
@@ -749,6 +749,14 @@ internal partial class ProfileHandler
|
|
|
receipt: string.Empty,
|
|
|
cost: session.IsBilling ? -1 : 0);
|
|
|
|
|
|
+ if (_request.transactionData == null || _request.transactionData.Count == 0)
|
|
|
+ {
|
|
|
+ _request.transactionData = new List<MeterValue>()
|
|
|
+ {
|
|
|
+ new MeterValue() { timestamp= _request.timestamp, sampledValue=new List<SampledValue>()}
|
|
|
+ };
|
|
|
+ }
|
|
|
+
|
|
|
if (_request.transactionData != null && _request.transactionData.Count > 0)
|
|
|
{
|
|
|
//清除 StopTransaction TransactionData
|
|
@@ -910,7 +918,7 @@ internal partial class ProfileHandler
|
|
|
break;
|
|
|
default:
|
|
|
{
|
|
|
- Console.WriteLine(string.Format("Not Implement {0} Logic(ExecuteCoreRequest)", request.GetType().ToString().Replace("OCPPPackage.Messages.Core.", "")));
|
|
|
+ logger.LogWarning(string.Format("Not Implement {0} Logic(ExecuteCoreRequest)", request.GetType().ToString().Replace("OCPPPackage.Messages.Core.", "")));
|
|
|
}
|
|
|
break;
|
|
|
}
|
|
@@ -1092,7 +1100,7 @@ internal partial class ProfileHandler
|
|
|
var tx = await db.TransactionRecord.Where(x => x.Id == txEnergy.TxId).FirstOrDefaultAsync();
|
|
|
if (tx == null)
|
|
|
{
|
|
|
- Console.WriteLine("Tx is empty");
|
|
|
+ logger.LogWarning("Tx is empty");
|
|
|
return result;
|
|
|
}
|
|
|
|
|
@@ -1275,7 +1283,7 @@ internal partial class ProfileHandler
|
|
|
//{ "to","jessica_tseng@phihong.com.tw"}
|
|
|
}, null);
|
|
|
|
|
|
- Console.WriteLine(JsonConvert.SerializeObject(mail_response));
|
|
|
+ logger.LogTrace(JsonConvert.SerializeObject(mail_response));
|
|
|
|
|
|
}
|
|
|
#endregion
|
|
@@ -1526,7 +1534,7 @@ internal partial class ProfileHandler
|
|
|
string oldValue = string.Empty;
|
|
|
if (item.key == null)
|
|
|
{
|
|
|
- Console.WriteLine("*********************");
|
|
|
+ logger.LogTrace("*********************");
|
|
|
}
|
|
|
var foundConfig = configure.Find(x => x.ConfigureName == item.key);
|
|
|
|
|
@@ -1535,7 +1543,7 @@ internal partial class ProfileHandler
|
|
|
{
|
|
|
if (foundConfig.ConfigureName == null)
|
|
|
{
|
|
|
- Console.WriteLine("*********************");
|
|
|
+ logger.LogTrace("*********************");
|
|
|
}
|
|
|
|
|
|
if (foundConfig.ConfigureName == "SecurityProfile")
|
|
@@ -1630,7 +1638,7 @@ internal partial class ProfileHandler
|
|
|
break;
|
|
|
default:
|
|
|
{
|
|
|
- Console.WriteLine(string.Format("Not Implement {0} Logic(ExecuteCoreConfirm)", confirm.GetType().ToString().Replace("OCPPPackage.Messages.Core.", "")));
|
|
|
+ logger.LogWarning(string.Format("Not Implement {0} Logic(ExecuteCoreConfirm)", confirm.GetType().ToString().Replace("OCPPPackage.Messages.Core.", "")));
|
|
|
}
|
|
|
break;
|
|
|
}
|