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
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
154 additions
and
31 deletions
+154
-31
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
+24
-18
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
...
@@ -145,5 +145,10 @@ namespace Bailun.DC.Models.Stock
/// </summary>
/// </summary>
public
decimal
?
stock_age_6months_amount
{
get
;
set
;
}
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
...
@@ -185,5 +185,10 @@ namespace Bailun.DC.Models.Stock
/// 超过6个月库龄的库存金额
/// 超过6个月库龄的库存金额
/// </summary>
/// </summary>
public
decimal
?
stock_age_6months_amount
{
get
;
set
;
}
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
...
@@ -74,7 +74,7 @@ namespace Bailun.DC.Services
/// <param name="warehouse">仓库编码</param>
/// <param name="warehouse">仓库编码</param>
/// <param name="total">符合条件的记录总数</param>
/// <param name="total">符合条件的记录总数</param>
/// <returns></returns>
/// <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
sqlparam
=
new
DynamicParameters
();
var
sqlwhere
=
" where 1=1 "
;
var
sqlwhere
=
" where 1=1 "
;
...
@@ -93,6 +93,24 @@ namespace Bailun.DC.Services
...
@@ -93,6 +93,24 @@ namespace Bailun.DC.Services
sqlparam
.
Add
(
"warehouse_code"
,
warehouse
);
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"
;
sqlwhere
+=
" group by warehouse_code"
;
var
sqlorder
=
""
;
var
sqlorder
=
""
;
...
@@ -132,7 +150,7 @@ namespace Bailun.DC.Services
...
@@ -132,7 +150,7 @@ namespace Bailun.DC.Services
/// <param name="warehouse">仓库编码</param>
/// <param name="warehouse">仓库编码</param>
/// <param name="total">符合条件的记录总数</param>
/// <param name="total">符合条件的记录总数</param>
/// <returns></returns>
/// <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
sqlparam
=
new
DynamicParameters
();
var
sqlwhere
=
" where 1=1 "
;
var
sqlwhere
=
" where 1=1 "
;
...
@@ -151,6 +169,24 @@ namespace Bailun.DC.Services
...
@@ -151,6 +169,24 @@ namespace Bailun.DC.Services
sqlparam
.
Add
(
"warehouse_code"
,
warehouse
);
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"
;
sqlwhere
+=
" group by warehouse_code"
;
using
(
var
cn
=
new
MySqlConnection
(
Common
.
GlobalConfig
.
ConnectionString_read
))
using
(
var
cn
=
new
MySqlConnection
(
Common
.
GlobalConfig
.
ConnectionString_read
))
...
@@ -171,7 +207,7 @@ namespace Bailun.DC.Services
...
@@ -171,7 +207,7 @@ namespace Bailun.DC.Services
/// <param name="warehousetype"></param>
/// <param name="warehousetype"></param>
/// <param name="warehouse"></param>
/// <param name="warehouse"></param>
/// <returns></returns>
/// <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
sqlparam
=
new
DynamicParameters
();
var
sqlwhere
=
" where 1=1 "
;
var
sqlwhere
=
" where 1=1 "
;
...
@@ -187,6 +223,24 @@ namespace Bailun.DC.Services
...
@@ -187,6 +223,24 @@ namespace Bailun.DC.Services
sqlwhere
+=
" and warehouse_code=@warehouse_code"
;
sqlwhere
+=
" and warehouse_code=@warehouse_code"
;
sqlparam
.
Add
(
"warehouse_code"
,
warehouse
);
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
))
using
(
var
cn
=
new
MySqlConnection
(
Common
.
GlobalConfig
.
ConnectionString_read
))
{
{
...
@@ -215,7 +269,7 @@ namespace Bailun.DC.Services
...
@@ -215,7 +269,7 @@ namespace Bailun.DC.Services
/// <param name="total">符合条件的总记录数</param>
/// <param name="total">符合条件的总记录数</param>
/// <param name="onedaysalescount">昨日销量,0:0销量,1:0-1销量,2:1-5销量,5:5-10销量,10:大于10的销量</param>
/// <param name="onedaysalescount">昨日销量,0:0销量,1:0-1销量,2:1-5销量,5:5-10销量,10:大于10的销量</param>
/// <returns></returns>
/// <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
();
var
sqlparam
=
new
DynamicParameters
();
//available_days
//available_days
...
@@ -346,6 +400,12 @@ namespace Bailun.DC.Services
...
@@ -346,6 +400,12 @@ namespace Bailun.DC.Services
}
}
}
}
if
(!
string
.
IsNullOrWhiteSpace
(
category
))
{
sqlwhere
+=
" and t1.skucategory=@category "
;
sqlparam
.
Add
(
"category"
,
category
);
}
var
sqlsort
=
""
;
var
sqlsort
=
""
;
...
@@ -395,7 +455,7 @@ namespace Bailun.DC.Services
...
@@ -395,7 +455,7 @@ namespace Bailun.DC.Services
/// <param name="total">符合条件的总记录数</param>
/// <param name="total">符合条件的总记录数</param>
/// <param name="onedaysalescount">昨日销量,0:0销量,1:0-1销量,2:1-5销量,5:5-10销量,10:大于10的销量</param>
/// <param name="onedaysalescount">昨日销量,0:0销量,1:0-1销量,2:1-5销量,5:5-10销量,10:大于10的销量</param>
/// <returns></returns>
/// <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
();
var
sqlparam
=
new
DynamicParameters
();
//available_days
//available_days
...
@@ -525,6 +585,12 @@ namespace Bailun.DC.Services
...
@@ -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
))
using
(
var
cn
=
new
MySqlConnection
(
Common
.
GlobalConfig
.
ConnectionString_read
))
{
{
...
@@ -1355,7 +1421,7 @@ namespace Bailun.DC.Services
...
@@ -1355,7 +1421,7 @@ namespace Bailun.DC.Services
/// <param name="warehouse_code"></param>
/// <param name="warehouse_code"></param>
/// <param name="columnname"></param>
/// <param name="columnname"></param>
/// <returns></returns>
/// <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 ("
;
var
sql
=
"select CONCAT(name,',',DATE_FORMAT(day,'%Y-%m-%d')) as name from ("
;
...
@@ -1369,6 +1435,11 @@ namespace Bailun.DC.Services
...
@@ -1369,6 +1435,11 @@ namespace Bailun.DC.Services
sql
+=
"select sum("
+
columnname
+
") as name,day from dc_daily_logic_wh_statistic where "
;
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
+=
$" day>='
{
start
.
ToString
(
"yyyy-MM-dd"
)}
' and day<='
{
end
.
ToString
(
"yyyy-MM-dd"
)}
' group by day"
;
sql
+=
" ) t1 "
;
sql
+=
" ) t1 "
;
...
...
Bailun.DC.Web/Areas/Reports/Controllers/WarehouseController.cs
View file @
5d78bfed
...
@@ -74,9 +74,9 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
...
@@ -74,9 +74,9 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
var
service
=
new
Services
.
WareHouseServices
();
var
service
=
new
Services
.
WareHouseServices
();
var
total
=
0
;
var
total
=
0
;
var
obj
=
service
.
ListLogicWarehouseStock
(
parameter
,
warehousetype
,
warehousecode
,
ref
total
);
var
obj
=
service
.
ListLogicWarehouseStock
(
parameter
,
warehousetype
,
warehousecode
,
isfinish
,
category
,
ref
total
);
var
countM
=
service
.
LogicWarehouseStockCount
(
warehousetype
,
warehousecode
);
var
countM
=
service
.
LogicWarehouseStockCount
(
warehousetype
,
warehousecode
,
isfinish
,
category
);
countM
.
warehouse_name
=
"总计"
;
countM
.
warehouse_name
=
"总计"
;
countM
.
amount_onedaysale
=
Math
.
Round
(
countM
.
amount_onedaysale
??
0
,
2
,
MidpointRounding
.
AwayFromZero
);
countM
.
amount_onedaysale
=
Math
.
Round
(
countM
.
amount_onedaysale
??
0
,
2
,
MidpointRounding
.
AwayFromZero
);
...
@@ -171,10 +171,10 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
...
@@ -171,10 +171,10 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
/// <param name="warehousetype"></param>
/// <param name="warehousetype"></param>
/// <param name="warehousecode"></param>
/// <param name="warehousecode"></param>
/// <returns></returns>
/// <returns></returns>
public
ActionResult
ExportLogicWarehouse
(
string
warehousetype
,
string
warehousecode
)
public
ActionResult
ExportLogicWarehouse
(
string
warehousetype
,
string
warehousecode
,
int
?
isfinish
,
string
category
)
{
{
var
service
=
new
Services
.
WareHouseServices
();
var
service
=
new
Services
.
WareHouseServices
();
var
obj
=
service
.
ListLogicWarehouseStock
(
warehousetype
,
warehousecode
);
var
obj
=
service
.
ListLogicWarehouseStock
(
warehousetype
,
warehousecode
,
isfinish
,
category
);
var
list
=
obj
.
Select
(
p
=>
new
var
list
=
obj
.
Select
(
p
=>
new
{
{
...
@@ -199,12 +199,13 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
...
@@ -199,12 +199,13 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
stock_age_6months
=
(
p
.
stock_age_6months
??
0
).
ToString
(
"N0"
),
stock_age_6months
=
(
p
.
stock_age_6months
??
0
).
ToString
(
"N0"
),
stock_age_6months_amount
=
(
p
.
stock_age_6months_amount
??
0
).
ToString
(
"N2"
),
stock_age_6months_amount
=
(
p
.
stock_age_6months_amount
??
0
).
ToString
(
"N2"
),
skucategory
=
category
,
});
});
var
colNames
=
new
List
<
string
>
{
"仓储仓库"
,
"库存数量"
,
"库存金额"
,
"采购在途数量"
,
"采购在途金额"
,
var
colNames
=
new
List
<
string
>
{
"仓储仓库"
,
"库存数量"
,
"库存金额"
,
"采购在途数量"
,
"采购在途金额"
,
"调拨在途数量"
,
"调拨在途金额"
,
"待发货数量"
,
"缺货数量"
,
"调出在途数"
,
"调拨在途数量"
,
"调拨在途金额"
,
"待发货数量"
,
"缺货数量"
,
"调出在途数"
,
"30天内调出数"
,
"30天内调入数"
,
"昨日总销量"
,
"昨日总销售额"
,
"七天销量"
,
"30天内调出数"
,
"30天内调入数"
,
"昨日总销量"
,
"昨日总销售额"
,
"七天销量"
,
"十四天销量"
,
"三十天销量"
,
"半年以上库龄"
,
"半年以上库龄金额"
"十四天销量"
,
"三十天销量"
,
"半年以上库龄"
,
"半年以上库龄金额"
,
"产品类型"
};
};
var
listVal
=
new
List
<
string
>();
var
listVal
=
new
List
<
string
>();
...
@@ -214,7 +215,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
...
@@ -214,7 +215,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
item
.
warehouse_name
+
"|"
+
item
.
usable_stock
+
"|"
+
item
.
amount_stock
+
"|"
+
item
.
quantity_purchase
+
"|"
+
item
.
purchase_amount
+
"|"
+
item
.
warehouse_name
+
"|"
+
item
.
usable_stock
+
"|"
+
item
.
amount_stock
+
"|"
+
item
.
quantity_purchase
+
"|"
+
item
.
purchase_amount
+
"|"
+
item
.
quantity_transfer
+
"|"
+
item
.
amount_transit
+
"|"
+
item
.
noshippingcount
+
"|"
+
item
.
nostockcount
+
"|"
+
item
.
quantity_tuneout_onway
+
"|"
+
item
.
quantity_transfer
+
"|"
+
item
.
amount_transit
+
"|"
+
item
.
noshippingcount
+
"|"
+
item
.
nostockcount
+
"|"
+
item
.
quantity_tuneout_onway
+
"|"
+
item
.
quantity_tuneout_30days
+
"|"
+
item
.
quantity_tunein_30days
+
"|"
+
item
.
oneday_total_sales
+
"|"
+
item
.
amount_onedaysale
+
"|"
+
item
.
sevenday_total_sales
+
"|"
+
item
.
quantity_tuneout_30days
+
"|"
+
item
.
quantity_tunein_30days
+
"|"
+
item
.
oneday_total_sales
+
"|"
+
item
.
amount_onedaysale
+
"|"
+
item
.
sevenday_total_sales
+
"|"
+
item
.
fourteenday_total_sales
+
"|"
+
item
.
thirtyday_total_sales
+
"|"
+
item
.
stock_age_6months
+
"|"
+
item
.
stock_age_6months_amount
item
.
fourteenday_total_sales
+
"|"
+
item
.
thirtyday_total_sales
+
"|"
+
item
.
stock_age_6months
+
"|"
+
item
.
stock_age_6months_amount
+
"|"
+
item
.
skucategory
);
);
}
}
...
@@ -240,7 +241,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
...
@@ -240,7 +241,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
/// </summary>
/// </summary>
/// <param name="code">仓库编码</param>
/// <param name="code">仓库编码</param>
/// <returns></returns>
/// <returns></returns>
public
ActionResult
ListWareHouseSku
(
string
code
,
string
available_days
,
int
?
onedaysalescount
,
DateTime
?
day
)
public
ActionResult
ListWareHouseSku
(
string
code
,
string
available_days
,
int
?
onedaysalescount
,
DateTime
?
day
,
int
?
isfinish
,
string
category
)
{
{
ViewBag
.
warehousecode
=
code
;
ViewBag
.
warehousecode
=
code
;
ViewBag
.
available_days
=
available_days
;
ViewBag
.
available_days
=
available_days
;
...
@@ -268,6 +269,9 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
...
@@ -268,6 +269,9 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
ViewBag
.
day
=
day
.
HasValue
?
day
.
Value
.
ToString
(
"yyyy-MM-dd"
)
:
""
;
ViewBag
.
day
=
day
.
HasValue
?
day
.
Value
.
ToString
(
"yyyy-MM-dd"
)
:
""
;
ViewBag
.
isfinish
=
isfinish
.
HasValue
?
isfinish
.
Value
+
""
:
""
;
ViewBag
.
category
=
category
;
return
View
();
return
View
();
}
}
...
@@ -286,7 +290,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
...
@@ -286,7 +290,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
/// <param name="onedaysalescount">昨日销量,0:0销量,1:0-1销量,2:1-5销量,5:5-10销量,10:大于10的销量</param>
/// <param name="onedaysalescount">昨日销量,0:0销量,1:0-1销量,2:1-5销量,5:5-10销量,10:大于10的销量</param>
/// <param name="day">统计日期</param>
/// <param name="day">统计日期</param>
/// <returns></returns>
/// <returns></returns>
public
string
ListWareHouseSkuJson
(
BtTableParameter
parameter
,
string
warehousecode
,
int
?
push_status
,
int
?
minordercount
,
int
?
maxordercount
,
int
?
stockmin
,
int
?
stockmax
,
decimal
?
stockamountmin
,
decimal
?
stockamountmax
,
string
skucategoryids
,
string
available_days
,
int
?
onedaysalescount
,
DateTime
?
day
)
public
string
ListWareHouseSkuJson
(
BtTableParameter
parameter
,
string
warehousecode
,
int
?
push_status
,
int
?
minordercount
,
int
?
maxordercount
,
int
?
stockmin
,
int
?
stockmax
,
decimal
?
stockamountmin
,
decimal
?
stockamountmax
,
string
skucategoryids
,
string
available_days
,
int
?
onedaysalescount
,
DateTime
?
day
,
int
?
isfinish
,
string
category
)
{
{
var
total
=
0
;
var
total
=
0
;
...
@@ -314,9 +318,9 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
...
@@ -314,9 +318,9 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
var
_service
=
new
Services
.
WareHouseServices
();
var
_service
=
new
Services
.
WareHouseServices
();
var
obj
=
_service
.
ListWareHouseSku
(
parameter
,
warehousecode
,
null
,
minordercount
,
maxordercount
,
stockmin
,
stockmax
,
stockamountmin
,
stockamountmax
,
skucategoryids
,
push_status
,
available_days_start
,
available_days_end
,
ref
total
,
day
,
onedaysalescount
);
var
obj
=
_service
.
ListWareHouseSku
(
parameter
,
warehousecode
,
null
,
minordercount
,
maxordercount
,
stockmin
,
stockmax
,
stockamountmin
,
stockamountmax
,
skucategoryids
,
push_status
,
available_days_start
,
available_days_end
,
ref
total
,
category
,
day
,
onedaysalescount
);
var
objCount
=
_service
.
ListWareHouseSkuCount
(
warehousecode
,
null
,
minordercount
,
maxordercount
,
stockmin
,
stockmax
,
stockamountmin
,
stockamountmax
,
skucategoryids
,
push_status
,
available_days_start
,
available_days_end
,
day
,
onedaysalescount
);
var
objCount
=
_service
.
ListWareHouseSkuCount
(
warehousecode
,
null
,
minordercount
,
maxordercount
,
stockmin
,
stockmax
,
stockamountmin
,
stockamountmax
,
skucategoryids
,
push_status
,
available_days_start
,
available_days_end
,
category
,
day
,
onedaysalescount
);
var
list
=
obj
.
Select
(
p
=>
new
var
list
=
obj
.
Select
(
p
=>
new
{
{
...
@@ -363,7 +367,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
...
@@ -363,7 +367,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
stock_age_6months
=
(
p
.
stock_age_6months
??
0
),
stock_age_6months
=
(
p
.
stock_age_6months
??
0
),
stock_age_6months_amount
=
(
p
.
stock_age_6months_amount
??
0
).
ToString
(
"N2"
),
stock_age_6months_amount
=
(
p
.
stock_age_6months_amount
??
0
).
ToString
(
"N2"
),
p
.
skucategory
});
});
return
JsonConvert
.
SerializeObject
(
new
return
JsonConvert
.
SerializeObject
(
new
...
@@ -408,7 +412,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
...
@@ -408,7 +412,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
});
});
}
}
public
ActionResult
ExportWareHouseSku
(
string
code
,
int
?
push_status
,
int
?
minordercount
,
int
?
maxordercount
,
int
?
stockmin
,
int
?
stockmax
,
decimal
?
stockamountmin
,
decimal
?
stockamountmax
,
string
skucategoryids
,
string
available_days
,
int
?
onedaysalescount
,
DateTime
?
day
)
public
ActionResult
ExportWareHouseSku
(
string
code
,
int
?
push_status
,
int
?
minordercount
,
int
?
maxordercount
,
int
?
stockmin
,
int
?
stockmax
,
decimal
?
stockamountmin
,
decimal
?
stockamountmax
,
string
skucategoryids
,
string
available_days
,
int
?
onedaysalescount
,
string
category
,
DateTime
?
day
)
{
{
var
total
=
0
;
var
total
=
0
;
int
?
available_days_start
=
null
;
int
?
available_days_start
=
null
;
...
@@ -432,13 +436,13 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
...
@@ -432,13 +436,13 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
}
}
}
}
}
}
var
obj
=
new
Services
.
WareHouseServices
().
ListWareHouseSku
(
new
BtTableParameter
{
offset
=
0
,
limit
=
0
},
code
,
null
,
minordercount
,
maxordercount
,
stockmin
,
stockmax
,
stockamountmin
,
stockamountmax
,
skucategoryids
,
push_status
,
available_days_start
,
available_days_end
,
ref
total
,
day
,
onedaysalescount
);
var
obj
=
new
Services
.
WareHouseServices
().
ListWareHouseSku
(
new
BtTableParameter
{
offset
=
0
,
limit
=
0
},
code
,
null
,
minordercount
,
maxordercount
,
stockmin
,
stockmax
,
stockamountmin
,
stockamountmax
,
skucategoryids
,
push_status
,
available_days_start
,
available_days_end
,
ref
total
,
category
,
day
,
onedaysalescount
);
var
colNames
=
new
List
<
string
>()
{
"仓库名称"
,
"Sku"
,
"推送产品库"
,
"分类名称"
,
"英文标题"
var
colNames
=
new
List
<
string
>()
{
"仓库名称"
,
"Sku"
,
"推送产品库"
,
"分类名称"
,
"英文标题"
,
"库存数量"
,
"库存金额"
,
"采购在途数量"
,
"采购在途金额"
,
"调拨在途数量"
,
"库存数量"
,
"库存金额"
,
"采购在途数量"
,
"采购在途金额"
,
"调拨在途数量"
,
"调拨在途金额"
,
"待发货数量"
,
"缺货数量"
,
"调出在途数"
,
"30天调出数"
,
"调拨在途金额"
,
"待发货数量"
,
"缺货数量"
,
"调出在途数"
,
"30天调出数"
,
"30天调入数"
,
"昨日总销量"
,
"昨日总销售额"
,
"七天销量"
,
"十四天销量"
,
"30天调入数"
,
"昨日总销量"
,
"昨日总销售额"
,
"七天销量"
,
"十四天销量"
,
"三十天销量"
,
"可销售天数"
,
"半年以上库龄"
,
"半年以上库龄金额"
,
"三十天销量"
,
"可销售天数"
,
"半年以上库龄"
,
"半年以上库龄金额"
,
"sku产品分类"
};
};
var
list
=
new
List
<
string
>();
var
list
=
new
List
<
string
>();
...
@@ -449,7 +453,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
...
@@ -449,7 +453,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
(
item
.
usable_stock
??
0
)
+
"|"
+
(
item
.
amount_stock
??
0
)
+
"|"
+
(
item
.
quantity_purchase
??
0
)
+
"|"
+
(
item
.
purchase_amount
??
0
)
+
"|"
+
(
item
.
quantity_transfer
??
0
)
+
"|"
+
(
item
.
usable_stock
??
0
)
+
"|"
+
(
item
.
amount_stock
??
0
)
+
"|"
+
(
item
.
quantity_purchase
??
0
)
+
"|"
+
(
item
.
purchase_amount
??
0
)
+
"|"
+
(
item
.
quantity_transfer
??
0
)
+
"|"
+
(
item
.
amount_transit
??
0
)
+
"|"
+
(
item
.
noshippingcount
??
0
)
+
"|"
+
(
item
.
nostockcount
??
0
)
+
"|"
+
(
item
.
quantity_tuneout_onway
??
0
)
+
"|"
+
(
item
.
quantity_tuneout_30days
??
0
)
+
"|"
+
(
item
.
amount_transit
??
0
)
+
"|"
+
(
item
.
noshippingcount
??
0
)
+
"|"
+
(
item
.
nostockcount
??
0
)
+
"|"
+
(
item
.
quantity_tuneout_onway
??
0
)
+
"|"
+
(
item
.
quantity_tuneout_30days
??
0
)
+
"|"
+
(
item
.
quantity_tunein_30days
??
0
)
+
"|"
+
(
item
.
oneday_total_sales
??
0
)
+
"|"
+
(
item
.
amount_onedaysale
??
0
)
+
"|"
+
(
item
.
sevenday_total_sales
??
0
)
+
"|"
+
(
item
.
fourteenday_total_sales
??
0
)
+
"|"
+
(
item
.
quantity_tunein_30days
??
0
)
+
"|"
+
(
item
.
oneday_total_sales
??
0
)
+
"|"
+
(
item
.
amount_onedaysale
??
0
)
+
"|"
+
(
item
.
sevenday_total_sales
??
0
)
+
"|"
+
(
item
.
fourteenday_total_sales
??
0
)
+
"|"
+
(
item
.
thirtyday_total_sales
??
0
)
+
"|"
+
(
item
.
available_days
??
0
)
+
"|"
+
(
item
.
stock_age_6months
??
0
)
+
"|"
+
(
item
.
stock_age_6months_amount
??
0
);
(
item
.
thirtyday_total_sales
??
0
)
+
"|"
+
(
item
.
available_days
??
0
)
+
"|"
+
(
item
.
stock_age_6months
??
0
)
+
"|"
+
(
item
.
stock_age_6months_amount
??
0
)
+
"|"
+
item
.
skucategory
;
list
.
Add
(
str
);
list
.
Add
(
str
);
}
}
...
@@ -1769,7 +1773,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
...
@@ -1769,7 +1773,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
/// <param name="warehouse_code"></param>
/// <param name="warehouse_code"></param>
/// <param name="key"></param>
/// <param name="key"></param>
/// <returns></returns>
/// <returns></returns>
public
ActionResult
WarehouseTrendChart
(
string
warehouse_code
,
string
key
,
string
titlename
)
public
ActionResult
WarehouseTrendChart
(
string
warehouse_code
,
string
key
,
string
titlename
,
string
category
)
{
{
ViewBag
.
warehouse_code
=
warehouse_code
;
ViewBag
.
warehouse_code
=
warehouse_code
;
ViewBag
.
key
=
key
;
ViewBag
.
key
=
key
;
...
@@ -1778,6 +1782,8 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
...
@@ -1778,6 +1782,8 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
ViewBag
.
start
=
DateTime
.
Now
.
AddDays
(-
31
).
ToString
(
"yyyy-MM-dd"
);
ViewBag
.
start
=
DateTime
.
Now
.
AddDays
(-
31
).
ToString
(
"yyyy-MM-dd"
);
ViewBag
.
end
=
DateTime
.
Now
.
AddDays
(-
1
).
ToString
(
"yyyy-MM-dd"
);
ViewBag
.
end
=
DateTime
.
Now
.
AddDays
(-
1
).
ToString
(
"yyyy-MM-dd"
);
ViewBag
.
category
=
category
;
return
View
();
return
View
();
}
}
...
@@ -1788,13 +1794,13 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
...
@@ -1788,13 +1794,13 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
/// <param name="key"></param>
/// <param name="key"></param>
/// <returns></returns>
/// <returns></returns>
[
HttpPost
]
[
HttpPost
]
public
JsonResult
WarehouseTrendChartJson
(
string
warehouse_code
,
string
key
,
DateTime
start
,
DateTime
end
)
public
JsonResult
WarehouseTrendChartJson
(
string
warehouse_code
,
string
key
,
DateTime
start
,
DateTime
end
,
string
category
)
{
{
var
obj
=
new
List
<
string
>();
var
obj
=
new
List
<
string
>();
if
(
string
.
IsNullOrEmpty
(
warehouse_code
))
if
(
string
.
IsNullOrEmpty
(
warehouse_code
))
{
{
obj
=
new
Services
.
WareHouseServices
().
GetMidLogicWarehouseStatisticCount
(
key
,
start
,
end
);
obj
=
new
Services
.
WareHouseServices
().
GetMidLogicWarehouseStatisticCount
(
key
,
start
,
end
,
category
);
}
}
else
else
{
{
...
...
Bailun.DC.Web/Areas/Reports/Views/Warehouse/ListWareHouseSku.cshtml
View file @
5d78bfed
...
@@ -271,7 +271,7 @@
...
@@ -271,7 +271,7 @@
s = '';
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) {
if (tb == undefined) {
tb = OnlyTable("roletable", columns, url, "", {
tb = OnlyTable("roletable", columns, url, "", {
...
...
Bailun.DC.Web/Areas/Reports/Views/Warehouse/LogicWarehouse.cshtml
View file @
5d78bfed
...
@@ -304,11 +304,35 @@
...
@@ -304,11 +304,35 @@
}
}
function SkuDetail(code) {
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) {
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) {
function ShowTrendChart(code, name, key, whname) {
...
@@ -316,7 +340,16 @@
...
@@ -316,7 +340,16 @@
code = '';
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) {
function ShowCashFlow(code,name) {
...
@@ -372,7 +405,10 @@
...
@@ -372,7 +405,10 @@
var semiCategory;
var semiCategory;
function listSemiCategory() {
function listSemiCategory() {
if (semiCategory == undefined) {
if (semiCategory == undefined) {
$.submit({
$('#category').html('<option value="">产品类型</option>');
@*$.submit({
url: '@Url.Content("~/Reports/Warehouse/ListFinanceCategory")',
url: '@Url.Content("~/Reports/Warehouse/ListFinanceCategory")',
paramData: '',
paramData: '',
type: 'POST',
type: 'POST',
...
@@ -386,7 +422,7 @@
...
@@ -386,7 +422,7 @@
}
}
}
}
}
}
})
})
*@
}
}
else {
else {
$('#category').html('<option value="">产品类型</option>');
$('#category').html('<option value="">产品类型</option>');
...
...
Bailun.DC.Web/Areas/Reports/Views/Warehouse/WarehouseTrendChart.cshtml
View file @
5d78bfed
...
@@ -48,7 +48,7 @@
...
@@ -48,7 +48,7 @@
$.submit({
$.submit({
type:'POST',
type:'POST',
url: '@Url.Content("~/Reports/Warehouse/WarehouseTrendChartJson")',
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) {
func: function (result) {
if (result.success) {
if (result.success) {
var arrval = new Array();
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