Commit 6e20d9bc authored by KeYong's avatar KeYong

更新

parent d9e7256e
......@@ -96,7 +96,8 @@ public class EquipmentSpecificIndex extends BaseEntity {
@TableField(exist = false)
private String orgCode;
@TableField(exist = false)
@ApiModelProperty(value = "指标类型编码")
@TableField(value = "type_code")
private String typeCode;
@TableField(exist = false)
......
......@@ -1603,6 +1603,7 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
equipmentSpecificIndex.setEmergencyLevelDescribe(index.getEmergencyLevelDescribe());
equipmentSpecificIndex.setUnit(index.getUnit());
equipmentSpecificIndex.setValueEnum(index.getValueEnum());
equipmentSpecificIndex.setTypeCode(index.getTypeCode());
equipmentSpecificIndices.add(equipmentSpecificIndex);
});
}
......
......@@ -791,6 +791,7 @@ public class StockServiceImpl extends ServiceImpl<StockMapper, Stock> implements
equipmentSpecificIndex.setIsAlarm(index.getIsAlarm());
equipmentSpecificIndex.setEmergencyLevel(index.getEmergencyLevel());
equipmentSpecificIndex.setEmergencyLevelDescribe(index.getEmergencyLevelDescribe());
equipmentSpecificIndex.setTypeCode(index.getTypeCode());
return equipmentSpecificIndex;
}).collect(Collectors.toList());
if (!equipmentSpecificIndices.isEmpty()) {
......
......@@ -915,4 +915,17 @@
alter table `wl_equipment_specific_index` add column `gateway_id` varchar(50) COMMENT '网关标识ID';
</sql>
</changeSet>
<changeSet author="keyong" id="1694056741">
<preConditions onFail="MARK_RAN">
<not>
<columnExists tableName="wl_equipment_specific_index" columnName="type_code"/>
</not>
</preConditions>
<comment>新增字段 type_code</comment>
<sql>
alter table `wl_equipment_specific_index` add column `type_code` varchar(50) COMMENT '指标类型编码';
UPDATE wl_equipment_specific_index esi SET esi.type_code = ( SELECT type_code FROM wl_equipment_index wei WHERE esi.equipment_index_id = wei.id );
</sql>
</changeSet>
</databaseChangeLog>
\ No newline at end of file
......@@ -311,7 +311,7 @@
SELECT
temp.id,
temp.name,
temp.nowPressure,
IF(temp.nowPressure = '--', '--', TRUNCATE(ROUND(temp.nowPressure, 2),2)) AS nowPressure,
temp.area,
temp.minPressure AS `minValue`,
temp.maxPressure AS `maxValue`,
......@@ -350,7 +350,7 @@
SELECT
temp.id,
temp.name,
temp.nowFlow,
IF(temp.nowFlow = '--', '--', TRUNCATE(ROUND(temp.nowFlow, 2),2)) AS nowFlow,
temp.area,
temp.minFlow AS `minValue`,
temp.maxFlow AS `maxValue`,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment