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

报表金额修改

yuanrf 9 hónapja%!(EXTRA string=óta)
szülő
commit
a9cee278cc
1 módosított fájl, 4 hozzáadás és 23 törlés
  1. 4 23
      OASystem/OASystem.Api/Controllers/GroupsController.cs

+ 4 - 23
OASystem/OASystem.Api/Controllers/GroupsController.cs

@@ -3669,22 +3669,6 @@ namespace OASystem.API.Controllers
             }
         }
 
-
-        private decimal DecimalToFixed2(decimal num)
-        {
-            string numStr = num.ToString("#0.0000");
-            string num1 = numStr.Split(".")[0];
-            string num2 = numStr.Split(".")[1];
-            string num21 = num2.Substring(0, 2);
-            string num22 = num2.Substring(2, 1);
-
-            var bool1 = int.TryParse(num22, out int num221);
-            decimal res = decimal.Parse($"{num1}.{num21}");
-            if (num221 > 0) res += 0.01M;
-
-            return res;
-        }
-
         /// <summary>
         /// 团组模块 - 出入境费用 - 基础数据源(团组名称/币种类型)
         /// </summary>
@@ -3732,10 +3716,7 @@ namespace OASystem.API.Controllers
                             decimal rate1 = Convert.ToDecimal(rateInfo.FSellPri) / 100.00M;
                             rate1 *= 1.03M;
 
-                            //if (rate1 <= 0.00M) rate1 = 0.00M;
-                            //else rate1 = Math.Round(rate1, 2) + 0.01M;
-
-                            item.Rate = DecimalToFixed2(rate1);
+                            item.Rate = Convert.ToDecimal(rate1.ToString("#0.00")) + 0.01M;
                         }
                     }
                 }
@@ -3792,14 +3773,14 @@ namespace OASystem.API.Controllers
 
                         decimal rate1 = item.Rate;
                         rate1 *= 1.03M;
-                        //if (rate1 <= 0.00M) rate1 = 0.00M;
-                        //else rate1 = Math.Round(rate1, 2) + 0.01M;
+
+                        decimal rate2 = Convert.ToDecimal(rate1.ToString("#0.00")) + 0.01M;
 
                         reteInfos.Add(new
                         {
                             currCode = item.CurrencyCode,
                             currName = item.CurrencyName,
-                            rate = DecimalToFixed2(rate1),
+                            rate = rate2,
                             lastUpdateDt = rateInfo.Date + " " + rateInfo.Time
                         });
                     }