350 lines
9.2 KiB
XML
350 lines
9.2 KiB
XML
<?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.zcloud.mapper.datasource.xgf.XgfUserDetailsMapper">
|
|
|
|
<!--表名 -->
|
|
<sql id="tableName">
|
|
XGF_USER_DETAILS
|
|
</sql>
|
|
|
|
<!-- 字段 -->
|
|
<sql id="Field">
|
|
f.XGF_USER_DETAILS_ID,
|
|
f.XGF_USER_ID,
|
|
f.XGF_USER_NAME,
|
|
f.BELONG_TO_CORP,
|
|
f.BELONG_TO_CORP_NAME,
|
|
f.PHONE,
|
|
f.CREATE_TIME,
|
|
f.DEPART_STATE,
|
|
f.IS_DELETE,
|
|
f.AGE,
|
|
f.HKLOCAL,
|
|
f.ADDRESS,
|
|
f.DEGREE_OF_EDUCATION,
|
|
f.DEGREE_OF_EDUCATION_NAME,
|
|
f.CORP_START_DATE,
|
|
f.POST_ID,
|
|
f.POST_NAME,
|
|
f.WORK_SIGN,
|
|
f.JOINED_DATE,
|
|
f.WORK_DATE,
|
|
f.PHOTO,
|
|
f.DATE_OF_BIRTH,
|
|
f.ISPAY,
|
|
f.ISPAY_NUMBER,
|
|
f.IS_SAFETY_TELL,
|
|
f.IS_SAFETY_TIME,
|
|
f.IS_INJURIES_PAY,
|
|
f.IS_SIGN_LABOR,
|
|
f.SEX,
|
|
f.ENTRY_DATE,
|
|
f.PERSON_WORK_TYPE,
|
|
f.PERSON_WORK_TYPE_NAME,
|
|
f.NATIONALITY,
|
|
f.NATIONALITY_NAME,
|
|
f.POLITICAL_TIME,
|
|
f.POLITICAL_STATUS,
|
|
f.POLITICAL_STATUS_NAME,
|
|
f.IS_INJURIES_PAY_TIME,
|
|
f.IS_LEVEL_THREE,
|
|
f.IS_BODY_ADAPT,
|
|
f.IS_SPECIAL_JOB,
|
|
f.CORPINFO_ID,
|
|
f.MANAGER_DEPARTMENT_ID,
|
|
f.MANAGER_DEPARTMENT_NAME,
|
|
f.COMPETENT_DEPARTMENT_ID,
|
|
f.COMPETENT_DEPARTMENT_NAME,
|
|
f.MAIN_DEPARTMENT_ID,
|
|
f.MAIN_DEPARTMENT_NAME,
|
|
f.CARD_ID,
|
|
f.DEPARTMENT_ID,
|
|
f.DEPARTMENT_NAME,
|
|
f.IS_BF,
|
|
f.IS_SOCIAL,
|
|
f.SOCIAL_NUMBER,
|
|
f.zzName,
|
|
f.ANNEX,
|
|
f.ATTORNEY,
|
|
f.COMMITMENT_LETTER
|
|
</sql>
|
|
|
|
<!-- 字段用于新增 -->
|
|
<sql id="Field2">
|
|
XGF_USER_DETAILS_ID,
|
|
XGF_USER_ID,
|
|
XGF_USER_NAME,
|
|
BELONG_TO_CORP,
|
|
BELONG_TO_CORP_NAME,
|
|
PHONE,
|
|
CREATE_TIME,
|
|
DEPART_STATE,
|
|
IS_DELETE,
|
|
AGE,
|
|
HKLOCAL,
|
|
ADDRESS,
|
|
DEGREE_OF_EDUCATION,
|
|
DEGREE_OF_EDUCATION_NAME,
|
|
CORP_START_DATE,
|
|
POST_ID,
|
|
POST_NAME,
|
|
WORK_SIGN,
|
|
JOINED_DATE,
|
|
WORK_DATE,
|
|
PHOTO,
|
|
DATE_OF_BIRTH,
|
|
ISPAY,
|
|
ISPAY_NUMBER,
|
|
IS_SAFETY_TELL,
|
|
IS_SAFETY_TIME,
|
|
IS_INJURIES_PAY,
|
|
IS_SIGN_LABOR,
|
|
SEX,
|
|
ENTRY_DATE,
|
|
PERSON_WORK_TYPE,
|
|
PERSON_WORK_TYPE_NAME,
|
|
NATIONALITY,
|
|
NATIONALITY_NAME,
|
|
POLITICAL_TIME,
|
|
POLITICAL_STATUS,
|
|
POLITICAL_STATUS_NAME,
|
|
IS_INJURIES_PAY_TIME,
|
|
IS_LEVEL_THREE,
|
|
IS_BODY_ADAPT,
|
|
IS_SPECIAL_JOB,
|
|
CORPINFO_ID,
|
|
MANAGER_DEPARTMENT_ID,
|
|
MANAGER_DEPARTMENT_NAME,
|
|
COMPETENT_DEPARTMENT_ID,
|
|
COMPETENT_DEPARTMENT_NAME,
|
|
MAIN_DEPARTMENT_ID,
|
|
MAIN_DEPARTMENT_NAME,
|
|
CARD_ID,
|
|
DEPARTMENT_ID,
|
|
DEPARTMENT_NAME,
|
|
IS_BF,
|
|
IS_SOCIAL,
|
|
SOCIAL_NUMBER,
|
|
zzName,
|
|
ANNEX,
|
|
ATTORNEY,
|
|
COMMITMENT_LETTER
|
|
</sql>
|
|
|
|
<!-- 字段值 -->
|
|
<sql id="FieldValue">
|
|
#{XGF_USER_DETAILS_ID},
|
|
#{XGF_USER_ID},
|
|
#{XGF_USER_NAME},
|
|
#{BELONG_TO_CORP},
|
|
#{BELONG_TO_CORP_NAME},
|
|
#{PHONE},
|
|
#{CREATE_TIME},
|
|
#{DEPART_STATE},
|
|
#{IS_DELETE},
|
|
#{AGE},
|
|
#{HKLOCAL},
|
|
#{ADDRESS},
|
|
#{DEGREE_OF_EDUCATION},
|
|
#{DEGREE_OF_EDUCATION_NAME},
|
|
#{CORP_START_DATE},
|
|
#{POST_ID},
|
|
#{POST_NAME},
|
|
#{WORK_SIGN},
|
|
#{JOINED_DATE},
|
|
#{WORK_DATE},
|
|
#{PHOTO},
|
|
#{DATE_OF_BIRTH},
|
|
#{ISPAY},
|
|
#{ISPAY_NUMBER},
|
|
#{IS_SAFETY_TELL},
|
|
#{IS_SAFETY_TIME},
|
|
#{IS_INJURIES_PAY},
|
|
#{IS_SIGN_LABOR},
|
|
#{SEX},
|
|
#{ENTRY_DATE},
|
|
#{PERSON_WORK_TYPE},
|
|
#{PERSON_WORK_TYPE_NAME},
|
|
#{NATIONALITY},
|
|
#{NATIONALITY_NAME},
|
|
#{POLITICAL_TIME},
|
|
#{POLITICAL_STATUS},
|
|
#{POLITICAL_STATUS_NAME},
|
|
#{IS_INJURIES_PAY_TIME},
|
|
#{IS_LEVEL_THREE},
|
|
#{IS_BODY_ADAPT},
|
|
#{IS_SPECIAL_JOB},
|
|
#{CORPINFO_ID},
|
|
#{MANAGER_DEPARTMENT_ID},
|
|
#{MANAGER_DEPARTMENT_NAME},
|
|
#{COMPETENT_DEPARTMENT_ID},
|
|
#{COMPETENT_DEPARTMENT_NAME},
|
|
#{MAIN_DEPARTMENT_ID},
|
|
#{MAIN_DEPARTMENT_NAME},
|
|
#{CARD_ID},
|
|
#{DEPARTMENT_ID},
|
|
#{DEPARTMENT_NAME},
|
|
#{IS_BF},
|
|
#{IS_SOCIAL},
|
|
#{SOCIAL_NUMBER},
|
|
#{zzName},
|
|
#{ANNEX},
|
|
#{ATTORNEY},
|
|
#{COMMITMENT_LETTER}
|
|
</sql>
|
|
|
|
<!-- 新增-->
|
|
<insert id="save" parameterType="pd">
|
|
insert into
|
|
<include refid="tableName"></include>
|
|
(
|
|
<include refid="Field2"></include>
|
|
) values (
|
|
<include refid="FieldValue"></include>
|
|
)
|
|
</insert>
|
|
|
|
<!-- 删除-->
|
|
<delete id="delete" parameterType="pd">
|
|
update
|
|
<include refid="tableName"></include>
|
|
set
|
|
IS_DELETE = '1'
|
|
where
|
|
XGF_USER_ID = #{XGF_USER_ID}
|
|
</delete>
|
|
|
|
<!-- 修改 -->
|
|
<update id="edit" parameterType="pd">
|
|
update
|
|
<include refid="tableName"></include>
|
|
set
|
|
XGF_USER_DETAILS_ID = #{XGF_USER_DETAILS_ID},
|
|
XGF_USER_ID = #{XGF_USER_ID},
|
|
XGF_USER_NAME = #{XGF_USER_NAME},
|
|
BELONG_TO_CORP = #{BELONG_TO_CORP},
|
|
BELONG_TO_CORP_NAME = #{BELONG_TO_CORP_NAME},
|
|
PHONE = #{PHONE},
|
|
CREATE_TIME = #{CREATE_TIME},
|
|
DEPART_STATE = #{DEPART_STATE},
|
|
IS_DELETE = #{IS_DELETE},
|
|
AGE = #{AGE},
|
|
HKLOCAL = #{HKLOCAL},
|
|
ADDRESS = #{ADDRESS},
|
|
DEGREE_OF_EDUCATION = #{DEGREE_OF_EDUCATION},
|
|
DEGREE_OF_EDUCATION_NAME = #{DEGREE_OF_EDUCATION_NAME},
|
|
CORP_START_DATE = #{CORP_START_DATE},
|
|
POST_ID = #{POST_ID},
|
|
POST_NAME = #{POST_NAME},
|
|
WORK_SIGN = #{WORK_SIGN},
|
|
JOINED_DATE = #{JOINED_DATE},
|
|
WORK_DATE = #{WORK_DATE},
|
|
PHOTO = #{PHOTO},
|
|
DATE_OF_BIRTH = #{DATE_OF_BIRTH},
|
|
ISPAY = #{ISPAY},
|
|
ISPAY_NUMBER = #{ISPAY_NUMBER},
|
|
IS_SAFETY_TELL = #{IS_SAFETY_TELL},
|
|
IS_SAFETY_TIME = #{IS_SAFETY_TIME},
|
|
IS_INJURIES_PAY = #{IS_INJURIES_PAY},
|
|
IS_SIGN_LABOR = #{IS_SIGN_LABOR},
|
|
SEX = #{SEX},
|
|
ENTRY_DATE = #{ENTRY_DATE},
|
|
PERSON_WORK_TYPE = #{PERSON_WORK_TYPE},
|
|
PERSON_WORK_TYPE_NAME = #{PERSON_WORK_TYPE_NAME},
|
|
NATIONALITY = #{NATIONALITY},
|
|
NATIONALITY_NAME = #{NATIONALITY_NAME},
|
|
POLITICAL_TIME = #{POLITICAL_TIME},
|
|
POLITICAL_STATUS = #{POLITICAL_STATUS},
|
|
POLITICAL_STATUS_NAME = #{POLITICAL_STATUS_NAME},
|
|
IS_INJURIES_PAY_TIME = #{IS_INJURIES_PAY_TIME},
|
|
IS_LEVEL_THREE = #{IS_LEVEL_THREE},
|
|
IS_BODY_ADAPT = #{IS_BODY_ADAPT},
|
|
IS_SPECIAL_JOB = #{IS_SPECIAL_JOB},
|
|
CORPINFO_ID = #{CORPINFO_ID},
|
|
MANAGER_DEPARTMENT_ID = #{MANAGER_DEPARTMENT_ID},
|
|
MANAGER_DEPARTMENT_NAME = #{MANAGER_DEPARTMENT_NAME},
|
|
COMPETENT_DEPARTMENT_ID = #{COMPETENT_DEPARTMENT_ID},
|
|
COMPETENT_DEPARTMENT_NAME = #{COMPETENT_DEPARTMENT_NAME},
|
|
MAIN_DEPARTMENT_ID = #{MAIN_DEPARTMENT_ID},
|
|
MAIN_DEPARTMENT_NAME = #{MAIN_DEPARTMENT_NAME},
|
|
CARD_ID = #{CARD_ID},
|
|
DEPARTMENT_ID = #{DEPARTMENT_ID},
|
|
DEPARTMENT_NAME = #{DEPARTMENT_NAME},
|
|
IS_BF = #{IS_BF},
|
|
IS_SOCIAL = #{IS_SOCIAL},
|
|
SOCIAL_NUMBER = #{SOCIAL_NUMBER},
|
|
zzName = #{zzName},
|
|
ANNEX = #{ANNEX},
|
|
ATTORNEY = #{ATTORNEY},
|
|
COMMITMENT_LETTER = #{COMMITMENT_LETTER}
|
|
where
|
|
XGF_USER_DETAILS_ID = #{XGF_USER_DETAILS_ID}
|
|
</update>
|
|
|
|
<!-- 通过ID获取数据 -->
|
|
<select id="findById" parameterType="pd" resultType="pd">
|
|
select
|
|
<include refid="Field"></include>
|
|
from
|
|
<include refid="tableName"></include>
|
|
f
|
|
where
|
|
f.XGF_USER_DETAILS_ID = #{XGF_USER_DETAILS_ID}
|
|
</select>
|
|
|
|
<!-- 列表 -->
|
|
<select id="listPage" parameterType="page" resultType="pd">
|
|
select
|
|
*
|
|
from
|
|
<include refid="tableName"></include>
|
|
f
|
|
where f.IS_DELETE = '0' and f.CORPINFO_ID = #{pd.CORPINFO_ID}
|
|
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
|
|
and(f.BELONG_TO_CORP_NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%'))
|
|
</if>
|
|
ORDER BY f.CREATED_TIME DESC
|
|
</select>
|
|
|
|
<!-- 列表(全部) -->
|
|
<select id="listAll" parameterType="pd" resultType="pd">
|
|
select
|
|
*
|
|
<include refid="Field"></include>
|
|
from
|
|
<include refid="tableName"></include>
|
|
f
|
|
where f.IS_DELETE = '0' and f.CORPINFO_ID = #{pd.CORPINFO_ID}
|
|
</select>
|
|
|
|
<!-- 批量删除 -->
|
|
<delete id="deleteAll" parameterType="pd">
|
|
update
|
|
<include refid="tableName"></include>
|
|
set
|
|
IS_DELETE = '1',
|
|
OPERATOR = #{OPERATOR},
|
|
OPERATTIME = #{OPERATTIME}
|
|
where
|
|
XFG_USER_DETAILS_ID in
|
|
<foreach item="item" index="index" collection="ArrayDATA_IDS" open="(" separator="," close=")">
|
|
#{item}
|
|
</foreach>
|
|
</delete>
|
|
|
|
<!-- 列表(根据多选ID查询数据) -->
|
|
<select id="listByIds" parameterType="pd" resultType="pd">
|
|
select
|
|
<include refid="Field"></include>
|
|
from
|
|
<include refid="tableName"></include>
|
|
f
|
|
where f.IS_DELETE = '0'
|
|
and XFG_USER_DETAILS_ID in
|
|
<foreach item="item" index="index" collection="ArrayDATA_IDS" open="(" separator="," close=")">
|
|
#{item}
|
|
</foreach>
|
|
</select>
|
|
|
|
</mapper>
|