|
|
@@ -403,13 +403,14 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
for (int i = 1; i < list.Count; i++)
|
|
|
{
|
|
|
JsonData dr = list[i];
|
|
|
- string SeoDescription = dr[0].ToString(); // 退押订单编号
|
|
|
- int Status = int.Parse(dr[1].ToString()); // 审核结果
|
|
|
- var merchantDepositReturns = db.MerchantDepositReturns.FirstOrDefault(m => m.SeoDescription == SeoDescription && m.Status == 0) ?? new MerchantDepositReturns();
|
|
|
- if (true)
|
|
|
+ string PosSn = dr[0].ToString(); // 退押机具Sn
|
|
|
+ int Status = int.Parse(dr[1].ToString()); // 结果
|
|
|
+ string SeoDescription = dr[2].ToString(); // 备注
|
|
|
+ var pos = db.PosMachinesTwo.FirstOrDefault(m => m.PosSn == PosSn) ?? new PosMachinesTwo();
|
|
|
+ var merchantDepositReturns = db.MerchantDepositReturns.FirstOrDefault(m => m.MerchantId == pos.BindMerchantId && m.Status == 0) ?? new MerchantDepositReturns();
|
|
|
+ if (merchantDepositReturns.Id == 0)
|
|
|
{
|
|
|
- merchantDepositReturns.Id = 0;
|
|
|
- error += "以下操作失败" + SeoDescription + ',' + "该订单未找到或不符合规则" + '\n';
|
|
|
+ error += "以下操作失败,机具" + PosSn + ',' + "对应的退押订单" + merchantDepositReturns.SeoKeyword + "该订单未找到或不符合规则" + '\n';
|
|
|
}
|
|
|
if (Status == 1)
|
|
|
{
|
|
|
@@ -425,6 +426,7 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
}
|
|
|
merchantDepositReturns.Status = Status;
|
|
|
merchantDepositReturns.UpdateDate = DateTime.Now;
|
|
|
+ merchantDepositReturns.SeoDescription = SeoDescription;
|
|
|
merchantDepositReturns.SeoTitle = SysUserName + "-" + SysRealName;
|
|
|
}
|
|
|
if (!string.IsNullOrEmpty(error))
|
|
|
@@ -449,13 +451,14 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
for (int i = 1; i < list.Count; i++)
|
|
|
{
|
|
|
JsonData dr = list[i];
|
|
|
- string SeoDescription = dr[0].ToString(); // 退押订单编号
|
|
|
- int Status = int.Parse(dr[1].ToString()); // 审核结果
|
|
|
- var merchantDepositReturns = db.MerchantDepositReturns.FirstOrDefault(m => m.SeoDescription == SeoDescription && m.Status == 0) ?? new MerchantDepositReturns();
|
|
|
- if (true)
|
|
|
+ string PosSn = dr[0].ToString(); // 退押机具Sn
|
|
|
+ int Status = int.Parse(dr[1].ToString()); // 结果
|
|
|
+ string SeoDescription = dr[2].ToString(); // 备注
|
|
|
+ var pos = db.PosMachinesTwo.FirstOrDefault(m => m.PosSn == PosSn) ?? new PosMachinesTwo();
|
|
|
+ var merchantDepositReturns = db.MerchantDepositReturns.FirstOrDefault(m => m.MerchantId == pos.BindMerchantId && m.Status == 0) ?? new MerchantDepositReturns();
|
|
|
+ if (merchantDepositReturns.Id == 0)
|
|
|
{
|
|
|
- merchantDepositReturns.Id = 0;
|
|
|
- error += "以下操作失败" + SeoDescription + ',' + "该订单未找到或不符合规则" + '\n';
|
|
|
+ error += "以下操作失败,机具" + PosSn + ',' + "对应的退押订单" + merchantDepositReturns.SeoKeyword + "该订单未找到或不符合规则" + '\n';
|
|
|
}
|
|
|
if (Status == 1)
|
|
|
{
|
|
|
@@ -471,6 +474,7 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
}
|
|
|
merchantDepositReturns.Status = Status;
|
|
|
merchantDepositReturns.UpdateDate = DateTime.Now;
|
|
|
+ merchantDepositReturns.SeoDescription = SeoDescription;
|
|
|
merchantDepositReturns.SeoTitle = SysUserName + "-" + SysRealName;
|
|
|
}
|
|
|
if (!string.IsNullOrEmpty(error))
|
|
|
@@ -542,7 +546,7 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
}
|
|
|
|
|
|
|
|
|
- Dictionary<string, object> obj = new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).IndexData("MerchantDepositReturns", Fields, "Id desc", "0", 1, 20000, condition, "MerchantId,CreateDate,SeoDescription,AlipayAccountNo", false);
|
|
|
+ Dictionary<string, object> obj = new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).IndexData("MerchantDepositReturns", Fields, "Id desc", "0", 1, 20000, condition, "MerchantId,SeoKeyword,CreateDate,SeoDescription,AlipayAccountNo", false);
|
|
|
List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
|
|
|
foreach (Dictionary<string, object> dic in diclist)
|
|
|
{
|
|
|
@@ -573,7 +577,7 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
ReturnFields.Add("PosSn", "机具Sn");
|
|
|
// ReturnFields.Add("MerchantIdMerchantMobile", "商户手机号");
|
|
|
// ReturnFields.Add("MerchantIdMerIdcardNo", "商户身份证号");
|
|
|
- // ReturnFields.Add("SeoDescription", "退押订单号");
|
|
|
+ ReturnFields.Add("SeoKeyword", "退押订单号");
|
|
|
ReturnFields.Add("AlipayAccountNo", "支付宝账号");
|
|
|
ReturnFields.Add("ReturnAmount", "实际返还金额");
|
|
|
ReturnFields.Add("SeoDescription", "备注");
|
|
|
@@ -617,7 +621,7 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
}
|
|
|
|
|
|
|
|
|
- Dictionary<string, object> obj = new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).IndexData("MerchantDepositReturns", Fields, "Id desc", "0", 1, 20000, condition, "MerchantId,CreateDate,SeoDescription,AlipayAccountNo", false);
|
|
|
+ Dictionary<string, object> obj = new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).IndexData("MerchantDepositReturns", Fields, "Id desc", "0", 1, 20000, condition, "MerchantId,CreateDate,SeoKeyword,SeoDescription,AlipayAccountNo", false);
|
|
|
List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
|
|
|
foreach (Dictionary<string, object> dic in diclist)
|
|
|
{
|
|
|
@@ -649,7 +653,7 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
ReturnFields.Add("PosSn", "机具Sn");
|
|
|
// ReturnFields.Add("MerchantIdMerchantMobile", "商户手机号");
|
|
|
// ReturnFields.Add("MerchantIdMerIdcardNo", "商户身份证号");
|
|
|
- // ReturnFields.Add("SeoDescription", "退押订单号");
|
|
|
+ ReturnFields.Add("SeoKeyword", "退押订单号");
|
|
|
ReturnFields.Add("AlipayAccountNo", "支付宝账号");
|
|
|
ReturnFields.Add("ReturnAmount", "实际返还金额");
|
|
|
ReturnFields.Add("SeoDescription", "备注");
|