Просмотр исходного кода

修复后台辅助工具服务费设置bug

lcl 1 год назад
Родитель
Сommit
43e28066e3
2 измененных файлов с 17 добавлено и 17 удалено
  1. 16 16
      AppStart/PublicChangePosFee.cs
  2. 1 1
      AppStart/PublicFunction.cs

+ 16 - 16
AppStart/PublicChangePosFee.cs

@@ -61,14 +61,14 @@ namespace MySystem
                 {
                     return contentObj["respMsg"].ToString();
                 }
-                var BeforeDeposit = 0;
+                decimal BeforeDeposit = 0;
                 if (string.IsNullOrEmpty(pos.PrizeParams))
                 {
                     BeforeDeposit = 299;
                 }
                 else
                 {
-                    BeforeDeposit = int.Parse(pos.PrizeParams);
+                    BeforeDeposit = decimal.Parse(function.CheckNum(pos.PrizeParams));
                 }
                 decimal amount = decimal.Parse(DepositId);
                 pos.PrizeParams = amount.ToString("f0");
@@ -112,14 +112,14 @@ namespace MySystem
                 }
                 function.WriteLog(DateTime.Now.ToString() + "\n" + content, "开店宝-设置押金-返回报文");
 
-                var BeforeDeposit = 0;
+                decimal BeforeDeposit = 0;
                 if (string.IsNullOrEmpty(pos.PrizeParams))
                 {
                     BeforeDeposit = 299;
                 }
                 else
                 {
-                    BeforeDeposit = int.Parse(pos.PrizeParams);
+                    BeforeDeposit = decimal.Parse(function.CheckNum(pos.PrizeParams));
                 }
                 decimal amount = decimal.Parse(PublicImportDataService.Instance.GetDepositAmount(DepositId));
                 pos.PrizeParams = amount.ToString("f0");
@@ -188,14 +188,14 @@ namespace MySystem
                     return jsonObj["msg"].ToString();
                 }
                 function.WriteLog(DateTime.Now.ToString() + "\n" + content, "乐刷-设置押金-返回报文");
-                var BeforeDeposit = 0;
+                decimal BeforeDeposit = 0;
                 if (string.IsNullOrEmpty(pos.PrizeParams))
                 {
                     BeforeDeposit = 299;
                 }
                 else
                 {
-                    BeforeDeposit = int.Parse(pos.PrizeParams);
+                    BeforeDeposit = decimal.Parse(function.CheckNum(pos.PrizeParams));
                 }
                 decimal amount = decimal.Parse(DepositId);
                 if (pos.BrandId == 4 || pos.BrandId == 5)
@@ -244,7 +244,7 @@ namespace MySystem
                     return jsonObj["ret_msg"].ToString();
                 }
                 function.WriteLog(DateTime.Now.ToString() + "\n" + content, "立刷-设置押金-返回报文");
-                var BeforeDeposit = 0;
+                decimal BeforeDeposit = 0;
                 if (string.IsNullOrEmpty(pos.PrizeParams))
                 {
                     if (RelationClass.GetKqProductBrandInfo(pos.BrandId) == "立刷云电签")
@@ -258,7 +258,7 @@ namespace MySystem
                 }
                 else
                 {
-                    BeforeDeposit = int.Parse(pos.PrizeParams);
+                    BeforeDeposit = decimal.Parse(function.CheckNum(pos.PrizeParams));
                 }
                 pos.PrizeParams = DepositId;
                 db.SaveChanges();
@@ -301,14 +301,14 @@ namespace MySystem
                 {
                     return jsonObj["errorMsg"].ToString();
                 }
-                var BeforeDeposit = 0;
+                decimal BeforeDeposit = 0;
                 if (string.IsNullOrEmpty(pos.PrizeParams))
                 {
                     BeforeDeposit = 299;
                 }
                 else
                 {
-                    BeforeDeposit = int.Parse(pos.PrizeParams);
+                    BeforeDeposit = decimal.Parse(function.CheckNum(pos.PrizeParams));
                 }
                 pos.PrizeParams = DepositId.Replace("2024POS", "");
                 db.SaveChanges();
@@ -377,14 +377,14 @@ namespace MySystem
                     return jsonObj["msg"].ToString();
                 }
                 decimal amount = decimal.Parse(DepositId);
-                var BeforeDeposit = 0;
+                decimal BeforeDeposit = 0;
                 if (string.IsNullOrEmpty(pos.PrizeParams))
                 {
                     BeforeDeposit = 299;
                 }
                 else
                 {
-                    BeforeDeposit = int.Parse(pos.PrizeParams);
+                    BeforeDeposit = decimal.Parse(function.CheckNum(pos.PrizeParams));
                 }
                 if (pos.BrandId == 8 || pos.BrandId == 9)
                 {
@@ -432,14 +432,14 @@ namespace MySystem
                 {
                     return jsonObj["msg"].ToString();
                 }
-                var BeforeDeposit = 0;
+                decimal BeforeDeposit = 0;
                 if (string.IsNullOrEmpty(pos.PrizeParams))
                 {
                     BeforeDeposit = 299;
                 }
                 else
                 {
-                    BeforeDeposit = int.Parse(pos.PrizeParams);
+                    BeforeDeposit = decimal.Parse(function.CheckNum(pos.PrizeParams));
                 }
                 decimal amount = decimal.Parse(DepositId);
                 pos.PrizeParams = amount.ToString("f0");
@@ -487,14 +487,14 @@ namespace MySystem
                 {
                     return jsonObj["errorDesc"].ToString();
                 }
-                var BeforeDeposit = 0;
+                decimal BeforeDeposit = 0;
                 if (string.IsNullOrEmpty(pos.PrizeParams))
                 {
                     BeforeDeposit = 299;
                 }
                 else
                 {
-                    BeforeDeposit = int.Parse(pos.PrizeParams);
+                    BeforeDeposit = decimal.Parse(function.CheckNum(pos.PrizeParams));
                 }
                 decimal amount = decimal.Parse(DepositId);
                 pos.PrizeParams = amount.ToString("f0");

+ 1 - 1
AppStart/PublicFunction.cs

@@ -637,7 +637,7 @@ namespace MySystem
 
 
         #region 设置押金添加记录公共方法
-        public static void MerchantDepositSet(int BrandId, int UserId, int SnId, string SnNo, int BeforeDeposit, decimal DepositAmount, string ReturnNote)
+        public static void MerchantDepositSet(int BrandId, int UserId, int SnId, string SnNo, decimal BeforeDeposit, decimal DepositAmount, string ReturnNote)
         {
             try
             {