BisInspStndPlrdDao.xml 7.7 KB

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