Browse Source

2019/12/17 Jessica 7972
Actions:
1. 調整資料庫內容
2. 統一 OCPP Message Enum Type 第一項 對應int 1

Modified Files:
1.~\EVCB_OCPP.Domain
2.~\EVCB_OCPP.Packet

Jessica.Tseng 5 năm trước cách đây
mục cha
commit
3a83190c7e
38 tập tin đã thay đổi với 862 bổ sung39 xóa
  1. 3 3
      EVCB_OCPP.Domain/App.config
  2. 29 0
      EVCB_OCPP.Domain/ConnectionLogContextMigrations/201912160853002_Add_Fields_IsSent.Designer.cs
  3. 18 0
      EVCB_OCPP.Domain/ConnectionLogContextMigrations/201912160853002_Add_Fields_IsSent.cs
  4. 126 0
      EVCB_OCPP.Domain/ConnectionLogContextMigrations/201912160853002_Add_Fields_IsSent.resx
  5. 3 1
      EVCB_OCPP.Domain/Doc/ReadMe.txt
  6. 28 0
      EVCB_OCPP.Domain/EVCB_OCPP.Domain.csproj
  7. 29 0
      EVCB_OCPP.Domain/MainDBContextMigrations/201908160852420_Add_CustomerFTP_ServerMessageUpdateOn.Designer.cs
  8. 26 0
      EVCB_OCPP.Domain/MainDBContextMigrations/201908160852420_Add_CustomerFTP_ServerMessageUpdateOn.cs
  9. 120 0
      EVCB_OCPP.Domain/MainDBContextMigrations/201908160852420_Add_CustomerFTP_ServerMessageUpdateOn.resx
  10. 29 0
      EVCB_OCPP.Domain/MainDBContextMigrations/201909170249297_Add_Machine_ConnectionType.Designer.cs
  11. 18 0
      EVCB_OCPP.Domain/MainDBContextMigrations/201909170249297_Add_Machine_ConnectionType.cs
  12. 120 0
      EVCB_OCPP.Domain/MainDBContextMigrations/201909170249297_Add_Machine_ConnectionType.resx
  13. 29 0
      EVCB_OCPP.Domain/MainDBContextMigrations/201912170616522_Modify_ServerMessage_MachineOperate_FieldLength.Designer.cs
  14. 20 0
      EVCB_OCPP.Domain/MainDBContextMigrations/201912170616522_Modify_ServerMessage_MachineOperate_FieldLength.cs
  15. 120 0
      EVCB_OCPP.Domain/MainDBContextMigrations/201912170616522_Modify_ServerMessage_MachineOperate_FieldLength.resx
  16. 26 1
      EVCB_OCPP.Domain/Models/Database/Customer.cs
  17. 9 5
      EVCB_OCPP.Domain/Models/Database/Machine.cs
  18. 11 0
      EVCB_OCPP.Domain/Models/Database/MachineConnectionLog.cs
  19. 1 2
      EVCB_OCPP.Domain/Models/Database/MachineOperateRecord.cs
  20. 11 6
      EVCB_OCPP.Domain/Models/Database/ServerMessage.cs
  21. 64 0
      EVCB_OCPP.Packet/Features/StandardConfiguration.cs
  22. 1 1
      EVCB_OCPP.Packet/Messages/SubTypes/AvailabilityStatus.cs
  23. 1 1
      EVCB_OCPP.Packet/Messages/SubTypes/CancelReservationStatus.cs
  24. 1 1
      EVCB_OCPP.Packet/Messages/SubTypes/ChargePointErrorCode.cs
  25. 4 4
      EVCB_OCPP.Packet/Messages/SubTypes/ChargePointStatus.cs
  26. 1 1
      EVCB_OCPP.Packet/Messages/SubTypes/ChargingProfileStatus.cs
  27. 1 1
      EVCB_OCPP.Packet/Messages/SubTypes/ClearCacheStatus.cs
  28. 1 1
      EVCB_OCPP.Packet/Messages/SubTypes/ClearChargingProfileStatus.cs
  29. 1 1
      EVCB_OCPP.Packet/Messages/SubTypes/ConfigurationStatus.cs
  30. 3 2
      EVCB_OCPP.Packet/Messages/SubTypes/FirmwareStatus.cs
  31. 1 1
      EVCB_OCPP.Packet/Messages/SubTypes/GetCompositeScheduleStatus.cs
  32. 1 1
      EVCB_OCPP.Packet/Messages/SubTypes/ReadingContext.cs
  33. 1 1
      EVCB_OCPP.Packet/Messages/SubTypes/RemoteStartStopStatus.cs
  34. 1 1
      EVCB_OCPP.Packet/Messages/SubTypes/ReservationStatus.cs
  35. 1 1
      EVCB_OCPP.Packet/Messages/SubTypes/ResetStatus.cs
  36. 1 1
      EVCB_OCPP.Packet/Messages/SubTypes/TriggerMessageStatus.cs
  37. 1 1
      EVCB_OCPP.Packet/Messages/SubTypes/UnlockStatus.cs
  38. 1 1
      EVCB_OCPP.Packet/Messages/SubTypes/UpdateStatus.cs

+ 3 - 3
EVCB_OCPP.Domain/App.config

@@ -15,8 +15,8 @@
     </providers>
   </entityFramework>
   <connectionStrings>
-    <add name="ConnectionLogDBContext" connectionString="data source=172.1.0.142\SQLEXPRESS;initial catalog=OCPP_ConnectionLogDBContext;persist security info=True;user id=sa;password=Ph0930118811;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient" />
-    <add name="MainDBContext" connectionString="data source=172.1.0.142\SQLEXPRESS;initial catalog=OCPP_MainDBContext;;persist security info=True;user id=sa;password=Ph0930118811;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient" />
-    <add name="MeterValueDBContext" connectionString="data source=172.1.0.142\SQLEXPRESS;initial catalog=OCPP_MeterValueDBContext;;persist security info=True;user id=sa;password=Ph0930118811;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient" />
+    <add name="ConnectionLogDBContext" connectionString="data source=172.1.2.187\SQLEXPRESS2017;initial catalog=StandardOCPP_ConnectionLog;persist security info=True;user id=sa;password=Ph0930118811;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient" />
+    <add name="MainDBContext" connectionString="data source=172.1.2.187\SQLEXPRESS2017;initial catalog=StandardOCPP_Main;;persist security info=True;user id=sa;password=Ph0930118811;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient" />
+    <add name="MeterValueDBContext" connectionString="data source=172.1.2.187\SQLEXPRESS2017;initial catalog=StandardOCPP_MeterValue;;persist security info=True;user id=sa;password=Ph0930118811;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient" />
   </connectionStrings>
 </configuration>

+ 29 - 0
EVCB_OCPP.Domain/ConnectionLogContextMigrations/201912160853002_Add_Fields_IsSent.Designer.cs

@@ -0,0 +1,29 @@
+// <auto-generated />
+namespace EVCB_OCPP.Domain.ConnectionLogContextMigrations
+{
+    using System.CodeDom.Compiler;
+    using System.Data.Entity.Migrations;
+    using System.Data.Entity.Migrations.Infrastructure;
+    using System.Resources;
+    
+    [GeneratedCode("EntityFramework.Migrations", "6.2.0-61023")]
+    public sealed partial class Add_Fields_IsSent : IMigrationMetadata
+    {
+        private readonly ResourceManager Resources = new ResourceManager(typeof(Add_Fields_IsSent));
+        
+        string IMigrationMetadata.Id
+        {
+            get { return "201912160853002_Add_Fields_IsSent"; }
+        }
+        
+        string IMigrationMetadata.Source
+        {
+            get { return null; }
+        }
+        
+        string IMigrationMetadata.Target
+        {
+            get { return Resources.GetString("Target"); }
+        }
+    }
+}

+ 18 - 0
EVCB_OCPP.Domain/ConnectionLogContextMigrations/201912160853002_Add_Fields_IsSent.cs

@@ -0,0 +1,18 @@
+namespace EVCB_OCPP.Domain.ConnectionLogContextMigrations
+{
+    using System;
+    using System.Data.Entity.Migrations;
+    
+    public partial class Add_Fields_IsSent : DbMigration
+    {
+        public override void Up()
+        {
+            AddColumn("dbo.MachineConnectionLog", "IsSent", c => c.Boolean(nullable: false));
+        }
+        
+        public override void Down()
+        {
+            DropColumn("dbo.MachineConnectionLog", "IsSent");
+        }
+    }
+}

+ 126 - 0
EVCB_OCPP.Domain/ConnectionLogContextMigrations/201912160853002_Add_Fields_IsSent.resx

@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <data name="Target" xml:space="preserve">
+    <value>H4sIAAAAAAAEAM1Yy27jNhTdF+g/CFpnLNtpB9NAnkEsJ4XRODZGmWwLWrqWiVKkKlKB/W1d9JP6C73U++VX6haFNxbJe+778Ep//fGn/WUXMuMNYkkFn5ijwdA0gHvCpzyYmInafPhkfvn8/Xf2gx/ujNfi3K0+h5JcTsytUtGdZUlvCyGRg5B6sZBiowaeCC3iC2s8HP5kjUYWIISJWIZhf024oiGkD/joCO5BpBLCFsIHJvN13HFTVOOZhCAj4sHEfHh1pr8undVqMBMhodw07hklaIcLbGMahHOhiEIr775JcFUseOBGuEDYyz4CPLchTEJu/V11/FxHhmPtiFUJFlBeIhVadBng6DaPjNUWf1d8zTJyGLsHjLHaa6/T+E3MBfG2lANGm4OndTyJwDTaiu8cFmuhbqgHWXYGM6LImkgY9AHeGG2xm7JusLz078ZwEqaSGCYcEhUTdmOskjWj3i+wfxG/AZ/whLG6L+gN7jUWcGkViwhitf8Km9zDuW8aVlPOaguWYjWZzN85Vx9/MI1nVE7WDMpSqcXGVSKGn4FDTBT4K6IUxFxjQBrsjvaWLmdL4gCmYlcpxRLFXjONBdk9AQ/UFrtw/Mk0HukO/GIlN+Qbp9iaKKTiBE7pWoCUJACt5YiuH4dXUKUL4oiO24/Da2hZyOCIkvFVdDgx6MQueaEJXYMXpKqesjiONJcu1kQBMxWCAeEnUGyr6tluJ2ObKWwniAtb6203m+pt2KmehkYizHta5lFoWp7Bu6CO8kRlWsa1vd3f709peUXsVsbsxQ1gHbgC7AWJIkx17UrIVww3uw+cD+7lVBlmGJYnexiztLbUhE2PndTa1Qnw4ZHGUhWEaBqOH/Yc683TgRwUSo+kos2DVWYKYf0/A+hy+BmIVZQf0fEQ6ziNAZRGnmdYCuR6hJG4h3MdwZKQH+LtY9INFq3DNDbOx2swZR2vsXE+XkaHdaBs5QKLNNU1LJHBRRGqaKwRn2r5fKyCyBr5yte6KLbVqpx2sVqdam3d1+1OOMYn7SOl9pJXWvxh5718es7sNHd2xDQwPG/U143t7qWCMB2HBu7vzGE0DUpxYEE43YBU2UiDF9Ro3BpW/z+DoyWlz94xPf7nM9qaBlQH+eQgduF13TOZ8TcSe7jcnc0q7HcOYr3QehS7DLk+d/VCZpPXheZWY1Yv5vhyyM5U5eOj+udT1ZqqK09U7Qv9XxyUMj7BWKwF+pN5cNWRqkt1tlV/8bZnIGlQQdiV2gq0ODPnG1HkAgNQt6g40il7RTDP5D5WdEM8hdsedkI6t78SlujhJFyDP+fLREWJupcSwjVrvEPZ1nH96dzYtNleRvpJXsMFNJPqUl3yaUKZX9r92FNoByB0SeU0hVbhewvCBfsS6VnwM4Hy8M0gAq5J7gXCiCGYXHKXvMF7bMP3gicIiLcvbqzDIKcT0Qy7PaMkiEkoc4xKXn9MsvTXpM9/AxKzJ/V/EgAA</value>
+  </data>
+  <data name="DefaultSchema" xml:space="preserve">
+    <value>dbo</value>
+  </data>
+</root>

+ 3 - 1
EVCB_OCPP.Domain/Doc/ReadMe.txt

@@ -9,4 +9,6 @@ Enable-Migrations -ContextTypeName EVCB_OCPP.Domain.MainDBContext -MigrationsDir
 Add-Migrations ¤èªk: Add-Migration XXXX  -ConfigurationTypeName MainDBConfiguration
 
 
-update-database -script  ¤èªk : update-database -ConfigurationTypeName MainDBConfiguration
+MainDB update-database -script  ¤èªk : update-database -script -ConfigurationTypeName MainDBConfiguration
+MeterValueDB update-database -script  ¤èªk : update-database -script -ConfigurationTypeName MeterValueDBConfiguration
+ConnectionLog update-database -script  ¤èªk : update-database -script -ConfigurationTypeName ConnectionLogConfiguration

+ 28 - 0
EVCB_OCPP.Domain/EVCB_OCPP.Domain.csproj

@@ -66,6 +66,10 @@
     <Compile Include="ConnectionLogContextMigrations\201907310241245_Add_ChargeBoxId.Designer.cs">
       <DependentUpon>201907310241245_Add_ChargeBoxId.cs</DependentUpon>
     </Compile>
+    <Compile Include="ConnectionLogContextMigrations\201912160853002_Add_Fields_IsSent.cs" />
+    <Compile Include="ConnectionLogContextMigrations\201912160853002_Add_Fields_IsSent.Designer.cs">
+      <DependentUpon>201912160853002_Add_Fields_IsSent.cs</DependentUpon>
+    </Compile>
     <Compile Include="ConnectionLogContextMigrations\Configuration.cs" />
     <Compile Include="ConnectionLogDBContext.cs" />
     <Compile Include="MainDBContext.cs" />
@@ -133,6 +137,18 @@
     <Compile Include="MainDBContextMigrations\201908020541195_Modified-MachineOperateRecord-EVSE_ValueMax.Designer.cs">
       <DependentUpon>201908020541195_Modified-MachineOperateRecord-EVSE_ValueMax.cs</DependentUpon>
     </Compile>
+    <Compile Include="MainDBContextMigrations\201908160852420_Add_CustomerFTP_ServerMessageUpdateOn.cs" />
+    <Compile Include="MainDBContextMigrations\201908160852420_Add_CustomerFTP_ServerMessageUpdateOn.Designer.cs">
+      <DependentUpon>201908160852420_Add_CustomerFTP_ServerMessageUpdateOn.cs</DependentUpon>
+    </Compile>
+    <Compile Include="MainDBContextMigrations\201909170249297_Add_Machine_ConnectionType.cs" />
+    <Compile Include="MainDBContextMigrations\201909170249297_Add_Machine_ConnectionType.Designer.cs">
+      <DependentUpon>201909170249297_Add_Machine_ConnectionType.cs</DependentUpon>
+    </Compile>
+    <Compile Include="MainDBContextMigrations\201912170616522_Modify_ServerMessage_MachineOperate_FieldLength.cs" />
+    <Compile Include="MainDBContextMigrations\201912170616522_Modify_ServerMessage_MachineOperate_FieldLength.Designer.cs">
+      <DependentUpon>201912170616522_Modify_ServerMessage_MachineOperate_FieldLength.cs</DependentUpon>
+    </Compile>
     <Compile Include="MainDBContextMigrations\Configuration.cs" />
     <Compile Include="MeterValueDBContext.cs" />
     <Compile Include="MeterValueDBContextMigrations\201907150814558_Init.cs" />
@@ -198,6 +214,9 @@
     <EmbeddedResource Include="ConnectionLogContextMigrations\201907310241245_Add_ChargeBoxId.resx">
       <DependentUpon>201907310241245_Add_ChargeBoxId.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="ConnectionLogContextMigrations\201912160853002_Add_Fields_IsSent.resx">
+      <DependentUpon>201912160853002_Add_Fields_IsSent.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="MainDBContextMigrations\201907180821556_Init.resx">
       <DependentUpon>201907180821556_Init.cs</DependentUpon>
     </EmbeddedResource>
@@ -246,6 +265,15 @@
     <EmbeddedResource Include="MainDBContextMigrations\201908020541195_Modified-MachineOperateRecord-EVSE_ValueMax.resx">
       <DependentUpon>201908020541195_Modified-MachineOperateRecord-EVSE_ValueMax.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="MainDBContextMigrations\201908160852420_Add_CustomerFTP_ServerMessageUpdateOn.resx">
+      <DependentUpon>201908160852420_Add_CustomerFTP_ServerMessageUpdateOn.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="MainDBContextMigrations\201909170249297_Add_Machine_ConnectionType.resx">
+      <DependentUpon>201909170249297_Add_Machine_ConnectionType.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="MainDBContextMigrations\201912170616522_Modify_ServerMessage_MachineOperate_FieldLength.resx">
+      <DependentUpon>201912170616522_Modify_ServerMessage_MachineOperate_FieldLength.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="MeterValueDBContextMigrations\201907150814558_Init.resx">
       <DependentUpon>201907150814558_Init.cs</DependentUpon>
     </EmbeddedResource>

+ 29 - 0
EVCB_OCPP.Domain/MainDBContextMigrations/201908160852420_Add_CustomerFTP_ServerMessageUpdateOn.Designer.cs

@@ -0,0 +1,29 @@
+// <auto-generated />
+namespace EVCB_OCPP.Domain.MainDBContextMigrations
+{
+    using System.CodeDom.Compiler;
+    using System.Data.Entity.Migrations;
+    using System.Data.Entity.Migrations.Infrastructure;
+    using System.Resources;
+    
+    [GeneratedCode("EntityFramework.Migrations", "6.2.0-61023")]
+    public sealed partial class Add_CustomerFTP_ServerMessageUpdateOn : IMigrationMetadata
+    {
+        private readonly ResourceManager Resources = new ResourceManager(typeof(Add_CustomerFTP_ServerMessageUpdateOn));
+        
+        string IMigrationMetadata.Id
+        {
+            get { return "201908160852420_Add_CustomerFTP_ServerMessageUpdateOn"; }
+        }
+        
+        string IMigrationMetadata.Source
+        {
+            get { return null; }
+        }
+        
+        string IMigrationMetadata.Target
+        {
+            get { return Resources.GetString("Target"); }
+        }
+    }
+}

+ 26 - 0
EVCB_OCPP.Domain/MainDBContextMigrations/201908160852420_Add_CustomerFTP_ServerMessageUpdateOn.cs

@@ -0,0 +1,26 @@
+namespace EVCB_OCPP.Domain.MainDBContextMigrations
+{
+    using System;
+    using System.Data.Entity.Migrations;
+    
+    public partial class Add_CustomerFTP_ServerMessageUpdateOn : DbMigration
+    {
+        public override void Up()
+        {
+            AddColumn("dbo.Customer", "FTPPath", c => c.String());
+            AddColumn("dbo.Customer", "FTPHost", c => c.String(maxLength: 50));
+            AddColumn("dbo.Customer", "FTPUser", c => c.String(maxLength: 20));
+            AddColumn("dbo.Customer", "FTPPassword", c => c.String(maxLength: 20));
+            AddColumn("dbo.ServerMessage", "UpdatedOn", c => c.DateTime(nullable: false));
+        }
+        
+        public override void Down()
+        {
+            DropColumn("dbo.ServerMessage", "UpdatedOn");
+            DropColumn("dbo.Customer", "FTPPassword");
+            DropColumn("dbo.Customer", "FTPUser");
+            DropColumn("dbo.Customer", "FTPHost");
+            DropColumn("dbo.Customer", "FTPPath");
+        }
+    }
+}

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 120 - 0
EVCB_OCPP.Domain/MainDBContextMigrations/201908160852420_Add_CustomerFTP_ServerMessageUpdateOn.resx


+ 29 - 0
EVCB_OCPP.Domain/MainDBContextMigrations/201909170249297_Add_Machine_ConnectionType.Designer.cs

@@ -0,0 +1,29 @@
+// <auto-generated />
+namespace EVCB_OCPP.Domain.MainDBContextMigrations
+{
+    using System.CodeDom.Compiler;
+    using System.Data.Entity.Migrations;
+    using System.Data.Entity.Migrations.Infrastructure;
+    using System.Resources;
+    
+    [GeneratedCode("EntityFramework.Migrations", "6.2.0-61023")]
+    public sealed partial class Add_Machine_ConnectionType : IMigrationMetadata
+    {
+        private readonly ResourceManager Resources = new ResourceManager(typeof(Add_Machine_ConnectionType));
+        
+        string IMigrationMetadata.Id
+        {
+            get { return "201909170249297_Add_Machine_ConnectionType"; }
+        }
+        
+        string IMigrationMetadata.Source
+        {
+            get { return null; }
+        }
+        
+        string IMigrationMetadata.Target
+        {
+            get { return Resources.GetString("Target"); }
+        }
+    }
+}

+ 18 - 0
EVCB_OCPP.Domain/MainDBContextMigrations/201909170249297_Add_Machine_ConnectionType.cs

@@ -0,0 +1,18 @@
+namespace EVCB_OCPP.Domain.MainDBContextMigrations
+{
+    using System;
+    using System.Data.Entity.Migrations;
+    
+    public partial class Add_Machine_ConnectionType : DbMigration
+    {
+        public override void Up()
+        {
+            AddColumn("dbo.Machine", "ConnectionType", c => c.Int(nullable: false));
+        }
+        
+        public override void Down()
+        {
+            DropColumn("dbo.Machine", "ConnectionType");
+        }
+    }
+}

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 120 - 0
EVCB_OCPP.Domain/MainDBContextMigrations/201909170249297_Add_Machine_ConnectionType.resx


+ 29 - 0
EVCB_OCPP.Domain/MainDBContextMigrations/201912170616522_Modify_ServerMessage_MachineOperate_FieldLength.Designer.cs

@@ -0,0 +1,29 @@
+// <auto-generated />
+namespace EVCB_OCPP.Domain.MainDBContextMigrations
+{
+    using System.CodeDom.Compiler;
+    using System.Data.Entity.Migrations;
+    using System.Data.Entity.Migrations.Infrastructure;
+    using System.Resources;
+    
+    [GeneratedCode("EntityFramework.Migrations", "6.2.0-61023")]
+    public sealed partial class Modify_ServerMessage_MachineOperate_FieldLength : IMigrationMetadata
+    {
+        private readonly ResourceManager Resources = new ResourceManager(typeof(Modify_ServerMessage_MachineOperate_FieldLength));
+        
+        string IMigrationMetadata.Id
+        {
+            get { return "201912170616522_Modify_ServerMessage_MachineOperate_FieldLength"; }
+        }
+        
+        string IMigrationMetadata.Source
+        {
+            get { return null; }
+        }
+        
+        string IMigrationMetadata.Target
+        {
+            get { return Resources.GetString("Target"); }
+        }
+    }
+}

+ 20 - 0
EVCB_OCPP.Domain/MainDBContextMigrations/201912170616522_Modify_ServerMessage_MachineOperate_FieldLength.cs

@@ -0,0 +1,20 @@
+namespace EVCB_OCPP.Domain.MainDBContextMigrations
+{
+    using System;
+    using System.Data.Entity.Migrations;
+    
+    public partial class Modify_ServerMessage_MachineOperate_FieldLength : DbMigration
+    {
+        public override void Up()
+        {
+            AlterColumn("dbo.MachineOperateRecord", "RequestContent", c => c.String());
+            AlterColumn("dbo.ServerMessage", "OutRequest", c => c.String());
+        }
+        
+        public override void Down()
+        {
+            AlterColumn("dbo.ServerMessage", "OutRequest", c => c.String(maxLength: 500));
+            AlterColumn("dbo.MachineOperateRecord", "RequestContent", c => c.String(maxLength: 200));
+        }
+    }
+}

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 120 - 0
EVCB_OCPP.Domain/MainDBContextMigrations/201912170616522_Modify_ServerMessage_MachineOperate_FieldLength.resx


+ 26 - 1
EVCB_OCPP.Domain/Models/Database/Customer.cs

@@ -32,7 +32,8 @@ namespace EVCB_OCPP.Domain.Models.Database
         public DateTime? UpdatedOn { get; set; }
 
         [StringLength(50)]       
-        public string UpdatedBy { get; set; }        
+        public string UpdatedBy { get; set; }     
+        
 
         /// <summary>
         /// 對方的api Url
@@ -77,6 +78,30 @@ namespace EVCB_OCPP.Domain.Models.Database
         /// </summary>
         public bool IsShow { get; set; }
 
+        /// <summary>
+        /// FTP 網址
+        /// </summary>
+        public string FTPPath { set; get; }
+
+
+        /// <summary>
+        /// FTP Host  ftp://user:password @host:port/path
+        /// </summary>
+        [StringLength(50)]
+        public string FTPHost { set; get; }
+
+        /// <summary>
+        /// FTP user
+        /// </summary>
+        [StringLength(20)]
+        public string FTPUser { set; get; }
+
+        /// <summary>
+        /// FTP password
+        /// </summary>
+        [StringLength(20)]
+        public string FTPPassword { set; get; }
+
         public Customer()
         {
             Id = Guid.NewGuid();

+ 9 - 5
EVCB_OCPP.Domain/Models/Database/Machine.cs

@@ -139,9 +139,7 @@
         /// <summary>
         /// 機器回報的韌體版本編號
         /// </summary>
-        public int? FW_VersionReport { get; set; }
-
-       
+        public int? FW_VersionReport { get; set; }      
 
       
 
@@ -161,8 +159,14 @@
         /// </summary>
         public bool Online { get; set; }
 
-     
-    
+        /// <summary>
+        /// 電樁連線方式 
+        /// 0:unknown 
+        /// 1:1.6J with http  
+        /// 2:1.6J with https 
+        /// </summary>       
+        public int ConnectionType { get; set; }
+
 
         /// <summary>
         /// 機器的模組 Ref MachineModel

+ 11 - 0
EVCB_OCPP.Domain/Models/Database/MachineConnectionLog.cs

@@ -12,6 +12,12 @@ namespace EVCB_OCPP.Domain.Models.Database
     [Table("MachineConnectionLog")]
     public class MachineConnectionLog
     {
+
+        public MachineConnectionLog()
+        {
+            IsSent = false;
+        }
+
         public Int64 Id { set; get; }
 
         [StringLength(128)]
@@ -42,5 +48,10 @@ namespace EVCB_OCPP.Domain.Models.Database
         /// 產生時間
         /// </summary>       
         public DateTime CreatedOn { get; set; }
+
+        /// <summary>
+        /// 傳出訊息
+        /// </summary>
+        public bool IsSent { set; get; }
     }
 }

+ 1 - 2
EVCB_OCPP.Domain/Models/Database/MachineOperateRecord.cs

@@ -49,8 +49,7 @@ namespace EVCB_OCPP.Domain.Models.Database
 
         /// <summary>
         /// 請求內容
-        /// </summary>
-        [StringLength(200)]
+        /// </summary> 
         public string RequestContent { get; set; }
 
 

+ 11 - 6
EVCB_OCPP.Domain/Models/Database/ServerMessage.cs

@@ -18,6 +18,7 @@ namespace EVCB_OCPP.Domain.Models.Database
         public ServerMessage()
         {
             ReceivedOn = new DateTime(1991, 1, 1);
+            UpdatedOn = new DateTime(1991, 1, 1);
         }
 
         [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
@@ -34,7 +35,7 @@ namespace EVCB_OCPP.Domain.Models.Database
         /// <summary>
         /// 隨機序號
         /// </summary>
-        [StringLength(36)]     
+        [StringLength(36)]
         public string SerialNo { get; set; }
 
 
@@ -47,20 +48,24 @@ namespace EVCB_OCPP.Domain.Models.Database
         /// <summary>
         /// 輸入傳送資料
         /// </summary>
-        [StringLength(500)]   
         public string OutRequest { get; set; }
 
         /// <summary>
         /// 收到傳送資料
         /// </summary>      
-        public string InMessage { get; set; }     
+        public string InMessage { get; set; }
+
 
-      
         public DateTime CreatedOn { get; set; }
 
         [StringLength(36)]
-        public string CreatedBy { get; set; }      
-      
+        public string CreatedBy { get; set; }
+
+        /// <summary>
+        /// 更新輸入指令
+        /// </summary>
+        public DateTime UpdatedOn { get; set; }
+
 
         /// <summary>
         /// 收到輸入指令

+ 64 - 0
EVCB_OCPP.Packet/Features/StandardConfiguration.cs

@@ -105,5 +105,69 @@ namespace OCPPPackage.Profiles
         #endregion
 
 
+        public static readonly List<string> CoreProfileConfigs_1of2 = new List<string>()
+        {
+           AllowOfflineTxForUnknownId,
+           AuthorizationCacheEnabled,
+           AuthorizeRemoteTxRequests,
+           BlinkRepeat,
+           ClockAlignedDataInterval,
+           ConnectionTimeOut,
+           ConnectorPhaseRotation,
+           ConnectorPhaseRotationMaxLength,
+           GetConfigurationMaxKeys,
+           HeartbeatInterval,
+           LightIntensity,
+           LocalAuthorizeOffline,
+           LocalPreAuthorize,
+           MaxEnergyOnInvalidId,
+           MeterValuesAlignedData,
+           MeterValuesAlignedDataMaxLength,
+           MeterValuesSampledData,
+           MeterValuesSampledDataMaxLength,
+          
+
+        };
+
+        public static readonly List<string> CoreProfileConfigs_2of2 = new List<string>()
+        {
+    
+           MeterValueSampleInterval,
+           MinimumStatusDuration,
+           NumberOfConnectors,
+           MinimumStatusDuration,
+           ResetRetries,
+           StopTransactionOnEVSideDisconnect,
+           StopTransactionOnInvalidId,
+           StopTxnAlignedData,
+           StopTxnAlignedDataMaxLength,
+           StopTxnSampledData,
+           StopTxnSampledDataMaxLength,
+           SupportedFeatureProfiles,
+           SupportedFeatureProfilesMaxLength,
+           TransactionMessageAttempts,
+           TransactionMessageRetryInterval,
+           UnlockConnectorOnEVSideDisconnect,
+           WebSocketPingInterval
+
+        };
+
+
+        public static readonly List<string> OtherConfigs = new List<string>()
+        {
+           LocalAuthListEnabled,
+           LocalAuthListMaxLength,
+           SendLocalListMaxLength,
+           ReserveConnectorZeroSupported,
+           ChargeProfileMaxStackLevel,
+           ChargingScheduleAllowedChargingRateUnit,
+           ChargingScheduleMaxPeriods,
+           ConnectorSwitch3to1PhaseSupported,
+           MaxChargingProfilesInstalled,
+
+        };
+
+       
+
     }
 }

+ 1 - 1
EVCB_OCPP.Packet/Messages/SubTypes/AvailabilityStatus.cs

@@ -11,7 +11,7 @@ namespace EVCB_OCPP.Packet.Messages.SubTypes
         /// <summary>
         /// 接受請求,馬上執行變更
         /// </summary>
-        Accepted,
+        Accepted=1,
         /// <summary>
         /// 拒絕請求
         /// </summary>

+ 1 - 1
EVCB_OCPP.Packet/Messages/SubTypes/CancelReservationStatus.cs

@@ -8,7 +8,7 @@ namespace EVCB_OCPP.Packet.Messages.SubTypes
 {
     public enum CancelReservationStatus
     {
-        Accepted,
+        Accepted=1,
         Rejected
     }
 }

+ 1 - 1
EVCB_OCPP.Packet/Messages/SubTypes/ChargePointErrorCode.cs

@@ -8,7 +8,7 @@ namespace EVCB_OCPP.Packet.Messages.SubTypes
 {
     public enum ChargePointErrorCode
     {
-        ConnectorLockFailure,
+        ConnectorLockFailure=1,
         EVCommunicationError,
         GroundFailure,
         HighTemperature,

+ 4 - 4
EVCB_OCPP.Packet/Messages/SubTypes/ChargePointStatus.cs

@@ -8,12 +8,12 @@ namespace EVCB_OCPP.Packet.Messages.SubTypes
 {
     public enum ChargePointStatus
     {
-        Available,
+        Available=1,
         Preparing,
         Charging,
-        SuspendedEVSE=8,
-        SuspendedEV=3,
-        Finishing=3,
+        SuspendedEVSE,
+        SuspendedEV,
+        Finishing,
         Unavailable,
         Reserved,
         Faulted

+ 1 - 1
EVCB_OCPP.Packet/Messages/SubTypes/ChargingProfileStatus.cs

@@ -8,7 +8,7 @@ namespace EVCB_OCPP.Packet.Messages.SubTypes
 {
     public enum ChargingProfileStatus
     {
-        Accepted,
+        Accepted=1,
         Rejected,
         NotSupported
     }

+ 1 - 1
EVCB_OCPP.Packet/Messages/SubTypes/ClearCacheStatus.cs

@@ -11,7 +11,7 @@ namespace EVCB_OCPP.Packet.Messages.SubTypes
         /// <summary>
         /// 命令已執行
         /// </summary>
-        Accepted,
+        Accepted=1,
         /// <summary>
         /// 命令不執行
         /// </summary>

+ 1 - 1
EVCB_OCPP.Packet/Messages/SubTypes/ClearChargingProfileStatus.cs

@@ -8,7 +8,7 @@ namespace EVCB_OCPP.Packet.Messages.SubTypes
 {
     public enum ClearChargingProfileStatus
     {
-        Accepted,
+        Accepted=1,
         Unknown,
         NotSupported
     }

+ 1 - 1
EVCB_OCPP.Packet/Messages/SubTypes/ConfigurationStatus.cs

@@ -11,7 +11,7 @@ namespace EVCB_OCPP.Packet.Messages.SubTypes
         /// <summary>
         /// 接受請求,馬上執行變更
         /// </summary>
-        Accepted,
+        Accepted=1,
         /// <summary>
         /// 拒絕請求
         /// </summary>

+ 3 - 2
EVCB_OCPP.Packet/Messages/SubTypes/FirmwareStatus.cs

@@ -8,12 +8,13 @@ namespace EVCB_OCPP.Packet.Messages.SubTypes
 {
     public enum FirmwareStatus
     {
+        Installed=1,
         Downloaded,
         DownloadFailed,
         Downloading,
         Idle,
         InstallationFailed,
-        Installing,
-        Installed
+        Installing
+        
     }
 }

+ 1 - 1
EVCB_OCPP.Packet/Messages/SubTypes/GetCompositeScheduleStatus.cs

@@ -8,7 +8,7 @@ namespace EVCB_OCPP.Packet.Messages.SubTypes
 {
     public enum GetCompositeScheduleStatus
     {
-        Accepted,
+        Accepted=1,
         Rejected
     }
 }

+ 1 - 1
EVCB_OCPP.Packet/Messages/SubTypes/ReadingContext.cs

@@ -23,7 +23,7 @@ namespace EVCB_OCPP.Packet.Messages.SubTypes
         Sample_Periodic,
         [EnumMember(Value = "Transaction.Begin")]
         Transaction_Begin,
-        [EnumMember(Value = "Transaction.End.Begin")]
+        [EnumMember(Value = "Transaction.End")]
         Transaction_End,
         Trigger,
     }

+ 1 - 1
EVCB_OCPP.Packet/Messages/SubTypes/RemoteStartStopStatus.cs

@@ -11,7 +11,7 @@ namespace EVCB_OCPP.Packet.Messages.SubTypes
         /// <summary>
         /// Command will be executed.
         /// </summary>
-        Accepted,
+        Accepted=1,
         /// <summary>
         /// Command will not be executed.
         /// </summary>

+ 1 - 1
EVCB_OCPP.Packet/Messages/SubTypes/ReservationStatus.cs

@@ -8,7 +8,7 @@ namespace EVCB_OCPP.Packet.Messages.SubTypes
 {
     public enum ReservationStatus
     {
-        Accepted,
+        Accepted=1,
         Faulted,
         Occupied,
         Rejected,

+ 1 - 1
EVCB_OCPP.Packet/Messages/SubTypes/ResetStatus.cs

@@ -11,7 +11,7 @@ namespace EVCB_OCPP.Packet.Messages.SubTypes
         /// <summary>
         /// Command will be executed.
         /// </summary>
-        Accepted,
+        Accepted=1,
         /// <summary>
         /// Command will not be executed.
         /// </summary>

+ 1 - 1
EVCB_OCPP.Packet/Messages/SubTypes/TriggerMessageStatus.cs

@@ -8,7 +8,7 @@ namespace EVCB_OCPP.Packet.Messages.SubTypes
 {
     public enum TriggerMessageStatus
     {
-        Accepted,
+        Accepted=1,
         Rejected,
         NotImplemented
     }

+ 1 - 1
EVCB_OCPP.Packet/Messages/SubTypes/UnlockStatus.cs

@@ -11,7 +11,7 @@ namespace EVCB_OCPP.Packet.Messages.SubTypes
         /// <summary>
         /// Connector has successfully been unlocked.
         /// </summary>
-        Unlocked,
+        Unlocked=1,
         /// <summary>
         /// Failed to unlock the connector.
         /// </summary>

+ 1 - 1
EVCB_OCPP.Packet/Messages/SubTypes/UpdateStatus.cs

@@ -9,7 +9,7 @@ namespace EVCB_OCPP.Packet.Messages.SubTypes
  
     public enum UpdateStatus
     {
-        Accepted = 0,
+        Accepted = 1,
         Failed,
         NotSupported,
         VersionMismatch

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác