Commit 68540e0a by 泽锋 李

 sku这里加两个字段,本月结余和上月结余,就是正负相加,并且现金流字段放在前面

每个sku现金流计算过程怎么弹出的是补货的dashboard (加一个加号的图标,用于查看现金流详情,点击sku,去到aims页面)
另外aims可能有个bug(周转页面)
点击数字查看计算明细
周付的改成下周五付(这个需要晚上重新跑一遍流水才能看到最新数据)
parent 28a8fc54
......@@ -78,8 +78,21 @@ namespace AutoTurnOver.Models
return ((dc_report_cash_flow_log_data_type_enum)data_type).ToString();
}
}
public string pay_type_str
{
get
{
return ((dc_report_cash_flow_log_pay_type_enum)pay_type).ToString();
}
}
public string warehouse_name { get; set; }
public int type { get; set; }
public DateTime show_time { get
{
if (type == 1) return occur_time;
else return pay_time;
} }
}
/// <summary>
......@@ -203,6 +216,26 @@ namespace AutoTurnOver.Models
/// </summary>
public int? type { get; set; }
public string bailun_sku { get; set; }
public string warehouse_code { get; set; }
public string platform_type { get; set; }
public string web_site { get; set; }
}
public class dc_report_cash_flow_log_export_page_search_dto: page_search_dto
{
public DateTime? btime { get; set; }
public bool issum { get; set; }
public DateTime? etime { get; set; }
public List<int> data_type { get; set; }
/// <summary>
/// 1 = 根据发生时间查询
/// 2 = 根据支付时间查询
/// </summary>
public int? type { get; set; }
public string bailun_sku { get; set; }
public string warehouse_code { get; set; }
public string platform_type { get; set; }
public string web_site { get; set; }
}
public class dc_report_cash_flow_sku_group
......@@ -211,6 +244,8 @@ namespace AutoTurnOver.Models
public string bailun_sku { get; set; }
public string warehouse_code { get; set; }
public decimal balance { get; set; }
public decimal last_balance { get; set; }
public decimal current_balance { get; set; }
public DateTime current_date_begin { get; set; }
public DateTime current_date_end { get; set; }
public DateTime last_date_begin { get; set; }
......
......@@ -54,6 +54,11 @@ namespace AutoTurnOver.Services
return report_cash_flow_dao.Export(search);
}
public Page<dc_report_cash_flow_log_dto> LogPage(dc_report_cash_flow_log_export_page_search_dto search)
{
return report_cash_flow_dao.LogPage(search);
}
public Page<dc_report_cash_flow_sku_group_dto> SkuView(dc_report_cash_flow_sku_group_search_dto search)
{
return report_cash_flow_dao.SkuView(search);
......
......@@ -18,7 +18,7 @@ namespace AutoTurnOver.Controllers
[ApiController]
public class CashFlowController : ControllerBase
{
public JsonResult GetView(DateTime? btime, DateTime? etime,string platform_type,string web_site,string bailun_sku, string warehouse_code)
public JsonResult GetView(DateTime? btime, DateTime? etime, string platform_type, string web_site, string bailun_sku, string warehouse_code)
{
report_cash_flow_view_search_dto search_data = new report_cash_flow_view_search_dto
{
......@@ -38,11 +38,11 @@ namespace AutoTurnOver.Controllers
});
}
public FileResult Export(DateTime? btime, DateTime? etime,string bailun_sku, string data_type = null,int? type = null)
public FileResult Export(DateTime? btime, DateTime? etime, string bailun_sku, string data_type = null, int? type = null)
{
var m = new dc_report_cash_flow_log_export_search_dto
{
data_type = string.IsNullOrWhiteSpace(data_type) ?new List<int> { } : data_type.Split(',').Select(s=>int.Parse(s)).ToList(),
data_type = string.IsNullOrWhiteSpace(data_type) ? new List<int> { } : data_type.Split(',').Select(s => int.Parse(s)).ToList(),
btime = btime,
etime = etime,
type = type,
......@@ -104,12 +104,12 @@ namespace AutoTurnOver.Controllers
sidx = sort,
sord = order,
buyer_name = buyer_name,
sku_label = string.IsNullOrWhiteSpace( sku_label)?null : WebUtility.UrlDecode(sku_label),
sku_label = string.IsNullOrWhiteSpace(sku_label) ? null : WebUtility.UrlDecode(sku_label),
data_type = data_type,
supplier_name = supplier_name,
product_type = product_type,
warehouse_code = warehousecode,
monitor_status =monitor_status,
monitor_status = monitor_status,
warehousearea = warehousearea,
warehousetype = warehousetype
};
......@@ -131,5 +131,73 @@ namespace AutoTurnOver.Controllers
}
}
[HttpGet]
public JsonResult LogPage(int limit, int offset, string order, string sort, DateTime? btime, DateTime? etime, string bailun_sku, string data_type = null, int? type = null, string platform_type = null, string warehouse_code = null, string web_site = "")
{
try
{
var m = new dc_report_cash_flow_log_export_page_search_dto
{
data_type = string.IsNullOrWhiteSpace(data_type) ? new List<int> { } : data_type.Split(',').Select(s => int.Parse(s)).ToList(),
btime = btime,
etime = etime,
type = type,
bailun_sku = bailun_sku,
page = (offset / limit) + 1,
rows = limit,
platform_type = platform_type,
issum = false,
sord = order,
sidx = sort,
warehouse_code = warehouse_code,
web_site = web_site
};
var service = new Services.CashFlowServices();
var list = service.LogPage(m);
var total = list.TotalItems;
return new JsonResult(new
{
rows = list.Items,
total = total,
pagecount = list.TotalPages
});
}
catch (Exception ex)
{
return new JsonResult(new
{
message = ex.Message,
stack_trace = ex.StackTrace
});
}
}
public JsonResult LogPageSumFooter(DateTime? btime, DateTime? etime, string bailun_sku, string data_type = null, int? type = null, string platform_type = null, string warehouse_code = null, string web_site = "")
{
var m = new dc_report_cash_flow_log_export_page_search_dto
{
data_type = string.IsNullOrWhiteSpace(data_type) ? new List<int> { } : data_type.Split(',').Select(s => int.Parse(s)).ToList(),
btime = btime,
etime = etime,
type = type,
bailun_sku = bailun_sku,
page =1,
rows = 1,
platform_type = platform_type,
issum = true,
warehouse_code = warehouse_code,
web_site = web_site
};
var total = 0;
var service = new Services.CashFlowServices();
var list = service.LogPage(m);
return new JsonResult(list == null || list.Items.Count <= 0 ? new dc_report_cash_flow_log_dto() : list.Items[0]);
}
}
}
\ No newline at end of file
......@@ -23,7 +23,7 @@ namespace ResetOutofstock
// throw;
//}
report.ResetCashFlowData();
//report.ResetCashFlowData();
var builder = new HostBuilder().ConfigureServices((hostContext, services) =>
......
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