| | |
| | | PRIMARY KEY (id) USING BTREE, |
| | | UNIQUE KEY `uk_point_id` (`point_id`) USING BTREE |
| | | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT = '累计点表'; |
| | | INSERT INTO `iailab_expert_tenant_shasteel`.`t_da_sequence_num` (`id`, `code`, `name`, `sequence_num`, `prefix`) VALUES ('8', 'POINT_L', '累计点编码', 100001, 'L'); |
| | | INSERT INTO `iailab_plat_system`.`system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1657, 4, '累计点', 'CUMULATE', 'data_point_type', 0, '', '', '', '142', '2024-11-29 10:13:12', '142', '2024-11-29 10:13:12', b'0'); |
| | | INSERT INTO `t_da_sequence_num` (`id`, `code`, `name`, `sequence_num`, `prefix`) VALUES ('8', 'POINT_L', '累计点编码', 100001, 'L'); |
| | | INSERT INTO `iailab_plat_system`.`system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1673, 4, '累计点', 'CUMULATE', 'data_point_type', 0, '', '', '', '142', '2024-12-10 10:13:12', '142', '2024-12-10 10:13:12', b'0'); |
| | |
| | | |
| | | private static final String STA_TRUE = "true"; |
| | | |
| | | private static final int GROUP_MAX_COUNT = 90; |
| | | private static final int GROUP_MAX_COUNT = 300; |
| | | |
| | | private static final int MAX_WAIT = 30; |
| | | |
| | |
| | | for (Map.Entry<Integer, List<Object[]>> measurePointsItem : measurePointsCountGroup.entrySet()) { |
| | | HttpApiEntity httpApi = this.getHttpApi(measurePointsItem.getValue().get(0)[0].toString()); |
| | | // 并发 |
| | | Thread.sleep(200); |
| | | Thread.sleep(1000); |
| | | threadPool.submit(new Task(httpApi.getUrl(), httpApi.getCode(), result, measurePointsItem.getValue(), |
| | | collectTime, countDownLatch)); |
| | | // 顺序 |
| | |
| | | |
| | | //找出缺少项 |
| | | Map<Long, Double> sourceDataMap = new HashMap<>(dataList.size()); |
| | | for (ApiPointValueDTO pv : dataList) { |
| | | sourceDataMap.put(pv.getT().getTime(), pv.getV()); |
| | | } |
| | | |
| | | Map<Long, Double> dataMap = new LinkedHashMap<>(); |
| | | for (int i = 0; i < mins; i++) { |
| | | Long key = start + oneMin * i; |
| | |
| | | import com.iailab.module.data.influxdb.service.InfluxDBService; |
| | | import com.iailab.module.data.point.common.PointTypeEnum; |
| | | import com.iailab.module.data.point.dto.DaPointDTO; |
| | | import com.iailab.module.data.point.dto.DaPointSimpleDTO; |
| | | import com.iailab.module.data.point.service.DaPointService; |
| | | import com.iailab.module.data.point.vo.*; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | |
| | | } |
| | | |
| | | @PreAuthorize("@ss.hasPermission('data:point:query')") |
| | | @GetMapping("/simple-list") |
| | | @Operation(summary = "列表") |
| | | public CommonResult<List<DaPointSimpleDTO>> simpleList(@Valid @RequestParam Map<String, Object> params) { |
| | | List<DaPointDTO> list = daPointService.list(params); |
| | | return success(ConvertUtils.sourceToTarget(list, DaPointSimpleDTO.class)); |
| | | } |
| | | |
| | | @PreAuthorize("@ss.hasPermission('data:point:query')") |
| | | @GetMapping("/info/{id}") |
| | | public CommonResult<DaPointDTO> info(@PathVariable("id") String id) { |
| | | DaPointDTO info = daPointService.info(id); |
对比新文件 |
| | |
| | | package com.iailab.module.data.point.dto; |
| | | |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * @author PanZhibao |
| | | * @Description |
| | | * @createTime 2024年12月10日 |
| | | */ |
| | | @Data |
| | | @Tag(name = "测点") |
| | | public class DaPointSimpleDTO implements Serializable { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @Schema(description = "id") |
| | | private String id; |
| | | |
| | | @Schema(description = "测点编码", required = true) |
| | | private String pointNo; |
| | | |
| | | @Schema(description = "测点名称", required = true) |
| | | private String pointName; |
| | | |
| | | @Schema(description = "测点类型", required = true) |
| | | private String pointType; |
| | | } |
| | |
| | | |
| | | @Override |
| | | public DaPointDTO getSimpleInfoByNo(String no) { |
| | | QueryWrapper<DaPointEntity> queryWrapper = new QueryWrapper(); |
| | | queryWrapper.eq("pointNo", no); |
| | | QueryWrapper<DaPointEntity> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("point_no", no); |
| | | return ConvertUtils.sourceToTarget(daPointDao.selectOne(queryWrapper), DaPointDTO.class); |
| | | } |
| | | |
| | |
| | | is-enable-global: true # 启用全局翻译(拦截所有 SpringMVC ResponseBody 进行自动翻译 )。如果对于性能要求很高可关闭此配置,或通过 @IgnoreTrans 忽略某个接口 |
| | | is-enable-cloud: false # 禁用 TransType.RPC 微服务模式 |
| | | |
| | | --- #################### RPC 远程调用相关配置 #################### |
| | | |
| | | --- #################### 消息队列相关 #################### |
| | | |
| | | # rocketmq 配置项,对应 RocketMQProperties 配置类 |
| | | rocketmq: |
| | | # Producer 配置项 |
| | | producer: |
| | | group: ${spring.application.name}_PRODUCER # 生产者分组 |
| | | |
| | | spring: |
| | | rabbitmq: |
| | | host: 172.16.8.200 # RabbitMQ 服务的地址 |
| | | port: 5672 # RabbitMQ 服务的端口 |
| | | username: admin # RabbitMQ 服务的账号 |
| | | password: admin123 # RabbitMQ 服务的密码 |
| | | # Kafka 配置项,对应 KafkaProperties 配置类 |
| | | kafka: |
| | | # Kafka Producer 配置项 |
| | | producer: |
| | | acks: 1 # 0-不应答。1-leader 应答。all-所有 leader 和 follower 应答。 |
| | | retries: 3 # 发送失败时,重试发送的次数 |
| | | value-serializer: org.springframework.kafka.support.serializer.JsonSerializer # 消息的 value 的序列化 |
| | | # Kafka Consumer 配置项 |
| | | consumer: |
| | | auto-offset-reset: earliest # 设置消费者分组最初的消费进度为 earliest 。可参考博客 https://blog.csdn.net/lishuangzhe7047/article/details/74530417 理解 |
| | | value-deserializer: org.springframework.kafka.support.serializer.JsonDeserializer |
| | | properties: |
| | | spring.json.trusted.packages: '*' |
| | | # Kafka Consumer Listener 监听器配置 |
| | | listener: |
| | | missing-topics-fatal: false # 消费监听接口监听的主题不存在时,默认会报错。所以通过设置为 false ,解决报错 |
| | | |
| | | |
| | | --- #################### 平台相关配置 #################### |
| | | |
| | |
| | | package com.iailab.module.model.mcs.pre.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.iailab.framework.common.pojo.PageResult; |
| | | import com.iailab.framework.common.service.BaseService; |
| | | import com.iailab.module.model.api.mcs.dto.AlarmConfigRespDTO; |
| | |
| | | import com.iailab.framework.security.core.util.SecurityFrameworkUtils; |
| | | import com.iailab.module.model.api.mcs.dto.AlarmConfigRespDTO; |
| | | import com.iailab.module.model.mcs.pre.dao.MmPredictAlarmConfigDao; |
| | | import com.iailab.module.model.mcs.pre.entity.DmModuleEntity; |
| | | import com.iailab.module.model.mcs.pre.entity.MmPredictAlarmConfigEntity; |
| | | import com.iailab.module.model.mcs.pre.entity.MmPredictAlarmMessageEntity; |
| | | import com.iailab.module.model.mcs.pre.service.MmPredictAlarmConfigService; |
| | | import com.iailab.module.model.mcs.pre.vo.MmPredictAlarmConfigPageReqVO; |
| | | import com.iailab.module.model.mcs.pre.vo.MmPredictAlarmConfigRespVO; |
| | | import com.iailab.module.model.mcs.pre.vo.MmPredictAlarmConfigSaveReqVO; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.*; |