PersonnelDossierMapper.xml 40 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993
  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.goafanti.common.dao.PersonnelDossierMapper">
  4. <resultMap id="BaseResultMap" type="com.goafanti.common.model.PersonnelDossier">
  5. <!--
  6. WARNING - @mbg.generated
  7. This element is automatically generated by MyBatis Generator, do not modify.
  8. This element was generated on Wed May 20 08:47:14 CST 2020.
  9. -->
  10. <id column="id" jdbcType="INTEGER" property="id" />
  11. <result column="aid" jdbcType="VARCHAR" property="aid" />
  12. <result column="door_id" jdbcType="INTEGER" property="doorId" />
  13. <result column="name" jdbcType="VARCHAR" property="name" />
  14. <result column="birthday" jdbcType="TIMESTAMP" property="birthday" />
  15. <result column="sex" jdbcType="INTEGER" property="sex" />
  16. <result column="mobile" jdbcType="VARCHAR" property="mobile" />
  17. <result column="fixed_tel" jdbcType="VARCHAR" property="fixedTel" />
  18. <result column="nation" jdbcType="VARCHAR" property="nation" />
  19. <result column="residence_province" jdbcType="INTEGER" property="residenceProvince" />
  20. <result column="residence_city" jdbcType="INTEGER" property="residenceCity" />
  21. <result column="residence_area" jdbcType="INTEGER" property="residenceArea" />
  22. <result column="residence_address" jdbcType="VARCHAR" property="residenceAddress" />
  23. <result column="native_place_province" jdbcType="INTEGER" property="nativePlaceProvince" />
  24. <result column="native_place_city" jdbcType="INTEGER" property="nativePlaceCity" />
  25. <result column="now_province" jdbcType="INTEGER" property="nowProvince" />
  26. <result column="now_city" jdbcType="INTEGER" property="nowCity" />
  27. <result column="now_area" jdbcType="INTEGER" property="nowArea" />
  28. <result column="now_address" jdbcType="VARCHAR" property="nowAddress" />
  29. <result column="id_card" jdbcType="VARCHAR" property="idCard" />
  30. <result column="certification_authority" jdbcType="VARCHAR" property="certificationAuthority" />
  31. <result column="marriage" jdbcType="INTEGER" property="marriage" />
  32. <result column="political_outlook" jdbcType="INTEGER" property="politicalOutlook" />
  33. <result column="son" jdbcType="INTEGER" property="son" />
  34. <result column="girl" jdbcType="INTEGER" property="girl" />
  35. <result column="status" jdbcType="INTEGER" property="status" />
  36. <result column="system" jdbcType="INTEGER" property="system" />
  37. <result column="job_nature" jdbcType="INTEGER" property="jobNature" />
  38. <result column="job_nature_remarks" jdbcType="VARCHAR" property="jobNatureRemarks" />
  39. <result column="entry_time" jdbcType="TIMESTAMP" property="entryTime" />
  40. <result column="promotion_time" jdbcType="TIMESTAMP" property="promotionTime" />
  41. <result column="company" jdbcType="VARCHAR" property="company" />
  42. <result column="lvl" jdbcType="INTEGER" property="lvl" />
  43. <result column="jobs" jdbcType="INTEGER" property="jobs" />
  44. <result column="star" jdbcType="INTEGER" property="star" />
  45. <result column="allowance" jdbcType="DECIMAL" property="allowance" />
  46. <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
  47. <result column="employee_id" jdbcType="INTEGER" property="employeeId" />
  48. </resultMap>
  49. <sql id="Example_Where_Clause">
  50. <!--
  51. WARNING - @mbg.generated
  52. This element is automatically generated by MyBatis Generator, do not modify.
  53. This element was generated on Wed May 20 08:47:14 CST 2020.
  54. -->
  55. <where>
  56. <foreach collection="oredCriteria" item="criteria" separator="or">
  57. <if test="criteria.valid">
  58. <trim prefix="(" prefixOverrides="and" suffix=")">
  59. <foreach collection="criteria.criteria" item="criterion">
  60. <choose>
  61. <when test="criterion.noValue">
  62. and ${criterion.condition}
  63. </when>
  64. <when test="criterion.singleValue">
  65. and ${criterion.condition} #{criterion.value}
  66. </when>
  67. <when test="criterion.betweenValue">
  68. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  69. </when>
  70. <when test="criterion.listValue">
  71. and ${criterion.condition}
  72. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  73. #{listItem}
  74. </foreach>
  75. </when>
  76. </choose>
  77. </foreach>
  78. </trim>
  79. </if>
  80. </foreach>
  81. </where>
  82. </sql>
  83. <sql id="Update_By_Example_Where_Clause">
  84. <!--
  85. WARNING - @mbg.generated
  86. This element is automatically generated by MyBatis Generator, do not modify.
  87. This element was generated on Wed May 20 08:47:14 CST 2020.
  88. -->
  89. <where>
  90. <foreach collection="example.oredCriteria" item="criteria" separator="or">
  91. <if test="criteria.valid">
  92. <trim prefix="(" prefixOverrides="and" suffix=")">
  93. <foreach collection="criteria.criteria" item="criterion">
  94. <choose>
  95. <when test="criterion.noValue">
  96. and ${criterion.condition}
  97. </when>
  98. <when test="criterion.singleValue">
  99. and ${criterion.condition} #{criterion.value}
  100. </when>
  101. <when test="criterion.betweenValue">
  102. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  103. </when>
  104. <when test="criterion.listValue">
  105. and ${criterion.condition}
  106. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  107. #{listItem}
  108. </foreach>
  109. </when>
  110. </choose>
  111. </foreach>
  112. </trim>
  113. </if>
  114. </foreach>
  115. </where>
  116. </sql>
  117. <sql id="Base_Column_List">
  118. <!--
  119. WARNING - @mbg.generated
  120. This element is automatically generated by MyBatis Generator, do not modify.
  121. This element was generated on Wed May 20 08:47:14 CST 2020.
  122. -->
  123. id, aid, door_id, name, birthday, sex, mobile, fixed_tel, nation, residence_province,
  124. residence_city, residence_area, residence_address, native_place_province, native_place_city,
  125. now_province, now_city, now_area, now_address, id_card, certification_authority,
  126. marriage, political_outlook, son, girl, status, system, job_nature, job_nature_remarks,
  127. entry_time, promotion_time, company, lvl, jobs, star, allowance, create_time, employee_id
  128. </sql>
  129. <select id="selectByExample" parameterType="com.goafanti.common.model.PersonnelDossierExample" resultMap="BaseResultMap">
  130. <!--
  131. WARNING - @mbg.generated
  132. This element is automatically generated by MyBatis Generator, do not modify.
  133. This element was generated on Wed May 20 08:47:14 CST 2020.
  134. -->
  135. select
  136. <if test="distinct">
  137. distinct
  138. </if>
  139. <include refid="Base_Column_List" />
  140. from personnel_dossier
  141. <if test="_parameter != null">
  142. <include refid="Example_Where_Clause" />
  143. </if>
  144. <if test="orderByClause != null">
  145. order by ${orderByClause}
  146. </if>
  147. </select>
  148. <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
  149. <!--
  150. WARNING - @mbg.generated
  151. This element is automatically generated by MyBatis Generator, do not modify.
  152. This element was generated on Wed May 20 08:47:14 CST 2020.
  153. -->
  154. select
  155. <include refid="Base_Column_List" />
  156. from personnel_dossier
  157. where id = #{id,jdbcType=INTEGER}
  158. </select>
  159. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
  160. <!--
  161. WARNING - @mbg.generated
  162. This element is automatically generated by MyBatis Generator, do not modify.
  163. This element was generated on Wed May 20 08:47:14 CST 2020.
  164. -->
  165. delete from personnel_dossier
  166. where id = #{id,jdbcType=INTEGER}
  167. </delete>
  168. <delete id="deleteByExample" parameterType="com.goafanti.common.model.PersonnelDossierExample">
  169. <!--
  170. WARNING - @mbg.generated
  171. This element is automatically generated by MyBatis Generator, do not modify.
  172. This element was generated on Wed May 20 08:47:14 CST 2020.
  173. -->
  174. delete from personnel_dossier
  175. <if test="_parameter != null">
  176. <include refid="Example_Where_Clause" />
  177. </if>
  178. </delete>
  179. <insert id="insert" parameterType="com.goafanti.common.model.PersonnelDossier">
  180. <!--
  181. WARNING - @mbg.generated
  182. This element is automatically generated by MyBatis Generator, do not modify.
  183. This element was generated on Wed May 20 08:47:14 CST 2020.
  184. -->
  185. insert into personnel_dossier (id, aid, door_id,
  186. name, birthday, sex,
  187. mobile, fixed_tel, nation,
  188. residence_province, residence_city, residence_area,
  189. residence_address, native_place_province,
  190. native_place_city, now_province, now_city,
  191. now_area, now_address, id_card,
  192. certification_authority, marriage, political_outlook,
  193. son, girl, status,
  194. system, job_nature, job_nature_remarks,
  195. entry_time, promotion_time, company,
  196. lvl, jobs, star, allowance,
  197. create_time, employee_id)
  198. values (#{id,jdbcType=INTEGER}, #{aid,jdbcType=VARCHAR}, #{doorId,jdbcType=INTEGER},
  199. #{name,jdbcType=VARCHAR}, #{birthday,jdbcType=TIMESTAMP}, #{sex,jdbcType=INTEGER},
  200. #{mobile,jdbcType=VARCHAR}, #{fixedTel,jdbcType=VARCHAR}, #{nation,jdbcType=VARCHAR},
  201. #{residenceProvince,jdbcType=INTEGER}, #{residenceCity,jdbcType=INTEGER}, #{residenceArea,jdbcType=INTEGER},
  202. #{residenceAddress,jdbcType=VARCHAR}, #{nativePlaceProvince,jdbcType=INTEGER},
  203. #{nativePlaceCity,jdbcType=INTEGER}, #{nowProvince,jdbcType=INTEGER}, #{nowCity,jdbcType=INTEGER},
  204. #{nowArea,jdbcType=INTEGER}, #{nowAddress,jdbcType=VARCHAR}, #{idCard,jdbcType=VARCHAR},
  205. #{certificationAuthority,jdbcType=VARCHAR}, #{marriage,jdbcType=INTEGER}, #{politicalOutlook,jdbcType=INTEGER},
  206. #{son,jdbcType=INTEGER}, #{girl,jdbcType=INTEGER}, #{status,jdbcType=INTEGER},
  207. #{system,jdbcType=INTEGER}, #{jobNature,jdbcType=INTEGER}, #{jobNatureRemarks,jdbcType=VARCHAR},
  208. #{entryTime,jdbcType=TIMESTAMP}, #{promotionTime,jdbcType=TIMESTAMP}, #{company,jdbcType=VARCHAR},
  209. #{lvl,jdbcType=INTEGER}, #{jobs,jdbcType=INTEGER}, #{star,jdbcType=INTEGER}, #{allowance,jdbcType=DECIMAL},
  210. #{createTime,jdbcType=TIMESTAMP}, #{employeeId,jdbcType=INTEGER})
  211. </insert>
  212. <insert id="insertSelective" parameterType="com.goafanti.common.model.PersonnelDossier">
  213. <!--
  214. WARNING - @mbg.generated
  215. This element is automatically generated by MyBatis Generator, do not modify.
  216. This element was generated on Wed May 20 08:47:14 CST 2020.
  217. -->
  218. insert into personnel_dossier
  219. <trim prefix="(" suffix=")" suffixOverrides=",">
  220. <if test="id != null">
  221. id,
  222. </if>
  223. <if test="aid != null">
  224. aid,
  225. </if>
  226. <if test="doorId != null">
  227. door_id,
  228. </if>
  229. <if test="name != null">
  230. name,
  231. </if>
  232. <if test="birthday != null">
  233. birthday,
  234. </if>
  235. <if test="sex != null">
  236. sex,
  237. </if>
  238. <if test="mobile != null">
  239. mobile,
  240. </if>
  241. <if test="fixedTel != null">
  242. fixed_tel,
  243. </if>
  244. <if test="nation != null">
  245. nation,
  246. </if>
  247. <if test="residenceProvince != null">
  248. residence_province,
  249. </if>
  250. <if test="residenceCity != null">
  251. residence_city,
  252. </if>
  253. <if test="residenceArea != null">
  254. residence_area,
  255. </if>
  256. <if test="residenceAddress != null">
  257. residence_address,
  258. </if>
  259. <if test="nativePlaceProvince != null">
  260. native_place_province,
  261. </if>
  262. <if test="nativePlaceCity != null">
  263. native_place_city,
  264. </if>
  265. <if test="nowProvince != null">
  266. now_province,
  267. </if>
  268. <if test="nowCity != null">
  269. now_city,
  270. </if>
  271. <if test="nowArea != null">
  272. now_area,
  273. </if>
  274. <if test="nowAddress != null">
  275. now_address,
  276. </if>
  277. <if test="idCard != null">
  278. id_card,
  279. </if>
  280. <if test="certificationAuthority != null">
  281. certification_authority,
  282. </if>
  283. <if test="marriage != null">
  284. marriage,
  285. </if>
  286. <if test="politicalOutlook != null">
  287. political_outlook,
  288. </if>
  289. <if test="son != null">
  290. son,
  291. </if>
  292. <if test="girl != null">
  293. girl,
  294. </if>
  295. <if test="status != null">
  296. status,
  297. </if>
  298. <if test="system != null">
  299. system,
  300. </if>
  301. <if test="jobNature != null">
  302. job_nature,
  303. </if>
  304. <if test="jobNatureRemarks != null">
  305. job_nature_remarks,
  306. </if>
  307. <if test="entryTime != null">
  308. entry_time,
  309. </if>
  310. <if test="promotionTime != null">
  311. promotion_time,
  312. </if>
  313. <if test="company != null">
  314. company,
  315. </if>
  316. <if test="lvl != null">
  317. lvl,
  318. </if>
  319. <if test="jobs != null">
  320. jobs,
  321. </if>
  322. <if test="star != null">
  323. star,
  324. </if>
  325. <if test="allowance != null">
  326. allowance,
  327. </if>
  328. <if test="createTime != null">
  329. create_time,
  330. </if>
  331. <if test="employeeId != null">
  332. employee_id,
  333. </if>
  334. </trim>
  335. <trim prefix="values (" suffix=")" suffixOverrides=",">
  336. <if test="id != null">
  337. #{id,jdbcType=INTEGER},
  338. </if>
  339. <if test="aid != null">
  340. #{aid,jdbcType=VARCHAR},
  341. </if>
  342. <if test="doorId != null">
  343. #{doorId,jdbcType=INTEGER},
  344. </if>
  345. <if test="name != null">
  346. #{name,jdbcType=VARCHAR},
  347. </if>
  348. <if test="birthday != null">
  349. #{birthday,jdbcType=TIMESTAMP},
  350. </if>
  351. <if test="sex != null">
  352. #{sex,jdbcType=INTEGER},
  353. </if>
  354. <if test="mobile != null">
  355. #{mobile,jdbcType=VARCHAR},
  356. </if>
  357. <if test="fixedTel != null">
  358. #{fixedTel,jdbcType=VARCHAR},
  359. </if>
  360. <if test="nation != null">
  361. #{nation,jdbcType=VARCHAR},
  362. </if>
  363. <if test="residenceProvince != null">
  364. #{residenceProvince,jdbcType=INTEGER},
  365. </if>
  366. <if test="residenceCity != null">
  367. #{residenceCity,jdbcType=INTEGER},
  368. </if>
  369. <if test="residenceArea != null">
  370. #{residenceArea,jdbcType=INTEGER},
  371. </if>
  372. <if test="residenceAddress != null">
  373. #{residenceAddress,jdbcType=VARCHAR},
  374. </if>
  375. <if test="nativePlaceProvince != null">
  376. #{nativePlaceProvince,jdbcType=INTEGER},
  377. </if>
  378. <if test="nativePlaceCity != null">
  379. #{nativePlaceCity,jdbcType=INTEGER},
  380. </if>
  381. <if test="nowProvince != null">
  382. #{nowProvince,jdbcType=INTEGER},
  383. </if>
  384. <if test="nowCity != null">
  385. #{nowCity,jdbcType=INTEGER},
  386. </if>
  387. <if test="nowArea != null">
  388. #{nowArea,jdbcType=INTEGER},
  389. </if>
  390. <if test="nowAddress != null">
  391. #{nowAddress,jdbcType=VARCHAR},
  392. </if>
  393. <if test="idCard != null">
  394. #{idCard,jdbcType=VARCHAR},
  395. </if>
  396. <if test="certificationAuthority != null">
  397. #{certificationAuthority,jdbcType=VARCHAR},
  398. </if>
  399. <if test="marriage != null">
  400. #{marriage,jdbcType=INTEGER},
  401. </if>
  402. <if test="politicalOutlook != null">
  403. #{politicalOutlook,jdbcType=INTEGER},
  404. </if>
  405. <if test="son != null">
  406. #{son,jdbcType=INTEGER},
  407. </if>
  408. <if test="girl != null">
  409. #{girl,jdbcType=INTEGER},
  410. </if>
  411. <if test="status != null">
  412. #{status,jdbcType=INTEGER},
  413. </if>
  414. <if test="system != null">
  415. #{system,jdbcType=INTEGER},
  416. </if>
  417. <if test="jobNature != null">
  418. #{jobNature,jdbcType=INTEGER},
  419. </if>
  420. <if test="jobNatureRemarks != null">
  421. #{jobNatureRemarks,jdbcType=VARCHAR},
  422. </if>
  423. <if test="entryTime != null">
  424. #{entryTime,jdbcType=TIMESTAMP},
  425. </if>
  426. <if test="promotionTime != null">
  427. #{promotionTime,jdbcType=TIMESTAMP},
  428. </if>
  429. <if test="company != null">
  430. #{company,jdbcType=VARCHAR},
  431. </if>
  432. <if test="lvl != null">
  433. #{lvl,jdbcType=INTEGER},
  434. </if>
  435. <if test="jobs != null">
  436. #{jobs,jdbcType=INTEGER},
  437. </if>
  438. <if test="star != null">
  439. #{star,jdbcType=INTEGER},
  440. </if>
  441. <if test="allowance != null">
  442. #{allowance,jdbcType=DECIMAL},
  443. </if>
  444. <if test="createTime != null">
  445. #{createTime,jdbcType=TIMESTAMP},
  446. </if>
  447. <if test="employeeId != null">
  448. #{employeeId,jdbcType=INTEGER},
  449. </if>
  450. </trim>
  451. </insert>
  452. <select id="countByExample" parameterType="com.goafanti.common.model.PersonnelDossierExample" resultType="java.lang.Long">
  453. <!--
  454. WARNING - @mbg.generated
  455. This element is automatically generated by MyBatis Generator, do not modify.
  456. This element was generated on Wed May 20 08:47:14 CST 2020.
  457. -->
  458. select count(*) from personnel_dossier
  459. <if test="_parameter != null">
  460. <include refid="Example_Where_Clause" />
  461. </if>
  462. </select>
  463. <update id="updateByExampleSelective" parameterType="map">
  464. <!--
  465. WARNING - @mbg.generated
  466. This element is automatically generated by MyBatis Generator, do not modify.
  467. This element was generated on Wed May 20 08:47:14 CST 2020.
  468. -->
  469. update personnel_dossier
  470. <set>
  471. <if test="record.id != null">
  472. id = #{record.id,jdbcType=INTEGER},
  473. </if>
  474. <if test="record.aid != null">
  475. aid = #{record.aid,jdbcType=VARCHAR},
  476. </if>
  477. <if test="record.doorId != null">
  478. door_id = #{record.doorId,jdbcType=INTEGER},
  479. </if>
  480. <if test="record.name != null">
  481. name = #{record.name,jdbcType=VARCHAR},
  482. </if>
  483. <if test="record.birthday != null">
  484. birthday = #{record.birthday,jdbcType=TIMESTAMP},
  485. </if>
  486. <if test="record.sex != null">
  487. sex = #{record.sex,jdbcType=INTEGER},
  488. </if>
  489. <if test="record.mobile != null">
  490. mobile = #{record.mobile,jdbcType=VARCHAR},
  491. </if>
  492. <if test="record.fixedTel != null">
  493. fixed_tel = #{record.fixedTel,jdbcType=VARCHAR},
  494. </if>
  495. <if test="record.nation != null">
  496. nation = #{record.nation,jdbcType=VARCHAR},
  497. </if>
  498. <if test="record.residenceProvince != null">
  499. residence_province = #{record.residenceProvince,jdbcType=INTEGER},
  500. </if>
  501. <if test="record.residenceCity != null">
  502. residence_city = #{record.residenceCity,jdbcType=INTEGER},
  503. </if>
  504. <if test="record.residenceArea != null">
  505. residence_area = #{record.residenceArea,jdbcType=INTEGER},
  506. </if>
  507. <if test="record.residenceAddress != null">
  508. residence_address = #{record.residenceAddress,jdbcType=VARCHAR},
  509. </if>
  510. <if test="record.nativePlaceProvince != null">
  511. native_place_province = #{record.nativePlaceProvince,jdbcType=INTEGER},
  512. </if>
  513. <if test="record.nativePlaceCity != null">
  514. native_place_city = #{record.nativePlaceCity,jdbcType=INTEGER},
  515. </if>
  516. <if test="record.nowProvince != null">
  517. now_province = #{record.nowProvince,jdbcType=INTEGER},
  518. </if>
  519. <if test="record.nowCity != null">
  520. now_city = #{record.nowCity,jdbcType=INTEGER},
  521. </if>
  522. <if test="record.nowArea != null">
  523. now_area = #{record.nowArea,jdbcType=INTEGER},
  524. </if>
  525. <if test="record.nowAddress != null">
  526. now_address = #{record.nowAddress,jdbcType=VARCHAR},
  527. </if>
  528. <if test="record.idCard != null">
  529. id_card = #{record.idCard,jdbcType=VARCHAR},
  530. </if>
  531. <if test="record.certificationAuthority != null">
  532. certification_authority = #{record.certificationAuthority,jdbcType=VARCHAR},
  533. </if>
  534. <if test="record.marriage != null">
  535. marriage = #{record.marriage,jdbcType=INTEGER},
  536. </if>
  537. <if test="record.politicalOutlook != null">
  538. political_outlook = #{record.politicalOutlook,jdbcType=INTEGER},
  539. </if>
  540. <if test="record.son != null">
  541. son = #{record.son,jdbcType=INTEGER},
  542. </if>
  543. <if test="record.girl != null">
  544. girl = #{record.girl,jdbcType=INTEGER},
  545. </if>
  546. <if test="record.status != null">
  547. status = #{record.status,jdbcType=INTEGER},
  548. </if>
  549. <if test="record.system != null">
  550. system = #{record.system,jdbcType=INTEGER},
  551. </if>
  552. <if test="record.jobNature != null">
  553. job_nature = #{record.jobNature,jdbcType=INTEGER},
  554. </if>
  555. <if test="record.jobNatureRemarks != null">
  556. job_nature_remarks = #{record.jobNatureRemarks,jdbcType=VARCHAR},
  557. </if>
  558. <if test="record.entryTime != null">
  559. entry_time = #{record.entryTime,jdbcType=TIMESTAMP},
  560. </if>
  561. <if test="record.promotionTime != null">
  562. promotion_time = #{record.promotionTime,jdbcType=TIMESTAMP},
  563. </if>
  564. <if test="record.company != null">
  565. company = #{record.company,jdbcType=VARCHAR},
  566. </if>
  567. <if test="record.lvl != null">
  568. lvl = #{record.lvl,jdbcType=INTEGER},
  569. </if>
  570. <if test="record.jobs != null">
  571. jobs = #{record.jobs,jdbcType=INTEGER},
  572. </if>
  573. <if test="record.star != null">
  574. star = #{record.star,jdbcType=INTEGER},
  575. </if>
  576. <if test="record.allowance != null">
  577. allowance = #{record.allowance,jdbcType=DECIMAL},
  578. </if>
  579. <if test="record.createTime != null">
  580. create_time = #{record.createTime,jdbcType=TIMESTAMP},
  581. </if>
  582. <if test="record.employeeId != null">
  583. employee_id = #{record.employeeId,jdbcType=INTEGER},
  584. </if>
  585. </set>
  586. <if test="_parameter != null">
  587. <include refid="Update_By_Example_Where_Clause" />
  588. </if>
  589. </update>
  590. <update id="updateByExample" parameterType="map">
  591. <!--
  592. WARNING - @mbg.generated
  593. This element is automatically generated by MyBatis Generator, do not modify.
  594. This element was generated on Wed May 20 08:47:14 CST 2020.
  595. -->
  596. update personnel_dossier
  597. set id = #{record.id,jdbcType=INTEGER},
  598. aid = #{record.aid,jdbcType=VARCHAR},
  599. door_id = #{record.doorId,jdbcType=INTEGER},
  600. name = #{record.name,jdbcType=VARCHAR},
  601. birthday = #{record.birthday,jdbcType=TIMESTAMP},
  602. sex = #{record.sex,jdbcType=INTEGER},
  603. mobile = #{record.mobile,jdbcType=VARCHAR},
  604. fixed_tel = #{record.fixedTel,jdbcType=VARCHAR},
  605. nation = #{record.nation,jdbcType=VARCHAR},
  606. residence_province = #{record.residenceProvince,jdbcType=INTEGER},
  607. residence_city = #{record.residenceCity,jdbcType=INTEGER},
  608. residence_area = #{record.residenceArea,jdbcType=INTEGER},
  609. residence_address = #{record.residenceAddress,jdbcType=VARCHAR},
  610. native_place_province = #{record.nativePlaceProvince,jdbcType=INTEGER},
  611. native_place_city = #{record.nativePlaceCity,jdbcType=INTEGER},
  612. now_province = #{record.nowProvince,jdbcType=INTEGER},
  613. now_city = #{record.nowCity,jdbcType=INTEGER},
  614. now_area = #{record.nowArea,jdbcType=INTEGER},
  615. now_address = #{record.nowAddress,jdbcType=VARCHAR},
  616. id_card = #{record.idCard,jdbcType=VARCHAR},
  617. certification_authority = #{record.certificationAuthority,jdbcType=VARCHAR},
  618. marriage = #{record.marriage,jdbcType=INTEGER},
  619. political_outlook = #{record.politicalOutlook,jdbcType=INTEGER},
  620. son = #{record.son,jdbcType=INTEGER},
  621. girl = #{record.girl,jdbcType=INTEGER},
  622. status = #{record.status,jdbcType=INTEGER},
  623. system = #{record.system,jdbcType=INTEGER},
  624. job_nature = #{record.jobNature,jdbcType=INTEGER},
  625. job_nature_remarks = #{record.jobNatureRemarks,jdbcType=VARCHAR},
  626. entry_time = #{record.entryTime,jdbcType=TIMESTAMP},
  627. promotion_time = #{record.promotionTime,jdbcType=TIMESTAMP},
  628. company = #{record.company,jdbcType=VARCHAR},
  629. lvl = #{record.lvl,jdbcType=INTEGER},
  630. jobs = #{record.jobs,jdbcType=INTEGER},
  631. star = #{record.star,jdbcType=INTEGER},
  632. allowance = #{record.allowance,jdbcType=DECIMAL},
  633. create_time = #{record.createTime,jdbcType=TIMESTAMP},
  634. employee_id = #{record.employeeId,jdbcType=INTEGER}
  635. <if test="_parameter != null">
  636. <include refid="Update_By_Example_Where_Clause" />
  637. </if>
  638. </update>
  639. <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.PersonnelDossier">
  640. <!--
  641. WARNING - @mbg.generated
  642. This element is automatically generated by MyBatis Generator, do not modify.
  643. This element was generated on Wed May 20 08:47:14 CST 2020.
  644. -->
  645. update personnel_dossier
  646. <set>
  647. <if test="aid != null">
  648. aid = #{aid,jdbcType=VARCHAR},
  649. </if>
  650. <if test="doorId != null">
  651. door_id = #{doorId,jdbcType=INTEGER},
  652. </if>
  653. <if test="name != null">
  654. name = #{name,jdbcType=VARCHAR},
  655. </if>
  656. <if test="birthday != null">
  657. birthday = #{birthday,jdbcType=TIMESTAMP},
  658. </if>
  659. <if test="sex != null">
  660. sex = #{sex,jdbcType=INTEGER},
  661. </if>
  662. <if test="mobile != null">
  663. mobile = #{mobile,jdbcType=VARCHAR},
  664. </if>
  665. <if test="fixedTel != null">
  666. fixed_tel = #{fixedTel,jdbcType=VARCHAR},
  667. </if>
  668. <if test="nation != null">
  669. nation = #{nation,jdbcType=VARCHAR},
  670. </if>
  671. <if test="residenceProvince != null">
  672. residence_province = #{residenceProvince,jdbcType=INTEGER},
  673. </if>
  674. <if test="residenceCity != null">
  675. residence_city = #{residenceCity,jdbcType=INTEGER},
  676. </if>
  677. <if test="residenceArea != null">
  678. residence_area = #{residenceArea,jdbcType=INTEGER},
  679. </if>
  680. <if test="residenceAddress != null">
  681. residence_address = #{residenceAddress,jdbcType=VARCHAR},
  682. </if>
  683. <if test="nativePlaceProvince != null">
  684. native_place_province = #{nativePlaceProvince,jdbcType=INTEGER},
  685. </if>
  686. <if test="nativePlaceCity != null">
  687. native_place_city = #{nativePlaceCity,jdbcType=INTEGER},
  688. </if>
  689. <if test="nowProvince != null">
  690. now_province = #{nowProvince,jdbcType=INTEGER},
  691. </if>
  692. <if test="nowCity != null">
  693. now_city = #{nowCity,jdbcType=INTEGER},
  694. </if>
  695. <if test="nowArea != null">
  696. now_area = #{nowArea,jdbcType=INTEGER},
  697. </if>
  698. <if test="nowAddress != null">
  699. now_address = #{nowAddress,jdbcType=VARCHAR},
  700. </if>
  701. <if test="idCard != null">
  702. id_card = #{idCard,jdbcType=VARCHAR},
  703. </if>
  704. <if test="certificationAuthority != null">
  705. certification_authority = #{certificationAuthority,jdbcType=VARCHAR},
  706. </if>
  707. <if test="marriage != null">
  708. marriage = #{marriage,jdbcType=INTEGER},
  709. </if>
  710. <if test="politicalOutlook != null">
  711. political_outlook = #{politicalOutlook,jdbcType=INTEGER},
  712. </if>
  713. <if test="son != null">
  714. son = #{son,jdbcType=INTEGER},
  715. </if>
  716. <if test="girl != null">
  717. girl = #{girl,jdbcType=INTEGER},
  718. </if>
  719. <if test="status != null">
  720. status = #{status,jdbcType=INTEGER},
  721. </if>
  722. <if test="system != null">
  723. system = #{system,jdbcType=INTEGER},
  724. </if>
  725. <if test="jobNature != null">
  726. job_nature = #{jobNature,jdbcType=INTEGER},
  727. </if>
  728. <if test="jobNatureRemarks != null">
  729. job_nature_remarks = #{jobNatureRemarks,jdbcType=VARCHAR},
  730. </if>
  731. <if test="entryTime != null">
  732. entry_time = #{entryTime,jdbcType=TIMESTAMP},
  733. </if>
  734. <if test="promotionTime != null">
  735. promotion_time = #{promotionTime,jdbcType=TIMESTAMP},
  736. </if>
  737. <if test="company != null">
  738. company = #{company,jdbcType=VARCHAR},
  739. </if>
  740. <if test="lvl != null">
  741. lvl = #{lvl,jdbcType=INTEGER},
  742. </if>
  743. <if test="jobs != null">
  744. jobs = #{jobs,jdbcType=INTEGER},
  745. </if>
  746. <if test="star != null">
  747. star = #{star,jdbcType=INTEGER},
  748. </if>
  749. <if test="allowance != null">
  750. allowance = #{allowance,jdbcType=DECIMAL},
  751. </if>
  752. <if test="createTime != null">
  753. create_time = #{createTime,jdbcType=TIMESTAMP},
  754. </if>
  755. <if test="employeeId != null">
  756. employee_id = #{employeeId,jdbcType=INTEGER},
  757. </if>
  758. </set>
  759. where id = #{id,jdbcType=INTEGER}
  760. </update>
  761. <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.PersonnelDossier">
  762. <!--
  763. WARNING - @mbg.generated
  764. This element is automatically generated by MyBatis Generator, do not modify.
  765. This element was generated on Wed May 20 08:47:14 CST 2020.
  766. -->
  767. update personnel_dossier
  768. set aid = #{aid,jdbcType=VARCHAR},
  769. door_id = #{doorId,jdbcType=INTEGER},
  770. name = #{name,jdbcType=VARCHAR},
  771. birthday = #{birthday,jdbcType=TIMESTAMP},
  772. sex = #{sex,jdbcType=INTEGER},
  773. mobile = #{mobile,jdbcType=VARCHAR},
  774. fixed_tel = #{fixedTel,jdbcType=VARCHAR},
  775. nation = #{nation,jdbcType=VARCHAR},
  776. residence_province = #{residenceProvince,jdbcType=INTEGER},
  777. residence_city = #{residenceCity,jdbcType=INTEGER},
  778. residence_area = #{residenceArea,jdbcType=INTEGER},
  779. residence_address = #{residenceAddress,jdbcType=VARCHAR},
  780. native_place_province = #{nativePlaceProvince,jdbcType=INTEGER},
  781. native_place_city = #{nativePlaceCity,jdbcType=INTEGER},
  782. now_province = #{nowProvince,jdbcType=INTEGER},
  783. now_city = #{nowCity,jdbcType=INTEGER},
  784. now_area = #{nowArea,jdbcType=INTEGER},
  785. now_address = #{nowAddress,jdbcType=VARCHAR},
  786. id_card = #{idCard,jdbcType=VARCHAR},
  787. certification_authority = #{certificationAuthority,jdbcType=VARCHAR},
  788. marriage = #{marriage,jdbcType=INTEGER},
  789. political_outlook = #{politicalOutlook,jdbcType=INTEGER},
  790. son = #{son,jdbcType=INTEGER},
  791. girl = #{girl,jdbcType=INTEGER},
  792. status = #{status,jdbcType=INTEGER},
  793. system = #{system,jdbcType=INTEGER},
  794. job_nature = #{jobNature,jdbcType=INTEGER},
  795. job_nature_remarks = #{jobNatureRemarks,jdbcType=VARCHAR},
  796. entry_time = #{entryTime,jdbcType=TIMESTAMP},
  797. promotion_time = #{promotionTime,jdbcType=TIMESTAMP},
  798. company = #{company,jdbcType=VARCHAR},
  799. lvl = #{lvl,jdbcType=INTEGER},
  800. jobs = #{jobs,jdbcType=INTEGER},
  801. star = #{star,jdbcType=INTEGER},
  802. allowance = #{allowance,jdbcType=DECIMAL},
  803. create_time = #{createTime,jdbcType=TIMESTAMP},
  804. employee_id = #{employeeId,jdbcType=INTEGER}
  805. where id = #{id,jdbcType=INTEGER}
  806. </update>
  807. <select id="checkDoorId" resultType="java.lang.Integer">
  808. select count(*) from personnel_dossier where door_id= #{doorId,jdbcType=INTEGER}
  809. <if test="id != null">
  810. and id != #{id}
  811. </if>
  812. </select>
  813. <select id="checkEmployeeId" resultType="java.lang.Integer">
  814. select count(*) from personnel_dossier where employee_id= #{employeeId,jdbcType=INTEGER}
  815. <if test="id != null">
  816. and id != #{id}
  817. </if>
  818. </select>
  819. <select id="selectPersonnelByList" resultType="com.goafanti.personnel.bo.OutPersonnelListBo">
  820. select a.id,a.door_id doorId,a.name,a.status,a.`system`,a.company,dep.name depName,a.marriage,a.job_nature jobNature,
  821. a.job_nature_remarks jobNatureRemarks,b.jobs_name jobsName,a.lvl,b.lvl_name starName,date_format(a.entry_time,'%Y-%m-%d')entryTimes,
  822. date_format(a.promotion_time,'%Y-%m-%d')promotionTimes,date_format(a.birthday,'%Y-%m-%d')birthdays,
  823. a.entry_time entryTime, a.sex,a.son,a.girl,a.political_outlook politicalOutlook,d.education,
  824. d.school,d.major,d.title,pm.promotion_remarks promotionRemarks,a.mobile,a.fixed_tel fixedTel,
  825. date_format(pm.promotion_time,'%Y-%m-%d') promotionTime,a.id_card idCard,a.birthday,a.employee_id employeeId,
  826. date_format(pm.contract_start_time, '%Y-%m-%d') contractStart,date_format(pm.contract_end_time,'%Y-%m-%d')contractEnd,
  827. a.certification_authority certificationAuthority, a.residence_address residenceAddress,a.now_address nowAddress,
  828. a.residence_province residenceProvince, a.residence_city residenceCity,a.residence_area residenceArea,
  829. da1.name rpName,da2.name rcName,da3.name raName,db1.name nppName,db2.name npcName,dc1.name npName,dc2.name ncName,
  830. dc3.name naName,a.native_place_province nativePlaceProvince, a.native_place_city nativePlaceCity,
  831. a.now_province nowProvince, a.now_city nowCity,a.now_area nowArea, date_format(pm.quit_time,'%Y-%m-%d') quitTime,
  832. pm.emergency_contact emergencyContact,pm.emergency_mobile emergencyMobile,
  833. date_format(pm.insurance_start_time,'%Y-%m-%d') insuranceStartTimes,date_format(pm.insurance_end_time,'%Y-%m-%d') insuranceEndTimes,
  834. date_format(pm.fund_start_time,'%Y-%m-%d') fundStartTimes,date_format(pm.fund_end_time,'%Y-%m-%d') fundEndTimes
  835. from personnel_dossier a left join admin_level b on a.jobs=b.jobs and a.star=b.lvl left join department dep on a.company = dep.id
  836. left join personnel_entry d on a.id=d.id left join personnel_mid pm on a.id=pm.id left join district_glossory da1 on a.residence_province=da1.id
  837. left join district_glossory da2 on a.residence_city=da2.id left join district_glossory da3 on a.residence_area=da3.id
  838. left join district_glossory db1 on a.native_place_province=db1.id left join district_glossory db2 on a.native_place_city=db2.id
  839. left join district_glossory dc1 on a.now_province=dc1.id left join district_glossory dc2 on a.now_city=dc2.id
  840. left join district_glossory dc3 on a.now_area=dc3.id
  841. <if test="aid !=null">
  842. left join admin ad on dep.id=ad.department_id
  843. </if>
  844. where 1=1
  845. <if test="aid !=null">
  846. and ad.id= #{aid}
  847. </if>
  848. <if test="i.name != null">
  849. and a.name like concat(#{i.name},'%')
  850. </if>
  851. <if test="i.company !=null">
  852. and a.company= #{i.company}
  853. </if>
  854. <if test="i.status !=null">
  855. and a.status= #{i.status}
  856. </if>
  857. <if test="i.sex !=null">
  858. and a.sex= #{i.sex}
  859. </if>
  860. <if test="i.marriage !=null">
  861. and a.marriage= #{i.marriage}
  862. </if>
  863. <if test="i.politicalOutlook !=null">
  864. and a.political_outlook= #{i.politicalOutlook}
  865. </if>
  866. <if test="i.birthdayMonth !=null">
  867. and month(a.birthday)= #{i.birthdayMonth}
  868. </if>
  869. <if test="i.promotionStart !=null and i.promotionEnd !=null">
  870. and a.promotion_time between #{i.promotionStart} and #{i.promotionEnd}
  871. </if>
  872. <if test="i.entryStart !=null and i.entryEnd !=null">
  873. and a.entry_time between #{i.entryStart} and #{i.entryEnd}
  874. </if>
  875. <if test="i.system !=null">
  876. and a.`system`= #{i.system}
  877. </if>
  878. <if test="i.workingYears ==0">
  879. and TIMESTAMPDIFF(year,a.entry_time,now()) between 0 and 1
  880. </if>
  881. <if test="i.workingYears ==1">
  882. and TIMESTAMPDIFF(year,a.entry_time,now()) between 1 and 3
  883. </if>
  884. <if test="i.workingYears ==2">
  885. and TIMESTAMPDIFF(year,a.entry_time,now()) between 3 and 10
  886. </if>
  887. <if test="i.workingYears ==3">
  888. and TIMESTAMPDIFF(year,a.entry_time,now()) between 10 and 99
  889. </if>
  890. <if test="i.quitStart !=null and i.quitEnd !=null">
  891. and pm.quit_time between #{i.quitStart} and #{i.quitEnd}
  892. </if>
  893. <if test="i.contractStart !=null and i.contractEnd !=null">
  894. and pm.contract_end_time between #{i.contractStart} and #{i.contractEnd}
  895. </if>
  896. <if test="i.education !=null">
  897. and d.education= #{i.education}
  898. </if>
  899. order by a.create_time desc
  900. <if test="page_sql!=null">
  901. ${page_sql}
  902. </if>
  903. </select>
  904. <select id="selectPersonnelByCount" resultType="java.lang.Integer">
  905. select count(*)
  906. from personnel_dossier a left join admin_level b on a.jobs=b.jobs and a.star=b.lvl left join department dep on a.company = dep.id
  907. left join personnel_entry d on a.id=d.id left join personnel_mid pm on a.id=pm.id
  908. <if test="aid !=null">
  909. left join admin ad on dep.id=ad.department_id
  910. </if>
  911. where 1=1
  912. <if test="aid !=null">
  913. and ad.id= #{aid}
  914. </if>
  915. <if test="i.name != null">
  916. and a.name like concat(#{i.name},'%')
  917. </if>
  918. <if test="i.company !=null">
  919. and a.company= #{i.company}
  920. </if>
  921. <if test="i.status !=null">
  922. and a.status= #{i.status}
  923. </if>
  924. <if test="i.sex !=null">
  925. and a.sex= #{i.sex}
  926. </if>
  927. <if test="i.marriage !=null">
  928. and a.marriage= #{i.marriage}
  929. </if>
  930. <if test="i.politicalOutlook !=null">
  931. and a.political_outlook= #{i.politicalOutlook}
  932. </if>
  933. <if test="i.birthdayMonth !=null">
  934. and month(a.birthday)= #{i.birthdayMonth}
  935. </if>
  936. <if test="i.promotionStart !=null and i.promotionEnd !=null">
  937. and a.promotion_time between #{i.promotionStart} and #{i.promotionEnd}
  938. </if>
  939. <if test="i.entryStart !=null and i.entryEnd !=null">
  940. and a.entry_time between #{i.entryStart} and #{i.entryEnd}
  941. </if>
  942. <if test="i.system !=null">
  943. and a.`system`= #{i.system}
  944. </if>
  945. <if test="i.workingYears ==0">
  946. and TIMESTAMPDIFF(year,a.entry_time,now()) between 0 and 1
  947. </if>
  948. <if test="i.workingYears ==1">
  949. and TIMESTAMPDIFF(year,a.entry_time,now()) between 1 and 3
  950. </if>
  951. <if test="i.workingYears ==2">
  952. and TIMESTAMPDIFF(year,a.entry_time,now()) between 3 and 10
  953. </if>
  954. <if test="i.workingYears ==3">
  955. and TIMESTAMPDIFF(year,a.entry_time,now()) between 10 and 99
  956. </if>
  957. <if test="i.quitStart !=null and i.quitEnd !=null">
  958. and pm.quit_time between #{i.quitStart} and #{i.quitEnd}
  959. </if>
  960. <if test="i.contractStart !=null and i.contractEnd !=null">
  961. and f.contract_end_time between #{i.contractStart} and #{i.contractEnd}
  962. </if>
  963. <if test="i.education !=null">
  964. and d.education= #{i.education}
  965. </if>
  966. </select>
  967. <select id="selectBypdId" resultType="com.goafanti.personnel.bo.OutPersonnelBo">
  968. select a.id,a.door_id doorId,a.name,a.status,a.`system`,a.company,dep.name depName,a.nation,a.marriage,a.job_nature jobNature,
  969. a.job_nature_remarks jobNatureRemarks, b.jobs_name jobsName,a.lvl,b.lvl_name starName,date_format(a.entry_time,'%Y-%m-%d')entryTimes,
  970. date_format(a.promotion_time,'%Y-%m-%d')promotionTimes,date_format(a.birthday,'%Y-%m-%d')birthdays,a.star,a.jobs,
  971. a.entry_time entryTime, a.sex,a.son,a.girl,a.political_outlook politicalOutlook,d.education,a.employee_id employeeId,
  972. d.school,d.major,d.title,m.promotion_remarks promotionRemarks,a.mobile,a.fixed_tel fixedTel,da1.name rpName,da2.name rcName,
  973. da3.name raName,db1.name nppName,db2.name npcName,dc1.name npName,dc2.name ncName, dc3.name naName,
  974. date_format(m.promotion_time,'%Y-%m-%d') promotionTime,a.id_card idCard,a.birthday,a.allowance,m.welfare_remarks welfareRemarks,
  975. a.certification_authority certificationAuthority, a.residence_province residenceProvince,m.welfare_annex_name welfareAnnexName,
  976. a.residence_city residenceCity,a.residence_area residenceArea, a.residence_address residenceAddress,
  977. a.native_place_province nativePlaceProvince, a.native_place_city nativePlaceCity,a.now_province nowProvince,
  978. a.now_city nowCity,a.now_area nowArea, a.now_address nowAddress,m.welfare_annex_url welfareAnnexUrl
  979. from personnel_dossier a left join admin_level b on a.jobs=b.jobs and a.star=b.lvl
  980. left join department dep on a.company = dep.id left join personnel_mid m on a.id=m.id
  981. left join personnel_entry d on a.id=d.id left join district_glossory da1 on a.residence_province=da1.id
  982. left join district_glossory da2 on a.residence_city=da2.id left join district_glossory da3 on a.residence_area=da3.id
  983. left join district_glossory db1 on a.native_place_province=db1.id left join district_glossory db2 on a.native_place_city=db2.id
  984. left join district_glossory dc1 on a.now_province=dc1.id left join district_glossory dc2 on a.now_city=dc2.id
  985. left join district_glossory dc3 on a.now_area=dc3.id
  986. where 1=1
  987. and a.id= #{id}
  988. </select>
  989. </mapper>