Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
data-center-auto
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bltdc
data-center-auto
Commits
ae749d41
Commit
ae749d41
authored
Jul 30, 2020
by
泽锋 李
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
6c16e1f2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
6 deletions
+28
-6
report.cs
AutoTurnOver.DB/report.cs
+7
-6
report_cash_flow_dao.cs
AutoTurnOver.DB/report_cash_flow_dao.cs
+0
-0
dc_report_cash_flow_log.cs
AutoTurnOver.Models/dc_report_cash_flow_log.cs
+21
-0
No files found.
AutoTurnOver.DB/report.cs
View file @
ae749d41
...
...
@@ -1815,8 +1815,9 @@ start transaction;
-- 清空视图表的数据
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
warehouse_code,
bailun_sku,
sum(val) as 'balance',
@btime as current_date_begin,
...
...
@@ -1828,10 +1829,10 @@ sum(case when occur_time>=@btime and data_type not in (2) then val else 0 end )
sum(case when occur_time<@btime and data_type in (2) then val else 0 end ) as 'last_income',
sum(case when occur_time<@btime and data_type not in (2) then val else 0 end ) as 'last_expend',
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)
GROUP BY bailun_sku;
from dc_report_cash_flow_log where occur_time>=@lastBtime and data_type in (2,3,5,8,9,10,11,12)
and warehouse_code!=''
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
warehouse_code,
bailun_sku,
...
...
@@ -1845,8 +1846,8 @@ sum(case when pay_time>=@btime and data_type not in (2) then val else 0 end ) as
sum(case when pay_time<@btime and data_type in (2) then val else 0 end ) as 'last_income',
sum(case when pay_time<@btime and data_type not in (2) then val else 0 end ) as 'last_expend',
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)
GROUP BY bailun_sku;
from dc_report_cash_flow_log where pay_time>=@lastBtime and data_type in (2,3,5,8,9,10,11,12)
and warehouse_code!=''
GROUP BY bailun_sku
,warehouse_code
;
alter table dc_report_cash_flow_sku_group rename dc_report_cash_flow_sku_groupTemp;
...
...
AutoTurnOver.DB/report_cash_flow_dao.cs
View file @
ae749d41
This diff is collapsed.
Click to expand it.
AutoTurnOver.Models/dc_report_cash_flow_log.cs
View file @
ae749d41
...
...
@@ -278,4 +278,25 @@ namespace AutoTurnOver.Models
public
string
supplier_name
{
get
;
set
;
}
public
string
product_type
{
get
;
set
;
}
}
public
class
dc_report_cash_flow_platform_share_dto
{
public
string
platform_type
{
get
;
set
;
}
public
string
web_stie
{
get
;
set
;
}
/// <summary>
/// 加权销量
/// </summary>
public
decimal
sales_7
{
get
;
set
;
}
public
decimal
sales_14
{
get
;
set
;
}
public
decimal
sales_30
{
get
;
set
;
}
/// <summary>
/// 最终加权销量
/// </summary>
public
decimal
sales_weight
{
get
;
set
;
}
/// <summary>
/// 占比
/// </summary>
public
decimal
ratio
{
get
;
set
;
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment