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
c971d40a
Commit
c971d40a
authored
Aug 26, 2019
by
guanzhenshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1、每日销进比增加原料统计
2、调整速卖通的广告费明细展示
parent
2a905530
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
57 additions
and
8 deletions
+57
-8
WareHouseServices.cs
Bailun.DC.Services/WareHouseServices.cs
+38
-2
WarehouseController.cs
...n.DC.Web/Areas/Reports/Controllers/WarehouseController.cs
+17
-4
AliexpressAD.cshtml
Bailun.DC.Web/Areas/Reports/Views/Orders/AliexpressAD.cshtml
+2
-2
No files found.
Bailun.DC.Services/WareHouseServices.cs
View file @
c971d40a
...
...
@@ -966,7 +966,7 @@ namespace Bailun.DC.Services
}
/// <summary>
/// 按简单分类统计sku每日进销差异
/// 按简单分类统计sku每日进销差异
(成品)
/// </summary>
/// <param name="warehousetype">仓库类型</param>
/// <param name="warehouse_code">仓库编码</param>
...
...
@@ -985,7 +985,7 @@ namespace Bailun.DC.Services
sqlparam
.
Add
(
"warehousetype"
,
warehousetype
);
}
sql
+=
$" where t1.day>='
{
start
.
ToString
(
"yyyy-MM-dd"
)}
' and t1.day<'
{
end
.
AddDays
(
1
).
ToString
(
"yyyy-MM-dd"
)}
' "
;
sql
+=
$" where t1.
isfinish=1 and t1.
day>='
{
start
.
ToString
(
"yyyy-MM-dd"
)}
' and t1.day<'
{
end
.
AddDays
(
1
).
ToString
(
"yyyy-MM-dd"
)}
' "
;
if
(!
string
.
IsNullOrEmpty
(
warehouse_code
))
{
...
...
@@ -1006,6 +1006,42 @@ namespace Bailun.DC.Services
return
obj
;
}
}
/// <summary>
/// 按简单分类统计sku每日进销差异 (半成品)
/// </summary>
/// <param name="warehousetype">仓库类型</param>
/// <param name="warehouse_code">仓库编码</param>
/// <param name="start">开始时间</param>
/// <param name="end">结束时间</param>
/// <returns></returns>
public
List
<
dc_daily_purchase_sales
>
DailyPurchaseSaleBySkuCategory_Semi
(
string
warehousetype
,
string
warehouse_code
,
DateTime
start
,
DateTime
end
)
{
var
sqlparam
=
new
DynamicParameters
();
var
sql
=
"select t1.day,'原料' category_simple_name,sum(t1.count_sales) count_sales,sum(t1.amount_sales) amount_sales,sum(t1.count_purchase) count_purchase,sum(t1.amount_purchase) amount_purchase,sum(count_putin) count_putin,sum(amount_putin) amount_putin,sum(count_shipping) count_shipping,sum(t1.amount_shipping) amount_shipping from dc_daily_purchase_sales t1"
;
sql
+=
$" where t1.isfinish=0 and t1.day>='
{
start
.
ToString
(
"yyyy-MM-dd"
)}
' and t1.day<'
{
end
.
AddDays
(
1
).
ToString
(
"yyyy-MM-dd"
)}
' "
;
if
(!
string
.
IsNullOrEmpty
(
warehouse_code
))
{
sql
+=
" and t1.warehouse_code=@warehouse_code"
;
sqlparam
.
Add
(
"warehouse_code"
,
warehouse_code
);
}
sql
+=
" group by t1.day"
;
using
(
var
cn
=
new
MySqlConnection
(
Common
.
GlobalConfig
.
ConnectionString
))
{
if
(
cn
.
State
==
System
.
Data
.
ConnectionState
.
Closed
)
{
cn
.
Open
();
}
var
obj
=
cn
.
Query
<
dc_daily_purchase_sales
>(
sql
,
sqlparam
,
null
,
true
,
2
*
60
).
AsList
();
return
obj
;
}
}
...
...
Bailun.DC.Web/Areas/Reports/Controllers/WarehouseController.cs
View file @
c971d40a
...
...
@@ -514,10 +514,17 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
var
categoryid
=
"0"
;
if
(
categoryname
!=
"普货"
)
{
var
objCategory
=
new
Services
.
SkuInfoServices
().
GetSimpleCategory
(
categoryname
);
if
(
objCategory
!=
null
)
if
(
categoryname
==
"原料"
)
{
categoryid
=
objCategory
.
skums_id
.
ToString
();
categoryid
=
(-
100
).
ToString
();
}
else
{
var
objCategory
=
new
Services
.
SkuInfoServices
().
GetSimpleCategory
(
categoryname
);
if
(
objCategory
!=
null
)
{
categoryid
=
objCategory
.
skums_id
.
ToString
();
}
}
}
else
...
...
@@ -635,7 +642,13 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
public
JsonResult
DailyPurchaseSalesCountJson
(
int
dateWay
,
DateTime
start
,
DateTime
end
,
string
warehousetype
,
string
warehousecode
,
int
t
)
{
var
list
=
new
List
<
mDailyPurchaseSales
>();
var
obj
=
new
Services
.
WareHouseServices
().
DailyPurchaseSaleBySkuCategory
(
warehousetype
,
warehousecode
,
start
,
end
).
OrderBy
(
a
=>
a
.
day
).
ToList
();
var
_service
=
new
Services
.
WareHouseServices
();
var
obj
=
_service
.
DailyPurchaseSaleBySkuCategory
(
warehousetype
,
warehousecode
,
start
,
end
).
OrderBy
(
a
=>
a
.
day
).
ToList
();
//Add by Allan at 201908261750 for 增加原料的统计
var
objSemi
=
_service
.
DailyPurchaseSaleBySkuCategory_Semi
(
warehousetype
,
warehousecode
,
start
,
end
).
OrderBy
(
a
=>
a
.
day
).
ToList
();
obj
.
AddRange
(
objSemi
);
//End Add
if
(
obj
.
Count
==
0
)
{
...
...
Bailun.DC.Web/Areas/Reports/Views/Orders/AliexpressAD.cshtml
View file @
c971d40a
...
...
@@ -94,9 +94,9 @@
function list(p) {
var columns = [
{
field: 'account_name', title: '帐号', width: '
20
0', iscount: true
field: 'account_name', title: '帐号', width: '
13
0', iscount: true
},
{ field: 'product_name', title: '产品名称', width: '
12
0', sortable: true },
{ field: 'product_name', title: '产品名称', width: '
26
0', sortable: true },
{ field: 'exposure', title: '曝光量', width: '120', sortable: true, iscount: true },
{ field: 'clickcount', title: '点击量', width: '130' },
{ field: 'clickrate', title: '点击率', width: '100', iscount: true},
...
...
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