From d2c0bccd2e6dde4cf2a614a67bbf0ed45e2bcbaf Mon Sep 17 00:00:00 2001 From: whycq <913841844@qq.com> Date: 星期五, 29 十一月 2024 13:59:22 +0800 Subject: [PATCH] # 213 --- src/main/java/com/zy/asrs/task/StaEscalationScheduler.java | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/src/main/java/com/zy/asrs/task/StaEscalationScheduler.java b/src/main/java/com/zy/asrs/task/StaEscalationScheduler.java index f9f4c0b..1d3dff4 100644 --- a/src/main/java/com/zy/asrs/task/StaEscalationScheduler.java +++ b/src/main/java/com/zy/asrs/task/StaEscalationScheduler.java @@ -1,7 +1,9 @@ package com.zy.asrs.task; +import com.zy.asrs.domain.enums.LedErrorAreaType; import com.zy.asrs.task.core.ReturnT; import com.zy.asrs.task.handler.StaEscalationHandler; +import com.zy.asrs.utils.LedErrorThreadUtil; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.scheduling.annotation.Scheduled; @@ -28,9 +30,26 @@ break; } }catch (Exception e){ + LedErrorThreadUtil.ledErrorThread("2妤肩炕杞�掓枡涓婃姤erp澶辫触!绔欑偣鍙凤細"+staNo,4, LedErrorAreaType.ONE_OTHER.getDesc()); log.error("绔欑偣"+staNo+"2妤肩炕杞�掓枡淇℃伅涓婁紶澶勭悊澶辫触锛屽紓甯镐俊鎭細"+e); } } } + @Scheduled(cron = "0/3 * * * * ? ") + private void executeOverturn(){//2妤肩炕杞�掓枡鍚庡洖搴撴爣璁版竻闄� + int[] staNos =new int[]{126,131,310,312}; + for (int staNo : staNos){ + try{ + ReturnT<String> result = staEscalationHandler.start2(staNo); + if (result.getCode()==200){ + break; + } + }catch (Exception e){ + LedErrorThreadUtil.ledErrorThread("2妤肩炕杞�掓枡鍚庡洖搴撴爣璁版竻闄ゅけ璐�!绔欑偣鍙凤細"+staNo,4, LedErrorAreaType.ONE_OTHER.getDesc()); + log.error("绔欑偣"+staNo+"2妤肩炕杞�掓枡鍚庡洖搴撴爣璁版竻闄ゅけ璐ワ紝寮傚父淇℃伅锛�"+e); + } + } + } + } -- Gitblit v1.9.1