Merge remote-tracking branch 'origin/master'
| | |
| | | <artifactId>iailab-module-model-api</artifactId> |
| | | <version>${revision}</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.iailab</groupId> |
| | | <artifactId>iailab-module-data-api</artifactId> |
| | | <version>${revision}</version> |
| | | </dependency> |
| | | |
| | | <!-- 业务组件 --> |
| | | <dependency> |
| | |
| | | <dependency> |
| | | <groupId>com.iailab</groupId> |
| | | <artifactId>iailab-common-mq</artifactId> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>com.iailab</groupId> |
| | | <artifactId>iailab-module-model-api</artifactId> |
| | | </dependency> |
| | | |
| | | </dependencies> |
对比新文件 |
| | |
| | | package com.iailab.module.shasteel.config; |
| | | |
| | | import feign.Logger; |
| | | import feign.Request; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | |
| | | import java.util.concurrent.TimeUnit; |
| | | |
| | | @Configuration |
| | | public class FeignConfig { |
| | | |
| | | @Bean |
| | | Logger.Level feignLoggerLevel() { |
| | | return Logger.Level.FULL; |
| | | } |
| | | |
| | | @Bean |
| | | Request.Options options() { |
| | | return new Request.Options(10, TimeUnit.SECONDS,3,TimeUnit.MINUTES,true); // 连接超时10秒,读取超时3分钟 |
| | | } |
| | | } |
| | |
| | | package com.iailab.module.shasteel.framework.rpc.config; |
| | | |
| | | import com.iailab.module.data.api.point.DataPointApi; |
| | | import com.iailab.module.infra.api.config.ConfigApi; |
| | | import com.iailab.module.infra.api.db.DataSourceConfigServiceApi; |
| | | import com.iailab.module.infra.api.file.FileApi; |
| | |
| | | import org.springframework.context.annotation.Configuration; |
| | | |
| | | @Configuration(proxyBeanMethods = false) |
| | | @EnableFeignClients(clients = {FileApi.class, WebSocketSenderApi.class, DataSourceConfigServiceApi.class, ConfigApi.class, TenantApi.class, McsApi.class, MdkApi.class}) |
| | | @EnableFeignClients(clients = {FileApi.class, WebSocketSenderApi.class, DataSourceConfigServiceApi.class, ConfigApi.class, TenantApi.class, McsApi.class, MdkApi.class, DataPointApi.class}) |
| | | public class RpcConfiguration { |
| | | } |
对比新文件 |
| | |
| | | package com.iailab.module.shasteel.job.task; |
| | | |
| | | import com.iailab.module.data.api.point.DataPointApi; |
| | | import com.iailab.module.model.api.mdk.MdkApi; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.amqp.rabbit.core.RabbitTemplate; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * @description: LDG柜容预测 监听触发 |
| | | * points(当前时刻大于0,上一时刻为0)则触发 |
| | | * @author: dzd |
| | | * @date: 2025/2/13 16:22 |
| | | **/ |
| | | @Component("runLDGTankFactorPredTask") |
| | | public class RunLDGTankFactorPredTask implements ITask { |
| | | private Logger logger = LoggerFactory.getLogger(getClass()); |
| | | @Autowired |
| | | private DataPointApi dataPointApi; |
| | | @Autowired |
| | | private RunPredictModuleTask runPredictModuleTask; |
| | | |
| | | /** |
| | | * map<NetCode,[pointNos]> |
| | | **/ |
| | | private static final HashMap<String, List<String>> checkPoints = new HashMap<String, List<String>>(){{ |
| | | put("NET_LDG1", Arrays.asList("M0000100050","M0000100049","M0000100048")); |
| | | put("NET_LDG2", Arrays.asList("M0000100062","M0000100061","M0000100060")); |
| | | put("NET_LDG3", Arrays.asList("M0000100057","M0000100056","M0000100055")); |
| | | }}; |
| | | |
| | | private static HashMap<String,Double> pointsLastValue = new HashMap<>(); |
| | | |
| | | @Override |
| | | public void run(String params) { |
| | | logger.info("runLDGTankFactorPredTask定时任务正在执行,参数为:{}", params); |
| | | try { |
| | | for (Map.Entry<String, List<String>> entry : checkPoints.entrySet()) { |
| | | Map<String, Object> pointsRealValue = dataPointApi.queryPointsRealValue(entry.getValue()); |
| | | for (Map.Entry<String, Object> pointRealValue : pointsRealValue.entrySet()) { |
| | | String pointNo = pointRealValue.getKey(); |
| | | Double value = null == pointRealValue.getValue() ? null : Double.valueOf(pointRealValue.getValue().toString()); |
| | | //如果有旧值,且旧值为0,且新值不为null,且新值>0 触发模型 |
| | | if (null != pointsLastValue.get(pointNo) && pointsLastValue.get(pointNo).equals(0.0) && null != value && value.compareTo(0.0) > 0){ |
| | | runPredictModuleTask.run(entry.getKey()); |
| | | break; |
| | | } |
| | | } |
| | | |
| | | for (Map.Entry<String, Object> pointRealValue : pointsRealValue.entrySet()) { |
| | | Double value = null == pointRealValue.getValue() ? null : Double.valueOf(pointRealValue.getValue().toString()); |
| | | pointsLastValue.put(pointRealValue.getKey(),value); |
| | | } |
| | | |
| | | } |
| | | } catch (Exception ex) { |
| | | logger.error("runLDGTankFactorPredTask运行异常",ex); |
| | | } |
| | | logger.info("runLDGTankFactorPredTask运行完成"); |
| | | } |
| | | } |
| | |
| | | } |
| | | }); |
| | | } catch (Exception ex) { |
| | | logger.error("runPredictModuleTask运行异常"); |
| | | ex.printStackTrace(); |
| | | logger.error("runPredictModuleTask运行异常",ex); |
| | | } |
| | | logger.info("runPredictModuleTask运行完成"); |
| | | } |
| | |
| | | StringUtils.isNotEmpty(mdkScheduleRespDTO.getResult().get("pressureHWarning").toString())) { |
| | | String pressureHWarning = mdkScheduleRespDTO.getResult().get("pressureHWarning").toString(); |
| | | AlarmMessageRespDTO alarm = new AlarmMessageRespDTO(); |
| | | alarm.setTitle("压力高于上限预警"); |
| | | alarm.setTitle("空压机预警"); |
| | | alarm.setContent(pressureHWarning); |
| | | alarm.setAlarmObj(scheme.getScheduleObj()); |
| | | alarm.setAlarmType("高于上限"); |
| | |
| | | String runAdvice = entry.getValue().getResult().get("runAdvice").toString(); |
| | | String yingdiAdvice = entry.getValue().getResult().get("yingdiAdvice").toString(); |
| | | if(!yingdiAdvice.equals("压力正常")){ |
| | | saveScheduleSuggest("盈德中压建议调整量", yingdiAdvice, scheduleObj, scheduleTime); |
| | | saveScheduleSuggest("盈德中压调整建议", yingdiAdvice, scheduleObj, scheduleTime); |
| | | } |
| | | if(!faAdvice.equals("压力正常")){ |
| | | saveScheduleSuggest("法夜空建议调整量", faAdvice, scheduleObj, scheduleTime); |
| | | saveScheduleSuggest("法夜空调整建议", faAdvice, scheduleObj, scheduleTime); |
| | | } |
| | | if(!hongAdvice.equals("压力正常")){ |
| | | saveScheduleSuggest("宏昌建议调整量", hongAdvice, scheduleObj, scheduleTime); |
| | | saveScheduleSuggest("宏昌调整建议", hongAdvice, scheduleObj, scheduleTime); |
| | | } |
| | | if(!runAdvice.equals("压力正常")){ |
| | | saveScheduleSuggest("润忠建议调整量", runAdvice, scheduleObj, scheduleTime); |
| | | saveScheduleSuggest("润忠调整建议", runAdvice, scheduleObj, scheduleTime); |
| | | } |
| | | } else if (entry.getKey().equals(CODE01)) { |
| | | String scheduleObj = schemeMap.get(CODE01).getScheduleObj(); |
| | |
| | | com.iailab.module.fast.dal.mysql: debug |
| | | com.iailab.module.fast.dal.mysql.sensitiveword.SensitiveWordMapper: INFO # 配置 SensitiveWordMapper 的日志级别为 info |
| | | com.iailab.module.fast.dal.mysql.sms.SmsChannelMapper: INFO # 配置 SmsChannelMapper 的日志级别为 info |
| | | # feign接口日志等级 |
| | | com.iailab.module.model.api.mcs: debug |
| | | |
| | | --- #################### 接口文档配置 #################### |
| | | |