Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
package com.njcn.algorithm.pojo.param;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2023/3/27 10:18【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* 项目拓扑图关系表
|
||||
*/
|
||||
@Data
|
||||
public class AppLineTopologyDiagramAddParm {
|
||||
/**
|
||||
* 拓扑图Id
|
||||
*/
|
||||
@ApiModelProperty(value="拓扑图Id")
|
||||
@NotBlank(message="拓扑图Id不能为空!")
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 监测点ID
|
||||
*/
|
||||
@ApiModelProperty(value="监测点ID")
|
||||
@NotBlank(message="监测点ID不能为空!")
|
||||
private String lineId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.njcn.algorithm.pojo.param;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2023/3/27 10:18【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* 项目拓扑图关系表
|
||||
*/
|
||||
@Data
|
||||
public class AppLineTopologyDiagramAuditParm {
|
||||
/**
|
||||
* 拓扑图Id
|
||||
*/
|
||||
@ApiModelProperty(value="拓扑图Id")
|
||||
@NotBlank(message="拓扑图Id不能为空!")
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 监测点ID
|
||||
*/
|
||||
@ApiModelProperty(value="监测点ID")
|
||||
@NotBlank(message="监测点ID不能为空!")
|
||||
private String lineId;
|
||||
|
||||
/**
|
||||
* 0:删除 1:正常
|
||||
*/
|
||||
@ApiModelProperty(value="删除标志位")
|
||||
private String status;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,122 @@
|
||||
package com.njcn.algorithm.pojo.param;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2023/3/30 16:23【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* 设备出厂表
|
||||
*/
|
||||
@Data
|
||||
public class CsEquipmentDeliveryAddParm{
|
||||
|
||||
|
||||
/**
|
||||
* 装置名称
|
||||
*/
|
||||
@ApiModelProperty(value="装置名称")
|
||||
@NotBlank(message="装置名称不能为空!")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 网关识别码
|
||||
*/
|
||||
@ApiModelProperty(value="网关识别码")
|
||||
@NotBlank(message="网关识别码不能为空!")
|
||||
private String ndid;
|
||||
|
||||
/**
|
||||
* 装置mac地址
|
||||
*/
|
||||
@ApiModelProperty(value="装置mac地址")
|
||||
@NotBlank(message="装置mac地址不能为空!")
|
||||
private String mac;
|
||||
|
||||
/**
|
||||
* 装置用途(治理、监测...)
|
||||
*/
|
||||
@ApiModelProperty(value="装置用途")
|
||||
@NotBlank(message="装置用途不能为空!")
|
||||
private String devUse;
|
||||
|
||||
/**
|
||||
* 装置类型(直连设备、网关设备)
|
||||
*/
|
||||
@ApiModelProperty(value="装置类型")
|
||||
@NotBlank(message="装置类型不能为空!")
|
||||
private String devType;
|
||||
|
||||
/**
|
||||
* 装置型号(pqs588、pqs680...)
|
||||
*/
|
||||
@ApiModelProperty(value="装置型号")
|
||||
@NotBlank(message="装置型号不能为空!")
|
||||
private String devModel;
|
||||
|
||||
/**
|
||||
* 装置程序版本
|
||||
*/
|
||||
@ApiModelProperty(value="装置程序版本")
|
||||
@NotBlank(message="装置程序版本不能为空!")
|
||||
private String programVersion;
|
||||
|
||||
/**
|
||||
* 调试人员
|
||||
*/
|
||||
@ApiModelProperty(value="调试人员")
|
||||
@NotBlank(message="调试人员不能为空!")
|
||||
private String debugPerson;
|
||||
|
||||
/**
|
||||
* 出厂日期
|
||||
*/
|
||||
@ApiModelProperty(value="出厂日期")
|
||||
@NotNull(message="出厂日期不能为空!")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
|
||||
private Date producteTime;
|
||||
|
||||
/**
|
||||
* 检修日期
|
||||
*/
|
||||
@ApiModelProperty(value="检修日期")
|
||||
@NotNull(message="检修日期不能为空!")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
|
||||
private Date checkTime;
|
||||
|
||||
/**
|
||||
* 调试日期
|
||||
*/
|
||||
@ApiModelProperty(value="调试日期")
|
||||
@NotNull(message="调试日期不能为空!")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
|
||||
private Date debugTime;
|
||||
|
||||
/**
|
||||
* 合同号
|
||||
*/
|
||||
@ApiModelProperty(value="合同号")
|
||||
private String cntractNo;
|
||||
|
||||
/**
|
||||
* 营销经理
|
||||
*/
|
||||
@ApiModelProperty(value="营销经理")
|
||||
private String salesManager;
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -28,9 +28,9 @@ public class AppLineTopologyDiagramPO extends BaseEntity {
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 拓扑图名称
|
||||
* 监测点ID
|
||||
*/
|
||||
@TableField(value = "line_id")
|
||||
@MppMultiId(value = "line_id")
|
||||
private String lineId;
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,116 @@
|
||||
package com.njcn.algorithm.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2023/3/30 16:23【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
/**
|
||||
* 设备出厂表
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "cs_equipment_delivery")
|
||||
public class CsEquipmentDeliveryPO extends BaseEntity {
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableField(value = "id")
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 装置名称
|
||||
*/
|
||||
@TableField(value = "name")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 网关识别码
|
||||
*/
|
||||
@TableField(value = "ndid")
|
||||
private String ndid;
|
||||
|
||||
/**
|
||||
* 装置mac地址
|
||||
*/
|
||||
@TableField(value = "mac")
|
||||
private String mac;
|
||||
|
||||
/**
|
||||
* 装置用途(治理、监测...)
|
||||
*/
|
||||
@TableField(value = "dev_use")
|
||||
private String devUse;
|
||||
|
||||
/**
|
||||
* 装置类型(直连设备、网关设备)
|
||||
*/
|
||||
@TableField(value = "dev_type")
|
||||
private String devType;
|
||||
|
||||
/**
|
||||
* 装置型号(pqs588、pqs680...)
|
||||
*/
|
||||
@TableField(value = "dev_model")
|
||||
private String devModel;
|
||||
|
||||
/**
|
||||
* 装置程序版本
|
||||
*/
|
||||
@TableField(value = "program_version")
|
||||
private String programVersion;
|
||||
|
||||
/**
|
||||
* 调试人员
|
||||
*/
|
||||
@TableField(value = "debug_person")
|
||||
private String debugPerson;
|
||||
|
||||
/**
|
||||
* 出厂日期
|
||||
*/
|
||||
@TableField(value = "producte_time")
|
||||
private Date producteTime;
|
||||
|
||||
/**
|
||||
* 检修日期
|
||||
*/
|
||||
@TableField(value = "check_time")
|
||||
private Date checkTime;
|
||||
|
||||
/**
|
||||
* 调试日期
|
||||
*/
|
||||
@TableField(value = "debug_time")
|
||||
private Date debugTime;
|
||||
|
||||
/**
|
||||
* 合同号
|
||||
*/
|
||||
@TableField(value = "cntract_no")
|
||||
private String cntractNo;
|
||||
|
||||
/**
|
||||
* 营销经理
|
||||
*/
|
||||
@TableField(value = "sales_manager")
|
||||
private String salesManager;
|
||||
|
||||
/**
|
||||
* 状态(0:删除 1:正常)
|
||||
*/
|
||||
@TableField(value = "status")
|
||||
private Integer status;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.njcn.algorithm.controller.Equipment;
|
||||
|
||||
import com.njcn.algorithm.pojo.param.CsEquipmentDeliveryAddParm;
|
||||
import com.njcn.algorithm.service.CsEquipmentDeliveryService;
|
||||
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.common.utils.HttpResultUtil;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2023/3/27 15:31【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/EquipmentDelivery")
|
||||
@Api(tags = " 出厂设备")
|
||||
@AllArgsConstructor
|
||||
public class EquipmentDeliveryController extends BaseController {
|
||||
|
||||
private final CsEquipmentDeliveryService csEquipmentDeliveryService;
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/addEquipmentDelivery")
|
||||
@ApiOperation("新增出厂设备")
|
||||
@ApiImplicitParam(name = "csEquipmentDeliveryAddParm", value = "新增项目参数", required = true)
|
||||
public HttpResult<Boolean> addEquipmentDelivery(@RequestBody @Validated CsEquipmentDeliveryAddParm csEquipmentDeliveryAddParm){
|
||||
String methodDescribe = getMethodDescribe("addEquipmentDelivery");
|
||||
|
||||
Boolean flag = csEquipmentDeliveryService.save (csEquipmentDeliveryAddParm);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, flag, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/AuditEquipmentDelivery")
|
||||
@ApiOperation("删除出厂设备")
|
||||
public HttpResult<Boolean> AuditEquipmentDelivery(@RequestParam("id")String id ){
|
||||
String methodDescribe = getMethodDescribe("AuditEquipmentDelivery");
|
||||
|
||||
Boolean flag = csEquipmentDeliveryService.AuditEquipmentDelivery(id);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, flag, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -1,9 +1,24 @@
|
||||
package com.njcn.algorithm.controller.project;
|
||||
|
||||
import com.njcn.algorithm.pojo.param.AppLineTopologyDiagramAddParm;
|
||||
import com.njcn.algorithm.pojo.param.AppLineTopologyDiagramAuditParm;
|
||||
import com.njcn.algorithm.pojo.po.AppLineTopologyDiagramPO;
|
||||
import com.njcn.algorithm.service.AppLineTopologyDiagramService;
|
||||
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.common.utils.HttpResultUtil;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@@ -22,5 +37,31 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@AllArgsConstructor
|
||||
public class LineTopologyDiagramController extends BaseController {
|
||||
|
||||
private AppLineTopologyDiagramService appLineTopologyDiagramService;
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/addLineDiagram")
|
||||
@ApiOperation("新增拓扑图-监测点绑定")
|
||||
@ApiImplicitParam(name = "appLineTopologyDiagramAddParm", value = "新增拓扑图参数", required = true)
|
||||
public HttpResult<Boolean> addLineDiagram(@RequestBody @Validated AppLineTopologyDiagramAddParm appLineTopologyDiagramAddParm){
|
||||
String methodDescribe = getMethodDescribe("addLineDiagram");
|
||||
AppLineTopologyDiagramPO appLineTopologyDiagramPO = new AppLineTopologyDiagramPO();
|
||||
BeanUtils.copyProperties (appLineTopologyDiagramAddParm,appLineTopologyDiagramPO);
|
||||
appLineTopologyDiagramPO.setStatus ("1");
|
||||
Boolean flag = appLineTopologyDiagramService.save (appLineTopologyDiagramPO);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, flag, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/auditLineDiagram")
|
||||
@ApiOperation("修改/删除拓扑图-监测点绑定")
|
||||
@ApiImplicitParam(name = "appLineTopologyDiagramAuditParm", value = "修改/删除拓扑图参数", required = true)
|
||||
public HttpResult<Boolean> auditLineDiagram(@RequestBody@Validated AppLineTopologyDiagramAuditParm appLineTopologyDiagramAuditParm){
|
||||
String methodDescribe = getMethodDescribe("auditLineDiagram");
|
||||
AppLineTopologyDiagramPO appLineTopologyDiagramPO = new AppLineTopologyDiagramPO();
|
||||
BeanUtils.copyProperties (appLineTopologyDiagramAuditParm,appLineTopologyDiagramPO);
|
||||
Boolean flag = appLineTopologyDiagramService.update (appLineTopologyDiagramPO,null);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, flag, methodDescribe);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.njcn.algorithm.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.algorithm.pojo.po.CsEquipmentDeliveryPO;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2023/3/30 16:23【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
public interface CsEquipmentDeliveryMapper extends BaseMapper<CsEquipmentDeliveryPO> {
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?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.algorithm.mapper.CsEquipmentDeliveryMapper">
|
||||
<resultMap id="BaseResultMap" type="com.njcn.algorithm.pojo.po.CsEquipmentDeliveryPO">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table cs_equipment_delivery-->
|
||||
<result column="id" jdbcType="VARCHAR" property="id" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="ndid" jdbcType="VARCHAR" property="ndid" />
|
||||
<result column="mac" jdbcType="VARCHAR" property="mac" />
|
||||
<result column="dev_use" jdbcType="VARCHAR" property="devUse" />
|
||||
<result column="dev_type" jdbcType="VARCHAR" property="devType" />
|
||||
<result column="dev_model" jdbcType="VARCHAR" property="devModel" />
|
||||
<result column="program_version" jdbcType="VARCHAR" property="programVersion" />
|
||||
<result column="debug_person" jdbcType="VARCHAR" property="debugPerson" />
|
||||
<result column="producte_time" jdbcType="TIMESTAMP" property="producteTime" />
|
||||
<result column="check_time" jdbcType="TIMESTAMP" property="checkTime" />
|
||||
<result column="debug_time" jdbcType="TIMESTAMP" property="debugTime" />
|
||||
<result column="cntract_no" jdbcType="VARCHAR" property="cntractNo" />
|
||||
<result column="sales_manager" jdbcType="VARCHAR" property="salesManager" />
|
||||
<result column="status" jdbcType="INTEGER" property="status" />
|
||||
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
id, `name`, ndid, mac, dev_use, dev_type, dev_model, program_version, debug_person,
|
||||
producte_time, check_time, debug_time, cntract_no, sales_manager, `status`, create_by,
|
||||
create_time, update_by, update_time
|
||||
</sql>
|
||||
</mapper>
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.njcn.algorithm.service;
|
||||
|
||||
import com.njcn.algorithm.pojo.param.CsEquipmentDeliveryAddParm;
|
||||
import com.njcn.algorithm.pojo.po.CsEquipmentDeliveryPO;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2023/3/30 16:23【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
public interface CsEquipmentDeliveryService extends IService<CsEquipmentDeliveryPO>{
|
||||
|
||||
/**
|
||||
* @Description: save
|
||||
* @Param: [csEquipmentDeliveryAddParm]
|
||||
* @return: java.lang.Boolean
|
||||
* @Author: clam
|
||||
* @Date: 2023/3/31
|
||||
*/
|
||||
Boolean save(CsEquipmentDeliveryAddParm csEquipmentDeliveryAddParm);
|
||||
/**
|
||||
* @Description: AuditEquipmentDelivery
|
||||
* @Param: [id]
|
||||
* @return: java.lang.Boolean
|
||||
* @Author: clam
|
||||
* @Date: 2023/3/31
|
||||
*/
|
||||
Boolean AuditEquipmentDelivery(String id);
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.njcn.algorithm.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.njcn.algorithm.mapper.CsEquipmentDeliveryMapper;
|
||||
import com.njcn.algorithm.pojo.param.CsEquipmentDeliveryAddParm;
|
||||
import com.njcn.algorithm.pojo.po.CsEquipmentDeliveryPO;
|
||||
import com.njcn.algorithm.service.CsEquipmentDeliveryService;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2023/3/30 16:23【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Service
|
||||
public class CsEquipmentDeliveryServiceImpl extends ServiceImpl<CsEquipmentDeliveryMapper, CsEquipmentDeliveryPO> implements CsEquipmentDeliveryService{
|
||||
|
||||
@Override
|
||||
public Boolean save(CsEquipmentDeliveryAddParm csEquipmentDeliveryAddParm) {
|
||||
CsEquipmentDeliveryPO csEquipmentDeliveryPO = new CsEquipmentDeliveryPO();
|
||||
|
||||
BeanUtils.copyProperties (csEquipmentDeliveryAddParm,csEquipmentDeliveryPO);
|
||||
csEquipmentDeliveryPO.setStatus (1);
|
||||
boolean save = this.save (csEquipmentDeliveryPO);
|
||||
return save;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean AuditEquipmentDelivery(String id) {
|
||||
UpdateWrapper<CsEquipmentDeliveryPO> wrapper = new UpdateWrapper();
|
||||
wrapper.eq ("id", id);
|
||||
wrapper.set ("status", "1");
|
||||
boolean update = this.update (wrapper);
|
||||
return update;
|
||||
}
|
||||
}
|
||||
@@ -64,7 +64,8 @@ public class Knife4jSwaggerConfig {
|
||||
"com.njcn.energy.controller",
|
||||
"com.njcn.quality.controller",
|
||||
"com.njcn.process.controller",
|
||||
"com.njcn.advance.controller"
|
||||
"com.njcn.advance.controller",
|
||||
"com.njcn.algorithm.controller"
|
||||
)
|
||||
.collect(Collectors.toList());
|
||||
List<GrantType> grantTypes = new ArrayList<>();
|
||||
|
||||
@@ -87,7 +87,7 @@ public class ComAssesUtil {
|
||||
if (getBysxf()) {
|
||||
//G和F得出综合权重A
|
||||
if (getZhqzf()) {
|
||||
//A[0] = 0.28;A[1] = 0.23;A[2] = 0.13;A[3] = 0.16;A[4] = 0.08;A[5] = 0.12;
|
||||
A[0] = 0.28f;A[1] = 0.23f;A[2] = 0.13f;A[3] = 0.16f;A[4] = 0.08f;A[5] = 0.12f;
|
||||
for (i = 0; i < GRADE_NUM; i++) {
|
||||
B[i] = 0;
|
||||
for (j = 0; j < ST_QT_NUM; j++) {
|
||||
|
||||
@@ -22,5 +22,9 @@
|
||||
<artifactId>common-device-biz</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.jeffreyning</groupId>
|
||||
<artifactId>mybatisplus-plus</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
||||
@@ -1,21 +1,13 @@
|
||||
package com.njcn.device.pq.pojo.param;
|
||||
|
||||
import com.njcn.common.pojo.constant.PatternRegex;
|
||||
import com.njcn.common.pojo.dto.SimpleDTO;
|
||||
import com.njcn.device.biz.enums.LineFlagEnum;
|
||||
import com.njcn.web.constant.ValidMessage;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.hibernate.validator.constraints.Range;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
import javax.validation.constraints.Pattern;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @version 1.0.0
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.njcn.device.pq.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
@@ -23,8 +24,10 @@ public class RStatIntegrityD {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@MppMultiId
|
||||
private LocalDateTime timeId;
|
||||
|
||||
@MppMultiId
|
||||
private String lineIndex;
|
||||
|
||||
private Integer dueTime;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.njcn.device.pq.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
@@ -21,9 +22,9 @@ import lombok.Setter;
|
||||
public class RStatOnlinerateD extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@MppMultiId
|
||||
private LocalDateTime timeId;
|
||||
|
||||
@MppMultiId
|
||||
private String devIndex;
|
||||
|
||||
private Integer onlineMin;
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.njcn.device.pq.pojo.vo;
|
||||
|
||||
import com.njcn.device.pq.pojo.param.MonitoringPointScaleParam;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @version 1.0.0
|
||||
* @author: zbj
|
||||
* @date: 2023/03/31
|
||||
*/
|
||||
@Data
|
||||
public class AreaDownVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 部门信息
|
||||
*/
|
||||
@ApiModelProperty("部门信息")
|
||||
private List<MonitoringPointScaleParam> param;
|
||||
|
||||
}
|
||||
@@ -53,7 +53,7 @@ public class LargeScreenController extends BaseController {
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getLoadType")
|
||||
@ApiOperation("监测点规模(负荷类型)")
|
||||
@ApiImplicitParam(name = "getLoadType", value = "监测点规模(负荷类型)", required = true)
|
||||
@ApiImplicitParam(name = "largeScreenParam", value = "监测点规模(负荷类型)", required = true)
|
||||
public HttpResult<MonitoringPointScaleVO> getLoadType(@RequestBody @Validated LargeScreenParam largeScreenParam) {
|
||||
String methodDescribe = getMethodDescribe("getLoadType");
|
||||
MonitoringPointScaleVO result = largeScreenService.getLoadType(largeScreenParam);
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.njcn.device.pq.controller;
|
||||
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
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.common.LogEnum;
|
||||
@@ -12,14 +13,23 @@ import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.common.utils.LogUtil;
|
||||
import com.njcn.device.pq.enums.DeviceResponseEnum;
|
||||
import com.njcn.device.pq.mapper.LineDetailMapper;
|
||||
import com.njcn.device.pq.mapper.LineMapper;
|
||||
import com.njcn.device.pq.mapper.OverlimitMapper;
|
||||
import com.njcn.device.pq.mapper.VoltageMapper;
|
||||
import com.njcn.device.pq.pojo.bo.DeviceType;
|
||||
import com.njcn.device.pq.pojo.bo.excel.TerminalBaseExcel;
|
||||
import com.njcn.device.pq.pojo.param.*;
|
||||
import com.njcn.device.pq.pojo.po.Line;
|
||||
import com.njcn.device.pq.pojo.po.LineDetail;
|
||||
import com.njcn.device.pq.pojo.po.Overlimit;
|
||||
import com.njcn.device.pq.pojo.po.Voltage;
|
||||
import com.njcn.device.pq.pojo.vo.TerminalBaseVO;
|
||||
import com.njcn.device.pq.pojo.vo.TerminalVO;
|
||||
import com.njcn.device.pq.service.TerminalBaseService;
|
||||
import com.njcn.poi.util.PoiUtil;
|
||||
import com.njcn.system.api.DicDataFeignClient;
|
||||
import com.njcn.system.pojo.po.DictData;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@@ -31,6 +41,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
import java.util.ArrayList;
|
||||
@@ -54,6 +65,22 @@ public class TerminalBaseController extends BaseController {
|
||||
private final TerminalBaseService terminalBaseService;
|
||||
|
||||
|
||||
|
||||
private final LineDetailMapper lineDetailMapper;
|
||||
|
||||
|
||||
private final OverlimitMapper overlimitMapper;
|
||||
|
||||
|
||||
private final DicDataFeignClient dicDataFeignClient;
|
||||
|
||||
|
||||
private final LineMapper lineMapper;
|
||||
|
||||
|
||||
private final VoltageMapper voltageMapper;
|
||||
|
||||
|
||||
/**
|
||||
* 终端新增操作
|
||||
*
|
||||
@@ -272,4 +299,37 @@ public class TerminalBaseController extends BaseController {
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 重新计算限值
|
||||
*
|
||||
* @author cdf
|
||||
* @date 2022/5/17
|
||||
*/
|
||||
@ApiOperation("监测点-重新计算限值")
|
||||
@GetMapping(value = "updatePqOverLimit")
|
||||
public HttpResult<Integer> updatePqOverLimit() {
|
||||
String methodDescribe = getMethodDescribe("updatePqOverLimit");
|
||||
|
||||
List<LineDetail> lineDetailList = lineDetailMapper.selectList(new LambdaQueryWrapper<>());
|
||||
|
||||
int count = 0;
|
||||
for(LineDetail lineDetail:lineDetailList){
|
||||
overlimitMapper.deleteById(lineDetail.getId());
|
||||
Line line = lineMapper.selectById(lineDetail.getId());
|
||||
if(Objects.nonNull(line)) {
|
||||
Voltage voltage = voltageMapper.selectById(line.getPid());
|
||||
//监测点限值
|
||||
HttpResult<DictData> scaleResult = dicDataFeignClient.getDicDataById(voltage.getScale());
|
||||
if (Objects.isNull(scaleResult.getData())) {
|
||||
throw new BusinessException(CommonResponseEnum.DIC_DATA);
|
||||
}
|
||||
Overlimit overlimit = new Overlimit(line.getId(), scaleResult.getData().getName(), lineDetail.getShortCapacity(), lineDetail.getStandardCapacity(), lineDetail.getDealCapacity(), lineDetail.getDevCapacity());
|
||||
overlimitMapper.insert(overlimit);
|
||||
count++;
|
||||
}
|
||||
}
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, count, methodDescribe);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ public class LogManageServiceImpl implements LogManageService {
|
||||
if (!CollectionUtils.isEmpty(eventDetailData)) {
|
||||
for (EventPushLogs pushLogs: eventPushLogs) {
|
||||
for (EventDetail eventDetail: eventDetailData) {
|
||||
if (pushLogs.getLineId().equals(eventDetail.getLineId()) && pushLogs.getTimeId().equals(eventDetail.getTimeId())) {
|
||||
if (pushLogs.getLineId().equals(eventDetail.getLineId()) && pushLogs.getTimeId().equals(eventDetail.getStartTime())) {
|
||||
EventLogVO event = logManageMapper.getEventLogData(pushLogs.getLineId());
|
||||
if (Objects.isNull(event)) {
|
||||
continue;
|
||||
@@ -119,11 +119,11 @@ public class LogManageServiceImpl implements LogManageService {
|
||||
eventLogVO.setLine(event.getLine());
|
||||
eventLogVO.setSubstation(event.getSubstation());
|
||||
eventLogVO.setPowerCompany(event.getPowerCompany());
|
||||
Double e = eventDetail.getEventValue();
|
||||
Double e = eventDetail.getFeatureAmplitude();
|
||||
BigDecimal bd = new BigDecimal(e);
|
||||
e= bd.setScale(2, BigDecimal.ROUND_DOWN).doubleValue();
|
||||
eventLogVO.setEventValue(String.valueOf(e*100));
|
||||
double i = eventDetail.getPersistTime() / 1000;
|
||||
double i = eventDetail.getDuration() / 1000;
|
||||
eventLogVO.setPersistTime(String.valueOf(i));
|
||||
eventLogVO.setCreatTime(pushLogs.getCreateTime());
|
||||
eventLogVO.setCreatTimed(pushLogs.getCreateTime());
|
||||
|
||||
@@ -45,7 +45,7 @@ public class TransientParam extends DeviceInfoParam.BusinessParam {
|
||||
private BigDecimal severityMin;
|
||||
|
||||
@ApiModelProperty("触发类型")
|
||||
private List<Integer> waveType;
|
||||
private List<String> waveType;
|
||||
|
||||
@ApiModelProperty("暂降原因")
|
||||
private List<String> eventReason;
|
||||
|
||||
@@ -1,14 +1,17 @@
|
||||
package com.njcn.event.pojo.po;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.datatype.jsr310.ser.InstantSerializer;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.influxdb.annotation.Column;
|
||||
import org.influxdb.annotation.Measurement;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.Instant;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.ZoneId;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
* @author denghuajun
|
||||
@@ -20,81 +23,90 @@ import java.time.Instant;
|
||||
@Measurement(name = "pqs_eventdetail")
|
||||
public class EventDetail {
|
||||
|
||||
@Column(name = "line_id")
|
||||
private String lineId;
|
||||
@Column(name = "line_id")
|
||||
private String lineId;
|
||||
|
||||
@Column(name = "time")
|
||||
@JsonSerialize(using = InstantSerializer.class)
|
||||
private Instant timeId;
|
||||
@Column(name = "time")
|
||||
@ApiModelProperty(value = "开始时间")
|
||||
@JsonSerialize(using = InstantSerializer.class)
|
||||
private Instant startTime;
|
||||
|
||||
@Column(name = "event_describe")
|
||||
private String eventDescribe;
|
||||
@Column(name = "event_describe")
|
||||
@ApiModelProperty(value = "事件描述")
|
||||
private String eventDescribe;
|
||||
|
||||
@Column(name = "wave_type")
|
||||
private Integer waveType;
|
||||
@Column(name = "wave_type")
|
||||
@ApiModelProperty(value = "统计类型")
|
||||
private String eventType;
|
||||
|
||||
@Column(name = "persist_time")
|
||||
private Double persistTime;
|
||||
@Column(name = "persist_time")
|
||||
@ApiModelProperty(value = "持续时间,单位秒")
|
||||
private Double duration;
|
||||
|
||||
@Column(name = "event_value")
|
||||
private Double eventValue;
|
||||
@Column(name = "event_value")
|
||||
@ApiModelProperty(value = "特征幅值")
|
||||
private Double featureAmplitude;
|
||||
|
||||
@Column(name = "event_reason")
|
||||
private String eventReason;
|
||||
@Column(name = "event_reason")
|
||||
@ApiModelProperty(value = "暂降原因(Event_Reason)")
|
||||
private String advanceReason;
|
||||
|
||||
@Column(name = "event_type")
|
||||
private String eventType;
|
||||
@Column(name = "event_type")
|
||||
@ApiModelProperty(value = "暂降类型(Event_Type)")
|
||||
private String advanceType;
|
||||
|
||||
@Column(name = "eventass_index")
|
||||
private String eventassIndex;
|
||||
@Column(name = "eventass_index")
|
||||
private String eventassIndex;
|
||||
|
||||
@Column(name = "dq_time")
|
||||
private Integer dqTime;
|
||||
@Column(name = "dq_time")
|
||||
private Integer dqTime;
|
||||
|
||||
@Column(name = "deal_time")
|
||||
private String dealTime;
|
||||
@Column(name = "deal_time")
|
||||
private String dealTime;
|
||||
|
||||
@Column(name = "deal_flag")
|
||||
private Integer dealFlag;
|
||||
@Column(name = "deal_flag")
|
||||
private Integer dealFlag;
|
||||
|
||||
@Column(name = "num")
|
||||
private Integer num;
|
||||
@Column(name = "num")
|
||||
private Integer num;
|
||||
|
||||
@Column(name = "file_flag")
|
||||
private Integer fileFlag;
|
||||
@Column(name = "file_flag")
|
||||
private Integer fileFlag;
|
||||
|
||||
@Column(name = "first_time")
|
||||
private String firstTime;
|
||||
@Column(name = "first_time")
|
||||
private String firstTime;
|
||||
|
||||
@Column(name = "first_type")
|
||||
private String firstType;
|
||||
@Column(name = "first_type")
|
||||
private String firstType;
|
||||
|
||||
@Column(name = "first_ms")
|
||||
private Integer firstMs;
|
||||
@Column(name = "first_ms")
|
||||
private Integer firstMs;
|
||||
|
||||
@Column(name = "wave_name")
|
||||
private String waveName;
|
||||
@Column(name = "wave_name")
|
||||
@ApiModelProperty(value = "波形路径")
|
||||
private String wavePath;
|
||||
|
||||
@Column(name = "energy")
|
||||
private Double energy;
|
||||
@Column(name = "energy")
|
||||
private Double energy;
|
||||
|
||||
@Column(name = "severity")
|
||||
private Double severity;
|
||||
@Column(name = "severity")
|
||||
private Double severity;
|
||||
|
||||
@Column(name = "sagsource")
|
||||
private String sagSource;
|
||||
@Column(name = "sagsource")
|
||||
private String sagSource;
|
||||
|
||||
@Column(name = "create_time")
|
||||
private String createTime;
|
||||
@Column(name = "create_time")
|
||||
private String createTime;
|
||||
|
||||
private String lineName;
|
||||
private String lineName;
|
||||
|
||||
private BigDecimal lat;
|
||||
private BigDecimal lat;
|
||||
|
||||
private BigDecimal lng;
|
||||
private BigDecimal lng;
|
||||
|
||||
private String gdName;
|
||||
private String gdName;
|
||||
|
||||
private String subName;
|
||||
|
||||
private String subName;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.njcn.event.pojo.po;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.influxdb.annotation.Column;
|
||||
import org.influxdb.annotation.Measurement;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@@ -13,87 +13,98 @@ import java.math.BigDecimal;
|
||||
*/
|
||||
|
||||
@Data
|
||||
@Measurement(name = "pqs_eventdetail")
|
||||
//@Measurement(name = "pqs_eventdetail")
|
||||
public class EventDetailNew {
|
||||
|
||||
@Column(name = "line_id")
|
||||
private String lineId;
|
||||
@Column(name = "line_id")
|
||||
private String lineId;
|
||||
|
||||
@Column(name = "time")
|
||||
private String timeId;
|
||||
@Column(name = "time")
|
||||
@ApiModelProperty(value = "开始时间")
|
||||
private String startTime;
|
||||
|
||||
@Column(name = "event_describe")
|
||||
private String eventDescribe;
|
||||
@Column(name = "event_describe")
|
||||
@ApiModelProperty(value = "事件描述")
|
||||
private String eventDescribe;
|
||||
|
||||
@Column(name = "wave_type")
|
||||
private String waveType;
|
||||
@Column(name = "wave_type")
|
||||
@ApiModelProperty(value = "统计类型")
|
||||
private String eventType;
|
||||
|
||||
@Column(name = "persist_time")
|
||||
private Double persistTime;
|
||||
@Column(name = "persist_time")
|
||||
@ApiModelProperty(value = "持续时间,单位秒")
|
||||
private Double duration;
|
||||
|
||||
@Column(name = "event_value")
|
||||
private Double eventValue;
|
||||
@Column(name = "event_value")
|
||||
@ApiModelProperty(value = "特征幅值")
|
||||
private Double featureAmplitude;
|
||||
|
||||
@Column(name = "event_reason")
|
||||
private String eventReason;
|
||||
@Column(name = "event_reason")
|
||||
@ApiModelProperty(value = "暂降原因(Event_Reason)")
|
||||
private String advanceReason;
|
||||
|
||||
@Column(name = "event_type")
|
||||
private String eventType;
|
||||
@Column(name = "event_type")
|
||||
@ApiModelProperty(value = "暂降类型(Event_Type)")
|
||||
private String advanceType;
|
||||
|
||||
@Column(name = "eventass_index")
|
||||
private String eventassIndex;
|
||||
@Column(name = "eventass_index")
|
||||
private String eventassIndex;
|
||||
|
||||
@Column(name = "dq_time")
|
||||
private Integer dqTime;
|
||||
@Column(name = "dq_time")
|
||||
private Integer dqTime;
|
||||
|
||||
@Column(name = "deal_time")
|
||||
private String dealTime;
|
||||
@Column(name = "deal_time")
|
||||
private String dealTime;
|
||||
|
||||
@Column(name = "deal_flag")
|
||||
private Integer dealFlag;
|
||||
@Column(name = "deal_flag")
|
||||
private Integer dealFlag;
|
||||
|
||||
@Column(name = "num")
|
||||
private Integer num;
|
||||
@Column(name = "num")
|
||||
private Integer num;
|
||||
|
||||
@Column(name = "file_flag")
|
||||
private Integer fileFlag;
|
||||
@Column(name = "file_flag")
|
||||
private Integer fileFlag;
|
||||
|
||||
@Column(name = "first_time")
|
||||
private String firstTime;
|
||||
@Column(name = "first_time")
|
||||
private String firstTime;
|
||||
|
||||
@Column(name = "first_type")
|
||||
private String firstType;
|
||||
@Column(name = "first_type")
|
||||
private String firstType;
|
||||
|
||||
@Column(name = "first_ms")
|
||||
private Integer firstMs;
|
||||
@Column(name = "first_ms")
|
||||
private Integer firstMs;
|
||||
|
||||
@Column(name = "wave_name")
|
||||
private String waveName;
|
||||
@Column(name = "wave_name")
|
||||
@ApiModelProperty(value = "波形路径")
|
||||
private String wavePath;
|
||||
|
||||
@Column(name = "energy")
|
||||
private Double energy;
|
||||
@Column(name = "energy")
|
||||
private Double energy;
|
||||
|
||||
@Column(name = "severity")
|
||||
private Double severity;
|
||||
@Column(name = "severity")
|
||||
private Double severity;
|
||||
|
||||
@Column(name = "sagsource")
|
||||
private String sagSource;
|
||||
@Column(name = "sagsource")
|
||||
private String sagSource;
|
||||
|
||||
@Column(name = "create_time")
|
||||
private String createTime;
|
||||
@Column(name = "create_time")
|
||||
private String createTime;
|
||||
|
||||
private String lineName;
|
||||
private String lineName;
|
||||
|
||||
private BigDecimal lat;
|
||||
private BigDecimal lat;
|
||||
|
||||
private BigDecimal lng;
|
||||
private BigDecimal lng;
|
||||
|
||||
private String gdName;
|
||||
private String gdName;
|
||||
|
||||
private String subName;
|
||||
private String subName;
|
||||
|
||||
private String ip;
|
||||
private String ip;
|
||||
|
||||
private String scale;
|
||||
private String scale;
|
||||
|
||||
@ApiModelProperty(value = "暂时事件ID")
|
||||
private String eventId;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.njcn.event.pojo.po;
|
||||
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
@@ -10,15 +9,12 @@ import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.influxdb.annotation.Column;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* (RMpEventDetail)实体类
|
||||
* (influxdb 转 mysql 专用)实体类
|
||||
*
|
||||
* @author yzh
|
||||
* @since 2022-10-12 18:34:55
|
||||
@@ -37,12 +33,20 @@ public class RmpEventDetailPO implements Serializable {
|
||||
@ApiModelProperty(value = "监测点ID")
|
||||
private String measurementPointId;
|
||||
|
||||
@ApiModelProperty(value = "事件类型")
|
||||
@ApiModelProperty(value = "监测点ID(复制)")
|
||||
@TableField("measurement_point_id")
|
||||
private String lineId;
|
||||
|
||||
@ApiModelProperty(value = "统计类型")
|
||||
private String eventType;
|
||||
|
||||
@ApiModelProperty(value = "暂降原因(字典表PQS_Dicdata)")
|
||||
@TableField("Event_Reason")
|
||||
private String eventReason;
|
||||
@ApiModelProperty(value = "暂降原因(Event_Reason)")
|
||||
@TableField("advance_reason")
|
||||
private String advanceReason;
|
||||
|
||||
@ApiModelProperty(value = "暂降类型(Event_Type)")
|
||||
@TableField("advance_type")
|
||||
private String advanceType;
|
||||
|
||||
@ApiModelProperty(value = "事件关联分析表Guid")
|
||||
private String eventassIndex;
|
||||
@@ -82,7 +86,8 @@ public class RmpEventDetailPO implements Serializable {
|
||||
|
||||
@ApiModelProperty(value = "开始时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss.SSS",timezone = "GMT+8")
|
||||
private Date startTime;
|
||||
private String startTime;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "持续时间,单位秒")
|
||||
private Double duration;
|
||||
@@ -99,14 +104,10 @@ public class RmpEventDetailPO implements Serializable {
|
||||
@ApiModelProperty(value = "波形路径")
|
||||
private String wavePath;
|
||||
|
||||
@ApiModelProperty(value = "波形名称")
|
||||
@TableField("wave_path")
|
||||
private String waveName;
|
||||
|
||||
private String phasicType;
|
||||
|
||||
private Double transientValue;
|
||||
|
||||
private String createTime;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -130,7 +130,7 @@ public class WaveTypeVO{
|
||||
private String eventDescribe;
|
||||
|
||||
@Column(name = "wave_type")
|
||||
private Integer waveType;
|
||||
private String waveType;
|
||||
|
||||
@Column(name = "persist_time")
|
||||
private Double persistTime;
|
||||
|
||||
@@ -21,7 +21,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 区域统计
|
||||
* 区域概览
|
||||
*
|
||||
* @author : zhaojun
|
||||
* @version : 1.0.0
|
||||
@@ -30,7 +30,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/areaStatistics")
|
||||
@Api(tags = "区域统计")
|
||||
@Api(tags = "区域概览")
|
||||
@AllArgsConstructor
|
||||
public class AreaStatisticalController extends BaseController {
|
||||
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.njcn.event.controller.majornetwork;
|
||||
|
||||
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.common.utils.HttpResultUtil;
|
||||
import com.njcn.device.pq.pojo.param.LargeScreenParam;
|
||||
import com.njcn.device.pq.pojo.vo.AreaDownVO;
|
||||
import com.njcn.device.pq.pojo.vo.MonitoringPointScaleVO;
|
||||
|
||||
import com.njcn.event.service.majornetwork.LargeScreenService;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
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.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* @version 1.0.0
|
||||
* @author: zbj
|
||||
* @date: 2023/03/31
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "大屏")
|
||||
@RestController
|
||||
@RequestMapping("/largeScreen")
|
||||
@RequiredArgsConstructor
|
||||
public class LargeScreenController extends BaseController {
|
||||
|
||||
private final LargeScreenService largeScreenService;
|
||||
|
||||
/**
|
||||
* 监测点规模
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getAreaDownStatistics")
|
||||
@ApiOperation("区域暂降统计")
|
||||
@ApiImplicitParam(name = "largeScreenParam", value = "区域暂降统计", required = true)
|
||||
public HttpResult<AreaDownVO> getAreaDownStatistics(@RequestBody @Validated LargeScreenParam largeScreenParam) {
|
||||
String methodDescribe = getMethodDescribe("getAreaDownStatistics");
|
||||
AreaDownVO result = largeScreenService.getAreaDownStatistics(largeScreenParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
}
|
||||
@@ -156,7 +156,7 @@ public class PqsEventDetailQuery extends QueryBuilder {
|
||||
*/
|
||||
public static BiFunction<DateTime, DateTime, List<EventDetail>> getBetweenTimeEventDetailList(List<EventDetail> eventDetailList) {
|
||||
return (beginTime, endTime) -> eventDetailList.stream().filter(eventDetail -> {
|
||||
Instant timeId = eventDetail.getTimeId();
|
||||
Instant timeId = eventDetail.getStartTime();
|
||||
return timeId.isAfter(beginTime.toInstant()) && timeId.isBefore(endTime.toInstant());
|
||||
}).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.njcn.event.mapper.majornetwork;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @version 1.0.0
|
||||
* @author: zbj
|
||||
* @date: 2023/03/31
|
||||
*/
|
||||
public interface LargeScreenMapper {
|
||||
|
||||
Map<String, Object> selectDownCount(@Param("lineIds") List<String> lineIds, @Param("startTime") String startTime, @Param("endTime") String endTime);
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
<?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.event.mapper.majornetwork.LargeScreenMapper">
|
||||
|
||||
<select id="selectDownCount" resultType="java.util.Map">
|
||||
select
|
||||
count(ed.event_id) "count"
|
||||
from r_mp_event_detail ed
|
||||
left join sys_dict_data dd on ed.event_type and dd.Type_Id ='c37861896dafab0883321e1d508caa51'
|
||||
where
|
||||
ed.measurement_point_id in
|
||||
<foreach collection="lineIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
<if test="startTime != null and startTime != ''">
|
||||
and date_format(pl.Create_Time,'%y%m%d') >= date_format(#{startTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="endTime != null and endTime != ''">
|
||||
and date_format(pl.Create_Time,'%y%m%d') <= date_format(#{endTime},'%y%m%d')
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -341,10 +341,11 @@ public class PwEventCategoryDetailsServiceImpl implements PwEventCategoryDetails
|
||||
eventFeatureAmplitudeCurve.setFeatureAmplitude(dto.getFeatureAmplitude());
|
||||
eventFeatureAmplitudeCurve.setDuration(dto.getDuration());
|
||||
|
||||
Instant instant = dto.getStartTime().toInstant();
|
||||
ZoneId zoneId = ZoneId.systemDefault();
|
||||
|
||||
eventFeatureAmplitudeCurve.setStartTime(LocalDateTime.ofInstant(instant, zoneId));
|
||||
// Instant instant = dto.getStartTime().toInstant();
|
||||
// ZoneId zoneId = ZoneId.systemDefault();
|
||||
//
|
||||
// eventFeatureAmplitudeCurve.setStartTime(LocalDateTime.ofInstant(instant, zoneId));
|
||||
eventFeatureAmplitudeCurve.setStartTime(LocalDateTime.parse( dto.getStartTime()));
|
||||
|
||||
return eventFeatureAmplitudeCurve;
|
||||
})
|
||||
|
||||
@@ -37,5 +37,5 @@ public interface EventDetailService extends IService<RmpEventDetailPO> {
|
||||
/**
|
||||
* 根据监测点集合以及分页信息获取暂降事件
|
||||
*/
|
||||
List<EventDetail> getEventDetailLimit(List<String> lineIndexes, String startTime, String endTime, Integer pageSize, Integer pageNum, List<Integer> waveType);
|
||||
List<EventDetail> getEventDetailLimit(List<String> lineIndexes, String startTime, String endTime, Integer pageSize, Integer pageNum, List<String> waveType);
|
||||
}
|
||||
@@ -1,6 +1,12 @@
|
||||
package com.njcn.event.service.majornetwork.Impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.nacos.shaded.org.checkerframework.checker.units.qual.C;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import com.njcn.device.pq.api.GeneralDeviceInfoClient;
|
||||
import com.njcn.device.pq.api.LineFeignClient;
|
||||
import com.njcn.device.pq.pojo.dto.GeneralDeviceDTO;
|
||||
@@ -8,14 +14,18 @@ import com.njcn.device.pq.pojo.param.DeviceInfoParam;
|
||||
import com.njcn.device.pq.pojo.vo.AreaLineInfoVO;
|
||||
import com.njcn.event.influxdb.PqsEventDetailQuery;
|
||||
import com.njcn.event.pojo.po.EventDetail;
|
||||
import com.njcn.event.pojo.po.RStatEventY;
|
||||
import com.njcn.event.pojo.po.RmpEventDetailPO;
|
||||
import com.njcn.event.pojo.vo.AreaAnalysisVO;
|
||||
import com.njcn.event.pojo.vo.VoltageToleranceCurveVO;
|
||||
import com.njcn.event.pojo.vo.VoltageToleranceCurveVO.VoltageToleranceCurveDataList;
|
||||
import com.njcn.event.service.majornetwork.AreaAnalysisService;
|
||||
import com.njcn.event.service.majornetwork.EventDetailService;
|
||||
import com.njcn.system.api.DicDataFeignClient;
|
||||
import com.njcn.system.enums.DicDataTypeEnum;
|
||||
import com.njcn.system.pojo.po.DictData;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.Value;
|
||||
import org.influxdb.querybuilder.clauses.Clause;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -45,7 +55,7 @@ public class AreaAnalysisServiceImpl implements AreaAnalysisService {
|
||||
|
||||
private final LineFeignClient lineFeignClient;
|
||||
private final PqsEventDetailQuery pqsEventDetailQuery;
|
||||
|
||||
private final EventDetailService eventDetailService;
|
||||
@Override
|
||||
public AreaAnalysisVO getEventReason(DeviceInfoParam.BusinessParam deviceInfoParam) {
|
||||
AreaAnalysisVO areaAnalysisVO = new AreaAnalysisVO();
|
||||
@@ -55,7 +65,17 @@ public class AreaAnalysisServiceImpl implements AreaAnalysisService {
|
||||
List<GeneralDeviceDTO> generalDeviceDTOList = generalDeviceInfoClient.getPracticalAllDeviceInfo(deviceInfoParam).getData();
|
||||
List<String> lineIds = getAllLineIdList(generalDeviceDTOList);
|
||||
|
||||
List<AreaAnalysisVO.Children> reasonList = assData(dicReasonList, lineIds, deviceInfoParam.getSearchBeginTime(), deviceInfoParam.getSearchEndTime(), "event_reason");
|
||||
//查询数据
|
||||
// List<AreaAnalysisVO.Children> reasonList = assData(dicReasonList, lineIds, deviceInfoParam.getSearchBeginTime(), deviceInfoParam.getSearchEndTime(), "event_reason");
|
||||
List<RmpEventDetailPO> info = eventDetailService.list(new LambdaQueryWrapper<RmpEventDetailPO>()
|
||||
.in(RmpEventDetailPO::getMeasurementPointId, lineIds)
|
||||
.in(RmpEventDetailPO::getAdvanceReason, dicReasonList.stream().map(DictData::getId).collect(Collectors.toList()))
|
||||
.in(RmpEventDetailPO::getAdvanceType, dicTypeList.stream().map(DictData::getId).collect(Collectors.toList()))
|
||||
.ge(StrUtil.isNotBlank(deviceInfoParam.getSearchBeginTime()), RmpEventDetailPO::getStartTime, DateUtil.beginOfDay(DateUtil.parse(deviceInfoParam.getSearchBeginTime())))
|
||||
.le(StrUtil.isNotBlank(deviceInfoParam.getSearchEndTime()), RmpEventDetailPO::getStartTime, DateUtil.endOfDay(DateUtil.parse(deviceInfoParam.getSearchEndTime())))
|
||||
);
|
||||
List<AreaAnalysisVO.Children> reasonList = assDataPQ(info, dicReasonList);
|
||||
|
||||
|
||||
//暂降类型特殊处理
|
||||
DictData dictData = dicReasonList.stream().filter(item->"短路故障".equals(item.getName())).findFirst().get();
|
||||
@@ -72,7 +92,8 @@ public class AreaAnalysisServiceImpl implements AreaAnalysisService {
|
||||
stringListMap.put("相间故障",dicIdsXi);
|
||||
stringListMap.put("未知",dicIdsOther);
|
||||
|
||||
List<AreaAnalysisVO.Children> typeList = assReason(stringListMap,lineIds,deviceInfoParam.getSearchBeginTime(), deviceInfoParam.getSearchEndTime(),dictData.getId());
|
||||
// List<AreaAnalysisVO.Children> typeList = assReason(stringListMap,lineIds,deviceInfoParam.getSearchBeginTime(), deviceInfoParam.getSearchEndTime(),dictData.getId());
|
||||
List<AreaAnalysisVO.Children> typeList = assReasonPQ(stringListMap, info, dictData.getId());
|
||||
|
||||
areaAnalysisVO.setReason(reasonList);
|
||||
areaAnalysisVO.setType(typeList);
|
||||
@@ -107,9 +128,17 @@ public class AreaAnalysisServiceImpl implements AreaAnalysisService {
|
||||
getBaseLineAreaInfo.parallelStream().collect(Collectors.toConcurrentMap(AreaLineInfoVO::getLineId,
|
||||
Function.identity()));
|
||||
|
||||
List<EventDetail> eventDetailList = pqsEventDetailQuery.selectList(Arrays.asList("time","line_id", "persist_time", "event_value"),
|
||||
lineIdOr(lineIds), timeAnd(beginOfDay(deviceInfoParam.getSearchBeginTime()),
|
||||
endOfDay(deviceInfoParam.getSearchEndTime())));
|
||||
// List<EventDetail> eventDetailList = pqsEventDetailQuery.selectList(Arrays.asList("time","line_id", "persist_time", "event_value"),
|
||||
// lineIdOr(lineIds), timeAnd(beginOfDay(deviceInfoParam.getSearchBeginTime()),
|
||||
// endOfDay(deviceInfoParam.getSearchEndTime())));
|
||||
|
||||
//数据暂降查询
|
||||
List<RmpEventDetailPO> infoPo = eventDetailService.list(new LambdaQueryWrapper<RmpEventDetailPO>()
|
||||
.in(RmpEventDetailPO::getMeasurementPointId, lineIds)
|
||||
.ge(StrUtil.isNotBlank(deviceInfoParam.getSearchBeginTime()), RmpEventDetailPO::getStartTime,DateUtil.beginOfDay(DateUtil.parse(deviceInfoParam.getSearchBeginTime())))
|
||||
.le(StrUtil.isNotBlank(deviceInfoParam.getSearchEndTime()), RmpEventDetailPO::getStartTime, DateUtil.endOfDay(DateUtil.parse(deviceInfoParam.getSearchEndTime())))
|
||||
);
|
||||
List<EventDetail> eventDetailList= BeanUtil.copyToList(infoPo,EventDetail.class);
|
||||
if (CollUtil.isEmpty(eventDetailList)) {
|
||||
return VoltageToleranceCurveVO.empty();
|
||||
}
|
||||
@@ -120,9 +149,9 @@ public class AreaAnalysisServiceImpl implements AreaAnalysisService {
|
||||
|
||||
VoltageToleranceCurveDataList voltageToleranceCurve = new VoltageToleranceCurveDataList();
|
||||
voltageToleranceCurve.setLineId(dto.getLineId());
|
||||
voltageToleranceCurve.setPersistTime(dto.getPersistTime());
|
||||
voltageToleranceCurve.setEventValue(dto.getEventValue());
|
||||
voltageToleranceCurve.setTime(LocalDateTime.ofInstant(dto.getTimeId(), ZoneId.systemDefault()));
|
||||
voltageToleranceCurve.setPersistTime(dto.getDuration());
|
||||
voltageToleranceCurve.setEventValue(dto.getFeatureAmplitude());
|
||||
voltageToleranceCurve.setTime(LocalDateTime.ofInstant(dto.getStartTime(), ZoneId.systemDefault()));
|
||||
voltageToleranceCurve.setGdName(info.getGdName());
|
||||
voltageToleranceCurve.setSubName(info.getSubName());
|
||||
return voltageToleranceCurve;
|
||||
@@ -143,6 +172,65 @@ public class AreaAnalysisServiceImpl implements AreaAnalysisService {
|
||||
return generalDeviceDTOList.stream().flatMap(dto -> dto.getLineIndexes().stream()).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
private List<AreaAnalysisVO.Children> assDataPQ(List<RmpEventDetailPO> info,List<DictData> dicReasonList) {
|
||||
List<AreaAnalysisVO.Children> reasonList = new ArrayList<>();
|
||||
//根据暂降原因分组
|
||||
Map<String, String> reasonMap = dicReasonList.stream().collect(Collectors.toMap(DictData::getId,DictData::getName));
|
||||
//将数据进行分组
|
||||
Map<String, Long> infoMap = info.stream().collect(Collectors.groupingBy(
|
||||
x->{
|
||||
return reasonMap.get(x.getAdvanceReason());
|
||||
}, Collectors.counting()));
|
||||
|
||||
//排除不存在的字典数据集合
|
||||
List<DictData> notDicData = dicReasonList.stream().filter(r -> !infoMap.containsKey(r.getName()))
|
||||
.collect(Collectors.toList());
|
||||
AreaAnalysisVO.Children allType ;
|
||||
if(CollUtil.isNotEmpty(notDicData)){
|
||||
for (DictData notDicDatum : notDicData) {
|
||||
allType = new AreaAnalysisVO.Children();
|
||||
allType.setName(notDicDatum.getName());
|
||||
allType.setValue(0);
|
||||
reasonList.add(allType);
|
||||
}
|
||||
}
|
||||
Integer allCount = 0;
|
||||
for (String s : infoMap.keySet()) {
|
||||
allType = new AreaAnalysisVO.Children();
|
||||
allType.setName(s);
|
||||
int count = Math.toIntExact(infoMap.get(s));
|
||||
allType.setValue(count);
|
||||
allCount += count;
|
||||
reasonList.add(allType);
|
||||
}
|
||||
AreaAnalysisVO.Children zj = new AreaAnalysisVO.Children();
|
||||
zj.setName("总计");
|
||||
zj.setValue(allCount);
|
||||
reasonList.add(zj);
|
||||
return reasonList;
|
||||
}
|
||||
|
||||
private List<AreaAnalysisVO.Children> assReasonPQ(Map<String, List<String>> stringListMap, List<RmpEventDetailPO> info, String typeId){
|
||||
List<AreaAnalysisVO.Children> reasonList = new ArrayList<>();
|
||||
|
||||
List<RmpEventDetailPO> reasons = info.stream().filter(x -> typeId.equals(x.getAdvanceReason())).collect(Collectors.toList());
|
||||
Integer allCount = 0;
|
||||
for (Map.Entry<String, List<String>> stringListEntry : stringListMap.entrySet()) {
|
||||
List<String> value = stringListEntry.getValue();
|
||||
Integer count = Math.toIntExact(reasons.stream().filter(x -> value.contains(x)).count());
|
||||
AreaAnalysisVO.Children allType = new AreaAnalysisVO.Children();
|
||||
allType.setName(stringListEntry.getKey());
|
||||
allType.setValue(count);
|
||||
allCount += count;
|
||||
reasonList.add(allType);
|
||||
}
|
||||
|
||||
AreaAnalysisVO.Children allType = new AreaAnalysisVO.Children();
|
||||
allType.setName("总计");
|
||||
allType.setValue(allCount);
|
||||
reasonList.add(allType);
|
||||
return reasonList;
|
||||
}
|
||||
|
||||
private List<AreaAnalysisVO.Children> assData(List<DictData> dicList, List<String> lineIds, String startTime, String endTime, String type) {
|
||||
List<AreaAnalysisVO.Children> reasonList = new ArrayList<>();
|
||||
|
||||
@@ -91,32 +91,7 @@ public class AreaInfoServiceImpl implements AreaInfoService {
|
||||
}
|
||||
}
|
||||
|
||||
//查询监测点未处理暂态事件
|
||||
// StringBuilder lineIdsStr = InfluxDBCommUtils.assToInfluxParam(lineIds);
|
||||
//
|
||||
// String stringResult = "SELECT count(eventass_index) FROM " + Param.EVENT_DETAIL + Param.WHERE + "time >= '" + deviceInfoParam.getSearchBeginTime() + InfluxDBPublicParam.START_TIME + "' and " + "time <= '" + deviceInfoParam.getSearchEndTime() + InfluxDBPublicParam.END_TIME + "' and " + lineIdsStr + " and eventass_index = '' group by line_id" + InfluxDBPublicParam.TIME_ZONE;
|
||||
// // 结果集
|
||||
// QueryResult result = influxDbUtils.query(stringResult);
|
||||
// if (!result.hasError()) {
|
||||
// List<QueryResult.Series> list = result.getResults().get(0).getSeries();
|
||||
//
|
||||
// for (AreaLineInfoVO areaLineInfoVO : resList) {
|
||||
// boolean flag = false;
|
||||
// if(CollectionUtil.isNotEmpty(list)) {
|
||||
// for (QueryResult.Series tem : list) {
|
||||
// String lineId = tem.getTags().get("line_id");
|
||||
// if (areaLineInfoVO.getLineId().equals(lineId)) {
|
||||
// areaLineInfoVO.setNoDealCount(Double.valueOf(tem.getValues().get(0).get(1).toString()).intValue());
|
||||
// flag = true;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// if (!flag) {
|
||||
// areaLineInfoVO.setNoDealCount(0);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
//组装成变电站
|
||||
if (CollectionUtil.isNotEmpty(resList)) {
|
||||
Map<String, List<AreaLineInfoVO>> map = resList.stream().collect(Collectors.groupingBy(AreaLineInfoVO::getSubId));
|
||||
@@ -164,9 +139,9 @@ public class AreaInfoServiceImpl implements AreaInfoService {
|
||||
//监测点id
|
||||
eventDetailNew.setLineId(eventDetail.getMeasurementPointId());
|
||||
//持续时间
|
||||
eventDetailNew.setPersistTime(eventDetail.getDuration());
|
||||
eventDetailNew.setDuration(eventDetail.getDuration());
|
||||
//特征幅值
|
||||
eventDetailNew.setEventValue(eventDetail.getFeatureAmplitude());
|
||||
eventDetailNew.setFeatureAmplitude(eventDetail.getFeatureAmplitude());
|
||||
if(lineMap.containsKey(eventDetail.getMeasurementPointId())){
|
||||
AreaLineInfoVO areaLineInfoVO = lineMap.get(eventDetail.getMeasurementPointId());
|
||||
eventDetailNew.setLineName(areaLineInfoVO.getLineName());
|
||||
@@ -177,28 +152,6 @@ public class AreaInfoServiceImpl implements AreaInfoService {
|
||||
}
|
||||
|
||||
|
||||
// //查询监测点未处理暂态事件
|
||||
// StringBuilder lineIdsStr = InfluxDBCommUtils.assToInfluxParam(lineIds);
|
||||
//
|
||||
// String stringResult = "SELECT * FROM " + Param.EVENT_DETAIL + Param.WHERE + lineIdsStr + "and eventass_index = '' order by time desc limit 100" + InfluxDBPublicParam.TIME_ZONE;
|
||||
// // 结果集
|
||||
// QueryResult result = influxDbUtils.query(stringResult);
|
||||
// // 结果集映射到对象中
|
||||
// InfluxDBResultMapperCn influxDBResultMapper = new InfluxDBResultMapperCn();
|
||||
// resList = influxDBResultMapper.toPOJO(result, EventDetailNew.class);
|
||||
// //对未处理暂降事件的监测点替换成中文名称
|
||||
// if (CollectionUtil.isNotEmpty(resList)) {
|
||||
// for (EventDetailNew eventDetail : resList) {
|
||||
// for (AreaLineInfoVO tem : lineList) {
|
||||
// if (eventDetail.getLineId().equals(tem.getLineId())) {
|
||||
// eventDetail.setLineName(tem.getLineName());
|
||||
// eventDetail.setLng(tem.getLng());
|
||||
// eventDetail.setLat(tem.getLat());
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
}
|
||||
return resList;
|
||||
}
|
||||
@@ -217,9 +170,9 @@ public class AreaInfoServiceImpl implements AreaInfoService {
|
||||
//监测点id
|
||||
eventDetailNew.setLineId(eventDetail.getMeasurementPointId());
|
||||
//持续时间
|
||||
eventDetailNew.setPersistTime(eventDetail.getDuration());
|
||||
eventDetailNew.setDuration(eventDetail.getDuration());
|
||||
//特征幅值
|
||||
eventDetailNew.setEventValue(eventDetail.getFeatureAmplitude());
|
||||
eventDetailNew.setFeatureAmplitude(eventDetail.getFeatureAmplitude());
|
||||
if(CollectionUtil.isNotEmpty(lineList)){
|
||||
resList = resList.stream().peek(item->{
|
||||
item.setGdName(lineList.get(0).getGdName());
|
||||
@@ -230,22 +183,7 @@ public class AreaInfoServiceImpl implements AreaInfoService {
|
||||
}
|
||||
}
|
||||
|
||||
// String stringResult = "SELECT * FROM " + Param.EVENT_DETAIL + Param.WHERE + "line_id = '"+id+"' and eventass_index = '' order by time desc limit 100" + InfluxDBPublicParam.TIME_ZONE;
|
||||
// // 结果集
|
||||
// QueryResult result = influxDbUtils.query(stringResult);
|
||||
// // 结果集映射到对象中
|
||||
// InfluxDBResultMapperCn influxDBResultMapper = new InfluxDBResultMapperCn();
|
||||
// List<EventDetailNew> resList = influxDBResultMapper.toPOJO(result, EventDetailNew.class);
|
||||
|
||||
// List<AreaLineInfoVO> lineList = lineFeignClient.getBaseLineAreaInfo(Stream.of(id).collect(Collectors.toList())).getData();
|
||||
|
||||
// if(CollectionUtil.isNotEmpty(lineList)){
|
||||
// resList = resList.stream().peek(item->{
|
||||
// item.setGdName(lineList.get(0).getGdName());
|
||||
// item.setSubName(lineList.get(0).getSubName());
|
||||
// item.setLineName(lineList.get(0).getLineName());
|
||||
// }).collect(Collectors.toList());
|
||||
// }
|
||||
return resList;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
package com.njcn.event.service.majornetwork.Impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.njcn.common.pojo.enums.common.ServerEnum;
|
||||
import com.njcn.device.pq.api.GeneralDeviceInfoClient;
|
||||
import com.njcn.device.pq.api.LineFeignClient;
|
||||
@@ -14,10 +17,12 @@ import com.njcn.event.influxdb.PqsOnlinerateQuery;
|
||||
import com.njcn.event.mapper.majornetwork.PqDeviceMapper;
|
||||
import com.njcn.event.pojo.po.PqDevice;
|
||||
import com.njcn.event.pojo.po.PqsOnlinerate;
|
||||
import com.njcn.event.pojo.po.RmpEventDetailPO;
|
||||
import com.njcn.event.pojo.vo.*;
|
||||
import com.njcn.event.pojo.vo.TerminalRunningStatisticsVO.TerminalRunningInfoVO;
|
||||
import com.njcn.event.pojo.vo.TerminalRunningStatisticsVO.TerminalRunningVO;
|
||||
import com.njcn.event.service.majornetwork.AreaLineService;
|
||||
import com.njcn.event.service.majornetwork.EventDetailService;
|
||||
import com.njcn.influxdb.param.InfluxDBPublicParam;
|
||||
import com.njcn.influxdb.utils.InfluxDbUtils;
|
||||
import com.njcn.system.pojo.enums.StatisticsEnum;
|
||||
@@ -56,6 +61,8 @@ public class AreaLineServiceImpl implements AreaLineService {
|
||||
private final PqsOnlinerateQuery pqsOnlinerateQuery;
|
||||
|
||||
private final PqDeviceMapper pqDeviceMapper;
|
||||
private final EventDetailService eventDetailService;
|
||||
|
||||
|
||||
@Override
|
||||
public AreaLineVO getAreaLineVO(DeviceInfoParam deviceInfoParam) {
|
||||
@@ -161,7 +168,14 @@ public class AreaLineServiceImpl implements AreaLineService {
|
||||
// 获取暂降数据
|
||||
if (lineIndexs.size() > 0) {
|
||||
int tail = 0;
|
||||
List<EventHeatDeatilVO> eventdetailList = getContion(deviceInfoParam, lineIndexs);
|
||||
// List<EventHeatDeatilVO> eventdetailList = getContion(deviceInfoParam, lineIndexs);
|
||||
//数据暂降查询
|
||||
List<RmpEventDetailPO> info = eventDetailService.list(new LambdaQueryWrapper<RmpEventDetailPO>()
|
||||
.in(RmpEventDetailPO::getMeasurementPointId, lineIndexs)
|
||||
.ge(StrUtil.isNotBlank(deviceInfoParam.getSearchBeginTime()), RmpEventDetailPO::getStartTime,DateUtil.beginOfDay(DateUtil.parse(deviceInfoParam.getSearchBeginTime())))
|
||||
.le(StrUtil.isNotBlank(deviceInfoParam.getSearchEndTime()), RmpEventDetailPO::getStartTime, DateUtil.endOfDay(DateUtil.parse(deviceInfoParam.getSearchEndTime())))
|
||||
);
|
||||
List<EventHeatDeatilVO> eventdetailList= BeanUtil.copyToList(info,EventHeatDeatilVO.class);
|
||||
if (eventdetailList.size() > 0) {
|
||||
List<String> lineIds = eventdetailList.stream().map(EventHeatDeatilVO::getLineId).collect(Collectors.toList());
|
||||
List<AreaLineInfoVO> areaAnalysisVOList = lineFeignClient.getBaseLineAreaInfo(lineIds).getData();
|
||||
@@ -216,7 +230,13 @@ public class AreaLineServiceImpl implements AreaLineService {
|
||||
if (lineIndexs.size() > 0) {
|
||||
int tail = 0;
|
||||
EventSeverityValueVO eventSeverityValueVO = new EventSeverityValueVO();
|
||||
List<EventHeatDeatilVO> eventdetailList = getContion(deviceInfoParam, lineIndexs);
|
||||
// List<EventHeatDeatilVO> eventdetailList = getContion(deviceInfoParam, lineIndexs);
|
||||
List<RmpEventDetailPO> info = eventDetailService.list(new LambdaQueryWrapper<RmpEventDetailPO>()
|
||||
.in(RmpEventDetailPO::getMeasurementPointId, lineIndexs)
|
||||
.ge(StrUtil.isNotBlank(deviceInfoParam.getSearchBeginTime()), RmpEventDetailPO::getStartTime,DateUtil.beginOfDay(DateUtil.parse(deviceInfoParam.getSearchBeginTime())))
|
||||
.le(StrUtil.isNotBlank(deviceInfoParam.getSearchEndTime()), RmpEventDetailPO::getStartTime, DateUtil.endOfDay(DateUtil.parse(deviceInfoParam.getSearchEndTime())))
|
||||
);
|
||||
List<EventHeatDeatilVO> eventdetailList= BeanUtil.copyToList(info,EventHeatDeatilVO.class);
|
||||
if (eventdetailList.size() > 0) {
|
||||
for (int eventNum = 0; eventNum < eventdetailList.size(); eventNum++) {
|
||||
tail += eventdetailList.get(eventNum).getCount();
|
||||
|
||||
@@ -1,15 +1,19 @@
|
||||
package com.njcn.event.service.majornetwork.Impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.date.DateField;
|
||||
import cn.hutool.core.date.DatePattern;
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.njcn.device.pq.api.GeneralDeviceInfoClient;
|
||||
import com.njcn.device.pq.pojo.dto.GeneralDeviceDTO;
|
||||
import com.njcn.device.pq.pojo.param.DeviceInfoParam;
|
||||
import com.njcn.event.influxdb.PqsEventDetailQuery;
|
||||
import com.njcn.event.pojo.po.EventDetail;
|
||||
import com.njcn.event.pojo.po.RmpEventDetailPO;
|
||||
import com.njcn.event.pojo.vo.AreaCalculationVO;
|
||||
import com.njcn.event.pojo.vo.AreaStatisticalVO;
|
||||
import com.njcn.event.pojo.vo.AreaStatisticalVO.AreaStatisticsVO;
|
||||
@@ -18,7 +22,11 @@ import com.njcn.event.pojo.vo.AreaStatisticalVO.VoltageStatisticsVO;
|
||||
import com.njcn.event.pojo.vo.MonthCalculationVO;
|
||||
import com.njcn.event.pojo.vo.VoltageLevelCalculationVO;
|
||||
import com.njcn.event.service.majornetwork.AreaStatisticalService;
|
||||
import com.njcn.event.service.majornetwork.EventDetailService;
|
||||
import com.njcn.system.api.DicDataFeignClient;
|
||||
import com.njcn.system.enums.DicDataEnum;
|
||||
import com.njcn.system.pojo.enums.StatisticsEnum;
|
||||
import com.njcn.system.pojo.po.DictData;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.influxdb.querybuilder.clauses.Clause;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -47,6 +55,9 @@ public class AreaStatisticalServiceImpl implements AreaStatisticalService {
|
||||
|
||||
private final PqsEventDetailQuery pqsEventDetailQuery;
|
||||
|
||||
private final EventDetailService eventDetailService;
|
||||
private final DicDataFeignClient dicDataFeignClient;
|
||||
|
||||
/**
|
||||
* 获取暂降区域 电压等级 月份统计
|
||||
*
|
||||
@@ -55,6 +66,9 @@ public class AreaStatisticalServiceImpl implements AreaStatisticalService {
|
||||
*/
|
||||
@Override
|
||||
public AreaStatisticalVO getAreaCalculation(DeviceInfoParam.BusinessParam deviceInfoParam) {
|
||||
//获取录波字典信息
|
||||
DictData data = dicDataFeignClient.getDicDataByCode(DicDataEnum.RECORDING_WAVE.getCode()).getData();
|
||||
|
||||
// 获取指定部门下的监测点集合
|
||||
List<GeneralDeviceDTO> generalDeviceDTOList = generalDeviceInfoClient.getPracticalAllDeviceInfo(deviceInfoParam).getData();
|
||||
if (CollUtil.isEmpty(generalDeviceDTOList)) {
|
||||
@@ -65,10 +79,20 @@ public class AreaStatisticalServiceImpl implements AreaStatisticalService {
|
||||
return AreaStatisticalVO.empty();
|
||||
}
|
||||
|
||||
List<Clause> clauseList = new ArrayList<>(timeAnd(beginOfDay(deviceInfoParam.getSearchBeginTime()), endOfDay(deviceInfoParam.getSearchEndTime())));
|
||||
clauseList.add(ne("wave_type",5));
|
||||
List<EventDetail> eventDetailList = pqsEventDetailQuery.selectList(Arrays.asList("line_id", "eventass_index"),
|
||||
lineIdOr(lineIds),clauseList);
|
||||
// List<Clause> clauseList = new ArrayList<>(timeAnd(beginOfDay(deviceInfoParam.getSearchBeginTime()), endOfDay(deviceInfoParam.getSearchEndTime())));
|
||||
// clauseList.add(ne("wave_type",5));
|
||||
// List<EventDetail> cc = pqsEventDetailQuery.selectList(Arrays.asList("line_id", "eventass_index"),
|
||||
// lineIdOr(lineIds),clauseList);
|
||||
|
||||
//数据暂降查询
|
||||
List<RmpEventDetailPO> info = eventDetailService.list(new LambdaQueryWrapper<RmpEventDetailPO>()
|
||||
.in(RmpEventDetailPO::getMeasurementPointId, lineIds)
|
||||
//todo 是否缺少录波
|
||||
.eq(RmpEventDetailPO::getEventType, data.getId())
|
||||
.ge(StrUtil.isNotBlank(deviceInfoParam.getSearchBeginTime()), RmpEventDetailPO::getStartTime,DateUtil.beginOfDay(DateUtil.parse(deviceInfoParam.getSearchBeginTime())))
|
||||
.le(StrUtil.isNotBlank(deviceInfoParam.getSearchEndTime()), RmpEventDetailPO::getStartTime, DateUtil.endOfDay(DateUtil.parse(deviceInfoParam.getSearchEndTime())))
|
||||
);
|
||||
List<EventDetail> eventDetailList = BeanUtil.copyToList(info,EventDetail.class);
|
||||
if (CollUtil.isEmpty(eventDetailList)) {
|
||||
return AreaStatisticalVO.empty();
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.njcn.event.service.majornetwork.Impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
@@ -146,13 +147,14 @@ public class EventAnalysisServiceImpl implements EventAnalysisService {
|
||||
@Override
|
||||
public List<CoordsVO> getCoords(StatisticsParam statisticsParam) {
|
||||
List<CoordsVO> result = new ArrayList<>();
|
||||
|
||||
// QueryResult query = MonitorQuery(statisticsParam);
|
||||
// InfluxDBResultMapper influxDBResultMapper = new InfluxDBResultMapper();
|
||||
// List<EventDetail> info = influxDBResultMapper.toPOJO(query, EventDetail.class);
|
||||
|
||||
//查询监测点未处理暂态事件
|
||||
List<RmpEventDetailPO> info = eventDetailService.list(new LambdaQueryWrapper<RmpEventDetailPO>()
|
||||
.in(RmpEventDetailPO::getMeasurementPointId, statisticsParam.getLineIndex())
|
||||
.eq(RmpEventDetailPO::getMeasurementPointId, statisticsParam.getLineIndex())
|
||||
.ge(StringUtils.isNotBlank(statisticsParam.getStartTime()), RmpEventDetailPO::getStartTime,DateUtil.beginOfDay(DateUtil.parse(statisticsParam.getStartTime())))
|
||||
.le(StringUtils.isNotBlank(statisticsParam.getEndTime()), RmpEventDetailPO::getStartTime, DateUtil.endOfDay(DateUtil.parse(statisticsParam.getEndTime())))
|
||||
);
|
||||
@@ -388,8 +390,8 @@ public class EventAnalysisServiceImpl implements EventAnalysisService {
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < info.size(); i++) {
|
||||
Double eventvalue = info.get(i).getEventValue();
|
||||
double persisttime = info.get(i).getPersistTime();
|
||||
Double eventvalue = info.get(i).getFeatureAmplitude();
|
||||
double persisttime = info.get(i).getDuration();
|
||||
if (eventvalue * 100 < 10) {
|
||||
if (persisttime < 20) {
|
||||
arr[4][0]++;
|
||||
@@ -500,7 +502,7 @@ public class EventAnalysisServiceImpl implements EventAnalysisService {
|
||||
|
||||
//查询监测点未处理暂态事件
|
||||
List<RmpEventDetailPO> info = eventDetailService.list(new LambdaQueryWrapper<RmpEventDetailPO>()
|
||||
.in(RmpEventDetailPO::getMeasurementPointId, statisticsParam.getLineIndex())
|
||||
.eq(RmpEventDetailPO::getMeasurementPointId, statisticsParam.getLineIndex())
|
||||
.ge(StringUtils.isNotBlank(statisticsParam.getStartTime()), RmpEventDetailPO::getStartTime,DateUtil.beginOfDay(DateUtil.parse(statisticsParam.getStartTime())))
|
||||
.le(StringUtils.isNotBlank(statisticsParam.getEndTime()), RmpEventDetailPO::getStartTime, DateUtil.endOfDay(DateUtil.parse(statisticsParam.getEndTime())))
|
||||
);
|
||||
@@ -576,8 +578,8 @@ public class EventAnalysisServiceImpl implements EventAnalysisService {
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < info.size(); i++) {
|
||||
Double eventvalue = info.get(i).getEventValue();
|
||||
double persisttime = info.get(i).getPersistTime();
|
||||
Double eventvalue = info.get(i).getFeatureAmplitude();
|
||||
double persisttime = info.get(i).getDuration();
|
||||
if (eventvalue * 100 < 1 && eventvalue * 100 >= 0) {
|
||||
if (persisttime > 10 && persisttime <= 100) {
|
||||
arr[16][0]++;
|
||||
@@ -941,6 +943,7 @@ public class EventAnalysisServiceImpl implements EventAnalysisService {
|
||||
} else {
|
||||
builder2.append(startYear).append("-").append(startMonth + 1).append("-").append(startDays);
|
||||
}
|
||||
|
||||
// query = MonitorQuery(new StatisticsParam(statisticsParam.getLineIndex(),builder1.toString(), builder2.toString(), statisticsParam.getFlag()));
|
||||
// InfluxDBResultMapper influxDBResultMapper = new InfluxDBResultMapper();
|
||||
// List<EventDetail> eventDetailList = influxDBResultMapper.toPOJO(query, EventDetail.class);
|
||||
@@ -996,7 +999,7 @@ public class EventAnalysisServiceImpl implements EventAnalysisService {
|
||||
);
|
||||
|
||||
Map<String, List<RmpEventDetailPO>> map = eventDetailList.stream().filter(x -> data.getId().equals(x.getEventType()))
|
||||
.collect(Collectors.groupingBy(s -> DateUtil.format(s.getStartTime(), "yyyy-MM-dd")));
|
||||
.collect(Collectors.groupingBy(s -> s.getStartTime().substring(0, 10)));
|
||||
Set<String> keySet = map.keySet();
|
||||
|
||||
LocalDate parse1 = LocalDate.parse(startTime);
|
||||
@@ -1049,46 +1052,59 @@ public class EventAnalysisServiceImpl implements EventAnalysisService {
|
||||
List<EventDetail> list = new ArrayList<>();
|
||||
List<ReasonsVO> reasonsVOS = new ArrayList<>();
|
||||
List<TypesVO> typesVOS = new ArrayList<>();
|
||||
List<EventDetail> info = new ArrayList<>();
|
||||
QueryResult query = MonitorQuery(statisticsParam);
|
||||
InfluxDBResultMapper influxDBResultMapper = new InfluxDBResultMapper();
|
||||
info = influxDBResultMapper.toPOJO(query, EventDetail.class);
|
||||
// List<EventDetail> info = new ArrayList<>();
|
||||
// QueryResult query = MonitorQuery(statisticsParam);
|
||||
// InfluxDBResultMapper influxDBResultMapper = new InfluxDBResultMapper();
|
||||
// info = influxDBResultMapper.toPOJO(query, EventDetail.class);
|
||||
//数据暂降查询
|
||||
List<RmpEventDetailPO> info = eventDetailService.list(new LambdaQueryWrapper<RmpEventDetailPO>()
|
||||
.eq(RmpEventDetailPO::getMeasurementPointId, statisticsParam.getLineIndex())
|
||||
.ge(StringUtils.isNotBlank(statisticsParam.getStartTime()), RmpEventDetailPO::getStartTime,DateUtil.beginOfDay(DateUtil.parse(statisticsParam.getStartTime())))
|
||||
.le(StringUtils.isNotBlank(statisticsParam.getEndTime()), RmpEventDetailPO::getStartTime, DateUtil.endOfDay(DateUtil.parse(statisticsParam.getEndTime())))
|
||||
);
|
||||
|
||||
HttpResult<List<DictData>> reason = dicDataFeignClient.getDicDataByTypeName(DicDataTypeEnum.EVENT_REASON.getName());
|
||||
HttpResult<List<DictData>> type = dicDataFeignClient.getDicDataByTypeName(DicDataTypeEnum.EVENT_TYPE.getName());
|
||||
List<DictData> reasonData = reason.getData();
|
||||
List<DictData> typeData = type.getData();
|
||||
|
||||
//获取暂降字典信息
|
||||
DictData dataDto = dicDataFeignClient.getDicDataByCode(DicDataEnum.VOLTAGE_DIP.getCode()).getData();
|
||||
HashMap<String, Integer> reasonMap = new HashMap<>();
|
||||
HashMap<String, Integer> typeMap = new HashMap<>();
|
||||
|
||||
|
||||
//添加detail
|
||||
for (EventDetail detail : info) {
|
||||
if (detail.getWaveType() == 1) {
|
||||
for (RmpEventDetailPO detail : info) {
|
||||
EventDetail details = null;
|
||||
if (dataDto.getId() .equals(detail.getEventType())) {
|
||||
for (DictData data : reasonData) {
|
||||
reasonMap.put(data.getName(),0);
|
||||
if (detail.getEventReason().equals(data.getId())) {
|
||||
detail.setEventReason(data.getName());
|
||||
if (detail.getAdvanceReason().equals(data.getId())) {
|
||||
details=BeanUtil.copyProperties(detail,EventDetail.class);
|
||||
details.setAdvanceReason(data.getName());
|
||||
}
|
||||
}
|
||||
for (DictData data : typeData) {
|
||||
typeMap.put(data.getName(),0);
|
||||
if (detail.getEventType().equals(data.getId())) {
|
||||
detail.setEventType(data.getName());
|
||||
if (detail.getAdvanceType().equals(data.getId())) {
|
||||
details=BeanUtil.copyProperties(detail,EventDetail.class);
|
||||
detail.setAdvanceType(data.getName());
|
||||
}
|
||||
}
|
||||
list.add(detail);
|
||||
list.add(details);
|
||||
}
|
||||
}
|
||||
|
||||
//添加reason到map
|
||||
for (EventDetail data : list) {
|
||||
if (reasonMap.get(data.getEventReason()) != null) {
|
||||
reasonMap.put(data.getEventReason(), reasonMap.get(data.getEventReason()) + 1);
|
||||
if (reasonMap.get(data.getAdvanceReason()) != null) {
|
||||
reasonMap.put(data.getAdvanceReason(), reasonMap.get(data.getAdvanceReason()) + 1);
|
||||
}
|
||||
}
|
||||
//添加type到map
|
||||
for (EventDetail data : list) {
|
||||
if (typeMap.get(data.getEventType()) != null) {
|
||||
typeMap.put(data.getEventType(), typeMap.get(data.getEventType()) + 1);
|
||||
if (typeMap.get(data.getAdvanceType()) != null) {
|
||||
typeMap.put(data.getAdvanceType(), typeMap.get(data.getAdvanceType()) + 1);
|
||||
}
|
||||
}
|
||||
Set<String> reasonKeyset = reasonMap.keySet();
|
||||
@@ -1116,14 +1132,21 @@ public class EventAnalysisServiceImpl implements EventAnalysisService {
|
||||
public ProbabilityVO getProbabilityDistribution(StatisticsParam statisticsParam) {
|
||||
ProbabilityVO result = new ProbabilityVO();
|
||||
List<EventDetail> info = new ArrayList<>();
|
||||
QueryResult query = MonitorQuery(statisticsParam);
|
||||
InfluxDBResultMapper influxDBResultMapper = new InfluxDBResultMapper();
|
||||
List<EventDetail> info2 = influxDBResultMapper.toPOJO(query, EventDetail.class);
|
||||
// QueryResult query = MonitorQuery(statisticsParam);
|
||||
// InfluxDBResultMapper influxDBResultMapper = new InfluxDBResultMapper();
|
||||
// List<EventDetail> info2 = influxDBResultMapper.toPOJO(query, EventDetail.class);
|
||||
//数据暂降查询
|
||||
List<RmpEventDetailPO> infos = eventDetailService.list(new LambdaQueryWrapper<RmpEventDetailPO>()
|
||||
.eq(RmpEventDetailPO::getMeasurementPointId, statisticsParam.getLineIndex())
|
||||
.ge(StringUtils.isNotBlank(statisticsParam.getStartTime()), RmpEventDetailPO::getStartTime,DateUtil.beginOfDay(DateUtil.parse(statisticsParam.getStartTime())))
|
||||
.le(StringUtils.isNotBlank(statisticsParam.getEndTime()), RmpEventDetailPO::getStartTime, DateUtil.endOfDay(DateUtil.parse(statisticsParam.getEndTime())))
|
||||
);
|
||||
List<EventDetail> info2 = BeanUtil.copyToList(infos, EventDetail.class);
|
||||
//总数
|
||||
Integer count = 0;
|
||||
for (EventDetail eventDetail : info2) {
|
||||
//过滤掉大于0.9的数据
|
||||
if (eventDetail.getEventValue() <= 0.9) {
|
||||
if (eventDetail.getFeatureAmplitude() <= 0.9) {
|
||||
count++;
|
||||
info.add(eventDetail);
|
||||
}
|
||||
@@ -1152,53 +1175,53 @@ public class EventAnalysisServiceImpl implements EventAnalysisService {
|
||||
subsectionMap.put("80~90", 0);
|
||||
//求数量
|
||||
for (EventDetail eventDetail : info) {
|
||||
if (eventDetail.getEventValue() < 0.1) {
|
||||
if (eventDetail.getFeatureAmplitude() < 0.1) {
|
||||
countMap.put("<10", (countMap.get("<10") + 1));
|
||||
}
|
||||
if (eventDetail.getEventValue() < 0.2) {
|
||||
if (eventDetail.getFeatureAmplitude() < 0.2) {
|
||||
countMap.put("<20", (countMap.get("<20") + 1));
|
||||
}
|
||||
if (eventDetail.getEventValue() < 0.3) {
|
||||
if (eventDetail.getFeatureAmplitude() < 0.3) {
|
||||
countMap.put("<30", (countMap.get("<30") + 1));
|
||||
}
|
||||
if (eventDetail.getEventValue() < 0.4) {
|
||||
if (eventDetail.getFeatureAmplitude() < 0.4) {
|
||||
countMap.put("<40", (countMap.get("<40") + 1));
|
||||
}
|
||||
if (eventDetail.getEventValue() < 0.5) {
|
||||
if (eventDetail.getFeatureAmplitude() < 0.5) {
|
||||
countMap.put("<50", (countMap.get("<50") + 1));
|
||||
}
|
||||
if (eventDetail.getEventValue() < 0.6) {
|
||||
if (eventDetail.getFeatureAmplitude() < 0.6) {
|
||||
countMap.put("<60", (countMap.get("<60") + 1));
|
||||
}
|
||||
if (eventDetail.getEventValue() < 0.7) {
|
||||
if (eventDetail.getFeatureAmplitude() < 0.7) {
|
||||
countMap.put("<70", (countMap.get("<70") + 1));
|
||||
}
|
||||
if (eventDetail.getEventValue() < 0.8) {
|
||||
if (eventDetail.getFeatureAmplitude() < 0.8) {
|
||||
countMap.put("<80", (countMap.get("<80") + 1));
|
||||
}
|
||||
if (eventDetail.getEventValue() < 0.9) {
|
||||
if (eventDetail.getFeatureAmplitude() < 0.9) {
|
||||
countMap.put("<90", (countMap.get("<90") + 1));
|
||||
}
|
||||
}
|
||||
//求每段数量
|
||||
for (EventDetail eventDetail : info) {
|
||||
if (eventDetail.getEventValue() < 0.1) {
|
||||
if (eventDetail.getFeatureAmplitude() < 0.1) {
|
||||
subsectionMap.put("0~10", (subsectionMap.get("0~10") + 1));
|
||||
} else if (eventDetail.getEventValue() > 0.1 && eventDetail.getEventValue() < 0.2) {
|
||||
} else if (eventDetail.getFeatureAmplitude() > 0.1 && eventDetail.getFeatureAmplitude() < 0.2) {
|
||||
subsectionMap.put("10~20", (subsectionMap.get("10~20") + 1));
|
||||
} else if (eventDetail.getEventValue() > 0.2 && eventDetail.getEventValue() < 0.3) {
|
||||
} else if (eventDetail.getFeatureAmplitude() > 0.2 && eventDetail.getFeatureAmplitude() < 0.3) {
|
||||
subsectionMap.put("20~30", (subsectionMap.get("20~30") + 1));
|
||||
} else if (eventDetail.getEventValue() > 0.3 && eventDetail.getEventValue() < 0.4) {
|
||||
} else if (eventDetail.getFeatureAmplitude() > 0.3 && eventDetail.getFeatureAmplitude() < 0.4) {
|
||||
subsectionMap.put("30~40", (subsectionMap.get("30~40") + 1));
|
||||
} else if (eventDetail.getEventValue() > 0.4 && eventDetail.getEventValue() < 0.5) {
|
||||
} else if (eventDetail.getFeatureAmplitude() > 0.4 && eventDetail.getFeatureAmplitude() < 0.5) {
|
||||
subsectionMap.put("40~50", (subsectionMap.get("40~50") + 1));
|
||||
} else if (eventDetail.getEventValue() > 0.5 && eventDetail.getEventValue() < 0.6) {
|
||||
} else if (eventDetail.getFeatureAmplitude() > 0.5 && eventDetail.getFeatureAmplitude() < 0.6) {
|
||||
subsectionMap.put("50~60", (subsectionMap.get("50~60") + 1));
|
||||
} else if (eventDetail.getEventValue() > 0.6 && eventDetail.getEventValue() < 0.7) {
|
||||
} else if (eventDetail.getFeatureAmplitude() > 0.6 && eventDetail.getFeatureAmplitude() < 0.7) {
|
||||
subsectionMap.put("60~70", (subsectionMap.get("60~70") + 1));
|
||||
} else if (eventDetail.getEventValue() > 0.7 && eventDetail.getEventValue() < 0.8) {
|
||||
} else if (eventDetail.getFeatureAmplitude() > 0.7 && eventDetail.getFeatureAmplitude() < 0.8) {
|
||||
subsectionMap.put("70~80", (subsectionMap.get("70~80") + 1));
|
||||
} else if (eventDetail.getEventValue() > 0.8 && eventDetail.getEventValue() < 0.9) {
|
||||
} else if (eventDetail.getFeatureAmplitude() > 0.8 && eventDetail.getFeatureAmplitude() < 0.9) {
|
||||
subsectionMap.put("80~90", (subsectionMap.get("80~90") + 1));
|
||||
}
|
||||
}
|
||||
@@ -1276,7 +1299,7 @@ public class EventAnalysisServiceImpl implements EventAnalysisService {
|
||||
timeMap.put("<180", 0);
|
||||
//求不同时间段的总数
|
||||
for (EventDetail eventDetail : info) {
|
||||
Double persistTime = eventDetail.getPersistTime();
|
||||
Double persistTime = eventDetail.getDuration();
|
||||
if (persistTime / 1000 < 0.1) {
|
||||
timeMap.put("<0.1", timeMap.get("<0.1") + 1);
|
||||
} else if (persistTime / 1000 > 0.1 && persistTime / 1000 < 0.25) {
|
||||
@@ -1337,7 +1360,7 @@ public class EventAnalysisServiceImpl implements EventAnalysisService {
|
||||
//求sisttime
|
||||
List<String> sisttime = new ArrayList<>();
|
||||
for (EventDetail eventDetail : info) {
|
||||
Double persistTime = eventDetail.getPersistTime();
|
||||
Double persistTime = eventDetail.getDuration();
|
||||
if (persistTime / 1000 < 0.1) {
|
||||
timeMap2.put("<0.1", timeMap2.get("<0.1") + 1);
|
||||
}
|
||||
@@ -1415,7 +1438,7 @@ public class EventAnalysisServiceImpl implements EventAnalysisService {
|
||||
// }
|
||||
//查询监测点未处理暂态事件
|
||||
List<RmpEventDetailPO> eventDetails = eventDetailService.list(new LambdaQueryWrapper<RmpEventDetailPO>()
|
||||
.in(RmpEventDetailPO::getMeasurementPointId, statisticsParam.getLineIndex())
|
||||
.eq(RmpEventDetailPO::getMeasurementPointId, statisticsParam.getLineIndex())
|
||||
.ge(StringUtils.isNotBlank(statisticsParam.getStartTime()), RmpEventDetailPO::getStartTime,DateUtil.beginOfDay(DateUtil.parse(statisticsParam.getStartTime())))
|
||||
.le(StringUtils.isNotBlank(statisticsParam.getEndTime()), RmpEventDetailPO::getStartTime, DateUtil.endOfDay(DateUtil.parse(statisticsParam.getEndTime())))
|
||||
);
|
||||
@@ -1433,21 +1456,21 @@ public class EventAnalysisServiceImpl implements EventAnalysisService {
|
||||
//监测点id
|
||||
eventDetailNew.setLineId(eventDetail.getMeasurementPointId());
|
||||
//持续时间
|
||||
eventDetailNew.setPersistTime(eventDetail.getDuration());
|
||||
eventDetailNew.setDuration(eventDetail.getDuration());
|
||||
//特征幅值
|
||||
eventDetailNew.setEventValue(eventDetail.getFeatureAmplitude());
|
||||
eventDetailNew.setFeatureAmplitude(eventDetail.getFeatureAmplitude());
|
||||
//波形路径
|
||||
eventDetailNew.setWaveName(eventDetail.getWavePath());
|
||||
eventDetailNew.setWavePath(eventDetail.getWavePath());
|
||||
if(data.getId().equals(eventDetail.getEventType())){
|
||||
if (reasonMap.containsKey(eventDetail.getEventReason())) {
|
||||
if (reasonMap.containsKey(eventDetail.getAdvanceReason())) {
|
||||
//暂降原因
|
||||
DictData dictData = reasonMap.get(eventDetail.getEventReason());
|
||||
eventDetailNew.setEventReason(dictData.getName());
|
||||
DictData dictData = reasonMap.get(eventDetail.getAdvanceReason());
|
||||
eventDetailNew.setAdvanceReason(dictData.getName());
|
||||
}
|
||||
if (typeMap.containsKey(eventDetail.getEventType())) {
|
||||
if (typeMap.containsKey(eventDetail.getAdvanceType())) {
|
||||
//事件类型
|
||||
DictData dictData = typeMap.get(eventDetail.getEventType());
|
||||
eventDetailNew.setEventType(dictData.getName());
|
||||
DictData dictData = typeMap.get(eventDetail.getAdvanceType());
|
||||
eventDetailNew.setAdvanceType(dictData.getName());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1466,244 +1489,295 @@ public class EventAnalysisServiceImpl implements EventAnalysisService {
|
||||
@Override
|
||||
public Page<WaveTypeVO> getMonitorEventAnalyseQuery(EventBaseParam eventBaseParam) {
|
||||
|
||||
//提前创建结果集合
|
||||
List<WaveTypeVO> eventDetailList = new ArrayList<>();
|
||||
//数据暂降查询
|
||||
Page<RmpEventDetailPO> pageInfo = eventDetailService.page(new Page<>(eventBaseParam.getPageNum(), eventBaseParam.getPageSize()), new LambdaQueryWrapper<RmpEventDetailPO>()
|
||||
.eq(RmpEventDetailPO::getMeasurementPointId, eventBaseParam.getLineId())
|
||||
.ge(StringUtils.isNotBlank(eventBaseParam.getSearchBeginTime()), RmpEventDetailPO::getStartTime,DateUtil.beginOfDay(DateUtil.parse(eventBaseParam.getSearchBeginTime())))
|
||||
.le(StringUtils.isNotBlank(eventBaseParam.getSearchEndTime()), RmpEventDetailPO::getStartTime, DateUtil.endOfDay(DateUtil.parse(eventBaseParam.getSearchEndTime())))
|
||||
|
||||
//创建line_id集合,将入参line_id塞进去
|
||||
List<String> lineIds = new ArrayList<>();
|
||||
lineIds.add(eventBaseParam.getLineId());
|
||||
|
||||
//提前创建total
|
||||
StringBuilder stringTotal = new StringBuilder();
|
||||
|
||||
|
||||
//查询参数不为空,进行条件填充
|
||||
if (ObjectUtil.isNotNull(eventBaseParam.getSearchValue())) {
|
||||
//查询sql语句
|
||||
StringBuilder stringResult = new StringBuilder(Param.SELECT).append(Param.EVENT_DETAIL).append(Param.WHERE).
|
||||
append("time >= '").append(DateUtil.beginOfDay(DateUtil.parse(eventBaseParam.getSearchBeginTime()))).append("' and ").append("time <= '").append(DateUtil.endOfDay(DateUtil.parse(eventBaseParam.getSearchEndTime()))).append("' and ")
|
||||
.append("line_id= '").append(eventBaseParam.getLineId()).append("'");
|
||||
|
||||
//套用公式(page-1)*pageSize
|
||||
int i = (eventBaseParam.getPageNum() - 1) * eventBaseParam.getPageSize();
|
||||
//拼接分页sql
|
||||
stringResult.append("LIMIT ").append(eventBaseParam.getPageSize()).append(" OFFSET ").append(i).append(" tz('Asia/Shanghai')");
|
||||
|
||||
|
||||
//查询sql语句总条数
|
||||
stringTotal = new StringBuilder("SELECT COUNT(num) as aa FROM ").append(Param.EVENT_DETAIL).append(" WHERE ").append("time >= '").append(DateUtil.beginOfDay(DateUtil.parse(eventBaseParam.getSearchBeginTime()))).append("' and ")
|
||||
.append("time <= '").append(DateUtil.endOfDay(DateUtil.parse(eventBaseParam.getSearchEndTime()))).append("' and ");
|
||||
stringTotal.append("line_id= '").append(eventBaseParam.getLineId()).append("' tz('Asia/Shanghai')");
|
||||
|
||||
//结果集
|
||||
QueryResult result = influxDbUtils.query(stringResult.toString());
|
||||
//总条数
|
||||
QueryResult resultTotal = influxDbUtils.query(stringTotal.toString());
|
||||
|
||||
//结果集映射到对象中
|
||||
InfluxDBResultMapper influxDBResultMapper = new InfluxDBResultMapper();
|
||||
eventDetailList = influxDBResultMapper.toPOJO(result, WaveTypeVO.class);
|
||||
|
||||
|
||||
//获取关于监测点发电站相关信息
|
||||
HttpResult<List<AreaLineInfoVO>> baseLineAreaInfo = lineFeignClient.getBaseLineAreaInfo(lineIds);
|
||||
System.out.println(baseLineAreaInfo);
|
||||
//将返回的封装好的结果集进行还原成集合
|
||||
List<AreaLineInfoVO> areaLineList = baseLineAreaInfo.getData();
|
||||
|
||||
|
||||
//将监测点发电机相关信息copy到准备好的VO对象中
|
||||
for (WaveTypeVO waveTypeVO : eventDetailList) {
|
||||
if (waveTypeVO.getLineId() != null) {
|
||||
for (AreaLineInfoVO lineInfoVO : areaLineList) {
|
||||
if (waveTypeVO.getLineId().equals(lineInfoVO.getLineId())) {
|
||||
waveTypeVO.setSubName(lineInfoVO.getSubName());
|
||||
waveTypeVO.setLineId(lineInfoVO.getLineId());
|
||||
waveTypeVO.setLineName(lineInfoVO.getLineName());
|
||||
waveTypeVO.setGdId(lineInfoVO.getGdId());
|
||||
waveTypeVO.setGdName(lineInfoVO.getGdName());
|
||||
waveTypeVO.setVoltageId(lineInfoVO.getVoltageId());
|
||||
waveTypeVO.setNoDealCount(lineInfoVO.getNoDealCount());
|
||||
waveTypeVO.setCt1(lineInfoVO.getCt1());
|
||||
waveTypeVO.setCt2(lineInfoVO.getCt2());
|
||||
waveTypeVO.setPt1(lineInfoVO.getPt1());
|
||||
waveTypeVO.setPt2(lineInfoVO.getPt2());
|
||||
waveTypeVO.setRunFlag(lineInfoVO.getRunFlag());
|
||||
waveTypeVO.setComFlag(lineInfoVO.getComFlag());
|
||||
waveTypeVO.setIp(lineInfoVO.getIp());
|
||||
waveTypeVO.setLat(lineInfoVO.getLat());
|
||||
waveTypeVO.setLng(lineInfoVO.getLng());
|
||||
waveTypeVO.setManufacturer(lineInfoVO.getManufacturer());
|
||||
waveTypeVO.setVoltageScale(lineInfoVO.getVoltageScale());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//抛出异常,当前监测点id为空
|
||||
throw new BusinessException(EventResponseEnum.EVENT_NOT_FOUND);
|
||||
}
|
||||
}
|
||||
|
||||
//使用字典表对暂态类型和暂态原因进行转换
|
||||
HttpResult<List<DictData>> reason = dicDataFeignClient.getDicDataByTypeName(DicDataTypeEnum.EVENT_REASON.getName());
|
||||
HttpResult<List<DictData>> type = dicDataFeignClient.getDicDataByTypeName(DicDataTypeEnum.EVENT_TYPE.getName());
|
||||
//获取字典数据暂态原因集合
|
||||
List<DictData> eventReasonList = reason.getData();
|
||||
//System.out.println(eventReasonList);
|
||||
//获取字典数据暂态类型集合
|
||||
List<DictData> eventTypeList = type.getData();
|
||||
//System.out.println(eventTypeList);
|
||||
|
||||
|
||||
//查询字典表替换事件原因与事件类型的字符串
|
||||
for (WaveTypeVO eventDetail : eventDetailList) {
|
||||
if (eventDetail.getEventReason() != null) {
|
||||
for (DictData dictData : eventReasonList) {
|
||||
//将字典数据id与VO中属性eventReason对应的字符串进行比较
|
||||
if (eventDetail.getEventReason().equals(dictData.getId())) {
|
||||
eventDetail.setEventReason(dictData.getName());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//抛出异常,当前暂态原因为空
|
||||
throw new BusinessException(EventResponseEnum.EVENT_REASON_NOT_FOUND);
|
||||
}
|
||||
}
|
||||
|
||||
for (WaveTypeVO eventDetail : eventDetailList) {
|
||||
if (eventDetail.getEventType() != null) {
|
||||
for (DictData dictData : eventTypeList) {
|
||||
//将字典数据id与VO中属性eventType对应的字符串进行比较
|
||||
if (eventDetail.getEventType().equals(dictData.getId())) {
|
||||
eventDetail.setEventType(dictData.getName());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//抛出异常,当前暂态类型为空
|
||||
throw new BusinessException(EventResponseEnum.EVENT_TYPE_NOT_FOUND);
|
||||
}
|
||||
}
|
||||
Page<WaveTypeVO> page = new Page<>();
|
||||
page.setTotal(eventDetailList.size());
|
||||
page.setRecords(eventDetailList);
|
||||
page.setCurrent(eventBaseParam.getPageNum());
|
||||
page.setSize(eventBaseParam.getPageSize());
|
||||
return page;
|
||||
|
||||
|
||||
} else {
|
||||
StringBuilder stringResult = new StringBuilder(Param.SELECT).append(Param.EVENT_DETAIL).append(Param.WHERE).
|
||||
append("time >= '").append(DateUtil.beginOfDay(DateUtil.parse(eventBaseParam.getSearchBeginTime()))).append("' and ").append("time <= '").append(DateUtil.endOfDay(DateUtil.parse(eventBaseParam.getSearchEndTime()))).append("' and ")
|
||||
.append("line_id= '").append(eventBaseParam.getLineId()).append("'");
|
||||
|
||||
|
||||
int i = (eventBaseParam.getPageNum() - 1) * eventBaseParam.getPageSize();
|
||||
|
||||
stringResult.append("LIMIT ").append(eventBaseParam.getPageSize()).append(" OFFSET ").append(i).append(" tz('Asia/Shanghai')");
|
||||
|
||||
//查询sql语句总条数
|
||||
stringTotal = new StringBuilder("SELECT COUNT(num) as aa FROM ").append(Param.EVENT_DETAIL).append(" WHERE ").append("time >= '").append(DateUtil.beginOfDay(DateUtil.parse(eventBaseParam.getSearchBeginTime()))).append("' and ")
|
||||
.append("time <= '").append(DateUtil.endOfDay(DateUtil.parse(eventBaseParam.getSearchEndTime()))).append("' and ");
|
||||
stringTotal.append("line_id= '").append(eventBaseParam.getLineId()).append("' tz('Asia/Shanghai')");
|
||||
|
||||
|
||||
//结果集
|
||||
QueryResult result = influxDbUtils.query(stringResult.toString());
|
||||
//总条数
|
||||
QueryResult resultTotal = influxDbUtils.query(stringTotal.toString());
|
||||
|
||||
//结果集映射到对象中
|
||||
InfluxDBResultMapper influxDBResultMapper = new InfluxDBResultMapper();
|
||||
eventDetailList = influxDBResultMapper.toPOJO(result, WaveTypeVO.class);
|
||||
|
||||
|
||||
//获取关于监测点发电站相关信息
|
||||
HttpResult<List<AreaLineInfoVO>> baseLineAreaInfo = lineFeignClient.getBaseLineAreaInfo(lineIds);
|
||||
System.out.println(baseLineAreaInfo);
|
||||
//将返回的封装好的结果集进行还原成集合
|
||||
List<AreaLineInfoVO> areaLineList = baseLineAreaInfo.getData();
|
||||
|
||||
|
||||
//将监测点发电机相关信息copy到准备好的VO对象中
|
||||
for (WaveTypeVO waveTypeVO : eventDetailList) {
|
||||
if (waveTypeVO.getLineId() != null) {
|
||||
for (AreaLineInfoVO lineInfoVO : areaLineList) {
|
||||
if (waveTypeVO.getLineId().equals(lineInfoVO.getLineId())) {
|
||||
waveTypeVO.setSubName(lineInfoVO.getSubName());
|
||||
waveTypeVO.setLineId(lineInfoVO.getLineId());
|
||||
waveTypeVO.setLineName(lineInfoVO.getLineName());
|
||||
waveTypeVO.setGdId(lineInfoVO.getGdId());
|
||||
waveTypeVO.setGdName(lineInfoVO.getGdName());
|
||||
waveTypeVO.setVoltageId(lineInfoVO.getVoltageId());
|
||||
waveTypeVO.setNoDealCount(lineInfoVO.getNoDealCount());
|
||||
waveTypeVO.setCt1(lineInfoVO.getCt1());
|
||||
waveTypeVO.setCt2(lineInfoVO.getCt2());
|
||||
waveTypeVO.setPt1(lineInfoVO.getPt1());
|
||||
waveTypeVO.setPt2(lineInfoVO.getPt2());
|
||||
waveTypeVO.setRunFlag(lineInfoVO.getRunFlag());
|
||||
waveTypeVO.setComFlag(lineInfoVO.getComFlag());
|
||||
waveTypeVO.setIp(lineInfoVO.getIp());
|
||||
waveTypeVO.setLat(lineInfoVO.getLat());
|
||||
waveTypeVO.setLng(lineInfoVO.getLng());
|
||||
waveTypeVO.setManufacturer(lineInfoVO.getManufacturer());
|
||||
waveTypeVO.setVoltageScale(lineInfoVO.getVoltageScale());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//抛出异常,当前监测点id为空
|
||||
throw new BusinessException(EventResponseEnum.EVENT_NOT_FOUND);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//使用字典表对暂态类型和暂态原因进行转换
|
||||
HttpResult<List<DictData>> reason = dicDataFeignClient.getDicDataByTypeName(DicDataTypeEnum.EVENT_REASON.getName());
|
||||
HttpResult<List<DictData>> type = dicDataFeignClient.getDicDataByTypeName(DicDataTypeEnum.EVENT_TYPE.getName());
|
||||
//获取字典数据暂态原因集合
|
||||
List<DictData> eventReasonList = reason.getData();
|
||||
//System.out.println(eventReasonList);
|
||||
//获取字典数据暂态类型集合
|
||||
List<DictData> eventTypeList = type.getData();
|
||||
//System.out.println(eventTypeList);
|
||||
|
||||
|
||||
//查询字典表替换事件原因与事件类型的字符串
|
||||
for (WaveTypeVO eventDetail : eventDetailList) {
|
||||
if (eventDetail.getEventReason() != null) {
|
||||
for (DictData dictData : eventReasonList) {
|
||||
//将字典数据id与VO中属性eventReason对应的字符串进行比较
|
||||
if (eventDetail.getEventReason().equals(dictData.getId())) {
|
||||
eventDetail.setEventReason(dictData.getName());
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//抛出异常,当前暂态原因为空
|
||||
throw new BusinessException(EventResponseEnum.EVENT_REASON_NOT_FOUND);
|
||||
}
|
||||
|
||||
if (eventDetail.getEventType() != null) {
|
||||
for (DictData dictData : eventTypeList) {
|
||||
//将字典数据id与VO中属性eventType对应的字符串进行比较
|
||||
if (eventDetail.getEventType().equals(dictData.getId())) {
|
||||
eventDetail.setEventType(dictData.getName());
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//抛出异常,当前暂态类型为空
|
||||
throw new BusinessException(EventResponseEnum.EVENT_TYPE_NOT_FOUND);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Page<WaveTypeVO> page = new Page<>();
|
||||
long total = eventDetailList.size();
|
||||
page.setTotal(total);
|
||||
page.setRecords(eventDetailList);
|
||||
page.setCurrent(eventBaseParam.getPageNum());
|
||||
page.setSize(eventBaseParam.getPageSize());
|
||||
return page;
|
||||
);
|
||||
//获取关于监测点发电站相关信息
|
||||
List<AreaLineInfoVO> areaLineList = lineFeignClient.getBaseLineAreaInfo(Arrays.asList(eventBaseParam.getLineId())).getData();
|
||||
if(CollectionUtil.isNotEmpty(areaLineList)){
|
||||
throw new BusinessException(EventResponseEnum.NOT_FOUND);
|
||||
}
|
||||
List<WaveTypeVO> waveTypeVOS = new ArrayList<>();
|
||||
|
||||
List<RmpEventDetailPO> records = pageInfo.getRecords();
|
||||
WaveTypeVO waveTypeVO;
|
||||
//将监测点发电机相关信息copy到准备好的VO对象中
|
||||
for (RmpEventDetailPO record : records) {
|
||||
waveTypeVO=BeanUtil.copyProperties(record,WaveTypeVO.class);
|
||||
if (waveTypeVO.getLineId() != null) {
|
||||
for (AreaLineInfoVO lineInfoVO : areaLineList) {
|
||||
if (waveTypeVO.getLineId().equals(lineInfoVO.getLineId())) {
|
||||
waveTypeVO.setSubName(lineInfoVO.getSubName());
|
||||
waveTypeVO.setLineId(lineInfoVO.getLineId());
|
||||
waveTypeVO.setLineName(lineInfoVO.getLineName());
|
||||
waveTypeVO.setGdId(lineInfoVO.getGdId());
|
||||
waveTypeVO.setGdName(lineInfoVO.getGdName());
|
||||
waveTypeVO.setVoltageId(lineInfoVO.getVoltageId());
|
||||
waveTypeVO.setNoDealCount(lineInfoVO.getNoDealCount());
|
||||
waveTypeVO.setCt1(lineInfoVO.getCt1());
|
||||
waveTypeVO.setCt2(lineInfoVO.getCt2());
|
||||
waveTypeVO.setPt1(lineInfoVO.getPt1());
|
||||
waveTypeVO.setPt2(lineInfoVO.getPt2());
|
||||
waveTypeVO.setRunFlag(lineInfoVO.getRunFlag());
|
||||
waveTypeVO.setComFlag(lineInfoVO.getComFlag());
|
||||
waveTypeVO.setIp(lineInfoVO.getIp());
|
||||
waveTypeVO.setLat(lineInfoVO.getLat());
|
||||
waveTypeVO.setLng(lineInfoVO.getLng());
|
||||
waveTypeVO.setManufacturer(lineInfoVO.getManufacturer());
|
||||
waveTypeVO.setVoltageScale(lineInfoVO.getVoltageScale());
|
||||
waveTypeVOS.add(waveTypeVO);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//抛出异常,当前监测点id为空
|
||||
throw new BusinessException(EventResponseEnum.EVENT_NOT_FOUND);
|
||||
}
|
||||
}
|
||||
Page<WaveTypeVO> page=BeanUtil.copyProperties(pageInfo,Page.class);
|
||||
page.setRecords(waveTypeVOS);
|
||||
return page;
|
||||
// //提前创建结果集合
|
||||
// List<WaveTypeVO> eventDetailList = new ArrayList<>();
|
||||
//
|
||||
// //创建line_id集合,将入参line_id塞进去
|
||||
// List<String> lineIds = new ArrayList<>();
|
||||
// lineIds.add(eventBaseParam.getLineId());
|
||||
//
|
||||
// //提前创建total
|
||||
// StringBuilder stringTotal = new StringBuilder();
|
||||
//
|
||||
//
|
||||
// //查询参数不为空,进行条件填充
|
||||
// if (ObjectUtil.isNotNull(eventBaseParam.getSearchValue())) {
|
||||
// //查询sql语句
|
||||
// StringBuilder stringResult = new StringBuilder(Param.SELECT).append(Param.EVENT_DETAIL).append(Param.WHERE).
|
||||
// append("time >= '").append(DateUtil.beginOfDay(DateUtil.parse(eventBaseParam.getSearchBeginTime()))).append("' and ").append("time <= '").append(DateUtil.endOfDay(DateUtil.parse(eventBaseParam.getSearchEndTime()))).append("' and ")
|
||||
// .append("line_id= '").append(eventBaseParam.getLineId()).append("'");
|
||||
//
|
||||
// //套用公式(page-1)*pageSize
|
||||
// int i = (eventBaseParam.getPageNum() - 1) * eventBaseParam.getPageSize();
|
||||
// //拼接分页sql
|
||||
// stringResult.append("LIMIT ").append(eventBaseParam.getPageSize()).append(" OFFSET ").append(i).append(" tz('Asia/Shanghai')");
|
||||
//
|
||||
//
|
||||
// //查询sql语句总条数
|
||||
// stringTotal = new StringBuilder("SELECT COUNT(num) as aa FROM ").append(Param.EVENT_DETAIL).append(" WHERE ").append("time >= '").append(DateUtil.beginOfDay(DateUtil.parse(eventBaseParam.getSearchBeginTime()))).append("' and ")
|
||||
// .append("time <= '").append(DateUtil.endOfDay(DateUtil.parse(eventBaseParam.getSearchEndTime()))).append("' and ");
|
||||
// stringTotal.append("line_id= '").append(eventBaseParam.getLineId()).append("' tz('Asia/Shanghai')");
|
||||
//
|
||||
// //结果集
|
||||
// QueryResult result = influxDbUtils.query(stringResult.toString());
|
||||
// //总条数
|
||||
// QueryResult resultTotal = influxDbUtils.query(stringTotal.toString());
|
||||
//
|
||||
// //结果集映射到对象中
|
||||
// InfluxDBResultMapper influxDBResultMapper = new InfluxDBResultMapper();
|
||||
// eventDetailList = influxDBResultMapper.toPOJO(result, WaveTypeVO.class);
|
||||
//
|
||||
//
|
||||
// //获取关于监测点发电站相关信息
|
||||
// HttpResult<List<AreaLineInfoVO>> baseLineAreaInfo = lineFeignClient.getBaseLineAreaInfo(lineIds);
|
||||
// System.out.println(baseLineAreaInfo);
|
||||
// //将返回的封装好的结果集进行还原成集合
|
||||
// List<AreaLineInfoVO> areaLineList = baseLineAreaInfo.getData();
|
||||
//
|
||||
//
|
||||
// //将监测点发电机相关信息copy到准备好的VO对象中
|
||||
// for (WaveTypeVO waveTypeVO : eventDetailList) {
|
||||
// if (waveTypeVO.getLineId() != null) {
|
||||
// for (AreaLineInfoVO lineInfoVO : areaLineList) {
|
||||
// if (waveTypeVO.getLineId().equals(lineInfoVO.getLineId())) {
|
||||
// waveTypeVO.setSubName(lineInfoVO.getSubName());
|
||||
// waveTypeVO.setLineId(lineInfoVO.getLineId());
|
||||
// waveTypeVO.setLineName(lineInfoVO.getLineName());
|
||||
// waveTypeVO.setGdId(lineInfoVO.getGdId());
|
||||
// waveTypeVO.setGdName(lineInfoVO.getGdName());
|
||||
// waveTypeVO.setVoltageId(lineInfoVO.getVoltageId());
|
||||
// waveTypeVO.setNoDealCount(lineInfoVO.getNoDealCount());
|
||||
// waveTypeVO.setCt1(lineInfoVO.getCt1());
|
||||
// waveTypeVO.setCt2(lineInfoVO.getCt2());
|
||||
// waveTypeVO.setPt1(lineInfoVO.getPt1());
|
||||
// waveTypeVO.setPt2(lineInfoVO.getPt2());
|
||||
// waveTypeVO.setRunFlag(lineInfoVO.getRunFlag());
|
||||
// waveTypeVO.setComFlag(lineInfoVO.getComFlag());
|
||||
// waveTypeVO.setIp(lineInfoVO.getIp());
|
||||
// waveTypeVO.setLat(lineInfoVO.getLat());
|
||||
// waveTypeVO.setLng(lineInfoVO.getLng());
|
||||
// waveTypeVO.setManufacturer(lineInfoVO.getManufacturer());
|
||||
// waveTypeVO.setVoltageScale(lineInfoVO.getVoltageScale());
|
||||
// }
|
||||
// }
|
||||
// } else {
|
||||
// //抛出异常,当前监测点id为空
|
||||
// throw new BusinessException(EventResponseEnum.EVENT_NOT_FOUND);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// //使用字典表对暂态类型和暂态原因进行转换
|
||||
// HttpResult<List<DictData>> reason = dicDataFeignClient.getDicDataByTypeName(DicDataTypeEnum.EVENT_REASON.getName());
|
||||
// HttpResult<List<DictData>> type = dicDataFeignClient.getDicDataByTypeName(DicDataTypeEnum.EVENT_TYPE.getName());
|
||||
// //获取字典数据暂态原因集合
|
||||
// List<DictData> eventReasonList = reason.getData();
|
||||
// //System.out.println(eventReasonList);
|
||||
// //获取字典数据暂态类型集合
|
||||
// List<DictData> eventTypeList = type.getData();
|
||||
// //System.out.println(eventTypeList);
|
||||
//
|
||||
//
|
||||
// //查询字典表替换事件原因与事件类型的字符串
|
||||
// for (WaveTypeVO eventDetail : eventDetailList) {
|
||||
// if (eventDetail.getEventReason() != null) {
|
||||
// for (DictData dictData : eventReasonList) {
|
||||
// //将字典数据id与VO中属性eventReason对应的字符串进行比较
|
||||
// if (eventDetail.getEventReason().equals(dictData.getId())) {
|
||||
// eventDetail.setEventReason(dictData.getName());
|
||||
// }
|
||||
// }
|
||||
// } else {
|
||||
// //抛出异常,当前暂态原因为空
|
||||
// throw new BusinessException(EventResponseEnum.EVENT_REASON_NOT_FOUND);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// for (WaveTypeVO eventDetail : eventDetailList) {
|
||||
// if (eventDetail.getEventType() != null) {
|
||||
// for (DictData dictData : eventTypeList) {
|
||||
// //将字典数据id与VO中属性eventType对应的字符串进行比较
|
||||
// if (eventDetail.getEventType().equals(dictData.getId())) {
|
||||
// eventDetail.setEventType(dictData.getName());
|
||||
// }
|
||||
// }
|
||||
// } else {
|
||||
// //抛出异常,当前暂态类型为空
|
||||
// throw new BusinessException(EventResponseEnum.EVENT_TYPE_NOT_FOUND);
|
||||
// }
|
||||
// }
|
||||
// Page<WaveTypeVO> page = new Page<>();
|
||||
// page.setTotal(eventDetailList.size());
|
||||
// page.setRecords(eventDetailList);
|
||||
// page.setCurrent(eventBaseParam.getPageNum());
|
||||
// page.setSize(eventBaseParam.getPageSize());
|
||||
// return page;
|
||||
//
|
||||
//
|
||||
// } else {
|
||||
// StringBuilder stringResult = new StringBuilder(Param.SELECT).append(Param.EVENT_DETAIL).append(Param.WHERE).
|
||||
// append("time >= '").append(DateUtil.beginOfDay(DateUtil.parse(eventBaseParam.getSearchBeginTime()))).append("' and ").append("time <= '").append(DateUtil.endOfDay(DateUtil.parse(eventBaseParam.getSearchEndTime()))).append("' and ")
|
||||
// .append("line_id= '").append(eventBaseParam.getLineId()).append("'");
|
||||
//
|
||||
//
|
||||
// int i = (eventBaseParam.getPageNum() - 1) * eventBaseParam.getPageSize();
|
||||
//
|
||||
// stringResult.append("LIMIT ").append(eventBaseParam.getPageSize()).append(" OFFSET ").append(i).append(" tz('Asia/Shanghai')");
|
||||
//
|
||||
// //查询sql语句总条数
|
||||
// stringTotal = new StringBuilder("SELECT COUNT(num) as aa FROM ").append(Param.EVENT_DETAIL).append(" WHERE ").append("time >= '").append(DateUtil.beginOfDay(DateUtil.parse(eventBaseParam.getSearchBeginTime()))).append("' and ")
|
||||
// .append("time <= '").append(DateUtil.endOfDay(DateUtil.parse(eventBaseParam.getSearchEndTime()))).append("' and ");
|
||||
// stringTotal.append("line_id= '").append(eventBaseParam.getLineId()).append("' tz('Asia/Shanghai')");
|
||||
//
|
||||
//
|
||||
// //结果集
|
||||
// QueryResult result = influxDbUtils.query(stringResult.toString());
|
||||
// //总条数
|
||||
// QueryResult resultTotal = influxDbUtils.query(stringTotal.toString());
|
||||
//
|
||||
// //结果集映射到对象中
|
||||
// InfluxDBResultMapper influxDBResultMapper = new InfluxDBResultMapper();
|
||||
// eventDetailList = influxDBResultMapper.toPOJO(result, WaveTypeVO.class);
|
||||
//
|
||||
//
|
||||
// //获取关于监测点发电站相关信息
|
||||
// HttpResult<List<AreaLineInfoVO>> baseLineAreaInfo = lineFeignClient.getBaseLineAreaInfo(lineIds);
|
||||
// System.out.println(baseLineAreaInfo);
|
||||
// //将返回的封装好的结果集进行还原成集合
|
||||
// List<AreaLineInfoVO> areaLineList = baseLineAreaInfo.getData();
|
||||
//
|
||||
//
|
||||
// //将监测点发电机相关信息copy到准备好的VO对象中
|
||||
// for (WaveTypeVO waveTypeVO : eventDetailList) {
|
||||
// if (waveTypeVO.getLineId() != null) {
|
||||
// for (AreaLineInfoVO lineInfoVO : areaLineList) {
|
||||
// if (waveTypeVO.getLineId().equals(lineInfoVO.getLineId())) {
|
||||
// waveTypeVO.setSubName(lineInfoVO.getSubName());
|
||||
// waveTypeVO.setLineId(lineInfoVO.getLineId());
|
||||
// waveTypeVO.setLineName(lineInfoVO.getLineName());
|
||||
// waveTypeVO.setGdId(lineInfoVO.getGdId());
|
||||
// waveTypeVO.setGdName(lineInfoVO.getGdName());
|
||||
// waveTypeVO.setVoltageId(lineInfoVO.getVoltageId());
|
||||
// waveTypeVO.setNoDealCount(lineInfoVO.getNoDealCount());
|
||||
// waveTypeVO.setCt1(lineInfoVO.getCt1());
|
||||
// waveTypeVO.setCt2(lineInfoVO.getCt2());
|
||||
// waveTypeVO.setPt1(lineInfoVO.getPt1());
|
||||
// waveTypeVO.setPt2(lineInfoVO.getPt2());
|
||||
// waveTypeVO.setRunFlag(lineInfoVO.getRunFlag());
|
||||
// waveTypeVO.setComFlag(lineInfoVO.getComFlag());
|
||||
// waveTypeVO.setIp(lineInfoVO.getIp());
|
||||
// waveTypeVO.setLat(lineInfoVO.getLat());
|
||||
// waveTypeVO.setLng(lineInfoVO.getLng());
|
||||
// waveTypeVO.setManufacturer(lineInfoVO.getManufacturer());
|
||||
// waveTypeVO.setVoltageScale(lineInfoVO.getVoltageScale());
|
||||
// }
|
||||
// }
|
||||
// } else {
|
||||
// //抛出异常,当前监测点id为空
|
||||
// throw new BusinessException(EventResponseEnum.EVENT_NOT_FOUND);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
//
|
||||
// //使用字典表对暂态类型和暂态原因进行转换
|
||||
// HttpResult<List<DictData>> reason = dicDataFeignClient.getDicDataByTypeName(DicDataTypeEnum.EVENT_REASON.getName());
|
||||
// HttpResult<List<DictData>> type = dicDataFeignClient.getDicDataByTypeName(DicDataTypeEnum.EVENT_TYPE.getName());
|
||||
// //获取字典数据暂态原因集合
|
||||
// List<DictData> eventReasonList = reason.getData();
|
||||
// //System.out.println(eventReasonList);
|
||||
// //获取字典数据暂态类型集合
|
||||
// List<DictData> eventTypeList = type.getData();
|
||||
// //System.out.println(eventTypeList);
|
||||
//
|
||||
//
|
||||
// //查询字典表替换事件原因与事件类型的字符串
|
||||
// for (WaveTypeVO eventDetail : eventDetailList) {
|
||||
// if (eventDetail.getEventReason() != null) {
|
||||
// for (DictData dictData : eventReasonList) {
|
||||
// //将字典数据id与VO中属性eventReason对应的字符串进行比较
|
||||
// if (eventDetail.getEventReason().equals(dictData.getId())) {
|
||||
// eventDetail.setEventReason(dictData.getName());
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// } else {
|
||||
// //抛出异常,当前暂态原因为空
|
||||
// throw new BusinessException(EventResponseEnum.EVENT_REASON_NOT_FOUND);
|
||||
// }
|
||||
//
|
||||
// if (eventDetail.getEventType() != null) {
|
||||
// for (DictData dictData : eventTypeList) {
|
||||
// //将字典数据id与VO中属性eventType对应的字符串进行比较
|
||||
// if (eventDetail.getEventType().equals(dictData.getId())) {
|
||||
// eventDetail.setEventType(dictData.getName());
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// } else {
|
||||
// //抛出异常,当前暂态类型为空
|
||||
// throw new BusinessException(EventResponseEnum.EVENT_TYPE_NOT_FOUND);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
//
|
||||
// Page<WaveTypeVO> page = new Page<>();
|
||||
// long total = eventDetailList.size();
|
||||
// page.setTotal(total);
|
||||
// page.setRecords(eventDetailList);
|
||||
// page.setCurrent(eventBaseParam.getPageNum());
|
||||
// page.setSize(eventBaseParam.getPageSize());
|
||||
// return page;
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
@@ -1782,11 +1856,11 @@ public class EventAnalysisServiceImpl implements EventAnalysisService {
|
||||
//根据监测点id获取监测点详情
|
||||
LineDetailDataVO lineDetailData = lineFeignClient.getLineDetailData(lineId.get(i)).getData();
|
||||
EventDetail eventDetailByTime = eventDetailService.getEventDetailByTime(lineId.get(i), timeId.get(i));
|
||||
if (Objects.isNull(lineDetailData.getIp()) && Objects.isNull(eventDetailByTime.getWaveName())) {
|
||||
if (Objects.isNull(lineDetailData.getIp()) && Objects.isNull(eventDetailByTime.getWavePath())) {
|
||||
throw new BusinessException(EventResponseEnum.EVENT_NOT_FOUND);
|
||||
}
|
||||
String ip = lineDetailData.getIp();
|
||||
String waveName = eventDetailByTime.getWaveName();
|
||||
String waveName = eventDetailByTime.getWavePath();
|
||||
|
||||
// TODO 1
|
||||
File srcCFGFile = new File(generalInfo.getBusinessWavePath() + File.separator + ip + File.separator + waveName + ".CFG");
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
package com.njcn.event.service.majornetwork.Impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.njcn.event.mapper.majornetwork.EventDetailMapper;
|
||||
import com.njcn.event.pojo.po.EventDetail;
|
||||
@@ -32,18 +36,26 @@ public class EventDetailServiceImpl extends ServiceImpl<EventDetailMapper, RmpEv
|
||||
|
||||
@Override
|
||||
public List<EventDetail> getEventDetailData(String id, String startTime, String endTime) {
|
||||
//组装sql语句
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
stringBuilder.append("time >= '").append(DateUtil.beginOfDay(DateUtil.parse(startTime))).append("' and ").append("time <= '").append(DateUtil.endOfDay(DateUtil.parse(endTime))).append("' and ");
|
||||
//sql语句
|
||||
stringBuilder.append("line_id ='").append(id).append("'").append(" tz('Asia/Shanghai')");
|
||||
//数据暂降查询
|
||||
List<RmpEventDetailPO> info = this.list(new LambdaQueryWrapper<RmpEventDetailPO>()
|
||||
.eq(RmpEventDetailPO::getMeasurementPointId, id)
|
||||
.ge(StrUtil.isNotBlank(startTime), RmpEventDetailPO::getStartTime,DateUtil.beginOfDay(DateUtil.parse(startTime)))
|
||||
.le(StrUtil.isNotBlank(endTime), RmpEventDetailPO::getStartTime, DateUtil.endOfDay(DateUtil.parse(endTime)))
|
||||
);
|
||||
return BeanUtil.copyToList(info, EventDetail.class);
|
||||
|
||||
String sql = "select * from pqs_eventdetail where " + stringBuilder;
|
||||
//获取暂降事件
|
||||
QueryResult result = influxDbUtils.query(sql);
|
||||
InfluxDBResultMapper influxDBResultMapper = new InfluxDBResultMapper();
|
||||
List<EventDetail> eventDetailList = influxDBResultMapper.toPOJO(result, EventDetail.class);
|
||||
return eventDetailList;
|
||||
// //组装sql语句
|
||||
// StringBuilder stringBuilder = new StringBuilder();
|
||||
// stringBuilder.append("time >= '").append(DateUtil.beginOfDay(DateUtil.parse(startTime))).append("' and ").append("time <= '").append(DateUtil.endOfDay(DateUtil.parse(endTime))).append("' and ");
|
||||
// //sql语句
|
||||
// stringBuilder.append("line_id ='").append(id).append("'").append(" tz('Asia/Shanghai')");
|
||||
//
|
||||
// String sql = "select * from pqs_eventdetail where " + stringBuilder;
|
||||
// //获取暂降事件
|
||||
// QueryResult result = influxDbUtils.query(sql);
|
||||
// InfluxDBResultMapper influxDBResultMapper = new InfluxDBResultMapper();
|
||||
// List<EventDetail> eventDetailList = influxDBResultMapper.toPOJO(result, EventDetail.class);
|
||||
// return eventDetailList;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -99,38 +111,47 @@ public class EventDetailServiceImpl extends ServiceImpl<EventDetailMapper, RmpEv
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<EventDetail> getEventDetailLimit(List<String> lineIndexes, String startTime, String endTime, Integer pageSize, Integer pageNum, List<Integer> waveType) {
|
||||
//组装sql语句
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
stringBuilder.append("time >= '").append(DateUtil.beginOfDay(DateUtil.parse(startTime))).append("' and ").append("time <= '").append(DateUtil.endOfDay(DateUtil.parse(endTime))).append("' and (");
|
||||
for (int i = 0; i < lineIndexes.size(); i++) {
|
||||
if (lineIndexes.size() - i != 1) {
|
||||
stringBuilder.append("line_id ='").append(lineIndexes.get(i)).append("' or ");
|
||||
} else {
|
||||
stringBuilder.append("line_id ='").append(lineIndexes.get(i)).append("' ");
|
||||
}
|
||||
}
|
||||
stringBuilder.append(") and (");
|
||||
for (int i = 0; i < waveType.size(); i++) {
|
||||
if (waveType.size() - i != 1) {
|
||||
stringBuilder.append("wave_type ='").append(waveType.get(i)).append("' or ");
|
||||
} else {
|
||||
stringBuilder.append("wave_type ='").append(waveType.get(i)).append("' ");
|
||||
}
|
||||
}
|
||||
stringBuilder.append(") order by time desc");
|
||||
int i = (pageNum - 1)*pageSize;
|
||||
stringBuilder.append(" LIMIT ").append(pageSize).append(" OFFSET ").append(i).append(" tz('Asia/Shanghai')");
|
||||
//sql语句
|
||||
String sql = "SELECT * FROM pqs_eventdetail WHERE " + stringBuilder;
|
||||
System.out.println(sql);
|
||||
//结果集
|
||||
QueryResult result = influxDbUtils.query(sql);
|
||||
//结果集映射到对象中
|
||||
InfluxDBResultMapper influxDBResultMapper = new InfluxDBResultMapper();
|
||||
List<EventDetail> eventDetailList = influxDBResultMapper.toPOJO(result, EventDetail.class);
|
||||
public List<EventDetail> getEventDetailLimit(List<String> lineIndexes, String startTime, String endTime, Integer pageSize, Integer pageNum, List<String> waveType) {
|
||||
|
||||
return eventDetailList;
|
||||
Page<RmpEventDetailPO> pageInfo = this.page(new Page<>(pageNum, pageSize), new LambdaQueryWrapper<RmpEventDetailPO>()
|
||||
.in(RmpEventDetailPO::getMeasurementPointId, lineIndexes)
|
||||
.ge(StrUtil.isNotBlank(startTime), RmpEventDetailPO::getStartTime,DateUtil.beginOfDay(DateUtil.parse(startTime)))
|
||||
.le(StrUtil.isNotBlank(endTime), RmpEventDetailPO::getStartTime, DateUtil.endOfDay(DateUtil.parse(endTime)))
|
||||
);
|
||||
|
||||
return BeanUtil.copyToList(pageInfo.getRecords(), EventDetail.class);
|
||||
|
||||
// //组装sql语句
|
||||
// StringBuilder stringBuilder = new StringBuilder();
|
||||
// stringBuilder.append("time >= '").append(DateUtil.beginOfDay(DateUtil.parse(startTime))).append("' and ").append("time <= '").append(DateUtil.endOfDay(DateUtil.parse(endTime))).append("' and (");
|
||||
// for (int i = 0; i < lineIndexes.size(); i++) {
|
||||
// if (lineIndexes.size() - i != 1) {
|
||||
// stringBuilder.append("line_id ='").append(lineIndexes.get(i)).append("' or ");
|
||||
// } else {
|
||||
// stringBuilder.append("line_id ='").append(lineIndexes.get(i)).append("' ");
|
||||
// }
|
||||
// }
|
||||
// stringBuilder.append(") and (");
|
||||
// for (int i = 0; i < waveType.size(); i++) {
|
||||
// if (waveType.size() - i != 1) {
|
||||
// stringBuilder.append("wave_type ='").append(waveType.get(i)).append("' or ");
|
||||
// } else {
|
||||
// stringBuilder.append("wave_type ='").append(waveType.get(i)).append("' ");
|
||||
// }
|
||||
// }
|
||||
// stringBuilder.append(") order by time desc");
|
||||
// int i = (pageNum - 1)*pageSize;
|
||||
// stringBuilder.append(" LIMIT ").append(pageSize).append(" OFFSET ").append(i).append(" tz('Asia/Shanghai')");
|
||||
// //sql语句
|
||||
// String sql = "SELECT * FROM pqs_eventdetail WHERE " + stringBuilder;
|
||||
// System.out.println(sql);
|
||||
// //结果集
|
||||
// QueryResult result = influxDbUtils.query(sql);
|
||||
// //结果集映射到对象中
|
||||
// InfluxDBResultMapper influxDBResultMapper = new InfluxDBResultMapper();
|
||||
// List<EventDetail> eventDetailList = influxDBResultMapper.toPOJO(result, EventDetail.class);
|
||||
//
|
||||
// return eventDetailList;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -325,8 +325,8 @@ public class EventDistributionStatisticsServiceImpl implements EventDistribution
|
||||
eventFeatureAmplitudeCurve.setFeatureAmplitude(dto.getFeatureAmplitude());
|
||||
eventFeatureAmplitudeCurve.setDuration(dto.getDuration());
|
||||
|
||||
eventFeatureAmplitudeCurve.setStartTime(LocalDateTime.ofInstant(dto.getStartTime().toInstant(), ZoneId.systemDefault()));
|
||||
|
||||
// eventFeatureAmplitudeCurve.setStartTime(LocalDateTime.ofInstant(dto.getStartTime().toInstant(), ZoneId.systemDefault()));
|
||||
eventFeatureAmplitudeCurve.setStartTime(LocalDateTime.parse( dto.getStartTime()));
|
||||
return eventFeatureAmplitudeCurve;
|
||||
})
|
||||
//.sorted(VoltageToleranceCurveDataList.sortAscTime())
|
||||
|
||||
@@ -46,8 +46,8 @@ public class EventReportServiceImpl implements EventReportService {
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < info.size(); i++) {
|
||||
Double eventvalue = info.get(i).getEventValue();
|
||||
double persisttime = info.get(i).getPersistTime();
|
||||
Double eventvalue = info.get(i).getFeatureAmplitude();
|
||||
double persisttime = info.get(i).getDuration();
|
||||
if (eventvalue * 100 < 10) {
|
||||
if (persisttime < 20) {
|
||||
arr[4][0]++;
|
||||
@@ -158,8 +158,8 @@ public class EventReportServiceImpl implements EventReportService {
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < info.size(); i++) {
|
||||
Double eventvalue = info.get(i).getEventValue();
|
||||
double persisttime = info.get(i).getPersistTime();
|
||||
Double eventvalue = info.get(i).getFeatureAmplitude();
|
||||
double persisttime = info.get(i).getDuration();
|
||||
if (eventvalue * 100 < 1) {
|
||||
if (persisttime < 20 && persisttime >= 10) {
|
||||
arr[2][0]++;
|
||||
@@ -220,8 +220,8 @@ public class EventReportServiceImpl implements EventReportService {
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < info.size(); i++) {
|
||||
Double eventvalue = info.get(i).getEventValue();
|
||||
double persisttime = info.get(i).getPersistTime();
|
||||
Double eventvalue = info.get(i).getFeatureAmplitude();
|
||||
double persisttime = info.get(i).getDuration();
|
||||
if (eventvalue * 100 < 1 && eventvalue * 100 >= 0) {
|
||||
if (persisttime > 10 && persisttime <= 100) {
|
||||
arr[16][0]++;
|
||||
@@ -559,7 +559,7 @@ public class EventReportServiceImpl implements EventReportService {
|
||||
Integer count = 0;
|
||||
for (EventDetail eventDetail : info2) {
|
||||
//过滤掉大于0.9的数据
|
||||
if (eventDetail.getEventValue() <= 0.9) {
|
||||
if (eventDetail.getFeatureAmplitude() <= 0.9) {
|
||||
count++;
|
||||
info.add(eventDetail);
|
||||
}
|
||||
@@ -588,53 +588,53 @@ public class EventReportServiceImpl implements EventReportService {
|
||||
subsectionMap.put("80~90", 0);
|
||||
//求数量
|
||||
for (EventDetail eventDetail : info) {
|
||||
if (eventDetail.getEventValue() < 0.1) {
|
||||
if (eventDetail.getFeatureAmplitude() < 0.1) {
|
||||
countMap.put("<10", (countMap.get("<10") + 1));
|
||||
}
|
||||
if (eventDetail.getEventValue() < 0.2) {
|
||||
if (eventDetail.getFeatureAmplitude() < 0.2) {
|
||||
countMap.put("<20", (countMap.get("<20") + 1));
|
||||
}
|
||||
if (eventDetail.getEventValue() < 0.3) {
|
||||
if (eventDetail.getFeatureAmplitude() < 0.3) {
|
||||
countMap.put("<30", (countMap.get("<30") + 1));
|
||||
}
|
||||
if (eventDetail.getEventValue() < 0.4) {
|
||||
if (eventDetail.getFeatureAmplitude() < 0.4) {
|
||||
countMap.put("<40", (countMap.get("<40") + 1));
|
||||
}
|
||||
if (eventDetail.getEventValue() < 0.5) {
|
||||
if (eventDetail.getFeatureAmplitude() < 0.5) {
|
||||
countMap.put("<50", (countMap.get("<50") + 1));
|
||||
}
|
||||
if (eventDetail.getEventValue() < 0.6) {
|
||||
if (eventDetail.getFeatureAmplitude() < 0.6) {
|
||||
countMap.put("<60", (countMap.get("<60") + 1));
|
||||
}
|
||||
if (eventDetail.getEventValue() < 0.7) {
|
||||
if (eventDetail.getFeatureAmplitude() < 0.7) {
|
||||
countMap.put("<70", (countMap.get("<70") + 1));
|
||||
}
|
||||
if (eventDetail.getEventValue() < 0.8) {
|
||||
if (eventDetail.getFeatureAmplitude() < 0.8) {
|
||||
countMap.put("<80", (countMap.get("<80") + 1));
|
||||
}
|
||||
if (eventDetail.getEventValue() < 0.9) {
|
||||
if (eventDetail.getFeatureAmplitude() < 0.9) {
|
||||
countMap.put("<90", (countMap.get("<90") + 1));
|
||||
}
|
||||
}
|
||||
//求每段数量
|
||||
for (EventDetail eventDetail : info) {
|
||||
if (eventDetail.getEventValue() < 0.1) {
|
||||
if (eventDetail.getFeatureAmplitude() < 0.1) {
|
||||
subsectionMap.put("0~10", (subsectionMap.get("0~10") + 1));
|
||||
} else if (eventDetail.getEventValue() > 0.1 && eventDetail.getEventValue() < 0.2) {
|
||||
} else if (eventDetail.getFeatureAmplitude() > 0.1 && eventDetail.getFeatureAmplitude() < 0.2) {
|
||||
subsectionMap.put("10~20", (subsectionMap.get("10~20") + 1));
|
||||
} else if (eventDetail.getEventValue() > 0.2 && eventDetail.getEventValue() < 0.3) {
|
||||
} else if (eventDetail.getFeatureAmplitude() > 0.2 && eventDetail.getFeatureAmplitude() < 0.3) {
|
||||
subsectionMap.put("20~30", (subsectionMap.get("20~30") + 1));
|
||||
} else if (eventDetail.getEventValue() > 0.3 && eventDetail.getEventValue() < 0.4) {
|
||||
} else if (eventDetail.getFeatureAmplitude() > 0.3 && eventDetail.getFeatureAmplitude() < 0.4) {
|
||||
subsectionMap.put("30~40", (subsectionMap.get("30~40") + 1));
|
||||
} else if (eventDetail.getEventValue() > 0.4 && eventDetail.getEventValue() < 0.5) {
|
||||
} else if (eventDetail.getFeatureAmplitude() > 0.4 && eventDetail.getFeatureAmplitude() < 0.5) {
|
||||
subsectionMap.put("40~50", (subsectionMap.get("40~50") + 1));
|
||||
} else if (eventDetail.getEventValue() > 0.5 && eventDetail.getEventValue() < 0.6) {
|
||||
} else if (eventDetail.getFeatureAmplitude() > 0.5 && eventDetail.getFeatureAmplitude() < 0.6) {
|
||||
subsectionMap.put("50~60", (subsectionMap.get("50~60") + 1));
|
||||
} else if (eventDetail.getEventValue() > 0.6 && eventDetail.getEventValue() < 0.7) {
|
||||
} else if (eventDetail.getFeatureAmplitude() > 0.6 && eventDetail.getFeatureAmplitude() < 0.7) {
|
||||
subsectionMap.put("60~70", (subsectionMap.get("60~70") + 1));
|
||||
} else if (eventDetail.getEventValue() > 0.7 && eventDetail.getEventValue() < 0.8) {
|
||||
} else if (eventDetail.getFeatureAmplitude() > 0.7 && eventDetail.getFeatureAmplitude() < 0.8) {
|
||||
subsectionMap.put("70~80", (subsectionMap.get("70~80") + 1));
|
||||
} else if (eventDetail.getEventValue() > 0.8 && eventDetail.getEventValue() < 0.9) {
|
||||
} else if (eventDetail.getFeatureAmplitude() > 0.8 && eventDetail.getFeatureAmplitude() < 0.9) {
|
||||
subsectionMap.put("80~90", (subsectionMap.get("80~90") + 1));
|
||||
}
|
||||
}
|
||||
@@ -712,7 +712,7 @@ public class EventReportServiceImpl implements EventReportService {
|
||||
timeMap.put("<180", 0);
|
||||
//求不同时间段的总数
|
||||
for (EventDetail eventDetail : info) {
|
||||
Double persistTime = eventDetail.getPersistTime();
|
||||
Double persistTime = eventDetail.getDuration();
|
||||
if (persistTime / 1000 < 0.1) {
|
||||
timeMap.put("<0.1", timeMap.get("<0.1") + 1);
|
||||
} else if (persistTime / 1000 > 0.1 && persistTime / 1000 < 0.25) {
|
||||
@@ -773,7 +773,7 @@ public class EventReportServiceImpl implements EventReportService {
|
||||
//求sisttime
|
||||
List<String> sisttime = new ArrayList<>();
|
||||
for (EventDetail eventDetail : info) {
|
||||
Double persistTime = eventDetail.getPersistTime();
|
||||
Double persistTime = eventDetail.getDuration();
|
||||
if (persistTime / 1000 < 0.1) {
|
||||
timeMap2.put("<0.1", timeMap2.get("<0.1") + 1);
|
||||
}
|
||||
@@ -850,7 +850,7 @@ public class EventReportServiceImpl implements EventReportService {
|
||||
query = MonitorQuery(new StatisticsParam(statisticsParam.getLineIndex(),builder1.toString(), builder2.toString(), statisticsParam.getFlag()));
|
||||
InfluxDBResultMapper influxDBResultMapper = new InfluxDBResultMapper();
|
||||
List<EventDetail> eventDetailList = influxDBResultMapper.toPOJO(query, EventDetail.class);
|
||||
long count = eventDetailList.stream().filter(x -> x.getWaveType() == 1).count();
|
||||
long count = eventDetailList.stream().filter(x -> x.getEventType() == "1").count();
|
||||
if (startMonth < 10) {
|
||||
list.add(new TimeVO(null, null,"", "0" + startMonth.toString(), count+"", startYear.toString(), startYear.toString()+"-"+"0"+startMonth.toString()));
|
||||
} else {
|
||||
@@ -869,7 +869,7 @@ public class EventReportServiceImpl implements EventReportService {
|
||||
query = MonitorQuery(new StatisticsParam(statisticsParam.getLineIndex(),builder1.toString(), builder2.toString(), statisticsParam.getFlag()));
|
||||
InfluxDBResultMapper influxDBResultMapper = new InfluxDBResultMapper();
|
||||
List<EventDetail> eventDetailList = influxDBResultMapper.toPOJO(query, EventDetail.class);
|
||||
long count1 = eventDetailList.stream().filter(x -> x.getWaveType() == 1).count();
|
||||
long count1 = eventDetailList.stream().filter(x -> x.getEventType() == "1").count();
|
||||
if (startMonth < 10) {
|
||||
list.add(new TimeVO(null, null,"", "0" + startMonth.toString(), count1+"", startYear.toString(), startYear.toString()+"-"+"0"+startMonth.toString()));
|
||||
} else {
|
||||
@@ -882,7 +882,7 @@ public class EventReportServiceImpl implements EventReportService {
|
||||
InfluxDBResultMapper influxDBResultMapper = new InfluxDBResultMapper();
|
||||
List<EventDetailNew> eventDetailList = influxDBResultMapper.toPOJO(monitorQuery, EventDetailNew.class);
|
||||
|
||||
Map<String, List<EventDetailNew>> map = eventDetailList.stream().filter(x -> x.getWaveType()=="1").collect(Collectors.groupingBy(s -> s.getTimeId().substring(0, 10)));
|
||||
Map<String, List<EventDetailNew>> map = eventDetailList.stream().filter(x -> x.getEventType()=="1").collect(Collectors.groupingBy(s -> s.getStartTime().substring(0, 10)));
|
||||
Set<String> keySet = map.keySet();
|
||||
|
||||
LocalDate parse1 = LocalDate.parse(startTime);
|
||||
@@ -938,13 +938,13 @@ public class EventReportServiceImpl implements EventReportService {
|
||||
//添加detail
|
||||
for (EventDetail detail : info) {
|
||||
for (DictData data : reasonData) {
|
||||
if (detail.getEventReason().equals(data.getId())) {
|
||||
detail.setEventReason(data.getName());
|
||||
if (detail.getAdvanceReason().equals(data.getId())) {
|
||||
detail.setAdvanceReason(data.getName());
|
||||
}
|
||||
}
|
||||
for (DictData data : typeData) {
|
||||
if (detail.getEventType().equals(data.getId())) {
|
||||
detail.setEventType(data.getName());
|
||||
if (detail.getAdvanceType().equals(data.getId())) {
|
||||
detail.setAdvanceType(data.getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -964,14 +964,14 @@ public class EventReportServiceImpl implements EventReportService {
|
||||
for (EventDetail detail : info) {
|
||||
for (DictData data : reasonData) {
|
||||
reasonMap.put(data.getName(),0);
|
||||
if (detail.getEventReason().equals(data.getId())) {
|
||||
detail.setEventReason(data.getName());
|
||||
if (detail.getAdvanceReason().equals(data.getId())) {
|
||||
detail.setAdvanceReason(data.getName());
|
||||
}
|
||||
}
|
||||
for (DictData data : typeData) {
|
||||
typeMap.put(data.getName(),0);
|
||||
if (detail.getEventType().equals(data.getId())) {
|
||||
detail.setEventType(data.getName());
|
||||
if (detail.getAdvanceType().equals(data.getId())) {
|
||||
detail.setAdvanceType(data.getName());
|
||||
}
|
||||
}
|
||||
list.add(detail);
|
||||
@@ -979,14 +979,14 @@ public class EventReportServiceImpl implements EventReportService {
|
||||
|
||||
//添加reason到map
|
||||
for (EventDetail data : list) {
|
||||
if (reasonMap.get(data.getEventReason()) != null) {
|
||||
reasonMap.put(data.getEventReason(), reasonMap.get(data.getEventReason()) + 1);
|
||||
if (reasonMap.get(data.getAdvanceReason()) != null) {
|
||||
reasonMap.put(data.getAdvanceReason(), reasonMap.get(data.getAdvanceReason()) + 1);
|
||||
}
|
||||
}
|
||||
//添加type到map
|
||||
for (EventDetail data : list) {
|
||||
if (typeMap.get(data.getEventType()) != null) {
|
||||
typeMap.put(data.getEventType(), typeMap.get(data.getEventType()) + 1);
|
||||
if (typeMap.get(data.getAdvanceType()) != null) {
|
||||
typeMap.put(data.getAdvanceType(), typeMap.get(data.getAdvanceType()) + 1);
|
||||
}
|
||||
}
|
||||
Set<String> reasonKeyset = reasonMap.keySet();
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
package com.njcn.event.service.majornetwork.Impl;
|
||||
|
||||
import com.njcn.common.pojo.dto.SimpleDTO;
|
||||
import com.njcn.device.pq.pojo.dto.GeneralDeviceDTO;
|
||||
import com.njcn.device.pq.pojo.param.DeviceInfoParam;
|
||||
import com.njcn.device.pq.pojo.param.LargeScreenParam;
|
||||
import com.njcn.device.pq.pojo.param.MonitoringPointScaleParam;
|
||||
import com.njcn.device.pq.pojo.vo.AreaDownVO;
|
||||
import com.njcn.device.pq.pojo.vo.MonitoringPointScaleVO;
|
||||
import com.njcn.event.mapper.majornetwork.LargeScreenMapper;
|
||||
import com.njcn.event.service.majornetwork.LargeScreenService;
|
||||
import com.njcn.system.pojo.enums.StatisticsEnum;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.njcn.device.pq.api.GeneralDeviceInfoClient;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @version 1.0.0
|
||||
* @author: zbj
|
||||
* @date: 2023/03/31
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class LargeScreenServiceImpl implements LargeScreenService {
|
||||
|
||||
private final GeneralDeviceInfoClient generalDeviceInfoClient;
|
||||
|
||||
private final LargeScreenMapper largeScreenMapper;
|
||||
|
||||
/**
|
||||
* 区域暂降统计
|
||||
*/
|
||||
@Override
|
||||
public AreaDownVO getAreaDownStatistics(LargeScreenParam largeScreenParam) {
|
||||
//创建返回VO
|
||||
AreaDownVO result = new AreaDownVO();
|
||||
ArrayList<MonitoringPointScaleParam> list = new ArrayList<>();
|
||||
DeviceInfoParam.BusinessParam deviceInfoParam = new DeviceInfoParam.BusinessParam();
|
||||
//部门索引
|
||||
deviceInfoParam.setDeptIndex(largeScreenParam.getDeptIndex());
|
||||
//统计类型
|
||||
SimpleDTO simpleDTO = new SimpleDTO();
|
||||
simpleDTO.setCode(String.valueOf(StatisticsEnum.POWER_NETWORK));
|
||||
deviceInfoParam.setStatisticalType(simpleDTO);
|
||||
//添加时间
|
||||
deviceInfoParam.setSearchBeginTime(largeScreenParam.getSearchBeginTime());
|
||||
deviceInfoParam.setSearchEndTime(largeScreenParam.getSearchEndTime());
|
||||
//添加服务名
|
||||
deviceInfoParam.setServerName("event-boot");
|
||||
// 获取所有数据
|
||||
List<GeneralDeviceDTO> generalDeviceDTOList = generalDeviceInfoClient.getPracticalAllDeviceInfo(deviceInfoParam).getData();
|
||||
|
||||
for (GeneralDeviceDTO generalDeviceDTO : generalDeviceDTOList) {
|
||||
if (generalDeviceDTO.getLineIndexes().size() == 0){
|
||||
MonitoringPointScaleParam param = new MonitoringPointScaleParam();
|
||||
param.setName(generalDeviceDTO.getName());
|
||||
param.setIndex(generalDeviceDTO.getIndex());
|
||||
param.setCount(0);
|
||||
list.add(param);
|
||||
}else{
|
||||
Map<String, Object> map = largeScreenMapper.selectDownCount(generalDeviceDTO.getLineIndexes(),largeScreenParam.getSearchBeginTime(), largeScreenParam.getSearchEndTime());
|
||||
MonitoringPointScaleParam param = new MonitoringPointScaleParam();
|
||||
param.setName(generalDeviceDTO.getName());
|
||||
param.setIndex(generalDeviceDTO.getIndex());
|
||||
String s = map.get("count").toString();
|
||||
int count = Integer.parseInt(s);
|
||||
param.setCount(count);
|
||||
list.add(param);
|
||||
}
|
||||
}
|
||||
result.setParam(list);
|
||||
return result;
|
||||
/* //获取所有监测点集合
|
||||
List<String> lineIds = generalDeviceDTOList.stream().flatMap(dto -> dto.getLineIndexes().stream()).collect(Collectors.toList());
|
||||
List<Map<String, Object>> maps = largeScreenMapper.selectDownCount(lineIds);
|
||||
|
||||
Map<String,Integer> countMap = new HashMap<>();
|
||||
for (Map<String, Object> map : maps) {
|
||||
for (GeneralDeviceDTO generalDeviceDTO : generalDeviceDTOList) {
|
||||
for (String lineIndex : generalDeviceDTO.getLineIndexes()) {
|
||||
if (map.get("id").equals(lineIndex)){
|
||||
if(countMap.containsKey(generalDeviceDTO.getName())){
|
||||
countMap.put(generalDeviceDTO.getName(),countMap.get(generalDeviceDTO.getName())+1);
|
||||
break;
|
||||
}else {
|
||||
countMap.put(generalDeviceDTO.getName(),1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,8 +1,10 @@
|
||||
package com.njcn.event.service.majornetwork.Impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.njcn.common.config.GeneralInfo;
|
||||
import com.njcn.common.pojo.enums.common.ServerEnum;
|
||||
@@ -43,6 +45,7 @@ import com.njcn.system.api.DicDataFeignClient;
|
||||
import com.njcn.system.enums.DicDataTypeEnum;
|
||||
import com.njcn.system.pojo.po.DictData;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.influxdb.dto.QueryResult;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
@@ -126,41 +129,41 @@ public class TransientServiceImpl implements TransientService {
|
||||
TransientVO transientVO = new TransientVO();
|
||||
transientVO.setId(eventDetail.getLineId());
|
||||
transientVO.setNumber(i++);
|
||||
transientVO.setWaveName(eventDetail.getWaveName());
|
||||
Instant timeId = eventDetail.getTimeId();
|
||||
transientVO.setWaveName(eventDetail.getWavePath());
|
||||
Instant timeId = eventDetail.getStartTime();
|
||||
ZoneId zoneId = ZoneId.systemDefault();
|
||||
LocalDateTime localDateTime = LocalDateTime.ofInstant(timeId, zoneId);
|
||||
DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.SSS");
|
||||
String format = dateTimeFormatter.format(localDateTime);
|
||||
|
||||
transientVO.setTime(format);
|
||||
switch (eventDetail.getWaveType()) {
|
||||
case 0:
|
||||
switch (eventDetail.getEventType()) {
|
||||
case 0+"":
|
||||
transientVO.setTrigType("扰动");
|
||||
break;
|
||||
case 1:
|
||||
case 1+"":
|
||||
transientVO.setTrigType("暂降");
|
||||
break;
|
||||
case 2:
|
||||
case 2+"":
|
||||
transientVO.setTrigType("暂升");
|
||||
break;
|
||||
case 3:
|
||||
case 3+"":
|
||||
transientVO.setTrigType("中断");
|
||||
break;
|
||||
case 4:
|
||||
case 4+"":
|
||||
transientVO.setTrigType("其他");
|
||||
break;
|
||||
case 5:
|
||||
case 5+"":
|
||||
transientVO.setTrigType("录波");
|
||||
break;
|
||||
}
|
||||
Double eventValue = new BigDecimal(eventDetail.getEventValue()).setScale(3, BigDecimal.ROUND_HALF_UP).doubleValue();
|
||||
Double eventValue = new BigDecimal(eventDetail.getFeatureAmplitude()).setScale(3, BigDecimal.ROUND_HALF_UP).doubleValue();
|
||||
transientVO.setEventValue(new BigDecimal(eventValue * 100).setScale(0, BigDecimal.ROUND_HALF_UP).doubleValue());
|
||||
transientVO.setEventValues(100 - transientVO.getEventValue());
|
||||
transientVO.setPersistTime((Float.parseFloat(eventDetail.getPersistTime().toString())) / 1000);
|
||||
transientVO.setPersistTime((Float.parseFloat(eventDetail.getDuration().toString())) / 1000);
|
||||
|
||||
transientVO.setYZD(getYZD(Float.parseFloat(eventDetail.getPersistTime().toString()),
|
||||
Float.parseFloat(eventDetail.getEventValue().toString()))
|
||||
transientVO.setYZD(getYZD(Float.parseFloat(eventDetail.getDuration().toString()),
|
||||
Float.parseFloat(eventDetail.getFeatureAmplitude().toString()))
|
||||
);
|
||||
transientVOS.add(transientVO);
|
||||
}
|
||||
@@ -297,17 +300,31 @@ public class TransientServiceImpl implements TransientService {
|
||||
if (!CollectionUtils.isEmpty(generalDeviceDTOList)) {
|
||||
//获取按终端分类的监测点索引集合
|
||||
List<String> lineList = generalDeviceDTOList.stream().flatMap(dto -> dto.getLineIndexes().stream()).collect(Collectors.toList());
|
||||
if(CollUtil.isNotEmpty(lineList)){
|
||||
Page<RmpEventDetailPO> pageInfo = eventDetailService.page(new Page<>(transientParam.getPageNum(), transientParam.getPageSize()), new LambdaQueryWrapper<RmpEventDetailPO>()
|
||||
.in(RmpEventDetailPO::getMeasurementPointId, lineList)
|
||||
.ge(StringUtils.isNotBlank(transientParam.getSearchBeginTime()), RmpEventDetailPO::getStartTime,DateUtil.beginOfDay(DateUtil.parse(transientParam.getSearchBeginTime())))
|
||||
.le(StringUtils.isNotBlank(transientParam.getSearchEndTime()), RmpEventDetailPO::getStartTime, DateUtil.endOfDay(DateUtil.parse(transientParam.getSearchEndTime())))
|
||||
|
||||
if (!CollectionUtils.isEmpty(lineList)) {
|
||||
StringBuilder stringBuilder = InfluxDBCommUtils.assToInfluxParam(lineList);
|
||||
//influxDB查询待分页数据总量
|
||||
Long total = getTransientDetail(stringBuilder, transientParam);
|
||||
page.setTotal(total);
|
||||
//分页总页数
|
||||
int pages = (int) Math.ceil(transientParam.getPageNum() * 1.0 / transientParam.getPageSize());
|
||||
page.setPages(pages);
|
||||
//influxDB分页查询
|
||||
List<EventDetailNew> eventDetailData = getTransientDetailLimit(lineList, transientParam);
|
||||
//暂态幅值最小值
|
||||
.ge(Objects.nonNull(transientParam.getEventValueMin()),RmpEventDetailPO::getFeatureAmplitude, transientParam.getEventValueMin())
|
||||
.le(Objects.nonNull(transientParam.getEventValueMax()),RmpEventDetailPO::getFeatureAmplitude, transientParam.getEventValueMax())
|
||||
//持续时间最小值
|
||||
.ge(Objects.nonNull(transientParam.getPersistMin()),RmpEventDetailPO::getDuration, transientParam.getPersistMin())
|
||||
.le(Objects.nonNull(transientParam.getPersistMax()),RmpEventDetailPO::getDuration, transientParam.getPersistMax())
|
||||
//严重度最小值
|
||||
.ge(Objects.nonNull(transientParam.getSeverityMin()),RmpEventDetailPO::getSeverity, transientParam.getSeverityMin())
|
||||
.le(Objects.nonNull(transientParam.getSeverityMax()),RmpEventDetailPO::getSeverity, transientParam.getSeverityMax())
|
||||
//波形文件
|
||||
.eq(Objects.nonNull(transientParam.getFileFlag()),RmpEventDetailPO::getFileFlag, transientParam.getFileFlag())
|
||||
//事件
|
||||
.in(CollUtil.isNotEmpty(transientParam.getWaveType()),RmpEventDetailPO::getEventType, transientParam.getWaveType())
|
||||
.in(CollUtil.isNotEmpty(transientParam.getEventReason()),RmpEventDetailPO::getAdvanceReason, transientParam.getEventReason())
|
||||
.in(CollUtil.isNotEmpty(transientParam.getEventType()),RmpEventDetailPO::getAdvanceType, transientParam.getEventType())
|
||||
.orderByDesc(RmpEventDetailPO::getStartTime)
|
||||
);
|
||||
List<EventDetailNew> eventDetailData=BeanUtil.copyToList(pageInfo.getRecords(),EventDetailNew.class);
|
||||
page= BeanUtil.copyProperties(pageInfo,Page.class);
|
||||
|
||||
if (CollUtil.isNotEmpty(eventDetailData)) {
|
||||
List<String> lineIds = eventDetailData.stream().map(EventDetailNew::getLineId).collect(Collectors.toList());
|
||||
@@ -333,15 +350,15 @@ public class TransientServiceImpl implements TransientService {
|
||||
}
|
||||
|
||||
for (DictData dictData : reasonList) {
|
||||
if (eventDetail.getEventReason().equals(dictData.getId())) {
|
||||
eventDetail.setEventReason(dictData.getName());
|
||||
if (eventDetail.getAdvanceReason().equals(dictData.getId())) {
|
||||
eventDetail.setAdvanceReason(dictData.getName());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for (DictData dictData : typeList) {
|
||||
if (eventDetail.getEventType().equals(dictData.getId())) {
|
||||
eventDetail.setEventType(dictData.getName());
|
||||
if (eventDetail.getAdvanceType().equals(dictData.getId())) {
|
||||
eventDetail.setAdvanceType(dictData.getName());
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -354,6 +371,68 @@ public class TransientServiceImpl implements TransientService {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// if (!CollectionUtils.isEmpty(lineList)) {
|
||||
// StringBuilder stringBuilder = InfluxDBCommUtils.assToInfluxParam(lineList);
|
||||
// //influxDB查询待分页数据总量
|
||||
// Long total = getTransientDetail(stringBuilder, transientParam);
|
||||
// page.setTotal(total);
|
||||
// //分页总页数
|
||||
// int pages = (int) Math.ceil(transientParam.getPageNum() * 1.0 / transientParam.getPageSize());
|
||||
// page.setPages(pages);
|
||||
// //influxDB分页查询
|
||||
// List<EventDetailNew> eventDetailData = getTransientDetailLimit(lineList, transientParam);
|
||||
//
|
||||
// if (CollUtil.isNotEmpty(eventDetailData)) {
|
||||
// List<String> lineIds = eventDetailData.stream().map(EventDetailNew::getLineId).collect(Collectors.toList());
|
||||
// lineIds = lineIds.stream().distinct().collect(Collectors.toList());
|
||||
//
|
||||
// List<AreaLineInfoVO> r = lineFeignClient.getBaseLineAreaInfo(lineIds).getData();
|
||||
// List<DictData> reasonList = dicDataFeignClient.getDicDataByTypeName(DicDataTypeEnum.EVENT_REASON.getName()).getData();
|
||||
// List<DictData> typeList = dicDataFeignClient.getDicDataByTypeName(DicDataTypeEnum.EVENT_TYPE.getName()).getData();
|
||||
//
|
||||
//
|
||||
// for (EventDetailNew eventDetail : eventDetailData) {
|
||||
// for (AreaLineInfoVO areaLineInfoVO : r) {
|
||||
// if (eventDetail.getLineId().equals(areaLineInfoVO.getLineId())) {
|
||||
// eventDetail.setLineId(areaLineInfoVO.getLineId());
|
||||
// eventDetail.setLineName(areaLineInfoVO.getLineName());
|
||||
// eventDetail.setGdName(areaLineInfoVO.getGdName());
|
||||
// eventDetail.setSubName(areaLineInfoVO.getSubName());
|
||||
// eventDetail.setIp(areaLineInfoVO.getIp());
|
||||
// eventDetail.setScale(areaLineInfoVO.getVoltageScale());
|
||||
// eventDetail.setIp(areaLineInfoVO.getIp());
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// for (DictData dictData : reasonList) {
|
||||
// if (eventDetail.getEventReason().equals(dictData.getId())) {
|
||||
// eventDetail.setEventReason(dictData.getName());
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// for (DictData dictData : typeList) {
|
||||
// if (eventDetail.getEventType().equals(dictData.getId())) {
|
||||
// eventDetail.setEventType(dictData.getName());
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
//
|
||||
// //当前页数据
|
||||
// page.setRecords(eventDetailData);
|
||||
// }
|
||||
//
|
||||
// }
|
||||
|
||||
}
|
||||
return page;
|
||||
}
|
||||
@@ -476,7 +555,7 @@ public class TransientServiceImpl implements TransientService {
|
||||
LineDetailDataVO lineDetailData = lineFeignClient.getLineDetailData(lineId.get(i)).getData();
|
||||
EventDetail eventDetailByTime = eventDetailService.getEventDetailByTime(lineId.get(i), timeId.get(i));
|
||||
String ip = lineDetailData.getIp();
|
||||
String waveName = eventDetailByTime.getWaveName();
|
||||
String waveName = eventDetailByTime.getWavePath();
|
||||
if (StrUtil.isBlank(ip) && StrUtil.isBlank(waveName)) {
|
||||
throw new BusinessException(EventResponseEnum.EVENT_NOT_FOUND);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.njcn.event.service.majornetwork;
|
||||
|
||||
import com.njcn.device.pq.pojo.param.LargeScreenParam;
|
||||
import com.njcn.device.pq.pojo.vo.AreaDownVO;
|
||||
|
||||
|
||||
/**
|
||||
* @version 1.0.0
|
||||
* @author: zbj
|
||||
* @date: 2023/03/31
|
||||
*/
|
||||
public interface LargeScreenService {
|
||||
|
||||
AreaDownVO getAreaDownStatistics(LargeScreenParam largeScreenParam);
|
||||
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.njcn.prepare.harmonic.pojo.po;
|
||||
package com.njcn.harmonic.pojo.po.day;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.njcn.prepare.harmonic.pojo.po;
|
||||
package com.njcn.harmonic.pojo.po.day;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.njcn.prepare.harmonic.pojo.po;
|
||||
package com.njcn.harmonic.pojo.po.day;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||
import lombok.Data;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.njcn.prepare.harmonic.pojo.po;
|
||||
package com.njcn.harmonic.pojo.po.day;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.njcn.prepare.harmonic.pojo.po;
|
||||
package com.njcn.harmonic.pojo.po.day;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.njcn.prepare.harmonic.pojo.po;
|
||||
package com.njcn.harmonic.pojo.po.day;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
@@ -1,10 +1,9 @@
|
||||
package com.njcn.prepare.harmonic.pojo.po;
|
||||
package com.njcn.harmonic.pojo.po.day;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||
import lombok.Data;
|
||||
import org.influxdb.annotation.Column;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.njcn.prepare.harmonic.pojo.po;
|
||||
package com.njcn.harmonic.pojo.po.day;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.njcn.prepare.harmonic.pojo.po;
|
||||
package com.njcn.harmonic.pojo.po.day;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.njcn.prepare.harmonic.pojo.po;
|
||||
package com.njcn.harmonic.pojo.po.day;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.njcn.prepare.harmonic.pojo.po;
|
||||
package com.njcn.harmonic.pojo.po.day;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.njcn.prepare.harmonic.pojo.po;
|
||||
package com.njcn.harmonic.pojo.po.day;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.njcn.prepare.harmonic.pojo.po;
|
||||
package com.njcn.harmonic.pojo.po.day;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.njcn.prepare.harmonic.pojo.po;
|
||||
package com.njcn.harmonic.pojo.po.day;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.njcn.prepare.harmonic.pojo.po;
|
||||
package com.njcn.harmonic.pojo.po.day;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.njcn.prepare.harmonic.pojo.po;
|
||||
package com.njcn.harmonic.pojo.po.day;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.njcn.prepare.harmonic.pojo.po;
|
||||
package com.njcn.harmonic.pojo.po.day;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
@@ -1,9 +1,8 @@
|
||||
package com.njcn.prepare.harmonic.pojo.po;
|
||||
package com.njcn.harmonic.pojo.po.day;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||
import com.njcn.harmonic.pojo.po.LimitRate;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
@@ -78,7 +78,7 @@ public class HistoryResultServiceImpl implements HistoryResultService {
|
||||
List<EventDetailVO> eventDetailVOList = new ArrayList<>();
|
||||
if (!eventDetailList.isEmpty()) {
|
||||
for (EventDetail eventdetail : eventDetailList) {
|
||||
Instant now = eventdetail.getTimeId();
|
||||
Instant now = eventdetail.getStartTime();
|
||||
Long time = now.toEpochMilli();
|
||||
String timeText = format.format(time);
|
||||
EventDetailVO eventDetailVO = new EventDetailVO();
|
||||
|
||||
@@ -673,10 +673,10 @@ public class PollutionSubstationServiceImpl extends ServiceImpl<RStatPollutionSu
|
||||
private List<PublicDTO> getLineDate(List<String> line, String startTime, String endTime, String type) {
|
||||
List<PublicDTO> result = new ArrayList<>();
|
||||
String quota = "";
|
||||
if (Objects.equals(type, DicDataEnum.XBDY_ENUM.getCode())) {
|
||||
quota = "harmonic_v";
|
||||
} else if (Objects.equals(type, DicDataEnum.XBDL_ENUM.getCode())) {
|
||||
quota = "harmonic_i";
|
||||
if (Objects.equals(type, DicDataEnum.V_HARMONIC.getCode())) {
|
||||
quota = ",harmonic_v";
|
||||
} else if (Objects.equals(type, DicDataEnum.I_ALL.getCode())) {
|
||||
quota = ",harmonic_i";
|
||||
}
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
stringBuilder.append(Param.TIME).append(" >= '").append(startTime).append(Param.START_TIME).append("' and ").append(Param.TIME).append(" <= '").append(endTime).append(Param.END_TIME).append("' and (");
|
||||
@@ -688,7 +688,7 @@ public class PollutionSubstationServiceImpl extends ServiceImpl<RStatPollutionSu
|
||||
}
|
||||
}
|
||||
stringBuilder.append(" group by line_id order by time desc limit 1 tz('Asia/Shanghai')");
|
||||
String sql = "SELECT line_id," + quota + " FROM harmonic_pollution where " + stringBuilder;
|
||||
String sql = "SELECT line_id" + quota + " FROM harmonic_pollution where " + stringBuilder;
|
||||
QueryResult sqlResult = influxDbUtils.query(sql);
|
||||
List<QueryResult.Series> list = sqlResult.getResults().get(0).getSeries();
|
||||
if (!CollectionUtils.isEmpty(list)) {
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
package com.njcn.prepare.harmonic.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 类的介绍:
|
||||
*
|
||||
* @author xuyang
|
||||
* @version 1.0.0
|
||||
* @createTime 2023/3/26 22:04
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "r_stat_integrity_d")
|
||||
public class RStatIntegrityDPO implements Serializable {
|
||||
|
||||
@MppMultiId
|
||||
@TableField(value = "time_id")
|
||||
private Date time;
|
||||
|
||||
@MppMultiId
|
||||
@TableField(value = "line_index")
|
||||
private String lineId;
|
||||
|
||||
@TableField(value = "due_time")
|
||||
private Integer dueTime;
|
||||
|
||||
@TableField(value = "real_time")
|
||||
private Integer realTime;
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
package com.njcn.prepare.harmonic.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 类的介绍:
|
||||
*
|
||||
* @author xuyang
|
||||
* @version 1.0.0
|
||||
* @createTime 2023/3/26 22:04
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "r_stat_onlinerate_d")
|
||||
public class RStatOnlineRateDPO implements Serializable {
|
||||
|
||||
@MppMultiId
|
||||
@TableField(value = "time_id")
|
||||
private Date time;
|
||||
|
||||
@MppMultiId
|
||||
@TableField(value = "dev_index")
|
||||
private String devId;
|
||||
|
||||
@TableField(value = "online_min")
|
||||
private Integer onlineMin;
|
||||
|
||||
@TableField(value = "offline_min")
|
||||
private Integer offlineMin;
|
||||
}
|
||||
@@ -1,9 +1,7 @@
|
||||
package com.njcn.prepare.harmonic.mapper.mysql.day;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
|
||||
import com.njcn.prepare.harmonic.pojo.po.RStatAssesDPO;
|
||||
import com.njcn.prepare.harmonic.pojo.po.RStatOnlineRateDPO;
|
||||
import com.njcn.harmonic.pojo.po.day.RStatAssesDPO;
|
||||
|
||||
public interface RStatAssesDMapper extends MppBaseMapper<RStatAssesDPO> {
|
||||
}
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
package com.njcn.prepare.harmonic.mapper.mysql.day;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
|
||||
import com.njcn.prepare.harmonic.pojo.po.RStatAssesDPO;
|
||||
import com.njcn.prepare.harmonic.pojo.po.RStatComassesDPO;
|
||||
import com.njcn.harmonic.pojo.po.day.RStatComassesDPO;
|
||||
|
||||
public interface RStatComassesDMapper extends MppBaseMapper<RStatComassesDPO> {
|
||||
}
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
package com.njcn.prepare.harmonic.mapper.mysql.day;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
|
||||
import com.njcn.prepare.harmonic.pojo.po.RStatDataFlickerDPO;
|
||||
import com.njcn.harmonic.pojo.po.day.RStatDataFlickerDPO;
|
||||
|
||||
public interface RStatDataFlickerDMapper extends MppBaseMapper<RStatDataFlickerDPO> {
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.njcn.prepare.harmonic.mapper.mysql.day;
|
||||
|
||||
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
|
||||
import com.njcn.prepare.harmonic.pojo.po.RStatDataFlucDPO;
|
||||
import com.njcn.harmonic.pojo.po.day.RStatDataFlucDPO;
|
||||
|
||||
public interface RStatDataFlucDMapper extends MppBaseMapper<RStatDataFlucDPO> {
|
||||
}
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
package com.njcn.prepare.harmonic.mapper.mysql.day;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
|
||||
import com.njcn.prepare.harmonic.pojo.po.RStatDataHarmrateIDPO;
|
||||
import com.njcn.harmonic.pojo.po.day.RStatDataHarmrateIDPO;
|
||||
|
||||
public interface RStatDataHarmRateIDMapper extends MppBaseMapper<RStatDataHarmrateIDPO> {
|
||||
}
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
package com.njcn.prepare.harmonic.mapper.mysql.day;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
|
||||
import com.njcn.prepare.harmonic.pojo.po.RStatDataHarmrateVDPO;
|
||||
import com.njcn.harmonic.pojo.po.day.RStatDataHarmrateVDPO;
|
||||
|
||||
public interface RStatDataHarmRateVDMapper extends MppBaseMapper<RStatDataHarmrateVDPO> {
|
||||
}
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
package com.njcn.prepare.harmonic.mapper.mysql.day;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
|
||||
import com.njcn.prepare.harmonic.pojo.po.RStatDataHarmphasicIDPO;
|
||||
import com.njcn.prepare.harmonic.pojo.po.RStatDataVDPO;
|
||||
import com.njcn.harmonic.pojo.po.day.RStatDataHarmphasicIDPO;
|
||||
|
||||
public interface RStatDataHarmphasicIDMapper extends MppBaseMapper<RStatDataHarmphasicIDPO> {
|
||||
}
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
package com.njcn.prepare.harmonic.mapper.mysql.day;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
|
||||
import com.njcn.prepare.harmonic.pojo.po.RStatDataHarmphasicVDPO;
|
||||
import com.njcn.harmonic.pojo.po.day.RStatDataHarmphasicVDPO;
|
||||
|
||||
public interface RStatDataHarmphasicVDMapper extends MppBaseMapper<RStatDataHarmphasicVDPO> {
|
||||
}
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
package com.njcn.prepare.harmonic.mapper.mysql.day;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
|
||||
import com.njcn.prepare.harmonic.pojo.po.RStatDataHarmpowerPDPO;
|
||||
import com.njcn.prepare.harmonic.pojo.po.RStatDataVDPO;
|
||||
import com.njcn.harmonic.pojo.po.day.RStatDataHarmpowerPDPO;
|
||||
|
||||
public interface RStatDataHarmpowerPDMapper extends MppBaseMapper<RStatDataHarmpowerPDPO> {
|
||||
}
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
package com.njcn.prepare.harmonic.mapper.mysql.day;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
|
||||
import com.njcn.prepare.harmonic.pojo.po.RStatDataHarmpowerQDPO;
|
||||
import com.njcn.harmonic.pojo.po.day.RStatDataHarmpowerQDPO;
|
||||
|
||||
public interface RStatDataHarmpowerQDMapper extends MppBaseMapper<RStatDataHarmpowerQDPO> {
|
||||
}
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
package com.njcn.prepare.harmonic.mapper.mysql.day;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
|
||||
import com.njcn.prepare.harmonic.pojo.po.RStatDataHarmpowerSDPO;
|
||||
import com.njcn.harmonic.pojo.po.day.RStatDataHarmpowerSDPO;
|
||||
|
||||
public interface RStatDataHarmpowerSDMapper extends MppBaseMapper<RStatDataHarmpowerSDPO> {
|
||||
}
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
package com.njcn.prepare.harmonic.mapper.mysql.day;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
|
||||
import com.njcn.prepare.harmonic.pojo.po.RStatDataIDPO;
|
||||
import com.njcn.harmonic.pojo.po.day.RStatDataIDPO;
|
||||
|
||||
public interface RStatDataIDMapper extends MppBaseMapper<RStatDataIDPO> {
|
||||
}
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
package com.njcn.prepare.harmonic.mapper.mysql.day;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
|
||||
import com.njcn.prepare.harmonic.pojo.po.RStatDataInharmIDPO;
|
||||
import com.njcn.harmonic.pojo.po.day.RStatDataInharmIDPO;
|
||||
|
||||
public interface RStatDataInHarmIDMapper extends MppBaseMapper<RStatDataInharmIDPO> {
|
||||
}
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
package com.njcn.prepare.harmonic.mapper.mysql.day;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
|
||||
import com.njcn.prepare.harmonic.pojo.po.RStatDataInharmVDPO;
|
||||
import com.njcn.harmonic.pojo.po.day.RStatDataInharmVDPO;
|
||||
|
||||
public interface RStatDataInHarmVDMapper extends MppBaseMapper<RStatDataInharmVDPO> {
|
||||
}
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
package com.njcn.prepare.harmonic.mapper.mysql.day;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
|
||||
import com.njcn.prepare.harmonic.pojo.po.RStatDataPltDPO;
|
||||
import com.njcn.harmonic.pojo.po.day.RStatDataPltDPO;
|
||||
|
||||
public interface RStatDataPltDMapper extends MppBaseMapper<RStatDataPltDPO> {
|
||||
}
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
package com.njcn.prepare.harmonic.mapper.mysql.day;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
|
||||
import com.njcn.prepare.harmonic.pojo.po.RStatDataFlickerDPO;
|
||||
import com.njcn.prepare.harmonic.pojo.po.RStatDataVDPO;
|
||||
import com.njcn.harmonic.pojo.po.day.RStatDataVDPO;
|
||||
|
||||
public interface RStatDataVDMapper extends MppBaseMapper<RStatDataVDPO> {
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.njcn.prepare.harmonic.mapper.mysql.day;
|
||||
|
||||
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
|
||||
import com.njcn.prepare.harmonic.pojo.po.RStatIntegrityDPO;
|
||||
import com.njcn.device.pq.pojo.po.RStatIntegrityD;
|
||||
|
||||
public interface RStatIntegrityDMapper extends MppBaseMapper<RStatIntegrityDPO> {
|
||||
public interface RStatIntegrityDMapper extends MppBaseMapper<RStatIntegrityD> {
|
||||
}
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
package com.njcn.prepare.harmonic.mapper.mysql.day;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
|
||||
import com.njcn.prepare.harmonic.pojo.po.RStatLimitRateDPO;
|
||||
import com.njcn.prepare.harmonic.pojo.po.RStatLimitTargetDPO;
|
||||
import com.njcn.harmonic.pojo.po.day.RStatLimitRateDPO;
|
||||
|
||||
public interface RStatLimitRateDMapper extends MppBaseMapper<RStatLimitRateDPO> {
|
||||
}
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
package com.njcn.prepare.harmonic.mapper.mysql.day;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
|
||||
import com.njcn.prepare.harmonic.pojo.po.RStatLimitTargetDPO;
|
||||
import com.njcn.harmonic.pojo.po.day.RStatLimitTargetDPO;
|
||||
|
||||
public interface RStatLimitTargetDMapper extends MppBaseMapper<RStatLimitTargetDPO> {
|
||||
}
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
package com.njcn.prepare.harmonic.mapper.mysql.day;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
|
||||
import com.njcn.prepare.harmonic.pojo.po.RStatIntegrityDPO;
|
||||
import com.njcn.prepare.harmonic.pojo.po.RStatOnlineRateDPO;
|
||||
import com.njcn.device.pq.pojo.po.RStatOnlinerateD;
|
||||
|
||||
public interface RStatOnlineRateDMapper extends MppBaseMapper<RStatOnlineRateDPO> {
|
||||
public interface RStatOnlineRateDMapper extends MppBaseMapper<RStatOnlinerateD> {
|
||||
}
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
package com.njcn.prepare.harmonic.service.mysql.Impl.day;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||
import com.njcn.harmonic.pojo.po.day.RStatDataFlickerDPO;
|
||||
import com.njcn.prepare.harmonic.mapper.mysql.day.RStatDataFlickerDMapper;
|
||||
import com.njcn.prepare.harmonic.pojo.po.RStatDataFlickerDPO;
|
||||
import com.njcn.prepare.harmonic.service.mysql.day.IRStatDataFlickerDService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.njcn.prepare.harmonic.service.mysql.Impl.day;
|
||||
|
||||
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||
import com.njcn.harmonic.pojo.po.day.RStatDataFlucDPO;
|
||||
import com.njcn.prepare.harmonic.mapper.mysql.day.RStatDataFlucDMapper;
|
||||
import com.njcn.prepare.harmonic.pojo.po.RStatDataFlucDPO;
|
||||
import com.njcn.prepare.harmonic.service.mysql.day.IRStatDataFlucDService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
package com.njcn.prepare.harmonic.service.mysql.Impl.day;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||
import com.njcn.harmonic.pojo.po.day.RStatDataHarmrateIDPO;
|
||||
import com.njcn.prepare.harmonic.mapper.mysql.day.RStatDataHarmRateIDMapper;
|
||||
import com.njcn.prepare.harmonic.mapper.mysql.day.RStatDataHarmpowerSDMapper;
|
||||
import com.njcn.prepare.harmonic.pojo.po.RStatDataHarmpowerSDPO;
|
||||
import com.njcn.prepare.harmonic.pojo.po.RStatDataHarmrateIDPO;
|
||||
import com.njcn.prepare.harmonic.service.mysql.day.IRStatDataHarmRateIDService;
|
||||
import com.njcn.prepare.harmonic.service.mysql.day.IRStatDataHarmpowerSDService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
package com.njcn.prepare.harmonic.service.mysql.Impl.day;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||
import com.njcn.harmonic.pojo.po.day.RStatDataHarmrateVDPO;
|
||||
import com.njcn.prepare.harmonic.mapper.mysql.day.RStatDataHarmRateVDMapper;
|
||||
import com.njcn.prepare.harmonic.pojo.po.RStatDataHarmrateIDPO;
|
||||
import com.njcn.prepare.harmonic.pojo.po.RStatDataHarmrateVDPO;
|
||||
import com.njcn.prepare.harmonic.service.mysql.day.IRStatDataHarmRateVDService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
package com.njcn.prepare.harmonic.service.mysql.Impl.day;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||
import com.njcn.harmonic.pojo.po.day.RStatDataHarmphasicIDPO;
|
||||
import com.njcn.prepare.harmonic.mapper.mysql.day.RStatDataHarmphasicIDMapper;
|
||||
import com.njcn.prepare.harmonic.pojo.po.RStatDataHarmphasicIDPO;
|
||||
import com.njcn.prepare.harmonic.service.mysql.day.IRStatDataHarmphasicIDService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
package com.njcn.prepare.harmonic.service.mysql.Impl.day;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||
import com.njcn.harmonic.pojo.po.day.RStatDataHarmphasicVDPO;
|
||||
import com.njcn.prepare.harmonic.mapper.mysql.day.RStatDataHarmphasicVDMapper;
|
||||
import com.njcn.prepare.harmonic.pojo.po.RStatDataHarmphasicVDPO;
|
||||
import com.njcn.prepare.harmonic.service.mysql.day.IRStatDataHarmphasicVDService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
package com.njcn.prepare.harmonic.service.mysql.Impl.day;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||
import com.njcn.harmonic.pojo.po.day.RStatDataHarmpowerPDPO;
|
||||
import com.njcn.prepare.harmonic.mapper.mysql.day.RStatDataHarmpowerPDMapper;
|
||||
import com.njcn.prepare.harmonic.pojo.po.RStatDataHarmpowerPDPO;
|
||||
import com.njcn.prepare.harmonic.service.mysql.day.IRStatDataHarmpowerPDService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
package com.njcn.prepare.harmonic.service.mysql.Impl.day;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||
import com.njcn.harmonic.pojo.po.day.RStatDataHarmpowerQDPO;
|
||||
import com.njcn.prepare.harmonic.mapper.mysql.day.RStatDataHarmpowerQDMapper;
|
||||
import com.njcn.prepare.harmonic.pojo.po.RStatDataHarmpowerQDPO;
|
||||
import com.njcn.prepare.harmonic.service.mysql.day.IRStatDataHarmpowerQDService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
package com.njcn.prepare.harmonic.service.mysql.Impl.day;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||
import com.njcn.harmonic.pojo.po.day.RStatDataHarmpowerSDPO;
|
||||
import com.njcn.prepare.harmonic.mapper.mysql.day.RStatDataHarmpowerSDMapper;
|
||||
import com.njcn.prepare.harmonic.pojo.po.RStatDataHarmpowerSDPO;
|
||||
import com.njcn.prepare.harmonic.service.mysql.day.IRStatDataHarmpowerSDService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
package com.njcn.prepare.harmonic.service.mysql.Impl.day;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||
import com.njcn.harmonic.pojo.po.day.RStatDataIDPO;
|
||||
import com.njcn.prepare.harmonic.mapper.mysql.day.RStatDataIDMapper;
|
||||
import com.njcn.prepare.harmonic.pojo.po.RStatDataIDPO;
|
||||
import com.njcn.prepare.harmonic.service.mysql.day.IRStatDataIDService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
||||
@@ -1,13 +1,8 @@
|
||||
package com.njcn.prepare.harmonic.service.mysql.Impl.day;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||
import com.njcn.prepare.harmonic.mapper.mysql.day.RStatDataIDMapper;
|
||||
import com.njcn.harmonic.pojo.po.day.RStatDataInharmIDPO;
|
||||
import com.njcn.prepare.harmonic.mapper.mysql.day.RStatDataInHarmIDMapper;
|
||||
import com.njcn.prepare.harmonic.pojo.po.RStatDataHarmrateIDPO;
|
||||
import com.njcn.prepare.harmonic.pojo.po.RStatDataIDPO;
|
||||
import com.njcn.prepare.harmonic.pojo.po.RStatDataInharmIDPO;
|
||||
import com.njcn.prepare.harmonic.service.mysql.day.IRStatDataIDService;
|
||||
import com.njcn.prepare.harmonic.service.mysql.day.IRStatDataInharmIDService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
||||
@@ -1,12 +1,8 @@
|
||||
package com.njcn.prepare.harmonic.service.mysql.Impl.day;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||
import com.njcn.prepare.harmonic.mapper.mysql.day.RStatDataInHarmIDMapper;
|
||||
import com.njcn.harmonic.pojo.po.day.RStatDataInharmVDPO;
|
||||
import com.njcn.prepare.harmonic.mapper.mysql.day.RStatDataInHarmVDMapper;
|
||||
import com.njcn.prepare.harmonic.pojo.po.RStatDataInharmIDPO;
|
||||
import com.njcn.prepare.harmonic.pojo.po.RStatDataInharmVDPO;
|
||||
import com.njcn.prepare.harmonic.service.mysql.day.IRStatDataInharmIDService;
|
||||
import com.njcn.prepare.harmonic.service.mysql.day.IRStatDataInharmVDService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
||||
@@ -1,12 +1,8 @@
|
||||
package com.njcn.prepare.harmonic.service.mysql.Impl.day;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||
import com.njcn.prepare.harmonic.mapper.mysql.day.RStatDataFlickerDMapper;
|
||||
import com.njcn.harmonic.pojo.po.day.RStatDataPltDPO;
|
||||
import com.njcn.prepare.harmonic.mapper.mysql.day.RStatDataPltDMapper;
|
||||
import com.njcn.prepare.harmonic.pojo.po.RStatDataFlickerDPO;
|
||||
import com.njcn.prepare.harmonic.pojo.po.RStatDataPltDPO;
|
||||
import com.njcn.prepare.harmonic.service.mysql.day.IRStatDataFlickerDService;
|
||||
import com.njcn.prepare.harmonic.service.mysql.day.IRStatDataPltDService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user