123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772 |
- <?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.ruoyi.project.plant.mapper.TStaffmgrMapper">
- <resultMap type="TStaffmgr" id="TStaffmgrResult">
- <result property="id" column="id" />
- <result property="plantCode" column="plant_code" />
- <result property="staffid" column="staffid" />
- <result property="name" column="name" />
- <result property="sex" column="sex" />
- <result property="birthday" column="birthday" />
- <result property="unit" column="unit" />
- <result property="team" column="team" />
- <result property="actualpost" column="actualpost" />
- <result property="contact" column="contact" />
- <result property="delFlag" column="del_flag" />
- <result property="createrCode" column="creater_code" />
- <result property="createdate" column="createdate" />
- <result property="updaterCode" column="updater_code" />
- <result property="updatedate" column="updatedate" />
- <result property="deptId" column="dept_id" />
- <result property="remarks" column="remarks" />
- <result property="deptName" column="dept_name" />
- <result property="education" column="education" />
- <result property="enAbility" column="en_ability" />
- <result property="mail" column="mail" />
- <result property="skillScore" column="skill_score" />
- <result property="accidentNum" column="accident_num" />
- <result property="photo" column="photo" />
- <result property="pId" column="p_id" />
- <result property="specialDuty" column="special_duty" />
- <result property="leftDate" column="left_date" />
- <result property="isRetire" column="is_retire" />
- <result property="region" column="region" />
- <result property="userId" column="user_id" />
- </resultMap>
- <sql id="selectTStaffmgrVo">
- select d.id, d.plant_code,d.left_date, d.staffid, d.name, d.photo, d.sex, d.birthday, d.unit, d.team, d.actualpost, d.contact, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks, d.education, d.en_ability, d.accident_num, d.mail, d.skill_score, d.p_id , d.special_duty, d.region, s.dept_name from t_staffmgr d
- left join sys_dept s on s.dept_id = d.dept_id
- </sql>
- <!-- 查询导师下拉列表 -->
- <select id="selectMentorList" parameterType="TStaffmgr" resultMap="TStaffmgrResult">
- select d.id, s.DICT_LABEL,d.plant_code, d.staffid, d.name, d.photo, d.sex, d.birthday, d.unit,
- d.team, d.actualpost, d.contact, d.del_flag, d.creater_code, d.createdate, d.updater_code,
- d.updatedate, d.dept_id, d.remarks, d.education, d.en_ability, d.accident_num, d.mail,
- d.skill_score, d.p_id , d.special_duty,d.region, s.dept_name
- from t_staffmgr d
- left join sys_dept s on s.dept_id = d.dept_id
- Left join SYS_DICT_DATA s0 on d.UNIT = s0.DICT_VALUE and s0.DICT_TYPE ='STAFF_UNIT'
- LEFT JOIN SYS_DICT_DATA s on d.ACTUALPOST = s.DICT_VALUE and s.DICT_TYPE = 'ACTUALPOST'
- LEFT JOIN SYS_DICT_DATA s1 on d.team = s1.DICT_VALUE and s1.DICT_TYPE = 'TEAM_DIVIDE'
- where
- (s.DICT_LABEL like '%主管%'
- or s.DICT_LABEL like '%经理%'
- or s.DICT_LABEL like '%工程师%')
- and d.DEL_FLAG!=9
- </select>
- <select id="selectUserInfoByStaffmgr" parameterType="TStaffmgr" resultType="map">
- select b.USER_ID userId,b.NICK_NAME nickName from T_STAFFMGR a
- left join SYS_USER b on a.STAFFID=b.STAFFID
- <where>
- <if test="actualposts != null and actualposts != ''">
- and actualpost in
- <foreach collection="actualposts.split(',')" item="item" index="index"
- open="(" close=")" separator=",">
- #{item}
- </foreach>
- </if>
- and a.DEL_FLAG=0
- </where>
- ${params.dataScope}
- </select>
- <select id="selectTStaffmgrListByDeptAndTeam" parameterType="TStaffmgr" resultMap="TStaffmgrResult">
- select u.user_id, d.id, d.plant_code,d.left_date, d.staffid, d.name, d.photo, d.sex, d.birthday, d.unit, d.team, d.actualpost, d.contact, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks, d.education, d.en_ability, d.accident_num, d.mail, d.skill_score, d.p_id , d.special_duty, d.region, s.dept_name from t_staffmgr d
- left join sys_dept s on s.dept_id = d.dept_id
- inner join sys_user u on d.staffid = u.staffid and u.del_flag = 0
- <where>
- <if test="deptId != null and deptId != ''"> and d.unit = #{deptId} </if>
- <if test="unit != null and unit != ''"> and d.dept_id = #{unit} </if>
- <if test="team != null and team != ''"> and d.team = #{team} </if>
- and d.del_flag = 0
- </where>
- </select>
- <select id="selectSaiExecutors" resultMap="TStaffmgrResult">
- select u.user_id, d.id, d.plant_code,d.left_date, d.staffid, d.name, d.photo, d.sex, d.birthday, d.unit, d.team, d.actualpost, d.contact, d.del_flag,
- d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks, d.education, d.en_ability, d.accident_num, d.mail, d.skill_score,
- d.p_id , d.special_duty, d.region, s.dept_name from t_staffmgr d
- left join sys_dept s on s.dept_id = d.dept_id
- inner join sys_user u on d.staffid = u.staffid
- inner join SYS_USER_ROLE ur on u.USER_ID = ur.USER_ID
- inner join SYS_ROLE r on ur.ROLE_ID = r.ROLE_ID
- where (
- d.dept_id in (10040, 108)
- or (d.dept_id = 103 and d.team = 18)
- or (d.dept_id = 103 and r.ROLE_ID = 20016)
- )
- and d.del_flag = 0
- </select>
- <select id="selectSaiInspectors" resultMap="TStaffmgrResult">
- select u.user_id, d.id, d.plant_code,d.left_date, d.staffid, d.name, d.photo, d.sex, d.birthday, d.unit, d.team, d.actualpost, d.contact, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks, d.education, d.en_ability, d.accident_num, d.mail, d.skill_score, d.p_id , d.special_duty, d.region, s.dept_name from t_staffmgr d
- left join sys_dept s on s.dept_id = d.dept_id
- inner join sys_user u on d.staffid = u.staffid
- where d.unit = 10 and d.team = 18 and d.del_flag = 0
- </select>
- <select id="selectTStaffmgrList" parameterType="TStaffmgr" resultMap="TStaffmgrResult">
- <include refid="selectTStaffmgrVo"/>
- Left join SYS_DICT_DATA s0 on d.UNIT = s0.DICT_VALUE and s0.DICT_TYPE ='STAFF_UNIT'
- LEFT JOIN SYS_DICT_DATA s on d.ACTUALPOST = s.DICT_VALUE and s.DICT_TYPE = 'ACTUALPOST'
- LEFT JOIN SYS_DICT_DATA s1 on d.team = s1.DICT_VALUE and s1.DICT_TYPE = 'TEAM_DIVIDE'
- <where>
- <if test="name != null and name != ''"> and name like concat(concat('%', #{name}), '%')</if>
- <if test="sex != null and sex != ''"> and sex = #{sex}</if>
- <if test="unit != null and unit != ''"> and unit = #{unit}</if>
- <if test="specialDuty != null and specialDuty != ''"> and special_duty like concat(concat('%', #{specialDuty}), '%')</if>
- <if test="units != null and units != ''">
- and
- unit in
- <foreach collection="units.split(',')" item="item" index="index"
- open="(" close=")" separator=",">
- #{item}
- </foreach>
- </if>
- <if test="team != null and team != ''"> and team = #{team}</if>
- <if test="teams != null and teams != ''">
- and
- team in
- <foreach collection="teams.split(',')" item="item" index="index"
- open="(" close=")" separator=",">
- #{item}
- </foreach>
- </if>
- <if test="actualpost != null and actualpost != ''"> and actualpost = #{actualpost}</if>
- <if test="actualposts != null and actualposts != ''">
- and
- actualpost in
- <foreach collection="actualposts.split(',')" item="item" index="index"
- open="(" close=")" separator=",">
- #{item}
- </foreach>
- </if>
- <if test="education != null and education != ''"> and education = #{education}</if>
- <if test="educations != null and educations != ''">
- and
- education in
- <foreach collection="educations.split(',')" item="item" index="index"
- open="(" close=")" separator=",">
- #{item}
- </foreach>
- </if>
- <if test="enAbility != null and enAbility != ''"> and en_ability = #{enAbility}</if>
- <if test="enAbilitys != null and enAbilitys != ''">
- and
- en_ability in
- <foreach collection="enAbilitys.split(',')" item="item" index="index"
- open="(" close=")" separator=",">
- #{item}
- </foreach>
- </if>
- <if test="haveEmail != null and haveEmail != ''"> and mail IS NOT NULL</if>
- <if test="skillevaluation != null"> and team = 10
- or team = 12
- or team = 14
- or team = 16
- </if>
- and d.del_flag = 0
- </where>
- <!-- 数据范围过滤 -->
- ${params.dataScope}
- ORDER BY s0.DICT_SORT, s1.DICT_SORT ,s.DICT_SORT , d.staffid
- </select>
- <select id="selectTStaffmgrListByDeptId" parameterType="TStaffmgr" resultMap="TStaffmgrResult">
- <include refid="selectTStaffmgrVo"/>
- <where>
- <if test="actualpost != null and actualpost != ''"> and actualpost = #{actualpost}</if>
- <if test="actualposts != null and actualposts != ''">
- and
- actualpost in
- <foreach collection="actualposts.split(',')" item="item" index="index"
- open="(" close=")" separator=",">
- #{item}
- </foreach>
- </if>
- <if test="deptId != null and deptId != ''"> and d.dept_id = #{deptId} </if>
- and d.del_flag = 0
- </where>
- </select>
- <select id="selectAllTStaffmgrList" parameterType="TStaffmgr" resultMap="TStaffmgrResult">
- <include refid="selectTStaffmgrVo"/>
- Left join SYS_DICT_DATA s0 on d.UNIT = s0.DICT_VALUE and s0.DICT_TYPE ='STAFF_UNIT'
- LEFT JOIN SYS_DICT_DATA s on d.ACTUALPOST = s.DICT_VALUE and s.DICT_TYPE = 'ACTUALPOST'
- LEFT JOIN SYS_DICT_DATA s1 on d.team = s1.DICT_VALUE and s1.DICT_TYPE = 'TEAM_DIVIDE'
- <where>
- <if test="name != null and name != ''"> and name like concat(concat('%', #{name}), '%')</if>
- <if test="sex != null and sex != ''"> and sex = #{sex}</if>
- <if test="unit != null and unit != ''"> and unit = #{unit}</if>
- <if test="specialDuty != null and specialDuty != ''"> and special_duty like concat(concat('%', #{specialDuty}), '%')</if>
- <if test="units != null and units != ''">
- and
- unit in
- <foreach collection="units.split(',')" item="item" index="index"
- open="(" close=")" separator=",">
- #{item}
- </foreach>
- </if>
- <if test="team != null and team != ''"> and team = #{team}</if>
- <if test="teams != null and teams != ''">
- and
- team in
- <foreach collection="teams.split(',')" item="item" index="index"
- open="(" close=")" separator=",">
- #{item}
- </foreach>
- </if>
- <if test="actualpost != null and actualpost != ''"> and actualpost = #{actualpost}</if>
- <if test="actualposts != null and actualposts != ''">
- and
- actualpost in
- <foreach collection="actualposts.split(',')" item="item" index="index"
- open="(" close=")" separator=",">
- #{item}
- </foreach>
- </if>
- <if test="education != null and education != ''"> and education = #{education}</if>
- <if test="educations != null and educations != ''">
- and
- education in
- <foreach collection="educations.split(',')" item="item" index="index"
- open="(" close=")" separator=",">
- #{item}
- </foreach>
- </if>
- <if test="enAbility != null and enAbility != ''"> and en_ability = #{enAbility}</if>
- <if test="enAbilitys != null and enAbilitys != ''">
- and
- en_ability in
- <foreach collection="enAbilitys.split(',')" item="item" index="index"
- open="(" close=")" separator=",">
- #{item}
- </foreach>
- </if>
- <if test="haveEmail != null and haveEmail != ''"> and mail IS NOT NULL</if>
- <if test="deptId != null and deptId != ''"> and d.dept_id = #{deptId}</if>
- <if test="skillevaluation != null"> and team = 10
- or team = 12
- or team = 14
- or team = 16
- </if>
- and (d.del_flag = 0 or d.del_flag = 9)
- </where>
- <!-- 数据范围过滤 -->
- ${params.dataScope}
- ORDER BY s0.DICT_SORT, s1.DICT_SORT ,s.DICT_SORT
- </select>
- <select id="selectTStaffmgrListAll" parameterType="TStaffmgr" resultMap="TStaffmgrResult">
- <include refid="selectTStaffmgrVo"/>
- Left join SYS_DICT_DATA s0 on d.UNIT = s0.DICT_VALUE and s0.DICT_TYPE ='STAFF_UNIT'
- LEFT JOIN SYS_DICT_DATA s on d.ACTUALPOST = s.DICT_VALUE and s.DICT_TYPE = 'ACTUALPOST'
- LEFT JOIN SYS_DICT_DATA s1 on d.team = s1.DICT_VALUE and s1.DICT_TYPE = 'TEAM_DIVIDE'
- <where>
- and d.del_flag in (0 , 9)
- </where>
- ORDER BY s0.DICT_SORT, s1.DICT_SORT ,s.DICT_SORT
- </select>
- <select id="selectRecordList" parameterType="TStaffmgr" resultMap="TStaffmgrResult">
- <include refid="selectTStaffmgrVo"/>
- LEFT JOIN SYS_DICT_DATA s on d.ACTUALPOST = s.DICT_VALUE and s.DICT_TYPE = 'ACTUALPOST'
- <where>
- <if test="units != null and units != ''">
- and
- unit in
- <foreach collection="units.split(',')" item="item" index="index"
- open="(" close=")" separator=",">
- #{item}
- </foreach>
- </if>
- <if test="actualposts != null and actualposts != ''">
- and
- actualpost in
- <foreach collection="actualposts.split(',')" item="item" index="index"
- open="(" close=")" separator=",">
- #{item}
- </foreach>
- </if>
- and d.del_flag in (0 , 9)
- </where>
- <!-- 数据范围过滤 -->
- ${params.dataScope}
- ORDER BY s.DICT_SORT, d.id
- </select>
- <select id="selectList" parameterType="TStaffmgr" resultMap="TStaffmgrResult">
- <include refid="selectTStaffmgrVo"/>
- <where>
- and d.del_flag = 0
- </where>
- <!-- 数据范围过滤 -->
- ${params.dataScope}
- </select>
- <select id="selectTaskList" parameterType="TStaffmgr" resultMap="TStaffmgrResult">
- <include refid="selectTStaffmgrVo"/>
- <where>
- and d.del_flag = 0
- </where>
- </select>
- <select id="selectLeftTStaffmgrList" parameterType="TStaffmgr" resultMap="TStaffmgrResult">
- <include refid="selectTStaffmgrVo"/>
- <where>
- and d.del_flag = 9
- <if test="isRetire != null"> and is_retire = #{isRetire}</if>
- </where>
- <!-- 数据范围过滤 -->
- ${params.dataScope}
- order by d.left_date desc
- </select>
- <select id="selectTStaffmgrById" parameterType="Long" resultMap="TStaffmgrResult">
- <include refid="selectTStaffmgrVo"/>
- where id = #{id}
- </select>
- <select id="selectTStaffmgrByStaffId" parameterType="String" resultMap="TStaffmgrResult">
- <include refid="selectTStaffmgrVo"/>
- where d.staffid = #{staffid} and d.del_flag = 0
- </select>
- <insert id="insertTStaffmgr" parameterType="TStaffmgr" useGeneratedKeys="true" keyProperty="id">
- <selectKey keyProperty="id" resultType="long" order="BEFORE">
- SELECT seq_t_staffmgr.NEXTVAL as id FROM DUAL
- </selectKey>
- insert into t_staffmgr
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="id != null">id,</if>
- <if test="plantCode != null and plantCode != ''">plant_code,</if>
- <if test="staffid != null and staffid != ''">staffid,</if>
- <if test="name != null and name != ''">name,</if>
- <if test="sex != null and sex != ''">sex,</if>
- <if test="birthday != null">birthday,</if>
- <if test="unit != null">unit,</if>
- <if test="team != null">team,</if>
- <if test="actualpost != null">actualpost,</if>
- <if test="contact != null">contact,</if>
- <if test="education != null">education,</if>
- <if test="enAbility != null">en_ability,</if>
- <if test="mail != null">mail,</if>
- <if test="accidentNum != null">accident_num,</if>
- <if test="delFlag != null">del_flag,</if>
- <if test="createrCode != null">creater_code,</if>
- <if test="createdate != null">createdate,</if>
- <if test="updaterCode != null">updater_code,</if>
- <if test="updatedate != null">updatedate,</if>
- <if test="deptId != null">dept_id,</if>
- <if test="remarks != null">remarks,</if>
- <if test="skillScore != null">skill_score,</if>
- <if test="photo != null">photo,</if>
- <if test="pId != null">p_id,</if>
- <if test="specialDuty != null">special_duty,</if>
- <if test="region != null">region,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="id != null">#{id},</if>
- <if test="plantCode != null and plantCode != ''">#{plantCode},</if>
- <if test="staffid != null and staffid != ''">#{staffid},</if>
- <if test="name != null and name != ''">#{name},</if>
- <if test="sex != null and sex != ''">#{sex},</if>
- <if test="birthday != null">#{birthday},</if>
- <if test="unit != null">#{unit},</if>
- <if test="team != null">#{team},</if>
- <if test="actualpost != null">#{actualpost},</if>
- <if test="contact != null">#{contact},</if>
- <if test="education != null">#{education},</if>
- <if test="enAbility != null">#{enAbility},</if>
- <if test="mail != null">#{mail},</if>
- <if test="accidentNum != null">#{accidentNum},</if>
- <if test="delFlag != null">#{delFlag},</if>
- <if test="createrCode != null">#{createrCode},</if>
- <if test="createdate != null">#{createdate},</if>
- <if test="updaterCode != null">#{updaterCode},</if>
- <if test="updatedate != null">#{updatedate},</if>
- <if test="deptId != null">#{deptId},</if>
- <if test="remarks != null">#{remarks},</if>
- <if test="skillScore != null">#{skillScore},</if>
- <if test="photo != null">#{photo},</if>
- <if test="pId != null">#{pId},</if>
- <if test="specialDuty != null">#{specialDuty},</if>
- <if test="region != null">#{region},</if>
- </trim>
- </insert>
- <update id="updateTStaffmgr" parameterType="TStaffmgr">
- update t_staffmgr
- <trim prefix="SET" suffixOverrides=",">
- <if test="plantCode != null and plantCode != ''">plant_code = #{plantCode},</if>
- <if test="staffid != null and staffid != ''">staffid = #{staffid},</if>
- <if test="name != null and name != ''">name = #{name},</if>
- <if test="sex != null and sex != ''">sex = #{sex},</if>
- <if test="birthday != null">birthday = #{birthday},</if>
- <if test="unit != null">unit = #{unit},</if>
- <if test="team != null">team = #{team},</if>
- <if test="actualpost != null">actualpost = #{actualpost},</if>
- <if test="contact != null">contact = #{contact},</if>
- <if test="education != null">education = #{education},</if>
- <if test="enAbility != null">en_ability = #{enAbility},</if>
- <if test="accidentNum != null">accident_num = #{accidentNum},</if>
- <if test="mail != null">mail = #{mail},</if>
- <if test="skillScore != null">skill_score = #{skillScore},</if>
- <if test="delFlag != null">del_flag = #{delFlag},</if>
- <if test="createrCode != null">creater_code = #{createrCode},</if>
- <if test="createdate != null">createdate = #{createdate},</if>
- <if test="updaterCode != null">updater_code = #{updaterCode},</if>
- <if test="region != null">region = #{region},</if>
- <if test="updatedate != null">updatedate = #{updatedate},</if>
- <if test="deptId != null">dept_id = #{deptId},</if>
- <if test="remarks != null">remarks = #{remarks},</if>
- <if test="photo != null">photo = #{photo},</if>
- <if test="pId != null">p_id = #{pId},</if>
- <if test="specialDuty != null">special_duty = #{specialDuty},</if>
- <if test="leftDate != null">left_date = #{leftDate},</if>
- </trim>
- where id = #{id}
- </update>
- <update id="deleteTStaffmgrById" parameterType="Long">
- update t_staffmgr set del_flag = 2 where id = #{id}
- </update>
- <update id="deleteLeftTStaffmgrByIds" parameterType="Long">
- update t_staffmgr set del_flag = 9 , LEFT_DATE = SYSDATE,is_retire = 0 where id = #{id}
- </update>
- <update id="deleteRetireTStaffmgrByIds" parameterType="Long">
- update t_staffmgr set del_flag = 9 , LEFT_DATE = SYSDATE ,is_retire = 1 where id = #{id}
- </update>
- <update id="reLeftTStaffmgrByIds" parameterType="Long">
- update t_staffmgr set del_flag = 0 , LEFT_DATE = null where id = #{id}
- </update>
- <update id="deleteTStaffmgrByIds" parameterType="String">
- update t_staffmgr set del_flag = 2 where id in
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
- </update>
- <select id="selectEduData" resultType="com.ruoyi.project.common.domain.DataEntity">
- SELECT count(1) as dataNum,d.EDUCATION as dataName FROM "T_STAFFMGR" d
- <where>
- <if test="name != null and name != ''"> and name like concat(concat('%', #{name}), '%')</if>
- <if test="sex != null and sex != ''"> and sex = #{sex}</if>
- <if test="unit != null and unit != ''"> and unit = #{unit}</if>
- <if test="specialDuty != null and specialDuty != ''"> and special_duty like concat(concat('%', #{specialDuty}), '%')</if>
- <if test="units != null and units != ''">
- and
- unit in
- <foreach collection="units.split(',')" item="item" index="index"
- open="(" close=")" separator=",">
- #{item}
- </foreach>
- </if>
- <if test="team != null and team != ''"> and team = #{team}</if>
- <if test="teams != null and teams != ''">
- and
- team in
- <foreach collection="teams.split(',')" item="item" index="index"
- open="(" close=")" separator=",">
- #{item}
- </foreach>
- </if>
- <if test="actualpost != null and actualpost != ''"> and actualpost = #{actualpost}</if>
- <if test="actualposts != null and actualposts != ''">
- and
- actualpost in
- <foreach collection="actualposts.split(',')" item="item" index="index"
- open="(" close=")" separator=",">
- #{item}
- </foreach>
- </if>
- <if test="education != null and education != ''"> and education = #{education}</if>
- <if test="educations != null and educations != ''">
- and
- education in
- <foreach collection="educations.split(',')" item="item" index="index"
- open="(" close=")" separator=",">
- #{item}
- </foreach>
- </if>
- <if test="enAbility != null and enAbility != ''"> and en_ability = #{enAbility}</if>
- <if test="enAbilitys != null and enAbilitys != ''">
- and
- en_ability in
- <foreach collection="enAbilitys.split(',')" item="item" index="index"
- open="(" close=")" separator=",">
- #{item}
- </foreach>
- </if>
- <if test="haveEmail != null and haveEmail != ''"> and mail IS NOT NULL</if>
- <if test="skillevaluation != null"> and team = 10
- or team = 12
- or team = 14
- or team = 16
- </if>
- and d.del_flag = 0
- </where>
- <!-- 数据范围过滤 -->
- ${params.dataScope}
- GROUP BY EDUCATION
- order by dataName
- </select>
- <select id="selectEngData" resultType="com.ruoyi.project.common.domain.DataEntity">
- SELECT count(1) as dataNum,d.en_ability as dataName FROM "T_STAFFMGR" d
- <where>
- <if test="name != null and name != ''"> and name like concat(concat('%', #{name}), '%')</if>
- <if test="sex != null and sex != ''"> and sex = #{sex}</if>
- <if test="unit != null and unit != ''"> and unit = #{unit}</if>
- <if test="specialDuty != null and specialDuty != ''"> and special_duty like concat(concat('%', #{specialDuty}), '%')</if>
- <if test="units != null and units != ''">
- and
- unit in
- <foreach collection="units.split(',')" item="item" index="index"
- open="(" close=")" separator=",">
- #{item}
- </foreach>
- </if>
- <if test="team != null and team != ''"> and team = #{team}</if>
- <if test="teams != null and teams != ''">
- and
- team in
- <foreach collection="teams.split(',')" item="item" index="index"
- open="(" close=")" separator=",">
- #{item}
- </foreach>
- </if>
- <if test="actualpost != null and actualpost != ''"> and actualpost = #{actualpost}</if>
- <if test="actualposts != null and actualposts != ''">
- and
- actualpost in
- <foreach collection="actualposts.split(',')" item="item" index="index"
- open="(" close=")" separator=",">
- #{item}
- </foreach>
- </if>
- <if test="education != null and education != ''"> and education = #{education}</if>
- <if test="educations != null and educations != ''">
- and
- education in
- <foreach collection="educations.split(',')" item="item" index="index"
- open="(" close=")" separator=",">
- #{item}
- </foreach>
- </if>
- <if test="enAbility != null and enAbility != ''"> and en_ability = #{enAbility}</if>
- <if test="enAbilitys != null and enAbilitys != ''">
- and
- en_ability in
- <foreach collection="enAbilitys.split(',')" item="item" index="index"
- open="(" close=")" separator=",">
- #{item}
- </foreach>
- </if>
- <if test="haveEmail != null and haveEmail != ''"> and mail IS NOT NULL</if>
- <if test="skillevaluation != null"> and team = 10
- or team = 12
- or team = 14
- or team = 16
- </if>
- and d.del_flag = 0
- </where>
- <!-- 数据范围过滤 -->
- ${params.dataScope}
- GROUP BY en_ability
- order by dataName
- </select>
- <select id="selectTeamData" resultType="com.ruoyi.project.common.domain.DataEntity">
- SELECT count(1) as dataNum,d.team as dataName FROM "T_STAFFMGR" d
- <where>
- <if test="name != null and name != ''"> and name like concat(concat('%', #{name}), '%')</if>
- <if test="sex != null and sex != ''"> and sex = #{sex}</if>
- <if test="unit != null and unit != ''"> and unit = #{unit}</if>
- <if test="specialDuty != null and specialDuty != ''"> and special_duty like concat(concat('%', #{specialDuty}), '%')</if>
- <if test="units != null and units != ''">
- and
- unit in
- <foreach collection="units.split(',')" item="item" index="index"
- open="(" close=")" separator=",">
- #{item}
- </foreach>
- </if>
- <if test="team != null and team != ''"> and team = #{team}</if>
- <if test="teams != null and teams != ''">
- and
- team in
- <foreach collection="teams.split(',')" item="item" index="index"
- open="(" close=")" separator=",">
- #{item}
- </foreach>
- </if>
- <if test="actualpost != null and actualpost != ''"> and actualpost = #{actualpost}</if>
- <if test="actualposts != null and actualposts != ''">
- and
- actualpost in
- <foreach collection="actualposts.split(',')" item="item" index="index"
- open="(" close=")" separator=",">
- #{item}
- </foreach>
- </if>
- <if test="education != null and education != ''"> and education = #{education}</if>
- <if test="educations != null and educations != ''">
- and
- education in
- <foreach collection="educations.split(',')" item="item" index="index"
- open="(" close=")" separator=",">
- #{item}
- </foreach>
- </if>
- <if test="enAbility != null and enAbility != ''"> and en_ability = #{enAbility}</if>
- <if test="enAbilitys != null and enAbilitys != ''">
- and
- en_ability in
- <foreach collection="enAbilitys.split(',')" item="item" index="index"
- open="(" close=")" separator=",">
- #{item}
- </foreach>
- </if>
- <if test="haveEmail != null and haveEmail != ''"> and mail IS NOT NULL</if>
- <if test="skillevaluation != null"> and team = 10
- or team = 12
- or team = 14
- or team = 16
- </if>
- and d.del_flag = 0
- </where>
- <!-- 数据范围过滤 -->
- ${params.dataScope}
- GROUP BY team
- order by dataName
- </select>
- <select id="selectAgeData" resultType="com.ruoyi.project.common.domain.DataEntity">
- SELECT
- CASE
- WHEN BIRTHDAY IS NULL THEN '未知'
- WHEN FLOOR((MONTHS_BETWEEN(SYSDATE, BIRTHDAY) / 12) / 10) * 10 <![CDATA[<]]> 20 THEN '20以下'
- WHEN FLOOR((MONTHS_BETWEEN(SYSDATE, BIRTHDAY) / 12) / 10) * 10 >= 60 THEN '60以上'
- ELSE TO_CHAR(FLOOR((MONTHS_BETWEEN(SYSDATE, BIRTHDAY) / 12) / 10) * 10) || '到' || TO_CHAR(FLOOR((MONTHS_BETWEEN(SYSDATE, BIRTHDAY) / 12) / 10) * 10 + 9)
- END AS dataName,
- COUNT(*) AS dataNum
- FROM
- T_STAFFMGR d
- <where>
- <if test="name != null and name != ''"> and name like concat(concat('%', #{name}), '%')</if>
- <if test="sex != null and sex != ''"> and sex = #{sex}</if>
- <if test="unit != null and unit != ''"> and unit = #{unit}</if>
- <if test="specialDuty != null and specialDuty != ''"> and special_duty like concat(concat('%', #{specialDuty}), '%')</if>
- <if test="units != null and units != ''">
- and
- unit in
- <foreach collection="units.split(',')" item="item" index="index"
- open="(" close=")" separator=",">
- #{item}
- </foreach>
- </if>
- <if test="team != null and team != ''"> and team = #{team}</if>
- <if test="teams != null and teams != ''">
- and
- team in
- <foreach collection="teams.split(',')" item="item" index="index"
- open="(" close=")" separator=",">
- #{item}
- </foreach>
- </if>
- <if test="actualpost != null and actualpost != ''"> and actualpost = #{actualpost}</if>
- <if test="actualposts != null and actualposts != ''">
- and
- actualpost in
- <foreach collection="actualposts.split(',')" item="item" index="index"
- open="(" close=")" separator=",">
- #{item}
- </foreach>
- </if>
- <if test="education != null and education != ''"> and education = #{education}</if>
- <if test="educations != null and educations != ''">
- and
- education in
- <foreach collection="educations.split(',')" item="item" index="index"
- open="(" close=")" separator=",">
- #{item}
- </foreach>
- </if>
- <if test="enAbility != null and enAbility != ''"> and en_ability = #{enAbility}</if>
- <if test="enAbilitys != null and enAbilitys != ''">
- and
- en_ability in
- <foreach collection="enAbilitys.split(',')" item="item" index="index"
- open="(" close=")" separator=",">
- #{item}
- </foreach>
- </if>
- <if test="haveEmail != null and haveEmail != ''"> and mail IS NOT NULL</if>
- <if test="skillevaluation != null"> and team = 10
- or team = 12
- or team = 14
- or team = 16
- </if>
- and d.del_flag = 0
- </where>
- <!-- 数据范围过滤 -->
- ${params.dataScope}
- GROUP BY
- CASE
- WHEN BIRTHDAY IS NULL THEN '未知'
- WHEN FLOOR((MONTHS_BETWEEN(SYSDATE, BIRTHDAY) / 12) / 10) * 10 <![CDATA[<]]> 20 THEN '20以下'
- WHEN FLOOR((MONTHS_BETWEEN(SYSDATE, BIRTHDAY) / 12) / 10) * 10 >= 60 THEN '60以上'
- ELSE TO_CHAR(FLOOR((MONTHS_BETWEEN(SYSDATE, BIRTHDAY) / 12) / 10) * 10) || '到' || TO_CHAR(FLOOR((MONTHS_BETWEEN(SYSDATE, BIRTHDAY) / 12) / 10) * 10 + 9)
- END
- ORDER BY
- dataName
- </select>
- <select id="selectTMentorStaffmgrByPost" resultMap="TStaffmgrResult">
- <include refid="selectTStaffmgrVo"/>
- LEFT JOIN SYS_DICT_DATA s on d.ACTUALPOST = s.DICT_VALUE and s.DICT_TYPE = 'ACTUALPOST'
- where
- d.dept_id = #{deptId}
- and d.del_flag = 0
- and (s.DICT_LABEL like '%主管%'
- or s.DICT_LABEL like '%经理%'
- or s.DICT_LABEL like '%工程师%'
- )
- </select>
- <select id="selectTStaffmgrByPost" resultMap="TStaffmgrResult">
- <include refid="selectTStaffmgrVo"/>
- LEFT JOIN SYS_DICT_DATA s on d.ACTUALPOST = s.DICT_VALUE and s.DICT_TYPE = 'ACTUALPOST'
- where
- d.dept_id = #{deptId}
- and d.del_flag = 0
- and (s.DICT_LABEL like '%主操%'
- or s.DICT_LABEL like '%班长%'
- or s.DICT_LABEL like '%工长%'
- )
- </select>
- </mapper>
|