Forráskód Böngészése

更改团组汇率 其他币种字段

leiy 11 hónapja%!(EXTRA string=óta)
szülő
commit
edd81a4aa8

+ 3 - 0
OASystem/OASystem.Api/Controllers/FinancialController.cs

@@ -332,6 +332,9 @@ namespace OASystem.API.Controllers
         {
             try
             {
+                //迁移数据更新团组汇率
+                //Result teamRateData1 = await _teamRateRep.GetGroupRateChangeData();
+
                 Result teamRateData = await _teamRateRep.GetGroupRateDataSource(dto);
                 if (teamRateData.Code != 0)
                 {

+ 1 - 1
OASystem/OASystem.Domain/Entities/Financial/Fin_DailyFeePayment.cs

@@ -21,7 +21,7 @@ namespace OASystem.Domain.Entities.Financial
         /// <summary>
         /// 合计
         /// </summary>
-        [SugarColumn(IsNullable = true,ColumnDataType = "decimal(18,2)")]
+        [SugarColumn(IsNullable = true,ColumnDataType = "decimal(12,2)")]
         public decimal SumPrice { get; set; }
 
         /// <summary>

+ 2 - 2
OASystem/OASystem.Domain/Entities/Financial/Fin_DailyFeePaymentContent.cs

@@ -33,13 +33,13 @@ namespace OASystem.Domain.Entities.Financial
         /// <summary>
         /// 单价
         /// </summary>
-        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(10,2)")]
+        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(12,2)")]
         public decimal Price { get; set; }
 
         /// <summary>
         /// 单项费用合计
         /// </summary>
-        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(18,2)")]
+        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(12,2)")]
         public decimal ItemTotal { get; set; }
 
         

+ 3 - 3
OASystem/OASystem.Domain/Entities/Financial/Fin_ForeignReceivables.cs

@@ -7,7 +7,7 @@ using System.Threading.Tasks;
 namespace OASystem.Domain.Entities.Financial
 {
     /// <summary>
-    /// 财务 - 对外收款账单  
+    /// 财务 - 对外收款账单  
     /// 雷怡 2023-08-14 16:20
     /// </summary>
     [SugarTable("Fin_ForeignReceivables")]
@@ -28,7 +28,7 @@ namespace OASystem.Domain.Entities.Financial
         /// <summary>
         /// 费用
         /// </summary>
-        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(18,2)")]
+        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(12,2)")]
         public decimal Price { get; set; }
 
         /// <summary>
@@ -46,7 +46,7 @@ namespace OASystem.Domain.Entities.Financial
         /// <summary>
         /// 单项总和
         /// </summary>
-        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(18,2)")]
+        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(12,2)")]
         public decimal ItemSumPrice { get; set; }
 
         /// <summary>

+ 1 - 1
OASystem/OASystem.Domain/Entities/Financial/Fin_PaymentRefundAndOtherMoney.cs

@@ -27,7 +27,7 @@ namespace OASystem.Domain.Entities.Financial
         /// <summary>
         /// 费用金额
         /// </summary>
-        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(8,2)")]
+        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(10,2)")]
         public decimal Price { get; set; }
 
         /// <summary>

+ 2 - 2
OASystem/OASystem.Domain/Entities/Financial/Grp_TeamRate.cs

@@ -26,8 +26,8 @@ namespace OASystem.Domain.Entities.Financial
         /// <summary>
         /// 其他汇率名称
         /// </summary>
-        [SugarColumn(IsNullable = true, ColumnDataType = "int")]
-        public int OtherRateId { get; set; }
+        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(20)")]
+        public string OtherRateCode { get; set; }
 
         /// <summary>
         /// 其他汇率金额

+ 15 - 17
OASystem/OASystem.Infrastructure/Repositories/Groups/TeamRateRepository.cs

@@ -96,8 +96,6 @@ namespace OASystem.Infrastructure.Repositories.Groups
 
             Result result = new() { Code = -2 };
 
-
-
             string teamRateInfoSql = string.Format(@"Select * From Grp_TeamRate tr Where tr.IsDel = 0");
 
             var teamRateInfo = await _sqlSugar.SqlQueryable<Grp_TeamRate>(teamRateInfoSql).ToListAsync();
@@ -118,8 +116,8 @@ namespace OASystem.Infrastructure.Repositories.Groups
 
             foreach (Grp_TeamRate item1 in teamRateInfo)
             {
-
                 string rateStr = string.Empty;
+
                 if (item1.RateU != 0) rateStr += "美元(USD):" + item1.RateU + "|";
                 if (item1.RateE != 0) rateStr += "欧元(EUR):" + item1.RateE + "|";
 
@@ -165,29 +163,29 @@ namespace OASystem.Infrastructure.Repositories.Groups
                     rateStr += "卢布(RUB):" + item1.RateRUB + "|";
 
 
-                SetDataInfoView setData = otherCurrencyData1.Where(x => x.Id == item1.OtherRateId).FirstOrDefault();
-                if (setData != null)
+
+                if (!string.IsNullOrEmpty(item1.OtherRateCode))
                 {
-                    if (item1.OtherPrice != 0)
-                        rateStr += string.Format("{0}({1}):{2}", setData.Remark, setData.Name, item1.OtherPrice);
+
+
+                    rateStr += $"{otherCurrencyData1.Find(it => it.Name.Equals(item1.OtherRateCode))?.Remark ?? "Unknown"}({item1.OtherRateCode}):{item1.OtherPrice}|";
+                    
+                    
                 }
-                else
+
+                if (!rateStr.Contains("CNY"))
                 {
-                    if (rateStr.Length > 0)
-                    {
-                        rateStr = rateStr.Substring(0, rateStr.Length - 1);
-                    }
+                    rateStr += "人名币(CNY):1.0000|";
+                }
 
+                if (rateStr.Length > 0)
+                {
+                    rateStr = rateStr.Substring(0, rateStr.Length - 1);
                 }
 
                 item1.Remark = rateStr;
-
-
             }
 
-
-
-
             #endregion
 
             try