From 3a8e1524dcf0eeb610d38123d5f0a3ef838379cd Mon Sep 17 00:00:00 2001 From: linzhijie <19970921lzj> Date: 星期一, 12 四月 2021 15:44:53 +0800 Subject: [PATCH] Merge branch '20210406-maqv2' into 20210412-youhua --- src/main/resources/mybatis/exam/TExamReportMapper.xml | 78 ++++++++++++++++++++++++++++++++++++++ 1 files changed, 77 insertions(+), 1 deletions(-) diff --git a/src/main/resources/mybatis/exam/TExamReportMapper.xml b/src/main/resources/mybatis/exam/TExamReportMapper.xml index 670b0fb..0464bfd 100644 --- a/src/main/resources/mybatis/exam/TExamReportMapper.xml +++ b/src/main/resources/mybatis/exam/TExamReportMapper.xml @@ -52,6 +52,7 @@ <result property="hrSendTime" column="hrSendTime" /> <result property="hrUpdateTime" column="hrUpdateTime" /> <result property="retriesTime" column="retriesTime" /> + <result property="memberTemplate" column="member_template" /> </resultMap> <sql id="selectTExamReportVo"> @@ -64,7 +65,7 @@ t.finish,m.member_name,p.test_name,u.user_name,t.question_order, t.question_report, t.question_template_id, t.interface_content, t.lang_type, t.report_address, p.report_template_id, t.send_hr_status, t.send_tester_status, m.member_email, p.test_email, t.member_name, p.auto_send_report, e.hr_email, e.mail_content, t.option_order, t.remain_part_time, - t.report_address_new,t.hrReportEmail,t.hrTitle,t.hrSendTime,t.hrUpdateTime,t.retriesTime + t.report_address_new,t.hrReportEmail,t.hrTitle,t.hrSendTime,t.hrUpdateTime,t.retriesTime,p.member_template from t_exam_report t left join sys_user u on u.user_id = t.user_id left join ent_test_member m on m.member_id = t.member_id @@ -72,9 +73,69 @@ left join sys_user_extend e on e.user_id = u.user_id </sql> + <sql id = "selectTExamReportListVoForReport"> + select m.member_dept,p.status,t.id, t.product_id, t.product_name, t.content, t.token_id, t.create_time, t.update_time, t.states, + t.last_content,t.choice,t.do_time, t.question_count, t.member_id,t.user_id,t.parent_id,t.downloadTimes,t.verifyStatus,t.test_id, + t.finish,m.member_name,p.test_name,u.user_name,t.question_order, t.question_report, t.question_template_id, t.interface_content, + t.lang_type, t.report_address, p.report_template_id, t.send_hr_status, t.send_tester_status, m.member_email, p.test_email, + t.member_name, p.auto_send_report, e.hr_email, e.mail_content, t.option_order, t.remain_part_time, + t.report_address_new,t.hrReportEmail,t.hrTitle,t.hrSendTime,t.hrUpdateTime,t.retriesTime + from t_exam_report t + left join sys_user u on u.user_id = t.user_id + right join ent_test_member m on m.member_id = t.member_id and m.status = '1' + left join ent_test_package p on p.id = t.test_id + left join sys_user_extend e on e.user_id = u.user_id + </sql> + + <sql id = "selectTExamReportListNoStatusVo"> + select m.member_dept,p.status,t.id, t.product_id, t.product_name, t.content, t.token_id, t.create_time, t.update_time, t.states, + t.last_content,t.choice,t.do_time, t.question_count, t.member_id,t.user_id,t.parent_id,t.downloadTimes,t.verifyStatus,t.test_id, + t.finish,m.member_name,p.test_name,u.user_name,t.question_order, t.question_report, t.question_template_id, t.interface_content, + t.lang_type, t.report_address, p.report_template_id, t.send_hr_status, t.send_tester_status, m.member_email, p.test_email, + t.member_name, p.auto_send_report, e.hr_email, e.mail_content, t.option_order, t.remain_part_time, + t.report_address_new,t.hrReportEmail,t.hrTitle,t.hrSendTime,t.hrUpdateTime,t.retriesTime + from t_exam_report t + left join sys_user u on u.user_id = t.user_id + right join ent_test_member m on m.member_id = t.member_id + left join ent_test_package p on p.id = t.test_id + left join sys_user_extend e on e.user_id = u.user_id + </sql> + <select id="selectTExamReportList" parameterType="TExamReport" resultMap="TExamReportResult"> <include refid="selectTExamReportListVo"/> <where> + <if test="id != null "> and t.id = #{id}</if> + <if test="productId != null "> and t.product_id = #{productId}</if> + <if test="tokenId != null and tokenId != ''"> and t.token_id = #{tokenId}</if> + <if test="downloadTimes != null "> and t.downloadTimes = #{downloadTimes}</if> + <if test="verifyStatus != null "> and t.verifyStatus = #{verifyStatus}</if> + <if test="memberId != null and memberId != ''"> and t.member_id = #{memberId}</if> + <if test="productName != null and productName != ''"> and t.product_name like concat('%', #{productName}, '%')</if> + <if test="userName != null and userName != ''"> and u.user_name like concat('%', #{userName}, '%')</if> + <if test="testName != null and testName != ''"> and u.test_name like concat('%', #{testName}, '%')</if> + <if test="memberName != null and memberName != ''"> and m.member_name like concat('%', #{memberName}, '%')</if> + <if test="testId != null and testId != ''"> and t.test_id = #{testId}</if> + <if test="status != null and status != ''"> and p.status = #{status}</if> + <if test="finish != null and finish != ''"> and t.finish = #{finish}</if> + <if test="sendTesterStatus != null"> and t.send_tester_status = #{sendTesterStatus}</if> + <if test="hrReportEmail != null"> and t.hrReportEmail = #{hrReportEmail}</if> + <if test="sendHrStatus != null"> and t.send_hr_status = #{sendHrStatus}</if> + <if test="sendHrStatusList != null"> and t.send_hr_status in + <foreach collection="sendHrStatusList" item="sendStatus" open="(" separator="," close=")"> + #{sendStatus} + </foreach> + </if> + <if test="userIds != null"> and t.user_id in + <foreach collection="userIds" item="userId" open="(" separator="," close=")"> + #{userId} + </foreach> + </if> + </where> + </select> + + <select id="selectTExamReportNoStatusList" parameterType="TExamReport" resultMap="TExamReportResult"> + <include refid="selectTExamReportListVo"/> + <where> <if test="id != null "> and t.id = #{id}</if> <if test="productId != null "> and t.product_id = #{productId}</if> <if test="tokenId != null and tokenId != ''"> and t.token_id = #{tokenId}</if> @@ -149,11 +210,26 @@ <if test="finish == 1"> and t.finish in (1,2,6) </if> <if test="sendTesterStatus != null"> and t.send_tester_status = #{sendTesterStatus}</if> <if test="sendHrStatus != null"> and t.send_hr_status = #{sendHrStatus}</if> + <if test="userId != null "> and t.user_id = #{userId}</if> + <if test="testType != null and testType != ''"> and p.test_type = #{testType}</if> + <!-- 寮�濮嬫椂闂存绱� --> + <if test="params.beginTime != null and params.beginTime != ''"> + and date_format(p.create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d') + </if> + <!-- 缁撴潫鏃堕棿妫�绱� --> + <if test="params.endTime != null and params.endTime != ''"> + and date_format(p.create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d') + </if> <if test="sendHrStatusList != null"> and t.send_hr_status in <foreach collection="sendHrStatusList" item="sendStatus" open="(" separator="," close=")"> #{sendStatus} </foreach> </if> + <if test="userIds != null"> and t.user_id in + <foreach collection="userIds" item="userId" open="(" separator="," close=")"> + #{userId} + </foreach> + </if> </where> </select> -- Gitblit v1.9.1