Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
data-center-auto
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
data-center-auto
Commits
2834ce15
Commit
2834ce15
authored
Dec 03, 2020
by
泽锋 李
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增第三方仓汇总明细导出
parent
759b6e03
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
1 deletion
+45
-1
report.cs
AutoTurnOver.DB/report.cs
+0
-0
report_stock_week_view_dto.cs
AutoTurnOver.Models/Report/report_stock_week_view_dto.cs
+4
-0
ReportServices.cs
AutoTurnOver.Services/ReportServices.cs
+5
-1
ReportsController.cs
AutoTurnOver/Controllers/ReportsController.cs
+36
-0
No files found.
AutoTurnOver.DB/report.cs
View file @
2834ce15
This diff is collapsed.
Click to expand it.
AutoTurnOver.Models/Report/report_stock_week_view_dto.cs
View file @
2834ce15
...
...
@@ -55,6 +55,10 @@ namespace AutoTurnOver.Models.Report
public
int
is_order
{
get
;
set
;
}
}
public
class
dc_report_stock_week_warehouse_dto
:
dc_report_stock_week
{
public
string
warehouse_name
{
get
;
set
;
}
}
public
class
dc_report_purchase_week
{
public
int
id
{
get
;
set
;
}
...
...
AutoTurnOver.Services/ReportServices.cs
View file @
2834ce15
...
...
@@ -877,6 +877,10 @@ namespace AutoTurnOver.Services
{
return
base_sku_dao
.
GetPage
(
search
);
}
public
List
<
dc_report_stock_week_warehouse_dto
>
ExportTableReportStockWeekViewSkus
(
string
web_site
,
string
tag
,
string
date_tag
)
{
return
report
.
ExportTableReportStockWeekViewSkus
(
web_site
,
tag
,
date_tag
);
}
public
List
<
dynamic
>
ReportStockWeekView
(
report_stock_week_view_search_dto
search_data
)
{
...
...
@@ -890,7 +894,7 @@ namespace AutoTurnOver.Services
foreach
(
var
dat_item
in
item
.
weeks
)
{
var
dic
=
(
IDictionary
<
string
,
object
>)
o
;
dic
[
"val_"
+
(
dat_item
.
tag
)]
=
Math
.
Round
(
dat_item
.
val
,
2
)
;
dic
[
"val_"
+
(
dat_item
.
tag
)]
=
new
{
val
=
Math
.
Round
(
dat_item
.
val
,
2
)
,
date_tag
=
dat_item
.
tag
}
;
dic
[
"ratio_"
+
(
dat_item
.
tag
)]
=
dat_item
.
ratio_str
;
}
...
...
AutoTurnOver/Controllers/ReportsController.cs
View file @
2834ce15
...
...
@@ -732,6 +732,42 @@ namespace AutoTurnOver.Controllers
}
[
BrowseLog
(
"Bailun_aims"
,
"访问【百伦自动周转系统】->【报表】->【第三方海外仓统计表】->【导出】"
,
0
)]
public
FileResult
ExportTableReportStockWeekViewSkus
(
string
web_site
,
string
tag
,
string
date_tag
)
{
var
list
=
new
ReportServices
().
ExportTableReportStockWeekViewSkus
(
web_site
,
tag
,
date_tag
);
DataTable
table
=
new
DataTable
();
string
[]
cols
=
new
string
[]
{
"SKU"
,
"仓库"
,
"仓库名称"
,
"站点"
,
"库存"
};
foreach
(
var
item
in
cols
)
{
table
.
Columns
.
Add
(
item
);
}
foreach
(
var
itemDataD
in
list
)
{
DataRow
row
=
table
.
NewRow
();
row
[
"SKU"
]
=
itemDataD
.
bailun_sku
;
row
[
"仓库"
]
=
itemDataD
.
warehouse_code
;
row
[
"仓库名称"
]
=
itemDataD
.
warehouse_name
;
row
[
"站点"
]
=
itemDataD
.
web_site
;
row
[
"库存"
]
=
itemDataD
.
stock
;
table
.
Rows
.
Add
(
row
);
}
var
fileName
=
AppContext
.
BaseDirectory
+
@"Result\RealtimeStock\第三方海外仓统计表明细.csv"
;
DataTableHelper
.
SaveCSV
(
table
,
fileName
);
var
memory
=
new
MemoryStream
();
using
(
var
stream
=
new
FileStream
(
fileName
,
FileMode
.
Open
))
{
stream
.
CopyTo
(
memory
);
}
memory
.
Position
=
0
;
return
File
(
memory
,
"text/csv"
,
"第三方海外仓统计表.csv"
);
}
[
BrowseLog
(
"Bailun_aims"
,
"访问【百伦自动周转系统】->【报表】->【第三方海外仓统计表】->【导出】"
,
0
)]
public
FileResult
ExportTableReportStockWeekView
(
DateTime
?
btime
,
DateTime
?
etime
)
{
report_stock_week_view_search_dto
search_data
=
new
report_stock_week_view_search_dto
...
...
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