| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- <?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.yt.zhylplat.modulePub.mapper.TPubTrainMapper">
- <select id="acquireTraind" resultType="com.yt.zhylplat.modulePub.entity.TPubTrain">
- SELECT
- t.id,
- t.train_id,
- t.create_date,
- train_title,
- train_name,
- file_old_name AS fileName,
- file_type AS fileType,
- file_url,
- meeting_note_url,
- meeting_sign_url,
- class_file_url,
- photo_live_url,
- summarize_url,
- meeting_note_name,
- meeting_sign_name,
- class_file_name,
- photo_live_name,
- summarize_name,
- remark
- FROM
- T_Pub_Train AS t
- left JOIN ( SELECT table_id,create_user_id,file_old_name, file_type, file_url FROM T_File f WHERE f.table_name = 'T_Pub_Train' AND delete_flag = 0 ORDER BY table_id ) AS fl
- ON
- fl.table_id=t.id
- <where>
- <if test="tPubTrain.trainTitle!=null and tPubTrain.trainTitle!=''">
- and t.train_title like concat('%',#{tPubTrain.trainTitle},'%')
- </if>
- </where>
- </select>
- <select id="getTrainModelById" resultType="com.yt.zhylplat.moduleExcel.model.TrainModel">
- select
- train_title,
- train_name,
- train_content,
- train_address,
- concat(start_time, '至', end_time) as trainTime
- from
- T_Pub_Train
- where
- id = #{id}
- </select>
- <select id="selectTrainModelList" resultType="com.yt.zhylplat.moduleExcel.model.TrainModel">
- select
- yh.F_DeptName as yhCompany,
- tu.train_staff_name as trainStaffName,
- case
- when ts.leave_type is null then '缺勤'
- when ts.leave_type = 0 then '正常签到'
- when ts.leave_type = 1 then '缺勤'
- when ts.leave_type = 2 then '代签'
- end as leaveType,
- case
- when ts.sign_type is null then '缺勤'
- when ts.sign_type = 1 then '签到'
- when ts.sign_type = 2 then '签退'
- end as signType,
- case
- when ts.sign_type is null then ''
- when ts.sign_type = 1 then sign_time
- when ts.sign_type = 2 then sign_out_time
- end as signOutTime
- from
- T_Pub_Train_Userinfo tu
- left join
- T_Pub_TrainSignOut ts on tu.train_id = ts.train_id and tu.train_staff_id = ts.train_staff_id
- left join
- T_Base_YHCompany yh on tu.yhcompany_id = yh.F_YHCompanyId
- where
- tu.train_id = #{id}
- </select>
- <select id="trainMessage" resultType="com.yt.zhylplat.modulePub.entity.TPubTrain">
- SELECT
- t.id,
- t.train_id,
- t.create_date,
- train_title,
- train_name,
- file_old_name AS fileName,
- file_type AS fileType,
- file_url,
- meeting_note_url,
- meeting_sign_url,
- class_file_url,
- photo_live_url,
- summarize_url,
- meeting_note_name,
- meeting_sign_name,
- class_file_name,
- photo_live_name,
- summarize_name
- FROM
- T_Pub_Train AS t
- left JOIN ( SELECT table_id,create_user_id,file_old_name, file_type, file_url FROM T_File f WHERE f.table_name = 'T_Pub_Train' AND delete_flag = 0 ORDER BY table_id ) AS fl
- ON
- fl.table_id=t.id
- <where>
- <if test="tPubTrain.trainTitle!=null and tPubTrain.trainTitle!=''">
- and t.train_title like concat('%',#{tPubTrain.trainTitle},'%')
- </if>
- </where>
- </select>
- </mapper>
|