MetaEmployeeDiyMapper.xml 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.dgtly.sync.mapper.MetaEmployeeDiyMapper">
  6. <resultMap type="MetaEmployeeDiy" id="MetaEmployeeDiyResult">
  7. <result property="name" column="name" />
  8. <result property="loginName" column="login_name" />
  9. <result property="email" column="email" />
  10. <result property="mobile" column="mobile" />
  11. <result property="sapEmployeeId" column="sap_employee_id" />
  12. <result property="sapCostCenterCode" column="sap_cost_center_code" />
  13. <result property="sapCostCenter" column="sap_cost_center" />
  14. <result property="sapCompanyCode" column="sap_company_code" />
  15. <result property="status" column="status" />
  16. <result property="objid1" column="objid_1" />
  17. <result property="contract" column="contract" />
  18. <result property="contractName" column="contract_name" />
  19. <result property="contractBegin" column="contract_begin" />
  20. <result property="duty" column="duty" />
  21. <result property="dutyName" column="duty_name" />
  22. <result property="org" column="org" />
  23. <result property="orgName" column="org_name" />
  24. <result property="employeePost" column="employee_post" />
  25. <result property="employeePostName" column="employee_post_name" />
  26. <result property="posty" column="posty" />
  27. <result property="poste" column="poste" />
  28. <result property="posnc" column="posnc" />
  29. <result property="bossEmployeeId" column="boss_employee_id" />
  30. <result property="bossName" column="boss_name" />
  31. <result property="bossEmployeePost" column="boss_employee_post" />
  32. <result property="sex" column="sex" />
  33. <result property="stext1" column="stext_1" />
  34. <result property="objid2" column="objid_2" />
  35. <result property="stext2" column="stext_2" />
  36. <result property="objid3" column="objid_3" />
  37. <result property="stext3" column="stext_3" />
  38. <result property="objid4" column="objid_4" />
  39. <result property="stext4" column="stext_4" />
  40. <result property="objid5" column="objid_5" />
  41. <result property="stext5" column="stext_5" />
  42. <result property="objid6" column="objid_6" />
  43. <result property="stext6" column="stext_6" />
  44. <result property="objidQy" column="objid_qy" />
  45. <result property="stextQy" column="stext_qy" />
  46. <result property="dataversion" column="dataversion" />
  47. <result property="etlCreatime" column="etl_creatime" />
  48. <result property="lineId" column="line_id" />
  49. <result property="packageId" column="package_id" />
  50. </resultMap>
  51. <sql id="selectMetaEmployeeDiyVo">
  52. select name, login_name, email, mobile, sap_employee_id, sap_cost_center_code, sap_cost_center, sap_company_code, status, objid_1, contract, contract_name, contract_begin, duty, duty_name, org, org_name, employee_post, employee_post_name, posty, poste, posnc, boss_employee_id,
  53. boss_name, boss_employee_post, sex, stext_1, objid_2, stext_2, objid_3, stext_3, objid_4,
  54. stext_4, objid_5, stext_5, objid_6,stext_6, objid_qy,stext_qy,dataversion, etl_creatime, line_id, package_id from meta_employee_diy
  55. </sql>
  56. <select id="selectMetaEmployeeDiyList" parameterType="MetaEmployeeDiy" resultMap="MetaEmployeeDiyResult">
  57. <include refid="selectMetaEmployeeDiyVo"/>
  58. <where>
  59. <if test="name != null and name != ''"> and name = #{name}</if>
  60. <if test="loginName != null and loginName != ''"> and login_name = #{loginName}</if>
  61. <if test="email != null and email != ''"> and email = #{email}</if>
  62. <if test="mobile != null and mobile != ''"> and mobile = #{mobile}</if>
  63. <if test="sapEmployeeId != null and sapEmployeeId != ''"> and sap_employee_id = #{sapEmployeeId}</if>
  64. <if test="sapCostCenterCode != null and sapCostCenterCode != ''"> and sap_cost_center_code = #{sapCostCenterCode}</if>
  65. <if test="sapCostCenter != null and sapCostCenter != ''"> and sap_cost_center = #{sapCostCenter}</if>
  66. <if test="sapCompanyCode != null and sapCompanyCode != ''"> and sap_company_code = #{sapCompanyCode}</if>
  67. <if test="status != null "> and status = #{status}</if>
  68. <if test="objid1 != null and objid1 != ''"> and objid_1 = #{objid1}</if>
  69. <if test="contract != null and contract != ''"> and contract = #{contract}</if>
  70. <if test="contractName != null and contractName != ''"> and contract_name = #{contractName}</if>
  71. <if test="contractBegin != null and contractBegin != ''"> and contract_begin = #{contractBegin}</if>
  72. <if test="duty != null and duty != ''"> and duty = #{duty}</if>
  73. <if test="dutyName != null and dutyName != ''"> and duty_name = #{dutyName}</if>
  74. <if test="org != null and org != ''"> and org = #{org}</if>
  75. <if test="orgName != null and orgName != ''"> and org_name = #{orgName}</if>
  76. <if test="employeePost != null and employeePost != ''"> and employee_post = #{employeePost}</if>
  77. <if test="employeePostName != null and employeePostName != ''"> and employee_post_name = #{employeePostName}</if>
  78. <if test="posty != null and posty != ''"> and posty = #{posty}</if>
  79. <if test="poste != null and poste != ''"> and poste = #{poste}</if>
  80. <if test="posnc != null and posnc != ''"> and posnc = #{posnc}</if>
  81. <if test="bossEmployeeId != null and bossEmployeeId != ''"> and boss_employee_id = #{bossEmployeeId}</if>
  82. <if test="bossName != null and bossName != ''"> and boss_name = #{bossName}</if>
  83. <if test="bossEmployeePost != null and bossEmployeePost != ''"> and boss_employee_post = #{bossEmployeePost}</if>
  84. <if test="sex != null and sex != ''"> and sex = #{sex}</if>
  85. <if test="stext1 != null and stext1 != ''"> and stext_1 = #{stext1}</if>
  86. <if test="objid2 != null and objid2 != ''"> and objid_2 = #{objid2}</if>
  87. <if test="stext2 != null and stext2 != ''"> and stext_2 = #{stext2}</if>
  88. <if test="objid3 != null and objid3 != ''"> and objid_3 = #{objid3}</if>
  89. <if test="stext3 != null and stext3 != ''"> and stext_3 = #{stext3}</if>
  90. <if test="objid4 != null and objid4 != ''"> and objid_4 = #{objid4}</if>
  91. <if test="stext4 != null and stext4 != ''"> and stext_4 = #{stext4}</if>
  92. <if test="objid5 != null and objid5 != ''"> and objid_5 = #{objid5}</if>
  93. <if test="stext5 != null and stext5 != ''"> and stext_5 = #{stext5}</if>
  94. <if test="objid6 != null and objid6 != ''"> and objid_6 = #{objid6}</if>
  95. <if test="stext6 != null and stext6 != ''"> and stext_6 = #{stext6}</if>
  96. <if test="dataversion != null and dataversion != ''"> and dataversion = #{dataversion}</if>
  97. <if test="etlCreatime != null "> and etl_creatime = #{etlCreatime}</if>
  98. <if test="lineId != null and lineId != ''"> and line_id = #{lineId}</if>
  99. <if test="packageId != null and packageId != ''"> and package_id = #{packageId}</if>
  100. </where>
  101. </select>
  102. <select id="selectMetaEmployeeDiyById" parameterType="String" resultMap="MetaEmployeeDiyResult">
  103. <include refid="selectMetaEmployeeDiyVo"/>
  104. where name = #{name}
  105. </select>
  106. <insert id="insertMetaEmployeeDiy" parameterType="MetaEmployeeDiy">
  107. insert into meta_employee_diy
  108. <trim prefix="(" suffix=")" suffixOverrides=",">
  109. <if test="name != null and name != ''">name,</if>
  110. <if test="loginName != null and loginName != ''">login_name,</if>
  111. <if test="email != null and email != ''">email,</if>
  112. <if test="mobile != null and mobile != ''">mobile,</if>
  113. <if test="sapEmployeeId != null and sapEmployeeId != ''">sap_employee_id,</if>
  114. <if test="sapCostCenterCode != null and sapCostCenterCode != ''">sap_cost_center_code,</if>
  115. <if test="sapCostCenter != null and sapCostCenter != ''">sap_cost_center,</if>
  116. <if test="sapCompanyCode != null and sapCompanyCode != ''">sap_company_code,</if>
  117. <if test="status != null ">status,</if>
  118. <if test="objid1 != null and objid1 != ''">objid_1,</if>
  119. <if test="contract != null and contract != ''">contract,</if>
  120. <if test="contractName != null and contractName != ''">contract_name,</if>
  121. <if test="contractBegin != null and contractBegin != ''">contract_begin,</if>
  122. <if test="duty != null and duty != ''">duty,</if>
  123. <if test="dutyName != null and dutyName != ''">duty_name,</if>
  124. <if test="org != null and org != ''">org,</if>
  125. <if test="orgName != null and orgName != ''">org_name,</if>
  126. <if test="employeePost != null and employeePost != ''">employee_post,</if>
  127. <if test="employeePostName != null and employeePostName != ''">employee_post_name,</if>
  128. <if test="posty != null and posty != ''">posty,</if>
  129. <if test="poste != null and poste != ''">poste,</if>
  130. <if test="posnc != null and posnc != ''">posnc,</if>
  131. <if test="bossEmployeeId != null and bossEmployeeId != ''">boss_employee_id,</if>
  132. <if test="bossName != null and bossName != ''">boss_name,</if>
  133. <if test="bossEmployeePost != null and bossEmployeePost != ''">boss_employee_post,</if>
  134. <if test="sex != null and sex != ''">sex,</if>
  135. <if test="stext1 != null and stext1 != ''">stext_1,</if>
  136. <if test="objid2 != null and objid2 != ''">objid_2,</if>
  137. <if test="stext2 != null and stext2 != ''">stext_2,</if>
  138. <if test="objid3 != null and objid3 != ''">objid_3,</if>
  139. <if test="stext3 != null and stext3 != ''">stext_3,</if>
  140. <if test="objid4 != null and objid4 != ''">objid_4,</if>
  141. <if test="stext4 != null and stext4 != ''">stext_4,</if>
  142. <if test="objid5 != null and objid5 != ''">objid_5,</if>
  143. <if test="stext5 != null and stext5 != ''">stext_5,</if>
  144. <if test="objid6 != null and objid6 != ''">objid_6,</if>
  145. <if test="stext6 != null and stext6 != ''">stext_6,</if>
  146. <if test="dataversion != null and dataversion != ''">dataversion,</if>
  147. <if test="etlCreatime != null ">etl_creatime,</if>
  148. <if test="lineId != null and lineId != ''">line_id,</if>
  149. <if test="packageId != null and packageId != ''">package_id,</if>
  150. </trim>
  151. <trim prefix="values (" suffix=")" suffixOverrides=",">
  152. <if test="name != null and name != ''">#{name},</if>
  153. <if test="loginName != null and loginName != ''">#{loginName},</if>
  154. <if test="email != null and email != ''">#{email},</if>
  155. <if test="mobile != null and mobile != ''">#{mobile},</if>
  156. <if test="sapEmployeeId != null and sapEmployeeId != ''">#{sapEmployeeId},</if>
  157. <if test="sapCostCenterCode != null and sapCostCenterCode != ''">#{sapCostCenterCode},</if>
  158. <if test="sapCostCenter != null and sapCostCenter != ''">#{sapCostCenter},</if>
  159. <if test="sapCompanyCode != null and sapCompanyCode != ''">#{sapCompanyCode},</if>
  160. <if test="status != null ">#{status},</if>
  161. <if test="objid1 != null and objid1 != ''">#{objid1},</if>
  162. <if test="contract != null and contract != ''">#{contract},</if>
  163. <if test="contractName != null and contractName != ''">#{contractName},</if>
  164. <if test="contractBegin != null and contractBegin != ''">#{contractBegin},</if>
  165. <if test="duty != null and duty != ''">#{duty},</if>
  166. <if test="dutyName != null and dutyName != ''">#{dutyName},</if>
  167. <if test="org != null and org != ''">#{org},</if>
  168. <if test="orgName != null and orgName != ''">#{orgName},</if>
  169. <if test="employeePost != null and employeePost != ''">#{employeePost},</if>
  170. <if test="employeePostName != null and employeePostName != ''">#{employeePostName},</if>
  171. <if test="posty != null and posty != ''">#{posty},</if>
  172. <if test="poste != null and poste != ''">#{poste},</if>
  173. <if test="posnc != null and posnc != ''">#{posnc},</if>
  174. <if test="bossEmployeeId != null and bossEmployeeId != ''">#{bossEmployeeId},</if>
  175. <if test="bossName != null and bossName != ''">#{bossName},</if>
  176. <if test="bossEmployeePost != null and bossEmployeePost != ''">#{bossEmployeePost},</if>
  177. <if test="sex != null and sex != ''">#{sex},</if>
  178. <if test="stext1 != null and stext1 != ''">#{stext1},</if>
  179. <if test="objid2 != null and objid2 != ''">#{objid2},</if>
  180. <if test="stext2 != null and stext2 != ''">#{stext2},</if>
  181. <if test="objid3 != null and objid3 != ''">#{objid3},</if>
  182. <if test="stext3 != null and stext3 != ''">#{stext3},</if>
  183. <if test="objid4 != null and objid4 != ''">#{objid4},</if>
  184. <if test="stext4 != null and stext4 != ''">#{stext4},</if>
  185. <if test="objid5 != null and objid5 != ''">#{objid5},</if>
  186. <if test="stext5 != null and stext5 != ''">#{stext5},</if>
  187. <if test="objid6 != null and objid6 != ''">#{objid6},</if>
  188. <if test="stext6 != null and stext6 != ''">#{stext6},</if>
  189. <if test="dataversion != null and dataversion != ''">#{dataversion},</if>
  190. <if test="etlCreatime != null ">#{etlCreatime},</if>
  191. <if test="lineId != null and lineId != ''">#{lineId},</if>
  192. <if test="packageId != null and packageId != ''">#{packageId},</if>
  193. </trim>
  194. </insert>
  195. <update id="updateMetaEmployeeDiy" parameterType="MetaEmployeeDiy">
  196. update meta_employee_diy
  197. <trim prefix="SET" suffixOverrides=",">
  198. <if test="loginName != null and loginName != ''">login_name = #{loginName},</if>
  199. <if test="email != null and email != ''">email = #{email},</if>
  200. <if test="mobile != null and mobile != ''">mobile = #{mobile},</if>
  201. <if test="sapEmployeeId != null and sapEmployeeId != ''">sap_employee_id = #{sapEmployeeId},</if>
  202. <if test="sapCostCenterCode != null and sapCostCenterCode != ''">sap_cost_center_code = #{sapCostCenterCode},</if>
  203. <if test="sapCostCenter != null and sapCostCenter != ''">sap_cost_center = #{sapCostCenter},</if>
  204. <if test="sapCompanyCode != null and sapCompanyCode != ''">sap_company_code = #{sapCompanyCode},</if>
  205. <if test="status != null ">status = #{status},</if>
  206. <if test="objid1 != null and objid1 != ''">objid_1 = #{objid1},</if>
  207. <if test="contract != null and contract != ''">contract = #{contract},</if>
  208. <if test="contractName != null and contractName != ''">contract_name = #{contractName},</if>
  209. <if test="contractBegin != null and contractBegin != ''">contract_begin = #{contractBegin},</if>
  210. <if test="duty != null and duty != ''">duty = #{duty},</if>
  211. <if test="dutyName != null and dutyName != ''">duty_name = #{dutyName},</if>
  212. <if test="org != null and org != ''">org = #{org},</if>
  213. <if test="orgName != null and orgName != ''">org_name = #{orgName},</if>
  214. <if test="employeePost != null and employeePost != ''">employee_post = #{employeePost},</if>
  215. <if test="employeePostName != null and employeePostName != ''">employee_post_name = #{employeePostName},</if>
  216. <if test="posty != null and posty != ''">posty = #{posty},</if>
  217. <if test="poste != null and poste != ''">poste = #{poste},</if>
  218. <if test="posnc != null and posnc != ''">posnc = #{posnc},</if>
  219. <if test="bossEmployeeId != null and bossEmployeeId != ''">boss_employee_id = #{bossEmployeeId},</if>
  220. <if test="bossName != null and bossName != ''">boss_name = #{bossName},</if>
  221. <if test="bossEmployeePost != null and bossEmployeePost != ''">boss_employee_post = #{bossEmployeePost},</if>
  222. <if test="sex != null and sex != ''">sex = #{sex},</if>
  223. <if test="stext1 != null and stext1 != ''">stext_1 = #{stext1},</if>
  224. <if test="objid2 != null and objid2 != ''">objid_2 = #{objid2},</if>
  225. <if test="stext2 != null and stext2 != ''">stext_2 = #{stext2},</if>
  226. <if test="objid3 != null and objid3 != ''">objid_3 = #{objid3},</if>
  227. <if test="stext3 != null and stext3 != ''">stext_3 = #{stext3},</if>
  228. <if test="objid4 != null and objid4 != ''">objid_4 = #{objid4},</if>
  229. <if test="stext4 != null and stext4 != ''">stext_4 = #{stext4},</if>
  230. <if test="objid5 != null and objid5 != ''">objid_5 = #{objid5},</if>
  231. <if test="stext5 != null and stext5 != ''">stext_5 = #{stext5},</if>
  232. <if test="objid6 != null and objid6 != ''">objid_6 = #{objid6},</if>
  233. <if test="stext6 != null and stext6 != ''">stext_6 = #{stext6},</if>
  234. <if test="dataversion != null and dataversion != ''">dataversion = #{dataversion},</if>
  235. <if test="etlCreatime != null ">etl_creatime = #{etlCreatime},</if>
  236. <if test="lineId != null and lineId != ''">line_id = #{lineId},</if>
  237. <if test="packageId != null and packageId != ''">package_id = #{packageId},</if>
  238. </trim>
  239. where name = #{name}
  240. </update>
  241. <delete id="deleteMetaEmployeeDiyById" parameterType="String">
  242. delete from meta_employee_diy where name = #{name}
  243. </delete>
  244. <delete id="deleteMetaEmployeeDiyByIds" parameterType="String">
  245. delete from meta_employee_diy where name in
  246. <foreach item="name" collection="array" open="(" separator="," close=")">
  247. #{name}
  248. </foreach>
  249. </delete>
  250. </mapper>