Эх сурвалжийг харах

2020/04/17 Jessica
Actions:
1. Domain DLL 版號 11863
2. 因應 正名 MachineConfiguration Table 調整

Jessica.Tseng 5 жил өмнө
parent
commit
5747b87320

BIN
EVCB_OCPP.WSServer/DLL/EVCB_OCPP.Domain.dll


+ 6 - 6
EVCB_OCPP.WSServer/Message/CoreProfileHandler.cs

@@ -49,7 +49,7 @@ namespace EVCB_OCPP.WSServer.Message
 
                             db.SaveChanges();
 
-                            var configVaule = db.MachineConfigure.Where(x => x.ChargeBoxId == session.ChargeBoxId && x.ConfigureName == StandardConfiguration.HeartbeatInterval)
+                            var configVaule = db.MachineConfiguration.Where(x => x.ChargeBoxId == session.ChargeBoxId && x.ConfigureName == StandardConfiguration.HeartbeatInterval)
                                 .Select(x => x.ConfigureSetting).FirstOrDefault();
 
                             if (configVaule != null)
@@ -499,7 +499,7 @@ namespace EVCB_OCPP.WSServer.Message
 
                             if (_confirm.status == Packet.Messages.SubTypes.ConfigurationStatus.Accepted || _confirm.status == Packet.Messages.SubTypes.ConfigurationStatus.RebootRequired)
                             {
-                                var configure = db.MachineConfigure.Where(x => x.ChargeBoxId == session.ChargeBoxId).ToList();
+                                var configure = db.MachineConfiguration.Where(x => x.ChargeBoxId == session.ChargeBoxId).ToList();
 
                                 var foundConfig = configure.Find(x => x.ConfigureName == _request.key);
                                 if (foundConfig != null)
@@ -509,7 +509,7 @@ namespace EVCB_OCPP.WSServer.Message
                                 }
                                 else
                                 {
-                                    db.MachineConfigure.Add(new MachineConfigure()
+                                    db.MachineConfiguration.Add(new MachineConfiguration()
                                     {
                                         ChargeBoxId = session.ChargeBoxId,
                                         ConfigureName = _request.key,
@@ -530,7 +530,7 @@ namespace EVCB_OCPP.WSServer.Message
 
                         using (var db = new MainDBContext())
                         {
-                            var configure = db.MachineConfigure.Where(x => x.ChargeBoxId == session.ChargeBoxId).ToList();
+                            var configure = db.MachineConfiguration.Where(x => x.ChargeBoxId == session.ChargeBoxId).ToList();
 
                             if (_confirm.configurationKey != null)
                             {
@@ -544,7 +544,7 @@ namespace EVCB_OCPP.WSServer.Message
                                     }
                                     else
                                     {
-                                        db.MachineConfigure.Add(new MachineConfigure()
+                                        db.MachineConfiguration.Add(new MachineConfiguration()
                                         {
                                             ChargeBoxId = session.ChargeBoxId,
                                             ConfigureName = item.key,
@@ -568,7 +568,7 @@ namespace EVCB_OCPP.WSServer.Message
                                     }
                                     else
                                     {
-                                        db.MachineConfigure.Add(new MachineConfigure()
+                                        db.MachineConfiguration.Add(new MachineConfiguration()
                                         {
                                             ChargeBoxId = session.ChargeBoxId,
                                             ConfigureName = item

+ 2 - 2
EVCB_OCPP.WSServer/ProtalServer.cs

@@ -234,7 +234,7 @@ namespace EVCB_OCPP.WSServer
                 string maxKeys = StandardConfiguration.AllConfigs.Skip(skipCount).Take(1).FirstOrDefault();
                 if (maxKeys == StandardConfiguration.GetConfigurationMaxKeys)
                 {
-                    var _Configure = db.MachineConfigure.Where(x => x.ChargeBoxId == chargeBoxId && x.ConfigureName == maxKeys).Select(x => new { ConfigureSetting = x.ConfigureSetting, ConfigureName = x.ConfigureName }).FirstOrDefault();
+                    var _Configure = db.MachineConfiguration.Where(x => x.ChargeBoxId == chargeBoxId && x.ConfigureName == maxKeys).Select(x => new { ConfigureSetting = x.ConfigureSetting, ConfigureName = x.ConfigureName }).FirstOrDefault();
                     if (_Configure != null)
                     {
                         int cp_ConfiureCount = 0;
@@ -249,7 +249,7 @@ namespace EVCB_OCPP.WSServer
                 while (StandardConfiguration.AllConfigs.Count > skipCount)
                 {
                     string _key = StandardConfiguration.AllConfigs.Skip(skipCount).Take(1).FirstOrDefault();
-                    var _Configure = db.MachineConfigure.Where(x => x.ChargeBoxId == chargeBoxId && x.ConfigureName == _key).Select(x => new { ConfigureSetting = x.ConfigureSetting, ConfigureName = x.ConfigureName }).FirstOrDefault();
+                    var _Configure = db.MachineConfiguration.Where(x => x.ChargeBoxId == chargeBoxId && x.ConfigureName == _key).Select(x => new { ConfigureSetting = x.ConfigureSetting, ConfigureName = x.ConfigureName }).FirstOrDefault();
                     takeCount = StandardConfiguration.AllConfigs.Count - skipCount > takeCount ? takeCount : StandardConfiguration.AllConfigs.Count - skipCount;
 
                     var _keys = StandardConfiguration.AllConfigs.Skip(skipCount).Take(takeCount).ToList();