From 4f3a98f19143865cdc1de4791e8a95d96bd40c65 Mon Sep 17 00:00:00 2001
From: maven <2163098428@qq.com>
Date: 星期五, 01 八月 2025 13:27:59 +0800
Subject: [PATCH] yys 密码已重置

---
 cnas-personnel/src/main/resources/mapper/PersonBasicInfoMapper.xml |   64 ++++++++++++++++++++++++++++++++
 1 files changed, 64 insertions(+), 0 deletions(-)

diff --git a/cnas-personnel/src/main/resources/mapper/PersonBasicInfoMapper.xml b/cnas-personnel/src/main/resources/mapper/PersonBasicInfoMapper.xml
new file mode 100644
index 0000000..da32169
--- /dev/null
+++ b/cnas-personnel/src/main/resources/mapper/PersonBasicInfoMapper.xml
@@ -0,0 +1,64 @@
+<?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.personnel.mapper.PersonBasicInfoMapper">
+
+    <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
+          and u.depart_lims_id is not null
+          and u.depart_lims_id != ''
+    </select>
+
+    <select id="getCNASPersonnelInfo" resultType="com.ruoyi.personnel.dto.PersonBasicInfoDto">
+        SELECT *
+        FROM user u
+                 left join cnas_person_basic_info cpbi on cpbi.user_id = u.id
+        where u.id = #{userId}
+    </select>
+
+    <select id="selectPersonBasecInfoAndUser" resultType="java.util.Map">
+        select
+            u.id  userId,
+            u.`name`  name,
+            u.account account,
+            DATE_FORMAT(cpbi.group_time, '%Y-%m-%d') groupTime,
+            cpbi.native_place nativePlace,
+            cpbi.identity_card identityCard,
+            cpbi.id_address idAddress,
+            u.phone telephone,
+            cpbi.graduated_institutions1 graduatedInstitutions1,
+            cpbi.major1 major1,
+            DATE_FORMAT(cpbi.graduation_time1, '%Y-%m-%d')  graduationTime1,
+            cpbi.official_academic_redentials officialAcademicRedentials,
+            cpbi.highest_degree highestDegree,
+            cpbi.professional_title professionalTitle
+        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="name != null and name != ''">
+                and u.name like concat('%',#{name},'%')
+            </if>
+        </where>
+    </select>
+
+    <!-- 瀵煎嚭鏌ヨ浜哄憳淇℃伅 -->
+    <select id="selectexportPersonBasic" resultType="java.util.Map">
+        select DATE_FORMAT(cpbi.last_update_time, '%Y骞�%m鏈�%d鏃�') lastUpdateTimeString,
+               u.account,
+               u.`name`,
+               cpbi.sex,
+               cpbi.post_name postName,
+               u.age,
+               DATE_FORMAT(cpbi.working_time, '%Y骞�%m鏈�')   workingTimeString,
+               cpbi.major1,
+               DATE_FORMAT(cpbi.graduation_time1, '%Y骞�%m鏈�')   graduationTime1string,
+               cpbi.official_academic_redentials officialAcademicRedentials,
+               cpbi.graduated_institutions1 graduatedInstitutions1,
+               cpbi.remarks
+        from user u
+                 left join cnas_person_basic_info cpbi on cpbi.user_id = u.id
+        where u.id = #{userId}
+    </select>
+</mapper>

--
Gitblit v1.9.3