Przeglądaj źródła

1.資料庫異動 TransactionRecord 新增StopReason 文字 (為了與2.0.1一致)保留原有的StopReasonId
2.1.6 Packet Measurand 新增自定義 傳送ChargingCost、TotalCost & Mark 允許空字串判斷的寫法

Jessica Tseng 3 lat temu
rodzic
commit
701a79e54d

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

@@ -238,6 +238,10 @@
     <Compile Include="MainDBContextMigrations\202203280207328_AddFields_Customer_InstantStopTxReport_Tx_BillingDone.Designer.cs">
       <DependentUpon>202203280207328_AddFields_Customer_InstantStopTxReport_Tx_BillingDone.cs</DependentUpon>
     </Compile>
+    <Compile Include="MainDBContextMigrations\202203290753486_AddFields_Tx_StopReason.cs" />
+    <Compile Include="MainDBContextMigrations\202203290753486_AddFields_Tx_StopReason.Designer.cs">
+      <DependentUpon>202203290753486_AddFields_Tx_StopReason.cs</DependentUpon>
+    </Compile>
     <Compile Include="MainDBContextMigrations\Configuration.cs" />
     <Compile Include="MeterValueDBContext.cs" />
     <Compile Include="MeterValueDBContextMigrations\201907150814558_Init.cs" />
@@ -425,6 +429,9 @@
     <EmbeddedResource Include="MainDBContextMigrations\202203280207328_AddFields_Customer_InstantStopTxReport_Tx_BillingDone.resx">
       <DependentUpon>202203280207328_AddFields_Customer_InstantStopTxReport_Tx_BillingDone.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="MainDBContextMigrations\202203290753486_AddFields_Tx_StopReason.resx">
+      <DependentUpon>202203290753486_AddFields_Tx_StopReason.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="MeterValueDBContextMigrations\201907150814558_Init.resx">
       <DependentUpon>201907150814558_Init.cs</DependentUpon>
     </EmbeddedResource>

+ 29 - 0
EVCB_OCPP.Domain/MainDBContextMigrations/202203290753486_AddFields_Tx_StopReason.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 AddFields_Tx_StopReason : IMigrationMetadata
+    {
+        private readonly ResourceManager Resources = new ResourceManager(typeof(AddFields_Tx_StopReason));
+        
+        string IMigrationMetadata.Id
+        {
+            get { return "202203290753486_AddFields_Tx_StopReason"; }
+        }
+        
+        string IMigrationMetadata.Source
+        {
+            get { return null; }
+        }
+        
+        string IMigrationMetadata.Target
+        {
+            get { return Resources.GetString("Target"); }
+        }
+    }
+}

+ 18 - 0
EVCB_OCPP.Domain/MainDBContextMigrations/202203290753486_AddFields_Tx_StopReason.cs

@@ -0,0 +1,18 @@
+namespace EVCB_OCPP.Domain.MainDBContextMigrations
+{
+    using System;
+    using System.Data.Entity.Migrations;
+    
+    public partial class AddFields_Tx_StopReason : DbMigration
+    {
+        public override void Up()
+        {
+            AddColumn("dbo.TransactionRecord", "StopReason", c => c.String(maxLength: 60));
+        }
+        
+        public override void Down()
+        {
+            DropColumn("dbo.TransactionRecord", "StopReason");
+        }
+    }
+}

Plik diff jest za duży
+ 120 - 0
EVCB_OCPP.Domain/MainDBContextMigrations/202203290753486_AddFields_Tx_StopReason.resx


+ 6 - 0
EVCB_OCPP.Domain/Models/Database/TransactionRecord.cs

@@ -91,6 +91,12 @@
         /// </summary>
         public int StopReasonId { set; get; }
 
+        /// <summary>
+        /// 停止原因
+        /// </summary>
+        [StringLength(60)]
+        public string StopReason { set; get; }
+
 
 
         /// <summary>

+ 1 - 1
EVCB_OCPP.Domain/Properties/AssemblyInfo.cs

@@ -35,4 +35,4 @@ using System.Runtime.InteropServices;
 [assembly: AssemblyVersion("0.1.0.0")]
 [assembly: AssemblyFileVersion("0.1.0.0")]
 
-[assembly: AssemblyInformationalVersion("ab03686")]
+[assembly: AssemblyInformationalVersion("f563a0d")]

+ 1 - 1
EVCB_OCPP.MailService/Properties/AssemblyInfo.cs

@@ -35,4 +35,4 @@ using System.Runtime.InteropServices;
 [assembly: AssemblyVersion("0.1.0.0")]
 [assembly: AssemblyFileVersion("0.1.0.0")]
 
-[assembly: AssemblyInformationalVersion("ab03686")]
+[assembly: AssemblyInformationalVersion("f563a0d")]

+ 3 - 2
EVCB_OCPP.Packet/Messages/Core/BootNotificationRequest.cs

@@ -30,8 +30,9 @@ namespace EVCB_OCPP.Packet.Messages.Core
         [MaxLength(25)]
         public string chargePointSerialNumber { set; get; }
 
-        [Required]
-        [MaxLength(20)]
+    
+      //  [Required(AllowEmptyStrings=true)]
+        [MaxLength(20)]     
         public string chargePointVendor { set; get; }
 
       

+ 8 - 0
EVCB_OCPP.Packet/Messages/SubTypes/Measurand.cs

@@ -49,5 +49,13 @@ namespace EVCB_OCPP.Packet.Messages.SubTypes
         SoC,
         Temperature,
         Voltage,
+
+        #region 自定義
+        /// <summary>充電金額</summary>
+        ChargingCost = 50,
+        /// <summary>總金額</summary>
+        TotalCost = 51,
+
+        #endregion
     }
 }

+ 1 - 1
EVCB_OCPP.Packet/Properties/AssemblyInfo.cs

@@ -35,4 +35,4 @@ using System.Runtime.InteropServices;
 [assembly: AssemblyVersion("0.1.0.0")]
 [assembly: AssemblyFileVersion("0.1.0.0")]
 
-[assembly: AssemblyInformationalVersion("ab03686")]
+[assembly: AssemblyInformationalVersion("f563a0d")]

+ 1 - 1
EVCB_OCPP.Packet20/Properties/AssemblyInfo.cs

@@ -33,4 +33,4 @@ using System.Runtime.InteropServices;
 // [assembly: AssemblyVersion("0.1.0.0")]
 [assembly: AssemblyVersion("0.1.0.0")]
 [assembly: AssemblyFileVersion("0.1.0.0")]
-[assembly: AssemblyInformationalVersion("ab03686")]
+[assembly: AssemblyInformationalVersion("f563a0d")]

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików