BisInspRsvrSdDutyDao.xml 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  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.BisInspRsvrSdDutyDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspRsvrSdDuty" id="bisInspRsvrSdDutyResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="rgstrId" column="RGSTR_ID"/>
  7. <result property="isAdmnDuty" column="IS_ADMN_DUTY"/>
  8. <result property="isAdmnTrain" column="IS_ADMN_TRAIN"/>
  9. <result property="isAdmnFunc" column="IS_ADMN_FUNC"/>
  10. <result property="isTchDuty" column="IS_TCH_DUTY"/>
  11. <result property="isTchTrain" column="IS_TCH_TRAIN"/>
  12. <result property="isTchFunc" column="IS_TCH_FUNC"/>
  13. <result property="isChkDuty" column="IS_CHK_DUTY"/>
  14. <result property="isChkTrain" column="IS_CHK_TRAIN"/>
  15. <result property="isChkFunc" column="IS_CHK_FUNC"/>
  16. <result property="dataStat" column="DATA_STAT"/>
  17. <result property="persId" column="PERS_ID"/>
  18. <result property="intm" column="INTM"/>
  19. <result property="uptm" column="UPTM"/>
  20. <result property="note" column="NOTE"/>
  21. </resultMap>
  22. <sql id="table_columns">
  23. ID,
  24. RGSTR_ID,
  25. IS_ADMN_DUTY,
  26. IS_ADMN_TRAIN,
  27. IS_ADMN_FUNC,
  28. IS_TCH_DUTY,
  29. IS_TCH_TRAIN,
  30. IS_TCH_FUNC,
  31. IS_CHK_DUTY,
  32. IS_CHK_TRAIN,
  33. IS_CHK_FUNC,
  34. DATA_STAT,
  35. PERS_ID,
  36. INTM,
  37. UPTM,
  38. NOTE
  39. </sql>
  40. <sql id="entity_properties">
  41. #{id},
  42. #{rgstrId},
  43. #{isAdmnDuty},
  44. #{isAdmnTrain},
  45. #{isAdmnFunc},
  46. #{isTchDuty},
  47. #{isTchTrain},
  48. #{isTchFunc},
  49. #{isChkDuty},
  50. #{isChkTrain},
  51. #{isChkFunc},
  52. #{dataStat},
  53. #{persId},
  54. #{intm},
  55. #{uptm},
  56. #{note}
  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="isAdmnDuty != null and isAdmnDuty != ''">and IS_ADMN_DUTY = #{isAdmnDuty}</if>
  63. <if test="isAdmnTrain != null and isAdmnTrain != ''">and IS_ADMN_TRAIN = #{isAdmnTrain}</if>
  64. <if test="isAdmnFunc != null and isAdmnFunc != ''">and IS_ADMN_FUNC = #{isAdmnFunc}</if>
  65. <if test="isTchDuty != null and isTchDuty != ''">and IS_TCH_DUTY = #{isTchDuty}</if>
  66. <if test="isTchTrain != null and isTchTrain != ''">and IS_TCH_TRAIN = #{isTchTrain}</if>
  67. <if test="isTchFunc != null and isTchFunc != ''">and IS_TCH_FUNC = #{isTchFunc}</if>
  68. <if test="isChkDuty != null and isChkDuty != ''">and IS_CHK_DUTY = #{isChkDuty}</if>
  69. <if test="isChkTrain != null and isChkTrain != ''">and IS_CHK_TRAIN = #{isChkTrain}</if>
  70. <if test="isChkFunc != null and isChkFunc != ''">and IS_CHK_FUNC = #{isChkFunc}</if>
  71. <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
  72. <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
  73. <if test="intm != null">and INTM = #{intm}</if>
  74. <if test="uptm != null">and UPTM = #{uptm}</if>
  75. <if test="note != null and note != ''">and NOTE = #{note}</if>
  76. </trim>
  77. </sql>
  78. <select id="get" resultMap="bisInspRsvrSdDutyResultMap" parameterType="String" >
  79. select <include refid="table_columns" /> from BIS_INSP_RSVR_SD_DUTY where RGSTR_ID = #{id}
  80. </select>
  81. <select id="getBy" resultMap="bisInspRsvrSdDutyResultMap">
  82. select <include refid="table_columns" /> from BIS_INSP_RSVR_SD_DUTY <include refid="page_where" />
  83. </select>
  84. <select id="findAll" resultMap="bisInspRsvrSdDutyResultMap">
  85. select <include refid="table_columns" /> from BIS_INSP_RSVR_SD_DUTY
  86. </select>
  87. <select id="findList" resultMap="bisInspRsvrSdDutyResultMap">
  88. select <include refid="table_columns" /> from BIS_INSP_RSVR_SD_DUTY <include refid="page_where" />
  89. </select>
  90. <select id="selectCount" resultType="int" >
  91. select count(ID) from BIS_INSP_RSVR_SD_DUTY <include refid="page_where" />
  92. </select>
  93. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsvrSdDuty">
  94. insert into BIS_INSP_RSVR_SD_DUTY( <include refid="table_columns" /> )
  95. values ( <include refid="entity_properties" /> )
  96. </insert>
  97. <delete id="delete" parameterType="java.lang.String">
  98. update BIS_INSP_RSVR_SD_DUTY set DATA_STAT='9' where ID = #{id}
  99. </delete>
  100. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsvrSdDuty">
  101. delete from BIS_INSP_RSVR_SD_DUTY <include refid="page_where" />
  102. </delete>
  103. <update id="deleteInFlag" parameterType="java.lang.String">
  104. update BIS_INSP_RSVR_SD_DUTY set flag_valid = 0 where ID = #{id}
  105. </update>
  106. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsvrSdDuty">
  107. update BIS_INSP_RSVR_SD_DUTY
  108. <trim prefix="set" suffixOverrides=",">
  109. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  110. <if test="isAdmnDuty != null and isAdmnDuty != ''">IS_ADMN_DUTY = #{isAdmnDuty},</if>
  111. <if test="isAdmnTrain != null and isAdmnTrain != ''">IS_ADMN_TRAIN = #{isAdmnTrain},</if>
  112. <if test="isAdmnFunc != null and isAdmnFunc != ''">IS_ADMN_FUNC = #{isAdmnFunc},</if>
  113. <if test="isTchDuty != null and isTchDuty != ''">IS_TCH_DUTY = #{isTchDuty},</if>
  114. <if test="isTchTrain != null and isTchTrain != ''">IS_TCH_TRAIN = #{isTchTrain},</if>
  115. <if test="isTchFunc != null and isTchFunc != ''">IS_TCH_FUNC = #{isTchFunc},</if>
  116. <if test="isChkDuty != null and isChkDuty != ''">IS_CHK_DUTY = #{isChkDuty},</if>
  117. <if test="isChkTrain != null and isChkTrain != ''">IS_CHK_TRAIN = #{isChkTrain},</if>
  118. <if test="isChkFunc != null and isChkFunc != ''">IS_CHK_FUNC = #{isChkFunc},</if>
  119. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  120. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  121. <if test="intm != null">INTM = #{intm},</if>
  122. <if test="uptm != null">UPTM = #{uptm},</if>
  123. <if test="note != null and note != ''">NOTE = #{note},</if>
  124. </trim>
  125. <where>ID = #{id}</where>
  126. </update>
  127. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsvrSdDuty">
  128. update BIS_INSP_RSVR_SD_DUTY
  129. <trim prefix="set" suffixOverrides=",">
  130. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  131. <if test="isAdmnDuty != null and isAdmnDuty != ''">IS_ADMN_DUTY = #{isAdmnDuty},</if>
  132. <if test="isAdmnTrain != null and isAdmnTrain != ''">IS_ADMN_TRAIN = #{isAdmnTrain},</if>
  133. <if test="isAdmnFunc != null and isAdmnFunc != ''">IS_ADMN_FUNC = #{isAdmnFunc},</if>
  134. <if test="isTchDuty != null and isTchDuty != ''">IS_TCH_DUTY = #{isTchDuty},</if>
  135. <if test="isTchTrain != null and isTchTrain != ''">IS_TCH_TRAIN = #{isTchTrain},</if>
  136. <if test="isTchFunc != null and isTchFunc != ''">IS_TCH_FUNC = #{isTchFunc},</if>
  137. <if test="isChkDuty != null and isChkDuty != ''">IS_CHK_DUTY = #{isChkDuty},</if>
  138. <if test="isChkTrain != null and isChkTrain != ''">IS_CHK_TRAIN = #{isChkTrain},</if>
  139. <if test="isChkFunc != null and isChkFunc != ''">IS_CHK_FUNC = #{isChkFunc},</if>
  140. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  141. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  142. <if test="intm != null">INTM = #{intm},</if>
  143. <if test="uptm != null">UPTM = #{uptm},</if>
  144. <if test="note != null and note != ''">NOTE = #{note},</if>
  145. </trim>
  146. <include refid="page_where" />
  147. </update>
  148. <!-- 其他自定义SQL -->
  149. </mapper>