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
4aaa8ec0
Commit
4aaa8ec0
authored
Aug 01, 2019
by
pengjinyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
d92f5a82
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
7 deletions
+18
-7
ITakeStockService.cs
IService/TakeStock/ITakeStockService.cs
+1
-1
TakeStockService.cs
Service/TakeStock/TakeStockService.cs
+12
-2
TakeStockController.cs
TakeStock.API/Controllers/TakeStockController.cs
+1
-1
appsettings.json
TakeStock.API/appsettings.json
+3
-2
TakeStockAppService.cs
TakeStock.Application/TakeStock/TakeStockAppService.cs
+1
-1
No files found.
IService/TakeStock/ITakeStockService.cs
View file @
4aaa8ec0
...
...
@@ -51,7 +51,7 @@ namespace IService.TakeStock
List
<
TakeStockOrderLog
>
SearchOrderLogs
(
Expression
<
Func
<
TakeStockOrderLog
,
bool
>>
expr
);
Task
PushTakeStockMsg
(
int
id
);
//
Task PushTakeStockMsg(int id);
///// <summary>
///// 冻结库存
...
...
Service/TakeStock/TakeStockService.cs
View file @
4aaa8ec0
...
...
@@ -296,7 +296,11 @@ namespace Service.TakeStock
}
if
(
isSuccess
)
{
BackgroundJob
.
Enqueue
(()
=>
CheckComplete
(
order
.
ScheduleId
));
if
(
order
.
State
==
TSOrderState
.
完成
)
PushTakeStockMsg
(
order
);
}
else
BackgroundJob
.
Schedule
(()
=>
SyncAndEnabledAsync
(
id
),
DateTimeOffset
.
UtcNow
.
AddMinutes
(
_delay
));
...
...
@@ -325,9 +329,11 @@ namespace Service.TakeStock
}
}
public
async
Task
PushTakeStockMsg
(
int
id
)
public
async
Task
PushTakeStockMsg
(
TakeStockOrder
order
)
{
//var order = _orderRepository.Get(id);
string
message
=
JsonConvert
.
SerializeObject
(
new
{
Code
=
order
.
Code
,
WarehouseCode
=
order
.
WarehouseCode
,
Sku
=
order
.
Sku
,
Quantity
=
order
.
AfterQuantity
??
0
});
_bus
.
Send
(
"skuputin_queue"
,
message
);
//TakeStockMessage msg = new TakeStockMessage
//{
// Code = order.Code,
...
...
@@ -458,7 +464,11 @@ namespace Service.TakeStock
}
if
(
isSuccess
)
{
BackgroundJob
.
Enqueue
(()
=>
Audit
(
order
.
ScheduleId
));
if
(
order
.
State
==
TSOrderState
.
完成
)
PushTakeStockMsg
(
order
);
}
else
BackgroundJob
.
Schedule
(()
=>
ModifAndEnabledAsync
(
id
),
DateTimeOffset
.
UtcNow
.
AddMinutes
(
_delay
));
...
...
TakeStock.API/Controllers/TakeStockController.cs
View file @
4aaa8ec0
...
...
@@ -27,7 +27,7 @@ namespace TakeStock.API.Controllers
[
HttpGet
]
public
IEnumerable
<
string
>
Get
()
{
takeStockAppService
.
PushTakeStockMsg
();
//
takeStockAppService.PushTakeStockMsg();
return
new
string
[]
{
"value1"
,
"value2"
};
}
...
...
TakeStock.API/appsettings.json
View file @
4aaa8ec0
...
...
@@ -14,10 +14,11 @@
},
"ConnectionStrings"
:
{
"Localhost"
:
"server=10.0.8.14;database=bailun_wms;uid=root;pwd=#7kfnymAM$Y9-Ntf;port=3306;Convert Zero Datetime=True;"
,
//
"Redis"
:
"127.0.0.1"
"Redis"
:
"common-redis"
,
//
"Redis"
:
"129.204.97.78"
,
"RabbitMqConnection"
:
"host=owms-rabbitmq:5672;username=bailun;password=1234abcd;prefetchcount=2;publisherConfirms=true;timeout=10"
//
"Localhost"
:
"server=gz-cdb-hqmznu0w.sql.tencentcdb.com;port=63523;database=bailun_wms;uid=root;password=#7kfnymAM$Y9-Ntf;Convert Zero Datetime=True;"
,
//
"Redis"
:
"129.204.97.78"
,
//
"RabbitMqConnection"
:
"host=111.230.164.154:5672;username=bailun;password=1234abcd;prefetchcount=2;publisherConfirms=true;timeout=10"
},
"App"
:
{
"CorsOrigins"
:
"*"
...
...
TakeStock.Application/TakeStock/TakeStockAppService.cs
View file @
4aaa8ec0
...
...
@@ -172,7 +172,7 @@ namespace TakeStock.Application.TakeStock
public
async
Task
PushTakeStockMsg
()
{
await
takeStockService
.
PushTakeStockMsg
(
0
);
//await takeStockService.PushTakeStockMsg(10
0);
}
}
}
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