OrgHumanResourceMapper.xml 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515
  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.OrgHumanResourceMapper">
  4. <resultMap id="BaseResultMap" type="com.goafanti.common.model.OrgHumanResource">
  5. <id column="id" property="id" jdbcType="VARCHAR" />
  6. <result column="uid" property="uid" jdbcType="VARCHAR" />
  7. <result column="firm_total" property="firmTotal" jdbcType="INTEGER" />
  8. <result column="tech_total" property="techTotal" jdbcType="INTEGER" />
  9. <result column="firm_in_service" property="firmInService"
  10. jdbcType="INTEGER" />
  11. <result column="tech_in_service" property="techInService"
  12. jdbcType="INTEGER" />
  13. <result column="firm_part_time" property="firmPartTime"
  14. jdbcType="INTEGER" />
  15. <result column="tech_part_time" property="techPartTime"
  16. jdbcType="INTEGER" />
  17. <result column="firm_temporary" property="firmTemporary"
  18. jdbcType="INTEGER" />
  19. <result column="tech_temporary" property="techTemporary"
  20. jdbcType="INTEGER" />
  21. <result column="firm_foreign" property="firmForeign" jdbcType="INTEGER" />
  22. <result column="tech_foreign" property="techForeign" jdbcType="INTEGER" />
  23. <result column="firm_abroad" property="firmAbroad" jdbcType="INTEGER" />
  24. <result column="tech_abroad" property="techAbroad" jdbcType="INTEGER" />
  25. <result column="firm_core" property="firmCore" jdbcType="INTEGER" />
  26. <result column="tech_core" property="techCore" jdbcType="INTEGER" />
  27. <result column="doctor" property="doctor" jdbcType="INTEGER" />
  28. <result column="master" property="master" jdbcType="INTEGER" />
  29. <result column="undergraduate" property="undergraduate"
  30. jdbcType="INTEGER" />
  31. <result column="college" property="college" jdbcType="INTEGER" />
  32. <result column="senior_title" property="seniorTitle" jdbcType="INTEGER" />
  33. <result column="intermediate_title" property="intermediateTitle"
  34. jdbcType="INTEGER" />
  35. <result column="junior_title" property="juniorTitle" jdbcType="INTEGER" />
  36. <result column="senior_mechanic" property="seniorMechanic"
  37. jdbcType="INTEGER" />
  38. <result column="below_thirty" property="belowThirty" jdbcType="INTEGER" />
  39. <result column="thirtyone_to_thirtyfour" property="thirtyoneToThirtyfour"
  40. jdbcType="INTEGER" />
  41. <result column="fortyone_to_fifty" property="fortyoneToFifty"
  42. jdbcType="INTEGER" />
  43. <result column="above_fifty" property="aboveFifty" jdbcType="INTEGER" />
  44. <result column="year" property="year" jdbcType="INTEGER" />
  45. <result column="new_employment" property="newEmployment"
  46. jdbcType="INTEGER" />
  47. <result column="graduate_number" property="graduateNumber"
  48. jdbcType="INTEGER" />
  49. <result column="roster_url" property="rosterUrl" jdbcType="VARCHAR" />
  50. <result column="social_security_url" property="socialSecurityUrl"
  51. jdbcType="VARCHAR" />
  52. <result column="deleted_sign" property="deletedSign" jdbcType="INTEGER" />
  53. </resultMap>
  54. <sql id="Base_Column_List">
  55. id, uid, firm_total, tech_total, firm_in_service, tech_in_service,
  56. firm_part_time,
  57. tech_part_time, firm_temporary, tech_temporary, firm_foreign, tech_foreign,
  58. firm_abroad,
  59. tech_abroad, firm_core, tech_core, doctor, master, undergraduate, college,
  60. senior_title, intermediate_title, junior_title, senior_mechanic,
  61. below_thirty,
  62. thirtyone_to_thirtyfour, fortyone_to_fifty, above_fifty, year, new_employment,
  63. graduate_number,
  64. roster_url, social_security_url, deleted_sign
  65. </sql>
  66. <select id="selectByPrimaryKey" resultMap="BaseResultMap"
  67. parameterType="java.lang.String">
  68. select
  69. <include refid="Base_Column_List" />
  70. from org_human_resource
  71. where id = #{id,jdbcType=VARCHAR}
  72. </select>
  73. <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
  74. delete from org_human_resource
  75. where id = #{id,jdbcType=VARCHAR}
  76. </delete>
  77. <insert id="insert" parameterType="com.goafanti.common.model.OrgHumanResource">
  78. insert into org_human_resource (id, uid, firm_total,
  79. tech_total, firm_in_service, tech_in_service,
  80. firm_part_time, tech_part_time, firm_temporary,
  81. tech_temporary, firm_foreign, tech_foreign,
  82. firm_abroad, tech_abroad, firm_core,
  83. tech_core, doctor, master,
  84. undergraduate, college, senior_title,
  85. intermediate_title, junior_title, senior_mechanic,
  86. below_thirty, thirtyone_to_thirtyfour, fortyone_to_fifty,
  87. above_fifty, year, new_employment, graduate_number, roster_url,
  88. social_security_url, deleted_sign)
  89. values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR},
  90. #{firmTotal,jdbcType=INTEGER},
  91. #{techTotal,jdbcType=INTEGER}, #{firmInService,jdbcType=INTEGER}, #{techInService,jdbcType=INTEGER},
  92. #{firmPartTime,jdbcType=INTEGER}, #{techPartTime,jdbcType=INTEGER},
  93. #{firmTemporary,jdbcType=INTEGER},
  94. #{techTemporary,jdbcType=INTEGER}, #{firmForeign,jdbcType=INTEGER}, #{techForeign,jdbcType=INTEGER},
  95. #{firmAbroad,jdbcType=INTEGER}, #{techAbroad,jdbcType=INTEGER},
  96. #{firmCore,jdbcType=INTEGER},
  97. #{techCore,jdbcType=INTEGER}, #{doctor,jdbcType=INTEGER}, #{master,jdbcType=INTEGER},
  98. #{undergraduate,jdbcType=INTEGER}, #{college,jdbcType=INTEGER},
  99. #{seniorTitle,jdbcType=INTEGER},
  100. #{intermediateTitle,jdbcType=INTEGER},
  101. #{juniorTitle,jdbcType=INTEGER}, #{seniorMechanic,jdbcType=INTEGER},
  102. #{belowThirty,jdbcType=INTEGER},
  103. #{thirtyoneToThirtyfour,jdbcType=INTEGER},
  104. #{fortyoneToFifty,jdbcType=INTEGER},
  105. #{aboveFifty,jdbcType=INTEGER}, #{year,jdbcType=INTEGER}, #{newEmployment,jdbcType=INTEGER},
  106. #{graduateNumber,jdbcType=INTEGER},
  107. #{rosterUrl,jdbcType=VARCHAR}, #{socialSecurityUrl,jdbcType=VARCHAR},
  108. #{deletedSign,jdbcType=INTEGER})
  109. </insert>
  110. <insert id="insertSelective" parameterType="com.goafanti.common.model.OrgHumanResource">
  111. insert into org_human_resource
  112. <trim prefix="(" suffix=")" suffixOverrides=",">
  113. <if test="id != null">
  114. id,
  115. </if>
  116. <if test="uid != null">
  117. uid,
  118. </if>
  119. <if test="firmTotal != null">
  120. firm_total,
  121. </if>
  122. <if test="techTotal != null">
  123. tech_total,
  124. </if>
  125. <if test="firmInService != null">
  126. firm_in_service,
  127. </if>
  128. <if test="techInService != null">
  129. tech_in_service,
  130. </if>
  131. <if test="firmPartTime != null">
  132. firm_part_time,
  133. </if>
  134. <if test="techPartTime != null">
  135. tech_part_time,
  136. </if>
  137. <if test="firmTemporary != null">
  138. firm_temporary,
  139. </if>
  140. <if test="techTemporary != null">
  141. tech_temporary,
  142. </if>
  143. <if test="firmForeign != null">
  144. firm_foreign,
  145. </if>
  146. <if test="techForeign != null">
  147. tech_foreign,
  148. </if>
  149. <if test="firmAbroad != null">
  150. firm_abroad,
  151. </if>
  152. <if test="techAbroad != null">
  153. tech_abroad,
  154. </if>
  155. <if test="firmCore != null">
  156. firm_core,
  157. </if>
  158. <if test="techCore != null">
  159. tech_core,
  160. </if>
  161. <if test="doctor != null">
  162. doctor,
  163. </if>
  164. <if test="master != null">
  165. master,
  166. </if>
  167. <if test="undergraduate != null">
  168. undergraduate,
  169. </if>
  170. <if test="college != null">
  171. college,
  172. </if>
  173. <if test="seniorTitle != null">
  174. senior_title,
  175. </if>
  176. <if test="intermediateTitle != null">
  177. intermediate_title,
  178. </if>
  179. <if test="juniorTitle != null">
  180. junior_title,
  181. </if>
  182. <if test="seniorMechanic != null">
  183. senior_mechanic,
  184. </if>
  185. <if test="belowThirty != null">
  186. below_thirty,
  187. </if>
  188. <if test="thirtyoneToThirtyfour != null">
  189. thirtyone_to_thirtyfour,
  190. </if>
  191. <if test="fortyoneToFifty != null">
  192. fortyone_to_fifty,
  193. </if>
  194. <if test="aboveFifty != null">
  195. above_fifty,
  196. </if>
  197. <if test="year != null">
  198. year,
  199. </if>
  200. <if test="newEmployment != null">
  201. new_employment,
  202. </if>
  203. <if test="graduateNumber != null">
  204. graduate_number,
  205. </if>
  206. <if test="rosterUrl != null">
  207. roster_url,
  208. </if>
  209. <if test="socialSecurityUrl != null">
  210. social_security_url,
  211. </if>
  212. <if test="deletedSign != null">
  213. deleted_sign,
  214. </if>
  215. </trim>
  216. <trim prefix="values (" suffix=")" suffixOverrides=",">
  217. <if test="id != null">
  218. #{id,jdbcType=VARCHAR},
  219. </if>
  220. <if test="uid != null">
  221. #{uid,jdbcType=VARCHAR},
  222. </if>
  223. <if test="firmTotal != null">
  224. #{firmTotal,jdbcType=INTEGER},
  225. </if>
  226. <if test="techTotal != null">
  227. #{techTotal,jdbcType=INTEGER},
  228. </if>
  229. <if test="firmInService != null">
  230. #{firmInService,jdbcType=INTEGER},
  231. </if>
  232. <if test="techInService != null">
  233. #{techInService,jdbcType=INTEGER},
  234. </if>
  235. <if test="firmPartTime != null">
  236. #{firmPartTime,jdbcType=INTEGER},
  237. </if>
  238. <if test="techPartTime != null">
  239. #{techPartTime,jdbcType=INTEGER},
  240. </if>
  241. <if test="firmTemporary != null">
  242. #{firmTemporary,jdbcType=INTEGER},
  243. </if>
  244. <if test="techTemporary != null">
  245. #{techTemporary,jdbcType=INTEGER},
  246. </if>
  247. <if test="firmForeign != null">
  248. #{firmForeign,jdbcType=INTEGER},
  249. </if>
  250. <if test="techForeign != null">
  251. #{techForeign,jdbcType=INTEGER},
  252. </if>
  253. <if test="firmAbroad != null">
  254. #{firmAbroad,jdbcType=INTEGER},
  255. </if>
  256. <if test="techAbroad != null">
  257. #{techAbroad,jdbcType=INTEGER},
  258. </if>
  259. <if test="firmCore != null">
  260. #{firmCore,jdbcType=INTEGER},
  261. </if>
  262. <if test="techCore != null">
  263. #{techCore,jdbcType=INTEGER},
  264. </if>
  265. <if test="doctor != null">
  266. #{doctor,jdbcType=INTEGER},
  267. </if>
  268. <if test="master != null">
  269. #{master,jdbcType=INTEGER},
  270. </if>
  271. <if test="undergraduate != null">
  272. #{undergraduate,jdbcType=INTEGER},
  273. </if>
  274. <if test="college != null">
  275. #{college,jdbcType=INTEGER},
  276. </if>
  277. <if test="seniorTitle != null">
  278. #{seniorTitle,jdbcType=INTEGER},
  279. </if>
  280. <if test="intermediateTitle != null">
  281. #{intermediateTitle,jdbcType=INTEGER},
  282. </if>
  283. <if test="juniorTitle != null">
  284. #{juniorTitle,jdbcType=INTEGER},
  285. </if>
  286. <if test="seniorMechanic != null">
  287. #{seniorMechanic,jdbcType=INTEGER},
  288. </if>
  289. <if test="belowThirty != null">
  290. #{belowThirty,jdbcType=INTEGER},
  291. </if>
  292. <if test="thirtyoneToThirtyfour != null">
  293. #{thirtyoneToThirtyfour,jdbcType=INTEGER},
  294. </if>
  295. <if test="fortyoneToFifty != null">
  296. #{fortyoneToFifty,jdbcType=INTEGER},
  297. </if>
  298. <if test="aboveFifty != null">
  299. #{aboveFifty,jdbcType=INTEGER},
  300. </if>
  301. <if test="year != null">
  302. #{year,jdbcType=INTEGER},
  303. </if>
  304. <if test="newEmployment != null">
  305. #{newEmployment,jdbcType=INTEGER},
  306. </if>
  307. <if test="graduateNumber != null">
  308. #{graduateNumber,jdbcType=INTEGER},
  309. </if>
  310. <if test="rosterUrl != null">
  311. #{rosterUrl,jdbcType=VARCHAR},
  312. </if>
  313. <if test="socialSecurityUrl != null">
  314. #{socialSecurityUrl,jdbcType=VARCHAR},
  315. </if>
  316. <if test="deletedSign != null">
  317. #{deleted_sign,jdbcType=INTEGER},
  318. </if>
  319. </trim>
  320. </insert>
  321. <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.OrgHumanResource">
  322. update org_human_resource
  323. <set>
  324. <if test="uid != null">
  325. uid = #{uid,jdbcType=VARCHAR},
  326. </if>
  327. <if test="firmTotal != null">
  328. firm_total = #{firmTotal,jdbcType=INTEGER},
  329. </if>
  330. <if test="techTotal != null">
  331. tech_total = #{techTotal,jdbcType=INTEGER},
  332. </if>
  333. <if test="firmInService != null">
  334. firm_in_service = #{firmInService,jdbcType=INTEGER},
  335. </if>
  336. <if test="techInService != null">
  337. tech_in_service = #{techInService,jdbcType=INTEGER},
  338. </if>
  339. <if test="firmPartTime != null">
  340. firm_part_time = #{firmPartTime,jdbcType=INTEGER},
  341. </if>
  342. <if test="techPartTime != null">
  343. tech_part_time = #{techPartTime,jdbcType=INTEGER},
  344. </if>
  345. <if test="firmTemporary != null">
  346. firm_temporary = #{firmTemporary,jdbcType=INTEGER},
  347. </if>
  348. <if test="techTemporary != null">
  349. tech_temporary = #{techTemporary,jdbcType=INTEGER},
  350. </if>
  351. <if test="firmForeign != null">
  352. firm_foreign = #{firmForeign,jdbcType=INTEGER},
  353. </if>
  354. <if test="techForeign != null">
  355. tech_foreign = #{techForeign,jdbcType=INTEGER},
  356. </if>
  357. <if test="firmAbroad != null">
  358. firm_abroad = #{firmAbroad,jdbcType=INTEGER},
  359. </if>
  360. <if test="techAbroad != null">
  361. tech_abroad = #{techAbroad,jdbcType=INTEGER},
  362. </if>
  363. <if test="firmCore != null">
  364. firm_core = #{firmCore,jdbcType=INTEGER},
  365. </if>
  366. <if test="techCore != null">
  367. tech_core = #{techCore,jdbcType=INTEGER},
  368. </if>
  369. <if test="doctor != null">
  370. doctor = #{doctor,jdbcType=INTEGER},
  371. </if>
  372. <if test="master != null">
  373. master = #{master,jdbcType=INTEGER},
  374. </if>
  375. <if test="undergraduate != null">
  376. undergraduate = #{undergraduate,jdbcType=INTEGER},
  377. </if>
  378. <if test="college != null">
  379. college = #{college,jdbcType=INTEGER},
  380. </if>
  381. <if test="seniorTitle != null">
  382. senior_title = #{seniorTitle,jdbcType=INTEGER},
  383. </if>
  384. <if test="intermediateTitle != null">
  385. intermediate_title = #{intermediateTitle,jdbcType=INTEGER},
  386. </if>
  387. <if test="juniorTitle != null">
  388. junior_title = #{juniorTitle,jdbcType=INTEGER},
  389. </if>
  390. <if test="seniorMechanic != null">
  391. senior_mechanic = #{seniorMechanic,jdbcType=INTEGER},
  392. </if>
  393. <if test="belowThirty != null">
  394. below_thirty = #{belowThirty,jdbcType=INTEGER},
  395. </if>
  396. <if test="thirtyoneToThirtyfour != null">
  397. thirtyone_to_thirtyfour = #{thirtyoneToThirtyfour,jdbcType=INTEGER},
  398. </if>
  399. <if test="fortyoneToFifty != null">
  400. fortyone_to_fifty = #{fortyoneToFifty,jdbcType=INTEGER},
  401. </if>
  402. <if test="aboveFifty != null">
  403. above_fifty = #{aboveFifty,jdbcType=INTEGER},
  404. </if>
  405. <if test="year != null">
  406. year = #{year,jdbcType=INTEGER},
  407. </if>
  408. <if test="newEmployment != null">
  409. new_employment = #{newEmployment,jdbcType=INTEGER},
  410. </if>
  411. <if test="graduateNumber != null">
  412. graduate_number = #{graduateNumber,jdbcType=INTEGER},
  413. </if>
  414. <if test="rosterUrl != null">
  415. roster_url = #{rosterUrl,jdbcType=VARCHAR},
  416. </if>
  417. <if test="socialSecurityUrl != null">
  418. social_security_url = #{socialSecurityUrl,jdbcType=VARCHAR},
  419. </if>
  420. <if test="deletedSign != null">
  421. deleted_sign = #{deletedSign,jdbcType=INTEGER},
  422. </if>
  423. </set>
  424. where id = #{id,jdbcType=VARCHAR}
  425. </update>
  426. <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.OrgHumanResource">
  427. update org_human_resource
  428. set uid = #{uid,jdbcType=VARCHAR},
  429. firm_total = #{firmTotal,jdbcType=INTEGER},
  430. tech_total = #{techTotal,jdbcType=INTEGER},
  431. firm_in_service = #{firmInService,jdbcType=INTEGER},
  432. tech_in_service = #{techInService,jdbcType=INTEGER},
  433. firm_part_time = #{firmPartTime,jdbcType=INTEGER},
  434. tech_part_time = #{techPartTime,jdbcType=INTEGER},
  435. firm_temporary = #{firmTemporary,jdbcType=INTEGER},
  436. tech_temporary = #{techTemporary,jdbcType=INTEGER},
  437. firm_foreign = #{firmForeign,jdbcType=INTEGER},
  438. tech_foreign = #{techForeign,jdbcType=INTEGER},
  439. firm_abroad = #{firmAbroad,jdbcType=INTEGER},
  440. tech_abroad = #{techAbroad,jdbcType=INTEGER},
  441. firm_core = #{firmCore,jdbcType=INTEGER},
  442. tech_core = #{techCore,jdbcType=INTEGER},
  443. doctor = #{doctor,jdbcType=INTEGER},
  444. master = #{master,jdbcType=INTEGER},
  445. undergraduate = #{undergraduate,jdbcType=INTEGER},
  446. college = #{college,jdbcType=INTEGER},
  447. senior_title = #{seniorTitle,jdbcType=INTEGER},
  448. intermediate_title = #{intermediateTitle,jdbcType=INTEGER},
  449. junior_title = #{juniorTitle,jdbcType=INTEGER},
  450. senior_mechanic = #{seniorMechanic,jdbcType=INTEGER},
  451. below_thirty = #{belowThirty,jdbcType=INTEGER},
  452. thirtyone_to_thirtyfour = #{thirtyoneToThirtyfour,jdbcType=INTEGER},
  453. fortyone_to_fifty = #{fortyoneToFifty,jdbcType=INTEGER},
  454. above_fifty = #{aboveFifty,jdbcType=INTEGER},
  455. year = #{year,jdbcType=INTEGER},
  456. new_employment = #{newEmployment,jdbcType=INTEGER},
  457. graduate_number = #{graduateNumber,jdbcType=INTEGER},
  458. roster_url = #{rosterUrl,jdbcType=VARCHAR},
  459. social_security_url = #{socialSecurityUrl,jdbcType=VARCHAR},
  460. deleted_sign = #{deletedSign,jdbcType=INTEGER}
  461. where id = #{id,jdbcType=VARCHAR}
  462. </update>
  463. <select id="findOrgHumanResourceListByPage" parameterType="java.lang.String"
  464. resultMap="BaseResultMap">
  465. select
  466. <include refid="Base_Column_List" />
  467. from org_human_resource
  468. where deleted_sign = 0
  469. <if test="uid != null">
  470. and uid = #{uid,jdbcType=VARCHAR}
  471. </if>
  472. <if test="year != null">
  473. and year = #{year,jdbcType=INTEGER}
  474. </if>
  475. order by year desc
  476. <if test="page_sql != null">
  477. ${page_sql}
  478. </if>
  479. </select>
  480. <select id="findOrgHumanResourceCount" resultType="java.lang.Integer"
  481. parameterType="String">
  482. select count(1) from
  483. org_human_resource
  484. where deleted_sign = 0
  485. <if test="uid != null">
  486. and uid = #{uid,jdbcType=VARCHAR}
  487. </if>
  488. <if test="year != null">
  489. and year = #{year,jdbcType=INTEGER}
  490. </if>
  491. </select>
  492. <update id="batchDeleteByPrimaryKey" parameterType="java.util.List">
  493. update org_human_resource set deleted_sign = 1
  494. where id in
  495. <foreach item="item" collection="list" open="(" separator=","
  496. close=")">
  497. #{item}
  498. </foreach>
  499. </update>
  500. <select id="selectOrgHumanResourceByUidAndYear" resultMap="BaseResultMap">
  501. select
  502. <include refid="Base_Column_List" />
  503. from org_human_resource
  504. where
  505. year = #{0}
  506. and uid = #{1}
  507. and deleted_sign = 0
  508. </select>
  509. </mapper>