diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/domain/DevIotConfig.java b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/domain/DevIotConfig.java new file mode 100644 index 00000000..734e669e --- /dev/null +++ b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/domain/DevIotConfig.java @@ -0,0 +1,126 @@ +package com.yanzhu.device.domain; + +import com.yanzhu.common.core.annotation.Excel; +import com.yanzhu.common.core.web.domain.BaseEntity; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * 配电箱配置对象 dev_iot_config + * + * @author yanzhu + * @date 2025-04-04 + */ +public class DevIotConfig extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键 */ + private Long id; + + /** 公司主键 */ + @Excel(name = "公司主键") + private Long comId; + + /** 项目主键 */ + @Excel(name = "项目主键") + private Long projectId; + + /** 通信账号 */ + @Excel(name = "通信账号") + private String signalName; + + /** 通信密码 */ + @Excel(name = "通信密码") + private String signalCode; + + /** 厂家名称 */ + @Excel(name = "厂家名称") + private String factoryName; + + /** 数据状态 */ + @Excel(name = "数据状态") + private String isDel; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setComId(Long comId) + { + this.comId = comId; + } + + public Long getComId() + { + return comId; + } + public void setProjectId(Long projectId) + { + this.projectId = projectId; + } + + public Long getProjectId() + { + return projectId; + } + public void setSignalName(String signalName) + { + this.signalName = signalName; + } + + public String getSignalName() + { + return signalName; + } + public void setSignalCode(String signalCode) + { + this.signalCode = signalCode; + } + + public String getSignalCode() + { + return signalCode; + } + public void setFactoryName(String factoryName) + { + this.factoryName = factoryName; + } + + public String getFactoryName() + { + return factoryName; + } + public void setIsDel(String isDel) + { + this.isDel = isDel; + } + + public String getIsDel() + { + return isDel; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("comId", getComId()) + .append("projectId", getProjectId()) + .append("signalName", getSignalName()) + .append("signalCode", getSignalCode()) + .append("factoryName", getFactoryName()) + .append("isDel", getIsDel()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("remark", getRemark()) + .toString(); + } +} diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/domain/DevIotConfigPoint.java b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/domain/DevIotConfigPoint.java new file mode 100644 index 00000000..db933e67 --- /dev/null +++ b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/domain/DevIotConfigPoint.java @@ -0,0 +1,266 @@ +package com.yanzhu.device.domain; + +import com.yanzhu.common.core.annotation.Excel; +import com.yanzhu.common.core.web.domain.BaseEntity; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * 配电箱配置对象 dev_iot_config_point + * + * @author yanzhu + * @date 2025-04-04 + */ +public class DevIotConfigPoint extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键 */ + private Long id; + + /** 配置主键 */ + @Excel(name = "配置主键") + private Long cfgId; + + /** 公司主键 */ + @Excel(name = "公司主键") + private Long comId; + + /** 项目主键 */ + @Excel(name = "项目主键") + private Long projectId; + + /** 设备序列号 */ + @Excel(name = "设备序列号") + private String deviceSn; + + /** 设备名称 */ + @Excel(name = "设备名称") + private String deviceName; + + /** 厂家名称 */ + @Excel(name = "厂家名称") + private String factoryName; + + /** 联系人 */ + @Excel(name = "联系人") + private String contactPerson; + + /** 联系人电话 */ + @Excel(name = "联系人电话") + private String contactPersonPhone; + + /** 配电箱等级 */ + @Excel(name = "配电箱等级") + private String levels; + + /** 漏电电流 */ + @Excel(name = "漏电电流") + private String leakageCurrent; + + /** 额定温度 */ + @Excel(name = "额定温度") + private String ratedTemperature; + + /** 短路电流 */ + @Excel(name = "短路电流") + private String shortCircuitCurrent; + + /** 额定电流 */ + @Excel(name = "额定电流") + private String ratedCurrent; + + /** 额定电压 */ + @Excel(name = "额定电压") + private String ratedVoltage; + + /** 在线状态 */ + @Excel(name = "在线状态") + private String onlineStatus; + + /** 数据状态 */ + @Excel(name = "数据状态") + private String isDel; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setCfgId(Long cfgId) + { + this.cfgId = cfgId; + } + + public Long getCfgId() + { + return cfgId; + } + public void setComId(Long comId) + { + this.comId = comId; + } + + public Long getComId() + { + return comId; + } + public void setProjectId(Long projectId) + { + this.projectId = projectId; + } + + public Long getProjectId() + { + return projectId; + } + public void setDeviceSn(String deviceSn) + { + this.deviceSn = deviceSn; + } + + public String getDeviceSn() + { + return deviceSn; + } + public void setDeviceName(String deviceName) + { + this.deviceName = deviceName; + } + + public String getDeviceName() + { + return deviceName; + } + public void setFactoryName(String factoryName) + { + this.factoryName = factoryName; + } + + public String getFactoryName() + { + return factoryName; + } + public void setContactPerson(String contactPerson) + { + this.contactPerson = contactPerson; + } + + public String getContactPerson() + { + return contactPerson; + } + public void setContactPersonPhone(String contactPersonPhone) + { + this.contactPersonPhone = contactPersonPhone; + } + + public String getContactPersonPhone() + { + return contactPersonPhone; + } + public void setLevels(String levels) + { + this.levels = levels; + } + + public String getLevels() + { + return levels; + } + public void setLeakageCurrent(String leakageCurrent) + { + this.leakageCurrent = leakageCurrent; + } + + public String getLeakageCurrent() + { + return leakageCurrent; + } + public void setRatedTemperature(String ratedTemperature) + { + this.ratedTemperature = ratedTemperature; + } + + public String getRatedTemperature() + { + return ratedTemperature; + } + public void setShortCircuitCurrent(String shortCircuitCurrent) + { + this.shortCircuitCurrent = shortCircuitCurrent; + } + + public String getShortCircuitCurrent() + { + return shortCircuitCurrent; + } + public void setRatedCurrent(String ratedCurrent) + { + this.ratedCurrent = ratedCurrent; + } + + public String getRatedCurrent() + { + return ratedCurrent; + } + public void setRatedVoltage(String ratedVoltage) + { + this.ratedVoltage = ratedVoltage; + } + + public String getRatedVoltage() + { + return ratedVoltage; + } + public void setOnlineStatus(String onlineStatus) + { + this.onlineStatus = onlineStatus; + } + + public String getOnlineStatus() + { + return onlineStatus; + } + public void setIsDel(String isDel) + { + this.isDel = isDel; + } + + public String getIsDel() + { + return isDel; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("cfgId", getCfgId()) + .append("comId", getComId()) + .append("projectId", getProjectId()) + .append("deviceSn", getDeviceSn()) + .append("deviceName", getDeviceName()) + .append("factoryName", getFactoryName()) + .append("contactPerson", getContactPerson()) + .append("contactPersonPhone", getContactPersonPhone()) + .append("levels", getLevels()) + .append("leakageCurrent", getLeakageCurrent()) + .append("ratedTemperature", getRatedTemperature()) + .append("shortCircuitCurrent", getShortCircuitCurrent()) + .append("ratedCurrent", getRatedCurrent()) + .append("ratedVoltage", getRatedVoltage()) + .append("onlineStatus", getOnlineStatus()) + .append("isDel", getIsDel()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("remark", getRemark()) + .toString(); + } +} diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/domain/DevIotDatas.java b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/domain/DevIotDatas.java new file mode 100644 index 00000000..1acf1929 --- /dev/null +++ b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/domain/DevIotDatas.java @@ -0,0 +1,486 @@ +package com.yanzhu.device.domain; + +import com.yanzhu.common.core.annotation.Excel; +import com.yanzhu.common.core.web.domain.BaseEntity; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * 配电箱数据对象 dev_iot_datas + * + * @author yanzhu + * @date 2025-04-04 + */ +public class DevIotDatas extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键 */ + private Long id; + + /** 配置主键 */ + @Excel(name = "配置主键") + private Long cfgId; + + /** 点位主键 */ + @Excel(name = "点位主键") + private Long pointId; + + /** 公司主键 */ + @Excel(name = "公司主键") + private Long comId; + + /** 项目主键 */ + @Excel(name = "项目主键") + private Long projectId; + + /** 设备序列号 */ + @Excel(name = "设备序列号") + private String deviceSn; + + /** 开关位_交流 */ + @Excel(name = "开关位_交流") + private String switchesAc; + + /** 开关位 */ + @Excel(name = "开关位") + private String switchesSwitch; + + /** 开关位状态 */ + @Excel(name = "开关位状态") + private String switchesSwitches; + + /** 开关位安装状态 */ + @Excel(name = "开关位安装状态") + private String switchesSwitchstatus; + + /** 温度检测数据 */ + @Excel(name = "温度检测数据") + private String temperature; + + /** 漏电检测数据 */ + @Excel(name = "漏电检测数据") + private String leakage; + + /** A相电压 */ + @Excel(name = "A相电压") + private String voltageA; + + /** B相电压 */ + @Excel(name = "B相电压") + private String voltageB; + + /** C相电压 */ + @Excel(name = "C相电压") + private String voltageC; + + /** A相与B相之间的电压 */ + @Excel(name = "A相与B相之间的电压") + private String voltageAb; + + /** B相与C相之间的电压 */ + @Excel(name = "B相与C相之间的电压") + private String voltageBc; + + /** C相与A相之间的电压 */ + @Excel(name = "C相与A相之间的电压") + private String voltageCa; + + /** A相电流 */ + @Excel(name = "A相电流") + private String currentA; + + /** B相电流 */ + @Excel(name = "B相电流") + private String currentB; + + /** C相电流 */ + @Excel(name = "C相电流") + private String currentC; + + /** A相功率 */ + @Excel(name = "A相功率") + private String powerA; + + /** B相功率 */ + @Excel(name = "B相功率") + private String powerB; + + /** C相功率 */ + @Excel(name = "C相功率") + private String powerC; + + /** A相累计能量 */ + @Excel(name = "A相累计能量") + private String energyA; + + /** B相累计能量 */ + @Excel(name = "B相累计能量") + private String energyB; + + /** C相累计能量 */ + @Excel(name = "C相累计能量") + private String energyC; + + /** A相功率因数 */ + @Excel(name = "A相功率因数") + private String factorA; + + /** B相功率因数 */ + @Excel(name = "B相功率因数") + private String factorB; + + /** C相功率因数 */ + @Excel(name = "C相功率因数") + private String factorC; + + /** A相频率 */ + @Excel(name = "A相频率") + private String frequencyA; + + /** B相频率 */ + @Excel(name = "B相频率") + private String frequencyB; + + /** C相频率 */ + @Excel(name = "C相频率") + private String frequencyC; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setCfgId(Long cfgId) + { + this.cfgId = cfgId; + } + + public Long getCfgId() + { + return cfgId; + } + public void setPointId(Long pointId) + { + this.pointId = pointId; + } + + public Long getPointId() + { + return pointId; + } + public void setComId(Long comId) + { + this.comId = comId; + } + + public Long getComId() + { + return comId; + } + public void setProjectId(Long projectId) + { + this.projectId = projectId; + } + + public Long getProjectId() + { + return projectId; + } + public void setDeviceSn(String deviceSn) + { + this.deviceSn = deviceSn; + } + + public String getDeviceSn() + { + return deviceSn; + } + public void setSwitchesAc(String switchesAc) + { + this.switchesAc = switchesAc; + } + + public String getSwitchesAc() + { + return switchesAc; + } + public void setSwitchesSwitch(String switchesSwitch) + { + this.switchesSwitch = switchesSwitch; + } + + public String getSwitchesSwitch() + { + return switchesSwitch; + } + public void setSwitchesSwitches(String switchesSwitches) + { + this.switchesSwitches = switchesSwitches; + } + + public String getSwitchesSwitches() + { + return switchesSwitches; + } + public void setSwitchesSwitchstatus(String switchesSwitchstatus) + { + this.switchesSwitchstatus = switchesSwitchstatus; + } + + public String getSwitchesSwitchstatus() + { + return switchesSwitchstatus; + } + public void setTemperature(String temperature) + { + this.temperature = temperature; + } + + public String getTemperature() + { + return temperature; + } + public void setLeakage(String leakage) + { + this.leakage = leakage; + } + + public String getLeakage() + { + return leakage; + } + public void setVoltageA(String voltageA) + { + this.voltageA = voltageA; + } + + public String getVoltageA() + { + return voltageA; + } + public void setVoltageB(String voltageB) + { + this.voltageB = voltageB; + } + + public String getVoltageB() + { + return voltageB; + } + public void setVoltageC(String voltageC) + { + this.voltageC = voltageC; + } + + public String getVoltageC() + { + return voltageC; + } + public void setVoltageAb(String voltageAb) + { + this.voltageAb = voltageAb; + } + + public String getVoltageAb() + { + return voltageAb; + } + public void setVoltageBc(String voltageBc) + { + this.voltageBc = voltageBc; + } + + public String getVoltageBc() + { + return voltageBc; + } + public void setVoltageCa(String voltageCa) + { + this.voltageCa = voltageCa; + } + + public String getVoltageCa() + { + return voltageCa; + } + public void setCurrentA(String currentA) + { + this.currentA = currentA; + } + + public String getCurrentA() + { + return currentA; + } + public void setCurrentB(String currentB) + { + this.currentB = currentB; + } + + public String getCurrentB() + { + return currentB; + } + public void setCurrentC(String currentC) + { + this.currentC = currentC; + } + + public String getCurrentC() + { + return currentC; + } + public void setPowerA(String powerA) + { + this.powerA = powerA; + } + + public String getPowerA() + { + return powerA; + } + public void setPowerB(String powerB) + { + this.powerB = powerB; + } + + public String getPowerB() + { + return powerB; + } + public void setPowerC(String powerC) + { + this.powerC = powerC; + } + + public String getPowerC() + { + return powerC; + } + public void setEnergyA(String energyA) + { + this.energyA = energyA; + } + + public String getEnergyA() + { + return energyA; + } + public void setEnergyB(String energyB) + { + this.energyB = energyB; + } + + public String getEnergyB() + { + return energyB; + } + public void setEnergyC(String energyC) + { + this.energyC = energyC; + } + + public String getEnergyC() + { + return energyC; + } + public void setFactorA(String factorA) + { + this.factorA = factorA; + } + + public String getFactorA() + { + return factorA; + } + public void setFactorB(String factorB) + { + this.factorB = factorB; + } + + public String getFactorB() + { + return factorB; + } + public void setFactorC(String factorC) + { + this.factorC = factorC; + } + + public String getFactorC() + { + return factorC; + } + public void setFrequencyA(String frequencyA) + { + this.frequencyA = frequencyA; + } + + public String getFrequencyA() + { + return frequencyA; + } + public void setFrequencyB(String frequencyB) + { + this.frequencyB = frequencyB; + } + + public String getFrequencyB() + { + return frequencyB; + } + public void setFrequencyC(String frequencyC) + { + this.frequencyC = frequencyC; + } + + public String getFrequencyC() + { + return frequencyC; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("cfgId", getCfgId()) + .append("pointId", getPointId()) + .append("comId", getComId()) + .append("projectId", getProjectId()) + .append("deviceSn", getDeviceSn()) + .append("switchesAc", getSwitchesAc()) + .append("switchesSwitch", getSwitchesSwitch()) + .append("switchesSwitches", getSwitchesSwitches()) + .append("switchesSwitchstatus", getSwitchesSwitchstatus()) + .append("temperature", getTemperature()) + .append("leakage", getLeakage()) + .append("voltageA", getVoltageA()) + .append("voltageB", getVoltageB()) + .append("voltageC", getVoltageC()) + .append("voltageAb", getVoltageAb()) + .append("voltageBc", getVoltageBc()) + .append("voltageCa", getVoltageCa()) + .append("currentA", getCurrentA()) + .append("currentB", getCurrentB()) + .append("currentC", getCurrentC()) + .append("powerA", getPowerA()) + .append("powerB", getPowerB()) + .append("powerC", getPowerC()) + .append("energyA", getEnergyA()) + .append("energyB", getEnergyB()) + .append("energyC", getEnergyC()) + .append("factorA", getFactorA()) + .append("factorB", getFactorB()) + .append("factorC", getFactorC()) + .append("frequencyA", getFrequencyA()) + .append("frequencyB", getFrequencyB()) + .append("frequencyC", getFrequencyC()) + .append("createTime", getCreateTime()) + .toString(); + } +} diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/domain/DevIotWarning.java b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/domain/DevIotWarning.java new file mode 100644 index 00000000..06e58205 --- /dev/null +++ b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/domain/DevIotWarning.java @@ -0,0 +1,136 @@ +package com.yanzhu.device.domain; + +import com.yanzhu.common.core.annotation.Excel; +import com.yanzhu.common.core.web.domain.BaseEntity; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * 配电箱预警对象 dev_iot_warning + * + * @author yanzhu + * @date 2025-04-04 + */ +public class DevIotWarning extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键 */ + private Long id; + + /** 配置主键 */ + @Excel(name = "配置主键") + private Long cfgId; + + /** 点位主键 */ + @Excel(name = "点位主键") + private Long pointId; + + /** 公司主键 */ + @Excel(name = "公司主键") + private Long comId; + + /** 项目主键 */ + @Excel(name = "项目主键") + private Long projectId; + + /** 设备序列号 */ + @Excel(name = "设备序列号") + private String deviceSn; + + /** 预警类型 */ + @Excel(name = "预警类型") + private String warningType; + + /** 预警内容 */ + @Excel(name = "预警内容") + private String warningContent; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setCfgId(Long cfgId) + { + this.cfgId = cfgId; + } + + public Long getCfgId() + { + return cfgId; + } + public void setPointId(Long pointId) + { + this.pointId = pointId; + } + + public Long getPointId() + { + return pointId; + } + public void setComId(Long comId) + { + this.comId = comId; + } + + public Long getComId() + { + return comId; + } + public void setProjectId(Long projectId) + { + this.projectId = projectId; + } + + public Long getProjectId() + { + return projectId; + } + public void setDeviceSn(String deviceSn) + { + this.deviceSn = deviceSn; + } + + public String getDeviceSn() + { + return deviceSn; + } + public void setWarningType(String warningType) + { + this.warningType = warningType; + } + + public String getWarningType() + { + return warningType; + } + public void setWarningContent(String warningContent) + { + this.warningContent = warningContent; + } + + public String getWarningContent() + { + return warningContent; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("cfgId", getCfgId()) + .append("pointId", getPointId()) + .append("comId", getComId()) + .append("projectId", getProjectId()) + .append("deviceSn", getDeviceSn()) + .append("warningType", getWarningType()) + .append("warningContent", getWarningContent()) + .append("createTime", getCreateTime()) + .toString(); + } +} diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/mapper/DevIotConfigMapper.java b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/mapper/DevIotConfigMapper.java new file mode 100644 index 00000000..03df75e1 --- /dev/null +++ b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/mapper/DevIotConfigMapper.java @@ -0,0 +1,62 @@ +package com.yanzhu.device.mapper; + +import com.yanzhu.device.domain.DevIotConfig; + +import java.util.List; + +/** + * 配电箱配置Mapper接口 + * + * @author yanzhu + * @date 2025-04-04 + */ +public interface DevIotConfigMapper +{ + /** + * 查询配电箱配置 + * + * @param id 配电箱配置主键 + * @return 配电箱配置 + */ + public DevIotConfig selectDevIotConfigById(Long id); + + /** + * 查询配电箱配置列表 + * + * @param devIotConfig 配电箱配置 + * @return 配电箱配置集合 + */ + public List selectDevIotConfigList(DevIotConfig devIotConfig); + + /** + * 新增配电箱配置 + * + * @param devIotConfig 配电箱配置 + * @return 结果 + */ + public int insertDevIotConfig(DevIotConfig devIotConfig); + + /** + * 修改配电箱配置 + * + * @param devIotConfig 配电箱配置 + * @return 结果 + */ + public int updateDevIotConfig(DevIotConfig devIotConfig); + + /** + * 删除配电箱配置 + * + * @param id 配电箱配置主键 + * @return 结果 + */ + public int deleteDevIotConfigById(Long id); + + /** + * 批量删除配电箱配置 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteDevIotConfigByIds(Long[] ids); +} diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/mapper/DevIotConfigPointMapper.java b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/mapper/DevIotConfigPointMapper.java new file mode 100644 index 00000000..5f809003 --- /dev/null +++ b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/mapper/DevIotConfigPointMapper.java @@ -0,0 +1,62 @@ +package com.yanzhu.device.mapper; + +import com.yanzhu.device.domain.DevIotConfigPoint; + +import java.util.List; + +/** + * 配电箱配置Mapper接口 + * + * @author yanzhu + * @date 2025-04-04 + */ +public interface DevIotConfigPointMapper +{ + /** + * 查询配电箱配置 + * + * @param id 配电箱配置主键 + * @return 配电箱配置 + */ + public DevIotConfigPoint selectDevIotConfigPointById(Long id); + + /** + * 查询配电箱配置列表 + * + * @param devIotConfigPoint 配电箱配置 + * @return 配电箱配置集合 + */ + public List selectDevIotConfigPointList(DevIotConfigPoint devIotConfigPoint); + + /** + * 新增配电箱配置 + * + * @param devIotConfigPoint 配电箱配置 + * @return 结果 + */ + public int insertDevIotConfigPoint(DevIotConfigPoint devIotConfigPoint); + + /** + * 修改配电箱配置 + * + * @param devIotConfigPoint 配电箱配置 + * @return 结果 + */ + public int updateDevIotConfigPoint(DevIotConfigPoint devIotConfigPoint); + + /** + * 删除配电箱配置 + * + * @param id 配电箱配置主键 + * @return 结果 + */ + public int deleteDevIotConfigPointById(Long id); + + /** + * 批量删除配电箱配置 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteDevIotConfigPointByIds(Long[] ids); +} diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/mapper/DevIotDatasMapper.java b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/mapper/DevIotDatasMapper.java new file mode 100644 index 00000000..5207f895 --- /dev/null +++ b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/mapper/DevIotDatasMapper.java @@ -0,0 +1,62 @@ +package com.yanzhu.device.mapper; + +import com.yanzhu.device.domain.DevIotDatas; + +import java.util.List; + +/** + * 配电箱数据Mapper接口 + * + * @author yanzhu + * @date 2025-04-04 + */ +public interface DevIotDatasMapper +{ + /** + * 查询配电箱数据 + * + * @param id 配电箱数据主键 + * @return 配电箱数据 + */ + public DevIotDatas selectDevIotDatasById(Long id); + + /** + * 查询配电箱数据列表 + * + * @param devIotDatas 配电箱数据 + * @return 配电箱数据集合 + */ + public List selectDevIotDatasList(DevIotDatas devIotDatas); + + /** + * 新增配电箱数据 + * + * @param devIotDatas 配电箱数据 + * @return 结果 + */ + public int insertDevIotDatas(DevIotDatas devIotDatas); + + /** + * 修改配电箱数据 + * + * @param devIotDatas 配电箱数据 + * @return 结果 + */ + public int updateDevIotDatas(DevIotDatas devIotDatas); + + /** + * 删除配电箱数据 + * + * @param id 配电箱数据主键 + * @return 结果 + */ + public int deleteDevIotDatasById(Long id); + + /** + * 批量删除配电箱数据 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteDevIotDatasByIds(Long[] ids); +} diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/mapper/DevIotWarningMapper.java b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/mapper/DevIotWarningMapper.java new file mode 100644 index 00000000..eb452329 --- /dev/null +++ b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/device/mapper/DevIotWarningMapper.java @@ -0,0 +1,62 @@ +package com.yanzhu.device.mapper; + +import com.yanzhu.device.domain.DevIotWarning; + +import java.util.List; + +/** + * 配电箱预警Mapper接口 + * + * @author yanzhu + * @date 2025-04-04 + */ +public interface DevIotWarningMapper +{ + /** + * 查询配电箱预警 + * + * @param id 配电箱预警主键 + * @return 配电箱预警 + */ + public DevIotWarning selectDevIotWarningById(Long id); + + /** + * 查询配电箱预警列表 + * + * @param devIotWarning 配电箱预警 + * @return 配电箱预警集合 + */ + public List selectDevIotWarningList(DevIotWarning devIotWarning); + + /** + * 新增配电箱预警 + * + * @param devIotWarning 配电箱预警 + * @return 结果 + */ + public int insertDevIotWarning(DevIotWarning devIotWarning); + + /** + * 修改配电箱预警 + * + * @param devIotWarning 配电箱预警 + * @return 结果 + */ + public int updateDevIotWarning(DevIotWarning devIotWarning); + + /** + * 删除配电箱预警 + * + * @param id 配电箱预警主键 + * @return 结果 + */ + public int deleteDevIotWarningById(Long id); + + /** + * 批量删除配电箱预警 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteDevIotWarningByIds(Long[] ids); +} diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/domain/ProPhotography.java b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/domain/ProPhotography.java index 04ca36f2..47077e66 100644 --- a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/domain/ProPhotography.java +++ b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/domain/ProPhotography.java @@ -43,8 +43,8 @@ public class ProPhotography extends BaseEntity private String videoUrl; /** 视频日期 */ - @JsonFormat(pattern = "yyyy-MM-dd") - @Excel(name = "视频日期", width = 30, dateFormat = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM") + @Excel(name = "视频日期", width = 30, dateFormat = "yyyy-MM") private Date videoDate; /** 状态 */ diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/device/DevIotConfigMapper.xml b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/device/DevIotConfigMapper.xml new file mode 100644 index 00000000..6206a28d --- /dev/null +++ b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/device/DevIotConfigMapper.xml @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + + select id, com_id, project_id, signal_name, signal_code, factory_name, is_del, create_by, create_time, update_by, update_time, remark from dev_iot_config + + + + + + + + insert into dev_iot_config + + com_id, + project_id, + signal_name, + signal_code, + factory_name, + is_del, + create_by, + create_time, + update_by, + update_time, + remark, + + + #{comId}, + #{projectId}, + #{signalName}, + #{signalCode}, + #{factoryName}, + #{isDel}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{remark}, + + + + + update dev_iot_config + + com_id = #{comId}, + project_id = #{projectId}, + signal_name = #{signalName}, + signal_code = #{signalCode}, + factory_name = #{factoryName}, + is_del = #{isDel}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + remark = #{remark}, + + where id = #{id} + + + + delete from dev_iot_config where id = #{id} + + + + delete from dev_iot_config where id in + + #{id} + + + \ No newline at end of file diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/device/DevIotConfigPointMapper.xml b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/device/DevIotConfigPointMapper.xml new file mode 100644 index 00000000..fc80a919 --- /dev/null +++ b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/device/DevIotConfigPointMapper.xml @@ -0,0 +1,143 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select id, cfg_id, com_id, project_id, device_sn, device_name, factory_name, contact_person, contact_person_phone, levels, leakage_current, rated_temperature, short_circuit_current, rated_current, rated_voltage, online_status, is_del, create_by, create_time, update_by, update_time, remark from dev_iot_config_point + + + + + + + + insert into dev_iot_config_point + + cfg_id, + com_id, + project_id, + device_sn, + device_name, + factory_name, + contact_person, + contact_person_phone, + levels, + leakage_current, + rated_temperature, + short_circuit_current, + rated_current, + rated_voltage, + online_status, + is_del, + create_by, + create_time, + update_by, + update_time, + remark, + + + #{cfgId}, + #{comId}, + #{projectId}, + #{deviceSn}, + #{deviceName}, + #{factoryName}, + #{contactPerson}, + #{contactPersonPhone}, + #{levels}, + #{leakageCurrent}, + #{ratedTemperature}, + #{shortCircuitCurrent}, + #{ratedCurrent}, + #{ratedVoltage}, + #{onlineStatus}, + #{isDel}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{remark}, + + + + + update dev_iot_config_point + + cfg_id = #{cfgId}, + com_id = #{comId}, + project_id = #{projectId}, + device_sn = #{deviceSn}, + device_name = #{deviceName}, + factory_name = #{factoryName}, + contact_person = #{contactPerson}, + contact_person_phone = #{contactPersonPhone}, + levels = #{levels}, + leakage_current = #{leakageCurrent}, + rated_temperature = #{ratedTemperature}, + short_circuit_current = #{shortCircuitCurrent}, + rated_current = #{ratedCurrent}, + rated_voltage = #{ratedVoltage}, + online_status = #{onlineStatus}, + is_del = #{isDel}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + remark = #{remark}, + + where id = #{id} + + + + delete from dev_iot_config_point where id = #{id} + + + + delete from dev_iot_config_point where id in + + #{id} + + + \ No newline at end of file diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/device/DevIotDatasMapper.xml b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/device/DevIotDatasMapper.xml new file mode 100644 index 00000000..75145021 --- /dev/null +++ b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/device/DevIotDatasMapper.xml @@ -0,0 +1,189 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select id, cfg_id, point_id, com_id, project_id, device_sn, switches_ac, switches_switch, switches_switches, switches_switchStatus, temperature, leakage, voltage_a, voltage_b, voltage_c, voltage_ab, voltage_bc, voltage_ca, current_a, current_b, current_c, power_a, power_b, power_c, energy_a, energy_b, energy_c, factor_a, factor_b, factor_c, frequency_a, frequency_b, frequency_c, create_time from dev_iot_datas + + + + + + + + insert into dev_iot_datas + + cfg_id, + point_id, + com_id, + project_id, + device_sn, + switches_ac, + switches_switch, + switches_switches, + switches_switchStatus, + temperature, + leakage, + voltage_a, + voltage_b, + voltage_c, + voltage_ab, + voltage_bc, + voltage_ca, + current_a, + current_b, + current_c, + power_a, + power_b, + power_c, + energy_a, + energy_b, + energy_c, + factor_a, + factor_b, + factor_c, + frequency_a, + frequency_b, + frequency_c, + create_time, + + + #{cfgId}, + #{pointId}, + #{comId}, + #{projectId}, + #{deviceSn}, + #{switchesAc}, + #{switchesSwitch}, + #{switchesSwitches}, + #{switchesSwitchstatus}, + #{temperature}, + #{leakage}, + #{voltageA}, + #{voltageB}, + #{voltageC}, + #{voltageAb}, + #{voltageBc}, + #{voltageCa}, + #{currentA}, + #{currentB}, + #{currentC}, + #{powerA}, + #{powerB}, + #{powerC}, + #{energyA}, + #{energyB}, + #{energyC}, + #{factorA}, + #{factorB}, + #{factorC}, + #{frequencyA}, + #{frequencyB}, + #{frequencyC}, + #{createTime}, + + + + + update dev_iot_datas + + cfg_id = #{cfgId}, + point_id = #{pointId}, + com_id = #{comId}, + project_id = #{projectId}, + device_sn = #{deviceSn}, + switches_ac = #{switchesAc}, + switches_switch = #{switchesSwitch}, + switches_switches = #{switchesSwitches}, + switches_switchStatus = #{switchesSwitchstatus}, + temperature = #{temperature}, + leakage = #{leakage}, + voltage_a = #{voltageA}, + voltage_b = #{voltageB}, + voltage_c = #{voltageC}, + voltage_ab = #{voltageAb}, + voltage_bc = #{voltageBc}, + voltage_ca = #{voltageCa}, + current_a = #{currentA}, + current_b = #{currentB}, + current_c = #{currentC}, + power_a = #{powerA}, + power_b = #{powerB}, + power_c = #{powerC}, + energy_a = #{energyA}, + energy_b = #{energyB}, + energy_c = #{energyC}, + factor_a = #{factorA}, + factor_b = #{factorB}, + factor_c = #{factorC}, + frequency_a = #{frequencyA}, + frequency_b = #{frequencyB}, + frequency_c = #{frequencyC}, + create_time = #{createTime}, + + where id = #{id} + + + + delete from dev_iot_datas where id = #{id} + + + + delete from dev_iot_datas where id in + + #{id} + + + \ No newline at end of file diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/device/DevIotWarningMapper.xml b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/device/DevIotWarningMapper.xml new file mode 100644 index 00000000..6d65035d --- /dev/null +++ b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/device/DevIotWarningMapper.xml @@ -0,0 +1,90 @@ + + + + + + + + + + + + + + + + + + select id, cfg_id, point_id, com_id, project_id, device_sn, warning_type, warning_content, create_time from dev_iot_warning + + + + + + + + insert into dev_iot_warning + + cfg_id, + point_id, + com_id, + project_id, + device_sn, + warning_type, + warning_content, + create_time, + + + #{cfgId}, + #{pointId}, + #{comId}, + #{projectId}, + #{deviceSn}, + #{warningType}, + #{warningContent}, + #{createTime}, + + + + + update dev_iot_warning + + cfg_id = #{cfgId}, + point_id = #{pointId}, + com_id = #{comId}, + project_id = #{projectId}, + device_sn = #{deviceSn}, + warning_type = #{warningType}, + warning_content = #{warningContent}, + create_time = #{createTime}, + + where id = #{id} + + + + delete from dev_iot_warning where id = #{id} + + + + delete from dev_iot_warning where id in + + #{id} + + + \ No newline at end of file diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/system/SysRoleMapper.xml b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/system/SysRoleMapper.xml index 891e8a80..54ad09e1 100644 --- a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/system/SysRoleMapper.xml +++ b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/system/SysRoleMapper.xml @@ -147,7 +147,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" WHERE r.del_flag = '0' and u.user_name = #{userName} - where r.role_name=#{roleName} and rd.dept_id = #{deptId} and r.del_flag = '0' limit 1 diff --git a/yanzhu-modules/yanzhu-job/src/main/java/com/yanzhu/job/domain/DevIotConfigPoint.java b/yanzhu-modules/yanzhu-job/src/main/java/com/yanzhu/job/domain/DevIotConfigPoint.java new file mode 100644 index 00000000..fe998a78 --- /dev/null +++ b/yanzhu-modules/yanzhu-job/src/main/java/com/yanzhu/job/domain/DevIotConfigPoint.java @@ -0,0 +1,266 @@ +package com.yanzhu.job.domain; + +import com.yanzhu.common.core.annotation.Excel; +import com.yanzhu.common.core.web.domain.BaseEntity; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * 配电箱配置对象 dev_iot_config_point + * + * @author yanzhu + * @date 2025-04-04 + */ +public class DevIotConfigPoint extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键 */ + private Long id; + + /** 配置主键 */ + @Excel(name = "配置主键") + private Long cfgId; + + /** 公司主键 */ + @Excel(name = "公司主键") + private Long comId; + + /** 项目主键 */ + @Excel(name = "项目主键") + private Long projectId; + + /** 设备序列号 */ + @Excel(name = "设备序列号") + private String deviceSn; + + /** 设备名称 */ + @Excel(name = "设备名称") + private String deviceName; + + /** 厂家名称 */ + @Excel(name = "厂家名称") + private String factoryName; + + /** 联系人 */ + @Excel(name = "联系人") + private String contactPerson; + + /** 联系人电话 */ + @Excel(name = "联系人电话") + private String contactPersonPhone; + + /** 配电箱等级 */ + @Excel(name = "配电箱等级") + private String levels; + + /** 漏电电流 */ + @Excel(name = "漏电电流") + private String leakageCurrent; + + /** 额定温度 */ + @Excel(name = "额定温度") + private String ratedTemperature; + + /** 短路电流 */ + @Excel(name = "短路电流") + private String shortCircuitCurrent; + + /** 额定电流 */ + @Excel(name = "额定电流") + private String ratedCurrent; + + /** 额定电压 */ + @Excel(name = "额定电压") + private String ratedVoltage; + + /** 在线状态 */ + @Excel(name = "在线状态") + private String onlineStatus; + + /** 数据状态 */ + @Excel(name = "数据状态") + private String isDel; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setCfgId(Long cfgId) + { + this.cfgId = cfgId; + } + + public Long getCfgId() + { + return cfgId; + } + public void setComId(Long comId) + { + this.comId = comId; + } + + public Long getComId() + { + return comId; + } + public void setProjectId(Long projectId) + { + this.projectId = projectId; + } + + public Long getProjectId() + { + return projectId; + } + public void setDeviceSn(String deviceSn) + { + this.deviceSn = deviceSn; + } + + public String getDeviceSn() + { + return deviceSn; + } + public void setDeviceName(String deviceName) + { + this.deviceName = deviceName; + } + + public String getDeviceName() + { + return deviceName; + } + public void setFactoryName(String factoryName) + { + this.factoryName = factoryName; + } + + public String getFactoryName() + { + return factoryName; + } + public void setContactPerson(String contactPerson) + { + this.contactPerson = contactPerson; + } + + public String getContactPerson() + { + return contactPerson; + } + public void setContactPersonPhone(String contactPersonPhone) + { + this.contactPersonPhone = contactPersonPhone; + } + + public String getContactPersonPhone() + { + return contactPersonPhone; + } + public void setLevels(String levels) + { + this.levels = levels; + } + + public String getLevels() + { + return levels; + } + public void setLeakageCurrent(String leakageCurrent) + { + this.leakageCurrent = leakageCurrent; + } + + public String getLeakageCurrent() + { + return leakageCurrent; + } + public void setRatedTemperature(String ratedTemperature) + { + this.ratedTemperature = ratedTemperature; + } + + public String getRatedTemperature() + { + return ratedTemperature; + } + public void setShortCircuitCurrent(String shortCircuitCurrent) + { + this.shortCircuitCurrent = shortCircuitCurrent; + } + + public String getShortCircuitCurrent() + { + return shortCircuitCurrent; + } + public void setRatedCurrent(String ratedCurrent) + { + this.ratedCurrent = ratedCurrent; + } + + public String getRatedCurrent() + { + return ratedCurrent; + } + public void setRatedVoltage(String ratedVoltage) + { + this.ratedVoltage = ratedVoltage; + } + + public String getRatedVoltage() + { + return ratedVoltage; + } + public void setOnlineStatus(String onlineStatus) + { + this.onlineStatus = onlineStatus; + } + + public String getOnlineStatus() + { + return onlineStatus; + } + public void setIsDel(String isDel) + { + this.isDel = isDel; + } + + public String getIsDel() + { + return isDel; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("cfgId", getCfgId()) + .append("comId", getComId()) + .append("projectId", getProjectId()) + .append("deviceSn", getDeviceSn()) + .append("deviceName", getDeviceName()) + .append("factoryName", getFactoryName()) + .append("contactPerson", getContactPerson()) + .append("contactPersonPhone", getContactPersonPhone()) + .append("levels", getLevels()) + .append("leakageCurrent", getLeakageCurrent()) + .append("ratedTemperature", getRatedTemperature()) + .append("shortCircuitCurrent", getShortCircuitCurrent()) + .append("ratedCurrent", getRatedCurrent()) + .append("ratedVoltage", getRatedVoltage()) + .append("onlineStatus", getOnlineStatus()) + .append("isDel", getIsDel()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("remark", getRemark()) + .toString(); + } +} diff --git a/yanzhu-modules/yanzhu-job/src/main/java/com/yanzhu/job/domain/DevIotDatas.java b/yanzhu-modules/yanzhu-job/src/main/java/com/yanzhu/job/domain/DevIotDatas.java new file mode 100644 index 00000000..5615fc95 --- /dev/null +++ b/yanzhu-modules/yanzhu-job/src/main/java/com/yanzhu/job/domain/DevIotDatas.java @@ -0,0 +1,486 @@ +package com.yanzhu.job.domain; + +import com.yanzhu.common.core.annotation.Excel; +import com.yanzhu.common.core.web.domain.BaseEntity; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * 配电箱数据对象 dev_iot_datas + * + * @author yanzhu + * @date 2025-04-04 + */ +public class DevIotDatas extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键 */ + private Long id; + + /** 配置主键 */ + @Excel(name = "配置主键") + private Long cfgId; + + /** 点位主键 */ + @Excel(name = "点位主键") + private Long pointId; + + /** 公司主键 */ + @Excel(name = "公司主键") + private Long comId; + + /** 项目主键 */ + @Excel(name = "项目主键") + private Long projectId; + + /** 设备序列号 */ + @Excel(name = "设备序列号") + private String deviceSn; + + /** 开关位_交流 */ + @Excel(name = "开关位_交流") + private String switchesAc; + + /** 开关位 */ + @Excel(name = "开关位") + private String switchesSwitch; + + /** 开关位状态 */ + @Excel(name = "开关位状态") + private String switchesSwitches; + + /** 开关位安装状态 */ + @Excel(name = "开关位安装状态") + private String switchesSwitchstatus; + + /** 温度检测数据 */ + @Excel(name = "温度检测数据") + private String temperature; + + /** 漏电检测数据 */ + @Excel(name = "漏电检测数据") + private String leakage; + + /** A相电压 */ + @Excel(name = "A相电压") + private String voltageA; + + /** B相电压 */ + @Excel(name = "B相电压") + private String voltageB; + + /** C相电压 */ + @Excel(name = "C相电压") + private String voltageC; + + /** A相与B相之间的电压 */ + @Excel(name = "A相与B相之间的电压") + private String voltageAb; + + /** B相与C相之间的电压 */ + @Excel(name = "B相与C相之间的电压") + private String voltageBc; + + /** C相与A相之间的电压 */ + @Excel(name = "C相与A相之间的电压") + private String voltageCa; + + /** A相电流 */ + @Excel(name = "A相电流") + private String currentA; + + /** B相电流 */ + @Excel(name = "B相电流") + private String currentB; + + /** C相电流 */ + @Excel(name = "C相电流") + private String currentC; + + /** A相功率 */ + @Excel(name = "A相功率") + private String powerA; + + /** B相功率 */ + @Excel(name = "B相功率") + private String powerB; + + /** C相功率 */ + @Excel(name = "C相功率") + private String powerC; + + /** A相累计能量 */ + @Excel(name = "A相累计能量") + private String energyA; + + /** B相累计能量 */ + @Excel(name = "B相累计能量") + private String energyB; + + /** C相累计能量 */ + @Excel(name = "C相累计能量") + private String energyC; + + /** A相功率因数 */ + @Excel(name = "A相功率因数") + private String factorA; + + /** B相功率因数 */ + @Excel(name = "B相功率因数") + private String factorB; + + /** C相功率因数 */ + @Excel(name = "C相功率因数") + private String factorC; + + /** A相频率 */ + @Excel(name = "A相频率") + private String frequencyA; + + /** B相频率 */ + @Excel(name = "B相频率") + private String frequencyB; + + /** C相频率 */ + @Excel(name = "C相频率") + private String frequencyC; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setCfgId(Long cfgId) + { + this.cfgId = cfgId; + } + + public Long getCfgId() + { + return cfgId; + } + public void setPointId(Long pointId) + { + this.pointId = pointId; + } + + public Long getPointId() + { + return pointId; + } + public void setComId(Long comId) + { + this.comId = comId; + } + + public Long getComId() + { + return comId; + } + public void setProjectId(Long projectId) + { + this.projectId = projectId; + } + + public Long getProjectId() + { + return projectId; + } + public void setDeviceSn(String deviceSn) + { + this.deviceSn = deviceSn; + } + + public String getDeviceSn() + { + return deviceSn; + } + public void setSwitchesAc(String switchesAc) + { + this.switchesAc = switchesAc; + } + + public String getSwitchesAc() + { + return switchesAc; + } + public void setSwitchesSwitch(String switchesSwitch) + { + this.switchesSwitch = switchesSwitch; + } + + public String getSwitchesSwitch() + { + return switchesSwitch; + } + public void setSwitchesSwitches(String switchesSwitches) + { + this.switchesSwitches = switchesSwitches; + } + + public String getSwitchesSwitches() + { + return switchesSwitches; + } + public void setSwitchesSwitchstatus(String switchesSwitchstatus) + { + this.switchesSwitchstatus = switchesSwitchstatus; + } + + public String getSwitchesSwitchstatus() + { + return switchesSwitchstatus; + } + public void setTemperature(String temperature) + { + this.temperature = temperature; + } + + public String getTemperature() + { + return temperature; + } + public void setLeakage(String leakage) + { + this.leakage = leakage; + } + + public String getLeakage() + { + return leakage; + } + public void setVoltageA(String voltageA) + { + this.voltageA = voltageA; + } + + public String getVoltageA() + { + return voltageA; + } + public void setVoltageB(String voltageB) + { + this.voltageB = voltageB; + } + + public String getVoltageB() + { + return voltageB; + } + public void setVoltageC(String voltageC) + { + this.voltageC = voltageC; + } + + public String getVoltageC() + { + return voltageC; + } + public void setVoltageAb(String voltageAb) + { + this.voltageAb = voltageAb; + } + + public String getVoltageAb() + { + return voltageAb; + } + public void setVoltageBc(String voltageBc) + { + this.voltageBc = voltageBc; + } + + public String getVoltageBc() + { + return voltageBc; + } + public void setVoltageCa(String voltageCa) + { + this.voltageCa = voltageCa; + } + + public String getVoltageCa() + { + return voltageCa; + } + public void setCurrentA(String currentA) + { + this.currentA = currentA; + } + + public String getCurrentA() + { + return currentA; + } + public void setCurrentB(String currentB) + { + this.currentB = currentB; + } + + public String getCurrentB() + { + return currentB; + } + public void setCurrentC(String currentC) + { + this.currentC = currentC; + } + + public String getCurrentC() + { + return currentC; + } + public void setPowerA(String powerA) + { + this.powerA = powerA; + } + + public String getPowerA() + { + return powerA; + } + public void setPowerB(String powerB) + { + this.powerB = powerB; + } + + public String getPowerB() + { + return powerB; + } + public void setPowerC(String powerC) + { + this.powerC = powerC; + } + + public String getPowerC() + { + return powerC; + } + public void setEnergyA(String energyA) + { + this.energyA = energyA; + } + + public String getEnergyA() + { + return energyA; + } + public void setEnergyB(String energyB) + { + this.energyB = energyB; + } + + public String getEnergyB() + { + return energyB; + } + public void setEnergyC(String energyC) + { + this.energyC = energyC; + } + + public String getEnergyC() + { + return energyC; + } + public void setFactorA(String factorA) + { + this.factorA = factorA; + } + + public String getFactorA() + { + return factorA; + } + public void setFactorB(String factorB) + { + this.factorB = factorB; + } + + public String getFactorB() + { + return factorB; + } + public void setFactorC(String factorC) + { + this.factorC = factorC; + } + + public String getFactorC() + { + return factorC; + } + public void setFrequencyA(String frequencyA) + { + this.frequencyA = frequencyA; + } + + public String getFrequencyA() + { + return frequencyA; + } + public void setFrequencyB(String frequencyB) + { + this.frequencyB = frequencyB; + } + + public String getFrequencyB() + { + return frequencyB; + } + public void setFrequencyC(String frequencyC) + { + this.frequencyC = frequencyC; + } + + public String getFrequencyC() + { + return frequencyC; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("cfgId", getCfgId()) + .append("pointId", getPointId()) + .append("comId", getComId()) + .append("projectId", getProjectId()) + .append("deviceSn", getDeviceSn()) + .append("switchesAc", getSwitchesAc()) + .append("switchesSwitch", getSwitchesSwitch()) + .append("switchesSwitches", getSwitchesSwitches()) + .append("switchesSwitchstatus", getSwitchesSwitchstatus()) + .append("temperature", getTemperature()) + .append("leakage", getLeakage()) + .append("voltageA", getVoltageA()) + .append("voltageB", getVoltageB()) + .append("voltageC", getVoltageC()) + .append("voltageAb", getVoltageAb()) + .append("voltageBc", getVoltageBc()) + .append("voltageCa", getVoltageCa()) + .append("currentA", getCurrentA()) + .append("currentB", getCurrentB()) + .append("currentC", getCurrentC()) + .append("powerA", getPowerA()) + .append("powerB", getPowerB()) + .append("powerC", getPowerC()) + .append("energyA", getEnergyA()) + .append("energyB", getEnergyB()) + .append("energyC", getEnergyC()) + .append("factorA", getFactorA()) + .append("factorB", getFactorB()) + .append("factorC", getFactorC()) + .append("frequencyA", getFrequencyA()) + .append("frequencyB", getFrequencyB()) + .append("frequencyC", getFrequencyC()) + .append("createTime", getCreateTime()) + .toString(); + } +} diff --git a/yanzhu-modules/yanzhu-job/src/main/java/com/yanzhu/job/domain/DevIotWarning.java b/yanzhu-modules/yanzhu-job/src/main/java/com/yanzhu/job/domain/DevIotWarning.java new file mode 100644 index 00000000..f1b5f070 --- /dev/null +++ b/yanzhu-modules/yanzhu-job/src/main/java/com/yanzhu/job/domain/DevIotWarning.java @@ -0,0 +1,136 @@ +package com.yanzhu.job.domain; + +import com.yanzhu.common.core.annotation.Excel; +import com.yanzhu.common.core.web.domain.BaseEntity; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * 配电箱预警对象 dev_iot_warning + * + * @author yanzhu + * @date 2025-04-04 + */ +public class DevIotWarning extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键 */ + private Long id; + + /** 配置主键 */ + @Excel(name = "配置主键") + private Long cfgId; + + /** 点位主键 */ + @Excel(name = "点位主键") + private Long pointId; + + /** 公司主键 */ + @Excel(name = "公司主键") + private Long comId; + + /** 项目主键 */ + @Excel(name = "项目主键") + private Long projectId; + + /** 设备序列号 */ + @Excel(name = "设备序列号") + private String deviceSn; + + /** 预警类型 */ + @Excel(name = "预警类型") + private String warningType; + + /** 预警内容 */ + @Excel(name = "预警内容") + private String warningContent; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setCfgId(Long cfgId) + { + this.cfgId = cfgId; + } + + public Long getCfgId() + { + return cfgId; + } + public void setPointId(Long pointId) + { + this.pointId = pointId; + } + + public Long getPointId() + { + return pointId; + } + public void setComId(Long comId) + { + this.comId = comId; + } + + public Long getComId() + { + return comId; + } + public void setProjectId(Long projectId) + { + this.projectId = projectId; + } + + public Long getProjectId() + { + return projectId; + } + public void setDeviceSn(String deviceSn) + { + this.deviceSn = deviceSn; + } + + public String getDeviceSn() + { + return deviceSn; + } + public void setWarningType(String warningType) + { + this.warningType = warningType; + } + + public String getWarningType() + { + return warningType; + } + public void setWarningContent(String warningContent) + { + this.warningContent = warningContent; + } + + public String getWarningContent() + { + return warningContent; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("cfgId", getCfgId()) + .append("pointId", getPointId()) + .append("comId", getComId()) + .append("projectId", getProjectId()) + .append("deviceSn", getDeviceSn()) + .append("warningType", getWarningType()) + .append("warningContent", getWarningContent()) + .append("createTime", getCreateTime()) + .toString(); + } +} diff --git a/yanzhu-modules/yanzhu-job/src/main/java/com/yanzhu/job/mapper/DevIotMapper.java b/yanzhu-modules/yanzhu-job/src/main/java/com/yanzhu/job/mapper/DevIotMapper.java new file mode 100644 index 00000000..bc7d3545 --- /dev/null +++ b/yanzhu-modules/yanzhu-job/src/main/java/com/yanzhu/job/mapper/DevIotMapper.java @@ -0,0 +1,60 @@ +package com.yanzhu.job.mapper; + +import com.yanzhu.job.domain.DevIotConfigPoint; +import com.yanzhu.job.domain.DevIotDatas; +import com.yanzhu.job.domain.DevIotWarning; + +import java.util.List; +import java.util.Map; + +/** + * 萨达配电箱数据 + */ +public interface DevIotMapper { + + /** + * 获取配电箱配置信息 + */ + public List> selectDevIotConfigList(); + + /** + * 查询配电箱配置列表 + * + * @param devIotConfigPoint 配电箱配置 + * @return 配电箱配置集合 + */ + public List selectDevIotConfigPointList(DevIotConfigPoint devIotConfigPoint); + + /** + * 新增配电箱配置 + * + * @param devIotConfigPoint 配电箱配置 + * @return 结果 + */ + public int insertDevIotConfigPoint(DevIotConfigPoint devIotConfigPoint); + + /** + * 修改配电箱配置 + * + * @param devIotConfigPoint 配电箱配置 + * @return 结果 + */ + public int updateDevIotConfigPoint(DevIotConfigPoint devIotConfigPoint); + + /** + * 新增配电箱数据 + * + * @param devIotDatas 配电箱数据 + * @return 结果 + */ + public int insertDevIotDatas(DevIotDatas devIotDatas); + + /** + * 新增配电箱预警 + * + * @param devIotWarning 配电箱预警 + * @return 结果 + */ + public int insertDevIotWarning(DevIotWarning devIotWarning); + +} diff --git a/yanzhu-modules/yanzhu-job/src/main/java/com/yanzhu/job/service/DevIotServiceImpl.java b/yanzhu-modules/yanzhu-job/src/main/java/com/yanzhu/job/service/DevIotServiceImpl.java new file mode 100644 index 00000000..cb6f0927 --- /dev/null +++ b/yanzhu-modules/yanzhu-job/src/main/java/com/yanzhu/job/service/DevIotServiceImpl.java @@ -0,0 +1,94 @@ +package com.yanzhu.job.service; + +import com.yanzhu.common.core.utils.DateUtils; +import com.yanzhu.job.domain.DevIotConfigPoint; +import com.yanzhu.job.domain.DevIotDatas; +import com.yanzhu.job.domain.DevIotWarning; +import com.yanzhu.job.mapper.DevIotMapper; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; +import java.util.Map; + +/** + * 萨达配电箱数据 + */ +@Service +public class DevIotServiceImpl implements IDevIotService{ + + @Autowired + private DevIotMapper devIotMapper; + + /** + * 获取配电箱配置信息 + */ + @Override + public List> selectDevIotConfigList() { + return devIotMapper.selectDevIotConfigList(); + } + + /** + * 查询配电箱配置列表 + * + * @param devIotConfigPoint 配电箱配置 + * @return 配电箱配置集合 + */ + @Override + public List selectDevIotConfigPointList(DevIotConfigPoint devIotConfigPoint){ + return devIotMapper.selectDevIotConfigPointList(devIotConfigPoint); + } + + /** + * 新增配电箱配置 + * + * @param devIotConfigPoint 配电箱配置 + * @return 结果 + */ + @Override + public int insertDevIotConfigPoint(DevIotConfigPoint devIotConfigPoint) + { + devIotConfigPoint.setCreateTime(DateUtils.getNowDate()); + return devIotMapper.insertDevIotConfigPoint(devIotConfigPoint); + } + + /** + * 修改配电箱配置 + * + * @param devIotConfigPoint 配电箱配置 + * @return 结果 + */ + @Override + public int updateDevIotConfigPoint(DevIotConfigPoint devIotConfigPoint) + { + devIotConfigPoint.setUpdateTime(DateUtils.getNowDate()); + return devIotMapper.updateDevIotConfigPoint(devIotConfigPoint); + } + + /** + * 新增配电箱数据 + * + * @param devIotDatas 配电箱数据 + * @return 结果 + */ + @Override + public int insertDevIotDatas(DevIotDatas devIotDatas) + { + devIotDatas.setCreateTime(DateUtils.getNowDate()); + return devIotMapper.insertDevIotDatas(devIotDatas); + } + + /** + * 新增配电箱预警 + * + * @param devIotWarning 配电箱预警 + * @return 结果 + */ + @Override + public int insertDevIotWarning(DevIotWarning devIotWarning) + { + devIotWarning.setCreateTime(DateUtils.getNowDate()); + return devIotMapper.insertDevIotWarning(devIotWarning); + } + +} diff --git a/yanzhu-modules/yanzhu-job/src/main/java/com/yanzhu/job/service/IDevIotService.java b/yanzhu-modules/yanzhu-job/src/main/java/com/yanzhu/job/service/IDevIotService.java new file mode 100644 index 00000000..f8e34196 --- /dev/null +++ b/yanzhu-modules/yanzhu-job/src/main/java/com/yanzhu/job/service/IDevIotService.java @@ -0,0 +1,59 @@ +package com.yanzhu.job.service; + +import com.yanzhu.job.domain.DevIotConfigPoint; +import com.yanzhu.job.domain.DevIotDatas; +import com.yanzhu.job.domain.DevIotWarning; + +import java.util.List; +import java.util.Map; + +/** + * 萨达配电箱数据 + */ +public interface IDevIotService { + + /** + * 获取配电箱配置信息 + */ + public List> selectDevIotConfigList(); + + /** + * 查询配电箱配置列表 + * + * @param devIotConfigPoint 配电箱配置 + * @return 配电箱配置集合 + */ + public List selectDevIotConfigPointList(DevIotConfigPoint devIotConfigPoint); + + /** + * 新增配电箱配置 + * + * @param devIotConfigPoint 配电箱配置 + * @return 结果 + */ + public int insertDevIotConfigPoint(DevIotConfigPoint devIotConfigPoint); + + /** + * 修改配电箱配置 + * + * @param devIotConfigPoint 配电箱配置 + * @return 结果 + */ + public int updateDevIotConfigPoint(DevIotConfigPoint devIotConfigPoint); + + /** + * 新增配电箱数据 + * + * @param devIotDatas 配电箱数据 + * @return 结果 + */ + public int insertDevIotDatas(DevIotDatas devIotDatas); + + /** + * 新增配电箱预警 + * + * @param devIotWarning 配电箱预警 + * @return 结果 + */ + public int insertDevIotWarning(DevIotWarning devIotWarning); +} diff --git a/yanzhu-modules/yanzhu-job/src/main/java/com/yanzhu/job/task/SadaHzDataTask.java b/yanzhu-modules/yanzhu-job/src/main/java/com/yanzhu/job/task/SadaHzDataTask.java new file mode 100644 index 00000000..9a491582 --- /dev/null +++ b/yanzhu-modules/yanzhu-job/src/main/java/com/yanzhu/job/task/SadaHzDataTask.java @@ -0,0 +1,251 @@ +package com.yanzhu.job.task; + +import com.alibaba.fastjson2.JSONArray; +import com.alibaba.fastjson2.JSONObject; +import com.alibaba.fastjson2.JSON; +import com.yanzhu.common.core.text.Convert; +import com.yanzhu.common.core.utils.StringUtils; +import com.yanzhu.common.core.utils.http.HttpUtils; +import com.yanzhu.job.domain.DevIotConfigPoint; +import com.yanzhu.job.domain.DevIotDatas; +import com.yanzhu.job.domain.DevIotWarning; +import com.yanzhu.job.service.IDevIotService; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Lazy; +import org.springframework.stereotype.Component; + +import java.util.*; +import java.util.stream.Collectors; + +/** + * @Description: 萨达配电箱数据定时任务 + * @Title: SadaHzDataTask + * @Package com.yanzhu.job.task + * @Author: JiangYuQi + * @CreateTime: 2024/10/26 17:05 + */ +@Component("sadaHzDataTask") +public class SadaHzDataTask { + + @Autowired + private IDevIotService devIotService; + + private static final Logger log = LoggerFactory.getLogger(SadaHzDataTask.class); + + /** + * IOT配电箱数据获取HOST&&萨达 + */ + public static final String SD_HOST = "https://api.e.v1.i-sada.net"; + + public static String SD_TOKEN = ""; + + public void getIotConfigPoint() { + List> configs = devIotService.selectDevIotConfigList(); + if(configs.size()>0){ + for(Map configMap:configs){ + // 判断是萨达设备 + if(StringUtils.eqObj(configMap.get("factory_name"),"SD")){ + String signalName = Convert.toStr(configMap.get("signal_name")); + String signalCode = Convert.toStr(configMap.get("signal_code")); + String projectName = Convert.toStr(configMap.get("project_name")); + String projectHashId = getSaDaProjectHashIds(signalName,signalCode,projectName); + // 根据项目主键,查询设备信息 + findSaDaBoxByProjectHashId(configMap,projectHashId); + } + } + } + } + + public void getIotPowerDatas() { + DevIotConfigPoint pointQuery = new DevIotConfigPoint(); + pointQuery.setIsDel("0"); + List configPoints = devIotService.selectDevIotConfigPointList(pointQuery); + if(configPoints.size()>0){ + for(DevIotConfigPoint configPoint:configPoints){ + // 判断是萨达设备 + if(StringUtils.eqObj(configPoint.getFactoryName(),"SD")){ + if(StringUtils.isNotEmpty(configPoint.getDeviceSn())){ + String resStr = HttpUtils.sendGet(SD_HOST + "/metric/box/"+configPoint.getDeviceSn()); + JSONObject result = JSONObject.parseObject(resStr).getJSONObject("result"); + // 开关检测数据 + JSONObject switches = result.getJSONObject("switches"); + // 电能检测数据 + JSONObject metric = result.getJSONObject("metric"); + // 温度检测数据 + JSONArray temperatures = result.getJSONArray("temperatures"); + // 漏电检测数据 + JSONArray leakages = result.getJSONArray("leakages"); + // 智能报警数据 + JSONObject ticketStatus = result.getJSONObject("ticketStatus"); + DevIotDatas devIotDatas = new DevIotDatas(); + devIotDatas.setCfgId(configPoint.getCfgId()); + devIotDatas.setPointId(configPoint.getId()); + devIotDatas.setComId(configPoint.getComId()); + devIotDatas.setProjectId(configPoint.getProjectId()); + devIotDatas.setDeviceSn(configPoint.getDeviceSn()); + try { + devIotDatas.setSwitchesAc(switches.getString("ac")); + devIotDatas.setSwitchesSwitch(switches.getString("switch")); + devIotDatas.setSwitchesSwitches(switches.getString("switches")); + devIotDatas.setSwitchesSwitchstatus(switches.getString("switchStatus")); + devIotDatas.setTemperature(temperatures.getJSONObject(0).getString("temperature")); + double leakageValue = 0.00; + for (int i = 0; i < leakages.size(); i++) { + JSONObject leakage = leakages.getJSONObject(i); + if(Convert.toDouble(leakage.get("leakage"),0.00)>leakageValue){ + leakageValue = leakage.getDoubleValue("leakage"); + } + } + devIotDatas.setLeakage(Convert.toStr(leakageValue)); + devIotDatas.setVoltageA(metric.getString("voltage_a")); + devIotDatas.setVoltageB(metric.getString("voltage_b")); + devIotDatas.setVoltageC(metric.getString("voltage_c")); + devIotDatas.setVoltageAb(metric.getString("voltage_ab")); + devIotDatas.setVoltageBc(metric.getString("voltage_bc")); + devIotDatas.setVoltageCa(metric.getString("voltage_ca")); + devIotDatas.setCurrentA(metric.getString("current_a")); + devIotDatas.setCurrentB(metric.getString("current_b")); + devIotDatas.setCurrentC(metric.getString("current_c")); + devIotDatas.setPowerA(metric.getString("power_a")); + devIotDatas.setPowerB(metric.getString("power_b")); + devIotDatas.setPowerC(metric.getString("power_c")); + devIotDatas.setEnergyA(metric.getString("energy_a")); + devIotDatas.setEnergyB(metric.getString("energy_b")); + devIotDatas.setEnergyC(metric.getString("energy_c")); + devIotDatas.setFactorA(metric.getString("factor_a")); + devIotDatas.setFactorB(metric.getString("factor_b")); + devIotDatas.setFactorC(metric.getString("factor_c")); + devIotDatas.setFrequencyA(metric.getString("frequency_a")); + devIotDatas.setFrequencyB(metric.getString("frequency_b")); + devIotDatas.setFrequencyC(metric.getString("frequency_c")); + devIotService.insertDevIotDatas(devIotDatas); + + // 智能预警数据 + DevIotWarning devIotWarning = new DevIotWarning(); + devIotWarning.setCfgId(configPoint.getCfgId()); + devIotWarning.setPointId(configPoint.getId()); + devIotWarning.setComId(configPoint.getComId()); + devIotWarning.setProjectId(configPoint.getProjectId()); + devIotWarning.setDeviceSn(devIotDatas.getDeviceSn()); + if(ticketStatus.getInteger("is_blackout")>0){ + devIotWarning.setWarningType("断电预警"); + devIotWarning.setWarningContent("设备触发断电,请排查异常情况"); + devIotService.insertDevIotWarning(devIotWarning); + } + if(ticketStatus.getInteger("is_smoke")>0){ + devIotWarning.setWarningType("烟感报警"); + devIotWarning.setWarningContent("设备烟感报警,请排查异常情况"); + devIotService.insertDevIotWarning(devIotWarning); + } + if(ticketStatus.getInteger("is_overload")>0){ + devIotWarning.setWarningType("过载报警"); + devIotWarning.setWarningContent("设备过载报警,请排查异常情况"); + devIotService.insertDevIotWarning(devIotWarning); + } + if(ticketStatus.getInteger("is_disconnect")>0){ + devIotWarning.setWarningType("断开报警"); + devIotWarning.setWarningContent("设备断开报警,请排查异常情况"); + devIotService.insertDevIotWarning(devIotWarning); + } + if(ticketStatus.getInteger("is_overheat")>0){ + devIotWarning.setWarningType("高温报警"); + devIotWarning.setWarningContent("设备高温报警,请排查异常情况"); + devIotService.insertDevIotWarning(devIotWarning); + } + if(ticketStatus.getInteger("is_leakage")>0){ + devIotWarning.setWarningType("漏电报警"); + devIotWarning.setWarningContent("设备漏电报警,请排查异常情况"); + devIotService.insertDevIotWarning(devIotWarning); + } + }catch (Exception e){ + e.printStackTrace(); + } + } + } + } + } + } + + private static String getSaDaProjectHashIds(String signalName, String signalCode, String proName){ + try { + Map params = new HashMap<>(); + params.put("username",signalName); + params.put("password",signalCode); + String resStr = HttpUtils.sendPost(SD_HOST+"/v2/api-token-auth", JSON.toJSONString(params)); + JSONObject result = JSONObject.parseObject(resStr).getJSONObject("result"); + SD_TOKEN = result.getString("token"); + JSONObject accountJson = result.getJSONObject("account"); + if(StringUtils.isNotEmpty(accountJson.getString("canViewProjects"))){ + JSONArray canProjects = accountJson.getJSONArray("canViewProjects"); + if(canProjects.size()>0){ + // 使用 forEach 和 Lambda 遍历 + for(Object item:canProjects){ + JSONObject obj = (JSONObject) item; + if(StringUtils.eqObj(obj.getString("name"),proName)){ + return obj.getString("hashId"); + } + } + return accountJson.getJSONObject("currentProject").getString("hashId"); + }else{ + return accountJson.getJSONObject("currentProject").getString("hashId"); + } + }else{ + return accountJson.getJSONObject("currentProject").getString("hashId"); + } + }catch (Exception e){ + e.printStackTrace(); + } + return null; + } + + private void findSaDaBoxByProjectHashId(Map configMap, String proHashId){ + try { + Long cfgId = Convert.toLong(configMap.get("id")); + String resStr = HttpUtils.sendGet(SD_HOST+"/box/project/"+proHashId); + JSONArray result = JSONObject.parseObject(resStr).getJSONArray("result"); + if(result.size()>0){ + DevIotConfigPoint pointQuery = new DevIotConfigPoint(); + pointQuery.setCfgId(cfgId); + List pointList = devIotService.selectDevIotConfigPointList(pointQuery); + result.forEach(item -> { + JSONObject obj = (JSONObject) item; + List pointItems = pointList.stream().filter(point -> StringUtils.eqObj(point.getDeviceSn(),obj.getString("hashId"))).collect(Collectors.toList()); + if(pointItems.size()>0){ + DevIotConfigPoint devIotConfigPoint = pointItems.get(0); + devIotConfigPoint.setDeviceName(obj.getString("name")); + devIotConfigPoint.setFactoryName(Convert.toStr(configMap.get("factory_name"))); + devIotConfigPoint.setLevels(obj.getString("level")); + devIotConfigPoint.setLeakageCurrent(obj.getString("leakageCurrent")); + devIotConfigPoint.setRatedTemperature(obj.getString("ratedTemperature")); + devIotConfigPoint.setShortCircuitCurrent(obj.getString("shortCircuitCurrent")); + devIotConfigPoint.setRatedCurrent(obj.getString("ratedCurrent")); + devIotConfigPoint.setRatedVoltage(obj.getString("ratedVoltage")); + devIotConfigPoint.setOnlineStatus(obj.getJSONObject("device").getString("onlineStatus")); + devIotService.updateDevIotConfigPoint(devIotConfigPoint); + }else{ + DevIotConfigPoint devIotConfigPoint = new DevIotConfigPoint(); + devIotConfigPoint.setCfgId(cfgId); + devIotConfigPoint.setComId(Convert.toLong(configMap.get("com_id"))); + devIotConfigPoint.setProjectId(Convert.toLong(configMap.get("project_id"))); + devIotConfigPoint.setDeviceSn(obj.getString("hashId")); + devIotConfigPoint.setDeviceName(obj.getString("name")); + devIotConfigPoint.setFactoryName(Convert.toStr(configMap.get("factory_name"))); + devIotConfigPoint.setLevels(obj.getString("level")); + devIotConfigPoint.setLeakageCurrent(obj.getString("leakageCurrent")); + devIotConfigPoint.setRatedTemperature(obj.getString("ratedTemperature")); + devIotConfigPoint.setShortCircuitCurrent(obj.getString("shortCircuitCurrent")); + devIotConfigPoint.setRatedCurrent(obj.getString("ratedCurrent")); + devIotConfigPoint.setRatedVoltage(obj.getString("ratedVoltage")); + devIotConfigPoint.setOnlineStatus(obj.getJSONObject("device").getString("onlineStatus")); + devIotService.insertDevIotConfigPoint(devIotConfigPoint); + } + }); + } + }catch (Exception e){ + e.printStackTrace(); + } + } + +} diff --git a/yanzhu-modules/yanzhu-job/src/main/resources/mapper/job/DevIotMapper.xml b/yanzhu-modules/yanzhu-job/src/main/resources/mapper/job/DevIotMapper.xml new file mode 100644 index 00000000..b7d2c685 --- /dev/null +++ b/yanzhu-modules/yanzhu-job/src/main/resources/mapper/job/DevIotMapper.xml @@ -0,0 +1,229 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select id, cfg_id, com_id, project_id, device_sn, device_name, factory_name, contact_person, contact_person_phone, levels, leakage_current, rated_temperature, short_circuit_current, rated_current, rated_voltage, online_status, is_del, create_by, create_time, update_by, update_time, remark from dev_iot_config_point + + + + + + insert into dev_iot_config_point + + cfg_id, + com_id, + project_id, + device_sn, + device_name, + factory_name, + contact_person, + contact_person_phone, + levels, + leakage_current, + rated_temperature, + short_circuit_current, + rated_current, + rated_voltage, + online_status, + is_del, + create_by, + create_time, + update_by, + update_time, + remark, + + + #{cfgId}, + #{comId}, + #{projectId}, + #{deviceSn}, + #{deviceName}, + #{factoryName}, + #{contactPerson}, + #{contactPersonPhone}, + #{levels}, + #{leakageCurrent}, + #{ratedTemperature}, + #{shortCircuitCurrent}, + #{ratedCurrent}, + #{ratedVoltage}, + #{onlineStatus}, + #{isDel}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{remark}, + + + + + update dev_iot_config_point + + cfg_id = #{cfgId}, + com_id = #{comId}, + project_id = #{projectId}, + device_sn = #{deviceSn}, + device_name = #{deviceName}, + factory_name = #{factoryName}, + contact_person = #{contactPerson}, + contact_person_phone = #{contactPersonPhone}, + levels = #{levels}, + leakage_current = #{leakageCurrent}, + rated_temperature = #{ratedTemperature}, + short_circuit_current = #{shortCircuitCurrent}, + rated_current = #{ratedCurrent}, + rated_voltage = #{ratedVoltage}, + online_status = #{onlineStatus}, + is_del = #{isDel}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + remark = #{remark}, + + where id = #{id} + + + + + + insert into dev_iot_datas + + cfg_id, + point_id, + com_id, + project_id, + device_sn, + switches_ac, + switches_switch, + switches_switches, + switches_switchStatus, + temperature, + leakage, + voltage_a, + voltage_b, + voltage_c, + voltage_ab, + voltage_bc, + voltage_ca, + current_a, + current_b, + current_c, + power_a, + power_b, + power_c, + energy_a, + energy_b, + energy_c, + factor_a, + factor_b, + factor_c, + frequency_a, + frequency_b, + frequency_c, + create_time, + + + #{cfgId}, + #{pointId}, + #{comId}, + #{projectId}, + #{deviceSn}, + #{switchesAc}, + #{switchesSwitch}, + #{switchesSwitches}, + #{switchesSwitchstatus}, + #{temperature}, + #{leakage}, + #{voltageA}, + #{voltageB}, + #{voltageC}, + #{voltageAb}, + #{voltageBc}, + #{voltageCa}, + #{currentA}, + #{currentB}, + #{currentC}, + #{powerA}, + #{powerB}, + #{powerC}, + #{energyA}, + #{energyB}, + #{energyC}, + #{factorA}, + #{factorB}, + #{factorC}, + #{frequencyA}, + #{frequencyB}, + #{frequencyC}, + #{createTime}, + + + + + insert into dev_iot_warning + + cfg_id, + point_id, + com_id, + project_id, + device_sn, + warning_type, + warning_content, + create_time, + + + #{cfgId}, + #{pointId}, + #{comId}, + #{projectId}, + #{deviceSn}, + #{warningType}, + #{warningContent}, + #{createTime}, + + + + \ No newline at end of file diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/device/DevIotConfigController.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/device/DevIotConfigController.java new file mode 100644 index 00000000..4f62f887 --- /dev/null +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/device/DevIotConfigController.java @@ -0,0 +1,98 @@ +package com.yanzhu.manage.controller.device; + +import com.yanzhu.common.core.utils.poi.ExcelUtil; +import com.yanzhu.common.core.web.controller.BaseController; +import com.yanzhu.common.core.web.domain.AjaxResult; +import com.yanzhu.common.core.web.page.TableDataInfo; +import com.yanzhu.common.log.annotation.Log; +import com.yanzhu.common.log.enums.BusinessType; +import com.yanzhu.common.security.annotation.RequiresPermissions; +import com.yanzhu.device.domain.DevIotConfig; +import com.yanzhu.manage.service.IDevIotConfigService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +/** + * 配电箱配置Controller + * + * @author yanzhu + * @date 2025-04-04 + */ +@RestController +@RequestMapping("/iotConfig") +public class DevIotConfigController extends BaseController +{ + @Autowired + private IDevIotConfigService devIotConfigService; + + /** + * 查询配电箱配置列表 + */ + @RequiresPermissions("manage:iotConfig:list") + @GetMapping("/list") + public TableDataInfo list(DevIotConfig devIotConfig) + { + startPage(); + List list = devIotConfigService.selectDevIotConfigList(devIotConfig); + return getDataTable(list); + } + + /** + * 导出配电箱配置列表 + */ + @RequiresPermissions("manage:iotConfig:export") + @Log(title = "配电箱配置", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, DevIotConfig devIotConfig) + { + List list = devIotConfigService.selectDevIotConfigList(devIotConfig); + ExcelUtil util = new ExcelUtil(DevIotConfig.class); + util.exportExcel(response, list, "配电箱配置数据"); + } + + /** + * 获取配电箱配置详细信息 + */ + @RequiresPermissions("manage:iotConfig:query") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(devIotConfigService.selectDevIotConfigById(id)); + } + + /** + * 新增配电箱配置 + */ + @RequiresPermissions("manage:iotConfig:add") + @Log(title = "配电箱配置", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody DevIotConfig devIotConfig) + { + return toAjax(devIotConfigService.insertDevIotConfig(devIotConfig)); + } + + /** + * 修改配电箱配置 + */ + @RequiresPermissions("manage:iotConfig:edit") + @Log(title = "配电箱配置", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody DevIotConfig devIotConfig) + { + return toAjax(devIotConfigService.updateDevIotConfig(devIotConfig)); + } + + /** + * 删除配电箱配置 + */ + @RequiresPermissions("manage:iotConfig:remove") + @Log(title = "配电箱配置", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(devIotConfigService.deleteDevIotConfigByIds(ids)); + } +} diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/device/DevIotConfigPointController.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/device/DevIotConfigPointController.java new file mode 100644 index 00000000..38be670c --- /dev/null +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/device/DevIotConfigPointController.java @@ -0,0 +1,98 @@ +package com.yanzhu.manage.controller.device; + +import com.yanzhu.common.core.utils.poi.ExcelUtil; +import com.yanzhu.common.core.web.controller.BaseController; +import com.yanzhu.common.core.web.domain.AjaxResult; +import com.yanzhu.common.core.web.page.TableDataInfo; +import com.yanzhu.common.log.annotation.Log; +import com.yanzhu.common.log.enums.BusinessType; +import com.yanzhu.common.security.annotation.RequiresPermissions; +import com.yanzhu.device.domain.DevIotConfigPoint; +import com.yanzhu.manage.service.IDevIotConfigPointService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +/** + * 配电箱配置Controller + * + * @author yanzhu + * @date 2025-04-04 + */ +@RestController +@RequestMapping("/iotConfigPoint") +public class DevIotConfigPointController extends BaseController +{ + @Autowired + private IDevIotConfigPointService devIotConfigPointService; + + /** + * 查询配电箱配置列表 + */ + @RequiresPermissions("manage:iotConfigPoint:list") + @GetMapping("/list") + public TableDataInfo list(DevIotConfigPoint devIotConfigPoint) + { + startPage(); + List list = devIotConfigPointService.selectDevIotConfigPointList(devIotConfigPoint); + return getDataTable(list); + } + + /** + * 导出配电箱配置列表 + */ + @RequiresPermissions("manage:iotConfigPoint:export") + @Log(title = "配电箱配置", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, DevIotConfigPoint devIotConfigPoint) + { + List list = devIotConfigPointService.selectDevIotConfigPointList(devIotConfigPoint); + ExcelUtil util = new ExcelUtil(DevIotConfigPoint.class); + util.exportExcel(response, list, "配电箱配置数据"); + } + + /** + * 获取配电箱配置详细信息 + */ + @RequiresPermissions("manage:iotConfigPoint:query") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(devIotConfigPointService.selectDevIotConfigPointById(id)); + } + + /** + * 新增配电箱配置 + */ + @RequiresPermissions("manage:iotConfigPoint:add") + @Log(title = "配电箱配置", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody DevIotConfigPoint devIotConfigPoint) + { + return toAjax(devIotConfigPointService.insertDevIotConfigPoint(devIotConfigPoint)); + } + + /** + * 修改配电箱配置 + */ + @RequiresPermissions("manage:iotConfigPoint:edit") + @Log(title = "配电箱配置", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody DevIotConfigPoint devIotConfigPoint) + { + return toAjax(devIotConfigPointService.updateDevIotConfigPoint(devIotConfigPoint)); + } + + /** + * 删除配电箱配置 + */ + @RequiresPermissions("manage:iotConfigPoint:remove") + @Log(title = "配电箱配置", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(devIotConfigPointService.deleteDevIotConfigPointByIds(ids)); + } +} diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/device/DevIotDatasController.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/device/DevIotDatasController.java new file mode 100644 index 00000000..484f1677 --- /dev/null +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/device/DevIotDatasController.java @@ -0,0 +1,98 @@ +package com.yanzhu.manage.controller.device; + +import com.yanzhu.common.core.utils.poi.ExcelUtil; +import com.yanzhu.common.core.web.controller.BaseController; +import com.yanzhu.common.core.web.domain.AjaxResult; +import com.yanzhu.common.core.web.page.TableDataInfo; +import com.yanzhu.common.log.annotation.Log; +import com.yanzhu.common.log.enums.BusinessType; +import com.yanzhu.common.security.annotation.RequiresPermissions; +import com.yanzhu.device.domain.DevIotDatas; +import com.yanzhu.manage.service.IDevIotDatasService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +/** + * 配电箱数据Controller + * + * @author yanzhu + * @date 2025-04-04 + */ +@RestController +@RequestMapping("/iotDatas") +public class DevIotDatasController extends BaseController +{ + @Autowired + private IDevIotDatasService devIotDatasService; + + /** + * 查询配电箱数据列表 + */ + @RequiresPermissions("manage:iotDatas:list") + @GetMapping("/list") + public TableDataInfo list(DevIotDatas devIotDatas) + { + startPage(); + List list = devIotDatasService.selectDevIotDatasList(devIotDatas); + return getDataTable(list); + } + + /** + * 导出配电箱数据列表 + */ + @RequiresPermissions("manage:iotDatas:export") + @Log(title = "配电箱数据", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, DevIotDatas devIotDatas) + { + List list = devIotDatasService.selectDevIotDatasList(devIotDatas); + ExcelUtil util = new ExcelUtil(DevIotDatas.class); + util.exportExcel(response, list, "配电箱数据数据"); + } + + /** + * 获取配电箱数据详细信息 + */ + @RequiresPermissions("manage:iotDatas:query") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(devIotDatasService.selectDevIotDatasById(id)); + } + + /** + * 新增配电箱数据 + */ + @RequiresPermissions("manage:iotDatas:add") + @Log(title = "配电箱数据", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody DevIotDatas devIotDatas) + { + return toAjax(devIotDatasService.insertDevIotDatas(devIotDatas)); + } + + /** + * 修改配电箱数据 + */ + @RequiresPermissions("manage:iotDatas:edit") + @Log(title = "配电箱数据", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody DevIotDatas devIotDatas) + { + return toAjax(devIotDatasService.updateDevIotDatas(devIotDatas)); + } + + /** + * 删除配电箱数据 + */ + @RequiresPermissions("manage:iotDatas:remove") + @Log(title = "配电箱数据", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(devIotDatasService.deleteDevIotDatasByIds(ids)); + } +} diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/device/DevIotWarningController.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/device/DevIotWarningController.java new file mode 100644 index 00000000..dbd1661e --- /dev/null +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/device/DevIotWarningController.java @@ -0,0 +1,98 @@ +package com.yanzhu.manage.controller.device; + +import com.yanzhu.common.core.utils.poi.ExcelUtil; +import com.yanzhu.common.core.web.controller.BaseController; +import com.yanzhu.common.core.web.domain.AjaxResult; +import com.yanzhu.common.core.web.page.TableDataInfo; +import com.yanzhu.common.log.annotation.Log; +import com.yanzhu.common.log.enums.BusinessType; +import com.yanzhu.common.security.annotation.RequiresPermissions; +import com.yanzhu.device.domain.DevIotWarning; +import com.yanzhu.manage.service.IDevIotWarningService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +/** + * 配电箱预警Controller + * + * @author yanzhu + * @date 2025-04-04 + */ +@RestController +@RequestMapping("/iotWarning") +public class DevIotWarningController extends BaseController +{ + @Autowired + private IDevIotWarningService devIotWarningService; + + /** + * 查询配电箱预警列表 + */ + @RequiresPermissions("manage:iotWarning:list") + @GetMapping("/list") + public TableDataInfo list(DevIotWarning devIotWarning) + { + startPage(); + List list = devIotWarningService.selectDevIotWarningList(devIotWarning); + return getDataTable(list); + } + + /** + * 导出配电箱预警列表 + */ + @RequiresPermissions("manage:iotWarning:export") + @Log(title = "配电箱预警", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, DevIotWarning devIotWarning) + { + List list = devIotWarningService.selectDevIotWarningList(devIotWarning); + ExcelUtil util = new ExcelUtil(DevIotWarning.class); + util.exportExcel(response, list, "配电箱预警数据"); + } + + /** + * 获取配电箱预警详细信息 + */ + @RequiresPermissions("manage:iotWarning:query") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(devIotWarningService.selectDevIotWarningById(id)); + } + + /** + * 新增配电箱预警 + */ + @RequiresPermissions("manage:iotWarning:add") + @Log(title = "配电箱预警", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody DevIotWarning devIotWarning) + { + return toAjax(devIotWarningService.insertDevIotWarning(devIotWarning)); + } + + /** + * 修改配电箱预警 + */ + @RequiresPermissions("manage:iotWarning:edit") + @Log(title = "配电箱预警", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody DevIotWarning devIotWarning) + { + return toAjax(devIotWarningService.updateDevIotWarning(devIotWarning)); + } + + /** + * 删除配电箱预警 + */ + @RequiresPermissions("manage:iotWarning:remove") + @Log(title = "配电箱预警", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(devIotWarningService.deleteDevIotWarningByIds(ids)); + } +} diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IDevIotConfigPointService.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IDevIotConfigPointService.java new file mode 100644 index 00000000..108a5e63 --- /dev/null +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IDevIotConfigPointService.java @@ -0,0 +1,62 @@ +package com.yanzhu.manage.service; + +import com.yanzhu.device.domain.DevIotConfigPoint; + +import java.util.List; + +/** + * 配电箱配置Service接口 + * + * @author yanzhu + * @date 2025-04-04 + */ +public interface IDevIotConfigPointService +{ + /** + * 查询配电箱配置 + * + * @param id 配电箱配置主键 + * @return 配电箱配置 + */ + public DevIotConfigPoint selectDevIotConfigPointById(Long id); + + /** + * 查询配电箱配置列表 + * + * @param devIotConfigPoint 配电箱配置 + * @return 配电箱配置集合 + */ + public List selectDevIotConfigPointList(DevIotConfigPoint devIotConfigPoint); + + /** + * 新增配电箱配置 + * + * @param devIotConfigPoint 配电箱配置 + * @return 结果 + */ + public int insertDevIotConfigPoint(DevIotConfigPoint devIotConfigPoint); + + /** + * 修改配电箱配置 + * + * @param devIotConfigPoint 配电箱配置 + * @return 结果 + */ + public int updateDevIotConfigPoint(DevIotConfigPoint devIotConfigPoint); + + /** + * 批量删除配电箱配置 + * + * @param ids 需要删除的配电箱配置主键集合 + * @return 结果 + */ + public int deleteDevIotConfigPointByIds(Long[] ids); + + /** + * 删除配电箱配置信息 + * + * @param id 配电箱配置主键 + * @return 结果 + */ + public int deleteDevIotConfigPointById(Long id); +} diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IDevIotConfigService.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IDevIotConfigService.java new file mode 100644 index 00000000..0eb1d933 --- /dev/null +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IDevIotConfigService.java @@ -0,0 +1,62 @@ +package com.yanzhu.manage.service; + +import com.yanzhu.device.domain.DevIotConfig; + +import java.util.List; + +/** + * 配电箱配置Service接口 + * + * @author yanzhu + * @date 2025-04-04 + */ +public interface IDevIotConfigService +{ + /** + * 查询配电箱配置 + * + * @param id 配电箱配置主键 + * @return 配电箱配置 + */ + public DevIotConfig selectDevIotConfigById(Long id); + + /** + * 查询配电箱配置列表 + * + * @param devIotConfig 配电箱配置 + * @return 配电箱配置集合 + */ + public List selectDevIotConfigList(DevIotConfig devIotConfig); + + /** + * 新增配电箱配置 + * + * @param devIotConfig 配电箱配置 + * @return 结果 + */ + public int insertDevIotConfig(DevIotConfig devIotConfig); + + /** + * 修改配电箱配置 + * + * @param devIotConfig 配电箱配置 + * @return 结果 + */ + public int updateDevIotConfig(DevIotConfig devIotConfig); + + /** + * 批量删除配电箱配置 + * + * @param ids 需要删除的配电箱配置主键集合 + * @return 结果 + */ + public int deleteDevIotConfigByIds(Long[] ids); + + /** + * 删除配电箱配置信息 + * + * @param id 配电箱配置主键 + * @return 结果 + */ + public int deleteDevIotConfigById(Long id); +} diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IDevIotDatasService.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IDevIotDatasService.java new file mode 100644 index 00000000..0ad558e6 --- /dev/null +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IDevIotDatasService.java @@ -0,0 +1,62 @@ +package com.yanzhu.manage.service; + +import com.yanzhu.device.domain.DevIotDatas; + +import java.util.List; + +/** + * 配电箱数据Service接口 + * + * @author yanzhu + * @date 2025-04-04 + */ +public interface IDevIotDatasService +{ + /** + * 查询配电箱数据 + * + * @param id 配电箱数据主键 + * @return 配电箱数据 + */ + public DevIotDatas selectDevIotDatasById(Long id); + + /** + * 查询配电箱数据列表 + * + * @param devIotDatas 配电箱数据 + * @return 配电箱数据集合 + */ + public List selectDevIotDatasList(DevIotDatas devIotDatas); + + /** + * 新增配电箱数据 + * + * @param devIotDatas 配电箱数据 + * @return 结果 + */ + public int insertDevIotDatas(DevIotDatas devIotDatas); + + /** + * 修改配电箱数据 + * + * @param devIotDatas 配电箱数据 + * @return 结果 + */ + public int updateDevIotDatas(DevIotDatas devIotDatas); + + /** + * 批量删除配电箱数据 + * + * @param ids 需要删除的配电箱数据主键集合 + * @return 结果 + */ + public int deleteDevIotDatasByIds(Long[] ids); + + /** + * 删除配电箱数据信息 + * + * @param id 配电箱数据主键 + * @return 结果 + */ + public int deleteDevIotDatasById(Long id); +} diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IDevIotWarningService.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IDevIotWarningService.java new file mode 100644 index 00000000..de713bfc --- /dev/null +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IDevIotWarningService.java @@ -0,0 +1,62 @@ +package com.yanzhu.manage.service; + +import com.yanzhu.device.domain.DevIotWarning; + +import java.util.List; + +/** + * 配电箱预警Service接口 + * + * @author yanzhu + * @date 2025-04-04 + */ +public interface IDevIotWarningService +{ + /** + * 查询配电箱预警 + * + * @param id 配电箱预警主键 + * @return 配电箱预警 + */ + public DevIotWarning selectDevIotWarningById(Long id); + + /** + * 查询配电箱预警列表 + * + * @param devIotWarning 配电箱预警 + * @return 配电箱预警集合 + */ + public List selectDevIotWarningList(DevIotWarning devIotWarning); + + /** + * 新增配电箱预警 + * + * @param devIotWarning 配电箱预警 + * @return 结果 + */ + public int insertDevIotWarning(DevIotWarning devIotWarning); + + /** + * 修改配电箱预警 + * + * @param devIotWarning 配电箱预警 + * @return 结果 + */ + public int updateDevIotWarning(DevIotWarning devIotWarning); + + /** + * 批量删除配电箱预警 + * + * @param ids 需要删除的配电箱预警主键集合 + * @return 结果 + */ + public int deleteDevIotWarningByIds(Long[] ids); + + /** + * 删除配电箱预警信息 + * + * @param id 配电箱预警主键 + * @return 结果 + */ + public int deleteDevIotWarningById(Long id); +} diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/DevIotConfigPointServiceImpl.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/DevIotConfigPointServiceImpl.java new file mode 100644 index 00000000..d3c75e1e --- /dev/null +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/DevIotConfigPointServiceImpl.java @@ -0,0 +1,99 @@ +package com.yanzhu.manage.service.impl; + +import java.util.List; +import com.yanzhu.common.core.context.SecurityContextHolder; +import com.yanzhu.common.core.utils.DateUtils; +import com.yanzhu.device.domain.DevIotConfigPoint; +import com.yanzhu.device.mapper.DevIotConfigPointMapper; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.yanzhu.manage.service.IDevIotConfigPointService; + +/** + * 配电箱配置Service业务层处理 + * + * @author yanzhu + * @date 2025-04-04 + */ +@Service +public class DevIotConfigPointServiceImpl implements IDevIotConfigPointService +{ + @Autowired + private DevIotConfigPointMapper devIotConfigPointMapper; + + /** + * 查询配电箱配置 + * + * @param id 配电箱配置主键 + * @return 配电箱配置 + */ + @Override + public DevIotConfigPoint selectDevIotConfigPointById(Long id) + { + return devIotConfigPointMapper.selectDevIotConfigPointById(id); + } + + /** + * 查询配电箱配置列表 + * + * @param devIotConfigPoint 配电箱配置 + * @return 配电箱配置 + */ + @Override + public List selectDevIotConfigPointList(DevIotConfigPoint devIotConfigPoint) + { + return devIotConfigPointMapper.selectDevIotConfigPointList(devIotConfigPoint); + } + + /** + * 新增配电箱配置 + * + * @param devIotConfigPoint 配电箱配置 + * @return 结果 + */ + @Override + public int insertDevIotConfigPoint(DevIotConfigPoint devIotConfigPoint) + { + devIotConfigPoint.setCreateBy(SecurityContextHolder.getUserName()); + devIotConfigPoint.setCreateTime(DateUtils.getNowDate()); + return devIotConfigPointMapper.insertDevIotConfigPoint(devIotConfigPoint); + } + + /** + * 修改配电箱配置 + * + * @param devIotConfigPoint 配电箱配置 + * @return 结果 + */ + @Override + public int updateDevIotConfigPoint(DevIotConfigPoint devIotConfigPoint) + { + devIotConfigPoint.setUpdateBy(SecurityContextHolder.getUserName()); + devIotConfigPoint.setUpdateTime(DateUtils.getNowDate()); + return devIotConfigPointMapper.updateDevIotConfigPoint(devIotConfigPoint); + } + + /** + * 批量删除配电箱配置 + * + * @param ids 需要删除的配电箱配置主键 + * @return 结果 + */ + @Override + public int deleteDevIotConfigPointByIds(Long[] ids) + { + return devIotConfigPointMapper.deleteDevIotConfigPointByIds(ids); + } + + /** + * 删除配电箱配置信息 + * + * @param id 配电箱配置主键 + * @return 结果 + */ + @Override + public int deleteDevIotConfigPointById(Long id) + { + return devIotConfigPointMapper.deleteDevIotConfigPointById(id); + } +} diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/DevIotConfigServiceImpl.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/DevIotConfigServiceImpl.java new file mode 100644 index 00000000..a7370fe6 --- /dev/null +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/DevIotConfigServiceImpl.java @@ -0,0 +1,99 @@ +package com.yanzhu.manage.service.impl; + +import java.util.List; +import com.yanzhu.common.core.context.SecurityContextHolder; +import com.yanzhu.common.core.utils.DateUtils; +import com.yanzhu.device.domain.DevIotConfig; +import com.yanzhu.device.mapper.DevIotConfigMapper; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.yanzhu.manage.service.IDevIotConfigService; + +/** + * 配电箱配置Service业务层处理 + * + * @author yanzhu + * @date 2025-04-04 + */ +@Service +public class DevIotConfigServiceImpl implements IDevIotConfigService +{ + @Autowired + private DevIotConfigMapper devIotConfigMapper; + + /** + * 查询配电箱配置 + * + * @param id 配电箱配置主键 + * @return 配电箱配置 + */ + @Override + public DevIotConfig selectDevIotConfigById(Long id) + { + return devIotConfigMapper.selectDevIotConfigById(id); + } + + /** + * 查询配电箱配置列表 + * + * @param devIotConfig 配电箱配置 + * @return 配电箱配置 + */ + @Override + public List selectDevIotConfigList(DevIotConfig devIotConfig) + { + return devIotConfigMapper.selectDevIotConfigList(devIotConfig); + } + + /** + * 新增配电箱配置 + * + * @param devIotConfig 配电箱配置 + * @return 结果 + */ + @Override + public int insertDevIotConfig(DevIotConfig devIotConfig) + { + devIotConfig.setCreateBy(SecurityContextHolder.getUserName()); + devIotConfig.setCreateTime(DateUtils.getNowDate()); + return devIotConfigMapper.insertDevIotConfig(devIotConfig); + } + + /** + * 修改配电箱配置 + * + * @param devIotConfig 配电箱配置 + * @return 结果 + */ + @Override + public int updateDevIotConfig(DevIotConfig devIotConfig) + { + devIotConfig.setUpdateBy(SecurityContextHolder.getUserName()); + devIotConfig.setUpdateTime(DateUtils.getNowDate()); + return devIotConfigMapper.updateDevIotConfig(devIotConfig); + } + + /** + * 批量删除配电箱配置 + * + * @param ids 需要删除的配电箱配置主键 + * @return 结果 + */ + @Override + public int deleteDevIotConfigByIds(Long[] ids) + { + return devIotConfigMapper.deleteDevIotConfigByIds(ids); + } + + /** + * 删除配电箱配置信息 + * + * @param id 配电箱配置主键 + * @return 结果 + */ + @Override + public int deleteDevIotConfigById(Long id) + { + return devIotConfigMapper.deleteDevIotConfigById(id); + } +} diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/DevIotDatasServiceImpl.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/DevIotDatasServiceImpl.java new file mode 100644 index 00000000..f7aefc73 --- /dev/null +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/DevIotDatasServiceImpl.java @@ -0,0 +1,95 @@ +package com.yanzhu.manage.service.impl; + +import java.util.List; +import com.yanzhu.common.core.utils.DateUtils; +import com.yanzhu.device.domain.DevIotDatas; +import com.yanzhu.device.mapper.DevIotDatasMapper; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.yanzhu.manage.service.IDevIotDatasService; + +/** + * 配电箱数据Service业务层处理 + * + * @author yanzhu + * @date 2025-04-04 + */ +@Service +public class DevIotDatasServiceImpl implements IDevIotDatasService +{ + @Autowired + private DevIotDatasMapper devIotDatasMapper; + + /** + * 查询配电箱数据 + * + * @param id 配电箱数据主键 + * @return 配电箱数据 + */ + @Override + public DevIotDatas selectDevIotDatasById(Long id) + { + return devIotDatasMapper.selectDevIotDatasById(id); + } + + /** + * 查询配电箱数据列表 + * + * @param devIotDatas 配电箱数据 + * @return 配电箱数据 + */ + @Override + public List selectDevIotDatasList(DevIotDatas devIotDatas) + { + return devIotDatasMapper.selectDevIotDatasList(devIotDatas); + } + + /** + * 新增配电箱数据 + * + * @param devIotDatas 配电箱数据 + * @return 结果 + */ + @Override + public int insertDevIotDatas(DevIotDatas devIotDatas) + { + devIotDatas.setCreateTime(DateUtils.getNowDate()); + return devIotDatasMapper.insertDevIotDatas(devIotDatas); + } + + /** + * 修改配电箱数据 + * + * @param devIotDatas 配电箱数据 + * @return 结果 + */ + @Override + public int updateDevIotDatas(DevIotDatas devIotDatas) + { + return devIotDatasMapper.updateDevIotDatas(devIotDatas); + } + + /** + * 批量删除配电箱数据 + * + * @param ids 需要删除的配电箱数据主键 + * @return 结果 + */ + @Override + public int deleteDevIotDatasByIds(Long[] ids) + { + return devIotDatasMapper.deleteDevIotDatasByIds(ids); + } + + /** + * 删除配电箱数据信息 + * + * @param id 配电箱数据主键 + * @return 结果 + */ + @Override + public int deleteDevIotDatasById(Long id) + { + return devIotDatasMapper.deleteDevIotDatasById(id); + } +} diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/DevIotWarningServiceImpl.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/DevIotWarningServiceImpl.java new file mode 100644 index 00000000..1a167269 --- /dev/null +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/DevIotWarningServiceImpl.java @@ -0,0 +1,95 @@ +package com.yanzhu.manage.service.impl; + +import java.util.List; +import com.yanzhu.common.core.utils.DateUtils; +import com.yanzhu.device.domain.DevIotWarning; +import com.yanzhu.device.mapper.DevIotWarningMapper; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.yanzhu.manage.service.IDevIotWarningService; + +/** + * 配电箱预警Service业务层处理 + * + * @author yanzhu + * @date 2025-04-04 + */ +@Service +public class DevIotWarningServiceImpl implements IDevIotWarningService +{ + @Autowired + private DevIotWarningMapper devIotWarningMapper; + + /** + * 查询配电箱预警 + * + * @param id 配电箱预警主键 + * @return 配电箱预警 + */ + @Override + public DevIotWarning selectDevIotWarningById(Long id) + { + return devIotWarningMapper.selectDevIotWarningById(id); + } + + /** + * 查询配电箱预警列表 + * + * @param devIotWarning 配电箱预警 + * @return 配电箱预警 + */ + @Override + public List selectDevIotWarningList(DevIotWarning devIotWarning) + { + return devIotWarningMapper.selectDevIotWarningList(devIotWarning); + } + + /** + * 新增配电箱预警 + * + * @param devIotWarning 配电箱预警 + * @return 结果 + */ + @Override + public int insertDevIotWarning(DevIotWarning devIotWarning) + { + devIotWarning.setCreateTime(DateUtils.getNowDate()); + return devIotWarningMapper.insertDevIotWarning(devIotWarning); + } + + /** + * 修改配电箱预警 + * + * @param devIotWarning 配电箱预警 + * @return 结果 + */ + @Override + public int updateDevIotWarning(DevIotWarning devIotWarning) + { + return devIotWarningMapper.updateDevIotWarning(devIotWarning); + } + + /** + * 批量删除配电箱预警 + * + * @param ids 需要删除的配电箱预警主键 + * @return 结果 + */ + @Override + public int deleteDevIotWarningByIds(Long[] ids) + { + return devIotWarningMapper.deleteDevIotWarningByIds(ids); + } + + /** + * 删除配电箱预警信息 + * + * @param id 配电箱预警主键 + * @return 结果 + */ + @Override + public int deleteDevIotWarningById(Long id) + { + return devIotWarningMapper.deleteDevIotWarningById(id); + } +} diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProProjectInfoSubdeptsServiceImpl.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProProjectInfoSubdeptsServiceImpl.java index 4b9c5074..f9d2638a 100644 --- a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProProjectInfoSubdeptsServiceImpl.java +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProProjectInfoSubdeptsServiceImpl.java @@ -320,7 +320,7 @@ public class ProProjectInfoSubdeptsServiceImpl implements IProProjectInfoSubdept subdeptsUser.setCardCode(proProjectInfoSubdepts.getSubDeptLeaderCode()); subdeptsUser.setUserPhone(proProjectInfoSubdepts.getSubDeptLeaderPhone()); subdeptsUser.setUserPicture(proProjectInfoSubdepts.getLeaderUserPicture()); - subdeptsUser.setUserSex(StringUtils.judgeGenderText(proProjectInfoSubdepts.getSubDeptLeaderCode())); + subdeptsUser.setUserSex(StringUtils.judgeGender(proProjectInfoSubdepts.getSubDeptLeaderCode())); subdeptsUser.setDegreeGrade(proProjectInfoSubdepts.getLeaderDegreeGrade()); subdeptsUser.setUserInfos(proProjectInfoSubdepts.getLeaderUserInfos()); subdeptsUser.setCraftType(CraftTypeEnums.GLRY.getCode()); @@ -328,6 +328,7 @@ public class ProProjectInfoSubdeptsServiceImpl implements IProProjectInfoSubdept subdeptsUser.setEduStatus(ShiFouEnums.FOU.getCodeStr()); if(isSign){ subdeptsUser.setUseStatus(UseStateEnums.IN.getCode()); + subdeptsUser.setUseDate(DateUtils.getNowDate()); subdeptsUser.setApproveStatus(ApproveStatus.passed.getCode()); }else{ subdeptsUser.setApproveStatus(ApproveStatus.await.getCode()); diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProProjectInfoSubdeptsUsersServiceImpl.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProProjectInfoSubdeptsUsersServiceImpl.java index db0eedd8..63c8319a 100644 --- a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProProjectInfoSubdeptsUsersServiceImpl.java +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProProjectInfoSubdeptsUsersServiceImpl.java @@ -359,7 +359,7 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu proProjectInfoSubdeptsUsers.setSubDeptName(parUsers.getSubDeptName()); proProjectInfoSubdeptsUsers.setSubDeptType(parUsers.getSubDeptType()); proProjectInfoSubdeptsUsers.setCardType(CardTypeEnums.SFZ.getCode()); - proProjectInfoSubdeptsUsers.setUserSex(StringUtils.judgeGenderText(proProjectInfoSubdeptsUsers.getCardCode())); + proProjectInfoSubdeptsUsers.setUserSex(StringUtils.judgeGender(proProjectInfoSubdeptsUsers.getCardCode())); proProjectInfoSubdeptsUsers.setUseStatus(UseStateEnums.AW.getCode()); proProjectInfoSubdeptsUsers.setCreateBy(DataSourceEnuns.APP.getInfo()); proProjectInfoSubdeptsUsers.setCreateTime(DateUtils.getNowDate()); diff --git a/yanzhu-ui-vue3/src/api/device/iotConfig.js b/yanzhu-ui-vue3/src/api/device/iotConfig.js new file mode 100644 index 00000000..6872fe49 --- /dev/null +++ b/yanzhu-ui-vue3/src/api/device/iotConfig.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询配电箱配置列表 +export function listIotConfig(query) { + return request({ + url: '/manage/iotConfig/list', + method: 'get', + params: query + }) +} + +// 查询配电箱配置详细 +export function getIotConfig(id) { + return request({ + url: '/manage/iotConfig/' + id, + method: 'get' + }) +} + +// 新增配电箱配置 +export function addIotConfig(data) { + return request({ + url: '/manage/iotConfig', + method: 'post', + data: data + }) +} + +// 修改配电箱配置 +export function updateIotConfig(data) { + return request({ + url: '/manage/iotConfig', + method: 'put', + data: data + }) +} + +// 删除配电箱配置 +export function delIotConfig(id) { + return request({ + url: '/manage/iotConfig/' + id, + method: 'delete' + }) +} diff --git a/yanzhu-ui-vue3/src/api/device/iotConfigPoint.js b/yanzhu-ui-vue3/src/api/device/iotConfigPoint.js new file mode 100644 index 00000000..681de199 --- /dev/null +++ b/yanzhu-ui-vue3/src/api/device/iotConfigPoint.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询配电箱配置列表 +export function listIotConfigPoint(query) { + return request({ + url: '/manage/iotConfigPoint/list', + method: 'get', + params: query + }) +} + +// 查询配电箱配置详细 +export function getIotConfigPoint(id) { + return request({ + url: '/manage/iotConfigPoint/' + id, + method: 'get' + }) +} + +// 新增配电箱配置 +export function addIotConfigPoint(data) { + return request({ + url: '/manage/iotConfigPoint', + method: 'post', + data: data + }) +} + +// 修改配电箱配置 +export function updateIotConfigPoint(data) { + return request({ + url: '/manage/iotConfigPoint', + method: 'put', + data: data + }) +} + +// 删除配电箱配置 +export function delIotConfigPoint(id) { + return request({ + url: '/manage/iotConfigPoint/' + id, + method: 'delete' + }) +} diff --git a/yanzhu-ui-vue3/src/api/device/iotDatas.js b/yanzhu-ui-vue3/src/api/device/iotDatas.js new file mode 100644 index 00000000..0b4f5c2e --- /dev/null +++ b/yanzhu-ui-vue3/src/api/device/iotDatas.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询配电箱数据列表 +export function listIotDatas(query) { + return request({ + url: '/manage/iotDatas/list', + method: 'get', + params: query + }) +} + +// 查询配电箱数据详细 +export function getIotDatas(id) { + return request({ + url: '/manage/iotDatas/' + id, + method: 'get' + }) +} + +// 新增配电箱数据 +export function addIotDatas(data) { + return request({ + url: '/manage/iotDatas', + method: 'post', + data: data + }) +} + +// 修改配电箱数据 +export function updateIotDatas(data) { + return request({ + url: '/manage/iotDatas', + method: 'put', + data: data + }) +} + +// 删除配电箱数据 +export function delIotDatas(id) { + return request({ + url: '/manage/iotDatas/' + id, + method: 'delete' + }) +} diff --git a/yanzhu-ui-vue3/src/api/device/iotWarning.js b/yanzhu-ui-vue3/src/api/device/iotWarning.js new file mode 100644 index 00000000..f94ea246 --- /dev/null +++ b/yanzhu-ui-vue3/src/api/device/iotWarning.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询配电箱预警列表 +export function listIotWarning(query) { + return request({ + url: '/manage/iotWarning/list', + method: 'get', + params: query + }) +} + +// 查询配电箱预警详细 +export function getIotWarning(id) { + return request({ + url: '/manage/iotWarning/' + id, + method: 'get' + }) +} + +// 新增配电箱预警 +export function addIotWarning(data) { + return request({ + url: '/manage/iotWarning', + method: 'post', + data: data + }) +} + +// 修改配电箱预警 +export function updateIotWarning(data) { + return request({ + url: '/manage/iotWarning', + method: 'put', + data: data + }) +} + +// 删除配电箱预警 +export function delIotWarning(id) { + return request({ + url: '/manage/iotWarning/' + id, + method: 'delete' + }) +} diff --git a/yanzhu-ui-vue3/src/views/device/iotConfig/index.vue b/yanzhu-ui-vue3/src/views/device/iotConfig/index.vue new file mode 100644 index 00000000..12d6ec0e --- /dev/null +++ b/yanzhu-ui-vue3/src/views/device/iotConfig/index.vue @@ -0,0 +1,277 @@ + + + diff --git a/yanzhu-ui-vue3/src/views/device/iotConfigPoint/index.vue b/yanzhu-ui-vue3/src/views/device/iotConfigPoint/index.vue new file mode 100644 index 00000000..3f0cee7d --- /dev/null +++ b/yanzhu-ui-vue3/src/views/device/iotConfigPoint/index.vue @@ -0,0 +1,366 @@ + + + diff --git a/yanzhu-ui-vue3/src/views/device/iotDatas/index.vue b/yanzhu-ui-vue3/src/views/device/iotDatas/index.vue new file mode 100644 index 00000000..07bdd494 --- /dev/null +++ b/yanzhu-ui-vue3/src/views/device/iotDatas/index.vue @@ -0,0 +1,437 @@ + + + diff --git a/yanzhu-ui-vue3/src/views/device/iotWarning/index.vue b/yanzhu-ui-vue3/src/views/device/iotWarning/index.vue new file mode 100644 index 00000000..1e3ea7f3 --- /dev/null +++ b/yanzhu-ui-vue3/src/views/device/iotWarning/index.vue @@ -0,0 +1,295 @@ + + + diff --git a/yanzhu-ui-vue3/src/views/manage/photography/index.vue b/yanzhu-ui-vue3/src/views/manage/photography/index.vue index aea6d888..7a7d4b75 100644 --- a/yanzhu-ui-vue3/src/views/manage/photography/index.vue +++ b/yanzhu-ui-vue3/src/views/manage/photography/index.vue @@ -115,7 +115,7 @@ @@ -164,8 +164,8 @@ diff --git a/yanzhu-ui-vue3/src/views/manage/proProjectInfoSubdepts/index.vue b/yanzhu-ui-vue3/src/views/manage/proProjectInfoSubdepts/index.vue index 7fd59e69..5dd64c79 100644 --- a/yanzhu-ui-vue3/src/views/manage/proProjectInfoSubdepts/index.vue +++ b/yanzhu-ui-vue3/src/views/manage/proProjectInfoSubdepts/index.vue @@ -1,21 +1,50 @@ - + - + - + - - + + {{ form.projectName }} - - + + - + - + - + - - + + - - + + - - + + - - + + - + - + - + - + - + - + - + - + - + - 银行卡信息 + 银行卡信息 - + - + - + - - - - - - - - - - + @@ -209,6 +436,30 @@ + + + + + + + + +