bt-yjj-system-examination-s.../src/main/resources/mybatis/mapper/applystudentsnew/apply-students-new-mapper.xml
2021-06-23 09:45:13 +08:00

967 lines
33 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.applystudentsnew.IApplyStudentsNewDao">
<resultMap id="applyStudentsNewDTO" type="cn.com.tenlion.pojo.dtos.applystudentsnew.ApplyStudentsNewDTO">
<result column="apply_students_new_id" property="applyStudentsNewId"/>
<result column="org_id" property="orgId"/>
<result column="org_name" property="orgName"/>
<result column="class_plan_id" property="classPlanId"/>
<result column="user_id" property="userId"/>
<result column="name" property="name"/>
<result column="sex" property="sex"/>
<result column="card_type" property="cardType"/>
<result column="card_type_name" property="cardTypeName"/>
<result column="card_number" property="cardNumber"/>
<result column="work_unit" property="workUnit"/>
<result column="work_dept" property="workDept"/>
<result column="work_title" property="workTitle"/>
<result column="phone" property="phone"/>
<result column="exam_org_id" property="examOrgId"/>
<result column="exam_org_name" property="examOrgName"/>
<result column="exam_point_id" property="examPointId"/>
<result column="exam_point_name" property="examPointName"/>
<result column="hands_point_id" property="handsPointId"/>
<result column="hands_point_name" property="handsPointName"/>
<result column="exam_grade" property="examGrade"/>
<result column="hands_grade" property="handsGrade"/>
<result column="resit_exam_grade" property="resitExamGrade"/>
<result column="resit_hands_grade" property="resitHandsGrade"/>
<result column="apply_paper_status" property="applyPaperStatus"/>
<result column="check_status" property="checkStatus"/>
<result column="reason" property="reason"/>
<result column="education" property="education"/>
<result column="education_name" property="educationName"/>
<result column="health" property="health"/>
<result column="allow_project" property="allowProject"/>
<result column="training_time" property="trainingTime"/>
<result column="card_time" property="cardTime"/>
<result column="id_card" property="idCard"/>
<result column="card_validity" property="cardValidity"/>
<result column="review_time" property="reviewTime"/>
<result column="education_name" property="educationName"/>
<result column="zhicheng" property="zhicheng"/>
<result column="school" property="school"/>
<result column="major" property="major"/>
<result column="work_post" property="workPost"/>
<result column="training_type" property="trainingType"/>
<result column="area" property="area"/>
<result column="work_type" property="workType"/>
<result column="get_card_time" property="getCardTime"/>
<result column="retraining_time" property="retrainingTime"/>
<result column="job_type" property="jobType"/>
</resultMap>
<resultMap id="applyStudentsNewBO" type="cn.com.tenlion.pojo.bos.applystudentsnew.ApplyStudentsNewBO">
<result column="apply_students_new_id" property="applyStudentsNewId"/>
<result column="org_id" property="orgId"/>
<result column="org_name" property="orgName"/>
<result column="class_plan_id" property="classPlanId"/>
<result column="user_id" property="userId"/>
<result column="name" property="name"/>
<result column="sex" property="sex"/>
<result column="card_type" property="cardType"/>
<result column="card_type_name" property="cardTypeName"/>
<result column="card_number" property="cardNumber"/>
<result column="work_unit" property="workUnit"/>
<result column="work_dept" property="workDept"/>
<result column="work_title" property="workTitle"/>
<result column="phone" property="phone"/>
<result column="exam_org_id" property="examOrgId"/>
<result column="exam_org_name" property="examOrgName"/>
<result column="exam_point_id" property="examPointId"/>
<result column="exam_point_name" property="examPointName"/>
<result column="hands_point_id" property="handsPointId"/>
<result column="hands_point_name" property="handsPointName"/>
<result column="exam_grade" property="examGrade"/>
<result column="hands_grade" property="handsGrade"/>
<result column="resit_exam_grade" property="resitExamGrade"/>
<result column="resit_hands_grade" property="resitHandsGrade"/>
<result column="apply_paper_status" property="applyPaperStatus"/>
<result column="creator" property="creator"/>
<result column="gmt_create" property="gmtCreate"/>
<result column="modifier" property="modifier"/>
<result column="gmt_modified" property="gmtModified"/>
<result column="is_delete" property="isDelete"/>
<result column="check_status" property="checkStatus"/>
<result column="reason" property="reason"/>
<result column="education" property="education"/>
<result column="education_name" property="educationName"/>
<result column="health" property="health"/>
<result column="allow_project" property="allowProject"/>
<result column="training_time" property="trainingTime"/>
<result column="card_time" property="cardTime"/>
<result column="id_card" property="idCard"/>
<result column="card_validity" property="cardValidity"/>
<result column="review_time" property="reviewTime"/>
<result column="education_name" property="educationName"/>
<result column="zhicheng" property="zhicheng"/>
<result column="school" property="school"/>
<result column="major" property="major"/>
<result column="work_post" property="workPost"/>
<result column="training_type" property="trainingType"/>
<result column="area" property="area"/>
<result column="work_type" property="workType"/>
<result column="get_card_time" property="getCardTime"/>
<result column="retraining_time" property="retrainingTime"/>
<result column="job_type" property="jobType"/>
</resultMap>
<resultMap id="applyStudentsNewPO" type="cn.com.tenlion.pojo.pos.applystudentsnew.ApplyStudentsNewPO">
<result column="apply_students_new_id" property="applyStudentsNewId"/>
<result column="org_id" property="orgId"/>
<result column="org_name" property="orgName"/>
<result column="class_plan_id" property="classPlanId"/>
<result column="user_id" property="userId"/>
<result column="name" property="name"/>
<result column="sex" property="sex"/>
<result column="card_type" property="cardType"/>
<result column="card_type_name" property="cardTypeName"/>
<result column="card_number" property="cardNumber"/>
<result column="work_unit" property="workUnit"/>
<result column="work_dept" property="workDept"/>
<result column="work_title" property="workTitle"/>
<result column="phone" property="phone"/>
<result column="exam_org_id" property="examOrgId"/>
<result column="exam_org_name" property="examOrgName"/>
<result column="exam_point_id" property="examPointId"/>
<result column="exam_point_name" property="examPointName"/>
<result column="hands_point_id" property="handsPointId"/>
<result column="hands_point_name" property="handsPointName"/>
<result column="exam_grade" property="examGrade"/>
<result column="hands_grade" property="handsGrade"/>
<result column="resit_exam_grade" property="resitExamGrade"/>
<result column="resit_hands_grade" property="resitHandsGrade"/>
<result column="apply_paper_status" property="applyPaperStatus"/>
<result column="creator" property="creator"/>
<result column="gmt_create" property="gmtCreate"/>
<result column="modifier" property="modifier"/>
<result column="gmt_modified" property="gmtModified"/>
<result column="is_delete" property="isDelete"/>
<result column="check_status" property="checkStatus"/>
<result column="reason" property="reason"/>
<result column="education" property="education"/>
<result column="education_name" property="educationName"/>
<result column="health" property="health"/>
<result column="allow_project" property="allowProject"/>
<result column="training_time" property="trainingTime"/>
<result column="card_time" property="cardTime"/>
<result column="id_card" property="idCard"/>
<result column="card_validity" property="cardValidity"/>
<result column="review_time" property="reviewTime"/>
<result column="education_name" property="educationName"/>
<result column="zhicheng" property="zhicheng"/>
<result column="school" property="school"/>
<result column="major" property="major"/>
<result column="work_post" property="workPost"/>
<result column="training_type" property="trainingType"/>
<result column="area" property="area"/>
<result column="work_type" property="workType"/>
<result column="get_card_time" property="getCardTime"/>
<result column="retraining_time" property="retrainingTime"/>
<result column="job_type" property="jobType"/>
</resultMap>
<!-- 新增 -->
<insert id="save" parameterType="map">
INSERT INTO e_apply_students_new(
apply_students_new_id,
org_id,
org_name,
class_plan_id,
user_id,
name,
sex,
card_type,
card_type_name,
card_number,
work_unit,
work_dept,
work_title,
phone,
exam_org_id,
exam_org_name,
exam_point_id,
exam_point_name,
hands_point_id,
hands_point_name,
exam_grade,
hands_grade,
resit_exam_grade,
resit_hands_grade,
apply_paper_status,
check_status,
reason,
education,
education_name,
health,
allow_project,
training_time,
card_time,
id_card,
card_validity,
review_time,
zhicheng,
school,
major,
work_post,
training_type,
area,
work_type,
get_card_time,
retraining_time,
job_type,
creator,
gmt_create,
modifier,
gmt_modified,
is_delete
) VALUES(
#{applyStudentsNewId},
#{orgId},
#{orgName},
#{classPlanId},
#{userId},
#{name},
#{sex},
#{cardType},
#{cardTypeName},
#{cardNumber},
#{workUnit},
#{workDept},
#{workTitle},
#{phone},
#{examOrgId},
#{examOrgName},
#{examPointId},
#{examPointName},
#{handsPointId},
#{handsPointName},
#{examGrade},
#{handsGrade},
#{resitExamGrade},
#{resitHandsGrade},
#{applyPaperStatus},
#{checkStatus},
#{reason},
#{education},
#{educationName},
#{health},
#{allowProject},
#{trainingTime},
#{cardTime},
#{idCard},
#{cardValidity},
#{reviewTime},
#{zhicheng},
#{school},
#{major},
#{workPost},
#{trainingType},
#{area},
#{workType},
#{getCardTime},
#{retrainingTime},
#{jobType},
#{creator},
#{gmtCreate},
#{modifier},
#{gmtModified},
#{isDelete}
)
</insert>
<!-- 删除 -->
<update id="remove" parameterType="map">
UPDATE
e_apply_students_new
SET
gmt_modified = #{gmtModified},
modifier = #{modifier},
is_delete = 1
WHERE
apply_students_new_id IN
<foreach collection="applyStudentsNewIds" index="index" open="(" separator="," close=")">
#{applyStudentsNewIds[${index}]}
</foreach>
</update>
<!-- 删除(物理) -->
<update id="delete" parameterType="map">
DELETE FROM
e_apply_students_new
WHERE
apply_students_new_id IN
<foreach collection="applyStudentsNewIds" index="index" open="(" separator="," close=")">
#{applyStudentsNewIds[${index}]}
</foreach>
</update>
<!-- 修改 -->
<update id="update" parameterType="map">
UPDATE
e_apply_students_new
SET
<if test="orgId != null and orgId != ''">
org_id = #{orgId},
</if>
<if test="orgName != null and orgName != ''">
org_name = #{orgName},
</if>
<if test="classPlanId != null and classPlanId != ''">
class_plan_id = #{classPlanId},
</if>
<if test="userId != null and userId != ''">
user_id = #{userId},
</if>
<if test="name != null and name != ''">
name = #{name},
</if>
<if test="sex != null and sex != ''">
sex = #{sex},
</if>
<if test="cardType != null and cardType != ''">
card_type = #{cardType},
</if>
<if test="cardTypeName != null and cardTypeName != ''">
card_type_name = #{cardTypeName},
</if>
<if test="cardNumber != null and cardNumber != ''">
card_number = #{cardNumber},
</if>
<if test="workUnit != null and workUnit != ''">
work_unit = #{workUnit},
</if>
<if test="workDept != null and workDept != ''">
work_dept = #{workDept},
</if>
<if test="workTitle != null and workTitle != ''">
work_title = #{workTitle},
</if>
<if test="phone != null and phone != ''">
phone = #{phone},
</if>
<if test="examOrgId != null and examOrgId != ''">
exam_org_id = #{examOrgId},
</if>
<if test="examOrgName != null and examOrgName != ''">
exam_org_name = #{examOrgName},
</if>
<if test="examPointId != null and examPointId != ''">
exam_point_id = #{examPointId},
</if>
<if test="examPointName != null and examPointName != ''">
exam_point_name = #{examPointName},
</if>
<if test="handsPointId != null and handsPointId != ''">
hands_point_id = #{handsPointId},
</if>
<if test="handsPointName != null and handsPointName != ''">
hands_point_name = #{handsPointName},
</if>
<if test="examGrade != null and examGrade != ''">
exam_grade = #{examGrade},
</if>
<if test="handsGrade != null and handsGrade != ''">
hands_grade = #{handsGrade},
</if>
<if test="resitExamGrade != null and resitExamGrade != ''">
resit_exam_grade = #{resitExamGrade},
</if>
<if test="resitHandsGrade != null and resitHandsGrade != ''">
resit_hands_grade = #{resitHandsGrade},
</if>
<if test="applyPaperStatus != null and applyPaperStatus != ''">
apply_paper_status = #{applyPaperStatus},
</if>
<if test="checkStatus != null">
check_status = #{checkStatus},
</if>
<if test="reason != null and reason != ''">
reason = #{reason},
</if>
<if test="education != null and education != ''">
education = #{education},
</if>
<if test="educationName != null and educationName != ''">
education_name = #{educationName},
</if>
<if test="health != null and health != ''">
health = #{health},
</if>
<if test="allowProject != null and allowProject != ''">
allow_project = #{allowProject},
</if>
<if test="trainingTime != null and trainingTime != ''">
training_time = #{trainingTime},
</if>
<if test="cardTime != null and cardTime != ''">
card_time = #{cardTime},
</if>
<if test="idCard != null and idCard != ''">
id_card = #{idCard},
</if>
<if test="cardValidity != null and cardValidity != ''">
card_validity = #{cardValidity},
</if>
<if test="reviewTime != null and reviewTime != ''">
review_time = #{reviewTime},
</if>
<if test="zhicheng != null and zhicheng != ''">
zhicheng = #{zhicheng},
</if>
<if test="school != null and school != ''">
school = #{school},
</if>
<if test="major != null and major != ''">
review_time = #{major},
</if>
<if test="workPost != null and workPost != ''">
work_post = #{workPost},
</if>
<if test="trainingType != null and trainingType != ''">
training_type = #{trainingType},
</if>
<if test="area != null and area != ''">
area = #{area},
</if>
<if test="workType != null and workType != ''">
work_type = #{workType},
</if>
<if test="getCardTime != null and getCardTime != ''">
get_card_time = #{getCardTime},
</if>
<if test="retrainingTime != null and retrainingTime != ''">
retraining_time = #{retrainingTime},
</if>
<if test="jobType != null and jobType != ''">
job_type = #{jobType},
</if>
<if test="gmtModified != null and gmtModified != ''">
jgmt_modified = #{gmtModified},
</if>
<if test="modifier != null and modifier != ''">
modifier = #{modifier},
</if>
apply_students_new_id = apply_students_new_id
WHERE
1 = 1
<if test="applyStudentsNewId != null and applyStudentsNewId != ''">
AND apply_students_new_id = #{applyStudentsNewId}
</if>
<if test="classPlanId != null and classPlanId != ''">
AND class_plan_id = #{classPlanId}
</if>
</update>
<!-- 详情 -->
<select id="get" parameterType="map" resultMap="applyStudentsNewDTO">
SELECT
t1.org_id,
t1.org_name,
t1.class_plan_id,
t1.user_id,
t1.name,
t1.sex,
t1.card_type,
t1.card_type_name,
t1.card_number,
t1.work_unit,
t1.work_dept,
t1.work_title,
t1.phone,
t1.exam_org_id,
t1.exam_org_name,
t1.exam_point_id,
t1.exam_point_name,
t1.hands_point_id,
t1.hands_point_name,
t1.exam_grade,
t1.hands_grade,
t1.resit_exam_grade,
t1.resit_hands_grade,
t1.apply_paper_status,
t1.check_status,
t1.reason,
t1.education,
t1.education_name,
t1.health,
t1.allow_project,
t1.training_time,
t1.card_time,
t1.id_card,
t1.card_validity,
t1.review_time,
t1.zhicheng,
t1.school,
t1.major,
t1.work_post,
t1.training_type,
t1.area,
t1.work_type,
t1.get_card_time,
t1.retraining_time,
t1.job_type,
t1.apply_students_new_id
FROM
e_apply_students_new t1
WHERE
t1.is_delete = 0
<if test="applyStudentsNewId != null and applyStudentsNewId != ''">
AND
t1.apply_students_new_id = #{applyStudentsNewId}
</if>
<if test="cardNumber != null and cardNumber != ''">
AND
t1.card_number = #{cardNumber}
</if>
<if test="checkStatus != null">
AND
t1.check_status = #{checkStatus}
</if>
<if test="userId != null and userId != ''">
AND
t1.user_id = #{userId}
</if>
<if test="classPlanId != null and classPlanId != ''">
AND
t1.class_plan_id = #{classPlanId}
LIMIT 0, 1
</if>
</select>
<!-- 详情 -->
<select id="getBO" parameterType="map" resultMap="applyStudentsNewBO">
SELECT
t1.apply_students_new_id,
t1.org_id,
t1.org_name,
t1.class_plan_id,
t1.user_id,
t1.name,
t1.sex,
t1.card_type,
t1.card_type_name,
t1.card_number,
t1.work_unit,
t1.work_dept,
t1.work_title,
t1.phone,
t1.exam_org_id,
t1.exam_org_name,
t1.exam_point_id,
t1.exam_point_name,
t1.hands_point_id,
t1.hands_point_name,
t1.exam_grade,
t1.hands_grade,
t1.resit_exam_grade,
t1.resit_hands_grade,
t1.apply_paper_status,
t1.check_status,
t1.reason,
t1.education,
t1.education_name,
t1.health,
t1.allow_project,
t1.training_time,
t1.card_time,
t1.id_card,
t1.card_validity,
t1.review_time,
t1.zhicheng,
t1.school,
t1.major,
t1.work_post,
t1.training_type,
t1.area,
t1.work_type,
t1.get_card_time,
t1.retraining_time,
t1.job_type,
t1.creator,
t1.gmt_create,
t1.modifier,
t1.gmt_modified,
t1.is_delete
FROM
e_apply_students_new t1
WHERE
t1.is_delete = 0
<if test="applyStudentsNewId != null and applyStudentsNewId != ''">
AND
t1.apply_students_new_id = #{applyStudentsNewId}
</if>
</select>
<!-- 详情 -->
<select id="getPO" parameterType="map" resultMap="applyStudentsNewPO">
SELECT
t1.apply_students_new_id,
t1.org_id,
t1.org_name,
t1.class_plan_id,
t1.user_id,
t1.name,
t1.sex,
t1.card_type,
t1.card_type_name,
t1.card_number,
t1.work_unit,
t1.work_dept,
t1.work_title,
t1.phone,
t1.exam_org_id,
t1.exam_org_name,
t1.exam_point_id,
t1.exam_point_name,
t1.hands_point_id,
t1.hands_point_name,
t1.exam_grade,
t1.hands_grade,
t1.resit_exam_grade,
t1.resit_hands_grade,
t1.apply_paper_status,
t1.check_status,
t1.reason,
t1.education,
t1.education_name,
t1.health,
t1.allow_project,
t1.training_time,
t1.card_time,
t1.id_card,
t1.card_validity,
t1.review_time,
t1.zhicheng,
t1.school,
t1.major,
t1.work_post,
t1.training_type,
t1.area,
t1.work_type,
t1.get_card_time,
t1.retraining_time,
t1.job_type,
t1.creator,
t1.gmt_create,
t1.modifier,
t1.gmt_modified,
t1.is_delete
FROM
e_apply_students_new t1
WHERE
t1.is_delete = 0
<if test="applyStudentsNewId != null and applyStudentsNewId != ''">
AND
t1.apply_students_new_id = #{applyStudentsNewId}
</if>
</select>
<!-- 列表 -->
<select id="list" parameterType="map" resultMap="applyStudentsNewDTO">
SELECT
t1.apply_students_new_id,
t1.org_id,
t1.org_name,
t1.class_plan_id,
t1.user_id,
t1.name,
t1.sex,
t1.card_type,
t1.card_type_name,
t1.card_number,
t1.work_unit,
t1.work_dept,
t1.work_title,
t1.phone,
t1.exam_org_id,
t1.exam_org_name,
t1.exam_point_id,
t1.exam_point_name,
t1.hands_point_id,
t1.hands_point_name,
t1.exam_grade,
t1.hands_grade,
t1.resit_exam_grade,
t1.resit_hands_grade,
t1.apply_paper_status,
t1.check_status,
t1.reason,
t1.education,
t1.education_name,
t1.health,
t1.allow_project,
t1.training_time,
t1.card_time,
t1.id_card,
t1.card_validity,
t1.review_time,
t1.zhicheng,
t1.school,
t1.major,
t1.work_post,
t1.training_type,
t1.area,
t1.work_type,
t1.get_card_time,
t1.retraining_time,
t1.job_type,
t1.creator,
t1.gmt_create,
t1.modifier,
t1.gmt_modified,
t1.is_delete,
1
FROM
e_apply_students_new t1
WHERE
t1.is_delete = 0
<if test="keywords != null and keywords != ''">
AND (
t1.card_number LIKE CONCAT('%', #{keywords}, '%')
)
</if>
<if test="classPlanId != null and classPlanId != ''">
AND
t1.class_plan_id = #{classPlanId}
</if>
<if test="cardNumber != null and cardNumber != ''">
AND
t1.card_number = #{cardNumber}
</if>
<if test="checkStatus != null">
AND
t1.check_status = #{checkStatus}
</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="gradeIsNull != null and gradeIsNull != ''">
AND
ISNULL(exam_grade)=0 AND LENGTH(trim(exam_grade))=0
</if>
<if test="classPlanIds != null and classPlanIds.size > 0">
AND
t1.class_plan_id IN
<foreach collection="classPlanIds" index="index" open="(" separator="," close=")">
#{classPlanIds[${index}]}
</foreach>
</if>
<if test="applyStudentsNewIds != null and applyStudentsNewIds.size > 0">
AND
t1.apply_students_new_id IN
<foreach collection="applyStudentsNewIds" index="index" open="(" separator="," close=")">
#{applyStudentsNewIds[${index}]}
</foreach>
</if>
</select>
<!-- 列表 -->
<select id="listBO" parameterType="map" resultMap="applyStudentsNewBO">
SELECT
t1.apply_students_new_id,
t1.org_id,
t1.org_name,
t1.class_plan_id,
t1.user_id,
t1.name,
t1.sex,
t1.card_type,
t1.card_type_name,
t1.card_number,
t1.work_unit,
t1.work_dept,
t1.work_title,
t1.phone,
t1.exam_org_id,
t1.exam_org_name,
t1.exam_point_id,
t1.exam_point_name,
t1.hands_point_id,
t1.hands_point_name,
t1.exam_grade,
t1.hands_grade,
t1.resit_exam_grade,
t1.resit_hands_grade,
t1.apply_paper_status,
t1.check_status,
t1.reason,
t1.education,
t1.education_name,
t1.health,
t1.allow_project,
t1.training_time,
t1.card_time,
t1.id_card,
t1.card_validity,
t1.review_time,
t1.zhicheng,
t1.school,
t1.major,
t1.work_post,
t1.training_type,
t1.area,
t1.work_type,
t1.get_card_time,
t1.retraining_time,
t1.job_type,
t1.creator,
t1.gmt_create,
t1.modifier,
t1.gmt_modified,
t1.is_delete
FROM
e_apply_students_new 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="applyStudentsNewIds != null and applyStudentsNewIds.size > 0">
AND
t1.apply_students_new_id IN
<foreach collection="applyStudentsNewIds" index="index" open="(" separator="," close=")">
#{applyStudentsNewIds[${index}]}
</foreach>
</if>
</select>
<!-- 列表 -->
<select id="listPO" parameterType="map" resultMap="applyStudentsNewPO">
SELECT
t1.apply_students_new_id,
t1.org_id,
t1.org_name,
t1.class_plan_id,
t1.user_id,
t1.name,
t1.sex,
t1.card_type,
t1.card_type_name,
t1.card_number,
t1.work_unit,
t1.work_dept,
t1.work_title,
t1.phone,
t1.exam_org_id,
t1.exam_org_name,
t1.exam_point_id,
t1.exam_point_name,
t1.hands_point_id,
t1.hands_point_name,
t1.exam_grade,
t1.hands_grade,
t1.resit_exam_grade,
t1.resit_hands_grade,
t1.apply_paper_status,
t1.check_status,
t1.reason,
t1.education,
t1.education_name,
t1.health,
t1.allow_project,
t1.training_time,
t1.card_time,
t1.id_card,
t1.card_validity,
t1.review_time,
t1.zhicheng,
t1.school,
t1.major,
t1.work_post,
t1.training_type,
t1.area,
t1.work_type,
t1.get_card_time,
t1.retraining_time,
t1.job_type,
t1.creator,
t1.gmt_create,
t1.modifier,
t1.gmt_modified,
t1.is_delete
FROM
e_apply_students_new 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="applyStudentsNewIds != null and applyStudentsNewIds.size > 0">
AND
t1.apply_students_new_id IN
<foreach collection="applyStudentsNewIds" index="index" open="(" separator="," close=")">
#{applyStudentsNewIds[${index}]}
</foreach>
</if>
</select>
<!-- 统计 -->
<select id="count" parameterType="map" resultType="Integer">
SELECT
COUNT(*)
FROM
e_apply_students_new t1
WHERE
t1.is_delete = 0
</select>
<select id="getGrade" parameterType="map" resultMap="applyStudentsNewDTO">
SELECT
t1.apply_students_new_id,
t1.org_id,
t1.org_name,
t1.class_plan_id,
t1.user_id,
t1.name,
t1.sex,
t1.card_type,
t1.card_type_name,
t1.card_number,
t1.work_unit,
t1.work_dept,
t1.work_title,
t1.phone,
t1.exam_org_id,
t1.exam_org_name,
t1.exam_point_id,
t1.exam_point_name,
t1.hands_point_id,
t1.hands_point_name,
t1.exam_grade,
t1.hands_grade,
t1.resit_exam_grade,
t1.resit_hands_grade,
t1.apply_paper_status
FROM e_apply_students_new t1 WHERE t1.is_delete = 0 AND t1.user_id = #{userId}
</select>
</mapper>