提交代码
parent
d07e2e8129
commit
28904c6768
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
@ -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<DevIotConfig> 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);
|
||||
}
|
||||
|
|
@ -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<DevIotConfigPoint> 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);
|
||||
}
|
||||
|
|
@ -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<DevIotDatas> 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);
|
||||
}
|
||||
|
|
@ -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<DevIotWarning> 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);
|
||||
}
|
||||
|
|
@ -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;
|
||||
|
||||
/** 状态 */
|
||||
|
|
|
|||
|
|
@ -0,0 +1,101 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.yanzhu.device.mapper.DevIotConfigMapper">
|
||||
|
||||
<resultMap type="DevIotConfig" id="DevIotConfigResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="comId" column="com_id" />
|
||||
<result property="projectId" column="project_id" />
|
||||
<result property="signalName" column="signal_name" />
|
||||
<result property="signalCode" column="signal_code" />
|
||||
<result property="factoryName" column="factory_name" />
|
||||
<result property="isDel" column="is_del" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDevIotConfigVo">
|
||||
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
|
||||
</sql>
|
||||
|
||||
<select id="selectDevIotConfigList" parameterType="DevIotConfig" resultMap="DevIotConfigResult">
|
||||
<include refid="selectDevIotConfigVo"/>
|
||||
<where>
|
||||
<if test="comId != null "> and com_id = #{comId}</if>
|
||||
<if test="projectId != null "> and project_id = #{projectId}</if>
|
||||
<if test="signalName != null and signalName != ''"> and signal_name like concat('%', #{signalName}, '%')</if>
|
||||
<if test="signalCode != null and signalCode != ''"> and signal_code = #{signalCode}</if>
|
||||
<if test="factoryName != null and factoryName != ''"> and factory_name like concat('%', #{factoryName}, '%')</if>
|
||||
<if test="isDel != null and isDel != ''"> and is_del = #{isDel}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectDevIotConfigById" parameterType="Long" resultMap="DevIotConfigResult">
|
||||
<include refid="selectDevIotConfigVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertDevIotConfig" parameterType="DevIotConfig" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into dev_iot_config
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="comId != null">com_id,</if>
|
||||
<if test="projectId != null">project_id,</if>
|
||||
<if test="signalName != null">signal_name,</if>
|
||||
<if test="signalCode != null">signal_code,</if>
|
||||
<if test="factoryName != null">factory_name,</if>
|
||||
<if test="isDel != null">is_del,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="comId != null">#{comId},</if>
|
||||
<if test="projectId != null">#{projectId},</if>
|
||||
<if test="signalName != null">#{signalName},</if>
|
||||
<if test="signalCode != null">#{signalCode},</if>
|
||||
<if test="factoryName != null">#{factoryName},</if>
|
||||
<if test="isDel != null">#{isDel},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateDevIotConfig" parameterType="DevIotConfig">
|
||||
update dev_iot_config
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="comId != null">com_id = #{comId},</if>
|
||||
<if test="projectId != null">project_id = #{projectId},</if>
|
||||
<if test="signalName != null">signal_name = #{signalName},</if>
|
||||
<if test="signalCode != null">signal_code = #{signalCode},</if>
|
||||
<if test="factoryName != null">factory_name = #{factoryName},</if>
|
||||
<if test="isDel != null">is_del = #{isDel},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteDevIotConfigById" parameterType="Long">
|
||||
delete from dev_iot_config where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDevIotConfigByIds" parameterType="String">
|
||||
delete from dev_iot_config where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,143 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.yanzhu.device.mapper.DevIotConfigPointMapper">
|
||||
|
||||
<resultMap type="DevIotConfigPoint" id="DevIotConfigPointResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="cfgId" column="cfg_id" />
|
||||
<result property="comId" column="com_id" />
|
||||
<result property="projectId" column="project_id" />
|
||||
<result property="deviceSn" column="device_sn" />
|
||||
<result property="deviceName" column="device_name" />
|
||||
<result property="factoryName" column="factory_name" />
|
||||
<result property="contactPerson" column="contact_person" />
|
||||
<result property="contactPersonPhone" column="contact_person_phone" />
|
||||
<result property="levels" column="levels" />
|
||||
<result property="leakageCurrent" column="leakage_current" />
|
||||
<result property="ratedTemperature" column="rated_temperature" />
|
||||
<result property="shortCircuitCurrent" column="short_circuit_current" />
|
||||
<result property="ratedCurrent" column="rated_current" />
|
||||
<result property="ratedVoltage" column="rated_voltage" />
|
||||
<result property="onlineStatus" column="online_status" />
|
||||
<result property="isDel" column="is_del" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDevIotConfigPointVo">
|
||||
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
|
||||
</sql>
|
||||
|
||||
<select id="selectDevIotConfigPointList" parameterType="DevIotConfigPoint" resultMap="DevIotConfigPointResult">
|
||||
<include refid="selectDevIotConfigPointVo"/>
|
||||
<where>
|
||||
<if test="cfgId != null "> and cfg_id = #{cfgId}</if>
|
||||
<if test="comId != null "> and com_id = #{comId}</if>
|
||||
<if test="projectId != null "> and project_id = #{projectId}</if>
|
||||
<if test="deviceSn != null and deviceSn != ''"> and device_sn = #{deviceSn}</if>
|
||||
<if test="deviceName != null and deviceName != ''"> and device_name like concat('%', #{deviceName}, '%')</if>
|
||||
<if test="factoryName != null and factoryName != ''"> and factory_name like concat('%', #{factoryName}, '%')</if>
|
||||
<if test="onlineStatus != null and onlineStatus != ''"> and online_status = #{onlineStatus}</if>
|
||||
<if test="isDel != null and isDel != ''"> and is_del = #{isDel}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectDevIotConfigPointById" parameterType="Long" resultMap="DevIotConfigPointResult">
|
||||
<include refid="selectDevIotConfigPointVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertDevIotConfigPoint" parameterType="DevIotConfigPoint" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into dev_iot_config_point
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="cfgId != null">cfg_id,</if>
|
||||
<if test="comId != null">com_id,</if>
|
||||
<if test="projectId != null">project_id,</if>
|
||||
<if test="deviceSn != null">device_sn,</if>
|
||||
<if test="deviceName != null">device_name,</if>
|
||||
<if test="factoryName != null">factory_name,</if>
|
||||
<if test="contactPerson != null">contact_person,</if>
|
||||
<if test="contactPersonPhone != null">contact_person_phone,</if>
|
||||
<if test="levels != null">levels,</if>
|
||||
<if test="leakageCurrent != null">leakage_current,</if>
|
||||
<if test="ratedTemperature != null">rated_temperature,</if>
|
||||
<if test="shortCircuitCurrent != null">short_circuit_current,</if>
|
||||
<if test="ratedCurrent != null">rated_current,</if>
|
||||
<if test="ratedVoltage != null">rated_voltage,</if>
|
||||
<if test="onlineStatus != null">online_status,</if>
|
||||
<if test="isDel != null">is_del,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="cfgId != null">#{cfgId},</if>
|
||||
<if test="comId != null">#{comId},</if>
|
||||
<if test="projectId != null">#{projectId},</if>
|
||||
<if test="deviceSn != null">#{deviceSn},</if>
|
||||
<if test="deviceName != null">#{deviceName},</if>
|
||||
<if test="factoryName != null">#{factoryName},</if>
|
||||
<if test="contactPerson != null">#{contactPerson},</if>
|
||||
<if test="contactPersonPhone != null">#{contactPersonPhone},</if>
|
||||
<if test="levels != null">#{levels},</if>
|
||||
<if test="leakageCurrent != null">#{leakageCurrent},</if>
|
||||
<if test="ratedTemperature != null">#{ratedTemperature},</if>
|
||||
<if test="shortCircuitCurrent != null">#{shortCircuitCurrent},</if>
|
||||
<if test="ratedCurrent != null">#{ratedCurrent},</if>
|
||||
<if test="ratedVoltage != null">#{ratedVoltage},</if>
|
||||
<if test="onlineStatus != null">#{onlineStatus},</if>
|
||||
<if test="isDel != null">#{isDel},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateDevIotConfigPoint" parameterType="DevIotConfigPoint">
|
||||
update dev_iot_config_point
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="cfgId != null">cfg_id = #{cfgId},</if>
|
||||
<if test="comId != null">com_id = #{comId},</if>
|
||||
<if test="projectId != null">project_id = #{projectId},</if>
|
||||
<if test="deviceSn != null">device_sn = #{deviceSn},</if>
|
||||
<if test="deviceName != null">device_name = #{deviceName},</if>
|
||||
<if test="factoryName != null">factory_name = #{factoryName},</if>
|
||||
<if test="contactPerson != null">contact_person = #{contactPerson},</if>
|
||||
<if test="contactPersonPhone != null">contact_person_phone = #{contactPersonPhone},</if>
|
||||
<if test="levels != null">levels = #{levels},</if>
|
||||
<if test="leakageCurrent != null">leakage_current = #{leakageCurrent},</if>
|
||||
<if test="ratedTemperature != null">rated_temperature = #{ratedTemperature},</if>
|
||||
<if test="shortCircuitCurrent != null">short_circuit_current = #{shortCircuitCurrent},</if>
|
||||
<if test="ratedCurrent != null">rated_current = #{ratedCurrent},</if>
|
||||
<if test="ratedVoltage != null">rated_voltage = #{ratedVoltage},</if>
|
||||
<if test="onlineStatus != null">online_status = #{onlineStatus},</if>
|
||||
<if test="isDel != null">is_del = #{isDel},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteDevIotConfigPointById" parameterType="Long">
|
||||
delete from dev_iot_config_point where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDevIotConfigPointByIds" parameterType="String">
|
||||
delete from dev_iot_config_point where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,189 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.yanzhu.device.mapper.DevIotDatasMapper">
|
||||
|
||||
<resultMap type="DevIotDatas" id="DevIotDatasResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="cfgId" column="cfg_id" />
|
||||
<result property="pointId" column="point_id" />
|
||||
<result property="comId" column="com_id" />
|
||||
<result property="projectId" column="project_id" />
|
||||
<result property="deviceSn" column="device_sn" />
|
||||
<result property="switchesAc" column="switches_ac" />
|
||||
<result property="switchesSwitch" column="switches_switch" />
|
||||
<result property="switchesSwitches" column="switches_switches" />
|
||||
<result property="switchesSwitchstatus" column="switches_switchStatus" />
|
||||
<result property="temperature" column="temperature" />
|
||||
<result property="leakage" column="leakage" />
|
||||
<result property="voltageA" column="voltage_a" />
|
||||
<result property="voltageB" column="voltage_b" />
|
||||
<result property="voltageC" column="voltage_c" />
|
||||
<result property="voltageAb" column="voltage_ab" />
|
||||
<result property="voltageBc" column="voltage_bc" />
|
||||
<result property="voltageCa" column="voltage_ca" />
|
||||
<result property="currentA" column="current_a" />
|
||||
<result property="currentB" column="current_b" />
|
||||
<result property="currentC" column="current_c" />
|
||||
<result property="powerA" column="power_a" />
|
||||
<result property="powerB" column="power_b" />
|
||||
<result property="powerC" column="power_c" />
|
||||
<result property="energyA" column="energy_a" />
|
||||
<result property="energyB" column="energy_b" />
|
||||
<result property="energyC" column="energy_c" />
|
||||
<result property="factorA" column="factor_a" />
|
||||
<result property="factorB" column="factor_b" />
|
||||
<result property="factorC" column="factor_c" />
|
||||
<result property="frequencyA" column="frequency_a" />
|
||||
<result property="frequencyB" column="frequency_b" />
|
||||
<result property="frequencyC" column="frequency_c" />
|
||||
<result property="createTime" column="create_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDevIotDatasVo">
|
||||
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
|
||||
</sql>
|
||||
|
||||
<select id="selectDevIotDatasList" parameterType="DevIotDatas" resultMap="DevIotDatasResult">
|
||||
<include refid="selectDevIotDatasVo"/>
|
||||
<where>
|
||||
<if test="cfgId != null "> and cfg_id = #{cfgId}</if>
|
||||
<if test="pointId != null "> and point_id = #{pointId}</if>
|
||||
<if test="comId != null "> and com_id = #{comId}</if>
|
||||
<if test="projectId != null "> and project_id = #{projectId}</if>
|
||||
<if test="deviceSn != null and deviceSn != ''"> and device_sn = #{deviceSn}</if>
|
||||
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and create_time between #{params.beginCreateTime} and #{params.endCreateTime}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectDevIotDatasById" parameterType="Long" resultMap="DevIotDatasResult">
|
||||
<include refid="selectDevIotDatasVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertDevIotDatas" parameterType="DevIotDatas" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into dev_iot_datas
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="cfgId != null">cfg_id,</if>
|
||||
<if test="pointId != null">point_id,</if>
|
||||
<if test="comId != null">com_id,</if>
|
||||
<if test="projectId != null">project_id,</if>
|
||||
<if test="deviceSn != null">device_sn,</if>
|
||||
<if test="switchesAc != null">switches_ac,</if>
|
||||
<if test="switchesSwitch != null">switches_switch,</if>
|
||||
<if test="switchesSwitches != null">switches_switches,</if>
|
||||
<if test="switchesSwitchstatus != null">switches_switchStatus,</if>
|
||||
<if test="temperature != null">temperature,</if>
|
||||
<if test="leakage != null">leakage,</if>
|
||||
<if test="voltageA != null">voltage_a,</if>
|
||||
<if test="voltageB != null">voltage_b,</if>
|
||||
<if test="voltageC != null">voltage_c,</if>
|
||||
<if test="voltageAb != null">voltage_ab,</if>
|
||||
<if test="voltageBc != null">voltage_bc,</if>
|
||||
<if test="voltageCa != null">voltage_ca,</if>
|
||||
<if test="currentA != null">current_a,</if>
|
||||
<if test="currentB != null">current_b,</if>
|
||||
<if test="currentC != null">current_c,</if>
|
||||
<if test="powerA != null">power_a,</if>
|
||||
<if test="powerB != null">power_b,</if>
|
||||
<if test="powerC != null">power_c,</if>
|
||||
<if test="energyA != null">energy_a,</if>
|
||||
<if test="energyB != null">energy_b,</if>
|
||||
<if test="energyC != null">energy_c,</if>
|
||||
<if test="factorA != null">factor_a,</if>
|
||||
<if test="factorB != null">factor_b,</if>
|
||||
<if test="factorC != null">factor_c,</if>
|
||||
<if test="frequencyA != null">frequency_a,</if>
|
||||
<if test="frequencyB != null">frequency_b,</if>
|
||||
<if test="frequencyC != null">frequency_c,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="cfgId != null">#{cfgId},</if>
|
||||
<if test="pointId != null">#{pointId},</if>
|
||||
<if test="comId != null">#{comId},</if>
|
||||
<if test="projectId != null">#{projectId},</if>
|
||||
<if test="deviceSn != null">#{deviceSn},</if>
|
||||
<if test="switchesAc != null">#{switchesAc},</if>
|
||||
<if test="switchesSwitch != null">#{switchesSwitch},</if>
|
||||
<if test="switchesSwitches != null">#{switchesSwitches},</if>
|
||||
<if test="switchesSwitchstatus != null">#{switchesSwitchstatus},</if>
|
||||
<if test="temperature != null">#{temperature},</if>
|
||||
<if test="leakage != null">#{leakage},</if>
|
||||
<if test="voltageA != null">#{voltageA},</if>
|
||||
<if test="voltageB != null">#{voltageB},</if>
|
||||
<if test="voltageC != null">#{voltageC},</if>
|
||||
<if test="voltageAb != null">#{voltageAb},</if>
|
||||
<if test="voltageBc != null">#{voltageBc},</if>
|
||||
<if test="voltageCa != null">#{voltageCa},</if>
|
||||
<if test="currentA != null">#{currentA},</if>
|
||||
<if test="currentB != null">#{currentB},</if>
|
||||
<if test="currentC != null">#{currentC},</if>
|
||||
<if test="powerA != null">#{powerA},</if>
|
||||
<if test="powerB != null">#{powerB},</if>
|
||||
<if test="powerC != null">#{powerC},</if>
|
||||
<if test="energyA != null">#{energyA},</if>
|
||||
<if test="energyB != null">#{energyB},</if>
|
||||
<if test="energyC != null">#{energyC},</if>
|
||||
<if test="factorA != null">#{factorA},</if>
|
||||
<if test="factorB != null">#{factorB},</if>
|
||||
<if test="factorC != null">#{factorC},</if>
|
||||
<if test="frequencyA != null">#{frequencyA},</if>
|
||||
<if test="frequencyB != null">#{frequencyB},</if>
|
||||
<if test="frequencyC != null">#{frequencyC},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateDevIotDatas" parameterType="DevIotDatas">
|
||||
update dev_iot_datas
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="cfgId != null">cfg_id = #{cfgId},</if>
|
||||
<if test="pointId != null">point_id = #{pointId},</if>
|
||||
<if test="comId != null">com_id = #{comId},</if>
|
||||
<if test="projectId != null">project_id = #{projectId},</if>
|
||||
<if test="deviceSn != null">device_sn = #{deviceSn},</if>
|
||||
<if test="switchesAc != null">switches_ac = #{switchesAc},</if>
|
||||
<if test="switchesSwitch != null">switches_switch = #{switchesSwitch},</if>
|
||||
<if test="switchesSwitches != null">switches_switches = #{switchesSwitches},</if>
|
||||
<if test="switchesSwitchstatus != null">switches_switchStatus = #{switchesSwitchstatus},</if>
|
||||
<if test="temperature != null">temperature = #{temperature},</if>
|
||||
<if test="leakage != null">leakage = #{leakage},</if>
|
||||
<if test="voltageA != null">voltage_a = #{voltageA},</if>
|
||||
<if test="voltageB != null">voltage_b = #{voltageB},</if>
|
||||
<if test="voltageC != null">voltage_c = #{voltageC},</if>
|
||||
<if test="voltageAb != null">voltage_ab = #{voltageAb},</if>
|
||||
<if test="voltageBc != null">voltage_bc = #{voltageBc},</if>
|
||||
<if test="voltageCa != null">voltage_ca = #{voltageCa},</if>
|
||||
<if test="currentA != null">current_a = #{currentA},</if>
|
||||
<if test="currentB != null">current_b = #{currentB},</if>
|
||||
<if test="currentC != null">current_c = #{currentC},</if>
|
||||
<if test="powerA != null">power_a = #{powerA},</if>
|
||||
<if test="powerB != null">power_b = #{powerB},</if>
|
||||
<if test="powerC != null">power_c = #{powerC},</if>
|
||||
<if test="energyA != null">energy_a = #{energyA},</if>
|
||||
<if test="energyB != null">energy_b = #{energyB},</if>
|
||||
<if test="energyC != null">energy_c = #{energyC},</if>
|
||||
<if test="factorA != null">factor_a = #{factorA},</if>
|
||||
<if test="factorB != null">factor_b = #{factorB},</if>
|
||||
<if test="factorC != null">factor_c = #{factorC},</if>
|
||||
<if test="frequencyA != null">frequency_a = #{frequencyA},</if>
|
||||
<if test="frequencyB != null">frequency_b = #{frequencyB},</if>
|
||||
<if test="frequencyC != null">frequency_c = #{frequencyC},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteDevIotDatasById" parameterType="Long">
|
||||
delete from dev_iot_datas where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDevIotDatasByIds" parameterType="String">
|
||||
delete from dev_iot_datas where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,90 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.yanzhu.device.mapper.DevIotWarningMapper">
|
||||
|
||||
<resultMap type="DevIotWarning" id="DevIotWarningResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="cfgId" column="cfg_id" />
|
||||
<result property="pointId" column="point_id" />
|
||||
<result property="comId" column="com_id" />
|
||||
<result property="projectId" column="project_id" />
|
||||
<result property="deviceSn" column="device_sn" />
|
||||
<result property="warningType" column="warning_type" />
|
||||
<result property="warningContent" column="warning_content" />
|
||||
<result property="createTime" column="create_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDevIotWarningVo">
|
||||
select id, cfg_id, point_id, com_id, project_id, device_sn, warning_type, warning_content, create_time from dev_iot_warning
|
||||
</sql>
|
||||
|
||||
<select id="selectDevIotWarningList" parameterType="DevIotWarning" resultMap="DevIotWarningResult">
|
||||
<include refid="selectDevIotWarningVo"/>
|
||||
<where>
|
||||
<if test="cfgId != null "> and cfg_id = #{cfgId}</if>
|
||||
<if test="pointId != null "> and point_id = #{pointId}</if>
|
||||
<if test="comId != null "> and com_id = #{comId}</if>
|
||||
<if test="projectId != null "> and project_id = #{projectId}</if>
|
||||
<if test="deviceSn != null and deviceSn != ''"> and device_sn = #{deviceSn}</if>
|
||||
<if test="warningType != null and warningType != ''"> and warning_type = #{warningType}</if>
|
||||
<if test="warningContent != null and warningContent != ''"> and warning_content = #{warningContent}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectDevIotWarningById" parameterType="Long" resultMap="DevIotWarningResult">
|
||||
<include refid="selectDevIotWarningVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertDevIotWarning" parameterType="DevIotWarning" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into dev_iot_warning
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="cfgId != null">cfg_id,</if>
|
||||
<if test="pointId != null">point_id,</if>
|
||||
<if test="comId != null">com_id,</if>
|
||||
<if test="projectId != null">project_id,</if>
|
||||
<if test="deviceSn != null">device_sn,</if>
|
||||
<if test="warningType != null">warning_type,</if>
|
||||
<if test="warningContent != null">warning_content,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="cfgId != null">#{cfgId},</if>
|
||||
<if test="pointId != null">#{pointId},</if>
|
||||
<if test="comId != null">#{comId},</if>
|
||||
<if test="projectId != null">#{projectId},</if>
|
||||
<if test="deviceSn != null">#{deviceSn},</if>
|
||||
<if test="warningType != null">#{warningType},</if>
|
||||
<if test="warningContent != null">#{warningContent},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateDevIotWarning" parameterType="DevIotWarning">
|
||||
update dev_iot_warning
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="cfgId != null">cfg_id = #{cfgId},</if>
|
||||
<if test="pointId != null">point_id = #{pointId},</if>
|
||||
<if test="comId != null">com_id = #{comId},</if>
|
||||
<if test="projectId != null">project_id = #{projectId},</if>
|
||||
<if test="deviceSn != null">device_sn = #{deviceSn},</if>
|
||||
<if test="warningType != null">warning_type = #{warningType},</if>
|
||||
<if test="warningContent != null">warning_content = #{warningContent},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteDevIotWarningById" parameterType="Long">
|
||||
delete from dev_iot_warning where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDevIotWarningByIds" parameterType="String">
|
||||
delete from dev_iot_warning where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
|
|
@ -147,7 +147,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
WHERE r.del_flag = '0' and u.user_name = #{userName}
|
||||
</select>
|
||||
|
||||
<select id="checkRoleNameUnique" parameterType="String" resultMap="SysRoleSysRoleDeptResult">
|
||||
<select id="checkRoleNameUnique" resultMap="SysRoleSysRoleDeptResult">
|
||||
<include refid="selectRoleVo"/>
|
||||
where r.role_name=#{roleName} and rd.dept_id = #{deptId} and r.del_flag = '0' limit 1
|
||||
</select>
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
@ -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<Map<String,Object>> selectDevIotConfigList();
|
||||
|
||||
/**
|
||||
* 查询配电箱配置列表
|
||||
*
|
||||
* @param devIotConfigPoint 配电箱配置
|
||||
* @return 配电箱配置集合
|
||||
*/
|
||||
public List<DevIotConfigPoint> 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);
|
||||
|
||||
}
|
||||
|
|
@ -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<Map<String, Object>> selectDevIotConfigList() {
|
||||
return devIotMapper.selectDevIotConfigList();
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询配电箱配置列表
|
||||
*
|
||||
* @param devIotConfigPoint 配电箱配置
|
||||
* @return 配电箱配置集合
|
||||
*/
|
||||
@Override
|
||||
public List<DevIotConfigPoint> 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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -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<Map<String,Object>> selectDevIotConfigList();
|
||||
|
||||
/**
|
||||
* 查询配电箱配置列表
|
||||
*
|
||||
* @param devIotConfigPoint 配电箱配置
|
||||
* @return 配电箱配置集合
|
||||
*/
|
||||
public List<DevIotConfigPoint> 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);
|
||||
}
|
||||
|
|
@ -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<Map<String,Object>> configs = devIotService.selectDevIotConfigList();
|
||||
if(configs.size()>0){
|
||||
for(Map<String,Object> 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<DevIotConfigPoint> 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<String, Object> 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<String,Object> 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<DevIotConfigPoint> pointList = devIotService.selectDevIotConfigPointList(pointQuery);
|
||||
result.forEach(item -> {
|
||||
JSONObject obj = (JSONObject) item;
|
||||
List<DevIotConfigPoint> 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();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,229 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.yanzhu.job.mapper.DevIotMapper">
|
||||
|
||||
<resultMap type="DevIotConfigPoint" id="DevIotConfigPointResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="cfgId" column="cfg_id" />
|
||||
<result property="comId" column="com_id" />
|
||||
<result property="projectId" column="project_id" />
|
||||
<result property="deviceSn" column="device_sn" />
|
||||
<result property="deviceName" column="device_name" />
|
||||
<result property="factoryName" column="factory_name" />
|
||||
<result property="contactPerson" column="contact_person" />
|
||||
<result property="contactPersonPhone" column="contact_person_phone" />
|
||||
<result property="levels" column="levels" />
|
||||
<result property="leakageCurrent" column="leakage_current" />
|
||||
<result property="ratedTemperature" column="rated_temperature" />
|
||||
<result property="shortCircuitCurrent" column="short_circuit_current" />
|
||||
<result property="ratedCurrent" column="rated_current" />
|
||||
<result property="ratedVoltage" column="rated_voltage" />
|
||||
<result property="onlineStatus" column="online_status" />
|
||||
<result property="isDel" column="is_del" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDevIotConfigPointVo">
|
||||
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
|
||||
</sql>
|
||||
|
||||
<select id="selectDevIotConfigPointList" parameterType="DevIotConfigPoint" resultMap="DevIotConfigPointResult">
|
||||
<include refid="selectDevIotConfigPointVo"/>
|
||||
<where>
|
||||
<if test="cfgId != null "> and cfg_id = #{cfgId}</if>
|
||||
<if test="comId != null "> and com_id = #{comId}</if>
|
||||
<if test="projectId != null "> and project_id = #{projectId}</if>
|
||||
<if test="isDel != null and isDel != ''"> and is_del = #{isDel}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<insert id="insertDevIotConfigPoint" parameterType="DevIotConfigPoint" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into dev_iot_config_point
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="cfgId != null">cfg_id,</if>
|
||||
<if test="comId != null">com_id,</if>
|
||||
<if test="projectId != null">project_id,</if>
|
||||
<if test="deviceSn != null">device_sn,</if>
|
||||
<if test="deviceName != null">device_name,</if>
|
||||
<if test="factoryName != null">factory_name,</if>
|
||||
<if test="contactPerson != null">contact_person,</if>
|
||||
<if test="contactPersonPhone != null">contact_person_phone,</if>
|
||||
<if test="levels != null">levels,</if>
|
||||
<if test="leakageCurrent != null">leakage_current,</if>
|
||||
<if test="ratedTemperature != null">rated_temperature,</if>
|
||||
<if test="shortCircuitCurrent != null">short_circuit_current,</if>
|
||||
<if test="ratedCurrent != null">rated_current,</if>
|
||||
<if test="ratedVoltage != null">rated_voltage,</if>
|
||||
<if test="onlineStatus != null">online_status,</if>
|
||||
<if test="isDel != null">is_del,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="cfgId != null">#{cfgId},</if>
|
||||
<if test="comId != null">#{comId},</if>
|
||||
<if test="projectId != null">#{projectId},</if>
|
||||
<if test="deviceSn != null">#{deviceSn},</if>
|
||||
<if test="deviceName != null">#{deviceName},</if>
|
||||
<if test="factoryName != null">#{factoryName},</if>
|
||||
<if test="contactPerson != null">#{contactPerson},</if>
|
||||
<if test="contactPersonPhone != null">#{contactPersonPhone},</if>
|
||||
<if test="levels != null">#{levels},</if>
|
||||
<if test="leakageCurrent != null">#{leakageCurrent},</if>
|
||||
<if test="ratedTemperature != null">#{ratedTemperature},</if>
|
||||
<if test="shortCircuitCurrent != null">#{shortCircuitCurrent},</if>
|
||||
<if test="ratedCurrent != null">#{ratedCurrent},</if>
|
||||
<if test="ratedVoltage != null">#{ratedVoltage},</if>
|
||||
<if test="onlineStatus != null">#{onlineStatus},</if>
|
||||
<if test="isDel != null">#{isDel},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateDevIotConfigPoint" parameterType="DevIotConfigPoint">
|
||||
update dev_iot_config_point
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="cfgId != null">cfg_id = #{cfgId},</if>
|
||||
<if test="comId != null">com_id = #{comId},</if>
|
||||
<if test="projectId != null">project_id = #{projectId},</if>
|
||||
<if test="deviceSn != null">device_sn = #{deviceSn},</if>
|
||||
<if test="deviceName != null">device_name = #{deviceName},</if>
|
||||
<if test="factoryName != null">factory_name = #{factoryName},</if>
|
||||
<if test="contactPerson != null">contact_person = #{contactPerson},</if>
|
||||
<if test="contactPersonPhone != null">contact_person_phone = #{contactPersonPhone},</if>
|
||||
<if test="levels != null">levels = #{levels},</if>
|
||||
<if test="leakageCurrent != null">leakage_current = #{leakageCurrent},</if>
|
||||
<if test="ratedTemperature != null">rated_temperature = #{ratedTemperature},</if>
|
||||
<if test="shortCircuitCurrent != null">short_circuit_current = #{shortCircuitCurrent},</if>
|
||||
<if test="ratedCurrent != null">rated_current = #{ratedCurrent},</if>
|
||||
<if test="ratedVoltage != null">rated_voltage = #{ratedVoltage},</if>
|
||||
<if test="onlineStatus != null">online_status = #{onlineStatus},</if>
|
||||
<if test="isDel != null">is_del = #{isDel},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<select id="selectDevIotConfigList" resultType="Map">
|
||||
select dic.id, dic.com_id, dic.project_id, pi.project_name, dic.signal_name, dic.signal_code, dic.factory_name
|
||||
from dev_iot_config dic
|
||||
left join pro_project_info pi on pi.id = dic.project_id
|
||||
where dic.is_del = '0'
|
||||
</select>
|
||||
|
||||
<insert id="insertDevIotDatas" parameterType="DevIotDatas" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into dev_iot_datas
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="cfgId != null">cfg_id,</if>
|
||||
<if test="pointId != null">point_id,</if>
|
||||
<if test="comId != null">com_id,</if>
|
||||
<if test="projectId != null">project_id,</if>
|
||||
<if test="deviceSn != null">device_sn,</if>
|
||||
<if test="switchesAc != null">switches_ac,</if>
|
||||
<if test="switchesSwitch != null">switches_switch,</if>
|
||||
<if test="switchesSwitches != null">switches_switches,</if>
|
||||
<if test="switchesSwitchstatus != null">switches_switchStatus,</if>
|
||||
<if test="temperature != null">temperature,</if>
|
||||
<if test="leakage != null">leakage,</if>
|
||||
<if test="voltageA != null">voltage_a,</if>
|
||||
<if test="voltageB != null">voltage_b,</if>
|
||||
<if test="voltageC != null">voltage_c,</if>
|
||||
<if test="voltageAb != null">voltage_ab,</if>
|
||||
<if test="voltageBc != null">voltage_bc,</if>
|
||||
<if test="voltageCa != null">voltage_ca,</if>
|
||||
<if test="currentA != null">current_a,</if>
|
||||
<if test="currentB != null">current_b,</if>
|
||||
<if test="currentC != null">current_c,</if>
|
||||
<if test="powerA != null">power_a,</if>
|
||||
<if test="powerB != null">power_b,</if>
|
||||
<if test="powerC != null">power_c,</if>
|
||||
<if test="energyA != null">energy_a,</if>
|
||||
<if test="energyB != null">energy_b,</if>
|
||||
<if test="energyC != null">energy_c,</if>
|
||||
<if test="factorA != null">factor_a,</if>
|
||||
<if test="factorB != null">factor_b,</if>
|
||||
<if test="factorC != null">factor_c,</if>
|
||||
<if test="frequencyA != null">frequency_a,</if>
|
||||
<if test="frequencyB != null">frequency_b,</if>
|
||||
<if test="frequencyC != null">frequency_c,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="cfgId != null">#{cfgId},</if>
|
||||
<if test="pointId != null">#{pointId},</if>
|
||||
<if test="comId != null">#{comId},</if>
|
||||
<if test="projectId != null">#{projectId},</if>
|
||||
<if test="deviceSn != null">#{deviceSn},</if>
|
||||
<if test="switchesAc != null">#{switchesAc},</if>
|
||||
<if test="switchesSwitch != null">#{switchesSwitch},</if>
|
||||
<if test="switchesSwitches != null">#{switchesSwitches},</if>
|
||||
<if test="switchesSwitchstatus != null">#{switchesSwitchstatus},</if>
|
||||
<if test="temperature != null">#{temperature},</if>
|
||||
<if test="leakage != null">#{leakage},</if>
|
||||
<if test="voltageA != null">#{voltageA},</if>
|
||||
<if test="voltageB != null">#{voltageB},</if>
|
||||
<if test="voltageC != null">#{voltageC},</if>
|
||||
<if test="voltageAb != null">#{voltageAb},</if>
|
||||
<if test="voltageBc != null">#{voltageBc},</if>
|
||||
<if test="voltageCa != null">#{voltageCa},</if>
|
||||
<if test="currentA != null">#{currentA},</if>
|
||||
<if test="currentB != null">#{currentB},</if>
|
||||
<if test="currentC != null">#{currentC},</if>
|
||||
<if test="powerA != null">#{powerA},</if>
|
||||
<if test="powerB != null">#{powerB},</if>
|
||||
<if test="powerC != null">#{powerC},</if>
|
||||
<if test="energyA != null">#{energyA},</if>
|
||||
<if test="energyB != null">#{energyB},</if>
|
||||
<if test="energyC != null">#{energyC},</if>
|
||||
<if test="factorA != null">#{factorA},</if>
|
||||
<if test="factorB != null">#{factorB},</if>
|
||||
<if test="factorC != null">#{factorC},</if>
|
||||
<if test="frequencyA != null">#{frequencyA},</if>
|
||||
<if test="frequencyB != null">#{frequencyB},</if>
|
||||
<if test="frequencyC != null">#{frequencyC},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<insert id="insertDevIotWarning" parameterType="DevIotWarning" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into dev_iot_warning
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="cfgId != null">cfg_id,</if>
|
||||
<if test="pointId != null">point_id,</if>
|
||||
<if test="comId != null">com_id,</if>
|
||||
<if test="projectId != null">project_id,</if>
|
||||
<if test="deviceSn != null">device_sn,</if>
|
||||
<if test="warningType != null">warning_type,</if>
|
||||
<if test="warningContent != null">warning_content,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="cfgId != null">#{cfgId},</if>
|
||||
<if test="pointId != null">#{pointId},</if>
|
||||
<if test="comId != null">#{comId},</if>
|
||||
<if test="projectId != null">#{projectId},</if>
|
||||
<if test="deviceSn != null">#{deviceSn},</if>
|
||||
<if test="warningType != null">#{warningType},</if>
|
||||
<if test="warningContent != null">#{warningContent},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -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<DevIotConfig> 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<DevIotConfig> list = devIotConfigService.selectDevIotConfigList(devIotConfig);
|
||||
ExcelUtil<DevIotConfig> util = new ExcelUtil<DevIotConfig>(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));
|
||||
}
|
||||
}
|
||||
|
|
@ -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<DevIotConfigPoint> 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<DevIotConfigPoint> list = devIotConfigPointService.selectDevIotConfigPointList(devIotConfigPoint);
|
||||
ExcelUtil<DevIotConfigPoint> util = new ExcelUtil<DevIotConfigPoint>(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));
|
||||
}
|
||||
}
|
||||
|
|
@ -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<DevIotDatas> 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<DevIotDatas> list = devIotDatasService.selectDevIotDatasList(devIotDatas);
|
||||
ExcelUtil<DevIotDatas> util = new ExcelUtil<DevIotDatas>(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));
|
||||
}
|
||||
}
|
||||
|
|
@ -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<DevIotWarning> 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<DevIotWarning> list = devIotWarningService.selectDevIotWarningList(devIotWarning);
|
||||
ExcelUtil<DevIotWarning> util = new ExcelUtil<DevIotWarning>(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));
|
||||
}
|
||||
}
|
||||
|
|
@ -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<DevIotConfigPoint> 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);
|
||||
}
|
||||
|
|
@ -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<DevIotConfig> 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);
|
||||
}
|
||||
|
|
@ -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<DevIotDatas> 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);
|
||||
}
|
||||
|
|
@ -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<DevIotWarning> 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);
|
||||
}
|
||||
|
|
@ -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<DevIotConfigPoint> 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);
|
||||
}
|
||||
}
|
||||
|
|
@ -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<DevIotConfig> 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);
|
||||
}
|
||||
}
|
||||
|
|
@ -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<DevIotDatas> 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);
|
||||
}
|
||||
}
|
||||
|
|
@ -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<DevIotWarning> 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);
|
||||
}
|
||||
}
|
||||
|
|
@ -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());
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
})
|
||||
}
|
||||
|
|
@ -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'
|
||||
})
|
||||
}
|
||||
|
|
@ -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'
|
||||
})
|
||||
}
|
||||
|
|
@ -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'
|
||||
})
|
||||
}
|
||||
|
|
@ -0,0 +1,277 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="项目名称" prop="projectName" v-if="!userStore.currentPrjId">
|
||||
<el-input
|
||||
v-model="queryParams.projectName"
|
||||
placeholder="请输入项目名称"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备厂商" prop="factoryName">
|
||||
<el-select v-model="queryParams.factoryName" placeholder="请选择设备厂商" clearable>
|
||||
<el-option
|
||||
v-for="dict in iot_factory_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Plus"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['manage:iotConfig:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="Edit"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['manage:iotConfig:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="Delete"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['manage:iotConfig:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="Download"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['manage:iotConfig:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="iotConfigList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="所属公司" align="center" prop="comName" />
|
||||
<el-table-column label="项目名称" align="center" prop="projectName" />
|
||||
<el-table-column label="通信账号" align="center" prop="signalName" />
|
||||
<el-table-column label="通信密码" align="center" prop="signalCode" />
|
||||
<el-table-column label="设备厂商" align="center" prop="factoryName" />
|
||||
<el-table-column label="数据状态" align="center" prop="isDel" />
|
||||
<el-table-column label="操作" align="center" width="" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['manage:iotConfig:edit']">修改</el-button>
|
||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['manage:iotConfig:remove']">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNum"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改配电箱配置对话框 -->
|
||||
<el-dialog :title="title" v-model="open" width="500px" append-to-body>
|
||||
<el-form ref="iotConfigRef" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="公司主键" prop="comId">
|
||||
<el-input v-model="form.comId" placeholder="请输入公司主键" />
|
||||
</el-form-item>
|
||||
<el-form-item label="项目主键" prop="projectId">
|
||||
<el-input v-model="form.projectId" placeholder="请输入项目主键" />
|
||||
</el-form-item>
|
||||
<el-form-item label="通信账号" prop="signalName">
|
||||
<el-input v-model="form.signalName" placeholder="请输入通信账号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="通信密码" prop="signalCode">
|
||||
<el-input v-model="form.signalCode" placeholder="请输入通信密码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="厂家名称" prop="factoryName">
|
||||
<el-input v-model="form.factoryName" placeholder="请输入厂家名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="数据状态" prop="isDel">
|
||||
<el-input v-model="form.isDel" placeholder="请输入数据状态" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="IotConfig">
|
||||
import { listIotConfig, getIotConfig, delIotConfig, addIotConfig, updateIotConfig } from "@/api/device/iotConfig";
|
||||
import useUserStore from '@/store/modules/user'
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { iot_factory_type } = proxy.useDict('iot_factory_type');
|
||||
|
||||
const userStore = useUserStore()
|
||||
const iotConfigList = ref([]);
|
||||
const open = ref(false);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const title = ref("");
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
comId: null,
|
||||
projectId: null,
|
||||
signalName: null,
|
||||
signalCode: null,
|
||||
factoryName: null,
|
||||
isDel: null,
|
||||
},
|
||||
rules: {
|
||||
}
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
/** 查询配电箱配置列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
listIotConfig(queryParams.value).then(response => {
|
||||
iotConfigList.value = response.rows;
|
||||
total.value = response.total;
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
// 取消按钮
|
||||
function cancel() {
|
||||
open.value = false;
|
||||
reset();
|
||||
}
|
||||
|
||||
// 表单重置
|
||||
function reset() {
|
||||
form.value = {
|
||||
id: null,
|
||||
comId: null,
|
||||
projectId: null,
|
||||
signalName: null,
|
||||
signalCode: null,
|
||||
factoryName: null,
|
||||
isDel: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null,
|
||||
remark: null
|
||||
};
|
||||
proxy.resetForm("iotConfigRef");
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 重置按钮操作 */
|
||||
function resetQuery() {
|
||||
proxy.resetForm("queryRef");
|
||||
handleQuery();
|
||||
}
|
||||
|
||||
// 多选框选中数据
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map(item => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
/** 新增按钮操作 */
|
||||
function handleAdd() {
|
||||
reset();
|
||||
open.value = true;
|
||||
title.value = "添加配电箱配置";
|
||||
}
|
||||
|
||||
/** 修改按钮操作 */
|
||||
function handleUpdate(row) {
|
||||
reset();
|
||||
const _id = row.id || ids.value
|
||||
getIotConfig(_id).then(response => {
|
||||
form.value = response.data;
|
||||
open.value = true;
|
||||
title.value = "修改配电箱配置";
|
||||
});
|
||||
}
|
||||
|
||||
/** 提交按钮 */
|
||||
function submitForm() {
|
||||
proxy.$refs["iotConfigRef"].validate(valid => {
|
||||
if (valid) {
|
||||
if (form.value.id != null) {
|
||||
updateIotConfig(form.value).then(response => {
|
||||
proxy.$modal.msgSuccess("修改成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
} else {
|
||||
addIotConfig(form.value).then(response => {
|
||||
proxy.$modal.msgSuccess("新增成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/** 删除按钮操作 */
|
||||
function handleDelete(row) {
|
||||
const _ids = row.id || ids.value;
|
||||
proxy.$modal.confirm('是否确认删除配电箱配置编号为"' + _ids + '"的数据项?').then(function() {
|
||||
return delIotConfig(_ids);
|
||||
}).then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
}
|
||||
|
||||
/** 导出按钮操作 */
|
||||
function handleExport() {
|
||||
proxy.download('manage/iotConfig/export', {
|
||||
...queryParams.value
|
||||
}, `iotConfig_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
|
||||
getList();
|
||||
</script>
|
||||
|
|
@ -0,0 +1,366 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="项目名称" prop="projectName" v-if="!userStore.currentPrjId">
|
||||
<el-input
|
||||
v-model="queryParams.projectName"
|
||||
placeholder="请输入项目名称"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="公司主键" prop="comId">
|
||||
<el-input
|
||||
v-model="queryParams.comId"
|
||||
placeholder="请输入公司主键"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="项目主键" prop="projectId">
|
||||
<el-input
|
||||
v-model="queryParams.projectId"
|
||||
placeholder="请输入项目主键"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备序列号" prop="deviceSn">
|
||||
<el-input
|
||||
v-model="queryParams.deviceSn"
|
||||
placeholder="请输入设备序列号"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备名称" prop="deviceName">
|
||||
<el-input
|
||||
v-model="queryParams.deviceName"
|
||||
placeholder="请输入设备名称"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="厂家名称" prop="factoryName">
|
||||
<el-input
|
||||
v-model="queryParams.factoryName"
|
||||
placeholder="请输入厂家名称"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="数据状态" prop="isDel">
|
||||
<el-input
|
||||
v-model="queryParams.isDel"
|
||||
placeholder="请输入数据状态"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Plus"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['manage:iotConfigPoint:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="Edit"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['manage:iotConfigPoint:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="Delete"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['manage:iotConfigPoint:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="Download"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['manage:iotConfigPoint:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="iotConfigPointList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="主键" align="center" prop="id" />
|
||||
<el-table-column label="配置主键" align="center" prop="cfgId" />
|
||||
<el-table-column label="公司主键" align="center" prop="comId" />
|
||||
<el-table-column label="项目主键" align="center" prop="projectId" />
|
||||
<el-table-column label="设备序列号" align="center" prop="deviceSn" />
|
||||
<el-table-column label="设备名称" align="center" prop="deviceName" />
|
||||
<el-table-column label="厂家名称" align="center" prop="factoryName" />
|
||||
<el-table-column label="联系人" align="center" prop="contactPerson" />
|
||||
<el-table-column label="联系人电话" align="center" prop="contactPersonPhone" />
|
||||
<el-table-column label="配电箱等级" align="center" prop="levels" />
|
||||
<el-table-column label="漏电电流" align="center" prop="leakageCurrent" />
|
||||
<el-table-column label="额定温度" align="center" prop="ratedTemperature" />
|
||||
<el-table-column label="短路电流" align="center" prop="shortCircuitCurrent" />
|
||||
<el-table-column label="额定电流" align="center" prop="ratedCurrent" />
|
||||
<el-table-column label="额定电压" align="center" prop="ratedVoltage" />
|
||||
<el-table-column label="在线状态" align="center" prop="onlineStatus" />
|
||||
<el-table-column label="数据状态" align="center" prop="isDel" />
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['manage:iotConfigPoint:edit']">修改</el-button>
|
||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['manage:iotConfigPoint:remove']">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNum"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改配电箱配置对话框 -->
|
||||
<el-dialog :title="title" v-model="open" width="500px" append-to-body>
|
||||
<el-form ref="iotConfigPointRef" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="配置主键" prop="cfgId">
|
||||
<el-input v-model="form.cfgId" placeholder="请输入配置主键" />
|
||||
</el-form-item>
|
||||
<el-form-item label="公司主键" prop="comId">
|
||||
<el-input v-model="form.comId" placeholder="请输入公司主键" />
|
||||
</el-form-item>
|
||||
<el-form-item label="项目主键" prop="projectId">
|
||||
<el-input v-model="form.projectId" placeholder="请输入项目主键" />
|
||||
</el-form-item>
|
||||
<el-form-item label="设备序列号" prop="deviceSn">
|
||||
<el-input v-model="form.deviceSn" placeholder="请输入设备序列号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="设备名称" prop="deviceName">
|
||||
<el-input v-model="form.deviceName" placeholder="请输入设备名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="厂家名称" prop="factoryName">
|
||||
<el-input v-model="form.factoryName" placeholder="请输入厂家名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="联系人" prop="contactPerson">
|
||||
<el-input v-model="form.contactPerson" placeholder="请输入联系人" />
|
||||
</el-form-item>
|
||||
<el-form-item label="联系人电话" prop="contactPersonPhone">
|
||||
<el-input v-model="form.contactPersonPhone" placeholder="请输入联系人电话" />
|
||||
</el-form-item>
|
||||
<el-form-item label="配电箱等级" prop="levels">
|
||||
<el-input v-model="form.levels" placeholder="请输入配电箱等级" />
|
||||
</el-form-item>
|
||||
<el-form-item label="漏电电流" prop="leakageCurrent">
|
||||
<el-input v-model="form.leakageCurrent" placeholder="请输入漏电电流" />
|
||||
</el-form-item>
|
||||
<el-form-item label="额定温度" prop="ratedTemperature">
|
||||
<el-input v-model="form.ratedTemperature" placeholder="请输入额定温度" />
|
||||
</el-form-item>
|
||||
<el-form-item label="短路电流" prop="shortCircuitCurrent">
|
||||
<el-input v-model="form.shortCircuitCurrent" placeholder="请输入短路电流" />
|
||||
</el-form-item>
|
||||
<el-form-item label="额定电流" prop="ratedCurrent">
|
||||
<el-input v-model="form.ratedCurrent" placeholder="请输入额定电流" />
|
||||
</el-form-item>
|
||||
<el-form-item label="额定电压" prop="ratedVoltage">
|
||||
<el-input v-model="form.ratedVoltage" placeholder="请输入额定电压" />
|
||||
</el-form-item>
|
||||
<el-form-item label="数据状态" prop="isDel">
|
||||
<el-input v-model="form.isDel" placeholder="请输入数据状态" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="IotConfigPoint">
|
||||
import { listIotConfigPoint, getIotConfigPoint, delIotConfigPoint, addIotConfigPoint, updateIotConfigPoint } from "@/api/device/iotConfigPoint";
|
||||
import useUserStore from '@/store/modules/user'
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { iot_factory_type } = proxy.useDict('iot_factory_type');
|
||||
|
||||
const userStore = useUserStore()
|
||||
const iotConfigPointList = ref([]);
|
||||
const open = ref(false);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const title = ref("");
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
cfgId: null,
|
||||
comId: null,
|
||||
projectId: null,
|
||||
deviceSn: null,
|
||||
deviceName: null,
|
||||
factoryName: null,
|
||||
onlineStatus: null,
|
||||
isDel: null,
|
||||
},
|
||||
rules: {
|
||||
}
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
/** 查询配电箱配置列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
listIotConfigPoint(queryParams.value).then(response => {
|
||||
iotConfigPointList.value = response.rows;
|
||||
total.value = response.total;
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
// 取消按钮
|
||||
function cancel() {
|
||||
open.value = false;
|
||||
reset();
|
||||
}
|
||||
|
||||
// 表单重置
|
||||
function reset() {
|
||||
form.value = {
|
||||
id: null,
|
||||
cfgId: null,
|
||||
comId: null,
|
||||
projectId: null,
|
||||
deviceSn: null,
|
||||
deviceName: null,
|
||||
factoryName: null,
|
||||
contactPerson: null,
|
||||
contactPersonPhone: null,
|
||||
levels: null,
|
||||
leakageCurrent: null,
|
||||
ratedTemperature: null,
|
||||
shortCircuitCurrent: null,
|
||||
ratedCurrent: null,
|
||||
ratedVoltage: null,
|
||||
onlineStatus: null,
|
||||
isDel: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null,
|
||||
remark: null
|
||||
};
|
||||
proxy.resetForm("iotConfigPointRef");
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 重置按钮操作 */
|
||||
function resetQuery() {
|
||||
proxy.resetForm("queryRef");
|
||||
handleQuery();
|
||||
}
|
||||
|
||||
// 多选框选中数据
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map(item => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
/** 新增按钮操作 */
|
||||
function handleAdd() {
|
||||
reset();
|
||||
open.value = true;
|
||||
title.value = "添加配电箱配置";
|
||||
}
|
||||
|
||||
/** 修改按钮操作 */
|
||||
function handleUpdate(row) {
|
||||
reset();
|
||||
const _id = row.id || ids.value
|
||||
getIotConfigPoint(_id).then(response => {
|
||||
form.value = response.data;
|
||||
open.value = true;
|
||||
title.value = "修改配电箱配置";
|
||||
});
|
||||
}
|
||||
|
||||
/** 提交按钮 */
|
||||
function submitForm() {
|
||||
proxy.$refs["iotConfigPointRef"].validate(valid => {
|
||||
if (valid) {
|
||||
if (form.value.id != null) {
|
||||
updateIotConfigPoint(form.value).then(response => {
|
||||
proxy.$modal.msgSuccess("修改成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
} else {
|
||||
addIotConfigPoint(form.value).then(response => {
|
||||
proxy.$modal.msgSuccess("新增成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/** 删除按钮操作 */
|
||||
function handleDelete(row) {
|
||||
const _ids = row.id || ids.value;
|
||||
proxy.$modal.confirm('是否确认删除配电箱配置编号为"' + _ids + '"的数据项?').then(function() {
|
||||
return delIotConfigPoint(_ids);
|
||||
}).then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
}
|
||||
|
||||
/** 导出按钮操作 */
|
||||
function handleExport() {
|
||||
proxy.download('manage/iotConfigPoint/export', {
|
||||
...queryParams.value
|
||||
}, `iotConfigPoint_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
|
||||
getList();
|
||||
</script>
|
||||
|
|
@ -0,0 +1,437 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="项目名称" prop="projectName" v-if="!userStore.currentPrjId">
|
||||
<el-input
|
||||
v-model="queryParams.projectName"
|
||||
placeholder="请输入项目名称"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="点位主键" prop="pointId">
|
||||
<el-input
|
||||
v-model="queryParams.pointId"
|
||||
placeholder="请输入点位主键"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="公司主键" prop="comId">
|
||||
<el-input
|
||||
v-model="queryParams.comId"
|
||||
placeholder="请输入公司主键"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="项目主键" prop="projectId">
|
||||
<el-input
|
||||
v-model="queryParams.projectId"
|
||||
placeholder="请输入项目主键"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备序列号" prop="deviceSn">
|
||||
<el-input
|
||||
v-model="queryParams.deviceSn"
|
||||
placeholder="请输入设备序列号"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" style="width: 308px">
|
||||
<el-date-picker
|
||||
v-model="daterangeCreateTime"
|
||||
value-format="YYYY-MM-DD"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Plus"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['manage:iotDatas:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="Edit"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['manage:iotDatas:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="Delete"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['manage:iotDatas:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="Download"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['manage:iotDatas:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="iotDatasList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="主键" align="center" prop="id" />
|
||||
<el-table-column label="配置主键" align="center" prop="cfgId" />
|
||||
<el-table-column label="点位主键" align="center" prop="pointId" />
|
||||
<el-table-column label="公司主键" align="center" prop="comId" />
|
||||
<el-table-column label="项目主键" align="center" prop="projectId" />
|
||||
<el-table-column label="设备序列号" align="center" prop="deviceSn" />
|
||||
<el-table-column label="开关位_交流" align="center" prop="switchesAc" />
|
||||
<el-table-column label="开关位" align="center" prop="switchesSwitch" />
|
||||
<el-table-column label="开关位状态" align="center" prop="switchesSwitches" />
|
||||
<el-table-column label="开关位安装状态" align="center" prop="switchesSwitchstatus" />
|
||||
<el-table-column label="温度检测数据" align="center" prop="temperature" />
|
||||
<el-table-column label="漏电检测数据" align="center" prop="leakage" />
|
||||
<el-table-column label="A相电压" align="center" prop="voltageA" />
|
||||
<el-table-column label="B相电压" align="center" prop="voltageB" />
|
||||
<el-table-column label="C相电压" align="center" prop="voltageC" />
|
||||
<el-table-column label="A相与B相之间的电压" align="center" prop="voltageAb" />
|
||||
<el-table-column label="B相与C相之间的电压" align="center" prop="voltageBc" />
|
||||
<el-table-column label="C相与A相之间的电压" align="center" prop="voltageCa" />
|
||||
<el-table-column label="A相电流" align="center" prop="currentA" />
|
||||
<el-table-column label="B相电流" align="center" prop="currentB" />
|
||||
<el-table-column label="C相电流" align="center" prop="currentC" />
|
||||
<el-table-column label="A相功率" align="center" prop="powerA" />
|
||||
<el-table-column label="B相功率" align="center" prop="powerB" />
|
||||
<el-table-column label="C相功率" align="center" prop="powerC" />
|
||||
<el-table-column label="A相累计能量" align="center" prop="energyA" />
|
||||
<el-table-column label="B相累计能量" align="center" prop="energyB" />
|
||||
<el-table-column label="C相累计能量" align="center" prop="energyC" />
|
||||
<el-table-column label="A相功率因数" align="center" prop="factorA" />
|
||||
<el-table-column label="B相功率因数" align="center" prop="factorB" />
|
||||
<el-table-column label="C相功率因数" align="center" prop="factorC" />
|
||||
<el-table-column label="A相频率" align="center" prop="frequencyA" />
|
||||
<el-table-column label="B相频率" align="center" prop="frequencyB" />
|
||||
<el-table-column label="C相频率" align="center" prop="frequencyC" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['manage:iotDatas:edit']">修改</el-button>
|
||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['manage:iotDatas:remove']">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNum"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改配电箱数据对话框 -->
|
||||
<el-dialog :title="title" v-model="open" width="500px" append-to-body>
|
||||
<el-form ref="iotDatasRef" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="配置主键" prop="cfgId">
|
||||
<el-input v-model="form.cfgId" placeholder="请输入配置主键" />
|
||||
</el-form-item>
|
||||
<el-form-item label="点位主键" prop="pointId">
|
||||
<el-input v-model="form.pointId" placeholder="请输入点位主键" />
|
||||
</el-form-item>
|
||||
<el-form-item label="公司主键" prop="comId">
|
||||
<el-input v-model="form.comId" placeholder="请输入公司主键" />
|
||||
</el-form-item>
|
||||
<el-form-item label="项目主键" prop="projectId">
|
||||
<el-input v-model="form.projectId" placeholder="请输入项目主键" />
|
||||
</el-form-item>
|
||||
<el-form-item label="设备序列号" prop="deviceSn">
|
||||
<el-input v-model="form.deviceSn" placeholder="请输入设备序列号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="开关位_交流" prop="switchesAc">
|
||||
<el-input v-model="form.switchesAc" placeholder="请输入开关位_交流" />
|
||||
</el-form-item>
|
||||
<el-form-item label="开关位" prop="switchesSwitch">
|
||||
<el-input v-model="form.switchesSwitch" placeholder="请输入开关位" />
|
||||
</el-form-item>
|
||||
<el-form-item label="开关位状态" prop="switchesSwitches">
|
||||
<el-input v-model="form.switchesSwitches" placeholder="请输入开关位状态" />
|
||||
</el-form-item>
|
||||
<el-form-item label="温度检测数据" prop="temperature">
|
||||
<el-input v-model="form.temperature" placeholder="请输入温度检测数据" />
|
||||
</el-form-item>
|
||||
<el-form-item label="漏电检测数据" prop="leakage">
|
||||
<el-input v-model="form.leakage" placeholder="请输入漏电检测数据" />
|
||||
</el-form-item>
|
||||
<el-form-item label="A相电压" prop="voltageA">
|
||||
<el-input v-model="form.voltageA" placeholder="请输入A相电压" />
|
||||
</el-form-item>
|
||||
<el-form-item label="B相电压" prop="voltageB">
|
||||
<el-input v-model="form.voltageB" placeholder="请输入B相电压" />
|
||||
</el-form-item>
|
||||
<el-form-item label="C相电压" prop="voltageC">
|
||||
<el-input v-model="form.voltageC" placeholder="请输入C相电压" />
|
||||
</el-form-item>
|
||||
<el-form-item label="A相与B相之间的电压" prop="voltageAb">
|
||||
<el-input v-model="form.voltageAb" placeholder="请输入A相与B相之间的电压" />
|
||||
</el-form-item>
|
||||
<el-form-item label="B相与C相之间的电压" prop="voltageBc">
|
||||
<el-input v-model="form.voltageBc" placeholder="请输入B相与C相之间的电压" />
|
||||
</el-form-item>
|
||||
<el-form-item label="C相与A相之间的电压" prop="voltageCa">
|
||||
<el-input v-model="form.voltageCa" placeholder="请输入C相与A相之间的电压" />
|
||||
</el-form-item>
|
||||
<el-form-item label="A相电流" prop="currentA">
|
||||
<el-input v-model="form.currentA" placeholder="请输入A相电流" />
|
||||
</el-form-item>
|
||||
<el-form-item label="B相电流" prop="currentB">
|
||||
<el-input v-model="form.currentB" placeholder="请输入B相电流" />
|
||||
</el-form-item>
|
||||
<el-form-item label="C相电流" prop="currentC">
|
||||
<el-input v-model="form.currentC" placeholder="请输入C相电流" />
|
||||
</el-form-item>
|
||||
<el-form-item label="A相功率" prop="powerA">
|
||||
<el-input v-model="form.powerA" placeholder="请输入A相功率" />
|
||||
</el-form-item>
|
||||
<el-form-item label="B相功率" prop="powerB">
|
||||
<el-input v-model="form.powerB" placeholder="请输入B相功率" />
|
||||
</el-form-item>
|
||||
<el-form-item label="C相功率" prop="powerC">
|
||||
<el-input v-model="form.powerC" placeholder="请输入C相功率" />
|
||||
</el-form-item>
|
||||
<el-form-item label="A相累计能量" prop="energyA">
|
||||
<el-input v-model="form.energyA" placeholder="请输入A相累计能量" />
|
||||
</el-form-item>
|
||||
<el-form-item label="B相累计能量" prop="energyB">
|
||||
<el-input v-model="form.energyB" placeholder="请输入B相累计能量" />
|
||||
</el-form-item>
|
||||
<el-form-item label="C相累计能量" prop="energyC">
|
||||
<el-input v-model="form.energyC" placeholder="请输入C相累计能量" />
|
||||
</el-form-item>
|
||||
<el-form-item label="A相功率因数" prop="factorA">
|
||||
<el-input v-model="form.factorA" placeholder="请输入A相功率因数" />
|
||||
</el-form-item>
|
||||
<el-form-item label="B相功率因数" prop="factorB">
|
||||
<el-input v-model="form.factorB" placeholder="请输入B相功率因数" />
|
||||
</el-form-item>
|
||||
<el-form-item label="C相功率因数" prop="factorC">
|
||||
<el-input v-model="form.factorC" placeholder="请输入C相功率因数" />
|
||||
</el-form-item>
|
||||
<el-form-item label="A相频率" prop="frequencyA">
|
||||
<el-input v-model="form.frequencyA" placeholder="请输入A相频率" />
|
||||
</el-form-item>
|
||||
<el-form-item label="B相频率" prop="frequencyB">
|
||||
<el-input v-model="form.frequencyB" placeholder="请输入B相频率" />
|
||||
</el-form-item>
|
||||
<el-form-item label="C相频率" prop="frequencyC">
|
||||
<el-input v-model="form.frequencyC" placeholder="请输入C相频率" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="IotDatas">
|
||||
import { listIotDatas, getIotDatas, delIotDatas, addIotDatas, updateIotDatas } from "@/api/device/iotDatas";
|
||||
import useUserStore from '@/store/modules/user'
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { iot_factory_type } = proxy.useDict('iot_factory_type');
|
||||
|
||||
const userStore = useUserStore()
|
||||
const iotDatasList = ref([]);
|
||||
const open = ref(false);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const title = ref("");
|
||||
const daterangeCreateTime = ref([]);
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
cfgId: null,
|
||||
pointId: null,
|
||||
comId: null,
|
||||
projectId: null,
|
||||
deviceSn: null,
|
||||
createTime: null
|
||||
},
|
||||
rules: {
|
||||
}
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
/** 查询配电箱数据列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
queryParams.value.params = {};
|
||||
if (null != daterangeCreateTime && '' != daterangeCreateTime) {
|
||||
queryParams.value.params["beginCreateTime"] = daterangeCreateTime.value[0];
|
||||
queryParams.value.params["endCreateTime"] = daterangeCreateTime.value[1];
|
||||
}
|
||||
listIotDatas(queryParams.value).then(response => {
|
||||
iotDatasList.value = response.rows;
|
||||
total.value = response.total;
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
// 取消按钮
|
||||
function cancel() {
|
||||
open.value = false;
|
||||
reset();
|
||||
}
|
||||
|
||||
// 表单重置
|
||||
function reset() {
|
||||
form.value = {
|
||||
id: null,
|
||||
cfgId: null,
|
||||
pointId: null,
|
||||
comId: null,
|
||||
projectId: null,
|
||||
deviceSn: null,
|
||||
switchesAc: null,
|
||||
switchesSwitch: null,
|
||||
switchesSwitches: null,
|
||||
switchesSwitchstatus: null,
|
||||
temperature: null,
|
||||
leakage: null,
|
||||
voltageA: null,
|
||||
voltageB: null,
|
||||
voltageC: null,
|
||||
voltageAb: null,
|
||||
voltageBc: null,
|
||||
voltageCa: null,
|
||||
currentA: null,
|
||||
currentB: null,
|
||||
currentC: null,
|
||||
powerA: null,
|
||||
powerB: null,
|
||||
powerC: null,
|
||||
energyA: null,
|
||||
energyB: null,
|
||||
energyC: null,
|
||||
factorA: null,
|
||||
factorB: null,
|
||||
factorC: null,
|
||||
frequencyA: null,
|
||||
frequencyB: null,
|
||||
frequencyC: null,
|
||||
createTime: null
|
||||
};
|
||||
proxy.resetForm("iotDatasRef");
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 重置按钮操作 */
|
||||
function resetQuery() {
|
||||
daterangeCreateTime.value = [];
|
||||
proxy.resetForm("queryRef");
|
||||
handleQuery();
|
||||
}
|
||||
|
||||
// 多选框选中数据
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map(item => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
/** 新增按钮操作 */
|
||||
function handleAdd() {
|
||||
reset();
|
||||
open.value = true;
|
||||
title.value = "添加配电箱数据";
|
||||
}
|
||||
|
||||
/** 修改按钮操作 */
|
||||
function handleUpdate(row) {
|
||||
reset();
|
||||
const _id = row.id || ids.value
|
||||
getIotDatas(_id).then(response => {
|
||||
form.value = response.data;
|
||||
open.value = true;
|
||||
title.value = "修改配电箱数据";
|
||||
});
|
||||
}
|
||||
|
||||
/** 提交按钮 */
|
||||
function submitForm() {
|
||||
proxy.$refs["iotDatasRef"].validate(valid => {
|
||||
if (valid) {
|
||||
if (form.value.id != null) {
|
||||
updateIotDatas(form.value).then(response => {
|
||||
proxy.$modal.msgSuccess("修改成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
} else {
|
||||
addIotDatas(form.value).then(response => {
|
||||
proxy.$modal.msgSuccess("新增成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/** 删除按钮操作 */
|
||||
function handleDelete(row) {
|
||||
const _ids = row.id || ids.value;
|
||||
proxy.$modal.confirm('是否确认删除配电箱数据编号为"' + _ids + '"的数据项?').then(function() {
|
||||
return delIotDatas(_ids);
|
||||
}).then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
}
|
||||
|
||||
/** 导出按钮操作 */
|
||||
function handleExport() {
|
||||
proxy.download('manage/iotDatas/export', {
|
||||
...queryParams.value
|
||||
}, `iotDatas_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
|
||||
getList();
|
||||
</script>
|
||||
|
|
@ -0,0 +1,295 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="项目名称" prop="projectName" v-if="!userStore.currentPrjId">
|
||||
<el-input
|
||||
v-model="queryParams.projectName"
|
||||
placeholder="请输入项目名称"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="点位主键" prop="pointId">
|
||||
<el-input
|
||||
v-model="queryParams.pointId"
|
||||
placeholder="请输入点位主键"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="公司主键" prop="comId">
|
||||
<el-input
|
||||
v-model="queryParams.comId"
|
||||
placeholder="请输入公司主键"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="项目主键" prop="projectId">
|
||||
<el-input
|
||||
v-model="queryParams.projectId"
|
||||
placeholder="请输入项目主键"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备序列号" prop="deviceSn">
|
||||
<el-input
|
||||
v-model="queryParams.deviceSn"
|
||||
placeholder="请输入设备序列号"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Plus"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['manage:iotWarning:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="Edit"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['manage:iotWarning:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="Delete"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['manage:iotWarning:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="Download"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['manage:iotWarning:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="iotWarningList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="主键" align="center" prop="id" />
|
||||
<el-table-column label="配置主键" align="center" prop="cfgId" />
|
||||
<el-table-column label="点位主键" align="center" prop="pointId" />
|
||||
<el-table-column label="公司主键" align="center" prop="comId" />
|
||||
<el-table-column label="项目主键" align="center" prop="projectId" />
|
||||
<el-table-column label="设备序列号" align="center" prop="deviceSn" />
|
||||
<el-table-column label="预警类型" align="center" prop="warningType" />
|
||||
<el-table-column label="预警内容" align="center" prop="warningContent" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['manage:iotWarning:edit']">修改</el-button>
|
||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['manage:iotWarning:remove']">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNum"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改配电箱预警对话框 -->
|
||||
<el-dialog :title="title" v-model="open" width="500px" append-to-body>
|
||||
<el-form ref="iotWarningRef" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="配置主键" prop="cfgId">
|
||||
<el-input v-model="form.cfgId" placeholder="请输入配置主键" />
|
||||
</el-form-item>
|
||||
<el-form-item label="点位主键" prop="pointId">
|
||||
<el-input v-model="form.pointId" placeholder="请输入点位主键" />
|
||||
</el-form-item>
|
||||
<el-form-item label="公司主键" prop="comId">
|
||||
<el-input v-model="form.comId" placeholder="请输入公司主键" />
|
||||
</el-form-item>
|
||||
<el-form-item label="项目主键" prop="projectId">
|
||||
<el-input v-model="form.projectId" placeholder="请输入项目主键" />
|
||||
</el-form-item>
|
||||
<el-form-item label="设备序列号" prop="deviceSn">
|
||||
<el-input v-model="form.deviceSn" placeholder="请输入设备序列号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="预警内容">
|
||||
<editor v-model="form.warningContent" :min-height="192"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="IotWarning">
|
||||
import { listIotWarning, getIotWarning, delIotWarning, addIotWarning, updateIotWarning } from "@/api/device/iotWarning";
|
||||
import useUserStore from '@/store/modules/user'
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const userStore = useUserStore()
|
||||
const iotWarningList = ref([]);
|
||||
const open = ref(false);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const title = ref("");
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
cfgId: null,
|
||||
pointId: null,
|
||||
comId: null,
|
||||
projectId: null,
|
||||
deviceSn: null,
|
||||
warningType: null,
|
||||
warningContent: null,
|
||||
},
|
||||
rules: {
|
||||
}
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
/** 查询配电箱预警列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
listIotWarning(queryParams.value).then(response => {
|
||||
iotWarningList.value = response.rows;
|
||||
total.value = response.total;
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
// 取消按钮
|
||||
function cancel() {
|
||||
open.value = false;
|
||||
reset();
|
||||
}
|
||||
|
||||
// 表单重置
|
||||
function reset() {
|
||||
form.value = {
|
||||
id: null,
|
||||
cfgId: null,
|
||||
pointId: null,
|
||||
comId: null,
|
||||
projectId: null,
|
||||
deviceSn: null,
|
||||
warningType: null,
|
||||
warningContent: null,
|
||||
createTime: null
|
||||
};
|
||||
proxy.resetForm("iotWarningRef");
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 重置按钮操作 */
|
||||
function resetQuery() {
|
||||
proxy.resetForm("queryRef");
|
||||
handleQuery();
|
||||
}
|
||||
|
||||
// 多选框选中数据
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map(item => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
/** 新增按钮操作 */
|
||||
function handleAdd() {
|
||||
reset();
|
||||
open.value = true;
|
||||
title.value = "添加配电箱预警";
|
||||
}
|
||||
|
||||
/** 修改按钮操作 */
|
||||
function handleUpdate(row) {
|
||||
reset();
|
||||
const _id = row.id || ids.value
|
||||
getIotWarning(_id).then(response => {
|
||||
form.value = response.data;
|
||||
open.value = true;
|
||||
title.value = "修改配电箱预警";
|
||||
});
|
||||
}
|
||||
|
||||
/** 提交按钮 */
|
||||
function submitForm() {
|
||||
proxy.$refs["iotWarningRef"].validate(valid => {
|
||||
if (valid) {
|
||||
if (form.value.id != null) {
|
||||
updateIotWarning(form.value).then(response => {
|
||||
proxy.$modal.msgSuccess("修改成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
} else {
|
||||
addIotWarning(form.value).then(response => {
|
||||
proxy.$modal.msgSuccess("新增成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/** 删除按钮操作 */
|
||||
function handleDelete(row) {
|
||||
const _ids = row.id || ids.value;
|
||||
proxy.$modal.confirm('是否确认删除配电箱预警编号为"' + _ids + '"的数据项?').then(function() {
|
||||
return delIotWarning(_ids);
|
||||
}).then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
}
|
||||
|
||||
/** 导出按钮操作 */
|
||||
function handleExport() {
|
||||
proxy.download('manage/iotWarning/export', {
|
||||
...queryParams.value
|
||||
}, `iotWarning_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
|
||||
getList();
|
||||
</script>
|
||||
|
|
@ -115,7 +115,7 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="视频日期" align="center" prop="videoDate" width="150">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.videoDate, "{y}-{m}-{d}") }}</span>
|
||||
<span>{{ scope.row.videoDate }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="250" class-name="small-padding fixed-width">
|
||||
|
|
@ -164,8 +164,8 @@
|
|||
<el-date-picker
|
||||
clearable
|
||||
v-model="form.videoDate"
|
||||
type="date"
|
||||
value-format="YYYY-MM-DD"
|
||||
type="month"
|
||||
value-format="YYYY-MM"
|
||||
placeholder="请选择视频日期"
|
||||
>
|
||||
</el-date-picker>
|
||||
|
|
|
|||
|
|
@ -1,21 +1,50 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryRef"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="68px"
|
||||
>
|
||||
<el-form-item label="项目名称" prop="projectName" v-if="!userStore.currentPrjId">
|
||||
<el-input v-model="queryParams.projectName" placeholder="请输入项目名称" clearable @keyup.enter="handleQuery" />
|
||||
<el-input
|
||||
v-model="queryParams.projectName"
|
||||
placeholder="请输入项目名称"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="单位名称" prop="subDeptName">
|
||||
<el-input v-model="queryParams.subDeptName" placeholder="请输入参建单位名称" clearable @keyup.enter="handleQuery" />
|
||||
<el-input
|
||||
v-model="queryParams.subDeptName"
|
||||
placeholder="请输入参建单位名称"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="单位类型" prop="subDeptType">
|
||||
<el-select v-model="queryParams.subDeptType" placeholder="请选择参建单位类型" clearable>
|
||||
<el-option v-for="dict in sub_dept_type" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||
<el-select
|
||||
v-model="queryParams.subDeptType"
|
||||
placeholder="请选择参建单位类型"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in sub_dept_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="进场状态" prop="useStatus">
|
||||
<el-select v-model="queryParams.useStatus" placeholder="请选择进场状态" clearable>
|
||||
<el-option v-for="dict in sys_use_status" :key="dict.value" :label="dict.label"
|
||||
:value="dict.value"></el-option>
|
||||
<el-option
|
||||
v-for="dict in sys_use_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
|
|
@ -26,25 +55,58 @@
|
|||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd"
|
||||
v-hasPermi="['manage:proProjectInfoSubdepts:add']">新增</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Plus"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['manage:proProjectInfoSubdepts:add']"
|
||||
>新增</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate"
|
||||
v-hasPermi="['manage:proProjectInfoSubdepts:edit']">修改</el-button>
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="Edit"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['manage:proProjectInfoSubdepts:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete"
|
||||
v-hasPermi="['manage:proProjectInfoSubdepts:remove']">删除</el-button>
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="Delete"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['manage:proProjectInfoSubdepts:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="Download" @click="handleExport"
|
||||
v-hasPermi="['manage:proProjectInfoSubdepts:export']">导出</el-button>
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="Download"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['manage:proProjectInfoSubdepts:export']"
|
||||
>导出</el-button
|
||||
>
|
||||
</el-col>
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
<right-toolbar
|
||||
v-model:showSearch="showSearch"
|
||||
@queryTable="getList"
|
||||
></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="proProjectInfoSubdeptsList" @selection-change="handleSelectionChange">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="proProjectInfoSubdeptsList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="公司名称" align="center" prop="comName" />
|
||||
<el-table-column label="项目名称" align="center" prop="projectName" />
|
||||
|
|
@ -57,7 +119,12 @@
|
|||
<el-table-column label="信用代码" align="center" prop="subDeptCode" />
|
||||
<el-table-column label="入场二维码" align="center" prop="qrCode" width="100">
|
||||
<template #default="scope">
|
||||
<image-preview v-if="scope.row.qrCode" :src="scope.row.qrCode" :width="50" :height="50" />
|
||||
<image-preview
|
||||
v-if="scope.row.qrCode"
|
||||
:src="scope.row.qrCode"
|
||||
:width="50"
|
||||
:height="50"
|
||||
/>
|
||||
<span v-if="!scope.row.qrCode">-</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
@ -68,7 +135,7 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="120">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
|
||||
<span>{{ parseTime(scope.row.createTime, "{y}-{m}-{d}") }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审批状态" align="center" prop="approveStatus" width="100">
|
||||
|
|
@ -76,127 +143,287 @@
|
|||
<dict-tag :options="sys_approve_status" :value="scope.row.approveStatus" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数据状态" align="center" prop="isDel" width="80" v-if="false">
|
||||
<el-table-column
|
||||
label="数据状态"
|
||||
align="center"
|
||||
prop="isDel"
|
||||
width="80"
|
||||
v-if="false"
|
||||
>
|
||||
<template #default="scope">
|
||||
<dict-tag :options="sys_is_del" :value="scope.row.isDel" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="150" align="center" class-name="small-padding fixed-width">
|
||||
<el-table-column
|
||||
label="操作"
|
||||
fixed="right"
|
||||
width="150"
|
||||
align="center"
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['manage:proProjectInfoSubdepts:edit']">修改</el-button>
|
||||
<el-button v-if="scope.row.useStatus == '0'" link type="primary" icon="Setting"
|
||||
@click="handleUseStatus(scope.row)" v-hasPermi="['manage:proProjectInfoSubdepts:edit']">离场</el-button>
|
||||
<el-button v-if="scope.row.useStatus == '1'" link type="primary" icon="Setting"
|
||||
@click="handleUseStatus(scope.row)" v-hasPermi="['manage:proProjectInfoSubdepts:edit']">进场</el-button>
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="Edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['manage:proProjectInfoSubdepts:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
<el-button
|
||||
v-if="scope.row.useStatus == '0'"
|
||||
link
|
||||
type="primary"
|
||||
icon="Setting"
|
||||
@click="handleUseStatus(scope.row)"
|
||||
v-hasPermi="['manage:proProjectInfoSubdepts:edit']"
|
||||
>离场</el-button
|
||||
>
|
||||
<el-button
|
||||
v-if="scope.row.useStatus == '1'"
|
||||
link
|
||||
type="primary"
|
||||
icon="Setting"
|
||||
@click="handleUseStatus(scope.row)"
|
||||
v-hasPermi="['manage:proProjectInfoSubdepts:edit']"
|
||||
>进场</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList" />
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNum"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改分包单位对话框 -->
|
||||
<el-dialog :title="title" v-model="open" width="680px" append-to-body modal-class="SubdeptsDlg">
|
||||
<el-form ref="proProjectInfoSubdeptsRef" :model="form" :rules="rules" label-width="88px">
|
||||
<el-dialog
|
||||
:title="title"
|
||||
v-model="open"
|
||||
width="680px"
|
||||
append-to-body
|
||||
modal-class="SubdeptsDlg"
|
||||
>
|
||||
<el-form
|
||||
ref="proProjectInfoSubdeptsRef"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
label-width="88px"
|
||||
>
|
||||
<el-tabs v-model="activeTabs" type="card" class="demo-tabs">
|
||||
<el-tab-pane label="基本信息" name="base">
|
||||
<el-form-item label="项目名称" v-if="form.projectId">
|
||||
<el-tag effect="plain">{{ form.projectName }}</el-tag>
|
||||
</el-form-item>
|
||||
<el-form-item label="单位类型" prop="subDeptType">
|
||||
<el-select v-model="form.subDeptType" placeholder="请选择单位类型" style="width:100%">
|
||||
<el-option v-for="dict in sub_dept_type" :key="dict.value" :label="dict.label"
|
||||
:value="dict.value"></el-option>
|
||||
<el-select
|
||||
v-model="form.subDeptType"
|
||||
placeholder="请选择单位类型"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in sub_dept_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="单位名称" prop="subDeptName">
|
||||
<el-input v-model="form.subDeptName" placeholder="请输入单位名称" maxlength="64" show-word-limit />
|
||||
<el-input
|
||||
v-model="form.subDeptName"
|
||||
placeholder="请输入单位名称"
|
||||
maxlength="64"
|
||||
show-word-limit
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="信用代码" prop="subDeptCode">
|
||||
<el-input v-model="form.subDeptCode" placeholder="请输入信用代码" maxlength="64" show-word-limit />
|
||||
<el-input
|
||||
v-model="form.subDeptCode"
|
||||
placeholder="请输入信用代码"
|
||||
maxlength="64"
|
||||
show-word-limit
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="进场时间" prop="useDates">
|
||||
<el-date-picker v-model="form.useDates" type="date" placeholder="请选择进场时间" style="width:100%" />
|
||||
<el-date-picker
|
||||
v-model="form.useDates"
|
||||
type="date"
|
||||
placeholder="请选择进场时间"
|
||||
style="width: 100%"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="开工时间" prop="startWorkDates" v-if="form.subDeptType == '4' || form.subDeptType == '5'">
|
||||
<el-date-picker v-model="form.startWorkDates" type="date" placeholder="请选择计划开工时间" style="width:100%" />
|
||||
<el-form-item
|
||||
label="开工时间"
|
||||
prop="startWorkDates"
|
||||
v-if="form.subDeptType == '4' || form.subDeptType == '5'"
|
||||
>
|
||||
<el-date-picker
|
||||
v-model="form.startWorkDates"
|
||||
type="date"
|
||||
placeholder="请选择计划开工时间"
|
||||
style="width: 100%"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="完工时间" prop="endWorkDates" v-if="form.subDeptType == '4' || form.subDeptType == '5'">
|
||||
<el-date-picker v-model="form.endWorkDates" type="date" placeholder="请选择计划完工时间" style="width:100%" />
|
||||
<el-form-item
|
||||
label="完工时间"
|
||||
prop="endWorkDates"
|
||||
v-if="form.subDeptType == '4' || form.subDeptType == '5'"
|
||||
>
|
||||
<el-date-picker
|
||||
v-model="form.endWorkDates"
|
||||
type="date"
|
||||
placeholder="请选择计划完工时间"
|
||||
style="width: 100%"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="进场状态" prop="useStatus">
|
||||
<el-select v-model="form.useStatus" placeholder="请选择进场状态" style="width:100%">
|
||||
<el-option v-for="dict in sys_use_status" :key="dict.value" :label="dict.label"
|
||||
:value="dict.value"></el-option>
|
||||
<el-select
|
||||
v-model="form.useStatus"
|
||||
placeholder="请选择进场状态"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in sys_use_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="承包范围" prop="contractInfos" v-if="form.subDeptType == '4' || form.subDeptType == '5'">
|
||||
<el-input v-model="form.contractInfos" maxlength="2000" show-word-limit type="textarea" rows="4"
|
||||
placeholder="请输入承包范围" />
|
||||
<el-form-item
|
||||
label="承包范围"
|
||||
prop="contractInfos"
|
||||
v-if="form.subDeptType == '4' || form.subDeptType == '5'"
|
||||
>
|
||||
<el-input
|
||||
v-model="form.contractInfos"
|
||||
maxlength="2000"
|
||||
show-word-limit
|
||||
type="textarea"
|
||||
rows="4"
|
||||
placeholder="请输入承包范围"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="单位信息" name="infos">
|
||||
<el-form-item label="经营范围">
|
||||
<el-input v-model="form.subDeptInfos.busScope" maxlength="2000" show-word-limit type="textarea" rows="3"
|
||||
placeholder="请输入经营范围" />
|
||||
<el-input
|
||||
v-model="form.subDeptInfos.busScope"
|
||||
maxlength="2000"
|
||||
show-word-limit
|
||||
type="textarea"
|
||||
rows="3"
|
||||
placeholder="请输入经营范围"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="注册日期">
|
||||
<el-date-picker v-model="form.subDeptInfos.signDate" type="date" placeholder="请选择注册日期"
|
||||
style="width:100%" />
|
||||
<el-date-picker
|
||||
v-model="form.subDeptInfos.signDate"
|
||||
type="date"
|
||||
placeholder="请选择注册日期"
|
||||
style="width: 100%"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="公司地址">
|
||||
<el-input v-model="form.subDeptInfos.address" maxlength="200" show-word-limit type="textarea" rows="2"
|
||||
placeholder="请输入公司地址" />
|
||||
<el-input
|
||||
v-model="form.subDeptInfos.address"
|
||||
maxlength="200"
|
||||
show-word-limit
|
||||
type="textarea"
|
||||
rows="2"
|
||||
placeholder="请输入公司地址"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="营业执照" prop="businessLicensePath">
|
||||
<image-upload v-model="form.businessLicensePath" :limit="1" />
|
||||
</el-form-item>
|
||||
<el-form-item label="企业联系人">
|
||||
<el-input v-model="form.subDeptInfos.person" maxlength="10" show-word-limit placeholder="请输入企业联系人" />
|
||||
<el-input
|
||||
v-model="form.subDeptInfos.person"
|
||||
maxlength="10"
|
||||
show-word-limit
|
||||
placeholder="请输入企业联系人"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="联系人电话">
|
||||
<el-input v-model="form.subDeptInfos.personPhone" maxlength="11" show-word-limit placeholder="请输入联系人电话" />
|
||||
<el-input
|
||||
v-model="form.subDeptInfos.personPhone"
|
||||
maxlength="11"
|
||||
show-word-limit
|
||||
placeholder="请输入联系人电话"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="法定代表人">
|
||||
<el-input v-model="form.subDeptInfos.legalPerson" maxlength="10" show-word-limit placeholder="请输入法定代表人" />
|
||||
<el-input
|
||||
v-model="form.subDeptInfos.legalPerson"
|
||||
maxlength="10"
|
||||
show-word-limit
|
||||
placeholder="请输入法定代表人"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="法人身份证">
|
||||
<el-input v-model="form.subDeptInfos.legalPersonCard" maxlength="18" show-word-limit
|
||||
placeholder="请输入法人身份证" />
|
||||
<el-input
|
||||
v-model="form.subDeptInfos.legalPersonCard"
|
||||
maxlength="18"
|
||||
show-word-limit
|
||||
placeholder="请输入法人身份证"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="获得奖项">
|
||||
<el-input v-model="form.subDeptInfos.awards" maxlength="999" show-word-limit type="textarea" rows="3"
|
||||
placeholder="请输入获得奖项" />
|
||||
<el-input
|
||||
v-model="form.subDeptInfos.awards"
|
||||
maxlength="999"
|
||||
show-word-limit
|
||||
type="textarea"
|
||||
rows="3"
|
||||
placeholder="请输入获得奖项"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="企业评分">
|
||||
<el-input v-model="form.subDeptInfos.mark" maxlength="10" show-word-limit placeholder="请输入企业评分" />
|
||||
<el-input
|
||||
v-model="form.subDeptInfos.mark"
|
||||
maxlength="10"
|
||||
show-word-limit
|
||||
placeholder="请输入企业评分"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-divider content-position="left" class="divider_title">银行卡信息</el-divider>
|
||||
<el-divider content-position="left" class="divider_title"
|
||||
>银行卡信息</el-divider
|
||||
>
|
||||
<el-form-item label="支行名称">
|
||||
<el-input v-model="form.subDeptInfos.bankName" maxlength="32" show-word-limit placeholder="请输入支行名称" />
|
||||
<el-input
|
||||
v-model="form.subDeptInfos.bankName"
|
||||
maxlength="32"
|
||||
show-word-limit
|
||||
placeholder="请输入支行名称"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="银行卡号">
|
||||
<el-input v-model="form.subDeptInfos.bankNumber" maxlength="32" show-word-limit placeholder="请输入银行卡号" />
|
||||
<el-input
|
||||
v-model="form.subDeptInfos.bankNumber"
|
||||
maxlength="32"
|
||||
show-word-limit
|
||||
placeholder="请输入银行卡号"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="委托人信息" name="leader" v-if="form.subDeptType == '4' || form.subDeptType == '5'">
|
||||
<el-tab-pane
|
||||
label="委托人信息"
|
||||
name="leader"
|
||||
v-if="form.subDeptType == '4' || form.subDeptType == '5'"
|
||||
>
|
||||
<el-form-item label="单位委托书" prop="subDeptLeaderPowerPath">
|
||||
<image-upload v-model="form.subDeptLeaderPowerPath" :limit="1" />
|
||||
</el-form-item>
|
||||
<el-form-item label="委托人姓名" prop="subDeptLeaderName">
|
||||
<el-input v-model="form.subDeptLeaderName" placeholder="请输入委托人姓名" maxlength="10" show-word-limit />
|
||||
</el-form-item>
|
||||
<el-form-item label="身份证号码" prop="subDeptLeaderCode">
|
||||
<el-input v-model="form.subDeptLeaderCode" placeholder="请输入委托人身份证号码" maxlength="18" show-word-limit />
|
||||
</el-form-item>
|
||||
<el-form-item label="委托人电话" prop="subDeptLeaderPhone">
|
||||
<el-input v-model="form.subDeptLeaderPhone" placeholder="请输入委托人电话" maxlength="11" show-word-limit />
|
||||
</el-form-item>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="身份证正面">
|
||||
<image-upload v-model="form.leaderUserInfos.cardImgPos" :limit="1" />
|
||||
<image-upload v-model="form.leaderUserInfos.cardImgPos" @change="doImageUpload(1)" :limit="1" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
|
|
@ -209,6 +436,30 @@
|
|||
<image-upload v-model="form.leaderUserPicture" :limit="1" />
|
||||
</el-form-item>
|
||||
</el-tab-pane>
|
||||
<el-form-item label="委托人姓名" prop="subDeptLeaderName">
|
||||
<el-input
|
||||
v-model="form.subDeptLeaderName"
|
||||
placeholder="请输入委托人姓名"
|
||||
maxlength="10"
|
||||
show-word-limit
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="身份证号码" prop="subDeptLeaderCode">
|
||||
<el-input
|
||||
v-model="form.subDeptLeaderCode"
|
||||
placeholder="请输入委托人身份证号码"
|
||||
maxlength="18"
|
||||
show-word-limit
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="委托人电话" prop="subDeptLeaderPhone">
|
||||
<el-input
|
||||
v-model="form.subDeptLeaderPhone"
|
||||
placeholder="请输入委托人电话"
|
||||
maxlength="11"
|
||||
show-word-limit
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-tabs>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
|
|
@ -222,13 +473,25 @@
|
|||
</template>
|
||||
|
||||
<script setup name="ProProjectInfoSubdepts">
|
||||
import { listProProjectInfoSubdepts, getProProjectInfoSubdepts, delProProjectInfoSubdepts, addProProjectInfoSubdepts, updateProProjectInfoSubdepts, editUseStatus } from "@/api/manage/proProjectInfoSubdepts";
|
||||
import useUserStore from '@/store/modules/user'
|
||||
import {
|
||||
listProProjectInfoSubdepts,
|
||||
getProProjectInfoSubdepts,
|
||||
delProProjectInfoSubdepts,
|
||||
addProProjectInfoSubdepts,
|
||||
updateProProjectInfoSubdepts,
|
||||
editUseStatus,
|
||||
} from "@/api/manage/proProjectInfoSubdepts";
|
||||
import useUserStore from "@/store/modules/user";
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { sys_use_status, sub_dept_type, sys_approve_status, sys_is_del } = proxy.useDict('sys_use_status', 'sub_dept_type', 'sys_approve_status', 'sys_is_del');
|
||||
const { sys_use_status, sub_dept_type, sys_approve_status, sys_is_del } = proxy.useDict(
|
||||
"sys_use_status",
|
||||
"sub_dept_type",
|
||||
"sys_approve_status",
|
||||
"sys_is_del"
|
||||
);
|
||||
|
||||
const userStore = useUserStore()
|
||||
const userStore = useUserStore();
|
||||
const proProjectInfoSubdeptsList = ref([]);
|
||||
const open = ref(false);
|
||||
const loading = ref(true);
|
||||
|
|
@ -242,7 +505,7 @@ const activeTabs = ref("base");
|
|||
|
||||
const data = reactive({
|
||||
form: {
|
||||
subDeptInfos: {}
|
||||
subDeptInfos: {},
|
||||
},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
|
|
@ -259,11 +522,15 @@ const data = reactive({
|
|||
subDeptName: [{ required: true, message: "单位名称不能为空", trigger: "blur" }],
|
||||
subDeptCode: [{ required: true, message: "信用代码不能为空", trigger: "blur" }],
|
||||
useDates: [{ required: true, message: "进场时间不能为空", trigger: "change" }],
|
||||
startWorkDates: [{ required: true, message: "计划开工时间不能为空", trigger: "change" }],
|
||||
endWorkDates: [{ required: true, message: "计划完工时间不能为空", trigger: "change" }],
|
||||
startWorkDates: [
|
||||
{ required: true, message: "计划开工时间不能为空", trigger: "change" },
|
||||
],
|
||||
endWorkDates: [
|
||||
{ required: true, message: "计划完工时间不能为空", trigger: "change" },
|
||||
],
|
||||
useStatus: [{ required: true, message: "进场状态不能为空", trigger: "change" }],
|
||||
contractInfos: [{ required: true, message: "合同承包范围不能为空", trigger: "blur" }]
|
||||
}
|
||||
contractInfos: [{ required: true, message: "合同承包范围不能为空", trigger: "blur" }],
|
||||
},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
|
@ -271,7 +538,7 @@ const { queryParams, form, rules } = toRefs(data);
|
|||
/** 查询分包单位列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
listProProjectInfoSubdepts(queryParams.value).then(response => {
|
||||
listProProjectInfoSubdepts(queryParams.value).then((response) => {
|
||||
proProjectInfoSubdeptsList.value = response.rows;
|
||||
total.value = response.total;
|
||||
loading.value = false;
|
||||
|
|
@ -303,7 +570,7 @@ function reset() {
|
|||
subDeptInfos: null,
|
||||
contractInfos: null,
|
||||
useDates: null,
|
||||
useStatus: '1',
|
||||
useStatus: "1",
|
||||
approveStatus: null,
|
||||
qrCode: null,
|
||||
isDel: null,
|
||||
|
|
@ -313,7 +580,7 @@ function reset() {
|
|||
updateTime: null,
|
||||
remark: null,
|
||||
subDeptInfos: {},
|
||||
leaderUserInfos:{}
|
||||
leaderUserInfos: {},
|
||||
};
|
||||
proxy.resetForm("proProjectInfoSubdeptsRef");
|
||||
}
|
||||
|
|
@ -332,7 +599,7 @@ function resetQuery() {
|
|||
|
||||
// 多选框选中数据
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map(item => item.id);
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
|
@ -351,17 +618,49 @@ function handleAdd() {
|
|||
title.value = "添加参建单位";
|
||||
}
|
||||
|
||||
//图片上传
|
||||
function doImageUpload(type) {
|
||||
setTimeout(() => {
|
||||
let url = '';
|
||||
if (type == 1) {
|
||||
url = form.value.leaderUserInfos.cardImgPos;
|
||||
if (url) {
|
||||
url = location.origin + url;
|
||||
proxy.$http.get(`/system/tools/id/front?url=${url}`).then(d => {
|
||||
if(d.code==200 && d.data.name){
|
||||
form.value.subDeptLeaderName = d.data.name || '';
|
||||
form.value.subDeptLeaderCode = d.data.cardId || '';
|
||||
form.value.leaderUserInfos.address = d.data.address || '';
|
||||
form.value.leaderUserInfos.nativePlace = d.data.native || '';
|
||||
form.value.leaderUserInfos.nation = d.data.nation || ''
|
||||
let _birthDay = d.data.birthDay;
|
||||
if (_birthDay && _birthDay.length == 8) {
|
||||
_birthDay = _birthDay.substr(0, 4) + "-" + _birthDay.substr(4, 2) + "-" + _birthDay.substr(6);
|
||||
form.value.leaderUserInfos.birthDay = _birthDay;
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
}, 800);
|
||||
}
|
||||
|
||||
/** 修改按钮操作 */
|
||||
function handleUpdate(row) {
|
||||
reset();
|
||||
const _id = row.id || ids.value
|
||||
getProProjectInfoSubdepts(_id).then(response => {
|
||||
const _id = row.id || ids.value;
|
||||
getProProjectInfoSubdepts(_id).then((response) => {
|
||||
response.data.subDeptInfos = JSON.parse(response.data.subDeptInfos);
|
||||
if(response.data.proProjectInfoSubdeptsUsers){
|
||||
response.data.leaderUserPicture = response.data.proProjectInfoSubdeptsUsers.userPicture;
|
||||
response.data.subDeptLeaderPowerPath = response.data.proProjectInfoSubdeptsUsers.subDeptPowerPath;
|
||||
if(response.data.proProjectInfoSubdeptsUsers.userInfos){
|
||||
response.data.leaderUserInfos = JSON.parse(response.data.proProjectInfoSubdeptsUsers.userInfos);
|
||||
if (response.data.proProjectInfoSubdeptsUsers) {
|
||||
response.data.leaderUserPicture =
|
||||
response.data.proProjectInfoSubdeptsUsers.userPicture;
|
||||
response.data.subDeptLeaderPowerPath =
|
||||
response.data.proProjectInfoSubdeptsUsers.subDeptPowerPath;
|
||||
if (response.data.proProjectInfoSubdeptsUsers.userInfos) {
|
||||
response.data.leaderUserInfos = JSON.parse(
|
||||
response.data.proProjectInfoSubdeptsUsers.userInfos
|
||||
);
|
||||
}
|
||||
}
|
||||
form.value = response.data;
|
||||
|
|
@ -372,19 +671,19 @@ function handleUpdate(row) {
|
|||
|
||||
/** 提交按钮 */
|
||||
function submitForm() {
|
||||
proxy.$refs["proProjectInfoSubdeptsRef"].validate(valid => {
|
||||
proxy.$refs["proProjectInfoSubdeptsRef"].validate((valid) => {
|
||||
if (valid) {
|
||||
form.value.subDeptInfos = JSON.stringify(form.value.subDeptInfos);
|
||||
form.value.leaderUserInfos = JSON.stringify(form.value.leaderUserInfos);
|
||||
if (form.value.id != null) {
|
||||
updateProProjectInfoSubdepts(form.value).then(response => {
|
||||
updateProProjectInfoSubdepts(form.value).then((response) => {
|
||||
proxy.$modal.msgSuccess("修改成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
} else {
|
||||
form.value.approveStatus = 101;
|
||||
addProProjectInfoSubdepts(form.value).then(response => {
|
||||
addProProjectInfoSubdepts(form.value).then((response) => {
|
||||
proxy.$modal.msgSuccess("新增成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
|
|
@ -396,32 +695,44 @@ function submitForm() {
|
|||
|
||||
/** 删除按钮操作 */
|
||||
function handleDelete(row) {
|
||||
const _ids = row.id || ids.value
|
||||
proxy.$modal.confirm('是否确认删除分包单位编号为"' + _ids + '"的数据项?').then(function () {
|
||||
return delProProjectInfoSubdepts(_ids);
|
||||
}).then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => { });
|
||||
const _ids = row.id || ids.value;
|
||||
proxy.$modal
|
||||
.confirm('是否确认删除分包单位编号为"' + _ids + '"的数据项?')
|
||||
.then(function () {
|
||||
return delProProjectInfoSubdepts(_ids);
|
||||
})
|
||||
.then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
|
||||
/** 进场/退场操作 */
|
||||
function handleUseStatus(row) {
|
||||
let state = row.useStatus == '1' ? "2" : "1"
|
||||
let stateMsg = row.useStatus == '1' ? "离场" : "进场";
|
||||
proxy.$modal.confirm('是否确认修改单位状态为"' + stateMsg + '"?').then(function () {
|
||||
return editUseStatus(row.id,state);
|
||||
}).then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess("修改成功");
|
||||
}).catch(() => { });
|
||||
let state = row.useStatus == "1" ? "2" : "1";
|
||||
let stateMsg = row.useStatus == "1" ? "离场" : "进场";
|
||||
proxy.$modal
|
||||
.confirm('是否确认修改单位状态为"' + stateMsg + '"?')
|
||||
.then(function () {
|
||||
return editUseStatus(row.id, state);
|
||||
})
|
||||
.then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess("修改成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
|
||||
/** 导出按钮操作 */
|
||||
function handleExport() {
|
||||
proxy.download('manage/proProjectInfoSubdepts/export', {
|
||||
...queryParams.value
|
||||
}, `proProjectInfoSubdepts_${new Date().getTime()}.xlsx`)
|
||||
proxy.download(
|
||||
"manage/proProjectInfoSubdepts/export",
|
||||
{
|
||||
...queryParams.value,
|
||||
},
|
||||
`proProjectInfoSubdepts_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
}
|
||||
|
||||
getList();
|
||||
|
|
|
|||
Loading…
Reference in New Issue