|
|
@@ -220,7 +220,7 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
if (pos.BindingTime != null && pos.ActivationTime != null)
|
|
|
{
|
|
|
TimeSpan ts = pos.ActivationTime.Value - pos.BindingTime.Value;
|
|
|
- if (ts.TotalDays <= 30 || SysUserName == "admin")
|
|
|
+ if (ts.TotalDays <= 30 || SysUserName == "admin" || pos.BrandId == 6)
|
|
|
{
|
|
|
AddAct(pos.Id);
|
|
|
}
|
|
|
@@ -240,7 +240,7 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
if (pos.BindingTime != null && pos.ActivationTime != null)
|
|
|
{
|
|
|
TimeSpan ts = pos.ActivationTime.Value - pos.BindingTime.Value;
|
|
|
- if (ts.TotalDays > 30 && SysUserName != "admin")
|
|
|
+ if (ts.TotalDays > 30 && SysUserName != "admin" && pos.BrandId != 6)
|
|
|
{
|
|
|
return "机具划拨后已超过30天";
|
|
|
}
|
|
|
@@ -942,7 +942,7 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
prizes.Add(50);
|
|
|
}
|
|
|
//9月1日-9月30日立刷机具刷5000激活时额外奖励30元立刷活动奖
|
|
|
- else if (pos.BrandId == 6 && pos.CreditTrade >= 5000M && pos.ActivationTime >= DateTime.Parse("2023-08-31 00:00:00") && pos.ActivationTime < DateTime.Parse("2023-10-01 00:00:00"))
|
|
|
+ if (pos.BrandId == 6 && pos.CreditTrade >= 5000M && pos.ActivationTime >= DateTime.Parse("2023-08-31 00:00:00") && pos.ActivationTime < DateTime.Parse("2023-10-01 00:00:00"))
|
|
|
{
|
|
|
prizes.Add(30);
|
|
|
}
|
|
|
@@ -5589,5 +5589,167 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
}
|
|
|
#endregion
|
|
|
|
|
|
+
|
|
|
+ #region 调整机具服务费
|
|
|
+
|
|
|
+ public IActionResult ChangePosFee(string right)
|
|
|
+ {
|
|
|
+ ViewBag.RightInfo = RightInfo;
|
|
|
+ ViewBag.right = right;
|
|
|
+
|
|
|
+ return View();
|
|
|
+ }
|
|
|
+
|
|
|
+ [HttpPost]
|
|
|
+ public string ChangePosFeeDo(string PosSn, string BrandId, string Deposit)
|
|
|
+ {
|
|
|
+ if (string.IsNullOrEmpty(PosSn))
|
|
|
+ {
|
|
|
+ return "请输入机具SN";
|
|
|
+ }
|
|
|
+ var brandId = int.Parse(BrandId);
|
|
|
+ List<int> SnIds = new List<int>();
|
|
|
+ string[] PosSnList = PosSn.Replace("\r", "").Replace("\n", ",").Split(',');
|
|
|
+ string error = "";
|
|
|
+ foreach (string Sn in PosSnList)
|
|
|
+ {
|
|
|
+ var posInfo = db.PosMachinesTwo.FirstOrDefault(m => m.Status > -1 && m.BindingState == 0 && m.ActivationState == 0 && m.PosSn == Sn && m.BrandId == brandId) ?? new PosMachinesTwo();
|
|
|
+ if (posInfo.Id == 0)
|
|
|
+ {
|
|
|
+ error += "以下操作失败" + Sn + ',' + "不存在或者不符合条件" + '\n';
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ SnIds.Add(posInfo.Id);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (!string.IsNullOrEmpty(error))
|
|
|
+ {
|
|
|
+ return "Warning|" + error;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ foreach (int SnId in SnIds)
|
|
|
+ {
|
|
|
+ var posInfo = db.PosMachinesTwo.FirstOrDefault(m => m.Id == SnId) ?? new PosMachinesTwo();
|
|
|
+ //金控
|
|
|
+ if (posInfo.BrandId == 1 || posInfo.BrandId == 3)
|
|
|
+ {
|
|
|
+ if (Deposit == "0") Deposit = "0";
|
|
|
+ if (Deposit == "99") Deposit = "99";
|
|
|
+ if (Deposit == "199") Deposit = "199";
|
|
|
+ else return "失败,无" + Deposit + "相关服务费设置权限";
|
|
|
+ var info = PublicChangePosFee.SetJKDeposit(SnId.ToString(), Deposit);
|
|
|
+ if (info != "设置成功")
|
|
|
+ {
|
|
|
+ return info;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //开店宝
|
|
|
+ if (posInfo.BrandId == 2)
|
|
|
+ {
|
|
|
+ if (Deposit == "0") Deposit = "470";
|
|
|
+ if (Deposit == "99") Deposit = "471";
|
|
|
+ if (Deposit == "199") Deposit = "472";
|
|
|
+ if (Deposit == "299") Deposit = "473";
|
|
|
+ else return "失败,无" + Deposit + "相关服务费设置权限";
|
|
|
+ var info = PublicChangePosFee.SetJKDeposit(SnId.ToString(), Deposit);
|
|
|
+ if (info != "设置成功")
|
|
|
+ {
|
|
|
+ return info;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //乐刷
|
|
|
+ if (posInfo.BrandId == 4 || posInfo.BrandId == 5)
|
|
|
+ {
|
|
|
+ if (Deposit == "99") Deposit = "100";
|
|
|
+ if (Deposit == "199") Deposit = "200";
|
|
|
+ if (Deposit == "299") Deposit = "300";
|
|
|
+ else return "失败,无" + Deposit + "相关服务费设置权限";
|
|
|
+ var info = PublicChangePosFee.SetJKDeposit(SnId.ToString(), Deposit);
|
|
|
+ if (info != "设置成功")
|
|
|
+ {
|
|
|
+ return info;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //立刷
|
|
|
+ if (posInfo.BrandId == 6)
|
|
|
+ {
|
|
|
+ if (Deposit == "0") Deposit = "0";
|
|
|
+ if (Deposit == "99") Deposit = "99";
|
|
|
+ if (Deposit == "199") Deposit = "199";
|
|
|
+ else return "失败,无" + Deposit + "相关服务费设置权限";
|
|
|
+ var info = PublicChangePosFee.SetJKDeposit(SnId.ToString(), Deposit);
|
|
|
+ if (info != "设置成功")
|
|
|
+ {
|
|
|
+ return info;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //盛付通
|
|
|
+ if (posInfo.BrandId == 7)
|
|
|
+ {
|
|
|
+ if (Deposit == "0") Deposit = "0";
|
|
|
+ if (Deposit == "99") Deposit = "99";
|
|
|
+ if (Deposit == "199") Deposit = "199";
|
|
|
+ if (Deposit == "249") Deposit = "249";
|
|
|
+ else return "失败,无" + Deposit + "相关服务费设置权限";
|
|
|
+ var info = PublicChangePosFee.SetJKDeposit(SnId.ToString(), Deposit);
|
|
|
+ if (info != "设置成功")
|
|
|
+ {
|
|
|
+ return info;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //海科
|
|
|
+ if (posInfo.BrandId == 8 || posInfo.BrandId == 9)
|
|
|
+ {
|
|
|
+ if (Deposit == "99") Deposit = "100";
|
|
|
+ if (Deposit == "199") Deposit = "200";
|
|
|
+ if (Deposit == "299") Deposit = "300";
|
|
|
+ else return "失败,无" + Deposit + "相关服务费设置权限";
|
|
|
+ var info = PublicChangePosFee.SetJKDeposit(SnId.ToString(), Deposit);
|
|
|
+ if (info != "设置成功")
|
|
|
+ {
|
|
|
+ return info;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //联动
|
|
|
+ if (posInfo.BrandId == 10 || posInfo.BrandId == 11)
|
|
|
+ {
|
|
|
+ if (Deposit == "0") Deposit = "0";
|
|
|
+ if (Deposit == "99") Deposit = "99";
|
|
|
+ if (Deposit == "199") Deposit = "199";
|
|
|
+ if (Deposit == "299") Deposit = "299";
|
|
|
+ else return "失败,无" + Deposit + "相关服务费设置权限";
|
|
|
+ var info = PublicChangePosFee.SetJKDeposit(SnId.ToString(), Deposit);
|
|
|
+ if (info != "设置成功")
|
|
|
+ {
|
|
|
+ return info;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //盒易付
|
|
|
+ if (posInfo.BrandId == 12 || posInfo.BrandId == 13)
|
|
|
+ {
|
|
|
+ if (Deposit == "0") Deposit = "0";
|
|
|
+ if (Deposit == "99") Deposit = "99";
|
|
|
+ if (Deposit == "199") Deposit = "199";
|
|
|
+ if (Deposit == "299") Deposit = "299";
|
|
|
+ else return "失败,无" + Deposit + "相关服务费设置权限";
|
|
|
+ var info = PublicChangePosFee.SetJKDeposit(SnId.ToString(), Deposit);
|
|
|
+ if (info != "设置成功")
|
|
|
+ {
|
|
|
+ return info;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ var query = SnIds + ";";
|
|
|
+ function.WriteLog(DateTime.Now.ToString() + ":请求参数," + query + ":" + SysUserName + "-" + SysRealName, "调整机具服务费");
|
|
|
+ db.SaveChanges();
|
|
|
+ db.Dispose();
|
|
|
+ }
|
|
|
+
|
|
|
+ return "success";
|
|
|
+ }
|
|
|
+ #endregion
|
|
|
+
|
|
|
}
|
|
|
}
|