Commit 245a942e by lizefeng

新增现金流的sku视图查询

parent 42d21f94
......@@ -2010,8 +2010,8 @@ and start_date<=@end_date and end_date>=@start_date
bailun_sku = m.bailun_sku,
site = m.site_code,
create_user = user.UserName,
bdate = m.date.GetMonthFirstDay(),
edate = m.date.LastDayOfMonth(),
bdate = m.date.GetMonthFirstDay().ToDayHome(),
edate = m.date.LastDayOfMonth().ToDayEnd(),
update_date = DateTime.Now,
update_user = user.UserName,
project = m.project
......
using System;
using System.Collections.Generic;
using System.Text;
namespace AutoTurnOver.Models
{
public class deviation_search_dto
{
public string sku { get; set; }
public string project { get; set; }
}
public class deviation_view_dto
{
public string group_key { get; set; }
public string project { get; set; }
public string field { get; set; }
public string field_type { get; set; }
public decimal? month1 { get; set; }
public decimal? month2 { get; set; }
public decimal? month3 { get; set; }
public decimal? month4 { get; set; }
public decimal? month5 { get; set; }
public decimal? month6 { get; set; }
public decimal? month7 { get; set; }
public decimal? month8 { get; set; }
public decimal? month9 { get; set; }
public decimal? month10 { get; set; }
public decimal? month11 { get; set; }
public decimal? month12 { get; set; }
}
}
using AutoTurnOver.DB;
using AutoTurnOver.Models;
using System;
using System.Collections.Generic;
using System.Dynamic;
using System.Text;
namespace AutoTurnOver.Services
{
public class DeviationServices
{
/// <summary>
/// 获取sku视图
/// </summary>
/// <param name="search_data"></param>
/// <param name="offset"></param>
/// <param name="limit"></param>
/// <param name="total"></param>
/// <param name="order"></param>
/// <param name="sort"></param>
/// <returns></returns>
public IEnumerable<deviation_view_dto> GetSkuViews(deviation_search_dto search_data, int offset, int limit, ref int total, string order = "", string sort = "")
{
var datas = dc_ana_deviation_dao.GetSkuViews(search_data, offset, limit, ref total, order, sort);
return datas;
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using AutoTurnOver.Services;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using AutoTurnOver.Utility;
using AutoTurnOver.Models.Report;
using System.Data;
using AutoTurnOver.Common;
using System.IO;
using AutoTurnOver.Models;
using AutoTurnOver.Models.stock;
using AutoTurnOver.DB;
using Dapper;
using AutoTurnOver.Models.auto;
namespace AutoTurnOver.Controllers
{
[Route("api/[controller]/[action]")]
[ApiController]
public class DeviationController : ControllerBase
{
/// <summary>
/// 差异分析 现金流 sku视图
/// </summary>
/// <param name="project"></param>
/// <param name="sku"></param>
/// <param name="offset"></param>
/// <param name="limit"></param>
/// <param name="order"></param>
/// <param name="sort"></param>
/// <returns></returns>
public JsonResult GetSkuViews(string project, string sku, int offset, int limit, string order, string sort)
{
var m = new deviation_search_dto
{
project = project,
sku = sku
};
var services = new DeviationServices();
var total = 0;
var list = services.GetSkuViews(m, offset, limit, ref total, order: order, sort: sort);
return new JsonResult(new
{
rows = list,
total = total,
});
}
}
}
\ No newline at end of file
......@@ -11,7 +11,7 @@ namespace ResetOutofstock
class DeviationRabbitBackgroundService : RabbitWorkerBase<t_task_queue>
{
public DeviationRabbitBackgroundService() : base("差异分析服务", "aims:deviation-v2:input", 1)
public DeviationRabbitBackgroundService() : base("差异分析服务", "aims:deviation-v3:input", 1)
{
}
......@@ -27,7 +27,7 @@ namespace ResetOutofstock
}
catch (Exception e)
{
RabbitMQHelper.EnqueneMsg("aims:deviation-v2:input", taskDto);
RabbitMQHelper.EnqueneMsg("aims:deviation-v3:input", taskDto);
Console.WriteLine($"差异分析服务 数据异常,异常原因为:{e.Message},异常堆栈为:{e.StackTrace}");
}
......
......@@ -50,7 +50,7 @@ namespace ResetOutofstock
//report_invest_return_dao.ShareAdFee();
//report_invest_return_dao.SynchBtmOrderRefund();
//report_invest_return_dao.CalculationStockScore("962073701");
//dc_ana_deviation_dao.PushAnaTask();
//dc_ana_deviation_dao.PushAnaTask();
}
catch (Exception ex)
{
......
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