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
bdfdeac6
Commit
bdfdeac6
authored
Mar 28, 2019
by
guanzhenshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整逻辑仓页面
parent
a56ce2b7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
81 additions
and
25 deletions
+81
-25
SkuMonitorServices.cs
Bailun.DC.Services/SkuMonitorServices.cs
+19
-4
WareHouseServices.cs
Bailun.DC.Services/WareHouseServices.cs
+30
-0
WarehouseController.cs
...n.DC.Web/Areas/Reports/Controllers/WarehouseController.cs
+18
-18
LogicWarehouse.cshtml
...C.Web/Areas/Reports/Views/Warehouse/LogicWarehouse.cshtml
+3
-1
ApiController.cs
Bailun.DC.Web/Controllers/ApiController.cs
+2
-2
HomeController.cs
Bailun.DC.Web/Controllers/HomeController.cs
+9
-0
skugroup.xls
Bailun.DC.Web/wwwroot/templatefile/skugroup.xls
+0
-0
No files found.
Bailun.DC.Services/SkuMonitorServices.cs
View file @
bdfdeac6
...
...
@@ -526,19 +526,34 @@ namespace Bailun.DC.Services
/// </summary>
/// <param name="name"></param>
/// <returns></returns>
public
List
<
string
>
ListGroupName
(
string
name
)
public
List
<
string
>
ListGroupName
(
string
name
,
string
country
,
string
warehousetype
,
string
warehousecode
)
{
var
sqlparam
=
new
DynamicParameters
();
var
sql
=
"select
groupname from dc_sku_monitor
"
;
var
sql
=
"select
t1.groupname from dc_sku_monitor t1 join dc_base_warehouse t2 on t1.warehousecode=t2.warehouse_code where 1=1
"
;
if
(!
string
.
IsNullOrEmpty
(
name
))
{
sql
+=
"
where
groupname like @groupname"
;
sql
+=
"
and t1.
groupname like @groupname"
;
sqlparam
.
Add
(
"groupname"
,
"%"
+
name
+
"%"
);
}
if
(!
string
.
IsNullOrEmpty
(
country
))
{
sql
+=
" and t2.area_name=@area_name"
;
sqlparam
.
Add
(
"area_name"
,
country
);
}
if
(!
string
.
IsNullOrEmpty
(
warehousetype
))
{
sql
+=
" and t2.hq_type=@hq_type"
;
sqlparam
.
Add
(
"hq_type"
,
warehousetype
);
}
if
(!
string
.
IsNullOrEmpty
(
warehousecode
))
{
sql
+=
" and t1.warehousecode=@warehousecode"
;
sqlparam
.
Add
(
"warehousecode"
,
warehousecode
);
}
sql
+=
" group by groupname"
;
sql
+=
" group by
t1.
groupname"
;
using
(
var
cn
=
new
MySqlConnection
(
Common
.
GlobalConfig
.
ConnectionString
))
{
...
...
Bailun.DC.Services/WareHouseServices.cs
View file @
bdfdeac6
...
...
@@ -371,5 +371,35 @@ namespace Bailun.DC.Services
}
/// <summary>
/// 获取逻辑仓库里面有的仓库
/// </summary>
/// <param name="warehousetype"></param>
/// <returns></returns>
public
List
<
dc_base_warehouse
>
ListWarehouseFromStockAndSales
(
string
warehousetype
)
{
using
(
var
cn
=
new
MySqlConnection
(
Common
.
GlobalConfig
.
ConnectionString
))
{
if
(
cn
.
State
==
System
.
Data
.
ConnectionState
.
Closed
)
{
cn
.
Open
();
}
var
sqlparam
=
new
DynamicParameters
();
var
sql
=
"select warehouse_code,warehouse_name from dc_skuwarehouse_stock_sales where 1=1 "
;
if
(!
string
.
IsNullOrEmpty
(
warehousetype
))
{
sql
+=
" and hq_type=@hq_type"
;
sqlparam
.
Add
(
"hq_type"
,
warehousetype
);
}
sql
+=
" group by warehouse_code"
;
return
cn
.
Query
<
dc_base_warehouse
>(
sql
,
sqlparam
).
AsList
();
}
}
}
}
Bailun.DC.Web/Areas/Reports/Controllers/WarehouseController.cs
View file @
bdfdeac6
...
...
@@ -52,16 +52,16 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
amount_onedaysale
=
(
p
.
amount_onedaysale
??
0
).
ToString
(
"N2"
),
amount_stock
=
p
.
amount_stock
.
ToString
(
"N2"
),
amount_transit
=
(
p
.
amount_transit
??
0.00
M
).
ToString
(
"N2"
),
fourteenday_total_sales
=
(
p
.
fourteenday_total_sales
??
0
),
noshippingcount
=
(
p
.
noshippingcount
??
0
),
nostockcount
=
(
p
.
nostockcount
??
0
),
oneday_total_sales
=
(
p
.
oneday_total_sales
??
0
),
fourteenday_total_sales
=
(
p
.
fourteenday_total_sales
??
0
)
.
ToString
(
"N0"
)
,
noshippingcount
=
(
p
.
noshippingcount
??
0
)
.
ToString
(
"N0"
)
,
nostockcount
=
(
p
.
nostockcount
??
0
)
.
ToString
(
"N0"
)
,
oneday_total_sales
=
(
p
.
oneday_total_sales
??
0
)
.
ToString
(
"N0"
)
,
purchase_amount
=
(
p
.
purchase_amount
??
0
).
ToString
(
"N2"
),
quantity_purchase
=
(
p
.
quantity_purchase
??
0
),
quantity_transfer
=
(
p
.
quantity_transfer
??
0
),
sevenday_total_sales
=
(
p
.
sevenday_total_sales
??
0
),
thirtyday_total_sales
=
(
p
.
thirtyday_total_sales
??
0
),
usable_stock
=
p
.
usable_stock
,
quantity_purchase
=
(
p
.
quantity_purchase
??
0
)
.
ToString
(
"N0"
)
,
quantity_transfer
=
(
p
.
quantity_transfer
??
0
)
.
ToString
(
"N0"
)
,
sevenday_total_sales
=
(
p
.
sevenday_total_sales
??
0
)
.
ToString
(
"N0"
)
,
thirtyday_total_sales
=
(
p
.
thirtyday_total_sales
??
0
)
.
ToString
(
"N0"
)
,
usable_stock
=
p
.
usable_stock
.
ToString
(
"N0"
)
,
p
.
warehouse_code
,
p
.
warehouse_name
,
});
...
...
@@ -71,16 +71,16 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
amount_onedaysale
=
(
countM
.
amount_onedaysale
??
0
).
ToString
(
"N2"
),
amount_stock
=
countM
.
amount_stock
.
ToString
(
"N2"
),
amount_transit
=
(
countM
.
amount_transit
??
0
).
ToString
(
"N2"
),
noshippingcount
=
(
countM
.
noshippingcount
??
0
),
nostockcount
=
(
countM
.
nostockcount
??
0
),
oneday_total_sales
=
(
countM
.
oneday_total_sales
??
0
),
noshippingcount
=
(
countM
.
noshippingcount
??
0
)
.
ToString
(
"N0"
)
,
nostockcount
=
(
countM
.
nostockcount
??
0
)
.
ToString
(
"N0"
)
,
oneday_total_sales
=
(
countM
.
oneday_total_sales
??
0
)
.
ToString
(
"N0"
)
,
purchase_amount
=
(
countM
.
purchase_amount
??
0
).
ToString
(
"N2"
),
quantity_purchase
=
(
countM
.
quantity_purchase
??
0
),
quantity_transfer
=
(
countM
.
quantity_transfer
??
0
),
sevenday_total_sales
=
(
countM
.
sevenday_total_sales
??
0
),
thirtyday_total_sales
=
(
countM
.
thirtyday_total_sales
??
0
),
usable_stock
=
countM
.
usable_stock
,
fourteenday_total_sales
=
(
countM
.
fourteenday_total_sales
??
0
)
quantity_purchase
=
(
countM
.
quantity_purchase
??
0
)
.
ToString
(
"N0"
)
,
quantity_transfer
=
(
countM
.
quantity_transfer
??
0
)
.
ToString
(
"N0"
)
,
sevenday_total_sales
=
(
countM
.
sevenday_total_sales
??
0
)
.
ToString
(
"N0"
)
,
thirtyday_total_sales
=
(
countM
.
thirtyday_total_sales
??
0
)
.
ToString
(
"N0"
)
,
usable_stock
=
countM
.
usable_stock
.
ToString
(
"N0"
)
,
fourteenday_total_sales
=
(
countM
.
fourteenday_total_sales
??
0
)
.
ToString
(
"N0"
)
}
});
}
...
...
Bailun.DC.Web/Areas/Reports/Views/Warehouse/LogicWarehouse.cshtml
View file @
bdfdeac6
...
...
@@ -19,6 +19,8 @@
<option value="海外仓">海外仓</option>
<option value="FBA仓">FBA仓</option>
<option value="第三方仓库">第三方仓库</option>
<option value="半成品仓">半成品仓</option>
<option value="耗材仓">耗材仓</option>
</select>
</div>
<div class="form-group">
...
...
@@ -132,7 +134,7 @@
var type = $('#warehousetype').val();
$.submit({
url: '@Url.Content("~/Home/ListWare
House
")',
url: '@Url.Content("~/Home/ListWare
houseFromStockAndSales
")',
paramData: 'warehousetype=' + type,
type:'POST',
func: function (result) {
...
...
Bailun.DC.Web/Controllers/ApiController.cs
View file @
bdfdeac6
...
...
@@ -43,9 +43,9 @@ namespace Bailun.DC.Web.Controllers
/// <param name="name"></param>
/// <returns></returns>
[
HttpPost
]
public
JsonResult
GetListGroup
(
string
name
)
public
JsonResult
GetListGroup
(
string
name
,
string
country
,
string
warehousetype
,
string
warehousecode
)
{
var
result
=
new
Services
.
SkuMonitorServices
().
ListGroupName
(
name
);
var
result
=
new
Services
.
SkuMonitorServices
().
ListGroupName
(
name
,
country
,
warehousetype
,
warehousecode
);
return
Json
(
result
);
}
...
...
Bailun.DC.Web/Controllers/HomeController.cs
View file @
bdfdeac6
...
...
@@ -89,5 +89,13 @@ namespace Bailun.DC.Web.Controllers
var
result
=
new
Services
.
WareHouseServices
().
ListGroupName
().
Where
(
a
=>!
string
.
IsNullOrEmpty
(
a
));
return
Json
(
result
);
}
[
HttpPost
]
public
JsonResult
ListWarehouseFromStockAndSales
(
string
warehousetype
)
{
var
result
=
new
Services
.
WareHouseServices
().
ListWarehouseFromStockAndSales
(
warehousetype
);
return
Json
(
result
);
}
}
}
\ No newline at end of file
Bailun.DC.Web/wwwroot/templatefile/skugroup.xls
View file @
bdfdeac6
No preview for this file type
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