|
|
@@ -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();
|
|
|
}
|