安全教育bug修复

This commit is contained in:
guoshengxiong 2024-07-01 09:07:44 +08:00
parent a37f302fd1
commit e099a6d971
2 changed files with 4 additions and 8 deletions

View File

@ -102,16 +102,11 @@
<select id="selectEdusByWorkerId" resultType="com.alibaba.fastjson.JSONObject">
SELECT w.*,
a.worker_name,
a.sex,
a.field_acquisition_url,
a.id_card idcardnumber,
(case
when a.birthday != '' then year(from_days(datediff(NOW(), a.birthday)))
else '-' end) age
e.edu_course_name
FROM worker_safe_education_worker w
inner join worker_safe_education wse on w.edu_id = wse.id
LEFT JOIN worker_info a ON w.worker_id = a.id
WHERE w.id = #{workerId}
LEFT JOIN worker_safe_education e on e.id=w.edu_id
WHERE w.worker_id = #{workerId}
and w.project_sn = #{projectSn}
</select>
</mapper>

View File

@ -132,6 +132,7 @@ public class WorkerSafeEducationServiceImpl extends ServiceImpl<WorkerSafeEducat
workerSafeEducationWorkerMapper.delete(queryWrapper);
if (workerSafeEducation.getList() != null && workerSafeEducation.getList().size() > 0) {
for (WorkerSafeEducationWorker worker : workerSafeEducation.getList()) {
worker.setId(null);
worker.setEduId(workerSafeEducation.getId());
worker.setStudyTime(workerSafeEducation.getEduTime());
worker.setProjectSn(workerSafeEducation.getProjectSn());