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
8e171ad1
Commit
8e171ad1
authored
Mar 23, 2021
by
泽锋 李
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增当前页导出
parent
3dbed57b
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
10 deletions
+18
-10
dc_auto_turnover.cs
AutoTurnOver.Models/dc_auto_turnover.cs
+5
-0
SkuAutoTurnServices.cs
AutoTurnOver.Services/SkuAutoTurnServices.cs
+8
-6
TaskDownloadServices.cs
AutoTurnOver.Services/TaskDownloadServices.cs
+2
-2
SkuAutoTurnController.cs
AutoTurnOver/Controllers/SkuAutoTurnController.cs
+3
-2
No files found.
AutoTurnOver.Models/dc_auto_turnover.cs
View file @
8e171ad1
...
@@ -587,6 +587,11 @@ namespace AutoTurnOver.Models
...
@@ -587,6 +587,11 @@ namespace AutoTurnOver.Models
public
decimal
history_thirtyday_sales_walmart
{
get
;
set
;
}
public
decimal
history_thirtyday_sales_walmart
{
get
;
set
;
}
}
}
public
class
ana_search_dto
:
Condition_AutoTurnOver
{
public
int
page
{
get
;
set
;
}
public
int
rows
{
get
;
set
;
}
}
public
class
Condition_AutoTurnOver
public
class
Condition_AutoTurnOver
{
{
...
...
AutoTurnOver.Services/SkuAutoTurnServices.cs
View file @
8e171ad1
...
@@ -719,7 +719,7 @@ namespace AutoTurnOver.Services
...
@@ -719,7 +719,7 @@ namespace AutoTurnOver.Services
}
}
public
string
ProfitAnalysisExport
(
Condition_AutoTurnOver
m
,
out
int
orows
)
public
string
ProfitAnalysisExport
(
ana_search_dto
m
,
out
int
orows
)
{
{
try
try
{
{
...
@@ -727,15 +727,19 @@ namespace AutoTurnOver.Services
...
@@ -727,15 +727,19 @@ namespace AutoTurnOver.Services
var
fileName
=
AppContext
.
BaseDirectory
+
$@"周转利润分析-
{
DateTime
.
Now
.
ToString
(
"yyyyMMddHHmmss"
)}{
Guid
.
NewGuid
()}
.csv"
;
var
fileName
=
AppContext
.
BaseDirectory
+
$@"周转利润分析-
{
DateTime
.
Now
.
ToString
(
"yyyyMMddHHmmss"
)}{
Guid
.
NewGuid
()}
.csv"
;
int
page
=
1
;
int
page
=
1
;
int
rows
=
100000
;
int
rows
=
100000
;
orows
=
0
;
while
(
true
)
if
(
m
.
page
>
0
)
{
{
page
=
m
.
page
;
rows
=
m
.
rows
;
}
orows
=
0
;
int
total
=
0
;
int
total
=
0
;
var
offset
=
(
page
-
1
)
*
rows
;
var
offset
=
(
page
-
1
)
*
rows
;
var
limit
=
rows
;
var
limit
=
rows
;
var
list
=
ProfitAnalysis
(
m
,
offset
,
limit
,
ref
total
,
""
,
""
);
var
list
=
ProfitAnalysis
(
m
,
offset
,
limit
,
ref
total
,
""
,
""
);
orows
+=
list
.
Count
();
orows
+=
list
.
Count
();
if
(
list
==
null
||
list
.
Count
<=
0
)
break
;
DataTable
table
=
new
DataTable
();
DataTable
table
=
new
DataTable
();
string
[]
cols
=
new
string
[]
{
"sku"
,
"产品名称"
,
"商品编码"
,
"国家"
,
"仓库类型"
,
"仓库"
,
"默认调拨方式"
,
"180天日均"
,
"90天日均"
,
"30天日均"
,
"7天日均"
,
"加权日均销量"
,
"预测日均销量"
,
"采购单价"
,
"单位重量"
,
"实际建议周转数"
,
string
[]
cols
=
new
string
[]
{
"sku"
,
"产品名称"
,
"商品编码"
,
"国家"
,
"仓库类型"
,
"仓库"
,
"默认调拨方式"
,
"180天日均"
,
"90天日均"
,
"30天日均"
,
"7天日均"
,
"加权日均销量"
,
"预测日均销量"
,
"采购单价"
,
"单位重量"
,
"实际建议周转数"
,
...
@@ -808,8 +812,6 @@ namespace AutoTurnOver.Services
...
@@ -808,8 +812,6 @@ namespace AutoTurnOver.Services
}
}
CsvFileHelper
.
SaveCSV
(
table
,
fileName
,
page
==
1
);
CsvFileHelper
.
SaveCSV
(
table
,
fileName
,
page
==
1
);
page
++;
}
...
...
AutoTurnOver.Services/TaskDownloadServices.cs
View file @
8e171ad1
...
@@ -154,10 +154,10 @@ namespace AutoTurnOver.Services
...
@@ -154,10 +154,10 @@ namespace AutoTurnOver.Services
public
async
Task
<
string
>
DownloadProfitAnalysis
(
string
par_json
,
dc_task_download
download_data
)
public
async
Task
<
string
>
DownloadProfitAnalysis
(
string
par_json
,
dc_task_download
download_data
)
{
{
Condition_AutoTurnOver
search_data
=
par_json
.
ToObject
<
Condition_AutoTurnOver
>();
ana_search_dto
search_data
=
par_json
.
ToObject
<
ana_search_dto
>();
Console
.
WriteLine
(
"DownloadStock - 开始生成文件"
);
Console
.
WriteLine
(
"DownloadStock - 开始生成文件"
);
var
rows
=
0
;
var
rows
=
0
;
var
memory
=
new
SkuAutoTurnServices
().
ProfitAnalysisExport
(
search_data
,
out
rows
);
var
memory
=
new
SkuAutoTurnServices
().
ProfitAnalysisExport
(
search_data
,
out
rows
);
download_data
.
rows
=
rows
;
download_data
.
rows
=
rows
;
Console
.
WriteLine
(
"DownloadStock - 开始生成上传文件"
);
Console
.
WriteLine
(
"DownloadStock - 开始生成上传文件"
);
var
fileData
=
await
AutoTurnOver
.
Utility
.
QiNiuCloudHelper
.
UploadSectioningAsync
(
memory
);
var
fileData
=
await
AutoTurnOver
.
Utility
.
QiNiuCloudHelper
.
UploadSectioningAsync
(
memory
);
...
...
AutoTurnOver/Controllers/SkuAutoTurnController.cs
View file @
8e171ad1
...
@@ -105,12 +105,12 @@ namespace AutoTurnOver.Controllers
...
@@ -105,12 +105,12 @@ namespace AutoTurnOver.Controllers
return
new
JsonResult
(
list
==
null
||
list
.
Count
<=
0
?
new
dc_report_profit_analysis_dto
()
:
list
[
0
]);
return
new
JsonResult
(
list
==
null
||
list
.
Count
<=
0
?
new
dc_report_profit_analysis_dto
()
:
list
[
0
]);
}
}
public
JsonResult
ExportProfitAnalysis
([
FromQuery
]
dc_base_stock
_search_dto
search_data
)
public
JsonResult
ExportProfitAnalysis
([
FromQuery
]
ana
_search_dto
search_data
)
{
{
try
try
{
{
var
user
=
AutoUtility
.
GetUser
();
var
user
=
AutoUtility
.
GetUser
();
dc_task_download_dao
.
PushData
<
dc_base_stock
_search_dto
>(
new
dc_task_download
dc_task_download_dao
.
PushData
<
ana
_search_dto
>(
new
dc_task_download
{
{
parameter
=
search_data
.
ToJson
(),
parameter
=
search_data
.
ToJson
(),
task_name
=
"利润最大化分析"
task_name
=
"利润最大化分析"
...
@@ -124,6 +124,7 @@ namespace AutoTurnOver.Controllers
...
@@ -124,6 +124,7 @@ namespace AutoTurnOver.Controllers
}
}
[
HttpGet
]
[
HttpGet
]
[
BrowseLog
(
"Bailun_aims"
,
"触发【百伦自动周转系统】->【自动周转列表】->【空运海运利润计算】->【搜索】页面"
,
0
)]
[
BrowseLog
(
"Bailun_aims"
,
"触发【百伦自动周转系统】->【自动周转列表】->【空运海运利润计算】->【搜索】页面"
,
0
)]
public
JsonResult
TransferProfitList
(
string
bailun_sku
,
string
warehouse_code
)
public
JsonResult
TransferProfitList
(
string
bailun_sku
,
string
warehouse_code
)
...
...
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