diff --git a/ruoyi-modules/hw-business/src/main/resources/mapper/business/HwAlarmInfoMapper.xml b/ruoyi-modules/hw-business/src/main/resources/mapper/business/HwAlarmInfoMapper.xml index a1bb1c2..1137e9d 100644 --- a/ruoyi-modules/hw-business/src/main/resources/mapper/business/HwAlarmInfoMapper.xml +++ b/ruoyi-modules/hw-business/src/main/resources/mapper/business/HwAlarmInfoMapper.xml @@ -175,6 +175,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + update hw_alarm_info @@ -247,6 +249,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" left join hw_monitor_unit_type hmut on hmu.monitor_unit_type_id = hmut.monitor_unit_type_id where hai.alarm_time between #{startTime} and #{endTime} + + update hw_alarm_info diff --git a/ruoyi-modules/hw-business/src/main/resources/mapper/business/HwDeviceMapper.xml b/ruoyi-modules/hw-business/src/main/resources/mapper/business/HwDeviceMapper.xml index a1f7f2d..d237899 100644 --- a/ruoyi-modules/hw-business/src/main/resources/mapper/business/HwDeviceMapper.xml +++ b/ruoyi-modules/hw-business/src/main/resources/mapper/business/HwDeviceMapper.xml @@ -446,7 +446,7 @@ select a.device_mode_name,sum(a.sum) sum from (select + select + attribute_id, monitor_unit_id, attribute_name, attribute_value, create_by, create_time, update_by, update_time + from hw_monitor_unit_attribute + where attribute_id = #{attributeId} + + + + + + + + + + + + + insert into hw_monitor_unit_attribute(monitor_unit_id, attribute_name, attribute_value, create_by, create_time, update_by, update_time) + values (#{monitorUnitId}, #{attributeName}, #{attributeValue}, #{createBy}, #{createTime}, #{updateBy}, #{updateTime}) + + + + insert into hw_monitor_unit_attribute(monitor_unit_id, attribute_name, attribute_value, create_by, create_time, update_by, update_time) + values + + (#{entity.monitorUnitId}, #{entity.attributeName}, #{entity.attributeValue}, #{entity.createBy}, #{entity.createTime}, #{entity.updateBy}, #{entity.updateTime}) + + + + + insert into hw_monitor_unit_attribute(monitor_unit_id, attribute_name, attribute_value, create_by, create_time, update_by, update_time) + values + + (#{entity.monitorUnitId}, #{entity.attributeName}, #{entity.attributeValue}, #{entity.createBy}, #{entity.createTime}, #{entity.updateBy}, #{entity.updateTime}) + + on duplicate key update + monitor_unit_id = values(monitor_unit_id), + attribute_name = values(attribute_name), + attribute_value = values(attribute_value), + create_by = values(create_by), + create_time = values(create_time), + update_by = values(update_by), + update_time = values(update_time) + + + + + update hw_monitor_unit_attribute + + + monitor_unit_id = #{monitorUnitId}, + + + attribute_name = #{attributeName}, + + + attribute_value = #{attributeValue}, + + + create_by = #{createBy}, + + + create_time = #{createTime}, + + + update_by = #{updateBy}, + + + update_time = #{updateTime}, + + + where attribute_id = #{attributeId} + + + update hw_monitor_unit_attribute + + + monitor_unit_id = #{monitorUnitId}, + + + attribute_name = #{attributeName}, + + + attribute_value = #{attributeValue}, + + + create_by = #{createBy}, + + + create_time = #{createTime}, + + + update_by = #{updateBy}, + + + update_time = #{updateTime}, + + + where attribute_id = #{attributeId} + + + + + delete from hw_monitor_unit_attribute where attribute_id = #{attributeId} + + + delete from hw_monitor_unit_attribute where attribute_id = #{attributeId} + + + + diff --git a/ruoyi-modules/hw-business/src/main/resources/mapper/business/HwMonitorUnitMapper.xml b/ruoyi-modules/hw-business/src/main/resources/mapper/business/HwMonitorUnitMapper.xml index ef81f04..713f9ea 100644 --- a/ruoyi-modules/hw-business/src/main/resources/mapper/business/HwMonitorUnitMapper.xml +++ b/ruoyi-modules/hw-business/src/main/resources/mapper/business/HwMonitorUnitMapper.xml @@ -239,6 +239,11 @@ #{monitorUnitField}, + + update hw_monitor_unit + set attribute = #{attribute} + where monitor_unit_id = #{monitorUnitId} + update hw_monitor_unit @@ -347,7 +352,7 @@ select * from hw_monitor_unit and monitor_unit_status !=9 - and area_id is not null +-- and area_id is not null and tenant_id=#{tenantId}