BisInspAllWorkerPersDao.xml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384
  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.BisInspAllWorkerPersDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspAllWorkerPers" id="bisInspAllWorkerPersResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="guid" column="GUID"/>
  7. <result property="orgId" column="ORG_ID"/>
  8. <result property="orgNm" column="ORG_NM"/>
  9. <result property="persName" column="PERS_NAME"/>
  10. <result property="sex" column="SEX"/>
  11. <result property="age" column="AGE"/>
  12. <result property="mobilenumb" column="MOBILENUMB"/>
  13. <result property="email" column="EMAIL"/>
  14. <result property="idNumber" column="ID_NUMBER"/>
  15. <result property="bornDate" column="BORN_DATE"/>
  16. <result property="dpnm" column="DPNM"/>
  17. <result property="dppost" column="DPPOST"/>
  18. <result property="idnm" column="IDNM"/>
  19. <result property="plst" column="PLST"/>
  20. <result property="specialty" column="SPECIALTY"/>
  21. <result property="admDuty" column="ADM_DUTY"/>
  22. <result property="isWork" column="IS_WORK"/>
  23. <result property="isCvlSrvnts" column="IS_CVL_SRVNTS"/>
  24. <result property="expertPost" column="EXPERT_POST"/>
  25. <result property="imgurl" column="IMGURL"/>
  26. <result property="remark" column="REMARK"/>
  27. <result property="intm" column="INTM"/>
  28. <result property="uptm" column="UPTM"/>
  29. <result property="dataStat" column="DATA_STAT"/>
  30. </resultMap>
  31. <sql id="table_columns">
  32. ID,
  33. GUID,
  34. ORG_ID,
  35. ORG_NM,
  36. PERS_NAME,
  37. SEX,
  38. AGE,
  39. MOBILENUMB,
  40. EMAIL,
  41. ID_NUMBER,
  42. BORN_DATE,
  43. DPNM,
  44. DPPOST,
  45. IDNM,
  46. PLST,
  47. SPECIALTY,
  48. ADM_DUTY,
  49. IS_WORK,
  50. IS_CVL_SRVNTS,
  51. EXPERT_POST,
  52. IMGURL,
  53. REMARK,
  54. INTM,
  55. UPTM,
  56. DATA_STAT
  57. </sql>
  58. <sql id="entity_properties">
  59. #{id},
  60. #{guid},
  61. #{orgId},
  62. #{orgNm},
  63. #{persName},
  64. #{sex},
  65. #{age},
  66. #{mobilenumb},
  67. #{email},
  68. #{idNumber},
  69. #{bornDate},
  70. #{dpnm},
  71. #{dppost},
  72. #{idnm},
  73. #{plst},
  74. #{specialty},
  75. #{admDuty},
  76. #{isWork},
  77. #{isCvlSrvnts},
  78. #{expertPost},
  79. #{imgurl},
  80. #{remark},
  81. #{intm},
  82. #{uptm},
  83. #{dataStat}
  84. </sql>
  85. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  86. <sql id="page_where">
  87. <trim prefix="where" prefixOverrides="and | or ">
  88. <if test="guid != null and guid != ''">
  89. and GUID = #{guid}
  90. </if>
  91. <if test="orgId != null and orgId != ''">
  92. and ORG_ID = #{orgId}
  93. </if>
  94. <if test="orgNm != null and orgNm != ''">
  95. and ORG_NM = #{orgNm}
  96. </if>
  97. <if test="persName != null and persName != ''">
  98. and PERS_NAME like CONCAT('%', CONCAT(#{persName}, '%'))
  99. </if>
  100. <if test="sex != null and sex != ''">
  101. and SEX = #{sex}
  102. </if>
  103. <if test="age != null and age != ''">
  104. and AGE = #{age}
  105. </if>
  106. <if test="mobilenumb != null and mobilenumb != ''">
  107. and MOBILENUMB = #{mobilenumb}
  108. </if>
  109. <if test="email != null and email != ''">
  110. and EMAIL = #{email}
  111. </if>
  112. <if test="idNumber != null and idNumber != ''">
  113. and ID_NUMBER = #{idNumber}
  114. </if>
  115. <if test="bornDate != null">
  116. and BORN_DATE = #{bornDate}
  117. </if>
  118. <if test="dpnm != null and dpnm != ''">
  119. and DPNM = #{dpnm}
  120. </if>
  121. <if test="dppost != null and dppost != ''">
  122. and DPPOST like CONCAT('%', CONCAT(#{dppost}, '%'))
  123. </if>
  124. <if test="idnm != null and idnm != ''">
  125. and IDNM = #{idnm}
  126. </if>
  127. <if test="plst != null and plst != ''">
  128. and PLST = #{plst}
  129. </if>
  130. <if test="specialty != null and specialty != ''">
  131. and SPECIALTY like CONCAT('%', CONCAT(#{specialty}, '%'))
  132. </if>
  133. <if test="admDuty != null and admDuty != ''">
  134. and ADM_DUTY = #{admDuty}
  135. </if>
  136. <if test="isWork != null and isWork != ''">
  137. and IS_WORK = #{isWork}
  138. </if>
  139. <if test="isCvlSrvnts != null and isCvlSrvnts != ''">
  140. and IS_CVL_SRVNTS = #{isCvlSrvnts}
  141. </if>
  142. <if test="expertPost != null and expertPost != ''">
  143. and EXPERT_POST like CONCAT('%', CONCAT(#{expertPost}, '%'))
  144. </if>
  145. <if test="imgurl != null and imgurl != ''">
  146. and IMGURL = #{imgurl}
  147. </if>
  148. <if test="remark != null and remark != ''">
  149. and REMARK = #{remark}
  150. </if>
  151. <if test="intm != null">
  152. and INTM = #{intm}
  153. </if>
  154. <if test="uptm != null">
  155. and UPTM = #{uptm}
  156. </if>
  157. <if test="dataStat != null and dataStat != ''">
  158. and DATA_STAT = #{dataStat}
  159. </if>
  160. and DATA_STAT='0'
  161. </trim>
  162. </sql>
  163. <select id="get" resultMap="bisInspAllWorkerPersResultMap" parameterType="String">
  164. select
  165. <include refid="table_columns"/>
  166. from BIS_INSP_ALL_WORKER_PERS where ID = #{id}
  167. </select>
  168. <select id="getBy" resultMap="bisInspAllWorkerPersResultMap">
  169. select
  170. <include refid="table_columns"/>
  171. from BIS_INSP_ALL_WORKER_PERS
  172. <include refid="page_where"/>
  173. </select>
  174. <select id="findAll" resultMap="bisInspAllWorkerPersResultMap">
  175. select
  176. <include refid="table_columns"/>
  177. from BIS_INSP_ALL_WORKER_PERS
  178. </select>
  179. <select id="findList" resultMap="bisInspAllWorkerPersResultMap">
  180. select
  181. <include refid="table_columns"/>
  182. from BIS_INSP_ALL_WORKER_PERS
  183. <include refid="page_where"/>
  184. </select>
  185. <select id="selectCount" resultType="int">
  186. select count(ID) from BIS_INSP_ALL_WORKER_PERS
  187. <include refid="page_where"/>
  188. </select>
  189. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspAllWorkerPers">
  190. insert into BIS_INSP_ALL_WORKER_PERS(
  191. <include refid="table_columns"/>
  192. )
  193. values (
  194. <include refid="entity_properties"/>
  195. )
  196. </insert>
  197. <delete id="delete" parameterType="java.lang.String">
  198. update BIS_INSP_ALL_WORKER_PERS set DATA_STAT='9' where ID = #{id}
  199. </delete>
  200. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspAllWorkerPers">
  201. update BIS_INSP_ALL_WORKER_PERS set DATA_STAT='9'
  202. <include refid="page_where"/>
  203. </delete>
  204. <update id="deleteInFlag" parameterType="java.lang.String">
  205. update BIS_INSP_ALL_WORKER_PERS set DATA_STAT = '9' where ID = #{id}
  206. </update>
  207. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspAllWorkerPers">
  208. update BIS_INSP_ALL_WORKER_PERS
  209. <trim prefix="set" suffixOverrides=",">
  210. <if test="guid != null and guid != ''">GUID
  211. = #{guid},
  212. </if>
  213. <if test="orgId != null and orgId != ''">ORG_ID
  214. = #{orgId},
  215. </if>
  216. <if test="orgNm != null and orgNm != ''">ORG_NM
  217. = #{orgNm},
  218. </if>
  219. <if test="persName != null and persName != ''">PERS_NAME
  220. = #{persName},
  221. </if>
  222. <if test="sex != null and sex != ''">SEX
  223. = #{sex},
  224. </if>
  225. <if test="age != null and age != ''">AGE
  226. = #{age},
  227. </if>
  228. <if test="mobilenumb != null and mobilenumb != ''">MOBILENUMB
  229. = #{mobilenumb},
  230. </if>
  231. <if test="email != null and email != ''">EMAIL
  232. = #{email},
  233. </if>
  234. <if test="idNumber != null and idNumber != ''">ID_NUMBER
  235. = #{idNumber},
  236. </if>
  237. <if test="bornDate != null">BORN_DATE
  238. = #{bornDate},
  239. </if>
  240. <if test="dpnm != null and dpnm != ''">DPNM
  241. = #{dpnm},
  242. </if>
  243. <if test="dppost != null and dppost != ''">DPPOST
  244. = #{dppost},
  245. </if>
  246. <if test="idnm != null and idnm != ''">IDNM
  247. = #{idnm},
  248. </if>
  249. <if test="plst != null and plst != ''">PLST
  250. = #{plst},
  251. </if>
  252. <if test="specialty != null and specialty != ''">SPECIALTY
  253. = #{specialty},
  254. </if>
  255. <if test="admDuty != null and admDuty != ''">ADM_DUTY
  256. = #{admDuty},
  257. </if>
  258. <if test="isWork != null and isWork != ''">IS_WORK
  259. = #{isWork},
  260. </if>
  261. <if test="isCvlSrvnts != null and isCvlSrvnts != ''">IS_CVL_SRVNTS
  262. = #{isCvlSrvnts},
  263. </if>
  264. <if test="expertPost != null and expertPost != ''">EXPERT_POST
  265. = #{expertPost},
  266. </if>
  267. <if test="imgurl != null and imgurl != ''">IMGURL
  268. = #{imgurl},
  269. </if>
  270. <if test="remark != null and remark != ''">REMARK
  271. = #{remark},
  272. </if>
  273. <if test="intm != null">INTM
  274. = #{intm},
  275. </if>
  276. <if test="uptm != null">UPTM
  277. = #{uptm},
  278. </if>
  279. <if test="dataStat != null and dataStat != ''">DATA_STAT
  280. = #{dataStat},
  281. </if>
  282. </trim>
  283. <where>ID = #{id}</where>
  284. </update>
  285. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspAllWorkerPers">
  286. update BIS_INSP_ALL_WORKER_PERS
  287. <trim prefix="set" suffixOverrides=",">
  288. <if test="guid != null and guid != ''">GUID
  289. = #{guid},
  290. </if>
  291. <if test="orgId != null and orgId != ''">ORG_ID
  292. = #{orgId},
  293. </if>
  294. <if test="orgNm != null and orgNm != ''">ORG_NM
  295. = #{orgNm},
  296. </if>
  297. <if test="persName != null and persName != ''">PERS_NAME
  298. = #{persName},
  299. </if>
  300. <if test="sex != null and sex != ''">SEX
  301. = #{sex},
  302. </if>
  303. <if test="age != null and age != ''">AGE
  304. = #{age},
  305. </if>
  306. <if test="mobilenumb != null and mobilenumb != ''">MOBILENUMB
  307. = #{mobilenumb},
  308. </if>
  309. <if test="email != null and email != ''">EMAIL
  310. = #{email},
  311. </if>
  312. <if test="idNumber != null and idNumber != ''">ID_NUMBER
  313. = #{idNumber},
  314. </if>
  315. <if test="bornDate != null">BORN_DATE
  316. = #{bornDate},
  317. </if>
  318. <if test="dpnm != null and dpnm != ''">DPNM
  319. = #{dpnm},
  320. </if>
  321. <if test="dppost != null and dppost != ''">DPPOST
  322. = #{dppost},
  323. </if>
  324. <if test="idnm != null and idnm != ''">IDNM
  325. = #{idnm},
  326. </if>
  327. <if test="plst != null and plst != ''">PLST
  328. = #{plst},
  329. </if>
  330. <if test="specialty != null and specialty != ''">SPECIALTY
  331. = #{specialty},
  332. </if>
  333. <if test="admDuty != null and admDuty != ''">ADM_DUTY
  334. = #{admDuty},
  335. </if>
  336. <if test="isWork != null and isWork != ''">IS_WORK
  337. = #{isWork},
  338. </if>
  339. <if test="isCvlSrvnts != null and isCvlSrvnts != ''">IS_CVL_SRVNTS
  340. = #{isCvlSrvnts},
  341. </if>
  342. <if test="expertPost != null and expertPost != ''">EXPERT_POST
  343. = #{expertPost},
  344. </if>
  345. <if test="imgurl != null and imgurl != ''">IMGURL
  346. = #{imgurl},
  347. </if>
  348. <if test="remark != null and remark != ''">REMARK
  349. = #{remark},
  350. </if>
  351. <if test="intm != null">INTM
  352. = #{intm},
  353. </if>
  354. <if test="uptm != null">UPTM
  355. = #{uptm},
  356. </if>
  357. <if test="dataStat != null and dataStat != ''">DATA_STAT
  358. = #{dataStat},
  359. </if>
  360. </trim>
  361. <include refid="page_where"/>
  362. </update>
  363. <!-- 其他自定义SQL -->
  364. </mapper>