| | |
| | | <select id="selectLimsUser" resultType="com.ruoyi.common.core.domain.entity.DepartmentDto"> |
| | | SELECT u.id userId, u.name, SUBSTRING_INDEX(SUBSTRING_INDEX(u.depart_lims_id, ',', -2), ',', 1) AS fatherId |
| | | FROM user u |
| | | where u.is_custom = 0 |
| | | where COALESCE(u.is_custom, 0) = 0 |
| | | and COALESCE(u.del_flag, '0') = '0' |
| | | and u.depart_lims_id is not null |
| | | and u.depart_lims_id != '' |
| | | </select> |
| | | |
| | | <select id="getCNASPersonnelInfo" resultType="com.ruoyi.personnel.dto.PersonBasicInfoDto"> |
| | | SELECT * |
| | | SELECT cpbi.id AS id, |
| | | u.id AS userId, |
| | | u.account AS account, |
| | | u.name AS name, |
| | | u.name_en AS nameEn, |
| | | u.age AS age, |
| | | u.phone AS phone, |
| | | u.email AS email, |
| | | u.signature_url AS signatureUrl, |
| | | u.picture_url AS pictureUrl, |
| | | u.depart_lims_id AS departLimsId, |
| | | cpbi.current_state AS currentState, |
| | | cpbi.professional_title AS professionalTitle, |
| | | cpbi.sex AS sex, |
| | | cpbi.personnel_classification AS personnelClassification, |
| | | cpbi.date_birth AS dateBirth, |
| | | cpbi.identity_card AS identityCard, |
| | | cpbi.nation AS nation, |
| | | cpbi.political_status AS politicalStatus, |
| | | cpbi.official_academic_redentials AS officialAcademicRedentials, |
| | | cpbi.graduation_time1 AS graduationTime1, |
| | | cpbi.graduated_institutions1 AS graduatedInstitutions1, |
| | | cpbi.major1 AS major1, |
| | | cpbi.graduation_time2 AS graduationTime2, |
| | | cpbi.graduated_institutions2 AS graduatedInstitutions2, |
| | | cpbi.major2 AS major2, |
| | | cpbi.telephone AS telephone, |
| | | cpbi.remarks AS remarks, |
| | | cpbi.corporate_name AS corporateName, |
| | | cpbi.post_name AS postName, |
| | | cpbi.group_time AS groupTime, |
| | | cpbi.labor_relations AS laborRelations, |
| | | cpbi.working_time AS workingTime, |
| | | cpbi.contract_life_time AS contractLifeTime, |
| | | cpbi.native_place AS nativePlace, |
| | | cpbi.validity_period AS validityPeriod, |
| | | cpbi.marital_status AS maritalStatus, |
| | | cpbi.id_address AS idAddress, |
| | | cpbi.id_detail_address AS idDetailAddress, |
| | | cpbi.dumpling_time AS dumplingTime, |
| | | cpbi.highest_degree AS highestDegree, |
| | | cpbi.last_update_time AS lastUpdateTime |
| | | FROM user u |
| | | left join cnas_person_basic_info cpbi on cpbi.user_id = u.id |
| | | where u.id = #{userId} |
| | |
| | | from user u |
| | | left join cnas_person_basic_info cpbi on cpbi.user_id = u.id |
| | | <where> |
| | | FIND_IN_SET(#{departmentId},u.depart_lims_id) |
| | | <if test="departmentId != null"> |
| | | FIND_IN_SET(#{departmentId},u.depart_lims_id) |
| | | </if> |
| | | <if test="name != null and name != ''"> |
| | | and u.name like concat('%',#{name},'%') |
| | | </if> |
| | | and COALESCE(u.is_custom, 0) = 0 |
| | | and COALESCE(u.del_flag, '0') = '0' |
| | | </where> |
| | | </select> |
| | | |