| | |
| | | <module>ycl-platform</module> |
| | | <module>ycl-common</module> |
| | | <module>ycl-generator</module> |
| | | <module>ycl-smoke</module> |
| | | </modules> |
| | | |
| | | <dependencies> |
| | |
| | | <artifactId>spring-cloud-starter-openfeign</artifactId> |
| | | <version>3.1.3</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>commons-logging</groupId> |
| | | <artifactId>commons-logging</artifactId> |
| | | <version>1.2</version> |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | </project> |
| | |
| | | // 全局配置 |
| | | GlobalConfig gc = new GlobalConfig(); |
| | | final String projectPath = System.getProperty("user.dir"); |
| | | gc.setOutputDir(projectPath + "/ycl-generator/src/main/java"); |
| | | gc.setOutputDir(projectPath + "/ycl-smoke/src/main/java"); |
| | | gc.setAuthor("lyq");//作者 |
| | | gc.setBaseResultMap(true); //mapper.xml 生成 ResultMap |
| | | gc.setBaseColumnList(true); //mapper.xml 生成 ColumnList |
| | |
| | | // 自定义输出文件名 , 如果你 Entity 设置了前后缀、此处注意 xml 的名称会跟着发生变化!! |
| | | // return projectPath + "/coinyee-contract-generator/src/main/resources/mapper/" + pc.getModuleName() |
| | | // + "/" + tableInfo.getEntityName() + "Mapper" + StringPool.DOT_XML; |
| | | return projectPath + "/ycl-generator/src/main/resources/mapper/" |
| | | return projectPath + "/ycl-smoke/src/main/resources/mapper/" |
| | | + packageName + "/" + tableInfo.getEntityName() + "Mapper" + StringPool.DOT_XML; |
| | | } |
| | | }); |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| | | xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> |
| | | <modelVersion>4.0.0</modelVersion> |
| | | <parent> |
| | | <groupId>com.ycl</groupId> |
| | | <artifactId>ycl-server</artifactId> |
| | | <version>1.0.0</version> |
| | | </parent> |
| | | |
| | | <groupId>com.ycl</groupId> |
| | | <artifactId>ycl-smoke</artifactId> |
| | | <version>1.0.0</version> |
| | | <name>ycl-smoke</name> |
| | | <description>后端模块</description> |
| | | |
| | | <properties> |
| | | <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
| | | </properties> |
| | | |
| | | |
| | | <dependencies> |
| | | <dependency> |
| | | <groupId>com.ycl</groupId> |
| | | <artifactId>ycl-common</artifactId> |
| | | <version>1.0.0</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-starter-test</artifactId> |
| | | <scope>test</scope> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.ycl</groupId> |
| | | <artifactId>ycl-generator</artifactId> |
| | | <version>1.0.0</version> |
| | | <scope>compile</scope> |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | <build> |
| | | <finalName>ycl-smoke</finalName> |
| | | <plugins> |
| | | <plugin> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-maven-plugin</artifactId> |
| | | </plugin> |
| | | </plugins> |
| | | </build> |
| | | |
| | | </project> |
New file |
| | |
| | | package com.ycl.smoke; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.mybatis.spring.annotation.MapperScan; |
| | | import org.springframework.boot.SpringApplication; |
| | | import org.springframework.boot.autoconfigure.SpringBootApplication; |
| | | import org.springframework.cloud.openfeign.EnableFeignClients; |
| | | import org.springframework.context.ConfigurableApplicationContext; |
| | | import org.springframework.context.annotation.ComponentScan; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import org.springframework.context.annotation.EnableAspectJAutoProxy; |
| | | import org.springframework.core.env.Environment; |
| | | import org.springframework.scheduling.annotation.EnableAsync; |
| | | import org.springframework.scheduling.annotation.EnableScheduling; |
| | | import org.springframework.transaction.annotation.EnableTransactionManagement; |
| | | |
| | | import java.net.InetAddress; |
| | | import java.net.UnknownHostException; |
| | | |
| | | @Slf4j |
| | | @Configuration |
| | | @EnableAspectJAutoProxy(proxyTargetClass = true, exposeProxy = true) |
| | | @EnableAsync(proxyTargetClass = true) |
| | | @EnableScheduling |
| | | @EnableFeignClients |
| | | @EnableTransactionManagement(proxyTargetClass = true) |
| | | @SpringBootApplication |
| | | @ComponentScan("com.ycl") |
| | | @MapperScan("com.ycl.smoke.mapper") |
| | | public class SmokeApplication { |
| | | |
| | | public static void main(String[] args) throws UnknownHostException { |
| | | ConfigurableApplicationContext application = SpringApplication.run(SmokeApplication.class, args); |
| | | |
| | | Environment env = application.getEnvironment(); |
| | | log.info("\n----------------------------------------------------------\n\t" + |
| | | "应用 '{}' 运行成功! 访问连接:\n\t" + |
| | | "Swagger文档: \t\thttp://{}:{}{}/doc.html\n\t" + |
| | | "数据库监控: \t\thttp://{}:{}/druid\n" + |
| | | "----------------------------------------------------------", |
| | | env.getProperty("spring.application.name"), |
| | | InetAddress.getLocalHost().getHostAddress(), |
| | | env.getProperty("server.port"), |
| | | env.getProperty("server.servlet.context-path"), |
| | | "127.0.0.1", |
| | | env.getProperty("server.port")); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.ycl.smoke.config; |
| | | |
| | | import com.ycl.component.*; |
| | | import com.ycl.config.IgnoreUrlsConfig; |
| | | import com.ycl.utils.JwtTokenUtil; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; |
| | | import org.springframework.security.crypto.password.PasswordEncoder; |
| | | |
| | | /** |
| | | * SpringSecurity通用配置 |
| | | * 包括通用Bean、Security通用Bean及动态权限通用Bean |
| | | */ |
| | | @Configuration |
| | | public class CommonSecurityConfig { |
| | | |
| | | @Bean |
| | | public PasswordEncoder passwordEncoder() { |
| | | return new BCryptPasswordEncoder(); |
| | | } |
| | | |
| | | @Bean |
| | | public IgnoreUrlsConfig ignoreUrlsConfig() { |
| | | return new IgnoreUrlsConfig(); |
| | | } |
| | | |
| | | @Bean |
| | | public JwtTokenUtil jwtTokenUtil() { |
| | | return new JwtTokenUtil(); |
| | | } |
| | | |
| | | @Bean |
| | | public RestfulAccessDeniedHandler restfulAccessDeniedHandler() { |
| | | return new RestfulAccessDeniedHandler(); |
| | | } |
| | | |
| | | @Bean |
| | | public RestAuthenticationEntryPoint restAuthenticationEntryPoint() { |
| | | return new RestAuthenticationEntryPoint(); |
| | | } |
| | | |
| | | @Bean |
| | | public JwtAuthenticationTokenFilter jwtAuthenticationTokenFilter(){ |
| | | return new JwtAuthenticationTokenFilter(); |
| | | } |
| | | |
| | | @Bean |
| | | public DynamicAccessDecisionManager dynamicAccessDecisionManager() { |
| | | return new DynamicAccessDecisionManager(); |
| | | } |
| | | |
| | | @Bean |
| | | public DynamicSecurityMetadataSource dynamicSecurityMetadataSource() { |
| | | return new DynamicSecurityMetadataSource(); |
| | | } |
| | | |
| | | @Bean |
| | | public DynamicSecurityFilter dynamicSecurityFilter(){ |
| | | return new DynamicSecurityFilter(); |
| | | } |
| | | } |
New file |
| | |
| | | package com.ycl.smoke.config; |
| | | |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import springfox.documentation.builders.ApiInfoBuilder; |
| | | import springfox.documentation.builders.PathSelectors; |
| | | import springfox.documentation.builders.RequestHandlerSelectors; |
| | | import springfox.documentation.service.*; |
| | | import springfox.documentation.spi.DocumentationType; |
| | | import springfox.documentation.spi.service.contexts.SecurityContext; |
| | | import springfox.documentation.spring.web.plugins.Docket; |
| | | import springfox.documentation.swagger2.annotations.EnableSwagger2; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Author: lyq |
| | | * @Date: 2022/09/06 |
| | | * @description: Swagger API文档相关配置 |
| | | */ |
| | | @Configuration |
| | | @EnableSwagger2 |
| | | public class Knife4jSwaggerConfig { |
| | | @Bean |
| | | public Docket createRestApi(){ |
| | | return new Docket(DocumentationType.SWAGGER_2) |
| | | .apiInfo(apiInfo()) |
| | | .select() |
| | | .apis(RequestHandlerSelectors.basePackage("com.ycl.controller")) |
| | | .paths(PathSelectors.any()) |
| | | .build() |
| | | .securitySchemes(securitySchemes()) |
| | | .securityContexts(securityContexts()); |
| | | } |
| | | |
| | | private ApiInfo apiInfo() { |
| | | return new ApiInfoBuilder() |
| | | .title("遂昌接口文档管理系统") |
| | | .description("遂昌后台模块") |
| | | .version("1.0").contact(new Contact("lyq",null,null)) |
| | | .build(); |
| | | } |
| | | |
| | | private List<SecurityScheme> securitySchemes() { |
| | | //设置请求头信息 |
| | | List<SecurityScheme> result = new ArrayList<>(); |
| | | ApiKey apiKey = new ApiKey("Authorization", "Authorization", "header"); |
| | | result.add(apiKey); |
| | | return result; |
| | | } |
| | | |
| | | private List<SecurityContext> securityContexts() { |
| | | //设置需要登录认证的路径 |
| | | List<SecurityContext> result = new ArrayList<>(); |
| | | result.add(getContextByPath("/*/.*")); |
| | | return result; |
| | | } |
| | | |
| | | private SecurityContext getContextByPath(String pathRegex){ |
| | | return SecurityContext.builder() |
| | | .securityReferences(defaultAuth()) |
| | | .forPaths(PathSelectors.regex(pathRegex)) |
| | | .build(); |
| | | } |
| | | |
| | | private List<SecurityReference> defaultAuth() { |
| | | List<SecurityReference> result = new ArrayList<>(); |
| | | AuthorizationScope authorizationScope = new AuthorizationScope("global", "accessEverything"); |
| | | AuthorizationScope[] authorizationScopes = new AuthorizationScope[1]; |
| | | authorizationScopes[0] = authorizationScope; |
| | | result.add(new SecurityReference("Authorization", authorizationScopes)); |
| | | return result; |
| | | } |
| | | } |
New file |
| | |
| | | package com.ycl.smoke.config; |
| | | |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import org.springframework.web.client.RestTemplate; |
| | | |
| | | @Configuration |
| | | public class RestTemplateConfig { |
| | | |
| | | @Bean |
| | | public RestTemplate restTemplate() { |
| | | return new RestTemplate(); |
| | | } |
| | | } |
New file |
| | |
| | | package com.ycl.smoke.config; |
| | | |
| | | import com.ycl.component.*; |
| | | import com.ycl.config.IgnoreUrlsConfig; |
| | | import com.ycl.config.WebSecurityCorsFilter; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import org.springframework.http.HttpMethod; |
| | | import org.springframework.security.config.annotation.web.builders.HttpSecurity; |
| | | import org.springframework.security.config.annotation.web.configurers.ExpressionUrlAuthorizationConfigurer; |
| | | import org.springframework.security.config.http.SessionCreationPolicy; |
| | | import org.springframework.security.web.SecurityFilterChain; |
| | | import org.springframework.security.web.access.channel.ChannelProcessingFilter; |
| | | import org.springframework.security.web.access.intercept.FilterSecurityInterceptor; |
| | | import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter; |
| | | |
| | | |
| | | /** |
| | | * SpringSecurity 5.4.x以上新用法配置 |
| | | * 为避免循环依赖,仅用于配置HttpSecurity |
| | | * Created by macro on 2019/11/5. |
| | | */ |
| | | @Configuration |
| | | public class SecurityConfig { |
| | | |
| | | @Autowired |
| | | private IgnoreUrlsConfig ignoreUrlsConfig; |
| | | @Autowired |
| | | private RestfulAccessDeniedHandler restfulAccessDeniedHandler; |
| | | @Autowired |
| | | private RestAuthenticationEntryPoint restAuthenticationEntryPoint; |
| | | @Autowired |
| | | private JwtAuthenticationTokenFilter jwtAuthenticationTokenFilter; |
| | | @Autowired |
| | | private DynamicSecurityService dynamicSecurityService; |
| | | @Autowired |
| | | private DynamicSecurityFilter dynamicSecurityFilter; |
| | | |
| | | @Bean |
| | | SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { |
| | | ExpressionUrlAuthorizationConfigurer<HttpSecurity>.ExpressionInterceptUrlRegistry registry = httpSecurity |
| | | .authorizeRequests(); |
| | | //不需要保护的资源路径允许访问 |
| | | for (String url : ignoreUrlsConfig.getUrls()) { |
| | | registry.antMatchers(url).permitAll(); |
| | | } |
| | | //允许跨域请求的OPTIONS请求 |
| | | registry.antMatchers(HttpMethod.OPTIONS) |
| | | .permitAll(); |
| | | // 任何请求需要身份认证 |
| | | registry.and() |
| | | .authorizeRequests() |
| | | .anyRequest() |
| | | .authenticated() |
| | | // 关闭跨站请求防护及不使用session |
| | | .and() |
| | | .csrf() |
| | | .disable() |
| | | .sessionManagement() |
| | | .sessionCreationPolicy(SessionCreationPolicy.STATELESS) |
| | | // 自定义权限拒绝处理类 |
| | | .and() |
| | | .exceptionHandling() |
| | | .accessDeniedHandler(restfulAccessDeniedHandler) |
| | | .authenticationEntryPoint(restAuthenticationEntryPoint) |
| | | // 自定义权限拦截器JWT过滤器 |
| | | .and() |
| | | .addFilterBefore(webSecurityCorsFilter(), ChannelProcessingFilter.class) |
| | | .addFilterBefore(jwtAuthenticationTokenFilter, UsernamePasswordAuthenticationFilter.class); |
| | | //有动态权限配置时添加动态权限校验过滤器 |
| | | if (dynamicSecurityService != null) { |
| | | registry.and().addFilterBefore(dynamicSecurityFilter, FilterSecurityInterceptor.class); |
| | | } |
| | | return httpSecurity.build(); |
| | | } |
| | | |
| | | @Bean |
| | | public WebSecurityCorsFilter webSecurityCorsFilter() { |
| | | return new WebSecurityCorsFilter(); |
| | | } |
| | | } |
New file |
| | |
| | | package com.ycl.smoke.config; |
| | | |
| | | import com.ycl.component.DynamicSecurityService; |
| | | import com.ycl.entity.user.UmsMenu; |
| | | import com.ycl.service.user.UmsAdminService; |
| | | import com.ycl.service.user.UmsMenuService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import org.springframework.security.access.ConfigAttribute; |
| | | import org.springframework.security.core.userdetails.UserDetailsService; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.concurrent.ConcurrentHashMap; |
| | | |
| | | /** |
| | | * security模块相关配置 |
| | | * 自定义配置,用于配置如何获取用户信息及动态权限 |
| | | */ |
| | | @Configuration |
| | | public class YclSecurityConfig { |
| | | |
| | | |
| | | |
| | | @Bean |
| | | public DynamicSecurityService dynamicSecurityService() { |
| | | return new DynamicSecurityService() { |
| | | @Override |
| | | public Map<String, ConfigAttribute> loadDataSource() { |
| | | Map<String, ConfigAttribute> map = new ConcurrentHashMap<>(); |
| | | |
| | | return map; |
| | | } |
| | | }; |
| | | } |
| | | } |
New file |
| | |
| | | package com.ycl.smoke.config.feign; |
| | | |
| | | import feign.Feign; |
| | | import feign.Logger; |
| | | import feign.Retryer; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | |
| | | @Configuration |
| | | public class FeignConfiguration { |
| | | @Bean |
| | | Logger.Level feignLoggerLevel() { |
| | | return Logger.Level.FULL; |
| | | } |
| | | |
| | | @Bean |
| | | public Feign.Builder feignBuilder() { |
| | | return Feign.builder() |
| | | .queryMapEncoder(new UnderlineQueryEncoder()) |
| | | .retryer(Retryer.NEVER_RETRY); |
| | | } |
| | | } |
New file |
| | |
| | | package com.ycl.smoke.config.feign; |
| | | |
| | | import feign.codec.Decoder; |
| | | import org.springframework.beans.factory.ObjectFactory; |
| | | import org.springframework.boot.autoconfigure.http.HttpMessageConverters; |
| | | import org.springframework.cloud.openfeign.support.SpringDecoder; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | |
| | | @Configuration |
| | | public class FeignGlobalConfiguration { |
| | | |
| | | |
| | | @Bean |
| | | public Decoder feignDecoder(){ |
| | | MessageConverter converter = new MessageConverter(); |
| | | ObjectFactory<HttpMessageConverters> objectFactory = () -> new HttpMessageConverters(converter); |
| | | return new SpringDecoder(objectFactory); |
| | | } |
| | | } |
New file |
| | |
| | | package com.ycl.smoke.config.feign; |
| | | |
| | | import org.springframework.http.MediaType; |
| | | import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | public class MessageConverter extends MappingJackson2HttpMessageConverter { |
| | | public MessageConverter(){ |
| | | List<MediaType> mediaTypes = new ArrayList<>(); |
| | | mediaTypes.add(MediaType.APPLICATION_JSON); |
| | | setSupportedMediaTypes(mediaTypes); |
| | | } |
| | | } |
New file |
| | |
| | | package com.ycl.smoke.config.feign; |
| | | |
| | | import com.ycl.utils.StringUtils; |
| | | import feign.Param; |
| | | import feign.QueryMapEncoder; |
| | | import feign.codec.EncodeException; |
| | | |
| | | import java.beans.IntrospectionException; |
| | | import java.beans.Introspector; |
| | | import java.beans.PropertyDescriptor; |
| | | import java.lang.reflect.InvocationTargetException; |
| | | import java.lang.reflect.Method; |
| | | import java.util.*; |
| | | |
| | | public class UnderlineQueryEncoder implements QueryMapEncoder { |
| | | private final Map<Class<?>, ObjectParamMetadata> classToMetadata = |
| | | new HashMap(); |
| | | |
| | | @Override |
| | | public Map<String, Object> encode(Object object) throws EncodeException { |
| | | try { |
| | | ObjectParamMetadata metadata = getMetadata(object.getClass()); |
| | | Map<String, Object> propertyNameToValue = new HashMap<String, Object>(); |
| | | for (PropertyDescriptor pd : metadata.objectProperties) { |
| | | Method method = pd.getReadMethod(); |
| | | Object value = method.invoke(object); |
| | | if (value != null && value != object) { |
| | | Param alias = method.getAnnotation(Param.class); |
| | | String name = alias != null ? alias.value() : pd.getName(); |
| | | propertyNameToValue.put(StringUtils.camelToUnderlineLowerCase(name), value); |
| | | } |
| | | } |
| | | return propertyNameToValue; |
| | | } catch (IllegalAccessException | IntrospectionException | InvocationTargetException e) { |
| | | throw new EncodeException("Failure encoding object into query map", e); |
| | | } |
| | | } |
| | | |
| | | private ObjectParamMetadata getMetadata(Class<?> objectType) throws IntrospectionException { |
| | | ObjectParamMetadata metadata = classToMetadata.get(objectType); |
| | | if (metadata == null) { |
| | | metadata = ObjectParamMetadata.parseObjectType(objectType); |
| | | classToMetadata.put(objectType, metadata); |
| | | } |
| | | return metadata; |
| | | } |
| | | |
| | | private static class ObjectParamMetadata { |
| | | |
| | | private final List<PropertyDescriptor> objectProperties; |
| | | |
| | | private ObjectParamMetadata(List<PropertyDescriptor> objectProperties) { |
| | | this.objectProperties = Collections.unmodifiableList(objectProperties); |
| | | } |
| | | |
| | | private static ObjectParamMetadata parseObjectType(Class<?> type) |
| | | throws IntrospectionException { |
| | | List<PropertyDescriptor> properties = new ArrayList<PropertyDescriptor>(); |
| | | |
| | | for (PropertyDescriptor pd : Introspector.getBeanInfo(type).getPropertyDescriptors()) { |
| | | boolean isGetterMethod = pd.getReadMethod() != null && !"class".equals(pd.getName()); |
| | | if (isGetterMethod) { |
| | | properties.add(pd); |
| | | } |
| | | } |
| | | |
| | | return new ObjectParamMetadata(properties); |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | package com.ycl.smoke.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.Version; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import java.io.Serializable; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | /** |
| | | * <p> |
| | | * 报警消息 |
| | | * </p> |
| | | * |
| | | * @author lyq |
| | | * @since 2023-02-28 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @TableName("ums_ods_alarm_msg") |
| | | public class OdsAlarmMsg implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * Id |
| | | */ |
| | | @TableId("id") |
| | | @JsonProperty("Id") |
| | | private String id; |
| | | |
| | | /** |
| | | * 设备的mn数据 |
| | | */ |
| | | @TableField("mn") |
| | | @JsonProperty("MN") |
| | | private String mn; |
| | | |
| | | /** |
| | | * 数据收集时间 |
| | | */ |
| | | @TableField("acquit_at") |
| | | @JsonProperty("AcquitAt") |
| | | private Long acquitAt; |
| | | |
| | | /** |
| | | * 持有人 |
| | | */ |
| | | @TableField("owner") |
| | | @JsonProperty("Owner") |
| | | private String owner; |
| | | |
| | | /** |
| | | * 内容 |
| | | */ |
| | | @TableField("content") |
| | | @JsonProperty("Content") |
| | | private String content; |
| | | |
| | | /** |
| | | * 消息类型 |
| | | */ |
| | | @TableField("msg_type") |
| | | @JsonProperty("MsgType") |
| | | private String msgType; |
| | | |
| | | @JsonProperty("Addr") |
| | | @TableField("addr") |
| | | private String addr; |
| | | |
| | | } |
New file |
| | |
| | | package com.ycl.smoke.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.Version; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import java.time.LocalDateTime; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import java.io.Serializable; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | /** |
| | | * <p> |
| | | * 报警记录 |
| | | * </p> |
| | | * |
| | | * @author lyq |
| | | * @since 2023-02-28 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @TableName("ums_ods_alarm_record") |
| | | public class OdsAlarmRecord implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId("id") |
| | | private String id; |
| | | |
| | | /** |
| | | * 监测点ID |
| | | */ |
| | | @TableField("local_id") |
| | | private String localId; |
| | | |
| | | /** |
| | | * 设备编号 |
| | | */ |
| | | @TableField("mn") |
| | | private String mn; |
| | | |
| | | /** |
| | | * 数据类型1:超标2:异常 |
| | | */ |
| | | @TableField("typ") |
| | | private Integer typ; |
| | | |
| | | /** |
| | | * 报警时间 |
| | | */ |
| | | @TableField("alarm_date") |
| | | private LocalDateTime alarmDate; |
| | | |
| | | /** |
| | | * 设备类型 |
| | | */ |
| | | @TableField("device_type") |
| | | private Integer deviceType; |
| | | |
| | | /** |
| | | * 采集时间 |
| | | */ |
| | | @TableField("acquit_at") |
| | | private Long acquitAt; |
| | | |
| | | /** |
| | | * 处理时间 |
| | | */ |
| | | @TableField("process_at") |
| | | private Long processAt; |
| | | |
| | | /** |
| | | * 所属单位 |
| | | */ |
| | | @TableField("owner") |
| | | private String owner; |
| | | |
| | | /** |
| | | * 解决方案 |
| | | */ |
| | | @TableField("solution") |
| | | private String solution; |
| | | |
| | | /** |
| | | * 处理地址 |
| | | */ |
| | | @TableField("processing_address") |
| | | private String processingAddress; |
| | | |
| | | /** |
| | | * 点位地址 |
| | | */ |
| | | @TableField("addr") |
| | | private String addr; |
| | | |
| | | /** |
| | | * 处理人ID |
| | | */ |
| | | @TableField("process_user_id") |
| | | private String processUserId; |
| | | |
| | | /** |
| | | * 处理人名称 |
| | | */ |
| | | @TableField("process_user_name") |
| | | private String processUserName; |
| | | |
| | | /** |
| | | * 处理原因 |
| | | */ |
| | | @TableField("process_reason") |
| | | private String processReason; |
| | | |
| | | /** |
| | | * 关联地址 |
| | | */ |
| | | @TableField("created_at") |
| | | private LocalDateTime createdAt; |
| | | |
| | | /** |
| | | * 地址序列 |
| | | */ |
| | | @TableField("update_at") |
| | | private LocalDateTime updateAt; |
| | | |
| | | /** |
| | | * 查询结果总数 |
| | | */ |
| | | @TableField("total") |
| | | private Integer total; |
| | | |
| | | /** |
| | | * 报警图片 |
| | | */ |
| | | @TableField("alarm_record_pics") |
| | | private String alarmRecordPics; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ycl.smoke.entity; |
| | | |
| | | import java.math.BigDecimal; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.Version; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import java.time.LocalDateTime; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import java.io.Serializable; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | /** |
| | | * <p> |
| | | * 监测点统计&健康码管理 |
| | | * </p> |
| | | * |
| | | * @author lyq |
| | | * @since 2023-02-28 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @TableName("ums_ods_cur_alarm") |
| | | public class OdsCurAlarm implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId("id") |
| | | private Integer id; |
| | | |
| | | /** |
| | | * 异常离线天数 |
| | | */ |
| | | @TableField("abnormal_off_line_days") |
| | | private Integer abnormalOffLineDays; |
| | | |
| | | /** |
| | | * 处理率 |
| | | */ |
| | | @TableField("abnormal_off_line_process_ratio") |
| | | private Integer abnormalOffLineProcessRatio; |
| | | |
| | | /** |
| | | * 异常离线待处理天数 |
| | | */ |
| | | @TableField("abnormal_off_line_to_process_days") |
| | | private Integer abnormalOffLineToProcessDays; |
| | | |
| | | /** |
| | | * 地址 |
| | | */ |
| | | @TableField("addr") |
| | | private String addr; |
| | | |
| | | /** |
| | | * 排放物浓度折算(昨日) |
| | | */ |
| | | @TableField("c_emissions") |
| | | private BigDecimal cEmissions; |
| | | |
| | | /** |
| | | * 在线日平均排放浓度 |
| | | */ |
| | | @TableField("c_emissions_avg_online") |
| | | private BigDecimal cEmissionsAvgOnline; |
| | | |
| | | /** |
| | | * 日最高排放浓度 |
| | | */ |
| | | @TableField("c_emissions_max") |
| | | private BigDecimal cEmissionsMax; |
| | | |
| | | /** |
| | | * 日最高排放浓度日期 |
| | | */ |
| | | @TableField("c_emissions_max_date") |
| | | private LocalDateTime cEmissionsMaxDate; |
| | | |
| | | /** |
| | | * 颗粒物浓度折算(昨日) |
| | | */ |
| | | @TableField("c_granule") |
| | | private BigDecimal cGranule; |
| | | |
| | | /** |
| | | * 非甲烷总烃浓度折算 (昨日) |
| | | */ |
| | | @TableField("c_hydrocarbon") |
| | | private BigDecimal cHydrocarbon; |
| | | |
| | | /** |
| | | * 菜系名 |
| | | */ |
| | | @TableField("cuisine_name") |
| | | private String cuisineName; |
| | | |
| | | /** |
| | | * 营业执照 |
| | | */ |
| | | @TableField("customer_bl_no") |
| | | private String customerBlNo; |
| | | |
| | | /** |
| | | * 联系人 |
| | | */ |
| | | @TableField("customer_contact") |
| | | private String customerContact; |
| | | |
| | | /** |
| | | * 电话 |
| | | */ |
| | | @TableField("customer_mobile") |
| | | private String customerMobile; |
| | | |
| | | /** |
| | | * 店名称 |
| | | */ |
| | | @TableField("customer_name") |
| | | private String customerName; |
| | | |
| | | /** |
| | | * 监测仪故障天数 |
| | | */ |
| | | @TableField("detector_failure_days") |
| | | private Integer detectorFailureDays; |
| | | |
| | | /** |
| | | * 超标阈值 |
| | | */ |
| | | @TableField("emissions_sill") |
| | | private Double emissionsSill; |
| | | |
| | | /** |
| | | * 超标数 |
| | | */ |
| | | @TableField("excess_num") |
| | | private Integer excessNum; |
| | | |
| | | /** |
| | | * 超标待处理天数 |
| | | */ |
| | | @TableField("excess_to_process_days") |
| | | private Integer excessToProcessDays; |
| | | |
| | | /** |
| | | * 净化器不正常使用天数 |
| | | */ |
| | | @TableField("filter_abnormally_used_days") |
| | | private Integer filterAbnormallyUsedDays; |
| | | |
| | | /** |
| | | * 净化器清洗次数 |
| | | */ |
| | | @TableField("filter_wash_times") |
| | | private Integer filterWashTimes; |
| | | |
| | | /** |
| | | * 颗粒物超标阈值 |
| | | */ |
| | | @TableField("granuli_sill") |
| | | private Double granuliSill; |
| | | |
| | | /** |
| | | * 健康码颜色 |
| | | */ |
| | | @TableField("health_code_color") |
| | | private String healthCodeColor; |
| | | |
| | | /** |
| | | * 非甲烷总烃超标阈值 |
| | | */ |
| | | @TableField("hydrocarbon_sill") |
| | | private Double hydrocarbonSill; |
| | | |
| | | /** |
| | | * 监测点Id |
| | | */ |
| | | @TableField("locale_id") |
| | | private String localeId; |
| | | |
| | | /** |
| | | * 纬度 |
| | | */ |
| | | @TableField("local_lat") |
| | | private String localLat; |
| | | |
| | | /** |
| | | * 经度 |
| | | */ |
| | | @TableField("local_lng") |
| | | private String localLng; |
| | | |
| | | /** |
| | | * 设备的mn数据 |
| | | */ |
| | | @TableField("mn") |
| | | private String mn; |
| | | |
| | | /** |
| | | * 名称 |
| | | */ |
| | | @TableField("name") |
| | | private String name; |
| | | |
| | | /** |
| | | * 店家原因导致离线天数 |
| | | */ |
| | | @TableField("off_line_cause_by_shop_days") |
| | | private Integer offLineCauseByShopDays; |
| | | |
| | | /** |
| | | * 所属单位 |
| | | */ |
| | | @TableField("owner") |
| | | private String owner; |
| | | |
| | | /** |
| | | * 歇业天数 |
| | | */ |
| | | @TableField("shop_close_days") |
| | | private Integer shopCloseDays; |
| | | |
| | | /** |
| | | * 状态[1:一般监测点,2:特殊监测点,99:废弃监测点] |
| | | */ |
| | | @TableField("status") |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 状态描述 |
| | | */ |
| | | @TableField("status_desc") |
| | | private String statusDesc; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ycl.smoke.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.Version; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import java.io.Serializable; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | /** |
| | | * <p> |
| | | * 组织架构 |
| | | * </p> |
| | | * |
| | | * @author lyq |
| | | * @since 2023-02-28 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @TableName("ums_ods_customer") |
| | | public class OdsCustomer implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * id |
| | | */ |
| | | @TableId("id") |
| | | private String id; |
| | | |
| | | /** |
| | | * 父节点 |
| | | */ |
| | | @TableField("pid") |
| | | private String pid; |
| | | |
| | | /** |
| | | * 营业执照编号 |
| | | */ |
| | | @TableField("bl_no") |
| | | private String blNo; |
| | | |
| | | /** |
| | | * 营业执照名称 |
| | | */ |
| | | @TableField("bl_name") |
| | | private String blName; |
| | | |
| | | /** |
| | | * 组织名称 |
| | | */ |
| | | @TableField("org") |
| | | private String org; |
| | | |
| | | /** |
| | | * 名称 |
| | | */ |
| | | @TableField("name") |
| | | private String name; |
| | | |
| | | /** |
| | | * 联系人 |
| | | */ |
| | | @TableField("contact") |
| | | private String contact; |
| | | |
| | | /** |
| | | * 手机号 |
| | | */ |
| | | @TableField("mobile") |
| | | private String mobile; |
| | | |
| | | /** |
| | | * 联系电话 |
| | | */ |
| | | @TableField("telephone") |
| | | private String telephone; |
| | | |
| | | /** |
| | | * 类型(1:系统用户2:经销单位3:行政单位4:餐饮单位) |
| | | */ |
| | | @TableField("typ") |
| | | private Integer typ; |
| | | |
| | | /** |
| | | * 创建者 |
| | | */ |
| | | @TableField("creator") |
| | | private String creator; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @TableField("create_at") |
| | | private Long createAt; |
| | | |
| | | /** |
| | | * 状态 |
| | | */ |
| | | @TableField("status") |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 地址 |
| | | */ |
| | | @TableField("address") |
| | | private String address; |
| | | |
| | | /** |
| | | * 标志 |
| | | */ |
| | | @TableField("logo") |
| | | private String logo; |
| | | |
| | | /** |
| | | * 营业时间 |
| | | */ |
| | | @TableField("business_hour") |
| | | private String businessHour; |
| | | |
| | | /** |
| | | * 运维人员ID |
| | | */ |
| | | @TableField("maintainer_id") |
| | | private String maintainerId; |
| | | |
| | | /** |
| | | * 关联地址 |
| | | */ |
| | | @TableField("area_ids") |
| | | private String areaIds; |
| | | |
| | | /** |
| | | * 地址序列 |
| | | */ |
| | | @TableField("area_id_cascads") |
| | | private String areaIdCascads; |
| | | |
| | | /** |
| | | * 地址详细信息 |
| | | */ |
| | | @TableField("areas") |
| | | private String areas; |
| | | |
| | | /** |
| | | * 介绍 |
| | | */ |
| | | @TableField("desc") |
| | | private String desc; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ycl.smoke.entity; |
| | | |
| | | import java.math.BigDecimal; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import java.time.LocalDate; |
| | | import com.baomidou.mybatisplus.annotation.Version; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import java.io.Serializable; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | /** |
| | | * <p> |
| | | * 监测 |
| | | * </p> |
| | | * |
| | | * @author lyq |
| | | * @since 2023-02-28 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @TableName("ums_ods_detector_daily") |
| | | public class OdsDetectorDaily implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * id |
| | | */ |
| | | @TableId("id") |
| | | @JsonProperty("Id") |
| | | private String id; |
| | | |
| | | /** |
| | | * 设备mn |
| | | */ |
| | | @TableField("mn") |
| | | @JsonProperty("MN") |
| | | private String mn; |
| | | |
| | | /** |
| | | * 持有者 |
| | | */ |
| | | @TableField("owner") |
| | | @JsonProperty("Owner") |
| | | private String owner; |
| | | |
| | | /** |
| | | * 数据采集时间 |
| | | */ |
| | | @TableField("acquit_at") |
| | | @JsonProperty("AcquitAt") |
| | | private Long acquitAt; |
| | | |
| | | /** |
| | | * 数据采集日 |
| | | */ |
| | | @TableField("acquit_date") |
| | | @JsonProperty("AcquitDate") |
| | | private LocalDate acquitDate; |
| | | |
| | | /** |
| | | * 创建日期 |
| | | */ |
| | | @TableField("create_at") |
| | | @JsonProperty("CreateAt") |
| | | private Long createAt; |
| | | |
| | | /** |
| | | * 排放物浓度折算 |
| | | */ |
| | | @TableField("c_emissions") |
| | | @JsonProperty("CEmissions") |
| | | private BigDecimal cEmissions; |
| | | |
| | | /** |
| | | * 颗粒物浓度折算 |
| | | */ |
| | | @TableField("c_granule") |
| | | @JsonProperty("CGranule") |
| | | private BigDecimal cGranule; |
| | | |
| | | /** |
| | | * 非甲烷总烃浓度折算 |
| | | */ |
| | | @TableField("c_hydrocarbon") |
| | | @JsonProperty("CHydrocarbon") |
| | | private BigDecimal cHydrocarbon; |
| | | |
| | | /** |
| | | * 弃用 |
| | | */ |
| | | @TableField("e_missions") |
| | | @JsonProperty("Emissions") |
| | | private BigDecimal eMissions; |
| | | |
| | | /** |
| | | * 弃用 |
| | | */ |
| | | @TableField("granule") |
| | | @JsonProperty("Granule") |
| | | private BigDecimal granule; |
| | | |
| | | /** |
| | | * 弃用 |
| | | */ |
| | | @TableField("hydrocarbon") |
| | | @JsonProperty("Hydrocarbon") |
| | | private BigDecimal hydrocarbon; |
| | | |
| | | /** |
| | | * 转速 |
| | | */ |
| | | @TableField("velocity") |
| | | @JsonProperty("Velocity") |
| | | private BigDecimal velocity; |
| | | |
| | | /** |
| | | * 温度 |
| | | */ |
| | | @TableField("temperature") |
| | | @JsonProperty("Temperature") |
| | | private BigDecimal temperature; |
| | | |
| | | /** |
| | | * 湿度 |
| | | */ |
| | | @TableField("moisture") |
| | | @JsonProperty("Moisture") |
| | | private BigDecimal moisture; |
| | | |
| | | /** |
| | | * Pm2.5减排量 |
| | | */ |
| | | @TableField("red_pm25") |
| | | @JsonProperty("RedPm25") |
| | | private BigDecimal redPm25; |
| | | |
| | | /** |
| | | * pm10减排量 |
| | | */ |
| | | @TableField("red_pm10") |
| | | @JsonProperty("RedPm10") |
| | | private BigDecimal redPm10; |
| | | |
| | | /** |
| | | * 排放物减排量 |
| | | */ |
| | | @TableField("red_emissions") |
| | | @JsonProperty("RedEmissions") |
| | | private BigDecimal redEmissions; |
| | | |
| | | /** |
| | | * vocs减排量 |
| | | */ |
| | | @TableField("red_vocs") |
| | | @JsonProperty("RedVocs") |
| | | private BigDecimal redVocs; |
| | | |
| | | /** |
| | | * 设备数 |
| | | */ |
| | | @TableField("device_num") |
| | | @JsonProperty("DeviceNum") |
| | | private Integer deviceNum; |
| | | |
| | | /** |
| | | * 状态[1:正常,2:超标,3:正常离线,4异常离] |
| | | */ |
| | | @TableField("status") |
| | | @JsonProperty("Status") |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 净化器风机联动比=净化器开并且风机开的条数/风机开的数据总条数*100%; |
| | | */ |
| | | @TableField("filter_fan_link_ratio") |
| | | @JsonProperty("FilterFanLinkRatio") |
| | | private BigDecimal filterFanLinkRatio; |
| | | |
| | | /** |
| | | * 净化器是否非正常使用 |
| | | */ |
| | | @TableField("filter_abnormally_used") |
| | | @JsonProperty("FilterAbnormallyUsed") |
| | | private Boolean filterAbnormallyUsed; |
| | | |
| | | /** |
| | | * 排放物超标 |
| | | */ |
| | | @TableField("c_emissions_exceed_standard") |
| | | @JsonProperty("CEmissionsExceedStandard") |
| | | private Boolean cEmissionsExceedStandard; |
| | | |
| | | /** |
| | | * 颗粒物超标 |
| | | */ |
| | | @TableField("c_granule_exceed_standard") |
| | | @JsonProperty("CGranuleExceedStandard") |
| | | private Boolean cGranuleExceedStandard; |
| | | |
| | | /** |
| | | * 非甲烷总烃超标 |
| | | */ |
| | | @TableField("c_hydrocarbon_exceed_standard") |
| | | @JsonProperty("CHydrocarbonExceedStandard") |
| | | private Boolean cHydrocarbonExceedStandard; |
| | | |
| | | /** |
| | | * 地区id |
| | | */ |
| | | @TableField("locale_id") |
| | | @JsonProperty("LocaleId") |
| | | private String localeId; |
| | | |
| | | /** |
| | | * 所属单位id |
| | | */ |
| | | @TableField("customer_id") |
| | | @JsonProperty("CustomerId") |
| | | private Integer customerId; |
| | | |
| | | /** |
| | | * 用户 |
| | | */ |
| | | @TableField("customer") |
| | | @JsonProperty("Customer") |
| | | private String customer; |
| | | |
| | | /** |
| | | * 排放物阈值 |
| | | */ |
| | | @TableField("locale_emissions_sill") |
| | | @JsonProperty("LocaleEmissionsSill") |
| | | private BigDecimal localeEmissionsSill; |
| | | |
| | | /** |
| | | * 颗粒物阈值 |
| | | */ |
| | | @TableField("locale_granule_sill") |
| | | @JsonProperty("LocaleGranuleSill") |
| | | private BigDecimal localeGranuleSill; |
| | | |
| | | /** |
| | | * 非甲烷总烃阈值 |
| | | */ |
| | | @TableField("locale_hydrocarbon_sill") |
| | | @JsonProperty("LocaleHydrocarbonSill") |
| | | private BigDecimal localeHydrocarbonSill; |
| | | |
| | | /** |
| | | * 监测点名 |
| | | */ |
| | | @TableField("locale_name") |
| | | @JsonProperty("LocaleName") |
| | | private String localeName; |
| | | |
| | | /** |
| | | * 监测点 |
| | | */ |
| | | @TableField("locale_addr") |
| | | @JsonProperty("LocaleAddr") |
| | | private String localeAddr; |
| | | |
| | | /** |
| | | * 异常离线 |
| | | */ |
| | | @TableField("abnormal_off_line") |
| | | @JsonProperty("AbnormalOffline") |
| | | private BigDecimal abnormalOffLine; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ycl.smoke.entity; |
| | | |
| | | import java.math.BigDecimal; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.Version; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import java.io.Serializable; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | /** |
| | | * <p> |
| | | * 返回实时的设备数据 |
| | | * </p> |
| | | * |
| | | * @author lyq |
| | | * @since 2023-02-28 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @TableName("ums_ods_in_time") |
| | | public class OdsInTime implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 实时数据的设备编号(中间有“-”连接代表该监测点有多个设备绑定) |
| | | */ |
| | | @TableId("id") |
| | | private String id; |
| | | |
| | | /** |
| | | * 报文信息 |
| | | */ |
| | | @TableField("string") |
| | | private String string; |
| | | |
| | | /** |
| | | * 采集时间 |
| | | */ |
| | | @TableField("acquit_at") |
| | | private Long acquitAt; |
| | | |
| | | /** |
| | | * 最后确认时间 |
| | | */ |
| | | @TableField("last_at") |
| | | private Long lastAt; |
| | | |
| | | /** |
| | | * 排放物折算浓度 |
| | | */ |
| | | @TableField("c_emissions") |
| | | private String cEmissions; |
| | | |
| | | /** |
| | | * 颗粒物折算浓度 |
| | | */ |
| | | @TableField("c_granule") |
| | | private String cGranule; |
| | | |
| | | /** |
| | | * 非甲烷总烃折算浓度 |
| | | */ |
| | | @TableField("c_hydrocarbon") |
| | | private BigDecimal cHydrocarbon; |
| | | |
| | | /** |
| | | * 实时排放量 |
| | | */ |
| | | @TableField("emissions_conc") |
| | | private BigDecimal emissionsConc; |
| | | |
| | | /** |
| | | * 颗粒物含量 |
| | | */ |
| | | @TableField("granule_conc") |
| | | private BigDecimal granuleConc; |
| | | |
| | | /** |
| | | * 非甲烷总烃含量 |
| | | */ |
| | | @TableField("hydrocarbon_conc") |
| | | private BigDecimal hydrocarbonConc; |
| | | |
| | | /** |
| | | * 风机状态(1:开2:关3:异常) |
| | | */ |
| | | @TableField("fan_status") |
| | | private Integer fanStatus; |
| | | |
| | | /** |
| | | * 净化器状态(1:开2:关3:异常) |
| | | */ |
| | | @TableField("filter_status") |
| | | private Integer filterStatus; |
| | | |
| | | /** |
| | | * 类型[1:监控:2:监测] |
| | | */ |
| | | @TableField("typ") |
| | | private Integer typ; |
| | | |
| | | /** |
| | | * 状态 |
| | | (NORMAL正常、ALARM预警、EXCESS超标、DOWN离线、OFF异常离线) |
| | | |
| | | */ |
| | | @TableField("status") |
| | | private String status; |
| | | |
| | | /** |
| | | * 流速 |
| | | */ |
| | | @TableField("velocity") |
| | | private Double velocity; |
| | | |
| | | /** |
| | | * 温度 |
| | | */ |
| | | @TableField("temperature") |
| | | private Double temperature; |
| | | |
| | | /** |
| | | * 湿度 |
| | | */ |
| | | @TableField("moisture") |
| | | private Double moisture; |
| | | |
| | | /** |
| | | * 监测点名称 |
| | | */ |
| | | @TableField("locale") |
| | | private String locale; |
| | | |
| | | /** |
| | | * 监测点ID |
| | | */ |
| | | @TableField("lid") |
| | | private String lid; |
| | | |
| | | /** |
| | | * 所属单位 |
| | | */ |
| | | @TableField("owner") |
| | | private String owner; |
| | | |
| | | /** |
| | | * 安装地址 |
| | | */ |
| | | @TableField("addr") |
| | | private String addr; |
| | | |
| | | /** |
| | | * 超标阈值 |
| | | */ |
| | | @TableField("emissions_sill") |
| | | private Double emissionsSill; |
| | | |
| | | /** |
| | | * 颗粒物超标阈值 |
| | | */ |
| | | @TableField("granule_sill") |
| | | private Double granuleSill; |
| | | |
| | | /** |
| | | * 非甲烷总烃超标阈值 |
| | | */ |
| | | @TableField("hydrocarbon_sill") |
| | | private Double hydrocarbonSill; |
| | | |
| | | /** |
| | | * 是否联动(0:否1:是) |
| | | */ |
| | | @TableField("link_status") |
| | | private Integer linkStatus; |
| | | |
| | | /** |
| | | * 联系电话 |
| | | */ |
| | | @TableField("customer_mobile") |
| | | private String customerMobile; |
| | | |
| | | /** |
| | | * 经度 |
| | | */ |
| | | @TableField("locale_lng") |
| | | private String localeLng; |
| | | |
| | | /** |
| | | * 纬度 |
| | | */ |
| | | @TableField("localelat") |
| | | private String localelat; |
| | | |
| | | /** |
| | | * 风机电流值 |
| | | */ |
| | | @TableField("fan_current") |
| | | private Double fanCurrent; |
| | | |
| | | /** |
| | | * 净化器电流值 |
| | | */ |
| | | @TableField("pur_current") |
| | | private Double purCurrent; |
| | | |
| | | /** |
| | | * 整体状态(1:在线2:离线3:异常离线) |
| | | */ |
| | | @TableField("online_status") |
| | | private Integer onlineStatus; |
| | | |
| | | /** |
| | | * (NORMAL:正常、OFFLINE:下线、ABANDONED:废弃) |
| | | */ |
| | | @TableField("status_of_record") |
| | | private String statusOfRecord; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ycl.smoke.entity; |
| | | |
| | | import java.math.BigDecimal; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.Version; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import java.time.LocalDateTime; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import java.io.Serializable; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | /** |
| | | * <p> |
| | | * 监测点信息 |
| | | * </p> |
| | | * |
| | | * @author lyq |
| | | * @since 2023-02-28 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @TableName("ums_ods_locale") |
| | | public class OdsLocale implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * Id |
| | | */ |
| | | @TableId("id") |
| | | private String id; |
| | | |
| | | /** |
| | | * 烟道名称 |
| | | */ |
| | | @TableField("n_name") |
| | | private String nName; |
| | | |
| | | /** |
| | | * 单位[级联] |
| | | */ |
| | | @TableField("owner") |
| | | private String owner; |
| | | |
| | | /** |
| | | * 菜系 |
| | | */ |
| | | @TableField("cuisine") |
| | | private Integer cuisine; |
| | | |
| | | /** |
| | | * 组织ID |
| | | */ |
| | | @TableField("customer_id") |
| | | private String customerId; |
| | | |
| | | /** |
| | | * 所属单位信息 |
| | | */ |
| | | @TableField("customer") |
| | | private String customer; |
| | | |
| | | /** |
| | | * 风速 |
| | | */ |
| | | @TableField("fan_speed") |
| | | private BigDecimal fanSpeed; |
| | | |
| | | /** |
| | | * 风量 |
| | | */ |
| | | @TableField("fan_quantity") |
| | | private BigDecimal fanQuantity; |
| | | |
| | | /** |
| | | * 管道截面面积 |
| | | */ |
| | | @TableField("pipe_area") |
| | | private BigDecimal pipeArea; |
| | | |
| | | /** |
| | | * 灶头数量 |
| | | */ |
| | | @TableField("stove_num") |
| | | private Integer stoveNum; |
| | | |
| | | /** |
| | | * 离线判定[小时] |
| | | */ |
| | | @TableField("offline_judge") |
| | | private Integer offlineJudge; |
| | | |
| | | /** |
| | | * 风机状态 |
| | | */ |
| | | @TableField("fan_status") |
| | | private Integer fanStatus; |
| | | |
| | | /** |
| | | * 净化器信息 |
| | | */ |
| | | @TableField("filter_info") |
| | | private String filterInfo; |
| | | |
| | | /** |
| | | * 净化器状态 |
| | | */ |
| | | @TableField("filter_status") |
| | | private Integer filterStatus; |
| | | |
| | | /** |
| | | * 抽样次数 |
| | | */ |
| | | @TableField("samplings") |
| | | private Integer samplings; |
| | | |
| | | /** |
| | | * 是否联动 |
| | | */ |
| | | @TableField("link_status") |
| | | private Boolean linkStatus; |
| | | |
| | | /** |
| | | * 超标阈值 |
| | | */ |
| | | @TableField("emissions_sill") |
| | | private BigDecimal emissionsSill; |
| | | |
| | | /** |
| | | * 集气灶面积[调研] |
| | | */ |
| | | @TableField("stove_area") |
| | | private BigDecimal stoveArea; |
| | | |
| | | /** |
| | | * 日均排烟时间[调研] |
| | | */ |
| | | @TableField("exhaust_time") |
| | | private String exhaustTime; |
| | | |
| | | /** |
| | | * 备注[调研] |
| | | */ |
| | | @TableField("remark") |
| | | private String remark; |
| | | |
| | | /** |
| | | * 地址 |
| | | */ |
| | | @TableField("addr") |
| | | private String addr; |
| | | |
| | | /** |
| | | * 地区[级联] |
| | | */ |
| | | @TableField("area_id") |
| | | private String areaId; |
| | | |
| | | /** |
| | | * 经度 |
| | | */ |
| | | @TableField("lng") |
| | | private String lng; |
| | | |
| | | /** |
| | | * 纬度 |
| | | */ |
| | | @TableField("lat") |
| | | private String lat; |
| | | |
| | | /** |
| | | * 创建者 |
| | | */ |
| | | @TableField("creator") |
| | | private String creator; |
| | | |
| | | /** |
| | | * 创建日期 |
| | | */ |
| | | @TableField("create_at") |
| | | private Long createAt; |
| | | |
| | | /** |
| | | * 状态[1:一般监测点,2:特殊监测点,99:废弃监测点] |
| | | */ |
| | | @TableField("status") |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 颗粒物含量超标阈值 |
| | | */ |
| | | @TableField("granule_sill") |
| | | private BigDecimal granuleSill; |
| | | |
| | | /** |
| | | * 非甲烷总烃超标阈值 |
| | | */ |
| | | @TableField("hydrocarbon_sill") |
| | | private BigDecimal hydrocarbonSill; |
| | | |
| | | /** |
| | | * 健康码颜色 |
| | | */ |
| | | @TableField("health_code_color") |
| | | private String healthCodeColor; |
| | | |
| | | /** |
| | | * 最后绑定设备mn |
| | | */ |
| | | @TableField("mn_last") |
| | | private String mnLast; |
| | | |
| | | /** |
| | | * 监测点图片 |
| | | */ |
| | | @TableField("locale_pics") |
| | | private String localePics; |
| | | |
| | | /** |
| | | * 设备类型 最后一次绑定 |
| | | */ |
| | | @TableField("mn_typ_last") |
| | | private Integer mnTypLast; |
| | | |
| | | /** |
| | | * 风机信息 |
| | | */ |
| | | @TableField("fan_info") |
| | | private String fanInfo; |
| | | |
| | | /** |
| | | * 取电方式 |
| | | */ |
| | | @TableField("power_supply_mode") |
| | | private String powerSupplyMode; |
| | | |
| | | /** |
| | | * 净化器风机联动比阈值 |
| | | */ |
| | | @TableField("link_ratio_sill") |
| | | private BigDecimal linkRatioSill; |
| | | |
| | | /** |
| | | * 运维人员ID |
| | | */ |
| | | @TableField("maintainer_id") |
| | | private String maintainerId; |
| | | |
| | | /** |
| | | * 绿码:最近X天内,该店家超标次数小等于Value1(默认3)次的,且净化器不正常使用天数小等于Value2(默认3)天的,且离线天数{非歇业、非监测仪故障【数据来源运维人员填写的”异常处理“】}小等于Value3(默认3)。 |
| | | */ |
| | | @TableField("health_code_x") |
| | | private Integer healthCodeX; |
| | | |
| | | @TableField("health_code_value1") |
| | | private Integer healthCodeValue1; |
| | | |
| | | @TableField("health_code_value2") |
| | | private Integer healthCodeValue2; |
| | | |
| | | @TableField("health_code_value3") |
| | | private Integer healthCodeValue3; |
| | | |
| | | /** |
| | | * 红码:最近X天内,该店家超标次数大于Value4(默认5)次的,或者净化器不正常使用天数大于Value5(默认5)天的,且离线天数小于Value6(默认5)。 |
| | | */ |
| | | @TableField("health_code_value4") |
| | | private Integer healthCodeValue4; |
| | | |
| | | @TableField("health_code_value5") |
| | | private Integer healthCodeValue5; |
| | | |
| | | @TableField("health_code_valuee6") |
| | | private Integer healthCodeValuee6; |
| | | |
| | | /** |
| | | * 0~24点间油烟浓度(颗粒物、非甲烷总烃)三个值中的一项值一直小于Value7(默认0.05)mg/M3的,视为数据异常偏小; |
| | | */ |
| | | @TableField("abnormal_value7") |
| | | private BigDecimal abnormalValue7; |
| | | |
| | | /** |
| | | * 0~24点间油烟浓度(颗粒物、非甲烷总烃)三个值中的一项值一直大于Value8(默认30)mg/M3的,视为数据异常偏大; |
| | | */ |
| | | @TableField("abnormal_value78") |
| | | private BigDecimal abnormalValue78; |
| | | |
| | | /** |
| | | * 0~24点间油烟浓度(颗粒物、非甲烷总烃)三个值中的一项值一直非Value9(默认0)mg/M3的,视为数据漂移异常 |
| | | */ |
| | | @TableField("abnormal_value79") |
| | | private BigDecimal abnormalValue79; |
| | | |
| | | /** |
| | | * 0~24点间上线时间小于Value10(默认60)分钟的,视为上线时间过短异常; |
| | | */ |
| | | @TableField("abnormal_value710") |
| | | private BigDecimal abnormalValue710; |
| | | |
| | | /** |
| | | * Ali设备名称 |
| | | */ |
| | | @TableField("aliIot_device_name") |
| | | private String aliiotDeviceName; |
| | | |
| | | /** |
| | | * Ali设备 |
| | | */ |
| | | @TableField("aliIot") |
| | | private String aliIot; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @TableField("created_at") |
| | | private LocalDateTime createdAt; |
| | | |
| | | /** |
| | | * 更新时间 |
| | | */ |
| | | @TableField("updated_at") |
| | | private LocalDateTime updatedAt; |
| | | |
| | | @TableField("health_code_value11") |
| | | private Integer healthCodeValue11; |
| | | |
| | | @TableField("health_code_value12") |
| | | private Integer healthCodeValue12; |
| | | |
| | | /** |
| | | * 监测方式【1:合并传输 2:独立传输】 |
| | | */ |
| | | @TableField("send_mode") |
| | | private Integer sendMode; |
| | | |
| | | /** |
| | | * 超标计算方式【1:抽样计算 2:滑动计算】 |
| | | */ |
| | | @TableField("surpass_calc_method") |
| | | private Integer surpassCalcMethod; |
| | | |
| | | /** |
| | | * 风机正常电流值 |
| | | */ |
| | | @TableField("fan_standardurrent") |
| | | private Integer fanStandardurrent; |
| | | |
| | | /** |
| | | * 净化器正常电流值 |
| | | */ |
| | | @TableField("filter_standard_current") |
| | | private Integer filterStandardCurrent; |
| | | |
| | | /** |
| | | * 设备状态[正常NORMAL、下线OFFLINE、废弃ABANDON] |
| | | */ |
| | | @TableField("status_of_record") |
| | | private String statusOfRecord; |
| | | |
| | | /** |
| | | * 审核备注 |
| | | */ |
| | | @TableField("remark_of_record") |
| | | private String remarkOfRecord; |
| | | |
| | | /** |
| | | * 审核原因 |
| | | */ |
| | | @TableField("cause") |
| | | private String cause; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ycl.smoke.entity; |
| | | |
| | | import java.math.BigDecimal; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.Version; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import java.io.Serializable; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | /** |
| | | * <p> |
| | | * |
| | | * </p> |
| | | * |
| | | * @author lyq |
| | | * @since 2023-02-28 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @TableName("ums_ods_ten_min_data") |
| | | public class OdsTenMinData implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 数据id |
| | | */ |
| | | @TableId("id") |
| | | @JsonProperty("id") |
| | | private String id; |
| | | |
| | | /** |
| | | * 设备编号 |
| | | */ |
| | | @TableField("mn") |
| | | @JsonProperty("mn") |
| | | private String mn; |
| | | |
| | | /** |
| | | * 设备采集时间戳/600 |
| | | */ |
| | | @TableField("acquit_at") |
| | | @JsonProperty("acquit_at") |
| | | private Long acquitAt; |
| | | |
| | | /** |
| | | * 设备十分钟内发送数据的次数 |
| | | */ |
| | | @TableField("counter") |
| | | @JsonProperty("counter") |
| | | private Integer counter; |
| | | |
| | | /** |
| | | * 创建时间的时间戳 |
| | | */ |
| | | @TableField("create_at") |
| | | @JsonProperty("create_at") |
| | | private Long createAt; |
| | | |
| | | /** |
| | | * 实时排放量,这个是10分钟内的累积量 |
| | | */ |
| | | @TableField("emissions_conc") |
| | | @JsonProperty("emissions_conc") |
| | | private Double emissionsConc; |
| | | |
| | | /** |
| | | * 颗粒物含量 |
| | | */ |
| | | @TableField("granule_conc") |
| | | @JsonProperty("granule_conc") |
| | | private Double granuleConc; |
| | | |
| | | /** |
| | | * 非甲烷总烃 |
| | | */ |
| | | @TableField("hydrocarbon_conc") |
| | | @JsonProperty("hydrocarbon_conc") |
| | | private Double hydrocarbonConc; |
| | | |
| | | /** |
| | | * 流速 |
| | | */ |
| | | @TableField("velocity") |
| | | @JsonProperty("velocity") |
| | | private BigDecimal velocity; |
| | | |
| | | /** |
| | | * 温度 |
| | | */ |
| | | @TableField("temperature") |
| | | @JsonProperty("temperature") |
| | | private BigDecimal temperature; |
| | | |
| | | /** |
| | | * 湿度 |
| | | */ |
| | | @TableField("moisture") |
| | | @JsonProperty("moisture") |
| | | private BigDecimal moisture; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ycl.smoke.mapper; |
| | | |
| | | import com.ycl.smoke.entity.OdsAlarmMsg; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * 报警消息 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author lyq |
| | | * @since 2023-02-28 |
| | | */ |
| | | public interface OdsAlarmMsgMapper extends BaseMapper<OdsAlarmMsg> { |
| | | |
| | | } |
New file |
| | |
| | | package com.ycl.smoke.mapper; |
| | | |
| | | import com.ycl.smoke.entity.OdsAlarmRecord; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * 报警记录 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author lyq |
| | | * @since 2023-02-28 |
| | | */ |
| | | public interface OdsAlarmRecordMapper extends BaseMapper<OdsAlarmRecord> { |
| | | |
| | | } |
New file |
| | |
| | | package com.ycl.smoke.mapper; |
| | | |
| | | import com.ycl.smoke.entity.OdsCurAlarm; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * 监测点统计&健康码管理 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author lyq |
| | | * @since 2023-02-28 |
| | | */ |
| | | public interface OdsCurAlarmMapper extends BaseMapper<OdsCurAlarm> { |
| | | |
| | | } |
New file |
| | |
| | | package com.ycl.smoke.mapper; |
| | | |
| | | import com.ycl.smoke.entity.OdsCustomer; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * 组织架构 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author lyq |
| | | * @since 2023-02-28 |
| | | */ |
| | | public interface OdsCustomerMapper extends BaseMapper<OdsCustomer> { |
| | | |
| | | } |
New file |
| | |
| | | package com.ycl.smoke.mapper; |
| | | |
| | | import com.ycl.smoke.entity.OdsDetectorDaily; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * 监测 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author lyq |
| | | * @since 2023-02-28 |
| | | */ |
| | | public interface OdsDetectorDailyMapper extends BaseMapper<OdsDetectorDaily> { |
| | | |
| | | } |
New file |
| | |
| | | package com.ycl.smoke.mapper; |
| | | |
| | | import com.ycl.smoke.entity.OdsInTime; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * 返回实时的设备数据 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author lyq |
| | | * @since 2023-02-28 |
| | | */ |
| | | public interface OdsInTimeMapper extends BaseMapper<OdsInTime> { |
| | | |
| | | } |
New file |
| | |
| | | package com.ycl.smoke.mapper; |
| | | |
| | | import com.ycl.smoke.entity.OdsLocale; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * 监测点信息 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author lyq |
| | | * @since 2023-02-28 |
| | | */ |
| | | public interface OdsLocaleMapper extends BaseMapper<OdsLocale> { |
| | | |
| | | } |
New file |
| | |
| | | package com.ycl.smoke.mapper; |
| | | |
| | | import com.ycl.smoke.entity.OdsTenMinData; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author lyq |
| | | * @since 2023-02-28 |
| | | */ |
| | | public interface OdsTenMinDataMapper extends BaseMapper<OdsTenMinData> { |
| | | |
| | | } |
New file |
| | |
| | | package com.ycl.smoke.remote.dto; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonProperty; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | @Data |
| | | @NoArgsConstructor |
| | | public class AlarmMsgDataVo { |
| | | |
| | | @JsonProperty("Id") |
| | | private String id; |
| | | @JsonProperty("MN") |
| | | private String mn; |
| | | @JsonProperty("AcquitAt") |
| | | private Long acquitAt; |
| | | @JsonProperty("Owner") |
| | | private String owner; |
| | | @JsonProperty("Content") |
| | | private String content; |
| | | @JsonProperty("MsgType") |
| | | private String msgType; |
| | | @JsonProperty("Addr") |
| | | private String addr; |
| | | } |
New file |
| | |
| | | package com.ycl.smoke.remote.dto; |
| | | |
| | | import lombok.Builder; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @Builder |
| | | public class AlarmMsgParamDateDto { |
| | | |
| | | /** |
| | | * 查询创建报警日期 |
| | | */ |
| | | private String CreatedAt; |
| | | /** |
| | | * ExceedStandard超标,AbnormalOffline 异常离线 |
| | | */ |
| | | private String msg_type; |
| | | /** |
| | | * 起始时间戳 |
| | | */ |
| | | private Long Begin; |
| | | /** |
| | | * 结束时间戳 |
| | | */ |
| | | private Long End; |
| | | /** |
| | | * 设备编码 |
| | | */ |
| | | private String mn; |
| | | |
| | | } |
| | | |
| | | |
| | | |
New file |
| | |
| | | package com.ycl.smoke.remote.dto; |
| | | |
| | | import lombok.Builder; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @Builder |
| | | public class AlarmMsgParamDto { |
| | | /** |
| | | * 起始位置 - 必填 |
| | | */ |
| | | private Integer StartAt; |
| | | /** |
| | | * 请求数量 - 必填 |
| | | */ |
| | | private Integer Size; |
| | | /** |
| | | * 1:超标2:异常 - 必填 |
| | | */ |
| | | private Integer Typ; |
| | | |
| | | /** |
| | | * 查询创建报警日期 |
| | | */ |
| | | private AlarmMsgParamDateDto Param; |
| | | } |
| | | |
| | | |
| | | |
New file |
| | |
| | | package com.ycl.smoke.remote.dto; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonProperty; |
| | | import com.ycl.smoke.entity.OdsAlarmMsg; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @NoArgsConstructor |
| | | public class AlarmMsgResponseDto { |
| | | |
| | | @JsonProperty("content") |
| | | private List<OdsAlarmMsg> content; |
| | | |
| | | @JsonProperty("total") |
| | | private Integer total; |
| | | |
| | | } |
| | | |
| | | |
| | | |
New file |
| | |
| | | package com.ycl.smoke.remote.dto; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.OrderBy; |
| | | import lombok.Builder; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @Builder |
| | | public class DetectorDailyParamDto { |
| | | /** |
| | | * 状态[1:正常,2:超标,3:正常离线,4异常离] |
| | | */ |
| | | private Integer Status; |
| | | /** |
| | | * 数据获取日期 |
| | | */ |
| | | private String AcquitDate; |
| | | /** |
| | | * 排序字段 |
| | | */ |
| | | private String OrderBy; |
| | | /** |
| | | * 页序号 |
| | | */ |
| | | private Integer Page; |
| | | /** |
| | | * 每页记录数 |
| | | */ |
| | | private Integer Perpage; |
| | | /** |
| | | * 检查是否安装有设备 |
| | | */ |
| | | private Boolean LocaleWithDevice; |
| | | |
| | | } |
New file |
| | |
| | | package com.ycl.smoke.remote.dto; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonProperty; |
| | | import com.ycl.smoke.entity.OdsAlarmMsg; |
| | | import com.ycl.smoke.entity.OdsDetectorDaily; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @NoArgsConstructor |
| | | public class DetectorDailyResponseDto { |
| | | |
| | | @JsonProperty("content") |
| | | private List<OdsDetectorDaily> content; |
| | | |
| | | @JsonProperty("resultsPageInfo") |
| | | private ResultsPageInfo resultsPageInfo; |
| | | |
| | | } |
| | | |
| | | |
| | | |
New file |
| | |
| | | package com.ycl.smoke.remote.dto; |
| | | |
| | | |
| | | import lombok.Builder; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @Builder |
| | | public class LoginParamDto { |
| | | |
| | | /** |
| | | * 账号 - 必填 |
| | | */ |
| | | private String username; |
| | | /** |
| | | * 密码 - 必填 |
| | | */ |
| | | private String password; |
| | | /** |
| | | * 选择true则无需验证码 |
| | | */ |
| | | private Boolean noCode; |
| | | |
| | | } |
New file |
| | |
| | | package com.ycl.smoke.remote.dto; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonProperty; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | @Data |
| | | @NoArgsConstructor |
| | | public class LoginResponseDto { |
| | | @JsonProperty("Token") |
| | | private String token; |
| | | |
| | | @JsonProperty("Role") |
| | | private String role; |
| | | } |
New file |
| | |
| | | package com.ycl.smoke.remote.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class ResultsPageInfo { |
| | | private Integer Page; |
| | | private Integer PerPage; |
| | | private Integer TotalPage; |
| | | private Integer Total; |
| | | private Integer CurrentTotal; |
| | | } |
New file |
| | |
| | | package com.ycl.smoke.remote.dto; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonProperty; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | @Data |
| | | @NoArgsConstructor |
| | | public class SmokeResultResponseDto<T> { |
| | | @JsonProperty("Msg") |
| | | private String msg; |
| | | /** |
| | | * 200 成功 114 token失效 |
| | | */ |
| | | @JsonProperty("Status") |
| | | private Integer status; |
| | | |
| | | @JsonProperty("Data") |
| | | private T data; |
| | | } |
New file |
| | |
| | | package com.ycl.smoke.remote.dto; |
| | | |
| | | import lombok.Builder; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @Builder |
| | | public class TenMinParamDto { |
| | | /** |
| | | * 设备的编号 |
| | | */ |
| | | private String mn; |
| | | /** |
| | | * 数据获取起始日期(2021-11-01) |
| | | */ |
| | | private String AcquitAtTimeBegin; |
| | | /** |
| | | * 数据获取截止日期 |
| | | */ |
| | | private String AcquitAtTimeEnd; |
| | | |
| | | } |
New file |
| | |
| | | package com.ycl.smoke.remote.service; |
| | | |
| | | import com.ycl.smoke.entity.OdsDetectorDaily; |
| | | import com.ycl.smoke.entity.OdsTenMinData; |
| | | import com.ycl.smoke.remote.dto.*; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestHeader; |
| | | |
| | | import java.util.List; |
| | | |
| | | |
| | | @FeignClient(url = "http://116.62.234.187:8088", name = "smokeApi") |
| | | public interface ISmokeDetectionService { |
| | | |
| | | @PostMapping(value = "/loginAction") |
| | | SmokeResultResponseDto<LoginResponseDto> loginAction(@RequestBody LoginParamDto paramDto); |
| | | |
| | | |
| | | @PostMapping(value = "/admin/listAlarmMsg") |
| | | SmokeResultResponseDto<AlarmMsgResponseDto> getListAlarmMsg(@RequestBody AlarmMsgParamDto paramDto, |
| | | @RequestHeader("Auth") String token); |
| | | |
| | | @PostMapping(value = "/admin/queryDataDetectorDaily2") |
| | | SmokeResultResponseDto<DetectorDailyResponseDto> queryDataDetectorDaily2(@RequestBody DetectorDailyParamDto paramDto, |
| | | @RequestHeader("Auth") String token); |
| | | |
| | | @PostMapping(value = "/admin/queryTenMinData") |
| | | SmokeResultResponseDto<List<OdsTenMinData>> queryTenMinData(@RequestBody TenMinParamDto paramDto, |
| | | @RequestHeader("Auth") String token); |
| | | |
| | | @PostMapping(value = "/admin/listDataIntime") |
| | | SmokeResultResponseDto<DetectorDailyResponseDto> listDataIntime(@RequestBody DetectorDailyParamDto paramDto, |
| | | @RequestHeader("Auth") String token); |
| | | |
| | | @PostMapping(value = "/admin/listLocale") |
| | | SmokeResultResponseDto<DetectorDailyResponseDto> listLocale(@RequestBody DetectorDailyParamDto paramDto, |
| | | @RequestHeader("Auth") String token); |
| | | |
| | | @PostMapping(value = "/admin/queryCustomer") |
| | | SmokeResultResponseDto<DetectorDailyResponseDto> queryCustomer(@RequestBody DetectorDailyParamDto paramDto, |
| | | @RequestHeader("Auth") String token); |
| | | |
| | | |
| | | |
| | | @PostMapping(value = "/admin/listAlarmRecord") |
| | | SmokeResultResponseDto<AlarmMsgResponseDto> getListAlarmRecord(@RequestBody AlarmMsgParamDto paramDto, |
| | | @RequestHeader("Auth") String token); |
| | | |
| | | |
| | | |
| | | @PostMapping(value = "/admin/listCurAlarm") |
| | | SmokeResultResponseDto<AlarmMsgResponseDto> getListCurAlarm(@RequestBody AlarmMsgParamDto paramDto, |
| | | @RequestHeader("Auth") String token); |
| | | |
| | | } |
New file |
| | |
| | | package com.ycl.smoke.service; |
| | | |
| | | import com.ycl.smoke.entity.OdsAlarmMsg; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | /** |
| | | * <p> |
| | | * 报警消息 服务类 |
| | | * </p> |
| | | * |
| | | * @author lyq |
| | | * @since 2023-02-28 |
| | | */ |
| | | public interface IOdsAlarmMsgService extends IService<OdsAlarmMsg> { |
| | | |
| | | } |
New file |
| | |
| | | package com.ycl.smoke.service; |
| | | |
| | | import com.ycl.smoke.entity.OdsAlarmRecord; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | /** |
| | | * <p> |
| | | * 报警记录 服务类 |
| | | * </p> |
| | | * |
| | | * @author lyq |
| | | * @since 2023-02-28 |
| | | */ |
| | | public interface IOdsAlarmRecordService extends IService<OdsAlarmRecord> { |
| | | |
| | | } |
New file |
| | |
| | | package com.ycl.smoke.service; |
| | | |
| | | import com.ycl.smoke.entity.OdsCurAlarm; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | /** |
| | | * <p> |
| | | * 监测点统计&健康码管理 服务类 |
| | | * </p> |
| | | * |
| | | * @author lyq |
| | | * @since 2023-02-28 |
| | | */ |
| | | public interface IOdsCurAlarmService extends IService<OdsCurAlarm> { |
| | | |
| | | } |
New file |
| | |
| | | package com.ycl.smoke.service; |
| | | |
| | | import com.ycl.smoke.entity.OdsCustomer; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | /** |
| | | * <p> |
| | | * 组织架构 服务类 |
| | | * </p> |
| | | * |
| | | * @author lyq |
| | | * @since 2023-02-28 |
| | | */ |
| | | public interface IOdsCustomerService extends IService<OdsCustomer> { |
| | | |
| | | } |
New file |
| | |
| | | package com.ycl.smoke.service; |
| | | |
| | | import com.ycl.smoke.entity.OdsDetectorDaily; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | /** |
| | | * <p> |
| | | * 监测 服务类 |
| | | * </p> |
| | | * |
| | | * @author lyq |
| | | * @since 2023-02-28 |
| | | */ |
| | | public interface IOdsDetectorDailyService extends IService<OdsDetectorDaily> { |
| | | |
| | | } |
New file |
| | |
| | | package com.ycl.smoke.service; |
| | | |
| | | import com.ycl.smoke.entity.OdsInTime; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | /** |
| | | * <p> |
| | | * 返回实时的设备数据 服务类 |
| | | * </p> |
| | | * |
| | | * @author lyq |
| | | * @since 2023-02-28 |
| | | */ |
| | | public interface IOdsInTimeService extends IService<OdsInTime> { |
| | | |
| | | } |
New file |
| | |
| | | package com.ycl.smoke.service; |
| | | |
| | | import com.ycl.smoke.entity.OdsLocale; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | /** |
| | | * <p> |
| | | * 监测点信息 服务类 |
| | | * </p> |
| | | * |
| | | * @author lyq |
| | | * @since 2023-02-28 |
| | | */ |
| | | public interface IOdsLocaleService extends IService<OdsLocale> { |
| | | |
| | | } |
New file |
| | |
| | | package com.ycl.smoke.service; |
| | | |
| | | import com.ycl.smoke.entity.OdsTenMinData; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务类 |
| | | * </p> |
| | | * |
| | | * @author lyq |
| | | * @since 2023-02-28 |
| | | */ |
| | | public interface IOdsTenMinDataService extends IService<OdsTenMinData> { |
| | | |
| | | } |
New file |
| | |
| | | package com.ycl.smoke.service.impl; |
| | | |
| | | import com.ycl.smoke.entity.OdsAlarmMsg; |
| | | import com.ycl.smoke.mapper.OdsAlarmMsgMapper; |
| | | import com.ycl.smoke.service.IOdsAlarmMsgService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 报警消息 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author lyq |
| | | * @since 2023-02-28 |
| | | */ |
| | | @Service |
| | | public class OdsAlarmMsgServiceImpl extends ServiceImpl<OdsAlarmMsgMapper, OdsAlarmMsg> implements IOdsAlarmMsgService { |
| | | |
| | | } |
New file |
| | |
| | | package com.ycl.smoke.service.impl; |
| | | |
| | | import com.ycl.smoke.entity.OdsAlarmRecord; |
| | | import com.ycl.smoke.mapper.OdsAlarmRecordMapper; |
| | | import com.ycl.smoke.service.IOdsAlarmRecordService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 报警记录 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author lyq |
| | | * @since 2023-02-28 |
| | | */ |
| | | @Service |
| | | public class OdsAlarmRecordServiceImpl extends ServiceImpl<OdsAlarmRecordMapper, OdsAlarmRecord> implements IOdsAlarmRecordService { |
| | | |
| | | } |
New file |
| | |
| | | package com.ycl.smoke.service.impl; |
| | | |
| | | import com.ycl.smoke.entity.OdsCurAlarm; |
| | | import com.ycl.smoke.mapper.OdsCurAlarmMapper; |
| | | import com.ycl.smoke.service.IOdsCurAlarmService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 监测点统计&健康码管理 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author lyq |
| | | * @since 2023-02-28 |
| | | */ |
| | | @Service |
| | | public class OdsCurAlarmServiceImpl extends ServiceImpl<OdsCurAlarmMapper, OdsCurAlarm> implements IOdsCurAlarmService { |
| | | |
| | | } |
New file |
| | |
| | | package com.ycl.smoke.service.impl; |
| | | |
| | | import com.ycl.smoke.entity.OdsCustomer; |
| | | import com.ycl.smoke.mapper.OdsCustomerMapper; |
| | | import com.ycl.smoke.service.IOdsCustomerService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 组织架构 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author lyq |
| | | * @since 2023-02-28 |
| | | */ |
| | | @Service |
| | | public class OdsCustomerServiceImpl extends ServiceImpl<OdsCustomerMapper, OdsCustomer> implements IOdsCustomerService { |
| | | |
| | | } |
New file |
| | |
| | | package com.ycl.smoke.service.impl; |
| | | |
| | | import com.ycl.smoke.entity.OdsDetectorDaily; |
| | | import com.ycl.smoke.mapper.OdsDetectorDailyMapper; |
| | | import com.ycl.smoke.service.IOdsDetectorDailyService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 监测 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author lyq |
| | | * @since 2023-02-28 |
| | | */ |
| | | @Service |
| | | public class OdsDetectorDailyServiceImpl extends ServiceImpl<OdsDetectorDailyMapper, OdsDetectorDaily> implements IOdsDetectorDailyService { |
| | | |
| | | } |
New file |
| | |
| | | package com.ycl.smoke.service.impl; |
| | | |
| | | import com.ycl.smoke.entity.OdsInTime; |
| | | import com.ycl.smoke.mapper.OdsInTimeMapper; |
| | | import com.ycl.smoke.service.IOdsInTimeService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 返回实时的设备数据 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author lyq |
| | | * @since 2023-02-28 |
| | | */ |
| | | @Service |
| | | public class OdsInTimeServiceImpl extends ServiceImpl<OdsInTimeMapper, OdsInTime> implements IOdsInTimeService { |
| | | |
| | | } |
New file |
| | |
| | | package com.ycl.smoke.service.impl; |
| | | |
| | | import com.ycl.smoke.entity.OdsLocale; |
| | | import com.ycl.smoke.mapper.OdsLocaleMapper; |
| | | import com.ycl.smoke.service.IOdsLocaleService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 监测点信息 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author lyq |
| | | * @since 2023-02-28 |
| | | */ |
| | | @Service |
| | | public class OdsLocaleServiceImpl extends ServiceImpl<OdsLocaleMapper, OdsLocale> implements IOdsLocaleService { |
| | | |
| | | } |
New file |
| | |
| | | package com.ycl.smoke.service.impl; |
| | | |
| | | import com.ycl.smoke.entity.OdsTenMinData; |
| | | import com.ycl.smoke.mapper.OdsTenMinDataMapper; |
| | | import com.ycl.smoke.service.IOdsTenMinDataService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author lyq |
| | | * @since 2023-02-28 |
| | | */ |
| | | @Service |
| | | public class OdsTenMinDataServiceImpl extends ServiceImpl<OdsTenMinDataMapper, OdsTenMinData> implements IOdsTenMinDataService { |
| | | |
| | | } |
New file |
| | |
| | | package com.ycl.smoke.task; |
| | | |
| | | import com.ycl.service.redis.RedisService; |
| | | import com.ycl.smoke.entity.OdsAlarmMsg; |
| | | import com.ycl.smoke.remote.dto.*; |
| | | import com.ycl.smoke.remote.service.ISmokeDetectionService; |
| | | import com.ycl.smoke.service.IOdsAlarmMsgService; |
| | | import com.ycl.utils.redis.RedisKey; |
| | | import org.apache.velocity.runtime.directive.Foreach; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | @Component |
| | | public class ScheduledTask { |
| | | |
| | | ISmokeDetectionService smokeDetectionService; |
| | | |
| | | IOdsAlarmMsgService alarmMsgService; |
| | | |
| | | @Resource |
| | | private RedisService redisService; |
| | | |
| | | @Autowired |
| | | public void setSmokeDetectionService(ISmokeDetectionService smokeDetectionService) { |
| | | this.smokeDetectionService = smokeDetectionService; |
| | | } |
| | | |
| | | @Autowired |
| | | public void setAlarmMsgService(IOdsAlarmMsgService alarmMsgService) { |
| | | this.alarmMsgService = alarmMsgService; |
| | | } |
| | | |
| | | @Scheduled(cron = "0 0 1 * * ?") // 每天零点执行 |
| | | // @Scheduled(cron = "0 */2 * * * ?") // 每一个分钟执行 0 0/1 * ? |
| | | // @Scheduled(cron = "0/1 * * * * ?") // 每秒执行 |
| | | public void alarmMsgTask() { |
| | | try { |
| | | AlarmMsgParamDto paramDto = AlarmMsgParamDto.builder().StartAt(0).Size(100).build(); |
| | | |
| | | SmokeResultResponseDto<AlarmMsgResponseDto> responseDto = smokeDetectionService.getListAlarmMsg(paramDto, redisService.get(RedisKey.SMOKE_TOKEN).toString()); |
| | | if (responseDto.getStatus() == 200) { |
| | | AlarmMsgResponseDto dto = responseDto.getData(); |
| | | List<OdsAlarmMsg> list = dto.getContent(); |
| | | System.out.println(list.size()); |
| | | list.forEach(o->{ |
| | | try { |
| | | alarmMsgService.save(o); |
| | | } |
| | | catch (Exception ex){ |
| | | |
| | | } |
| | | }); |
| | | // alarmMsgService.saveBatch(list); |
| | | } else if (responseDto.getStatus() == 114) { |
| | | login(); |
| | | alarmMsgTask(); |
| | | } |
| | | } catch (Exception ex) { |
| | | |
| | | } |
| | | } |
| | | |
| | | @Scheduled(cron = "0 0 1 * * ?") // 每天零点执行 |
| | | // @Scheduled(cron = "0 */2 * * * ?") // 每一个分钟执行 0 0/1 * ? |
| | | // @Scheduled(cron = "0/1 * * * * ?") // 每秒执行 |
| | | public void queryDataDetectorDaily2Task() { |
| | | try { |
| | | AlarmMsgParamDto paramDto = AlarmMsgParamDto.builder().StartAt(0).Size(100).build(); |
| | | |
| | | SmokeResultResponseDto<AlarmMsgResponseDto> responseDto = smokeDetectionService.getListAlarmMsg(paramDto, redisService.get(RedisKey.SMOKE_TOKEN).toString()); |
| | | if (responseDto.getStatus() == 200) { |
| | | AlarmMsgResponseDto dto = responseDto.getData(); |
| | | List<OdsAlarmMsg> list = dto.getContent(); |
| | | System.out.println(list.size()); |
| | | list.forEach(o->{ |
| | | try { |
| | | alarmMsgService.save(o); |
| | | } |
| | | catch (Exception ex){ |
| | | |
| | | } |
| | | }); |
| | | // alarmMsgService.saveBatch(list); |
| | | } else if (responseDto.getStatus() == 114) { |
| | | login(); |
| | | queryDataDetectorDaily2Task(); |
| | | } |
| | | } catch (Exception ex) { |
| | | |
| | | } |
| | | } |
| | | |
| | | void login() { |
| | | LoginParamDto loginParamDto = LoginParamDto.builder().username("connect_test2").password("test@234").noCode(true).build(); |
| | | SmokeResultResponseDto<LoginResponseDto> responseDto = smokeDetectionService.loginAction(loginParamDto); |
| | | if (responseDto.getStatus() == 200) { |
| | | System.out.println(responseDto.getData().getToken()); |
| | | redisService.set(RedisKey.SMOKE_TOKEN, responseDto.getData().getToken()); |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | server: |
| | | port: 8084 |
| | | tomcat: |
| | | uri-encoding: UTF-8 |
| | | servlet: |
| | | context-path: /sccg |
| | | compression: true |
| | | |
| | | fdfs: |
| | | fileUrl: http://140.143.152.226:8410/ |
| | | groupName: sczhzf |
| | | soTimeout: 1500 |
| | | connectTimeout: 600 |
| | | trackerList: #TrackerList参数,支持多个 |
| | | - 140.143.152.226:22122 |
| | | |
| | | cfg: |
| | | res: d://resources |
| | | media-res: 140.143.152.226/media/ |
| | | snow-flake: |
| | | datacenterId: 1 |
| | | machineId: 1 |
| | | |
| | | spring: |
| | | redis: |
| | | database: 0 |
| | | host: 42.193.1.25 |
| | | port: 6379 |
| | | password: ycl2018 |
| | | jedis: |
| | | pool: |
| | | max-active: 8 |
| | | max-idle: 8 |
| | | min-idle: 0 |
| | | timeout: 0 |
| | | |
| | | datasource: |
| | | url: jdbc:mysql://42.193.1.25:3306/sccg?useUnicode=true&characterEncoding=utf8&autoReconnect=true&useSSL=false |
| | | username: root |
| | | password: 321$YcYl@1970! |
| | | type: com.alibaba.druid.pool.DruidDataSource |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | filters: stat |
| | | maxActive: 20 |
| | | initialSize: 1 |
| | | maxWait: 60000 |
| | | minIdle: 1 |
| | | timeBetweenEvictionRunsMillis: 60000 |
| | | minEvictableIdleTimeMillis: 300000 |
| | | validationQuery: select 'x' |
| | | testWhileIdle: true |
| | | testOnBorrow: false |
| | | testOnReturn: false |
| | | poolPreparedStatements: true |
| | | maxOpenPreparedStatements: 20 |
| | | |
| | | e-mail: |
| | | sendHost: smtp.qq.com |
| | | username: 1723292425@qq.com |
| | | password: qizcitupatzoeeij |
| | | |
| | | SMS: |
| | | ecName: ycl |
| | | apId: 1 |
| | | sign: sign |
| | | url: http://localhost:8082/sccg/text/sms_res |
| | | |
| | | videoPoint: |
| | | url: http://183.245.159.161:8281 |
| | | port: 8281 |
| | | userName: suichang |
| | | passWord: a12345677 |
| | | ip: 10.10.10.10 |
New file |
| | |
| | | server: |
| | | port: 8083 |
| | | tomcat: |
| | | uri-encoding: UTF-8 |
| | | servlet: |
| | | context-path: /sccg |
| | | compression: true |
| | | |
| | | fdfs: |
| | | fileUrl: http://140.143.152.226:8410/ |
| | | groupName: sczhzf |
| | | soTimeout: 1500 |
| | | connectTimeout: 600 |
| | | trackerList: #TrackerList参数,支持多个 |
| | | - 140.143.152.226:22122 |
| | | - |
| | | cfg: |
| | | res: d://resources |
| | | media-res: 140.143.152.226/media/ |
| | | snow-flake: |
| | | datacenterId: 1 |
| | | machineId: 1 |
| | | |
| | | spring: |
| | | redis: |
| | | database: 0 |
| | | host: localhost |
| | | password: |
| | | jedis: |
| | | pool: |
| | | max-active: 8 |
| | | max-idle: 8 |
| | | min-idle: 0 |
| | | timeout: 0 |
| | | datasource: |
| | | url: jdbc:mysql://42.193.1.25:3306/sccg?useUnicode=true&characterEncoding=utf8&autoReconnect=true&useSSL=false |
| | | username: root |
| | | password: 321$YcYl@1970! |
| | | type: com.alibaba.druid.pool.DruidDataSource |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | filters: stat |
| | | maxActive: 20 |
| | | initialSize: 1 |
| | | maxWait: 60000 |
| | | minIdle: 1 |
| | | timeBetweenEvictionRunsMillis: 60000 |
| | | minEvictableIdleTimeMillis: 300000 |
| | | validationQuery: select 'x' |
| | | testWhileIdle: true |
| | | testOnBorrow: false |
| | | testOnReturn: false |
| | | poolPreparedStatements: true |
| | | maxOpenPreparedStatements: 20 |
| | | |
| | | e-mail: |
| | | sendHost: smtp.qq.com |
| | | username: 1723292425@qq.com |
| | | password: qizcitupatzoeeij |
| | | |
| | | SMS: |
| | | ecName: ycl |
| | | apId: 1 |
| | | sign: sign |
| | | url: http://localhost:8082/sccg/text/sms_res |
| | | |
| | | videoPoint: |
| | | url: http://183.245.159.161:8281 |
| | | port: 8281 |
| | | userName: suichang |
| | | passWord: a12345677 |
| | | ip: 10.10.10.10 |
New file |
| | |
| | | spring: |
| | | profiles: |
| | | active: dev |
| | | main: |
| | | allow-circular-references: true |
| | | allow-bean-definition-overriding: true |
| | | mvc: |
| | | pathmatch: |
| | | matching-strategy: ant_path_matcher |
| | | application: |
| | | name: sccg-platform |
| | | http: |
| | | charset: UTF-8 |
| | | enabled: true |
| | | force: true |
| | | servlet: |
| | | multipart: |
| | | max-file-size: -1 |
| | | max-request-size: -1 |
| | | # jackson: |
| | | # default-property-inclusion: non_null |
| | | |
| | | |
| | | management: |
| | | health: |
| | | rabbit: |
| | | enabled: false |
| | | |
| | | jwt: |
| | | tokenHeader: Authorization #JWT存储的请求头 |
| | | secret: platform-secret #JWT加解密使用的密钥 |
| | | expiration: 604800 #JWT的超期限时间(60*60*24*7) |
| | | tokenHead: 'Bearer ' #JWT负载中拿到开头 |
| | | |
| | | redis: |
| | | database: sccg |
| | | key: |
| | | admin: 'ums:admin' |
| | | resourceList: 'ums:menuList' |
| | | expire: |
| | | common: 86400 # 24小时 |
| | | |
| | | #MP配置 |
| | | mybatis-plus: |
| | | mapper-locations: classpath*:mapper/**/*.xml |
| | | global-config: |
| | | db-config: |
| | | id-type: auto |
| | | #逻辑删除配置字段 |
| | | logic-delete-field: |
| | | #逻辑删除配置字段 1 删除 |
| | | logic-delete-value: 1 |
| | | #逻辑删除配置字段 0 不删除 |
| | | logic-not-delete-value: 0 |
| | | |
| | | knife4j: |
| | | enable: true |
| | | #true则是生产环境不允许访问knife4j |
| | | production: false |
| | | |
| | | |
| | | security: |
| | | basic: |
| | | enabled: false |
| | | secure: |
| | | ignored: |
| | | urls: #配置白名单路径 |
| | | - /swagger-ui.html |
| | | - /swagger/** |
| | | - /swagger-ui/* |
| | | - /swagger-resources/** |
| | | - /**/v2/api-docs |
| | | - /doc.html |
| | | - /webjars/** |
| | | - /**/*.html |
| | | - /**/*.js |
| | | - /**/*.css |
| | | - /**/*.png |
| | | - /favicon.ico |
| | | - /actuator/** |
| | | - /druid/** |
| | | - /**/admin/login |
| | | - /**/admin/register |
| | | - /**/admin/info |
| | | - /**/admin/logout |
| | | - /dict/** |
| | | - /sccg-region/** |
| | | - /**/system/portal/logo/search |
| | | - /**/unauthorized/** |
| | | - /**/api/** |
| | | - /**/text/** |
| | | - /**/API/** |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <configuration> |
| | | <property name="LOG_HOME" value="${user.dir}/logs/ycl/platform" /> |
| | | |
| | | <appender name="Console" class="ch.qos.logback.core.ConsoleAppender"> |
| | | <encoder> |
| | | <pattern>%d{H:mm} %-5level [%logger{16}] %msg%n</pattern> |
| | | </encoder> |
| | | </appender> |
| | | <!-- class="ch.qos.logback.core.rolling.RollingFileAppender">--> |
| | | <appender name="normalLog" |
| | | class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| | | <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> |
| | | <FileNamePattern>${LOG_HOME}/normal/%d{yyyy-MM-dd}/%i.log</FileNamePattern> |
| | | <MaxHistory>30</MaxHistory> |
| | | <maxFileSize>2MB</maxFileSize> |
| | | </rollingPolicy> |
| | | <!--<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> |
| | | <FileNamePattern>${LOG_HOME}/job.normal.%d{yyyy-MM-dd}.log |
| | | </FileNamePattern> |
| | | <MaxHistory>30</MaxHistory> |
| | | </rollingPolicy> |
| | | <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> |
| | | <maxFileSize>10MB</maxFileSize> |
| | | </triggeringPolicy>--> |
| | | <layout class="ch.qos.logback.classic.PatternLayout"> |
| | | <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{16} - %msg%n |
| | | </pattern> |
| | | </layout> |
| | | <filter class="ch.qos.logback.classic.filter.LevelFilter"> |
| | | <level>ERROR</level> |
| | | <onMatch>DENY</onMatch> |
| | | <onMismatch>ACCEPT</onMismatch> |
| | | </filter> |
| | | </appender> |
| | | |
| | | <appender name="ASYNC-INFO" class="ch.qos.logback.classic.AsyncAppender"> |
| | | <discardingThreshold>0</discardingThreshold> |
| | | <queueSize>256</queueSize> |
| | | <appender-ref ref="normalLog"/> |
| | | </appender> |
| | | |
| | | |
| | | |
| | | <appender name="errorLog" |
| | | class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| | | |
| | | <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> |
| | | <FileNamePattern>${LOG_HOME}/error/%d{yyyy-MM-dd}/%i.log</FileNamePattern> |
| | | <MaxHistory>30</MaxHistory> |
| | | <maxFileSize>2MB</maxFileSize> |
| | | </rollingPolicy> |
| | | <!--<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> |
| | | <FileNamePattern>${LOG_HOME}/job.error.%d{yyyy-MM-dd}.log |
| | | </FileNamePattern> |
| | | <MaxHistory>30</MaxHistory> |
| | | </rollingPolicy> |
| | | <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> |
| | | <maxFileSize>10MB</maxFileSize> |
| | | </triggeringPolicy>--> |
| | | <layout class="ch.qos.logback.classic.PatternLayout"> |
| | | <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{16} - %msg%n |
| | | </pattern> |
| | | </layout> |
| | | <filter class="ch.qos.logback.classic.filter.LevelFilter"> |
| | | <level>ERROR</level> |
| | | <onMatch>ACCEPT</onMatch> |
| | | <onMismatch>DENY</onMismatch> |
| | | </filter> |
| | | </appender> |
| | | |
| | | |
| | | |
| | | <appender name="ASYNC-ERROR" class="ch.qos.logback.classic.AsyncAppender"> |
| | | <discardingThreshold>0</discardingThreshold> |
| | | <queueSize>256</queueSize> |
| | | <appender-ref ref="errorLog"/> |
| | | </appender> |
| | | |
| | | <appender name="ASYNC-CONSOLE" class="ch.qos.logback.classic.AsyncAppender"> |
| | | <discardingThreshold>0</discardingThreshold> |
| | | <queueSize>256</queueSize> |
| | | <appender-ref ref="Console"/> |
| | | </appender> |
| | | |
| | | |
| | | |
| | | <!-- <logger name="com.ycl" level="debug" > |
| | | |
| | | </logger >--> |
| | | <springProfile name="dev"> |
| | | <!--打印SQL--> |
| | | <logger name="java.sql.Connection" level="DEBUG" /> |
| | | <logger name="java.sql.Statement" level="DEBUG" /> |
| | | <logger name="java.sql.PreparedStatement" level="DEBUG" /> |
| | | |
| | | <logger name="com.ycl.component" level="error" /> |
| | | |
| | | <logger name="com.ycl" level="debug" > |
| | | <appender-ref ref="normalLog" /> |
| | | <appender-ref ref="errorLog" /> |
| | | </logger> |
| | | |
| | | <root level="info"> |
| | | <appender-ref ref="Console" /> |
| | | <appender-ref ref="normalLog" /> |
| | | <appender-ref ref="errorLog" /> |
| | | </root> |
| | | </springProfile> |
| | | |
| | | <springProfile name="pro"> |
| | | <!--打印SQL--> |
| | | <logger name="java.sql.Connection" level="ERROR" /> |
| | | <logger name="java.sql.Statement" level="ERROR" /> |
| | | <logger name="java.sql.PreparedStatement" level="ERROR" /> |
| | | <logger name="com.ycl" level="debug" > |
| | | <appender-ref ref="normalLog" /> |
| | | <appender-ref ref="errorLog" /> |
| | | </logger> |
| | | <root level="info"> |
| | | <appender-ref ref="Console" /> |
| | | </root> |
| | | </springProfile> |
| | | |
| | | |
| | | |
| | | |
| | | </configuration> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ycl.smoke.mapper.OdsAlarmMsgMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ycl.smoke.entity.OdsAlarmMsg"> |
| | | <id column="id" property="id" /> |
| | | <result column="mn" property="mn" /> |
| | | <result column="acquit_at" property="acquitAt" /> |
| | | <result column="owner" property="owner" /> |
| | | <result column="content" property="content" /> |
| | | <result column="msg_type" property="msgType" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, mn, acquit_at, owner, content, msg_type |
| | | </sql> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ycl.smoke.mapper.OdsAlarmRecordMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ycl.smoke.entity.OdsAlarmRecord"> |
| | | <id column="id" property="id" /> |
| | | <result column="local_id" property="localId" /> |
| | | <result column="mn" property="mn" /> |
| | | <result column="typ" property="typ" /> |
| | | <result column="alarm_date" property="alarmDate" /> |
| | | <result column="device_type" property="deviceType" /> |
| | | <result column="acquit_at" property="acquitAt" /> |
| | | <result column="process_at" property="processAt" /> |
| | | <result column="owner" property="owner" /> |
| | | <result column="solution" property="solution" /> |
| | | <result column="processing_address" property="processingAddress" /> |
| | | <result column="addr" property="addr" /> |
| | | <result column="process_user_id" property="processUserId" /> |
| | | <result column="process_user_name" property="processUserName" /> |
| | | <result column="process_reason" property="processReason" /> |
| | | <result column="created_at" property="createdAt" /> |
| | | <result column="update_at" property="updateAt" /> |
| | | <result column="total" property="total" /> |
| | | <result column="alarm_record_pics" property="alarmRecordPics" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, local_id, mn, typ, alarm_date, device_type, acquit_at, process_at, owner, solution, processing_address, addr, process_user_id, process_user_name, process_reason, created_at, update_at, total, alarm_record_pics |
| | | </sql> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ycl.smoke.mapper.OdsCurAlarmMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ycl.smoke.entity.OdsCurAlarm"> |
| | | <id column="id" property="id" /> |
| | | <result column="abnormal_off_line_days" property="abnormalOffLineDays" /> |
| | | <result column="abnormal_off_line_process_ratio" property="abnormalOffLineProcessRatio" /> |
| | | <result column="abnormal_off_line_to_process_days" property="abnormalOffLineToProcessDays" /> |
| | | <result column="addr" property="addr" /> |
| | | <result column="c_emissions" property="cEmissions" /> |
| | | <result column="c_emissions_avg_online" property="cEmissionsAvgOnline" /> |
| | | <result column="c_emissions_max" property="cEmissionsMax" /> |
| | | <result column="c_emissions_max_date" property="cEmissionsMaxDate" /> |
| | | <result column="c_granule" property="cGranule" /> |
| | | <result column="c_hydrocarbon" property="cHydrocarbon" /> |
| | | <result column="cuisine_name" property="cuisineName" /> |
| | | <result column="customer_bl_no" property="customerBlNo" /> |
| | | <result column="customer_contact" property="customerContact" /> |
| | | <result column="customer_mobile" property="customerMobile" /> |
| | | <result column="customer_name" property="customerName" /> |
| | | <result column="detector_failure_days" property="detectorFailureDays" /> |
| | | <result column="emissions_sill" property="emissionsSill" /> |
| | | <result column="excess_num" property="excessNum" /> |
| | | <result column="excess_to_process_days" property="excessToProcessDays" /> |
| | | <result column="filter_abnormally_used_days" property="filterAbnormallyUsedDays" /> |
| | | <result column="filter_wash_times" property="filterWashTimes" /> |
| | | <result column="granuli_sill" property="granuliSill" /> |
| | | <result column="health_code_color" property="healthCodeColor" /> |
| | | <result column="hydrocarbon_sill" property="hydrocarbonSill" /> |
| | | <result column="locale_id" property="localeId" /> |
| | | <result column="local_lat" property="localLat" /> |
| | | <result column="local_lng" property="localLng" /> |
| | | <result column="mn" property="mn" /> |
| | | <result column="name" property="name" /> |
| | | <result column="off_line_cause_by_shop_days" property="offLineCauseByShopDays" /> |
| | | <result column="owner" property="owner" /> |
| | | <result column="shop_close_days" property="shopCloseDays" /> |
| | | <result column="status" property="status" /> |
| | | <result column="status_desc" property="statusDesc" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, abnormal_off_line_days, abnormal_off_line_process_ratio, abnormal_off_line_to_process_days, addr, c_emissions, c_emissions_avg_online, c_emissions_max, c_emissions_max_date, c_granule, c_hydrocarbon, cuisine_name, customer_bl_no, customer_contact, customer_mobile, customer_name, detector_failure_days, emissions_sill, excess_num, excess_to_process_days, filter_abnormally_used_days, filter_wash_times, granuli_sill, health_code_color, hydrocarbon_sill, locale_id, local_lat, local_lng, mn, name, off_line_cause_by_shop_days, owner, shop_close_days, status, status_desc |
| | | </sql> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ycl.smoke.mapper.OdsCustomerMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ycl.smoke.entity.OdsCustomer"> |
| | | <id column="id" property="id" /> |
| | | <result column="pid" property="pid" /> |
| | | <result column="bl_no" property="blNo" /> |
| | | <result column="bl_name" property="blName" /> |
| | | <result column="org" property="org" /> |
| | | <result column="name" property="name" /> |
| | | <result column="contact" property="contact" /> |
| | | <result column="mobile" property="mobile" /> |
| | | <result column="telephone" property="telephone" /> |
| | | <result column="typ" property="typ" /> |
| | | <result column="creator" property="creator" /> |
| | | <result column="create_at" property="createAt" /> |
| | | <result column="status" property="status" /> |
| | | <result column="address" property="address" /> |
| | | <result column="logo" property="logo" /> |
| | | <result column="business_hour" property="businessHour" /> |
| | | <result column="maintainer_id" property="maintainerId" /> |
| | | <result column="area_ids" property="areaIds" /> |
| | | <result column="area_id_cascads" property="areaIdCascads" /> |
| | | <result column="areas" property="areas" /> |
| | | <result column="desc" property="desc" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, pid, bl_no, bl_name, org, name, contact, mobile, telephone, typ, creator, create_at, status, address, logo, business_hour, maintainer_id, area_ids, area_id_cascads, areas, desc |
| | | </sql> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ycl.smoke.mapper.OdsDetectorDailyMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ycl.smoke.entity.OdsDetectorDaily"> |
| | | <id column="id" property="id" /> |
| | | <result column="mn" property="mn" /> |
| | | <result column="owner" property="owner" /> |
| | | <result column="acquit_at" property="acquitAt" /> |
| | | <result column="acquit_date" property="acquitDate" /> |
| | | <result column="create_at" property="createAt" /> |
| | | <result column="c_emissions" property="cEmissions" /> |
| | | <result column="c_granule" property="cGranule" /> |
| | | <result column="c_hydrocarbon" property="cHydrocarbon" /> |
| | | <result column="e_missions" property="eMissions" /> |
| | | <result column="granule" property="granule" /> |
| | | <result column="hydrocarbon" property="hydrocarbon" /> |
| | | <result column="velocity" property="velocity" /> |
| | | <result column="temperature" property="temperature" /> |
| | | <result column="moisture" property="moisture" /> |
| | | <result column="red_pm25" property="redPm25" /> |
| | | <result column="red_pm10" property="redPm10" /> |
| | | <result column="red_emissions" property="redEmissions" /> |
| | | <result column="red_vocs" property="redVocs" /> |
| | | <result column="device_num" property="deviceNum" /> |
| | | <result column="status" property="status" /> |
| | | <result column="filter_fan_link_ratio" property="filterFanLinkRatio" /> |
| | | <result column="filter_abnormally_used" property="filterAbnormallyUsed" /> |
| | | <result column="c_emissions_exceed_standard" property="cEmissionsExceedStandard" /> |
| | | <result column="c_granule_exceed_standard" property="cGranuleExceedStandard" /> |
| | | <result column="c_hydrocarbon_exceed_standard" property="cHydrocarbonExceedStandard" /> |
| | | <result column="locale_id" property="localeId" /> |
| | | <result column="customer_id" property="customerId" /> |
| | | <result column="customer" property="customer" /> |
| | | <result column="locale_emissions_sill" property="localeEmissionsSill" /> |
| | | <result column="locale_granule_sill" property="localeGranuleSill" /> |
| | | <result column="locale_hydrocarbon_sill" property="localeHydrocarbonSill" /> |
| | | <result column="locale_name" property="localeName" /> |
| | | <result column="locale_addr" property="localeAddr" /> |
| | | <result column="abnormal_off_line" property="abnormalOffLine" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, mn, owner, acquit_at, acquit_date, create_at, c_emissions, c_granule, c_hydrocarbon, e_missions, granule, hydrocarbon, velocity, temperature, moisture, red_pm25, red_pm10, red_emissions, red_vocs, device_num, status, filter_fan_link_ratio, filter_abnormally_used, c_emissions_exceed_standard, c_granule_exceed_standard, c_hydrocarbon_exceed_standard, locale_id, customer_id, customer, locale_emissions_sill, locale_granule_sill, locale_hydrocarbon_sill, locale_name, locale_addr, abnormal_off_line |
| | | </sql> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ycl.smoke.mapper.OdsInTimeMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ycl.smoke.entity.OdsInTime"> |
| | | <id column="id" property="id" /> |
| | | <result column="string" property="string" /> |
| | | <result column="acquit_at" property="acquitAt" /> |
| | | <result column="last_at" property="lastAt" /> |
| | | <result column="c_emissions" property="cEmissions" /> |
| | | <result column="c_granule" property="cGranule" /> |
| | | <result column="c_hydrocarbon" property="cHydrocarbon" /> |
| | | <result column="emissions_conc" property="emissionsConc" /> |
| | | <result column="granule_conc" property="granuleConc" /> |
| | | <result column="hydrocarbon_conc" property="hydrocarbonConc" /> |
| | | <result column="fan_status" property="fanStatus" /> |
| | | <result column="filter_status" property="filterStatus" /> |
| | | <result column="typ" property="typ" /> |
| | | <result column="status" property="status" /> |
| | | <result column="velocity" property="velocity" /> |
| | | <result column="temperature" property="temperature" /> |
| | | <result column="moisture" property="moisture" /> |
| | | <result column="locale" property="locale" /> |
| | | <result column="lid" property="lid" /> |
| | | <result column="owner" property="owner" /> |
| | | <result column="addr" property="addr" /> |
| | | <result column="emissions_sill" property="emissionsSill" /> |
| | | <result column="granule_sill" property="granuleSill" /> |
| | | <result column="hydrocarbon_sill" property="hydrocarbonSill" /> |
| | | <result column="link_status" property="linkStatus" /> |
| | | <result column="customer_mobile" property="customerMobile" /> |
| | | <result column="locale_lng" property="localeLng" /> |
| | | <result column="localelat" property="localelat" /> |
| | | <result column="fan_current" property="fanCurrent" /> |
| | | <result column="pur_current" property="purCurrent" /> |
| | | <result column="online_status" property="onlineStatus" /> |
| | | <result column="status_of_record" property="statusOfRecord" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, string, acquit_at, last_at, c_emissions, c_granule, c_hydrocarbon, emissions_conc, granule_conc, hydrocarbon_conc, fan_status, filter_status, typ, status, velocity, temperature, moisture, locale, lid, owner, addr, emissions_sill, granule_sill, hydrocarbon_sill, link_status, customer_mobile, locale_lng, localelat, fan_current, pur_current, online_status, status_of_record |
| | | </sql> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ycl.smoke.mapper.OdsLocaleMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ycl.smoke.entity.OdsLocale"> |
| | | <id column="id" property="id" /> |
| | | <result column="n_name" property="nName" /> |
| | | <result column="owner" property="owner" /> |
| | | <result column="cuisine" property="cuisine" /> |
| | | <result column="customer_id" property="customerId" /> |
| | | <result column="customer" property="customer" /> |
| | | <result column="fan_speed" property="fanSpeed" /> |
| | | <result column="fan_quantity" property="fanQuantity" /> |
| | | <result column="pipe_area" property="pipeArea" /> |
| | | <result column="stove_num" property="stoveNum" /> |
| | | <result column="offline_judge" property="offlineJudge" /> |
| | | <result column="fan_status" property="fanStatus" /> |
| | | <result column="filter_info" property="filterInfo" /> |
| | | <result column="filter_status" property="filterStatus" /> |
| | | <result column="samplings" property="samplings" /> |
| | | <result column="link_status" property="linkStatus" /> |
| | | <result column="emissions_sill" property="emissionsSill" /> |
| | | <result column="stove_area" property="stoveArea" /> |
| | | <result column="exhaust_time" property="exhaustTime" /> |
| | | <result column="remark" property="remark" /> |
| | | <result column="addr" property="addr" /> |
| | | <result column="area_id" property="areaId" /> |
| | | <result column="lng" property="lng" /> |
| | | <result column="lat" property="lat" /> |
| | | <result column="creator" property="creator" /> |
| | | <result column="create_at" property="createAt" /> |
| | | <result column="status" property="status" /> |
| | | <result column="granule_sill" property="granuleSill" /> |
| | | <result column="hydrocarbon_sill" property="hydrocarbonSill" /> |
| | | <result column="health_code_color" property="healthCodeColor" /> |
| | | <result column="mn_last" property="mnLast" /> |
| | | <result column="locale_pics" property="localePics" /> |
| | | <result column="mn_typ_last" property="mnTypLast" /> |
| | | <result column="fan_info" property="fanInfo" /> |
| | | <result column="power_supply_mode" property="powerSupplyMode" /> |
| | | <result column="link_ratio_sill" property="linkRatioSill" /> |
| | | <result column="maintainer_id" property="maintainerId" /> |
| | | <result column="health_code_x" property="healthCodeX" /> |
| | | <result column="health_code_value1" property="healthCodeValue1" /> |
| | | <result column="health_code_value2" property="healthCodeValue2" /> |
| | | <result column="health_code_value3" property="healthCodeValue3" /> |
| | | <result column="health_code_value4" property="healthCodeValue4" /> |
| | | <result column="health_code_value5" property="healthCodeValue5" /> |
| | | <result column="health_code_valuee6" property="healthCodeValuee6" /> |
| | | <result column="abnormal_value7" property="abnormalValue7" /> |
| | | <result column="abnormal_value78" property="abnormalValue78" /> |
| | | <result column="abnormal_value79" property="abnormalValue79" /> |
| | | <result column="abnormal_value710" property="abnormalValue710" /> |
| | | <result column="aliIot_device_name" property="aliiotDeviceName" /> |
| | | <result column="aliIot" property="aliIot" /> |
| | | <result column="created_at" property="createdAt" /> |
| | | <result column="updated_at" property="updatedAt" /> |
| | | <result column="health_code_value11" property="healthCodeValue11" /> |
| | | <result column="health_code_value12" property="healthCodeValue12" /> |
| | | <result column="send_mode" property="sendMode" /> |
| | | <result column="surpass_calc_method" property="surpassCalcMethod" /> |
| | | <result column="fan_standardurrent" property="fanStandardurrent" /> |
| | | <result column="filter_standard_current" property="filterStandardCurrent" /> |
| | | <result column="status_of_record" property="statusOfRecord" /> |
| | | <result column="remark_of_record" property="remarkOfRecord" /> |
| | | <result column="cause" property="cause" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, n_name, owner, cuisine, customer_id, customer, fan_speed, fan_quantity, pipe_area, stove_num, offline_judge, fan_status, filter_info, filter_status, samplings, link_status, emissions_sill, stove_area, exhaust_time, remark, addr, area_id, lng, lat, creator, create_at, status, granule_sill, hydrocarbon_sill, health_code_color, mn_last, locale_pics, mn_typ_last, fan_info, power_supply_mode, link_ratio_sill, maintainer_id, health_code_x, health_code_value1, health_code_value2, health_code_value3, health_code_value4, health_code_value5, health_code_valuee6, abnormal_value7, abnormal_value78, abnormal_value79, abnormal_value710, aliIot_device_name, aliIot, created_at, updated_at, health_code_value11, health_code_value12, send_mode, surpass_calc_method, fan_standardurrent, filter_standard_current, status_of_record, remark_of_record, cause |
| | | </sql> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ycl.smoke.mapper.OdsTenMinDataMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ycl.smoke.entity.OdsTenMinData"> |
| | | <id column="id" property="id" /> |
| | | <result column="mn" property="mn" /> |
| | | <result column="acquit_at" property="acquitAt" /> |
| | | <result column="counter" property="counter" /> |
| | | <result column="create_at" property="createAt" /> |
| | | <result column="emissions_conc" property="emissionsConc" /> |
| | | <result column="granule_conc" property="granuleConc" /> |
| | | <result column="hydrocarbon_conc" property="hydrocarbonConc" /> |
| | | <result column="velocity" property="velocity" /> |
| | | <result column="temperature" property="temperature" /> |
| | | <result column="moisture" property="moisture" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, mn, acquit_at, counter, create_at, emissions_conc, granule_conc, hydrocarbon_conc, velocity, temperature, moisture |
| | | </sql> |
| | | |
| | | </mapper> |