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
6f5cac08
Commit
6f5cac08
authored
Sep 22, 2021
by
zhouminghui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
个别平台转负数
parent
64c331a4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
108 additions
and
0 deletions
+108
-0
FinanceService.cs
Bailun.DC.Services/WebApiService/FinanceService.cs
+108
-0
No files found.
Bailun.DC.Services/WebApiService/FinanceService.cs
View file @
6f5cac08
...
@@ -866,6 +866,42 @@ or (is_lend=2 and cost_form=1)) and pay_time>= @start and pay_time< @end ");
...
@@ -866,6 +866,42 @@ or (is_lend=2 and cost_form=1)) and pay_time>= @start and pay_time< @end ");
//}
//}
var
sql
=
BuildMonthProfitFeePlatformFeeDetailSql
(
input
,
out
DynamicParameters
param
,
false
,
true
);
var
sql
=
BuildMonthProfitFeePlatformFeeDetailSql
(
input
,
out
DynamicParameters
param
,
false
,
true
);
var
data
=
SimpleCRUD
.
Query
<
PlatformTypeMonthlyStatisticsDto
>(
sql
,
param
,
GlobalConfig
.
ConnectionString_DW
).
ToList
();
var
data
=
SimpleCRUD
.
Query
<
PlatformTypeMonthlyStatisticsDto
>(
sql
,
param
,
GlobalConfig
.
ConnectionString_DW
).
ToList
();
if
(
input
.
FeeName
.
Contains
(
"仓储费-平台"
))
{
data
=
data
.
Select
(
x
=>
{
if
(
x
.
platform_type
.
ToLower
()
==
"wihs"
)
{
x
.
original_amount
=
Math
.
Abs
(
x
.
original_amount
)
*
-
1
;
x
.
total_amount_sales
=
Math
.
Abs
(
x
.
total_amount_sales
)
*
-
1
;
}
return
x
;
}).
ToList
();
}
if
(
input
.
FeeName
.
Contains
(
"广告及宣传费"
))
{
data
=
data
.
Select
(
x
=>
{
if
(
x
.
platform_type
.
ToLower
()
==
"dhgate"
||
x
.
platform_type
.
ToLower
()
==
"etsy"
||
x
.
platform_type
.
ToLower
()
==
"shopify"
)
{
x
.
original_amount
=
Math
.
Abs
(
x
.
original_amount
)
*
-
1
;
x
.
total_amount_sales
=
Math
.
Abs
(
x
.
total_amount_sales
)
*
-
1
;
}
return
x
;
}).
ToList
();
}
if
(
input
.
FeeName
.
Contains
(
"尾程物流费-平台"
))
{
data
=
data
.
Select
(
x
=>
{
if
(
x
.
platform_type
.
ToLower
()
==
"lazada"
)
{
x
.
original_amount
=
Math
.
Abs
(
x
.
original_amount
)
*
-
1
;
x
.
total_amount_sales
=
Math
.
Abs
(
x
.
total_amount_sales
)
*
-
1
;
}
return
x
;
}).
ToList
();
}
data
=
data
.
Select
(
x
=>
data
=
data
.
Select
(
x
=>
{
{
if
(
x
.
platform_type
.
Contains
(
"万邑通"
)
||
x
.
platform_type
.
Contains
(
"速卖通"
))
if
(
x
.
platform_type
.
Contains
(
"万邑通"
)
||
x
.
platform_type
.
Contains
(
"速卖通"
))
...
@@ -965,6 +1001,42 @@ ON s2.id = s1.order_fee_config_id WHERE s1.month = @month ");
...
@@ -965,6 +1001,42 @@ ON s2.id = s1.order_fee_config_id WHERE s1.month = @month ");
{
{
var
sql
=
BuildMonthProfitFeePlatformFeeDetailSql
(
input
,
out
DynamicParameters
parameters
,
false
,
false
);
var
sql
=
BuildMonthProfitFeePlatformFeeDetailSql
(
input
,
out
DynamicParameters
parameters
,
false
,
false
);
var
data
=
SimpleCRUD
.
Query
<
MonthPlatformProfitDto
>(
sql
,
parameters
,
GlobalConfig
.
ConnectionString_DW
).
ToList
();
var
data
=
SimpleCRUD
.
Query
<
MonthPlatformProfitDto
>(
sql
,
parameters
,
GlobalConfig
.
ConnectionString_DW
).
ToList
();
if
(
input
.
FeeName
.
Contains
(
"仓储费-平台"
))
{
data
=
data
.
Select
(
x
=>
{
if
(
x
.
PlatForm
.
ToLower
()
==
"wihs"
)
{
x
.
AmountVal
=
Math
.
Abs
(
x
.
AmountVal
.
Value
)
*
-
1
;
x
.
AmountValRmb
=
Math
.
Abs
(
x
.
AmountValRmb
.
Value
)
*
-
1
;
}
return
x
;
}).
ToList
();
}
if
(
input
.
FeeName
.
Contains
(
"广告及宣传费"
))
{
data
=
data
.
Select
(
x
=>
{
if
(
x
.
PlatForm
.
ToLower
()
==
"dhgate"
||
x
.
PlatForm
.
ToLower
()
==
"etsy"
||
x
.
PlatForm
.
ToLower
()
==
"shopify"
)
{
x
.
AmountVal
=
Math
.
Abs
(
x
.
AmountVal
.
Value
)
*
-
1
;
x
.
AmountValRmb
=
Math
.
Abs
(
x
.
AmountValRmb
.
Value
)
*
-
1
;
}
return
x
;
}).
ToList
();
}
if
(
input
.
FeeName
.
Contains
(
"尾程物流费-平台"
))
{
data
=
data
.
Select
(
x
=>
{
if
(
x
.
PlatForm
.
ToLower
()
==
"lazada"
)
{
x
.
AmountVal
=
Math
.
Abs
(
x
.
AmountVal
.
Value
)
*
-
1
;
x
.
AmountValRmb
=
Math
.
Abs
(
x
.
AmountValRmb
.
Value
)
*
-
1
;
}
return
x
;
}).
ToList
();
}
data
=
data
.
Select
(
x
=>
data
=
data
.
Select
(
x
=>
{
{
if
(
x
.
PlatForm
.
Contains
(
"万邑通"
)
||
x
.
PlatForm
.
Contains
(
"速卖通"
))
if
(
x
.
PlatForm
.
Contains
(
"万邑通"
)
||
x
.
PlatForm
.
Contains
(
"速卖通"
))
...
@@ -992,6 +1064,42 @@ WHERE s1.amountval != 0 AND s1.month = @month
...
@@ -992,6 +1064,42 @@ WHERE s1.amountval != 0 AND s1.month = @month
AND s2.datacenter_col like '%
{
input
.
FeeName
}
' group by s2.platform,s1.website "
;
AND s2.datacenter_col like '%
{
input
.
FeeName
}
' group by s2.platform,s1.website "
;
parameters
.
Add
(
"month"
,
input
.
Month
);
parameters
.
Add
(
"month"
,
input
.
Month
);
var
data
=
SimpleCRUD
.
Query
<(
string
platform
,
string
site
,
decimal
total
)>(
sql
,
parameters
,
GlobalConfig
.
ConnectionString_DW
).
ToList
();
var
data
=
SimpleCRUD
.
Query
<(
string
platform
,
string
site
,
decimal
total
)>(
sql
,
parameters
,
GlobalConfig
.
ConnectionString_DW
).
ToList
();
//2021-09-22张滢萍提出需求:仓储费-平台的wish改负数、广告及宣传费的Dhgate,Etsy,shopify改负数、尾程物流费-平台的lazada改负数
if
(
input
.
FeeName
.
Contains
(
"仓储费-平台"
))
{
data
=
data
.
Select
(
x
=>
{
if
(
x
.
platform
.
ToLower
()
==
"wihs"
)
{
x
.
total
=
Math
.
Abs
(
x
.
total
)
*
-
1
;
}
return
x
;
}).
ToList
();
}
if
(
input
.
FeeName
.
Contains
(
"广告及宣传费"
))
{
data
=
data
.
Select
(
x
=>
{
if
(
x
.
platform
.
ToLower
()
==
"dhgate"
||
x
.
platform
.
ToLower
()
==
"etsy"
||
x
.
platform
.
ToLower
()
==
"shopify"
)
{
x
.
total
=
Math
.
Abs
(
x
.
total
)
*
-
1
;
}
return
x
;
}).
ToList
();
}
if
(
input
.
FeeName
.
Contains
(
"尾程物流费-平台"
))
{
data
=
data
.
Select
(
x
=>
{
if
(
x
.
platform
.
ToLower
()
==
"lazada"
)
{
x
.
total
=
Math
.
Abs
(
x
.
total
)
*
-
1
;
}
return
x
;
}).
ToList
();
}
//其他
data
=
data
.
Select
(
x
=>
data
=
data
.
Select
(
x
=>
{
{
if
(
x
.
platform
.
Contains
(
"万邑通"
)
||
x
.
platform
.
Contains
(
"速卖通"
))
if
(
x
.
platform
.
Contains
(
"万邑通"
)
||
x
.
platform
.
Contains
(
"速卖通"
))
...
...
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