Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dc-java
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
huluobin
dc-java
Commits
302bb61d
Commit
302bb61d
authored
Feb 03, 2021
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
# 更新
parent
36292d5d
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
30 additions
and
8 deletions
+30
-8
pom.xml
data-base/pom.xml
+1
-1
Application.java
...uto-turnover/src/main/java/com/bailuntec/Application.java
+14
-0
AutoTurnoverJob.java
...over/src/main/java/com/bailuntec/job/AutoTurnoverJob.java
+10
-5
job.properties
...show/show-auto-turnover/src/main/resources/job.properties
+3
-0
AutoTurnoverTest.java
...ow/show-auto-turnover/src/test/java/AutoTurnoverTest.java
+2
-2
No files found.
data-base/pom.xml
View file @
302bb61d
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
<!--deprecate-->
<!--deprecate-->
<!-- <module>base-sync-purchase-details</module>-->
<!-- <module>base-sync-purchase-details</module>-->
<!-- <module>base-sync-finance-fee</module>-->
<!-- <module>base-sync-finance-fee</module>-->
<
!-- <module>base-sync-amazon-ad</module>--
>
<
module>
base-sync-amazon-ad
</module
>
<!-- <module>base-sync-cashier</module>-->
<!-- <module>base-sync-cashier</module>-->
<!-- <module>base-sync-company</module>-->
<!-- <module>base-sync-company</module>-->
</modules>
</modules>
...
...
data-show/show-auto-turnover/src/main/java/com/bailuntec/Application.java
View file @
302bb61d
...
@@ -45,6 +45,8 @@ public class Application {
...
@@ -45,6 +45,8 @@ public class Application {
new
JobScheduler
(
createRegistryCenter
(),
new
JobScheduler
(
createRegistryCenter
(),
createJobConfigurationNeNormal
()).
init
();
createJobConfigurationNeNormal
()).
init
();
new
JobScheduler
(
createRegistryCenter
(),
createJobConfigurationWeek
()).
init
();
}
}
...
@@ -88,6 +90,18 @@ public class Application {
...
@@ -88,6 +90,18 @@ public class Application {
return
LiteJobConfiguration
.
newBuilder
(
simpleJobConfig
).
build
();
return
LiteJobConfiguration
.
newBuilder
(
simpleJobConfig
).
build
();
}
}
private
static
LiteJobConfiguration
createJobConfigurationWeek
()
{
JobCoreConfiguration
simpleCoreConfig
=
JobCoreConfiguration
.
newBuilder
(
propertiesUtil
.
getPropertyAsString
(
"JOB_NAME_WEEK"
),
propertiesUtil
.
getPropertyAsString
(
"JOB_WEEK_CRON"
),
propertiesUtil
.
getPropertyAsInt
(
"SHARDING_TOTAL_COUNT"
))
.
jobParameter
(
"NORMAL"
)
.
build
();
SimpleJobConfiguration
simpleJobConfig
=
new
SimpleJobConfiguration
(
simpleCoreConfig
,
AutoTurnoverJob
.
class
.
getCanonicalName
());
return
LiteJobConfiguration
.
newBuilder
(
simpleJobConfig
).
build
();
}
private
static
LiteJobConfiguration
createJobConfigurationNeNormal
()
{
private
static
LiteJobConfiguration
createJobConfigurationNeNormal
()
{
JobCoreConfiguration
simpleCoreConfig
=
JobCoreConfiguration
.
newBuilder
(
JobCoreConfiguration
simpleCoreConfig
=
JobCoreConfiguration
.
newBuilder
(
...
...
data-show/show-auto-turnover/src/main/java/com/bailuntec/job/AutoTurnoverJob.java
View file @
302bb61d
...
@@ -103,7 +103,6 @@ public class AutoTurnoverJob extends PointJob {
...
@@ -103,7 +103,6 @@ public class AutoTurnoverJob extends PointJob {
if
(
dcBaseStockList
!=
null
&&
dcBaseStockList
.
size
()
>
0
)
{
if
(
dcBaseStockList
!=
null
&&
dcBaseStockList
.
size
()
>
0
)
{
int
finalPage1
=
page
;
int
finalPage1
=
page
;
dcBaseStockList
dcBaseStockList
.
stream
()
.
stream
()
...
@@ -1207,13 +1206,18 @@ public class AutoTurnoverJob extends PointJob {
...
@@ -1207,13 +1206,18 @@ public class AutoTurnoverJob extends PointJob {
}
finally
{
}
finally
{
SessionUtil
.
closeSession
();
SessionUtil
.
closeSession
();
}
}
//
if
(
dcBasePurchaseList
!=
null
&&
dcBasePurchaseList
.
size
()
>
0
)
{
if
(
dcBasePurchaseList
!=
null
&&
dcBasePurchaseList
.
size
()
>
0
)
{
for
(
DcBasePurchase
dcBasePurchase
:
dcBasePurchaseList
)
{
for
(
DcBasePurchase
dcBasePurchase
:
dcBasePurchaseList
)
{
if
(
dcBasePurchase
.
getCount
()
>
0
)
{
if
(
dcBasePurchase
.
getCount
()
>
0
)
{
LocalDateTime
finalEstimatedArrivalTime
;
LocalDateTime
finalEstimatedArrivalTime
;
if
(
dcBasePurchase
.
getHasTransfer
()
==
1
)
{
//调拨采购单
//调拨采购单
if
(
dcBasePurchase
.
getHasTransfer
()
==
1
)
{
finalEstimatedArrivalTime
=
dcBasePurchase
.
getEstimatedArrivalTime
().
plusDays
(
dcAutoTurnover
.
getInspectionDelivery
()).
plusDays
(
dcAutoTurnover
.
getTransferBaleDelivery
()).
plusDays
(
dcAutoTurnover
.
getTransferDelivery
()).
plusDays
(
dcAutoTurnover
.
getAbroadInboundDelivery
());
finalEstimatedArrivalTime
=
dcBasePurchase
.
getEstimatedArrivalTime
().
plusDays
(
dcAutoTurnover
.
getInspectionDelivery
()).
plusDays
(
dcAutoTurnover
.
getTransferBaleDelivery
()).
plusDays
(
dcAutoTurnover
.
getTransferDelivery
()).
plusDays
(
dcAutoTurnover
.
getAbroadInboundDelivery
());
}
else
{
//普通采购单
}
//普通采购单
else
{
finalEstimatedArrivalTime
=
dcBasePurchase
.
getEstimatedArrivalTime
().
plusDays
(
dcAutoTurnover
.
getInspectionDelivery
());
finalEstimatedArrivalTime
=
dcBasePurchase
.
getEstimatedArrivalTime
().
plusDays
(
dcAutoTurnover
.
getInspectionDelivery
());
}
}
int
interval
=
Period
.
between
(
recordTime
,
finalEstimatedArrivalTime
.
toLocalDate
()).
getDays
();
int
interval
=
Period
.
between
(
recordTime
,
finalEstimatedArrivalTime
.
toLocalDate
()).
getDays
();
...
@@ -1225,6 +1229,8 @@ public class AutoTurnoverJob extends PointJob {
...
@@ -1225,6 +1229,8 @@ public class AutoTurnoverJob extends PointJob {
}
}
}
}
}
}
//拿调拨单流水
//拿调拨单流水
if
(
transfer
>
0
)
{
if
(
transfer
>
0
)
{
List
<
DcBaseTransferVerify
>
dcBaseTransferVerifyList
;
List
<
DcBaseTransferVerify
>
dcBaseTransferVerifyList
;
...
@@ -1249,7 +1255,6 @@ public class AutoTurnoverJob extends PointJob {
...
@@ -1249,7 +1255,6 @@ public class AutoTurnoverJob extends PointJob {
}
}
int
interval
=
Period
.
between
(
recordTime
,
finalEstimatedArrivalTime
.
toLocalDate
()).
getDays
();
int
interval
=
Period
.
between
(
recordTime
,
finalEstimatedArrivalTime
.
toLocalDate
()).
getDays
();
int
index
=
Math
.
max
(
interval
,
0
);
int
index
=
Math
.
max
(
interval
,
0
);
forecastInboundRelationList
.
set
(
index
,
forecastInboundRelationList
.
get
(
index
).
equals
(
Constant
.
NAN_STRING
)
?
Constant
.
TRANSFER_SIGN
+
dcBaseTransferVerify
.
getTransferOrderId
()
+
"_"
+
dcBaseTransferVerify
.
getCount
()
:
forecastInboundRelationList
.
get
(
index
)
+
"*"
+
Constant
.
TRANSFER_SIGN
+
dcBaseTransferVerify
.
getTransferOrderId
()
+
"_"
+
dcBaseTransferVerify
.
getCount
());
//todo fba的调拨在途,切换读我做的一个新表(表结构构建中)
//todo fba的调拨在途,切换读我做的一个新表(表结构构建中)
try
{
try
{
...
@@ -1259,6 +1264,7 @@ public class AutoTurnoverJob extends PointJob {
...
@@ -1259,6 +1264,7 @@ public class AutoTurnoverJob extends PointJob {
.
andWarehouseCodeEqualTo
(
dcAutoTurnover
.
getWarehouseCode
())
.
andWarehouseCodeEqualTo
(
dcAutoTurnover
.
getWarehouseCode
())
.
example
());
.
example
());
if
(!
dcBaseWarehouse
.
getSystemFlag
().
toUpperCase
().
equals
(
PlatformType
.
FBA
.
value
()))
{
if
(!
dcBaseWarehouse
.
getSystemFlag
().
toUpperCase
().
equals
(
PlatformType
.
FBA
.
value
()))
{
forecastInboundRelationList
.
set
(
index
,
forecastInboundRelationList
.
get
(
index
).
equals
(
Constant
.
NAN_STRING
)
?
Constant
.
TRANSFER_SIGN
+
dcBaseTransferVerify
.
getTransferOrderId
()
+
"_"
+
dcBaseTransferVerify
.
getCount
()
:
forecastInboundRelationList
.
get
(
index
)
+
"*"
+
Constant
.
TRANSFER_SIGN
+
dcBaseTransferVerify
.
getTransferOrderId
()
+
"_"
+
dcBaseTransferVerify
.
getCount
());
forecastTransferInboundList
.
set
(
index
,
forecastTransferInboundList
.
get
(
index
)
+
dcBaseTransferVerify
.
getCount
());
forecastTransferInboundList
.
set
(
index
,
forecastTransferInboundList
.
get
(
index
)
+
dcBaseTransferVerify
.
getCount
());
forecastInboundList
.
set
(
index
,
forecastPurchaseInboundList
.
get
(
index
)
+
forecastTransferInboundList
.
get
(
index
));
forecastInboundList
.
set
(
index
,
forecastPurchaseInboundList
.
get
(
index
)
+
forecastTransferInboundList
.
get
(
index
));
}
}
...
@@ -1270,7 +1276,6 @@ public class AutoTurnoverJob extends PointJob {
...
@@ -1270,7 +1276,6 @@ public class AutoTurnoverJob extends PointJob {
}
}
}
}
}
}
}
}
...
...
data-show/show-auto-turnover/src/main/resources/job.properties
View file @
302bb61d
...
@@ -10,6 +10,9 @@ EVENT_RDB_STORAGE_PASSWORD=#7kfnymAM$Y9-Ntf
...
@@ -10,6 +10,9 @@ EVENT_RDB_STORAGE_PASSWORD=#7kfnymAM$Y9-Ntf
ZOOKEEPER_SERVER=172.31.255.120:2181
ZOOKEEPER_SERVER=172.31.255.120:2181
NAME_SPACE
=
data-center
NAME_SPACE
=
data-center
#JOB_NAME_WEEK=show-auto-turnover-week
#JOB_NAME_WEEK=0 0 10 ? * MON
JOB_NAME
=
show-auto-turnover51
JOB_NAME
=
show-auto-turnover51
JOB_CRON
=
0 0 3 * * ?
JOB_CRON
=
0 0 3 * * ?
#JOB_CRON=0 50 18 * * ?
#JOB_CRON=0 50 18 * * ?
...
...
data-show/show-auto-turnover/src/test/java/AutoTurnoverTest.java
View file @
302bb61d
...
@@ -258,8 +258,8 @@ public class AutoTurnoverTest {
...
@@ -258,8 +258,8 @@ public class AutoTurnoverTest {
public
void
testXX2
()
{
public
void
testXX2
()
{
DcBaseStock
dcBaseStock
=
SessionUtil
.
getSession
().
getMapper
(
DcBaseStockMapper
.
class
)
DcBaseStock
dcBaseStock
=
SessionUtil
.
getSession
().
getMapper
(
DcBaseStockMapper
.
class
)
.
selectOneByExample
(
DcBaseStockExample
.
newAndCreateCriteria
()
.
selectOneByExample
(
DcBaseStockExample
.
newAndCreateCriteria
()
.
andBailunSkuEqualTo
(
"
N-CAG5609
"
)
.
andBailunSkuEqualTo
(
"
949057404
"
)
.
andWarehouseCodeEqualTo
(
"
GZBLWH
"
)
.
andWarehouseCodeEqualTo
(
"
FMUSFBA
"
)
.
example
());
.
example
());
try
{
try
{
AutoTurnoverJob
autoTurnoverJob
=
new
AutoTurnoverJob
();
AutoTurnoverJob
autoTurnoverJob
=
new
AutoTurnoverJob
();
...
...
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