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
37764839
Commit
37764839
authored
Jun 20, 2019
by
lizefeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化实时库存导出
parent
34305167
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
8 deletions
+19
-8
dc_auto_turnover.cs
AutoTurnOver.DB/dc_auto_turnover.cs
+1
-1
purchase_advise.cs
AutoTurnOver.DB/purchase_advise.cs
+2
-2
AutoUtility.cs
AutoTurnOver/Common/AutoUtility.cs
+1
-1
DailyController.cs
AutoTurnOver/Controllers/DailyController.cs
+15
-4
No files found.
AutoTurnOver.DB/dc_auto_turnover.cs
View file @
37764839
...
...
@@ -239,7 +239,7 @@ left join dc_base_tort as t8 on dat.bailun_sku = t8.bailun_sku
return
obj
.
AsList
();
}
catch
(
Exception
ex
)
catch
(
Exception
)
{
throw
;
...
...
AutoTurnOver.DB/purchase_advise.cs
View file @
37764839
...
...
@@ -584,9 +584,9 @@ and EXISTS (
return
obj
.
AsList
();
}
catch
(
Exception
ex
)
catch
(
Exception
)
{
return
list
;
throw
;
}
}
...
...
AutoTurnOver/Common/AutoUtility.cs
View file @
37764839
...
...
@@ -42,7 +42,7 @@ namespace AutoTurnOver.Common
return
data
.
data
;
}
}
catch
(
Exception
ex
)
catch
(
Exception
)
{
current
.
Response
.
StatusCode
=
(
int
)
HttpStatusCode
.
Unauthorized
;
return
null
;
...
...
AutoTurnOver/Controllers/DailyController.cs
View file @
37764839
...
...
@@ -117,9 +117,18 @@ namespace AutoTurnOver.Controllers
/// <returns></returns>
public
FileResult
ExportRealtime
(
string
sku
,
string
bailun_sku
,
string
warehousecode
,
string
product_inner_code
,
string
sku_title_cn
,
string
supplier_name
,
string
warehousetype
,
int
?
warehousearea
,
int
?
has_tort
=
null
)
{
var
user
=
AutoUtility
.
GetUser
();
var
services
=
new
DailyServices
();
var
total
=
0
;
var
list
=
services
.
RealtimeList
(
sku
,
bailun_sku
,
warehousecode
,
product_inner_code
,
sku_title_cn
,
supplier_name
,
0
,
int
.
MaxValue
,
ref
total
,
warehousetype
,
warehousearea
,
has_tort
:
has_tort
);
var
fileName
=
AppContext
.
BaseDirectory
+
$@"Result\RealtimeStock\
{
user
.
UserAccount
}
实时库存.csv"
;
int
page
=
1
;
int
rows
=
10000
;
while
(
true
)
{
var
list
=
services
.
RealtimeList
(
sku
,
bailun_sku
,
warehousecode
,
product_inner_code
,
sku_title_cn
,
supplier_name
,
(
page
-
1
)*
rows
,
rows
,
ref
total
,
warehousetype
,
warehousearea
,
has_tort
:
has_tort
);
if
(
list
==
null
||
list
.
Count
<=
0
)
break
;
DataTable
table
=
new
DataTable
();
string
[]
cols
=
new
string
[]
{
"Sku"
,
"采购名称"
,
"中文名"
,
"英文名称"
,
"内部编码"
,
"仓库编码"
,
"仓库名称"
,
"货主编码"
,
"实时采购在途"
,
"实时调拨在途"
...
...
@@ -191,9 +200,11 @@ namespace AutoTurnOver.Controllers
table
.
Rows
.
Add
(
row
);
}
var
fileName
=
AppContext
.
BaseDirectory
+
@"Result\RealtimeStock\实时库存.csv"
;
CsvFileHelper
.
SaveCSV
(
table
,
fileName
,
page
==
1
);
page
++;
}
DataTableHelper
.
SaveCSV
(
table
,
fileName
);
var
memory
=
new
MemoryStream
();
using
(
var
stream
=
new
FileStream
(
fileName
,
FileMode
.
Open
))
...
...
@@ -201,7 +212,7 @@ namespace AutoTurnOver.Controllers
stream
.
CopyTo
(
memory
);
}
memory
.
Position
=
0
;
return
File
(
memory
,
"text/csv"
,
"
实时库存.csv"
);
return
File
(
memory
,
"text/csv"
,
$"
{
user
.
UserAccount
}
实时库存.csv"
);
}
/// <summary>
...
...
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