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
996e432f
Commit
996e432f
authored
Jul 18, 2020
by
泽锋 李
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
回货记录,加一个仓库筛选
parent
fa9835a7
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
10 deletions
+29
-10
daily.cs
AutoTurnOver.DB/daily.cs
+21
-2
DailyServices.cs
AutoTurnOver.Services/DailyServices.cs
+4
-4
DailyController.cs
AutoTurnOver/Controllers/DailyController.cs
+4
-4
No files found.
AutoTurnOver.DB/daily.cs
View file @
996e432f
...
...
@@ -542,15 +542,34 @@ left join dc_base_warehouse as dbw on t1.warehouse_code = dbw.warehouse_code
/// 缺货推送记录
/// </summary>
/// <returns></returns>
public
static
List
<
dc_auto_shortage_push_route_dto
>
ShortagePushList
(
string
platform
,
string
bailun_sku
,
int
offset
,
int
limit
,
ref
int
total
,
DateTime
?
start_date
,
DateTime
?
end_date
)
public
static
List
<
dc_auto_shortage_push_route_dto
>
ShortagePushList
(
string
platform
,
string
bailun_sku
,
int
offset
,
int
limit
,
ref
int
total
,
DateTime
?
start_date
,
DateTime
?
end_date
,
string
warehousecode
,
string
warehousetype
,
int
?
warehousearea
)
{
var
sql
=
@"select t1.id, t1.platform, t1.bailun_sku,t3.warehouse_name, t1.warehouse_code, t1.push_date,t2.push_time from dc_auto_shortage_push as t1
left join dc_return_goods_push as t2 on t1.id =t2.shortage_push_id
left join dc_base_warehouse as t3 on t1.warehouse_code = t3.warehouse_code
where 1=1 "
;
var
countSql
=
" select count(1) from dc_auto_shortage_push as t1 where 1=1 "
;
var
countSql
=
" select count(1) from dc_auto_shortage_push as t1
left join dc_base_warehouse as t3 on t1.warehouse_code = t3.warehouse_code
where 1=1 "
;
DynamicParameters
parameters
=
new
DynamicParameters
();
if
(!
string
.
IsNullOrWhiteSpace
(
warehousecode
))
{
sql
+=
" and t1.warehouse_code=@warehouse_code "
;
countSql
+=
" and t1.warehouse_code=@warehouse_code "
;
parameters
.
Add
(
"warehouse_code"
,
warehousecode
);
}
if
(!
string
.
IsNullOrWhiteSpace
(
warehousetype
))
{
sql
+=
" and t3.hq_type = @hq_type "
;
countSql
+=
" and t3.hq_type = @hq_type "
;
parameters
.
Add
(
"hq_type"
,
warehousetype
);
}
if
(
warehousearea
>
0
)
{
sql
+=
" and t3.area_id = @area_id "
;
countSql
+=
" and t3.area_id = @area_id "
;
parameters
.
Add
(
"area_id"
,
warehousearea
);
}
if
(
start_date
!=
null
)
{
sql
+=
" and t1.push_date>=@btime "
;
...
...
AutoTurnOver.Services/DailyServices.cs
View file @
996e432f
...
...
@@ -50,12 +50,12 @@ namespace AutoTurnOver.Services
return
DB
.
daily
.
RealtimeList
(
monitor_status
,
searchType
,
key_words
,
warehouse_code
,
supplier_name
,
offset
,
limit
,
ref
total
,
warehousetype
,
warehousearea
,
isSum
,
order
,
sort
,
has_tort
:
has_tort
,
categoryModels
:
categoryModels
,
buyer_name
:
buyer_name
,
start_date
:
start_date
,
end_date
:
end_date
,
f_start_date
:
f_start_date
,
f_end_date
:
f_end_date
,
product_type
:
product_type
);
}
public
List
<
dc_auto_shortage_push_route_dto
>
ShortagePushList
(
string
platform
,
string
bailun_sku
,
int
offset
,
int
limit
,
ref
int
total
,
DateTime
?
start_date
,
DateTime
?
end_date
)
public
List
<
dc_auto_shortage_push_route_dto
>
ShortagePushList
(
string
platform
,
string
bailun_sku
,
int
offset
,
int
limit
,
ref
int
total
,
DateTime
?
start_date
,
DateTime
?
end_date
,
string
warehousecode
,
string
warehousetype
,
int
?
warehousearea
)
{
return
DB
.
daily
.
ShortagePushList
(
platform
,
bailun_sku
,
offset
,
limit
,
ref
total
,
start_date
,
end_date
);
return
DB
.
daily
.
ShortagePushList
(
platform
,
bailun_sku
,
offset
,
limit
,
ref
total
,
start_date
,
end_date
,
warehousecode
,
warehousetype
,
warehousearea
);
}
public
MemoryStream
ExportShortagePush
(
string
platform
,
string
bailun_sku
,
DateTime
?
start_date
,
DateTime
?
end_date
,
UserData
user
)
public
MemoryStream
ExportShortagePush
(
string
platform
,
string
bailun_sku
,
DateTime
?
start_date
,
DateTime
?
end_date
,
UserData
user
,
string
warehousecode
,
string
warehousetype
,
int
?
warehousearea
)
{
try
{
...
...
@@ -66,7 +66,7 @@ namespace AutoTurnOver.Services
while
(
true
)
{
int
total
=
0
;
var
list
=
ShortagePushList
(
platform
,
bailun_sku
,
page
,
rows
,
ref
total
,
start_date
,
end_date
);
var
list
=
ShortagePushList
(
platform
,
bailun_sku
,
page
,
rows
,
ref
total
,
start_date
,
end_date
,
warehousecode
,
warehousetype
,
warehousearea
);
if
(
list
==
null
||
list
.
Count
<=
0
)
break
;
...
...
AutoTurnOver/Controllers/DailyController.cs
View file @
996e432f
...
...
@@ -108,13 +108,13 @@ namespace AutoTurnOver.Controllers
/// <param name="limit"></param>
/// <param name="total"></param>
/// <returns></returns>
public
JsonResult
ShortagePushList
(
string
platform
,
string
bailun_sku
,
int
offset
,
int
limit
,
DateTime
?
end_date
,
DateTime
?
start_date
)
public
JsonResult
ShortagePushList
(
string
platform
,
string
bailun_sku
,
int
offset
,
int
limit
,
DateTime
?
end_date
,
DateTime
?
start_date
,
string
warehousecode
,
string
warehousetype
,
int
?
warehousearea
)
{
try
{
var
services
=
new
DailyServices
();
var
total
=
0
;
var
list
=
services
.
ShortagePushList
(
platform
,
bailun_sku
,
offset
,
limit
,
ref
total
,
start_date
,
end_date
);
var
list
=
services
.
ShortagePushList
(
platform
,
bailun_sku
,
offset
,
limit
,
ref
total
,
start_date
,
end_date
,
warehousecode
,
warehousetype
,
warehousearea
);
return
new
JsonResult
(
new
{
rows
=
list
,
...
...
@@ -131,10 +131,10 @@ namespace AutoTurnOver.Controllers
}
}
public
FileResult
ExportShortagePush
(
string
platform
,
string
bailun_sku
,
DateTime
?
end_date
,
DateTime
?
start_date
)
public
FileResult
ExportShortagePush
(
string
platform
,
string
bailun_sku
,
DateTime
?
end_date
,
DateTime
?
start_date
,
string
warehousecode
,
string
warehousetype
,
int
?
warehousearea
)
{
var
user
=
AutoUtility
.
GetUser
();
var
memory
=
new
DailyServices
().
ExportShortagePush
(
platform
,
bailun_sku
,
start_date
,
end_date
,
AutoUtility
.
GetUser
());
var
memory
=
new
DailyServices
().
ExportShortagePush
(
platform
,
bailun_sku
,
start_date
,
end_date
,
AutoUtility
.
GetUser
()
,
warehousecode
,
warehousetype
,
warehousearea
);
return
File
(
memory
,
"text/csv"
,
$"
{
user
.
UserAccount
}
修改在线数量日志.csv"
);
}
...
...
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