Commit cca9a07d by lizefeng

新增投资分析报表查询

parent 08d66024
...@@ -5,6 +5,7 @@ using System.Collections.Generic; ...@@ -5,6 +5,7 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using AutoTurnOver.Utility; using AutoTurnOver.Utility;
using Dapper;
namespace AutoTurnOver.DB namespace AutoTurnOver.DB
{ {
...@@ -13,6 +14,30 @@ namespace AutoTurnOver.DB ...@@ -13,6 +14,30 @@ namespace AutoTurnOver.DB
/// </summary> /// </summary>
public class report_invest_return_dao : connectionHelper public class report_invest_return_dao : connectionHelper
{ {
public static List<dc_report_invest_return_analysis> AnaList(Condition_ConfigPromotion m, int offset, int limit, ref int total)
{
var list = new List<dc_report_invest_return_analysis>();
try
{
var sql = @"select t1.* from dc_report_invest_return_analysis as t1
where 1 = 1 ";
total = _connection.QuerySingleOrDefault<int>("select count(0) from (" + sql + ") tb1");
var obj = _connection.Query<dc_report_invest_return_analysis>(sql + " limit " + offset + "," + limit);
return obj.AsList();
}
catch (Exception)
{
return list;
}
}
/// <summary> /// <summary>
/// 同步pps刊登过的sku /// 同步pps刊登过的sku
/// </summary> /// </summary>
......
using AutoTurnOver.Models;
using System;
using System.Collections.Generic;
using System.Text;
namespace AutoTurnOver.Services
{
public class ReportInvestReturnService
{
/// <summary>
/// 查询分析报表
/// </summary>
/// <param name="m"></param>
/// <param name="offset"></param>
/// <param name="limit"></param>
/// <param name="total"></param>
/// <returns></returns>
public List<dc_report_invest_return_analysis> AnaList(Condition_ConfigPromotion m, int offset, int limit, ref int total)
{
return DB.report_invest_return_dao.AnaList(m, offset, limit, ref total);
}
}
}
...@@ -13,6 +13,10 @@ ...@@ -13,6 +13,10 @@
<PackageReference Include="Microsoft.AspNetCore.App" /> <PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.0.2105168" /> <PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.0.2105168" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.1.10" /> <PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.1.10" />
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="4.7.1" />
<PackageReference Include="System.Security.Permissions" Version="4.7.0" />
<PackageReference Include="System.Threading.Channels" Version="4.7.1" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
......
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using AutoTurnOver.Common;
using AutoTurnOver.Models;
using AutoTurnOver.Utility;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace AutoTurnOver.Controllers
{
[Route("api/[controller]/[action]")]
[ApiController]
public class ReportInvestReturnController : ControllerBase
{
#region 安全库存规则
[HttpGet]
[BrowseLog("Bailun_aims", "访问【百伦自动周转系统】->【ip+de投资回报分析】->【搜索】页面", 0)]
public JsonResult AnaList(int limit, int offset, string order, string sort)
{
var total = 0;
var service = new Services.ReportInvestReturnService();
var list = service.AnaList(new Condition_ConfigPromotion { }, offset, limit, ref total);
return new JsonResult(new
{
rows = list,
total = total,
});
}
#endregion
}
}
\ No newline at end of file
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<ExcludeApp_Data>False</ExcludeApp_Data> <ExcludeApp_Data>False</ExcludeApp_Data>
<TargetFramework>netcoreapp2.1</TargetFramework> <TargetFramework>netcoreapp2.1</TargetFramework>
<ProjectGuid>ddedf08e-7f69-49f2-be22-664dcb4ff9f2</ProjectGuid> <ProjectGuid>ddedf08e-7f69-49f2-be22-664dcb4ff9f2</ProjectGuid>
<SelfContained>false</SelfContained> <SelfContained>true</SelfContained>
<_IsPortable>true</_IsPortable> <_IsPortable>true</_IsPortable>
<publishUrl>C:\WebSite\SkuAutoTurn</publishUrl> <publishUrl>C:\WebSite\SkuAutoTurn</publishUrl>
<DeleteExistingFiles>False</DeleteExistingFiles> <DeleteExistingFiles>False</DeleteExistingFiles>
......
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