Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
06978e9c7f
@ -1387,6 +1387,19 @@ BOOLEAN CRYDevice::processRyADSParam(const Json::Value jsonRoot, int pid)
|
|||||||
vLog(LOG_ERROR, "inet_pton error(%d,%s).\n", errno, strerror(errno));
|
vLog(LOG_ERROR, "inet_pton error(%d,%s).\n", errno, strerror(errno));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//ads添加路由的用户名密码
|
||||||
|
//用户名
|
||||||
|
if (jsonRoot["adsUser"].isString()) {
|
||||||
|
snprintf(config_config.processes[pid].option.ryads.user, sizeof(config_config.processes[pid].option.ryads.user), "%s", jsonRoot["adsUser"].asCString());
|
||||||
|
} else { //默认存在允许ftp功能
|
||||||
|
snprintf(config_config.processes[pid].option.ryads.user, sizeof(config_config.processes[pid].option.ryads.user), "%s", "admin");
|
||||||
|
}
|
||||||
|
//密码
|
||||||
|
if (jsonRoot["adsPassword"].isString()) {
|
||||||
|
snprintf(config_config.processes[pid].option.ryads.password, sizeof(config_config.processes[pid].option.ryads.password), "%s", jsonRoot["adsPassword"].asCString());
|
||||||
|
} else { //默认存在允许ftp功能
|
||||||
|
snprintf(config_config.processes[pid].option.ryads.password, sizeof(config_config.processes[pid].option.ryads.password), "%s", "admin");
|
||||||
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -883,6 +883,9 @@ BOOLEAN CHostADSBFProcess::OnPreCreate(int id)
|
|||||||
//目标端口
|
//目标端口
|
||||||
m_remotePort = m_nOptions.net.target_port;
|
m_remotePort = m_nOptions.net.target_port;
|
||||||
|
|
||||||
|
m_adsUser = std::string(m_nOptions.user);
|
||||||
|
m_adsPassword = std::string(m_nOptions.password);
|
||||||
|
|
||||||
m_bHaveFTP = m_nOptions.bHaveFTP;
|
m_bHaveFTP = m_nOptions.bHaveFTP;
|
||||||
calc();
|
calc();
|
||||||
|
|
||||||
@ -974,8 +977,8 @@ BOOLEAN CHostADSBFProcess::OnTimer(void)
|
|||||||
//先添加一条路由
|
//先添加一条路由
|
||||||
if (m_bRouteAdded == FALSE)
|
if (m_bRouteAdded == FALSE)
|
||||||
{
|
{
|
||||||
long ret = AddRemoteRoute(m_remoteIp, AmsNetId(m_localNetId), m_localIp, std::string("isoftstone"), std::string("admin"), std::string("admin"));
|
long ret = AddRemoteRoute(m_remoteIp, AmsNetId(m_localNetId), m_localIp, std::string("isoftstone"), m_adsUser, m_adsPassword);
|
||||||
vLog(LOG_DEBUG, "%s add route(%s to %s) return value is: %d\n", m_pidName.c_str(), m_localIp.c_str(), m_remoteIp.c_str(), ret);
|
vLog(LOG_DEBUG, "%s add route(%s to %s) with remote user name: %s, and remote password: %s, return value is: %d\n", m_pidName.c_str(), m_localIp.c_str(), m_remoteIp.c_str(), m_adsUser.c_str(), m_adsPassword.c_str(), ret);
|
||||||
if (ret != 0) return TRUE;
|
if (ret != 0) return TRUE;
|
||||||
}
|
}
|
||||||
m_bRouteAdded = TRUE;
|
m_bRouteAdded = TRUE;
|
||||||
|
@ -43,6 +43,8 @@ private:
|
|||||||
std::string m_localNetId; //本机IP地址
|
std::string m_localNetId; //本机IP地址
|
||||||
std::string m_remoteIp; //PLC设备ip地址
|
std::string m_remoteIp; //PLC设备ip地址
|
||||||
std::string m_remoteNetId;
|
std::string m_remoteNetId;
|
||||||
|
std::string m_adsUser;
|
||||||
|
std::string m_adsPassword;
|
||||||
|
|
||||||
AdsDevice *m_turbine;
|
AdsDevice *m_turbine;
|
||||||
BOOLEAN m_bRouteAdded; //路由是否添加成功
|
BOOLEAN m_bRouteAdded; //路由是否添加成功
|
||||||
|
@ -626,6 +626,8 @@ typedef struct
|
|||||||
struNetWorkOption net;
|
struNetWorkOption net;
|
||||||
BOOLEAN bHaveFTP;
|
BOOLEAN bHaveFTP;
|
||||||
struFTPOption ftp;
|
struFTPOption ftp;
|
||||||
|
char user[64];
|
||||||
|
char password[64];
|
||||||
} struRYADSOption;
|
} struRYADSOption;
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
|
@ -37,7 +37,7 @@ public class DataController {
|
|||||||
@PostMapping("/snapshot")
|
@PostMapping("/snapshot")
|
||||||
public R<Map<String,Map<String,Object>>> querySnapshotValues(@RequestBody @Valid List<SnapshotValueQueryParam> param) {
|
public R<Map<String,Map<String,Object>>> querySnapshotValues(@RequestBody @Valid List<SnapshotValueQueryParam> param) {
|
||||||
if (log.isDebugEnabled()){
|
if (log.isDebugEnabled()){
|
||||||
log.debug("/api/rtdbsvr/snapshot is calling");
|
log.debug("/api/data/snapshot is calling");
|
||||||
log.debug("request params: {}", param);
|
log.debug("request params: {}", param);
|
||||||
}
|
}
|
||||||
return R.success(dataService.querySnapshotValues(param));
|
return R.success(dataService.querySnapshotValues(param));
|
||||||
@ -51,7 +51,7 @@ public class DataController {
|
|||||||
@PostMapping("/history")
|
@PostMapping("/history")
|
||||||
public R<Map<String, Map<String, Map<String, Object>>>> queryTimeSeriesValues(@RequestBody @Valid TSValueQueryParam param) {
|
public R<Map<String, Map<String, Map<String, Object>>>> queryTimeSeriesValues(@RequestBody @Valid TSValueQueryParam param) {
|
||||||
if (log.isDebugEnabled()){
|
if (log.isDebugEnabled()){
|
||||||
log.debug("/api/rtdbsvr/history is calling");
|
log.debug("/api/data/history is calling");
|
||||||
log.debug("request params: {}", param);
|
log.debug("request params: {}", param);
|
||||||
}
|
}
|
||||||
return R.success(dataService.queryTimeSeriesValues(param));
|
return R.success(dataService.queryTimeSeriesValues(param));
|
||||||
@ -65,7 +65,7 @@ public class DataController {
|
|||||||
@PostMapping("/windows")
|
@PostMapping("/windows")
|
||||||
public R<Map<String, Map<String, Map<String, Object>>>> queryWindowsValues(@RequestBody @Valid WindowValueQueryParam param) {
|
public R<Map<String, Map<String, Map<String, Object>>>> queryWindowsValues(@RequestBody @Valid WindowValueQueryParam param) {
|
||||||
if (log.isDebugEnabled()){
|
if (log.isDebugEnabled()){
|
||||||
log.debug("/api/rtdbsvr/windows is calling");
|
log.debug("/api/data/windows is calling");
|
||||||
log.debug("request params: {}", param);
|
log.debug("request params: {}", param);
|
||||||
}
|
}
|
||||||
return R.success(dataService.queryWindowsValues(param));
|
return R.success(dataService.queryWindowsValues(param));
|
||||||
|
@ -7,8 +7,11 @@ import com.das.common.exceptions.ServiceException;
|
|||||||
import com.das.common.result.R;
|
import com.das.common.result.R;
|
||||||
import com.das.common.utils.PageDataInfo;
|
import com.das.common.utils.PageDataInfo;
|
||||||
import com.das.modules.equipment.domain.dto.SysEquipmentDto;
|
import com.das.modules.equipment.domain.dto.SysEquipmentDto;
|
||||||
|
import com.das.modules.equipment.domain.dto.SysGenExtPropsDto;
|
||||||
import com.das.modules.equipment.domain.vo.EquipmentTypeVo;
|
import com.das.modules.equipment.domain.vo.EquipmentTypeVo;
|
||||||
import com.das.modules.equipment.domain.vo.SysEquipmentVo;
|
import com.das.modules.equipment.domain.vo.SysEquipmentVo;
|
||||||
|
import com.das.modules.equipment.entity.SysEquipmentDocs;
|
||||||
|
import com.das.modules.equipment.entity.SysGenExtProps;
|
||||||
import com.das.modules.equipment.service.SysEquipmentService;
|
import com.das.modules.equipment.service.SysEquipmentService;
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
@ -138,4 +141,63 @@ public class EquipmentController {
|
|||||||
sysEquipmentService.importSysEquipment(id, file);
|
sysEquipmentService.importSysEquipment(id, file);
|
||||||
return R.success("导入成功");
|
return R.success("导入成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增设备附属属性
|
||||||
|
* @return 所有附属属性
|
||||||
|
*/
|
||||||
|
@PostMapping("/extProps/add")
|
||||||
|
public R<SysGenExtProps> addSysEquipmentExtProps(@RequestBody SysGenExtPropsDto sysGenExtPropsDto) {
|
||||||
|
//判断是否有权限
|
||||||
|
boolean hasPermission = StpUtil.hasPermission(SysAuthorityIds.SYS_AUTHORITY_ID_DEVICE_MGR.toString());
|
||||||
|
if(!hasPermission){
|
||||||
|
return R.fail("没有设备管理权限");
|
||||||
|
}
|
||||||
|
return R.success(sysEquipmentService.creatSysEquipmentExtProps(sysGenExtPropsDto));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新设备附属属性
|
||||||
|
* @return 所有附属属性
|
||||||
|
*/
|
||||||
|
@PostMapping("/extProps/update")
|
||||||
|
public R<SysGenExtProps> updateSysEquipmentExtProps(@RequestBody SysGenExtPropsDto sysGenExtPropsDto) {
|
||||||
|
//判断是否有权限
|
||||||
|
boolean hasPermission = StpUtil.hasPermission(SysAuthorityIds.SYS_AUTHORITY_ID_DEVICE_MGR.toString());
|
||||||
|
if(!hasPermission){
|
||||||
|
return R.fail("没有设备管理权限");
|
||||||
|
}
|
||||||
|
return R.success(sysEquipmentService.updateSysEquipmentExtProps(sysGenExtPropsDto));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新设备附属属性
|
||||||
|
* @return 所有附属属性
|
||||||
|
*/
|
||||||
|
@PostMapping("/extProps/query")
|
||||||
|
public R<SysGenExtProps> querySysEquipmentExtProps(@RequestBody SysGenExtPropsDto sysGenExtPropsDto) {
|
||||||
|
//判断是否有权限
|
||||||
|
boolean hasPermission = StpUtil.hasPermission(SysAuthorityIds.SYS_AUTHORITY_ID_DEVICE_MGR.toString());
|
||||||
|
if(!hasPermission){
|
||||||
|
return R.fail("没有设备管理权限");
|
||||||
|
}
|
||||||
|
return R.success(sysEquipmentService.querySysEquipmentExtProps(sysGenExtPropsDto.getId()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/extProps/delete")
|
||||||
|
public R<SysGenExtProps> deleteSysEquipmentExtProps(@RequestBody SysGenExtPropsDto sysGenExtPropsDto) {
|
||||||
|
//判断是否有权限
|
||||||
|
boolean hasPermission = StpUtil.hasPermission(SysAuthorityIds.SYS_AUTHORITY_ID_DEVICE_MGR.toString());
|
||||||
|
if(!hasPermission){
|
||||||
|
return R.fail("没有设备管理权限");
|
||||||
|
}
|
||||||
|
sysEquipmentService.deleteSysEquipmentExtProps(sysGenExtPropsDto.getId());
|
||||||
|
return R.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "/file/upload", method = RequestMethod.POST)
|
||||||
|
public R<SysEquipmentDocs> addFile(Long deviceId, String folderName, MultipartFile file) {
|
||||||
|
SysEquipmentDocs upload = sysEquipmentService.upload(deviceId, folderName, file);
|
||||||
|
return R.success(upload);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,106 @@
|
|||||||
|
package com.das.modules.equipment.domain.dto;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class SysGenExtPropsDto {
|
||||||
|
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
private String fanName;
|
||||||
|
|
||||||
|
private String fanNumber;
|
||||||
|
|
||||||
|
private String fanType;
|
||||||
|
|
||||||
|
private String fanTypeDetails;
|
||||||
|
|
||||||
|
private String pitchSystemModel;
|
||||||
|
|
||||||
|
private String pitchSystemManufacturer;
|
||||||
|
|
||||||
|
private String pitchSystemDetails;
|
||||||
|
|
||||||
|
private String blade1Model;
|
||||||
|
|
||||||
|
private String blade1Manufacturer;
|
||||||
|
|
||||||
|
private String blade1Details;
|
||||||
|
|
||||||
|
private String blade1BearingModel;
|
||||||
|
|
||||||
|
private String blade1BearingManufacturer;
|
||||||
|
|
||||||
|
private String blade1BearingDetails;
|
||||||
|
|
||||||
|
private String blade2Model;
|
||||||
|
|
||||||
|
private String blade2Manufacturer;
|
||||||
|
|
||||||
|
private String blade2Details;
|
||||||
|
|
||||||
|
private String blade2BearingModel;
|
||||||
|
|
||||||
|
private String blade2BearingManufacturer;
|
||||||
|
|
||||||
|
private String blade2BearingDetails;
|
||||||
|
|
||||||
|
private String blade3Model;
|
||||||
|
|
||||||
|
private String blade3Manufacturer;
|
||||||
|
|
||||||
|
private String blade3Details;
|
||||||
|
|
||||||
|
private String blade3BearingModel;
|
||||||
|
|
||||||
|
private String blade3BearingManufacturer;
|
||||||
|
|
||||||
|
private String blade3BearingDetails;
|
||||||
|
|
||||||
|
private String mainBearingModel;
|
||||||
|
|
||||||
|
private String mainBearingManufacturer;
|
||||||
|
|
||||||
|
private String mainBearingDetails;
|
||||||
|
|
||||||
|
private String gearboxModel;
|
||||||
|
|
||||||
|
private String gearboxManufacturer;
|
||||||
|
|
||||||
|
private String gearboxDetails;
|
||||||
|
|
||||||
|
private String generatorModel;
|
||||||
|
|
||||||
|
private String generatorManufacturer;
|
||||||
|
|
||||||
|
private String generatorDetails;
|
||||||
|
|
||||||
|
private String converterModel;
|
||||||
|
|
||||||
|
private String converterManufacturer;
|
||||||
|
|
||||||
|
private String converterDetails;
|
||||||
|
|
||||||
|
private String mainControlSystemModel;
|
||||||
|
|
||||||
|
private String mainControlSystemManufacturer;
|
||||||
|
|
||||||
|
private String mainControlSystemSoftwareVersion;
|
||||||
|
|
||||||
|
private String mainControlSystemSoftwareVersionDetails;
|
||||||
|
|
||||||
|
private String towerBaseCabinetDetails;
|
||||||
|
|
||||||
|
private String nacelleCabinetDetails;
|
||||||
|
}
|
@ -0,0 +1,36 @@
|
|||||||
|
package com.das.modules.equipment.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@TableName("sys_equipment_docs")
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class SysEquipmentDocs {
|
||||||
|
|
||||||
|
@TableId(value = "deviceid")
|
||||||
|
private Long deviceId;
|
||||||
|
|
||||||
|
@TableField(value = "name")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@TableField(value = "url")
|
||||||
|
private String url;
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@TableField("update_time")
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,162 @@
|
|||||||
|
package com.das.modules.equipment.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@TableName("sys_gen_extprops")
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class SysGenExtProps {
|
||||||
|
|
||||||
|
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@TableField(value = "fan_name")
|
||||||
|
private String fanName;
|
||||||
|
|
||||||
|
@TableField(value = "fan_Number")
|
||||||
|
private String fanNumber;
|
||||||
|
|
||||||
|
@TableField(value = "fan_type")
|
||||||
|
private String fanType;
|
||||||
|
|
||||||
|
@TableField(value = "fan_type_details")
|
||||||
|
private String fanTypeDetails;
|
||||||
|
|
||||||
|
// Pitch System
|
||||||
|
@TableField(value = "pitch_system_model")
|
||||||
|
private String pitchSystemModel;
|
||||||
|
|
||||||
|
@TableField(value = "pitch_system_manufacturer")
|
||||||
|
private String pitchSystemManufacturer;
|
||||||
|
|
||||||
|
@TableField(value = "pitch_system_details")
|
||||||
|
private String pitchSystemDetails;
|
||||||
|
|
||||||
|
// Blade 1
|
||||||
|
@TableField(value = "blade1_model")
|
||||||
|
private String blade1Model;
|
||||||
|
|
||||||
|
@TableField(value = "blade1_manufacturer")
|
||||||
|
private String blade1Manufacturer;
|
||||||
|
|
||||||
|
@TableField(value = "blade1_details")
|
||||||
|
private String blade1Details;
|
||||||
|
|
||||||
|
@TableField(value = "blade1_bearing_model")
|
||||||
|
private String blade1BearingModel;
|
||||||
|
|
||||||
|
@TableField(value = "blade1_bearing_manufacturer")
|
||||||
|
private String blade1BearingManufacturer;
|
||||||
|
|
||||||
|
@TableField(value = "blade1_bearing_details")
|
||||||
|
private String blade1BearingDetails;
|
||||||
|
|
||||||
|
// Blade 2
|
||||||
|
@TableField(value = "blade2_model")
|
||||||
|
private String blade2Model;
|
||||||
|
|
||||||
|
@TableField(value = "blade2_manufacturer")
|
||||||
|
private String blade2Manufacturer;
|
||||||
|
|
||||||
|
@TableField(value = "blade2_details")
|
||||||
|
private String blade2Details;
|
||||||
|
|
||||||
|
@TableField(value = "blade2_bearing_model")
|
||||||
|
private String blade2BearingModel;
|
||||||
|
|
||||||
|
@TableField(value = "blade2_bearing_manufacturer")
|
||||||
|
private String blade2BearingManufacturer;
|
||||||
|
|
||||||
|
@TableField(value = "blade2_bearing_details")
|
||||||
|
private String blade2BearingDetails;
|
||||||
|
|
||||||
|
// Blade 3
|
||||||
|
@TableField(value = "blade3_model")
|
||||||
|
private String blade3Model;
|
||||||
|
|
||||||
|
@TableField(value = "blade3_manufacturer")
|
||||||
|
private String blade3Manufacturer;
|
||||||
|
|
||||||
|
@TableField(value = "blade3_details")
|
||||||
|
private String blade3Details;
|
||||||
|
|
||||||
|
@TableField(value = "blade3_bearing_model")
|
||||||
|
private String blade3BearingModel;
|
||||||
|
|
||||||
|
@TableField(value = "blade3_bearing_manufacturer")
|
||||||
|
private String blade3BearingManufacturer;
|
||||||
|
|
||||||
|
@TableField(value = "blade3_bearing_details")
|
||||||
|
private String blade3BearingDetails;
|
||||||
|
|
||||||
|
// Main Bearing
|
||||||
|
@TableField(value = "main_bearing_model")
|
||||||
|
private String mainBearingModel;
|
||||||
|
|
||||||
|
@TableField(value = "main_bearing_manufacturer")
|
||||||
|
private String mainBearingManufacturer;
|
||||||
|
|
||||||
|
@TableField(value = "main_bearing_details")
|
||||||
|
private String mainBearingDetails;
|
||||||
|
|
||||||
|
// Gearbox
|
||||||
|
@TableField(value = "gearbox_model")
|
||||||
|
private String gearboxModel;
|
||||||
|
|
||||||
|
@TableField(value = "gearbox_manufacturer")
|
||||||
|
private String gearboxManufacturer;
|
||||||
|
|
||||||
|
@TableField(value = "gearbox_details")
|
||||||
|
private String gearboxDetails;
|
||||||
|
|
||||||
|
// Generator
|
||||||
|
@TableField(value = "generator_model")
|
||||||
|
private String generatorModel;
|
||||||
|
|
||||||
|
@TableField(value = "generator_manufacturer")
|
||||||
|
private String generatorManufacturer;
|
||||||
|
|
||||||
|
@TableField(value = "generator_details")
|
||||||
|
private String generatorDetails;
|
||||||
|
|
||||||
|
// Converter
|
||||||
|
@TableField(value = "converter_model")
|
||||||
|
private String converterModel;
|
||||||
|
|
||||||
|
@TableField(value = "converter_manufacturer")
|
||||||
|
private String converterManufacturer;
|
||||||
|
|
||||||
|
@TableField(value = "converter_details")
|
||||||
|
private String converterDetails;
|
||||||
|
|
||||||
|
// Main Control System
|
||||||
|
@TableField(value = "main_control_system_model")
|
||||||
|
private String mainControlSystemModel;
|
||||||
|
|
||||||
|
@TableField(value = "main_control_system_manufacturer")
|
||||||
|
private String mainControlSystemManufacturer;
|
||||||
|
|
||||||
|
@TableField(value = "main_control_system_software_version")
|
||||||
|
private String mainControlSystemSoftwareVersion;
|
||||||
|
|
||||||
|
@TableField(value = "main_control_system_software_version_details")
|
||||||
|
private String mainControlSystemSoftwareVersionDetails;
|
||||||
|
|
||||||
|
// Cabinet Details
|
||||||
|
|
||||||
|
@TableField(value = "tower_base_cabinet_details")
|
||||||
|
private String towerBaseCabinetDetails;
|
||||||
|
|
||||||
|
@TableField(value = "nacelle_cabinet_details")
|
||||||
|
private String nacelleCabinetDetails;
|
||||||
|
}
|
@ -0,0 +1,10 @@
|
|||||||
|
package com.das.modules.equipment.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.das.modules.equipment.entity.SysEquipmentDocs;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface SysEquipmentDocsMapper extends BaseMapper<SysEquipmentDocs> {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,10 @@
|
|||||||
|
package com.das.modules.equipment.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.das.modules.equipment.entity.SysGenExtProps;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface SysGenExtPropsMapper extends BaseMapper<SysGenExtProps> {
|
||||||
|
|
||||||
|
}
|
@ -2,7 +2,10 @@ package com.das.modules.equipment.service;
|
|||||||
|
|
||||||
import com.das.common.utils.PageDataInfo;
|
import com.das.common.utils.PageDataInfo;
|
||||||
import com.das.modules.equipment.domain.dto.SysEquipmentDto;
|
import com.das.modules.equipment.domain.dto.SysEquipmentDto;
|
||||||
|
import com.das.modules.equipment.domain.dto.SysGenExtPropsDto;
|
||||||
import com.das.modules.equipment.domain.vo.SysEquipmentVo;
|
import com.das.modules.equipment.domain.vo.SysEquipmentVo;
|
||||||
|
import com.das.modules.equipment.entity.SysEquipmentDocs;
|
||||||
|
import com.das.modules.equipment.entity.SysGenExtProps;
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
@ -28,4 +31,13 @@ public interface SysEquipmentService {
|
|||||||
|
|
||||||
void importSysEquipment(String parentEquipmentId,MultipartFile file) throws IOException, ParseException;
|
void importSysEquipment(String parentEquipmentId,MultipartFile file) throws IOException, ParseException;
|
||||||
|
|
||||||
|
SysGenExtProps creatSysEquipmentExtProps(SysGenExtPropsDto sysGenExtPropsDto);
|
||||||
|
|
||||||
|
SysGenExtProps updateSysEquipmentExtProps(SysGenExtPropsDto sysGenExtPropsDto);
|
||||||
|
|
||||||
|
void deleteSysEquipmentExtProps(Long id);
|
||||||
|
|
||||||
|
SysGenExtProps querySysEquipmentExtProps(Long id);
|
||||||
|
|
||||||
|
SysEquipmentDocs upload(Long deviceId, String folderName, MultipartFile file);
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.das.common.config.SessionUtil;
|
import com.das.common.config.SessionUtil;
|
||||||
import com.das.common.constant.EquipmentTypeIds;
|
import com.das.common.constant.EquipmentTypeIds;
|
||||||
|
import com.das.common.constant.FileConstants;
|
||||||
import com.das.common.exceptions.ServiceException;
|
import com.das.common.exceptions.ServiceException;
|
||||||
import com.das.common.utils.BeanCopyUtils;
|
import com.das.common.utils.BeanCopyUtils;
|
||||||
import com.das.common.utils.PageDataInfo;
|
import com.das.common.utils.PageDataInfo;
|
||||||
@ -17,16 +18,26 @@ import com.das.common.utils.PageQuery;
|
|||||||
import com.das.common.utils.SequenceUtils;
|
import com.das.common.utils.SequenceUtils;
|
||||||
import com.das.modules.auth.domain.vo.SysUserVo;
|
import com.das.modules.auth.domain.vo.SysUserVo;
|
||||||
import com.das.modules.auth.mapper.SysOrgMapper;
|
import com.das.modules.auth.mapper.SysOrgMapper;
|
||||||
|
import com.das.modules.cache.domain.DeviceInfoCache;
|
||||||
import com.das.modules.cache.service.CacheService;
|
import com.das.modules.cache.service.CacheService;
|
||||||
|
import com.das.modules.cache.service.EquipmentCache;
|
||||||
import com.das.modules.data.service.TDEngineService;
|
import com.das.modules.data.service.TDEngineService;
|
||||||
import com.das.modules.data.service.impl.DataServiceImpl;
|
import com.das.modules.data.service.impl.DataServiceImpl;
|
||||||
import com.das.modules.equipment.domain.dto.SysEquipmentDto;
|
import com.das.modules.equipment.domain.dto.SysEquipmentDto;
|
||||||
|
import com.das.modules.equipment.domain.dto.SysGenExtPropsDto;
|
||||||
import com.das.modules.equipment.domain.excel.SysEquipmentExcel;
|
import com.das.modules.equipment.domain.excel.SysEquipmentExcel;
|
||||||
import com.das.modules.equipment.domain.vo.SysEquipmentVo;
|
import com.das.modules.equipment.domain.vo.SysEquipmentVo;
|
||||||
import com.das.modules.equipment.entity.SysEquipment;
|
import com.das.modules.equipment.entity.SysEquipment;
|
||||||
|
import com.das.modules.equipment.entity.SysEquipmentDocs;
|
||||||
|
import com.das.modules.equipment.entity.SysGenExtProps;
|
||||||
|
import com.das.modules.equipment.mapper.SysEquipmentDocsMapper;
|
||||||
import com.das.modules.equipment.mapper.SysEquipmentMapper;
|
import com.das.modules.equipment.mapper.SysEquipmentMapper;
|
||||||
|
import com.das.modules.equipment.mapper.SysGenExtPropsMapper;
|
||||||
import com.das.modules.equipment.mapper.SysIotModelMapper;
|
import com.das.modules.equipment.mapper.SysIotModelMapper;
|
||||||
import com.das.modules.equipment.service.SysEquipmentService;
|
import com.das.modules.equipment.service.SysEquipmentService;
|
||||||
|
import com.das.modules.fdr.config.MinioProperties;
|
||||||
|
import com.das.modules.fdr.service.MinioViewsServcie;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
import jakarta.servlet.ServletOutputStream;
|
import jakarta.servlet.ServletOutputStream;
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
@ -73,6 +84,21 @@ public class SysEquipmentServiceImpl implements SysEquipmentService {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private TDEngineService tdEngineService;
|
private TDEngineService tdEngineService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SysGenExtPropsMapper sysGenExtPropsMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private MinioViewsServcie minioViewsServcie;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private MinioProperties minioAutoProperties;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private EquipmentCache equipmentCache;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SysEquipmentDocsMapper sysEquipmentDocsMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SysEquipmentVo creatSysEquipment(SysEquipmentDto sysEquipmentDto) {
|
public SysEquipmentVo creatSysEquipment(SysEquipmentDto sysEquipmentDto) {
|
||||||
//去除空格
|
//去除空格
|
||||||
@ -358,4 +384,56 @@ public class SysEquipmentServiceImpl implements SysEquipmentService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SysGenExtProps creatSysEquipmentExtProps(SysGenExtPropsDto sysGenExtPropsDto) {
|
||||||
|
if (sysGenExtPropsDto.getId() == null){
|
||||||
|
throw new ServiceException("设备id不能为空");
|
||||||
|
}
|
||||||
|
SysGenExtProps sysEquipmentExtProps = new SysGenExtProps();
|
||||||
|
BeanCopyUtils.copy(sysGenExtPropsDto, sysEquipmentExtProps);
|
||||||
|
sysGenExtPropsMapper.insert(sysEquipmentExtProps);
|
||||||
|
return sysEquipmentExtProps;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SysGenExtProps updateSysEquipmentExtProps(SysGenExtPropsDto sysGenExtPropsDto) {
|
||||||
|
if (sysGenExtPropsDto.getId() == null){
|
||||||
|
throw new ServiceException("设备id不能为空");
|
||||||
|
}
|
||||||
|
SysGenExtProps sysEquipmentExtProps = new SysGenExtProps();
|
||||||
|
BeanCopyUtils.copy(sysGenExtPropsDto, sysEquipmentExtProps);
|
||||||
|
sysGenExtPropsMapper.updateById(sysEquipmentExtProps);
|
||||||
|
return sysEquipmentExtProps;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteSysEquipmentExtProps(Long id) {
|
||||||
|
sysGenExtPropsMapper.deleteById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SysGenExtProps querySysEquipmentExtProps(Long id) {
|
||||||
|
return sysGenExtPropsMapper.selectById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SysEquipmentDocs upload(Long deviceId, String folderName, MultipartFile file) {
|
||||||
|
DeviceInfoCache deviceInfoCache = equipmentCache.getDeviceInfoCacheById(deviceId);
|
||||||
|
String parent = FileConstants.FILE_SEPARATOR +"风机图片"+ FileConstants.FILE_SEPARATOR + deviceInfoCache.getDeviceCode();
|
||||||
|
String url = minioViewsServcie.upload(minioAutoProperties.getPublicBucket(), parent, folderName, file);
|
||||||
|
String fileName = url.substring(url.lastIndexOf("/"));
|
||||||
|
SysEquipmentDocs sysEquipmentDocs = new SysEquipmentDocs();
|
||||||
|
sysEquipmentDocs.setDeviceId(deviceId);
|
||||||
|
sysEquipmentDocs.setName(fileName);
|
||||||
|
sysEquipmentDocs.setUrl(url);
|
||||||
|
sysEquipmentDocs.setUpdateTime(new Date());
|
||||||
|
SysEquipmentDocs sysEquipmentDocsInfo = sysEquipmentDocsMapper.selectById(deviceId);
|
||||||
|
if (sysEquipmentDocsInfo == null){
|
||||||
|
sysEquipmentDocsMapper.insert(sysEquipmentDocs);
|
||||||
|
}else {
|
||||||
|
sysEquipmentDocsMapper.updateById(sysEquipmentDocs);
|
||||||
|
}
|
||||||
|
return sysEquipmentDocs;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -150,9 +150,7 @@ public class SysIotModelServiceImpl implements SysIotModelService {
|
|||||||
PageQuery pageQuery = new PageQuery();
|
PageQuery pageQuery = new PageQuery();
|
||||||
pageQuery.setPageNum(sysIotModelFieldDto.getPageNum());
|
pageQuery.setPageNum(sysIotModelFieldDto.getPageNum());
|
||||||
pageQuery.setPageSize(sysIotModelFieldDto.getPageSize());
|
pageQuery.setPageSize(sysIotModelFieldDto.getPageSize());
|
||||||
log.info("查询物模型属性参数:{}",sysIotModelFieldDto);
|
|
||||||
IPage<SysIotModelFieldVo> iPage = sysIotModelFieldMapper.querySysIotModelFieldList(pageQuery.build(), sysIotModelFieldDto);
|
IPage<SysIotModelFieldVo> iPage = sysIotModelFieldMapper.querySysIotModelFieldList(pageQuery.build(), sysIotModelFieldDto);
|
||||||
log.info("查询物模型属性返回总数{},:{}",iPage.getTotal(),iPage.getRecords());
|
|
||||||
return PageDataInfo.build(iPage.getRecords(), iPage.getTotal());
|
return PageDataInfo.build(iPage.getRecords(), iPage.getTotal());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,6 +42,14 @@ public class MinioConfig {
|
|||||||
createBucket(bucketName, minioClient);
|
createBucket(bucketName, minioClient);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
String publicBucket = minioAutoProperties.getPublicBucket();
|
||||||
|
if (!checkBucket(publicBucket, minioClient)) {
|
||||||
|
log.info("文件public桶[{}]不存在, 开始检查是否可以新建桶", publicBucket);
|
||||||
|
if (minioAutoProperties.isCreateBucket()) {
|
||||||
|
log.info("createBucket为{},开始新建public文件桶", minioAutoProperties.isCreateBucket());
|
||||||
|
createBucket(publicBucket, minioClient);
|
||||||
|
}
|
||||||
|
}
|
||||||
log.info("文件桶[{}]已存在, minio客户端连接成功!", bucketName);
|
log.info("文件桶[{}]已存在, minio客户端连接成功!", bucketName);
|
||||||
} else {
|
} else {
|
||||||
throw new RuntimeException("桶不存在, 请检查桶名称是否正确或者将checkBucket属性改为false");
|
throw new RuntimeException("桶不存在, 请检查桶名称是否正确或者将checkBucket属性改为false");
|
||||||
|
@ -40,6 +40,9 @@ public class MinioProperties {
|
|||||||
@Value("${minio.bucket}")
|
@Value("${minio.bucket}")
|
||||||
private String bucket;
|
private String bucket;
|
||||||
|
|
||||||
|
@Value("${minio.publicBucket}")
|
||||||
|
private String publicBucket;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 桶不在的时候是否新建桶
|
* 桶不在的时候是否新建桶
|
||||||
*/
|
*/
|
||||||
|
@ -78,7 +78,7 @@ public class MinioViewsServcie {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public String upload(String path, String folderName,MultipartFile file) {
|
public String upload(String bucketName, String path, String folderName,MultipartFile file) {
|
||||||
String targetFile = null;
|
String targetFile = null;
|
||||||
try {
|
try {
|
||||||
// 上传一个空对象来模拟文件夹
|
// 上传一个空对象来模拟文件夹
|
||||||
@ -87,14 +87,14 @@ public class MinioViewsServcie {
|
|||||||
ByteArrayInputStream bais = new ByteArrayInputStream(new byte[0]);
|
ByteArrayInputStream bais = new ByteArrayInputStream(new byte[0]);
|
||||||
minioClient.putObject(
|
minioClient.putObject(
|
||||||
PutObjectArgs.builder()
|
PutObjectArgs.builder()
|
||||||
.bucket(minioProperties.getBucket())
|
.bucket(bucketName)
|
||||||
.object(targetFile)
|
.object(targetFile)
|
||||||
.stream(bais, 0, -1)
|
.stream(bais, 0, -1)
|
||||||
.build());
|
.build());
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
targetFile= path +"/" + file.getOriginalFilename();
|
targetFile= path +"/" + file.getOriginalFilename();
|
||||||
uploadFile(minioProperties.getBucket(), file, targetFile, "application/octet-stream");
|
uploadFile(bucketName, file, targetFile, "application/octet-stream");
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
|
@ -14,6 +14,7 @@ import com.das.modules.curve.mapper.TheoreticalPowerCurveMapper;
|
|||||||
import com.das.modules.equipment.domain.excel.SheetInfoBean;
|
import com.das.modules.equipment.domain.excel.SheetInfoBean;
|
||||||
import com.das.modules.equipment.entity.SysEquipment;
|
import com.das.modules.equipment.entity.SysEquipment;
|
||||||
import com.das.modules.equipment.mapper.SysEquipmentMapper;
|
import com.das.modules.equipment.mapper.SysEquipmentMapper;
|
||||||
|
import com.das.modules.fdr.config.MinioProperties;
|
||||||
import com.das.modules.fdr.domain.FileNode;
|
import com.das.modules.fdr.domain.FileNode;
|
||||||
import com.das.modules.fdr.domain.SysFaultCodeDict;
|
import com.das.modules.fdr.domain.SysFaultCodeDict;
|
||||||
import com.das.modules.fdr.domain.SysFaultRecordingDesc;
|
import com.das.modules.fdr.domain.SysFaultRecordingDesc;
|
||||||
@ -26,6 +27,7 @@ import com.das.modules.fdr.service.FaultRecorderService;
|
|||||||
import com.das.modules.fdr.service.MinioViewsServcie;
|
import com.das.modules.fdr.service.MinioViewsServcie;
|
||||||
import io.micrometer.common.util.StringUtils;
|
import io.micrometer.common.util.StringUtils;
|
||||||
import io.minio.MinioClient;
|
import io.minio.MinioClient;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@ -52,6 +54,9 @@ public class FaultRecorderServiceImpl implements FaultRecorderService {
|
|||||||
@Autowired
|
@Autowired
|
||||||
MinioClient minioClient;
|
MinioClient minioClient;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private MinioProperties minioAutoProperties;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private SysEquipmentMapper sysEquipmentMapper;
|
private SysEquipmentMapper sysEquipmentMapper;
|
||||||
|
|
||||||
@ -82,7 +87,7 @@ public class FaultRecorderServiceImpl implements FaultRecorderService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String upload(String parent, String folderName, MultipartFile file) {
|
public String upload(String parent, String folderName, MultipartFile file) {
|
||||||
return minioViewsServcie.upload(parent, folderName, file);
|
return minioViewsServcie.upload(minioAutoProperties.getBucket(), parent, folderName, file);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -109,5 +109,6 @@ tdengine:
|
|||||||
minio:
|
minio:
|
||||||
url: http://192.168.109.187:9000
|
url: http://192.168.109.187:9000
|
||||||
bucket: das
|
bucket: das
|
||||||
|
publicBucket: das-public
|
||||||
accessKey: das
|
accessKey: das
|
||||||
secretKey: zaq12WSX
|
secretKey: zaq12WSX
|
@ -60,6 +60,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!--温度-->
|
<!--温度-->
|
||||||
|
<el-tooltip content="点击打开温度管理">
|
||||||
<div class="temperatureList">
|
<div class="temperatureList">
|
||||||
<div class="chartPart-item" @click="openTemperature">
|
<div class="chartPart-item" @click="openTemperature">
|
||||||
<div class="chartParm" ref="temperatureChartRef1"></div>
|
<div class="chartParm" ref="temperatureChartRef1"></div>
|
||||||
@ -71,6 +72,7 @@
|
|||||||
<div class="chartParm" ref="temperatureChartRef3"></div>
|
<div class="chartParm" ref="temperatureChartRef3"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</el-tooltip>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
@ -169,8 +171,10 @@
|
|||||||
<div class="summarize-panel-base">
|
<div class="summarize-panel-base">
|
||||||
<div>
|
<div>
|
||||||
<span class="content-number">{{ realTimeDataForSingle.ikwhthisday }}</span>
|
<span class="content-number">{{ realTimeDataForSingle.ikwhthisday }}</span>
|
||||||
|
|
||||||
|
<span class="content-number">{{ realTimeDataForSingleUnit.ikwhthisday }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div>{{ realTimeDataForSingleUnit.ikwhthisday }}</div>
|
<!-- <div>{{ realTimeDataForSingleUnit.ikwhthisday }}</div> -->
|
||||||
<div>日发电量</div>
|
<div>日发电量</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -181,8 +185,10 @@
|
|||||||
<div class="summarize-panel-base">
|
<div class="summarize-panel-base">
|
||||||
<div>
|
<div>
|
||||||
<span class="content-number">{{ realTimeDataForSingle.monthprodenergy }}</span>
|
<span class="content-number">{{ realTimeDataForSingle.monthprodenergy }}</span>
|
||||||
|
|
||||||
|
<span class="content-number">{{ realTimeDataForSingleUnit.monthprodenergy }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div>{{ realTimeDataForSingleUnit.monthprodenergy }}</div>
|
<!-- <div>{{ realTimeDataForSingleUnit.monthprodenergy }}</div> -->
|
||||||
<div>月发电量</div>
|
<div>月发电量</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -195,8 +201,10 @@
|
|||||||
<div class="summarize-panel-base">
|
<div class="summarize-panel-base">
|
||||||
<div>
|
<div>
|
||||||
<span class="content-number">{{ realTimeDataForSingle.yearprodenergy }}</span>
|
<span class="content-number">{{ realTimeDataForSingle.yearprodenergy }}</span>
|
||||||
|
|
||||||
|
<span class="content-number">{{ realTimeDataForSingleUnit.yearprodenergy }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div>{{ realTimeDataForSingleUnit.yearprodenergy }}</div>
|
<!-- <div>{{ realTimeDataForSingleUnit.yearprodenergy }}</div> -->
|
||||||
<div>年发电量</div>
|
<div>年发电量</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -207,8 +215,10 @@
|
|||||||
<div class="summarize-panel-base">
|
<div class="summarize-panel-base">
|
||||||
<div>
|
<div>
|
||||||
<span class="content-number">{{ realTimeDataForSingle.ikwhoverall }}</span>
|
<span class="content-number">{{ realTimeDataForSingle.ikwhoverall }}</span>
|
||||||
|
|
||||||
|
<span class="content-number">{{ realTimeDataForSingleUnit.ikwhoverall }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div>{{ realTimeDataForSingleUnit.ikwhoverall }}</div>
|
<!-- <div>{{ realTimeDataForSingleUnit.ikwhoverall }}</div> -->
|
||||||
<div>总发电量</div>
|
<div>总发电量</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -1935,7 +1945,7 @@ $labelHeight: 24px;
|
|||||||
// min-height: 920px;
|
// min-height: 920px;
|
||||||
.summarize {
|
.summarize {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 40%;
|
height: 35%;
|
||||||
@include cardDefaultStyle;
|
@include cardDefaultStyle;
|
||||||
@include cardlabel;
|
@include cardlabel;
|
||||||
.summarize-panel-list {
|
.summarize-panel-list {
|
||||||
@ -1979,6 +1989,9 @@ $labelHeight: 24px;
|
|||||||
color: #333333;
|
color: #333333;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
|
&:last-child{
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
&:first-child {
|
&:first-child {
|
||||||
height: 40%;
|
height: 40%;
|
||||||
@ -1994,7 +2007,7 @@ $labelHeight: 24px;
|
|||||||
margin: 10px 0;
|
margin: 10px 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
// min-height: 350px;
|
// min-height: 350px;
|
||||||
height: calc(60% - 20px);
|
height: calc(65% - 20px);
|
||||||
@include cardDefaultStyle;
|
@include cardDefaultStyle;
|
||||||
@include cardlabel;
|
@include cardlabel;
|
||||||
}
|
}
|
||||||
|
@ -184,7 +184,12 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<el-dialog v-model="selectPointVisible" title="选择测点" width="1000">
|
<el-dialog v-model="selectPointVisible" title="选择测点" width="1000">
|
||||||
<SelectPoint ref="selectPointDialogRef" :defaultAttr="defaultAttr" :visible="selectPointVisible" :iot-model-id="selectPointModelId"></SelectPoint>
|
<SelectPoint
|
||||||
|
ref="selectPointDialogRef"
|
||||||
|
:defaultAttr="defaultAttr"
|
||||||
|
:visible="selectPointVisible"
|
||||||
|
:iot-model-id="selectPointModelId"
|
||||||
|
></SelectPoint>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<div class="selectPointDialogFooter">
|
<div class="selectPointDialogFooter">
|
||||||
<el-button type="primary" @click="saveSelectPoint">保存</el-button>
|
<el-button type="primary" @click="saveSelectPoint">保存</el-button>
|
||||||
@ -226,7 +231,6 @@ import { getRealValueListReq } from '/@/api/backend/deviceModel/request'
|
|||||||
import SelectPoint from '/@/views/backend/equipment/airBlower/selectPoint.vue'
|
import SelectPoint from '/@/views/backend/equipment/airBlower/selectPoint.vue'
|
||||||
import RealDataChart from '/@/views/backend/equipment/airBlower/realDataChart.vue'
|
import RealDataChart from '/@/views/backend/equipment/airBlower/realDataChart.vue'
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
|
|
||||||
const airBlowerSelect = reactive<SelectTypeObjType>({
|
const airBlowerSelect = reactive<SelectTypeObjType>({
|
||||||
@ -664,7 +668,7 @@ const openWindTurbine = (row: TableDataObjType) => {
|
|||||||
iotModelId: row.iotModelId,
|
iotModelId: row.iotModelId,
|
||||||
deviceCode: row.deviceCode,
|
deviceCode: row.deviceCode,
|
||||||
model: row.model,
|
model: row.model,
|
||||||
name:row.name
|
name: row.name,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -696,7 +700,7 @@ const defaultAttr = computed(() => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
const selectPointModelId = computed(()=>{
|
const selectPointModelId = computed(() => {
|
||||||
return tableData.value[0]?.iotModelId ?? ''
|
return tableData.value[0]?.iotModelId ?? ''
|
||||||
})
|
})
|
||||||
const openMeasure = () => {
|
const openMeasure = () => {
|
||||||
|
@ -374,8 +374,6 @@ const getListForAirBlower = () => {
|
|||||||
startTime: dayjs(searchData.date[0]).format('YYYY-MM-DD'),
|
startTime: dayjs(searchData.date[0]).format('YYYY-MM-DD'),
|
||||||
endTime: dayjs(searchData.date[1]).format('YYYY-MM-DD'),
|
endTime: dayjs(searchData.date[1]).format('YYYY-MM-DD'),
|
||||||
}
|
}
|
||||||
console.log('🚀 ~ getListForAirBlower ~ data:', data)
|
|
||||||
|
|
||||||
if (activeName.value === 'malFunction') {
|
if (activeName.value === 'malFunction') {
|
||||||
getMalFunctionListReq(data).then((res) => {
|
getMalFunctionListReq(data).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
@ -520,15 +518,27 @@ const readFile = (data: tableItemData) => {
|
|||||||
getFileKeyEnum().finally(() => {
|
getFileKeyEnum().finally(() => {
|
||||||
getFileData(data.path)
|
getFileData(data.path)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
warningInfo.value = res.data.faultTime ? dayjs(res.data.faultTime).format('YYYY-MM-DD HH:mm:ss.SSS') : ''
|
// warningInfo.value = res.data.faultTime ? dayjs(res.data.faultTime).format('YYYY-MM-DD HH:mm:ss.SSS') : ''
|
||||||
|
|
||||||
previewChartData = res.data.dataCurve
|
previewChartData = res.data.dataCurve
|
||||||
const attrName = Object.keys(res.data.dataCurve)
|
const attrName = Object.keys(res.data.dataCurve)
|
||||||
const data: any = []
|
const data: any = []
|
||||||
|
let hasAddFaultTime = false
|
||||||
attrName.forEach((item) => {
|
attrName.forEach((item) => {
|
||||||
if (item === 'TimeStamp') {
|
if (item === 'TimeStamp') {
|
||||||
|
let timeStamp: any = []
|
||||||
previewChartData.TimeStamp = previewChartData.TimeStamp.map((item: any) => {
|
previewChartData.TimeStamp = previewChartData.TimeStamp.map((item: any) => {
|
||||||
return dayjs(item).format('YYYY-MM-DD HH:mm:ss.SSS')
|
const parseTime = dayjs(item).format('YYYY-MM-DD HH:mm:ss.SSS')
|
||||||
|
if (!hasAddFaultTime && res.data?.faultTime && item > res.data.faultTime) {
|
||||||
|
const parseFaultTime = dayjs(res.data.faultTime).format('YYYY-MM-DD HH:mm:ss.SSS')
|
||||||
|
warningInfo.value = parseFaultTime
|
||||||
|
timeStamp.push(parseFaultTime)
|
||||||
|
hasAddFaultTime = true
|
||||||
|
}
|
||||||
|
timeStamp.push(parseTime)
|
||||||
|
return parseTime
|
||||||
})
|
})
|
||||||
|
warningChartData.TimeStamp = timeStamp
|
||||||
} else if (item === 'TimeStampUTC') {
|
} else if (item === 'TimeStampUTC') {
|
||||||
previewChartData.TimeStamp = previewChartData.TimeStampUTC.map((item: any) => {
|
previewChartData.TimeStamp = previewChartData.TimeStampUTC.map((item: any) => {
|
||||||
return dayjs(item).format('YYYY-MM-DD HH:mm:ss.SSS')
|
return dayjs(item).format('YYYY-MM-DD HH:mm:ss.SSS')
|
||||||
@ -541,6 +551,7 @@ const readFile = (data: tableItemData) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
previewTreeData.value = data
|
previewTreeData.value = data
|
||||||
originPreviewTreeData = data
|
originPreviewTreeData = data
|
||||||
})
|
})
|
||||||
@ -636,6 +647,7 @@ const handleCheckChange = (data: any, state: { checkedKeys: string[] }) => {
|
|||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
let previewChartData: any = {}
|
let previewChartData: any = {}
|
||||||
|
let warningChartData: any = {}
|
||||||
let curSeries: any = []
|
let curSeries: any = []
|
||||||
let previewChartInstance: any = null
|
let previewChartInstance: any = null
|
||||||
const previewChartRef = ref()
|
const previewChartRef = ref()
|
||||||
@ -670,14 +682,7 @@ const createSeriresData = () => {
|
|||||||
},
|
},
|
||||||
smooth: 0.6,
|
smooth: 0.6,
|
||||||
symbol: 'none',
|
symbol: 'none',
|
||||||
markLine: {
|
xAxisIndex: 0,
|
||||||
symbol: 'none',
|
|
||||||
data: [
|
|
||||||
{
|
|
||||||
xAxis: warningInfo.value,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
data: previewChartData[item],
|
data: previewChartData[item],
|
||||||
}
|
}
|
||||||
seriesData.push(data)
|
seriesData.push(data)
|
||||||
@ -703,7 +708,8 @@ const initPreviewChart = () => {
|
|||||||
type: 'line',
|
type: 'line',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
xAxis: {
|
xAxis: [
|
||||||
|
{
|
||||||
type: 'category',
|
type: 'category',
|
||||||
axisLine: {
|
axisLine: {
|
||||||
show: true,
|
show: true,
|
||||||
@ -732,6 +738,12 @@ const initPreviewChart = () => {
|
|||||||
},
|
},
|
||||||
data: previewChartData['TimeStamp'],
|
data: previewChartData['TimeStamp'],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
type: 'category',
|
||||||
|
show: false,
|
||||||
|
data: warningChartData.TimeStamp,
|
||||||
|
},
|
||||||
|
],
|
||||||
yAxis: [
|
yAxis: [
|
||||||
{
|
{
|
||||||
type: 'value',
|
type: 'value',
|
||||||
@ -779,7 +791,27 @@ const initPreviewChart = () => {
|
|||||||
color: '#73767a',
|
color: '#73767a',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
series: series,
|
series: [
|
||||||
|
...series,
|
||||||
|
{
|
||||||
|
type: 'line',
|
||||||
|
name: '报警值',
|
||||||
|
data: [],
|
||||||
|
xAxisIndex: 1,
|
||||||
|
tooltip: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
markLine: {
|
||||||
|
symbol: 'none',
|
||||||
|
data: [
|
||||||
|
{
|
||||||
|
xAxis: warningInfo.value,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
animation: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
}
|
}
|
||||||
chart.setOption(option)
|
chart.setOption(option)
|
||||||
previewChartInstance = chart
|
previewChartInstance = chart
|
||||||
|
Loading…
Reference in New Issue
Block a user