Browse Source

修复绑定广电卡时屏蔽激活奖励的问题

lichunlei 1 năm trước cách đây
mục cha
commit
e02caf80b2
1 tập tin đã thay đổi với 26 bổ sung23 xóa
  1. 26 23
      AppStart/Helper/SycnSpServer/SycnSpBindService.cs

+ 26 - 23
AppStart/Helper/SycnSpServer/SycnSpBindService.cs

@@ -95,43 +95,46 @@ namespace MySystem
                                     pos.Status = 0;
 
                                     //广电卡逻辑
-                                    if (pos.BrandId == 14 && (Bind.Field2.Contains("副卡") || Bind.Field3.Contains("副卡")))
+                                    if(pos.BrandId == 14)
                                     {
-                                        pos.Detail = "1";
-                                    }
-                                    else
-                                    {
-                                        if (Bind.Field3.Contains("元"))
+                                        if (Bind.Field2.Contains("副卡") || Bind.Field3.Contains("副卡"))
+                                        {
+                                            pos.Detail = "1";
+                                        }
+                                        else
                                         {
-                                            string[] data = Bind.Field3.Split(new string[] { "元" }, StringSplitOptions.None);
-                                            string dataTmp = data[0];
-                                            string resultNum = "";
-                                            for (int i = dataTmp.Length - 1; i >= 0; i--)
+                                            if (function.CheckNull(Bind.Field3).Contains("元"))
                                             {
-                                                string checkStr = dataTmp.Substring(i, 1);
-                                                if (function.IsInt(checkStr) || checkStr == ".")
+                                                string[] data = Bind.Field3.Split(new string[] { "元" }, StringSplitOptions.None);
+                                                string dataTmp = data[0];
+                                                string resultNum = "";
+                                                for (int i = dataTmp.Length - 1; i >= 0; i--)
                                                 {
-                                                    resultNum = checkStr + resultNum;
+                                                    string checkStr = dataTmp.Substring(i, 1);
+                                                    if (function.IsInt(checkStr) || checkStr == ".")
+                                                    {
+                                                        resultNum = checkStr + resultNum;
+                                                    }
+                                                    else
+                                                    {
+                                                        break;
+                                                    }
+                                                }
+                                                decimal Deposit = decimal.Parse(function.CheckNum(resultNum));
+                                                if (Deposit > 0)
+                                                {
+                                                    pos.SeoKeyword = Deposit.ToString();
                                                 }
                                                 else
                                                 {
-                                                    break;
+                                                    pos.Detail = "1";
                                                 }
                                             }
-                                            decimal Deposit = decimal.Parse(function.CheckNum(resultNum));
-                                            if (Deposit > 0)
-                                            {
-                                                pos.SeoKeyword = Deposit.ToString();
-                                            }
                                             else
                                             {
                                                 pos.Detail = "1";
                                             }
                                         }
-                                        else
-                                        {
-                                            pos.Detail = "1";
-                                        }
                                     }
 
                                     PxcModels.MachineForMerNo merFor = db.MachineForMerNo.FirstOrDefault(m => m.MerNo == Bind.MerNo);