|
|
@@ -674,7 +674,7 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
/// 盟主提现记录列表
|
|
|
/// </summary>
|
|
|
/// <returns></returns>
|
|
|
- public JsonResult LeaderIndexData(UserCashRecord data, string MakerCode, string RealName, string StatusSelect, string QueryCountSelect, string CreateDateData, int page = 1, int limit = 30)
|
|
|
+ public JsonResult LeaderIndexData(UserCashRecord data, string MakerCode, string RealName, string StatusSelect, string CreateDateData, int page = 1, int limit = 30)
|
|
|
{
|
|
|
|
|
|
Dictionary<string, string> Fields = new Dictionary<string, string>();
|
|
|
@@ -704,57 +704,55 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
{
|
|
|
condition += " and TradeType=" + data.TradeType;
|
|
|
}
|
|
|
- //提交到代付状态
|
|
|
- if (!string.IsNullOrEmpty(QueryCountSelect))
|
|
|
- {
|
|
|
- condition += " and QueryCount=" + QueryCountSelect;
|
|
|
- }
|
|
|
if (!string.IsNullOrEmpty(CreateDateData))
|
|
|
{
|
|
|
string[] datelist = CreateDateData.Split(new string[] { " - " }, StringSplitOptions.None);
|
|
|
- var start = Convert.ToDateTime(Convert.ToDateTime(datelist[0]).ToString("yyyy-MM-dd"));
|
|
|
- var end = Convert.ToDateTime(Convert.ToDateTime(datelist[1]).ToString("yyyy-MM-dd") + " 23:59:59");
|
|
|
- var check = db.UserCashRecord.Any(m => m.CreateDate >= start && m.TradeType == 3);
|
|
|
- var checks = db.UserCashRecord.Any(m => m.CreateDate <= end && m.TradeType == 3);
|
|
|
- if (check)
|
|
|
- {
|
|
|
- var sId = db.UserCashRecord.Where(m => m.CreateDate >= start && m.TradeType == 3).Min(m => m.Id);
|
|
|
- condition += " and Id >=" + sId;
|
|
|
- }
|
|
|
- if (checks)
|
|
|
- {
|
|
|
- var eId = db.UserCashRecord.Where(m => m.CreateDate <= end && m.TradeType == 3).Max(m => m.Id);
|
|
|
- condition += " and Id <=" + eId;
|
|
|
- }
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- var start = Convert.ToDateTime(DateTime.Now.AddMonths(-1).ToString("yyyy-MM") + "-01");
|
|
|
- var check = db.UserCashRecord.Any(m => m.CreateDate >= start && m.TradeType == 3);
|
|
|
- if (check)
|
|
|
- {
|
|
|
- var minId = db.UserCashRecord.Where(m => m.CreateDate >= start && m.TradeType == 3).Min(m => m.Id);
|
|
|
- var Info = function.ReadInstance("/WritePage/UserCashRecord/LeaderUserCashRecord.txt");
|
|
|
- if (string.IsNullOrEmpty(Info.ToString()))
|
|
|
- {
|
|
|
- function.WritePage("/WritePage/UserCashRecord/", "LeaderUserCashRecord.txt", minId.ToString());
|
|
|
- condition += " and Id >=" + minId;
|
|
|
- }
|
|
|
- else if (minId != int.Parse(Info))
|
|
|
- {
|
|
|
- function.WritePage("/WritePage/UserCashRecord/", "LeaderUserCashRecord.txt", minId.ToString());
|
|
|
- condition += " and Id >=" + minId;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- condition += " and Id >=" + Convert.ToInt32(Info);
|
|
|
- }
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- condition += " and Id =0";
|
|
|
- }
|
|
|
+ var start = datelist[0];
|
|
|
+ var end = datelist[1];
|
|
|
+ condition += " and CreateDate>='" + start + " 00:00:00' and CreateDate<='" + end + " 23:59:59'";
|
|
|
+ // var start = Convert.ToDateTime(Convert.ToDateTime(datelist[0]).ToString("yyyy-MM-dd"));
|
|
|
+ // var end = Convert.ToDateTime(Convert.ToDateTime(datelist[1]).ToString("yyyy-MM-dd") + " 23:59:59");
|
|
|
+ // var check = db.UserCashRecord.Any(m => m.CreateDate >= start && m.TradeType == 3);
|
|
|
+ // var checks = db.UserCashRecord.Any(m => m.CreateDate <= end && m.TradeType == 3);
|
|
|
+ // if (check)
|
|
|
+ // {
|
|
|
+ // var sId = db.UserCashRecord.Where(m => m.CreateDate >= start && m.TradeType == 3).Min(m => m.Id);
|
|
|
+ // condition += " and Id >=" + sId;
|
|
|
+ // }
|
|
|
+ // if (checks)
|
|
|
+ // {
|
|
|
+ // var eId = db.UserCashRecord.Where(m => m.CreateDate <= end && m.TradeType == 3).Max(m => m.Id);
|
|
|
+ // condition += " and Id <=" + eId;
|
|
|
+ // }
|
|
|
}
|
|
|
+ // else
|
|
|
+ // {
|
|
|
+ // var start = Convert.ToDateTime(DateTime.Now.AddMonths(-1).ToString("yyyy-MM") + "-01");
|
|
|
+ // var check = db.UserCashRecord.Any(m => m.CreateDate >= start && m.TradeType == 3);
|
|
|
+ // if (check)
|
|
|
+ // {
|
|
|
+ // var minId = db.UserCashRecord.Where(m => m.CreateDate >= start && m.TradeType == 3).Min(m => m.Id);
|
|
|
+ // var Info = function.ReadInstance("/WritePage/UserCashRecord/LeaderUserCashRecord.txt");
|
|
|
+ // if (string.IsNullOrEmpty(Info.ToString()))
|
|
|
+ // {
|
|
|
+ // function.WritePage("/WritePage/UserCashRecord/", "LeaderUserCashRecord.txt", minId.ToString());
|
|
|
+ // condition += " and Id >=" + minId;
|
|
|
+ // }
|
|
|
+ // else if (minId != int.Parse(Info))
|
|
|
+ // {
|
|
|
+ // function.WritePage("/WritePage/UserCashRecord/", "LeaderUserCashRecord.txt", minId.ToString());
|
|
|
+ // condition += " and Id >=" + minId;
|
|
|
+ // }
|
|
|
+ // else
|
|
|
+ // {
|
|
|
+ // condition += " and Id >=" + Convert.ToInt32(Info);
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // else
|
|
|
+ // {
|
|
|
+ // condition += " and Id =0";
|
|
|
+ // }
|
|
|
+ // }
|
|
|
|
|
|
Dictionary<string, object> obj = new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).IndexData("UserCashRecord", Fields, "Id desc", "0", page, limit, condition);
|
|
|
List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
|
|
|
@@ -801,11 +799,10 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
/// 导出Excel
|
|
|
/// </summary>
|
|
|
/// <returns></returns>
|
|
|
- public JsonResult LeaderExportExcel(UserCashRecord data, string MakerCode, string RealName, string StatusSelect, string PayStatus)
|
|
|
+ public JsonResult LeaderExportExcel(UserCashRecord data, string MakerCode, string RealName, string StatusSelect, string CreateDateData)
|
|
|
{
|
|
|
Dictionary<string, string> Fields = new Dictionary<string, string>();
|
|
|
Fields.Add("CashOrderNo", "1"); //提现单号
|
|
|
- Fields.Add("CreateDate", "3"); //创建时间
|
|
|
|
|
|
string condition = " and Status>-1 and TradeType=3";
|
|
|
//创客编号
|
|
|
@@ -823,16 +820,55 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
{
|
|
|
condition += " and Status=" + StatusSelect;
|
|
|
}
|
|
|
- //提交到代付状态
|
|
|
- if (!string.IsNullOrEmpty(PayStatus))
|
|
|
+ if (!string.IsNullOrEmpty(CreateDateData))
|
|
|
{
|
|
|
- int QueryCount = int.Parse(function.CheckInt(PayStatus));
|
|
|
- if (QueryCount == 2)
|
|
|
- {
|
|
|
- QueryCount = 0;
|
|
|
- }
|
|
|
- condition += " and QueryCount=" + QueryCount;
|
|
|
+ string[] datelist = CreateDateData.Split(new string[] { " - " }, StringSplitOptions.None);
|
|
|
+ var start = datelist[0];
|
|
|
+ var end = datelist[1];
|
|
|
+ condition += " and CreateDate>='" + start + " 00:00:00' and CreateDate<='" + end + " 23:59:59'";
|
|
|
+ // var start = Convert.ToDateTime(Convert.ToDateTime(datelist[0]).ToString("yyyy-MM-dd"));
|
|
|
+ // var end = Convert.ToDateTime(Convert.ToDateTime(datelist[1]).ToString("yyyy-MM-dd") + " 23:59:59");
|
|
|
+ // var check = db.UserCashRecord.Any(m => m.CreateDate >= start && m.TradeType == 3);
|
|
|
+ // var checks = db.UserCashRecord.Any(m => m.CreateDate <= end && m.TradeType == 3);
|
|
|
+ // if (check)
|
|
|
+ // {
|
|
|
+ // var sId = db.UserCashRecord.Where(m => m.CreateDate >= start && m.TradeType == 3).Min(m => m.Id);
|
|
|
+ // condition += " and Id >=" + sId;
|
|
|
+ // }
|
|
|
+ // if (checks)
|
|
|
+ // {
|
|
|
+ // var eId = db.UserCashRecord.Where(m => m.CreateDate <= end && m.TradeType == 3).Max(m => m.Id);
|
|
|
+ // condition += " and Id <=" + eId;
|
|
|
+ // }
|
|
|
}
|
|
|
+ // else
|
|
|
+ // {
|
|
|
+ // var start = Convert.ToDateTime(DateTime.Now.AddMonths(-1).ToString("yyyy-MM") + "-01");
|
|
|
+ // var check = db.UserCashRecord.Any(m => m.CreateDate >= start && m.TradeType == 3);
|
|
|
+ // if (check)
|
|
|
+ // {
|
|
|
+ // var minId = db.UserCashRecord.Where(m => m.CreateDate >= start && m.TradeType == 3).Min(m => m.Id);
|
|
|
+ // var Info = function.ReadInstance("/WritePage/UserCashRecord/LeaderUserCashRecord.txt");
|
|
|
+ // if (string.IsNullOrEmpty(Info.ToString()))
|
|
|
+ // {
|
|
|
+ // function.WritePage("/WritePage/UserCashRecord/", "LeaderUserCashRecord.txt", minId.ToString());
|
|
|
+ // condition += " and Id >=" + minId;
|
|
|
+ // }
|
|
|
+ // else if (minId != int.Parse(Info))
|
|
|
+ // {
|
|
|
+ // function.WritePage("/WritePage/UserCashRecord/", "LeaderUserCashRecord.txt", minId.ToString());
|
|
|
+ // condition += " and Id >=" + minId;
|
|
|
+ // }
|
|
|
+ // else
|
|
|
+ // {
|
|
|
+ // condition += " and Id >=" + Convert.ToInt32(Info);
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // else
|
|
|
+ // {
|
|
|
+ // condition += " and Id =0";
|
|
|
+ // }
|
|
|
+ // }
|
|
|
|
|
|
Dictionary<string, object> obj = new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).IndexData("UserCashRecord", Fields, "Id desc", "0", 1, 20000, condition, "CashOrderNo,UserId,IdCardNo,ActualTradeAmount,Remark,Status,QueryCount,CreateDate", false);
|
|
|
List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
|