From 8ad863082097ffdcab4a8e7f426d344a1fe6f892 Mon Sep 17 00:00:00 2001
From: 吴羡 <16976746+Xian-TT3@user.noreply.gitee.com>
Date: 星期六, 07 十一月 2026 00:27:02 +0800
Subject: [PATCH] 修复人员管理接口校验与导出,完善设备保养计划与文件受控功能
---
cnas-personnel/src/main/resources/mapper/PersonBasicInfoMapper.xml | 52 +++++++++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 49 insertions(+), 3 deletions(-)
diff --git a/cnas-personnel/src/main/resources/mapper/PersonBasicInfoMapper.xml b/cnas-personnel/src/main/resources/mapper/PersonBasicInfoMapper.xml
index da32169..9a3f953 100644
--- a/cnas-personnel/src/main/resources/mapper/PersonBasicInfoMapper.xml
+++ b/cnas-personnel/src/main/resources/mapper/PersonBasicInfoMapper.xml
@@ -5,13 +5,55 @@
<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}
@@ -36,10 +78,14 @@
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>
--
Gitblit v1.9.3