Browse Source

修复联动首台机的bug

lichunlei 2 years ago
parent
commit
66dfb8a841
1 changed files with 3 additions and 1 deletions
  1. 3 1
      AppStart/Helper/SycnSpServer/SycnSpTradeService.cs

+ 3 - 1
AppStart/Helper/SycnSpServer/SycnSpTradeService.cs

@@ -204,15 +204,17 @@ namespace MySystem
                                             PxcModels.PosMerchantInfo merchant = db.PosMerchantInfo.FirstOrDefault(m => m.Id == pos.BindMerchantId);
                                             if(merchant != null)
                                             {
+                                                bool flag = false;
                                                 if(string.IsNullOrEmpty(merchant.MerIdcardNo) && !string.IsNullOrEmpty(trade.Field2))
                                                 {
                                                     merchant.MerIdcardNo = trade.Field2.ToUpper(); //商户身份证号
+                                                    flag = true;
                                                 }
                                                 if(!string.IsNullOrEmpty(trade.Field1))
                                                 {
                                                     merchant.MerchantMobile = trade.Field1; //商户手机号
                                                 }
-                                                if(!string.IsNullOrEmpty(merchant.MerIdcardNo))
+                                                if(flag)
                                                 {
                                                     string startNo = merchant.MerIdcardNo.Substring(0, 6);
                                                     string endNo = merchant.MerIdcardNo.Substring(merchant.MerIdcardNo.Length - 4, 4).ToUpper();