src/main/java/com/zy/asrs/controller/AgvMapController.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/zy/common/config/ScheduleConfig.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/resources/application-loc.yml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/resources/application.yml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/main/java/com/zy/asrs/controller/AgvMapController.java
@@ -32,6 +32,8 @@ @Autowired private RedisUtil redisUtil; private Integer max = 10000; private static final List<String> DISABLE_LOC_NO = new ArrayList<String>() {{ // add("0200101"); // add("0300101"); @@ -100,6 +102,7 @@ return JSONObject.toJSONString(arrayLists); } private Integer generateMap1Bay(int bay){ int y = bay; Integer[] bayAdd = {1,3,5,7,9,11,13,15,17,19}; @@ -171,6 +174,24 @@ return y; } public static void main(String[] args) { AgvMapController a = new AgvMapController(); System.out.println(a.generateMap4Row(4)); System.out.println(a.process(1)); } private List<Integer> process(int start) { List<Integer> l = new ArrayList<>(); while (start <= max) { l.add(start); start = start + 2; } return l; } @RequestMapping("/map/searchData/auth") @ManagerAuth public R searchLoc(@RequestParam("lev") Integer lev, src/main/java/com/zy/common/config/ScheduleConfig.java
@@ -5,16 +5,19 @@ import org.springframework.scheduling.annotation.SchedulingConfigurer; import org.springframework.scheduling.config.ScheduledTaskRegistrar; import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.ScheduledThreadPoolExecutor; import java.util.concurrent.*; @Configuration public class ScheduleConfig implements SchedulingConfigurer { @Override public void configureTasks(ScheduledTaskRegistrar taskRegistrar) { //taskRegistrar.setScheduler(Executors.newScheduledThreadPool(12)); taskRegistrar.setScheduler(Executors.newFixedThreadPool(12)); //采用定长的线程池,防止定时任务异常时导致大量线程被占用; // 创建一个 ScheduledThreadPoolExecutor,核心线程数为 12,最大线程数为 24 ScheduledThreadPoolExecutor executor = new ScheduledThreadPoolExecutor(12, new ThreadPoolExecutor.CallerRunsPolicy()); // 设置最大线程数为 24 executor.setMaximumPoolSize(24); taskRegistrar.setScheduler(executor); } } src/main/resources/application-loc.yml
@@ -72,17 +72,18 @@ password: Wlzh44338 agv: # url: localhost:8080 # taskCreatePath: /agv/task/create # containerMoveInPath: /agv/container/moveIn # containerMoveOutPath: /agv/container/moveOut # containerArrivedPath: /agv/containerArrived url: 192.168.103.12:8182 taskCreatePath: /rcms/services/rest/hikRpcService/genAgvSchedulingTask url: localhost:8080 taskCreatePath: /agv/task/create taskCancelPath: /rcms/services/rest/hikRpcService/cancelTask containerMoveInPath: /expand/api/moveIn/container containerMoveOutPath: /expand/api/moveOut/container containerArrivedPath: /conveyor/containerArrived containerMoveInPath: /agv/container/moveIn containerMoveOutPath: /agv/container/moveOut containerArrivedPath: /agv/containerArrived # url: 192.168.103.12:8182 # taskCreatePath: /rcms/services/rest/hikRpcService/genAgvSchedulingTask # taskCancelPath: /rcms/services/rest/hikRpcService/cancelTask # containerMoveInPath: /expand/api/moveIn/container # containerMoveOutPath: /expand/api/moveOut/container # containerArrivedPath: /conveyor/containerArrived u8: report: false @@ -92,7 +93,7 @@ # url: http://39.184.149.30:8877 # orderReportPath: /DBMS/U8/CM/add mes: report: true report: false url: https://v3-ali.blacklake.cn/api/openapi/domain/web/v1/route orderReportPath: /inventory/open/v2/transfer_order/ordinary/_execute pakinReportPath: /inventory/open/v2/inbound_order/execute/_inbound src/main/resources/application.yml
@@ -1,4 +1,4 @@ spring: profiles: #dev loc prod active: prod active: loc