From 2bbd50fb56275986e2a8658c373686d56804b99b Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期五, 29 八月 2025 14:14:52 +0800
Subject: [PATCH] yml配置
---
cnas-personnel/src/main/resources/mapper/PersonTrainingRecordMapper.xml | 19 ++++++++++---------
1 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/cnas-personnel/src/main/resources/mapper/PersonTrainingRecordMapper.xml b/cnas-personnel/src/main/resources/mapper/PersonTrainingRecordMapper.xml
index c57dd3d..88eabe4 100644
--- a/cnas-personnel/src/main/resources/mapper/PersonTrainingRecordMapper.xml
+++ b/cnas-personnel/src/main/resources/mapper/PersonTrainingRecordMapper.xml
@@ -3,10 +3,9 @@
<mapper namespace="com.ruoyi.personnel.mapper.PersonTrainingRecordMapper">
<select id="trainingAndAssessmentRecordsPage" resultType="com.ruoyi.personnel.dto.PersonTrainingRecordDto">
- select cptr.*, u.account, u.name user_name, u.phone, r.name role_name
+ select cptr.*, u.account, u.name user_name, u.phone
from cnas_person_training_record cptr
left join user u on u.id = cptr.user_id
- left join role r on r.id = u.role_id
where cptr.course_id = #{trainingDetailedId}
<if test="userName != null and userName != ''">
and u.name like concat('%', #{userName}, '%')
@@ -46,7 +45,8 @@
<select id="selectListByTrainingDetailedId" resultType="com.ruoyi.personnel.dto.PersonTrainingRecordDto">
select cptr.*,
u.name userName,
- dl.name department
+ dl.name department,
+ u.signature_url
from cnas_person_training_record cptr
left join user u on u.id = cptr.user_id
left join department_lims dl on find_in_set(dl.id, u.depart_lims_id) and dl.id != 1
@@ -60,10 +60,9 @@
dl.name depart_lims_name,
cpbi.professional_title,
cpbi.official_academic_redentials,
- cpbi.unit_time,
cpbi.major1,
u.id user_id,
- DATE_FORMAT(cpbi.unit_time, '%Y-%m-%d') AS unitTimeSting
+ DATE_FORMAT(cpbi.group_time, '%Y-%m-%d') AS unitTimeSting
from user u
left join cnas_person_basic_info cpbi on cpbi.user_id = u.id
left join department_lims dl on dl.id = SUBSTRING_INDEX(SUBSTRING_INDEX(u.depart_lims_id, ',', -2), ',', 1)
@@ -84,7 +83,7 @@
and cptr.user_id = #{userId}
<where>
<if test="year!= null and year!= ''">
- and YEAR(cptd.training_date) = ${year}
+ and cptd.training_date like concat('%', #{year}, '%')}
</if>
</where>
</select>
@@ -100,7 +99,7 @@
and cptr.user_id = #{userId}
</if>
<if test="year!= null and year!= ''">
- and YEAR(cptd.training_date) = ${year}
+ and cptd.training_date like concat('%', #{year}, '%')
</if>
</where>
</select>
@@ -113,14 +112,16 @@
cptd.class_hour,
cptr.examination_results,
cptd.remarks,
- DATE_FORMAT(cptd.training_date, '%Y-%m-%d') AS trainingDateString
+ cptd.training_date AS trainingDateString
from cnas_person_training_record cptr
inner join cnas_person_training_detailed cptd on cptd.id = cptr.course_id
and cptr.user_id = #{userId}
<where>
<if test="year!= null and year!= ''">
- and YEAR(cptd.training_date) = ${year}
+ and cptd.training_date like concat('%', #{year}, '%')
</if>
</where>
+ order by STR_TO_DATE(CONCAT(cptd.training_date, '.01'), '%Y.%m.%d')
+
</select>
</mapper>
--
Gitblit v1.9.3