Commit 75d2342f authored by 吴春's avatar 吴春
parents 55511f50 ec25f81b
...@@ -13,6 +13,11 @@ namespace Mall.Model.Extend.TradePavilion ...@@ -13,6 +13,11 @@ namespace Mall.Model.Extend.TradePavilion
[DB(ConnectionName = "DefaultConnection")] [DB(ConnectionName = "DefaultConnection")]
public class RB_FirstShop_ListEnroll_Extend : RB_FirstShop_ListEnroll public class RB_FirstShop_ListEnroll_Extend : RB_FirstShop_ListEnroll
{ {
/// <summary>
/// 获取榜单ids
/// </summary>
public string ListIds { get; set; }
/// <summary> /// <summary>
/// 查询候选列表 1是 /// 查询候选列表 1是
/// </summary> /// </summary>
...@@ -62,10 +67,5 @@ namespace Mall.Model.Extend.TradePavilion ...@@ -62,10 +67,5 @@ namespace Mall.Model.Extend.TradePavilion
/// 对象ids /// 对象ids
/// </summary> /// </summary>
public string ObjectIds { get; set; } public string ObjectIds { get; set; }
/// <summary>
/// 绑定ids
/// </summary>
public string ListIds { get; set; }
} }
} }
...@@ -18,6 +18,11 @@ namespace Mall.Model.Extend.TradePavilion ...@@ -18,6 +18,11 @@ namespace Mall.Model.Extend.TradePavilion
/// </summary> /// </summary>
public List<string> ObjectTypeList { get; set; } public List<string> ObjectTypeList { get; set; }
/// <summary>
/// 榜单Ids
/// </summary>
public string ListIds { get; set; }
/// <summary> /// <summary>
/// 面向群里id /// 面向群里id
/// </summary> /// </summary>
......
...@@ -85,7 +85,7 @@ where {where} order by w.Id desc ...@@ -85,7 +85,7 @@ where {where} order by w.Id desc
} }
if (!string.IsNullOrEmpty(dmodel.ListIds)) if (!string.IsNullOrEmpty(dmodel.ListIds))
{ {
where += $@" and w.{nameof(RB_FirstShop_ListEnroll_Extend.ListId)} in ({dmodel.ListIds})"; where += $@" and w.{nameof(RB_FirstShop_ListEnroll_Extend.ListId)} in({dmodel.ListIds})";
} }
if (dmodel.UserId > 0) if (dmodel.UserId > 0)
{ {
...@@ -95,6 +95,10 @@ where {where} order by w.Id desc ...@@ -95,6 +95,10 @@ where {where} order by w.Id desc
{ {
where += $@" and w.{nameof(RB_FirstShop_ListEnroll_Extend.ObjectType)}={(int)dmodel.ObjectType}"; where += $@" and w.{nameof(RB_FirstShop_ListEnroll_Extend.ObjectType)}={(int)dmodel.ObjectType}";
} }
if (dmodel.ObjectId > 0)
{
where += $@" and w.{nameof(RB_FirstShop_ListEnroll_Extend.ObjectId)}={dmodel.ObjectId}";
}
if (dmodel.CandidateState > 0) if (dmodel.CandidateState > 0)
{ {
where += $@" and w.{nameof(RB_FirstShop_ListEnroll_Extend.CandidateState)}={dmodel.CandidateState}"; where += $@" and w.{nameof(RB_FirstShop_ListEnroll_Extend.CandidateState)}={dmodel.CandidateState}";
......
...@@ -111,6 +111,10 @@ where {where} {orderBy} ...@@ -111,6 +111,10 @@ where {where} {orderBy}
{ {
where += $@" and w.{nameof(RB_FirstShop_List_Extend.MallBaseId)}={dmodel.MallBaseId}"; where += $@" and w.{nameof(RB_FirstShop_List_Extend.MallBaseId)}={dmodel.MallBaseId}";
} }
if (!string.IsNullOrEmpty(dmodel.ListIds))
{
where += $@" and w.{nameof(RB_FirstShop_List_Extend.Id)} in({dmodel.ListIds})";
}
if (dmodel.ListType > 0) if (dmodel.ListType > 0)
{ {
where += $@" and w.{nameof(RB_FirstShop_List_Extend.ListType)}={(int)dmodel.ListType}"; where += $@" and w.{nameof(RB_FirstShop_List_Extend.ListType)}={(int)dmodel.ListType}";
......
...@@ -2281,7 +2281,7 @@ namespace Mall.WebApi.Controllers.TradePavilion ...@@ -2281,7 +2281,7 @@ namespace Mall.WebApi.Controllers.TradePavilion
} }
/// <summary> /// <summary>
/// 获取榜单 /// 获取榜单报名excel导出
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
[HttpPost] [HttpPost]
...@@ -2315,6 +2315,41 @@ namespace Mall.WebApi.Controllers.TradePavilion ...@@ -2315,6 +2315,41 @@ namespace Mall.WebApi.Controllers.TradePavilion
} }
} }
/// <summary>
/// 获取多榜单excel导出
/// </summary>
/// <returns></returns>
[HttpPost]
public FileContentResult GetFirstShopMoreListEnrollToExcel()
{
string ExcelName = "多榜单情况" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".xls";
List<ExcelDataSource> slist = new List<ExcelDataSource>();
var req = base.RequestParm;
JObject parms = JObject.Parse(req.msg.ToString());
string ListIds = parms.GetStringValue("ListIds");//榜单ids
if (string.IsNullOrEmpty(ListIds))
{
var byteData1 = ExcelTempLateHelper.ToExcelExtend(slist);
return File(byteData1, "application/octet-stream", ExcelName);
}
try
{
List<ExcelDataSource> RList = firstShopListModule.GetFirstShopMoreListEnrollToExcel(ListIds, req.MallBaseId);
slist.AddRange(RList);
var byteData = ExcelTempLateHelper.ToExcelExtend(slist);
return File(byteData, "application/octet-stream", ExcelName);
}
catch (Exception ex)
{
LogHelper.Write(ex, string.Format("GetFirstShopMoreListEnrollToExcel: {0}", JsonHelper.Serialize(RequestParm)));
var byteData1 = ExcelTempLateHelper.ToExcelExtend(slist);
return File(byteData1, "application/octet-stream", ExcelName);
}
}
/// <summary> /// <summary>
/// 报名列表word导出 /// 报名列表word导出
/// </summary> /// </summary>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment