AttWiuIntPlDao.xml 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="cn.com.goldenwater.dcproj.dao.AttWiuIntPlDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.AttWiuIntPl" id="attWiuIntPlResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="wiuId" column="WIU_ID"/>
  7. <result property="yrTp" column="YR_TP"/>
  8. <result property="yr" column="YR"/>
  9. <result property="yrWw" column="YR_WW"/>
  10. <result property="janWw" column="JAN_WW"/>
  11. <result property="febWw" column="FEB_WW"/>
  12. <result property="marWw" column="MAR_WW"/>
  13. <result property="aprWw" column="APR_WW"/>
  14. <result property="mayWw" column="MAY_WW"/>
  15. <result property="junWw" column="JUN_WW"/>
  16. <result property="julWw" column="JUL_WW"/>
  17. <result property="augWw" column="AUG_WW"/>
  18. <result property="sepWw" column="SEP_WW"/>
  19. <result property="octWw" column="OCT_WW"/>
  20. <result property="novWw" column="NOV_WW"/>
  21. <result property="decWw" column="DEC_WW"/>
  22. <result property="inTm" column="IN_TM"/>
  23. <result property="upTm" column="UP_TM"/>
  24. </resultMap>
  25. <sql id="table_columns">
  26. ID,
  27. WIU_ID,
  28. YR_TP,
  29. YR,
  30. YR_WW,
  31. JAN_WW,
  32. FEB_WW,
  33. MAR_WW,
  34. APR_WW,
  35. MAY_WW,
  36. JUN_WW,
  37. JUL_WW,
  38. AUG_WW,
  39. SEP_WW,
  40. OCT_WW,
  41. NOV_WW,
  42. DEC_WW,
  43. IN_TM,
  44. UP_TM
  45. </sql>
  46. <sql id="entity_properties">
  47. #{id},
  48. #{wiuId},
  49. #{yrTp},
  50. #{yr},
  51. #{yrWw},
  52. #{janWw},
  53. #{febWw},
  54. #{marWw},
  55. #{aprWw},
  56. #{mayWw},
  57. #{junWw},
  58. #{julWw},
  59. #{augWw},
  60. #{sepWw},
  61. #{octWw},
  62. #{novWw},
  63. #{decWw},
  64. #{inTm},
  65. #{upTm}
  66. </sql>
  67. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  68. <sql id="page_where">
  69. <trim prefix="where" prefixOverrides="and | or ">
  70. <if test="wiuId != null and wiuId != ''">and WIU_ID = #{wiuId}</if>
  71. <if test="yrTp != null and yrTp != ''">and YR_TP = #{yrTp}</if>
  72. <if test="yr != null and yr != ''">and YR = #{yr}</if>
  73. <if test="yrWw != null and yrWw != ''">and YR_WW = #{yrWw}</if>
  74. <if test="janWw != null and janWw != ''">and JAN_WW = #{janWw}</if>
  75. <if test="febWw != null and febWw != ''">and FEB_WW = #{febWw}</if>
  76. <if test="marWw != null and marWw != ''">and MAR_WW = #{marWw}</if>
  77. <if test="aprWw != null and aprWw != ''">and APR_WW = #{aprWw}</if>
  78. <if test="mayWw != null and mayWw != ''">and MAY_WW = #{mayWw}</if>
  79. <if test="junWw != null and junWw != ''">and JUN_WW = #{junWw}</if>
  80. <if test="julWw != null and julWw != ''">and JUL_WW = #{julWw}</if>
  81. <if test="augWw != null and augWw != ''">and AUG_WW = #{augWw}</if>
  82. <if test="sepWw != null and sepWw != ''">and SEP_WW = #{sepWw}</if>
  83. <if test="octWw != null and octWw != ''">and OCT_WW = #{octWw}</if>
  84. <if test="novWw != null and novWw != ''">and NOV_WW = #{novWw}</if>
  85. <if test="decWw != null and decWw != ''">and DEC_WW = #{decWw}</if>
  86. <if test="inTm != null">and IN_TM = #{inTm}</if>
  87. <if test="upTm != null">and UP_TM = #{upTm}</if>
  88. </trim>
  89. </sql>
  90. <select id="get" resultMap="attWiuIntPlResultMap" parameterType="String" >
  91. select <include refid="table_columns" /> from ATT_WIU_INT_PL where ID = #{id}
  92. </select>
  93. <select id="getBy" resultMap="attWiuIntPlResultMap">
  94. select <include refid="table_columns" /> from ATT_WIU_INT_PL <include refid="page_where" />
  95. </select>
  96. <select id="findAll" resultMap="attWiuIntPlResultMap">
  97. select <include refid="table_columns" /> from ATT_WIU_INT_PL
  98. </select>
  99. <select id="findList" resultMap="attWiuIntPlResultMap">
  100. select <include refid="table_columns" /> from ATT_WIU_INT_PL <include refid="page_where" />
  101. </select>
  102. <select id="selectCount" resultType="int" >
  103. select count(ID) from ATT_WIU_INT_PL <include refid="page_where" />
  104. </select>
  105. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.AttWiuIntPl">
  106. insert into ATT_WIU_INT_PL( <include refid="table_columns" /> )
  107. values ( <include refid="entity_properties" /> )
  108. </insert>
  109. <delete id="delete" parameterType="java.lang.String">
  110. delete from ATT_WIU_INT_PL where ID = #{id}
  111. </delete>
  112. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.AttWiuIntPl">
  113. delete from ATT_WIU_INT_PL <include refid="page_where" />
  114. </delete>
  115. <update id="deleteInFlag" parameterType="java.lang.String">
  116. update ATT_WIU_INT_PL set flag_valid = 0 where ID = #{id}
  117. </update>
  118. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.AttWiuIntPl">
  119. update ATT_WIU_INT_PL
  120. <trim prefix="set" suffixOverrides=",">
  121. <if test="wiuId != null and wiuId != ''">WIU_ID = #{wiuId},</if>
  122. <if test="yrTp != null and yrTp != ''">YR_TP = #{yrTp},</if>
  123. <if test="yr != null and yr != ''">YR = #{yr},</if>
  124. <if test="yrWw != null and yrWw != ''">YR_WW = #{yrWw},</if>
  125. <if test="janWw != null and janWw != ''">JAN_WW = #{janWw},</if>
  126. <if test="febWw != null and febWw != ''">FEB_WW = #{febWw},</if>
  127. <if test="marWw != null and marWw != ''">MAR_WW = #{marWw},</if>
  128. <if test="aprWw != null and aprWw != ''">APR_WW = #{aprWw},</if>
  129. <if test="mayWw != null and mayWw != ''">MAY_WW = #{mayWw},</if>
  130. <if test="junWw != null and junWw != ''">JUN_WW = #{junWw},</if>
  131. <if test="julWw != null and julWw != ''">JUL_WW = #{julWw},</if>
  132. <if test="augWw != null and augWw != ''">AUG_WW = #{augWw},</if>
  133. <if test="sepWw != null and sepWw != ''">SEP_WW = #{sepWw},</if>
  134. <if test="octWw != null and octWw != ''">OCT_WW = #{octWw},</if>
  135. <if test="novWw != null and novWw != ''">NOV_WW = #{novWw},</if>
  136. <if test="decWw != null and decWw != ''">DEC_WW = #{decWw},</if>
  137. <if test="inTm != null">IN_TM = #{inTm},</if>
  138. <if test="upTm != null">UP_TM = #{upTm},</if>
  139. </trim>
  140. <where>ID = #{id}</where>
  141. </update>
  142. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.AttWiuIntPl">
  143. update ATT_WIU_INT_PL
  144. <trim prefix="set" suffixOverrides=",">
  145. <if test="wiuId != null and wiuId != ''">WIU_ID = #{wiuId},</if>
  146. <if test="yrTp != null and yrTp != ''">YR_TP = #{yrTp},</if>
  147. <if test="yr != null and yr != ''">YR = #{yr},</if>
  148. <if test="yrWw != null and yrWw != ''">YR_WW = #{yrWw},</if>
  149. <if test="janWw != null and janWw != ''">JAN_WW = #{janWw},</if>
  150. <if test="febWw != null and febWw != ''">FEB_WW = #{febWw},</if>
  151. <if test="marWw != null and marWw != ''">MAR_WW = #{marWw},</if>
  152. <if test="aprWw != null and aprWw != ''">APR_WW = #{aprWw},</if>
  153. <if test="mayWw != null and mayWw != ''">MAY_WW = #{mayWw},</if>
  154. <if test="junWw != null and junWw != ''">JUN_WW = #{junWw},</if>
  155. <if test="julWw != null and julWw != ''">JUL_WW = #{julWw},</if>
  156. <if test="augWw != null and augWw != ''">AUG_WW = #{augWw},</if>
  157. <if test="sepWw != null and sepWw != ''">SEP_WW = #{sepWw},</if>
  158. <if test="octWw != null and octWw != ''">OCT_WW = #{octWw},</if>
  159. <if test="novWw != null and novWw != ''">NOV_WW = #{novWw},</if>
  160. <if test="decWw != null and decWw != ''">DEC_WW = #{decWw},</if>
  161. <if test="inTm != null">IN_TM = #{inTm},</if>
  162. <if test="upTm != null">UP_TM = #{upTm},</if>
  163. </trim>
  164. <include refid="page_where" />
  165. </update>
  166. <!-- 其他自定义SQL -->
  167. </mapper>