lcl 2 years ago
parent
commit
69748dcc68
1 changed files with 13 additions and 0 deletions
  1. 13 0
      AppStart/Helper/SycnSpServer/SycnSpTradeService.cs

+ 13 - 0
AppStart/Helper/SycnSpServer/SycnSpTradeService.cs

@@ -212,6 +212,19 @@ namespace MySystem
                                                 {
                                                 {
                                                     merchant.MerchantMobile = trade.Field1; //商户手机号
                                                     merchant.MerchantMobile = trade.Field1; //商户手机号
                                                 }
                                                 }
+                                                if(!string.IsNullOrEmpty(merchant.MerIdcardNo))
+                                                {
+                                                    string startNo = merchant.MerIdcardNo.Substring(0, 6);
+                                                    string endNo = merchant.MerIdcardNo.Substring(merchant.MerIdcardNo.Length - 4, 4).ToUpper();
+                                                    string Name = merchant.MerchantName;
+                                                    Name = Name.Replace("*", "");
+                                                    function.WriteLog(DateTime.Now.ToString() + "-----startNo:" + startNo + ",endNo:" + endNo + ",Name:" + Name, "监控机具是否互斥");
+                                                    bool chk = db.PosMerchantInfo.Any(m => m.MerIdcardNo.StartsWith(startNo) && m.MerIdcardNo.EndsWith(endNo) && m.MerchantName.Contains(Name));
+                                                    if(chk)
+                                                    {
+                                                        pos.IsFirst = 0;
+                                                    }
+                                                }
                                                 db.SaveChanges();
                                                 db.SaveChanges();
                                             }
                                             }
                                         }
                                         }