Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
DataCenter_Core2.1_20190520
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
DataCenter_Core2.1_20190520
Commits
dcceacd7
Commit
dcceacd7
authored
Aug 20, 2021
by
zhouminghui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
a0d41107
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
59 additions
and
56 deletions
+59
-56
FinanceService.cs
Bailun.DC.Services/WebApiService/FinanceService.cs
+59
-56
No files found.
Bailun.DC.Services/WebApiService/FinanceService.cs
View file @
dcceacd7
...
@@ -1135,17 +1135,17 @@ AND financecategoryname LIKE '{financecategory.Replace("产品", "")}%' ";
...
@@ -1135,17 +1135,17 @@ AND financecategoryname LIKE '{financecategory.Replace("产品", "")}%' ";
oldData
.
amount_sales_meirongmj
=
Math
.
Round
(
GetMonthSalesProfiOrderSummary
(
time
,
"美容美甲产品"
).
Sum
(
x
=>
x
.
total_amount_sales
),
2
);
oldData
.
amount_sales_meirongmj
=
Math
.
Round
(
GetMonthSalesProfiOrderSummary
(
time
,
"美容美甲产品"
).
Sum
(
x
=>
x
.
total_amount_sales
),
2
);
oldData
.
amount_sales_fuzhuang
=
Math
.
Round
(
GetMonthSalesProfiOrderSummary
(
time
,
"服装"
).
Sum
(
x
=>
x
.
total_amount_sales
),
2
);
oldData
.
amount_sales_fuzhuang
=
Math
.
Round
(
GetMonthSalesProfiOrderSummary
(
time
,
"服装"
).
Sum
(
x
=>
x
.
total_amount_sales
),
2
);
oldData
.
amount_sales_other
=
Math
.
Round
(
GetMonthSalesProfiOrderSummary
(
time
,
"其他"
).
Sum
(
x
=>
x
.
total_amount_sales
),
2
);
oldData
.
amount_sales_other
=
Math
.
Round
(
GetMonthSalesProfiOrderSummary
(
time
,
"其他"
).
Sum
(
x
=>
x
.
total_amount_sales
),
2
);
oldData
.
fee_refund
=
Math
.
Round
(
GetMonthProfitPlatformPlatformSummary
(
new
GetMonthProfitPlatformDetailInput
{
Month
=
time
}).
Data
.
Sum
(
x
=>
x
.
RefundRmb
.
Value
),
2
);
oldData
.
fee_refund
=
Math
.
Abs
(
Math
.
Round
(
GetMonthProfitPlatformPlatformSummary
(
new
GetMonthProfitPlatformDetailInput
{
Month
=
time
}).
Data
.
Sum
(
x
=>
x
.
RefundRmb
.
Value
),
2
))
*
(-
1
);
//总销售额
//总销售额
oldData
.
amount_sales
=
Math
.
Round
(
(
oldData
.
amount_sales_dianzi
+
oldData
.
amount_sales_fuzhuang
+
oldData
.
amount_sales_jiaju
oldData
.
amount_sales
=
Math
.
Round
(
oldData
.
amount_sales_dianzi
+
oldData
.
amount_sales_fuzhuang
+
oldData
.
amount_sales_jiaju
+
oldData
.
amount_sales_jingyou
+
oldData
.
amount_sales_meirongmj
+
oldData
.
amount_sales_other
)
-
oldData
.
fee_refund
,
2
);
+
oldData
.
amount_sales_jingyou
+
oldData
.
amount_sales_meirongmj
+
oldData
.
amount_sales_other
+
oldData
.
fee_refund
,
2
);
//成本
//成本
oldData
.
cost_jingyou
=
Math
.
Round
(
GetMonthSalesProfiOrderSummary
(
time
,
"精油产品"
,
"成本"
).
Sum
(
x
=>
x
.
total_amount_sales
),
2
);
oldData
.
cost_jingyou
=
Math
.
Abs
(
Math
.
Round
(
GetMonthSalesProfiOrderSummary
(
time
,
"精油产品"
,
"成本"
).
Sum
(
x
=>
x
.
total_amount_sales
),
2
))
*
(-
1
);
oldData
.
cost_dianzi
=
Math
.
Round
(
GetMonthSalesProfiOrderSummary
(
time
,
"电子产品"
,
"成本"
).
Sum
(
x
=>
x
.
total_amount_sales
),
2
);
oldData
.
cost_dianzi
=
Math
.
Abs
(
Math
.
Round
(
GetMonthSalesProfiOrderSummary
(
time
,
"电子产品"
,
"成本"
).
Sum
(
x
=>
x
.
total_amount_sales
),
2
))
*
(-
1
);
oldData
.
cost_jiaju
=
Math
.
Round
(
GetMonthSalesProfiOrderSummary
(
time
,
"家居产品"
,
"成本"
).
Sum
(
x
=>
x
.
total_amount_sales
),
2
);
oldData
.
cost_jiaju
=
Math
.
Abs
(
Math
.
Round
(
GetMonthSalesProfiOrderSummary
(
time
,
"家居产品"
,
"成本"
).
Sum
(
x
=>
x
.
total_amount_sales
),
2
))
*
(-
1
);
oldData
.
cost_meirongmj
=
Math
.
Round
(
GetMonthSalesProfiOrderSummary
(
time
,
"美容美甲产品"
,
"成本"
).
Sum
(
x
=>
x
.
total_amount_sales
),
2
);
oldData
.
cost_meirongmj
=
Math
.
Abs
(
Math
.
Round
(
GetMonthSalesProfiOrderSummary
(
time
,
"美容美甲产品"
,
"成本"
).
Sum
(
x
=>
x
.
total_amount_sales
),
2
))
*
(-
1
);
oldData
.
cost_fuzhuang
=
Math
.
Round
(
GetMonthSalesProfiOrderSummary
(
time
,
"服装"
,
"成本"
).
Sum
(
x
=>
x
.
total_amount_sales
),
2
);
oldData
.
cost_fuzhuang
=
Math
.
Abs
(
Math
.
Round
(
GetMonthSalesProfiOrderSummary
(
time
,
"服装"
,
"成本"
).
Sum
(
x
=>
x
.
total_amount_sales
),
2
))
*
(-
1
);
oldData
.
cost_other
=
Math
.
Round
(
GetMonthSalesProfiOrderSummary
(
time
,
"其他"
,
"成本"
).
Sum
(
x
=>
x
.
total_amount_sales
),
2
);
oldData
.
cost_other
=
Math
.
Abs
(
Math
.
Round
(
GetMonthSalesProfiOrderSummary
(
time
,
"其他"
,
"成本"
).
Sum
(
x
=>
x
.
total_amount_sales
),
2
))
*
(-
1
);
//总成本
//总成本
oldData
.
cost
=
Math
.
Round
(
oldData
.
cost_jingyou
+
oldData
.
cost_dianzi
+
oldData
.
cost_jiaju
oldData
.
cost
=
Math
.
Round
(
oldData
.
cost_jingyou
+
oldData
.
cost_dianzi
+
oldData
.
cost_jiaju
+
oldData
.
cost_meirongmj
+
oldData
.
cost_fuzhuang
+
oldData
.
cost_other
,
2
);
+
oldData
.
cost_meirongmj
+
oldData
.
cost_fuzhuang
+
oldData
.
cost_other
,
2
);
...
@@ -1154,48 +1154,48 @@ AND financecategoryname LIKE '{financecategory.Replace("产品", "")}%' ";
...
@@ -1154,48 +1154,48 @@ AND financecategoryname LIKE '{financecategory.Replace("产品", "")}%' ";
//oldData.fee_ad = Math.Round(SyncMonthProfitFeePlatformFeeSummary(
//oldData.fee_ad = Math.Round(SyncMonthProfitFeePlatformFeeSummary(
// new GetMonthProfitPlatformDetailInput { Month = time, FeeName = "广告及宣传费" }), 2);
// new GetMonthProfitPlatformDetailInput { Month = time, FeeName = "广告及宣传费" }), 2);
oldData
.
fee_ad
=
Math
.
Round
(
ExportMonthProfitFeePlatformFeeDetail
(
oldData
.
fee_ad
=
Math
.
Abs
(
Math
.
Round
(
ExportMonthProfitFeePlatformFeeDetail
(
new
GetMonthProfitPlatformDetailInput
{
Month
=
time
,
FeeName
=
"广告及宣传费"
})
new
GetMonthProfitPlatformDetailInput
{
Month
=
time
,
FeeName
=
"广告及宣传费"
})
.
Where
(
m
=>
m
.
AmountValRmb
!=
null
).
Sum
(
x
=>
x
.
AmountValRmb
.
Value
),
2
);
.
Where
(
m
=>
m
.
AmountValRmb
!=
null
).
Sum
(
x
=>
x
.
AmountValRmb
.
Value
),
2
)
)
*
(-
1
)
;
oldData
.
fee_fba
=
Math
.
Round
(
ExportMonthProfitFeePlatformFeeDetail
(
oldData
.
fee_fba
=
Math
.
Abs
(
Math
.
Round
(
ExportMonthProfitFeePlatformFeeDetail
(
new
GetMonthProfitPlatformDetailInput
{
Month
=
time
,
FeeName
=
"佣金及平台费-亚马逊FBA"
})
new
GetMonthProfitPlatformDetailInput
{
Month
=
time
,
FeeName
=
"佣金及平台费-亚马逊FBA"
})
.
Where
(
m
=>
m
.
AmountValRmb
!=
null
).
Sum
(
x
=>
x
.
AmountValRmb
.
Value
),
2
);
.
Where
(
m
=>
m
.
AmountValRmb
!=
null
).
Sum
(
x
=>
x
.
AmountValRmb
.
Value
),
2
)
)
*
(-
1
)
;
oldData
.
fee_nofba
=
Math
.
Round
(
ExportMonthProfitFeePlatformFeeDetail
(
oldData
.
fee_nofba
=
Math
.
Abs
(
Math
.
Round
(
ExportMonthProfitFeePlatformFeeDetail
(
new
GetMonthProfitPlatformDetailInput
{
Month
=
time
,
FeeName
=
"佣金及平台费-亚马逊非FBA"
})
new
GetMonthProfitPlatformDetailInput
{
Month
=
time
,
FeeName
=
"佣金及平台费-亚马逊非FBA"
})
.
Where
(
m
=>
m
.
AmountValRmb
!=
null
).
Sum
(
x
=>
x
.
AmountValRmb
.
Value
),
2
);
.
Where
(
m
=>
m
.
AmountValRmb
!=
null
).
Sum
(
x
=>
x
.
AmountValRmb
.
Value
),
2
)
)
*
(-
1
)
;
oldData
.
fee_ebay
=
Math
.
Round
(
ExportMonthProfitFeePlatformFeeDetail
(
oldData
.
fee_ebay
=
Math
.
Abs
(
Math
.
Round
(
ExportMonthProfitFeePlatformFeeDetail
(
new
GetMonthProfitPlatformDetailInput
{
Month
=
time
,
FeeName
=
"佣金及平台费-Ebay"
})
new
GetMonthProfitPlatformDetailInput
{
Month
=
time
,
FeeName
=
"佣金及平台费-Ebay"
})
.
Where
(
m
=>
m
.
AmountValRmb
!=
null
).
Sum
(
x
=>
x
.
AmountValRmb
.
Value
),
2
);
.
Where
(
m
=>
m
.
AmountValRmb
!=
null
).
Sum
(
x
=>
x
.
AmountValRmb
.
Value
),
2
)
)
*
(-
1
)
;
oldData
.
fee_ohtre
=
Math
.
Round
(
ExportMonthProfitFeePlatformFeeDetail
(
oldData
.
fee_ohtre
=
Math
.
Abs
(
Math
.
Round
(
ExportMonthProfitFeePlatformFeeDetail
(
new
GetMonthProfitPlatformDetailInput
{
Month
=
time
,
FeeName
=
"佣金及平台费-其他平台"
})
new
GetMonthProfitPlatformDetailInput
{
Month
=
time
,
FeeName
=
"佣金及平台费-其他平台"
})
.
Where
(
m
=>
m
.
AmountValRmb
!=
null
).
Sum
(
x
=>
x
.
AmountValRmb
.
Value
),
2
);
.
Where
(
m
=>
m
.
AmountValRmb
!=
null
).
Sum
(
x
=>
x
.
AmountValRmb
.
Value
),
2
)
)
*
(-
1
)
;
//总平台费
//总平台费
oldData
.
fee_platform
=
Math
.
Round
(
oldData
.
fee_ad
+
oldData
.
fee_fba
+
oldData
.
fee_nofba
+
oldData
.
fee_ebay
+
oldData
.
fee_ohtre
,
2
);
oldData
.
fee_platform
=
Math
.
Round
(
oldData
.
fee_ad
+
oldData
.
fee_fba
+
oldData
.
fee_nofba
+
oldData
.
fee_ebay
+
oldData
.
fee_ohtre
,
2
);
//物流仓储费用
//物流仓储费用
oldData
.
fee_logistics_first
=
Math
.
Round
(
ExportMonthProfitFeePlatformFeeDetail
(
oldData
.
fee_logistics_first
=
Math
.
Abs
(
Math
.
Round
(
ExportMonthProfitFeePlatformFeeDetail
(
new
GetMonthProfitPlatformDetailInput
{
Month
=
time
,
FeeName
=
"头程运输-平台"
})
new
GetMonthProfitPlatformDetailInput
{
Month
=
time
,
FeeName
=
"头程运输-平台"
})
.
Where
(
m
=>
m
.
AmountValRmb
!=
null
).
Sum
(
x
=>
x
.
AmountValRmb
.
Value
),
2
);
.
Where
(
m
=>
m
.
AmountValRmb
!=
null
).
Sum
(
x
=>
x
.
AmountValRmb
.
Value
),
2
)
)
*
(-
1
)
;
oldData
.
fee_nologistics_first
=
Math
.
Round
(
ExportMonthProfitFeePlatformFeeDetail
(
oldData
.
fee_nologistics_first
=
Math
.
Abs
(
Math
.
Round
(
ExportMonthProfitFeePlatformFeeDetail
(
new
GetMonthProfitPlatformDetailInput
{
Month
=
time
,
FeeName
=
"头程运输-非平台"
})
new
GetMonthProfitPlatformDetailInput
{
Month
=
time
,
FeeName
=
"头程运输-非平台"
})
.
Where
(
m
=>
m
.
AmountValRmb
!=
null
).
Sum
(
x
=>
x
.
AmountValRmb
.
Value
),
2
);
.
Where
(
m
=>
m
.
AmountValRmb
!=
null
).
Sum
(
x
=>
x
.
AmountValRmb
.
Value
),
2
)
)
*
(-
1
)
;
oldData
.
fee_logistics_tail
=
Math
.
Round
(
ExportMonthProfitFeePlatformFeeDetail
(
oldData
.
fee_logistics_tail
=
Math
.
Abs
(
Math
.
Round
(
ExportMonthProfitFeePlatformFeeDetail
(
new
GetMonthProfitPlatformDetailInput
{
Month
=
time
,
FeeName
=
"尾程物流费-平台"
})
new
GetMonthProfitPlatformDetailInput
{
Month
=
time
,
FeeName
=
"尾程物流费-平台"
})
.
Where
(
m
=>
m
.
AmountValRmb
!=
null
).
Sum
(
x
=>
x
.
AmountValRmb
.
Value
),
2
);
.
Where
(
m
=>
m
.
AmountValRmb
!=
null
).
Sum
(
x
=>
x
.
AmountValRmb
.
Value
),
2
)
)
*
(-
1
)
;
oldData
.
fee_nologistics_tail
=
Math
.
Round
(
ExportMonthProfitFeePlatformFeeDetail
(
oldData
.
fee_nologistics_tail
=
Math
.
Abs
(
Math
.
Round
(
ExportMonthProfitFeePlatformFeeDetail
(
new
GetMonthProfitPlatformDetailInput
{
Month
=
time
,
FeeName
=
"尾程物流费-非平台"
})
new
GetMonthProfitPlatformDetailInput
{
Month
=
time
,
FeeName
=
"尾程物流费-非平台"
})
.
Where
(
m
=>
m
.
AmountValRmb
!=
null
).
Sum
(
x
=>
x
.
AmountValRmb
.
Value
),
2
);
.
Where
(
m
=>
m
.
AmountValRmb
!=
null
).
Sum
(
x
=>
x
.
AmountValRmb
.
Value
),
2
)
)
*
(-
1
)
;
oldData
.
fee_logistics_direct
=
Math
.
Round
(
ExportMonthProfitFeePlatformFeeDetail
(
oldData
.
fee_logistics_direct
=
Math
.
Abs
(
Math
.
Round
(
ExportMonthProfitFeePlatformFeeDetail
(
new
GetMonthProfitPlatformDetailInput
{
Month
=
time
,
FeeName
=
"直邮物流费-平台"
})
new
GetMonthProfitPlatformDetailInput
{
Month
=
time
,
FeeName
=
"直邮物流费-平台"
})
.
Where
(
m
=>
m
.
AmountValRmb
!=
null
).
Sum
(
x
=>
x
.
AmountValRmb
.
Value
),
2
);
.
Where
(
m
=>
m
.
AmountValRmb
!=
null
).
Sum
(
x
=>
x
.
AmountValRmb
.
Value
),
2
)
)
*
(-
1
)
;
oldData
.
fee_nologistics_direct
=
Math
.
Round
(
ExportMonthProfitFeePlatformFeeDetail
(
oldData
.
fee_nologistics_direct
=
Math
.
Abs
(
Math
.
Round
(
ExportMonthProfitFeePlatformFeeDetail
(
new
GetMonthProfitPlatformDetailInput
{
Month
=
time
,
FeeName
=
"直邮物流费-非平台"
})
new
GetMonthProfitPlatformDetailInput
{
Month
=
time
,
FeeName
=
"直邮物流费-非平台"
})
.
Where
(
m
=>
m
.
AmountValRmb
!=
null
).
Sum
(
x
=>
x
.
AmountValRmb
.
Value
),
2
);
.
Where
(
m
=>
m
.
AmountValRmb
!=
null
).
Sum
(
x
=>
x
.
AmountValRmb
.
Value
),
2
)
)
*
(-
1
)
;
oldData
.
fee_storage
=
Math
.
Round
(
ExportMonthProfitFeePlatformFeeDetail
(
oldData
.
fee_storage
=
Math
.
Abs
(
Math
.
Round
(
ExportMonthProfitFeePlatformFeeDetail
(
new
GetMonthProfitPlatformDetailInput
{
Month
=
time
,
FeeName
=
"仓储费-平台"
})
new
GetMonthProfitPlatformDetailInput
{
Month
=
time
,
FeeName
=
"仓储费-平台"
})
.
Where
(
m
=>
m
.
AmountValRmb
!=
null
).
Sum
(
x
=>
x
.
AmountValRmb
.
Value
),
2
);
.
Where
(
m
=>
m
.
AmountValRmb
!=
null
).
Sum
(
x
=>
x
.
AmountValRmb
.
Value
),
2
)
)
*
(-
1
)
;
oldData
.
fee_nostorage
=
Math
.
Round
(
ExportMonthProfitFeePlatformFeeDetail
(
oldData
.
fee_nostorage
=
Math
.
Abs
(
Math
.
Round
(
ExportMonthProfitFeePlatformFeeDetail
(
new
GetMonthProfitPlatformDetailInput
{
Month
=
time
,
FeeName
=
"仓储费-非平台"
})
new
GetMonthProfitPlatformDetailInput
{
Month
=
time
,
FeeName
=
"仓储费-非平台"
})
.
Where
(
m
=>
m
.
AmountValRmb
!=
null
).
Sum
(
x
=>
x
.
AmountValRmb
.
Value
),
2
);
.
Where
(
m
=>
m
.
AmountValRmb
!=
null
).
Sum
(
x
=>
x
.
AmountValRmb
.
Value
),
2
)
)
*
(-
1
)
;
//总物流仓储费
//总物流仓储费
oldData
.
fee_logistics_storage
=
Math
.
Round
(
oldData
.
fee_logistics_first
+
oldData
.
fee_nologistics_first
+
oldData
.
fee_logistics_tail
+
oldData
.
fee_nologistics_tail
oldData
.
fee_logistics_storage
=
Math
.
Round
(
oldData
.
fee_logistics_first
+
oldData
.
fee_nologistics_first
+
oldData
.
fee_logistics_tail
+
oldData
.
fee_nologistics_tail
+
oldData
.
fee_logistics_direct
+
oldData
.
fee_nologistics_direct
+
oldData
.
fee_storage
+
oldData
.
fee_nostorage
,
2
);
+
oldData
.
fee_logistics_direct
+
oldData
.
fee_nologistics_direct
+
oldData
.
fee_storage
+
oldData
.
fee_nostorage
,
2
);
...
@@ -1206,14 +1206,14 @@ AND financecategoryname LIKE '{financecategory.Replace("产品", "")}%' ";
...
@@ -1206,14 +1206,14 @@ AND financecategoryname LIKE '{financecategory.Replace("产品", "")}%' ";
.
Where
(
m
=>
m
.
AmountValRmb
!=
null
).
Sum
(
x
=>
x
.
AmountValRmb
.
Value
),
2
);
.
Where
(
m
=>
m
.
AmountValRmb
!=
null
).
Sum
(
x
=>
x
.
AmountValRmb
.
Value
),
2
);
//减:营业外支出
//减:营业外支出
oldData
.
pay_non_operating
=
Math
.
Round
(
ExportMonthProfitFeePlatformFeeDetail
(
oldData
.
pay_non_operating
=
Math
.
Abs
(
Math
.
Round
(
ExportMonthProfitFeePlatformFeeDetail
(
new
GetMonthProfitPlatformDetailInput
{
Month
=
time
,
FeeName
=
"营业外支出"
})
new
GetMonthProfitPlatformDetailInput
{
Month
=
time
,
FeeName
=
"营业外支出"
})
.
Where
(
m
=>
m
.
AmountValRmb
!=
null
).
Sum
(
x
=>
x
.
AmountValRmb
.
Value
),
2
);
.
Where
(
m
=>
m
.
AmountValRmb
!=
null
).
Sum
(
x
=>
x
.
AmountValRmb
.
Value
),
2
)
)
*
(-
1
)
;
//销售费用-税金
//销售费用-税金
oldData
.
fee_sales_taxes
=
Math
.
Round
(
ExportMonthProfitFeePlatformFeeDetail
(
oldData
.
fee_sales_taxes
=
Math
.
Abs
(
Math
.
Round
(
ExportMonthProfitFeePlatformFeeDetail
(
new
GetMonthProfitPlatformDetailInput
{
Month
=
time
,
FeeName
=
"税金"
})
new
GetMonthProfitPlatformDetailInput
{
Month
=
time
,
FeeName
=
"税金"
})
.
Where
(
m
=>
m
.
AmountValRmb
!=
null
).
Sum
(
x
=>
x
.
AmountValRmb
.
Value
),
2
);
.
Where
(
m
=>
m
.
AmountValRmb
!=
null
).
Sum
(
x
=>
x
.
AmountValRmb
.
Value
),
2
)
)
*
(-
1
)
;
//其中:歌戈儿收入
//其中:歌戈儿收入
var
operating
=
GetMonthProfitFeeManagementCostDetail
(
time
,
"其中:歌戈儿收入"
).
Data
;
var
operating
=
GetMonthProfitFeeManagementCostDetail
(
time
,
"其中:歌戈儿收入"
).
Data
;
oldData
.
incoming_gogirl
=
Math
.
Round
(
operating
.
Count
==
0
?
0
:
operating
.
Last
().
AmountRmb
.
Value
,
2
);
oldData
.
incoming_gogirl
=
Math
.
Round
(
operating
.
Count
==
0
?
0
:
operating
.
Last
().
AmountRmb
.
Value
,
2
);
...
@@ -1230,16 +1230,16 @@ AND financecategoryname LIKE '{financecategory.Replace("产品", "")}%' ";
...
@@ -1230,16 +1230,16 @@ AND financecategoryname LIKE '{financecategory.Replace("产品", "")}%' ";
var
gzlk
=
GetMonthProfitFeeManagementCostDetail
(
time
,
"广州灵酷跨境科技有限公司"
).
Data
;
var
gzlk
=
GetMonthProfitFeeManagementCostDetail
(
time
,
"广州灵酷跨境科技有限公司"
).
Data
;
var
gzcy
=
GetMonthProfitFeeManagementCostDetail
(
time
,
"广州崇瑜信息技术咨询有限公司"
).
Data
;
var
gzcy
=
GetMonthProfitFeeManagementCostDetail
(
time
,
"广州崇瑜信息技术咨询有限公司"
).
Data
;
oldData
.
managecost_bl_xg
=
Math
.
Round
(
bl_xg
.
Count
==
0
?
0
:
bl_xg
.
Last
().
AmountRmb
.
Value
,
2
);
oldData
.
managecost_bl_xg
=
Math
.
Abs
(
Math
.
Round
(
bl_xg
.
Count
==
0
?
0
:
bl_xg
.
Last
().
AmountRmb
.
Value
,
2
))
*
(-
1
);
oldData
.
managecost_bl_gz
=
Math
.
Round
(
bl_gz
.
Count
==
0
?
0
:
bl_gz
.
Last
().
AmountRmb
.
Value
,
2
);
oldData
.
managecost_bl_gz
=
Math
.
Abs
(
Math
.
Round
(
bl_gz
.
Count
==
0
?
0
:
bl_gz
.
Last
().
AmountRmb
.
Value
,
2
))
*
(-
1
);
oldData
.
managecost_meijia
=
Math
.
Round
(
meijia
.
Count
==
0
?
0
:
meijia
.
Last
().
AmountRmb
.
Value
,
2
);
oldData
.
managecost_meijia
=
Math
.
Abs
(
Math
.
Round
(
meijia
.
Count
==
0
?
0
:
meijia
.
Last
().
AmountRmb
.
Value
,
2
))
*
(-
1
);
oldData
.
managercost_yangshan
=
Math
.
Round
(
yangshan
.
Count
==
0
?
0
:
yangshan
.
Last
().
AmountRmb
.
Value
,
2
);
oldData
.
managercost_yangshan
=
Math
.
Abs
(
Math
.
Round
(
yangshan
.
Count
==
0
?
0
:
yangshan
.
Last
().
AmountRmb
.
Value
,
2
))
*
(-
1
);
oldData
.
managercost_xinhuilan
=
Math
.
Round
(
xinhuilan
.
Count
==
0
?
0
:
xinhuilan
.
Last
().
AmountRmb
.
Value
,
2
);
oldData
.
managercost_xinhuilan
=
Math
.
Abs
(
Math
.
Round
(
xinhuilan
.
Count
==
0
?
0
:
xinhuilan
.
Last
().
AmountRmb
.
Value
,
2
))
*
(-
1
);
oldData
.
managercost_gzdz
=
Math
.
Round
(
gzdz
.
Count
==
0
?
0
:
gzdz
.
Last
().
AmountRmb
.
Value
,
2
);
oldData
.
managercost_gzdz
=
Math
.
Abs
(
Math
.
Round
(
gzdz
.
Count
==
0
?
0
:
gzdz
.
Last
().
AmountRmb
.
Value
,
2
))
*
(-
1
);
oldData
.
managercost_ys
=
Math
.
Round
(
ys
.
Count
==
0
?
0
:
ys
.
Last
().
AmountRmb
.
Value
,
2
);
oldData
.
managercost_ys
=
Math
.
Abs
(
Math
.
Round
(
ys
.
Count
==
0
?
0
:
ys
.
Last
().
AmountRmb
.
Value
,
2
))
*
(-
1
);
oldData
.
managercost_dizhi
=
Math
.
Round
(
dizhi
.
Count
==
0
?
0
:
dizhi
.
Last
().
AmountRmb
.
Value
,
2
);
oldData
.
managercost_dizhi
=
Math
.
Abs
(
Math
.
Round
(
dizhi
.
Count
==
0
?
0
:
dizhi
.
Last
().
AmountRmb
.
Value
,
2
))
*
(-
1
);
oldData
.
managercost_gzlk
=
Math
.
Round
(
gzlk
.
Count
==
0
?
0
:
gzlk
.
Last
().
AmountRmb
.
Value
,
2
);
oldData
.
managercost_gzlk
=
Math
.
Abs
(
Math
.
Round
(
gzlk
.
Count
==
0
?
0
:
gzlk
.
Last
().
AmountRmb
.
Value
,
2
))
*
(-
1
);
oldData
.
managercost_gzcy
=
Math
.
Round
(
gzcy
.
Count
==
0
?
0
:
gzcy
.
Last
().
AmountRmb
.
Value
,
2
);
oldData
.
managercost_gzcy
=
Math
.
Abs
(
Math
.
Round
(
gzcy
.
Count
==
0
?
0
:
gzcy
.
Last
().
AmountRmb
.
Value
,
2
))
*
(-
1
);
//总管理成本
//总管理成本
oldData
.
managercost_count
=
Math
.
Round
(
oldData
.
managecost_bl_xg
+
oldData
.
managecost_bl_gz
+
oldData
.
managecost_meijia
+
oldData
.
managercost_yangshan
oldData
.
managercost_count
=
Math
.
Round
(
oldData
.
managecost_bl_xg
+
oldData
.
managecost_bl_gz
+
oldData
.
managecost_meijia
+
oldData
.
managercost_yangshan
+
oldData
.
managercost_xinhuilan
+
oldData
.
managercost_gzdz
+
oldData
.
managercost_ys
+
oldData
.
managercost_dizhi
+
oldData
.
managercost_gzlk
+
oldData
.
managercost_xinhuilan
+
oldData
.
managercost_gzdz
+
oldData
.
managercost_ys
+
oldData
.
managercost_dizhi
+
oldData
.
managercost_gzlk
...
@@ -1249,19 +1249,19 @@ AND financecategoryname LIKE '{financecategory.Replace("产品", "")}%' ";
...
@@ -1249,19 +1249,19 @@ AND financecategoryname LIKE '{financecategory.Replace("产品", "")}%' ";
//.Data.Data.Sum(x => x.sale_profit), 2);
//.Data.Data.Sum(x => x.sale_profit), 2);
//销售费用合计》平台费用+物流仓储费+税金
//销售费用合计》平台费用+物流仓储费+税金
oldData
.
fee_sales_count
=
Math
.
Round
(
oldData
.
fee_platform
+
oldData
.
fee_logistics_storage
+
oldData
.
fee_sales_taxes
,
2
);
oldData
.
fee_sales_count
=
Math
.
Round
(
Math
.
Abs
(
oldData
.
fee_platform
)
+
Math
.
Abs
(
oldData
.
fee_logistics_storage
)
+
Math
.
Abs
(
oldData
.
fee_sales_taxes
)
,
2
);
//销售利润》总销售额-总成本-销售费用合计
//销售利润》总销售额-总成本-销售费用合计
oldData
.
profit_sales
=
Math
.
Round
(
oldData
.
amount_sales
-
oldData
.
cost
-
oldData
.
fee_sales_count
,
2
);
oldData
.
profit_sales
=
Math
.
Round
(
Math
.
Abs
(
oldData
.
amount_sales
)
-
Math
.
Abs
(
oldData
.
cost
)
-
Math
.
Abs
(
oldData
.
fee_sales_count
)
,
2
);
//销售毛利润》销售利润/总销售额
//销售毛利润》销售利润/总销售额
oldData
.
rate_profit_sales
=
Math
.
Round
(
oldData
.
profit_sales
/
oldData
.
amount_sales
,
2
);
oldData
.
rate_profit_sales
=
Math
.
Round
(
Math
.
Abs
(
oldData
.
profit_sales
)
/
Math
.
Abs
(
oldData
.
amount_sales
)
,
2
);
//营业利润》销售利润-总管理成本
//营业利润》销售利润-总管理成本
oldData
.
profit
=
Math
.
Round
(
oldData
.
profit_sales
-
oldData
.
managercost_count
,
2
);
oldData
.
profit
=
Math
.
Round
(
Math
.
Abs
(
oldData
.
profit_sales
)
-
Math
.
Abs
(
oldData
.
managercost_count
)
,
2
);
//营业毛利率》营业利润/总销售额
//营业毛利率》营业利润/总销售额
oldData
.
rate_profit
=
Math
.
Round
(
oldData
.
profit
/
oldData
.
amount_sales
,
2
);
oldData
.
rate_profit
=
Math
.
Round
(
oldData
.
profit
/
Math
.
Abs
(
oldData
.
amount_sales
)
,
2
);
//实际利润》营业利润+加:其他收入+加:营业外收入+减:营业外支出
//实际利润》营业利润+加:其他收入+加:营业外收入+减:营业外支出
oldData
.
actual_profit
=
Math
.
Round
(
oldData
.
profit
+
oldData
.
incoming_other
+
oldData
.
incoming_non_operating
+
oldData
.
pay_non_operating
,
2
);
oldData
.
actual_profit
=
Math
.
Round
(
oldData
.
profit
+
Math
.
Abs
(
oldData
.
incoming_other
)
+
Math
.
Abs
(
oldData
.
incoming_non_operating
)
+
Math
.
Abs
(
oldData
.
pay_non_operating
)
,
2
);
//净利润》实际利润/总销售额
//净利润》实际利润/总销售额
oldData
.
rate_profit_actual
=
Math
.
Round
(
oldData
.
actual_profit
/
oldData
.
amount_sales
,
2
);
oldData
.
rate_profit_actual
=
Math
.
Round
(
oldData
.
actual_profit
/
Math
.
Abs
(
oldData
.
amount_sales
)
,
2
);
//保存
//保存
using
(
var
cn
=
new
MySqlConnection
(
Common
.
GlobalConfig
.
ConnectionString
))
using
(
var
cn
=
new
MySqlConnection
(
Common
.
GlobalConfig
.
ConnectionString
))
...
@@ -1272,10 +1272,13 @@ AND financecategoryname LIKE '{financecategory.Replace("产品", "")}%' ";
...
@@ -1272,10 +1272,13 @@ AND financecategoryname LIKE '{financecategory.Replace("产品", "")}%' ";
}
}
if
(
oldData
.
id
>
0
)
if
(
oldData
.
id
>
0
)
{
{
oldData
.
lastupdatetime
=
DateTime
.
Now
;
cn
.
Update
(
oldData
);
cn
.
Update
(
oldData
);
}
}
else
else
{
{
oldData
.
createtime
=
DateTime
.
Now
;
oldData
.
lastupdatetime
=
DateTime
.
Now
;
cn
.
Insert
(
oldData
);
cn
.
Insert
(
oldData
);
}
}
}
}
...
...
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