Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
Bailun.DataCenter
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
wangwanchang
Bailun.DataCenter
Commits
bc7c674b
Commit
bc7c674b
authored
May 15, 2018
by
wangwanchang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sku仓库列表页增加超链,订单统计任务修改
parent
096e3a5e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
216 additions
and
41 deletions
+216
-41
SkuOrderAppService.cs
...Bailun.DataCenter.Application/Order/SkuOrderAppService.cs
+15
-0
SkuStatisticAppService.cs
...ataCenter.Application/Statistic/SkuStatisticAppService.cs
+7
-3
SkuStatisticsJob.cs
...n.DataCenter.Tasks/Jobs/SkuStatistics/SkuStatisticsJob.cs
+26
-2
WarehouseStatisticsJob.cs
....Tasks/Jobs/WarehouseStatistics/WarehouseStatisticsJob.cs
+1
-1
Program.cs
trunk/Bailun.DataCenter.Tasks/Program.cs
+26
-1
Index.cshtml
...un.DataCenter.Web/Areas/Order/Views/SkuOrder/Index.cshtml
+130
-32
Index.cshtml
...taCenter.Web/Areas/Statistic/Views/SkuActive/Index.cshtml
+11
-2
skuwarehouseIndex.cshtml
...eas/Statistic/Views/SkuStatistic/skuwarehouseIndex.cshtml
+0
-0
Index.cshtml
...er.Web/Areas/Statistic/Views/WarehouseActive/Index.cshtml
+0
-0
WarehouseActiveNewIndex.cshtml
...stic/Views/WarehouseActive/WarehouseActiveNewIndex.cshtml
+0
-0
No files found.
trunk/Bailun.DataCenter.Application/Order/SkuOrderAppService.cs
View file @
bc7c674b
...
...
@@ -160,6 +160,16 @@ namespace Bailun.DataCenter.Application.Order
var
endpaytime
=
DateTime
.
Parse
(
queryParam
[
"endpaytime"
].
ToString
());
query
=
query
.
Where
(
t
=>
t
.
paytime
<
endpaytime
);
}
if
(!
queryParam
[
"shipstatus"
].
IsEmpty
())
{
var
shipstatus
=
queryParam
[
"shipstatus"
].
ToInt
();
query
=
query
.
Where
(
t
=>
t
.
shipping_status
==
shipstatus
);
}
if
(!
queryParam
[
"status"
].
IsEmpty
())
{
var
status
=
queryParam
[
"status"
].
ToInt
();
query
=
query
.
Where
(
t
=>
t
.
state
==
status
);
}
if
(!
queryParam
[
"warehousetype"
].
IsEmpty
()
&&
queryParam
[
"Warehouse"
].
IsEmpty
())
{
var
warehousetype
=
queryParam
[
"warehousetype"
].
ToInt
();
...
...
@@ -230,6 +240,11 @@ namespace Bailun.DataCenter.Application.Order
var
datasource
=
queryParam
[
"datasource"
].
ToString
();
query
=
query
.
Where
(
t
=>
t
.
datasource
==
datasource
);
}
if
(!
queryParam
[
"shipstatus"
].
IsEmpty
())
{
var
shipstatus
=
queryParam
[
"shipstatus"
].
ToInt
();
query
=
query
.
Where
(
t
=>
t
.
shipping_status
==
shipstatus
);
}
if
(!
queryParam
[
"seller"
].
IsEmpty
())
{
var
seller
=
queryParam
[
"seller"
].
ToString
();
...
...
trunk/Bailun.DataCenter.Application/Statistic/SkuStatisticAppService.cs
View file @
bc7c674b
...
...
@@ -14,6 +14,7 @@ using System.Linq.Expressions;
using
System.Text
;
using
Bailun.DataCenter.Application.Common
;
using
MySql.Data.MySqlClient
;
using
Bailun.DataCenter.Application.BasicInfo
;
namespace
Bailun.DataCenter.Application.Statistic
{
...
...
@@ -28,12 +29,15 @@ namespace Bailun.DataCenter.Application.Statistic
{
private
readonly
ISkuStatisticRepository
_skuStatisticRepository
;
private
readonly
ICommonAppService
_commonAppService
;
private
readonly
IWarehouseInfoAppService
_warehouseInfoAppService
;
public
SkuStatisticAppService
(
ISkuStatisticRepository
skuStatisticRepository
,
ICommonAppService
commonAppService
)
ICommonAppService
commonAppService
,
IWarehouseInfoAppService
warehouseInfoAppService
)
{
_skuStatisticRepository
=
skuStatisticRepository
;
_commonAppService
=
commonAppService
;
_warehouseInfoAppService
=
warehouseInfoAppService
;
}
#
region
获取数据
...
...
@@ -95,7 +99,7 @@ namespace Bailun.DataCenter.Application.Statistic
if
(!
queryParam
[
"warehousetype"
].
IsEmpty
()
&&
queryParam
[
"Warehouse"
].
IsEmpty
())
{
var
warehousetype
=
queryParam
[
"warehousetype"
].
ToInt
();
var
data
=
_
commonAppService
.
GetWarehouseList
().
Where
(
d
=>
d
.
WH_Type
.
ToInt
()
==
warehousetype
).
Select
(
d
=>
d
.
WareCode
).
ToList
();
var
data
=
_
warehouseInfoAppService
.
GetList
(
new
{
waretype
=
warehousetype
}.
ToJson
()
).
Select
(
d
=>
d
.
WareCode
).
ToList
();
query
=
query
.
Where
(
d
=>
data
.
Contains
(
d
.
warehouse_code
));
}
}
...
...
@@ -140,7 +144,7 @@ namespace Bailun.DataCenter.Application.Statistic
if
(!
queryParam
[
"warehousetype"
].
IsEmpty
()
&&
queryParam
[
"Warehouse"
].
IsEmpty
())
{
var
warehousetype
=
queryParam
[
"warehousetype"
].
ToInt
();
var
data
=
_
commonAppService
.
GetWarehouseList
().
Where
(
d
=>
d
.
WH_Type
.
ToInt
()
==
warehousetype
).
Select
(
d
=>
d
.
WareCode
).
ToList
();
var
data
=
_
warehouseInfoAppService
.
GetList
(
new
{
waretype
=
warehousetype
}.
ToJson
()
).
Select
(
d
=>
d
.
WareCode
).
ToList
();
strsql
.
AppendFormat
(
" and warehouse_code in('{0}')"
,
string
.
Join
(
"','"
,
data
));
}
}
...
...
trunk/Bailun.DataCenter.Tasks/Jobs/SkuStatistics/SkuStatisticsJob.cs
View file @
bc7c674b
...
...
@@ -41,10 +41,34 @@ namespace Bailun.DataCenter.Tasks.Jobs.SkuStatistics
string
skuNumber
=
string
.
Empty
;
do
{
List
<
System
.
Threading
.
Tasks
.
Task
>
tasklist
=
new
List
<
System
.
Threading
.
Tasks
.
Task
>();
skuNumber
=
RedisOprate
.
Set_Pop
<
string
>(
"SkuSet"
);
if
(!
string
.
IsNullOrEmpty
(
skuNumber
))
{
SkuStatistics
(
skuNumber
);
tasklist
.
Add
(
System
.
Threading
.
Tasks
.
Task
.
Factory
.
StartNew
(()
=>
{
SkuStatistics
(
skuNumber
);
}));
}
skuNumber
=
RedisOprate
.
Set_Pop
<
string
>(
"SkuSet"
);
if
(!
string
.
IsNullOrEmpty
(
skuNumber
))
{
tasklist
.
Add
(
System
.
Threading
.
Tasks
.
Task
.
Factory
.
StartNew
(()
=>
{
SkuStatistics
(
skuNumber
);
}));
}
skuNumber
=
RedisOprate
.
Set_Pop
<
string
>(
"SkuSet"
);
if
(!
string
.
IsNullOrEmpty
(
skuNumber
))
{
tasklist
.
Add
(
System
.
Threading
.
Tasks
.
Task
.
Factory
.
StartNew
(()
=>
{
SkuStatistics
(
skuNumber
);
}));
}
if
(
tasklist
.
Count
>
0
)
{
System
.
Threading
.
Tasks
.
Task
.
WaitAll
(
tasklist
.
ToArray
());
}
}
while
(!
string
.
IsNullOrEmpty
(
skuNumber
));
...
...
@@ -228,7 +252,7 @@ namespace Bailun.DataCenter.Tasks.Jobs.SkuStatistics
}
//已发货总量
dssList
[
dssIndex
].
shipped_totalquantity
+=
item
.
shipped_quantity
;
//
已
发货总量
//
未
发货总量
dssList
[
dssIndex
].
notshipped_totalquantity
+=
item
.
notshipped_quantity
;
//已到货总量
dssList
[
dssIndex
].
arrived_totalquantity
+=
item
.
arrived_quantity
;
...
...
trunk/Bailun.DataCenter.Tasks/Jobs/WarehouseStatistics/WarehouseStatisticsJob.cs
View file @
bc7c674b
...
...
@@ -148,7 +148,7 @@ namespace Bailun.DataCenter.Tasks.Jobs.WarehouseStatistics
}
catch
(
Exception
)
{
log
.
ErrorFormat
(
"仓库实时统计错误:仓库编码:{
1},仓库名称:{2
}"
,
item
.
warehouse_code
,
item
.
warehouse_name
);
log
.
ErrorFormat
(
"仓库实时统计错误:仓库编码:{
0},仓库名称:{1
}"
,
item
.
warehouse_code
,
item
.
warehouse_name
);
}
string
warehousecode
=
item
.
warehouse_code
;
...
...
trunk/Bailun.DataCenter.Tasks/Program.cs
View file @
bc7c674b
...
...
@@ -13,6 +13,7 @@ using Bailun.DataCenter.Tasks.Jobs.SkuFbaOrder;
using
Bailun.DataCenter.Tasks.Jobs.FbaSkuStock
;
using
Bailun.DataCenter.Common.Redis
;
using
Bailun.DataCenter.Tasks.Jobs.MaterialStock
;
using
System.Collections.Generic
;
namespace
Bailun.DataCenter.Tasks
{
...
...
@@ -147,10 +148,34 @@ namespace Bailun.DataCenter.Tasks
//string skuNumber = string.Empty;
//do
//{
// List<System.Threading.Tasks.Task> tasklist = new List<System.Threading.Tasks.Task>();
// skuNumber = RedisOprate.Set_Pop<string>("SkuSet");
// if (!string.IsNullOrEmpty(skuNumber))
// {
// ss.SkuStatistics(skuNumber);
// tasklist.Add(System.Threading.Tasks.Task.Factory.StartNew(() =>
// {
// ss.SkuStatistics(skuNumber);
// }));
// }
// skuNumber = RedisOprate.Set_Pop<string>("SkuSet");
// if (!string.IsNullOrEmpty(skuNumber))
// {
// tasklist.Add(System.Threading.Tasks.Task.Factory.StartNew(() =>
// {
// ss.SkuStatistics(skuNumber);
// }));
// }
// skuNumber = RedisOprate.Set_Pop<string>("SkuSet");
// if (!string.IsNullOrEmpty(skuNumber))
// {
// tasklist.Add(System.Threading.Tasks.Task.Factory.StartNew(() =>
// {
// ss.SkuStatistics(skuNumber);
// }));
// }
// if (tasklist.Count > 0)
// {
// System.Threading.Tasks.Task.WaitAll(tasklist.ToArray());
// }
//}
//while (!string.IsNullOrEmpty(skuNumber));
...
...
trunk/Bailun.DataCenter.Web/Areas/Order/Views/SkuOrder/Index.cshtml
View file @
bc7c674b
This diff is collapsed.
Click to expand it.
trunk/Bailun.DataCenter.Web/Areas/Statistic/Views/SkuActive/Index.cshtml
View file @
bc7c674b
...
...
@@ -123,7 +123,12 @@
}
},
{ label: '调拨在途金额', name: 'allot_transit_money', index: 'allot_transit_money', align: 'center', sortable: true },
{ label: '待发货数量', name: 'plan_shipped', index: 'plan_shipped', align: 'center', sortable: true },
{
label: '待发货数量', name: 'plan_shipped', index: 'plan_shipped', align: 'center', sortable: true,
formatter: function (cellvalue, options, rowObject) {
return '<a style="color: rgb(51, 122, 183);cursor:pointer" onclick="navigateToDetail(\'' + rowObject.s_number + '\',1,4,\'订单明细\')">' + cellvalue + '</a>';
}
},
{ label: '缺货数量', name: 'out_stock', index: 'out_stock', align: 'center', sortable: true },
{ label: '昨日总销量', name: 'oneday_sales', index: 'oneday_sales', align: 'center', sortable: true },
{ label: '昨日总销量额', name: 'oneday_salesmoney', index: 'oneday_salesmoney', align: 'center', sortable: true },
...
...
@@ -174,7 +179,7 @@
//{ label: 'fba库存数量', name: 'fba_stock_quantity', index: 'fba_stock_quantity', align: 'center', sortable: true },
{ label: '采购在途数量', name: 'purchase_transit_quantity', index: 'purchase_transit_quantity', align: 'center', sortable: true },
{ label: '调拨在途数量', name: 'allot_transit_quantity', index: 'allot_transit_quantity', align: 'center', sortable: true },
{
label: '待发货数量', name: 'plan_shipped', index: 'plan_shipped', align: 'center', sortable: true
},
{
label: '待发货数量', name: 'plan_shipped', index: 'plan_shipped', align: 'center', sortable: true
},
{ label: '缺货数量', name: 'out_stock', index: 'out_stock', align: 'center', sortable: true },
{ label: '近一日销量', name: 'oneday_sales', index: 'oneday_sales', align: 'center', sortable: true },
{ label: '近七日销量', name: 'sevendays_sales', index: 'sevendays_sales', align: 'center', sortable: true },
...
...
@@ -451,6 +456,10 @@
else if (type === 3) {
url = '/Statistic/SkuStatistic/skuwarehouseIndex?sku=' + sku;
}
//销售订单
else if (type === 4) {
url = '/Order/SkuOrder/Index?sku=' + sku + '&status=' + status + '&shipstatus=1';
}
top.tablist.newTab({
id: "sku_statistics",
title: title,
...
...
trunk/Bailun.DataCenter.Web/Areas/Statistic/Views/SkuStatistic/skuwarehouseIndex.cshtml
View file @
bc7c674b
This diff is collapsed.
Click to expand it.
trunk/Bailun.DataCenter.Web/Areas/Statistic/Views/WarehouseActive/Index.cshtml
View file @
bc7c674b
This diff is collapsed.
Click to expand it.
trunk/Bailun.DataCenter.Web/Areas/Statistic/Views/WarehouseActive/WarehouseActiveNewIndex.cshtml
View file @
bc7c674b
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