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
55c81992
Commit
55c81992
authored
Jul 10, 2019
by
lizefeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
在线缺货改零,改成5分钟推一次
parent
7304518a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
13 deletions
+5
-13
dc_auto_turnover.cs
AutoTurnOver.DB/dc_auto_turnover.cs
+0
-2
ShortagePushBackgroundService.cs
ShortagePush/ShortagePushBackgroundService.cs
+5
-11
No files found.
AutoTurnOver.DB/dc_auto_turnover.cs
View file @
55c81992
...
...
@@ -186,8 +186,6 @@ left join dc_base_tort as t8 on dat.bailun_sku = t8.bailun_sku
sql
+=
" and t3.area_id="
+
m
.
warehousearea
;
sqlCount
+=
" and t3.area_id="
+
m
.
warehousearea
;
}
if
(!
string
.
IsNullOrEmpty
(
m
.
warehouse_code
))
{
sql
+=
" and dat.warehouse_code='"
+
m
.
warehouse_code
+
"'"
;
...
...
ShortagePush/ShortagePushBackgroundService.cs
View file @
55c81992
...
...
@@ -14,7 +14,7 @@ namespace ShortagePush
protected
override
Task
ExecuteAsync
(
CancellationToken
stoppingToken
)
{
_timer
=
new
Timer
(
DoWork
,
null
,
TimeSpan
.
Zero
,
TimeSpan
.
FromMinutes
(
1
));
_timer
=
new
Timer
(
DoWork
,
null
,
TimeSpan
.
Zero
,
TimeSpan
.
FromMinutes
(
5
));
return
Task
.
CompletedTask
;
}
...
...
@@ -22,16 +22,10 @@ namespace ShortagePush
{
try
{
var
now
=
DateTime
.
Now
;
// 判断是不是指定的时间
if
(
now
.
Hour
==
15
&&
now
.
Minute
==
1
)
{
Console
.
WriteLine
(
$"开始推送缺货数据任务,线程Id:
{
Thread
.
CurrentThread
.
ManagedThreadId
}
,
{
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)}
"
);
new
ReportServices
().
ShortagePush
();
new
ReportServices
().
ReturnGoodsPush
();
Console
.
WriteLine
(
$"结束推送缺货数据任务,线程Id:
{
Thread
.
CurrentThread
.
ManagedThreadId
}
,
{
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)}
"
);
}
Console
.
WriteLine
(
$"开始推送缺货数据任务,线程Id:
{
Thread
.
CurrentThread
.
ManagedThreadId
}
,
{
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)}
"
);
new
ReportServices
().
ShortagePush
();
new
ReportServices
().
ReturnGoodsPush
();
Console
.
WriteLine
(
$"结束推送缺货数据任务,线程Id:
{
Thread
.
CurrentThread
.
ManagedThreadId
}
,
{
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)}
"
);
}
catch
(
Exception
ex
)
{
...
...
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