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
d8da5dbe
Commit
d8da5dbe
authored
Jul 05, 2019
by
guanzhenshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ebay 广告费、上架费增加帐号显示和筛选
parent
8b2ddd20
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
50 additions
and
26 deletions
+50
-26
dc_base_finance_ebay.cs
Bailun.DC.Models/dc_base_finance_ebay.cs
+4
-0
OrdersServices.cs
Bailun.DC.Services/OrdersServices.cs
+17
-5
OrdersController.cs
Bailun.DC.Web/Areas/Reports/Controllers/OrdersController.cs
+12
-10
EbayADFee.cshtml
Bailun.DC.Web/Areas/Reports/Views/Orders/EbayADFee.cshtml
+9
-6
EbayPutAwayFee.cshtml
...n.DC.Web/Areas/Reports/Views/Orders/EbayPutAwayFee.cshtml
+8
-5
No files found.
Bailun.DC.Models/dc_base_finance_ebay.cs
View file @
d8da5dbe
...
...
@@ -119,5 +119,9 @@ namespace Bailun.DC.Models
/// </summary>
public
decimal
gross_amount_rmb
{
get
;
set
;
}
/// <summary>
/// 帐号
/// </summary>
public
string
account_name
{
get
;
set
;
}
}
}
Bailun.DC.Services/OrdersServices.cs
View file @
d8da5dbe
...
...
@@ -2686,11 +2686,11 @@ namespace Bailun.DC.Services
/// <param name="total"></param>
/// <param name="feetype">费用类型</param>
/// <returns></returns>
public
List
<
dc_base_finance_ebay
>
ListEbayFee
(
BtTableParameter
parameter
,
int
?
companyid
,
DateTime
?
start
,
DateTime
?
end
,
ref
int
total
,
string
[]
feetype
,
string
orderno
)
public
List
<
dc_base_finance_ebay
>
ListEbayFee
(
BtTableParameter
parameter
,
int
?
companyid
,
DateTime
?
start
,
DateTime
?
end
,
ref
int
total
,
string
[]
feetype
,
string
orderno
,
string
account
)
{
var
sqlparam
=
new
DynamicParameters
();
var
sql
=
"select t1.id,t1.account_entry_type,t1.description,t1.gmt_date,t1.gross_amount,t1.item_id,t1.net_amount,t1.vat_percent,t1.order_line_id,t1.currency,t1.exchange_rate,(t1.exchange_rate*t1.gross_amount) gross_amount_rmb from dc_base_finance_ebay t1 "
;
var
sql
=
"select t1.id,t1.account_entry_type,t1.description,t1.gmt_date,t1.gross_amount,t1.item_id,t1.net_amount,t1.vat_percent,t1.order_line_id,t1.currency,t1.exchange_rate,(t1.exchange_rate*t1.gross_amount) gross_amount_rmb
,t2.account_name
from dc_base_finance_ebay t1 "
;
sql
+=
" left join dc_base_company_account t2 on t1.company_id=t2.company_id and t1.account_id=t2.account_id "
;
sql
+=
" where 1=1 "
;
if
(
start
.
HasValue
)
...
...
@@ -2721,6 +2721,12 @@ namespace Bailun.DC.Services
sql
+=
" and t1.account_entry_type in ('"
+
string
.
Join
(
"','"
,
feetype
)
+
"')"
;
}
if
(!
string
.
IsNullOrWhiteSpace
(
account
))
{
sql
+=
" and t2.account_name=@account_name"
;
sqlparam
.
Add
(
"account_name"
,
account
);
}
if
(!
string
.
IsNullOrWhiteSpace
(
parameter
.
sort
))
{
sql
+=
" order by t1."
+
parameter
.
sort
+
" "
+
parameter
.
order
;
...
...
@@ -2761,11 +2767,11 @@ 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
)
public
dc_base_finance_ebay
EbayFeeCount
(
int
?
companyid
,
DateTime
?
start
,
DateTime
?
end
,
string
[]
feetype
,
string
orderno
,
string
account
)
{
var
sqlparam
=
new
DynamicParameters
();
var
sql
=
"select sum(t1.gross_amount) gross_amount,sum(t1.net_amount) net_amount,sum(t1.exchange_rate*t1.gross_amount) gross_amount_rmb from dc_base_finance_ebay t1 "
;
sql
+=
" left join dc_base_company_account t2 on t1.company_id=t2.company_id and t1.account_id=t2.account_id "
;
sql
+=
" where 1=1 "
;
if
(
start
.
HasValue
)
...
...
@@ -2796,6 +2802,12 @@ namespace Bailun.DC.Services
sql
+=
" and t1.account_entry_type in ('"
+
string
.
Join
(
"','"
,
feetype
)
+
"')"
;
}
if
(!
string
.
IsNullOrWhiteSpace
(
account
))
{
sql
+=
" and t2.account_name=@account_name"
;
sqlparam
.
Add
(
"account_name"
,
account
);
}
using
(
var
cn
=
new
MySqlConnection
(
Common
.
GlobalConfig
.
ConnectionString
))
{
if
(
cn
.
State
==
System
.
Data
.
ConnectionState
.
Closed
)
...
...
Bailun.DC.Web/Areas/Reports/Controllers/OrdersController.cs
View file @
d8da5dbe
...
...
@@ -1028,7 +1028,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
}
[
BailunAuthentication
(
LoginMode
.
Enforce
)]
public
string
EbayPutAwayFeeJson
(
BtTableParameter
parameter
,
DateTime
?
start
,
DateTime
?
end
,
string
orderno
,
string
sku
,
string
skucategoryid
)
public
string
EbayPutAwayFeeJson
(
BtTableParameter
parameter
,
DateTime
?
start
,
DateTime
?
end
,
string
orderno
,
string
sku
,
string
skucategoryid
,
string
account
)
{
var
_service
=
new
Services
.
OrdersServices
();
var
companyid
=
HttpContextHelper
.
Current
?.
User
?.
GetCompanyId
().
ToInt32
();
...
...
@@ -1050,15 +1050,14 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
"FeeReturnShipping"
,
"PaymentCC"
,
"PaypalOnFile"
,
"PayPalOTPSucc"
,
"PrivateListing"
,
"SubscriptionSMBasic"
,
"SubtitleFee"
};
var
obj
=
_service
.
ListEbayFee
(
parameter
,
companyid
,
start
,
end
,
ref
total
,
feeType
,
orderno
);
var
obj
=
_service
.
ListEbayFee
(
parameter
,
companyid
,
start
,
end
,
ref
total
,
feeType
,
orderno
,
account
);
var
countObj
=
_service
.
EbayFeeCount
(
companyid
,
start
,
end
,
feeType
,
orderno
);
var
countObj
=
_service
.
EbayFeeCount
(
companyid
,
start
,
end
,
feeType
,
orderno
,
account
);
var
list
=
obj
.
Select
(
a
=>
new
{
a
.
id
,
...
...
@@ -1072,7 +1071,8 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
a
.
order_line_id
,
a
.
currency
,
a
.
exchange_rate
,
gross_amount_rmb
=
a
.
gross_amount_rmb
.
ToString
(
"N2"
)
gross_amount_rmb
=
a
.
gross_amount_rmb
.
ToString
(
"N2"
),
a
.
account_name
});
return
JsonConvert
.
SerializeObject
(
new
...
...
@@ -1109,19 +1109,20 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
/// <param name="skucategoryid"></param>
/// <returns></returns>
[
BailunAuthentication
(
LoginMode
.
Enforce
)]
public
string
EbayADFeeJson
(
BtTableParameter
parameter
,
DateTime
?
start
,
DateTime
?
end
,
string
orderno
,
string
sku
,
string
skucategoryid
)
public
string
EbayADFeeJson
(
BtTableParameter
parameter
,
DateTime
?
start
,
DateTime
?
end
,
string
orderno
,
string
sku
,
string
skucategoryid
,
string
account
)
{
var
_service
=
new
Services
.
OrdersServices
();
var
companyid
=
HttpContextHelper
.
Current
?.
User
?.
GetCompanyId
().
ToInt32
();
var
total
=
0
;
var
feeType
=
new
string
[]
{
"CustomCode"
"CustomCode"
,
""
};
var
obj
=
_service
.
ListEbayFee
(
parameter
,
companyid
,
start
,
end
,
ref
total
,
feeType
,
orderno
);
var
obj
=
_service
.
ListEbayFee
(
parameter
,
companyid
,
start
,
end
,
ref
total
,
feeType
,
orderno
,
account
);
var
countObj
=
_service
.
EbayFeeCount
(
companyid
,
start
,
end
,
feeType
,
orderno
);
var
countObj
=
_service
.
EbayFeeCount
(
companyid
,
start
,
end
,
feeType
,
orderno
,
account
);
var
list
=
obj
.
Select
(
a
=>
new
{
a
.
id
,
...
...
@@ -1135,7 +1136,8 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
a
.
order_line_id
,
a
.
currency
,
a
.
exchange_rate
,
gross_amount_rmb
=
a
.
gross_amount_rmb
.
ToString
(
"N2"
)
gross_amount_rmb
=
a
.
gross_amount_rmb
.
ToString
(
"N2"
),
a
.
account_name
});
return
JsonConvert
.
SerializeObject
(
new
...
...
Bailun.DC.Web/Areas/Reports/Views/Orders/EbayADFee.cshtml
View file @
d8da5dbe
...
...
@@ -17,10 +17,12 @@
<div class="ibox-content m-b-sm border-bottom">
<form id="toolbar">
<div class="form-inline" style="line-height:40px;">
@*
<div class="form-group">
<div class="form-group">
<label> </label>
<button type="button" class="btn btn-success" onclick="showleft();">分类筛选</button>
</div>*@
<select id="account" name="account" class="form-control">
<option value="">请选择帐号</option>
</select>
</div>
<div class="form-group">
<label>费用时间</label>
<input id="start" name="start" type="text" class="form-control" style="width:130px;" value="@(DateTime.Now.AddDays(-7).ToString("yyyy-MM-dd"))" />
...
...
@@ -72,7 +74,7 @@
list();
//
listAccount();
listAccount();
//listWebsite();
...
...
@@ -86,6 +88,7 @@
return '<div class="mules" title="' + data.order_line_id + '">' + data.order_line_id + '</div>';
}
},
{ field: 'account_name', title: '销售帐号', width: '120' },
{ field: 'account_entry_type', title: '费用类型', width: '120' },
{ field: 'description', title: '费用名称', width: '130' },
{ field: 'gross_amount', title: '总费用', width: '100', sortable: true, iscount: true},
...
...
@@ -125,7 +128,7 @@
}
}, {
fixedcol: true,
fixedcolnum:1
fixedcolnum:
1
});
}
else {
...
...
@@ -137,7 +140,7 @@
$.submit({
url: '@Url.Content("~/Reports/Orders/ListAccount")',
type:'POST',
paramData: 'platform=
@(ViewBag.platform)
',
paramData: 'platform=
Ebay
',
func: function (result) {
if (result != null && result != undefined) {
$('#account').html('<option value="">选择帐号</option>');
...
...
Bailun.DC.Web/Areas/Reports/Views/Orders/EbayPutAwayFee.cshtml
View file @
d8da5dbe
...
...
@@ -17,10 +17,12 @@
<div class="ibox-content m-b-sm border-bottom">
<form id="toolbar">
<div class="form-inline" style="line-height:40px;">
@*
<div class="form-group">
<div class="form-group">
<label> </label>
<button type="button" class="btn btn-success" onclick="showleft();">分类筛选</button>
</div>*@
<select id="account" name="account" class="form-control">
<option value="">请选择帐号</option>
</select>
</div>
<div class="form-group">
<label>费用时间</label>
<input id="start" name="start" type="text" class="form-control" style="width:130px;" value="@(DateTime.Now.AddDays(-7).ToString("yyyy-MM-dd"))" />
...
...
@@ -72,7 +74,7 @@
list();
//
listAccount();
listAccount();
//listWebsite();
...
...
@@ -86,6 +88,7 @@
return '<div class="mules" title="' + data.order_line_id + '">' + data.order_line_id + '</div>';
}
},
{ field: 'account_name', title: '销售帐号', width: '120' },
{ field: 'account_entry_type', title: '费用类型', width: '120' },
{ field: 'description', title: '费用名称', width: '130' },
{ field: 'gross_amount', title: '总费用', width: '100', sortable: true, iscount: true},
...
...
@@ -137,7 +140,7 @@
$.submit({
url: '@Url.Content("~/Reports/Orders/ListAccount")',
type:'POST',
paramData: 'platform=
@(ViewBag.platform)
',
paramData: 'platform=
Ebay
',
func: function (result) {
if (result != null && result != undefined) {
$('#account').html('<option value="">选择帐号</option>');
...
...
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