|
@@ -103,7 +103,7 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
[HttpPost]
|
|
[HttpPost]
|
|
|
- public string CheckMachineDo(string MakerCode, string PosSn, string MerNo = "", int AddActPrize = 0)
|
|
|
|
|
|
|
+ public string CheckMachineDo(string MakerCode, string PosSn, string MerNo = "", int AddActPrize = 0, int IsPre = 0)
|
|
|
{
|
|
{
|
|
|
if (string.IsNullOrEmpty(MakerCode))
|
|
if (string.IsNullOrEmpty(MakerCode))
|
|
|
{
|
|
{
|
|
@@ -123,6 +123,17 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
{
|
|
{
|
|
|
return "创客编号不存在";
|
|
return "创客编号不存在";
|
|
|
}
|
|
}
|
|
|
|
|
+ if(IsPre == 1)
|
|
|
|
|
+ {
|
|
|
|
|
+ if(pos.BuyUserId == 0)
|
|
|
|
|
+ {
|
|
|
|
|
+ pos.BuyUserId = user.Id;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(pos.UserId == 0)
|
|
|
|
|
+ {
|
|
|
|
|
+ pos.UserId = user.Id;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
if (pos.BindingState == 0)
|
|
if (pos.BindingState == 0)
|
|
|
{
|
|
{
|
|
|
SpModels.BindRecord bind = spdb.BindRecord.FirstOrDefault(m => m.MerSnNo == PosSn);
|
|
SpModels.BindRecord bind = spdb.BindRecord.FirstOrDefault(m => m.MerSnNo == PosSn);
|
|
@@ -324,8 +335,7 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
pos.BindMerchantId = merchant.Id;
|
|
pos.BindMerchantId = merchant.Id;
|
|
|
}
|
|
}
|
|
|
db.SaveChanges();
|
|
db.SaveChanges();
|
|
|
- RedisDbconn.Instance.Clear("PosMerchantInfo:" + merchant.Id);
|
|
|
|
|
- RedisDbconn.Instance.Clear("PosMachinesTwo:" + pos.Id);
|
|
|
|
|
|
|
+ function.WriteLog(DateTime.Now.ToString() + "\n" + SysUserName + "\nMakerCode:" + MakerCode + ", PosSn:" + PosSn + ", MerNo:" + MerNo + ", AddActPrize:" + AddActPrize + ", IsPre:" + IsPre, "机具补录日志");
|
|
|
return "success";
|
|
return "success";
|
|
|
}
|
|
}
|
|
|
public IActionResult CheckMachine2(string right)
|
|
public IActionResult CheckMachine2(string right)
|