Sfoglia il codice sorgente

Merge branch 'feature-dgy-商户管理新增首台机具查询' into feature-dgy-后台测试

DuGuYang 3 anni fa
parent
commit
f11e06cf4e

+ 3 - 2
Areas/Admin/Controllers/MainServer/PosMerchantInfoListController.cs

@@ -1157,7 +1157,6 @@ namespace MySystem.Areas.Admin.Controllers
         /// <returns></returns>
         public string SetFirstPos(string PosSn)
         {
-            AddSysLog(PosSn, "PosMachinesTwo", "SetFirstPos");
             Dictionary<string, object> Fields = new Dictionary<string, object>();
             var mer = db.PosMerchantInfo.FirstOrDefault(m => m.KqSnNo == PosSn) ?? new PosMerchantInfo();
             string MerchantName = Regex.Replace(mer.MerchantName, @"\d|\W|[A-Za-z]", "");
@@ -1171,9 +1170,10 @@ namespace MySystem.Areas.Admin.Controllers
                 Dictionary<string, object> curData = new Dictionary<string, object>();
                 var posInfo = db.PosMachinesTwo.FirstOrDefault(m => m.PosSn == item.KqSnNo) ?? new PosMachinesTwo();
                 otherdate = posInfo.BindingTime;
-                if (thisdate > otherdate)
+                if (thisdate < otherdate)
                 {
                     changeFlag = 1;
+                    posInfo.IsFirst = 0;
                 }
                 else
                 {
@@ -1182,6 +1182,7 @@ namespace MySystem.Areas.Admin.Controllers
             }
             if (changeFlag == 1)
             {
+                AddSysLog(PosSn, "PosMachinesTwo", "SetFirstPos");
                 pos.IsFirst = 1;
                 db.SaveChanges();
             }