2 Commits b5af5e5833 ... b6ca49522d

Author SHA1 Message Date
  wanghs b6ca49522d Merge remote-tracking branch 'origin/master' 2 years ago
  wanghs 29f771338f 规避pgsql bool类型问题 2 years ago

+ 19 - 5
warning-web/src/main/resources/mappers-postgresql/Alertrule2Mapper.xml

@@ -25,14 +25,14 @@
         <result column="taskstart" property="taskstart"/>
         <result column="taskstart" property="taskstart"/>
         <result column="relatedParts" property="relatedParts"/>
         <result column="relatedParts" property="relatedParts"/>
     </resultMap>
     </resultMap>
-    <resultMap type="Alertrule2" id="Alertrule2Result">
+    <resultMap type="com.gyee.wisdom.alarm.sharding.entity.Alertrule2" id="Alertrule2Result">
         <result property="id" column="id"/>
         <result property="id" column="id"/>
         <result property="name" column="name"/>
         <result property="name" column="name"/>
         <result property="station" column="station"/>
         <result property="station" column="station"/>
         <result property="relatedParts" column="relatedParts"/>
         <result property="relatedParts" column="relatedParts"/>
-        <association property="windPowerStation" column="station" javaType="WindPowerStation"
+        <association property="windPowerStation" column="station" javaType="com.gyee.wisdom.alarm.sharding.entity.WindPowerStation"
                      select="com.gyee.wisdom.alarm.sharding.mapper.WindPowerStationMapper.selectByid"/>
                      select="com.gyee.wisdom.alarm.sharding.mapper.WindPowerStationMapper.selectByid"/>
-        <association property="datadictionary" column="relatedParts" javaType="Datadictionary"
+        <association property="datadictionary" column="relatedParts" javaType="com.gyee.wisdom.alarm.sharding.entity.Datadictionary"
                      select="com.gyee.wisdom.alarm.sharding.mapper.DatadictionaryMapper.selectBycode"/>
                      select="com.gyee.wisdom.alarm.sharding.mapper.DatadictionaryMapper.selectBycode"/>
     </resultMap>
     </resultMap>
 
 
@@ -55,9 +55,9 @@
         <result property="electrical" column="electrical"/>
         <result property="electrical" column="electrical"/>
         <result property="taskstart" column="taskstart"/>
         <result property="taskstart" column="taskstart"/>
         <result property="relatedParts" column="relatedParts"/>
         <result property="relatedParts" column="relatedParts"/>
-        <association property="windPowerStation" column="station" javaType="WindPowerStation"
+        <association property="windPowerStation" column="station" javaType="com.gyee.wisdom.alarm.sharding.entity.WindPowerStation"
                      select="com.gyee.wisdom.alarm.sharding.mapper.WindPowerStationMapper.selectByid"/>
                      select="com.gyee.wisdom.alarm.sharding.mapper.WindPowerStationMapper.selectByid"/>
-        <association property="datadictionary" column="relatedParts" javaType="Datadictionary"
+        <association property="datadictionary" column="relatedParts" javaType="com.gyee.wisdom.alarm.sharding.entity.Datadictionary"
                      select="com.gyee.wisdom.alarm.sharding.mapper.DatadictionaryMapper.selectBycode"/>
                      select="com.gyee.wisdom.alarm.sharding.mapper.DatadictionaryMapper.selectBycode"/>
     </resultMap>
     </resultMap>
 
 
@@ -96,6 +96,20 @@
 
 
     </select>
     </select>
 
 
+    <select id="getAllByStationIdAndModelId2" parameterType="java.util.Map"
+            resultMap="alertRule2ResultToPostgreSql">
+        select a.*, (case a.enabled   WHEN 't' then 1  when 'f' then 0  else 0 end) as specialenable from  ALERTRULE2 a
+        <where>
+            1=1
+            <if test="station !=null and station !=''">
+                and a.station = #{station}
+            </if>
+            <if test="modelid !=null and modelid !=''">
+                and a.modelid = #{modelid}
+            </if>
+        </where>
+    </select>
+
     <select id="getMaxEdnaValue" parameterType="java.util.Map" resultType="java.lang.Integer">
     <select id="getMaxEdnaValue" parameterType="java.util.Map" resultType="java.lang.Integer">
         select max(a.ednavalue) from ALERTRULE2 a
         select max(a.ednavalue) from ALERTRULE2 a
     </select>
     </select>