|
|
@@ -96,7 +96,14 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
//提交到代付状态
|
|
|
if (!string.IsNullOrEmpty(QueryCountSelect))
|
|
|
{
|
|
|
- condition += " and QueryCount=" + QueryCountSelect;
|
|
|
+ if(QueryCountSelect == "0")
|
|
|
+ {
|
|
|
+ condition += " and QueryCount=" + QueryCountSelect;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ condition += " and QueryCount>0";
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
if (!string.IsNullOrEmpty(CreateDateData))
|
|
|
@@ -488,11 +495,10 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
/// 导出Excel
|
|
|
/// </summary>
|
|
|
/// <returns></returns>
|
|
|
- public JsonResult ExportExcel(UserCashRecord data, string MakerCode, string RealName, string StatusSelect, string PayStatus)
|
|
|
+ public JsonResult ExportExcel(UserCashRecord data, string MakerCode, string RealName, string StatusSelect, string QueryCountSelect, string CreateDateData)
|
|
|
{
|
|
|
Dictionary<string, string> Fields = new Dictionary<string, string>();
|
|
|
Fields.Add("CashOrderNo", "1"); //提现单号
|
|
|
- Fields.Add("CreateDate", "3"); //创建时间
|
|
|
Fields.Add("TradeType", "0"); //交易类型
|
|
|
|
|
|
string condition = " and Status>-1 and TradeType<3";
|
|
|
@@ -511,15 +517,67 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
{
|
|
|
condition += " and Status=" + StatusSelect;
|
|
|
}
|
|
|
+ if (!string.IsNullOrEmpty(data.CashOrderNo))
|
|
|
+ {
|
|
|
+ condition += " and CashOrderNo='" + data.CashOrderNo + "'";
|
|
|
+ }
|
|
|
+ if (data.TradeType > 0)
|
|
|
+ {
|
|
|
+ condition += " and TradeType=" + data.TradeType;
|
|
|
+ }
|
|
|
//提交到代付状态
|
|
|
- if (!string.IsNullOrEmpty(PayStatus))
|
|
|
+ if (!string.IsNullOrEmpty(QueryCountSelect))
|
|
|
{
|
|
|
- int QueryCount = int.Parse(function.CheckInt(PayStatus));
|
|
|
- if (QueryCount == 2)
|
|
|
+ if(QueryCountSelect == "0")
|
|
|
{
|
|
|
- QueryCount = 0;
|
|
|
+ condition += " and QueryCount=" + QueryCountSelect;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ condition += " and QueryCount>0";
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ 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/UserCashRecord.txt");
|
|
|
+ if (string.IsNullOrEmpty(Info.ToString()))
|
|
|
+ {
|
|
|
+ function.WritePage("/WritePage/UserCashRecord/", "UserCashRecord.txt", minId.ToString());
|
|
|
+ condition += " and Id >=" + minId;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ condition += " and Id >=" + Convert.ToInt32(Info);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ condition += " and Id =0";
|
|
|
}
|
|
|
- condition += " and QueryCount=" + QueryCount;
|
|
|
}
|
|
|
|
|
|
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);
|
|
|
@@ -530,9 +588,7 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
Users user = db.Users.FirstOrDefault(m => m.Id == UserId) ?? new Users();
|
|
|
dic["MakerCode"] = user.MakerCode;
|
|
|
dic["RealName"] = user.RealName;
|
|
|
- dic["Mobile"] = user.Mobile;
|
|
|
- dic["SettleBankName"] = user.SettleBankName;
|
|
|
- dic["SettleBankCardNo"] = user.SettleBankCardNo;
|
|
|
+ dic["TradeType"] = RelationClassForConst.GetTradeTypeInfo(int.Parse(dic["TradeType"].ToString()));
|
|
|
dic.Remove("UserId");
|
|
|
int Status = int.Parse(dic["Status"].ToString());
|
|
|
if (Status == 0) dic["StatusName"] = "处理中";
|
|
|
@@ -542,7 +598,7 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
|
|
|
int QueryCount = int.Parse(dic["QueryCount"].ToString());
|
|
|
if (QueryCount == 0) dic["LockName"] = "待提交";
|
|
|
- if (QueryCount == 1) dic["LockName"] = "已提交";
|
|
|
+ if (QueryCount > 0) dic["LockName"] = "已提交";
|
|
|
dic.Remove("QueryCount");
|
|
|
}
|
|
|
|