| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131 |
- <?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.ruoyi.system.mapper.SchemeMapper">
-
- <resultMap type="Scheme" id="SchemeResult">
- <id property="id" column="id"/>
- <result property="schemeId" column="scheme_id"/>
- <result property="schemePmf" column="scheme_pmf"/>
- <result property="combination" column="combination"/>
- <result property="chargingCount" column="charging_count"/>
- <result property="dischargeCount" column="discharge_count"/>
- <result property="directCurrentCount" column="direct_current_count"/>
- <result property="tractionHeadCount" column="traction_head_count"/>
- <result property="productSemiTrailerCount" column="product_semi_trailer_count"/>
- <result property="annualRevenue" column="annual_revenue"/>
- <result property="cycleLife" column="cycle_life"/>
- <result property="totalInvestment" column="total_investment"/>
- <result property="evaluationDimension" column="evaluation_dimension"/>
- <result property="schemeExplorationId" column="scheme_exploration_id"/>
- <result property="createBy" column="create_by"/>
- <result property="createTime" column="create_time"/>
- <result property="updateBy" column="update_by"/>
- <result property="updateTime" column="update_time"/>
- </resultMap>
-
- <sql id="selectSchemeVo">
- select id, scheme_id, name, scheme_pmf, combination, charging_count, discharge_count, direct_current_count,
- traction_head_count, product_semi_trailer_count, annual_revenue, cycle_life, total_investment,
- evaluation_dimension,scheme_exploration_id, create_by, create_time, update_by, update_time
- from scheme
- </sql>
-
- <select id="selectSchemeList" parameterType="Scheme" resultMap="SchemeResult">
- <include refid="selectSchemeVo"/>
- <where>
- <if test="schemeId != null and schemeId != ''">
- AND scheme_id = #{schemeId}
- </if>
- <if test="params.beginTime != null and params.beginTime != ''">
- and date_format(create_time,'%Y%m%d') >= date_format(#{params.beginTime},'%Y%m%d')
- </if>
- <if test="params.endTime != null and params.endTime != ''">
- and date_format(create_time,'%Y%m%d') <= date_format(#{params.endTime},'%Y%m%d')
- </if>
- </where>
- </select>
-
- <select id="selectSchemeById" parameterType="Long" resultMap="SchemeResult">
- <include refid="selectSchemeVo"/>
- where id = #{id}
- </select>
-
- <select id="selectSchemeschemeid" parameterType="String" resultMap="SchemeResult">
- <include refid="selectSchemeVo"/>
- where scheme_id = #{schemeId}
- </select>
-
- <insert id="insertScheme" parameterType="Scheme">
- insert into scheme (
- <if test="schemeId != null and schemeId != ''">scheme_id,</if>
- <if test="name != null and name != ''">name,</if>
- <if test="schemePmf != null">scheme_pmf,</if>
- <if test="combination != null and combination != ''">combination,</if>
- <if test="chargingCount != null">charging_count,</if>
- <if test="dischargeCount != null">discharge_count,</if>
- <if test="directCurrentCount != null">direct_current_count,</if>
- <if test="tractionHeadCount != null">traction_head_count,</if>
- <if test="productSemiTrailerCount != null">product_semi_trailer_count,</if>
- <if test="annualRevenue != null and annualRevenue != ''">annual_revenue,</if>
- <if test="cycleLife != null and cycleLife != ''">cycle_life,</if>
- <if test="totalInvestment != null">total_investment,</if>
- <if test="evaluationDimension != null and evaluationDimension != ''">evaluation_dimension,</if>
- <if test="schemeExplorationId != null and schemeExplorationId != ''">scheme_exploration_id,</if>
- <if test="createBy != null and createBy != ''">create_by,</if>
-
- create_time
- )values(
- <if test="schemeId != null and schemeId != ''">#{schemeId},</if>
- <if test="name != null and name != ''">#{name},</if>
- <if test="schemePmf != null">#{schemePmf},</if>
- <if test="combination != null and combination != ''">#{combination},</if>
- <if test="chargingCount != null">#{chargingCount},</if>
- <if test="dischargeCount != null">#{dischargeCount},</if>
- <if test="directCurrentCount != null">#{directCurrentCount},</if>
- <if test="tractionHeadCount != null">#{tractionHeadCount},</if>
- <if test="productSemiTrailerCount != null">#{productSemiTrailerCount},</if>
- <if test="annualRevenue != null and annualRevenue != ''">#{annualRevenue},</if>
- <if test="cycleLife != null and cycleLife != ''">#{cycleLife},</if>
- <if test="totalInvestment != null">#{totalInvestment},</if>
- <if test="evaluationDimension != null and evaluationDimension != ''">#{evaluationDimension},</if>
- <if test="createBy != null and createBy != ''">#{createBy},</if>
- sysdate()
- )
- </insert>
-
- <update id="updateScheme" parameterType="Scheme">
- update scheme
- <set>
- <if test="schemeId != null and schemeId != ''">scheme_id = #{schemeId},</if>
- <if test="name != null and name != ''">name = #{name},</if>
- <if test="schemePmf != null">scheme_pmf = #{schemePmf},</if>
- <if test="combination != null and combination != ''">combination = #{combination},</if>
- <if test="chargingCount != null">charging_count = #{chargingCount},</if>
- <if test="dischargeCount != null">discharge_count = #{dischargeCount},</if>
- <if test="directCurrentCount != null">direct_current_count = #{directCurrentCount},</if>
- <if test="tractionHeadCount != null">traction_head_count = #{tractionHeadCount},</if>
- <if test="productSemiTrailerCount != null">product_semi_trailer_count = #{productSemiTrailerCount},</if>
- <if test="annualRevenue != null and annualRevenue != ''">annual_revenue = #{annualRevenue},</if>
- <if test="cycleLife != null and cycleLife != ''">cycle_life = #{cycleLife},</if>
- <if test="totalInvestment != null">total_investment = #{totalInvestment},</if>
- <if test="evaluationDimension != null and evaluationDimension != ''">evaluation_dimension = #{evaluationDimension},</if>
- <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
- update_time = sysdate()
- </set>
- where id = #{id}
- </update>
-
- <delete id="deleteSchemeById" parameterType="Long">
- delete from scheme where id = #{id}
- </delete>
-
- <delete id="deleteSchemeByIds" parameterType="Long">
- delete from scheme where id in
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
- </delete>
-
- </mapper>
|