Browse Source

update doman dll reference

Robert 1 year ago
parent
commit
82fb402265

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


+ 1 - 1
EVCB_OCPP.WSServer/EVCB_OCPP.WSServer.csproj

@@ -41,7 +41,7 @@
   </ItemGroup>
   <ItemGroup>
     <PackageReference Include="Dapper" Version="2.0.143" />
-    <PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.10" />
+    <PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.12" />
     <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.10" />
     <PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="7.0.0" />
     <PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="7.0.0" />

+ 0 - 1
EVCB_OCPP.WSServer/Jobs/HeartBeatCheckJob.cs

@@ -1,5 +1,4 @@
 using EVCB_OCPP.Domain;
-using EVCB_OCPP.Domain.Models.Database;
 using EVCB_OCPP.WSServer.Service;
 using EVCB_OCPP.WSServer.Service.WsService;
 using Microsoft.EntityFrameworkCore;

+ 1 - 1
EVCB_OCPP.WSServer/Jobs/ServerMessageJob.cs

@@ -1,5 +1,5 @@
 using EVCB_OCPP.Domain;
-using EVCB_OCPP.Domain.Models.Database;
+using EVCB_OCPP.Domain.Models.MainDb;
 using EVCB_OCPP.Packet.Features;
 using EVCB_OCPP.Packet.Messages;
 using EVCB_OCPP.WSServer.Message;

+ 0 - 1
EVCB_OCPP.WSServer/Jobs/ServerSetFeeJob.cs

@@ -1,6 +1,5 @@
 using Dapper;
 using EVCB_OCPP.Domain;
-using EVCB_OCPP.Domain.Models.Database;
 using EVCB_OCPP.Packet.Features;
 using EVCB_OCPP.Packet.Messages.Core;
 using EVCB_OCPP.WSServer.Dto;

+ 2 - 2
EVCB_OCPP.WSServer/Jobs/ServerUpdateJob.cs

@@ -44,8 +44,8 @@ public class ServerUpdateJob : IJob
             //    x.FW_AssignedMachineVersionId != x.FW_VersionReport && x.Online == true)
             //    .Select(x => new { x.Id, x.ChargeBoxId, x.FW_AssignedMachineVersionId }).ToList();
 
-            needUpdateChargers = await db.Machine.Where(x => x.FW_AssignedVersion.HasValue == true &&
-              x.FW_AssignedVersion != x.FW_VersionReport && x.Online == true)
+            needUpdateChargers = await db.Machine.Where(x => x.FwAssignedVersion.HasValue == true &&
+              x.FwAssignedVersion != x.FwVersionReport && x.Online == true)
               .Select(x => x.ChargeBoxId).AsNoTracking().ToListAsync();
         }
 

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

@@ -1,6 +1,5 @@
 using Dapper;
 using EVCB_OCPP.Domain;
-using EVCB_OCPP.Domain.Models.Database;
 using EVCB_OCPP.Packet.Features;
 using EVCB_OCPP.Packet.Messages;
 using EVCB_OCPP.Packet.Messages.Core;
@@ -20,6 +19,7 @@ using System.Diagnostics;
 using System.Globalization;
 
 using EVCB_OCPP.WSServer.Service.WsService;
+using EVCB_OCPP.Domain.Models.MainDb;
 
 namespace EVCB_OCPP.WSServer.Message;
 
@@ -190,7 +190,7 @@ internal partial class ProfileHandler
 
                             logger.LogDebug("{0}\r\n{1}\r\n{2}", jo["txId"].Value<int>(), jo["dataString"].Value<string>(), jo["publicKey"].Value<string>());
 
-                            await mainDbService.AddOCMF(new OCMF()
+                            await mainDbService.AddOCMF(new Ocmf()
                             {
                                 TransactionId = jo["txId"].Value<int>(),
                                 DataString = jo["dataString"].Value<string>(),
@@ -232,7 +232,7 @@ internal partial class ProfileHandler
                         _machine.ChargePointSerialNumber = string.IsNullOrEmpty(_request.chargePointSerialNumber) ? string.Empty : _request.chargePointSerialNumber;
                         _machine.ChargePointModel = string.IsNullOrEmpty(_request.chargePointModel) ? string.Empty : _request.chargePointModel;
                         _machine.ChargePointVendor = string.IsNullOrEmpty(_request.chargePointVendor) ? string.Empty : _request.chargePointVendor;
-                        _machine.FW_CurrentVersion = string.IsNullOrEmpty(_request.firmwareVersion) ? string.Empty : _request.firmwareVersion;
+                        _machine.FwCurrentVersion = string.IsNullOrEmpty(_request.firmwareVersion) ? string.Empty : _request.firmwareVersion;
                         _machine.Iccid = string.IsNullOrEmpty(_request.iccid) ? string.Empty : _request.iccid;
                         //_machine.Iccid = DateTime.UtcNow.ToString("yy-MM-dd HH:mm");
                         _machine.Imsi = string.IsNullOrEmpty(_request.imsi) ? string.Empty : _request.imsi;
@@ -938,8 +938,8 @@ internal partial class ProfileHandler
                             {
                                 operation.FinishedOn = DateTime.UtcNow;
                                 operation.Status = 1;//電樁有回覆
-                                operation.EVSE_Status = (int)_confirm.status;
-                                operation.EVSE_Value = string.IsNullOrEmpty(_confirm.data) ? "" : _confirm.data;
+                                operation.EvseStatus = (int)_confirm.status;
+                                operation.EvseValue = string.IsNullOrEmpty(_confirm.data) ? "" : _confirm.data;
                                 await db.SaveChangesAsync();
                             }
 
@@ -1337,8 +1337,8 @@ internal partial class ProfileHandler
                             {
                                 operation.FinishedOn = DateTime.UtcNow;
                                 operation.Status = 1;//電樁有回覆
-                                operation.EVSE_Status = (int)_confirm.status;
-                                operation.EVSE_Value = _confirm.status.ToString();
+                                operation.EvseStatus = (int)_confirm.status;
+                                operation.EvseValue = _confirm.status.ToString();
                                 await db.SaveChangesAsync();
                             }
 
@@ -1358,8 +1358,8 @@ internal partial class ProfileHandler
                             {
                                 operation.FinishedOn = DateTime.UtcNow;
                                 operation.Status = 1;//電樁有回覆
-                                operation.EVSE_Status = (int)_confirm.status;
-                                operation.EVSE_Value = _confirm.status.ToString();
+                                operation.EvseStatus = (int)_confirm.status;
+                                operation.EvseValue = _confirm.status.ToString();
                                 await db.SaveChangesAsync();
                             }
 
@@ -1379,8 +1379,8 @@ internal partial class ProfileHandler
                             {
                                 operation.FinishedOn = DateTime.UtcNow;
                                 operation.Status = 1;//電樁有回覆
-                                operation.EVSE_Status = (int)_confirm.status;
-                                operation.EVSE_Value = _confirm.status.ToString();
+                                operation.EvseStatus = (int)_confirm.status;
+                                operation.EvseValue = _confirm.status.ToString();
                                 await db.SaveChangesAsync();
                             }
 
@@ -1400,8 +1400,8 @@ internal partial class ProfileHandler
                             {
                                 operation.FinishedOn = DateTime.UtcNow;
                                 operation.Status = 1;//電樁有回覆
-                                operation.EVSE_Status = (int)_confirm.status;
-                                operation.EVSE_Value = _confirm.status.ToString();
+                                operation.EvseStatus = (int)_confirm.status;
+                                operation.EvseValue = _confirm.status.ToString();
                                 await db.SaveChangesAsync();
                             }
 
@@ -1421,8 +1421,8 @@ internal partial class ProfileHandler
                             {
                                 operation.FinishedOn = DateTime.UtcNow;
                                 operation.Status = 1;//電樁有回覆
-                                operation.EVSE_Status = (int)_confirm.status;
-                                operation.EVSE_Value = _confirm.status.ToString();
+                                operation.EvseStatus = (int)_confirm.status;
+                                operation.EvseValue = _confirm.status.ToString();
                                 await db.SaveChangesAsync();
                             }
 
@@ -1443,8 +1443,8 @@ internal partial class ProfileHandler
                             {
                                 operation.FinishedOn = DateTime.UtcNow;
                                 operation.Status = 1;//電樁有回覆
-                                operation.EVSE_Status = (int)_confirm.status;
-                                operation.EVSE_Value = _confirm.status.ToString();
+                                operation.EvseStatus = (int)_confirm.status;
+                                operation.EvseValue = _confirm.status.ToString();
 
                             }
 
@@ -1460,7 +1460,7 @@ internal partial class ProfileHandler
                                 }
                                 else
                                 {
-                                    await db.MachineConfigurations.AddAsync(new MachineConfiguration()
+                                    await db.MachineConfigurations.AddAsync(new MachineConfigurations()
                                     {
                                         ChargeBoxId = session.ChargeBoxId,
                                         ConfigureName = _request.key,
@@ -1515,7 +1515,7 @@ internal partial class ProfileHandler
                                         }
                                         else
                                         {
-                                            await db.MachineConfigurations.AddAsync(new MachineConfiguration()
+                                            await db.MachineConfigurations.AddAsync(new MachineConfigurations()
                                             {
                                                 ChargeBoxId = session.ChargeBoxId,
                                                 ConfigureName = item.key,
@@ -1542,7 +1542,7 @@ internal partial class ProfileHandler
                                         }
                                         else
                                         {
-                                            await db.MachineConfigurations.AddAsync(new MachineConfiguration()
+                                            await db.MachineConfigurations.AddAsync(new MachineConfigurations()
                                             {
                                                 ChargeBoxId = session.ChargeBoxId,
                                                 ConfigureName = item
@@ -1558,8 +1558,8 @@ internal partial class ProfileHandler
                                 {
                                     operation.FinishedOn = DateTime.UtcNow;
                                     operation.Status = 1;//電樁有回覆
-                                    operation.EVSE_Status = 1;
-                                    operation.EVSE_Value = JsonConvert.SerializeObject(_confirm.configurationKey, Formatting.None);
+                                    operation.EvseStatus = 1;
+                                    operation.EvseValue = JsonConvert.SerializeObject(_confirm.configurationKey, Formatting.None);
 
                                 }
 
@@ -1587,8 +1587,8 @@ internal partial class ProfileHandler
                             {
                                 operation.FinishedOn = DateTime.UtcNow;
                                 operation.Status = 1;//電樁有回覆
-                                operation.EVSE_Status = (int)_confirm.status;
-                                operation.EVSE_Value = _confirm.status.ToString();
+                                operation.EvseStatus = (int)_confirm.status;
+                                operation.EvseValue = _confirm.status.ToString();
                                 await db.SaveChangesAsync();
                             }
 
@@ -1642,8 +1642,8 @@ internal partial class ProfileHandler
                         {
                             operation.FinishedOn = DateTime.UtcNow;
                             operation.Status = 1;//電樁有回覆
-                            operation.EVSE_Status = (int)255;//錯誤
-                            operation.EVSE_Value = errorMsg;
+                            operation.EvseStatus = (int)255;//錯誤
+                            operation.EvseValue = errorMsg;
                             await db.SaveChangesAsync();
                         }
 

+ 13 - 13
EVCB_OCPP.WSServer/Message/FirmwareManagementProfileHandler.cs

@@ -1,5 +1,4 @@
 using EVCB_OCPP.Domain;
-using EVCB_OCPP.Domain.Models.Database;
 using EVCB_OCPP.Packet.Features;
 using EVCB_OCPP.Packet.Messages;
 using EVCB_OCPP.Packet.Messages.FirmwareManagement;
@@ -11,6 +10,7 @@ using Microsoft.Extensions.Logging;
 using System.Threading.Tasks;
 using Microsoft.EntityFrameworkCore;
 using EVCB_OCPP.WSServer.Service.WsService;
+using EVCB_OCPP.Domain.Models.MainDb;
 
 namespace EVCB_OCPP.WSServer.Message
 {
@@ -33,14 +33,14 @@ namespace EVCB_OCPP.WSServer.Message
                                 string requestId = Guid.NewGuid().ToString();
                                 using (var db = await maindbContextFactory.CreateDbContextAsync())
                                 {
-                                    var machine = await db.Machine.Where(x => x.FW_AssignedVersion.HasValue == true && x.FW_AssignedVersion.HasValue
-                                       && x.FW_AssignedVersion != x.FW_VersionReport && x.ChargeBoxId == session.ChargeBoxId)
-                                        .Select(x => new { x.Id, x.FW_AssignedVersion }).AsNoTracking().FirstOrDefaultAsync();
+                                    var machine = await db.Machine.Where(x => x.FwAssignedVersion.HasValue == true && x.FwAssignedVersion.HasValue
+                                       && x.FwAssignedVersion != x.FwVersionReport && x.ChargeBoxId == session.ChargeBoxId)
+                                        .Select(x => new { x.Id, x.FwAssignedVersion }).AsNoTracking().FirstOrDefaultAsync();
 
                                     if (machine != null)
                                     {
                                         var mv = db.MachineVersionFile.Include(c => c.UploadFile)
-                                         .Where(c => c.Id == machine.FW_AssignedVersion.Value).First();
+                                         .Where(c => c.Id == machine.FwAssignedVersion.Value).First();
 
                                         string downloadUrl = mv.UploadFile.FileUrl;
 
@@ -58,8 +58,8 @@ namespace EVCB_OCPP.WSServer.Message
                                             ChargeBoxId = session.ChargeBoxId,
                                             SerialNo = requestId,
                                             RequestContent = JsonConvert.SerializeObject(_updateFWrequest, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore, Formatting = Formatting.None }),
-                                            EVSE_Status = 0,
-                                            EVSE_Value = "Fw Version:" + machine.FW_AssignedVersion,
+                                            EvseStatus = 0,
+                                            EvseValue = "Fw Version:" + machine.FwAssignedVersion,
                                             Status = 0,
                                             RequestType = 0,
                                             Action = _updateFWrequest.Action.ToString()
@@ -75,7 +75,7 @@ namespace EVCB_OCPP.WSServer.Message
                                             SerialNo: requestId);
 
                                         var clearMachine = await db.Machine.Where(x => x.Id == machine.Id).FirstOrDefaultAsync();
-                                        clearMachine.FW_AssignedVersion = null;
+                                        clearMachine.FwAssignedVersion = null;
                                         await db.SaveChangesAsync();
                                     }
 
@@ -89,7 +89,7 @@ namespace EVCB_OCPP.WSServer.Message
                                         .OrderByDescending(x => x.CreatedOn).FirstOrDefaultAsync();
                                     if (item != null)
                                     {
-                                        item.EVSE_Status = (int)_request.status;
+                                        item.EvseStatus = (int)_request.status;
                                         item.FinishedOn = DateTime.UtcNow;
                                     }
 
@@ -115,7 +115,7 @@ namespace EVCB_OCPP.WSServer.Message
                                         .OrderByDescending(x => x.CreatedOn).FirstOrDefault();
                                     if (item != null)
                                     {
-                                        item.EVSE_Status = (int)_request.status;
+                                        item.EvseStatus = (int)_request.status;
                                         item.FinishedOn = DateTime.UtcNow;
                                     }
 
@@ -173,7 +173,7 @@ namespace EVCB_OCPP.WSServer.Message
                             {
                                 operation.FinishedOn = DateTime.UtcNow;
                                 operation.Status = 1;//電樁有回覆
-                                operation.EVSE_Value = string.IsNullOrEmpty(evse_rep) ? operation.EVSE_Value : evse_rep;
+                                operation.EvseValue = string.IsNullOrEmpty(evse_rep) ? operation.EvseValue : evse_rep;
                                 await db.SaveChangesAsync();
                             }
 
@@ -210,8 +210,8 @@ namespace EVCB_OCPP.WSServer.Message
                             {
                                 operation.FinishedOn = DateTime.UtcNow;
                                 operation.Status = 1;//電樁有回覆
-                                operation.EVSE_Status = (int)255;//錯誤
-                                operation.EVSE_Value = errorMsg;
+                                operation.EvseStatus = (int)255;//錯誤
+                                operation.EvseValue = errorMsg;
                                 await db.SaveChangesAsync();
                             }
 

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

@@ -31,8 +31,8 @@ namespace EVCB_OCPP.WSServer.Message
                             {
                                 operation.FinishedOn = DateTime.UtcNow;
                                 operation.Status = 1;//電樁有回覆
-                                operation.EVSE_Status = 1;//OK
-                                operation.EVSE_Value = _confirm.listVersion.ToString();
+                                operation.EvseStatus = 1;//OK
+                                operation.EvseValue = _confirm.listVersion.ToString();
                                 await db.SaveChangesAsync();
                             }
 
@@ -51,8 +51,8 @@ namespace EVCB_OCPP.WSServer.Message
                             {
                                 operation.FinishedOn = DateTime.UtcNow;
                                 operation.Status = 1;//電樁有回覆
-                                operation.EVSE_Status = (int)_confirm.status;//OK     
-                                operation.EVSE_Value = _confirm.status.ToString();
+                                operation.EvseStatus = (int)_confirm.status;//OK     
+                                operation.EvseValue = _confirm.status.ToString();
                                 await db.SaveChangesAsync();
                             }
 
@@ -86,8 +86,8 @@ namespace EVCB_OCPP.WSServer.Message
                             {
                                 operation.FinishedOn = DateTime.UtcNow;
                                 operation.Status = 1;//電樁有回覆
-                                operation.EVSE_Status = (int)255;//錯誤
-                                operation.EVSE_Value = errorMsg;
+                                operation.EvseStatus = (int)255;//錯誤
+                                operation.EvseValue = errorMsg;
                                 await db.SaveChangesAsync();
                             }
 

+ 4 - 4
EVCB_OCPP.WSServer/Message/RemoteTriggerHandler.cs

@@ -34,8 +34,8 @@ namespace EVCB_OCPP.WSServer.Message
                             {
                                 operation.FinishedOn = DateTime.UtcNow;
                                 operation.Status = 1;//電樁有回覆
-                                operation.EVSE_Status = (int)_confirm.status;//OK
-                                operation.EVSE_Value = _confirm.status.ToString();
+                                operation.EvseStatus = (int)_confirm.status;//OK
+                                operation.EvseValue = _confirm.status.ToString();
                                 await db.SaveChangesAsync();
                             }
 
@@ -68,8 +68,8 @@ namespace EVCB_OCPP.WSServer.Message
                             {
                                 operation.FinishedOn = DateTime.UtcNow;
                                 operation.Status = 1;//電樁有回覆
-                                operation.EVSE_Status = (int)255;//錯誤
-                                operation.EVSE_Value = errorMsg;
+                                operation.EvseStatus = (int)255;//錯誤
+                                operation.EvseValue = errorMsg;
                                 await db.SaveChangesAsync();
                             }
 

+ 8 - 8
EVCB_OCPP.WSServer/Message/ReservationProfileHandler.cs

@@ -34,8 +34,8 @@ namespace EVCB_OCPP.WSServer.Message
                             {
                                 operation.FinishedOn = DateTime.UtcNow;
                                 operation.Status = 1;//電樁有回覆
-                                operation.EVSE_Status = (int)_confirm.status;//OK
-                                operation.EVSE_Value = _confirm.status.ToString();
+                                operation.EvseStatus = (int)_confirm.status;//OK
+                                operation.EvseValue = _confirm.status.ToString();
                                 await db.SaveChangesAsync();
                             }
 
@@ -54,8 +54,8 @@ namespace EVCB_OCPP.WSServer.Message
                             {
                                 operation.FinishedOn = DateTime.UtcNow;
                                 operation.Status = 1;//電樁有回覆
-                                operation.EVSE_Status = (int)_confirm.status;//OK
-                                operation.EVSE_Value = _confirm.status.ToString();
+                                operation.EvseStatus = (int)_confirm.status;//OK
+                                operation.EvseValue = _confirm.status.ToString();
                                 await db.SaveChangesAsync();
                             }
 
@@ -88,8 +88,8 @@ namespace EVCB_OCPP.WSServer.Message
                             {
                                 operation.FinishedOn = DateTime.UtcNow;
                                 operation.Status = 1;//電樁有回覆
-                                operation.EVSE_Status = (int)255;//錯誤
-                                operation.EVSE_Value = errorMsg;
+                                operation.EvseStatus = (int)255;//錯誤
+                                operation.EvseValue = errorMsg;
                                 await db.SaveChangesAsync();
                             }
 
@@ -106,8 +106,8 @@ namespace EVCB_OCPP.WSServer.Message
                             {
                                 operation.FinishedOn = DateTime.UtcNow;
                                 operation.Status = 1;//電樁有回覆
-                                operation.EVSE_Status = (int)255;//錯誤
-                                operation.EVSE_Value = errorMsg;
+                                operation.EvseStatus = (int)255;//錯誤
+                                operation.EvseValue = errorMsg;
                                 await db.SaveChangesAsync();
                             }
 

+ 9 - 9
EVCB_OCPP.WSServer/Message/SmartChargingProfileHandler.cs

@@ -1,5 +1,5 @@
 using EVCB_OCPP.Domain;
-using EVCB_OCPP.Domain.Models.Database;
+using EVCB_OCPP.Domain.Models.MainDb;
 using EVCB_OCPP.Packet.Features;
 using EVCB_OCPP.Packet.Messages;
 using EVCB_OCPP.Packet.Messages.SmartCharging;
@@ -90,8 +90,8 @@ namespace EVCB_OCPP.WSServer.Message
                             {
                                 operation.FinishedOn = DateTime.UtcNow;
                                 operation.Status = 1;//電樁有回覆
-                                operation.EVSE_Status = (int)_confirm.status;//OK
-                                operation.EVSE_Value = _confirm.status.ToString();
+                                operation.EvseStatus = (int)_confirm.status;//OK
+                                operation.EvseValue = _confirm.status.ToString();
                                 await db.SaveChangesAsync();
                             }
 
@@ -110,8 +110,8 @@ namespace EVCB_OCPP.WSServer.Message
                             {
                                 operation.FinishedOn = DateTime.UtcNow;
                                 operation.Status = 1;//電樁有回覆
-                                operation.EVSE_Status = (int)_confirm.status;//OK
-                                operation.EVSE_Value = _confirm.status.ToString();
+                                operation.EvseStatus = (int)_confirm.status;//OK
+                                operation.EvseValue = _confirm.status.ToString();
                                 await db.SaveChangesAsync();
                             }
 
@@ -131,8 +131,8 @@ namespace EVCB_OCPP.WSServer.Message
                             {
                                 operation.FinishedOn = DateTime.UtcNow;
                                 operation.Status = 1;//電樁有回覆
-                                operation.EVSE_Status = (int)_confirm.status;//OK
-                                operation.EVSE_Value = JsonConvert.SerializeObject(_confirm.chargingSchedule, Formatting.None);
+                                operation.EvseStatus = (int)_confirm.status;//OK
+                                operation.EvseValue = JsonConvert.SerializeObject(_confirm.chargingSchedule, Formatting.None);
                                 await db.SaveChangesAsync();
                             }
 
@@ -168,8 +168,8 @@ namespace EVCB_OCPP.WSServer.Message
                             {
                                 operation.FinishedOn = DateTime.UtcNow;
                                 operation.Status = 1;//電樁有回覆
-                                operation.EVSE_Status = (int)255;//錯誤
-                                operation.EVSE_Value = errorMsg;
+                                operation.EvseStatus = (int)255;//錯誤
+                                operation.EvseValue = errorMsg;
                                 await db.SaveChangesAsync();
                             }
 

+ 0 - 1
EVCB_OCPP.WSServer/Service/BusinessServiceFactory.cs

@@ -1,5 +1,4 @@
 using EVCB_OCPP.Domain;
-using EVCB_OCPP.Domain.Models.Database;
 using EVCB_OCPP.Packet.Messages.SubTypes;
 using EVCB_OCPP.WSServer.Dto;
 using Microsoft.EntityFrameworkCore;

+ 7 - 7
EVCB_OCPP.WSServer/Service/MainDbService.cs

@@ -1,6 +1,6 @@
 using Dapper;
 using EVCB_OCPP.Domain;
-using EVCB_OCPP.Domain.Models.Database;
+using EVCB_OCPP.Domain.Models.MainDb;
 using EVCB_OCPP.WSServer.Helper;
 using Microsoft.Data.SqlClient;
 using Microsoft.EntityFrameworkCore;
@@ -22,7 +22,7 @@ public interface IMainDbService
     Task<MachineAndCustomerInfo> GetMachineIdAndCustomerInfo(string ChargeBoxId, CancellationToken token = default);
     Task<string> GetMachineSecurityProfile(string ChargeBoxId, CancellationToken token = default);
     Task UpdateMachineBasicInfo(string ChargeBoxId, Machine machine);
-    Task AddOCMF(OCMF oCMF);
+    Task AddOCMF(Ocmf oCMF);
     ValueTask<ConnectorStatus> GetConnectorStatus(string ChargeBoxId, int ConnectorId);
     Task UpdateConnectorStatus(string Id, ConnectorStatus connectorStatus);
     ValueTask AddConnectorStatus(string ChargeBoxId, byte ConnectorId, DateTime CreatedOn, int Status,
@@ -132,10 +132,10 @@ public class MainDbService : IMainDbService
         return updateMachineBasicInfoHandler.HandleAsync(new UpdateMachineBasicInfoParam(ChargeBoxId, machine));
     }
 
-    public async Task AddOCMF(OCMF oCMF)
+    public async Task AddOCMF(Ocmf oCMF)
     {
         using var db = await contextFactory.CreateDbContextAsync();
-        await db.OCMF.AddAsync(oCMF);
+        await db.Ocmf.AddAsync(oCMF);
         await db.SaveChangesAsync();
     }
 
@@ -144,7 +144,7 @@ public class MainDbService : IMainDbService
         int ChargePointErrorCodeId, string ErrorInfo, string VendorId, string VendorErrorCode)
     {
         using var db = await contextFactory.CreateDbContextAsync();
-        var _currentStatus = new Domain.Models.Database.ConnectorStatus()
+        var _currentStatus = new ConnectorStatus()
         {
             ChargeBoxId = ChargeBoxId,
             ConnectorId = ConnectorId,
@@ -436,7 +436,7 @@ public class MainDbService : IMainDbService
         _machine.ChargePointSerialNumber = machine.ChargePointSerialNumber;
         _machine.ChargePointModel = machine.ChargePointModel;
         _machine.ChargePointVendor = machine.ChargePointVendor;
-        _machine.FW_CurrentVersion = machine.FW_CurrentVersion;
+        _machine.FwCurrentVersion = machine.FwCurrentVersion;
         _machine.Iccid = machine.Iccid;
         _machine.Imsi = machine.Imsi;
         _machine.MeterSerialNumber = machine.MeterSerialNumber;
@@ -461,7 +461,7 @@ public class MainDbService : IMainDbService
             _machine.ChargePointSerialNumber = pam.machine.ChargePointSerialNumber;
             _machine.ChargePointModel = pam.machine.ChargePointModel;
             _machine.ChargePointVendor = pam.machine.ChargePointVendor;
-            _machine.FW_CurrentVersion = pam.machine.FW_CurrentVersion;
+            _machine.FwCurrentVersion = pam.machine.FwCurrentVersion;
             _machine.Iccid = pam.machine.Iccid;
             _machine.Imsi = pam.machine.Imsi;
             _machine.MeterSerialNumber = pam.machine.MeterSerialNumber;

+ 0 - 1
EVCB_OCPP.WSServer/Service/OuterBusinessService.cs

@@ -1,5 +1,4 @@
 using EVCB_OCPP.Domain;
-using EVCB_OCPP.Domain.Models.Database;
 using EVCB_OCPP.Packet.Messages.SubTypes;
 using EVCB_OCPP.WSServer.Dto;
 using Microsoft.EntityFrameworkCore;

+ 2 - 2
TestTool.RemoteTriggerAPP/MainWindow.xaml.cs

@@ -1123,7 +1123,7 @@ namespace TestTool.RemoteTriggerAPP
                 //將machine的軟體更新更新到這個值
                 db.SaveChanges();
 
-                machine.FW_AssignedVersion = obj.Id;
+                machine.FwAssignedVersion = obj.Id;
 
                 db.SaveChanges();
 
@@ -1146,7 +1146,7 @@ namespace TestTool.RemoteTriggerAPP
             {
 
                 var machine = db.Machine.Where(x => x.ChargeBoxId == uxChargeBoxIdTb.Text).FirstOrDefault();
-                machine.FW_AssignedVersion = null;
+                machine.FwAssignedVersion = null;
                 db.SaveChanges();
             }
 

+ 1 - 1
version.txt

@@ -1 +1 @@
-docker_v1.1.3
+docker_v1.1.4