|
|
@@ -52,7 +52,7 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
/// 商户退押金申请记录列表
|
|
|
/// </summary>
|
|
|
/// <returns></returns>
|
|
|
- public JsonResult IndexData(MerchantDepositReturns data, string StatusSelect, string CreateDateData, int page = 1, int limit = 30)
|
|
|
+ public JsonResult IndexData(MerchantDepositReturns data, string CreateDateData, string StatusSelect = "0", int page = 1, int limit = 30)
|
|
|
{
|
|
|
|
|
|
Dictionary<string, string> Fields = new Dictionary<string, string>();
|
|
|
@@ -90,7 +90,6 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
dic.Remove("MerchantId");
|
|
|
int Status = int.Parse(dic["Status"].ToString());
|
|
|
if (Status == 0) dic["StatusName"] = "待处理";
|
|
|
- if (Status == 3) dic["StatusName"] = "处理中";
|
|
|
if (Status == 1) dic["StatusName"] = "成功";
|
|
|
if (Status == 2) dic["StatusName"] = "失败";
|
|
|
if (Status == 4) dic["StatusName"] = "通过";
|
|
|
@@ -285,16 +284,18 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
{
|
|
|
ExcelData = HttpUtility.UrlDecode(ExcelData);
|
|
|
JsonData list = JsonMapper.ToObject(ExcelData);
|
|
|
+ string error = "";
|
|
|
for (int i = 1; i < list.Count; i++)
|
|
|
{
|
|
|
JsonData dr = list[i];
|
|
|
- int Id = int.Parse(dr[0].ToString()); // 记录Id
|
|
|
- string SeoDescription = dr[1].ToString(); // 退押订单编号
|
|
|
- string AlipayAccountNo = dr[2].ToString(); // 支付宝帐号
|
|
|
- string ReturnAmount = dr[3].ToString(); // 退还金额
|
|
|
- var s = dr[4].ToString();
|
|
|
- int Status = int.Parse(dr[4].ToString()); // 审核结果
|
|
|
- var merchantDepositReturns = db.MerchantDepositReturns.FirstOrDefault(m => m.Id == Id && m.Status == 0) ?? new MerchantDepositReturns();
|
|
|
+ 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)
|
|
|
+ {
|
|
|
+ merchantDepositReturns.Id = 0;
|
|
|
+ error += "以下操作失败" + SeoDescription + ',' + "该订单未找到或不符合规则" + '\n';
|
|
|
+ }
|
|
|
if (Status == 1)
|
|
|
{
|
|
|
Status = 4;
|
|
|
@@ -311,6 +312,10 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
merchantDepositReturns.UpdateDate = DateTime.Now;
|
|
|
merchantDepositReturns.SeoTitle = SysUserName + "-" + SysRealName;
|
|
|
}
|
|
|
+ if (!string.IsNullOrEmpty(error))
|
|
|
+ {
|
|
|
+ return "Warning|" + error;
|
|
|
+ }
|
|
|
db.SaveChanges();
|
|
|
return "success";
|
|
|
}
|