Commit 302bb61d by huluobin

# 更新

parent 36292d5d
...@@ -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>
......
...@@ -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(
......
...@@ -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 {
} }
} }
} }
} }
......
...@@ -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 * * ?
......
...@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment