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
479d9f13
Commit
479d9f13
authored
Nov 18, 2021
by
jianshuqin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改功能:减:营业外收入 增加存货报损
parent
9d40991c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
62 deletions
+3
-62
FinanceService.cs
Bailun.DC.Services/WebApiService/FinanceService.cs
+3
-62
No files found.
Bailun.DC.Services/WebApiService/FinanceService.cs
View file @
479d9f13
...
@@ -992,46 +992,7 @@ ON s2.id = s1.order_fee_config_id WHERE s1.month = @month ");
...
@@ -992,46 +992,7 @@ ON s2.id = s1.order_fee_config_id WHERE s1.month = @month ");
}
}
if
(
isSum
)
if
(
isSum
)
{
{
sql
.
Append
(
" GROUP BY s1.platform,s1.website "
);
sql
.
Append
(
" GROUP BY s1.platform,s1.website"
);
sql
.
Append
(
@"UNION ALL
SELECT
'存货报损' as platform_type
,'' as website
,SUM( t1.cost_product ) AS original_amount
,SUM( t1.cost_product ) AS total_amount_sales
,COUNT(*) AS total_order
FROM
order_fee_damaged t1
WHERE
t1.`month` = @month
AND isdelete = 0
AND status_name = '盘亏'"
);
}
else
if
(
string
.
IsNullOrWhiteSpace
(
input
.
PlatformType
)
||
input
.
PlatformType
==
"存货报损"
)
{
sql
.
Append
(
$@"UNION ALL
SELECT
'存货报损' AS PlatForm
,'' AS WebSite
,bailun_sku_original AS Orderno
,operation_time AS DataTime
,cost_product AS AmountVal
,'营业外支出' AS FeeType
,'' AS Subjectcode
,'' AS ProjectCode
,'' AS FinanceCategory
,'营业外支出' AS DatacenterCol
,'人民币' AS Currency
,'人民币' AS EbayCurrency
,'1.000000' AS ExchangeRate
,cost_product AS AmountValRmb
,`MONTH` AS `MONTH`
FROM
order_fee_damaged t1
WHERE
t1.`month` = @month
AND isdelete = 0
AND status_name = '盘亏'"
);
}
}
return
sql
.
ToString
();
return
sql
.
ToString
();
}
}
...
@@ -1157,26 +1118,6 @@ AND s2.datacenter_col like '%{input.FeeName}' group by s2.platform,s1.website ";
...
@@ -1157,26 +1118,6 @@ AND s2.datacenter_col like '%{input.FeeName}' group by s2.platform,s1.website ";
return
data
.
Sum
(
x
=>
x
.
total
);
return
data
.
Sum
(
x
=>
x
.
total
);
}
}
public
decimal
GetMonthFeeDamagedSummary
(
string
month
)
{
decimal
?
damaged
=
default
(
decimal
?);
var
parameters
=
new
DynamicParameters
();
var
sql
=
$@"SELECT SUM(t1.cost_product) as cost_product
from order_fee_damaged t1
WHERE t1.`month` = @month and isdelete = 0 and status_name = '盘亏'"
;
parameters
.
Add
(
"month"
,
month
);
using
(
var
db
=
new
MySqlConnection
(
GlobalConfig
.
ConnectionString_DW
))
{
if
(
db
.
State
==
ConnectionState
.
Closed
)
{
db
.
Open
();
}
damaged
=
db
.
QueryFirstOrDefault
<
decimal
?>(
sql
,
parameters
);
}
return
damaged
??
0
;
}
/// <summary>
/// <summary>
/// 退款分页明细
/// 退款分页明细
/// </summary>
/// </summary>
...
@@ -1616,8 +1557,8 @@ t1.exchange_rate AS ExchangeRate,t1.amountval_rmb AS AmountValRmb,t1.month AS Mo
...
@@ -1616,8 +1557,8 @@ t1.exchange_rate AS ExchangeRate,t1.amountval_rmb AS AmountValRmb,t1.month AS Mo
// new GetMonthProfitPlatformDetailInput { Month = time, FeeName = "营业外收入" }), 2);
// new GetMonthProfitPlatformDetailInput { Month = time, FeeName = "营业外收入" }), 2);
//减:营业外支出
//减:营业外支出
oldData
.
pay_non_operating
=
Math
.
Round
(
Math
.
Abs
(
SyncMonthProfitFeePlatformFeeSummary
(
oldData
.
pay_non_operating
=
Math
.
Abs
(
Math
.
Round
(
(
SyncMonthProfitFeePlatformFeeSummary
(
new
GetMonthProfitPlatformDetailInput
{
Month
=
time
,
FeeName
=
"营业外支出"
})
)
+
Math
.
Abs
(
groupMx
)
+
Math
.
Abs
(
GetMonthFeeDamagedSummary
(
time
)),
2
)
*
(-
1
);
new
GetMonthProfitPlatformDetailInput
{
Month
=
time
,
FeeName
=
"营业外支出"
})
+
Math
.
Abs
(
groupMx
)),
2
)
)
*
(-
1
);
//销售费用-税金
//销售费用-税金
...
...
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