能源管理的实时曲线的接口切换表

master
马雪伟 1 day ago
parent f140892bd9
commit 6e029826e4

@ -4,6 +4,7 @@ import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.hw.common.core.annotation.Excel;
@ -15,6 +16,7 @@ import com.hw.common.core.web.domain.BaseEntity;
* @author sf
* @date 2023-04-23
*/
@Data
public class BaseMonitorInfo extends BaseEntity
{
private static final long serialVersionUID = 1L;
@ -31,6 +33,7 @@ public class BaseMonitorInfo extends BaseEntity
@Excel(name = "计量设备编号")
private String monitorId;
private String monitorCode;
/** 计量设备名称 */
@Excel(name = "计量设备名称")
private String monitorName;
@ -134,6 +137,8 @@ public class BaseMonitorInfo extends BaseEntity
@Excel(name = "计量设备状态")
private Long monitorStatus;
private String feeType;
/** 子部门 */
private List<BaseMonitorInfo> children = new ArrayList<BaseMonitorInfo>();

@ -24,6 +24,7 @@ public class EmsBaseMonitorInfo extends BaseEntity
/** 计量设备编号 */
@Excel(name = "计量设备编号")
private String monitorCode;
private String monitorId;
/** 计量设备名称 */
@Excel(name = "计量设备名称")
@ -96,6 +97,13 @@ public class EmsBaseMonitorInfo extends BaseEntity
private String ancestors;
private List<Long> monitorTypeList;
public String getMonitorId() {
return monitorId;
}
public void setMonitorId(String monitorId) {
this.monitorId = monitorId;
}
public List<Long> getMonitorTypeList() {
return monitorTypeList;

@ -28,6 +28,7 @@ public interface EmsBaseMonitorInfoMapper
* @return
*/
public List<EmsBaseMonitorInfo> selectEmsBaseMonitorInfoList(EmsBaseMonitorInfo emsBaseMonitorInfo);
public List<EmsBaseMonitorInfo> selectEmsBaseMonitorInfoList1(EmsBaseMonitorInfo emsBaseMonitorInfo);
/**
*

@ -49,6 +49,10 @@ public class EmsBaseMonitorInfoServiceImpl implements IEmsBaseMonitorInfoService
{
return emsBaseMonitorInfoMapper.selectEmsBaseMonitorInfoList(emsBaseMonitorInfo);
}
public List<EmsBaseMonitorInfo> selectEmsBaseMonitorInfoList1(EmsBaseMonitorInfo emsBaseMonitorInfo)
{
return emsBaseMonitorInfoMapper.selectEmsBaseMonitorInfoList1(emsBaseMonitorInfo);
}
/**
*
@ -115,7 +119,7 @@ public class EmsBaseMonitorInfoServiceImpl implements IEmsBaseMonitorInfoService
* */
@Override
public List<TreeSelects> selectBaseMonitorInfoTreeList(EmsBaseMonitorInfo baseMonitorInfo) {
List<EmsBaseMonitorInfo> baseMonitorInfos = selectEmsBaseMonitorInfoList(baseMonitorInfo);
List<EmsBaseMonitorInfo> baseMonitorInfos = selectEmsBaseMonitorInfoList1(baseMonitorInfo);
return buildMonitorInfoTreeSelect(baseMonitorInfos);
}

@ -46,7 +46,7 @@
<select id="selectEmsBaseEnergyNameByEnergyTypeId">
select energy_name
from ems_base_energy_type
from base_energy_type
where energy_type_id = #{energyTypeId}
</select>

@ -67,6 +67,39 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="monitorHierarchy != null "> and monitor_hierarchy = #{monitorHierarchy}</if>
</where>
</select>
<select id="selectEmsBaseMonitorInfoList1" parameterType="EmsBaseMonitorInfo" resultMap="EmsBaseMonitorInfoResult">
select objId obj_id, parent_id, monitor_id monitor_code, monitor_name, monitor_addr, monitor_type, monitor_status, collect_device_id, ancestors, grade, meter_type_id, correct_value, pt, ct, is_ammeter, is_key_monitor, is_circuit, create_by, create_time, update_by, update_time, public_share_type, monitor_hierarchy from base_monitor_info
<where>
<if test="parentId != null "> and parent_id = #{parentId}</if>
<if test="monitorId != null and monitorId != ''"> and monitor_id = #{monitorId}</if>
<if test="monitorName != null and monitorName != ''"> and monitor_name like concat('%', #{monitorName}, '%')</if>
<if test="monitorTypeList != null and monitorTypeList.size > 0">
and monitor_type IN
<foreach item="monitorId" collection="monitorTypeList" open="(" separator="," close=")">
#{monitorId}
</foreach>
</if>
<if test="monitorAddr != null and monitorAddr != ''"> and monitor_addr = #{monitorAddr}</if>
<if test="monitorType != null "> and monitor_type = #{monitorType}</if>
<if test="monitorStatus != null "> and monitor_status = #{monitorStatus}</if>
<if test="collectDeviceId != null and collectDeviceId != ''"> and collect_device_id = #{collectDeviceId}</if>
<if test="ancestors != null and ancestors != ''"> and ancestors = #{ancestors}</if>
<if test="grade != null "> and grade = #{grade}</if>
<if test="meterTypeId != null and meterTypeId != ''"> and meter_type_id = #{meterTypeId}</if>
<if test="correctValue != null "> and correct_value = #{correctValue}</if>
<if test="pt != null "> and pt = #{pt}</if>
<if test="ct != null "> and ct = #{ct}</if>
<if test="isAmmeter != null and isAmmeter != ''"> and is_ammeter = #{isAmmeter}</if>
<if test="isKeyMonitor != null "> and is_key_monitor = #{isKeyMonitor}</if>
<if test="isCircuit != null "> and is_circuit = #{isCircuit}</if>
<if test="createBy != null and createBy != ''"> and create_by = #{createBy}</if>
<if test="createTime != null "> and create_time = #{createTime}</if>
<if test="updateBy != null and updateBy != ''"> and update_by = #{updateBy}</if>
<if test="updateTime != null "> and update_time = #{updateTime}</if>
<if test="publicShareType != null "> and public_share_type = #{publicShareType}</if>
<if test="monitorHierarchy != null "> and monitor_hierarchy = #{monitorHierarchy}</if>
</where>
</select>
<select id="selectEmsBaseMonitorInfoByObjId" parameterType="Long" resultMap="EmsBaseMonitorInfoResult">
<include refid="selectEmsBaseMonitorInfoVo"/>
@ -75,8 +108,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectEmsBaseMonitorTypeByMonitorCode" parameterType="String">
select monitor_type
from ems_base_monitor_info
where monitor_code = #{monitorType}
from base_monitor_info
where monitor_id = #{monitorType}
</select>

@ -41,7 +41,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-- twtd.confirmFlag,
ebmi.monitor_name
from record_iotenv_instant twtd
left join ems_base_monitor_info ebmi on twtd.monitorId = ebmi.monitor_code
left join base_monitor_info ebmi on twtd.monitorId = ebmi.monitor_id
</sql>
<select id="selectTWTempertureDataList" parameterType="TWTempertureData" resultMap="TWTempertureDataResult">

Loading…
Cancel
Save