From bda4a97ee41aaac639220ebc030335f9d3342fdb Mon Sep 17 00:00:00 2001 From: ZengTao <2773468879@qq.com> Date: 星期五, 06 九月 2024 15:14:30 +0800 Subject: [PATCH] 添加线程异步执行 --- hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/job/DownLoadCacheGlassTask.java | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/job/DownLoadCacheGlassTask.java b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/job/DownLoadCacheGlassTask.java index d1fc2b2..95facd4 100644 --- a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/job/DownLoadCacheGlassTask.java +++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/job/DownLoadCacheGlassTask.java @@ -30,6 +30,7 @@ import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; +import org.springframework.scheduling.annotation.Async; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; @@ -80,6 +81,7 @@ @Scheduled(fixedDelay = 300) + @Async public void plcHomeEdgTask() { PlcParameterObject plcParameterObject = S7object.getinstance().PlcMesObject; String requestWord = plcParameterObject.getPlcParameter("requestWord").getValue(); @@ -129,6 +131,7 @@ } @Scheduled(fixedDelay = 300) + @Async public void plcShelfFull() { List<DownWorkstation> list = downGlassInfoService.queryWorkStationIsFull(); if (CollectionUtils.isNotEmpty(list)) { @@ -139,6 +142,7 @@ } @Scheduled(fixedDelay = 1000) + @Async public void dealDamageTask() { Date startDate = new Date(); log.info("涓嬬墖鐮存崯鐜荤拑娓呴櫎浠诲姟寮�濮嬫墽琛屾椂闂达細{}", startDate); @@ -183,6 +187,7 @@ * 鏇存柊宸茬粦瀹氬伐浣嶆祦绋嬪崱鐨勭牬鎹�/鎷胯蛋鐨勬暟閲忎俊鎭� */ @Scheduled(fixedDelay = 1000) + @Async public void updateWorkStationOtherCount() { Date startDate = new Date(); log.info("涓嬬墖鐮存洿鏂版崯鐜荤拑鏁伴噺浠诲姟寮�濮嬫墽琛屾椂闂达細{}", startDate); -- Gitblit v1.8.0