OrgHumanResourceMapper.xml 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373
  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_thousands" property="firmThousands" jdbcType="INTEGER" />
  20. <result column="tech_thousands" property="techThousands" 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. </resultMap>
  34. <sql id="Base_Column_List" >
  35. id, uid, firm_total, tech_total, firm_in_service, tech_in_service, firm_part_time,
  36. tech_part_time, firm_temporary, tech_temporary, firm_foreign, tech_foreign, firm_abroad,
  37. tech_abroad, firm_thousands, tech_thousands, doctor, master, undergraduate, college,
  38. senior_title, intermediate_title, junior_title, senior_mechanic, below_thirty,
  39. thirtyone_to_thirtyfour, fortyone_to_fifty, above_fifty
  40. </sql>
  41. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
  42. select
  43. <include refid="Base_Column_List" />
  44. from org_human_resource
  45. where id = #{id,jdbcType=VARCHAR}
  46. </select>
  47. <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
  48. delete from org_human_resource
  49. where id = #{id,jdbcType=VARCHAR}
  50. </delete>
  51. <insert id="insert" parameterType="com.goafanti.common.model.OrgHumanResource" >
  52. insert into org_human_resource (id, uid, firm_total,
  53. tech_total, firm_in_service, tech_in_service,
  54. firm_part_time, tech_part_time, firm_temporary,
  55. tech_temporary, firm_foreign, tech_foreign,
  56. firm_abroad, tech_abroad, firm_thousands,
  57. tech_thousands, doctor, master,
  58. undergraduate, college, senior_title,
  59. intermediate_title, junior_title, senior_mechanic,
  60. below_thirty, thirtyone_to_thirtyfour, fortyone_to_fifty,
  61. above_fifty)
  62. values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{firmTotal,jdbcType=INTEGER},
  63. #{techTotal,jdbcType=INTEGER}, #{firmInService,jdbcType=INTEGER}, #{techInService,jdbcType=INTEGER},
  64. #{firmPartTime,jdbcType=INTEGER}, #{techPartTime,jdbcType=INTEGER}, #{firmTemporary,jdbcType=INTEGER},
  65. #{techTemporary,jdbcType=INTEGER}, #{firmForeign,jdbcType=INTEGER}, #{techForeign,jdbcType=INTEGER},
  66. #{firmAbroad,jdbcType=INTEGER}, #{techAbroad,jdbcType=INTEGER}, #{firmThousands,jdbcType=INTEGER},
  67. #{techThousands,jdbcType=INTEGER}, #{doctor,jdbcType=INTEGER}, #{master,jdbcType=INTEGER},
  68. #{undergraduate,jdbcType=INTEGER}, #{college,jdbcType=INTEGER}, #{seniorTitle,jdbcType=INTEGER},
  69. #{intermediateTitle,jdbcType=INTEGER}, #{juniorTitle,jdbcType=INTEGER}, #{seniorMechanic,jdbcType=INTEGER},
  70. #{belowThirty,jdbcType=INTEGER}, #{thirtyoneToThirtyfour,jdbcType=INTEGER}, #{fortyoneToFifty,jdbcType=INTEGER},
  71. #{aboveFifty,jdbcType=INTEGER})
  72. </insert>
  73. <insert id="insertSelective" parameterType="com.goafanti.common.model.OrgHumanResource" >
  74. insert into org_human_resource
  75. <trim prefix="(" suffix=")" suffixOverrides="," >
  76. <if test="id != null" >
  77. id,
  78. </if>
  79. <if test="uid != null" >
  80. uid,
  81. </if>
  82. <if test="firmTotal != null" >
  83. firm_total,
  84. </if>
  85. <if test="techTotal != null" >
  86. tech_total,
  87. </if>
  88. <if test="firmInService != null" >
  89. firm_in_service,
  90. </if>
  91. <if test="techInService != null" >
  92. tech_in_service,
  93. </if>
  94. <if test="firmPartTime != null" >
  95. firm_part_time,
  96. </if>
  97. <if test="techPartTime != null" >
  98. tech_part_time,
  99. </if>
  100. <if test="firmTemporary != null" >
  101. firm_temporary,
  102. </if>
  103. <if test="techTemporary != null" >
  104. tech_temporary,
  105. </if>
  106. <if test="firmForeign != null" >
  107. firm_foreign,
  108. </if>
  109. <if test="techForeign != null" >
  110. tech_foreign,
  111. </if>
  112. <if test="firmAbroad != null" >
  113. firm_abroad,
  114. </if>
  115. <if test="techAbroad != null" >
  116. tech_abroad,
  117. </if>
  118. <if test="firmThousands != null" >
  119. firm_thousands,
  120. </if>
  121. <if test="techThousands != null" >
  122. tech_thousands,
  123. </if>
  124. <if test="doctor != null" >
  125. doctor,
  126. </if>
  127. <if test="master != null" >
  128. master,
  129. </if>
  130. <if test="undergraduate != null" >
  131. undergraduate,
  132. </if>
  133. <if test="college != null" >
  134. college,
  135. </if>
  136. <if test="seniorTitle != null" >
  137. senior_title,
  138. </if>
  139. <if test="intermediateTitle != null" >
  140. intermediate_title,
  141. </if>
  142. <if test="juniorTitle != null" >
  143. junior_title,
  144. </if>
  145. <if test="seniorMechanic != null" >
  146. senior_mechanic,
  147. </if>
  148. <if test="belowThirty != null" >
  149. below_thirty,
  150. </if>
  151. <if test="thirtyoneToThirtyfour != null" >
  152. thirtyone_to_thirtyfour,
  153. </if>
  154. <if test="fortyoneToFifty != null" >
  155. fortyone_to_fifty,
  156. </if>
  157. <if test="aboveFifty != null" >
  158. above_fifty,
  159. </if>
  160. </trim>
  161. <trim prefix="values (" suffix=")" suffixOverrides="," >
  162. <if test="id != null" >
  163. #{id,jdbcType=VARCHAR},
  164. </if>
  165. <if test="uid != null" >
  166. #{uid,jdbcType=VARCHAR},
  167. </if>
  168. <if test="firmTotal != null" >
  169. #{firmTotal,jdbcType=INTEGER},
  170. </if>
  171. <if test="techTotal != null" >
  172. #{techTotal,jdbcType=INTEGER},
  173. </if>
  174. <if test="firmInService != null" >
  175. #{firmInService,jdbcType=INTEGER},
  176. </if>
  177. <if test="techInService != null" >
  178. #{techInService,jdbcType=INTEGER},
  179. </if>
  180. <if test="firmPartTime != null" >
  181. #{firmPartTime,jdbcType=INTEGER},
  182. </if>
  183. <if test="techPartTime != null" >
  184. #{techPartTime,jdbcType=INTEGER},
  185. </if>
  186. <if test="firmTemporary != null" >
  187. #{firmTemporary,jdbcType=INTEGER},
  188. </if>
  189. <if test="techTemporary != null" >
  190. #{techTemporary,jdbcType=INTEGER},
  191. </if>
  192. <if test="firmForeign != null" >
  193. #{firmForeign,jdbcType=INTEGER},
  194. </if>
  195. <if test="techForeign != null" >
  196. #{techForeign,jdbcType=INTEGER},
  197. </if>
  198. <if test="firmAbroad != null" >
  199. #{firmAbroad,jdbcType=INTEGER},
  200. </if>
  201. <if test="techAbroad != null" >
  202. #{techAbroad,jdbcType=INTEGER},
  203. </if>
  204. <if test="firmThousands != null" >
  205. #{firmThousands,jdbcType=INTEGER},
  206. </if>
  207. <if test="techThousands != null" >
  208. #{techThousands,jdbcType=INTEGER},
  209. </if>
  210. <if test="doctor != null" >
  211. #{doctor,jdbcType=INTEGER},
  212. </if>
  213. <if test="master != null" >
  214. #{master,jdbcType=INTEGER},
  215. </if>
  216. <if test="undergraduate != null" >
  217. #{undergraduate,jdbcType=INTEGER},
  218. </if>
  219. <if test="college != null" >
  220. #{college,jdbcType=INTEGER},
  221. </if>
  222. <if test="seniorTitle != null" >
  223. #{seniorTitle,jdbcType=INTEGER},
  224. </if>
  225. <if test="intermediateTitle != null" >
  226. #{intermediateTitle,jdbcType=INTEGER},
  227. </if>
  228. <if test="juniorTitle != null" >
  229. #{juniorTitle,jdbcType=INTEGER},
  230. </if>
  231. <if test="seniorMechanic != null" >
  232. #{seniorMechanic,jdbcType=INTEGER},
  233. </if>
  234. <if test="belowThirty != null" >
  235. #{belowThirty,jdbcType=INTEGER},
  236. </if>
  237. <if test="thirtyoneToThirtyfour != null" >
  238. #{thirtyoneToThirtyfour,jdbcType=INTEGER},
  239. </if>
  240. <if test="fortyoneToFifty != null" >
  241. #{fortyoneToFifty,jdbcType=INTEGER},
  242. </if>
  243. <if test="aboveFifty != null" >
  244. #{aboveFifty,jdbcType=INTEGER},
  245. </if>
  246. </trim>
  247. </insert>
  248. <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.OrgHumanResource" >
  249. update org_human_resource
  250. <set >
  251. <if test="uid != null" >
  252. uid = #{uid,jdbcType=VARCHAR},
  253. </if>
  254. <if test="firmTotal != null" >
  255. firm_total = #{firmTotal,jdbcType=INTEGER},
  256. </if>
  257. <if test="techTotal != null" >
  258. tech_total = #{techTotal,jdbcType=INTEGER},
  259. </if>
  260. <if test="firmInService != null" >
  261. firm_in_service = #{firmInService,jdbcType=INTEGER},
  262. </if>
  263. <if test="techInService != null" >
  264. tech_in_service = #{techInService,jdbcType=INTEGER},
  265. </if>
  266. <if test="firmPartTime != null" >
  267. firm_part_time = #{firmPartTime,jdbcType=INTEGER},
  268. </if>
  269. <if test="techPartTime != null" >
  270. tech_part_time = #{techPartTime,jdbcType=INTEGER},
  271. </if>
  272. <if test="firmTemporary != null" >
  273. firm_temporary = #{firmTemporary,jdbcType=INTEGER},
  274. </if>
  275. <if test="techTemporary != null" >
  276. tech_temporary = #{techTemporary,jdbcType=INTEGER},
  277. </if>
  278. <if test="firmForeign != null" >
  279. firm_foreign = #{firmForeign,jdbcType=INTEGER},
  280. </if>
  281. <if test="techForeign != null" >
  282. tech_foreign = #{techForeign,jdbcType=INTEGER},
  283. </if>
  284. <if test="firmAbroad != null" >
  285. firm_abroad = #{firmAbroad,jdbcType=INTEGER},
  286. </if>
  287. <if test="techAbroad != null" >
  288. tech_abroad = #{techAbroad,jdbcType=INTEGER},
  289. </if>
  290. <if test="firmThousands != null" >
  291. firm_thousands = #{firmThousands,jdbcType=INTEGER},
  292. </if>
  293. <if test="techThousands != null" >
  294. tech_thousands = #{techThousands,jdbcType=INTEGER},
  295. </if>
  296. <if test="doctor != null" >
  297. doctor = #{doctor,jdbcType=INTEGER},
  298. </if>
  299. <if test="master != null" >
  300. master = #{master,jdbcType=INTEGER},
  301. </if>
  302. <if test="undergraduate != null" >
  303. undergraduate = #{undergraduate,jdbcType=INTEGER},
  304. </if>
  305. <if test="college != null" >
  306. college = #{college,jdbcType=INTEGER},
  307. </if>
  308. <if test="seniorTitle != null" >
  309. senior_title = #{seniorTitle,jdbcType=INTEGER},
  310. </if>
  311. <if test="intermediateTitle != null" >
  312. intermediate_title = #{intermediateTitle,jdbcType=INTEGER},
  313. </if>
  314. <if test="juniorTitle != null" >
  315. junior_title = #{juniorTitle,jdbcType=INTEGER},
  316. </if>
  317. <if test="seniorMechanic != null" >
  318. senior_mechanic = #{seniorMechanic,jdbcType=INTEGER},
  319. </if>
  320. <if test="belowThirty != null" >
  321. below_thirty = #{belowThirty,jdbcType=INTEGER},
  322. </if>
  323. <if test="thirtyoneToThirtyfour != null" >
  324. thirtyone_to_thirtyfour = #{thirtyoneToThirtyfour,jdbcType=INTEGER},
  325. </if>
  326. <if test="fortyoneToFifty != null" >
  327. fortyone_to_fifty = #{fortyoneToFifty,jdbcType=INTEGER},
  328. </if>
  329. <if test="aboveFifty != null" >
  330. above_fifty = #{aboveFifty,jdbcType=INTEGER},
  331. </if>
  332. </set>
  333. where id = #{id,jdbcType=VARCHAR}
  334. </update>
  335. <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.OrgHumanResource" >
  336. update org_human_resource
  337. set uid = #{uid,jdbcType=VARCHAR},
  338. firm_total = #{firmTotal,jdbcType=INTEGER},
  339. tech_total = #{techTotal,jdbcType=INTEGER},
  340. firm_in_service = #{firmInService,jdbcType=INTEGER},
  341. tech_in_service = #{techInService,jdbcType=INTEGER},
  342. firm_part_time = #{firmPartTime,jdbcType=INTEGER},
  343. tech_part_time = #{techPartTime,jdbcType=INTEGER},
  344. firm_temporary = #{firmTemporary,jdbcType=INTEGER},
  345. tech_temporary = #{techTemporary,jdbcType=INTEGER},
  346. firm_foreign = #{firmForeign,jdbcType=INTEGER},
  347. tech_foreign = #{techForeign,jdbcType=INTEGER},
  348. firm_abroad = #{firmAbroad,jdbcType=INTEGER},
  349. tech_abroad = #{techAbroad,jdbcType=INTEGER},
  350. firm_thousands = #{firmThousands,jdbcType=INTEGER},
  351. tech_thousands = #{techThousands,jdbcType=INTEGER},
  352. doctor = #{doctor,jdbcType=INTEGER},
  353. master = #{master,jdbcType=INTEGER},
  354. undergraduate = #{undergraduate,jdbcType=INTEGER},
  355. college = #{college,jdbcType=INTEGER},
  356. senior_title = #{seniorTitle,jdbcType=INTEGER},
  357. intermediate_title = #{intermediateTitle,jdbcType=INTEGER},
  358. junior_title = #{juniorTitle,jdbcType=INTEGER},
  359. senior_mechanic = #{seniorMechanic,jdbcType=INTEGER},
  360. below_thirty = #{belowThirty,jdbcType=INTEGER},
  361. thirtyone_to_thirtyfour = #{thirtyoneToThirtyfour,jdbcType=INTEGER},
  362. fortyone_to_fifty = #{fortyoneToFifty,jdbcType=INTEGER},
  363. above_fifty = #{aboveFifty,jdbcType=INTEGER}
  364. where id = #{id,jdbcType=VARCHAR}
  365. </update>
  366. <select id="selectOrgHumanResourceByUserId" parameterType="java.lang.String" resultMap="BaseResultMap">
  367. select
  368. <include refid="Base_Column_List" />
  369. from org_human_resource
  370. where uid = #{uid,jdbcType=VARCHAR}
  371. </select>
  372. </mapper>