2023-12-18 18:54:50 +08:00
|
|
|
<?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.XgfUserMapper">
|
|
|
|
|
|
|
|
<!--表名 -->
|
|
|
|
<sql id="tableName">
|
|
|
|
XGF_USER
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
<!-- 字段 -->
|
|
|
|
<sql id="Field">
|
|
|
|
f.XGF_USER_ID,
|
|
|
|
f.USERNAME,
|
|
|
|
f.NAME,
|
|
|
|
f.VALID_FLAG,
|
|
|
|
f.BELONG_TO_CORP,
|
|
|
|
f.BELONG_TO_CORP_NAME,
|
|
|
|
f.ISDELETE,
|
|
|
|
f.CREATED_TIME,
|
2023-12-18 19:58:52 +08:00
|
|
|
f.CORPINFO_ID,
|
|
|
|
f.STATUS,
|
2023-12-19 15:01:44 +08:00
|
|
|
f.OPERATOR_TIME,
|
2023-12-20 14:49:01 +08:00
|
|
|
f.ISFLOW,
|
|
|
|
f.STUDY_STATUS
|
2023-12-18 18:54:50 +08:00
|
|
|
</sql>
|
|
|
|
|
|
|
|
<!-- 字段用于新增 -->
|
|
|
|
<sql id="Field2">
|
|
|
|
XGF_USER_ID,
|
|
|
|
USERNAME,
|
|
|
|
NAME,
|
|
|
|
VALID_FLAG,
|
|
|
|
BELONG_TO_CORP,
|
|
|
|
BELONG_TO_CORP_NAME,
|
|
|
|
ISDELETE,
|
|
|
|
CREATED_TIME,
|
2023-12-18 19:58:52 +08:00
|
|
|
CORPINFO_ID,
|
|
|
|
STATUS,
|
2023-12-19 15:01:44 +08:00
|
|
|
OPERATOR_TIME,
|
2023-12-20 14:49:01 +08:00
|
|
|
ISFLOW,
|
|
|
|
STUDY_STATUS
|
2023-12-18 18:54:50 +08:00
|
|
|
</sql>
|
|
|
|
|
|
|
|
<!-- 字段值 -->
|
|
|
|
<sql id="FieldValue">
|
|
|
|
#{XGF_USER_ID},
|
|
|
|
#{USERNAME},
|
|
|
|
#{NAME},
|
|
|
|
#{VALID_FLAG},
|
|
|
|
#{BELONG_TO_CORP},
|
|
|
|
#{BELONG_TO_CORP_NAME},
|
|
|
|
#{ISDELETE},
|
|
|
|
#{CREATED_TIME},
|
2023-12-18 19:58:52 +08:00
|
|
|
#{CORPINFO_ID},
|
|
|
|
#{STATUS},
|
2023-12-19 15:01:44 +08:00
|
|
|
#{OPERATOR_TIME},
|
2023-12-20 14:49:01 +08:00
|
|
|
#{ISFLOW},
|
|
|
|
#{STUDY_STATUS}
|
2023-12-18 18:54:50 +08:00
|
|
|
</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
|
|
|
|
ISDELETE = '1'
|
|
|
|
where
|
|
|
|
XGF_USER_ID = #{XGF_USER_ID}
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
<!-- 修改 -->
|
|
|
|
<update id="edit" parameterType="pd">
|
|
|
|
update
|
|
|
|
<include refid="tableName"></include>
|
|
|
|
set
|
|
|
|
USERNAME = #{USERNAME},
|
|
|
|
NAME = #{NAME},
|
|
|
|
VALID_FLAG = #{VALID_FLAG},
|
|
|
|
BELONG_TO_CORP = #{BELONG_TO_CORP},
|
|
|
|
BELONG_TO_CORP_NAME = #{BELONG_TO_CORP_NAME},
|
|
|
|
ISDELETE = #{ISDELETE},
|
|
|
|
CREATED_TIME = #{CREATED_TIME},
|
2023-12-18 19:58:52 +08:00
|
|
|
CORPINFO_ID = #{CORPINFO_ID},
|
|
|
|
STATUS = #{STATUS},
|
2023-12-19 15:01:44 +08:00
|
|
|
OPERATOR_TIME = #{OPERATOR_TIME},
|
2023-12-20 14:49:01 +08:00
|
|
|
ISFLOW = #{ISFLOW},
|
|
|
|
STUDY_STATUS = #{STUDY_STATUS}
|
2023-12-18 18:54:50 +08:00
|
|
|
where
|
|
|
|
XGF_USER_ID = #{XGF_USER_ID}
|
|
|
|
</update>
|
|
|
|
|
2023-12-18 20:24:02 +08:00
|
|
|
<update id="updateStatusByUnflowTrain">
|
|
|
|
update
|
|
|
|
<include refid="tableName"></include>
|
|
|
|
set STATUS = #{STATUS}
|
|
|
|
where
|
2023-12-19 15:01:44 +08:00
|
|
|
XGF_USER_ID in (select USER_ID from xgf_train_users bu where bu.TRAINUSERS_ID = #{TRAINUSERS_ID})
|
2023-12-18 20:24:02 +08:00
|
|
|
</update>
|
|
|
|
<update id="bantchUpdateStatus">
|
|
|
|
update
|
|
|
|
<include refid="tableName"></include>
|
2023-12-20 14:49:01 +08:00
|
|
|
set STUDY_STATUS = #{STATUS}
|
2023-12-18 20:24:02 +08:00
|
|
|
where
|
|
|
|
XGF_USER_ID in
|
|
|
|
<foreach item="item" index="index" collection="arrayDATA_ids" open="(" separator="," close=")">
|
|
|
|
#{item}
|
|
|
|
</foreach>
|
|
|
|
</update>
|
|
|
|
<update id="updateStatusByFlowTrain">
|
|
|
|
update
|
|
|
|
<include refid="tableName"></include>
|
|
|
|
set STATUS = #{STATUS}
|
|
|
|
where
|
2023-12-19 15:01:44 +08:00
|
|
|
XGF_USER_ID in (select USER_ID from xgf_train_users bu where bu.TRAININGBATCH_ID = #{TRAININGBATCH_ID})
|
2023-12-18 20:24:02 +08:00
|
|
|
</update>
|
|
|
|
<update id="graduation">
|
2023-12-19 15:01:44 +08:00
|
|
|
update xgf_train_users a set a.STATUS = #{STATUS} where a.TRAINUSERS_ID in
|
2023-12-18 20:24:02 +08:00
|
|
|
<foreach item="item" index="index" collection="list" open="(" separator="," close=")">
|
|
|
|
#{item}
|
|
|
|
</foreach>;
|
|
|
|
</update>
|
|
|
|
<update id="graduationstudent">
|
2023-12-19 15:01:44 +08:00
|
|
|
update xgf_train_users a set a.STATUS = #{STATUS} where a.TRAINUSERS_ID = #{TRAINUSERS_ID}
|
2023-12-18 20:24:02 +08:00
|
|
|
</update>
|
|
|
|
|
2023-12-18 18:54:50 +08:00
|
|
|
<!-- 通过ID获取数据 -->
|
|
|
|
<select id="findById" parameterType="pd" resultType="pd">
|
|
|
|
select
|
|
|
|
<include refid="Field"></include>
|
|
|
|
from
|
|
|
|
<include refid="tableName"></include> f
|
|
|
|
where
|
|
|
|
f.XGF_USER_ID = #{XGF_USER_ID}
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<!-- 列表 -->
|
|
|
|
<select id="listPage" parameterType="page" resultType="pd">
|
|
|
|
select
|
|
|
|
*
|
|
|
|
from
|
|
|
|
<include refid="tableName"></include>
|
|
|
|
f
|
|
|
|
where f.ISDELETE = '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.ISDELETE = '0' and f.CORPINFO_ID = #{pd.CORPINFO_ID}
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<!-- 批量删除 -->
|
|
|
|
<delete id="deleteAll" parameterType="pd">
|
|
|
|
update
|
|
|
|
<include refid="tableName"></include>
|
|
|
|
set
|
|
|
|
ISDELETE = '1',
|
|
|
|
OPERATOR = #{OPERATOR},
|
|
|
|
OPERATTIME = #{OPERATTIME}
|
|
|
|
where
|
|
|
|
SPECIALEQUIPMENT_ID in
|
|
|
|
<foreach item="item" index="index" collection="ArrayDATA_IDS" open="(" separator="," close=")">
|
|
|
|
#{item}
|
|
|
|
</foreach>
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
<!-- 列表(根据多选ID查询数据) -->
|
|
|
|
<select id="listByIds" parameterType="pd" resultType="pd">
|
2023-12-19 20:03:25 +08:00
|
|
|
select
|
|
|
|
<include refid="Field"></include>
|
|
|
|
from
|
|
|
|
<include refid="tableName"></include>
|
|
|
|
f
|
|
|
|
where f.ISDELETE = '0'
|
|
|
|
and XGF_USER_ID in
|
|
|
|
<foreach item="item" index="index" collection="XGF_USER_IDS" open="(" separator="," close=")">
|
|
|
|
#{item}
|
|
|
|
</foreach>
|
|
|
|
</select>
|
2023-12-19 15:01:44 +08:00
|
|
|
<select id="flowlistPage" resultType="com.zcloud.entity.PageData">
|
2023-12-20 14:49:01 +08:00
|
|
|
select a.XGF_USER_ID,a.BELONG_TO_CORP,a.BELONG_TO_CORP_NAME,a.USERNAME,a.NAME,b.MANAGER_DEPARTMENT_ID from xgf_user a
|
2023-12-19 20:03:25 +08:00
|
|
|
left join xgf_user_details b on a.XGF_USER_ID = b.XGF_USER_ID
|
|
|
|
where 1=1
|
|
|
|
<if test="pd.STATUS != null and pd.STATUS != ''">
|
|
|
|
and a.STATUS = #{pd.STATUS}
|
|
|
|
</if>
|
|
|
|
</select>
|
2023-12-20 19:51:15 +08:00
|
|
|
<select id="getInfoById" resultType="com.zcloud.entity.PageData">
|
|
|
|
select a.XGF_USER_ID,
|
|
|
|
a.ISFLOW,
|
|
|
|
a.NAME,
|
|
|
|
b.XGF_USER_DETAILS_ID,
|
|
|
|
b.XGF_USER_ID,
|
|
|
|
b.XGF_USER_NAME,
|
|
|
|
b.BELONG_TO_CORP,
|
|
|
|
b.BELONG_TO_CORP_NAME,
|
|
|
|
b.PHONE,
|
|
|
|
b.CREAT_TIME,
|
|
|
|
b.DEPART_STATE,
|
|
|
|
b.ISDELETE,
|
|
|
|
b.AGE,
|
|
|
|
b.HKLOCAL,
|
|
|
|
b.ADDRESS,
|
|
|
|
b.DEGREE_OF_EDUCATION,
|
|
|
|
b.DEGREE_OF_EDUCATION_NAME,
|
|
|
|
b.CORP_START_DATE,
|
|
|
|
b.POST_ID,
|
|
|
|
b.POST_NAME,
|
|
|
|
b.WORK_SIGN,
|
|
|
|
b.JOINED_DATE,
|
|
|
|
b.WORK_DATE,
|
|
|
|
b.PHOTO,
|
|
|
|
b.DATE_OF_BIRTH,
|
|
|
|
b.ISPAY,
|
|
|
|
b.ISPAY_NUMBER,
|
|
|
|
b.IS_SAFETY_TELL,
|
|
|
|
b.IS_SAFETY_TIME,
|
|
|
|
b.IS_INJURIES_PAY,
|
|
|
|
b.IS_SIGN_LABOR,
|
|
|
|
b.SEX,
|
|
|
|
b.ENTRY_DATE,
|
|
|
|
b.PERSON_WORK_TYPE,
|
|
|
|
b.PERSON_WORK_TYPE_NAME,
|
|
|
|
b.NATIONALITY,
|
|
|
|
b.NATIONALITY_NAME,
|
|
|
|
b.POLITICAL_TIME,
|
|
|
|
b.POLITICAL_STATUS,
|
|
|
|
b.POLITICAL_STATUS_NAME,
|
|
|
|
b.IS_INJURIES_PAY_TIME,
|
|
|
|
b.IS_LEVEL_THREE,
|
|
|
|
b.IS_BODY_ADAPT,
|
|
|
|
b.IS_SPECIAL_JOB,
|
|
|
|
b.CORPINFO_ID,
|
|
|
|
b.MANAGER_DEPARTMENT_ID,
|
|
|
|
b.MANAGER_DEPARTMENT_NAME,
|
|
|
|
b.CARD_ID,
|
|
|
|
b.DEPARTMENT_ID,
|
|
|
|
b.DEPARTMENT_NAME,
|
|
|
|
b.IS_SOCIAL,
|
|
|
|
b.IS_BF,
|
|
|
|
b.SOCIAL_NUMBER,
|
|
|
|
b.zzName,
|
|
|
|
b.POLITICAL_TIME
|
|
|
|
from xgf_user a
|
|
|
|
left join xgf_user_details b on a.XGF_USER_ID = b.XGF_USER_ID
|
|
|
|
where a.IS_DELETE = '0'
|
|
|
|
<if test="XGF_USER_ID != null and XGF_USER_ID != ''">
|
|
|
|
and a.XGF_USER_ID = #{XGF_USER_ID}
|
|
|
|
</if>
|
|
|
|
</select>
|
2023-12-18 18:54:50 +08:00
|
|
|
|
|
|
|
</mapper>
|