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
fda61944
Commit
fda61944
authored
Jul 26, 2021
by
guanzhenshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加月份搜索和月份字段导出
parent
5c13537c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
15 deletions
+50
-15
order_fee_value_amazon.cs
Bailun.DC.Models/DataWareHouse/order_fee_value_amazon.cs
+4
-0
PlatformOrderFeeServices.cs
Bailun.DC.Services/DataWareHouse/PlatformOrderFeeServices.cs
+10
-3
PlatformOrderController.cs
...reas/DataWareHouse/Controllers/PlatformOrderController.cs
+29
-9
FinanceAccount_OrderBilling.cshtml
...se/Views/PlatformOrder/FinanceAccount_OrderBilling.cshtml
+7
-3
No files found.
Bailun.DC.Models/DataWareHouse/order_fee_value_amazon.cs
View file @
fda61944
using
System
;
using
System.Collections.Generic
;
using
System.ComponentModel.DataAnnotations.Schema
;
using
System.Text
;
namespace
Bailun.DC.Models.DataWareHouse
...
...
@@ -103,5 +104,8 @@ namespace Bailun.DC.Models.DataWareHouse
/// </summary>
public
decimal
?
amountval_rmb
{
get
;
set
;
}
[
NotMapped
]
public
string
month
{
get
;
set
;
}
}
}
Bailun.DC.Services/DataWareHouse/PlatformOrderFeeServices.cs
View file @
fda61944
...
...
@@ -114,10 +114,10 @@ namespace Bailun.DC.Services.DataWareHouse
/// <param name="orderno"></param>
/// <param name="total"></param>
/// <returns></returns>
public
List
<
order_fee_value_amazon
>
ListOrderFeeValue
(
int
page
,
int
pagesize
,
string
platform
,
string
website
,
DateTime
?
start
,
DateTime
?
end
,
string
orderno
,
ref
int
total
)
public
List
<
order_fee_value_amazon
>
ListOrderFeeValue
(
int
page
,
int
pagesize
,
string
platform
,
string
website
,
DateTime
?
start
,
DateTime
?
end
,
string
orderno
,
string
month
,
ref
int
total
)
{
var
sql
=
$@"select t1.*
from order_fee_value_amazon t1
where amountval!=0 "
;
var
sql
=
$@"select t1.*
,t2.month from order_fee_value_amazon t1 join flowing_sales t2 on t1.flowing_sales_id=t2.id
where
t1.
amountval!=0 "
;
var
sqlparam
=
new
DynamicParameters
();
if
(!
string
.
IsNullOrEmpty
(
platform
))
...
...
@@ -154,6 +154,13 @@ namespace Bailun.DC.Services.DataWareHouse
sql
+=
$" and t1.datatime<'
{
end
.
Value
.
AddDays
(
1
).
ToString
(
"yyyy-MM-dd"
)}
'"
;
}
if
(!
string
.
IsNullOrEmpty
(
month
))
{
sql
+=
$" and t2.month=@month"
;
sqlparam
.
Add
(
"month"
,
month
);
}
using
(
var
cn
=
new
MySqlConnection
(
Common
.
GlobalConfig
.
ConnectionString_DW
))
{
if
(
cn
.
State
==
System
.
Data
.
ConnectionState
.
Closed
)
...
...
Bailun.DC.Web/Areas/DataWareHouse/Controllers/PlatformOrderController.cs
View file @
fda61944
...
...
@@ -346,8 +346,27 @@ namespace Bailun.DC.Web.Areas.DataWareHouse.Controllers
/// <param name="platform"></param>
/// <param name="website"></param>
/// <returns></returns>
public
JsonResult
UploadOrderBillingMerge
(
string
platform
)
public
JsonResult
UploadOrderBillingMerge
(
string
platform
,
string
month
)
{
if
(
string
.
IsNullOrEmpty
(
platform
))
{
return
Json
(
new
{
success
=
false
,
msg
=
"请选择平台"
});
}
if
(
string
.
IsNullOrEmpty
(
month
))
{
return
Json
(
new
{
success
=
false
,
msg
=
"请选择月份后再导入"
});
}
if
(
Request
.
Form
.
Files
.
Count
==
0
)
{
return
Json
(
new
...
...
@@ -377,12 +396,12 @@ namespace Bailun.DC.Web.Areas.DataWareHouse.Controllers
accountname
=
""
,
createtime
=
DateTime
.
Now
,
jsondata
=
Newtonsoft
.
Json
.
JsonConvert
.
SerializeObject
(
item
),
month
=
""
,
month
=
month
,
platform
=
platform
,
//website = website ?? "",
orderno
=
""
,
platformsku
=
""
,
createuser
=
"页面上传"
createuser
=
"页面上传"
,
};
listOrders
.
Add
(
m
);
...
...
@@ -417,11 +436,11 @@ namespace Bailun.DC.Web.Areas.DataWareHouse.Controllers
return
View
();
}
public
string
FinanceAccount_OrderBillingJson
(
Models
.
BtTableParameter
request
,
string
platform
,
string
website
,
string
account
,
DateTime
?
start
,
DateTime
?
end
,
string
orderno
)
public
string
FinanceAccount_OrderBillingJson
(
Models
.
BtTableParameter
request
,
string
platform
,
string
website
,
string
account
,
DateTime
?
start
,
DateTime
?
end
,
string
orderno
,
string
month
)
{
var
total
=
0
;
var
obj
=
new
Services
.
DataWareHouse
.
PlatformOrderFeeServices
().
ListOrderFeeValue
(
request
.
pageIndex
,
request
.
limit
,
platform
,
website
,
start
,
end
,
orderno
,
ref
total
);
var
obj
=
new
Services
.
DataWareHouse
.
PlatformOrderFeeServices
().
ListOrderFeeValue
(
request
.
pageIndex
,
request
.
limit
,
platform
,
website
,
start
,
end
,
orderno
,
month
,
ref
total
);
var
list
=
obj
.
Select
(
a
=>
new
{
...
...
@@ -441,6 +460,7 @@ namespace Bailun.DC.Web.Areas.DataWareHouse.Controllers
exchange_rate
=
a
.
exchange_rate
.
HasValue
?
a
.
exchange_rate
.
Value
+
""
:
""
,
amountval_rmb
=
a
.
amountval_rmb
.
HasValue
?
a
.
amountval_rmb
.
Value
+
""
:
""
,
a
.
month
,
});
return
Newtonsoft
.
Json
.
JsonConvert
.
SerializeObject
(
new
{
...
...
@@ -459,21 +479,21 @@ namespace Bailun.DC.Web.Areas.DataWareHouse.Controllers
/// <param name="end"></param>
/// <param name="orderno"></param>
/// <returns></returns>
public
ActionResult
ExportFinanceAccount_OrderBilling
(
string
platform
,
string
website
,
string
account
,
DateTime
?
start
,
DateTime
?
end
,
string
orderno
)
public
ActionResult
ExportFinanceAccount_OrderBilling
(
string
platform
,
string
website
,
string
account
,
DateTime
?
start
,
DateTime
?
end
,
string
orderno
,
string
month
)
{
var
total
=
0
;
var
obj
=
new
Services
.
DataWareHouse
.
PlatformOrderFeeServices
().
ListOrderFeeValue
(
0
,
0
,
platform
,
website
,
start
,
end
,
orderno
,
ref
total
);
var
obj
=
new
Services
.
DataWareHouse
.
PlatformOrderFeeServices
().
ListOrderFeeValue
(
0
,
0
,
platform
,
website
,
start
,
end
,
orderno
,
month
,
ref
total
);
var
colnames
=
new
List
<
string
>
{
"主体"
,
"平台"
,
"站点"
,
"账单时间"
,
"单号"
,
"费用字段说明"
,
"财务分类归集说明"
,
"数据中心费用类型"
,
"会计科目编码"
,
"项目编码"
,
"币种"
,
"原币金额"
,
"汇率"
,
"RMB金额"
"主体"
,
"平台"
,
"站点"
,
"账单时间"
,
"单号"
,
"费用字段说明"
,
"财务分类归集说明"
,
"数据中心费用类型"
,
"会计科目编码"
,
"项目编码"
,
"币种"
,
"原币金额"
,
"汇率"
,
"RMB金额"
,
"月份"
};
var
list
=
new
List
<
string
>();
foreach
(
var
item
in
obj
)
{
list
.
Add
(
"公司主体|"
+
item
.
platform
+
"|"
+
item
.
website
+
"|"
+(
item
.
datatime
.
HasValue
?
item
.
datatime
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
):
""
)+
"|"
+
item
.
orderno
+
"|"
+(
item
.
fee_config
?.
feetype
??
""
)
+
"|"
+(
item
.
fee_config
?.
financecategory
??
""
)+
"|"
+(
item
.
fee_config
?.
datacenter_col
??
""
)+
"|"
+(
item
.
fee_config
?.
subjectcode
??
""
)+
"|"
+(
item
.
fee_config
?.
projectcode
??
""
)+
"|"
+
item
.
fee_config
.
currency
+
"|"
+(
item
.
amountval
)+
"|"
+(
item
.
exchange_rate
.
HasValue
?
item
.
exchange_rate
.
Value
+
""
:
""
)+
"|"
+(
item
.
amountval_rmb
.
HasValue
?
item
.
amountval_rmb
.
Value
+
""
:
""
));
list
.
Add
(
"公司主体|"
+
item
.
platform
+
"|"
+
item
.
website
+
"|"
+(
item
.
datatime
.
HasValue
?
item
.
datatime
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
):
""
)+
"|"
+
item
.
orderno
+
"|"
+(
item
.
fee_config
?.
feetype
??
""
)
+
"|"
+(
item
.
fee_config
?.
financecategory
??
""
)+
"|"
+(
item
.
fee_config
?.
datacenter_col
??
""
)+
"|"
+(
item
.
fee_config
?.
subjectcode
??
""
)+
"|"
+(
item
.
fee_config
?.
projectcode
??
""
)+
"|"
+
item
.
fee_config
.
currency
+
"|"
+(
item
.
amountval
)+
"|"
+(
item
.
exchange_rate
.
HasValue
?
item
.
exchange_rate
.
Value
+
""
:
""
)+
"|"
+(
item
.
amountval_rmb
.
HasValue
?
item
.
amountval_rmb
.
Value
+
""
:
""
)
+
"|"
+
item
.
month
);
}
var
guid
=
Guid
.
NewGuid
().
ToString
();
...
...
Bailun.DC.Web/Areas/DataWareHouse/Views/PlatformOrder/FinanceAccount_OrderBilling.cshtml
View file @
fda61944
...
...
@@ -16,9 +16,9 @@
<div class="form-group">
<label>平台:</label>
<select id="platform" name="platform" class="form-control" style="width:120px;">
@if
(ViewBag.platform.Count>
0)
@if
(ViewBag.platform.Count >
0)
{
foreach(var item in ViewBag.platform)
foreach
(var item in ViewBag.platform)
{
<option value="@item">@item</option>
}
...
...
@@ -38,7 +38,10 @@
}
</select>
</div>
<div class="form-group">
<label>账单月份</label>
<input id="month" name="month" type="text" class="form-control" style="width:120px;" value="" />
</div>
<div class="form-group">
<label>时间</label>
<input id="start" name="start" type="text" class="form-control" style="width:130px;" value="" />
...
...
@@ -98,6 +101,7 @@
$(document).ready(function () {
laydate.render({ elem: '#start' });
laydate.render({ elem: '#end' });
laydate.render({ elem:'#month',type:'month' })
var height = document.body.clientHeight;
$("#roletable").attr("data-height", (height - 170));
...
...
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