|
|
@@ -56,14 +56,11 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
|
|
|
Dictionary<string, string> Fields = new Dictionary<string, string>();
|
|
|
|
|
|
- Fields.Add("CreateDate", "3"); //时间
|
|
|
-
|
|
|
-
|
|
|
string condition = " and Status>-1";
|
|
|
//创客编号
|
|
|
if (!string.IsNullOrEmpty(UserIdMakerCode))
|
|
|
{
|
|
|
- condition += " and UserId in (select UserId from UsersForMakerCode where MakerCode='" + UserIdMakerCode + "')";
|
|
|
+ condition += " and UserId in (select UserId from UserForMakerCode where MakerCode='" + UserIdMakerCode + "')";
|
|
|
}
|
|
|
//盟主等级
|
|
|
if (!string.IsNullOrEmpty(LeaderLevelSelect))
|
|
|
@@ -323,31 +320,33 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
/// 导出Excel
|
|
|
/// </summary>
|
|
|
/// <returns></returns>
|
|
|
- public JsonResult ExportExcel(Leaders data, string UserIdMakerCode, string UserIdRealName, string LeaderLevelSelect)
|
|
|
+ public JsonResult ExportExcel(Leaders data, string UserIdMakerCode, string CreateDateData, string LeaderLevelSelect)
|
|
|
{
|
|
|
Dictionary<string, string> Fields = new Dictionary<string, string>();
|
|
|
- Fields.Add("CreateDate", "3"); //时间
|
|
|
|
|
|
|
|
|
string condition = " and Status>-1";
|
|
|
//创客创客编号
|
|
|
if (!string.IsNullOrEmpty(UserIdMakerCode))
|
|
|
{
|
|
|
- condition += " and UserId in (select UserId from UsersForMakerCode where MakerCode='" + UserIdMakerCode + "')";
|
|
|
- }
|
|
|
- //创客真实姓名
|
|
|
- if (!string.IsNullOrEmpty(UserIdRealName))
|
|
|
- {
|
|
|
- condition += " and UserId in (select UserId from UsersForRealName where RealName='" + UserIdRealName + "')";
|
|
|
+ condition += " and UserId in (select UserId from UserForMakerCode where MakerCode='" + UserIdMakerCode + "')";
|
|
|
}
|
|
|
//盟主等级
|
|
|
if (!string.IsNullOrEmpty(LeaderLevelSelect))
|
|
|
{
|
|
|
condition += " and LeaderLevel=" + LeaderLevelSelect;
|
|
|
}
|
|
|
+ //创建时间
|
|
|
+ if (!string.IsNullOrEmpty(CreateDateData))
|
|
|
+ {
|
|
|
+ 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 AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).IndexData("Leaders", Fields, "Id desc", "0", 1, 20000, condition, "UserId,LeaderLevel", false);
|
|
|
+ Dictionary<string, object> obj = new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).IndexData("Leaders", Fields, "Id desc", "0", 1, 20000, condition, "UserId,LeaderLevel,CreateDate", false);
|
|
|
List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
|
|
|
foreach (Dictionary<string, object> dic in diclist)
|
|
|
{
|
|
|
@@ -373,6 +372,7 @@ namespace MySystem.Areas.Admin.Controllers
|
|
|
ReturnFields.Add("UserIdMakerCode", "创客创客编号");
|
|
|
ReturnFields.Add("UserIdRealName", "创客真实姓名");
|
|
|
ReturnFields.Add("LeaderLevel", "盟主等级");
|
|
|
+ ReturnFields.Add("CreateDate", "创建时间");
|
|
|
|
|
|
result.Add("Fields", ReturnFields);
|
|
|
AddSysLog("0", "Leaders", "ExportExcel");
|