BisInspWagaSapRgstrMrsCiDao.xml 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  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.BisInspWagaSapRgstrMrsCiDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspWagaSapRgstrMrsCi" id="bisInspWagaSapRgstrMrsCiResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="rgstrId" column="RGSTR_ID"/>
  7. <result property="compUnit" column="COMP_UNIT"/>
  8. <result property="wmbpIsC" column="WMBP_IS_C"/>
  9. <result property="pssIsH" column="PSS_IS_H"/>
  10. <result property="pssIsC" column="PSS_IS_C"/>
  11. <result property="prftaofcIsH" column="PRFTAOFC_IS_H"/>
  12. <result property="prftaofcInfo" column="PRFTAOFC_INFO"/>
  13. <result property="befpIsFip" column="BEFP_IS_FIP"/>
  14. <result property="pmameIsFip" column="PMAME_IS_FIP"/>
  15. <result property="ebmWmbpIsC" column="EBM_WMBP_IS_C"/>
  16. <result property="ebmIsIacTrotm" column="EBM_IS_IAC_TROTM"/>
  17. <result property="recPersId" column="REC_PERS_ID"/>
  18. <result property="intm" column="INTM"/>
  19. <result property="uptm" column="UPTM"/>
  20. <result property="status" column="STATUS"/>
  21. </resultMap>
  22. <sql id="table_columns">
  23. ID,
  24. RGSTR_ID,
  25. COMP_UNIT,
  26. WMBP_IS_C,
  27. PSS_IS_H,
  28. PSS_IS_C,
  29. PRFTAOFC_IS_H,
  30. PRFTAOFC_INFO,
  31. BEFP_IS_FIP,
  32. PMAME_IS_FIP,
  33. EBM_WMBP_IS_C,
  34. EBM_IS_IAC_TROTM,
  35. REC_PERS_ID,
  36. INTM,
  37. UPTM,
  38. STATUS
  39. </sql>
  40. <sql id="entity_properties">
  41. #{id},
  42. #{rgstrId},
  43. #{compUnit},
  44. #{wmbpIsC},
  45. #{pssIsH},
  46. #{pssIsC},
  47. #{prftaofcIsH},
  48. #{prftaofcInfo},
  49. #{befpIsFip},
  50. #{pmameIsFip},
  51. #{ebmWmbpIsC},
  52. #{ebmIsIacTrotm},
  53. #{recPersId},
  54. #{intm},
  55. #{uptm},
  56. #{status}
  57. </sql>
  58. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  59. <sql id="page_where">
  60. <trim prefix="where" prefixOverrides="and | or ">
  61. <if test="rgstrId != null and rgstrId != ''">and RGSTR_ID = #{rgstrId}</if>
  62. <if test="compUnit != null and compUnit != ''">and COMP_UNIT = #{compUnit}</if>
  63. <if test="wmbpIsC != null and wmbpIsC != ''">and WMBP_IS_C = #{wmbpIsC}</if>
  64. <if test="pssIsH != null and pssIsH != ''">and PSS_IS_H = #{pssIsH}</if>
  65. <if test="pssIsC != null and pssIsC != ''">and PSS_IS_C = #{pssIsC}</if>
  66. <if test="prftaofcIsH != null and prftaofcIsH != ''">and PRFTAOFC_IS_H = #{prftaofcIsH}</if>
  67. <if test="prftaofcInfo != null and prftaofcInfo != ''">and PRFTAOFC_INFO = #{prftaofcInfo}</if>
  68. <if test="befpIsFip != null and befpIsFip != ''">and BEFP_IS_FIP = #{befpIsFip}</if>
  69. <if test="pmameIsFip != null and pmameIsFip != ''">and PMAME_IS_FIP = #{pmameIsFip}</if>
  70. <if test="ebmWmbpIsC != null and ebmWmbpIsC != ''">and EBM_WMBP_IS_C = #{ebmWmbpIsC}</if>
  71. <if test="ebmIsIacTrotm != null and ebmIsIacTrotm != ''">and EBM_IS_IAC_TROTM = #{ebmIsIacTrotm}</if>
  72. <if test="recPersId != null and recPersId != ''">and REC_PERS_ID = #{recPersId}</if>
  73. <if test="intm != null">and INTM = #{intm}</if>
  74. <if test="uptm != null">and UPTM = #{uptm}</if>
  75. <if test="status != null and status != ''">and STATUS = #{status}</if>
  76. </trim>
  77. </sql>
  78. <select id="get" resultMap="bisInspWagaSapRgstrMrsCiResultMap" parameterType="String" >
  79. select <include refid="table_columns" /> from BIS_INSP_WAGA_SAP_RGSTR_MRS_CI where ID = #{id}
  80. </select>
  81. <select id="getBy" resultMap="bisInspWagaSapRgstrMrsCiResultMap">
  82. select <include refid="table_columns" /> from BIS_INSP_WAGA_SAP_RGSTR_MRS_CI <include refid="page_where" />
  83. </select>
  84. <select id="findAll" resultMap="bisInspWagaSapRgstrMrsCiResultMap">
  85. select <include refid="table_columns" /> from BIS_INSP_WAGA_SAP_RGSTR_MRS_CI
  86. </select>
  87. <select id="findList" resultMap="bisInspWagaSapRgstrMrsCiResultMap">
  88. select <include refid="table_columns" /> from BIS_INSP_WAGA_SAP_RGSTR_MRS_CI <include refid="page_where" />
  89. </select>
  90. <select id="selectCount" resultType="int" >
  91. select count(ID) from BIS_INSP_WAGA_SAP_RGSTR_MRS_CI <include refid="page_where" />
  92. </select>
  93. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspWagaSapRgstrMrsCi">
  94. insert into BIS_INSP_WAGA_SAP_RGSTR_MRS_CI( <include refid="table_columns" /> )
  95. values ( <include refid="entity_properties" /> )
  96. </insert>
  97. <delete id="delete" parameterType="java.lang.String">
  98. update BIS_INSP_WAGA_SAP_RGSTR_MRS_CI set DATA_STAT='9' where ID = #{id}
  99. </delete>
  100. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspWagaSapRgstrMrsCi">
  101. update BIS_INSP_WAGA_SAP_RGSTR_MRS_CI set DATA_STAT='9' <include refid="page_where" />
  102. </delete>
  103. <update id="deleteInFlag" parameterType="java.lang.String">
  104. update BIS_INSP_WAGA_SAP_RGSTR_MRS_CI set DATA_STAT = '9' where ID = #{id}
  105. </update>
  106. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspWagaSapRgstrMrsCi">
  107. update BIS_INSP_WAGA_SAP_RGSTR_MRS_CI
  108. <trim prefix="set" suffixOverrides=",">
  109. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  110. <if test="compUnit != null and compUnit != ''">COMP_UNIT = #{compUnit},</if>
  111. <if test="wmbpIsC != null and wmbpIsC != ''">WMBP_IS_C = #{wmbpIsC},</if>
  112. <if test="pssIsH != null and pssIsH != ''">PSS_IS_H = #{pssIsH},</if>
  113. <if test="pssIsC != null and pssIsC != ''">PSS_IS_C = #{pssIsC},</if>
  114. <if test="prftaofcIsH != null and prftaofcIsH != ''">PRFTAOFC_IS_H = #{prftaofcIsH},</if>
  115. <if test="prftaofcInfo != null and prftaofcInfo != ''">PRFTAOFC_INFO = #{prftaofcInfo},</if>
  116. <if test="befpIsFip != null and befpIsFip != ''">BEFP_IS_FIP = #{befpIsFip},</if>
  117. <if test="pmameIsFip != null and pmameIsFip != ''">PMAME_IS_FIP = #{pmameIsFip},</if>
  118. <if test="ebmWmbpIsC != null and ebmWmbpIsC != ''">EBM_WMBP_IS_C = #{ebmWmbpIsC},</if>
  119. <if test="ebmIsIacTrotm != null and ebmIsIacTrotm != ''">EBM_IS_IAC_TROTM = #{ebmIsIacTrotm},</if>
  120. <if test="recPersId != null and recPersId != ''">REC_PERS_ID = #{recPersId},</if>
  121. <if test="intm != null">INTM = #{intm},</if>
  122. <if test="uptm != null">UPTM = #{uptm},</if>
  123. <if test="status != null and status != ''">STATUS = #{status},</if>
  124. </trim>
  125. <where>ID = #{id}</where>
  126. </update>
  127. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspWagaSapRgstrMrsCi">
  128. update BIS_INSP_WAGA_SAP_RGSTR_MRS_CI
  129. <trim prefix="set" suffixOverrides=",">
  130. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  131. <if test="compUnit != null and compUnit != ''">COMP_UNIT = #{compUnit},</if>
  132. <if test="wmbpIsC != null and wmbpIsC != ''">WMBP_IS_C = #{wmbpIsC},</if>
  133. <if test="pssIsH != null and pssIsH != ''">PSS_IS_H = #{pssIsH},</if>
  134. <if test="pssIsC != null and pssIsC != ''">PSS_IS_C = #{pssIsC},</if>
  135. <if test="prftaofcIsH != null and prftaofcIsH != ''">PRFTAOFC_IS_H = #{prftaofcIsH},</if>
  136. <if test="prftaofcInfo != null and prftaofcInfo != ''">PRFTAOFC_INFO = #{prftaofcInfo},</if>
  137. <if test="befpIsFip != null and befpIsFip != ''">BEFP_IS_FIP = #{befpIsFip},</if>
  138. <if test="pmameIsFip != null and pmameIsFip != ''">PMAME_IS_FIP = #{pmameIsFip},</if>
  139. <if test="ebmWmbpIsC != null and ebmWmbpIsC != ''">EBM_WMBP_IS_C = #{ebmWmbpIsC},</if>
  140. <if test="ebmIsIacTrotm != null and ebmIsIacTrotm != ''">EBM_IS_IAC_TROTM = #{ebmIsIacTrotm},</if>
  141. <if test="recPersId != null and recPersId != ''">REC_PERS_ID = #{recPersId},</if>
  142. <if test="intm != null">INTM = #{intm},</if>
  143. <if test="uptm != null">UPTM = #{uptm},</if>
  144. <if test="status != null and status != ''">STATUS = #{status},</if>
  145. </trim>
  146. <include refid="page_where" />
  147. </update>
  148. <!-- 其他自定义SQL -->
  149. <delete id="deleteByRgstrId">
  150. delete from BIS_INSP_WAGA_SAP_RGSTR_MRS_CI where RGSTR_ID = #{rgstrId}
  151. </delete>
  152. <select id="getWagaSapRgstrMrsCiInfoByRgstrId" resultMap="bisInspWagaSapRgstrMrsCiResultMap">
  153. select
  154. <include refid="table_columns"/>
  155. from BIS_INSP_WAGA_SAP_RGSTR_MRS_CI where RGSTR_ID = #{rgstrId}
  156. </select>
  157. </mapper>