BisInspSvwtWuntRgstrWuuswDao.xml 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  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.BisInspSvwtWuntRgstrWuuswDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspSvwtWuntRgstrWuusw" id="bisInspSvwtWuntRgstrWuuswResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="rgstrId" column="RGSTR_ID"/>
  7. <result property="relUseWw" column="REL_USE_WW"/>
  8. <result property="mainPrdNum" column="MAIN_PRD_NUM"/>
  9. <result property="mainPrdUt" column="MAIN_PRD_UT"/>
  10. <result property="wtDuty" column="WT_DUTY"/>
  11. <result property="wtDutyUt" column="WT_DUTY_UT"/>
  12. <result property="isDutyWs" column="IS_DUTY_WS"/>
  13. <result property="isPlWs" column="IS_PL_WS"/>
  14. <result property="planUseWw" column="PLAN_USE_WW"/>
  15. <result property="isOvPlanUseWw" column="IS_OV_PLAN_USE_WW"/>
  16. <result property="isRpPlanUseWw" column="IS_RP_PLAN_USE_WW"/>
  17. <result property="isIomf" column="IS_IOMF"/>
  18. <result property="isIomfRun" column="IS_IOMF_RUN"/>
  19. <result property="isEapOrswu" column="IS_EAP_ORSWU"/>
  20. <result property="persId" column="PERS_ID"/>
  21. <result property="inTm" column="IN_TM"/>
  22. <result property="upTm" column="UP_TM"/>
  23. <result property="dataStat" column="DATA_STAT"/>
  24. <result property="wtDutyUtOth" column="WT_DUTY_UT_OTH"/>
  25. <result property="mainPrdUtOth" column="MAIN_PRD_UT_OTH"/>
  26. </resultMap>
  27. <sql id="table_columns">
  28. ID,
  29. RGSTR_ID,
  30. REL_USE_WW,
  31. MAIN_PRD_NUM,
  32. MAIN_PRD_UT,
  33. WT_DUTY,
  34. WT_DUTY_UT,
  35. IS_DUTY_WS,
  36. IS_PL_WS,
  37. PLAN_USE_WW,
  38. IS_OV_PLAN_USE_WW,
  39. IS_RP_PLAN_USE_WW,
  40. IS_IOMF,
  41. IS_IOMF_RUN,
  42. IS_EAP_ORSWU,
  43. PERS_ID,
  44. IN_TM,
  45. UP_TM,
  46. DATA_STAT,
  47. WT_DUTY_UT_OTH,
  48. MAIN_PRD_UT_OTH
  49. </sql>
  50. <sql id="entity_properties">
  51. #{id},
  52. #{rgstrId},
  53. #{relUseWw},
  54. #{mainPrdNum},
  55. #{mainPrdUt},
  56. #{wtDuty},
  57. #{wtDutyUt},
  58. #{isDutyWs},
  59. #{isPlWs},
  60. #{planUseWw},
  61. #{isOvPlanUseWw},
  62. #{isRpPlanUseWw},
  63. #{isIomf},
  64. #{isIomfRun},
  65. #{isEapOrswu},
  66. #{persId},
  67. #{inTm},
  68. #{upTm},
  69. #{dataStat},
  70. #{wtDutyUtOth},
  71. #{mainPrdUtOth}
  72. </sql>
  73. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  74. <sql id="page_where">
  75. <trim prefix="where" prefixOverrides="and | or ">
  76. <if test="rgstrId != null and rgstrId != ''">and RGSTR_ID = #{rgstrId}</if>
  77. <if test="relUseWw != null and relUseWw != ''">and REL_USE_WW = #{relUseWw}</if>
  78. <if test="mainPrdNum != null and mainPrdNum != ''">and MAIN_PRD_NUM = #{mainPrdNum}</if>
  79. <if test="mainPrdUt != null and mainPrdUt != ''">and MAIN_PRD_UT = #{mainPrdUt}</if>
  80. <if test="wtDuty != null and wtDuty != ''">and WT_DUTY = #{wtDuty}</if>
  81. <if test="wtDutyUt != null and wtDutyUt != ''">and WT_DUTY_UT = #{wtDutyUt}</if>
  82. <if test="isDutyWs != null and isDutyWs != ''">and IS_DUTY_WS = #{isDutyWs}</if>
  83. <if test="isPlWs != null and isPlWs != ''">and IS_PL_WS = #{isPlWs}</if>
  84. <if test="planUseWw != null and planUseWw != ''">and PLAN_USE_WW = #{planUseWw}</if>
  85. <if test="isOvPlanUseWw != null and isOvPlanUseWw != ''">and IS_OV_PLAN_USE_WW = #{isOvPlanUseWw}</if>
  86. <if test="isRpPlanUseWw != null and isRpPlanUseWw != ''">and IS_RP_PLAN_USE_WW = #{isRpPlanUseWw}</if>
  87. <if test="isIomf != null and isIomf != ''">and IS_IOMF = #{isIomf}</if>
  88. <if test="isIomfRun != null and isIomfRun != ''">and IS_IOMF_RUN = #{isIomfRun}</if>
  89. <if test="isEapOrswu != null and isEapOrswu != ''">and IS_EAP_ORSWU = #{isEapOrswu}</if>
  90. <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
  91. <if test="inTm != null">and IN_TM = #{inTm}</if>
  92. <if test="upTm != null">and UP_TM = #{upTm}</if>
  93. <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
  94. <if test="wtDutyUtOth != null and wtDutyUtOth != ''">and WT_DUTY_UT_OTH = #{wtDutyUtOth}</if>
  95. <if test="mainPrdUtOth != null and mainPrdUtOth != ''">and MAIN_PRD_UT_OTH = #{mainPrdUtOth}</if>
  96. </trim>
  97. </sql>
  98. <select id="get" resultMap="bisInspSvwtWuntRgstrWuuswResultMap" parameterType="String" >
  99. select <include refid="table_columns" /> from BIS_INSP_SVWT_WUNT_RGSTR_WUUSW where ID = #{id}
  100. </select>
  101. <select id="getBy" resultMap="bisInspSvwtWuntRgstrWuuswResultMap">
  102. select <include refid="table_columns" /> from BIS_INSP_SVWT_WUNT_RGSTR_WUUSW <include refid="page_where" />
  103. </select>
  104. <select id="findAll" resultMap="bisInspSvwtWuntRgstrWuuswResultMap">
  105. select <include refid="table_columns" /> from BIS_INSP_SVWT_WUNT_RGSTR_WUUSW
  106. </select>
  107. <select id="findList" resultMap="bisInspSvwtWuntRgstrWuuswResultMap">
  108. select <include refid="table_columns" /> from BIS_INSP_SVWT_WUNT_RGSTR_WUUSW <include refid="page_where" />
  109. </select>
  110. <select id="selectCount" resultType="int" >
  111. select count(ID) from BIS_INSP_SVWT_WUNT_RGSTR_WUUSW <include refid="page_where" />
  112. </select>
  113. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspSvwtWuntRgstrWuusw">
  114. insert into BIS_INSP_SVWT_WUNT_RGSTR_WUUSW( <include refid="table_columns" /> )
  115. values ( <include refid="entity_properties" /> )
  116. </insert>
  117. <delete id="delete" parameterType="java.lang.String">
  118. delete from BIS_INSP_SVWT_WUNT_RGSTR_WUUSW where ID = #{id}
  119. </delete>
  120. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspSvwtWuntRgstrWuusw">
  121. delete from BIS_INSP_SVWT_WUNT_RGSTR_WUUSW <include refid="page_where" />
  122. </delete>
  123. <update id="deleteInFlag" parameterType="java.lang.String">
  124. update BIS_INSP_SVWT_WUNT_RGSTR_WUUSW set flag_valid = 0 where ID = #{id}
  125. </update>
  126. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspSvwtWuntRgstrWuusw">
  127. update BIS_INSP_SVWT_WUNT_RGSTR_WUUSW
  128. <trim prefix="set" suffixOverrides=",">
  129. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  130. <if test="relUseWw != null">REL_USE_WW = #{relUseWw},</if>
  131. <if test="mainPrdNum != null">MAIN_PRD_NUM = #{mainPrdNum},</if>
  132. <if test="mainPrdUt != null">MAIN_PRD_UT = #{mainPrdUt},</if>
  133. <if test="wtDuty != null">WT_DUTY = #{wtDuty},</if>
  134. <if test="wtDutyUt != null and wtDutyUt != ''">WT_DUTY_UT = #{wtDutyUt},</if>
  135. <if test="isDutyWs != null and isDutyWs != ''">IS_DUTY_WS = #{isDutyWs},</if>
  136. <if test="isPlWs != null and isPlWs != ''">IS_PL_WS = #{isPlWs},</if>
  137. <if test="planUseWw != null">PLAN_USE_WW = #{planUseWw},</if>
  138. <if test="isOvPlanUseWw != null and isOvPlanUseWw != ''">IS_OV_PLAN_USE_WW = #{isOvPlanUseWw},</if>
  139. <if test="isRpPlanUseWw != null and isRpPlanUseWw != ''">IS_RP_PLAN_USE_WW = #{isRpPlanUseWw},</if>
  140. <if test="isIomf != null and isIomf != ''">IS_IOMF = #{isIomf},</if>
  141. <if test="isIomfRun != null and isIomfRun != ''">IS_IOMF_RUN = #{isIomfRun},</if>
  142. <if test="isEapOrswu != null and isEapOrswu != ''">IS_EAP_ORSWU = #{isEapOrswu},</if>
  143. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  144. <if test="inTm != null">IN_TM = #{inTm},</if>
  145. <if test="upTm != null">UP_TM = #{upTm},</if>
  146. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  147. <if test="wtDutyUtOth != null and wtDutyUtOth != ''">WT_DUTY_UT_OTH = #{wtDutyUtOth},</if>
  148. <if test="mainPrdUtOth != null and mainPrdUtOth != ''">MAIN_PRD_UT_OTH = #{mainPrdUtOth},</if>
  149. </trim>
  150. <where>ID = #{id}</where>
  151. </update>
  152. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspSvwtWuntRgstrWuusw">
  153. update BIS_INSP_SVWT_WUNT_RGSTR_WUUSW
  154. <trim prefix="set" suffixOverrides=",">
  155. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  156. <if test="relUseWw != null and relUseWw != ''">REL_USE_WW = #{relUseWw},</if>
  157. <if test="mainPrdNum != null and mainPrdNum != ''">MAIN_PRD_NUM = #{mainPrdNum},</if>
  158. <if test="mainPrdUt != null and mainPrdUt != ''">MAIN_PRD_UT = #{mainPrdUt},</if>
  159. <if test="wtDuty != null and wtDuty != ''">WT_DUTY = #{wtDuty},</if>
  160. <if test="wtDutyUt != null and wtDutyUt != ''">WT_DUTY_UT = #{wtDutyUt},</if>
  161. <if test="isDutyWs != null and isDutyWs != ''">IS_DUTY_WS = #{isDutyWs},</if>
  162. <if test="isPlWs != null and isPlWs != ''">IS_PL_WS = #{isPlWs},</if>
  163. <if test="planUseWw != null and planUseWw != ''">PLAN_USE_WW = #{planUseWw},</if>
  164. <if test="isOvPlanUseWw != null and isOvPlanUseWw != ''">IS_OV_PLAN_USE_WW = #{isOvPlanUseWw},</if>
  165. <if test="isRpPlanUseWw != null and isRpPlanUseWw != ''">IS_RP_PLAN_USE_WW = #{isRpPlanUseWw},</if>
  166. <if test="isIomf != null and isIomf != ''">IS_IOMF = #{isIomf},</if>
  167. <if test="isIomfRun != null and isIomfRun != ''">IS_IOMF_RUN = #{isIomfRun},</if>
  168. <if test="isEapOrswu != null and isEapOrswu != ''">IS_EAP_ORSWU = #{isEapOrswu},</if>
  169. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  170. <if test="inTm != null">IN_TM = #{inTm},</if>
  171. <if test="upTm != null">UP_TM = #{upTm},</if>
  172. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  173. <if test="wtDutyUtOth != null and wtDutyUtOth != ''">WT_DUTY_UT_OTH = #{wtDutyUtOth},</if>
  174. <if test="mainPrdUtOth != null and mainPrdUtOth != ''">MAIN_PRD_UT_OTH = #{mainPrdUtOth},</if>
  175. </trim>
  176. <include refid="page_where" />
  177. </update>
  178. <!-- 其他自定义SQL -->
  179. </mapper>