| | |
| | | |
| | | import com.hbbohua.water.domain.literal.AttributeNames; |
| | | import com.ooxsoft.ecsi.domain.Unit; |
| | | import com.hbbohua.water.domain.literal.ValueIds; |
| | | import com.hbbohua.water.domain.literal.ValueIdsHex; |
| | | import com.ooxsoft.objekt.domain.Value; |
| | | import com.ooxsoft.platform.domain.UnitOfMeasure; |
| | | import com.ooxsoft.platform.domain.literal.UnitOfMeasureIdsHex; |
| | |
| | | */ |
| | | public class Flowmeter extends Unit { |
| | | /** |
| | | * 获取地图标记的类型 |
| | | * 指定地图标记的类型(点、线、圆、矩形、多边形等) |
| | | * |
| | | * @return 地图标记的类型 |
| | | */ |
| | | @Override |
| | | public Value locationType() { |
| | | return Value.forId(ValueIds.LocationType_marker); |
| | | return Value.forId(ValueIdsHex.LocationType_marker); |
| | | } |
| | | |
| | | /** |
| | |
| | | protected void prePersist() { |
| | | super.prePersist(); |
| | | //默认流量单位 立方米/小时 |
| | | if(getFlowValueUnitOfMeasure() == null){ |
| | | if (getFlowValueUnitOfMeasure() == null) { |
| | | setFlowValueUnitOfMeasure(UnitOfMeasure.forId(UnitOfMeasureIdsHex.MQH)); |
| | | } |
| | | if(getTotalValueUnitOfMeasure() == null){ |
| | | if (getTotalValueUnitOfMeasure() == null) { |
| | | setTotalValueUnitOfMeasure(UnitOfMeasure.forId(UnitOfMeasureIdsHex.MQH)); |
| | | } |
| | | //增加动态属性名,填充实时库标签用 |
| | | if(!containsDynamicAttribute(AttributeNames.currentValue)){ |
| | | setDynamicAttribute(AttributeNames.currentValue,null,true); |
| | | if (!containsDynamicAttribute(AttributeNames.flowValue)) { |
| | | setDynamicAttribute(AttributeNames.flowValue, null, true); |
| | | } |
| | | if(!containsDynamicAttribute(AttributeNames.totalValue)){ |
| | | setDynamicAttribute(AttributeNames.totalValue,null,true); |
| | | if (!containsDynamicAttribute(AttributeNames.totalValue)) { |
| | | setDynamicAttribute(AttributeNames.totalValue, null, true); |
| | | } |
| | | } |
| | | } |