Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
TakeStock
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
pengjinyang
TakeStock
Commits
afbb0721
Commit
afbb0721
authored
Jan 06, 2020
by
pengjinyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
c69053ee
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
TakeStockService.cs
Service/TakeStock/TakeStockService.cs
+3
-2
appsettings.Development.json
TakeStock.API/appsettings.Development.json
+2
-2
No files found.
Service/TakeStock/TakeStockService.cs
View file @
afbb0721
...
@@ -71,12 +71,14 @@ namespace Service.TakeStock
...
@@ -71,12 +71,14 @@ namespace Service.TakeStock
[
DisplayName
(
"添加盘点作业, 盘点计划Id:{0}"
)]
[
DisplayName
(
"添加盘点作业, 盘点计划Id:{0}"
)]
public
async
Task
<
bool
>
ReTry
(
int
scheduleId
)
public
async
Task
<
bool
>
ReTry
(
int
scheduleId
)
{
{
var
orders
=
_orderRepository
.
GetAllList
(
o
=>
!
o
.
IsDeleted
&&
o
.
State
==
TSOrderState
.
创建
&&
o
.
ScheduleId
==
scheduleId
);
var
orders
=
_orderRepository
.
GetAllList
(
o
=>
!
o
.
IsDeleted
&&
o
.
State
!=
TSOrderState
.
取消
&&
o
.
State
!=
TSOrderState
.
完成
&&
o
.
ScheduleId
==
scheduleId
);
bool
isSuccess
=
false
;
bool
isSuccess
=
false
;
try
try
{
{
foreach
(
var
order
in
orders
)
foreach
(
var
order
in
orders
)
{
{
order
.
State
=
TSOrderState
.
创建
;
await
_orderRepository
.
UpdateAsync
(
order
,
"State"
,
"LastModificationTime"
);
BackgroundJob
.
Enqueue
(()
=>
FreezeStockAsync
(
order
.
Id
));
BackgroundJob
.
Enqueue
(()
=>
FreezeStockAsync
(
order
.
Id
));
}
}
isSuccess
=
true
;
isSuccess
=
true
;
...
@@ -84,7 +86,6 @@ namespace Service.TakeStock
...
@@ -84,7 +86,6 @@ namespace Service.TakeStock
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
{
isSuccess
=
false
;
isSuccess
=
false
;
BackgroundJob
.
Schedule
(()
=>
ReTry
(
scheduleId
),
DateTime
.
Now
.
AddMinutes
(
_delay
));
}
}
return
isSuccess
;
return
isSuccess
;
}
}
...
...
TakeStock.API/appsettings.Development.json
View file @
afbb0721
...
@@ -13,8 +13,8 @@
...
@@ -13,8 +13,8 @@
"ConnectionStrings"
:
{
"ConnectionStrings"
:
{
"Localhost"
:
"server=gz-cdb-hqmznu0w.sql.tencentcdb.com;port=63523;database=bailun_wms;uid=root;password=#7kfnymAM$Y9-Ntf;Convert Zero Datetime=True;"
,
"Localhost"
:
"server=gz-cdb-hqmznu0w.sql.tencentcdb.com;port=63523;database=bailun_wms;uid=root;password=#7kfnymAM$Y9-Ntf;Convert Zero Datetime=True;"
,
"RabbitMqConnection"
:
"host=111.230.164.154:5672;username=bailun;password=1234abcd;prefetchcount=2;publisherConfirms=true;timeout=10"
,
"RabbitMqConnection"
:
"host=111.230.164.154:5672;username=bailun;password=1234abcd;prefetchcount=2;publisherConfirms=true;timeout=10"
,
"Redis"
:
"127.0.0.1,connectRetry=2"
//
"Redis"
:
"127.0.0.1,connectRetry=2"
//
"Redis"
:
"129.204.97.78,password=BLT.redis&2019,connectRetry=2"
"Redis"
:
"129.204.97.78,password=BLT.redis&2019,connectRetry=2"
},
},
"App"
:
{
"App"
:
{
"CorsOrigins"
:
"*"
"CorsOrigins"
:
"*"
...
...
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