|
@@ -0,0 +1,259 @@
|
|
|
+<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
+<!DOCTYPE mapper
|
|
|
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
+<mapper namespace="com.dgtly.sync.mapper.MetaEmployeeDiyMapper">
|
|
|
+
|
|
|
+ <resultMap type="MetaEmployeeDiy" id="MetaEmployeeDiyResult">
|
|
|
+ <result property="name" column="name" />
|
|
|
+ <result property="loginName" column="login_name" />
|
|
|
+ <result property="email" column="email" />
|
|
|
+ <result property="mobile" column="mobile" />
|
|
|
+ <result property="sapEmployeeId" column="sap_employee_id" />
|
|
|
+ <result property="sapCostCenterCode" column="sap_cost_center_code" />
|
|
|
+ <result property="sapCostCenter" column="sap_cost_center" />
|
|
|
+ <result property="sapCompanyCode" column="sap_company_code" />
|
|
|
+ <result property="status" column="status" />
|
|
|
+ <result property="objid1" column="objid_1" />
|
|
|
+ <result property="contract" column="contract" />
|
|
|
+ <result property="contractName" column="contract_name" />
|
|
|
+ <result property="contractBegin" column="contract_begin" />
|
|
|
+ <result property="duty" column="duty" />
|
|
|
+ <result property="dutyName" column="duty_name" />
|
|
|
+ <result property="org" column="org" />
|
|
|
+ <result property="orgName" column="org_name" />
|
|
|
+ <result property="employeePost" column="employee_post" />
|
|
|
+ <result property="employeePostName" column="employee_post_name" />
|
|
|
+ <result property="posty" column="posty" />
|
|
|
+ <result property="poste" column="poste" />
|
|
|
+ <result property="posnc" column="posnc" />
|
|
|
+ <result property="bossEmployeeId" column="boss_employee_id" />
|
|
|
+ <result property="bossName" column="boss_name" />
|
|
|
+ <result property="bossEmployeePost" column="boss_employee_post" />
|
|
|
+ <result property="sex" column="sex" />
|
|
|
+ <result property="stext1" column="stext_1" />
|
|
|
+ <result property="objid2" column="objid_2" />
|
|
|
+ <result property="stext2" column="stext_2" />
|
|
|
+ <result property="objid3" column="objid_3" />
|
|
|
+ <result property="stext3" column="stext_3" />
|
|
|
+ <result property="objid4" column="objid_4" />
|
|
|
+ <result property="stext4" column="stext_4" />
|
|
|
+ <result property="objid5" column="objid_5" />
|
|
|
+ <result property="stext5" column="stext_5" />
|
|
|
+ <result property="objid6" column="objid_6" />
|
|
|
+ <result property="stext6" column="stext_6" />
|
|
|
+ <result property="objidQy" column="objid_qy" />
|
|
|
+ <result property="stextQy" column="stext_qy" />
|
|
|
+ <result property="dataversion" column="dataversion" />
|
|
|
+ <result property="etlCreatime" column="etl_creatime" />
|
|
|
+ <result property="lineId" column="line_id" />
|
|
|
+ <result property="packageId" column="package_id" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectMetaEmployeeDiyVo">
|
|
|
+ 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,
|
|
|
+ boss_name, boss_employee_post, sex, stext_1, objid_2, stext_2, objid_3, stext_3, objid_4,
|
|
|
+ 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
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectMetaEmployeeDiyList" parameterType="MetaEmployeeDiy" resultMap="MetaEmployeeDiyResult">
|
|
|
+ <include refid="selectMetaEmployeeDiyVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="name != null and name != ''"> and name = #{name}</if>
|
|
|
+ <if test="loginName != null and loginName != ''"> and login_name = #{loginName}</if>
|
|
|
+ <if test="email != null and email != ''"> and email = #{email}</if>
|
|
|
+ <if test="mobile != null and mobile != ''"> and mobile = #{mobile}</if>
|
|
|
+ <if test="sapEmployeeId != null and sapEmployeeId != ''"> and sap_employee_id = #{sapEmployeeId}</if>
|
|
|
+ <if test="sapCostCenterCode != null and sapCostCenterCode != ''"> and sap_cost_center_code = #{sapCostCenterCode}</if>
|
|
|
+ <if test="sapCostCenter != null and sapCostCenter != ''"> and sap_cost_center = #{sapCostCenter}</if>
|
|
|
+ <if test="sapCompanyCode != null and sapCompanyCode != ''"> and sap_company_code = #{sapCompanyCode}</if>
|
|
|
+ <if test="status != null "> and status = #{status}</if>
|
|
|
+ <if test="objid1 != null and objid1 != ''"> and objid_1 = #{objid1}</if>
|
|
|
+ <if test="contract != null and contract != ''"> and contract = #{contract}</if>
|
|
|
+ <if test="contractName != null and contractName != ''"> and contract_name = #{contractName}</if>
|
|
|
+ <if test="contractBegin != null and contractBegin != ''"> and contract_begin = #{contractBegin}</if>
|
|
|
+ <if test="duty != null and duty != ''"> and duty = #{duty}</if>
|
|
|
+ <if test="dutyName != null and dutyName != ''"> and duty_name = #{dutyName}</if>
|
|
|
+ <if test="org != null and org != ''"> and org = #{org}</if>
|
|
|
+ <if test="orgName != null and orgName != ''"> and org_name = #{orgName}</if>
|
|
|
+ <if test="employeePost != null and employeePost != ''"> and employee_post = #{employeePost}</if>
|
|
|
+ <if test="employeePostName != null and employeePostName != ''"> and employee_post_name = #{employeePostName}</if>
|
|
|
+ <if test="posty != null and posty != ''"> and posty = #{posty}</if>
|
|
|
+ <if test="poste != null and poste != ''"> and poste = #{poste}</if>
|
|
|
+ <if test="posnc != null and posnc != ''"> and posnc = #{posnc}</if>
|
|
|
+ <if test="bossEmployeeId != null and bossEmployeeId != ''"> and boss_employee_id = #{bossEmployeeId}</if>
|
|
|
+ <if test="bossName != null and bossName != ''"> and boss_name = #{bossName}</if>
|
|
|
+ <if test="bossEmployeePost != null and bossEmployeePost != ''"> and boss_employee_post = #{bossEmployeePost}</if>
|
|
|
+ <if test="sex != null and sex != ''"> and sex = #{sex}</if>
|
|
|
+ <if test="stext1 != null and stext1 != ''"> and stext_1 = #{stext1}</if>
|
|
|
+ <if test="objid2 != null and objid2 != ''"> and objid_2 = #{objid2}</if>
|
|
|
+ <if test="stext2 != null and stext2 != ''"> and stext_2 = #{stext2}</if>
|
|
|
+ <if test="objid3 != null and objid3 != ''"> and objid_3 = #{objid3}</if>
|
|
|
+ <if test="stext3 != null and stext3 != ''"> and stext_3 = #{stext3}</if>
|
|
|
+ <if test="objid4 != null and objid4 != ''"> and objid_4 = #{objid4}</if>
|
|
|
+ <if test="stext4 != null and stext4 != ''"> and stext_4 = #{stext4}</if>
|
|
|
+ <if test="objid5 != null and objid5 != ''"> and objid_5 = #{objid5}</if>
|
|
|
+ <if test="stext5 != null and stext5 != ''"> and stext_5 = #{stext5}</if>
|
|
|
+ <if test="objid6 != null and objid6 != ''"> and objid_6 = #{objid6}</if>
|
|
|
+ <if test="stext6 != null and stext6 != ''"> and stext_6 = #{stext6}</if>
|
|
|
+ <if test="dataversion != null and dataversion != ''"> and dataversion = #{dataversion}</if>
|
|
|
+ <if test="etlCreatime != null "> and etl_creatime = #{etlCreatime}</if>
|
|
|
+ <if test="lineId != null and lineId != ''"> and line_id = #{lineId}</if>
|
|
|
+ <if test="packageId != null and packageId != ''"> and package_id = #{packageId}</if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectMetaEmployeeDiyById" parameterType="String" resultMap="MetaEmployeeDiyResult">
|
|
|
+ <include refid="selectMetaEmployeeDiyVo"/>
|
|
|
+ where name = #{name}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertMetaEmployeeDiy" parameterType="MetaEmployeeDiy">
|
|
|
+ insert into meta_employee_diy
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="name != null and name != ''">name,</if>
|
|
|
+ <if test="loginName != null and loginName != ''">login_name,</if>
|
|
|
+ <if test="email != null and email != ''">email,</if>
|
|
|
+ <if test="mobile != null and mobile != ''">mobile,</if>
|
|
|
+ <if test="sapEmployeeId != null and sapEmployeeId != ''">sap_employee_id,</if>
|
|
|
+ <if test="sapCostCenterCode != null and sapCostCenterCode != ''">sap_cost_center_code,</if>
|
|
|
+ <if test="sapCostCenter != null and sapCostCenter != ''">sap_cost_center,</if>
|
|
|
+ <if test="sapCompanyCode != null and sapCompanyCode != ''">sap_company_code,</if>
|
|
|
+ <if test="status != null ">status,</if>
|
|
|
+ <if test="objid1 != null and objid1 != ''">objid_1,</if>
|
|
|
+ <if test="contract != null and contract != ''">contract,</if>
|
|
|
+ <if test="contractName != null and contractName != ''">contract_name,</if>
|
|
|
+ <if test="contractBegin != null and contractBegin != ''">contract_begin,</if>
|
|
|
+ <if test="duty != null and duty != ''">duty,</if>
|
|
|
+ <if test="dutyName != null and dutyName != ''">duty_name,</if>
|
|
|
+ <if test="org != null and org != ''">org,</if>
|
|
|
+ <if test="orgName != null and orgName != ''">org_name,</if>
|
|
|
+ <if test="employeePost != null and employeePost != ''">employee_post,</if>
|
|
|
+ <if test="employeePostName != null and employeePostName != ''">employee_post_name,</if>
|
|
|
+ <if test="posty != null and posty != ''">posty,</if>
|
|
|
+ <if test="poste != null and poste != ''">poste,</if>
|
|
|
+ <if test="posnc != null and posnc != ''">posnc,</if>
|
|
|
+ <if test="bossEmployeeId != null and bossEmployeeId != ''">boss_employee_id,</if>
|
|
|
+ <if test="bossName != null and bossName != ''">boss_name,</if>
|
|
|
+ <if test="bossEmployeePost != null and bossEmployeePost != ''">boss_employee_post,</if>
|
|
|
+ <if test="sex != null and sex != ''">sex,</if>
|
|
|
+ <if test="stext1 != null and stext1 != ''">stext_1,</if>
|
|
|
+ <if test="objid2 != null and objid2 != ''">objid_2,</if>
|
|
|
+ <if test="stext2 != null and stext2 != ''">stext_2,</if>
|
|
|
+ <if test="objid3 != null and objid3 != ''">objid_3,</if>
|
|
|
+ <if test="stext3 != null and stext3 != ''">stext_3,</if>
|
|
|
+ <if test="objid4 != null and objid4 != ''">objid_4,</if>
|
|
|
+ <if test="stext4 != null and stext4 != ''">stext_4,</if>
|
|
|
+ <if test="objid5 != null and objid5 != ''">objid_5,</if>
|
|
|
+ <if test="stext5 != null and stext5 != ''">stext_5,</if>
|
|
|
+ <if test="objid6 != null and objid6 != ''">objid_6,</if>
|
|
|
+ <if test="stext6 != null and stext6 != ''">stext_6,</if>
|
|
|
+ <if test="dataversion != null and dataversion != ''">dataversion,</if>
|
|
|
+ <if test="etlCreatime != null ">etl_creatime,</if>
|
|
|
+ <if test="lineId != null and lineId != ''">line_id,</if>
|
|
|
+ <if test="packageId != null and packageId != ''">package_id,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="name != null and name != ''">#{name},</if>
|
|
|
+ <if test="loginName != null and loginName != ''">#{loginName},</if>
|
|
|
+ <if test="email != null and email != ''">#{email},</if>
|
|
|
+ <if test="mobile != null and mobile != ''">#{mobile},</if>
|
|
|
+ <if test="sapEmployeeId != null and sapEmployeeId != ''">#{sapEmployeeId},</if>
|
|
|
+ <if test="sapCostCenterCode != null and sapCostCenterCode != ''">#{sapCostCenterCode},</if>
|
|
|
+ <if test="sapCostCenter != null and sapCostCenter != ''">#{sapCostCenter},</if>
|
|
|
+ <if test="sapCompanyCode != null and sapCompanyCode != ''">#{sapCompanyCode},</if>
|
|
|
+ <if test="status != null ">#{status},</if>
|
|
|
+ <if test="objid1 != null and objid1 != ''">#{objid1},</if>
|
|
|
+ <if test="contract != null and contract != ''">#{contract},</if>
|
|
|
+ <if test="contractName != null and contractName != ''">#{contractName},</if>
|
|
|
+ <if test="contractBegin != null and contractBegin != ''">#{contractBegin},</if>
|
|
|
+ <if test="duty != null and duty != ''">#{duty},</if>
|
|
|
+ <if test="dutyName != null and dutyName != ''">#{dutyName},</if>
|
|
|
+ <if test="org != null and org != ''">#{org},</if>
|
|
|
+ <if test="orgName != null and orgName != ''">#{orgName},</if>
|
|
|
+ <if test="employeePost != null and employeePost != ''">#{employeePost},</if>
|
|
|
+ <if test="employeePostName != null and employeePostName != ''">#{employeePostName},</if>
|
|
|
+ <if test="posty != null and posty != ''">#{posty},</if>
|
|
|
+ <if test="poste != null and poste != ''">#{poste},</if>
|
|
|
+ <if test="posnc != null and posnc != ''">#{posnc},</if>
|
|
|
+ <if test="bossEmployeeId != null and bossEmployeeId != ''">#{bossEmployeeId},</if>
|
|
|
+ <if test="bossName != null and bossName != ''">#{bossName},</if>
|
|
|
+ <if test="bossEmployeePost != null and bossEmployeePost != ''">#{bossEmployeePost},</if>
|
|
|
+ <if test="sex != null and sex != ''">#{sex},</if>
|
|
|
+ <if test="stext1 != null and stext1 != ''">#{stext1},</if>
|
|
|
+ <if test="objid2 != null and objid2 != ''">#{objid2},</if>
|
|
|
+ <if test="stext2 != null and stext2 != ''">#{stext2},</if>
|
|
|
+ <if test="objid3 != null and objid3 != ''">#{objid3},</if>
|
|
|
+ <if test="stext3 != null and stext3 != ''">#{stext3},</if>
|
|
|
+ <if test="objid4 != null and objid4 != ''">#{objid4},</if>
|
|
|
+ <if test="stext4 != null and stext4 != ''">#{stext4},</if>
|
|
|
+ <if test="objid5 != null and objid5 != ''">#{objid5},</if>
|
|
|
+ <if test="stext5 != null and stext5 != ''">#{stext5},</if>
|
|
|
+ <if test="objid6 != null and objid6 != ''">#{objid6},</if>
|
|
|
+ <if test="stext6 != null and stext6 != ''">#{stext6},</if>
|
|
|
+ <if test="dataversion != null and dataversion != ''">#{dataversion},</if>
|
|
|
+ <if test="etlCreatime != null ">#{etlCreatime},</if>
|
|
|
+ <if test="lineId != null and lineId != ''">#{lineId},</if>
|
|
|
+ <if test="packageId != null and packageId != ''">#{packageId},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateMetaEmployeeDiy" parameterType="MetaEmployeeDiy">
|
|
|
+ update meta_employee_diy
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="loginName != null and loginName != ''">login_name = #{loginName},</if>
|
|
|
+ <if test="email != null and email != ''">email = #{email},</if>
|
|
|
+ <if test="mobile != null and mobile != ''">mobile = #{mobile},</if>
|
|
|
+ <if test="sapEmployeeId != null and sapEmployeeId != ''">sap_employee_id = #{sapEmployeeId},</if>
|
|
|
+ <if test="sapCostCenterCode != null and sapCostCenterCode != ''">sap_cost_center_code = #{sapCostCenterCode},</if>
|
|
|
+ <if test="sapCostCenter != null and sapCostCenter != ''">sap_cost_center = #{sapCostCenter},</if>
|
|
|
+ <if test="sapCompanyCode != null and sapCompanyCode != ''">sap_company_code = #{sapCompanyCode},</if>
|
|
|
+ <if test="status != null ">status = #{status},</if>
|
|
|
+ <if test="objid1 != null and objid1 != ''">objid_1 = #{objid1},</if>
|
|
|
+ <if test="contract != null and contract != ''">contract = #{contract},</if>
|
|
|
+ <if test="contractName != null and contractName != ''">contract_name = #{contractName},</if>
|
|
|
+ <if test="contractBegin != null and contractBegin != ''">contract_begin = #{contractBegin},</if>
|
|
|
+ <if test="duty != null and duty != ''">duty = #{duty},</if>
|
|
|
+ <if test="dutyName != null and dutyName != ''">duty_name = #{dutyName},</if>
|
|
|
+ <if test="org != null and org != ''">org = #{org},</if>
|
|
|
+ <if test="orgName != null and orgName != ''">org_name = #{orgName},</if>
|
|
|
+ <if test="employeePost != null and employeePost != ''">employee_post = #{employeePost},</if>
|
|
|
+ <if test="employeePostName != null and employeePostName != ''">employee_post_name = #{employeePostName},</if>
|
|
|
+ <if test="posty != null and posty != ''">posty = #{posty},</if>
|
|
|
+ <if test="poste != null and poste != ''">poste = #{poste},</if>
|
|
|
+ <if test="posnc != null and posnc != ''">posnc = #{posnc},</if>
|
|
|
+ <if test="bossEmployeeId != null and bossEmployeeId != ''">boss_employee_id = #{bossEmployeeId},</if>
|
|
|
+ <if test="bossName != null and bossName != ''">boss_name = #{bossName},</if>
|
|
|
+ <if test="bossEmployeePost != null and bossEmployeePost != ''">boss_employee_post = #{bossEmployeePost},</if>
|
|
|
+ <if test="sex != null and sex != ''">sex = #{sex},</if>
|
|
|
+ <if test="stext1 != null and stext1 != ''">stext_1 = #{stext1},</if>
|
|
|
+ <if test="objid2 != null and objid2 != ''">objid_2 = #{objid2},</if>
|
|
|
+ <if test="stext2 != null and stext2 != ''">stext_2 = #{stext2},</if>
|
|
|
+ <if test="objid3 != null and objid3 != ''">objid_3 = #{objid3},</if>
|
|
|
+ <if test="stext3 != null and stext3 != ''">stext_3 = #{stext3},</if>
|
|
|
+ <if test="objid4 != null and objid4 != ''">objid_4 = #{objid4},</if>
|
|
|
+ <if test="stext4 != null and stext4 != ''">stext_4 = #{stext4},</if>
|
|
|
+ <if test="objid5 != null and objid5 != ''">objid_5 = #{objid5},</if>
|
|
|
+ <if test="stext5 != null and stext5 != ''">stext_5 = #{stext5},</if>
|
|
|
+ <if test="objid6 != null and objid6 != ''">objid_6 = #{objid6},</if>
|
|
|
+ <if test="stext6 != null and stext6 != ''">stext_6 = #{stext6},</if>
|
|
|
+ <if test="dataversion != null and dataversion != ''">dataversion = #{dataversion},</if>
|
|
|
+ <if test="etlCreatime != null ">etl_creatime = #{etlCreatime},</if>
|
|
|
+ <if test="lineId != null and lineId != ''">line_id = #{lineId},</if>
|
|
|
+ <if test="packageId != null and packageId != ''">package_id = #{packageId},</if>
|
|
|
+ </trim>
|
|
|
+ where name = #{name}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deleteMetaEmployeeDiyById" parameterType="String">
|
|
|
+ delete from meta_employee_diy where name = #{name}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteMetaEmployeeDiyByIds" parameterType="String">
|
|
|
+ delete from meta_employee_diy where name in
|
|
|
+ <foreach item="name" collection="array" open="(" separator="," close=")">
|
|
|
+ #{name}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+
|
|
|
+</mapper>
|