| src/main/java/com/zy/asrs/task/BareBoardScheduler.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/main/java/com/zy/asrs/task/OrderSyncScheduler.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/main/java/com/zy/common/config/ThreadPoolConfig.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/main/java/com/zy/asrs/task/BareBoardScheduler.java
@@ -9,6 +9,7 @@ import com.zy.system.entity.Config; import com.zy.system.service.ConfigService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.scheduling.annotation.Async; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; @@ -36,7 +37,8 @@ private WrkMastStaService wrkMastStaService; @Scheduled(cron = "0/10 * * * * ? ") private void execute(){//自动调空板出库 2楼码垛位置 @Async("orderThreadPool") public void execute(){//自动调空板出库 2楼码垛位置 Config config = configService.selectOne(new EntityWrapper<Config>().eq("code","bareBoard")); if (!Cools.isEmpty(config) && !Cools.isEmpty(config.getValue()) && config.getValue().equals("Y")){ BasDevp basDevp = basDevpService.selectById(213); @@ -47,7 +49,8 @@ } @Scheduled(cron = "0/3 * * * * ? ") private void executeOne(){//自动调空板出库 1楼码垛位置 @Async("orderThreadPool") public void executeOne(){//自动调空板出库 1楼码垛位置 Config config = configService.selectOne(new EntityWrapper<Config>().eq("code","bareBoard")); if (!Cools.isEmpty(config) && !Cools.isEmpty(config.getValue()) && config.getValue().equals("Y")){ boolean sign = true; src/main/java/com/zy/asrs/task/OrderSyncScheduler.java
@@ -50,7 +50,7 @@ } // @Scheduled(cron = "0/5 * * * * ? ") @Async("orderThreadPool") // @Async("orderThreadPool") public void completeAndReport(){ String erpReport = Parameter.get().getErpReport(); if (!Cools.isEmpty(erpReport) && erpReport.equals("true")) { @@ -70,6 +70,7 @@ } @Scheduled(cron = "0 0 * * * *") @Async("orderThreadPool") public void completeAndReport2(){ List<Order> orders = orderService.selectComplete(); for (Order order : orders) { src/main/java/com/zy/common/config/ThreadPoolConfig.java
@@ -24,7 +24,7 @@ //设置最大线程数 executor.setMaxPoolSize(core * 10 + core); //除核心线程外的线程存活时间 executor.setKeepAliveSeconds(3); executor.setKeepAliveSeconds(5); //缓冲队列 executor.setQueueCapacity(core); executor.setThreadNamePrefix("order-task-");