445 lines
16 KiB
XML
445 lines
16 KiB
XML
<?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="cn.com.tenlion.dao.examapply.IExamApplyDao">
|
||
|
||
<resultMap id="examApplyDTO" type="cn.com.tenlion.pojo.dtos.examapply.ExamApplyDTO">
|
||
<result column="exam_apply_id" property="examApplyId"/>
|
||
<result column="exam_id" property="examId"/>
|
||
<result column="certificate_office" property="certificateOffice"/>
|
||
<result column="theory_exam_address_id" property="theoryExamAddressId"/>
|
||
<result column="theory_exam_start_time" property="theoryExamStartTime"/>
|
||
<result column="theory_exam_end_time" property="theoryExamEndTime"/>
|
||
<result column="practice_exam_address_id" property="practiceExamAddressId"/>
|
||
<result column="practice_exam_start_time" property="practiceExamStartTime"/>
|
||
<result column="practice_exam_end_time" property="practiceExamEndTime"/>
|
||
<result column="payment_voucher" property="paymentVoucher"/>
|
||
<result column="payment_voucher_num" property="paymentVoucherNum"/>
|
||
<result column="exam_apply_num" property="examApplyNum"/>
|
||
<result column="status" property="status"/>
|
||
<result column="user_status" property="userStatus"/>
|
||
<result column="check_status" property="checkStatus"/>
|
||
<result column="exam_type" property="examType"/>
|
||
<result column="reason" property="reason"/>
|
||
</resultMap>
|
||
|
||
<resultMap id="examApplyBO" type="cn.com.tenlion.pojo.bos.examapply.ExamApplyBO">
|
||
<result column="exam_apply_id" property="examApplyId"/>
|
||
<result column="exam_id" property="examId"/>
|
||
<result column="certificate_office" property="certificateOffice"/>
|
||
<result column="theory_exam_address_id" property="theoryExamAddressId"/>
|
||
<result column="theory_exam_start_time" property="theoryExamStartTime"/>
|
||
<result column="theory_exam_end_time" property="theoryExamEndTime"/>
|
||
<result column="practice_exam_address_id" property="practiceExamAddressId"/>
|
||
<result column="practice_exam_start_time" property="practiceExamStartTime"/>
|
||
<result column="practice_exam_end_time" property="practiceExamEndTime"/>
|
||
<result column="payment_voucher" property="paymentVoucher"/>
|
||
<result column="payment_voucher_num" property="paymentVoucherNum"/>
|
||
<result column="exam_apply_num" property="examApplyNum"/>
|
||
<result column="status" property="status"/>
|
||
<result column="user_status" property="userStatus"/>
|
||
<result column="check_status" property="checkStatus"/>
|
||
<result column="exam_type" property="examType"/>
|
||
<result column="reason" property="reason"/>
|
||
</resultMap>
|
||
|
||
<resultMap id="examApplyPO" type="cn.com.tenlion.pojo.pos.examapply.ExamApplyPO">
|
||
<result column="exam_apply_id" property="examApplyId"/>
|
||
<result column="exam_id" property="examId"/>
|
||
<result column="certificate_office" property="certificateOffice"/>
|
||
<result column="theory_exam_address_id" property="theoryExamAddressId"/>
|
||
<result column="theory_exam_start_time" property="theoryExamStartTime"/>
|
||
<result column="theory_exam_end_time" property="theoryExamEndTime"/>
|
||
<result column="practice_exam_address_id" property="practiceExamAddressId"/>
|
||
<result column="practice_exam_start_time" property="practiceExamStartTime"/>
|
||
<result column="practice_exam_end_time" property="practiceExamEndTime"/>
|
||
<result column="payment_voucher" property="paymentVoucher"/>
|
||
<result column="payment_voucher_num" property="paymentVoucherNum"/>
|
||
<result column="exam_apply_num" property="examApplyNum"/>
|
||
<result column="status" property="status"/>
|
||
<result column="user_status" property="userStatus"/>
|
||
<result column="check_status" property="checkStatus"/>
|
||
<result column="exam_type" property="examType"/>
|
||
<result column="reason" property="reason"/>
|
||
</resultMap>
|
||
|
||
<!-- 新增应急管理局-考试申请表-renpc -->
|
||
<insert id="save" parameterType="map">
|
||
INSERT INTO management_exam_apply(
|
||
exam_apply_id,
|
||
exam_id,
|
||
certificate_office,
|
||
theory_exam_address_id,
|
||
theory_exam_start_time,
|
||
theory_exam_end_time,
|
||
payment_voucher,
|
||
payment_voucher_num,
|
||
status,
|
||
user_status,
|
||
check_status,
|
||
exam_type,
|
||
reason,
|
||
gmt_create,
|
||
creator,
|
||
gmt_modified,
|
||
modifier,
|
||
is_delete
|
||
) VALUES(
|
||
#{examApplyId},
|
||
#{examId},
|
||
#{certificateOffice},
|
||
#{theoryExamAddressId},
|
||
#{theoryExamStartTime},
|
||
#{theoryExamEndTime},
|
||
#{paymentVoucher},
|
||
#{paymentVoucherNum},
|
||
#{status},
|
||
#{userStatus},
|
||
#{checkStatus},
|
||
#{examType},
|
||
#{reason},
|
||
#{gmtCreate},
|
||
#{creator},
|
||
#{gmtModified},
|
||
#{modifier},
|
||
#{isDelete}
|
||
)
|
||
</insert>
|
||
|
||
<!-- 删除应急管理局-考试申请表-renpc -->
|
||
<update id="remove" parameterType="map">
|
||
UPDATE
|
||
management_exam_apply
|
||
SET
|
||
gmt_modified = #{gmtModified},
|
||
modifier = #{modifier},
|
||
is_delete = 1
|
||
WHERE
|
||
exam_apply_id IN
|
||
<foreach collection="examApplyIds" index="index" open="(" separator="," close=")">
|
||
#{examApplyIds[${index}]}
|
||
</foreach>
|
||
</update>
|
||
|
||
<!-- 删除应急管理局-考试申请表-renpc(物理) -->
|
||
<update id="delete" parameterType="map">
|
||
DELETE FROM
|
||
management_exam_apply
|
||
WHERE
|
||
exam_apply_id IN
|
||
<foreach collection="examApplyIds" index="index" open="(" separator="," close=")">
|
||
#{examApplyIds[${index}]}
|
||
</foreach>
|
||
</update>
|
||
|
||
<!-- 修改应急管理局-考试申请表-renpc -->
|
||
<update id="update" parameterType="map">
|
||
UPDATE
|
||
management_exam_apply
|
||
SET
|
||
<if test="examId != null and examId != ''">
|
||
exam_id = #{examId},
|
||
</if>
|
||
<if test="certificateOffice != null and certificateOffice != ''">
|
||
certificate_office = #{certificateOffice},
|
||
</if>
|
||
<if test="theoryExamAddressId != null and theoryExamAddressId != ''">
|
||
theory_exam_address_id = #{theoryExamAddressId},
|
||
</if>
|
||
<if test="theoryExamStartTime != null and theoryExamStartTime != ''">
|
||
theory_exam_start_time = #{theoryExamStartTime},
|
||
</if>
|
||
<if test="theoryExamEndTime != null and theoryExamEndTime != ''">
|
||
theory_exam_end_time = #{theoryExamEndTime},
|
||
</if>
|
||
<if test="practiceExamAddressId != null and practiceExamAddressId != ''">
|
||
practice_exam_address_id = #{practiceExamAddressId},
|
||
</if>
|
||
<if test="practiceExamStartTime != null and practiceExamStartTime != ''">
|
||
practice_exam_start_time = #{practiceExamStartTime},
|
||
</if>
|
||
<if test="practiceExamEndTime != null and practiceExamEndTime != ''">
|
||
practice_exam_end_time = #{practiceExamEndTime},
|
||
</if>
|
||
<if test="paymentVoucher != null and paymentVoucher != ''">
|
||
payment_voucher = #{paymentVoucher},
|
||
</if>
|
||
<if test="paymentVoucherNum != null and paymentVoucherNum != ''">
|
||
payment_voucher_num = #{paymentVoucherNum},
|
||
</if>
|
||
<if test="examApplyNum != null and examApplyNum != ''">
|
||
exam_apply_num = #{examApplyNum},
|
||
</if>
|
||
<if test="status != null and status != ''">
|
||
status = #{status},
|
||
</if>
|
||
<if test="userStatus != null and userStatus != ''">
|
||
user_status = #{userStatus},
|
||
</if>
|
||
<if test="checkStatus != null and checkStatus != ''">
|
||
check_status = #{checkStatus},
|
||
</if>
|
||
<if test="examType != null and examType != ''">
|
||
exam_type = #{examType},
|
||
</if>
|
||
<if test="reason != null and reason != ''">
|
||
reason = #{reason},
|
||
</if>
|
||
gmt_modified = #{gmtModified},
|
||
modifier = #{modifier},
|
||
exam_apply_id = exam_apply_id
|
||
WHERE
|
||
1 = 1
|
||
<if test="examApplyId != null and examApplyId != ''">
|
||
AND exam_apply_id = #{examApplyId}
|
||
</if>
|
||
<if test="examId != null and examId != ''">
|
||
AND exam_id = #{examId}
|
||
</if>
|
||
</update>
|
||
|
||
<!-- 应急管理局-考试申请表-renpc详情 -->
|
||
<select id="get" parameterType="map" resultMap="examApplyDTO">
|
||
SELECT
|
||
t1.exam_id,
|
||
t1.certificate_office,
|
||
t1.theory_exam_address_id,
|
||
t1.theory_exam_start_time,
|
||
t1.theory_exam_end_time,
|
||
t1.payment_voucher,
|
||
t1.payment_voucher_num,
|
||
t1.exam_apply_num,
|
||
t1.status,
|
||
t1.user_status,
|
||
t1.check_status,
|
||
t1.exam_type,
|
||
t1.reason,
|
||
t1.exam_apply_id
|
||
FROM
|
||
management_exam_apply t1
|
||
WHERE
|
||
t1.is_delete = 0
|
||
<if test="examApplyId != null and examApplyId != ''">
|
||
AND
|
||
t1.exam_apply_id = #{examApplyId}
|
||
</if>
|
||
<if test="examId != null and examId != ''">
|
||
AND t1.exam_id = #{examId}
|
||
</if>
|
||
</select>
|
||
|
||
<!-- 应急管理局-考试申请表-renpc详情 -->
|
||
<select id="getBO" parameterType="map" resultMap="examApplyBO">
|
||
SELECT
|
||
t1.exam_apply_id,
|
||
t1.exam_id,
|
||
t1.certificate_office,
|
||
t1.theory_exam_address_id,
|
||
t1.theory_exam_start_time,
|
||
t1.theory_exam_end_time,
|
||
t1.practice_exam_address_id,
|
||
t1.practice_exam_start_time,
|
||
t1.practice_exam_end_time,
|
||
t1.payment_voucher,
|
||
t1.payment_voucher_num,
|
||
t1.status,
|
||
t1.user_status,
|
||
t1.check_status,
|
||
t1.exam_type,
|
||
t1.reason,
|
||
t1.exam_apply_num
|
||
FROM
|
||
management_exam_apply t1
|
||
WHERE
|
||
t1.is_delete = 0
|
||
<if test="examApplyId != null and examApplyId != ''">
|
||
AND
|
||
t1.exam_apply_id = #{examApplyId}
|
||
</if>
|
||
</select>
|
||
|
||
<!-- 应急管理局-考试申请表-renpc详情 -->
|
||
<select id="getPO" parameterType="map" resultMap="examApplyPO">
|
||
SELECT
|
||
t1.exam_apply_id,
|
||
t1.exam_id,
|
||
t1.certificate_office,
|
||
t1.theory_exam_address_id,
|
||
t1.theory_exam_start_time,
|
||
t1.theory_exam_end_time,
|
||
t1.practice_exam_address_id,
|
||
t1.practice_exam_start_time,
|
||
t1.practice_exam_end_time,
|
||
t1.payment_voucher,
|
||
t1.payment_voucher_num,
|
||
t1.status,
|
||
t1.user_status,
|
||
t1.check_status,
|
||
t1.exam_type,
|
||
t1.reason,
|
||
t1.exam_apply_num
|
||
FROM
|
||
management_exam_apply t1
|
||
WHERE
|
||
t1.is_delete = 0
|
||
<if test="examApplyId != null and examApplyId != ''">
|
||
AND
|
||
t1.exam_apply_id = #{examApplyId}
|
||
</if>
|
||
</select>
|
||
|
||
<!-- 应急管理局-考试申请表-renpc列表 -->
|
||
<select id="list" parameterType="map" resultMap="examApplyDTO">
|
||
SELECT
|
||
t1.exam_apply_id,
|
||
t1.exam_id,
|
||
t1.certificate_office,
|
||
t1.theory_exam_address_id,
|
||
t1.theory_exam_start_time,
|
||
t1.theory_exam_end_time,
|
||
t1.practice_exam_address_id,
|
||
t1.practice_exam_start_time,
|
||
t1.practice_exam_end_time,
|
||
t1.payment_voucher,
|
||
t1.payment_voucher_num,
|
||
t1.exam_apply_num,
|
||
t1.status,
|
||
t1.user_status,
|
||
t1.check_status,
|
||
t1.exam_type,
|
||
t1.reason,
|
||
1
|
||
FROM
|
||
management_exam_apply t1
|
||
WHERE
|
||
t1.is_delete = 0
|
||
<if test="checkStatus != null">
|
||
AND t1.check_status = #{checkStatus}
|
||
</if>
|
||
<if test="keywords != null and keywords != ''">
|
||
AND (
|
||
<!-- 这里添加其他条件 -->
|
||
t1.id LIKE CONCAT('%', #{keywords}, '%')
|
||
)
|
||
</if>
|
||
<if test="startTime != null and startTime != ''">
|
||
AND
|
||
LEFT(t1.gmt_create, 10) <![CDATA[ >= ]]> #{startTime}
|
||
</if>
|
||
<if test="endTime != null and endTime != ''">
|
||
AND
|
||
LEFT(t1.gmt_create, 10) <![CDATA[ <= ]]> #{endTime}
|
||
</if>
|
||
<if test="examApplyIds != null and examApplyIds.size > 0">
|
||
AND
|
||
t1.exam_apply_id IN
|
||
<foreach collection="examApplyIds" index="index" open="(" separator="," close=")">
|
||
#{examApplyIds[${index}]}
|
||
</foreach>
|
||
</if>
|
||
</select>
|
||
|
||
<!-- 应急管理局-考试申请表-renpc列表 -->
|
||
<select id="listBO" parameterType="map" resultMap="examApplyBO">
|
||
SELECT
|
||
t1.exam_apply_id,
|
||
t1.exam_id,
|
||
t1.certificate_office,
|
||
t1.theory_exam_address_id,
|
||
t1.theory_exam_start_time,
|
||
t1.theory_exam_end_time,
|
||
t1.practice_exam_address_id,
|
||
t1.practice_exam_start_time,
|
||
t1.practice_exam_end_time,
|
||
t1.payment_voucher,
|
||
t1.payment_voucher_num,
|
||
t1.status,
|
||
t1.user_status,
|
||
t1.check_status,
|
||
t1.exam_type,
|
||
t1.reason,
|
||
t1.exam_apply_num
|
||
FROM
|
||
management_exam_apply t1
|
||
WHERE
|
||
t1.is_delete = 0
|
||
<if test="keywords != null and keywords != ''">
|
||
AND (
|
||
<!-- 这里添加其他条件 -->
|
||
t1.id LIKE CONCAT('%', #{keywords}, '%')
|
||
)
|
||
</if>
|
||
<if test="startTime != null and startTime != ''">
|
||
AND
|
||
LEFT(t1.gmt_create, 10) <![CDATA[ >= ]]> #{startTime}
|
||
</if>
|
||
<if test="endTime != null and endTime != ''">
|
||
AND
|
||
LEFT(t1.gmt_create, 10) <![CDATA[ <= ]]> #{endTime}
|
||
</if>
|
||
<if test="examApplyIds != null and examApplyIds.size > 0">
|
||
AND
|
||
t1.exam_apply_id IN
|
||
<foreach collection="examApplyIds" index="index" open="(" separator="," close=")">
|
||
#{examApplyIds[${index}]}
|
||
</foreach>
|
||
</if>
|
||
</select>
|
||
|
||
<!-- 应急管理局-考试申请表-renpc列表 -->
|
||
<select id="listPO" parameterType="map" resultMap="examApplyPO">
|
||
SELECT
|
||
t1.exam_apply_id,
|
||
t1.exam_id,
|
||
t1.certificate_office,
|
||
t1.theory_exam_address_id,
|
||
t1.theory_exam_start_time,
|
||
t1.theory_exam_end_time,
|
||
t1.practice_exam_address_id,
|
||
t1.practice_exam_start_time,
|
||
t1.practice_exam_end_time,
|
||
t1.payment_voucher,
|
||
t1.payment_voucher_num,
|
||
t1.status,
|
||
t1.user_status,
|
||
t1.check_status,
|
||
t1.exam_type,
|
||
t1.reason,
|
||
t1.exam_apply_num
|
||
FROM
|
||
management_exam_apply t1
|
||
WHERE
|
||
t1.is_delete = 0
|
||
<if test="keywords != null and keywords != ''">
|
||
AND (
|
||
<!-- 这里添加其他条件 -->
|
||
t1.id LIKE CONCAT('%', #{keywords}, '%')
|
||
)
|
||
</if>
|
||
<if test="startTime != null and startTime != ''">
|
||
AND
|
||
LEFT(t1.gmt_create, 10) <![CDATA[ >= ]]> #{startTime}
|
||
</if>
|
||
<if test="endTime != null and endTime != ''">
|
||
AND
|
||
LEFT(t1.gmt_create, 10) <![CDATA[ <= ]]> #{endTime}
|
||
</if>
|
||
<if test="examApplyIds != null and examApplyIds.size > 0">
|
||
AND
|
||
t1.exam_apply_id IN
|
||
<foreach collection="examApplyIds" index="index" open="(" separator="," close=")">
|
||
#{examApplyIds[${index}]}
|
||
</foreach>
|
||
</if>
|
||
</select>
|
||
|
||
<!-- 应急管理局-考试申请表-renpc统计 -->
|
||
<select id="count" parameterType="map" resultType="Integer">
|
||
SELECT
|
||
COUNT(*)
|
||
FROM
|
||
management_exam_apply t1
|
||
WHERE
|
||
t1.is_delete = 0
|
||
</select>
|
||
|
||
</mapper> |