OrgHumanResourceMapper.xml 17 KB

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