|
|
@@ -51,44 +51,32 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
/// 商户退押金申请记录列表
|
|
|
/// </summary>
|
|
|
/// <returns></returns>
|
|
|
- public JsonResult IndexData(MerchantDepositReturns data, string MerchantIdMerRealName, string MerchantIdMerchantMobile, string MerchantIdMerIdcardNo, string UserIdRealName, string UserIdMakerCode, int page = 1, int limit = 30)
|
|
|
+ public JsonResult IndexData(MerchantDepositReturns data, string StatusSelect, string CreateDateData, int page = 1, int limit = 30)
|
|
|
{
|
|
|
|
|
|
Dictionary<string, string> Fields = new Dictionary<string, string>();
|
|
|
|
|
|
- Fields.Add("CreateDate", "3"); //时间
|
|
|
Fields.Add("AlipayAccountNo", "1"); //支付宝账号
|
|
|
- Fields.Add("OperateMan", "1"); //操作人
|
|
|
+ Fields.Add("OrderNo", "1"); //退押订单号
|
|
|
|
|
|
string condition = " and Status>-1";
|
|
|
- //商户商户真实姓名
|
|
|
- if (!string.IsNullOrEmpty(MerchantIdMerRealName))
|
|
|
+
|
|
|
+ //提现状态
|
|
|
+ if (!string.IsNullOrEmpty(StatusSelect))
|
|
|
{
|
|
|
- condition += " and MerchantId in (select MerchantId from PosMerchantInfoForMerRealName where MerRealName='" + MerchantIdMerRealName + "')";
|
|
|
+ condition += " and Status=" + StatusSelect;
|
|
|
}
|
|
|
- //商户商户手机号
|
|
|
- if (!string.IsNullOrEmpty(MerchantIdMerchantMobile))
|
|
|
+ //创建时间
|
|
|
+ if (!string.IsNullOrEmpty(CreateDateData))
|
|
|
{
|
|
|
- condition += " and MerchantId in (select MerchantId from PosMerchantInfoForMerchantMobile where MerchantMobile='" + MerchantIdMerchantMobile + "')";
|
|
|
- }
|
|
|
- //商户商户身份证号
|
|
|
- if (!string.IsNullOrEmpty(MerchantIdMerIdcardNo))
|
|
|
- {
|
|
|
- condition += " and MerchantId in (select MerchantId from PosMerchantInfoForMerIdcardNo where MerIdcardNo='" + MerchantIdMerIdcardNo + "')";
|
|
|
- }
|
|
|
- //创客真实姓名
|
|
|
- if (!string.IsNullOrEmpty(UserIdRealName))
|
|
|
- {
|
|
|
- condition += " and UserId in (select UserId from UserForRealName where RealName='" + UserIdRealName + "')";
|
|
|
- }
|
|
|
- //创客编号
|
|
|
- if (!string.IsNullOrEmpty(UserIdMakerCode))
|
|
|
- {
|
|
|
- condition += " and UserId in (select UserId from UserForMakerCode where MakerCode='" + UserIdMakerCode + "')";
|
|
|
+ string[] datelist = CreateDateData.Split(new string[] { " - " }, StringSplitOptions.None);
|
|
|
+ string start = datelist[0];
|
|
|
+ string end = datelist[1];
|
|
|
+ condition += " and CreateDate>='" + start + " 00:00:00' and CreateDate<='" + end + " 23:59:59'";
|
|
|
}
|
|
|
|
|
|
|
|
|
- Dictionary<string, object> obj = new AdminContent(_accessor.HttpContext, SystemPublicFuction.dbtables).IndexData("MerchantDepositReturns", Fields, "Id desc", "0", page, limit, condition);
|
|
|
+ Dictionary<string, object> obj = new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).IndexData("MerchantDepositReturns", Fields, "Id desc", "0", page, limit, condition);
|
|
|
List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
|
|
|
foreach (Dictionary<string, object> dic in diclist)
|
|
|
{
|
|
|
@@ -145,7 +133,7 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
Fields.Add("SeoTitle", data.SeoTitle);
|
|
|
Fields.Add("SeoKeyword", data.SeoKeyword);
|
|
|
Fields.Add("SeoDescription", data.SeoDescription);
|
|
|
- int Id = new AdminContent(_accessor.HttpContext, SystemPublicFuction.dbtables).Add("MerchantDepositReturns", Fields, 0);
|
|
|
+ int Id = new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).Add("MerchantDepositReturns", Fields, 0);
|
|
|
AddSysLog(data.Id.ToString(), "MerchantDepositReturns", "add");
|
|
|
db.SaveChanges();
|
|
|
|
|
|
@@ -188,7 +176,7 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
Fields.Add("SeoTitle", data.SeoTitle);
|
|
|
Fields.Add("SeoKeyword", data.SeoKeyword);
|
|
|
Fields.Add("SeoDescription", data.SeoDescription);
|
|
|
- new AdminContent(_accessor.HttpContext, SystemPublicFuction.dbtables).Edit("MerchantDepositReturns", Fields, data.Id);
|
|
|
+ new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).Edit("MerchantDepositReturns", Fields, data.Id);
|
|
|
AddSysLog(data.Id.ToString(), "MerchantDepositReturns", "update");
|
|
|
db.SaveChanges();
|
|
|
|
|
|
@@ -212,7 +200,7 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
int id = int.Parse(subid);
|
|
|
Dictionary<string, object> Fields = new Dictionary<string, object>();
|
|
|
Fields.Add("Status", -1);
|
|
|
- new AdminContent(_accessor.HttpContext, SystemPublicFuction.dbtables).Edit("MerchantDepositReturns", Fields, id);
|
|
|
+ new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).Edit("MerchantDepositReturns", Fields, id);
|
|
|
}
|
|
|
db.SaveChanges();
|
|
|
|
|
|
@@ -236,7 +224,7 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
int id = int.Parse(subid);
|
|
|
Dictionary<string, object> Fields = new Dictionary<string, object>();
|
|
|
Fields.Add("Status", 1);
|
|
|
- new AdminContent(_accessor.HttpContext, SystemPublicFuction.dbtables).Edit("MerchantDepositReturns", Fields, id);
|
|
|
+ new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).Edit("MerchantDepositReturns", Fields, id);
|
|
|
}
|
|
|
db.SaveChanges();
|
|
|
return "success";
|
|
|
@@ -259,7 +247,7 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
int id = int.Parse(subid);
|
|
|
Dictionary<string, object> Fields = new Dictionary<string, object>();
|
|
|
Fields.Add("Status", 0);
|
|
|
- new AdminContent(_accessor.HttpContext, SystemPublicFuction.dbtables).Edit("MerchantDepositReturns", Fields, id);
|
|
|
+ new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).Edit("MerchantDepositReturns", Fields, id);
|
|
|
}
|
|
|
db.SaveChanges();
|
|
|
return "success";
|
|
|
@@ -274,7 +262,7 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
/// <param name="Id"></param>
|
|
|
public string Sort(int Id, int Sort)
|
|
|
{
|
|
|
- new AdminContent(_accessor.HttpContext, SystemPublicFuction.dbtables).Sort("MerchantDepositReturns", Sort, Id);
|
|
|
+ new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).Sort("MerchantDepositReturns", Sort, Id);
|
|
|
|
|
|
AddSysLog(Id.ToString(), "MerchantDepositReturns", "sort");
|
|
|
return "success";
|
|
|
@@ -313,43 +301,30 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
/// 导出Excel
|
|
|
/// </summary>
|
|
|
/// <returns></returns>
|
|
|
- public JsonResult ExportExcel(MerchantDepositReturns data, string MerchantIdMerRealName, string MerchantIdMerchantMobile, string MerchantIdMerIdcardNo, string UserIdRealName, string UserIdMakerCode)
|
|
|
+ public JsonResult ExportExcel(MerchantDepositReturns data, string StatusSelect, string CreateDateData)
|
|
|
{
|
|
|
Dictionary<string, string> Fields = new Dictionary<string, string>();
|
|
|
- Fields.Add("CreateDate", "3"); //时间
|
|
|
Fields.Add("AlipayAccountNo", "1"); //支付宝账号
|
|
|
- Fields.Add("OperateMan", "1"); //操作人
|
|
|
-
|
|
|
+ Fields.Add("OrderNo", "1"); //退押订单号
|
|
|
|
|
|
string condition = " and Status>-1";
|
|
|
- //商户商户真实姓名
|
|
|
- if (!string.IsNullOrEmpty(MerchantIdMerRealName))
|
|
|
+
|
|
|
+ //提现状态
|
|
|
+ if (!string.IsNullOrEmpty(StatusSelect))
|
|
|
{
|
|
|
- condition += " and MerchantId in (select MerchantId from PosMerchantInfoForMerRealName where MerRealName='" + MerchantIdMerRealName + "')";
|
|
|
+ condition += " and Status=" + StatusSelect;
|
|
|
}
|
|
|
- //商户商户手机号
|
|
|
- if (!string.IsNullOrEmpty(MerchantIdMerchantMobile))
|
|
|
+ //创建时间
|
|
|
+ if (!string.IsNullOrEmpty(CreateDateData))
|
|
|
{
|
|
|
- condition += " and MerchantId in (select MerchantId from PosMerchantInfoForMerchantMobile where MerchantMobile='" + MerchantIdMerchantMobile + "')";
|
|
|
- }
|
|
|
- //商户商户身份证号
|
|
|
- if (!string.IsNullOrEmpty(MerchantIdMerIdcardNo))
|
|
|
- {
|
|
|
- condition += " and MerchantId in (select MerchantId from PosMerchantInfoForMerIdcardNo where MerIdcardNo='" + MerchantIdMerIdcardNo + "')";
|
|
|
- }
|
|
|
- //创客真实姓名
|
|
|
- if (!string.IsNullOrEmpty(UserIdRealName))
|
|
|
- {
|
|
|
- condition += " and UserId in (select UserId from UserForRealName where RealName='" + UserIdRealName + "')";
|
|
|
- }
|
|
|
- //创客编号
|
|
|
- if (!string.IsNullOrEmpty(UserIdMakerCode))
|
|
|
- {
|
|
|
- condition += " and UserId in (select UserId from UserForMakerCode where MakerCode='" + UserIdMakerCode + "')";
|
|
|
+ string[] datelist = CreateDateData.Split(new string[] { " - " }, StringSplitOptions.None);
|
|
|
+ string start = datelist[0];
|
|
|
+ string end = datelist[1];
|
|
|
+ condition += " and CreateDate>='" + start + " 00:00:00' and CreateDate<='" + end + " 23:59:59'";
|
|
|
}
|
|
|
|
|
|
|
|
|
- Dictionary<string, object> obj = new AdminContent(_accessor.HttpContext, SystemPublicFuction.dbtables).IndexData("MerchantDepositReturns", Fields, "Id desc", "0", 1, 20000, condition, "MerchantId,AlipayAccountNo,ReturnAmount,OperateMan,UserId", false);
|
|
|
+ Dictionary<string, object> obj = new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).IndexData("MerchantDepositReturns", Fields, "Id desc", "0", 1, 20000, condition, "Id,MerchantId,AlipayAccountNo,ReturnAmount,UserId", false);
|
|
|
List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
|
|
|
foreach (Dictionary<string, object> dic in diclist)
|
|
|
{
|
|
|
@@ -360,7 +335,7 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
dic["MerchantIdMerchantMobile"] = merchantid_PosMerchantInfo.MerchantMobile;
|
|
|
dic["MerchantIdMerIdcardNo"] = merchantid_PosMerchantInfo.MerIdcardNo;
|
|
|
dic.Remove("MerchantId");
|
|
|
- dic["StatusName"] = dic["Status"].ToString() == "1" ? "正常" : "关闭";
|
|
|
+ // dic["StatusName"] = dic["Status"].ToString() == "1" ? "正常" : "关闭";
|
|
|
//创客
|
|
|
int UserId = int.Parse(function.CheckInt(dic["UserId"].ToString()));
|
|
|
Users userid_Users = db.Users.FirstOrDefault(m => m.Id == UserId) ?? new Users();
|
|
|
@@ -371,16 +346,15 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
}
|
|
|
|
|
|
Dictionary<string, object> result = new Dictionary<string, object>();
|
|
|
- result.Add("Status", "1");
|
|
|
+ result.Add("Status", "0");
|
|
|
result.Add("Info", "Excel报表-" + DateTime.Now.ToString("yyyy-MM-ddTHH:mm:ss") + ".xlsx");
|
|
|
result.Add("Obj", diclist);
|
|
|
Dictionary<string, object> ReturnFields = new Dictionary<string, object>();
|
|
|
- ReturnFields.Add("MerchantIdMerRealName", "商户商户真实姓名");
|
|
|
- ReturnFields.Add("MerchantIdMerchantMobile", "商户商户手机号");
|
|
|
- ReturnFields.Add("MerchantIdMerIdcardNo", "商户商户身份证号");
|
|
|
+ ReturnFields.Add("MerchantIdMerRealName", "商户真实姓名");
|
|
|
+ ReturnFields.Add("MerchantIdMerchantMobile", "商户手机号");
|
|
|
+ ReturnFields.Add("MerchantIdMerIdcardNo", "商户身份证号");
|
|
|
ReturnFields.Add("AlipayAccountNo", "支付宝账号");
|
|
|
ReturnFields.Add("ReturnAmount", "返还金额");
|
|
|
- ReturnFields.Add("OperateMan", "操作人");
|
|
|
ReturnFields.Add("UserIdRealName", "创客真实姓名");
|
|
|
ReturnFields.Add("UserIdMakerCode", "创客编号");
|
|
|
|