BasePersonDao.xml 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439
  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="com.liang.dao.BasePersonDao">
  4. <resultMap type="com.liang.entity.BasePerson" id="BasePersonMap">
  5. <result property="id" column="ID" jdbcType="INTEGER"/>
  6. <result property="dw" column="DW" jdbcType="INTEGER"/>
  7. <result property="dwmc" column="DWMC" jdbcType="VARCHAR"/>
  8. <result property="xm" column="XM" jdbcType="VARCHAR"/>
  9. <result property="xb" column="XB" jdbcType="VARCHAR"/>
  10. <result property="mz" column="MZ" jdbcType="VARCHAR"/>
  11. <result property="csd" column="CSD" jdbcType="VARCHAR"/>
  12. <result property="csrq" column="CSRQ" jdbcType="TIMESTAMP"/>
  13. <result property="dp" column="DP" jdbcType="VARCHAR"/>
  14. <result property="hghq" column="HGHQ" jdbcType="VARCHAR"/>
  15. <result property="gzdw" column="GZDW" jdbcType="INTEGER"/>
  16. <result property="gddh" column="GDDH" jdbcType="VARCHAR"/>
  17. <result property="jtzz1" column="JTZZ1" jdbcType="VARCHAR"/>
  18. <result property="zzdh" column="ZZDH" jdbcType="VARCHAR"/>
  19. <result property="txdz1" column="TXDZ1" jdbcType="VARCHAR"/>
  20. <result property="dzyj" column="DZYJ" jdbcType="VARCHAR"/>
  21. <result property="byxx" column="BYXX" jdbcType="INTEGER"/>
  22. <result property="xl" column="XL" jdbcType="INTEGER"/>
  23. <result property="xw" column="XW" jdbcType="VARCHAR"/>
  24. <result property="zc" column="ZC" jdbcType="VARCHAR"/>
  25. <result property="zyzc" column="ZYZC" jdbcType="VARCHAR"/>
  26. <result property="bysj" column="BYSJ" jdbcType="TIMESTAMP"/>
  27. <result property="wyyz" column="WYYZ" jdbcType="INTEGER"/>
  28. <result property="slcd" column="SLCD" jdbcType="VARCHAR"/>
  29. <result property="csdz" column="CSDZ" jdbcType="VARCHAR"/>
  30. <result property="jtzz2" column="JTZZ2" jdbcType="VARCHAR"/>
  31. <result property="yzbm" column="YZBM" jdbcType="VARCHAR"/>
  32. <result property="txdz2" column="TXDZ2" jdbcType="VARCHAR"/>
  33. <result property="gjkjbxkly" column="GJKJBXKLY" jdbcType="VARCHAR"/>
  34. <result property="gjjjwxkly" column="GJJJWXKLY" jdbcType="VARCHAR"/>
  35. <result property="sygb" column="SYGB" jdbcType="VARCHAR"/>
  36. <result property="synf" column="SYNF" jdbcType="INTEGER"/>
  37. <result property="ys" column="YS" jdbcType="VARCHAR"/>
  38. <result property="bsh" column="BSH" jdbcType="VARCHAR"/>
  39. <result property="yddh" column="YDDH" jdbcType="VARCHAR"/>
  40. <result property="cz" column="CZ" jdbcType="VARCHAR"/>
  41. <result property="chjljrychqk" column="CHJLJRYCHQK" jdbcType="VARCHAR"/>
  42. <result property="xtyh" column="XTYH" jdbcType="INTEGER"/>
  43. <result property="bm" column="BM" jdbcType="INTEGER"/>
  44. <result property="bmmc" column="BMMC" jdbcType="VARCHAR"/>
  45. <result property="cjr" column="CJR" jdbcType="INTEGER"/>
  46. </resultMap>
  47. <!--查询单个-->
  48. <select id="queryById" resultMap="BasePersonMap">
  49. SELECT p.* , c.MC AS DWMC, d.MC AS DPMC, e.MC AS XLMC, g.MC AS XWMC, l.MC AS WYYZMC, a1.MC as HGHQMC, a2.MC as SYGBMC
  50. ,a1.MC as HGHQMC, a2.MC as SYGBMC, b.dept_name as BMMC, s.name AS BYXXMC, t.name AS ZCMC, m.name AS GJKJBXKLYMC, f.name AS GJJJWXKLY
  51. FROM
  52. base_Person AS p
  53. LEFT JOIN base_Company AS c ON p.DW = c.ID
  54. LEFT JOIN base_Party AS d ON p.DP = d.BM
  55. LEFT JOIN base_Education AS e ON p.XL = e.ID
  56. LEFT JOIN base_Degree AS g ON p.XW = g.BM
  57. LEFT JOIN base_Language AS l ON p.WYYZ = l.ID
  58. LEFT JOIN base_Area AS a1 ON p.HGHQ = a1.BM
  59. LEFT JOIN base_Area AS a2 ON p.SYGB = a2.BM
  60. LEFT JOIN sys_dept_info AS b ON p.BM = b.dept_id
  61. LEFT JOIN base_School AS s ON p.BYXX = s.id
  62. LEFT JOIN base_Title AS t ON p.ZC = t.id
  63. LEFT JOIN base_MOST AS m ON p.GJKJBXKLY = m.id
  64. LEFT JOIN base_Foundation AS f ON p.GJJJWXKLY = f.id
  65. where p.ID = #{id}
  66. </select>
  67. <!--查询指定行数据-->
  68. <select id="queryAllByLimit" resultMap="BasePersonMap">
  69. select
  70. ID, DW, XM, XB, MZ, CSD, CSRQ, DP, HGHQ, GZDW, GDDH, JTZZ1, ZZDH, TXDZ1, DZYJ, BYXX, XL, XW, ZC, ZYZC, BYSJ, WYYZ, SLCD, CSDZ, JTZZ2, YZBM, TXDZ2, GJKJBXKLY, GJJJWXKLY, SYGB, SYNF, YS, BSH, YDDH, CZ, CHJLJRYCHQK, XTYH, BM, CJR
  71. from base_Person
  72. <where>
  73. <if test="id != null">
  74. and ID = #{id}
  75. </if>
  76. <if test="dw != null">
  77. and DW = #{dw}
  78. </if>
  79. <if test="xm != null">
  80. and XM = #{xm}
  81. </if>
  82. <if test="xb != null and xb != ''">
  83. and XB = #{xb}
  84. </if>
  85. <if test="mz != null and mz != ''">
  86. and MZ = #{mz}
  87. </if>
  88. <if test="csd != null">
  89. and CSD = #{csd}
  90. </if>
  91. <if test="csrq != null">
  92. and CSRQ = #{csrq}
  93. </if>
  94. <if test="dp != null and dp != ''">
  95. and DP = #{dp}
  96. </if>
  97. <if test="hghq != null and hghq != ''">
  98. and HGHQ = #{hghq}
  99. </if>
  100. <if test="gzdw != null">
  101. and GZDW = #{gzdw}
  102. </if>
  103. <if test="gddh != null and gddh != ''">
  104. and GDDH = #{gddh}
  105. </if>
  106. <if test="jtzz1 != null">
  107. and JTZZ1 = #{jtzz1}
  108. </if>
  109. <if test="zzdh != null and zzdh != ''">
  110. and ZZDH = #{zzdh}
  111. </if>
  112. <if test="txdz1 != null">
  113. and TXDZ1 = #{txdz1}
  114. </if>
  115. <if test="dzyj != null and dzyj != ''">
  116. and DZYJ = #{dzyj}
  117. </if>
  118. <if test="byxx != null">
  119. and BYXX = #{byxx}
  120. </if>
  121. <if test="xl != null">
  122. and XL = #{xl}
  123. </if>
  124. <if test="xw != null and xw != ''">
  125. and XW = #{xw}
  126. </if>
  127. <if test="zc != null and zc != ''">
  128. and ZC = #{zc}
  129. </if>
  130. <if test="zyzc != null and zyzc != ''">
  131. and ZYZC = #{zyzc}
  132. </if>
  133. <if test="bysj != null">
  134. and BYSJ = #{bysj}
  135. </if>
  136. <if test="wyyz != null">
  137. and WYYZ = #{wyyz}
  138. </if>
  139. <if test="slcd != null and slcd != ''">
  140. and SLCD = #{slcd}
  141. </if>
  142. <if test="csdz != null and csdz != ''">
  143. and CSDZ = #{csdz}
  144. </if>
  145. <if test="jtzz2 != null and jtzz2 != ''">
  146. and JTZZ2 = #{jtzz2}
  147. </if>
  148. <if test="yzbm != null and yzbm != ''">
  149. and YZBM = #{yzbm}
  150. </if>
  151. <if test="txdz2 != null and txdz2 != ''">
  152. and TXDZ2 = #{txdz2}
  153. </if>
  154. <if test="gjkjbxkly != null and gjkjbxkly != ''">
  155. and GJKJBXKLY = #{gjkjbxkly}
  156. </if>
  157. <if test="gjjjwxkly != null and gjjjwxkly != ''">
  158. and GJJJWXKLY = #{gjjjwxkly}
  159. </if>
  160. <if test="sygb != null and sygb != ''">
  161. and SYGB = #{sygb}
  162. </if>
  163. <if test="synf != null">
  164. and SYNF = #{synf}
  165. </if>
  166. <if test="ys != null and ys != ''">
  167. and YS = #{ys}
  168. </if>
  169. <if test="bsh != null and bsh != ''">
  170. and BSH = #{bsh}
  171. </if>
  172. <if test="yddh != null and yddh != ''">
  173. and YDDH = #{yddh}
  174. </if>
  175. <if test="cz != null and cz != ''">
  176. and CZ = #{cz}
  177. </if>
  178. <if test="chjljrychqk != null">
  179. and CHJLJRYCHQK = #{chjljrychqk}
  180. </if>
  181. <if test="xtyh != null">
  182. and XTYH = #{xtyh}
  183. </if>
  184. <if test="bm != null">
  185. and BM = #{bm}
  186. </if>
  187. <if test="cjr != null">
  188. and CJR = #{cjr}
  189. </if>
  190. </where>
  191. limit #{pageable.offset}, #{pageable.pageSize}
  192. </select>
  193. <!--新增所有列-->
  194. <insert id="insert" keyProperty="id" useGeneratedKeys="true">
  195. if not exists (select * from base_Person where XM = #{xm} and DW = #{dw} and CSRQ = #{csrq})
  196. insert into base_Person(
  197. <if test="xb != null and xb != ''">XB,</if>
  198. <if test="mz != null and mz != ''">MZ,</if>
  199. <if test="csd != null and csd != ''">CSD,</if>
  200. <if test="dp != null and dp != ''">DP,</if>
  201. <if test="hghq != null and hghq != ''">HGHQ,</if>
  202. <if test="gzdw != null">GZDW,</if>
  203. <if test="gddh != null and gddh != ''">GDDH,</if>
  204. <if test="jtzz1 != null and jtzz1 != ''">JTZZ1,</if>
  205. <if test="zzdh != null and zzdh != ''">ZZDH,</if>
  206. <if test="txdz1 != null and txdz1 != ''">TXDZ1,</if>
  207. <if test="dzyj != null and dzyj != ''">DZYJ,</if>
  208. <if test="byxx != null">BYXX,</if>
  209. <if test="xw != null and xw != ''">XW,</if>
  210. <if test="bysj != null">BYSJ,</if>
  211. <if test="wyyz != null">WYYZ,</if>
  212. <if test="slcd != null and slcd != ''">SLCD,</if>
  213. <if test="csdz != null and csdz != ''">CSDZ,</if>
  214. <if test="jtzz2 != null and jtzz2 != ''">JTZZ2,</if>
  215. <if test="yzbm != null and yzbm != ''">YZBM,</if>
  216. <if test="txdz2 != null and txdz2 != ''">TXDZ2,</if>
  217. <if test="gjkjbxkly != null and gjkjbxkly != ''">GJKJBXKLY,</if>
  218. <if test="gjjjwxkly != null and gjjjwxkly != ''">GJJJWXKLY,</if>
  219. <if test="sygb != null and sygb != ''">SYGB,</if>
  220. <if test="synf != null">SYNF,</if>
  221. <if test="ys != null and ys != ''">YS,</if>
  222. <if test="bsh != null and bsh != ''">BSH,</if>
  223. <if test="yddh != null and yddh != ''">YDDH,</if>
  224. <if test="cz != null and cz != ''">CZ,</if>
  225. <if test="chjljrychqk != null and chjljrychqk != ''">CHJLJRYCHQK,</if>
  226. <if test="xtyh != null">XTYH,</if>
  227. <if test="bm != null">BM,</if>
  228. DW, XM,
  229. <if test="csrq != null">CSRQ,</if>
  230. ZC, ZYZC, XL, CJR)
  231. values (
  232. <if test="xb != null and xb != ''">#{xb},</if>
  233. <if test="mz != null and mz != ''">#{mz},</if>
  234. <if test="csd != null and csd != ''">#{csd},</if>
  235. <if test="dp != null and dp != ''">#{dp},</if>
  236. <if test="hghq != null and hghq != ''">#{hghq},</if>
  237. <if test="gzdw != null">#{gzdw},</if>
  238. <if test="gddh != null and gddh != ''">#{gddh},</if>
  239. <if test="jtzz1 != null and jtzz1 != ''">#{jtzz1},</if>
  240. <if test="zzdh != null and zzdh != ''">#{zzdh},</if>
  241. <if test="txdz1 != null and txdz1 != ''">#{txdz1},</if>
  242. <if test="dzyj != null and dzyj != ''">#{dzyj},</if>
  243. <if test="byxx != null">#{byxx},</if>
  244. <if test="xw != null and xw != ''">#{xw},</if>
  245. <if test="bysj != null">#{bysj},</if>
  246. <if test="wyyz != null">#{wyyz},</if>
  247. <if test="slcd != null and slcd != ''">#{slcd},</if>
  248. <if test="csdz != null and csdz != ''">#{csdz},</if>
  249. <if test="jtzz2 != null and jtzz2 != ''">#{jtzz2},</if>
  250. <if test="yzbm != null and yzbm != ''">#{yzbm},</if>
  251. <if test="txdz2 != null and txdz2 != ''">#{txdz2},</if>
  252. <if test="gjkjbxkly != null and gjkjbxkly != ''">#{gjkjbxkly},</if>
  253. <if test="gjjjwxkly != null and gjjjwxkly != ''">#{gjjjwxkly},</if>
  254. <if test="sygb != null and sygb != ''">#{sygb},</if>
  255. <if test="synf != null">#{synf},</if>
  256. <if test="ys != null and ys != ''">#{ys},</if>
  257. <if test="bsh != null and bsh != ''">#{bsh},</if>
  258. <if test="yddh != null and yddh != ''">#{yddh},</if>
  259. <if test="cz != null and cz != ''">#{cz},</if>
  260. <if test="chjljrychqk != null and chjljrychqk != ''">#{chjljrychqk},</if>
  261. <if test="xtyh != null">#{xtyh},</if>
  262. <if test="bm != null">#{bm},</if>
  263. #{dw}, #{xm},
  264. <if test="csrq != null">#{csrq},</if>
  265. #{zc}, #{zyzc}, #{xl}, #{cjr})
  266. </insert>
  267. <insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
  268. insert into base_Person(DW, XM, XB, MZ, CSD, CSRQ, DP, HGHQ, GZDW, GDDH, JTZZ1, ZZDH, TXDZ1, DZYJ, BYXX, XL, XW, ZC, ZYZC, BYSJ, WYYZ, SLCD, CSDZ, JTZZ2, YZBM, TXDZ2, GJKJBXKLY, GJJJWXKLY, SYGB, SYNF, YS, BSH, YDDH, CZ, CHJLJRYCHQK, XTYH, BM, CJR)
  269. values
  270. <foreach collection="entities" item="entity" separator=",">
  271. (#{entity.dw}, #{entity.xm}, #{entity.xb}, #{entity.mz}, #{entity.csd}, #{entity.csrq}, #{entity.dp}, #{entity.hghq}, #{entity.gzdw}, #{entity.gddh}, #{entity.jtzz1}, #{entity.zzdh}, #{entity.txdz1}, #{entity.dzyj}, #{entity.byxx}, #{entity.xl}, #{entity.xw}, #{entity.zc}, #{entity.zyzc}, #{entity.bysj}, #{entity.wyyz}, #{entity.slcd}, #{entity.csdz}, #{entity.jtzz2}, #{entity.yzbm}, #{entity.txdz2}, #{entity.gjkjbxkly}, #{entity.gjjjwxkly}, #{entity.sygb}, #{entity.synf}, #{entity.ys}, #{entity.bsh}, #{entity.yddh}, #{entity.cz}, #{entity.chjljrychqk}, #{entity.xtyh}, #{entity.bm}, #{entity.cjr})
  272. </foreach>
  273. </insert>
  274. <insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
  275. insert into base_Person(DW, XM, XB, MZ, CSD, CSRQ, DP, HGHQ, GZDW, GDDH, JTZZ1, ZZDH, TXDZ1, DZYJ, BYXX, XL, XW, ZC, ZYZC, BYSJ, WYYZ, SLCD, CSDZ, JTZZ2, YZBM, TXDZ2, GJKJBXKLY, GJJJWXKLY, SYGB, SYNF, YS, BSH, YDDH, CZ, CHJLJRYCHQK, XTYH, BM, CJR)
  276. values
  277. <foreach collection="entities" item="entity" separator=",">
  278. (#{entity.dw}, #{entity.xm}, #{entity.xb}, #{entity.mz}, #{entity.csd}, #{entity.csrq}, #{entity.dp}, #{entity.hghq}, #{entity.gzdw}, #{entity.gddh}, #{entity.jtzz1}, #{entity.zzdh}, #{entity.txdz1}, #{entity.dzyj}, #{entity.byxx}, #{entity.xl}, #{entity.xw}, #{entity.zc}, #{entity.zyzc}, #{entity.bysj}, #{entity.wyyz}, #{entity.slcd}, #{entity.csdz}, #{entity.jtzz2}, #{entity.yzbm}, #{entity.txdz2}, #{entity.gjkjbxkly}, #{entity.gjjjwxkly}, #{entity.sygb}, #{entity.synf}, #{entity.ys}, #{entity.bsh}, #{entity.yddh}, #{entity.cz}, #{entity.chjljrychqk}, #{entity.xtyh}, #{entity.bm}, #{entity.cjr})
  279. </foreach>
  280. on duplicate key update
  281. DW = values(DW),
  282. XM = values(XM),
  283. XB = values(XB),
  284. MZ = values(MZ),
  285. CSD = values(CSD),
  286. CSRQ = values(CSRQ),
  287. DP = values(DP),
  288. HGHQ = values(HGHQ),
  289. GZDW = values(GZDW),
  290. GDDH = values(GDDH),
  291. JTZZ1 = values(JTZZ1),
  292. ZZDH = values(ZZDH),
  293. TXDZ1 = values(TXDZ1),
  294. DZYJ = values(DZYJ),
  295. BYXX = values(BYXX),
  296. XL = values(XL),
  297. XW = values(XW),
  298. ZC = values(ZC),
  299. ZYZC = values(ZYZC),
  300. BYSJ = values(BYSJ),
  301. WYYZ = values(WYYZ),
  302. SLCD = values(SLCD),
  303. CSDZ = values(CSDZ),
  304. JTZZ2 = values(JTZZ2),
  305. YZBM = values(YZBM),
  306. TXDZ2 = values(TXDZ2),
  307. GJKJBXKLY = values(GJKJBXKLY),
  308. GJJJWXKLY = values(GJJJWXKLY),
  309. SYGB = values(SYGB),
  310. SYNF = values(SYNF),
  311. YS = values(YS),
  312. BSH = values(BSH),
  313. YDDH = values(YDDH),
  314. CZ = values(CZ),
  315. CHJLJRYCHQK = values(CHJLJRYCHQK),
  316. XTYH = values(XTYH),
  317. BM = values(BM),
  318. CJR = values(CJR)
  319. </insert>
  320. <!--通过主键修改数据-->
  321. <update id="update">
  322. update base_Person
  323. set
  324. DW = #{dw},
  325. XM = #{xm},
  326. XB = #{xb},
  327. MZ = #{mz},
  328. CSDZ = #{csdz},
  329. CSRQ = #{csrq},
  330. DP = #{dp},
  331. HGHQ = #{hghq},
  332. GDDH = #{gddh},
  333. JTZZ1 = #{jtzz1},
  334. ZZDH = #{zzdh},
  335. TXDZ1 = #{txdz1},
  336. DZYJ = #{dzyj},
  337. BYXX = #{byxx},
  338. XL = #{xl},
  339. XW = #{xw},
  340. ZC = #{zc},
  341. ZYZC = #{zyzc},
  342. BYSJ = #{bysj},
  343. WYYZ = #{wyyz},
  344. SLCD = #{slcd},
  345. YZBM = #{yzbm},
  346. GJKJBXKLY = #{gjkjbxkly},
  347. GJJJWXKLY = #{gjjjwxkly},
  348. SYGB = #{sygb},
  349. SYNF = #{synf},
  350. YS = #{ys},
  351. BSH = #{bsh},
  352. YDDH = #{yddh},
  353. CZ = #{cz},
  354. CHJLJRYCHQK = #{chjljrychqk},
  355. BM = #{bm}
  356. where ID = #{id}
  357. </update>
  358. <!--通过主键删除-->
  359. <delete id="deleteById">
  360. delete from base_Person where ID = #{id}
  361. </delete>
  362. <!--统计总行数-->
  363. <select id="count" resultType="java.lang.Long">
  364. select count(1)
  365. from base_Person p left join base_Company c on p.DW = c.ID
  366. left join sys_dept_info d on d.dept_id = p.BM
  367. <where>
  368. <if test="dwmc != null and dwmc != ''">
  369. and c.MC = #{dwcm}
  370. </if>
  371. <if test="xm != null and xm != ''">
  372. and p.XM = #{xm}
  373. </if>
  374. <if test="bmmc != null and bmmc != null">
  375. and d.dept_name = #{bmmc}
  376. </if>
  377. </where>
  378. </select>
  379. <!--分页查询-->
  380. <select id="getBasePersonList" resultMap="BasePersonMap" parameterType="map">
  381. select p.*, c.MC as DWMC, d.dept_name as BMMC, e.MC as XLMC, z.name as ZCMC, t.name as DWXZMC
  382. from base_Person p
  383. left join base_Company c on p.DW = c.ID
  384. left join sys_dept_info d on p.BM = d.dept_id
  385. left join base_Education e on p.XL = e.ID
  386. left join base_Title z on p.ZC = z.id
  387. left join base_CompanyType t on c.DWXZ = t.id
  388. where 1=1
  389. <if test="dwmc != null and dwmc != ''">
  390. and c.MC like '%'+#{dwmc}+'%'
  391. </if>
  392. <if test="xm != null and xm != ''">
  393. and p.XM like '%'+#{xm}+'%'
  394. </if>
  395. <if test="bmmc != null and bmmc != ''">
  396. and d.dept_name like '%'+#{bmmc}+'%'
  397. </if>
  398. order by p.ID asc
  399. </select>
  400. <!--获取项目负责人-->
  401. <select id="getDKYFZR" resultType="map">
  402. select p.ID as code, p.XM as name
  403. from base_Person p left join base_Company c on c.ID = p.DW
  404. </select>
  405. <!--批量删除单位-->
  406. <delete id="batchDelete" parameterType="java.util.ArrayList">
  407. delete from base_Person
  408. where ID in
  409. <foreach item="item" index="index" collection="idList" open = "(" separator = "," close = ")">
  410. #{item}
  411. </foreach>
  412. </delete>
  413. <!--获取单位人员-->
  414. <select id="getPersonListByDw" resultMap="BasePersonMap">
  415. select p.*, c.MC as DWMC
  416. from base_Person p
  417. left join base_Company c on p.DW = c.ID
  418. where DW = #{dw}
  419. <if test="xm != null and xm != ''">
  420. and p.XM like '%'+#{xm}+'%'
  421. </if>
  422. order by p.ID asc
  423. </select>
  424. </mapper>