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
ffcd462d
Commit
ffcd462d
authored
Apr 09, 2020
by
guanzhenshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
利润报表 广告费、上架费增加站点筛选
parent
8afac2ab
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
57 additions
and
19 deletions
+57
-19
OrdersServices.cs
Bailun.DC.Services/OrdersServices.cs
+42
-4
OrdersController.cs
Bailun.DC.Web/Areas/Reports/Controllers/OrdersController.cs
+15
-15
No files found.
Bailun.DC.Services/OrdersServices.cs
View file @
ffcd462d
...
...
@@ -3407,8 +3407,13 @@ namespace Bailun.DC.Services
/// <param name="total"></param>
/// <param name="feetype"></param>
/// <returns></returns>
public
dc_base_finance_ebay
EbayFeeCount
(
int
?
companyid
,
DateTime
?
start
,
DateTime
?
end
,
string
[]
feetype
,
string
orderno
,
string
account
,
bool
isUSD
,
string
itemid
,
int
[]
producttype
,
int
?
skusource
,
int
?
shippingstrategy
)
public
dc_base_finance_ebay
EbayFeeCount
(
int
?
companyid
,
DateTime
?
start
,
DateTime
?
end
,
string
[]
feetype
,
string
orderno
,
string
account
,
bool
isUSD
,
string
itemid
,
int
[]
producttype
,
int
?
skusource
,
int
?
shippingstrategy
,
string
platform
,
string
website
)
{
if
(
platform
!=
null
&&
platform
.
ToLower
()
!=
"ebay"
)
{
return
new
dc_base_finance_ebay
();
}
var
sqlparam
=
new
DynamicParameters
();
var
sql
=
$"select sum(t1.gross_amount) gross_amount,sum(t1.net_amount) net_amount,sum(t1.
{(
isUSD
?
"exchange_rate_usd"
:
"exchange_rate"
)}
*t1.gross_amount) gross_amount_rmb from dc_base_finance_ebay t1 "
;
...
...
@@ -3452,6 +3457,11 @@ namespace Bailun.DC.Services
}
}
if
(!
string
.
IsNullOrEmpty
(
website
))
{
sql
+=
" join dc_base_company_account t20 on t20.account_id = t1.account_id and t20.company_id=1 and t20.status=1 and t20.site_en='"
+
website
+
"'"
;
}
sql
+=
" where t1.id!=0 "
;
if
(
start
.
HasValue
)
...
...
@@ -3510,8 +3520,13 @@ namespace Bailun.DC.Services
/// <param name="total"></param>
/// <param name="feetype"></param>
/// <returns></returns>
public
List
<
dc_base_finance_ebay
>
EbayFeeCount
(
int
?
companyid
,
DateTime
?
start
,
DateTime
?
end
,
string
[]
feetype
,
string
orderno
,
string
account
,
bool
isUSD
,
string
itemid
,
int
[]
producttype
,
int
?
skusource
,
int
?
shippingstrategy
,
int
statistictype
)
public
List
<
dc_base_finance_ebay
>
EbayFeeCount
(
int
?
companyid
,
DateTime
?
start
,
DateTime
?
end
,
string
[]
feetype
,
string
orderno
,
string
account
,
bool
isUSD
,
string
itemid
,
int
[]
producttype
,
int
?
skusource
,
int
?
shippingstrategy
,
int
statistictype
,
string
platform
,
string
website
)
{
if
(
platform
!=
null
&&
platform
.
ToLower
()
!=
"ebay"
)
{
return
new
List
<
dc_base_finance_ebay
>();
}
var
sqlparam
=
new
DynamicParameters
();
var
sql
=
$"select sum(t1.gross_amount) gross_amount,sum(t1.net_amount) net_amount,sum(t1.
{(
isUSD
?
"exchange_rate_usd"
:
"exchange_rate"
)}
*t1.gross_amount) gross_amount_rmb from dc_base_finance_ebay t1 "
;
...
...
@@ -3565,6 +3580,11 @@ namespace Bailun.DC.Services
}
}
if
(!
string
.
IsNullOrEmpty
(
website
))
{
sql
+=
" join dc_base_company_account t20 on t20.account_id = t1.account_id and t20.company_id=1 and t20.status=1 and t20.site_en='"
+
website
+
"'"
;
}
sql
+=
" where t1.id!=0 "
;
if
(
start
.
HasValue
)
...
...
@@ -5725,8 +5745,13 @@ namespace Bailun.DC.Services
/// <param name="end"></param>
/// <param name="companyid"></param>
/// <returns></returns>
public
dc_base_finance_amazon_ad_product
ListAmazonADSkuCount
(
string
account
,
DateTime
?
start
,
DateTime
?
end
,
int
?
companyid
,
bool
isUSD
,
int
[]
producttype
,
int
?
skusource
,
int
?
shippingstrategy
)
public
dc_base_finance_amazon_ad_product
ListAmazonADSkuCount
(
string
account
,
DateTime
?
start
,
DateTime
?
end
,
int
?
companyid
,
bool
isUSD
,
int
[]
producttype
,
int
?
skusource
,
int
?
shippingstrategy
,
string
platform
,
string
website
)
{
if
(
platform
!=
null
&&
platform
.
ToLower
()
!=
"fba"
)
{
return
new
dc_base_finance_amazon_ad_product
();
}
var
sqlparam
=
new
DynamicParameters
();
var
sql
=
$"select sum(cost) cost,sum(cost*
{(
isUSD
?
"exchange_rate_usd"
:
"exchange_rate"
)}
) cost_rmb from dc_base_finance_amazon_ad_product t1 join dc_base_company_account t2 on t1.account_id=t2.account_id "
;
...
...
@@ -5768,6 +5793,10 @@ namespace Bailun.DC.Services
}
if
(!
string
.
IsNullOrEmpty
(
website
))
{
sql
+=
" join dc_base_company_account t20 on t20.account_id = t1.account_id and t20.company_id=1 and t20.status=1 and t20.site_en='"
+
website
+
"'"
;
}
sql
+=
" where t1.id!=0 "
;
...
...
@@ -5811,8 +5840,13 @@ namespace Bailun.DC.Services
/// <param name="end"></param>
/// <param name="companyid"></param>
/// <returns></returns>
public
List
<
dc_base_finance_amazon_ad_product
>
ListAmazonADSkuCount
(
string
account
,
DateTime
?
start
,
DateTime
?
end
,
int
?
companyid
,
bool
isUSD
,
int
[]
producttype
,
int
?
skusource
,
int
?
shippingstrategy
,
int
statistictype
)
public
List
<
dc_base_finance_amazon_ad_product
>
ListAmazonADSkuCount
(
string
account
,
DateTime
?
start
,
DateTime
?
end
,
int
?
companyid
,
bool
isUSD
,
int
[]
producttype
,
int
?
skusource
,
int
?
shippingstrategy
,
int
statistictype
,
string
platform
,
string
website
)
{
if
(
platform
!=
null
&&
platform
.
ToLower
()
!=
"fba"
)
{
return
new
List
<
dc_base_finance_amazon_ad_product
>();
}
var
sqlparam
=
new
DynamicParameters
();
var
sql
=
$"select sum(cost) cost,sum(cost*
{(
isUSD
?
"exchange_rate_usd"
:
"exchange_rate"
)}
) cost_rmb from dc_base_finance_amazon_ad_product t1 join dc_base_company_account t2 on t1.account_id=t2.account_id "
;
...
...
@@ -5865,6 +5899,10 @@ namespace Bailun.DC.Services
}
if
(!
string
.
IsNullOrEmpty
(
website
))
{
sql
+=
" join dc_base_company_account t20 on t20.account_id = t1.account_id and t20.company_id=1 and t20.status=1 and t20.site_en='"
+
website
+
"'"
;
}
sql
+=
" where t1.id!=0 "
;
...
...
Bailun.DC.Web/Areas/Reports/Controllers/OrdersController.cs
View file @
ffcd462d
...
...
@@ -1161,7 +1161,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
var
obj
=
_service
.
ListEbayFee
(
parameter
,
companyid
,
start
,
end
,
ref
total
,
feeType
,
orderno
,
account
,
""
);
var
countObj
=
_service
.
EbayFeeCount
(
companyid
,
start
,
end
,
feeType
,
orderno
,
account
,
false
,
""
,
null
,
null
,
null
);
var
countObj
=
_service
.
EbayFeeCount
(
companyid
,
start
,
end
,
feeType
,
orderno
,
account
,
false
,
""
,
null
,
null
,
null
,
""
,
""
);
var
list
=
obj
.
Select
(
a
=>
new
{
a
.
id
,
...
...
@@ -1225,7 +1225,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
var
obj
=
_service
.
ListEbayFee
(
parameter
,
companyid
,
start
,
end
,
ref
total
,
feeType
,
orderno
,
account
,
itemid
);
var
countObj
=
_service
.
EbayFeeCount
(
companyid
,
start
,
end
,
feeType
,
orderno
,
account
,
false
,
itemid
,
null
,
null
,
null
);
var
countObj
=
_service
.
EbayFeeCount
(
companyid
,
start
,
end
,
feeType
,
orderno
,
account
,
false
,
itemid
,
null
,
null
,
null
,
""
,
""
);
var
list
=
obj
.
Select
(
a
=>
new
{
a
.
id
,
...
...
@@ -1768,19 +1768,19 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
if
(
statistictype
==
0
)
{
ebayADFee
=
_service
.
EbayFeeCount
(
companyid
,
dtstart
,
dtend
,
ADfeeType
,
""
,
""
,
currency
.
ToUpper
()
==
"USD"
,
""
,
producttype
,
skusource
,
shippingstrategy
);
ebayPutAway
=
_service
.
EbayFeeCount
(
companyid
,
dtstart
,
dtend
,
PutAwayFeeType
,
""
,
""
,
currency
.
ToUpper
()
==
"USD"
,
""
,
producttype
,
skusource
,
shippingstrategy
);
ebayADFee
=
_service
.
EbayFeeCount
(
companyid
,
dtstart
,
dtend
,
ADfeeType
,
""
,
""
,
currency
.
ToUpper
()
==
"USD"
,
""
,
producttype
,
skusource
,
shippingstrategy
,
platform
,
website
);
ebayPutAway
=
_service
.
EbayFeeCount
(
companyid
,
dtstart
,
dtend
,
PutAwayFeeType
,
""
,
""
,
currency
.
ToUpper
()
==
"USD"
,
""
,
producttype
,
skusource
,
shippingstrategy
,
platform
,
website
);
amazonAD
=
_service
.
ListAmazonADSkuCount
(
""
,
dtstart
,
dtend
,
companyid
,
currency
.
ToUpper
()
==
"USD"
,
producttype
,
skusource
,
shippingstrategy
);
amazonAD
=
_service
.
ListAmazonADSkuCount
(
""
,
dtstart
,
dtend
,
companyid
,
currency
.
ToUpper
()
==
"USD"
,
producttype
,
skusource
,
shippingstrategy
,
platform
,
website
);
aliexpressAD
=
_service
.
ListAliexpressADCount
(
companyid
,
""
,
dtstart
,
dtend
,
currency
.
ToUpper
()
==
"USD"
);
wishAD
=
_service
.
ListWishADCount
(
companyid
,
null
,
dtstart
,
dtend
,
currency
.
ToUpper
()
==
"USD"
);
}
else
{
listebayADFee
=
_service
.
EbayFeeCount
(
companyid
,
dtstart
,
dtend
,
ADfeeType
,
""
,
""
,
currency
.
ToUpper
()
==
"USD"
,
""
,
producttype
,
skusource
,
shippingstrategy
,
statistictype
);
listebayPutAway
=
_service
.
EbayFeeCount
(
companyid
,
dtstart
,
dtend
,
PutAwayFeeType
,
""
,
""
,
currency
.
ToUpper
()
==
"USD"
,
""
,
producttype
,
skusource
,
shippingstrategy
,
statistictype
);
listamazonAD
=
_service
.
ListAmazonADSkuCount
(
""
,
dtstart
,
dtend
,
companyid
,
currency
.
ToUpper
()
==
"USD"
,
producttype
,
skusource
,
shippingstrategy
,
statistictype
);
listebayADFee
=
_service
.
EbayFeeCount
(
companyid
,
dtstart
,
dtend
,
ADfeeType
,
""
,
""
,
currency
.
ToUpper
()
==
"USD"
,
""
,
producttype
,
skusource
,
shippingstrategy
,
statistictype
,
platform
,
website
);
listebayPutAway
=
_service
.
EbayFeeCount
(
companyid
,
dtstart
,
dtend
,
PutAwayFeeType
,
""
,
""
,
currency
.
ToUpper
()
==
"USD"
,
""
,
producttype
,
skusource
,
shippingstrategy
,
statistictype
,
platform
,
website
);
listamazonAD
=
_service
.
ListAmazonADSkuCount
(
""
,
dtstart
,
dtend
,
companyid
,
currency
.
ToUpper
()
==
"USD"
,
producttype
,
skusource
,
shippingstrategy
,
statistictype
,
platform
,
website
);
}
...
...
@@ -1809,18 +1809,18 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
if
(
statistictype
==
0
)
{
ebayADFee
=
_service
.
EbayFeeCount
(
companyid
,
dtstart
,
dtend
,
ADfeeType
,
""
,
""
,
currency
.
ToUpper
()
==
"USD"
,
""
,
null
,
null
,
null
);
ebayPutAway
=
_service
.
EbayFeeCount
(
companyid
,
dtstart
,
dtend
,
PutAwayFeeType
,
""
,
""
,
currency
.
ToUpper
()
==
"USD"
,
""
,
null
,
null
,
null
);
ebayADFee
=
_service
.
EbayFeeCount
(
companyid
,
dtstart
,
dtend
,
ADfeeType
,
""
,
""
,
currency
.
ToUpper
()
==
"USD"
,
""
,
null
,
null
,
null
,
platform
,
website
);
ebayPutAway
=
_service
.
EbayFeeCount
(
companyid
,
dtstart
,
dtend
,
PutAwayFeeType
,
""
,
""
,
currency
.
ToUpper
()
==
"USD"
,
""
,
null
,
null
,
null
,
platform
,
website
);
amazonAD
=
_service
.
ListAmazonADSkuCount
(
""
,
dtstart
,
dtend
,
companyid
,
currency
.
ToUpper
()
==
"USD"
,
null
,
null
,
null
);
amazonAD
=
_service
.
ListAmazonADSkuCount
(
""
,
dtstart
,
dtend
,
companyid
,
currency
.
ToUpper
()
==
"USD"
,
null
,
null
,
null
,
platform
,
website
);
wishAD
=
_service
.
ListWishADCount
(
companyid
,
null
,
dtstart
,
dtend
,
currency
.
ToUpper
()
==
"USD"
);
aliexpressAD
=
_service
.
ListAliexpressADCount
(
companyid
,
""
,
dtstart
,
dtend
,
currency
.
ToUpper
()
==
"USD"
);
}
else
{
listebayADFee
=
_service
.
EbayFeeCount
(
companyid
,
dtstart
,
dtend
,
ADfeeType
,
""
,
""
,
currency
.
ToUpper
()
==
"USD"
,
""
,
producttype
,
skusource
,
shippingstrategy
,
statistictype
);
listebayPutAway
=
_service
.
EbayFeeCount
(
companyid
,
dtstart
,
dtend
,
PutAwayFeeType
,
""
,
""
,
currency
.
ToUpper
()
==
"USD"
,
""
,
producttype
,
skusource
,
shippingstrategy
,
statistictype
);
listamazonAD
=
_service
.
ListAmazonADSkuCount
(
""
,
dtstart
,
dtend
,
companyid
,
currency
.
ToUpper
()
==
"USD"
,
producttype
,
skusource
,
shippingstrategy
,
statistictype
);
listebayADFee
=
_service
.
EbayFeeCount
(
companyid
,
dtstart
,
dtend
,
ADfeeType
,
""
,
""
,
currency
.
ToUpper
()
==
"USD"
,
""
,
producttype
,
skusource
,
shippingstrategy
,
statistictype
,
platform
,
website
);
listebayPutAway
=
_service
.
EbayFeeCount
(
companyid
,
dtstart
,
dtend
,
PutAwayFeeType
,
""
,
""
,
currency
.
ToUpper
()
==
"USD"
,
""
,
producttype
,
skusource
,
shippingstrategy
,
statistictype
,
platform
,
website
);
listamazonAD
=
_service
.
ListAmazonADSkuCount
(
""
,
dtstart
,
dtend
,
companyid
,
currency
.
ToUpper
()
==
"USD"
,
producttype
,
skusource
,
shippingstrategy
,
statistictype
,
platform
,
website
);
}
...
...
@@ -2829,7 +2829,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
var
total
=
0
;
var
obj
=
_service
.
ListAmazonADSku
(
parameter
,
account
,
start
,
end
,
companyid
,
ref
total
);
var
countObj
=
_service
.
ListAmazonADSkuCount
(
account
,
start
,
end
,
companyid
,
false
,
null
,
null
,
null
);
var
countObj
=
_service
.
ListAmazonADSkuCount
(
account
,
start
,
end
,
companyid
,
false
,
null
,
null
,
null
,
""
,
""
);
var
list
=
obj
.
Select
(
a
=>
new
{
a
.
account_name
,
...
...
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