Commit f48eed5b by 泽锋 李

支付周期支持配置站点;

仓库sku 统计到仓库+sku维度
parent ecbe5005
...@@ -1676,6 +1676,7 @@ and start_date<=@end_date and end_date>=@start_date ...@@ -1676,6 +1676,7 @@ and start_date<=@end_date and end_date>=@start_date
try try
{ {
m.platform_type = (m.platform_type??""); m.platform_type = (m.platform_type??"");
m.web_stite = (m.web_stite ?? "");
if (m.id > 0) if (m.id > 0)
{ {
var result = _connection.Update<Models.dc_report_cash_flow_config>(m); var result = _connection.Update<Models.dc_report_cash_flow_config>(m);
......
...@@ -1778,8 +1778,9 @@ start transaction; ...@@ -1778,8 +1778,9 @@ start transaction;
-- 清空视图表的数据 -- 清空视图表的数据
Truncate table dc_report_cash_flow_sku_group_temp; Truncate table dc_report_cash_flow_sku_group_temp;
insert dc_report_cash_flow_sku_group_temp(`bailun_sku`,`balance`,`current_date_begin`,`current_date_end`,`last_date_begin`,`last_date_end`,`current_income`,`current_expend`,`last_income`,`last_expend`,`type`) insert dc_report_cash_flow_sku_group_temp(`warehouse_code`,`bailun_sku`,`balance`,`current_date_begin`,`current_date_end`,`last_date_begin`,`last_date_end`,`current_income`,`current_expend`,`last_income`,`last_expend`,`type`)
select select
warehouse_code,
bailun_sku, bailun_sku,
sum(val) as 'balance', sum(val) as 'balance',
@btime as current_date_begin, @btime as current_date_begin,
...@@ -1792,10 +1793,11 @@ sum(case when occur_time<@btime and data_type in (2) then val else 0 end ) as 'l ...@@ -1792,10 +1793,11 @@ sum(case when occur_time<@btime and data_type in (2) then val else 0 end ) as 'l
sum(case when occur_time<@btime and data_type not in (2) then val else 0 end ) as 'last_expend', sum(case when occur_time<@btime and data_type not in (2) then val else 0 end ) as 'last_expend',
1 as 'type' 1 as 'type'
from dc_report_cash_flow_log where occur_time>=@lastBtime and data_type in (2,3,5,8,9,10,11,12) from dc_report_cash_flow_log where occur_time>=@lastBtime and data_type in (2,3,5,8,9,10,11,12)
GROUP BY bailun_sku; GROUP BY bailun_sku,warehouse_code;
insert dc_report_cash_flow_sku_group_temp(`bailun_sku`,`balance`,`current_date_begin`,`current_date_end`,`last_date_begin`,`last_date_end`,`current_income`,`current_expend`,`last_income`,`last_expend`,`type`) insert dc_report_cash_flow_sku_group_temp(`warehouse_code`,`bailun_sku`,`balance`,`current_date_begin`,`current_date_end`,`last_date_begin`,`last_date_end`,`current_income`,`current_expend`,`last_income`,`last_expend`,`type`)
select select
warehouse_code,
bailun_sku, bailun_sku,
sum(val) as 'balance', sum(val) as 'balance',
@btime as current_date_begin, @btime as current_date_begin,
...@@ -1808,7 +1810,7 @@ sum(case when pay_time<@btime and data_type in (2) then val else 0 end ) as 'las ...@@ -1808,7 +1810,7 @@ sum(case when pay_time<@btime and data_type in (2) then val else 0 end ) as 'las
sum(case when pay_time<@btime and data_type not in (2) then val else 0 end ) as 'last_expend', sum(case when pay_time<@btime and data_type not in (2) then val else 0 end ) as 'last_expend',
2 as 'type' 2 as 'type'
from dc_report_cash_flow_log where pay_time>=@lastBtime and data_type in (2,3,5,8,9,10,11,12) from dc_report_cash_flow_log where pay_time>=@lastBtime and data_type in (2,3,5,8,9,10,11,12)
GROUP BY bailun_sku; GROUP BY bailun_sku,warehouse_code;
alter table dc_report_cash_flow_sku_group rename dc_report_cash_flow_sku_groupTemp; alter table dc_report_cash_flow_sku_group rename dc_report_cash_flow_sku_groupTemp;
...@@ -2539,5 +2541,10 @@ where 1=1 ...@@ -2539,5 +2541,10 @@ where 1=1
} }
return _connection.Page<dc_base_wip_stock_dto>(sql, search, parameters); return _connection.Page<dc_base_wip_stock_dto>(sql, search, parameters);
} }
public static List<platform_type_website_dto> PlatformtypeWebsiteList(string platform_type)
{
return _connection.Query<platform_type_website_dto>(" select DISTINCT platform_type,website from dc_base_oms_order ").AsList();
}
} }
} }
......
...@@ -47,6 +47,7 @@ namespace AutoTurnOver.Models ...@@ -47,6 +47,7 @@ namespace AutoTurnOver.Models
/// 项目编号 /// 项目编号
/// </summary> /// </summary>
public string item_no { get; set; } public string item_no { get; set; }
public string web_site { get; set; }
/// <summary> /// <summary>
/// 备注 /// 备注
...@@ -123,6 +124,7 @@ namespace AutoTurnOver.Models ...@@ -123,6 +124,7 @@ namespace AutoTurnOver.Models
/// 平台类型 /// 平台类型
/// </summary> /// </summary>
public string platform_type { get; set; } public string platform_type { get; set; }
public string web_stite { get; set; }
/// <summary> /// <summary>
/// 数据类型 /// 数据类型
......
...@@ -685,11 +685,13 @@ namespace AutoTurnOver.Services ...@@ -685,11 +685,13 @@ namespace AutoTurnOver.Services
public static List<platform_type_website_dto> PlatformtypeWebsiteList(string platform_type) public static List<platform_type_website_dto> PlatformtypeWebsiteList(string platform_type)
{ {
//查询采购建议明细 //查询采购建议明细
var datas = RedisHelper.Get(RedisConsts.platform_type_website, () => //var datas = RedisHelper.Get(RedisConsts.platform_type_website, () =>
{ //{
return report.GetPlatformWebsite(); // return report.GetPlatformWebsite();
}); //});
var datas = report.PlatformtypeWebsiteList(platform_type);
if (!string.IsNullOrWhiteSpace(platform_type)) if (!string.IsNullOrWhiteSpace(platform_type))
{ {
datas = datas.Where(s => platform_type.Equals(s.platform_type, StringComparison.OrdinalIgnoreCase)).ToList(); datas = datas.Where(s => platform_type.Equals(s.platform_type, StringComparison.OrdinalIgnoreCase)).ToList();
......
...@@ -147,11 +147,11 @@ namespace AutoTurnOver.Controllers ...@@ -147,11 +147,11 @@ namespace AutoTurnOver.Controllers
} }
public JsonResult LogisticsCompanyList(string name) public JsonResult LogisticsCompanyList()
{ {
try try
{ {
var list = ApiUtility.RealTimeShipLogisticsCompanyList().Where(s=>s.Company_Name.Contains(name)); var list = ApiUtility.RealTimeShipLogisticsCompanyList();
return new JsonResult(list.Select(p => new return new JsonResult(list.Select(p => new
{ {
id = p.Company_Code, id = p.Company_Code,
......
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