Browse Source

1.TransactionRecord 新增 BillDone 欄位
2.Customer 新增 InstantStopTxReport 欄位

Jessica Tseng 3 years ago
parent
commit
f563a0d461

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

@@ -234,6 +234,10 @@
     <Compile Include="MainDBContextMigrations\202112060214293_Modify_Transaction_ReceiptLength.Designer.cs">
       <DependentUpon>202112060214293_Modify_Transaction_ReceiptLength.cs</DependentUpon>
     </Compile>
+    <Compile Include="MainDBContextMigrations\202203280207328_AddFields_Customer_InstantStopTxReport_Tx_BillingDone.cs" />
+    <Compile Include="MainDBContextMigrations\202203280207328_AddFields_Customer_InstantStopTxReport_Tx_BillingDone.Designer.cs">
+      <DependentUpon>202203280207328_AddFields_Customer_InstantStopTxReport_Tx_BillingDone.cs</DependentUpon>
+    </Compile>
     <Compile Include="MainDBContextMigrations\Configuration.cs" />
     <Compile Include="MeterValueDBContext.cs" />
     <Compile Include="MeterValueDBContextMigrations\201907150814558_Init.cs" />
@@ -418,6 +422,9 @@
     <EmbeddedResource Include="MainDBContextMigrations\202112060214293_Modify_Transaction_ReceiptLength.resx">
       <DependentUpon>202112060214293_Modify_Transaction_ReceiptLength.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="MainDBContextMigrations\202203280207328_AddFields_Customer_InstantStopTxReport_Tx_BillingDone.resx">
+      <DependentUpon>202203280207328_AddFields_Customer_InstantStopTxReport_Tx_BillingDone.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="MeterValueDBContextMigrations\201907150814558_Init.resx">
       <DependentUpon>201907150814558_Init.cs</DependentUpon>
     </EmbeddedResource>

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

+ 20 - 0
EVCB_OCPP.Domain/MainDBContextMigrations/202203280207328_AddFields_Customer_InstantStopTxReport_Tx_BillingDone.cs

@@ -0,0 +1,20 @@
+namespace EVCB_OCPP.Domain.MainDBContextMigrations
+{
+    using System;
+    using System.Data.Entity.Migrations;
+    
+    public partial class AddFields_Customer_InstantStopTxReport_Tx_BillingDone : DbMigration
+    {
+        public override void Up()
+        {
+            AddColumn("dbo.Customer", "InstantStopTxReport", c => c.Boolean(nullable: false));
+            AddColumn("dbo.TransactionRecord", "BillingDone", c => c.Boolean(nullable: false));
+        }
+        
+        public override void Down()
+        {
+            DropColumn("dbo.TransactionRecord", "BillingDone");
+            DropColumn("dbo.Customer", "InstantStopTxReport");
+        }
+    }
+}

File diff suppressed because it is too large
+ 120 - 0
EVCB_OCPP.Domain/MainDBContextMigrations/202203280207328_AddFields_Customer_InstantStopTxReport_Tx_BillingDone.resx


+ 3 - 0
EVCB_OCPP.Domain/Models/Database/Customer.cs

@@ -117,6 +117,9 @@ namespace EVCB_OCPP.Domain.Models.Database
         public string TTIA_APIKey { set; get; }
 
 
+        public bool InstantStopTxReport { set; get; }
+
+
         public Customer()
         {
             Id = Guid.NewGuid();

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

@@ -20,7 +20,7 @@
             StartTime = new DateTime(1991, 1, 1);
             StopTime = new DateTime(1991, 1, 1);
             ReservationId = -1;
-       
+            BillingDone = false;
             CreatedOn = new DateTime(1991, 1, 1);
             UpdatedOn = new DateTime(1991, 1, 1);
             StartTransactionReportedOn = new DateTime(1991, 1, 1);
@@ -36,7 +36,7 @@
         /// </summary>
         [Required]
         public Guid CustomerId { get; set; }
-       
+
 
 
         /// <summary>
@@ -44,7 +44,7 @@
         /// </summary>
         [Required]
         [Index("IX_1202_Issue_Report", Order = 2, IsUnique = true)]
-        public byte ConnectorId { get; set; }   
+        public byte ConnectorId { get; set; }
 
 
 
@@ -91,7 +91,7 @@
         /// </summary>
         public int StopReasonId { set; get; }
 
-        
+
 
         /// <summary>
         /// 開始meter
@@ -103,7 +103,7 @@
         /// 結束meter
         /// </summary>
         [DataType("decimal(16 ,2)")]
-        public decimal MeterStop { get; set; }      
+        public decimal MeterStop { get; set; }
 
         /// <summary>
         /// 產生時間
@@ -114,7 +114,7 @@
         /// 更新時間
         /// </summary>
         public DateTime UpdatedOn { get; set; }
-      
+
 
         /// <summary>
         /// 開始充電的回報時間
@@ -141,6 +141,11 @@
         /// </summary>
         public string ErrorMsg { set; get; }
 
+        /// <summary>
+        /// 計費完成與否
+        /// </summary>
+        public bool BillingDone { set; get; }
+
         /// <summary>
         /// 是否上傳到TTIA
         /// </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("2e4a9e8")]
+[assembly: AssemblyInformationalVersion("ab03686")]

+ 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("69ed52f")]
+[assembly: AssemblyInformationalVersion("ab03686")]

+ 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("69ed52f")]
+[assembly: AssemblyInformationalVersion("ab03686")]

+ 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("69ed52f")]
+[assembly: AssemblyInformationalVersion("ab03686")]

Some files were not shown because too many files changed in this diff