Commit 99c38505 authored by kiritoausna's avatar kiritoausna

2022-4-25

parent 3e7c9a85
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
package me.zhengjie.annotation; package me.zhengjie.annotation;
import me.zhengjie.aspect.LimitType; import me.zhengjie.aspect.LimitType;
import java.lang.annotation.ElementType; import java.lang.annotation.ElementType;
import java.lang.annotation.Retention; import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy; import java.lang.annotation.RetentionPolicy;
......
...@@ -16,17 +16,13 @@ ...@@ -16,17 +16,13 @@
package me.zhengjie.annotation.rest; package me.zhengjie.annotation.rest;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import me.zhengjie.annotation.AnonymousAccess; import me.zhengjie.annotation.AnonymousAccess;
import org.springframework.core.annotation.AliasFor; import org.springframework.core.annotation.AliasFor;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestMethod;
import java.lang.annotation.*;
/** /**
* Annotation for mapping HTTP {@code DELETE} requests onto specific handler * Annotation for mapping HTTP {@code DELETE} requests onto specific handler
* methods. * methods.
......
...@@ -16,17 +16,13 @@ ...@@ -16,17 +16,13 @@
package me.zhengjie.annotation.rest; package me.zhengjie.annotation.rest;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import me.zhengjie.annotation.AnonymousAccess; import me.zhengjie.annotation.AnonymousAccess;
import org.springframework.core.annotation.AliasFor; import org.springframework.core.annotation.AliasFor;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestMethod;
import java.lang.annotation.*;
/** /**
* Annotation for mapping HTTP {@code GET} requests onto specific handler * Annotation for mapping HTTP {@code GET} requests onto specific handler
* methods. * methods.
......
...@@ -16,17 +16,13 @@ ...@@ -16,17 +16,13 @@
package me.zhengjie.annotation.rest; package me.zhengjie.annotation.rest;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import me.zhengjie.annotation.AnonymousAccess; import me.zhengjie.annotation.AnonymousAccess;
import org.springframework.core.annotation.AliasFor; import org.springframework.core.annotation.AliasFor;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestMethod;
import java.lang.annotation.*;
/** /**
* Annotation for mapping HTTP {@code PATCH} requests onto specific handler * Annotation for mapping HTTP {@code PATCH} requests onto specific handler
* methods. * methods.
......
...@@ -16,17 +16,13 @@ ...@@ -16,17 +16,13 @@
package me.zhengjie.annotation.rest; package me.zhengjie.annotation.rest;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import me.zhengjie.annotation.AnonymousAccess; import me.zhengjie.annotation.AnonymousAccess;
import org.springframework.core.annotation.AliasFor; import org.springframework.core.annotation.AliasFor;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestMethod;
import java.lang.annotation.*;
/** /**
* Annotation for mapping HTTP {@code POST} requests onto specific handler * Annotation for mapping HTTP {@code POST} requests onto specific handler
* methods. * methods.
......
...@@ -16,17 +16,13 @@ ...@@ -16,17 +16,13 @@
package me.zhengjie.annotation.rest; package me.zhengjie.annotation.rest;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import me.zhengjie.annotation.AnonymousAccess; import me.zhengjie.annotation.AnonymousAccess;
import org.springframework.core.annotation.AliasFor; import org.springframework.core.annotation.AliasFor;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestMethod;
import java.lang.annotation.*;
/** /**
* Annotation for mapping HTTP {@code PUT} requests onto specific handler * Annotation for mapping HTTP {@code PUT} requests onto specific handler
* methods. * methods.
......
...@@ -31,6 +31,7 @@ import org.springframework.data.redis.core.RedisTemplate; ...@@ -31,6 +31,7 @@ import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.script.DefaultRedisScript; import org.springframework.data.redis.core.script.DefaultRedisScript;
import org.springframework.data.redis.core.script.RedisScript; import org.springframework.data.redis.core.script.RedisScript;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.lang.reflect.Method; import java.lang.reflect.Method;
......
...@@ -3,6 +3,7 @@ package me.zhengjie.base; ...@@ -3,6 +3,7 @@ package me.zhengjie.base;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringBuilder;
import java.io.Serializable; import java.io.Serializable;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import java.sql.Timestamp; import java.sql.Timestamp;
......
...@@ -24,6 +24,7 @@ import org.hibernate.annotations.UpdateTimestamp; ...@@ -24,6 +24,7 @@ import org.hibernate.annotations.UpdateTimestamp;
import org.springframework.data.annotation.CreatedBy; import org.springframework.data.annotation.CreatedBy;
import org.springframework.data.annotation.LastModifiedBy; import org.springframework.data.annotation.LastModifiedBy;
import org.springframework.data.jpa.domain.support.AuditingEntityListener; import org.springframework.data.jpa.domain.support.AuditingEntityListener;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.EntityListeners; import javax.persistence.EntityListeners;
import javax.persistence.MappedSuperclass; import javax.persistence.MappedSuperclass;
......
...@@ -18,6 +18,7 @@ package me.zhengjie.config; ...@@ -18,6 +18,7 @@ package me.zhengjie.config;
import me.zhengjie.utils.SecurityUtils; import me.zhengjie.utils.SecurityUtils;
import org.springframework.data.domain.AuditorAware; import org.springframework.data.domain.AuditorAware;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import java.util.Optional; import java.util.Optional;
/** /**
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
package me.zhengjie.config; package me.zhengjie.config;
import lombok.Data; import lombok.Data;
import me.zhengjie.utils.StringUtils;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
......
...@@ -18,6 +18,7 @@ package me.zhengjie.config; ...@@ -18,6 +18,7 @@ package me.zhengjie.config;
import me.zhengjie.utils.SecurityUtils; import me.zhengjie.utils.SecurityUtils;
import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.GrantedAuthority;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
......
...@@ -39,6 +39,7 @@ import org.springframework.data.redis.core.RedisTemplate; ...@@ -39,6 +39,7 @@ import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.serializer.RedisSerializationContext; import org.springframework.data.redis.serializer.RedisSerializationContext;
import org.springframework.data.redis.serializer.RedisSerializer; import org.springframework.data.redis.serializer.RedisSerializer;
import reactor.util.annotation.Nullable; import reactor.util.annotation.Nullable;
import java.nio.charset.Charset; import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
import java.time.Duration; import java.time.Duration;
......
...@@ -34,8 +34,10 @@ import springfox.documentation.spi.DocumentationType; ...@@ -34,8 +34,10 @@ import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spi.service.contexts.SecurityContext; import springfox.documentation.spi.service.contexts.SecurityContext;
import springfox.documentation.spring.web.plugins.Docket; import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2; import springfox.documentation.swagger2.annotations.EnableSwagger2;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import static com.google.common.collect.Lists.newArrayList; import static com.google.common.collect.Lists.newArrayList;
import static springfox.documentation.schema.AlternateTypeRules.newRule; import static springfox.documentation.schema.AlternateTypeRules.newRule;
......
...@@ -17,6 +17,7 @@ package me.zhengjie.exception; ...@@ -17,6 +17,7 @@ package me.zhengjie.exception;
import lombok.Getter; import lombok.Getter;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import static org.springframework.http.HttpStatus.BAD_REQUEST; import static org.springframework.http.HttpStatus.BAD_REQUEST;
/** /**
......
...@@ -17,6 +17,7 @@ package me.zhengjie.exception.handler; ...@@ -17,6 +17,7 @@ package me.zhengjie.exception.handler;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data; import lombok.Data;
import java.time.LocalDateTime; import java.time.LocalDateTime;
/** /**
......
...@@ -26,8 +26,10 @@ import org.springframework.security.authentication.BadCredentialsException; ...@@ -26,8 +26,10 @@ import org.springframework.security.authentication.BadCredentialsException;
import org.springframework.web.bind.MethodArgumentNotValidException; import org.springframework.web.bind.MethodArgumentNotValidException;
import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice; import org.springframework.web.bind.annotation.RestControllerAdvice;
import java.util.Objects; import java.util.Objects;
import static org.springframework.http.HttpStatus.*;
import static org.springframework.http.HttpStatus.NOT_FOUND;
/** /**
* @author Zheng Jie * @author Zheng Jie
......
...@@ -25,6 +25,7 @@ import org.apache.poi.xssf.streaming.SXSSFSheet; ...@@ -25,6 +25,7 @@ import org.apache.poi.xssf.streaming.SXSSFSheet;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import javax.servlet.ServletOutputStream; import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
......
...@@ -16,7 +16,11 @@ ...@@ -16,7 +16,11 @@
package me.zhengjie.utils; package me.zhengjie.utils;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import java.util.*;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
/** /**
* 分页工具 * 分页工具
......
...@@ -21,9 +21,13 @@ import cn.hutool.core.util.ObjectUtil; ...@@ -21,9 +21,13 @@ import cn.hutool.core.util.ObjectUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import me.zhengjie.annotation.DataPermission; import me.zhengjie.annotation.DataPermission;
import me.zhengjie.annotation.Query; import me.zhengjie.annotation.Query;
import javax.persistence.criteria.*; import javax.persistence.criteria.*;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import java.util.*; import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
/** /**
* @author Zheng Jie * @author Zheng Jie
......
...@@ -22,7 +22,10 @@ import org.slf4j.LoggerFactory; ...@@ -22,7 +22,10 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.redis.connection.RedisConnection; import org.springframework.data.redis.connection.RedisConnection;
import org.springframework.data.redis.connection.RedisConnectionFactory; import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.core.*; import org.springframework.data.redis.core.Cursor;
import org.springframework.data.redis.core.RedisConnectionUtils;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.ScanOptions;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import java.util.*; import java.util.*;
......
...@@ -17,6 +17,7 @@ package me.zhengjie.utils; ...@@ -17,6 +17,7 @@ package me.zhengjie.utils;
import org.springframework.web.context.request.RequestContextHolder; import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes; import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.util.Objects; import java.util.Objects;
......
package me.zhengjie.utils; package me.zhengjie.utils;
import org.apache.commons.codec.binary.Base64; import org.apache.commons.codec.binary.Base64;
import javax.crypto.Cipher; import javax.crypto.Cipher;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
import java.security.*; import java.security.*;
......
...@@ -26,6 +26,7 @@ import org.springframework.security.core.Authentication; ...@@ -26,6 +26,7 @@ import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.core.userdetails.UserDetails; import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService; import org.springframework.security.core.userdetails.UserDetailsService;
import java.util.List; import java.util.List;
/** /**
......
...@@ -21,6 +21,7 @@ import org.springframework.beans.factory.DisposableBean; ...@@ -21,6 +21,7 @@ import org.springframework.beans.factory.DisposableBean;
import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware; import org.springframework.context.ApplicationContextAware;
import org.springframework.core.env.Environment; import org.springframework.core.env.Environment;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
......
...@@ -24,6 +24,7 @@ import net.dreamlu.mica.ip2region.core.Ip2regionSearcher; ...@@ -24,6 +24,7 @@ import net.dreamlu.mica.ip2region.core.Ip2regionSearcher;
import net.dreamlu.mica.ip2region.core.IpInfo; import net.dreamlu.mica.ip2region.core.IpInfo;
import nl.basjes.parse.useragent.UserAgent; import nl.basjes.parse.useragent.UserAgent;
import nl.basjes.parse.useragent.UserAgentAnalyzer; import nl.basjes.parse.useragent.UserAgentAnalyzer;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.net.InetAddress; import java.net.InetAddress;
import java.net.NetworkInterface; import java.net.NetworkInterface;
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
package me.zhengjie.utils; package me.zhengjie.utils;
import cn.hutool.json.JSONArray; import cn.hutool.json.JSONArray;
import java.io.BufferedReader; import java.io.BufferedReader;
import java.io.InputStreamReader; import java.io.InputStreamReader;
import java.net.HttpURLConnection; import java.net.HttpURLConnection;
......
package me.zhengjie.utils; package me.zhengjie.utils;
import org.junit.Test; import org.junit.Test;
import static org.junit.Assert.*;
import static me.zhengjie.utils.EncryptUtils.*; import static me.zhengjie.utils.EncryptUtils.desDecrypt;
import static me.zhengjie.utils.EncryptUtils.desEncrypt;
import static org.junit.Assert.assertEquals;
public class EncryptUtilsTest { public class EncryptUtilsTest {
......
...@@ -3,8 +3,8 @@ package me.zhengjie.utils; ...@@ -3,8 +3,8 @@ package me.zhengjie.utils;
import org.junit.Test; import org.junit.Test;
import org.springframework.mock.web.MockMultipartFile; import org.springframework.mock.web.MockMultipartFile;
import static org.junit.Assert.*;
import static me.zhengjie.utils.FileUtil.*; import static me.zhengjie.utils.FileUtil.*;
import static org.junit.Assert.assertEquals;
public class FileUtilTest { public class FileUtilTest {
......
...@@ -4,10 +4,11 @@ import org.junit.Test; ...@@ -4,10 +4,11 @@ import org.junit.Test;
import org.springframework.mock.web.MockHttpServletRequest; import org.springframework.mock.web.MockHttpServletRequest;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.*; import java.util.Date;
import static me.zhengjie.utils.StringUtils.*; import static me.zhengjie.utils.StringUtils.*;
import static org.junit.Assert.*; import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
public class StringUtilsTest { public class StringUtilsTest {
......
...@@ -20,6 +20,7 @@ import lombok.Getter; ...@@ -20,6 +20,7 @@ import lombok.Getter;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import lombok.Setter; import lombok.Setter;
import me.zhengjie.utils.GenUtil; import me.zhengjie.utils.GenUtil;
import javax.persistence.*; import javax.persistence.*;
import java.io.Serializable; import java.io.Serializable;
......
...@@ -19,6 +19,7 @@ import io.swagger.annotations.ApiModelProperty; ...@@ -19,6 +19,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Getter; import lombok.Getter;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import lombok.Setter; import lombok.Setter;
import javax.persistence.*; import javax.persistence.*;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import java.io.Serializable; import java.io.Serializable;
......
...@@ -17,6 +17,7 @@ package me.zhengjie.repository; ...@@ -17,6 +17,7 @@ package me.zhengjie.repository;
import me.zhengjie.domain.ColumnInfo; import me.zhengjie.domain.ColumnInfo;
import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaRepository;
import java.util.List; import java.util.List;
/** /**
......
...@@ -27,6 +27,7 @@ import org.springframework.beans.factory.annotation.Value; ...@@ -27,6 +27,7 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.util.List; import java.util.List;
......
...@@ -15,10 +15,10 @@ ...@@ -15,10 +15,10 @@
*/ */
package me.zhengjie.service; package me.zhengjie.service;
import me.zhengjie.domain.GenConfig;
import me.zhengjie.domain.ColumnInfo; import me.zhengjie.domain.ColumnInfo;
import me.zhengjie.domain.GenConfig;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.scheduling.annotation.Async;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.util.List; import java.util.List;
......
...@@ -19,8 +19,8 @@ import lombok.RequiredArgsConstructor; ...@@ -19,8 +19,8 @@ import lombok.RequiredArgsConstructor;
import me.zhengjie.domain.GenConfig; import me.zhengjie.domain.GenConfig;
import me.zhengjie.repository.GenConfigRepository; import me.zhengjie.repository.GenConfigRepository;
import me.zhengjie.service.GenConfigService; import me.zhengjie.service.GenConfigService;
import me.zhengjie.utils.StringUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.io.File; import java.io.File;
/** /**
......
...@@ -19,8 +19,8 @@ import cn.hutool.core.collection.CollectionUtil; ...@@ -19,8 +19,8 @@ import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.ZipUtil; import cn.hutool.core.util.ZipUtil;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import me.zhengjie.domain.GenConfig;
import me.zhengjie.domain.ColumnInfo; import me.zhengjie.domain.ColumnInfo;
import me.zhengjie.domain.GenConfig;
import me.zhengjie.domain.vo.TableInfo; import me.zhengjie.domain.vo.TableInfo;
import me.zhengjie.exception.BadRequestException; import me.zhengjie.exception.BadRequestException;
import me.zhengjie.repository.ColumnInfoRepository; import me.zhengjie.repository.ColumnInfoRepository;
...@@ -34,6 +34,7 @@ import org.slf4j.LoggerFactory; ...@@ -34,6 +34,7 @@ import org.slf4j.LoggerFactory;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.persistence.EntityManager; import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext; import javax.persistence.PersistenceContext;
import javax.persistence.Query; import javax.persistence.Query;
......
...@@ -15,7 +15,9 @@ ...@@ -15,7 +15,9 @@
*/ */
package me.zhengjie.utils; package me.zhengjie.utils;
import org.apache.commons.configuration.*; import org.apache.commons.configuration.Configuration;
import org.apache.commons.configuration.ConfigurationException;
import org.apache.commons.configuration.PropertiesConfiguration;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
......
...@@ -18,8 +18,8 @@ package me.zhengjie.utils; ...@@ -18,8 +18,8 @@ package me.zhengjie.utils;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import cn.hutool.extra.template.*; import cn.hutool.extra.template.*;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import me.zhengjie.domain.GenConfig;
import me.zhengjie.domain.ColumnInfo; import me.zhengjie.domain.ColumnInfo;
import me.zhengjie.domain.GenConfig;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import java.io.File; import java.io.File;
...@@ -27,7 +27,10 @@ import java.io.FileWriter; ...@@ -27,7 +27,10 @@ import java.io.FileWriter;
import java.io.IOException; import java.io.IOException;
import java.io.Writer; import java.io.Writer;
import java.time.LocalDate; import java.time.LocalDate;
import java.util.*; import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import static me.zhengjie.utils.FileUtil.SYS_TEM_DIR; import static me.zhengjie.utils.FileUtil.SYS_TEM_DIR;
......
...@@ -29,6 +29,7 @@ import org.aspectj.lang.annotation.Around; ...@@ -29,6 +29,7 @@ import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut; import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
/** /**
......
...@@ -19,6 +19,7 @@ import lombok.Getter; ...@@ -19,6 +19,7 @@ import lombok.Getter;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import lombok.Setter; import lombok.Setter;
import org.hibernate.annotations.CreationTimestamp; import org.hibernate.annotations.CreationTimestamp;
import javax.persistence.*; import javax.persistence.*;
import java.io.Serializable; import java.io.Serializable;
import java.sql.Timestamp; import java.sql.Timestamp;
......
...@@ -27,6 +27,7 @@ import org.springframework.http.HttpStatus; ...@@ -27,6 +27,7 @@ import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
package me.zhengjie.service.dto; package me.zhengjie.service.dto;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.sql.Timestamp; import java.sql.Timestamp;
......
...@@ -17,6 +17,7 @@ package me.zhengjie.service.dto; ...@@ -17,6 +17,7 @@ package me.zhengjie.service.dto;
import lombok.Data; import lombok.Data;
import me.zhengjie.annotation.Query; import me.zhengjie.annotation.Query;
import java.sql.Timestamp; import java.sql.Timestamp;
import java.util.List; import java.util.List;
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
package me.zhengjie.service.dto; package me.zhengjie.service.dto;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.sql.Timestamp; import java.sql.Timestamp;
......
...@@ -40,10 +40,10 @@ ...@@ -40,10 +40,10 @@
</dependency> </dependency>
<!-- Spring boot websocket --> <!-- Spring boot websocket -->
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-websocket</artifactId> <artifactId>spring-boot-starter-websocket</artifactId>
</dependency> </dependency>
<!-- jwt --> <!-- jwt -->
<dependency> <dependency>
...@@ -69,16 +69,16 @@ ...@@ -69,16 +69,16 @@
</dependency> </dependency>
<!-- linux的管理 --> <!-- linux的管理 -->
<dependency> <dependency>
<groupId>ch.ethz.ganymed</groupId> <groupId>ch.ethz.ganymed</groupId>
<artifactId>ganymed-ssh2</artifactId> <artifactId>ganymed-ssh2</artifactId>
<version>build210</version> <version>build210</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.jcraft</groupId> <groupId>com.jcraft</groupId>
<artifactId>jsch</artifactId> <artifactId>jsch</artifactId>
<version>0.1.55</version> <version>0.1.55</version>
</dependency> </dependency>
<!-- 获取系统信息 --> <!-- 获取系统信息 -->
<dependency> <dependency>
......
...@@ -28,6 +28,7 @@ import org.springframework.web.filter.CorsFilter; ...@@ -28,6 +28,7 @@ import org.springframework.web.filter.CorsFilter;
import org.springframework.web.servlet.config.annotation.EnableWebMvc; import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
......
...@@ -20,6 +20,7 @@ import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler; ...@@ -20,6 +20,7 @@ import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.AsyncConfigurer; import org.springframework.scheduling.annotation.AsyncConfigurer;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import java.util.concurrent.Executor; import java.util.concurrent.Executor;
import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.ThreadPoolExecutor;
......
...@@ -17,7 +17,6 @@ package me.zhengjie.config.thread; ...@@ -17,7 +17,6 @@ package me.zhengjie.config.thread;
import lombok.Data; import lombok.Data;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
/** /**
......
package me.zhengjie.gemho.controller;
import io.netty.buffer.Unpooled;
import me.zhengjie.gemho.netty.NettyServerHandler;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.UnsupportedEncodingException;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;
import java.net.URLEncoder;
import java.nio.charset.Charset;
/**
* <p>
* 前端控制器
* </p>
*
* @author llj
* @since 2021-12-22
*/
@RestController
@RequestMapping("/test")
public class TestController {
@GetMapping
public void tes() {
NettyServerHandler.context.channel().writeAndFlush(Unpooled.wrappedBuffer("你好".getBytes(Charset.forName("GBK"))));
}
//根据城市获取天气信息的java代码
//cityName 是你要取得天气信息的城市的中文名字,如“北京”,“深圳”
static String getWeatherInform(String cityName){
//百度天气API
String baiduUrl = "http://api.map.baidu.com/telematics/v3/weather?location=北京&output=json&ak=W69oaDTCfuGwzNwmtVvgWfGH";
StringBuffer strBuf;
try {
//通过浏览器直接访问http://api.map.baidu.com/telematics/v3/weather?location=北京&output=json&ak=5slgyqGDENN7Sy7pw29IUvrZ
//5slgyqGDENN7Sy7pw29IUvrZ 是我自己申请的一个AK(许可码),如果访问不了,可以自己去申请一个新的ak
//百度ak申请地址:http://lbsyun.baidu.com/apiconsole/key
//要访问的地址URL,通过URLEncoder.encode()函数对于中文进行转码
baiduUrl = "http://api.map.baidu.com/telematics/v3/weather?location="+ URLEncoder.encode(cityName, "utf-8")+"&output=json&ak=5slgyqGDENN7Sy7pw29IUvrZ";
} catch (UnsupportedEncodingException e1) {
e1.printStackTrace();
}
strBuf = new StringBuffer();
try{
URL url = new URL(baiduUrl);
URLConnection conn = url.openConnection();
BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream(),"utf-8"));//转码。
String line = null;
while ((line = reader.readLine()) != null)
strBuf.append(line + " ");
reader.close();
}catch(MalformedURLException e) {
e.printStackTrace();
}catch(IOException e){
e.printStackTrace();
}
return strBuf.toString();
}
public static void main(String[] args) {
String s = getWeatherInform("威海");
System.out.println(s);
}
}
package me.zhengjie.gemho.controller.artificial;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 人工监测数据表 前端控制器
* </p>
*
* @author llj
* @since 2022-04-25
*/
@RestController
@RequestMapping("/artificial-data")
public class ArtificialDataController {
}
package me.zhengjie.gemho.controller.artificial;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 人工监测点位表 前端控制器
* </p>
*
* @author llj
* @since 2022-04-25
*/
@RestController
@RequestMapping("/artificial-point")
public class ArtificialPointController {
}
package me.zhengjie.gemho.controller.data; package me.zhengjie.gemho.controller.data;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import me.zhengjie.gemho.datavo.DataVo;
import me.zhengjie.gemho.entity.sys.visual.Children; import me.zhengjie.gemho.entity.sys.visual.Children;
import me.zhengjie.gemho.util.PageResult; import me.zhengjie.gemho.util.PageResult;
import me.zhengjie.gemho.util.RealVo; import me.zhengjie.gemho.util.RealVo;
import me.zhengjie.gemho.x_datavo.DataVo;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
......
...@@ -4,20 +4,26 @@ package me.zhengjie.gemho.controller.data; ...@@ -4,20 +4,26 @@ package me.zhengjie.gemho.controller.data;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import me.zhengjie.gemho.datavo.DataVo; import me.zhengjie.annotation.Log;
import me.zhengjie.gemho.entity.data.DbData; import me.zhengjie.gemho.entity.data.DbData;
import me.zhengjie.gemho.service.data.DbDataService; import me.zhengjie.gemho.service.data.DbDataService;
import me.zhengjie.gemho.util.PageResult; import me.zhengjie.gemho.util.PageResult;
import me.zhengjie.gemho.util.PostOrPutResult; import me.zhengjie.gemho.util.PostOrPutResult;
import me.zhengjie.gemho.util.RealVo; import me.zhengjie.gemho.util.RealVo;
import me.zhengjie.gemho.x_datavo.DataVo;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria;
import me.zhengjie.modules.system.service.dto.DeptQueryCriteria;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.List;
/** /**
* <p> * <p>
...@@ -75,16 +81,17 @@ public class DbDataController { ...@@ -75,16 +81,17 @@ public class DbDataController {
* @param dbData * @param dbData
* @return * @return
*/ */
@ApiOperation(value = "新增干滩人工巡检数据", response = PostOrPutResult.class) @Log(value = "新增干滩人工检测数据")
@ApiOperation(value = "新增干滩人工检测数据", response = PostOrPutResult.class)
@PostMapping @PostMapping
public ResponseEntity<Object> add(@RequestBody DbData dbData) { public ResponseEntity<Object> add(@RequestBody DbData dbData) {
try { try {
Date time = dbData.getTime(); /*Date time = dbData.getTime();
String format = sdf.format(time); String format = sdf.format(time);
dbData.setId(Integer.parseInt(format)); dbData.setId(Integer.parseInt(format));
dbData.setCreatetime(new Date()); dbData.setCreatetime(new Date());
dbData.setUpdatetime(new Date()); dbData.setUpdatetime(new Date());
dbData.setDatasource(0); dbData.setDatasource(0);*/
boolean save = dbDataService.save(dbData); boolean save = dbDataService.save(dbData);
if (save) { if (save) {
return new ResponseEntity<>(new PostOrPutResult().success(), HttpStatus.OK); return new ResponseEntity<>(new PostOrPutResult().success(), HttpStatus.OK);
...@@ -102,6 +109,7 @@ public class DbDataController { ...@@ -102,6 +109,7 @@ public class DbDataController {
* @param dbData * @param dbData
* @return * @return
*/ */
@Log(value = "修改干滩人工检测数据")
@ApiOperation(value = "修改干滩人工巡检数据", response = PostOrPutResult.class) @ApiOperation(value = "修改干滩人工巡检数据", response = PostOrPutResult.class)
@PutMapping @PutMapping
public ResponseEntity<Object> updata(@RequestBody DbData dbData) { public ResponseEntity<Object> updata(@RequestBody DbData dbData) {
...@@ -124,6 +132,7 @@ public class DbDataController { ...@@ -124,6 +132,7 @@ public class DbDataController {
* @param map * @param map
* @return * @return
*/ */
@Log(value = "删除干滩人工检测数据")
@ApiOperation(value = "删除干滩人工巡检数据", response = PostOrPutResult.class) @ApiOperation(value = "删除干滩人工巡检数据", response = PostOrPutResult.class)
@DeleteMapping @DeleteMapping
public ResponseEntity<Object> deletedb(@RequestBody HashMap<String, Integer> map) { public ResponseEntity<Object> deletedb(@RequestBody HashMap<String, Integer> map) {
...@@ -143,35 +152,46 @@ public class DbDataController { ...@@ -143,35 +152,46 @@ public class DbDataController {
/** /**
* 获取干滩的历史数据 * 获取干滩的历史数据
* *
* @param page * @param
* @param size
* @param searchName
* @param searchValue
* @param limit
* @param timeSpace
* @param sort
* @param datasource
* @return * @return
*/ */
@ApiOperation("获取干滩的历史数据") @ApiOperation("获取干滩的历史数据")
@GetMapping("history") @GetMapping("history")
public ResponseEntity<Object> gethistory(@ApiParam(value = "分页参数,页数", required = true) String page, public ResponseEntity<Object> gethistory(DataQueryCriteria dataQueryCriteria) {
@ApiParam(value = "分页参数,数量", required = true) String size,
@ApiParam(value = "查询条件字段") String searchName,
@ApiParam(value = "查询条件数值") String searchValue,
@ApiParam(value = "查询条件精准或者模糊") String limit,
@ApiParam(value = "查询条件时间区间") String timeSpace,
@ApiParam(value = "查询条件正序或者倒序") String sort,
@ApiParam(value = "数据来源", required = true) String datasource) {
try { try {
long l = Long.parseLong(page); HashMap<String, Object> map = dbDataService.pageall(dataQueryCriteria);
long l1 = Long.parseLong(size);
HashMap<String, Object> map = dbDataService.pageall(searchName, searchValue, limit, timeSpace, sort, l, l1, datasource);
return new ResponseEntity<>(new PageResult().success(map), HttpStatus.OK); return new ResponseEntity<>(new PageResult().success(map), HttpStatus.OK);
} catch (NumberFormatException e) { } catch (NumberFormatException e) {
e.printStackTrace(); e.printStackTrace();
} }
return new ResponseEntity<>(new PageResult().failed(), HttpStatus.INTERNAL_SERVER_ERROR); return new ResponseEntity<>(new PageResult().failed(), HttpStatus.INTERNAL_SERVER_ERROR);
} }
@ApiOperation(value = "设备的下拉列表")
@GetMapping("equiplist")
public ResponseEntity<Object> dbList() {
return null;
}
@ApiOperation(value = "图标历史")
@GetMapping("imghistory")
public ResponseEntity<Object> imgList(
@ApiParam(value = "查询条件字段") String searchName,
@ApiParam(value = "查询条件数值") String searchValue,
@ApiParam(value = "查询条件精准或者模糊") String limit,
@ApiParam(value = "查询条件时间区间") String timeSpace,
@ApiParam(value = "查询条件正序或者倒序") String sort,
@ApiParam(value = "数据来源", required = true) String datasource) {
return null;
}
@ApiOperation("导出菜单数据")
@GetMapping("download")
public void exportDept(HttpServletResponse response, DeptQueryCriteria criteria) throws Exception {
List<DbData> dbData = new ArrayList<>();
dbData = dbDataService.list();
dbDataService.download(dbData, response);
}
} }
...@@ -4,12 +4,12 @@ package me.zhengjie.gemho.controller.data; ...@@ -4,12 +4,12 @@ package me.zhengjie.gemho.controller.data;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import me.zhengjie.gemho.datavo.DataVo;
import me.zhengjie.gemho.entity.data.DmData; import me.zhengjie.gemho.entity.data.DmData;
import me.zhengjie.gemho.service.data.DmDataService; import me.zhengjie.gemho.service.data.DmDataService;
import me.zhengjie.gemho.util.PageResult; import me.zhengjie.gemho.util.PageResult;
import me.zhengjie.gemho.util.PostOrPutResult; import me.zhengjie.gemho.util.PostOrPutResult;
import me.zhengjie.gemho.util.RealVo; import me.zhengjie.gemho.util.RealVo;
import me.zhengjie.gemho.x_datavo.DataVo;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
......
...@@ -4,12 +4,12 @@ package me.zhengjie.gemho.controller.data; ...@@ -4,12 +4,12 @@ package me.zhengjie.gemho.controller.data;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import me.zhengjie.gemho.datavo.DataVo;
import me.zhengjie.gemho.entity.data.MpData; import me.zhengjie.gemho.entity.data.MpData;
import me.zhengjie.gemho.service.data.MpDataService; import me.zhengjie.gemho.service.data.MpDataService;
import me.zhengjie.gemho.util.PageResult; import me.zhengjie.gemho.util.PageResult;
import me.zhengjie.gemho.util.PostOrPutResult; import me.zhengjie.gemho.util.PostOrPutResult;
import me.zhengjie.gemho.util.RealVo; import me.zhengjie.gemho.util.RealVo;
import me.zhengjie.gemho.x_datavo.DataVo;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
......
package me.zhengjie.gemho.controller.tab; package me.zhengjie.gemho.controller.data;
import io.swagger.annotations.Api; import me.zhengjie.gemho.entity.data.Pdata;
import io.swagger.annotations.ApiOperation; import me.zhengjie.gemho.service.data.PdataService;
import me.zhengjie.gemho.service.tab.DrybeachequipinforService;
import me.zhengjie.gemho.service.tab.MonDrybeachequipinforService;
import me.zhengjie.gemho.util.PageResult; import me.zhengjie.gemho.util.PageResult;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
...@@ -13,40 +11,25 @@ import org.springframework.web.bind.annotation.GetMapping; ...@@ -13,40 +11,25 @@ import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList; import java.util.List;
import java.util.HashMap;
/** /**
* <p> * <p>
* 前端控制器 * 人工检测数据表 前端控制器
* </p> * </p>
* *
* @author llj * @author llj
* @since 2022-02-14 * @since 2022-03-04
*/ */
@Api(tags = "基础信息: 监测点和设备")
@RestController @RestController
@RequestMapping("tab/mondrybeachequipinfor") @RequestMapping("data/pdata")
public class MonDrybeachequipinforController { public class PdataController {
@Autowired
private MonDrybeachequipinforService monDrybeachequipinforService;
@Autowired @Autowired
private DrybeachequipinforService drybeachequipinforService; private PdataService pdataService;
@GetMapping("code") @GetMapping()
public ResponseEntity<Object> getDryCode() { public ResponseEntity<Object> get() {
//获取设备的下拉列表 List<Pdata> list = pdataService.list();
ArrayList<HashMap<String, String>> dryCode = drybeachequipinforService.getDryCode(); return new ResponseEntity<>(new PageResult().nopagesuccess(list), HttpStatus.OK);
return new ResponseEntity<>(new PageResult().nopagesuccess(dryCode), HttpStatus.OK);
} }
@ApiOperation(value = "获取指定监测点的设备信息")
@GetMapping("mon")
public ResponseEntity<Object> getByMon(String monitoringno) {
ArrayList<HashMap<String, String>> bymon = monDrybeachequipinforService.getBymon(monitoringno);
return new ResponseEntity<>(new PageResult().nopagesuccess(bymon), HttpStatus.OK);
}
} }
...@@ -4,12 +4,12 @@ package me.zhengjie.gemho.controller.data; ...@@ -4,12 +4,12 @@ package me.zhengjie.gemho.controller.data;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import me.zhengjie.gemho.datavo.DataVo;
import me.zhengjie.gemho.entity.data.PslData; import me.zhengjie.gemho.entity.data.PslData;
import me.zhengjie.gemho.service.data.PslDataService; import me.zhengjie.gemho.service.data.PslDataService;
import me.zhengjie.gemho.util.PageResult; import me.zhengjie.gemho.util.PageResult;
import me.zhengjie.gemho.util.PostOrPutResult; import me.zhengjie.gemho.util.PostOrPutResult;
import me.zhengjie.gemho.util.RealVo; import me.zhengjie.gemho.util.RealVo;
import me.zhengjie.gemho.x_datavo.DataVo;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
......
package me.zhengjie.gemho.controller.data; package me.zhengjie.gemho.controller.data;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import me.zhengjie.gemho.datavo.RealDataVo; import me.zhengjie.gemho.entity.sys.SysType;
import me.zhengjie.gemho.entity.data.*;
import me.zhengjie.gemho.entity.tab.Drybeachequipinfor;
import me.zhengjie.gemho.service.data.*; import me.zhengjie.gemho.service.data.*;
import me.zhengjie.gemho.service.sys.SysTypeService;
import me.zhengjie.gemho.service.tab.DrybeachequipinforService; import me.zhengjie.gemho.service.tab.DrybeachequipinforService;
import me.zhengjie.gemho.util.PageResult; import me.zhengjie.gemho.util.PageResult;
import me.zhengjie.gemho.x_datavo.RealDataVo;
import me.zhengjie.modules.security.service.OnlineUserService; import me.zhengjie.modules.security.service.OnlineUserService;
import me.zhengjie.utils.RedisUtils;
import me.zhengjie.utils.SecurityUtils; import me.zhengjie.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
...@@ -17,7 +18,6 @@ import org.springframework.web.bind.annotation.RequestMapping; ...@@ -17,7 +18,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap;
import java.util.List; import java.util.List;
@RequestMapping("data/real") @RequestMapping("data/real")
...@@ -26,6 +26,8 @@ public class RealDataController { ...@@ -26,6 +26,8 @@ public class RealDataController {
@Autowired @Autowired
private DrybeachequipinforService drybeachequipinforService; private DrybeachequipinforService drybeachequipinforService;
@Autowired @Autowired
private SysTypeService sysTypeService;
@Autowired
private DbDataService dbDataService; private DbDataService dbDataService;
@Autowired @Autowired
private OnlineUserService onlineUserService; private OnlineUserService onlineUserService;
...@@ -43,14 +45,15 @@ public class RealDataController { ...@@ -43,14 +45,15 @@ public class RealDataController {
private PslDataService pslDataService; private PslDataService pslDataService;
@Autowired @Autowired
private SlDataService slDataService; private SlDataService slDataService;
@Autowired
private RedisUtils redisUtils;
@GetMapping @GetMapping
public ResponseEntity<Object> real() { public ResponseEntity<Object> real() {
//创建返回对象 //创建返回对象
HashMap<String, Object> map = new HashMap<>();
ArrayList<RealDataVo> realDataVos = new ArrayList<>(); ArrayList<RealDataVo> realDataVos = new ArrayList<>();
ArrayList<RealDataVo> realDataVos1 = new ArrayList<>();
//创建条件构造器 //创建条件构造器
QueryWrapper<DbData> dbDataQueryWrapper = new QueryWrapper<>(); /*QueryWrapper<DbData> dbDataQueryWrapper = new QueryWrapper<>();
QueryWrapper<WtData> wtDataQueryWrapper = new QueryWrapper<>(); QueryWrapper<WtData> wtDataQueryWrapper = new QueryWrapper<>();
QueryWrapper<MpData> mpDataQueryWrapper = new QueryWrapper<>(); QueryWrapper<MpData> mpDataQueryWrapper = new QueryWrapper<>();
QueryWrapper<DmData> dmDataQueryWrapper = new QueryWrapper<>(); QueryWrapper<DmData> dmDataQueryWrapper = new QueryWrapper<>();
...@@ -58,63 +61,62 @@ public class RealDataController { ...@@ -58,63 +61,62 @@ public class RealDataController {
QueryWrapper<RgData> rgDataQueryWrapper = new QueryWrapper<>(); QueryWrapper<RgData> rgDataQueryWrapper = new QueryWrapper<>();
QueryWrapper<PslData> pslDataQueryWrapper = new QueryWrapper<>(); QueryWrapper<PslData> pslDataQueryWrapper = new QueryWrapper<>();
QueryWrapper<SzData> szDataQueryWrapper = new QueryWrapper<>(); QueryWrapper<SzData> szDataQueryWrapper = new QueryWrapper<>();
QueryWrapper<SlData> slDataQueryWrapper = new QueryWrapper<>(); QueryWrapper<SlData> slDataQueryWrapper = new QueryWrapper<>();*/
//获取当前登录用户 根据当前用户获取尾矿库id //获取当前登录用户 根据当前用户获取尾矿库id
String username = SecurityUtils.getCurrentUsername(); String username = SecurityUtils.getCurrentUsername();
String gettailno = onlineUserService.gettailno(username); String gettailno = onlineUserService.gettailno(username);
//获取相应尾矿库下的所有设备 //获取相应尾矿库下的所有设备
QueryWrapper<Drybeachequipinfor> drybeachequipinforQueryWrapper = new QueryWrapper<>(); List<String> equipnos = drybeachequipinforService.getequipno(gettailno);
drybeachequipinforQueryWrapper.eq("tailingid", gettailno); //获取所有检测项
List<Drybeachequipinfor> list = drybeachequipinforService.list(drybeachequipinforQueryWrapper); QueryWrapper<SysType> sysTypeQueryWrapper = new QueryWrapper<>();
sysTypeQueryWrapper.eq("must", 0);
List<SysType> list = sysTypeService.list(sysTypeQueryWrapper);
if (list.isEmpty()) { if (list.isEmpty()) {
return new ResponseEntity<>(new PageResult().nopagefailed("确实该尾矿下是否有绑定的设备"), HttpStatus.INTERNAL_SERVER_ERROR); return new ResponseEntity<>(new PageResult().nopagefailed("确实该尾矿下是否有绑定的设备"), HttpStatus.INTERNAL_SERVER_ERROR);
} }
for (Drybeachequipinfor drybeachequipinfor : list) { for (SysType sysType : list) {
switch (drybeachequipinfor.getDevicetype()) { switch (sysType.getCode()) {
case "1": case "1":
RealDataVo real1 = dbDataService.real(drybeachequipinfor.getEquipno()); List<RealDataVo> dbdatas = dbDataService.real(sysType.getTypeno());
real1.setName(drybeachequipinfor.getEquipname()); realDataVos.addAll(dbdatas);
realDataVos.add(real1);
break; break;
case "2": case "2":
RealDataVo real2 = wtDataService.real(drybeachequipinfor.getEquipno()); List<RealDataVo> wtdatas = wtDataService.real(sysType.getTypeno());
real2.setName(drybeachequipinfor.getEquipname()); realDataVos.addAll(wtdatas);
realDataVos.add(real2);
break; break;
case "3": case "3":
RealDataVo mpData = mpDataService.real(drybeachequipinfor.getEquipno()); List<RealDataVo> mpdatas = mpDataService.real(sysType.getTypeno());
mpData.setName(drybeachequipinfor.getEquipname()); realDataVos.addAll(mpdatas);
realDataVos.add(mpData);
break; break;
case "4": case "4":
RealDataVo dmData = dmDataService.real(drybeachequipinfor.getEquipno()); List<RealDataVo> dmdatas = dmDataService.real(sysType.getTypeno());
dmData.setName(drybeachequipinfor.getEquipname()); realDataVos.addAll(dmdatas);
realDataVos.add(dmData);
break; break;
case "5": case "5":
RealDataVo stData = stDataService.real(drybeachequipinfor.getEquipno()); List<RealDataVo> stdatas = stDataService.real(sysType.getTypeno());
stData.setName(drybeachequipinfor.getEquipname()); realDataVos.addAll(stdatas);
realDataVos.add(stData);
break; break;
case "6": case "6":
RealDataVo rgData = rgDataService.real(drybeachequipinfor.getEquipno()); List<RealDataVo> rgdatas = rgDataService.real(sysType.getTypeno());
rgData.setName(drybeachequipinfor.getEquipname()); realDataVos.addAll(rgdatas);
realDataVos.add(rgData);
break; break;
case "7": case "7":
RealDataVo real = pslDataService.real(drybeachequipinfor.getEquipno()); List<RealDataVo> psldatas = pslDataService.real(sysType.getTypeno());
real.setName(drybeachequipinfor.getEquipname()); realDataVos.addAll(psldatas);
realDataVos.add(real);
break;
case "8":
break; break;
case "9": case "9":
RealDataVo slData = slDataService.real(drybeachequipinfor.getEquipno()); List<RealDataVo> sldatas = slDataService.real(sysType.getTypeno());
slData.setName(drybeachequipinfor.getEquipname()); realDataVos.addAll(sldatas);
realDataVos.add(slData);
break; break;
} }
} }
return new ResponseEntity<>(new PageResult().nopagesuccess(realDataVos), HttpStatus.OK); for (RealDataVo realDataVo : realDataVos) {
boolean contains = equipnos.contains(realDataVo.getEquipno());
if (contains) {
realDataVos1.add(realDataVo);
}
}
redisUtils.set("realData", realDataVos1);
return new ResponseEntity<>(new PageResult().nopagesuccess(realDataVos1), HttpStatus.OK);
} }
} }
...@@ -4,12 +4,12 @@ package me.zhengjie.gemho.controller.data; ...@@ -4,12 +4,12 @@ package me.zhengjie.gemho.controller.data;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import me.zhengjie.gemho.datavo.DataVo;
import me.zhengjie.gemho.entity.data.RgData; import me.zhengjie.gemho.entity.data.RgData;
import me.zhengjie.gemho.service.data.RgDataService; import me.zhengjie.gemho.service.data.RgDataService;
import me.zhengjie.gemho.util.PageResult; import me.zhengjie.gemho.util.PageResult;
import me.zhengjie.gemho.util.PostOrPutResult; import me.zhengjie.gemho.util.PostOrPutResult;
import me.zhengjie.gemho.util.RealVo; import me.zhengjie.gemho.util.RealVo;
import me.zhengjie.gemho.x_datavo.DataVo;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
......
...@@ -4,12 +4,12 @@ package me.zhengjie.gemho.controller.data; ...@@ -4,12 +4,12 @@ package me.zhengjie.gemho.controller.data;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import me.zhengjie.gemho.datavo.DataVo;
import me.zhengjie.gemho.entity.data.SlData; import me.zhengjie.gemho.entity.data.SlData;
import me.zhengjie.gemho.service.data.SlDataService; import me.zhengjie.gemho.service.data.SlDataService;
import me.zhengjie.gemho.util.PageResult; import me.zhengjie.gemho.util.PageResult;
import me.zhengjie.gemho.util.PostOrPutResult; import me.zhengjie.gemho.util.PostOrPutResult;
import me.zhengjie.gemho.util.RealVo; import me.zhengjie.gemho.util.RealVo;
import me.zhengjie.gemho.x_datavo.DataVo;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
......
...@@ -4,12 +4,12 @@ package me.zhengjie.gemho.controller.data; ...@@ -4,12 +4,12 @@ package me.zhengjie.gemho.controller.data;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import me.zhengjie.gemho.datavo.DataVo;
import me.zhengjie.gemho.entity.data.StData; import me.zhengjie.gemho.entity.data.StData;
import me.zhengjie.gemho.service.data.StDataService; import me.zhengjie.gemho.service.data.StDataService;
import me.zhengjie.gemho.util.PageResult; import me.zhengjie.gemho.util.PageResult;
import me.zhengjie.gemho.util.PostOrPutResult; import me.zhengjie.gemho.util.PostOrPutResult;
import me.zhengjie.gemho.util.RealVo; import me.zhengjie.gemho.util.RealVo;
import me.zhengjie.gemho.x_datavo.DataVo;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
......
...@@ -4,12 +4,12 @@ package me.zhengjie.gemho.controller.data; ...@@ -4,12 +4,12 @@ package me.zhengjie.gemho.controller.data;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import me.zhengjie.gemho.datavo.DataVo;
import me.zhengjie.gemho.entity.data.SzData; import me.zhengjie.gemho.entity.data.SzData;
import me.zhengjie.gemho.service.data.SzDataService; import me.zhengjie.gemho.service.data.SzDataService;
import me.zhengjie.gemho.util.PageResult; import me.zhengjie.gemho.util.PageResult;
import me.zhengjie.gemho.util.PostOrPutResult; import me.zhengjie.gemho.util.PostOrPutResult;
import me.zhengjie.gemho.util.RealVo; import me.zhengjie.gemho.util.RealVo;
import me.zhengjie.gemho.x_datavo.DataVo;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
......
...@@ -4,12 +4,12 @@ package me.zhengjie.gemho.controller.data; ...@@ -4,12 +4,12 @@ package me.zhengjie.gemho.controller.data;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import me.zhengjie.gemho.datavo.DataVo;
import me.zhengjie.gemho.entity.data.WtData; import me.zhengjie.gemho.entity.data.WtData;
import me.zhengjie.gemho.service.data.WtDataService; import me.zhengjie.gemho.service.data.WtDataService;
import me.zhengjie.gemho.util.PageResult; import me.zhengjie.gemho.util.PageResult;
import me.zhengjie.gemho.util.PostOrPutResult; import me.zhengjie.gemho.util.PostOrPutResult;
import me.zhengjie.gemho.util.RealVo; import me.zhengjie.gemho.util.RealVo;
import me.zhengjie.gemho.x_datavo.DataVo;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
......
package me.zhengjie.gemho.controller.demo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import me.zhengjie.gemho.entity.demo.MonitorPoints;
import me.zhengjie.gemho.service.demo.MonitorPointsService;
import me.zhengjie.gemho.util.PageResult;
import me.zhengjie.gemho.util.PostOrPutResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
import java.util.HashMap;
/**
* <p>
* 前端控制器
* </p>
*
* @author llj
* @since 2022-04-02
*/
@Api(tags = "")
@RestController
@RequestMapping("wweb/httpdemo")
public class MonitorPointsController {
@Autowired
private MonitorPointsService monitorPointsService;
@ApiOperation(value = "分页列表", response = MonitorPoints.class)
@GetMapping(value = "/page")
public ResponseEntity<Object> list(@ApiParam(value = "分页参数,页数") String page,
@ApiParam(value = "分页参数,数量") String size,
@ApiParam(value = "查询条件字段") String searchName,
@ApiParam(value = "查询条件数值") String searchValue,
@ApiParam(value = "查询条件精准或者模糊") String limit,
@ApiParam(value = "查询条件时间区间") String timeSpace,
@ApiParam(value = "查询条件正序或者倒序") String sort) {
HashMap<String, Object> data = monitorPointsService.list(searchName, searchValue, limit, timeSpace, sort, page, size);
return new ResponseEntity<>(new PageResult().success(data), HttpStatus.OK);
}
@ApiOperation(value = "新增")
@PostMapping()
public Object add(@Valid @RequestBody MonitorPoints param) {
boolean result = monitorPointsService.add(param);
if (result) {
return new ResponseEntity<>(new PostOrPutResult().success(), HttpStatus.OK);
} else {
return new ResponseEntity<>(new PostOrPutResult().failed(), HttpStatus.INTERNAL_SERVER_ERROR);
}
}
@ApiOperation(value = "修改")
@PutMapping()
public Object modify(@Valid @RequestBody MonitorPoints param) {
boolean result = monitorPointsService.modify(param);
if (result) {
return new ResponseEntity<>(new PostOrPutResult().success(), HttpStatus.OK);
} else {
return new ResponseEntity<>(new PostOrPutResult().failed(), HttpStatus.INTERNAL_SERVER_ERROR);
}
}
@ApiOperation(value = "删除(单个条目)")
@DeleteMapping()
public Object remove(@RequestBody HashMap<String, Object> map) {
Integer id = Integer.valueOf(map.get("id").toString());
boolean result = monitorPointsService.removeById(id);
if (result) {
return new ResponseEntity<>(new PostOrPutResult().success(), HttpStatus.OK);
} else {
return new ResponseEntity<>(new PostOrPutResult().failed(), HttpStatus.INTERNAL_SERVER_ERROR);
}
}
@PostMapping("test")
public void testdemo(String json) {
System.out.println(json);
//return new ResponseEntity(new PageResult().success(json),HttpStatus.OK);
}
}
package me.zhengjie.gemho.controller.dic;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import lombok.RequiredArgsConstructor;
import me.zhengjie.gemho.entity.dic.Jcjd;
import me.zhengjie.gemho.entity.dic.Jczx;
import me.zhengjie.gemho.service.dic.IJcjdService;
import me.zhengjie.gemho.service.dic.IJczxService;
import me.zhengjie.gemho.util.PageResult;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@RequiredArgsConstructor
@RestController
@RequestMapping("dic/artificial")
public class ArtificialController {
private final IJcjdService iJcjdService;
private final IJczxService iJczxService;
@GetMapping("parent")
public ResponseEntity<Object> parent() {
List<Jcjd> list = iJcjdService.list();
return new ResponseEntity<>(new PageResult().nopagesuccess(list), HttpStatus.OK);
}
@GetMapping("child")
public ResponseEntity<Object> child(String p_id) {
QueryWrapper<Jczx> jczxQueryWrapper = new QueryWrapper<>();
jczxQueryWrapper.eq("p_id", Integer.valueOf(p_id));
List<Jczx> list = iJczxService.list(jczxQueryWrapper);
return new ResponseEntity<>(new PageResult().nopagesuccess(list), HttpStatus.OK);
}
}
package me.zhengjie.gemho.controller.sys; package me.zhengjie.gemho.controller.sys;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import me.zhengjie.annotation.Log;
import me.zhengjie.gemho.entity.sys.SysArea; import me.zhengjie.gemho.entity.sys.SysArea;
import me.zhengjie.gemho.entity.sys.SysSelect; import me.zhengjie.gemho.entity.sys.SysSelect;
import me.zhengjie.gemho.entity.sys.SysViews; import me.zhengjie.gemho.entity.sys.SysViews;
...@@ -11,15 +11,15 @@ import me.zhengjie.gemho.service.sys.SysAreaService; ...@@ -11,15 +11,15 @@ import me.zhengjie.gemho.service.sys.SysAreaService;
import me.zhengjie.gemho.service.sys.SysSelectService; import me.zhengjie.gemho.service.sys.SysSelectService;
import me.zhengjie.gemho.service.sys.SysSummaryService; import me.zhengjie.gemho.service.sys.SysSummaryService;
import me.zhengjie.gemho.service.sys.SysViewsService; import me.zhengjie.gemho.service.sys.SysViewsService;
import me.zhengjie.gemho.service.tab.TailpondinforService;
import me.zhengjie.gemho.util.PageResult; import me.zhengjie.gemho.util.PageResult;
import me.zhengjie.gemho.util.PostOrPutResult;
import me.zhengjie.modules.security.service.OnlineUserService; import me.zhengjie.modules.security.service.OnlineUserService;
import me.zhengjie.utils.SecurityUtils; import me.zhengjie.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
...@@ -37,6 +37,8 @@ import java.util.List; ...@@ -37,6 +37,8 @@ import java.util.List;
@RestController @RestController
@RequestMapping("sys/Area") @RequestMapping("sys/Area")
public class SysAreaController { public class SysAreaController {
@Autowired
private TailpondinforService tailpondinforService;
@Autowired @Autowired
private SysAreaService sysAreaService; private SysAreaService sysAreaService;
@Autowired @Autowired
...@@ -58,9 +60,7 @@ public class SysAreaController { ...@@ -58,9 +60,7 @@ public class SysAreaController {
String currentUsername = SecurityUtils.getCurrentUsername(); String currentUsername = SecurityUtils.getCurrentUsername();
//根据用户获取尾矿库编号 //根据用户获取尾矿库编号
String gettailno = onlineUserService.gettailno(currentUsername); String gettailno = onlineUserService.gettailno(currentUsername);
QueryWrapper<SysSelect> sysSelectQueryWrapper = new QueryWrapper<>(); List<SysSelect> list2 = sysSelectService.getbytail(gettailno);
sysSelectQueryWrapper.eq("tailno", gettailno);
List<SysSelect> list2 = sysSelectService.list(sysSelectQueryWrapper);
HashMap<String, ArrayList<SysSelect>> sysselectmap = new HashMap<>(); HashMap<String, ArrayList<SysSelect>> sysselectmap = new HashMap<>();
for (SysSelect sysSelect : list2) { for (SysSelect sysSelect : list2) {
ArrayList<SysSelect> sysSelects = new ArrayList<SysSelect>(); ArrayList<SysSelect> sysSelects = new ArrayList<SysSelect>();
...@@ -91,9 +91,28 @@ public class SysAreaController { ...@@ -91,9 +91,28 @@ public class SysAreaController {
@ApiOperation(value = "大屏获取数据的接口") @ApiOperation(value = "大屏获取数据的接口")
@GetMapping("visual") @GetMapping("visual")
public ResponseEntity<Object> visual() { public ResponseEntity<Object> visual() {
HashMap<String, Object> map = new HashMap<>();
List<SysArea> visual = sysSelectService.visual(); List<SysArea> visual = sysSelectService.visual();
return new ResponseEntity<>(new PageResult().nopagesuccess(visual), HttpStatus.OK); return new ResponseEntity<>(new PageResult().nopagesuccess(visual), HttpStatus.OK);
} }
@ApiOperation(value = "大屏标题")
@GetMapping("title")
public ResponseEntity<Object> title() {
String screenTitle = tailpondinforService.getScreenTitle();
HashMap<String, String> map = new HashMap<>();
map.put("title", screenTitle);
return new ResponseEntity<>(new PageResult().nopagesuccess(map), HttpStatus.OK);
}
@Log("修改大屏标题")
@ApiOperation(value = "大屏标题")
@PostMapping("title")
public ResponseEntity<Object> updateTitle(@RequestBody HashMap<String, String> requestMap) {
String title = requestMap.get("title");
tailpondinforService.updateTitle(title);
return new ResponseEntity<>(new PostOrPutResult().success(), HttpStatus.OK);
}
} }
...@@ -2,6 +2,7 @@ package me.zhengjie.gemho.controller.sys; ...@@ -2,6 +2,7 @@ package me.zhengjie.gemho.controller.sys;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import me.zhengjie.annotation.Log;
import me.zhengjie.gemho.service.sys.SysSelectService; import me.zhengjie.gemho.service.sys.SysSelectService;
import me.zhengjie.gemho.util.PostOrPutResult; import me.zhengjie.gemho.util.PostOrPutResult;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -26,6 +27,7 @@ public class SysSelectController { ...@@ -26,6 +27,7 @@ public class SysSelectController {
@Autowired @Autowired
private SysSelectService sysSelectService; private SysSelectService sysSelectService;
@Log(value = "修改配置大屏检测项")
@PostMapping @PostMapping
public ResponseEntity<Object> add(@RequestBody HashMap<String, Object> map) { public ResponseEntity<Object> add(@RequestBody HashMap<String, Object> map) {
boolean updata = sysSelectService.updata(map); boolean updata = sysSelectService.updata(map);
...@@ -35,6 +37,7 @@ public class SysSelectController { ...@@ -35,6 +37,7 @@ public class SysSelectController {
return new ResponseEntity<>(new PostOrPutResult().failed(), HttpStatus.INTERNAL_SERVER_ERROR); return new ResponseEntity<>(new PostOrPutResult().failed(), HttpStatus.INTERNAL_SERVER_ERROR);
} }
@Log(value = "删除大屏配置检测项")
@DeleteMapping @DeleteMapping
public ResponseEntity<Object> shanchu(@RequestBody HashMap<String, Object> map) { public ResponseEntity<Object> shanchu(@RequestBody HashMap<String, Object> map) {
boolean updata = sysSelectService.shanchu(map); boolean updata = sysSelectService.shanchu(map);
......
...@@ -5,7 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; ...@@ -5,7 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import me.zhengjie.gemho.entity.sys.SysSelect; import me.zhengjie.annotation.Log;
import me.zhengjie.gemho.entity.sys.SysSummary; import me.zhengjie.gemho.entity.sys.SysSummary;
import me.zhengjie.gemho.entity.tab.Monitorvideo; import me.zhengjie.gemho.entity.tab.Monitorvideo;
import me.zhengjie.gemho.service.sys.SysSelectService; import me.zhengjie.gemho.service.sys.SysSelectService;
...@@ -20,7 +20,7 @@ import org.springframework.http.HttpStatus; ...@@ -20,7 +20,7 @@ import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.util.Date; import java.time.LocalDateTime;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
...@@ -52,9 +52,14 @@ public class SysSummaryController { ...@@ -52,9 +52,14 @@ public class SysSummaryController {
*/ */
@ApiOperation(value = "查询", response = SysSummary.class) @ApiOperation(value = "查询", response = SysSummary.class)
@GetMapping @GetMapping
public ResponseEntity<Object> getall(@ApiParam(value = "分页参数,页数") String page, public ResponseEntity<Object> getall(@ApiParam(value = "分页参数,页数", required = true) String page,
@ApiParam(value = "分页参数,每页的数据条数") String size) { @ApiParam(value = "分页参数,数量", required = true) String size,
HashMap<String, Object> hashMap = sysSummaryService.getall(page, size); @ApiParam(value = "查询条件字段") String searchName,
@ApiParam(value = "查询条件数值") String searchValue,
@ApiParam(value = "查询条件精准或者模糊") String limit,
@ApiParam(value = "查询条件时间区间") String timeSpace,
@ApiParam(value = "查询条件正序或者倒序") String sort) {
HashMap<String, Object> hashMap = sysSummaryService.getall(page, size, searchName, searchValue);
return new ResponseEntity<>(new PageResult().success(hashMap), HttpStatus.OK); return new ResponseEntity<>(new PageResult().success(hashMap), HttpStatus.OK);
} }
...@@ -64,13 +69,13 @@ public class SysSummaryController { ...@@ -64,13 +69,13 @@ public class SysSummaryController {
* @param sysSummary * @param sysSummary
* @return * @return
*/ */
@Log(value = "新增检测项")
@ApiOperation(value = "新增") @ApiOperation(value = "新增")
@PostMapping @PostMapping
public ResponseEntity<Object> add(@RequestBody SysSummary sysSummary) { public ResponseEntity<Object> add(@RequestBody SysSummary sysSummary) {
String currentUsername = SecurityUtils.getCurrentUsername(); String currentUsername = SecurityUtils.getCurrentUsername();
String gettailno = onlineUserService.gettailno(currentUsername); String gettailno = onlineUserService.gettailno(currentUsername);
sysSummary.setCreatetime(new Date()); sysSummary.setCreatetime(LocalDateTime.now());
sysSummary.setUpdatetime(new Date());
String title = sysSummary.getTitle(); String title = sysSummary.getTitle();
String deviceid = sysSummary.getDeviceid(); String deviceid = sysSummary.getDeviceid();
QueryWrapper<SysSummary> sysSummaryQueryWrapper = new QueryWrapper<>(); QueryWrapper<SysSummary> sysSummaryQueryWrapper = new QueryWrapper<>();
...@@ -108,6 +113,7 @@ public class SysSummaryController { ...@@ -108,6 +113,7 @@ public class SysSummaryController {
return new ResponseEntity<>(new PostOrPutResult().failed(), HttpStatus.INTERNAL_SERVER_ERROR); return new ResponseEntity<>(new PostOrPutResult().failed(), HttpStatus.INTERNAL_SERVER_ERROR);
} }
@Log(value = "修改检测项")
@ApiOperation(value = "修改") @ApiOperation(value = "修改")
@PutMapping @PutMapping
public ResponseEntity<Object> xiugai(@RequestBody SysSummary sysSummary) { public ResponseEntity<Object> xiugai(@RequestBody SysSummary sysSummary) {
...@@ -135,6 +141,7 @@ public class SysSummaryController { ...@@ -135,6 +141,7 @@ public class SysSummaryController {
return new ResponseEntity<>(new PostOrPutResult().failed(), HttpStatus.INTERNAL_SERVER_ERROR); return new ResponseEntity<>(new PostOrPutResult().failed(), HttpStatus.INTERNAL_SERVER_ERROR);
} }
@Log(value = "删除检测项")
@ApiOperation(value = "删除") @ApiOperation(value = "删除")
@DeleteMapping @DeleteMapping
public ResponseEntity<Object> shanchu(@RequestBody HashMap<String, String> map) { public ResponseEntity<Object> shanchu(@RequestBody HashMap<String, String> map) {
...@@ -142,14 +149,8 @@ public class SysSummaryController { ...@@ -142,14 +149,8 @@ public class SysSummaryController {
String currentUsername = SecurityUtils.getCurrentUsername(); String currentUsername = SecurityUtils.getCurrentUsername();
String gettailno = onlineUserService.gettailno(currentUsername); String gettailno = onlineUserService.gettailno(currentUsername);
Integer id = Integer.valueOf(map.get("id")); Integer id = Integer.valueOf(map.get("id"));
boolean b = sysSummaryService.removeById(id); boolean deletebyid = sysSummaryService.deletebyid(id);
if (b) { if (deletebyid) {
QueryWrapper<Monitorvideo> monitorvideoQueryWrapper = new QueryWrapper<>();
monitorvideoQueryWrapper.eq("v_sumid", id.toString());
monitorvideoService.remove(monitorvideoQueryWrapper);
QueryWrapper<SysSelect> sysSelectQueryWrapper = new QueryWrapper<>();
sysSelectQueryWrapper.eq("sumid", id).eq("tailno", gettailno);
sysSelectService.remove(sysSelectQueryWrapper);
return new ResponseEntity<>(new PostOrPutResult().success(), HttpStatus.OK); return new ResponseEntity<>(new PostOrPutResult().success(), HttpStatus.OK);
} }
return new ResponseEntity<>(new PostOrPutResult(), HttpStatus.INTERNAL_SERVER_ERROR); return new ResponseEntity<>(new PostOrPutResult(), HttpStatus.INTERNAL_SERVER_ERROR);
......
...@@ -4,7 +4,6 @@ package me.zhengjie.gemho.controller.sys; ...@@ -4,7 +4,6 @@ package me.zhengjie.gemho.controller.sys;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import me.zhengjie.gemho.datavo.sys.*;
import me.zhengjie.gemho.entity.sys.SysDaterange; import me.zhengjie.gemho.entity.sys.SysDaterange;
import me.zhengjie.gemho.entity.sys.SysSubitem; import me.zhengjie.gemho.entity.sys.SysSubitem;
import me.zhengjie.gemho.entity.sys.SysType; import me.zhengjie.gemho.entity.sys.SysType;
...@@ -16,6 +15,7 @@ import me.zhengjie.gemho.service.sys.SysTypeService; ...@@ -16,6 +15,7 @@ import me.zhengjie.gemho.service.sys.SysTypeService;
import me.zhengjie.gemho.service.sys.SysValueService; import me.zhengjie.gemho.service.sys.SysValueService;
import me.zhengjie.gemho.service.tab.DrybeachequipinforService; import me.zhengjie.gemho.service.tab.DrybeachequipinforService;
import me.zhengjie.gemho.util.PageResult; import me.zhengjie.gemho.util.PageResult;
import me.zhengjie.gemho.x_datavo.sys.*;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
......
...@@ -2,8 +2,21 @@ package me.zhengjie.gemho.controller.tab; ...@@ -2,8 +2,21 @@ package me.zhengjie.gemho.controller.tab;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RequestMapping; import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.RestController; import io.swagger.annotations.ApiParam;
import me.zhengjie.annotation.Log;
import me.zhengjie.gemho.service.tab.DrybeachequipinforService;
import me.zhengjie.gemho.service.tab.TabAbnormalService;
import me.zhengjie.gemho.util.PageResult;
import me.zhengjie.gemho.util.PostOrPutResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
/** /**
* <p> * <p>
...@@ -13,10 +26,123 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -13,10 +26,123 @@ import org.springframework.web.bind.annotation.RestController;
* @author llj * @author llj
* @since 2021-12-22 * @since 2021-12-22
*/ */
@Api(tags = "基础信息: 警") @Api(tags = "基础信息: 警")
@RestController @RestController
@RequestMapping("/tabAbnormal") @RequestMapping("/tab/Abnormal")
public class AbnormalController { public class AbnormalController {
@Autowired
private TabAbnormalService tabAbnormalService;
@Autowired
private DrybeachequipinforService drybeachequipinforService;
@ApiOperation(value = "获取预警列表")
@GetMapping()
public ResponseEntity<Object> getAbnormalall() {
ArrayList<HashMap<String, Object>> abnormal = tabAbnormalService.getAbnormal();
return new ResponseEntity<>(new PageResult().nopagesuccess(abnormal), HttpStatus.OK);
}
@Log("接触报警")
@ApiOperation(value = "解除预警")
@PostMapping
public ResponseEntity<Object> jcbj(@RequestBody HashMap<String, String> map) {
String equipno = map.get("equipno");
String time = map.get("time");
String reason = map.get("reason");
String jcreason = map.get("jcreason");
boolean jcbj = tabAbnormalService.jcbj(equipno, time, reason, jcreason);
if (jcbj) {
return new ResponseEntity<>(new PostOrPutResult().success(), HttpStatus.OK);
}
return new ResponseEntity<>(new PostOrPutResult().dingyifailed("解除失败"), HttpStatus.INTERNAL_SERVER_ERROR);
}
@ApiOperation(value = "风险统计")
@GetMapping("statistics")
public ResponseEntity<Object> statistics(String date) {
List<HashMap<String, Object>> statistics = tabAbnormalService.statistics(date);
return new ResponseEntity<>(new PageResult().nopagesuccess(statistics), HttpStatus.OK);
}
@ApiOperation(value = "检测项风险状态列表")
@GetMapping("typelist")
public ResponseEntity<Object> typelist() {
List<HashMap<String, Object>> statistics1 = tabAbnormalService.statistics1();
HashMap<String, Integer> map = new HashMap<>();
for (HashMap<String, Object> stringObjectHashMap : statistics1) {
String devicetype = (String) stringObjectHashMap.get("code");
Integer integer4 = Integer.parseInt(stringObjectHashMap.get("4").toString());
Integer integer3 = Integer.parseInt(stringObjectHashMap.get("3").toString());
Integer integer2 = Integer.parseInt(stringObjectHashMap.get("2").toString());
Integer integer1 = Integer.parseInt(stringObjectHashMap.get("1").toString());
if (integer4 > 3) {
stringObjectHashMap.put("2", integer3 + 1);
if (integer3 + 1 > 2) {
stringObjectHashMap.put("2", integer2 + 1);
if (integer2 + 1 > 1) {
stringObjectHashMap.put("2", integer1 + 1);
}
}
}
if (integer4 > 0) {
map.put(devicetype, 4);
}
if (integer3 > 0) {
map.put(devicetype, 3);
}
if (integer2 > 0) {
map.put(devicetype, 2);
}
if (integer1 > 0) {
map.put(devicetype, 1);
}
}
List<HashMap<String, Object>> typelist = tabAbnormalService.typelist();
for (HashMap<String, Object> statistic : typelist) {
String code = (String) statistic.get("code");
Integer integer = map.get(code);
if (integer == null) {
integer = 0;
}
statistic.put("alarmlevel", integer);
}
return new ResponseEntity<>(new PageResult().nopagesuccess(typelist), HttpStatus.OK);
}
@ApiOperation(value = "风险等级月统计")
@GetMapping("monthtj")
public ResponseEntity<Object> monthtj() {
List<HashMap<String, Object>> monthtj = tabAbnormalService.monthtj();
return new ResponseEntity<>(new PageResult().nopagesuccess(monthtj), HttpStatus.OK);
}
@ApiOperation(value = "获取设备的四级报警")
@GetMapping("level")
public ResponseEntity<Object> alarmlevel(@ApiParam(value = "分页参数,页数") String page,
@ApiParam(value = "分页参数,数量") String size,
@ApiParam(value = "查询条件字段") String searchName,
@ApiParam(value = "查询条件数值") String searchValue,
@ApiParam(value = "查询条件精准或者模糊") String limit,
@ApiParam(value = "查询条件时间区间") String timeSpace,
@ApiParam(value = "查询条件正序或者倒序") String sort) {
Long page1 = Long.valueOf(page);
Long size1 = Long.valueOf(size);
HashMap<String, Object> level = drybeachequipinforService.level(searchName, searchValue, limit, timeSpace, sort, page1, size1);
return new ResponseEntity<>(new PageResult().nopagesuccess(level), HttpStatus.OK);
}
@ApiOperation(value = "修改设备预警")
@PutMapping("level")
public ResponseEntity<Object> dealLevel(@RequestBody HashMap<String, String> map) {
drybeachequipinforService.dealLevel(map);
return new ResponseEntity<>(new PostOrPutResult().success(), HttpStatus.OK);
}
public static void main(String[] args) {
String s= "";
if(!"".equals(s)&&s!=null){
System.out.println("进入");
}
}
} }
...@@ -3,14 +3,16 @@ package me.zhengjie.gemho.controller.tab; ...@@ -3,14 +3,16 @@ package me.zhengjie.gemho.controller.tab;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.swagger.annotations.*; import io.swagger.annotations.*;
import me.zhengjie.gemho.datavo.DryVo; import me.zhengjie.annotation.Log;
import me.zhengjie.gemho.entity.sys.SysType; import me.zhengjie.gemho.entity.sys.SysType;
import me.zhengjie.gemho.entity.tab.Drybeachequipinfor; import me.zhengjie.gemho.entity.tab.Drybeachequipinfor;
import me.zhengjie.gemho.service.sys.SysSummaryService;
import me.zhengjie.gemho.service.sys.SysTypeService; import me.zhengjie.gemho.service.sys.SysTypeService;
import me.zhengjie.gemho.service.tab.DrybeachequipinforService; import me.zhengjie.gemho.service.tab.DrybeachequipinforService;
import me.zhengjie.gemho.service.tab.TabAbnormalService; import me.zhengjie.gemho.service.tab.TabAbnormalService;
import me.zhengjie.gemho.util.PageResult; import me.zhengjie.gemho.util.PageResult;
import me.zhengjie.gemho.util.PostOrPutResult; import me.zhengjie.gemho.util.PostOrPutResult;
import me.zhengjie.gemho.x_datavo.DryVo;
import me.zhengjie.modules.security.service.OnlineUserService; import me.zhengjie.modules.security.service.OnlineUserService;
import me.zhengjie.utils.SecurityUtils; import me.zhengjie.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -43,6 +45,8 @@ public class DrybeachequipinforController { ...@@ -43,6 +45,8 @@ public class DrybeachequipinforController {
@Autowired @Autowired
private SysTypeService sysTypeService; private SysTypeService sysTypeService;
@Autowired @Autowired
private SysSummaryService sysSummaryService;
@Autowired
private OnlineUserService onlineUserService; private OnlineUserService onlineUserService;
/** /**
...@@ -51,6 +55,7 @@ public class DrybeachequipinforController { ...@@ -51,6 +55,7 @@ public class DrybeachequipinforController {
* @param drybeachequipinfor * @param drybeachequipinfor
* @return * @return
*/ */
@Log("新增设备")
@ApiOperation(value = "新增设备", response = PostOrPutResult.class) @ApiOperation(value = "新增设备", response = PostOrPutResult.class)
@PostMapping @PostMapping
public ResponseEntity<Object> add(@RequestBody Drybeachequipinfor drybeachequipinfor) { public ResponseEntity<Object> add(@RequestBody Drybeachequipinfor drybeachequipinfor) {
...@@ -61,8 +66,10 @@ public class DrybeachequipinforController { ...@@ -61,8 +66,10 @@ public class DrybeachequipinforController {
String eqno = format + i; String eqno = format + i;
drybeachequipinfor.setEquipno(eqno); drybeachequipinfor.setEquipno(eqno);
drybeachequipinfor.setCreatetime(new Date()); drybeachequipinfor.setCreatetime(new Date());
drybeachequipinfor.setUpdatetime(new Date());
boolean save = drybeachequipinforService.save(drybeachequipinfor); boolean save = drybeachequipinforService.save(drybeachequipinfor);
if (save) { if (save) {
onlineUserService.clearMenu();
return new ResponseEntity<>(new PostOrPutResult().success(), HttpStatus.OK); return new ResponseEntity<>(new PostOrPutResult().success(), HttpStatus.OK);
} else { } else {
return new ResponseEntity<>(new PostOrPutResult().failed(), HttpStatus.INTERNAL_SERVER_ERROR); return new ResponseEntity<>(new PostOrPutResult().failed(), HttpStatus.INTERNAL_SERVER_ERROR);
...@@ -78,14 +85,26 @@ public class DrybeachequipinforController { ...@@ -78,14 +85,26 @@ public class DrybeachequipinforController {
* @param map * @param map
* @return * @return
*/ */
@Log("删除设备")
@ApiOperation(value = "删除设备", response = PostOrPutResult.class) @ApiOperation(value = "删除设备", response = PostOrPutResult.class)
@PreAuthorize("hasAnyRole('admin','menu:edit')") @PreAuthorize("@el.check('delect:dry')")
@DeleteMapping @DeleteMapping
public ResponseEntity<Object> deleteone(@RequestBody HashMap<String, Integer> map) { public ResponseEntity<Object> deleteone(@RequestBody HashMap<String, String> map) {
try { try {
Integer id = map.get("id"); boolean b = false;
boolean b = drybeachequipinforService.removeById(id); Integer id = Integer.parseInt(map.get("id"));
QueryWrapper<Drybeachequipinfor> drybeachequipinforQueryWrapper = new QueryWrapper<>();
drybeachequipinforQueryWrapper.eq("id", id);
Drybeachequipinfor one = drybeachequipinforService.getOne(drybeachequipinforQueryWrapper);
String equipno = one.getEquipno();
String devicetype = one.getDevicetype();
if (devicetype.equals("8")) {
b = drybeachequipinforService.removeById(id);
} else {
b = drybeachequipinforService.deleteall(equipno);
}
if (b) { if (b) {
onlineUserService.clearMenu();
return new ResponseEntity<>(new PostOrPutResult().success(), HttpStatus.OK); return new ResponseEntity<>(new PostOrPutResult().success(), HttpStatus.OK);
} else { } else {
return new ResponseEntity<>(new PostOrPutResult().failed(), HttpStatus.INTERNAL_SERVER_ERROR); return new ResponseEntity<>(new PostOrPutResult().failed(), HttpStatus.INTERNAL_SERVER_ERROR);
...@@ -101,6 +120,7 @@ public class DrybeachequipinforController { ...@@ -101,6 +120,7 @@ public class DrybeachequipinforController {
* @param drybeachequipinfor * @param drybeachequipinfor
* @return * @return
*/ */
@Log("修改设备")
@ApiOperation(value = "修改设备", response = PostOrPutResult.class) @ApiOperation(value = "修改设备", response = PostOrPutResult.class)
@PutMapping @PutMapping
public ResponseEntity<Object> updateone(@RequestBody Drybeachequipinfor drybeachequipinfor) { public ResponseEntity<Object> updateone(@RequestBody Drybeachequipinfor drybeachequipinfor) {
...@@ -109,6 +129,7 @@ public class DrybeachequipinforController { ...@@ -109,6 +129,7 @@ public class DrybeachequipinforController {
//drybeachequipinfor.setCreatetime(new Date()); //drybeachequipinfor.setCreatetime(new Date());
boolean save = drybeachequipinforService.saveOrUpdate(drybeachequipinfor); boolean save = drybeachequipinforService.saveOrUpdate(drybeachequipinfor);
if (save) { if (save) {
onlineUserService.clearMenu();
return new ResponseEntity<>(new PostOrPutResult().success(), HttpStatus.OK); return new ResponseEntity<>(new PostOrPutResult().success(), HttpStatus.OK);
} else { } else {
return new ResponseEntity<>(new PostOrPutResult().failed(), HttpStatus.INTERNAL_SERVER_ERROR); return new ResponseEntity<>(new PostOrPutResult().failed(), HttpStatus.INTERNAL_SERVER_ERROR);
...@@ -145,37 +166,9 @@ public class DrybeachequipinforController { ...@@ -145,37 +166,9 @@ public class DrybeachequipinforController {
return new ResponseEntity<>(new PageResult().failed(), HttpStatus.INTERNAL_SERVER_ERROR); return new ResponseEntity<>(new PageResult().failed(), HttpStatus.INTERNAL_SERVER_ERROR);
} }
} }
/*
/** */
* 解除报警
*
* @return
*/
@PutMapping("jcbj")
public ResponseEntity<Object> jcbj(@RequestBody HashMap<String, String> map) {
boolean jcbj1 = false;
//获取参数
String equipname = map.get("equipname");
String time = map.get("time");
String reason = map.get("reason");
//查询对应的设备编码
QueryWrapper<Drybeachequipinfor> wrapper = new QueryWrapper<>();
wrapper.eq("equipname", equipname);
Drybeachequipinfor one = drybeachequipinforService.getOne(wrapper);
if (one != null) {
String equipno = one.getEquipno();
jcbj1 = tabAbnormalService.jcbj(equipno, time, reason);
} else {
return new ResponseEntity<>(new PostOrPutResult().setCode(200).setMsg("设备名称不对"), HttpStatus.OK);
}
boolean jcbj = drybeachequipinforService.jcbj(equipname);
if (jcbj && jcbj1) {
return new ResponseEntity<>(new PostOrPutResult().success(), HttpStatus.OK);
} else {
return new ResponseEntity<>(new PostOrPutResult().failed(), HttpStatus.INTERNAL_SERVER_ERROR);
}
}
@ApiOperation(value = "获取所有设备id", response = DryVo.class) @ApiOperation(value = "获取所有设备id", response = DryVo.class)
@GetMapping("ids") @GetMapping("ids")
...@@ -224,6 +217,7 @@ public class DrybeachequipinforController { ...@@ -224,6 +217,7 @@ public class DrybeachequipinforController {
HashMap<String, Integer> map = drybeachequipinforService.getdyinfo(); HashMap<String, Integer> map = drybeachequipinforService.getdyinfo();
return new ResponseEntity<>(new PageResult().success(map), HttpStatus.OK); return new ResponseEntity<>(new PageResult().success(map), HttpStatus.OK);
} }
} }
package me.zhengjie.gemho.controller.tab;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import me.zhengjie.gemho.entity.tab.Monitoring;
import me.zhengjie.gemho.service.tab.MonitoringService;
import me.zhengjie.gemho.util.PageResult;
import me.zhengjie.gemho.util.PostOrPutResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import java.util.HashMap;
import java.util.List;
/**
* <p>
* 监测点 前端控制器
* </p>
*
* @author llj
* @since 2022-02-11
*/
@Api(tags = "基础信息: 监测点")
@RestController
@RequestMapping("tab/monitoring")
public class MonitoringController {
@Autowired
private MonitoringService iTbMonitoringService;
@ApiOperation(value = "新增监测点")
@PostMapping()
public ResponseEntity<Object> add(@RequestBody Monitoring monitoring) {
try {
boolean save = iTbMonitoringService.save(monitoring);
if (save) {
return new ResponseEntity<>(new PostOrPutResult().success(), HttpStatus.OK);
}
return new ResponseEntity<>(new PostOrPutResult().failed(), HttpStatus.OK);
} catch (Exception e) {
System.out.println(e);
return new ResponseEntity<>(new PostOrPutResult().failed(), HttpStatus.OK);
}
}
@ApiModelProperty(value = "删除监测点")
@DeleteMapping
public ResponseEntity<Object> delete(@RequestBody HashMap<String, Integer> map) {
try {
Integer id = map.get("id");
boolean result = iTbMonitoringService.removeById(id);
if (result) {
return new ResponseEntity<>(new PostOrPutResult().success(), HttpStatus.OK);
}
return new ResponseEntity<>(new PostOrPutResult().failed(), HttpStatus.OK);
} catch (Exception e) {
System.out.println(e);
return new ResponseEntity<>(new PostOrPutResult().failed(), HttpStatus.OK);
}
}
@ApiModelProperty(value = "修改监测点信息")
@PutMapping
public ResponseEntity<Object> updata(@RequestBody Monitoring monitoring) {
try {
boolean result = iTbMonitoringService.saveOrUpdate(monitoring);
if (result) {
return new ResponseEntity<>(new PostOrPutResult().success(), HttpStatus.OK);
}
return new ResponseEntity<>(new PostOrPutResult().failed(), HttpStatus.OK);
} catch (Exception e) {
System.out.println(e);
return new ResponseEntity<>(new PostOrPutResult().failed(), HttpStatus.OK);
}
}
@ApiModelProperty(value = "获取所有检测点位信息")
@GetMapping
public ResponseEntity<Object> getall() {
List<Monitoring> list = iTbMonitoringService.list();
return new ResponseEntity<>(new PageResult().nopagesuccess(list), HttpStatus.OK);
}
}
package me.zhengjie.gemho.controller.tab;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.swagger.annotations.Api;
import me.zhengjie.gemho.entity.sys.SysSelect;
import me.zhengjie.gemho.entity.tab.Monitorvideo;
import me.zhengjie.gemho.service.sys.SysSelectService;
import me.zhengjie.gemho.service.sys.SysSummaryService;
import me.zhengjie.gemho.service.tab.MonitorvideoService;
import me.zhengjie.gemho.util.PageResult;
import me.zhengjie.modules.security.service.OnlineUserService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@Api(tags = "基础信息: 视频监控")
@RestController
@RequestMapping("tab/montorvideo")
public class MonitorvideoController {
@Autowired
private MonitorvideoService monitorvideoService;
@Autowired
private SysSummaryService sysSummaryService;
@Autowired
private OnlineUserService onlineUserService;
@Autowired
private SysSelectService sysSelectService;
@GetMapping
public ResponseEntity<Object> getmontorvideo(@Param(value = "检测项id") String id,
@Param(value = "检测项名称") String sumtitle) {
QueryWrapper<SysSelect> sysSelectQueryWrapper = new QueryWrapper<>();
sysSelectQueryWrapper.eq("id", Integer.parseInt(id));
SysSelect one2 = sysSelectService.getOne(sysSelectQueryWrapper);
Integer sumid = one2.getSumid();
//根据检测项返回
QueryWrapper<Monitorvideo> monitorvideoQueryWrapper = new QueryWrapper<>();
monitorvideoQueryWrapper.eq("v_sumid", sumid + "");
Monitorvideo one = monitorvideoService.getOne(monitorvideoQueryWrapper);
return new ResponseEntity<>(new PageResult().nopagesuccess(one), HttpStatus.OK);
}
}
...@@ -3,6 +3,7 @@ package me.zhengjie.gemho.controller.tab; ...@@ -3,6 +3,7 @@ package me.zhengjie.gemho.controller.tab;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.swagger.annotations.*; import io.swagger.annotations.*;
import me.zhengjie.annotation.Log;
import me.zhengjie.gemho.entity.tab.Tailpondinfor; import me.zhengjie.gemho.entity.tab.Tailpondinfor;
import me.zhengjie.gemho.service.tab.TailpondinforService; import me.zhengjie.gemho.service.tab.TailpondinforService;
import me.zhengjie.gemho.util.PageResult; import me.zhengjie.gemho.util.PageResult;
...@@ -16,9 +17,9 @@ import org.springframework.http.ResponseEntity; ...@@ -16,9 +17,9 @@ import org.springframework.http.ResponseEntity;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.List;
/** /**
* <p> * <p>
...@@ -43,6 +44,7 @@ public class TailpondinforController { ...@@ -43,6 +44,7 @@ public class TailpondinforController {
* @param tailpondinfor * @param tailpondinfor
* @return * @return
*/ */
@Log("新增尾矿库信息")
@PreAuthorize("@el.check('admin')") @PreAuthorize("@el.check('admin')")
@ApiOperation(value = "新增尾矿库基础信息", response = PostOrPutResult.class) @ApiOperation(value = "新增尾矿库基础信息", response = PostOrPutResult.class)
@PostMapping @PostMapping
...@@ -101,6 +103,7 @@ public class TailpondinforController { ...@@ -101,6 +103,7 @@ public class TailpondinforController {
* @param map * @param map
* @return * @return
*/ */
@Log("删除尾矿库信息")
@PreAuthorize("@el.check('admin')") @PreAuthorize("@el.check('admin')")
@ApiOperation(value = "删除尾矿库基础信息", response = PostOrPutResult.class) @ApiOperation(value = "删除尾矿库基础信息", response = PostOrPutResult.class)
@DeleteMapping @DeleteMapping
...@@ -124,6 +127,7 @@ public class TailpondinforController { ...@@ -124,6 +127,7 @@ public class TailpondinforController {
* @param tailpondinfor * @param tailpondinfor
* @return * @return
*/ */
@Log("修改尾矿库信息")
@ApiOperation(value = "修改尾矿库基础信息", response = PostOrPutResult.class) @ApiOperation(value = "修改尾矿库基础信息", response = PostOrPutResult.class)
@PutMapping @PutMapping
public ResponseEntity<Object> updateone(@RequestBody Tailpondinfor tailpondinfor) { public ResponseEntity<Object> updateone(@RequestBody Tailpondinfor tailpondinfor) {
...@@ -147,6 +151,7 @@ public class TailpondinforController { ...@@ -147,6 +151,7 @@ public class TailpondinforController {
boolean b = tailpondinforService.updataDefaultno(currentUsername, tailpondinfor.getTailingno()); boolean b = tailpondinforService.updataDefaultno(currentUsername, tailpondinfor.getTailingno());
if (b) { if (b) {
onlineUserService.saveWKKBase(currentUsername); onlineUserService.saveWKKBase(currentUsername);
} }
} }
return new ResponseEntity<>(new PostOrPutResult().success(), HttpStatus.OK); return new ResponseEntity<>(new PostOrPutResult().success(), HttpStatus.OK);
...@@ -187,27 +192,35 @@ public class TailpondinforController { ...@@ -187,27 +192,35 @@ public class TailpondinforController {
} }
} }
@ApiOperation(value = "获取当前用户可切换的尾矿库列表") @ApiOperation(value = "获取当前用户尾矿库")
@GetMapping("usertailpon") @GetMapping("usertailpon")
public ResponseEntity<Object> userta() { public ResponseEntity<Object> userta() {
try { try {
ArrayList<HashMap<String, Object>> usertailpon = tailpondinforService.usertailpon(); List<Tailpondinfor> usertailpon = tailpondinforService.usertailpon();
return new ResponseEntity<>(new PageResult().nopagesuccess(usertailpon), HttpStatus.OK); return new ResponseEntity<>(new PageResult().nopagesuccess(usertailpon), HttpStatus.OK);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
return new ResponseEntity<>(new PageResult().nopagefailed(ThrowableUtil.getStackTrace(e)), HttpStatus.INTERNAL_SERVER_ERROR); return new ResponseEntity<>(new PageResult().nopagefailed(ThrowableUtil.getStackTrace(e)), HttpStatus.INTERNAL_SERVER_ERROR);
} }
} }
@Log("切换尾矿库")
@ApiOperation(value = "切换尾矿库") @ApiOperation(value = "切换尾矿库")
@PutMapping("usertailpon") @PostMapping("usertailpon")
public ResponseEntity<Object> change(@RequestBody HashMap<String, String> map) { public ResponseEntity<Object> change(@RequestBody HashMap<String, String> map) {
String tailingno = map.get("tailingno"); String tailingno = map.get("tailingno");
String username = SecurityUtils.getCurrentUsername(); String username = SecurityUtils.getCurrentUsername();
tailpondinforService.updataDefaultno(username, tailingno);
onlineUserService.changeWkkBase(username, tailingno); onlineUserService.changeWkkBase(username, tailingno);
return new ResponseEntity<>(new PostOrPutResult().success(), HttpStatus.OK); return new ResponseEntity<>(new PostOrPutResult().success(), HttpStatus.OK);
} }
@ApiOperation(value = "获取当前尾矿库信息")
@GetMapping("dryinfo")
public ResponseEntity<Object> change() {
String currentUsername = SecurityUtils.getCurrentUsername();
String gettailno = onlineUserService.gettailno(currentUsername);
HashMap<String, Object> getzuobiao = tailpondinforService.getzuobiao(gettailno);
return new ResponseEntity<>(new PageResult().nopagesuccess(getzuobiao), HttpStatus.OK);
}
} }
...@@ -4,6 +4,7 @@ package me.zhengjie.gemho.controller.tab; ...@@ -4,6 +4,7 @@ package me.zhengjie.gemho.controller.tab;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import me.zhengjie.annotation.Log;
import me.zhengjie.gemho.entity.tab.UserTailpon; import me.zhengjie.gemho.entity.tab.UserTailpon;
import me.zhengjie.gemho.service.tab.TailpondinforService; import me.zhengjie.gemho.service.tab.TailpondinforService;
import me.zhengjie.gemho.service.tab.UserTailponService; import me.zhengjie.gemho.service.tab.UserTailponService;
...@@ -54,11 +55,12 @@ public class UserTailponController { ...@@ -54,11 +55,12 @@ public class UserTailponController {
HashMap hashMap = new HashMap<String, ArrayList<HashMap<String, Object>>>(); HashMap hashMap = new HashMap<String, ArrayList<HashMap<String, Object>>>();
ArrayList<HashMap<String, Object>> codeByUser = tailpondinforService.getCodeByUser(username); ArrayList<HashMap<String, Object>> codeByUser = tailpondinforService.getCodeByUser(username);
ArrayList<HashMap<String, Object>> getcodes = tailpondinforService.getcodes(); ArrayList<HashMap<String, Object>> getcodes = tailpondinforService.getcodes();
hashMap.put("user",codeByUser); hashMap.put("user", codeByUser);
hashMap.put("list",getcodes); hashMap.put("list", getcodes);
return new ResponseEntity<>(new PageResult().nopagesuccess(hashMap), HttpStatus.OK); return new ResponseEntity<>(new PageResult().nopagesuccess(hashMap), HttpStatus.OK);
} }
@Log("绑定用户尾矿库信息")
@ApiOperation(value = "绑定用户和尾矿信息") @ApiOperation(value = "绑定用户和尾矿信息")
@PostMapping() @PostMapping()
public ResponseEntity<Object> add(String username, ArrayList<HashMap<String, String>> maps) { public ResponseEntity<Object> add(String username, ArrayList<HashMap<String, String>> maps) {
......
...@@ -4,10 +4,10 @@ import cn.hutool.http.HttpRequest; ...@@ -4,10 +4,10 @@ import cn.hutool.http.HttpRequest;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import me.zhengjie.gemho.datavo.weather.WeatherVo;
import me.zhengjie.gemho.entity.tab.Tailpondinfor; import me.zhengjie.gemho.entity.tab.Tailpondinfor;
import me.zhengjie.gemho.service.tab.TailpondinforService; import me.zhengjie.gemho.service.tab.TailpondinforService;
import me.zhengjie.gemho.util.PageResult; import me.zhengjie.gemho.util.PageResult;
import me.zhengjie.gemho.x_datavo.weather.WeatherVo;
import me.zhengjie.modules.security.service.OnlineUserService; import me.zhengjie.modules.security.service.OnlineUserService;
import me.zhengjie.utils.SecurityUtils; import me.zhengjie.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
......
package me.zhengjie.gemho.controller.web;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import me.zhengjie.annotation.Log;
import me.zhengjie.gemho.entity.web.WebMonitorChart;
import me.zhengjie.gemho.service.web.IWebMonitorChartService;
import me.zhengjie.gemho.util.PageResult;
import me.zhengjie.gemho.util.PostOrPutResult;
import me.zhengjie.gemho.x_datavo.web.MonitorChartVo;
import me.zhengjie.modules.security.service.OnlineUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import java.util.HashMap;
/**
* <p>
* 监测点模块前端控制器
* </p>
*
* @author llj
* @since 2022-03-28
*/
@Api(tags = "监测点: 尾矿库-监测点")
@RestController
@RequestMapping("web/monitorchart")
public class WebMonitorChartController {
@Autowired
private IWebMonitorChartService iWebMonitorChartService;
@Autowired
private OnlineUserService onlineUserService;
@Log("新增/修改监测点模块信息")
@ApiOperation(value = "新增/修改监测点模块信息")
@PostMapping
public ResponseEntity<Object> add(@RequestBody WebMonitorChart webMonitorChart) {
boolean save = iWebMonitorChartService.deal(webMonitorChart);
if (save) {
return new ResponseEntity<>(new PostOrPutResult().success(), HttpStatus.OK);
}
return new ResponseEntity<>(new PostOrPutResult().failed(), HttpStatus.INTERNAL_SERVER_ERROR);
}
@Log("删除检测项图片")
@ApiOperation(value = "删除检测项图片")
@DeleteMapping
public ResponseEntity<Object> delete(@RequestBody HashMap<String, Object> map) {
Integer id = Integer.valueOf(map.get("id").toString());
boolean b = iWebMonitorChartService.depic(id);
if (b) {
return new ResponseEntity<>(new PostOrPutResult().success(), HttpStatus.OK);
}
return new ResponseEntity<>(new PostOrPutResult().failed(), HttpStatus.INTERNAL_SERVER_ERROR);
}
@ApiOperation(value = "监测点模块信息")
@GetMapping
public ResponseEntity<Object> get() {
MonitorChartVo getmonbase = iWebMonitorChartService.getmonbase();
return new ResponseEntity<>(new PageResult().nopagesuccess(getmonbase), HttpStatus.OK);
}
@ApiOperation(value = "监测点模块信息_大屏使用")
@GetMapping("visual")
public ResponseEntity<Object> getvisual() {
MonitorChartVo getmonbase = iWebMonitorChartService.getmonbasevisual();
return new ResponseEntity<>(new PageResult().nopagesuccess(getmonbase), HttpStatus.OK);
}
}
package me.zhengjie.gemho.controller.web;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import me.zhengjie.annotation.Log;
import me.zhengjie.gemho.mapper.web.WebMonitorChartMapper;
import me.zhengjie.gemho.service.web.IWebMonitorChartService;
import me.zhengjie.gemho.service.web.IWebMonitorLinkService;
import me.zhengjie.gemho.service.web.IWebMonitorPointsService;
import me.zhengjie.gemho.util.PostOrPutResult;
import me.zhengjie.gemho.x_datavo.web.MonitorChartRq;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* <p>
* 监测点详细信息
* 前端控制器
* </p>
*
* @author llj
* @since 2022-03-28
*/
@Api(tags = "监测点: 详细信息")
@RestController
@RequestMapping("web/monitorpoints")
public class WebMonitorPointsController {
@Autowired
private IWebMonitorChartService iWebMonitorChartService;
@Autowired
private IWebMonitorPointsService webMonitorPointsService;
@Autowired
private IWebMonitorLinkService iWebMonitorLinkService;
@Autowired
private WebMonitorChartMapper webMonitorChartMapper;
@Log("配置监测点信息")
@ApiOperation(value = "配置监测点信息")
@PostMapping
public ResponseEntity<Object> add(@RequestBody MonitorChartRq monitorChartVo) {
webMonitorPointsService.deal(monitorChartVo);
return new ResponseEntity<>(new PostOrPutResult().success(), HttpStatus.OK);
}
@Log("删除监测点")
@ApiOperation(value = "删除监测点")
@DeleteMapping()
public ResponseEntity<Object> delete(@RequestBody List<String> ids) {
boolean remove = webMonitorPointsService.deletePoints(ids.get(0));
if (remove) {
return new ResponseEntity<>(new PostOrPutResult().success(), HttpStatus.OK);
}
return new ResponseEntity<>(new PostOrPutResult().failed(), HttpStatus.INTERNAL_SERVER_ERROR);
}
}
\ No newline at end of file
...@@ -5,6 +5,7 @@ import lombok.Getter; ...@@ -5,6 +5,7 @@ import lombok.Getter;
import lombok.Setter; import lombok.Setter;
import java.io.Serializable; import java.io.Serializable;
import java.time.LocalDate;
/** /**
* <p> * <p>
...@@ -27,5 +28,9 @@ public class Test implements Serializable { ...@@ -27,5 +28,9 @@ public class Test implements Serializable {
private String password; private String password;
public static void main(String[] args) {
LocalDate now = LocalDate.now();
}
} }
package me.zhengjie.gemho.entity.artificial;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* <p>
* 人工监测数据表
* </p>
*
* @author llj
* @since 2022-04-25
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("artificial_data")
@ApiModel(value="ArtificialData对象", description="人工监测数据表")
public class ArtificialData implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
@ApiModelProperty(value = "监测项id")
@TableField("jcitemid")
private Integer jcitemid;
@ApiModelProperty(value = "监测子项id")
@TableField("jcziitemid")
private Integer jcziitemid;
@ApiModelProperty(value = "监测内容及要求id")
@TableField("jcneirongid")
private Integer jcneirongid;
@ApiModelProperty(value = "监测仪器")
@TableField("jcyiqi")
private Integer jcyiqi;
@ApiModelProperty(value = "监测精度")
@TableField("jcjingdu")
private Integer jcjingdu;
@ApiModelProperty(value = "监测结果")
@TableField("jcjieguo")
private String jcjieguo;
@ApiModelProperty(value = "添加时间或修改时间")
@TableField("addtime")
private LocalDateTime addtime;
@ApiModelProperty(value = "监测时间")
@TableField("jctime")
private LocalDateTime jctime;
}
package me.zhengjie.gemho.entity.artificial;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* <p>
* 人工监测点位表
* </p>
*
* @author llj
* @since 2022-04-25
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("artificial_point")
@ApiModel(value="ArtificialPoint对象", description="人工监测点位表")
public class ArtificialPoint implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
@ApiModelProperty(value = "监测项")
@TableField("jcitem")
private String jcitem;
@ApiModelProperty(value = "人工监测点名称")
@TableField("jcdname")
private String jcdname;
@ApiModelProperty(value = "地点备注")
@TableField("remarks")
private String remarks;
@ApiModelProperty(value = "添加时间")
@TableField("addtime")
private LocalDateTime addtime;
}
...@@ -41,6 +41,8 @@ public class DbData implements Serializable { ...@@ -41,6 +41,8 @@ public class DbData implements Serializable {
@ApiModelProperty("设备id") @ApiModelProperty("设备id")
public String sensorid; public String sensorid;
@ApiModelProperty("设备名称")
public String sensorname;
/** /**
* 测量时间 * 测量时间
*/ */
...@@ -96,7 +98,6 @@ public class DbData implements Serializable { ...@@ -96,7 +98,6 @@ public class DbData implements Serializable {
public Integer datasource; public Integer datasource;
public static void main(String[] args) { public static void main(String[] args) {
DbData dbData = new DbData(); DbData dbData = new DbData();
dbData.setLenth("1"); dbData.setLenth("1");
......
package me.zhengjie.gemho.entity.data;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* <p>
* 人工检测数据表
* </p>
*
* @author llj
* @since 2022-03-04
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("tb_pdata")
@ApiModel(value = "Pdata对象", description = "人工检测数据表")
public class Pdata implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
@ApiModelProperty(value = "监测项目(表面位移,浸润线.....)")
private String type;
@ApiModelProperty(value = "监测内容及要求")
private String content;
@ApiModelProperty(value = "监测仪器")
private String equipno;
@ApiModelProperty(value = "监测值")
private String value;
@ApiModelProperty(value = "监测时间")
private LocalDateTime time;
}
package me.zhengjie.gemho.entity.demo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Getter;
import lombok.Setter;
import java.io.Serializable;
import java.sql.Blob;
/**
* <p>
*
* </p>
*
* @author llj
* @since 2022-04-02
*/
@Getter
@Setter
@TableName("web_monitor_chart")
public class MonitorChart implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
/**
* 尾矿库编号
*/
private String tailingno;
/**
* 监测点背景图片
*/
private Blob picture;
/**
* 区域高度
*/
private Integer height;
/**
* 区域宽度
*/
private Integer width;
}
package me.zhengjie.gemho.entity.demo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Getter;
import lombok.Setter;
import java.io.Serializable;
/**
* <p>
*
* </p>
*
* @author llj
* @since 2022-04-02
*/
@Getter
@Setter
@TableName("web_monitor_points")
public class MonitorPoints implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
/**
* 图表ID
*/
private Integer chartid;
/**
* 监测点类型
*/
private String type;
/**
* 编号
*/
private String guid;
/**
* 监测点名称
*/
private String name;
/**
* x位置
*/
private String x;
/**
* y位置
*/
private String y;
/**
* 高度
*/
private Double height;
/**
* 宽度
*/
private Double width;
/**
* 角度
*/
private Double angle;
/**
* 信息框位置
*/
private String infoseat;
/**
* 备注
*/
private String remark;
}
package me.zhengjie.gemho.entity.tab; package me.zhengjie.gemho.entity.dic;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
...@@ -13,30 +13,26 @@ import java.io.Serializable; ...@@ -13,30 +13,26 @@ import java.io.Serializable;
/** /**
* <p> * <p>
* * 检测项_字典
* </p> * </p>
* *
* @author llj * @author llj
* @since 2022-02-11 * @since 2022-04-25
*/ */
@Data @Data
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@Accessors(chain = true) @Accessors(chain = true)
@TableName("tb_mon_drybeachequipinfor") @TableName("c_jcjd")
@ApiModel(value="TbMonDrybeachequipinfor对象", description="") @ApiModel(value="Jcjd对象", description="检测项_字典")
public class MonDrybeachequipinfor implements Serializable { public class Jcjd implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "主键id") @ApiModelProperty(value = "主键")
@TableId(value = "id", type = IdType.AUTO) @TableId(value = "id", type = IdType.AUTO)
private Integer id; private Integer id;
@ApiModelProperty(value = "监测点编号") private String name;
private String monitoringno;
@ApiModelProperty(value = "设备编号")
private String equipno;
} }
package me.zhengjie.gemho.entity.dic;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
/**
* <p>
* 检测子项_字典
* </p>
*
* @author llj
* @since 2022-04-25
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("c_jczx")
@ApiModel(value="Jczx对象", description="检测子项_字典")
public class Jczx implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "主键id")
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
@ApiModelProperty(value = "监测子项")
private String name;
@ApiModelProperty(value = "关联要求")
private String content;
@ApiModelProperty(value = "仪器")
private String implement;
@ApiModelProperty(value = "精度")
private String precision;
private Integer pId;
}
...@@ -9,7 +9,7 @@ import lombok.Getter; ...@@ -9,7 +9,7 @@ import lombok.Getter;
import lombok.Setter; import lombok.Setter;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.time.LocalDateTime;
/** /**
* <p> * <p>
...@@ -79,9 +79,9 @@ public class SysSummary implements Serializable { ...@@ -79,9 +79,9 @@ public class SysSummary implements Serializable {
private String title; private String title;
private Date createtime; private LocalDateTime createtime;
private Date updatetime; private LocalDateTime updatetime;
private int must; private int must;
@TableField(exist = false) @TableField(exist = false)
private String v_appkey; private String v_appkey;
......
...@@ -85,5 +85,7 @@ public class Abnormal implements Serializable { ...@@ -85,5 +85,7 @@ public class Abnormal implements Serializable {
*/ */
private Date updatetime; private Date updatetime;
private int alarmlevel;
} }
...@@ -560,8 +560,13 @@ public class Tailpondinfor implements Serializable { ...@@ -560,8 +560,13 @@ public class Tailpondinfor implements Serializable {
@ApiModelProperty(value = "关联用户") @ApiModelProperty(value = "关联用户")
private String username; private String username;
@ApiModelProperty(value = "关联省市区") @ApiModelProperty(value = "关联省市区")
private String subtailingno; private String subtailingno;
@ApiModelProperty(value = "大屏标题")
private String screen_title;
/** /**
* 创建时间 * 创建时间
*/ */
......
package me.zhengjie.gemho.entity.web;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
/**
* <p>
*
* </p>
*
* @author llj
* @since 2022-03-28
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "WebMonitorChart对象", description = "")
public class WebMonitorChart implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键,自增
*/
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
@ApiModelProperty(value = "尾矿库编号")
@TableField(value = "tailingno")
private String tailingno;
@ApiModelProperty(value = "监测点背景图片")
private String picture;
@ApiModelProperty(value = "区域高度")
private Integer height;
@ApiModelProperty(value = "区域宽度")
private Integer width;
}
package me.zhengjie.gemho.entity.web;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
/**
* <p>
*
* </p>
*
* @author llj
* @since 2022-03-28
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="WebMonitorIcon对象", description="")
public class WebMonitorIcon implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键,自增
*/
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
@ApiModelProperty(value = "监测点类型")
private String type;
@ApiModelProperty(value = "高度")
private Double height;
@ApiModelProperty(value = "宽度")
private Double width;
@ApiModelProperty(value = "角度")
private Double angle;
@ApiModelProperty(value = "备注")
private String remark;
}
package me.zhengjie.gemho.entity.web;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
/**
* <p>
*
* </p>
*
* @author llj
* @since 2022-03-28
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="WebMonitorLink对象", description="")
public class WebMonitorLink implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键,自增
*/
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
@ApiModelProperty(value = "监测点ID")
@TableField(value = "pointid")
private String pointid;
@ApiModelProperty(value = "设备ID")
private String deviceid;
@ApiModelProperty(value = "备注")
private String remark;
}
package me.zhengjie.gemho.entity.tab; package me.zhengjie.gemho.entity.web;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
...@@ -13,53 +13,58 @@ import java.io.Serializable; ...@@ -13,53 +13,58 @@ import java.io.Serializable;
/** /**
* <p> * <p>
* 监测点 *
* </p> * </p>
* *
* @author llj * @author llj
* @since 2022-02-11 * @since 2022-03-28
*/ */
@Data @Data
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@Accessors(chain = true) @Accessors(chain = true)
@TableName("tb_monitoring") @ApiModel(value = "WebMonitorPoints对象", description = "")
@ApiModel(value="TbMonitoring对象", description="监测点") public class WebMonitorPoints implements Serializable {
public class Monitoring implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/**
* 主键,自增
*/
@TableId(value = "id", type = IdType.AUTO) @TableId(value = "id", type = IdType.AUTO)
private Integer id; private Integer id;
@ApiModelProperty(value = "监测点名称") @ApiModelProperty(value = "图表ID")
private String monitoringname; @TableField(value = "chartid")
private Integer chartid;
@ApiModelProperty(value = "监测点编码") @ApiModelProperty(value = "监测点类型")
private String monitoringno; private String type;
@ApiModelProperty(value = "监测点X坐标") @ApiModelProperty(value = "编号")
private String monitoringxzb; private String guid;
@ApiModelProperty(value = "监测点Y坐标") @ApiModelProperty(value = "监测点名称")
private String monitoringyzb; private String name;
@ApiModelProperty(value = "position方位") @ApiModelProperty(value = "x位置")
private String monitoringposition; private Double x;
@ApiModelProperty(value = "字体大小fontSize") @ApiModelProperty(value = "y位置")
private String monitoringfontSize; private Double y;
@ApiModelProperty(value = "颜色color") @ApiModelProperty(value = "高度")
private String monitoringcolor; private Double height;
@ApiModelProperty(value = "背景") @ApiModelProperty(value = "宽度")
private String monitoringimage; private Double width;
@ApiModelProperty(value = "预留字段无实际意义") @ApiModelProperty(value = "角度")
private String remark; private Double angle;
@ApiModelProperty(value = "信息框位置")
private String infoseat;
@ApiModelProperty(value = "预留字段无实际意义") @ApiModelProperty(value = "备注")
private String backups; private String remark;
} }
package me.zhengjie.gemho.mapper.artificial;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import me.zhengjie.gemho.entity.artificial.ArtificialData;
/**
* <p>
* 人工监测数据表 Mapper 接口
* </p>
*
* @author llj
* @since 2022-04-25
*/
public interface ArtificialDataMapper extends BaseMapper<ArtificialData> {
}
package me.zhengjie.gemho.mapper.artificial;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import me.zhengjie.gemho.entity.artificial.ArtificialPoint;
/**
* <p>
* 人工监测点位表 Mapper 接口
* </p>
*
* @author llj
* @since 2022-04-25
*/
public interface ArtificialPointMapper extends BaseMapper<ArtificialPoint> {
}
...@@ -22,6 +22,6 @@ public interface DbDataMapper extends BaseMapper<DbData> { ...@@ -22,6 +22,6 @@ public interface DbDataMapper extends BaseMapper<DbData> {
@Select("SELECT * FROM (SELECT * FROM `tb_db_data` where datasource =#{datasource} ORDER BY time DESC)a where sensorid=#{deviceid} and time>=#{start} and time <=#{end}GROUP BY DATE_FORMAT(a.time,'%y-%m-%d')") @Select("SELECT * FROM (SELECT * FROM `tb_db_data` where datasource =#{datasource} ORDER BY time DESC)a where sensorid=#{deviceid} and time>=#{start} and time <=#{end}GROUP BY DATE_FORMAT(a.time,'%y-%m-%d')")
List<DbData> dealmonth(String deviceid, String start, String end, int datasource); List<DbData> dealmonth(String deviceid, String start, String end, int datasource);
@Select(value = "SELECT a.lenth as `lenth`,a.angle as angle ,a.safeheight as safeheight FROM `tb_db_data` a join tb_drybeachequipinfor b on a.sensorid = b.equipno where a.datasource =1 and b.equipno = #{equipno} ORDER BY time DESC LIMIT 1") @Select(value = "SELECT r.* from(select b.eqdanwei as eqdanwei,b.equipno equipno,a.sensorname,a.lenth as `lenth`,a.angle as angle ,a.safeheight as safeheight ,DATE_FORMAT(a.time,'%y-%m-%d %H:%m:%m') as time from tb_db_data a join tb_drybeachequipinfor b on a.sensorid=b.equipno where a.datasource =1 and b.tailingid=#{tailingid} ORDER BY time DESC) r GROUP BY r.sensorname")
HashMap<String, Object> real(String equipno); List<HashMap<String, Object>> real(String tailingid);
} }
...@@ -22,6 +22,6 @@ public interface DmDataMapper extends BaseMapper<DmData> { ...@@ -22,6 +22,6 @@ public interface DmDataMapper extends BaseMapper<DmData> {
@Select("SELECT * FROM (SELECT * FROM `tb_dm_data` where datasource =#{datasource} ORDER BY time DESC)a where sensorid=#{sensorid} and time>=#{start} and time <=#{end}GROUP BY DATE_FORMAT(a.time,'%y-%m-%d')") @Select("SELECT * FROM (SELECT * FROM `tb_dm_data` where datasource =#{datasource} ORDER BY time DESC)a where sensorid=#{sensorid} and time>=#{start} and time <=#{end}GROUP BY DATE_FORMAT(a.time,'%y-%m-%d')")
List<DmData> dealmonth(String sensorid, String start, String end, int datasource); List<DmData> dealmonth(String sensorid, String start, String end, int datasource);
@Select(value = "SELECT a.dispA as dispA,a.dispB as dispB FROM `tb_dm_data` a join tb_drybeachequipinfor b on a.sensorid=b.equipno where datasource = 1 and b.equipno =#{equipno}ORDER BY time DESC LIMIT 1") @Select(value = "SELECT r.* from(select b.eqdanwei as eqdanwei,a.sensorname,b.equipno equipno,a.dispA as dispA,a.dispB as dispB , DATE_FORMAT(a.time,'%y-%m-%d %H:%m:%m') as time from tb_dm_data a join tb_drybeachequipinfor b on a.sensorid=b.equipno where a.datasource =1 and b.tailingid=#{tailingid} ORDER BY time DESC) r GROUP BY r.sensorname")
HashMap<String, Object> real(String real); List<HashMap<String, Object>> real(String tailingid);
} }
package me.zhengjie.gemho.mapper.data; package me.zhengjie.gemho.mapper.data;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import me.zhengjie.gemho.config.aescode.AESEncryptHandler;
import me.zhengjie.gemho.entity.data.MpData; import me.zhengjie.gemho.entity.data.MpData;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;
import java.util.HashMap; import java.util.HashMap;
...@@ -22,13 +19,13 @@ import java.util.List; ...@@ -22,13 +19,13 @@ import java.util.List;
@Mapper @Mapper
public interface MpDataMapper extends BaseMapper<MpData> { public interface MpDataMapper extends BaseMapper<MpData> {
@Results({ /* @Results({
@Result(column = "acceler_x", property = "accelerx", typeHandler = AESEncryptHandler.class) @Result(column = "acceler_x", property = "accelerx", typeHandler = AESEncryptHandler.class)
}) })*/
@Select("SELECT * FROM (SELECT * FROM `tb_mp_data` where datasource =#{datasource} ORDER BY time DESC)a where sensorid=#{deviceid} and time>=#{start} and time <=#{end}GROUP BY DATE_FORMAT(a.time,'%y-%m-%d')") @Select("SELECT a.disp_x as dispx ,a.disp_y as dispy,a.disp_h as disph ,a.time as time FROM (SELECT * FROM `tb_mp_data` where datasource =#{datasource} ORDER BY time DESC)a where sensorid=#{deviceid} and time>=#{start} and time <=#{end}GROUP BY DATE_FORMAT(a.time,'%y-%m-%d')")
List<MpData> dealmonth(String deviceid, String start, String end, int datasource); List<MpData> dealmonth(String deviceid, String start, String end, int datasource);
@Select(value = "SELECT a.disp_x as disp_x , a.disp_y as dis_y ,a.disp_h as disp_h FROM `tb_mp_data` a join tb_drybeachequipinfor b on a.sensorid = b.equipno where a.datasource =1 and equipno=#{equipno} ORDER BY time DESC LIMIT 1") @Select(value = "SELECT r.* from(select b.eqdanwei as eqdanwei,b.equipno equipno,a.sensorname,a.disp_x as disp_x , a.disp_y as disp_y ,a.disp_h as disp_h ,DATE_FORMAT(a.time,'%y-%m-%d %H:%m:%m') as time from tb_mp_data a join tb_drybeachequipinfor b on a.sensorid=b.equipno where a.datasource =1 and b.tailingid=#{tailingid} ORDER BY time DESC) r GROUP BY r.sensorname")
HashMap<String, Object> real(String equipno); List<HashMap<String, Object>> real(String tailingid);
} }
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment