|
|
@@ -13,6 +13,7 @@
|
|
|
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
|
|
|
<result column="update_by" property="updateBy" jdbcType="INTEGER"/>
|
|
|
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
|
|
|
+ <result column="err_desc" property="errDesc" jdbcType="VARCHAR"/>
|
|
|
</resultMap>
|
|
|
|
|
|
<select id="selectByCondition" parameterType="com.energy.manage.service.domain.dto.windexceptioncount.WindExceptionCountDto" resultType="com.energy.manage.service.domain.vo.windexceptioncount.WindExceptionCountVo">
|
|
|
@@ -28,7 +29,8 @@
|
|
|
count.create_by,
|
|
|
count.create_time,
|
|
|
count.update_by,
|
|
|
- count.update_time
|
|
|
+ count.update_time,
|
|
|
+ count.err_desc
|
|
|
from
|
|
|
wind_exception_count count
|
|
|
left join analysis_type type
|
|
|
@@ -58,8 +60,8 @@
|
|
|
on batch.batch_code = count.batch_code
|
|
|
left join wind_engine_group engine
|
|
|
on engine.engine_code = count.engine_code
|
|
|
- where
|
|
|
- batch.batch_code in (
|
|
|
+ where count.is_delete = 0
|
|
|
+ and batch.batch_code in (
|
|
|
select distinct
|
|
|
batch_code
|
|
|
from
|
|
|
@@ -94,7 +96,10 @@
|
|
|
create_by,
|
|
|
</if>
|
|
|
<if test="updateBy != null">
|
|
|
- update_by
|
|
|
+ update_by,
|
|
|
+ </if>
|
|
|
+ <if test="errDesc != null and errDesc != ''">
|
|
|
+ err_desc
|
|
|
</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
@@ -117,7 +122,10 @@
|
|
|
#{createBy,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="updateBy != null">
|
|
|
- #{updateBy,jdbcType=INTEGER}
|
|
|
+ #{updateBy,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="errDesc != null and errDesc != ''">
|
|
|
+ #{errDesc,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
@@ -135,7 +143,10 @@
|
|
|
is_delete = #{isDelete,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="updateBy != null">
|
|
|
- update_by = #{updateBy,jdbcType=INTEGER}
|
|
|
+ update_by = #{updateBy,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="errDesc != null and errDesc != ''">
|
|
|
+ err_desc = #{errDesc,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
</set>
|
|
|
where id = #{id,jdbcType=BIGINT}
|
|
|
@@ -157,4 +168,18 @@
|
|
|
group by engine_code
|
|
|
</select>
|
|
|
|
|
|
+ <select id="selectByBatchAndEngine" parameterType="java.lang.String" resultType="com.energy.manage.service.domain.vo.windexceptioncount.WindExceptionDescVo">
|
|
|
+ select count.batch_code,
|
|
|
+ count.engine_code,
|
|
|
+ type.type_name as analysis_type_name,
|
|
|
+ count.err_desc
|
|
|
+ from wind_exception_count count
|
|
|
+ left join analysis_type type
|
|
|
+ on count.analysis_type_code = type.type_code
|
|
|
+ where count.is_delete = 0
|
|
|
+ and count.batch_code = #{batchCode}
|
|
|
+ and count.engine_code = #{engineCode}
|
|
|
+
|
|
|
+ </select>
|
|
|
+
|
|
|
</mapper>
|