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
5d78bfed
Commit
5d78bfed
authored
Mar 18, 2021
by
guanzhenshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加产品分类筛选
parent
736a76bf
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
130 additions
and
13 deletions
+130
-13
mLogicWarehouse.cs
Bailun.DC.Models/Stock/mLogicWarehouse.cs
+5
-0
mSkuWarehouse.cs
Bailun.DC.Models/Stock/mSkuWarehouse.cs
+5
-0
WareHouseServices.cs
Bailun.DC.Services/WareHouseServices.cs
+77
-6
WarehouseController.cs
...n.DC.Web/Areas/Reports/Controllers/WarehouseController.cs
+0
-0
ListWareHouseSku.cshtml
...Web/Areas/Reports/Views/Warehouse/ListWareHouseSku.cshtml
+1
-1
LogicWarehouse.cshtml
...C.Web/Areas/Reports/Views/Warehouse/LogicWarehouse.cshtml
+41
-5
WarehouseTrendChart.cshtml
.../Areas/Reports/Views/Warehouse/WarehouseTrendChart.cshtml
+1
-1
No files found.
Bailun.DC.Models/Stock/mLogicWarehouse.cs
View file @
5d78bfed
...
...
@@ -145,5 +145,10 @@ namespace Bailun.DC.Models.Stock
/// </summary>
public
decimal
?
stock_age_6months_amount
{
get
;
set
;
}
/// <summary>
/// sku产品分类
/// </summary>
public
string
skucategory
{
get
;
set
;
}
}
}
Bailun.DC.Models/Stock/mSkuWarehouse.cs
View file @
5d78bfed
...
...
@@ -185,5 +185,10 @@ namespace Bailun.DC.Models.Stock
/// 超过6个月库龄的库存金额
/// </summary>
public
decimal
?
stock_age_6months_amount
{
get
;
set
;
}
/// <summary>
/// sku产品分类
/// </summary>
public
string
skucategory
{
get
;
set
;
}
}
}
Bailun.DC.Services/WareHouseServices.cs
View file @
5d78bfed
...
...
@@ -74,7 +74,7 @@ namespace Bailun.DC.Services
/// <param name="warehouse">仓库编码</param>
/// <param name="total">符合条件的记录总数</param>
/// <returns></returns>
public
List
<
Models
.
Stock
.
mLogicWarehouse
>
ListLogicWarehouseStock
(
BtTableParameter
parameter
,
string
warehousetype
,
string
warehouse
,
ref
int
total
)
public
List
<
Models
.
Stock
.
mLogicWarehouse
>
ListLogicWarehouseStock
(
BtTableParameter
parameter
,
string
warehousetype
,
string
warehouse
,
int
?
isfinish
,
string
category
,
ref
int
total
)
{
var
sqlparam
=
new
DynamicParameters
();
var
sqlwhere
=
" where 1=1 "
;
...
...
@@ -93,6 +93,24 @@ namespace Bailun.DC.Services
sqlparam
.
Add
(
"warehouse_code"
,
warehouse
);
}
if
(
isfinish
.
HasValue
)
{
if
(
isfinish
.
Value
==
1
)
{
sqlwhere
+=
" and hq_type!='半成品仓' "
;
}
else
if
(
isfinish
.
Value
==
2
)
{
sqlwhere
+=
" and hq_type='半成品仓' "
;
}
}
if
(!
string
.
IsNullOrWhiteSpace
(
category
))
{
sqlwhere
+=
" and skucategory=@category "
;
sqlparam
.
Add
(
"category"
,
category
);
}
sqlwhere
+=
" group by warehouse_code"
;
var
sqlorder
=
""
;
...
...
@@ -132,7 +150,7 @@ namespace Bailun.DC.Services
/// <param name="warehouse">仓库编码</param>
/// <param name="total">符合条件的记录总数</param>
/// <returns></returns>
public
List
<
Models
.
Stock
.
mLogicWarehouse
>
ListLogicWarehouseStock
(
string
warehousetype
,
string
warehouse
)
public
List
<
Models
.
Stock
.
mLogicWarehouse
>
ListLogicWarehouseStock
(
string
warehousetype
,
string
warehouse
,
int
?
isfinish
,
string
category
)
{
var
sqlparam
=
new
DynamicParameters
();
var
sqlwhere
=
" where 1=1 "
;
...
...
@@ -151,6 +169,24 @@ namespace Bailun.DC.Services
sqlparam
.
Add
(
"warehouse_code"
,
warehouse
);
}
if
(
isfinish
.
HasValue
)
{
if
(
isfinish
.
Value
==
1
)
{
sqlwhere
+=
" and hq_type!='半成品仓' "
;
}
else
if
(
isfinish
.
Value
==
2
)
{
sqlwhere
+=
" and hq_type='半成品仓' "
;
}
}
if
(!
string
.
IsNullOrWhiteSpace
(
category
))
{
sqlwhere
+=
" and skucategory=@category "
;
sqlparam
.
Add
(
"category"
,
category
);
}
sqlwhere
+=
" group by warehouse_code"
;
using
(
var
cn
=
new
MySqlConnection
(
Common
.
GlobalConfig
.
ConnectionString_read
))
...
...
@@ -171,7 +207,7 @@ namespace Bailun.DC.Services
/// <param name="warehousetype"></param>
/// <param name="warehouse"></param>
/// <returns></returns>
public
Models
.
Stock
.
mLogicWarehouse
LogicWarehouseStockCount
(
string
warehousetype
,
string
warehouse
)
public
Models
.
Stock
.
mLogicWarehouse
LogicWarehouseStockCount
(
string
warehousetype
,
string
warehouse
,
int
?
isfinish
,
string
category
)
{
var
sqlparam
=
new
DynamicParameters
();
var
sqlwhere
=
" where 1=1 "
;
...
...
@@ -187,6 +223,24 @@ namespace Bailun.DC.Services
sqlwhere
+=
" and warehouse_code=@warehouse_code"
;
sqlparam
.
Add
(
"warehouse_code"
,
warehouse
);
}
if
(
isfinish
.
HasValue
)
{
if
(
isfinish
.
Value
==
1
)
{
sqlwhere
+=
" and hq_type!='半成品仓' "
;
}
else
if
(
isfinish
.
Value
==
2
)
{
sqlwhere
+=
" and hq_type='半成品仓' "
;
}
}
if
(!
string
.
IsNullOrWhiteSpace
(
category
))
{
sqlwhere
+=
" and skucategory=@category "
;
sqlparam
.
Add
(
"category"
,
category
);
}
using
(
var
cn
=
new
MySqlConnection
(
Common
.
GlobalConfig
.
ConnectionString_read
))
{
...
...
@@ -215,7 +269,7 @@ namespace Bailun.DC.Services
/// <param name="total">符合条件的总记录数</param>
/// <param name="onedaysalescount">昨日销量,0:0销量,1:0-1销量,2:1-5销量,5:5-10销量,10:大于10的销量</param>
/// <returns></returns>
public
List
<
Models
.
Stock
.
mSkuWarehouse
>
ListWareHouseSku
(
BtTableParameter
parameter
,
string
warehousecode
,
int
?
categoryid
,
int
?
minordercount
,
int
?
maxordercount
,
int
?
stockmin
,
int
?
stockmax
,
decimal
?
stockamountmin
,
decimal
?
stockamountmax
,
string
skucategoryids
,
int
?
push_status
,
int
?
available_days_start
,
int
?
available_days_end
,
ref
int
total
,
DateTime
?
day
,
int
?
onedaysalescount
=
null
)
public
List
<
Models
.
Stock
.
mSkuWarehouse
>
ListWareHouseSku
(
BtTableParameter
parameter
,
string
warehousecode
,
int
?
categoryid
,
int
?
minordercount
,
int
?
maxordercount
,
int
?
stockmin
,
int
?
stockmax
,
decimal
?
stockamountmin
,
decimal
?
stockamountmax
,
string
skucategoryids
,
int
?
push_status
,
int
?
available_days_start
,
int
?
available_days_end
,
ref
int
total
,
string
category
,
DateTime
?
day
,
int
?
onedaysalescount
=
null
)
{
var
sqlparam
=
new
DynamicParameters
();
//available_days
...
...
@@ -346,6 +400,12 @@ namespace Bailun.DC.Services
}
}
if
(!
string
.
IsNullOrWhiteSpace
(
category
))
{
sqlwhere
+=
" and t1.skucategory=@category "
;
sqlparam
.
Add
(
"category"
,
category
);
}
var
sqlsort
=
""
;
...
...
@@ -395,7 +455,7 @@ namespace Bailun.DC.Services
/// <param name="total">符合条件的总记录数</param>
/// <param name="onedaysalescount">昨日销量,0:0销量,1:0-1销量,2:1-5销量,5:5-10销量,10:大于10的销量</param>
/// <returns></returns>
public
Models
.
Stock
.
mSkuWarehouse
ListWareHouseSkuCount
(
string
warehousecode
,
int
?
categoryid
,
int
?
minordercount
,
int
?
maxordercount
,
int
?
stockmin
,
int
?
stockmax
,
decimal
?
stockamountmin
,
decimal
?
stockamountmax
,
string
skucategoryids
,
int
?
push_status
,
int
?
available_days_start
,
int
?
available_days_end
,
DateTime
?
day
,
int
?
onedaysalescount
=
null
)
public
Models
.
Stock
.
mSkuWarehouse
ListWareHouseSkuCount
(
string
warehousecode
,
int
?
categoryid
,
int
?
minordercount
,
int
?
maxordercount
,
int
?
stockmin
,
int
?
stockmax
,
decimal
?
stockamountmin
,
decimal
?
stockamountmax
,
string
skucategoryids
,
int
?
push_status
,
int
?
available_days_start
,
int
?
available_days_end
,
string
category
,
DateTime
?
day
,
int
?
onedaysalescount
=
null
)
{
var
sqlparam
=
new
DynamicParameters
();
//available_days
...
...
@@ -525,6 +585,12 @@ namespace Bailun.DC.Services
}
}
if
(!
string
.
IsNullOrWhiteSpace
(
category
))
{
sqlwhere
+=
" and t1.skucategory=@category "
;
sqlparam
.
Add
(
"category"
,
category
);
}
using
(
var
cn
=
new
MySqlConnection
(
Common
.
GlobalConfig
.
ConnectionString_read
))
{
...
...
@@ -1355,7 +1421,7 @@ namespace Bailun.DC.Services
/// <param name="warehouse_code"></param>
/// <param name="columnname"></param>
/// <returns></returns>
public
List
<
string
>
GetMidLogicWarehouseStatisticCount
(
string
columnname
,
DateTime
start
,
DateTime
end
)
public
List
<
string
>
GetMidLogicWarehouseStatisticCount
(
string
columnname
,
DateTime
start
,
DateTime
end
,
string
category
)
{
var
sql
=
"select CONCAT(name,',',DATE_FORMAT(day,'%Y-%m-%d')) as name from ("
;
...
...
@@ -1369,6 +1435,11 @@ namespace Bailun.DC.Services
sql
+=
"select sum("
+
columnname
+
") as name,day from dc_daily_logic_wh_statistic where "
;
}
if
(!
string
.
IsNullOrWhiteSpace
(
category
))
{
sql
+=
$" skucategory='
{
category
}
' "
;
}
sql
+=
$" day>='
{
start
.
ToString
(
"yyyy-MM-dd"
)}
' and day<='
{
end
.
ToString
(
"yyyy-MM-dd"
)}
' group by day"
;
sql
+=
" ) t1 "
;
...
...
Bailun.DC.Web/Areas/Reports/Controllers/WarehouseController.cs
View file @
5d78bfed
This diff is collapsed.
Click to expand it.
Bailun.DC.Web/Areas/Reports/Views/Warehouse/ListWareHouseSku.cshtml
View file @
5d78bfed
...
...
@@ -271,7 +271,7 @@
s = '';
}
var url = '@Url.Content("~/Reports/Warehouse/ListWareHouseSkuJson")' + '?' + $("#toolbar").serialize() + '&skucategoryids=' + s
+'&onedaysalescount=@(ViewBag.onedaysalescount
)';
var url = '@Url.Content("~/Reports/Warehouse/ListWareHouseSkuJson")' + '?' + $("#toolbar").serialize() + '&skucategoryids=' + s
+ '&onedaysalescount=@(ViewBag.onedaysalescount)' + '&isfinish=@(ViewBag.isfinish)' +'&category=@(ViewBag.category
)';
if (tb == undefined) {
tb = OnlyTable("roletable", columns, url, "", {
...
...
Bailun.DC.Web/Areas/Reports/Views/Warehouse/LogicWarehouse.cshtml
View file @
5d78bfed
...
...
@@ -304,11 +304,35 @@
}
function SkuDetail(code) {
layer_show('Sku仓库', '@Url.Content("~/Reports/Warehouse/ListWareHouseSku?code=")' + code,'90%','90%');
var isfinish = $('#isfinish').val();
var category = $('#category').val();
var title = '';
if (isfinish != '') {
title == isfinish == 1 ? "成品 " : "半成品 ";
}
if (category != '') {
title += $("#category").find("option:selected").text();
}
layer_show(title+' Sku仓库', '@Url.Content("~/Reports/Warehouse/ListWareHouseSku?code=")' + code + '&isfinish=' + + '&category=' + $('#category').val(),'90%','90%');
}
function ShowDynamicStock(code, name) {
layer_show(name+'动态库存分析', '@Url.Content("~/Reports/Warehouse/DynamicStockAnalyse?warehouse_code=")' + code,'90%','90%');
var isfinish = $('#isfinish').val();
var category = $('#category').val();
var title = '';
if (isfinish != '') {
title == isfinish == 1 ? "成品 " : "半成品 ";
}
if (category != '') {
title += $("#category").find("option:selected").text();
}
title += ' ';
layer_show(title+ name + '动态库存分析', '@Url.Content("~/Reports/Warehouse/DynamicStockAnalyse?warehouse_code=")' + code + '&isfinish=' + $('#isfinish').val() + '&category=' + $('#category').val(),'90%','90%');
}
function ShowTrendChart(code, name, key, whname) {
...
...
@@ -316,7 +340,16 @@
code = '';
}
layer_show(whname+"=》"+name + '的趋势图', '@Url.Content("~/Reports/Warehouse/WarehouseTrendChart?warehouse_code=")' + code + '&key=' + key + '&titlename=' + name,'90%','90%');
if (isfinish != '') {
title == isfinish == 1 ? "成品 " : "半成品 ";
}
if (category != '') {
title += $("#category").find("option:selected").text();
}
title += ' ';
layer_show(title+ whname + "=》" + name + '的趋势图', '@Url.Content("~/Reports/Warehouse/WarehouseTrendChart?warehouse_code=")' + code + '&key=' + key + '&titlename=' + name + '&isfinish=' + $('#isfinish').val() + '&category=' + $('#category').val(),'90%','90%');
}
function ShowCashFlow(code,name) {
...
...
@@ -372,7 +405,10 @@
var semiCategory;
function listSemiCategory() {
if (semiCategory == undefined) {
$.submit({
$('#category').html('<option value="">产品类型</option>');
@*$.submit({
url: '@Url.Content("~/Reports/Warehouse/ListFinanceCategory")',
paramData: '',
type: 'POST',
...
...
@@ -386,7 +422,7 @@
}
}
}
})
})
*@
}
else {
$('#category').html('<option value="">产品类型</option>');
...
...
Bailun.DC.Web/Areas/Reports/Views/Warehouse/WarehouseTrendChart.cshtml
View file @
5d78bfed
...
...
@@ -48,7 +48,7 @@
$.submit({
type:'POST',
url: '@Url.Content("~/Reports/Warehouse/WarehouseTrendChartJson")',
paramData: 'warehouse_code=@(ViewBag.warehouse_code)&key=@(ViewBag.key)&' + $("#toolbar").serialize(),
paramData: 'warehouse_code=@(ViewBag.warehouse_code)&key=@(ViewBag.key)&' + $("#toolbar").serialize()
+'&category=@(ViewBag.category)'
,
func: function (result) {
if (result.success) {
var arrval = new Array();
...
...
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