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
0e6a11ce
Commit
0e6a11ce
authored
Sep 18, 2020
by
guanzhenshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
解决逻辑仓库汇总数据的趋势图没有显示的问题
parent
063b2d42
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
53 additions
and
3 deletions
+53
-3
WareHouseServices.cs
Bailun.DC.Services/WareHouseServices.cs
+35
-0
WarehouseController.cs
...n.DC.Web/Areas/Reports/Controllers/WarehouseController.cs
+12
-1
LogicWarehouse.cshtml
...C.Web/Areas/Reports/Views/Warehouse/LogicWarehouse.cshtml
+6
-2
No files found.
Bailun.DC.Services/WareHouseServices.cs
View file @
0e6a11ce
...
...
@@ -1141,6 +1141,41 @@ namespace Bailun.DC.Services
}
}
/// <summary>
/// 获取逻辑仓的每日数据,用于显示趋势图(汇总的)
/// </summary>
/// <param name="warehouse_code"></param>
/// <param name="columnname"></param>
/// <returns></returns>
public
List
<
string
>
GetMidLogicWarehouseStatisticCount
(
string
columnname
,
DateTime
start
,
DateTime
end
)
{
var
sql
=
"select CONCAT(name,',',DATE_FORMAT(day,'%Y-%m-%d')) as name from ("
;
sql
+=
"select sum("
+
columnname
+
") as name,day from dc_daily_logic_wh_statistic where "
;
if
(
columnname
.
Trim
()==
"pin_rate_stock"
)
{
sql
=
"select sum(thirtyday_total_sales)/sum(usable_stock) as name,day from dc_daily_logic_wh_statistic where "
;
}
sql
+=
$" day>='
{
start
.
ToString
(
"yyyy-MM-dd"
)}
' and day<='
{
end
.
ToString
(
"yyyy-MM-dd"
)}
' group by day"
;
sql
+=
" ) t1 "
;
sql
+=
" order by day"
;
using
(
var
cn
=
new
MySqlConnection
(
Common
.
GlobalConfig
.
ConnectionString
))
{
if
(
cn
.
State
==
System
.
Data
.
ConnectionState
.
Closed
)
{
cn
.
Open
();
}
return
cn
.
Query
<
string
>(
sql
).
ToList
();
}
}
#
region
动态库存分析
public
List
<
mDynamicStockAnalyse
>
ListDynamicStockAnalyse
(
string
warehouse_code
,
int
isfinish
)
...
...
Bailun.DC.Web/Areas/Reports/Controllers/WarehouseController.cs
View file @
0e6a11ce
...
...
@@ -1661,7 +1661,18 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
[
HttpPost
]
public
JsonResult
WarehouseTrendChartJson
(
string
warehouse_code
,
string
key
,
DateTime
start
,
DateTime
end
)
{
var
obj
=
new
Services
.
WareHouseServices
().
GetMidLogicWarehouseStatistic
(
warehouse_code
,
key
,
start
,
end
);
var
obj
=
new
List
<
string
>();
if
(
string
.
IsNullOrEmpty
(
warehouse_code
))
{
obj
=
new
Services
.
WareHouseServices
().
GetMidLogicWarehouseStatisticCount
(
key
,
start
,
end
);
}
else
{
new
Services
.
WareHouseServices
().
GetMidLogicWarehouseStatistic
(
warehouse_code
,
key
,
start
,
end
);
}
var
listval
=
new
List
<
string
>();
var
listdate
=
new
List
<
string
>();
...
...
Bailun.DC.Web/Areas/Reports/Views/Warehouse/LogicWarehouse.cshtml
View file @
0e6a11ce
...
...
@@ -250,7 +250,11 @@
layer_show(name+'动态库存分析', '@Url.Content("~/Reports/Warehouse/DynamicStockAnalyse?warehouse_code=")' + code,'90%','90%');
}
function ShowTrendChart(code, name, key,whname) {
function ShowTrendChart(code, name, key, whname) {
if (code == null) {
code = '';
}
layer_show(whname+"=》"+name + '的趋势图', '@Url.Content("~/Reports/Warehouse/WarehouseTrendChart?warehouse_code=")' + code + '&key=' + key + '&titlename=' + name,'90%','90%');
}
...
...
@@ -273,7 +277,7 @@
}
var url = 'http://oms.bailuntec.com/#/bailun-order/all-orders?baseQueryKey=SkuNo_Accurate&dateType=payTime&daterange=' + start + '&daterange=' + end + '&wareNo=' + warehousecode + '&orderStatus=0&orderStatus=1&orderStatus=3';
console.log(url);
layer_show(name + " 的订单明细", url, '90%', '90%');
}
...
...
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