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
c5a27791
Commit
c5a27791
authored
Jul 14, 2021
by
zhoujinhui
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://code.bailuntec.com/bltdc/DataCenter_Core2.1_20190520
parents
1ff33071
1094ee3b
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
621 additions
and
5 deletions
+621
-5
flowing_sales.cs
Bailun.DC.Models/DataWareHouse/flowing_sales.cs
+29
-0
PlatformOrderServices.cs
Bailun.DC.Services/DataWareHouse/PlatformOrderServices.cs
+95
-0
PlatformOrderController.cs
...reas/DataWareHouse/Controllers/PlatformOrderController.cs
+192
-0
OrderBillings.cshtml
...as/DataWareHouse/Views/PlatformOrder/OrderBillings.cshtml
+301
-0
FinanceController.cs
Bailun.DC.Web/Areas/Reports/Controllers/FinanceController.cs
+0
-1
ListOrder.cshtml
Bailun.DC.Web/Areas/Reports/Views/Orders/ListOrder.cshtml
+1
-1
PlatformProfitCount.cshtml
...Web/Areas/Reports/Views/Orders/PlatformProfitCount.cshtml
+1
-1
PlatformSaleStatistics.cshtml
.../Areas/Reports/Views/Orders/PlatformSaleStatistics.cshtml
+2
-2
bootstrap-paginator.js
Bailun.DC.Web/wwwroot/js/jspagination/bootstrap-paginator.js
+0
-0
No files found.
Bailun.DC.Models/DataWareHouse/flowing_sales.cs
0 → 100644
View file @
c5a27791
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Bailun.DC.Models.DataWareHouse
{
/// <summary>
/// 平台账单流水
/// </summary>
public
class
flowing_sales
{
public
int
id
{
get
;
set
;
}
public
string
platform
{
get
;
set
;
}
public
string
website
{
get
;
set
;
}
public
string
jsondata
{
get
;
set
;
}
public
string
month
{
get
;
set
;
}
public
DateTime
createtime
{
get
;
set
;
}
public
string
orderno
{
get
;
set
;
}
public
string
accountname
{
get
;
set
;
}
}
}
Bailun.DC.Services/DataWareHouse/PlatformOrderServices.cs
0 → 100644
View file @
c5a27791
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
MySql.Data.MySqlClient
;
using
Dapper
;
using
System.Linq
;
using
Bailun.DC.Models
;
namespace
Bailun.DC.Services.DataWareHouse
{
public
class
PlatformOrderServices
{
/// <summary>
/// 获取平台站点信息
/// </summary>
/// <param name="platform"></param>
/// <returns></returns>
public
List
<
string
>
ListPlatformSite
(
string
platform
)
{
using
(
var
cn
=
new
MySqlConnection
(
Common
.
GlobalConfig
.
ConnectionString_DW
))
{
if
(
cn
.
State
==
System
.
Data
.
ConnectionState
.
Closed
)
{
cn
.
Open
();
}
var
sql
=
$"select t1.website from flowing_sales t1 where t1.platform='
{
platform
}
' group by t1.website"
;
return
cn
.
Query
<
string
>(
sql
).
ToList
();
}
}
/// <summary>
/// 获取平台销售账单流水
/// </summary>
/// <param name="parameter">分页信息</param>
/// <param name="platform">平台类型</param>
/// <param name="website">站点</param>
/// <param name="account">销售帐号</param>
/// <param name="month">月份</param>
/// <param name="total">符合条件的记录数</param>
/// <returns></returns>
public
List
<
Models
.
DataWareHouse
.
flowing_sales
>
List
(
int
page
,
string
platform
,
string
website
,
string
account
,
string
month
,
ref
int
total
,
int
pagesize
)
{
var
sql
=
"select * from flowing_sales t1 where 1=1"
;
var
sqlparam
=
new
DynamicParameters
();
if
(!
string
.
IsNullOrEmpty
(
platform
))
{
sql
+=
" and t1.platform=@platform"
;
sqlparam
.
Add
(
"platform"
,
platform
);
}
if
(!
string
.
IsNullOrEmpty
(
website
))
{
sql
+=
" and t1.website=@website"
;
sqlparam
.
Add
(
"website"
,
website
);
}
if
(!
string
.
IsNullOrEmpty
(
account
))
{
sql
+=
" and t1.accountname=@account"
;
sqlparam
.
Add
(
"account"
,
account
);
}
if
(!
string
.
IsNullOrEmpty
(
month
))
{
sql
+=
" and t1.month=@month"
;
sqlparam
.
Add
(
"month"
,
month
);
}
using
(
var
cn
=
new
MySqlConnection
(
Common
.
GlobalConfig
.
ConnectionString_DW
))
{
if
(
cn
.
State
==
System
.
Data
.
ConnectionState
.
Closed
)
{
cn
.
Open
();
}
if
(
pagesize
>
0
)
{
var
obj
=
cn
.
Page
<
Models
.
DataWareHouse
.
flowing_sales
>(
page
,
pagesize
,
sql
,
ref
total
,
sqlparam
);
return
obj
.
ToList
();
}
else
{
var
obj
=
cn
.
Query
<
Models
.
DataWareHouse
.
flowing_sales
>(
sql
,
sqlparam
);
return
obj
.
ToList
();
}
}
}
}
}
Bailun.DC.Web/Areas/DataWareHouse/Controllers/PlatformOrderController.cs
0 → 100644
View file @
c5a27791
using
Microsoft.AspNetCore.Mvc
;
using
System
;
using
System.Collections.Generic
;
using
System.Data
;
using
System.Linq
;
using
Microsoft.AspNetCore.Hosting
;
using
System.Threading.Tasks
;
namespace
Bailun.DC.Web.Areas.DataWareHouse.Controllers
{
[
Area
(
"DataWareHouse"
)]
public
class
PlatformOrderController
:
Base
.
BaseController
{
private
readonly
IHostingEnvironment
_hostingEnvironment
;
public
PlatformOrderController
(
IHostingEnvironment
hostingEnvironment
)
{
_hostingEnvironment
=
hostingEnvironment
;
}
public
IActionResult
OrderBillings
(
string
platform
)
{
var
listsite
=
new
Services
.
DataWareHouse
.
PlatformOrderServices
().
ListPlatformSite
(
platform
);
ViewBag
.
platform
=
platform
;
ViewBag
.
sites
=
listsite
;
return
View
();
}
[
HttpPost
]
public
JsonResult
OrderBillingsJson
(
int
page
,
string
platform
,
string
website
,
string
account
,
string
month
,
int
pagesize
=
25
)
{
if
(
string
.
IsNullOrEmpty
(
platform
))
{
return
Json
(
new
{
success
=
false
,
msg
=
"请选择平台类型"
});
}
if
(
string
.
IsNullOrEmpty
(
website
))
{
return
Json
(
new
{
success
=
false
,
msg
=
"请选择站点"
,
});
}
if
(
string
.
IsNullOrEmpty
(
month
))
{
return
Json
(
new
{
success
=
false
,
msg
=
"请选择月份"
});
}
if
(
page
<=
0
)
{
page
=
1
;
}
int
total
=
0
;
var
obj
=
new
Services
.
DataWareHouse
.
PlatformOrderServices
().
List
(
page
,
platform
,
website
,
account
,
month
,
ref
total
,
pagesize
);
var
list
=
obj
.
Select
(
a
=>
new
{
a
.
accountname
,
a
.
createtime
,
jsondata
=
Newtonsoft
.
Json
.
Linq
.
JRaw
.
Parse
(
a
.
jsondata
),
a
.
month
,
a
.
orderno
,
a
.
platform
,
a
.
website
,
});
return
Json
(
new
{
success
=
true
,
msg
=
""
,
rows
=
list
,
total
=
total
,
page
=
page
,
totalpage
=
total
/
pagesize
+(
total
%
pagesize
>
0
?
1
:
0
),
});
}
public
ActionResult
ExportOrderBillings
(
string
platform
,
string
website
,
string
account
,
string
month
)
{
if
(
string
.
IsNullOrEmpty
(
platform
))
{
return
Json
(
new
{
success
=
false
,
msg
=
"请选择平台类型"
});
}
if
(
string
.
IsNullOrEmpty
(
website
))
{
return
Json
(
new
{
success
=
false
,
msg
=
"请选择站点"
,
});
}
if
(
string
.
IsNullOrEmpty
(
month
))
{
return
Json
(
new
{
success
=
false
,
msg
=
"请选择月份"
});
}
var
total
=
0
;
var
obj
=
new
Services
.
DataWareHouse
.
PlatformOrderServices
().
List
(
1
,
platform
,
website
,
account
,
month
,
ref
total
,
0
);
if
(
obj
.
Count
==
0
)
{
return
Json
(
new
{
success
=
true
,
msg
=
"没有数据"
});
}
//列头
DataTable
dataTable
=
new
DataTable
();
//实例化
var
objFirst
=
obj
.
FirstOrDefault
();
var
jsonData
=
Newtonsoft
.
Json
.
JsonConvert
.
DeserializeObject
<
Dictionary
<
string
,
string
>>(
objFirst
.
jsondata
);
var
colnames
=
new
List
<
string
>();
foreach
(
var
item
in
jsonData
)
{
dataTable
.
Columns
.
Add
(
item
.
Key
,
typeof
(
string
));
colnames
.
Add
(
item
.
Key
);
}
foreach
(
var
item
in
obj
)
{
jsonData
=
Newtonsoft
.
Json
.
JsonConvert
.
DeserializeObject
<
Dictionary
<
string
,
string
>>(
item
.
jsondata
);
DataRow
dataRow
=
dataTable
.
NewRow
();
foreach
(
var
c
in
jsonData
)
{
dataRow
[
c
.
Key
]
=
c
.
Value
;
}
dataTable
.
Rows
.
Add
(
dataRow
);
}
//for (var i = 0; i < dataTable.Columns.Count; i++)
//{
// colnames.Add(dataTable.Columns[i].ColumnName);
//}
var
listVal
=
new
List
<
string
>();
for
(
int
j
=
0
;
j
<
dataTable
.
Rows
.
Count
;
j
++)
{
var
s
=
""
;
for
(
int
k
=
0
;
k
<
dataTable
.
Columns
.
Count
;
k
++)
{
string
tmpRowValue
=
dataTable
.
Rows
[
j
][
k
].
ToString
();
s
+=
tmpRowValue
+
"|"
;
}
//s = s.Substring(0, s.Length - 1);
listVal
.
Add
(
s
);
}
var
guid
=
Guid
.
NewGuid
().
ToString
();
var
filename
=
platform
+
" "
+
month
+
"的账单流水"
;
var
filepath
=
_hostingEnvironment
.
WebRootPath
+
"\\Files\\Report\\"
+
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd"
)
+
"\\"
;
ToCSV
(
listVal
,
colnames
,
guid
,
filepath
);
var
ms
=
new
System
.
IO
.
MemoryStream
();
using
(
var
f
=
new
System
.
IO
.
FileStream
(
filepath
+
guid
+
".csv"
,
System
.
IO
.
FileMode
.
Open
))
{
f
.
CopyTo
(
ms
);
}
ms
.
Position
=
0
;
return
File
(
ms
,
"text/csv"
,
filename
+
".csv"
);
}
}
}
Bailun.DC.Web/Areas/DataWareHouse/Views/PlatformOrder/OrderBillings.cshtml
0 → 100644
View file @
c5a27791
This diff is collapsed.
Click to expand it.
Bailun.DC.Web/Areas/Reports/Controllers/FinanceController.cs
View file @
c5a27791
...
@@ -2482,7 +2482,6 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
...
@@ -2482,7 +2482,6 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
}
}
#
region
资产负债表
-
子表
#
region
资产负债表
-
子表
public
ActionResult
MonetaryFund
(
DateTime
date
,
int
paycompanyid
)
public
ActionResult
MonetaryFund
(
DateTime
date
,
int
paycompanyid
)
{
{
var
m
=
new
Services
.
FinanceReportServices
().
GetMonetaryFundCount
(
date
,
paycompanyid
);
var
m
=
new
Services
.
FinanceReportServices
().
GetMonetaryFundCount
(
date
,
paycompanyid
);
...
...
Bailun.DC.Web/Areas/Reports/Views/Orders/ListOrder.cshtml
View file @
c5a27791
...
@@ -38,7 +38,7 @@
...
@@ -38,7 +38,7 @@
<label>付款时间</label>
<label>付款时间</label>
<input id="start" name="start" type="text" class="form-control" style="width:130px;" value="@(DateTime.Now.AddDays(-7).ToString("yyyy-MM-dd"))" />
<input id="start" name="start" type="text" class="form-control" style="width:130px;" value="@(DateTime.Now.AddDays(-7).ToString("yyyy-MM-dd"))" />
<span>至</span>
<span>至</span>
<input id="end" name="end" type="text" class="form-control" style="width:130px;" value="@(DateTime.Now.ToString("yyyy-MM-dd"))" />
<input id="end" name="end" type="text" class="form-control" style="width:130px;" value="@(DateTime.Now.
AddDays(-1).
ToString("yyyy-MM-dd"))" />
</div>
</div>
<div class="form-group">
<div class="form-group">
<label>利润率</label>
<label>利润率</label>
...
...
Bailun.DC.Web/Areas/Reports/Views/Orders/PlatformProfitCount.cshtml
View file @
c5a27791
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
<div style="float:right;width:100%;">
<div style="float:right;width:100%;">
<div id="rightcontain">
<div id="rightcontain">
<div class="alert alert-warning">
<div class="alert alert-warning">
说明:
退款数据统计的是时间段内的退款发生额,并且排除已取消订单的退款。
说明:
1、退款数据统计的是时间段内的退款发生额,并且排除已取消订单的退款;2、时间段内没有数据的平台不会显示出来;3、广告费、上架费和退款无法分摊到订单里面,但总利润有减去这三项费用;
</div>
</div>
<div class="ibox-content m-b-sm border-bottom">
<div class="ibox-content m-b-sm border-bottom">
...
...
Bailun.DC.Web/Areas/Reports/Views/Orders/PlatformSaleStatistics.cshtml
View file @
c5a27791
...
@@ -49,9 +49,9 @@
...
@@ -49,9 +49,9 @@
</div>
</div>
<div class="form-group">
<div class="form-group">
<label>付款时间</label>
<label>付款时间</label>
<input id="start" name="start" type="text" class="form-control" style="width:130px;" value="@(DateTime.Now.AddDays(-
1
).ToString("yyyy-MM-dd"))" />
<input id="start" name="start" type="text" class="form-control" style="width:130px;" value="@(DateTime.Now.AddDays(-
7
).ToString("yyyy-MM-dd"))" />
<span>至</span>
<span>至</span>
<input id="end" name="end" type="text" class="form-control" style="width:130px;" value="@(DateTime.Now.ToString("yyyy-MM-dd"))" />
<input id="end" name="end" type="text" class="form-control" style="width:130px;" value="@(DateTime.Now.
AddDays(-1).
ToString("yyyy-MM-dd"))" />
</div>
</div>
<div class="form-group">
<div class="form-group">
<label> </label>
<label> </label>
...
...
Bailun.DC.Web/wwwroot/js/jspagination/bootstrap-paginator.js
0 → 100644
View file @
c5a27791
This diff is collapsed.
Click to expand it.
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