调整检测报告

This commit is contained in:
2025-10-16 13:36:14 +08:00
parent 6843497908
commit 15e93b6734
146 changed files with 14 additions and 9588 deletions

View File

@@ -31,6 +31,7 @@ public enum BaseReportKeyEnum {
DAY("day",""),
YEAR_MONTH_DAY("year-month-day","年-月-日"),
REPORT_DATE("reportDate","年-月-日"),
GD_NAME("gdName","供电部门"),
SUB_NAME("subName","变电站"),
CHECK_BY("checkBy","检测人"),
AUDIT_BY("auditBy","负责人、审核人"),

View File

@@ -2010,6 +2010,8 @@ public class PqReportServiceImpl extends ServiceImpl<PqReportMapper, PqReport> i
baseModelMap.put(BaseReportKeyEnum.SAMPLE_ID.getKey(), StrUtil.isEmpty(pqDevVO.getName()) ? StrPool.TAB : pqDevVO.getName());
// 报告日期
baseModelMap.put(BaseReportKeyEnum.REPORT_DATE.getKey(), DateUtil.format(new Date(), DatePattern.CHINESE_DATE_PATTERN));
// 供电部门
baseModelMap.put(BaseReportKeyEnum.GD_NAME.getKey(), pqDevVO.getGdName());
// 变电站名称
baseModelMap.put(BaseReportKeyEnum.SUB_NAME.getKey(), pqDevVO.getSubName());
// 检测人

View File

@@ -1993,7 +1993,6 @@ public class ResultServiceImpl implements IResultService {
String resultTemp = singlePhaseData.get(ItemReportKeyEnum.RESULT.getKey());
if (StrUtil.isNotBlank(resultTemp)) {
allResult.add(resultTemp);
// 收集特殊情况
if ("无法比较".equals(resultTemp)) {
String numOfDataStr = singlePhaseData.get(ItemReportKeyEnum.NUM_OF_DATA.getKey());
@@ -2440,10 +2439,13 @@ public class ResultServiceImpl implements IResultService {
}
dataMap.put(ItemReportKeyEnum.TEST.getKey(), testValue);
// 误差 - 根据参数决定是否格式化
String errorValue = String.valueOf(detectionData.getErrorData());
if (decimalPlaces != null && detectionData.getErrorData() != null ) {
errorValue = formatSignificantDigits(detectionData.getErrorData().doubleValue(), decimalPlaces);
}else{
errorValue = "/";
}
dataMap.put(ItemReportKeyEnum.ERROR.getKey(), errorValue);
@@ -2451,6 +2453,8 @@ public class ResultServiceImpl implements IResultService {
String errorScope = String.valueOf(detectionData.getRadius());
if (decimalPlaces != null && detectionData.getRadius() != null) {
errorScope = formatErrorRange(detectionData.getRadius(), decimalPlaces);
}else{
errorScope = "/";
}
dataMap.put(ItemReportKeyEnum.A_ERROR_SCOPE.getKey(), errorScope);
@@ -2573,6 +2577,8 @@ public class ResultServiceImpl implements IResultService {
String errorValue = String.valueOf(detectionData.getErrorData());
if (decimalPlaces != null && detectionData.getErrorData() != null) {
errorValue = formatSignificantDigits(detectionData.getErrorData().doubleValue(), decimalPlaces);
}else{
errorValue = "/";
}
dataMap.put(ItemReportKeyEnum.ERROR.getKey(), errorValue);
@@ -2580,6 +2586,8 @@ public class ResultServiceImpl implements IResultService {
String errorScope = String.valueOf(detectionData.getRadius());
if (decimalPlaces != null && detectionData.getRadius() != null) {
errorScope = formatErrorRange(detectionData.getRadius(), decimalPlaces);
}else{
errorScope = "/";
}
dataMap.put(ItemReportKeyEnum.A_ERROR_SCOPE.getKey(), errorScope);

View File

@@ -6,7 +6,7 @@ spring:
datasource:
druid:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://192.168.1.24:13306/pqs9100_client1?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true
url: jdbc:mysql://192.168.1.24:13306/pqs91002?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true
username: root
password: njcnpqs
# url: jdbc:mysql://localhost:3306/pqs91001?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=CTT

View File

@@ -1,33 +0,0 @@
HELP.md
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/
### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
!**/src/main/**/build/
!**/src/test/**/build/
### VS Code ###
.vscode/

View File

@@ -1,172 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.njcn.gather</groupId>
<artifactId>CN_Gather</artifactId>
<version>1.0.0</version>
</parent>
<artifactId>event_smart</artifactId>
<dependencies>
<dependency>
<groupId>com.njcn</groupId>
<artifactId>njcn-common</artifactId>
<version>0.0.1</version>
</dependency>
<dependency>
<groupId>com.njcn</groupId>
<artifactId>common-redis</artifactId>
<version>1.0.0</version>
</dependency>
<!-- <dependency>
<groupId>com.njcn</groupId>
<artifactId>rocket-mq-springboot-starter</artifactId>
<version>1.0.0</version>
<exclusions>
<exclusion>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</exclusion>
</exclusions>
</dependency>-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-websocket</artifactId>
<version>2.7.12</version>
</dependency>
<!-- 多数据源切换当数据源为oracle时需要使用 -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>dynamic-datasource-spring-boot-starter</artifactId>
<version>3.5.1</version>
</dependency>
<dependency>
<groupId>com.njcn</groupId>
<artifactId>spingboot2.3.12</artifactId>
<version>2.3.12</version>
</dependency>
<dependency>
<groupId>com.njcn</groupId>
<artifactId>mybatis-plus</artifactId>
<version>0.0.1</version>
</dependency>
<!--oracle驱动-->
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ojdbc8</artifactId>
<version>21.6.0.0</version>
</dependency>
<dependency>
<groupId>com.oracle.database.nls</groupId>
<artifactId>orai18n</artifactId>
<version>21.1.0.0</version> <!-- 版本号需要与你的ojdbc版本匹配 -->
</dependency>
<!-- Spring Security -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<!-- JWT -->
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-api</artifactId>
<version>0.11.5</version>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-impl</artifactId>
<version>0.11.5</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-jackson</artifactId>
<version>0.11.5</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.njcn</groupId>
<artifactId>common-event</artifactId>
<version>1.0.0</version>
<exclusions>
<exclusion>
<artifactId>common-microservice</artifactId>
<groupId>com.njcn</groupId>
</exclusion>
<exclusion>
<artifactId>common-web</artifactId>
<groupId>com.njcn</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>32.1.3-jre</version> <!-- 使用最新稳定版 -->
</dependency>
</dependencies>
<build>
<finalName>event_smart</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*</include>
</includes>
</resource>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.xml</include>
</includes>
</resource>
</resources>
</build>
</project>

View File

@@ -1,22 +0,0 @@
package com.njcn.gather.event;
import com.njcn.event.file.component.WavePicComponent;
import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.FilterType;
@Slf4j
@SpringBootApplication(scanBasePackages = "com.njcn")
//@ComponentScan(excludeFilters = @ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, classes = WavePicComponent.class))
@MapperScan("com.njcn.**.mapper")
public class EventSmartApplication {
public static void main(String[] args) {
SpringApplication.run(EventSmartApplication.class, args);
}
}

View File

@@ -1,84 +0,0 @@
package com.njcn.gather.event.devcie.config;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.StrUtil;
import com.njcn.gather.event.devcie.mapper.PqLineMapper;
import com.njcn.gather.event.devcie.pojo.po.PqLine;
import com.njcn.gather.event.devcie.pojo.po.PqsDeptsline;
import com.njcn.gather.event.devcie.service.PqsDeptslineService;
import com.njcn.gather.event.transientes.pojo.po.PqsDepts;
import com.njcn.gather.event.transientes.service.PqsDeptsService;
import com.njcn.redis.utils.RedisUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
/**
* Description:
* Date: 2025/07/28 上午 9:32【需求编号】
*
* @author clam
* @version V1.0.0
*/
@Component
@Slf4j
public class PqlineCache {
@Autowired
private PqLineMapper pqLineMapper;
@Autowired
private RedisUtil redisUtil;
@Autowired
private PqsDeptslineService pqsDeptslineService;
@Autowired
private PqsDeptsService pqsDeptsService;
private final static String NAME_KEY = "LineCache:";
@Value("${SYS_TYPE_ZT}")
private String sysTypeZt;
@PostConstruct
public void init() {
log.info("系统启动中。。。加载pqline");
List<PqLine> pqLines = pqLineMapper.selectList(null);
redisUtil.saveByKey(NAME_KEY + StrUtil.DASHED+"pqLineList",pqLines);
List<PqsDepts> list = pqsDeptsService.lambdaQuery().eq(PqsDepts::getState, 1).list();
for (PqsDepts pqsDepts : list) {
List<String> deptAndChildren = pqsDeptsService.findDeptAndChildren(pqsDepts.getDeptsIndex());
List<PqsDeptsline> deptslines = pqsDeptslineService.lambdaQuery().in(PqsDeptsline::getDeptsIndex, deptAndChildren).eq(PqsDeptsline::getSystype, sysTypeZt).list();
List<Integer> deptslineIds = deptslines.stream().map(PqsDeptsline::getLineIndex).collect(Collectors.toList());
List<Integer> result = new ArrayList<>();
if(CollUtil.isNotEmpty(deptslineIds)){
if(deptslineIds.size()> 1000 ){
List<List<Integer>> listList = CollUtil.split(deptslineIds,1000);
for(List<Integer> li : listList){
List<Integer> temList = pqLineMapper.getRunMonitorIds(li);
result.addAll(temList);
}
}else {
result= pqLineMapper.getRunMonitorIds(deptslineIds);
}
}
redisUtil.saveByKey(NAME_KEY + StrUtil.DASHED+pqsDepts.getDeptsIndex(),result);
}
List<PqsDepts> deptsList = pqsDeptsService.lambdaQuery().eq(PqsDepts::getState,1).list();
redisUtil.saveByKey(NAME_KEY + StrUtil.DASHED+"AllDept",deptsList);
}
@PreDestroy
public void destroy() {
log.info("系统运行结束");
redisUtil.deleteKeysByString(NAME_KEY);
}
}

View File

@@ -1,80 +0,0 @@
package com.njcn.gather.event.devcie.job;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
import com.njcn.gather.event.devcie.mapper.PqDeviceMapper;
import com.njcn.gather.event.devcie.mapper.PqLineMapper;
import com.njcn.gather.event.devcie.pojo.po.PqLine;
import com.njcn.gather.event.devcie.pojo.po.PqsDeptsline;
import com.njcn.gather.event.devcie.service.PqsDeptslineService;
import com.njcn.gather.event.transientes.pojo.po.PqsDepts;
import com.njcn.gather.event.transientes.service.PqsDeptsService;
import com.njcn.redis.utils.RedisUtil;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
/**
* Description:
* Date: 2025/08/05 上午 10:17【需求编号】
*
* @author clam
* @version V1.0.0
*/
@Component
@EnableScheduling
public class LineCacheJob {
@Autowired
private PqLineMapper pqLineMapper;
@Autowired
private RedisUtil redisUtil;
@Autowired
private PqsDeptslineService pqsDeptslineService;
@Autowired
private PqsDeptsService pqsDeptsService;
@Autowired
private PqDeviceMapper pqDeviceMapper;
private final static String NAME_KEY = "LineCache:";
@Value("${SYS_TYPE_ZT}")
private String sysTypeZt;
@Scheduled(cron="0 0 1 * * ?" ) // 每3钟执行一次
public void lineCache(){
redisUtil.deleteKeysByString(NAME_KEY);
List<PqLine> pqLines = pqLineMapper.selectList(null);
redisUtil.saveByKey(NAME_KEY + StrUtil.DASHED+"pqLineList",pqLines);
List<PqsDepts> list = pqsDeptsService.lambdaQuery().eq(PqsDepts::getState, 1).list();
for (PqsDepts pqsDepts : list) {
List<String> deptAndChildren = pqsDeptsService.findDeptAndChildren(pqsDepts.getDeptsIndex());
List<PqsDeptsline> deptslines = pqsDeptslineService.lambdaQuery().in(PqsDeptsline::getDeptsIndex, deptAndChildren).eq(PqsDeptsline::getSystype, sysTypeZt).list();
List<Integer> deptslineIds = deptslines.stream().map(PqsDeptsline::getLineIndex).collect(Collectors.toList());
List<Integer> result = new ArrayList<>();
if(CollUtil.isNotEmpty(deptslineIds)){
if(deptslineIds.size()> 1000 ){
List<List<Integer>> listList = CollUtil.split(deptslineIds,1000);
for(List<Integer> li : listList){
List<Integer> temList = pqLineMapper.getRunMonitorIds(li);
result.addAll(temList);
}
}else {
result= pqLineMapper.getRunMonitorIds(deptslineIds);
}
}
redisUtil.saveByKey(NAME_KEY + StrUtil.DASHED+pqsDepts.getDeptsIndex(),result);
}
List<PqsDepts> deptsList = pqsDeptsService.lambdaQuery().eq(PqsDepts::getState,1).list();
redisUtil.saveByKey(NAME_KEY + StrUtil.DASHED+"AllDept",deptsList);
}
}

View File

@@ -1,13 +0,0 @@
package com.njcn.gather.event.devcie.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.njcn.gather.event.devcie.pojo.po.PqDeviceDetail;
/**
* CN_Gather
*
* @author cdf
* @date 2025/8/12
*/
public interface PqDeviceDetailMapper extends BaseMapper<PqDeviceDetail> {
}

View File

@@ -1,29 +0,0 @@
package com.njcn.gather.event.devcie.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.njcn.gather.event.devcie.pojo.dto.DeviceDTO;
import com.njcn.gather.event.devcie.pojo.dto.DeviceDeptDTO;
import com.njcn.gather.event.devcie.pojo.po.PqDevice;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
*
* Description:
* Date: 2025/06/19 下午 1:47【需求编号】
*
* @author clam
* @version V1.0.0
*/
public interface PqDeviceMapper extends BaseMapper<PqDevice> {
List<DeviceDTO> queryListByIds(@Param("ids") List<Integer> ids);
Page<DeviceDTO> selectDeviceDTOPage(Page<DeviceDTO> pqsEventdetailPage, @Param("searchValue") String searchValue,@Param("devIndexs") List<Integer> devIndexs);
Page<DeviceDTO> queryListByLineIds(Page<DeviceDTO> pqsEventdetailPage, @Param("searchValue") String searchValue,@Param("lineIds") List<Integer> lineIds);
List<DeviceDeptDTO> selectDeviceDept();
}

View File

@@ -1,21 +0,0 @@
package com.njcn.gather.event.devcie.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.njcn.gather.event.devcie.pojo.dto.SubstationDTO;
import com.njcn.gather.event.devcie.pojo.po.PqGdCompany;
import com.njcn.gather.event.devcie.pojo.po.PqSubstation;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
*
* Description:
* Date: 2025/06/19 下午 1:48【需求编号】
*
* @author clam
* @version V1.0.0
*/
public interface PqGdCompanyMapper extends BaseMapper<PqGdCompany> {
}

View File

@@ -1,28 +0,0 @@
package com.njcn.gather.event.devcie.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.njcn.gather.event.devcie.pojo.dto.LedgerBaseInfoDTO;
import com.njcn.gather.event.devcie.pojo.po.PqLine;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
*
* Description:
* Date: 2025/06/19 下午 1:43【需求编号】
*
* @author clam
* @version V1.0.0
*/
public interface PqLineMapper extends BaseMapper<PqLine> {
List<LedgerBaseInfoDTO> getBaseLineInfo(@Param("ids")List<Integer> ids);
List<LedgerBaseInfoDTO> getBaseLedger(@Param("ids")List<Integer> ids,@Param("searchValue")String searchValue);
List<Integer> getRunMonitorIds(@Param("ids")List<Integer> ids);
}

View File

@@ -1,9 +0,0 @@
package com.njcn.gather.event.devcie.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.njcn.gather.event.devcie.pojo.po.PqLinedetail;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface PqLinedetailMapper extends BaseMapper<PqLinedetail> {
}

View File

@@ -1,20 +0,0 @@
package com.njcn.gather.event.devcie.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.njcn.gather.event.devcie.pojo.dto.SubstationDTO;
import com.njcn.gather.event.devcie.pojo.po.PqSubstation;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
*
* Description:
* Date: 2025/06/19 下午 1:48【需求编号】
*
* @author clam
* @version V1.0.0
*/
public interface PqSubstationMapper extends BaseMapper<PqSubstation> {
List<SubstationDTO> queryListByIds(@Param("ids")List<Integer> ids);
}

View File

@@ -1,22 +0,0 @@
package com.njcn.gather.event.devcie.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.njcn.gather.event.devcie.pojo.dto.LedgerBaseInfoDTO;
import com.njcn.gather.event.devcie.pojo.po.PqLine;
import com.njcn.gather.event.devcie.pojo.po.PqsStationMap;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
*
* Description:
* Date: 2025/06/19 下午 1:43【需求编号】
*
* @author clam
* @version V1.0.0
*/
public interface PqsStationMapMapper extends BaseMapper<PqsStationMap> {
}

View File

@@ -1,181 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.njcn.gather.event.devcie.mapper.PqDeviceMapper">
<resultMap id="BaseResultMap" type="com.njcn.gather.event.devcie.pojo.po.PqDevice">
<!--@mbg.generated-->
<!--@Table PQ_DEVICE-->
<id column="DEV_INDEX" jdbcType="DECIMAL" property="devIndex" />
<result column="GD_INDEX" jdbcType="DECIMAL" property="gdIndex" />
<result column="SUB_INDEX" jdbcType="DECIMAL" property="subIndex" />
<result column="NAME" jdbcType="VARCHAR" property="name" />
<result column="STATUS" jdbcType="DECIMAL" property="status" />
<result column="DEVTYPE" jdbcType="VARCHAR" property="devtype" />
<result column="LOGONTIME" jdbcType="TIMESTAMP" property="logontime" />
<result column="UPDATETIME" jdbcType="TIMESTAMP" property="updatetime" />
<result column="NODE_INDEX" jdbcType="DECIMAL" property="nodeIndex" />
<result column="PORTID" jdbcType="DECIMAL" property="portid" />
<result column="DEVFLAG" jdbcType="DECIMAL" property="devflag" />
<result column="DEV_SERIES" jdbcType="VARCHAR" property="devSeries" />
<result column="DEV_KEY" jdbcType="VARCHAR" property="devKey" />
<result column="IP" jdbcType="VARCHAR" property="ip" />
<result column="DEVMODEL" jdbcType="DECIMAL" property="devmodel" />
<result column="CALLFLAG" jdbcType="DECIMAL" property="callflag" />
<result column="DATATYPE" jdbcType="DECIMAL" property="datatype" />
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
DEV_INDEX, GD_INDEX, SUB_INDEX, "NAME", "STATUS", DEVTYPE, LOGONTIME, UPDATETIME,
NODE_INDEX, PORTID, DEVFLAG, DEV_SERIES, DEV_KEY, IP, DEVMODEL, CALLFLAG, DATATYPE
</sql>
<select id="queryListByIds" resultType="com.njcn.gather.event.devcie.pojo.dto.DeviceDTO">
select
pq_device.dev_index devId,
pq_device.name devName,
pq_device.UpdateTime updateTime,
pq_device.DevFlag devFlag,
pq_device.IP ip,
pq_device.status status,
PQ_SUBSTATION.sub_index stationId,
PQ_SUBSTATION.name stationName,
PQ_GDINFORMATION.Name gdName
from
pq_device,
PQ_SUBSTATION,
PQ_GDINFORMATION
where
pq_device.SUB_INDEX = PQ_SUBSTATION.SUB_INDEX
and pq_device.GD_INDEX =PQ_GDINFORMATION.GD_INDEX
and pq_device.DEV_INDEX in
<foreach collection="ids" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
</select>
<select id="selectDeviceDTOPage" resultType="com.njcn.gather.event.devcie.pojo.dto.DeviceDTO">
SELECT DISTINCT
pq_device.dev_index devId,
pq_device.name devName,
pq_device.UpdateTime updateTime,
pq_device.DevFlag devFlag,
pq_device.IP ip,
pq_device.status status,
PQ_DEVICEDETAIL.ThisTimeCheck thisTimeCheck,
PQ_DEVICEDETAIL.NextTimeCheck nextTimeCheck,
pq_device.LogonTime logonTime,
PQ_DEVICEDETAIL.MANUFACTURER
FROM
pq_device
inner JOIN PQ_DEVICEDETAIL ON PQ_DEVICEDETAIL.dev_index = pq_device.dev_index
<where>
pq_device.DEV_INDEX in
<foreach collection="devIndexs" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
order by pq_device.updatetime
</where>
</select>
<!-- <select id="selectDeviceDTOPage" resultType="com.njcn.gather.event.devcie.pojo.dto.DeviceDTO">-->
<!-- WITH temp AS(-->
<!-- SELECT DISTINCT-->
<!-- PQ_LINE.DEV_INDEX,-->
<!-- PQS_DEPTS.DEPTSNAME-->
<!-- FROM-->
<!-- PQ_LINE,-->
<!-- PQS_DEPTSLINE,-->
<!-- PQS_DEPTS-->
<!-- WHERE-->
<!-- PQ_LINE.LINE_INDEX = PQS_DEPTSLINE.LINE_INDEX-->
<!-- AND PQS_DEPTS.DEPTS_INDEX = PQS_DEPTSLINE.DEPTS_INDEX-->
<!-- )-->
<!-- SELECT DISTINCT-->
<!-- pq_device.dev_index devId,-->
<!-- pq_device.name devName,-->
<!-- pq_device.UpdateTime updateTime,-->
<!-- pq_device.DevFlag devFlag,-->
<!-- pq_device.IP ip,-->
<!-- pq_device.status status,-->
<!-- PQ_SUBSTATION.sub_index stationId,-->
<!-- PQ_SUBSTATION.name stationName,-->
<!-- PQ_GDINFORMATION.Name gdName,-->
<!-- PQS_DICDATA.DIC_Name MANUFACTURER_Name,-->
<!-- PQ_DEVICEDETAIL.ThisTimeCheck thisTimeCheck,-->
<!-- PQ_DEVICEDETAIL.NextTimeCheck nextTimeCheck,-->
<!-- pq_device.LogonTime logonTime,-->
<!-- temp.DEPTSNAME deptName-->
<!-- FROM-->
<!-- pq_device-->
<!-- LEFT JOIN PQ_SUBSTATION ON pq_device.SUB_INDEX = PQ_SUBSTATION.SUB_INDEX-->
<!-- LEFT JOIN PQ_GDINFORMATION ON pq_device.GD_INDEX = PQ_GDINFORMATION.GD_INDEX-->
<!-- LEFT JOIN PQ_DEVICEDETAIL ON PQ_DEVICEDETAIL.dev_index = pq_device.dev_index-->
<!-- LEFT JOIN PQS_DICDATA on PQ_DEVICEDETAIL.MANUFACTURER = PQS_DICDATA.DIC_INDEX-->
<!-- LEFT JOIN temp on temp.DEV_INDEX = pq_device.dev_index-->
<!-- where 1=1-->
<!-- <if test="searchValue!= null and searchValue!= ''">-->
<!-- AND (-->
<!-- pq_device.name LIKE '%' || #{searchValue} || '%'-->
<!-- OR PQ_SUBSTATION.name LIKE '%' || #{searchValue} || '%'-->
<!-- OR PQ_GDINFORMATION.Name LIKE '%' || #{searchValue} || '%'-->
<!-- )-->
<!-- </if>-->
<!-- <if test="state!= null and state!= ''">-->
<!-- and pq_device.status = #{state}-->
<!-- </if>-->
<!-- and pq_device.DEV_INDEX in-->
<!-- <foreach collection="devIndexs" item="item" open="(" close=")" separator=",">-->
<!-- #{item}-->
<!-- </foreach>-->
<!-- order by pq_device.updatetime-->
<!-- </select>-->
<select id="queryListByLineIds" resultType="com.njcn.gather.event.devcie.pojo.dto.DeviceDTO">
select distinct
pq_device.dev_index devId,
pq_device.name devName,
pq_device.UpdateTime updateTime,
pq_device.DevFlag devFlag,
pq_device.IP ip,
pq_device.status status,
PQ_SUBSTATION.sub_index stationId,
PQ_SUBSTATION.name stationName,
PQ_GDINFORMATION.Name gdName,
PQS_DICDATA.DIC_Name MANUFACTURER_Name
from
pq_line,
pq_device,
PQ_DEVICEDETAIL,
PQ_SUBSTATION,
PQ_GDINFORMATION,
PQS_DICDATA
where
pq_line.DEV_INDEX = pq_device.DEV_INDEX
and PQ_DEVICEDETAIL.dev_index =pq_device.dev_index
and pq_device.SUB_INDEX = PQ_SUBSTATION.SUB_INDEX
and pq_device.GD_INDEX =PQ_GDINFORMATION.GD_INDEX
and PQ_DEVICEDETAIL.MANUFACTURER = PQS_DICDATA.DIC_INDEX
and pq_line.LINE_INDEX in
<foreach collection="lineIds" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
</select>
<select id="selectDeviceDept" resultType="com.njcn.gather.event.devcie.pojo.dto.DeviceDeptDTO">
SELECT DISTINCT
PQ_LINE.DEV_INDEX devId,
PQS_DEPTS.DEPTSNAME deptName,
PQS_DEPTS.DEPTS_INDEX deptId
FROM
PQ_LINE,
PQS_DEPTSLINE,
PQS_DEPTS
WHERE
PQ_LINE.LINE_INDEX = PQS_DEPTSLINE.LINE_INDEX
AND PQS_DEPTS.DEPTS_INDEX = PQS_DEPTSLINE.DEPTS_INDEX
</select>
</mapper>

View File

@@ -1,108 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.njcn.gather.event.devcie.mapper.PqLineMapper">
<resultMap id="BaseResultMap" type="com.njcn.gather.event.devcie.pojo.po.PqLine">
<!--@mbg.generated-->
<!--@Table PQ_LINE-->
<id column="LINE_INDEX" jdbcType="DECIMAL" property="lineIndex" />
<result column="GD_INDEX" jdbcType="DECIMAL" property="gdIndex" />
<result column="SUB_INDEX" jdbcType="DECIMAL" property="subIndex" />
<result column="SUBV_INDEX" jdbcType="DECIMAL" property="subvIndex" />
<result column="DEV_INDEX" jdbcType="DECIMAL" property="devIndex" />
<result column="NAME" jdbcType="VARCHAR" property="name" />
<result column="PT1" jdbcType="FLOAT" property="pt1" />
<result column="PT2" jdbcType="FLOAT" property="pt2" />
<result column="CT1" jdbcType="FLOAT" property="ct1" />
<result column="CT2" jdbcType="FLOAT" property="ct2" />
<result column="DEVCMP" jdbcType="FLOAT" property="devcmp" />
<result column="DLCMP" jdbcType="FLOAT" property="dlcmp" />
<result column="JZCMP" jdbcType="FLOAT" property="jzcmp" />
<result column="XYCMP" jdbcType="FLOAT" property="xycmp" />
<result column="SUBV_NO" jdbcType="DECIMAL" property="subvNo" />
<result column="SCALE" jdbcType="VARCHAR" property="scale" />
<result column="SUBV_NAME" jdbcType="VARCHAR" property="subvName" />
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
LINE_INDEX, GD_INDEX, SUB_INDEX, SUBV_INDEX, DEV_INDEX, "NAME", PT1, PT2, CT1, CT2,
DEVCMP, DLCMP, JZCMP, XYCMP, SUBV_NO, "SCALE", SUBV_NAME
</sql>
<select id="getBaseLineInfo" resultType="com.njcn.gather.event.devcie.pojo.dto.LedgerBaseInfoDTO">
WITH temp AS(
select PQ_USER_LINE_ASS.LINE_INDEX LINE_INDEX,listagg(PQ_USER_LEDGER.CUSTOMER_NAME,';') within GROUP (order by PQ_USER_LEDGER.CUSTOMER_NAME) objName from PQ_USER_LINE_ASS ,PQ_USER_LEDGER where PQ_USER_LINE_ASS.USER_INDEX=PQ_USER_LEDGER.ID group by PQ_USER_LINE_ASS.LINE_INDEX
)
select
PQ_GDINFORMATION.name gdName,
pq_line.GD_INDEX gdIndex,
pq_line.line_index lineId,
pq_line.name lineName,
PQ_SUBVOLTAGE.SUBV_INDEX busBarId,
PQ_SUBVOLTAGE.name busBarName,
pq_device.dev_index devId,
pq_device.name devName,
pq_device.Status runFlag,
PQ_SUBSTATION.sub_index stationId,
PQ_SUBSTATION.name stationName,
temp.objName objName
from
pq_line LEFT JOIN PQ_SUBVOLTAGE on pq_line.SUBV_INDEX = PQ_SUBVOLTAGE.SUBV_INDEX
LEFT JOIN
pq_device on PQ_SUBVOLTAGE.DEV_INDEX = pq_device.DEV_INDEX
LEFT JOIN PQ_SUBSTATION on pq_device.SUB_INDEX = PQ_SUBSTATION.SUB_INDEX
LEFT JOIN PQ_GDINFORMATION on pq_line.GD_INDEX =PQ_GDINFORMATION.GD_INDEX
LEFT JOIN temp on temp.LINE_INDEX = pq_line.LINE_INDEX
where 1=1
and pq_line.line_index in
<foreach collection="ids" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
</select>
<select id="getBaseLedger" resultType="com.njcn.gather.event.devcie.pojo.dto.LedgerBaseInfoDTO">
select
PQ_GDINFORMATION.name gdName,
pq_line.GD_INDEX gdIndex,
pq_line.line_index lineId,
pq_line.name lineName,
PQ_SUBVOLTAGE.SUBV_INDEX busBarId,
PQ_SUBVOLTAGE.name busBarName,
pq_device.dev_index devId,
pq_device.name devName,
pq_device.Status runFlag,
PQ_SUBSTATION.sub_index stationId,
PQ_SUBSTATION.name stationName
from
pq_line inner JOIN PQ_SUBVOLTAGE on pq_line.SUBV_INDEX = PQ_SUBVOLTAGE.SUBV_INDEX
inner JOIN pq_device on PQ_SUBVOLTAGE.DEV_INDEX = pq_device.DEV_INDEX
inner JOIN PQ_SUBSTATION on pq_device.SUB_INDEX = PQ_SUBSTATION.SUB_INDEX
inner JOIN PQ_GDINFORMATION on pq_line.GD_INDEX =PQ_GDINFORMATION.GD_INDEX
<where>
and pq_line.line_index in
<foreach collection="ids" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
<if test="searchValue!=null and searchValue!=''">
and (
PQ_GDINFORMATION.name LIKE '%' || #{searchValue} || '%'
or PQ_SUBSTATION.name LIKE '%' || #{searchValue} || '%'
or pq_line.name LIKE '%' || #{searchValue} || '%'
)
</if>
</where>
</select>
<select id="getRunMonitorIds" resultType="integer">
select DISTINCT pq_line.line_index from pq_line inner join pq_device on pq_line.DEV_INDEX = pq_device.DEV_INDEX
where pq_line.line_index in
<foreach collection="ids" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
and pq_device.DEVFLAG = 0
</select>
</mapper>

View File

@@ -1,37 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.njcn.gather.event.devcie.mapper.PqSubstationMapper">
<resultMap id="BaseResultMap" type="com.njcn.gather.event.devcie.pojo.po.PqSubstation">
<!--@mbg.generated-->
<!--@Table PQ_SUBSTATION-->
<id column="SUB_INDEX" jdbcType="DECIMAL" property="subIndex" />
<result column="GD_INDEX" jdbcType="DECIMAL" property="gdIndex" />
<result column="NAME" jdbcType="VARCHAR" property="name" />
<result column="SCALE" jdbcType="VARCHAR" property="scale" />
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
SUB_INDEX, GD_INDEX, "NAME", "SCALE"
</sql>
<select id="queryListByIds" resultType="com.njcn.gather.event.devcie.pojo.dto.SubstationDTO">
select
PQ_SUBSTATION.sub_index stationId,
PQ_SUBSTATION.name stationName,
PQ_GDINFORMATION.Name gdName,
PQS_MAP.LATITUDE LATITUDE,
PQS_MAP.LONGITUDE LONGITUDE
from
PQ_SUBSTATION left join
PQS_MAP on PQ_SUBSTATION.SUB_INDEX =PQS_MAP.SUB_INDEX
left join
PQ_GDINFORMATION on PQ_SUBSTATION.GD_INDEX =PQ_GDINFORMATION.GD_INDEX
where
PQS_MAP.state=1
and PQ_SUBSTATION.SUB_INDEX in
<foreach collection="ids" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
</select>
</mapper>

View File

@@ -1,45 +0,0 @@
package com.njcn.gather.event.devcie.pojo.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.time.LocalDate;
import java.time.LocalDateTime;
/**
* Description:
* Date: 2025/06/27 下午 3:25【需求编号】
*
* @author clam
* @version V1.0.0
*/
@Data
public class DeviceDTO {
private Integer devId;
private String devName;
private Integer stationId;
private String stationName;
private String gdName;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime updateTime;
private String devFlag;
private String ip;
private String manufacturerName;
@JsonFormat(pattern = "yyyy-MM-dd")
private LocalDate thisTimeCheck;
@JsonFormat(pattern = "yyyy-MM-dd")
private LocalDate nextTimeCheck;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime logonTime;
private String deptName;
//通讯状态
private Integer runFlag=0;
//装置通讯状态0中断1正常
private Integer status;
private double onLineRate=0.00;
private double integrityRate = 0.00;
}

View File

@@ -1,21 +0,0 @@
package com.njcn.gather.event.devcie.pojo.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.time.LocalDateTime;
/**
* Description:
* Date: 2025/06/27 下午 3:25【需求编号】
*
* @author clam
* @version V1.0.0
*/
@Data
public class DeviceDeptDTO {
private Integer devId;
private String deptId;
private String deptName;
}

View File

@@ -1,41 +0,0 @@
package com.njcn.gather.event.devcie.pojo.dto;
import lombok.Data;
import java.math.BigDecimal;
/**
* @Author: cdf
* @CreateTime: 2025-06-25
* @Description:
*/
@Data
public class LedgerBaseInfoDTO {
private String gdName;
private String gdIndex;
private Integer lineId;
private String lineName;
private Integer busBarId;
private String busBarName;
private Integer devId;
private String devName;
private String objName;
private Integer stationId;
private String stationName;
//通讯状态
private Integer runFlag=0;
private Integer eventCount;
}

View File

@@ -1,73 +0,0 @@
package com.njcn.gather.event.devcie.pojo.dto;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import java.time.LocalDateTime;
/**
* Description:
* Date: 2025/07/29 下午 3:15【需求编号】
*
* @author clam
* @version V1.0.0
*/
@Data
public class PqsDeptDTO {
/**
* 部门表Guid
*/
private String deptsIndex;
/**
* 部门名称
*/
private String deptsname;
/**
* 排序
*/
private Integer deptsDesc;
/**
* 关联表PQS_User用户表Guid
*/
private String userIndex;
/**
* 更新时间
*/
private LocalDateTime updatetime;
/**
* 部门描述
*/
private String deptsDescription;
/**
* 角色状态0删除1正常
*/
private Integer state;
/**
* 行政区域
*/
private String area;
private String areaName;
private Integer customDept;
private String parentnodeid;
}

View File

@@ -1,22 +0,0 @@
package com.njcn.gather.event.devcie.pojo.dto;
import lombok.Data;
/**
* Description:
* Date: 2025/06/27 下午 3:37【需求编号】
*
* @author clam
* @version V1.0.0
*/
@Data
public class SubstationDTO {
private Integer stationId;
private String stationName;
private String gdName;
private double longitude;
private double latitude;
private Integer runFlag=0;;
}

View File

@@ -1,127 +0,0 @@
package com.njcn.gather.event.devcie.pojo.po;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.time.LocalDateTime;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
*
* Description:
* Date: 2025/06/19 下午 1:47【需求编号】
*
* @author clam
* @version V1.0.0
*/
/**
* 靠靠?
*/
@Data
@NoArgsConstructor
@TableName(value = "PQ_DEVICE")
public class PqDevice {
/**
* 靠靠
*/
@TableId(value = "DEV_INDEX", type = IdType.INPUT)
private Integer devIndex;
/**
* 靠靠靠
*/
@TableField(value = "GD_INDEX")
private Integer gdIndex;
/**
* 靠靠?
*/
@TableField(value = "SUB_INDEX")
private Integer subIndex;
/**
* 靠靠
*/
@TableField(value = "\"NAME\"")
private String name;
/**
* 靠靠靠(0:靠;1:靠)
*/
@TableField(value = "\"STATUS\"")
private Integer status;
/**
* (靠縋QS_Dicdata)靠靠Guid
*/
@TableField(value = "DEVTYPE")
private String devtype;
/**
* 靠靠
*/
@TableField(value = "LOGONTIME")
private LocalDateTime logontime;
/**
* 靠靠靠
*/
@TableField(value = "UPDATETIME")
private LocalDateTime updatetime;
/**
* 靠縉odeInformation)靠靠靠,靠靠靠靠靠靠靠?
*/
@TableField(value = "NODE_INDEX")
private Integer nodeIndex;
/**
* 靠ID,靠靠靠
*/
@TableField(value = "PORTID")
private Long portid;
/**
* 靠靠(0:靠;1:靠;2:靠)
*/
@TableField(value = "DEVFLAG")
private Integer devflag;
/**
* 靠靠?靠3ds靠
*/
@TableField(value = "DEV_SERIES")
private String devSeries;
/**
* 靠靠,靠3ds靠
*/
@TableField(value = "DEV_KEY")
private String devKey;
/**
* IP靠
*/
@TableField(value = "IP")
private String ip;
/**
* 靠靠(0:靠靠;1:靠靠)
*/
@TableField(value = "DEVMODEL")
private Integer devmodel;
/**
* 靠靠?
*/
@TableField(value = "CALLFLAG")
private Integer callflag;
/**
* 靠靠(0:靠靠;1:靠靠;2:靠靠)
*/
@TableField(value = "DATATYPE")
private Integer datatype;
}

View File

@@ -1,72 +0,0 @@
package com.njcn.gather.event.devcie.pojo.po;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDate;
import java.util.Date;
/**
* CN_Gather
*
* @author cdf
* @date 2025/8/12
*/
@TableName(value = "PQ_DEVICEDETAIL")
@Data
public class PqDeviceDetail {
@TableId
@TableField(value = "DEV_INDEX")
private Long devIndex;
@TableField(value = "Manufacturer")
private String manufacturer;
@TableField(value = "CheckFlag")
private Long checkFlag;
@TableField(value="ThisTimeCheck")
private LocalDate ThisTimeCheck;
@TableField(value="NextTimeCheck")
private LocalDate NextTimeCheck;
@TableField(value="DATAPLAN")
private Long dataplan;
@TableField(value="NEWTRAFFIC")
private Long newtraffic;
@TableField(value = "electroplate")
private Integer electroplate = 0;
@TableField(value = "ONTIME")
private Integer ontime;
@TableField(value = "contract")
private String contract;
@TableField(value = "DEV_CATENA")
private String devCatnea;
@TableField(value = "SIM")
private String sim;
@TableField(value = "DEV_NO")
private String devNo;
@TableField(value = "DEV_LOCATION")
private String devLocation;
@TableField(value = "IS_ALARM")
private Integer isAlarm;
}

View File

@@ -1,27 +0,0 @@
package com.njcn.gather.event.devcie.pojo.po;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
/**
* CN_Gather
*
* @author cdf
* @date 2025/8/9
*/
@Data
@TableName(value = "PQ_GDINFORMATION")
public class PqGdCompany {
@TableId
@TableField(value="GD_INDEX")
private Long gdIndex;
@TableField(value="NAME")
private String name;
@TableField(value="PROVINCE_INDEX")
private Long provinceIndex;
}

View File

@@ -1,133 +0,0 @@
package com.njcn.gather.event.devcie.pojo.po;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Transient;
/**
*
* Description:
* Date: 2025/06/19 下午 1:43【需求编号】
*
* @author clam
* @version V1.0.0
*/
/**
* 靠靠?
*/
@Data
@NoArgsConstructor
@TableName(value = "PQ_LINE")
public class PqLine {
/**
* 靠靠
*/
@TableId(value = "LINE_INDEX", type = IdType.INPUT)
private Integer lineIndex;
/**
* 靠靠靠
*/
@TableField(value = "GD_INDEX")
private Integer gdIndex;
/**
* 靠靠?
*/
@TableField(value = "SUB_INDEX")
private Integer subIndex;
/**
* 靠靠
*/
@TableField(value = "SUBV_INDEX")
private Integer subvIndex;
/**
* 靠靠
*/
@TableField(value = "DEV_INDEX")
private Integer devIndex;
/**
* 靠靠
*/
@TableField(value = "\"NAME\"")
private String name;
/**
* PT靠靠
*/
@TableField(value = "PT1")
private Double pt1;
/**
* PT靠靠
*/
@TableField(value = "PT2")
private Double pt2;
/**
* CT靠靠
*/
@TableField(value = "CT1")
private Double ct1;
/**
* CT靠靠
*/
@TableField(value = "CT2")
private Double ct2;
/**
* 靠靠
*/
@TableField(value = "DEVCMP")
private Double devcmp;
/**
* 靠靠
*/
@TableField(value = "DLCMP")
private Double dlcmp;
/**
* 靠靠
*/
@TableField(value = "JZCMP")
private Double jzcmp;
/**
* 靠靠
*/
@TableField(value = "XYCMP")
private Double xycmp;
/**
* 靠?靠靠靠靠靠靠?
*/
@TableField(value = "SUBV_NO")
private Integer subvNo;
/**
* (靠PQS_Dictionary?靠靠Guid
*/
@TableField(value = "\"SCALE\"")
private String scale;
/**
* 靠靠
*/
@TableField(value = "SUBV_NAME")
private String subvName;
@TableField(exist = false)
private String subName;
@TableField(exist = false)
private String deptName;
}

View File

@@ -1,52 +0,0 @@
package com.njcn.gather.event.devcie.pojo.po;
/**
* @Author: cdf
* @CreateTime: 2025-06-26
* @Description:
*/
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.util.Date;
@Data
@TableName("PQ_LINEDETAIL")
public class PqLinedetail {
@TableId(value = "LINE_INDEX", type = IdType.INPUT)
private Integer lineIndex;
private Integer gdIndex;
private Integer subIndex;
private String lineName;
private Integer pttype;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date lastTime;
private Integer tinterval;
private String loadtype;
private String businesstype;
private String remark;
private String monitorId;
private Integer powerid;
private String objname;
@TableField(fill = FieldFill.INSERT)
private Integer statflag;
private String lineGrade;
private String powerSubstationName;
}

View File

@@ -1,45 +0,0 @@
package com.njcn.gather.event.devcie.pojo.po;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
*
* Description:
* Date: 2025/06/19 下午 1:48【需求编号】
*
* @author clam
* @version V1.0.0
*/
/**
* 靠靠靠
*/
@Data
@NoArgsConstructor
@TableName(value = "PQ_SUBSTATION")
public class PqSubstation {
/**
* 靠靠?
*/
@TableId(value = "SUB_INDEX", type = IdType.INPUT)
private Integer subIndex;
/**
* 靠靠靠
*/
@TableField(value = "GD_INDEX")
private Integer gdIndex;
/**
* 靠靠?
*/
@TableField(value = "\"NAME\"")
private String name;
@TableField(value = "\"SCALE\"")
private String scale;
}

View File

@@ -1,33 +0,0 @@
package com.njcn.gather.event.devcie.pojo.po;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
*
* Description:
* Date: 2025/06/19 下午 3:45【需求编号】
*
* @author clam
* @version V1.0.0
*/
@Data
@NoArgsConstructor
@TableName(value = "PQS_DEPTSLINE")
public class PqsDeptsline {
/**
* 部门表Guid
*/
@TableField(value = "DEPTS_INDEX")
private String deptsIndex;
@TableField(value = "LINE_INDEX")
private Integer lineIndex;
@TableField(value = "SYSTYPE")
private String systype;
}

View File

@@ -1,58 +0,0 @@
package com.njcn.gather.event.devcie.pojo.po;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.util.Date;
/**
* CN_Gather
*
* @author cdf
* @date 2025/8/11
*/
@TableName(value="PQS_MAP")
@Data
public class PqsStationMap {
@TableId
@TableField(value = "MAP_INDEX")
private String mapIndex;
@TableField(value = "SUB_INDEX")
private Long subIndex;
@TableField(value = "GD_INDEX")
private Long gdIndex;
//经度
@TableField(value = "LONGITUDE")
private Float longItude;
//纬度
@TableField(value = "LATITUDE")
private Float latItude;
//数据状态
@TableField(value = "STATE")
private Long state;
//用户ID
@TableField(value = "USER_INDEX")
private String userIndex;
//更新时间
@TableField(value = "UPDATETIME")
private Date updateTime;
}

View File

@@ -1,26 +0,0 @@
package com.njcn.gather.event.devcie.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.njcn.gather.event.devcie.pojo.dto.DeviceDTO;
import com.njcn.gather.event.devcie.pojo.dto.DeviceDeptDTO;
import com.njcn.gather.event.devcie.pojo.po.PqDevice;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
/**
*
* Description:
* Date: 2025/06/19 下午 1:47【需求编号】
*
* @author clam
* @version V1.0.0
*/
public interface PqDeviceService extends IService<PqDevice>{
List<DeviceDTO> queryListByIds(List<Integer> lineIds);
Page<DeviceDTO> selectDeviceDTOPage(Page<DeviceDTO> pqsEventdetailPage, String searchValue, List<Integer> devIndexs);
List<DeviceDeptDTO> selectDeviceDept();
}

View File

@@ -1,25 +0,0 @@
package com.njcn.gather.event.devcie.service;
import com.njcn.gather.event.devcie.pojo.dto.DeviceDTO;
import com.njcn.gather.event.devcie.pojo.dto.LedgerBaseInfoDTO;
import com.njcn.gather.event.devcie.pojo.po.PqLine;
import com.baomidou.mybatisplus.extension.service.IService;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
*
* Description:
* Date: 2025/06/19 下午 1:43【需求编号】
*
* @author clam
* @version V1.0.0
*/
public interface PqLineService extends IService<PqLine>{
List<LedgerBaseInfoDTO> getBaseLineInfo(List<Integer> ids);
List<LedgerBaseInfoDTO> getBaseLedger(@Param("ids") List<Integer> ids, @Param("searchValue") String searchValue);
}

View File

@@ -1,21 +0,0 @@
package com.njcn.gather.event.devcie.service;
import com.njcn.gather.event.devcie.pojo.dto.DeviceDTO;
import com.njcn.gather.event.devcie.pojo.dto.SubstationDTO;
import com.njcn.gather.event.devcie.pojo.po.PqSubstation;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
/**
*
* Description:
* Date: 2025/06/19 下午 1:48【需求编号】
*
* @author clam
* @version V1.0.0
*/
public interface PqSubstationService extends IService<PqSubstation>{
List<SubstationDTO> queryListByIds(List<Integer> lineIds);
}

View File

@@ -1,16 +0,0 @@
package com.njcn.gather.event.devcie.service;
import com.njcn.gather.event.devcie.pojo.po.PqsDeptsline;
import com.baomidou.mybatisplus.extension.service.IService;
/**
*
* Description:
* Date: 2025/06/19 下午 3:45【需求编号】
*
* @author clam
* @version V1.0.0
*/
public interface PqsDeptslineService extends IService<PqsDeptsline>{
}

View File

@@ -1,38 +0,0 @@
package com.njcn.gather.event.devcie.service.impl;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.njcn.gather.event.devcie.pojo.dto.DeviceDTO;
import com.njcn.gather.event.devcie.pojo.dto.DeviceDeptDTO;
import org.springframework.stereotype.Service;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.njcn.gather.event.devcie.pojo.po.PqDevice;
import com.njcn.gather.event.devcie.mapper.PqDeviceMapper;
import com.njcn.gather.event.devcie.service.PqDeviceService;
/**
*
* Description:
* Date: 2025/06/19 下午 1:47【需求编号】
*
* @author clam
* @version V1.0.0
*/
@Service
public class PqDeviceServiceImpl extends ServiceImpl<PqDeviceMapper, PqDevice> implements PqDeviceService{
@Override
public List<DeviceDTO> queryListByIds(List<Integer> lineIds) {
return this.baseMapper.queryListByIds(lineIds);
}
@Override
public Page<DeviceDTO> selectDeviceDTOPage(Page<DeviceDTO> pqsEventdetailPage, String searchValue, List<Integer> devIndexs) {
return this.baseMapper.selectDeviceDTOPage(pqsEventdetailPage,searchValue,devIndexs);
}
@Override
public List<DeviceDeptDTO> selectDeviceDept() {
return this.baseMapper.selectDeviceDept();
}
}

View File

@@ -1,71 +0,0 @@
package com.njcn.gather.event.devcie.service.impl;
import cn.hutool.core.collection.CollUtil;
import com.njcn.gather.event.devcie.pojo.dto.DeviceDTO;
import com.njcn.gather.event.devcie.pojo.dto.LedgerBaseInfoDTO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.njcn.gather.event.devcie.mapper.PqLineMapper;
import com.njcn.gather.event.devcie.pojo.po.PqLine;
import com.njcn.gather.event.devcie.service.PqLineService;
import org.springframework.util.CollectionUtils;
/**
*
* Description:
* Date: 2025/06/19 下午 1:43【需求编号】
*
* @author clam
* @version V1.0.0
*/
@Service
public class PqLineServiceImpl extends ServiceImpl<PqLineMapper, PqLine> implements PqLineService{
@Override
public List<LedgerBaseInfoDTO> getBaseLineInfo(List<Integer> ids){
List<LedgerBaseInfoDTO> ledgerBaseInfoDTOS = new ArrayList<>();
if(CollectionUtils.isEmpty(ids)){
return ledgerBaseInfoDTOS;
}
if(ids.size()>1000){
List<List<Integer>> listIds = CollUtil.split(ids,1000);
for(List<Integer> itemIds : listIds){
List<LedgerBaseInfoDTO> temp =this.baseMapper.getBaseLineInfo(itemIds);
ledgerBaseInfoDTOS.addAll(temp);
}
}else {
List<LedgerBaseInfoDTO> temp =this.baseMapper.getBaseLineInfo(ids);
ledgerBaseInfoDTOS.addAll(temp);
}
return ledgerBaseInfoDTOS;
}
@Override
public List<LedgerBaseInfoDTO> getBaseLedger(List<Integer> ids,String searchValue) {
List<LedgerBaseInfoDTO> ledgerBaseInfoDTOS = new ArrayList<>();
if(CollectionUtils.isEmpty(ids)){
return ledgerBaseInfoDTOS;
}
if(ids.size()>1000){
List<List<Integer>> listIds = CollUtil.split(ids,1000);
for(List<Integer> itemIds : listIds){
List<LedgerBaseInfoDTO> temp =this.baseMapper.getBaseLedger(itemIds,searchValue);
ledgerBaseInfoDTOS.addAll(temp);
}
}else {
List<LedgerBaseInfoDTO> temp =this.baseMapper.getBaseLedger(ids,searchValue);
ledgerBaseInfoDTOS.addAll(temp);
}
return ledgerBaseInfoDTOS;
};
}

View File

@@ -1,26 +0,0 @@
package com.njcn.gather.event.devcie.service.impl;
import com.njcn.gather.event.devcie.pojo.dto.SubstationDTO;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.njcn.gather.event.devcie.pojo.po.PqSubstation;
import com.njcn.gather.event.devcie.mapper.PqSubstationMapper;
import com.njcn.gather.event.devcie.service.PqSubstationService;
/**
*
* Description:
* Date: 2025/06/19 下午 1:48【需求编号】
*
* @author clam
* @version V1.0.0
*/
@Service
public class PqSubstationServiceImpl extends ServiceImpl<PqSubstationMapper, PqSubstation> implements PqSubstationService{
@Override
public List<SubstationDTO> queryListByIds(List<Integer> lineIds) {
return this.baseMapper.queryListByIds(lineIds);
}
}

View File

@@ -1,19 +0,0 @@
package com.njcn.gather.event.devcie.service.impl;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.njcn.gather.event.transientes.mapper.PqsDeptslineMapper;
import com.njcn.gather.event.devcie.pojo.po.PqsDeptsline;
import com.njcn.gather.event.devcie.service.PqsDeptslineService;
/**
*
* Description:
* Date: 2025/06/19 下午 3:45【需求编号】
*
* @author clam
* @version V1.0.0
*/
@Service
public class PqsDeptslineServiceImpl extends ServiceImpl<PqsDeptslineMapper, PqsDeptsline> implements PqsDeptslineService{
}

View File

@@ -1,367 +0,0 @@
package com.njcn.gather.event.transientes.controller;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.njcn.common.pojo.annotation.OperateInfo;
import com.njcn.common.pojo.enums.common.LogEnum;
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
import com.njcn.common.pojo.response.HttpResult;
import com.njcn.event.file.pojo.dto.WaveDataDTO;
import com.njcn.gather.event.devcie.mapper.PqLineMapper;
import com.njcn.gather.event.devcie.pojo.dto.LedgerBaseInfoDTO;
import com.njcn.gather.event.devcie.pojo.po.PqLine;
import com.njcn.gather.event.devcie.pojo.po.PqsDeptsline;
import com.njcn.gather.event.devcie.service.PqsDeptslineService;
import com.njcn.gather.event.transientes.mapper.PqUserLedgerMapper;
import com.njcn.gather.event.transientes.mapper.PqUserLineAssMapper;
import com.njcn.gather.event.transientes.pojo.param.MonitorTerminalParam;
import com.njcn.gather.event.transientes.pojo.param.SimulationMsgParam;
import com.njcn.gather.event.transientes.pojo.po.*;
import com.njcn.gather.event.transientes.service.*;
import com.njcn.gather.event.transientes.service.impl.MsgEventInfoServiceImpl;
import com.njcn.gather.event.transientes.websocket.WebSocketServer;
import com.njcn.redis.utils.RedisUtil;
import com.njcn.web.controller.BaseController;
import com.njcn.web.utils.HttpResultUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.poi.ss.formula.functions.T;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import static com.njcn.gather.event.transientes.pojo.constant.RedisConstant.REDIS_DEPT_INDEX;
/**
* @Author: cdf
* @CreateTime: 2025-06-23
* @Description:
*/
@Api(tags = "暂降接收")
@RequestMapping("accept")
@RestController
@RequiredArgsConstructor
@Slf4j
public class EventGateController extends BaseController {
private final MsgEventInfoServiceImpl msgEventInfoServiceImpl;
private final PqUserLineAssMapper pqUserLineAssMapper;
private final PqUserLedgerMapper pqUserLedgerMapper;
@Value("${SYS_TYPE_ZT}")
private String sysTypeZt;
private final WebSocketServer webSocketServer;
private final PqsDeptslineService pqsDeptslineService;
private final PqsDeptsService pqsDeptsService;
private final PqsUserService pqsUserService;
private final PqsUsersetService pqsUsersetService;
private final PqLineMapper pqLineMapper;
private final EventGateService eventGateService;
private final MsgEventConfigService msgEventConfigService;
private final MsgEventInfoService msgEventInfoService;
private final RedisUtil redisUtil;
@OperateInfo
@GetMapping("/eventMsg")
@ApiOperation("接收远程推送的暂态事件")
@ApiImplicitParam(name = "eventMsg", value = "暂态事件json字符", required = true)
public HttpResult<Object> eventMsg(@RequestParam("msg") String msg) {
String methodDescribe = getMethodDescribe("eventMsg");
log.info("收到前置推送暂降事件:"+msg);
JSONObject jsonObject;
try {
//下面一行代码正式环境需要放开
jsonObject = new JSONObject(msg);
//下面一行代码正式环境需要放开
//jsonObject = test();
if (msgEventConfigService.getEventType().contains(jsonObject.get("wavetype").toString())
&& Float.parseFloat(jsonObject.get("eventvalue").toString()) <= msgEventConfigService.getEventValue()
&& (Float.parseFloat(jsonObject.get("persisttime").toString())*1000) >= msgEventConfigService.getEventDuration()) {
//过滤重要暂降事件
Integer lineId = Integer.valueOf(jsonObject.get("lineid").toString());
List<PqUserLineAssPO> assList = pqUserLineAssMapper.selectList(new LambdaQueryWrapper<PqUserLineAssPO>().eq(PqUserLineAssPO::getLineIndex,lineId));
String str ="/";
if(CollUtil.isNotEmpty(assList)){
List<String> userIds = assList.stream().map(PqUserLineAssPO::getUserIndex).distinct().collect(Collectors.toList());
List<PqUserLedgerPO> poList = pqUserLedgerMapper.selectList(new LambdaQueryWrapper<PqUserLedgerPO>().select(PqUserLedgerPO::getId,PqUserLedgerPO::getCustomerName).in(PqUserLedgerPO::getId,userIds));
str = poList.stream().map(PqUserLedgerPO::getCustomerName).collect(Collectors.joining(StrUtil.COMMA));
}
List<PqsDepts> deptsList = (List<PqsDepts>)redisUtil.getObjectByKey(REDIS_DEPT_INDEX+ StrUtil.DASHED+"AllDept");
Map<String,PqsDepts> deptsMap = deptsList.stream().collect(Collectors.toMap(PqsDepts::getDeptsIndex,dept->dept));
List<PqsDeptsline> deptslineList = pqsDeptslineService.lambdaQuery().eq(PqsDeptsline::getLineIndex,lineId).list();
List<String> deptIds = deptslineList.stream().map(PqsDeptsline::getDeptsIndex).collect(Collectors.toList());
Set<String> set =getAllParentIdsWithChildrenBatch(deptIds,deptsMap);
jsonObject.putOpt("objName",str);
jsonObject.putOpt("dept", String.join(StrUtil.COMMA, set));
webSocketServer.sendMessageToAll(jsonObject.toString());
}
} catch (Exception e) {
e.printStackTrace();
log.error("暂降json格式异常!{}", e.getMessage());
}
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
}
public Set<String> getAllParentIdsRecursive(String deptId, Map<String, PqsDepts> deptMap, Set<String> result) {
if (deptId == null || result.contains(deptId)) {
return result;
}
result.add(deptId); // 添加当前ID
PqsDepts dept = deptMap.get(deptId);
if (dept != null && dept.getParentnodeid() != null) {
getAllParentIdsRecursive(dept.getParentnodeid(), deptMap, result); // 递归处理父节点
}
return result;
}
// 批量处理入口方法
public Set<String> getAllParentIdsWithChildrenBatch(Collection<String> deptIds, Map<String, PqsDepts> deptMap) {
Set<String> result = new HashSet<>();
for (String deptId : deptIds) {
getAllParentIdsRecursive(deptId, deptMap, result);
}
return result;
}
@OperateInfo
@GetMapping("/testEvent")
@ApiOperation("接收远程推送的暂态事件")
public HttpResult<Object> testEvent() {
String methodDescribe = getMethodDescribe("testEvent");
log.info("模拟测试发送暂降事件-------------------------");
JSONObject jsonObject;
try {
//下面一行代码正式环境需要放开
jsonObject = test();
if (msgEventConfigService.getEventType().contains(jsonObject.get("wavetype").toString()) &&Float.parseFloat(jsonObject.get("eventvalue").toString()) <= msgEventConfigService.getEventValue()) {
webSocketServer.sendMessageToAll(jsonObject.toString());
//开始发送短信
try {
sendMessage(jsonObject);
}catch (Exception e){
log.error("短信组装发送失败!失败原因{}",e.getMessage());
}
}
} catch (Exception e) {
log.error("暂降json格式异常!{}", e.getMessage());
}
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
}
//测试模拟,正式环境删除
private PqsEventdetail createEvent(JSONObject jsonObject, LocalDateTime now) {
PqsEventdetail pqsEventdetail = new PqsEventdetail();
pqsEventdetail.setEventdetailIndex(jsonObject.get("eventdetail_index").toString());
pqsEventdetail.setLineid(Integer.valueOf(jsonObject.get("lineid").toString()));
pqsEventdetail.setTimeid(now);
pqsEventdetail.setMs(new BigDecimal(jsonObject.get("ms").toString()));
pqsEventdetail.setWavetype(Integer.valueOf(jsonObject.get("wavetype").toString()));
pqsEventdetail.setPersisttime(Double.valueOf(jsonObject.get("persisttime").toString()));
pqsEventdetail.setEventvalue(Double.valueOf(jsonObject.get("eventvalue").toString()));
pqsEventdetail.setEventreason(jsonObject.get("eventreason").toString());
pqsEventdetail.setEventtype(jsonObject.get("eventtype").toString());
return pqsEventdetail;
}
//测试模拟,正式环境删除
private JSONObject test() {
/*----------------------------------------------------------------------------------------*/
//以下部分为测试数据后续删除
List<PqLine> pqLineList = pqLineMapper.selectList(new LambdaQueryWrapper<>());
List<Integer> lineList = pqLineList.stream().map(PqLine::getLineIndex).collect(Collectors.toList());
List<LedgerBaseInfoDTO> baseInfoDTOList = pqLineMapper.getBaseLineInfo(lineList);
Map<Integer, LedgerBaseInfoDTO> map = baseInfoDTOList.stream().collect(Collectors.toMap(LedgerBaseInfoDTO::getLineId, Function.identity()));
Random random = new Random();
Integer lineId = lineList.get(random.nextInt(lineList.size()));
LedgerBaseInfoDTO dto = map.get(lineId);
LocalDateTime now = LocalDateTime.now();
String timeStr = DateUtil.format(now, DatePattern.NORM_DATETIME_PATTERN);
Long ms = (long) random.nextInt(999);
Integer[] temArr = new Integer[]{1, 3};
Integer wave = random.nextInt(2);
Double per = (double)random.nextInt(5000);
double minV = 0.1;
double maxV = 0.9;
Double eventValue = minV + (maxV - minV) * Math.random();
String id = IdUtil.simpleUUID();
JSONObject tem = new JSONObject();
tem.set("eventdetail_index", id);
tem.set("lineid", lineId.toString());
tem.set("timeid", timeStr);
tem.set("ms", ms.toString());
tem.set("wavetype", temArr[wave]);
tem.set("persisttime", per.toString());
tem.set("eventvalue", eventValue);
tem.set("eventreason", "97a56e0f-b546-4c1e-b27c-52463fc1d82f");
tem.set("eventtype", "676683a0-7f80-43e6-8df8-bea8ed235d67");
tem.set("gdname", "测试供电公司");
tem.set("bdname", dto.getStationName());
tem.set("pointname", dto.getLineName());
/* PqsEventdetail pqsEventdetail = createEvent(tem, now);
if (msgEventConfigService.getEventType().contains(tem.get("wavetype").toString())) {
webSocketServer.sendMessageToAll(tem.toString());
}
pqsEventdetailService.save(pqsEventdetail);*/
/*----------------------------------------------------------------------------------------*/
return tem;
}
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
@PostMapping("/getTransientAnalyseWave")
@ApiOperation("暂态事件波形分析")
public HttpResult<WaveDataDTO> getTransientAnalyseWave(@RequestBody MonitorTerminalParam param) {
String methodDescribe = getMethodDescribe("getTransientAnalyseWave");
WaveDataDTO wave = eventGateService.getTransientAnalyseWave(param);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, wave, methodDescribe);
}
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
@PostMapping("/simulationSend")
@ApiOperation("模拟发送短信")
public HttpResult<WaveDataDTO> simulationSend(@RequestBody @Validated SimulationMsgParam param) {
String methodDescribe = getMethodDescribe("simulationSend");
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
}
private void sendMessage(JSONObject jsonObject) throws Exception{
Integer lineId = Integer.valueOf(jsonObject.get("lineid").toString());
List<PqsDeptsline> pqLineDept = pqsDeptslineService.lambdaQuery().eq(PqsDeptsline::getLineIndex, lineId).eq(PqsDeptsline::getSystype, sysTypeZt).list();
Set<String> deptIds = pqLineDept.stream().map(PqsDeptsline::getDeptsIndex).collect(Collectors.toSet());
Set<String> resultIds = getAllParentDeptIds(deptIds);
List<PqsUserSet> pqsUserSetList = pqsUsersetService.lambdaQuery().eq(PqsUserSet::getIsNotice, 1).in(PqsUserSet::getDeptsIndex, resultIds).list();
if (CollUtil.isEmpty(pqsUserSetList)) {
//当前事件未找到用户信息,判断为不需要发送短信用户
return;
}
List<PqsUser> pqsUserList = pqsUserService.lambdaQuery().select(PqsUser::getUserIndex,PqsUser::getPhone,PqsUser::getName).in(PqsUser::getUserIndex, pqsUserSetList.stream().map(PqsUserSet::getUserIndex).collect(Collectors.toList())).list();
List<String> userIds = pqsUserList.stream().map(PqsUser::getUserIndex).collect(Collectors.toList());
List<PqsUserSet> poList = pqsUserSetList.stream().filter(it -> userIds.contains(it.getUserIndex())).collect(Collectors.toList());
if (CollUtil.isNotEmpty(poList)) {
StringBuilder stringBuilder = new StringBuilder(jsonObject.get("timeid").toString());
List<LedgerBaseInfoDTO> list = pqLineMapper.getBaseLineInfo(Stream.of(lineId).collect(Collectors.toList()));
LedgerBaseInfoDTO ledgerBaseInfoDTO = list.get(0);
BigDecimal bigDecimal = new BigDecimal(jsonObject.get("eventvalue").toString()).multiply(new BigDecimal(100)).setScale(2, RoundingMode.HALF_UP);
stringBuilder.append(".").append(jsonObject.get("ms").toString()).append(", ").append(ledgerBaseInfoDTO.getStationName()).append(ledgerBaseInfoDTO.getLineName())
.append("发生暂降事件,事件特征幅值").append(bigDecimal).append("%,持续时间:").append(jsonObject.get("persisttime").toString()).append("S");
//TODO 发送短信
// System.out.println(stringBuilder);
List<MsgEventInfo> resultList = new ArrayList<>();
for (PqsUser user : pqsUserList) {
MsgEventInfo msgEventInfo = new MsgEventInfo();
msgEventInfo.setEventIndex(jsonObject.get("eventdetail_index").toString());
msgEventInfo.setMsgContent(stringBuilder.toString());
msgEventInfo.setMsgIndex(IdUtil.simpleUUID());
msgEventInfo.setPhone(user.getPhone());
msgEventInfo.setSendResult(0);
msgEventInfo.setUserId(user.getUserIndex());
msgEventInfo.setUserName(user.getName());
msgEventInfo.setIsHandle(0);
msgEventInfo.setSendTime(LocalDateTime.now());
resultList.add(msgEventInfo);
}
msgEventInfoService.saveBatch(resultList);
}
}
/**
* 获取远程短信平台token
*/
private String apiToken() {
return "token";
}
private boolean apiSend(){
return false;
}
public Set<String> getAllParentDeptIds(Set<String> deptIds) {
// 首次获取直接父级
List<PqsDepts> allDeptList = pqsDeptsService.lambdaQuery().list();
// 递归获取所有父级
Set<String> result = recursivelyGetParentIds(deptIds, allDeptList);
return result;
}
/**
* 递归获取所有父级ID
*
* @param currentParentIds 当前层级的父级ID集合
* @return 所有层级的父级ID集合
*/
private Set<String> recursivelyGetParentIds(Set<String> currentParentIds, List<PqsDepts> allDeptList) {
Set<String> result = new HashSet<>(currentParentIds);
Set<String> nextLevelParentIds = new HashSet<>();
List<PqsDepts> parentDeptList = allDeptList.stream().filter(it -> currentParentIds.contains(it.getDeptsIndex())).collect(Collectors.toList());
for (PqsDepts pqsDepts : parentDeptList) {
if (!pqsDepts.getParentnodeid().equals("0")) {
nextLevelParentIds.add(pqsDepts.getParentnodeid());
}
}
// 如果有更高层级的父级,继续递归
if (!nextLevelParentIds.isEmpty()) {
Set<String> deeperParentIds = recursivelyGetParentIds(nextLevelParentIds, allDeptList);
result.addAll(deeperParentIds);
}
return result;
}
}

View File

@@ -1,156 +0,0 @@
package com.njcn.gather.event.transientes.controller;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.json.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.njcn.common.pojo.annotation.OperateInfo;
import com.njcn.common.pojo.enums.common.LogEnum;
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
import com.njcn.common.pojo.response.HttpResult;
import com.njcn.event.file.pojo.dto.WaveDataDTO;
import com.njcn.gather.event.devcie.mapper.PqLineMapper;
import com.njcn.gather.event.devcie.pojo.dto.DeviceDTO;
import com.njcn.gather.event.devcie.pojo.dto.LedgerBaseInfoDTO;
import com.njcn.gather.event.devcie.pojo.po.PqGdCompany;
import com.njcn.gather.event.devcie.pojo.po.PqLine;
import com.njcn.gather.event.devcie.pojo.po.PqSubstation;
import com.njcn.gather.event.devcie.pojo.po.PqsDeptsline;
import com.njcn.gather.event.devcie.service.PqsDeptslineService;
import com.njcn.gather.event.transientes.pojo.param.LargeScreenCountParam;
import com.njcn.gather.event.transientes.pojo.param.MonitorTerminalParam;
import com.njcn.gather.event.transientes.pojo.param.SimulationMsgParam;
import com.njcn.gather.event.transientes.pojo.po.*;
import com.njcn.gather.event.transientes.pojo.vo.EventDetailVO;
import com.njcn.gather.event.transientes.pojo.vo.UserLedgerStatisticVO;
import com.njcn.gather.event.transientes.service.*;
import com.njcn.gather.event.transientes.service.impl.MsgEventInfoServiceImpl;
import com.njcn.gather.event.transientes.websocket.WebSocketServer;
import com.njcn.web.controller.BaseController;
import com.njcn.web.utils.HttpResultUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.time.LocalDateTime;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;
/**
* @Author: cdf
* @CreateTime: 2025-06-23
* @Description:
*/
@Api(tags = "暂降接收")
@RequestMapping("right")
@RestController
@RequiredArgsConstructor
@Slf4j
public class EventRightController extends BaseController {
private final EventRightService eventRightService;
@OperateInfo
@PostMapping("/rightEvent")
@ApiOperation("右侧表头")
@ApiImplicitParam(name = "largeScreenCountParam", value = "", required = true)
public HttpResult<Object> rightEvent(@RequestBody LargeScreenCountParam largeScreenCountParam) {
String methodDescribe = getMethodDescribe("rightEvent");
UserLedgerStatisticVO userLedgerStatisticVO = eventRightService.userLedgerStatisticClone(largeScreenCountParam);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, userLedgerStatisticVO, methodDescribe);
}
@OperateInfo
@PostMapping("/rightImportUser")
@ApiOperation("右侧重要用户")
@ApiImplicitParam(name = "largeScreenCountParam", value = "", required = true)
public HttpResult<Object> rightImportUser(@RequestBody LargeScreenCountParam largeScreenCountParam) {
String methodDescribe = getMethodDescribe("rightImportUser");
List<UserLedgerStatisticVO.Inner> result = eventRightService.rightImportUser(largeScreenCountParam);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
}
@OperateInfo
@PostMapping("/rightEventOpen")
@ApiOperation("右侧表头点击事件")
@ApiImplicitParam(name = "largeScreenCountParam", value = "", required = true)
public HttpResult<Object> rightEventOpen(@RequestBody LargeScreenCountParam largeScreenCountParam) {
String methodDescribe = getMethodDescribe("rightEventOpen");
Page<PqUserLedgerPO> page = eventRightService.rightEventOpenClone(largeScreenCountParam);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, page, methodDescribe);
}
@OperateInfo
@PostMapping("/rightEventOpenClone")
@ApiOperation("右侧表头点击事件")
@ApiImplicitParam(name = "largeScreenCountParam", value = "", required = true)
public HttpResult<Object> rightEventOpenClone(@RequestBody LargeScreenCountParam largeScreenCountParam) {
String methodDescribe = getMethodDescribe("rightEventOpenClone");
Page<EventDetailVO> page = eventRightService.rightEventOpen(largeScreenCountParam);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, page, methodDescribe);
}
@OperateInfo
@PostMapping("/rightEventOpenForDetail")
@ApiOperation("右侧表头点击事件")
@ApiImplicitParam(name = "largeScreenCountParam", value = "", required = true)
public HttpResult<Object> rightEventOpenForDetail(@RequestBody LargeScreenCountParam largeScreenCountParam) {
String methodDescribe = getMethodDescribe("rightEventOpenForDetail");
Page<EventDetailVO> page = eventRightService.rightEventOpenForDetail(largeScreenCountParam);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, page, methodDescribe);
}
@OperateInfo
@PostMapping("/rightEventDevOpen")
@ApiOperation("右侧表头终端点击事件")
@ApiImplicitParam(name = "largeScreenCountParam", value = "", required = true)
public HttpResult<Object> rightEventDevOpen(@RequestBody LargeScreenCountParam largeScreenCountParam) {
String methodDescribe = getMethodDescribe("rightEventDevOpen");
Page<PqUserLedgerPO> page = eventRightService.rightEventDevOpen(largeScreenCountParam);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, page, methodDescribe);
}
@OperateInfo
@PostMapping("/rightImportOpenDetail")
@ApiOperation("右侧表头终端点击事件")
@ApiImplicitParam(name = "largeScreenCountParam", value = "", required = true)
public HttpResult<Object> rightImportOpenDetail(@RequestBody LargeScreenCountParam largeScreenCountParam) {
String methodDescribe = getMethodDescribe("rightImportOpenDetail");
PqUserLedgerPO po = eventRightService.rightImportOpenDetail(largeScreenCountParam);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, po, methodDescribe);
}
@GetMapping("gdSelect")
public HttpResult<List<PqGdCompany>> gdSelect() {
String methodDescribe = getMethodDescribe("gdSelect");
List<PqGdCompany> list = eventRightService.gdSelect();
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
}
@GetMapping("bdSelect")
public HttpResult<List<PqSubstation>> bdSelect() {
String methodDescribe = getMethodDescribe("bdSelect");
List<PqSubstation> list = eventRightService.bdSelect();
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
}
}

View File

@@ -1,265 +0,0 @@
package com.njcn.gather.event.transientes.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.njcn.common.pojo.annotation.OperateInfo;
import com.njcn.common.pojo.constant.OperateType;
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
import com.njcn.common.pojo.response.HttpResult;
import com.njcn.gather.event.devcie.pojo.dto.DeviceDTO;
import com.njcn.gather.event.transientes.pojo.param.LargeScreenCountParam;
import com.njcn.gather.event.transientes.pojo.param.MessageEventFeedbackParam;
import com.njcn.gather.event.transientes.pojo.po.MsgEventInfo;
import com.njcn.gather.event.transientes.pojo.vo.*;
import com.njcn.gather.event.transientes.service.LargeScreenCountService;
import com.njcn.web.controller.BaseController;
import com.njcn.web.utils.HttpResultUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* Description:
* Date: 2025/06/19 下午 3:00【需求编号】
*
* @author clam
* @version V1.0.0
*/
@Slf4j
@Api(tags = "大屏统计")
@RestController
@RequestMapping("/largescreen")
@RequiredArgsConstructor
public class LargeScreenCountController extends BaseController {
private final LargeScreenCountService largeScreenCountService;
@OperateInfo
@PostMapping("/initLedger")
@ApiOperation("台账规模统计")
@ApiImplicitParam(name = "largeScreenCountParam", value = "查询参数", required = true)
public HttpResult<Object> initLedger(@RequestBody LargeScreenCountParam largeScreenCountParam) {
String methodDescribe = getMethodDescribe("initLedger");
largeScreenCountService.initLedger(largeScreenCountParam);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
}
@OperateInfo
@PostMapping("/ledgercount")
@ApiOperation("台账规模统计")
@ApiImplicitParam(name = "largeScreenCountParam", value = "查询参数", required = true)
public HttpResult<LedgerCountVO> scaleStatistics(@RequestBody LargeScreenCountParam largeScreenCountParam) {
String methodDescribe = getMethodDescribe("scaleStatistics");
LedgerCountVO result = largeScreenCountService.scaleStatistics(largeScreenCountParam);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
}
@OperateInfo
@PostMapping("/alarmAnalysis")
@ApiOperation("告警统计分析")
@ApiImplicitParam(name = "largeScreenCountParam", value = "查询参数", required = true)
public HttpResult<AlarmAnalysisVO> alarmAnalysis(@RequestBody LargeScreenCountParam largeScreenCountParam) {
String methodDescribe = getMethodDescribe("alarmAnalysis");
AlarmAnalysisVO result = largeScreenCountService.alarmAnalysis(largeScreenCountParam);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
}
@OperateInfo
@PostMapping("/alarmAnalysisDetail")
@ApiOperation("告警统计分析详情")
@ApiImplicitParam(name = "largeScreenCountParam", value = "查询参数", required = true)
public HttpResult<AlarmAnalysisVO> alarmAnalysisDetail(@RequestBody LargeScreenCountParam largeScreenCountParam) {
String methodDescribe = getMethodDescribe("alarmAnalysisDetail");
AlarmAnalysisVO result = largeScreenCountService.alarmAnalysisDetail(largeScreenCountParam);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
}
@OperateInfo
@PostMapping("/eventTablePage")
@ApiOperation("告警统计分析详情")
@ApiImplicitParam(name = "largeScreenCountParam", value = "查询参数", required = true)
public HttpResult<Page<EventDetailVO>> eventTablePage(@RequestBody LargeScreenCountParam largeScreenCountParam) {
String methodDescribe = getMethodDescribe("alarmAnalysisDetail");
Page<EventDetailVO> result = largeScreenCountService.eventTablePage(largeScreenCountParam);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
}
@OperateInfo
@PostMapping("/eventTrend")
@ApiOperation("暂降事件趋势")
@ApiImplicitParam(name = "largeScreenCountParam", value = "查询参数", required = true)
public HttpResult<List<EventTrendVO>> eventTrend(@RequestBody LargeScreenCountParam largeScreenCountParam) {
String methodDescribe = getMethodDescribe("eventTrend");
List<EventTrendVO> result = largeScreenCountService.eventTrend(largeScreenCountParam);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
}
@OperateInfo
@PostMapping("/eventList")
@ApiOperation("暂降事件列表")
@ApiImplicitParam(name = "largeScreenCountParam", value = "查询参数", required = true)
public HttpResult<Page<EventDetailVO>> eventList(@RequestBody LargeScreenCountParam largeScreenCountParam) {
String methodDescribe = getMethodDescribe("eventList");
Page<EventDetailVO> result = largeScreenCountService.eventList(largeScreenCountParam);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
}
@OperateInfo
@PostMapping("/noDealEventList")
@ApiOperation("未处理暂降事件列表")
@ApiImplicitParam(name = "largeScreenCountParam", value = "查询参数", required = true)
public HttpResult<List<EventDetailVO>> noDealEventList(@RequestBody LargeScreenCountParam largeScreenCountParam) {
String methodDescribe = getMethodDescribe("noDealEventList");
List<EventDetailVO> result = largeScreenCountService.noDealEventList(largeScreenCountParam);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
}
@OperateInfo
@PostMapping("/mapCount")
@ApiOperation("地图统计")
@ApiImplicitParam(name = "largeScreenCountParam", value = "查询参数", required = true)
public HttpResult<List<MapCountVO>> mapCount(@RequestBody LargeScreenCountParam largeScreenCountParam) {
String methodDescribe = getMethodDescribe("mapCount");
List<MapCountVO> result = largeScreenCountService.mapCount(largeScreenCountParam);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
}
@OperateInfo(operateType= OperateType.UPDATE)
@PostMapping("/lookEvent")
@ApiOperation("处理暂降事件")
@ApiImplicitParam(name = "eventIds", value = "暂降事件id", required = true)
public HttpResult<Boolean> lookEvent(@RequestBody List<String> eventIds) {
String methodDescribe = getMethodDescribe("lookEvent");
boolean result = largeScreenCountService.lookEvent(eventIds);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
}
@OperateInfo
@GetMapping("/eventMsgDetail")
@ApiOperation("暂降事件列表详情按钮")
@ApiImplicitParam(name = "eventId", value = "暂降事件id", required = true)
public HttpResult<EventMsgDetailVO> eventMsgDetail(@RequestParam("eventId")String eventId) {
String methodDescribe = getMethodDescribe("eventMsgDetail");
EventMsgDetailVO result = largeScreenCountService.eventMsgDetail(eventId);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
}
@OperateInfo
@PostMapping("/msgSendList")
@ApiOperation("远程通知列表")
@ApiImplicitParam(name = "largeScreenCountParam", value = "参数", required = true)
public HttpResult<List<MsgEventInfo>> msgSendList(@RequestBody LargeScreenCountParam largeScreenCountParam) {
String methodDescribe = getMethodDescribe("msgSendList");
List<MsgEventInfo> result = largeScreenCountService.msgSendList(largeScreenCountParam);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
}
@OperateInfo
@PostMapping("/hasSendMsgPage")
@ApiOperation("已发送短信列表")
@ApiImplicitParam(name = "largeScreenCountParam", value = "参数", required = true)
public HttpResult<Page<MsgEventInfo>> hasSendMsgPage(@RequestBody LargeScreenCountParam largeScreenCountParam) {
String methodDescribe = getMethodDescribe("hasSendMsgPage");
Page<MsgEventInfo> result = largeScreenCountService.hasSendMsgPage(largeScreenCountParam);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
}
@OperateInfo(operateType = OperateType.ADD)
@PostMapping("/msgHandle")
@ApiOperation("短信处理")
@ApiImplicitParam(name = "eventId", value = "暂降事件id", required = true)
public HttpResult<Boolean> msgHandle(@RequestBody @Validated MessageEventFeedbackParam messageEventFeedbackParam) {
String methodDescribe = getMethodDescribe("msgHandle");
largeScreenCountService.msgHandle(messageEventFeedbackParam);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, true, methodDescribe);
}
@OperateInfo
@PostMapping("/devFlagCount")
@ApiOperation("终端运行统计")
@ApiImplicitParam(name = "largeScreenCountParam", value = "查询参数", required = true)
public HttpResult<DeviceCountVO> devFlagCount(@RequestBody LargeScreenCountParam largeScreenCountParam) {
String methodDescribe = getMethodDescribe("devFlagCount");
DeviceCountVO deviceCountVO = largeScreenCountService.devFlagCount(largeScreenCountParam);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, deviceCountVO, methodDescribe);
}
@OperateInfo
@PostMapping("/devDetail")
@ApiOperation("终端运行统计")
@ApiImplicitParam(name = "largeScreenCountParam", value = "查询参数", required = true)
public HttpResult<List<DeviceDTO>> devDetail(@RequestBody LargeScreenCountParam largeScreenCountParam) {
String methodDescribe = getMethodDescribe("devDetail");
List<DeviceDTO> deviceDTOList = largeScreenCountService.devDetail(largeScreenCountParam);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, deviceDTOList, methodDescribe);
}
@OperateInfo
@PostMapping("/areaDevCount")
@ApiOperation("区域终端统计")
@ApiImplicitParam(name = "largeScreenCountParam", value = "查询参数", required = true)
public HttpResult<List<RegionDevCountVO>> areaDevCount(@RequestBody LargeScreenCountParam largeScreenCountParam) {
String methodDescribe = getMethodDescribe("areaDevCount");
List<RegionDevCountVO> result = largeScreenCountService.regionDevCount(largeScreenCountParam);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
}
@OperateInfo
@PostMapping("/substationCount")
@ApiOperation("变电站统计")
@ApiImplicitParam(name = "largeScreenCountParam", value = "查询参数", required = true)
public HttpResult<List<SubStationCountVO>> substationCount(@RequestBody LargeScreenCountParam largeScreenCountParam) {
String methodDescribe = getMethodDescribe("substationCount");
List<SubStationCountVO> result = largeScreenCountService.substationCount(largeScreenCountParam);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
}
@OperateInfo
@PostMapping("/regionDevCount")
@ApiOperation("区域终端统计")
@ApiImplicitParam(name = "largeScreenCountParam", value = "查询参数", required = true)
public HttpResult<List<RegionDevCountVO>> rightUserStatistic(@RequestBody LargeScreenCountParam largeScreenCountParam) {
String methodDescribe = getMethodDescribe("rightUserStatistic");
List<RegionDevCountVO> result = largeScreenCountService.regionDevCount(largeScreenCountParam);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
}
@OperateInfo
@PostMapping("/eventPage")
@ApiOperation("分页查询暂降事件")
@ApiImplicitParam(name = "largeScreenCountParam", value = "查询参数", required = true)
public HttpResult<Page<EventDetailVO>> eventPage(@RequestBody LargeScreenCountParam largeScreenCountParam) {
String methodDescribe = getMethodDescribe("eventPage");
Page<EventDetailVO> result = largeScreenCountService.eventPage(largeScreenCountParam);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
}
@OperateInfo
@PostMapping("/devicePage")
@ApiOperation("终端分页查询")
@ApiImplicitParam(name = "largeScreenCountParam", value = "查询参数", required = true)
public HttpResult<Page<DeviceDTO>> devicePage(@RequestBody LargeScreenCountParam largeScreenCountParam) {
String methodDescribe = getMethodDescribe("devicePage");
Page<DeviceDTO> result = largeScreenCountService.devicePage(largeScreenCountParam);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
}
@OperateInfo(operateType= OperateType.UPDATE)
@PostMapping("/userEventList")
@ApiOperation("查询暂降事件")
@ApiImplicitParam(name = "eventIds", value = "暂降事件id", required = true)
public HttpResult<Page<EventDetailVO>> userEventList(@RequestBody LargeScreenCountParam largeScreenCountParam) {
String methodDescribe = getMethodDescribe("userEventList");
Page<EventDetailVO> result = largeScreenCountService.userEventList(largeScreenCountParam);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
}
}

View File

@@ -1,62 +0,0 @@
package com.njcn.gather.event.transientes.controller;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.njcn.common.pojo.annotation.OperateInfo;
import com.njcn.common.pojo.constant.OperateType;
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
import com.njcn.common.pojo.exception.BusinessException;
import com.njcn.common.pojo.response.HttpResult;
import com.njcn.gather.event.transientes.pojo.po.MsgEventConfig;
import com.njcn.gather.event.transientes.service.MsgEventConfigService;
import com.njcn.web.controller.BaseController;
import com.njcn.web.utils.HttpResultUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
/**
* @Author: cdf
* @CreateTime: 2025-06-27
* @Description:
*/
@Api(tags = "暂降平台配置")
@RequestMapping("config")
@RestController
@RequiredArgsConstructor
@Slf4j
public class MsgEventConfigController extends BaseController {
private final MsgEventConfigService msgEventConfigService;
@OperateInfo(operateType = OperateType.ADD)
@PostMapping("/eventConfig")
@ApiOperation("暂降平台配置")
@ApiImplicitParam(name = "msgEventConfig", value = "实体", required = true)
@Transactional(rollbackFor = Exception.class)
public HttpResult<Object> eventConfig(@RequestBody @Validated MsgEventConfig msgEventConfig) {
String methodDescribe = getMethodDescribe("eventConfig");
msgEventConfigService.eventConfig(msgEventConfig);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, true, methodDescribe);
}
@OperateInfo
@GetMapping("/queryConfig")
@ApiOperation("接收远程推送的暂态事件")
public HttpResult<MsgEventConfig> queryConfig() {
String methodDescribe = getMethodDescribe("queryConfig");
MsgEventConfig msgEventConfig = msgEventConfigService.queryConfig();
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, msgEventConfig, methodDescribe);
}
}

View File

@@ -1,54 +0,0 @@
package com.njcn.gather.event.transientes.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.njcn.gather.event.transientes.pojo.param.PqUserLedgerParam;
import com.njcn.gather.event.transientes.pojo.po.PqUserLedgerPO;
import com.njcn.gather.event.transientes.service.PqUserLedgerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* @Author: cdf
* @CreateTime: 2025-07-28
* @Description:
*/
@RestController
@RequestMapping("/pqUser/ledger")
public class PqUserLedgerController {
@Autowired
private PqUserLedgerService pqUserLedgerService;
// 添加记录
@PostMapping("addLedger")
public boolean addLedger(@RequestBody PqUserLedgerParam ledgerParam) {
return pqUserLedgerService.addLedger(ledgerParam);
}
// 更新记录
@PostMapping("updateLedger")
public boolean updateLedger(@RequestBody PqUserLedgerParam ledgerParam) {
return pqUserLedgerService.updateLedger(ledgerParam);
}
// 删除记录
@PostMapping("deleteLedger")
public boolean deleteLedger(@RequestBody List<String> ids) {
return pqUserLedgerService.deleteLedger(ids);
}
// 查询单条记录
@GetMapping("/getLedgerById")
public PqUserLedgerPO getLedgerById(@PathVariable String id) {
return pqUserLedgerService.getLedgerById(id);
}
// 查询所有记录
@GetMapping
public Page<PqUserLedgerPO> pageList(@RequestBody PqUserLedgerParam ledgerParam) {
return pqUserLedgerService.pageList(ledgerParam);
}
}

View File

@@ -1,48 +0,0 @@
package com.njcn.gather.event.transientes.controller;
import com.njcn.common.pojo.annotation.OperateInfo;
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
import com.njcn.common.pojo.response.HttpResult;
import com.njcn.gather.event.transientes.pojo.po.PqsDicTreePO;
import com.njcn.gather.event.transientes.pojo.vo.PqsDicTreeVO;
import com.njcn.gather.event.transientes.service.PqsDicTreeService;
import com.njcn.web.controller.BaseController;
import com.njcn.web.utils.HttpResultUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.List;
/**
* @Author: cdf
* @CreateTime: 2025-08-01
* @Description:
*/
@Api(tags = "字典树")
@RequestMapping("dicTree")
@RestController
@RequiredArgsConstructor
@Slf4j
public class PqsDicTreeController extends BaseController {
private final PqsDicTreeService pqsDicTreeService;
@OperateInfo
@GetMapping("/getDicTree")
@ApiOperation("获取树结构")
public HttpResult<List<PqsDicTreePO>> getDicTree(@RequestParam("code") String code){
String methodDescribe = getMethodDescribe("getDicTree");
List<PqsDicTreePO> pqsDicTreePOList = pqsDicTreeService.getDicTree(code);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, pqsDicTreePOList, methodDescribe);
}
}

View File

@@ -1,81 +0,0 @@
package com.njcn.gather.event.transientes.filter;
import cn.hutool.json.JSONObject;
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
import com.njcn.common.pojo.response.HttpResult;
import com.njcn.gather.event.transientes.utils.JwtUtil;
import io.jsonwebtoken.ExpiredJwtException;
import lombok.extern.slf4j.Slf4j;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.web.authentication.WebAuthenticationDetailsSource;
import org.springframework.stereotype.Component;
import org.springframework.web.filter.OncePerRequestFilter;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
@Component
@Slf4j
public class JwtRequestFilter extends OncePerRequestFilter {
private final UserDetailsService userDetailsService;
private final JwtUtil jwtUtil;
public JwtRequestFilter(UserDetailsService userDetailsService, JwtUtil jwtUtil) {
this.userDetailsService = userDetailsService;
this.jwtUtil = jwtUtil;
}
@Override
protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain chain)
throws ServletException, IOException {
final String authorizationHeader = request.getHeader("Authorization");
String username = null;
String jwt = null;
if (authorizationHeader != null && authorizationHeader.startsWith("Bearer ")) {
jwt = authorizationHeader.substring(7);
try {
username = jwtUtil.extractUsername(jwt);
} catch (ExpiredJwtException e) {
log.error(e.getMessage());
sendErrorResponse(response,CommonResponseEnum.TOKEN_EXPIRE_JWT);
return;
} catch (Exception e) {
log.error(e.getMessage());
sendErrorResponse(response,CommonResponseEnum.PARSE_TOKEN_ERROR);
return;
}
}
if (username != null && SecurityContextHolder.getContext().getAuthentication() == null) {
UserDetails userDetails = this.userDetailsService.loadUserByUsername(username);
if (jwtUtil.validateToken(jwt, userDetails)) {
UsernamePasswordAuthenticationToken usernamePasswordAuthenticationToken =
new UsernamePasswordAuthenticationToken(
userDetails, null, userDetails.getAuthorities());
usernamePasswordAuthenticationToken.setDetails(new WebAuthenticationDetailsSource().buildDetails(request));
SecurityContextHolder.getContext().setAuthentication(usernamePasswordAuthenticationToken);
}
}
chain.doFilter(request, response);
}
private void sendErrorResponse(HttpServletResponse response, CommonResponseEnum error) throws IOException {
response.setStatus(HttpServletResponse.SC_OK);
response.setContentType("application/json;charset=UTF-8");
HttpResult<String> httpResult = new HttpResult<>();
httpResult.setCode(error.getCode());
httpResult.setMessage(error.getMessage());
response.getWriter().write(new JSONObject(httpResult, false).toString());
}
}

View File

@@ -1,37 +0,0 @@
package com.njcn.gather.event.transientes.handler;
import com.njcn.common.pojo.constant.LogInfo;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.MethodArgumentNotValidException;
import java.lang.reflect.Method;
import java.util.Objects;
/**
* @author hongawen
* @version 1.0.0
* @date 2021年06月22日 10:25
*/
@Slf4j
public class ControllerUtil {
/**
* 针对methodArgumentNotValidException 异常的处理
* @author cdf
*/
public static String getMethodArgumentNotValidException(MethodArgumentNotValidException methodArgumentNotValidException) {
String operate = LogInfo.UNKNOWN_OPERATE;
Method method = null;
try {
method = methodArgumentNotValidException.getParameter().getMethod();
if (!Objects.isNull(method) && method.isAnnotationPresent(ApiOperation.class)) {
ApiOperation apiOperation = method.getAnnotation(ApiOperation.class);
operate = apiOperation.value();
}
}catch (Exception e){
log.error("根据方法参数非法异常获取@ApiOperation注解值失败参数非法异常信息{},方法名:{},异常信息:{}",methodArgumentNotValidException.getMessage(),method,e.getMessage());
}
return operate;
}
}

View File

@@ -1,255 +0,0 @@
package com.njcn.gather.event.transientes.handler;
import cn.hutool.core.text.StrFormatter;
import cn.hutool.core.util.StrUtil;
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
import com.njcn.common.pojo.exception.BusinessException;
import com.njcn.common.pojo.response.HttpResult;
import com.njcn.common.utils.LogUtil;
import com.njcn.web.utils.HttpResultUtil;
import com.njcn.web.utils.HttpServletUtil;
import com.njcn.web.utils.ReflectCommonUtil;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.json.JSONException;
import org.springframework.validation.ObjectError;
import org.springframework.web.HttpMediaTypeNotSupportedException;
import org.springframework.web.bind.MethodArgumentNotValidException;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;
import org.springframework.web.util.NestedServletException;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.validation.ConstraintViolation;
import javax.validation.ConstraintViolationException;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.*;
import java.util.stream.Collectors;
import java.util.stream.Stream;
/**
* 全局通用业务异常处理器
*
* @author hongawen
* @version 1.0.0
* @date 2021年04月20日 18:04
*/
@Slf4j
@AllArgsConstructor
@RestControllerAdvice
public class GlobalBusinessExceptionHandler {
private final ThreadPoolExecutor executor = new ThreadPoolExecutor(
4, 8, 30, TimeUnit.SECONDS,
new LinkedBlockingQueue<>(100),
// 队列满时由主线程执行
new ThreadPoolExecutor.CallerRunsPolicy()
);
/**
* 捕获业务功能异常,通常为业务数据抛出的异常
*
* @param businessException 业务异常
*/
@ExceptionHandler(BusinessException.class)
public HttpResult<String> handleBusinessException(BusinessException businessException) {
String operate = ReflectCommonUtil.getMethodDescribeByException(businessException);
// recodeBusinessExceptionLog(businessException, businessException.getMessage());
return HttpResultUtil.assembleBusinessExceptionResult(businessException, null, operate);
}
/**
* 空指针异常捕捉
*
* @param nullPointerException 空指针异常
*/
@ExceptionHandler(NullPointerException.class)
public HttpResult<String> handleNullPointerException(NullPointerException nullPointerException) {
LogUtil.logExceptionStackInfo(CommonResponseEnum.NULL_POINTER_EXCEPTION.getMessage(), nullPointerException);
//recodeBusinessExceptionLog(nullPointerException, CommonResponseEnum.NULL_POINTER_EXCEPTION.getMessage());
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.NULL_POINTER_EXCEPTION, null, ReflectCommonUtil.getMethodDescribeByException(nullPointerException));
}
/**
* 算数运算异常
*
* @param arithmeticException 算数运算异常由于除数为0引起的异常
*/
@ExceptionHandler(ArithmeticException.class)
public HttpResult<String> handleArithmeticException(ArithmeticException arithmeticException) {
LogUtil.logExceptionStackInfo(CommonResponseEnum.ARITHMETIC_EXCEPTION.getMessage(), arithmeticException);
// recodeBusinessExceptionLog(arithmeticException, CommonResponseEnum.ARITHMETIC_EXCEPTION.getMessage());
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.ARITHMETIC_EXCEPTION, null, ReflectCommonUtil.getMethodDescribeByException(arithmeticException));
}
/**
* 类型转换异常捕捉
*
* @param classCastException 类型转换异常
*/
@ExceptionHandler(ClassCastException.class)
public HttpResult<String> handleClassCastException(ClassCastException classCastException) {
LogUtil.logExceptionStackInfo(CommonResponseEnum.CLASS_CAST_EXCEPTION.getMessage(), classCastException);
// recodeBusinessExceptionLog(classCastException, CommonResponseEnum.CLASS_CAST_EXCEPTION.getMessage());
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.CLASS_CAST_EXCEPTION, null, ReflectCommonUtil.getMethodDescribeByException(classCastException));
}
/**
* 索引下标越界异常捕捉
*
* @param indexOutOfBoundsException 索引下标越界异常
*/
@ExceptionHandler(IndexOutOfBoundsException.class)
public HttpResult<String> handleIndexOutOfBoundsException(IndexOutOfBoundsException indexOutOfBoundsException) {
LogUtil.logExceptionStackInfo(CommonResponseEnum.INDEX_OUT_OF_BOUNDS_EXCEPTION.getMessage(), indexOutOfBoundsException);
// recodeBusinessExceptionLog(indexOutOfBoundsException, CommonResponseEnum.INDEX_OUT_OF_BOUNDS_EXCEPTION.getMessage());
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.INDEX_OUT_OF_BOUNDS_EXCEPTION, null, ReflectCommonUtil.getMethodDescribeByException(indexOutOfBoundsException));
}
/**
* 前端请求后端,请求中参数的媒体方式不支持异常
*
* @param httpMediaTypeNotSupportedException 请求中参数的媒体方式不支持异常
*/
@ExceptionHandler(HttpMediaTypeNotSupportedException.class)
public HttpResult<String> httpMediaTypeNotSupportedExceptionHandler(HttpMediaTypeNotSupportedException httpMediaTypeNotSupportedException) {
LogUtil.logExceptionStackInfo(CommonResponseEnum.HTTP_MEDIA_TYPE_NOT_SUPPORTED_EXCEPTION.getMessage(), httpMediaTypeNotSupportedException);
// 然后提取错误提示信息进行返回
// recodeBusinessExceptionLog(httpMediaTypeNotSupportedException, CommonResponseEnum.HTTP_MEDIA_TYPE_NOT_SUPPORTED_EXCEPTION.getMessage());
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.HTTP_MEDIA_TYPE_NOT_SUPPORTED_EXCEPTION, null, ReflectCommonUtil.getMethodDescribeByException(httpMediaTypeNotSupportedException));
}
/**
* 前端请求后端,参数校验异常捕捉
* RequestBody注解参数异常
*
* @param methodArgumentNotValidException 参数校验异常
*/
@ExceptionHandler(MethodArgumentNotValidException.class)
public HttpResult<String> methodArgumentNotValidExceptionHandler(MethodArgumentNotValidException methodArgumentNotValidException) {
// 从异常对象中拿到allErrors数据
String messages = methodArgumentNotValidException.getBindingResult().getAllErrors()
.stream().map(ObjectError::getDefaultMessage).collect(Collectors.joining(""));
// 然后提取错误提示信息进行返回
LogUtil.njcnDebug(log, "参数校验异常,异常为:{}", messages);
// recodeBusinessExceptionLog(methodArgumentNotValidException, CommonResponseEnum.METHOD_ARGUMENT_NOT_VALID_EXCEPTION.getMessage());
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.METHOD_ARGUMENT_NOT_VALID_EXCEPTION, messages, ControllerUtil.getMethodArgumentNotValidException(methodArgumentNotValidException));
}
/**
* 前端请求后端,参数校验异常捕捉
* PathVariable注解、RequestParam注解参数异常
*
* @param constraintViolationException 参数校验异常
*/
@ExceptionHandler(ConstraintViolationException.class)
public HttpResult<String> constraintViolationExceptionExceptionHandler(ConstraintViolationException constraintViolationException) {
String exceptionMessage = constraintViolationException.getMessage();
StringBuilder messages = new StringBuilder();
if (exceptionMessage.indexOf(StrUtil.COMMA) > 0) {
String[] tempMessage = exceptionMessage.split(StrUtil.COMMA);
Stream.of(tempMessage).forEach(message -> {
messages.append(message.substring(message.indexOf(StrUtil.COLON) + 2)).append(';');
});
} else {
messages.append(exceptionMessage.substring(exceptionMessage.indexOf(StrUtil.COLON) + 2));
}
// 然后提取错误提示信息进行返回
LogUtil.njcnDebug(log, "参数校验异常,异常为:{}", messages);
// recodeBusinessExceptionLog(constraintViolationException, CommonResponseEnum.METHOD_ARGUMENT_NOT_VALID_EXCEPTION.getMessage());
List<ConstraintViolation<?>> constraintViolationList = new ArrayList<>(constraintViolationException.getConstraintViolations());
ConstraintViolation<?> constraintViolation = constraintViolationList.get(0);
Class<?> rootBeanClass = constraintViolation.getRootBeanClass();
//判断校验参数异常捕获的根源是controller还是service处
if (rootBeanClass.getName().endsWith("Controller")) {
String methodName = constraintViolation.getPropertyPath().toString().substring(0, constraintViolation.getPropertyPath().toString().indexOf(StrUtil.DOT));
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.METHOD_ARGUMENT_NOT_VALID_EXCEPTION, messages.toString(), ReflectCommonUtil.getMethodDescribeByClassAndMethodName(rootBeanClass, methodName));
} else {
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.METHOD_ARGUMENT_NOT_VALID_EXCEPTION, messages.toString(), ReflectCommonUtil.getMethodDescribeByException(constraintViolationException));
}
}
/**
* 索引下标越界异常捕捉
*
* @param illegalArgumentException 参数校验异常
*/
@ExceptionHandler(IllegalArgumentException.class)
public HttpResult<String> handleIndexOutOfBoundsException(IllegalArgumentException illegalArgumentException) {
LogUtil.logExceptionStackInfo(CommonResponseEnum.ILLEGAL_ARGUMENT_EXCEPTION.getMessage(), illegalArgumentException);
// recodeBusinessExceptionLog(illegalArgumentException, CommonResponseEnum.ILLEGAL_ARGUMENT_EXCEPTION.getMessage());
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.ILLEGAL_ARGUMENT_EXCEPTION, illegalArgumentException.getMessage(), ReflectCommonUtil.getMethodDescribeByException(illegalArgumentException));
}
/**
* 未声明异常捕捉
*
* @param exception 未声明异常
*/
@ExceptionHandler(Exception.class)
public HttpResult<String> handleException(Exception exception) {
//针对fallbackFactory降级异常特殊处理
Exception tempException = exception;
String exceptionCause = CommonResponseEnum.UN_DECLARE.getMessage();
String code = CommonResponseEnum.UN_DECLARE.getCode();
if (exception instanceof NestedServletException) {
Throwable cause = exception.getCause();
if (cause instanceof AssertionError) {
if (cause.getCause() instanceof BusinessException) {
tempException = (BusinessException) cause.getCause();
BusinessException tempBusinessException = (BusinessException) cause.getCause();
exceptionCause = tempBusinessException.getMessage();
code = tempBusinessException.getCode();
}
}
}
LogUtil.logExceptionStackInfo(exceptionCause, tempException);
// recodeBusinessExceptionLog(exception, exceptionCause);
//判断方法上是否有自定义注解,做特殊处理
// Method method = ReflectCommonUtil.getMethod(exception);
// if (!Objects.isNull(method)){
// if(method.isAnnotationPresent(ReturnMsg.class)){
// return HttpResultUtil.assembleResult(code, null, StrFormatter.format("{}",exceptionCause));
// }
// }
return HttpResultUtil.assembleResult(code, null, StrFormatter.format("{}{}{}", ReflectCommonUtil.getMethodDescribeByException(tempException), StrUtil.C_COMMA, exceptionCause));
}
/**
* json解析异常
*
* @param jsonException json参数
*/
@ExceptionHandler(JSONException.class)
public HttpResult<String> handleIndexOutOfBoundsException(JSONException jsonException) {
LogUtil.logExceptionStackInfo(CommonResponseEnum.JSON_CONVERT_EXCEPTION.getMessage(), jsonException);
// recodeBusinessExceptionLog(jsonException, CommonResponseEnum.JSON_CONVERT_EXCEPTION.getMessage());
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.JSON_CONVERT_EXCEPTION, jsonException.getMessage(), ReflectCommonUtil.getMethodDescribeByException(jsonException));
}
/*
private void recodeBusinessExceptionLog(Exception businessException, String methodDescribe) {
HttpServletRequest httpServletRequest = HttpServletUtil.getRequest();
Future<?> future = executor.submit(() -> {
HttpServletUtil.setRequest(httpServletRequest);
sysLogAuditService.recodeBusinessExceptionLog(businessException, methodDescribe);
});
try {
// 抛出 ExecutionException
future.get();
} catch (ExecutionException | InterruptedException e) {
log.error("保存审计日志异常,异常为:" + e.getMessage());
}
}*/
}

View File

@@ -1,57 +0,0 @@
//package com.njcn.gather.event.transientes.handler;
//
//import org.apache.ibatis.executor.statement.StatementHandler;
//import org.apache.ibatis.plugin.*;
//import org.apache.ibatis.session.ResultHandler;
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
//import org.springframework.stereotype.Component;
//
//import java.sql.Statement;
//import java.util.Properties;
//
///**
// * @Author: cdf
// * @CreateTime: 2025-07-14
// * @Description:
// */
//@Intercepts({
// @Signature(type = StatementHandler.class, method = "query", args = {Statement.class, ResultHandler.class}),
// @Signature(type = StatementHandler.class, method = "update", args = {Statement.class}),
// @Signature(type = StatementHandler.class, method = "batch", args = {Statement.class})
//})
//@Component
//public class SqlExecuteTimeInterceptor implements Interceptor {
// private static final Logger logger = LoggerFactory.getLogger(SqlExecuteTimeInterceptor.class);
//
// @Override
// public Object intercept(Invocation invocation) throws Throwable {
// long startTime = System.currentTimeMillis();
// try {
// return invocation.proceed();
// } finally {
// long endTime = System.currentTimeMillis();
// long executeTime = endTime - startTime;
//
// // 获取 SQL 语句
// StatementHandler statementHandler = (StatementHandler) invocation.getTarget();
// String sql = statementHandler.getBoundSql().getSql();
//
// // 打印执行时间和 SQL
// logger.info("SQL 执行时间: {}ms, SQL: {}", executeTime, sql);
// }
// }
//
// @Override
// public Object plugin(Object target) {
// if (target instanceof StatementHandler) {
// return Plugin.wrap(target, this);
// }
// return target;
// }
//
// @Override
// public void setProperties(Properties properties) {
// // 可配置参数
// }
//}

View File

@@ -1,13 +0,0 @@
package com.njcn.gather.event.transientes.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.njcn.gather.event.transientes.pojo.po.MessageEventFeedback;
/**
* @Author: cdf
* @CreateTime: 2025-06-26
* @Description:
*/
public interface MessageEventFeedbackMapper extends BaseMapper<MessageEventFeedback> {
}

View File

@@ -1,12 +0,0 @@
package com.njcn.gather.event.transientes.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.njcn.gather.event.transientes.pojo.po.MsgEventConfig;
import org.apache.ibatis.annotations.Mapper;
/**
* MSG_EVENT_CONFIG表Mapper接口
*/
@Mapper
public interface MsgEventConfigMapper extends BaseMapper<MsgEventConfig> {
}

View File

@@ -1,9 +0,0 @@
package com.njcn.gather.event.transientes.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.njcn.gather.event.transientes.pojo.po.MsgEventInfo;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface MsgEventInfoMapper extends BaseMapper<MsgEventInfo> {
}

View File

@@ -1,15 +0,0 @@
package com.njcn.gather.event.transientes.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.njcn.gather.event.devcie.pojo.po.PqDeviceDetail;
/**
*
* Description:
* Date: 2025/06/19 下午 1:47【需求编号】
*
* @author clam
* @version V1.0.0
*/
public interface PqDevicedetailMapper extends BaseMapper<PqDeviceDetail> {
}

View File

@@ -1,14 +0,0 @@
package com.njcn.gather.event.transientes.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.njcn.gather.event.transientes.pojo.po.PqUserLedgerPO;
import com.njcn.gather.event.transientes.pojo.po.PqUserLineAssPO;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface PqUserLedgerMapper extends BaseMapper<PqUserLedgerPO> {
List<PqUserLineAssPO> getUserByParam(@Param("lineIds") List<Integer> lineIds, @Param("searchValue")String searchValue);
}

View File

@@ -1,9 +0,0 @@
package com.njcn.gather.event.transientes.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.njcn.gather.event.transientes.pojo.po.PqUserLineAssPO;
public interface PqUserLineAssMapper extends BaseMapper<PqUserLineAssPO> {
}

View File

@@ -1,22 +0,0 @@
package com.njcn.gather.event.transientes.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.njcn.gather.event.devcie.pojo.dto.PqsDeptDTO;
import com.njcn.gather.event.transientes.pojo.po.PqsDepts;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
*
* Description:
* Date: 2025/06/19 下午 3:57【需求编号】
*
* @author clam
* @version V1.0.0
*/
public interface PqsDeptsMapper extends BaseMapper<PqsDepts> {
List<String> findDeptAndChildren(@Param("deptId") String deptId);
List<PqsDeptDTO> getDeptList(@Param("deptIds") List<String> deptIds);
}

View File

@@ -1,21 +0,0 @@
package com.njcn.gather.event.transientes.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.njcn.gather.event.devcie.pojo.po.PqsDeptsline;
import com.njcn.gather.event.transientes.pojo.po.PqsUserSet;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
*
* Description:
* Date: 2025/06/19 下午 3:45【需求编号】
*
* @author clam
* @version V1.0.0
*/
public interface PqsDeptslineMapper extends BaseMapper<PqsDeptsline> {
List<PqsDeptsline> getPhoneUser(@Param("lineId")String lineId);
}

View File

@@ -1,14 +0,0 @@
package com.njcn.gather.event.transientes.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.njcn.gather.event.transientes.pojo.po.PqsDicData;
import com.njcn.gather.event.transientes.pojo.po.PqsDicTreePO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
public interface PqsDicDataMapper extends BaseMapper<PqsDicData> {
}

View File

@@ -1,16 +0,0 @@
package com.njcn.gather.event.transientes.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.njcn.gather.event.transientes.pojo.po.PqsDicTreePO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
public interface PqsDicTreeMapper extends BaseMapper<PqsDicTreePO> {
@Select("SELECT ID,NAME,CODE,PARENT_ID as parentId,level FROM PQS_DICTREE " +
"START WITH CODE = #{code} " +
"CONNECT BY PRIOR ID = PARENT_ID")
List<PqsDicTreePO> selectChildrenByCode(@Param("code") String code);
}

View File

@@ -1,21 +0,0 @@
package com.njcn.gather.event.transientes.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.njcn.gather.event.transientes.pojo.param.LargeScreenCountParam;
import com.njcn.gather.event.transientes.pojo.po.PqsEventdetail;
import com.njcn.gather.event.transientes.pojo.vo.EventDetailVO;
import org.apache.ibatis.annotations.Param;
import java.time.LocalDateTime;
import java.util.List;
/**
*
* Description:
* Date: 2025/06/20 上午 10:06【需求编号】
*
* @author clam
* @version V1.0.0
*/
public interface PqsEventdetailMapper extends BaseMapper<PqsEventdetail> {
}

View File

@@ -1,16 +0,0 @@
package com.njcn.gather.event.transientes.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.njcn.gather.event.transientes.pojo.po.PqsIntegrity;
import com.njcn.gather.event.transientes.pojo.po.PqsOnlinerate;
/**
*
* Description:
* Date: 2025/07/29 下午 6:40【需求编号】
*
* @author clam
* @version V1.0.0
*/
public interface PqsIntegrityMapper extends BaseMapper<PqsIntegrity> {
}

View File

@@ -1,15 +0,0 @@
package com.njcn.gather.event.transientes.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.njcn.gather.event.transientes.pojo.po.PqsOnlinerate;
/**
*
* Description:
* Date: 2025/07/29 下午 6:40【需求编号】
*
* @author clam
* @version V1.0.0
*/
public interface PqsOnlinerateMapper extends BaseMapper<PqsOnlinerate> {
}

View File

@@ -1,9 +0,0 @@
package com.njcn.gather.event.transientes.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.njcn.gather.event.transientes.pojo.po.PqsUser;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface PqsUserMapper extends BaseMapper<PqsUser> {
}

View File

@@ -1,13 +0,0 @@
package com.njcn.gather.event.transientes.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.njcn.gather.event.transientes.pojo.po.PqsUserSet;
/**
* @Author: cdf
* @CreateTime: 2025-06-24
* @Description:
*/
public interface PqsUserSetMapper extends BaseMapper<PqsUserSet> {
}

View File

@@ -1,28 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.njcn.gather.event.transientes.mapper.PqDevicedetailMapper">
<resultMap id="BaseResultMap" type="com.njcn.gather.event.devcie.pojo.po.PqDeviceDetail">
<!--@mbg.generated-->
<!--@Table PQ_DEVICEDETAIL-->
<id column="DEV_INDEX" jdbcType="DECIMAL" property="devIndex" />
<result column="MANUFACTURER" jdbcType="VARCHAR" property="manufacturer" />
<result column="CHECKFLAG" jdbcType="DECIMAL" property="checkflag" />
<result column="THISTIMECHECK" jdbcType="TIMESTAMP" property="thistimecheck" />
<result column="NEXTTIMECHECK" jdbcType="TIMESTAMP" property="nexttimecheck" />
<result column="ONLINERATETJ" jdbcType="DECIMAL" property="onlineratetj" />
<result column="DATAPLAN" jdbcType="DECIMAL" property="dataplan" />
<result column="NEWTRAFFIC" jdbcType="DECIMAL" property="newtraffic" />
<result column="ELECTROPLATE" jdbcType="DECIMAL" property="electroplate" />
<result column="ONTIME" jdbcType="DECIMAL" property="ontime" />
<result column="CONTRACT" jdbcType="VARCHAR" property="contract" />
<result column="SIM" jdbcType="VARCHAR" property="sim" />
<result column="DEV_CATENA" jdbcType="VARCHAR" property="devCatena" />
<result column="DEV_LOCATION" jdbcType="VARCHAR" property="devLocation" />
<result column="DEV_NO" jdbcType="VARCHAR" property="devNo" />
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
DEV_INDEX, MANUFACTURER, CHECKFLAG, THISTIMECHECK, NEXTTIMECHECK, ONLINERATETJ, DATAPLAN,
NEWTRAFFIC, ELECTROPLATE, ONTIME, CONTRACT, SIM, DEV_CATENA, DEV_LOCATION, DEV_NO
</sql>
</mapper>

View File

@@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.njcn.gather.event.transientes.mapper.PqUserLedgerMapper">
<select id="getUserByParam" resultType="PqUserLineAssPO">
select distinct b.line_index,a.CUSTOMER_NAME userName
from pq_user_ledger a inner join PQ_USER_LINE_ASS b on a.id = b.user_index
where b.line_index in
<foreach collection="lineIds" open="(" close=")" separator="," item="item">
#{item}
</foreach>
<if test="searchValue!=null and searchValue!=''">
and a.CUSTOMER_NAME LIKE '%' || #{searchValue} || '%'
</if>
</select>
</mapper>

View File

@@ -1,56 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.njcn.gather.event.transientes.mapper.PqsDeptsMapper">
<resultMap id="BaseResultMap" type="com.njcn.gather.event.transientes.pojo.po.PqsDepts">
<!--@mbg.generated-->
<!--@Table PQS_DEPTS-->
<id column="DEPTS_INDEX" jdbcType="VARCHAR" property="deptsIndex" />
<result column="DEPTSNAME" jdbcType="VARCHAR" property="deptsname" />
<result column="DEPTS_DESC" jdbcType="DECIMAL" property="deptsDesc" />
<result column="USER_INDEX" jdbcType="VARCHAR" property="userIndex" />
<result column="UPDATETIME" jdbcType="TIMESTAMP" property="updatetime" />
<result column="DEPTS_DESCRIPTION" jdbcType="VARCHAR" property="deptsDescription" />
<result column="STATE" jdbcType="DECIMAL" property="state" />
<result column="AREA" jdbcType="VARCHAR" property="area" />
<result column="CUSTOM_DEPT" jdbcType="DECIMAL" property="customDept" />
<result column="PARENTNODEID" jdbcType="VARCHAR" property="parentnodeid" />
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
DEPTS_INDEX, DEPTSNAME, DEPTS_DESC, USER_INDEX, UPDATETIME, DEPTS_DESCRIPTION, "STATE",
AREA, CUSTOM_DEPT, PARENTNODEID
</sql>
<select id="findDeptAndChildren" resultType="java.lang.String">
SELECT DEPTS_INDEX
FROM PQS_DEPTS
START WITH DEPTS_INDEX = #{deptId}
CONNECT BY PRIOR DEPTS_INDEX = PARENTNODEID
and state = 1
</select>
<select id="getDeptList" resultType="com.njcn.gather.event.devcie.pojo.dto.PqsDeptDTO">
SELECT
a.DEPTS_INDEX ,
a.DEPTSNAME ,
a.DEPTS_DESC ,
a.USER_INDEX ,
a.UPDATETIME ,
a.DEPTS_DESCRIPTION ,
a."STATE",
a.AREA,
a.CUSTOM_DEPT,
a.PARENTNODEID,
b.dic_name areaName
FROM
PQS_DEPTS a
LEFT JOIN PQS_DICDATA b ON a.AREA = b.DIC_INDEX
where a.STATE= 1
<if test="deptIds!= null and deptIds.size!=0">
and a.DEPTS_INDEX in
<foreach collection="deptIds" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
</if >
</select>
</mapper>

View File

@@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.njcn.gather.event.transientes.mapper.PqsDeptslineMapper">
<resultMap id="BaseResultMap" type="com.njcn.gather.event.devcie.pojo.po.PqsDeptsline">
<!--@mbg.generated-->
<!--@Table PQS_DEPTSLINE-->
<result column="DEPTS_INDEX" jdbcType="VARCHAR" property="deptsIndex" />
<result column="LINE_INDEX" jdbcType="DECIMAL" property="lineIndex" />
<result column="SYSTYPE" jdbcType="VARCHAR" property="systype" />
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
DEPTS_INDEX, LINE_INDEX, SYSTYPE
</sql>
<select id="getPhoneUser">
select *
from
PQS_DEPTSLINE deptLine
inner join PQS_DEPTS dept on deptLine.DEPTS_INDEX = DEPTS_INDEX
</select>
</mapper>

View File

@@ -1,57 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.njcn.gather.event.transientes.mapper.PqsEventdetailMapper">
<resultMap id="BaseResultMap" type="com.njcn.gather.event.transientes.pojo.po.PqsEventdetail">
<!--@mbg.generated-->
<!--@Table PQS_EVENTDETAIL-->
<id column="EVENTDETAIL_INDEX" jdbcType="VARCHAR" property="eventdetailIndex" />
<result column="LINEID" jdbcType="DECIMAL" property="lineid" />
<result column="TIMEID" jdbcType="TIMESTAMP" property="timeid" />
<result column="MS" jdbcType="DECIMAL" property="ms" />
<result column="DESCRIBE" jdbcType="VARCHAR" property="describe" />
<result column="WAVETYPE" jdbcType="DECIMAL" property="wavetype" />
<result column="PERSISTTIME" jdbcType="FLOAT" property="persisttime" />
<result column="EVENTVALUE" jdbcType="FLOAT" property="eventvalue" />
<result column="EVENTREASON" jdbcType="VARCHAR" property="eventreason" />
<result column="EVENTTYPE" jdbcType="VARCHAR" property="eventtype" />
<result column="EVENTASS_INDEX" jdbcType="VARCHAR" property="eventassIndex" />
<result column="DQTIME" jdbcType="FLOAT" property="dqtime" />
<result column="DEALTIME" jdbcType="TIMESTAMP" property="dealtime" />
<result column="DEALFLAG" jdbcType="DECIMAL" property="dealflag" />
<result column="NUM" jdbcType="DECIMAL" property="num" />
<result column="FILEFLAG" jdbcType="DECIMAL" property="fileflag" />
<result column="FIRSTTIME" jdbcType="TIMESTAMP" property="firsttime" />
<result column="FIRSTTYPE" jdbcType="VARCHAR" property="firsttype" />
<result column="FIRSTMS" jdbcType="DECIMAL" property="firstms" />
<result column="WAVENAME" jdbcType="VARCHAR" property="wavename" />
<result column="ENERGY" jdbcType="FLOAT" property="energy" />
<result column="SEVERITY" jdbcType="FLOAT" property="severity" />
<result column="LOOK_FLAG" jdbcType="DECIMAL" property="lookFlag" />
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
EVENTDETAIL_INDEX, LINEID, TIMEID, MS, "DESCRIBE", WAVETYPE, PERSISTTIME, EVENTVALUE,
EVENTREASON, EVENTTYPE, EVENTASS_INDEX, DQTIME, DEALTIME, DEALFLAG, NUM, FILEFLAG,
FIRSTTIME, FIRSTTYPE, FIRSTMS, WAVENAME, ENERGY, SEVERITY, LOOK_FLAG
</sql>
<!-- <select id="queryByCondition" resultType="com.njcn.gather.event.transientes.pojo.vo.EventDetailVO">-->
<!--&lt;!&ndash; SELECT * from( &ndash;&gt;-->
<!-- select * from PQS_EVENTDETAIL eve where eve.LINEID in-->
<!-- <foreach collection="deptslineIds" item="item" open="(" close=")" separator=",">-->
<!-- #{item}-->
<!-- </foreach>-->
<!-- and eve.TIMEID between TO_DATE( #{startTime},'YYYY-MM-DD HH24:MI:SS') and TO_DATE( #{endTime},'YYYY-MM-DD HH24:MI:SS')-->
<!-- <if test="eventtype != null and eventtype ==1">-->
<!-- and eve.NOTICE_FLAG =1-->
<!-- </if>-->
<!-- <if test="eventtype == null or eventtype ==0">-->
<!-- and (eve.NOTICE_FLAG =0 or eve.NOTICE_FLAG is null)-->
<!-- </if>-->
<!-- order by eve.NOTICE_FLAG asc NULLS FIRST , eve.TIMEID desc-->
<!--&lt;!&ndash; )&ndash;&gt;-->
<!--&lt;!&ndash; WHERE ROWNUM &lt;= 10;&ndash;&gt;-->
<!-- </select>-->
</mapper>

View File

@@ -1,16 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.njcn.gather.event.transientes.mapper.PqsOnlinerateMapper">
<resultMap id="BaseResultMap" type="com.njcn.gather.event.transientes.pojo.po.PqsOnlinerate">
<!--@mbg.generated-->
<!--@Table PQS_ONLINERATE-->
<id column="TIMEID" jdbcType="TIMESTAMP" property="timeid" />
<id column="DEV_INDEX" jdbcType="DECIMAL" property="devIndex" />
<result column="ONLINEMIN" jdbcType="DECIMAL" property="onlinemin" />
<result column="OFFLINEMIN" jdbcType="DECIMAL" property="offlinemin" />
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
TIMEID, DEV_INDEX, ONLINEMIN, OFFLINEMIN
</sql>
</mapper>

View File

@@ -1,24 +0,0 @@
package com.njcn.gather.event.transientes.pojo;
import lombok.Getter;
@Getter
public enum DicTreeEnum {
BJ_USER("BJ_USER","半导体及精密加工"),
OI_USER("OI_USER","其他敏感用户"),
OT_USER("OT_USER","其他干扰源用户"),
;
private final String code;
private final String dicName;
DicTreeEnum(String code, String dicName) {
this.code = code;
this.dicName = dicName;
}
}

View File

@@ -1,15 +0,0 @@
package com.njcn.gather.event.transientes.pojo.constant;
import lombok.Getter;
/**
* @Author: cdf
* @CreateTime: 2025-07-30
* @Description:
*/
public class RedisConstant {
public static final String REDIS_DEPT_INDEX ="LineCache:";
}

View File

@@ -1,66 +0,0 @@
package com.njcn.gather.event.transientes.pojo.param;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.njcn.web.pojo.param.BaseParam;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;
/**
* Description:
* Date: 2025/06/19 下午 3:38【需求编号】
*
* @author clam
* @version V1.0.0
*/
@Data
public class LargeScreenCountParam extends BaseParam {
@ApiModelProperty(name="deptId",value="部门id")
private String deptId;
@ApiModelProperty(name="type",value="类型1年 2季度 3月份 4周 5日")
private Integer type;
@ApiModelProperty(name="eventtype",value="类型0 暂降事件 1远程通知")
private Integer eventtype;
@ApiModelProperty(name="eventDeep",value="0.普通事件 1.严重事件 null.全部事件")
private Integer eventDeep;
@ApiModelProperty(name="t通讯状态",value="0.离线 1.在线")
private String state;
private Integer sendResult;
@JsonFormat(pattern = "yyyy-MM-dd")
private LocalDate startTime;
@JsonFormat(pattern = "yyyy-MM-dd")
private LocalDate endTime;
@ApiModelProperty(value = "字典树 对象大类")
private String bigObjType;
@ApiModelProperty(value = "字典树 对象大小")
private String smallObjType;
private List<String> eventIds;
private Integer gdIndex;
private Integer bdId;
private String devName;
private Float eventValueMin;
private Float eventValueMax;
private Float eventDurationMin;
private Float eventDurationMax;
@ApiModelProperty(value = "导出标识")
private Boolean exportFlag = false;
}

View File

@@ -1,38 +0,0 @@
package com.njcn.gather.event.transientes.pojo.param;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.time.LocalDate;
/**
* @Author: cdf
* @CreateTime: 2025-06-26
* @Description:
*/
@Data
public class MessageEventFeedbackParam {
@NotBlank(message = "暂降事件id不可为空")
private String eventIndex;
@NotNull(message = "是否影响敏感用户不可为空")
@ApiModelProperty(value = " 0.否 1.是")
private Integer isSensitive;
@ApiModelProperty(value = "方案")
private String influenceFactors;
@DateTimeFormat(pattern = "yyyy-MM-dd")
@ApiModelProperty(value = "处理时间")
private LocalDate dealDate;
@ApiModelProperty(value = "原因")
private String dealScheme;
private String remark;
}

View File

@@ -1,30 +0,0 @@
package com.njcn.gather.event.transientes.pojo.param;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
/**
* <监测点波形入参>
*
* @author wr
* @createTime: 2023-03-23
*/
@Data
public class MonitorTerminalParam {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "id")
@NotBlank(message = "id不能为空")
private String id;
@ApiModelProperty(value = "区分主配网0:主网 1:配网)")
@NotNull(message = "区分类别不能为空")
private Integer type;
@ApiModelProperty(value = "区分系统0:pq 1:pms")
@NotNull(message = "区分系统不能为空")
private Integer systemType;
}

View File

@@ -1,51 +0,0 @@
package com.njcn.gather.event.transientes.pojo.param;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;
/**
* @Author: cdf
* @CreateTime: 2025-07-01
* @Description:
*/
@Data
public class MsgEventConfigParam {
/**
* 主键ID
*/
private String id;
/**
* 严重通知标识
*/
@NotNull(message = "严重通知标识不可为空")
private Integer seriousNotice;
/**
* 普通通知标识
*/
@NotNull(message = "普通通知标识不可为空")
private Integer normalNotic;
/**
* 语音类型
*/
@NotNull(message = "语音类型不可为空")
private Integer voiceType;
/**
* 屏幕通知标识
*/
@NotNull(message = "屏幕通知标识不可为空")
private Integer screenNotic;
@NotBlank(message = "事件类型不可为空")
private List<Integer> eventTypeList;
}

View File

@@ -1,50 +0,0 @@
package com.njcn.gather.event.transientes.pojo.param;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.njcn.web.pojo.param.BaseParam;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* @Author: cdf
* @CreateTime: 2025-07-28
* @Description:
*/
@Data
public class PqUserLedgerParam extends BaseParam {
private static final long serialVersionUID = 1L;
private String id;
private String powerSupplyArea;
private String customerName;
private String electricityAddress;
private String industryType;
private String voltageLevel;
private String importantLevel;
private String substationName;
private String busbarName;
private String operationUnit;
private String manufacturer;
private String bigObjType;
private String smallObjType;
private Integer isShow;
}

View File

@@ -1,21 +0,0 @@
package com.njcn.gather.event.transientes.pojo.param;
import lombok.Data;
import javax.validation.constraints.NotBlank;
/**
* @Author: cdf
* @CreateTime: 2025-07-01
* @Description:
*/
@Data
public class SimulationMsgParam {
@NotBlank(message = "号码不可为空")
private String phone;
@NotBlank(message = "短信内容不可为空")
private String msg;
}

View File

@@ -1,35 +0,0 @@
package com.njcn.gather.event.transientes.pojo.po;
/**
* @Author: cdf
* @CreateTime: 2025-06-26
* @Description: 暂降远程通知反馈
*/
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.util.Date;
@Data
@TableName("MSG_EVENT_FEEDBACK")
public class MessageEventFeedback {
@TableId(type = IdType.INPUT)
private String id;
private String eventIndex;
private Integer isSensitive;
private String influenceFactors;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date dealDate;
private String dealScheme;
private String remark;
}

View File

@@ -1,85 +0,0 @@
package com.njcn.gather.event.transientes.pojo.po;
/**
* @Author: cdf
* @CreateTime: 2025-06-27
* @Description:
*/
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.List;
import lombok.Data;
import lombok.ToString;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
/**
* MSG_EVENT_CONFIG表实体类
*/
@Data
@TableName("MSG_EVENT_CONFIG")
@ToString
public class MsgEventConfig implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键ID
*/
@TableId("ID")
private String id;
/**
* 严重通知标识
*/
@TableField("SERIOUS_NOTICE")
@NotNull(message = "严重通知标识不可为空")
private Integer seriousNotice;
/**
* 普通通知标识
*/
@TableField("NORMAL_NOTIC")
@NotNull(message = "普通通知标识不可为空")
private Integer normalNotic;
/**
* 语音类型
*/
@TableField("VOICE_TYPE")
@NotNull(message = "语音类型不可为空")
private Integer voiceType;
/**
* 屏幕通知标识
*/
@TableField("SCREEN_NOTIC")
@NotNull(message = "屏幕通知标识不可为空")
private Integer screenNotic;
/**
* 暂降类型,以逗号隔开
*/
private String eventType;
/**
* 暂降残余电压告警阈值
*/
private Float eventValue;
/**
* 暂降持续时间告警阈值
*/
private Integer eventDuration;
@NotEmpty(message = "事件类型不可为空")
@TableField(exist = false)
private List<String> eventTypeList;
}

View File

@@ -1,68 +0,0 @@
package com.njcn.gather.event.transientes.pojo.po;
/**
* @Author: cdf
* @CreateTime: 2025-06-25
* @Description:
*/
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;
/**
* 消息事件信息实体
*/
@Data
@TableName("MSG_EVENT_INFO")
public class MsgEventInfo implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 消息索引
*/
private String msgIndex;
/**
* 用户ID
*/
private String userId;
private String userName;
/**
* 发送时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime sendTime;
/**
* 消息内容
*/
private String msgContent;
/**
* 事件索引
*/
private String eventIndex;
/**
* 手机号
*/
private String phone;
/**
* 发送结果
*/
private Integer sendResult;
/**
* 是否反馈
*/
private Integer isHandle;
}

View File

@@ -1,94 +0,0 @@
//package com.njcn.gather.event.transientes.pojo.po;
//
//import com.baomidou.mybatisplus.annotation.IdType;
//import com.baomidou.mybatisplus.annotation.TableField;
//import com.baomidou.mybatisplus.annotation.TableId;
//import com.baomidou.mybatisplus.annotation.TableName;
//import java.time.LocalDateTime;
//import lombok.Data;
//import lombok.NoArgsConstructor;
//
///**
// *
// * Description:
// * Date: 2025/06/19 下午 1:47【需求编号】
// *
// * @author clam
// * @version V1.0.0
// */
///**
// * 靠靠靠?
// */
//@Data
//@NoArgsConstructor
//@TableName(value = "PQ_DEVICEDETAIL")
//public class PqDevicedetail {
// /**
// * 靠靠
// */
// @TableId(value = "DEV_INDEX", type = IdType.INPUT)
// private Integer devIndex;
//
// /**
// * (靠PQS_Dicdata)靠靠縂uid
// */
// @TableField(value = "MANUFACTURER")
// private String manufacturer;
//
// /**
// * 靠靠(0:靠 1:靠)
// */
// @TableField(value = "CHECKFLAG")
// private Integer checkflag;
//
// /**
// * 靠靠靠
// */
// @TableField(value = "THISTIMECHECK")
// private LocalDateTime thistimecheck;
//
// /**
// * 靠靠靠(靠靠靠靠靠3靠靠靠靠靠靠靠)
// */
// @TableField(value = "NEXTTIMECHECK")
// private LocalDateTime nexttimecheck;
//
// /**
// * 靠靠靠?
// */
// @TableField(value = "ONLINERATETJ")
// private Integer onlineratetj;
//
// @TableField(value = "DATAPLAN")
// private Integer dataplan;
//
// @TableField(value = "NEWTRAFFIC")
// private Integer newtraffic;
//
// @TableField(value = "ELECTROPLATE")
// private Integer electroplate;
//
// @TableField(value = "ONTIME")
// private Integer ontime;
//
// /**
// * 合同
// */
// @TableField(value = "CONTRACT")
// private String contract;
//
// /**
// * sim卡号
// */
// @TableField(value = "SIM")
// private String sim;
//
// @TableField(value = "DEV_CATENA")
// private String devCatena;
//
// @TableField(value = "DEV_LOCATION")
// private String devLocation;
//
// @TableField(value = "DEV_NO")
// private String devNo;
//}

View File

@@ -1,110 +0,0 @@
package com.njcn.gather.event.transientes.pojo.po;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.njcn.gather.event.transientes.pojo.vo.EventDetailVO;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;
/**
* @Author: cdf
* @CreateTime: 2025-07-28
* @Description:
*/
@Data
@TableName(value = "pq_user_ledger")
public class PqUserLedgerPO implements Serializable {
private static final long serialVersionUID = 1L;
@TableId
@TableField(value = "id")
private String id;
@TableField(value = "POWER_SUPPLY_AREA")
private String powerSupplyArea;
@TableField(value = "CUSTOMER_NAME")
private String customerName;
@TableField(value = "ELECTRICITY_ADDRESS")
private String electricityAddress;
@TableField(value = "INDUSTRY_TYPE")
private String industryType;
@TableField(value = "VOLTAGE_LEVEL")
private String voltageLevel;
@TableField(value = "IMPORTANT_LEVEL")
private String importantLevel;
@TableField(value = "SUBSTATION_NAME")
private String substationName;
@TableField(value = "BUSBAR_NAME")
private String busbarName;
@TableField(value = "OPERATION_UNIT")
private String operationUnit;
@TableField(value = "MANUFACTURER")
private String manufacturer;
@TableField(value = "BIG_OBJ_TYPE")
private String bigObjType;
@TableField(value = "SMALL_OBJ_TYPE")
private String smallObjType;
/**
* 设备或对象的分类小类
*/
@TableField(value = "CREATE_BY")
private String createBy;
@TableField(value = "UPDATE_BY")
private String updateBy;
/**
* 创建时间(自动填充)
*/
@TableField(value = "CREATE_TIME")
private LocalDateTime createTime;
/**
* 更新时间(自动填充)
*/
@TableField(value = "UPDATE_TIME")
private LocalDateTime updateTime;
@TableField(value = "IS_SHOW")
private Integer isShow;
@TableField(exist = false)
private Integer eventCount = 0;
@TableField(exist = false)
private List<String> eventIds;
@TableField(exist = false)
private String deptName;
@TableField(exist = false)
private String gdName;
@TableField(exist = false)
private String station;
@TableField(exist = false)
private String info;
@TableField(exist = false)
private List<PqsEventdetail> eventList;
}

View File

@@ -1,26 +0,0 @@
package com.njcn.gather.event.transientes.pojo.po;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
/**
* @Author: cdf
* @CreateTime: 2025-07-28
* @Description:
*/
@Data
@TableName(value = "pq_user_line_ass")
public class PqUserLineAssPO {
@TableField(value = "USER_INDEX")
private String userIndex;
@TableField(value = "LINE_INDEX")
private Integer lineIndex;
@TableField(exist = false)
private String userName;
}

View File

@@ -1,79 +0,0 @@
package com.njcn.gather.event.transientes.pojo.po;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.time.LocalDateTime;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
*
* Description:
* Date: 2025/06/19 下午 3:57【需求编号】
*
* @author clam
* @version V1.0.0
*/
/**
* 部门表
*/
@Data
@NoArgsConstructor
@TableName(value = "PQS_DEPTS")
public class PqsDepts {
/**
* 部门表Guid
*/
@TableId(value = "DEPTS_INDEX", type = IdType.INPUT)
private String deptsIndex;
/**
* 部门名称
*/
@TableField(value = "DEPTSNAME")
private String deptsname;
/**
* 排序
*/
@TableField(value = "DEPTS_DESC")
private Integer deptsDesc;
/**
* 关联表PQS_User用户表Guid
*/
@TableField(value = "USER_INDEX")
private String userIndex;
/**
* 更新时间
*/
@TableField(value = "UPDATETIME")
private LocalDateTime updatetime;
/**
* 部门描述
*/
@TableField(value = "DEPTS_DESCRIPTION")
private String deptsDescription;
/**
* 角色状态0删除1正常
*/
@TableField(value = "\"STATE\"")
private Integer state;
/**
* 行政区域
*/
@TableField(value = "AREA")
private String area;
@TableField(value = "CUSTOM_DEPT")
private Integer customDept;
@TableField(value = "PARENTNODEID")
private String parentnodeid;
}

View File

@@ -1,49 +0,0 @@
package com.njcn.gather.event.transientes.pojo.po;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.util.Date;
/**
* CN_Gather
*
* @author cdf
* @date 2025/8/12
*/
@TableName(value = "PQS_DICDATA")
@Data
public class PqsDicData {
@TableId
@TableField(value = "DIC_INDEX")
private String dicIndex;
@TableField(value = "DIC_NAME")
private String dicName;
@TableField(value = "DIC_TYPE")
private String dicType;
@TableField(value = "DIC_NUMBER")
private Integer dicNumber;
@TableField(value = "UPDATETIME")
private Date updateTime;
@TableField(value = "USER_INDEX")
private String userIndex;
//事件等级
@TableField(value = "DIC_LEAVE")
private Integer dicLeave;
@TableField(value = "STATE")
private Integer state;
@TableField(value = "TRIPHASE")
private Integer triphase;
@TableField(value = "BACK_UP")
private String backUp;}

View File

@@ -1,48 +0,0 @@
package com.njcn.gather.event.transientes.pojo.po;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.util.Date;
/**
* @Author: cdf
* @CreateTime: 2025-07-28
* @Description:
*/
@Data
@TableName(value = "PQS_DICTREE")
public class PqsDicTreePO {
@TableId // 标记主键字段
@TableField(value ="ID") // 显式指定列名(默认按字段名映射,可省略)
private String id;
@TableField(value ="NAME")
private String name;
@TableField(value ="CODE")
private String code;
@TableField(value ="PARENT_ID")
private String parentId;
@TableField(value ="DIC_VALUE")
private String dicValue;
@TableField(value ="CREATE_BY")
private String createBy;
@TableField(value ="CREATE_TIME")
private Date createTime;
@TableField(value ="UPDATE_BY")
private String updateBy;
@TableField(value ="UPDATE_TIME")
private Date updateTime;
@TableField(exist = false)
private Integer level;
}

View File

@@ -1,108 +0,0 @@
package com.njcn.gather.event.transientes.pojo.po;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
*
* Description:
* Date: 2025/06/20 上午 10:06【需求编号】
*
* @author clam
* @version V1.0.0
*/
@Data
@NoArgsConstructor
@TableName(value = "PQS_EVENTDETAIL")
public class PqsEventdetail {
@TableId(value = "EVENTDETAIL_INDEX", type = IdType.INPUT)
private String eventdetailIndex;
@TableField(value = "LINEID")
private Integer lineid;
@TableField(value = "TIMEID")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime timeid;
@TableField(value = "MS")
private BigDecimal ms;
@TableField(value = "\"DESCRIBE\"")
private String describe;
@TableField(value = "WAVETYPE")
private Integer wavetype;
@TableField(value = "PERSISTTIME")
private Double persisttime;
@TableField(value = "EVENTVALUE")
private Double eventvalue;
@TableField(value = "EVENTREASON")
private String eventreason;
@TableField(value = "EVENTTYPE")
private String eventtype;
@TableField(value = "EVENTASS_INDEX")
private String eventassIndex;
@TableField(value = "DQTIME")
private Double dqtime;
@TableField(value = "DEALTIME")
private LocalDateTime dealtime;
@TableField(value = "DEALFLAG")
private Integer dealflag;
@TableField(value = "NUM")
private BigDecimal num;
@TableField(value = "FILEFLAG")
private Integer fileflag;
@TableField(value = "FIRSTTIME")
private LocalDateTime firsttime;
@TableField(value = "FIRSTTYPE")
private String firsttype;
@TableField(value = "FIRSTMS")
private BigDecimal firstms;
@TableField(value = "WAVENAME")
private String wavename;
@TableField(value = "ENERGY")
private Double energy;
@TableField(value = "SEVERITY")
private Double severity;
@TableField(value = "LOOK_FLAG")
private Integer lookFlag;
@TableField(value = "NOTICE_FLAG")
private Integer noticeFlag;
@TableField(exist = false)
private Integer eventSeverity;
@TableField(exist = false)
private String stationName;
@TableField(exist = false)
private String busBarName;
}

View File

@@ -1,35 +0,0 @@
package com.njcn.gather.event.transientes.pojo.po;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.time.LocalDate;
import java.util.Date;
/**
* CN_Gather
*
* @author cdf
* @date 2025/8/9
*/
@TableName(value="PQS_INTEGRITY")
@Data
public class PqsIntegrity {
@TableField(value="TIMEID")
private LocalDate timeID;
@TableField(value="Line_index")
private Integer lineIndex;
@TableField(value="due")
private Integer due;
@TableField(value="real")
private Integer real;
}

View File

@@ -1,34 +0,0 @@
package com.njcn.gather.event.transientes.pojo.po;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.time.LocalDateTime;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
*
* Description:
* Date: 2025/07/29 下午 6:40【需求编号】
*
* @author clam
* @version V1.0.0
*/
@Data
@NoArgsConstructor
@TableName(value = "PQS_ONLINERATE")
public class PqsOnlinerate {
@TableField(value = "TIMEID" )
private LocalDateTime timeid;
@TableField(value = "DEV_INDEX")
private Integer devIndex;
@TableField(value = "ONLINEMIN")
private Integer onlinemin;
@TableField(value = "OFFLINEMIN")
private Integer offlinemin;
}

View File

@@ -1,58 +0,0 @@
package com.njcn.gather.event.transientes.pojo.po;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import java.util.Date;
/**
* @Author: cdf
* @CreateTime: 2025-06-26
* @Description:
*/
@Data
@TableName("PQS_USER")
public class PqsUser {
@TableId(type = IdType.INPUT)
private String userIndex;
private String name;
private String loginname;
private String password;
private String phone;
private String email;
@TableField(fill = FieldFill.INSERT)
private Date registertime;
private Date psdvalidity;
private Date logintime;
private Integer state;
private Integer mark;
private String limitIpstart;
private String limitIpend;
private String limitTime;
private Integer loginErrorTimes;
@TableField("CASUAL_USER")
private Integer casualUser;
private Date firsterrorTime;
private Date lockTime;
private String referralCode;
}

View File

@@ -1,49 +0,0 @@
package com.njcn.gather.event.transientes.pojo.po;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
/**
* @Author: cdf
* @CreateTime: 2025-06-24
* @Description:
*/
@Data
@TableName("PQS_USERSET")
public class PqsUserSet implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 用户设置索引
*/
@TableId("USERSET_INDEX")
private String usersetIndex;
/**
* 用户索引
*/
@TableField("USER_INDEX")
private String userIndex;
/**
* 是否通知(0-否,1-是)
*/
@TableField("ISNOTICE")
private Integer isNotice;
/**
* 角色组索引
*/
@TableField("ROLEGP_INDEX")
private String roleGpIndex;
/**
* 部门索引
*/
@TableField("DEPTS_INDEX")
private String deptsIndex;
}

View File

@@ -1,42 +0,0 @@
package com.njcn.gather.event.transientes.pojo.vo;
import com.njcn.gather.event.transientes.pojo.po.MsgEventInfo;
import com.njcn.gather.event.transientes.pojo.po.PqsEventdetail;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
* Description:
* Date: 2025/06/20 上午 9:29【需求编号】
*
* @author clam
* @version V1.0.0
*/
@Data
public class AlarmAnalysisVO {
@ApiModelProperty(name="eventCount",value="暂降次数")
private Integer eventCount;
@ApiModelProperty(name="aLarmCount",value="告警事件统计")
private Integer aLarmCount;
@ApiModelProperty(name="warnCount",value="预警事件统计")
private Integer warnCount;
@ApiModelProperty(name="noticeCount",value="远程通知统计")
private Integer noticeCount;
@ApiModelProperty(name="lookALarmCount",value="告警事件处置数")
private Integer lookALarmCount;
@ApiModelProperty(name="lookWarnCount",value="预警事件处置数")
private Integer lookWarnCount;
@ApiModelProperty(name="lookNoticeCount",value="远程通知处置数")
private Integer lookNoticeCount;
List<EventDetailVO> eventdetails;
List<EventDetailVO> aLarmEvent;
List<EventDetailVO> warnEvent;
List<MsgEventInfo> noticeEvent;
List<EventDetailVO> lookALarmEvent;
List<EventDetailVO> lookWarnEvent;
List<MsgEventInfo> lookNoticeEvent;
}

View File

@@ -1,18 +0,0 @@
package com.njcn.gather.event.transientes.pojo.vo;
import lombok.Data;
/**
* Description:
* Date: 2025/07/28 上午 8:50【需求编号】
*
* @author clam
* @version V1.0.0
*/
@Data
public class DeviceCountVO {
private Integer allCount;
private Integer onLine;
private Integer offLine;
}

View File

@@ -1,54 +0,0 @@
package com.njcn.gather.event.transientes.pojo.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.njcn.gather.event.transientes.pojo.po.MsgEventInfo;
import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;
/**
* Description:
* Date: 2025/06/20 下午 2:50【需求编号】
*
* @author clam
* @version V1.0.0
*/
@Data
public class EventDetailVO {
private String eventdetail_index;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime timeid;
private BigDecimal ms;
private String wavetype;
private Double eventvalue;
private Integer lookFlag;
private Integer noticeFlag;
private Integer lineid;
private String pointname;
private String gdName;
private String busName;
private String devName;
private String persisttime;
private String bdname;
private String objName;
private Integer needDealFlag;
private long msgEventInfoSize;
//1告警2预警
private Integer eventSeverity;
}

View File

@@ -1,35 +0,0 @@
package com.njcn.gather.event.transientes.pojo.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.njcn.gather.event.transientes.pojo.po.MsgEventInfo;
import lombok.Data;
import java.util.Date;
import java.util.List;
/**
* @Author: cdf
* @CreateTime: 2025-06-26
* @Description: 暂降远程通知详情
*/
@Data
public class EventMsgDetailVO {
private String eventIndex;
private Integer isSensitive;
private String influenceFactors;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date dealDate;
private String dealScheme;
private String remark;
private String objName;
private List<MsgEventInfo> msgList;
}

View File

@@ -1,18 +0,0 @@
package com.njcn.gather.event.transientes.pojo.vo;
import lombok.Data;
import java.time.LocalDate;
/**
* Description:
* Date: 2025/06/20 上午 11:33【需求编号】
*
* @author clam
* @version V1.0.0
*/
@Data
public class EventTrendVO {
private LocalDate localDate;
private Integer eventCount;
}

View File

@@ -1,31 +0,0 @@
package com.njcn.gather.event.transientes.pojo.vo;
import com.njcn.gather.event.devcie.pojo.dto.DeviceDTO;
import com.njcn.gather.event.devcie.pojo.dto.LedgerBaseInfoDTO;
import com.njcn.gather.event.devcie.pojo.dto.SubstationDTO;
import lombok.Data;
import java.util.List;
/**
* Description:
* Date: 2025/06/19 下午 3:06【需求编号】
*
* @author clam
* @version V1.0.0
*/
@Data
public class LedgerCountVO {
private long allSubCount;
private long allDevCount;
private long allLineCount;
private long runDevCount;
private long runSubCount;
private long runLineCount;
private List<SubstationDTO> allSubList;
private List<DeviceDTO> allDevList;
private List<LedgerBaseInfoDTO> allLineList;
}

View File

@@ -1,30 +0,0 @@
package com.njcn.gather.event.transientes.pojo.vo;
import com.njcn.gather.event.devcie.pojo.dto.LedgerBaseInfoDTO;
import com.njcn.gather.event.devcie.pojo.po.PqLine;
import com.njcn.gather.event.transientes.pojo.po.MsgEventInfo;
import com.njcn.gather.event.transientes.pojo.po.PqsEventdetail;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
/**
* Description:
* Date: 2025/06/26 上午 8:50【需求编号】
*
* @author clam
* @version V1.0.0
*/
@Data
public class MapCountVO {
private String deptsIndex;
private String deptsName;
private Integer lineCount;
private Integer eventCount;
private Integer noticeCount;
private List<LedgerBaseInfoDTO> lineList = new ArrayList<>();
private List<EventDetailVO> eventList = new ArrayList<>();
private List<MsgEventInfo> noticeList = new ArrayList<>();
}

Some files were not shown because too many files have changed in this diff Show More