|
|
@@ -0,0 +1,59 @@
|
|
|
+<?xml version="1.0" encoding="UTF-8"?>
|
|
|
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
+
|
|
|
+<mapper namespace="com.energy.manage.service.mappers.analysis.AnalysisResultReportMapper">
|
|
|
+ <resultMap id="BaseResultMap" type="com.energy.manage.common.po.analysis.AnalysisResultReportPo">
|
|
|
+ <id column="id" property="id" jdbcType="BIGINT"/>
|
|
|
+ <result column="batch_code" property="batchCode" jdbcType="VARCHAR"/>
|
|
|
+ <result column="report_name" property="reportName" jdbcType="VARCHAR"/>
|
|
|
+ <result column="report_type" property="reportType" jdbcType="INTEGER"/>
|
|
|
+ <result column="report_addr" property="reportAddr" jdbcType="VARCHAR"/>
|
|
|
+ <result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
|
|
|
+ <result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <insert id="saveReportBatch" parameterType="com.energy.manage.service.domain.dto.analysis.AnalysisOptionRecordsDto">
|
|
|
+ insert into analysis_result_report
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="batchCode != null">
|
|
|
+ batch_code,
|
|
|
+ </if>
|
|
|
+ <if test="reportName != null and reportName != ''">
|
|
|
+ report_name,
|
|
|
+ </if>
|
|
|
+ <if test="reportType != null">
|
|
|
+ report_type,
|
|
|
+ </if>
|
|
|
+ <if test="reportAddr != null and reportAddr != ''">
|
|
|
+ report_addr
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values">
|
|
|
+ <foreach collection="list" item="record" separator=",">
|
|
|
+ (
|
|
|
+ <if test="batchCode != null">
|
|
|
+ #{record.batchCode,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="reportName != null and reportName != ''">
|
|
|
+ #{record.reportName,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="reportType != null">
|
|
|
+ #{record.reportType,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="reportAddr != null and reportAddr != ''">
|
|
|
+ #{record.reportAddr,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ )
|
|
|
+ </foreach>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <select id="selectByBatchCode" parameterType="string" resultType="com.energy.manage.service.domain.vo.analysis.AnalysisResultReportVo">
|
|
|
+ select batch_code,
|
|
|
+ report_name,
|
|
|
+ report_type,
|
|
|
+ report_addr
|
|
|
+ from analysis_result_report
|
|
|
+ where batch_code = #{batchCode,jdbcType=VARCHAR}
|
|
|
+ </select>
|
|
|
+</mapper>
|