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
2ce6b9c6
Commit
2ce6b9c6
authored
Dec 22, 2020
by
泽锋 李
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增离线下载页面
parent
aa648c14
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
75 additions
and
0 deletions
+75
-0
daily.cs
AutoTurnOver.DB/daily.cs
+38
-0
DailyServices.cs
AutoTurnOver.Services/DailyServices.cs
+5
-0
DailyController.cs
AutoTurnOver/Controllers/DailyController.cs
+32
-0
No files found.
AutoTurnOver.DB/daily.cs
View file @
2ce6b9c6
...
@@ -669,6 +669,44 @@ where 1=1 ";
...
@@ -669,6 +669,44 @@ where 1=1 ";
return
obj
.
AsList
();
return
obj
.
AsList
();
}
}
public
static
List
<
dc_task_download
>
TaskDownloadList
(
string
user_name
,
string
task_name
,
int
offset
,
int
limit
,
ref
int
total
,
DateTime
?
start_date
,
DateTime
?
end_date
)
{
var
sql
=
@"select t1.* from dc_task_download as t1
where 1=1 "
;
var
countSql
=
" select count(1) from dc_task_download as t1 where 1=1 "
;
DynamicParameters
parameters
=
new
DynamicParameters
();
if
(
start_date
!=
null
)
{
sql
+=
" and t1.create_date>=@btime "
;
countSql
+=
" and t1.create_date>=@btime "
;
parameters
.
Add
(
"btime"
,
start_date
);
}
if
(
end_date
!=
null
)
{
sql
+=
" and t1.create_date<=@etime "
;
countSql
+=
" and t1.create_date<=@etime "
;
parameters
.
Add
(
"etime"
,
end_date
);
}
if
(!
string
.
IsNullOrWhiteSpace
(
user_name
))
{
sql
+=
" and t1.create_user like @user_name "
;
countSql
+=
" and t1.create_user like @user_names "
;
parameters
.
Add
(
"user_name"
,
$"%
{
user_name
}
%"
);
}
if
(!
string
.
IsNullOrWhiteSpace
(
task_name
))
{
sql
+=
" and t1.task_name like @task_name "
;
countSql
+=
" and t1.task_name like @task_name "
;
parameters
.
Add
(
"task_name"
,
$"%
{
task_name
}
%"
);
}
sql
+=
" order by t1.id desc "
;
total
=
_connection
.
QueryFirst
<
int
>(
countSql
,
parameters
,
commandTimeout
:
0
);
sql
+=
" limit "
+
offset
+
","
+
limit
;
var
obj
=
_connection
.
Query
<
dc_task_download
>(
sql
,
parameters
,
buffered
:
false
,
commandTimeout
:
0
);
return
obj
.
AsList
();
}
public
static
string
MapField
(
string
sort
)
public
static
string
MapField
(
string
sort
)
{
{
sort
=
sort
.
Replace
(
"-"
,
""
);
sort
=
sort
.
Replace
(
"-"
,
""
);
...
...
AutoTurnOver.Services/DailyServices.cs
View file @
2ce6b9c6
...
@@ -53,6 +53,11 @@ namespace AutoTurnOver.Services
...
@@ -53,6 +53,11 @@ namespace AutoTurnOver.Services
{
{
return
DB
.
daily
.
ShortagePushList
(
platform
,
bailun_sku
,
offset
,
limit
,
ref
total
,
start_date
,
end_date
,
warehousecode
,
warehousetype
,
warehousearea
);
return
DB
.
daily
.
ShortagePushList
(
platform
,
bailun_sku
,
offset
,
limit
,
ref
total
,
start_date
,
end_date
,
warehousecode
,
warehousetype
,
warehousearea
);
}
}
public
List
<
dc_task_download
>
TaskDownloadList
(
string
user_name
,
string
task_name
,
int
offset
,
int
limit
,
ref
int
total
,
DateTime
?
start_date
,
DateTime
?
end_date
)
{
return
DB
.
daily
.
TaskDownloadList
(
user_name
,
task_name
,
offset
,
limit
,
ref
total
,
start_date
,
end_date
);
}
public
MemoryStream
ExportShortagePush
(
string
platform
,
string
bailun_sku
,
DateTime
?
start_date
,
DateTime
?
end_date
,
UserData
user
,
string
warehousecode
,
string
warehousetype
,
int
?
warehousearea
)
public
MemoryStream
ExportShortagePush
(
string
platform
,
string
bailun_sku
,
DateTime
?
start_date
,
DateTime
?
end_date
,
UserData
user
,
string
warehousecode
,
string
warehousetype
,
int
?
warehousearea
)
{
{
...
...
AutoTurnOver/Controllers/DailyController.cs
View file @
2ce6b9c6
...
@@ -133,6 +133,38 @@ namespace AutoTurnOver.Controllers
...
@@ -133,6 +133,38 @@ namespace AutoTurnOver.Controllers
});
});
}
}
}
}
/// <summary>
/// 缺货推送记录
/// </summary>
/// <param name="platform"></param>
/// <param name="bailun_sku"></param>
/// <param name="offset"></param>
/// <param name="limit"></param>
/// <param name="total"></param>
/// <returns></returns>
[
BrowseLog
(
"Bailun_aims"
,
"访问【百伦自动周转系统】->【离线下载】->【搜索】页面"
,
0
)]
public
JsonResult
TaskDownloadList
(
string
user_name
,
string
task_name
,
int
offset
,
int
limit
,
DateTime
?
start_date
,
DateTime
?
end_date
)
{
try
{
var
services
=
new
DailyServices
();
var
total
=
0
;
var
list
=
services
.
TaskDownloadList
(
user_name
,
task_name
,
offset
,
limit
,
ref
total
,
start_date
,
end_date
);
return
new
JsonResult
(
new
{
rows
=
list
,
total
=
total
,
});
}
catch
(
Exception
ex
)
{
return
new
JsonResult
(
new
{
message
=
ex
.
Message
,
stack_trace
=
ex
.
StackTrace
});
}
}
public
FileResult
ExportShortagePush
(
string
platform
,
string
bailun_sku
,
DateTime
?
end_date
,
DateTime
?
start_date
,
string
warehousecode
,
string
warehousetype
,
int
?
warehousearea
)
public
FileResult
ExportShortagePush
(
string
platform
,
string
bailun_sku
,
DateTime
?
end_date
,
DateTime
?
start_date
,
string
warehousecode
,
string
warehousetype
,
int
?
warehousearea
)
{
{
...
...
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