电速宝智配引擎
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

SchemeMapper.xml 7.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.ruoyi.system.mapper.SchemeMapper">
  6. <resultMap type="Scheme" id="SchemeResult">
  7. <id property="id" column="id"/>
  8. <result property="schemeId" column="scheme_id"/>
  9. <result property="schemePmf" column="scheme_pmf"/>
  10. <result property="combination" column="combination"/>
  11. <result property="chargingCount" column="charging_count"/>
  12. <result property="dischargeCount" column="discharge_count"/>
  13. <result property="directCurrentCount" column="direct_current_count"/>
  14. <result property="tractionHeadCount" column="traction_head_count"/>
  15. <result property="productSemiTrailerCount" column="product_semi_trailer_count"/>
  16. <result property="annualRevenue" column="annual_revenue"/>
  17. <result property="cycleLife" column="cycle_life"/>
  18. <result property="totalInvestment" column="total_investment"/>
  19. <result property="evaluationDimension" column="evaluation_dimension"/>
  20. <result property="schemeExplorationId" column="scheme_exploration_id"/>
  21. <result property="createBy" column="create_by"/>
  22. <result property="createTime" column="create_time"/>
  23. <result property="updateBy" column="update_by"/>
  24. <result property="updateTime" column="update_time"/>
  25. </resultMap>
  26. <sql id="selectSchemeVo">
  27. select id, scheme_id, name, scheme_pmf, combination, charging_count, discharge_count, direct_current_count,
  28. traction_head_count, product_semi_trailer_count, annual_revenue, cycle_life, total_investment,
  29. evaluation_dimension,scheme_exploration_id, create_by, create_time, update_by, update_time
  30. from scheme
  31. </sql>
  32. <select id="selectSchemeList" parameterType="Scheme" resultMap="SchemeResult">
  33. <include refid="selectSchemeVo"/>
  34. <where>
  35. <if test="schemeId != null and schemeId != ''">
  36. AND scheme_id = #{schemeId}
  37. </if>
  38. <if test="params.beginTime != null and params.beginTime != ''">
  39. and date_format(create_time,'%Y%m%d') &gt;= date_format(#{params.beginTime},'%Y%m%d')
  40. </if>
  41. <if test="params.endTime != null and params.endTime != ''">
  42. and date_format(create_time,'%Y%m%d') &lt;= date_format(#{params.endTime},'%Y%m%d')
  43. </if>
  44. </where>
  45. </select>
  46. <select id="selectSchemeById" parameterType="Long" resultMap="SchemeResult">
  47. <include refid="selectSchemeVo"/>
  48. where id = #{id}
  49. </select>
  50. <select id="selectSchemeschemeid" parameterType="String" resultMap="SchemeResult">
  51. <include refid="selectSchemeVo"/>
  52. where scheme_id = #{schemeId}
  53. </select>
  54. <insert id="insertScheme" parameterType="Scheme">
  55. insert into scheme (
  56. <if test="schemeId != null and schemeId != ''">scheme_id,</if>
  57. <if test="name != null and name != ''">name,</if>
  58. <if test="schemePmf != null">scheme_pmf,</if>
  59. <if test="combination != null and combination != ''">combination,</if>
  60. <if test="chargingCount != null">charging_count,</if>
  61. <if test="dischargeCount != null">discharge_count,</if>
  62. <if test="directCurrentCount != null">direct_current_count,</if>
  63. <if test="tractionHeadCount != null">traction_head_count,</if>
  64. <if test="productSemiTrailerCount != null">product_semi_trailer_count,</if>
  65. <if test="annualRevenue != null and annualRevenue != ''">annual_revenue,</if>
  66. <if test="cycleLife != null and cycleLife != ''">cycle_life,</if>
  67. <if test="totalInvestment != null">total_investment,</if>
  68. <if test="evaluationDimension != null and evaluationDimension != ''">evaluation_dimension,</if>
  69. <if test="schemeExplorationId != null and schemeExplorationId != ''">scheme_exploration_id,</if>
  70. <if test="createBy != null and createBy != ''">create_by,</if>
  71. create_time
  72. )values(
  73. <if test="schemeId != null and schemeId != ''">#{schemeId},</if>
  74. <if test="name != null and name != ''">#{name},</if>
  75. <if test="schemePmf != null">#{schemePmf},</if>
  76. <if test="combination != null and combination != ''">#{combination},</if>
  77. <if test="chargingCount != null">#{chargingCount},</if>
  78. <if test="dischargeCount != null">#{dischargeCount},</if>
  79. <if test="directCurrentCount != null">#{directCurrentCount},</if>
  80. <if test="tractionHeadCount != null">#{tractionHeadCount},</if>
  81. <if test="productSemiTrailerCount != null">#{productSemiTrailerCount},</if>
  82. <if test="annualRevenue != null and annualRevenue != ''">#{annualRevenue},</if>
  83. <if test="cycleLife != null and cycleLife != ''">#{cycleLife},</if>
  84. <if test="totalInvestment != null">#{totalInvestment},</if>
  85. <if test="evaluationDimension != null and evaluationDimension != ''">#{evaluationDimension},</if>
  86. <if test="createBy != null and createBy != ''">#{createBy},</if>
  87. sysdate()
  88. )
  89. </insert>
  90. <update id="updateScheme" parameterType="Scheme">
  91. update scheme
  92. <set>
  93. <if test="schemeId != null and schemeId != ''">scheme_id = #{schemeId},</if>
  94. <if test="name != null and name != ''">name = #{name},</if>
  95. <if test="schemePmf != null">scheme_pmf = #{schemePmf},</if>
  96. <if test="combination != null and combination != ''">combination = #{combination},</if>
  97. <if test="chargingCount != null">charging_count = #{chargingCount},</if>
  98. <if test="dischargeCount != null">discharge_count = #{dischargeCount},</if>
  99. <if test="directCurrentCount != null">direct_current_count = #{directCurrentCount},</if>
  100. <if test="tractionHeadCount != null">traction_head_count = #{tractionHeadCount},</if>
  101. <if test="productSemiTrailerCount != null">product_semi_trailer_count = #{productSemiTrailerCount},</if>
  102. <if test="annualRevenue != null and annualRevenue != ''">annual_revenue = #{annualRevenue},</if>
  103. <if test="cycleLife != null and cycleLife != ''">cycle_life = #{cycleLife},</if>
  104. <if test="totalInvestment != null">total_investment = #{totalInvestment},</if>
  105. <if test="evaluationDimension != null and evaluationDimension != ''">evaluation_dimension = #{evaluationDimension},</if>
  106. <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
  107. update_time = sysdate()
  108. </set>
  109. where id = #{id}
  110. </update>
  111. <delete id="deleteSchemeById" parameterType="Long">
  112. delete from scheme where id = #{id}
  113. </delete>
  114. <delete id="deleteSchemeByIds" parameterType="Long">
  115. delete from scheme where id in
  116. <foreach item="id" collection="array" open="(" separator="," close=")">
  117. #{id}
  118. </foreach>
  119. </delete>
  120. </mapper>