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
f79769d2
Commit
f79769d2
authored
Jul 16, 2019
by
pengjinyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
f9cea12d
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
12 additions
and
6 deletions
+12
-6
TakeStockOrder.cs
Domain/TakeStock/TakeStockOrder.cs
+1
-1
CreateTakeStockConsumer.cs
Service/TakeStock/CreateTakeStockConsumer.cs
+2
-2
TakeStockService.cs
Service/TakeStock/TakeStockService.cs
+1
-1
Dockerfile
TakeStock.API/Dockerfile
+3
-0
Dockerfile
TakeStock.Subscriber/Dockerfile
+3
-0
Program.cs
TakeStock.Subscriber/Program.cs
+2
-2
No files found.
Domain/TakeStock/TakeStockOrder.cs
View file @
f79769d2
...
...
@@ -12,7 +12,7 @@ namespace Domain.TakeStock
public
TakeStockOrder
()
{
this
.
Code
=
"TSO"
+
DateTime
.
Now
.
ToString
(
"yyMMddHHmmssfff"
);
this
.
CreationTime
=
DateTime
.
UtcNow
.
AddHours
(
8
)
;
this
.
CreationTime
=
DateTime
.
Now
;
}
[
SugarColumn
(
IsPrimaryKey
=
true
,
IsIdentity
=
true
)]
...
...
Service/TakeStock/CreateTakeStockConsumer.cs
View file @
f79769d2
...
...
@@ -25,7 +25,7 @@ namespace Service.TakeStock
WarehouseCode
=
message
.
WarehouseCode
,
IsAutomation
=
true
,
Description
=
"库存不足发起的系统自动盘点。"
,
CreationTime
=
DateTime
.
UtcNow
.
AddHours
(
8
)
CreationTime
=
DateTime
.
Now
};
List
<
TakeStockOrder
>
orders
=
new
List
<
TakeStockOrder
>()
...
...
@@ -33,7 +33,7 @@ namespace Service.TakeStock
new
TakeStockOrder
{
Sku
=
message
.
Sku
,
CreationTime
=
DateTime
.
UtcNow
.
AddHours
(
8
)
CreationTime
=
DateTime
.
Now
}
};
await
_takeStockService
.
CreateTakeStockOrderAsync
(
schedule
,
orders
);
...
...
Service/TakeStock/TakeStockService.cs
View file @
f79769d2
...
...
@@ -52,7 +52,7 @@ namespace Service.TakeStock
string
[]
skus
=
orders
.
Select
(
o
=>
o
.
Sku
).
ToArray
();
if
(
schedule
.
IsAutomation
)
{
int
count
=
_orderRepository
.
Count
(
o
=>
o
.
WarehouseCode
.
Equals
(
schedule
.
WarehouseCode
)
&&
skus
.
Contains
(
o
.
Sku
)
&&
o
.
State
!=
TSOrderState
.
取消
&&
o
.
CreationTime
<
DateTime
.
UtcNow
.
AddHours
(
8
)
.
AddDays
(
2
));
int
count
=
_orderRepository
.
Count
(
o
=>
o
.
WarehouseCode
.
Equals
(
schedule
.
WarehouseCode
)
&&
skus
.
Contains
(
o
.
Sku
)
&&
o
.
State
!=
TSOrderState
.
取消
&&
o
.
CreationTime
<
DateTime
.
Now
.
AddDays
(
2
));
if
(
count
>
0
)
return
false
;
}
...
...
TakeStock.API/Dockerfile
View file @
f79769d2
...
...
@@ -2,6 +2,9 @@ FROM microsoft/dotnet:2.2-aspnetcore-runtime AS base
WORKDIR
/app
EXPOSE
5002
RUN
/bin/cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
\
&&
echo
'Asia/Shanghai'
>
/etc/timezone
FROM
microsoft/dotnet:2.2-sdk AS build
WORKDIR
/src
COPY
["TakeStock.API/TakeStock.API.csproj", "TakeStock.API/"]
...
...
TakeStock.Subscriber/Dockerfile
View file @
f79769d2
FROM
microsoft/dotnet:2.2-runtime AS base
WORKDIR
/app
RUN
/bin/cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
\
&&
echo
'Asia/Shanghai'
>
/etc/timezone
FROM
microsoft/dotnet:2.2-sdk AS build
WORKDIR
/src
COPY
TakeStock.Subscriber/TakeStock.Subscriber.csproj TakeStock.Subscriber/
...
...
TakeStock.Subscriber/Program.cs
View file @
f79769d2
...
...
@@ -84,14 +84,14 @@ namespace TakeStock.Subscriber
WarehouseCode
=
message
.
WarehouseCode
,
IsAutomation
=
true
,
Description
=
"库存不足发起的系统自动盘点。"
,
CreationTime
=
DateTime
.
UtcNow
.
AddHours
(
8
)
,
CreationTime
=
DateTime
.
Now
,
Orders
=
new
List
<
dynamic
>()
{
new
{
WarehouseCode
=
message
.
WarehouseCode
,
Sku
=
message
.
Sku
,
//CreationTime =
DateTime.UtcNow.AddHours(8)
//CreationTime =
TSOrderState
}
}
};
...
...
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