| | |
| | | |
| | | <select id="queryTheAnnualPlanDetailsTable" resultType="com.ruoyi.personnel.dto.PersonTrainingDetailedDto"> |
| | | SELECT cptd.*, |
| | | u1.name training_lecturer_name, |
| | | COALESCE(u1.name, cptd.training_lecturer_name) training_lecturer_name, |
| | | dl.name holding_department_name, !isnull(cptr.training_record_id) whether_claim |
| | | FROM cnas_person_training_detailed cptd |
| | | left join user u1 on cptd.training_lecturer_id = u1.id |
| | |
| | | and u1.id = #{userId} |
| | | </if> |
| | | <if test="trainingLecturerName != null and trainingLecturerName != ''"> |
| | | and u1.name like concat('%', #{trainingLecturerName}, '%') |
| | | and COALESCE(u1.name, cptd.training_lecturer_name) like concat('%', #{trainingLecturerName}, '%') |
| | | </if> |
| | | <if test="trainingDate != null and trainingDate != ''"> |
| | | and date_format(cptd.training_date,'%Y-%m-%d') = #{trainingDate} |
| | |
| | | <!-- 根据主表id查询详情 --> |
| | | <select id="selectTrainingList" resultType="com.ruoyi.personnel.dto.PersonTrainingDetailedDto"> |
| | | SELECT cptd.*, |
| | | u1.name training_lecturer_name |
| | | COALESCE(u1.name, cptd.training_lecturer_name) training_lecturer_name |
| | | FROM cnas_person_training_detailed cptd |
| | | left join user u1 on cptd.training_lecturer_id = u1.id |
| | | where cptd.plan_id = #{trainingId} |
| | |
| | | <!-- 查询详细 --> |
| | | <select id="selectTrainingDetail" resultType="com.ruoyi.personnel.dto.PersonTrainingDetailedDto"> |
| | | SELECT cptd.*, |
| | | u1.name training_lecturer_name, |
| | | COALESCE(u1.name, cptd.training_lecturer_name) training_lecturer_name, |
| | | u1.signature_url training_lecturer_signature_url |
| | | FROM cnas_person_training_detailed cptd |
| | | left join user u1 on cptd.training_lecturer_id = u1.id |