BisInspDrdmpItemDao.xml 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272
  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.BisInspDrdmpItemDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspDrdmpItem" id="bisInspDrdmpItemResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="rgstrId" column="RGSTR_ID"/>
  7. <result property="isSafLaws" column="IS_SAF_LAWS"/>
  8. <result property="isSafPut" column="IS_SAF_PUT"/>
  9. <result property="isMakRule" column="IS_MAK_RULE"/>
  10. <result property="isMeetOrg" column="IS_MEET_ORG"/>
  11. <result property="isDutList" column="IS_DUT_LIST"/>
  12. <result property="isBudDut" column="IS_BUD_DUT"/>
  13. <result property="isSureOrg" column="IS_SURE_ORG"/>
  14. <result property="isGuidResu" column="IS_GUID_RESU"/>
  15. <result property="isOrgEva" column="IS_ORG_EVA"/>
  16. <result property="isSafAnaly" column="IS_SAF_ANALY"/>
  17. <result property="isMakSafPlan" column="IS_MAK_SAF_PLAN"/>
  18. <result property="isPlanChk" column="IS_PLAN_CHK"/>
  19. <result property="isMakSaf" column="IS_MAK_SAF"/>
  20. <result property="isDanImp" column="IS_DAN_IMP"/>
  21. <result property="isLowMon" column="IS_LOW_MON"/>
  22. <result property="isSafCopy" column="IS_SAF_COPY"/>
  23. <result property="isSafStnd" column="IS_SAF_STND"/>
  24. <result property="isBudDang" column="IS_BUD_DANG"/>
  25. <result property="isWageTrain" column="IS_WAGE_TRAIN"/>
  26. <result property="isDutyChk" column="IS_DUTY_CHK"/>
  27. <result property="isAccpRept" column="IS_ACCP_REPT"/>
  28. <result property="isDataBlaw" column="IS_DATA_BLAW"/>
  29. <result property="isBudPlan" column="IS_BUD_PLAN"/>
  30. <result property="isOrgPlan" column="IS_ORG_PLAN"/>
  31. <result property="isSendSaf" column="IS_SEND_SAF"/>
  32. <result property="isMangLook" column="IS_MANG_LOOK"/>
  33. <result property="persId" column="PERS_ID"/>
  34. <result property="intm" column="INTM"/>
  35. <result property="uptm" column="UPTM"/>
  36. <result property="state" column="STATE"/>
  37. <result property="dataStat" column="DATA_STAT"/>
  38. </resultMap>
  39. <sql id="table_columns">
  40. ID,
  41. RGSTR_ID,
  42. IS_SAF_LAWS,
  43. IS_SAF_PUT,
  44. IS_MAK_RULE,
  45. IS_MEET_ORG,
  46. IS_DUT_LIST,
  47. IS_BUD_DUT,
  48. IS_SURE_ORG,
  49. IS_GUID_RESU,
  50. IS_ORG_EVA,
  51. IS_SAF_ANALY,
  52. IS_MAK_SAF_PLAN,
  53. IS_PLAN_CHK,
  54. IS_MAK_SAF,
  55. IS_DAN_IMP,
  56. IS_LOW_MON,
  57. IS_SAF_COPY,
  58. IS_SAF_STND,
  59. IS_BUD_DANG,
  60. IS_WAGE_TRAIN,
  61. IS_DUTY_CHK,
  62. IS_ACCP_REPT,
  63. IS_DATA_BLAW,
  64. IS_BUD_PLAN,
  65. IS_ORG_PLAN,
  66. IS_SEND_SAF,
  67. IS_MANG_LOOK,
  68. PERS_ID,
  69. INTM,
  70. UPTM,
  71. STATE,
  72. DATA_STAT
  73. </sql>
  74. <sql id="entity_properties">
  75. #{id},
  76. #{rgstrId},
  77. #{isSafLaws},
  78. #{isSafPut},
  79. #{isMakRule},
  80. #{isMeetOrg},
  81. #{isDutList},
  82. #{isBudDut},
  83. #{isSureOrg},
  84. #{isGuidResu},
  85. #{isOrgEva},
  86. #{isSafAnaly},
  87. #{isMakSafPlan},
  88. #{isPlanChk},
  89. #{isMakSaf},
  90. #{isDanImp},
  91. #{isLowMon},
  92. #{isSafCopy},
  93. #{isSafStnd},
  94. #{isBudDang},
  95. #{isWageTrain},
  96. #{isDutyChk},
  97. #{isAccpRept},
  98. #{isDataBlaw},
  99. #{isBudPlan},
  100. #{isOrgPlan},
  101. #{isSendSaf},
  102. #{isMangLook},
  103. #{persId},
  104. #{intm},
  105. #{uptm},
  106. #{state},
  107. #{dataStat}
  108. </sql>
  109. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  110. <sql id="page_where">
  111. <trim prefix="where" prefixOverrides="and | or ">
  112. <if test="rgstrId != null and rgstrId != ''">and RGSTR_ID = #{rgstrId}</if>
  113. <if test="isSafLaws != null and isSafLaws != ''">and IS_SAF_LAWS = #{isSafLaws}</if>
  114. <if test="isSafPut != null and isSafPut != ''">and IS_SAF_PUT = #{isSafPut}</if>
  115. <if test="isMakRule != null and isMakRule != ''">and IS_MAK_RULE = #{isMakRule}</if>
  116. <if test="isMeetOrg != null and isMeetOrg != ''">and IS_MEET_ORG = #{isMeetOrg}</if>
  117. <if test="isDutList != null and isDutList != ''">and IS_DUT_LIST = #{isDutList}</if>
  118. <if test="isBudDut != null and isBudDut != ''">and IS_BUD_DUT = #{isBudDut}</if>
  119. <if test="isSureOrg != null and isSureOrg != ''">and IS_SURE_ORG = #{isSureOrg}</if>
  120. <if test="isGuidResu != null and isGuidResu != ''">and IS_GUID_RESU = #{isGuidResu}</if>
  121. <if test="isOrgEva != null and isOrgEva != ''">and IS_ORG_EVA = #{isOrgEva}</if>
  122. <if test="isSafAnaly != null and isSafAnaly != ''">and IS_SAF_ANALY = #{isSafAnaly}</if>
  123. <if test="isMakSafPlan != null and isMakSafPlan != ''">and IS_MAK_SAF_PLAN = #{isMakSafPlan}</if>
  124. <if test="isPlanChk != null and isPlanChk != ''">and IS_PLAN_CHK = #{isPlanChk}</if>
  125. <if test="isMakSaf != null and isMakSaf != ''">and IS_MAK_SAF = #{isMakSaf}</if>
  126. <if test="isDanImp != null and isDanImp != ''">and IS_DAN_IMP = #{isDanImp}</if>
  127. <if test="isLowMon != null and isLowMon != ''">and IS_LOW_MON = #{isLowMon}</if>
  128. <if test="isSafCopy != null and isSafCopy != ''">and IS_SAF_COPY = #{isSafCopy}</if>
  129. <if test="isSafStnd != null and isSafStnd != ''">and IS_SAF_STND = #{isSafStnd}</if>
  130. <if test="isBudDang != null and isBudDang != ''">and IS_BUD_DANG = #{isBudDang}</if>
  131. <if test="isWageTrain != null and isWageTrain != ''">and IS_WAGE_TRAIN = #{isWageTrain}</if>
  132. <if test="isDutyChk != null and isDutyChk != ''">and IS_DUTY_CHK = #{isDutyChk}</if>
  133. <if test="isAccpRept != null and isAccpRept != ''">and IS_ACCP_REPT = #{isAccpRept}</if>
  134. <if test="isDataBlaw != null and isDataBlaw != ''">and IS_DATA_BLAW = #{isDataBlaw}</if>
  135. <if test="isBudPlan != null and isBudPlan != ''">and IS_BUD_PLAN = #{isBudPlan}</if>
  136. <if test="isOrgPlan != null and isOrgPlan != ''">and IS_ORG_PLAN = #{isOrgPlan}</if>
  137. <if test="isSendSaf != null and isSendSaf != ''">and IS_SEND_SAF = #{isSendSaf}</if>
  138. <if test="isMangLook != null and isMangLook != ''">and IS_MANG_LOOK = #{isMangLook}</if>
  139. <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
  140. <if test="intm != null">and INTM = #{intm}</if>
  141. <if test="uptm != null">and UPTM = #{uptm}</if>
  142. <if test="state != null and state != ''">and STATE = #{state}</if>
  143. <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
  144. and DATA_STAT='0'
  145. </trim>
  146. </sql>
  147. <select id="get" resultMap="bisInspDrdmpItemResultMap" parameterType="String" >
  148. select <include refid="table_columns" /> from BIS_INSP_DRDMP_ITEM where RGSTR_ID = #{id}
  149. </select>
  150. <select id="getBy" resultMap="bisInspDrdmpItemResultMap">
  151. select <include refid="table_columns" /> from BIS_INSP_DRDMP_ITEM <include refid="page_where" />
  152. </select>
  153. <select id="findAll" resultMap="bisInspDrdmpItemResultMap">
  154. select <include refid="table_columns" /> from BIS_INSP_DRDMP_ITEM
  155. </select>
  156. <select id="findList" resultMap="bisInspDrdmpItemResultMap">
  157. select <include refid="table_columns" /> from BIS_INSP_DRDMP_ITEM <include refid="page_where" />
  158. </select>
  159. <select id="selectCount" resultType="int" >
  160. select count(ID) from BIS_INSP_DRDMP_ITEM <include refid="page_where" />
  161. </select>
  162. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspDrdmpItem">
  163. insert into BIS_INSP_DRDMP_ITEM( <include refid="table_columns" /> )
  164. values ( <include refid="entity_properties" /> )
  165. </insert>
  166. <delete id="delete" parameterType="java.lang.String">
  167. update BIS_INSP_DRDMP_ITEM set DATA_STAT='9' where ID = #{id}
  168. </delete>
  169. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspDrdmpItem">
  170. update BIS_INSP_DRDMP_ITEM set DATA_STAT='9' <include refid="page_where" />
  171. </delete>
  172. <update id="deleteInFlag" parameterType="java.lang.String">
  173. update BIS_INSP_DRDMP_ITEM set DATA_STAT = '9' where ID = #{id}
  174. </update>
  175. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspDrdmpItem">
  176. update BIS_INSP_DRDMP_ITEM
  177. <trim prefix="set" suffixOverrides=",">
  178. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  179. <if test="isSafLaws != null and isSafLaws != ''">IS_SAF_LAWS = #{isSafLaws},</if>
  180. <if test="isSafPut != null and isSafPut != ''">IS_SAF_PUT = #{isSafPut},</if>
  181. <if test="isMakRule != null and isMakRule != ''">IS_MAK_RULE = #{isMakRule},</if>
  182. <if test="isMeetOrg != null and isMeetOrg != ''">IS_MEET_ORG = #{isMeetOrg},</if>
  183. <if test="isDutList != null and isDutList != ''">IS_DUT_LIST = #{isDutList},</if>
  184. <if test="isBudDut != null and isBudDut != ''">IS_BUD_DUT = #{isBudDut},</if>
  185. <if test="isSureOrg != null and isSureOrg != ''">IS_SURE_ORG = #{isSureOrg},</if>
  186. <if test="isGuidResu != null and isGuidResu != ''">IS_GUID_RESU = #{isGuidResu},</if>
  187. <if test="isOrgEva != null and isOrgEva != ''">IS_ORG_EVA = #{isOrgEva},</if>
  188. <if test="isSafAnaly != null and isSafAnaly != ''">IS_SAF_ANALY = #{isSafAnaly},</if>
  189. <if test="isMakSafPlan != null and isMakSafPlan != ''">IS_MAK_SAF_PLAN = #{isMakSafPlan},</if>
  190. <if test="isPlanChk != null and isPlanChk != ''">IS_PLAN_CHK = #{isPlanChk},</if>
  191. <if test="isMakSaf != null and isMakSaf != ''">IS_MAK_SAF = #{isMakSaf},</if>
  192. <if test="isDanImp != null and isDanImp != ''">IS_DAN_IMP = #{isDanImp},</if>
  193. <if test="isLowMon != null and isLowMon != ''">IS_LOW_MON = #{isLowMon},</if>
  194. <if test="isSafCopy != null and isSafCopy != ''">IS_SAF_COPY = #{isSafCopy},</if>
  195. <if test="isSafStnd != null and isSafStnd != ''">IS_SAF_STND = #{isSafStnd},</if>
  196. <if test="isBudDang != null and isBudDang != ''">IS_BUD_DANG = #{isBudDang},</if>
  197. <if test="isWageTrain != null and isWageTrain != ''">IS_WAGE_TRAIN = #{isWageTrain},</if>
  198. <if test="isDutyChk != null and isDutyChk != ''">IS_DUTY_CHK = #{isDutyChk},</if>
  199. <if test="isAccpRept != null and isAccpRept != ''">IS_ACCP_REPT = #{isAccpRept},</if>
  200. <if test="isDataBlaw != null and isDataBlaw != ''">IS_DATA_BLAW = #{isDataBlaw},</if>
  201. <if test="isBudPlan != null and isBudPlan != ''">IS_BUD_PLAN = #{isBudPlan},</if>
  202. <if test="isOrgPlan != null and isOrgPlan != ''">IS_ORG_PLAN = #{isOrgPlan},</if>
  203. <if test="isSendSaf != null and isSendSaf != ''">IS_SEND_SAF = #{isSendSaf},</if>
  204. <if test="isMangLook != null and isMangLook != ''">IS_MANG_LOOK = #{isMangLook},</if>
  205. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  206. <if test="intm != null">INTM = #{intm},</if>
  207. <if test="uptm != null">UPTM = #{uptm},</if>
  208. <if test="state != null and state != ''">STATE = #{state},</if>
  209. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  210. </trim>
  211. <where>ID = #{id}</where>
  212. </update>
  213. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspDrdmpItem">
  214. update BIS_INSP_DRDMP_ITEM
  215. <trim prefix="set" suffixOverrides=",">
  216. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  217. <if test="isSafLaws != null and isSafLaws != ''">IS_SAF_LAWS = #{isSafLaws},</if>
  218. <if test="isSafPut != null and isSafPut != ''">IS_SAF_PUT = #{isSafPut},</if>
  219. <if test="isMakRule != null and isMakRule != ''">IS_MAK_RULE = #{isMakRule},</if>
  220. <if test="isMeetOrg != null and isMeetOrg != ''">IS_MEET_ORG = #{isMeetOrg},</if>
  221. <if test="isDutList != null and isDutList != ''">IS_DUT_LIST = #{isDutList},</if>
  222. <if test="isBudDut != null and isBudDut != ''">IS_BUD_DUT = #{isBudDut},</if>
  223. <if test="isSureOrg != null and isSureOrg != ''">IS_SURE_ORG = #{isSureOrg},</if>
  224. <if test="isGuidResu != null and isGuidResu != ''">IS_GUID_RESU = #{isGuidResu},</if>
  225. <if test="isOrgEva != null and isOrgEva != ''">IS_ORG_EVA = #{isOrgEva},</if>
  226. <if test="isSafAnaly != null and isSafAnaly != ''">IS_SAF_ANALY = #{isSafAnaly},</if>
  227. <if test="isMakSafPlan != null and isMakSafPlan != ''">IS_MAK_SAF_PLAN = #{isMakSafPlan},</if>
  228. <if test="isPlanChk != null and isPlanChk != ''">IS_PLAN_CHK = #{isPlanChk},</if>
  229. <if test="isMakSaf != null and isMakSaf != ''">IS_MAK_SAF = #{isMakSaf},</if>
  230. <if test="isDanImp != null and isDanImp != ''">IS_DAN_IMP = #{isDanImp},</if>
  231. <if test="isLowMon != null and isLowMon != ''">IS_LOW_MON = #{isLowMon},</if>
  232. <if test="isSafCopy != null and isSafCopy != ''">IS_SAF_COPY = #{isSafCopy},</if>
  233. <if test="isSafStnd != null and isSafStnd != ''">IS_SAF_STND = #{isSafStnd},</if>
  234. <if test="isBudDang != null and isBudDang != ''">IS_BUD_DANG = #{isBudDang},</if>
  235. <if test="isWageTrain != null and isWageTrain != ''">IS_WAGE_TRAIN = #{isWageTrain},</if>
  236. <if test="isDutyChk != null and isDutyChk != ''">IS_DUTY_CHK = #{isDutyChk},</if>
  237. <if test="isAccpRept != null and isAccpRept != ''">IS_ACCP_REPT = #{isAccpRept},</if>
  238. <if test="isDataBlaw != null and isDataBlaw != ''">IS_DATA_BLAW = #{isDataBlaw},</if>
  239. <if test="isBudPlan != null and isBudPlan != ''">IS_BUD_PLAN = #{isBudPlan},</if>
  240. <if test="isOrgPlan != null and isOrgPlan != ''">IS_ORG_PLAN = #{isOrgPlan},</if>
  241. <if test="isSendSaf != null and isSendSaf != ''">IS_SEND_SAF = #{isSendSaf},</if>
  242. <if test="isMangLook != null and isMangLook != ''">IS_MANG_LOOK = #{isMangLook},</if>
  243. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  244. <if test="intm != null">INTM = #{intm},</if>
  245. <if test="uptm != null">UPTM = #{uptm},</if>
  246. <if test="state != null and state != ''">STATE = #{state},</if>
  247. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  248. </trim>
  249. <include refid="page_where" />
  250. </update>
  251. <!-- 其他自定义SQL -->
  252. </mapper>