563 lines
21 KiB
XML
563 lines
21 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.applystudents.IApplyStudentsDao">
|
|
|
|
<resultMap id="applyStudentsDTO" type="cn.com.tenlion.pojo.dtos.applystudents.ApplyStudentsDTO">
|
|
<result column="apply_id" property="applyId"/>
|
|
<result column="apply_institution_id" property="applyInstitutionId"/>
|
|
<result column="apply_class_id" property="applyClassId"/>
|
|
<result column="apply_class_name" property="applyClassName"/>
|
|
<result column="apply_work_type_id" property="applyWorkTypeId"/>
|
|
<result column="apply_name" property="applyName"/>
|
|
<result column="apply_sex" property="applySex"/>
|
|
<result column="apply_data_birth" property="applyDataBirth"/>
|
|
<result column="apply_card_type" property="applyCardType"/>
|
|
<result column="apply_card_number" property="applyCardNumber"/>
|
|
<result column="apply_phone" property="applyPhone"/>
|
|
<result column="apply_address" property="applyAddress"/>
|
|
<result column="apply_culture_level" property="applyCultureLevel"/>
|
|
<result column="apply_postcode" property="applyPostcode"/>
|
|
<result column="apply_physical_state" property="applyPhysicalState"/>
|
|
<result column="apply_unit_name" property="applyUnitName"/>
|
|
<result column="apply_unit_phone" property="applyUnitPhone"/>
|
|
<result column="apply_unit_address" property="applyUnitAddress"/>
|
|
<result column="apply_position" property="applyPosition"/>
|
|
<result column="apply_major_year" property="applyMajorYear"/>
|
|
<result column="apply_technical_titles" property="applyTechnicalTitles"/>
|
|
<result column="apply_user_card_photo" property="applyUserCardPhoto"/>
|
|
<result column="apply_audit_state" property="applyAuditState"/>
|
|
<result column="apply_test_scores" property="applyTestScores"/>
|
|
<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"/>
|
|
</resultMap>
|
|
|
|
<resultMap id="applyStudentsBO" type="cn.com.tenlion.pojo.bos.applystudents.ApplyStudentsBO">
|
|
<result column="apply_id" property="applyId"/>
|
|
<result column="apply_institution_id" property="applyInstitutionId"/>
|
|
<result column="apply_class_id" property="applyClassId"/>
|
|
<result column="apply_class_name" property="applyClassName"/>
|
|
<result column="apply_work_type_id" property="applyWorkTypeId"/>
|
|
<result column="apply_name" property="applyName"/>
|
|
<result column="apply_sex" property="applySex"/>
|
|
<result column="apply_data_birth" property="applyDataBirth"/>
|
|
<result column="apply_card_type" property="applyCardType"/>
|
|
<result column="apply_card_number" property="applyCardNumber"/>
|
|
<result column="apply_phone" property="applyPhone"/>
|
|
<result column="apply_address" property="applyAddress"/>
|
|
<result column="apply_culture_level" property="applyCultureLevel"/>
|
|
<result column="apply_postcode" property="applyPostcode"/>
|
|
<result column="apply_physical_state" property="applyPhysicalState"/>
|
|
<result column="apply_unit_name" property="applyUnitName"/>
|
|
<result column="apply_unit_phone" property="applyUnitPhone"/>
|
|
<result column="apply_unit_address" property="applyUnitAddress"/>
|
|
<result column="apply_position" property="applyPosition"/>
|
|
<result column="apply_major_year" property="applyMajorYear"/>
|
|
<result column="apply_technical_titles" property="applyTechnicalTitles"/>
|
|
<result column="apply_user_card_photo" property="applyUserCardPhoto"/>
|
|
<result column="apply_audit_state" property="applyAuditState"/>
|
|
<result column="apply_test_scores" property="applyTestScores"/>
|
|
<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"/>
|
|
</resultMap>
|
|
|
|
<resultMap id="applyStudentsPO" type="cn.com.tenlion.pojo.pos.applystudents.ApplyStudentsPO">
|
|
<result column="apply_id" property="applyId"/>
|
|
<result column="apply_institution_id" property="applyInstitutionId"/>
|
|
<result column="apply_class_id" property="applyClassId"/>
|
|
<result column="apply_class_name" property="applyClassName"/>
|
|
<result column="apply_work_type_id" property="applyWorkTypeId"/>
|
|
<result column="apply_name" property="applyName"/>
|
|
<result column="apply_sex" property="applySex"/>
|
|
<result column="apply_data_birth" property="applyDataBirth"/>
|
|
<result column="apply_card_type" property="applyCardType"/>
|
|
<result column="apply_card_number" property="applyCardNumber"/>
|
|
<result column="apply_phone" property="applyPhone"/>
|
|
<result column="apply_address" property="applyAddress"/>
|
|
<result column="apply_culture_level" property="applyCultureLevel"/>
|
|
<result column="apply_postcode" property="applyPostcode"/>
|
|
<result column="apply_physical_state" property="applyPhysicalState"/>
|
|
<result column="apply_unit_name" property="applyUnitName"/>
|
|
<result column="apply_unit_phone" property="applyUnitPhone"/>
|
|
<result column="apply_unit_address" property="applyUnitAddress"/>
|
|
<result column="apply_position" property="applyPosition"/>
|
|
<result column="apply_major_year" property="applyMajorYear"/>
|
|
<result column="apply_technical_titles" property="applyTechnicalTitles"/>
|
|
<result column="apply_user_card_photo" property="applyUserCardPhoto"/>
|
|
<result column="apply_audit_state" property="applyAuditState"/>
|
|
<result column="apply_test_scores" property="applyTestScores"/>
|
|
<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"/>
|
|
</resultMap>
|
|
|
|
<!-- 新增班级学生表 -->
|
|
<insert id="save" parameterType="map">
|
|
INSERT INTO e_apply_students(
|
|
apply_id,
|
|
apply_institution_id,
|
|
apply_class_id,
|
|
apply_class_name,
|
|
apply_work_type_id,
|
|
apply_name,
|
|
apply_sex,
|
|
apply_data_birth,
|
|
apply_card_type,
|
|
apply_card_number,
|
|
apply_phone,
|
|
apply_address,
|
|
apply_culture_level,
|
|
apply_postcode,
|
|
apply_physical_state,
|
|
apply_unit_name,
|
|
apply_unit_phone,
|
|
apply_unit_address,
|
|
apply_position,
|
|
apply_major_year,
|
|
apply_technical_titles,
|
|
apply_user_card_photo,
|
|
apply_audit_state,
|
|
apply_test_scores,
|
|
bind_user_account,
|
|
creator,
|
|
gmt_create,
|
|
modifier,
|
|
gmt_modified,
|
|
is_delete
|
|
) VALUES(
|
|
#{applyId},
|
|
#{applyInstitutionId},
|
|
#{applyClassId},
|
|
#{applyClassName},
|
|
#{applyWorkTypeId},
|
|
#{applyName},
|
|
#{applySex},
|
|
#{applyDataBirth},
|
|
#{applyCardType},
|
|
#{applyCardNumber},
|
|
#{applyPhone},
|
|
#{applyAddress},
|
|
#{applyCultureLevel},
|
|
#{applyPostcode},
|
|
#{applyPhysicalState},
|
|
#{applyUnitName},
|
|
#{applyUnitPhone},
|
|
#{applyUnitAddress},
|
|
#{applyPosition},
|
|
#{applyMajorYear},
|
|
#{applyTechnicalTitles},
|
|
#{applyUserCardPhoto},
|
|
#{applyAuditState},
|
|
#{applyTestScores},
|
|
#{bind_user_account},
|
|
#{creator},
|
|
#{gmtCreate},
|
|
#{modifier},
|
|
#{gmtModified},
|
|
#{isDelete}
|
|
)
|
|
</insert>
|
|
|
|
<!-- 删除班级学生表 -->
|
|
<update id="remove" parameterType="map">
|
|
UPDATE
|
|
e_apply_students
|
|
SET
|
|
gmt_modified = #{gmtModified},
|
|
modifier = #{modifier},
|
|
is_delete = 1
|
|
WHERE
|
|
apply_id IN
|
|
<foreach collection="applyIds" index="index" open="(" separator="," close=")">
|
|
#{applyIds[${index}]}
|
|
</foreach>
|
|
</update>
|
|
|
|
<!-- 删除班级学生表(物理) -->
|
|
<update id="delete" parameterType="map">
|
|
DELETE FROM
|
|
e_apply_students
|
|
WHERE
|
|
apply_id IN
|
|
<foreach collection="applyIds" index="index" open="(" separator="," close=")">
|
|
#{applyIds[${index}]}
|
|
</foreach>
|
|
</update>
|
|
|
|
<!-- 修改班级学生表 -->
|
|
<update id="update" parameterType="map">
|
|
UPDATE
|
|
e_apply_students
|
|
SET
|
|
<if test="applyId != null and applyId != ''">
|
|
apply_id = #{applyId},
|
|
</if>
|
|
<if test="applyInstitutionId != null and applyInstitutionId != ''">
|
|
apply_institution_id = #{applyInstitutionId},
|
|
</if>
|
|
<if test="applyClassId != null and applyClassId != ''">
|
|
apply_class_id = #{applyClassId},
|
|
</if>
|
|
<if test="applyClassName != null and applyClassName != ''">
|
|
apply_class_name = #{applyClassName},
|
|
</if>
|
|
<if test="applyWorkTypeId != null and applyWorkTypeId != ''">
|
|
apply_work_type_id = #{applyWorkTypeId},
|
|
</if>
|
|
<if test="applyName != null and applyName != ''">
|
|
apply_name = #{applyName},
|
|
</if>
|
|
<if test="applySex != null and applySex != ''">
|
|
apply_sex = #{applySex},
|
|
</if>
|
|
<if test="applyDataBirth != null and applyDataBirth != ''">
|
|
apply_data_birth = #{applyDataBirth},
|
|
</if>
|
|
<if test="applyCardType != null and applyCardType != ''">
|
|
apply_card_type = #{applyCardType},
|
|
</if>
|
|
<if test="applyCardNumber != null and applyCardNumber != ''">
|
|
apply_card_number = #{applyCardNumber},
|
|
</if>
|
|
<if test="applyPhone != null and applyPhone != ''">
|
|
apply_phone = #{applyPhone},
|
|
</if>
|
|
<if test="applyAddress != null and applyAddress != ''">
|
|
apply_address = #{applyAddress},
|
|
</if>
|
|
<if test="applyCultureLevel != null and applyCultureLevel != ''">
|
|
apply_culture_level = #{applyCultureLevel},
|
|
</if>
|
|
<if test="applyPostcode != null and applyPostcode != ''">
|
|
apply_postcode = #{applyPostcode},
|
|
</if>
|
|
<if test="applyPhysicalState != null and applyPhysicalState != ''">
|
|
apply_physical_state = #{applyPhysicalState},
|
|
</if>
|
|
<if test="applyUnitName != null and applyUnitName != ''">
|
|
apply_unit_name = #{applyUnitName},
|
|
</if>
|
|
<if test="applyUnitPhone != null and applyUnitPhone != ''">
|
|
apply_unit_phone = #{applyUnitPhone},
|
|
</if>
|
|
<if test="applyUnitAddress != null and applyUnitAddress != ''">
|
|
apply_unit_address = #{applyUnitAddress},
|
|
</if>
|
|
<if test="applyPosition != null and applyPosition != ''">
|
|
apply_position = #{applyPosition},
|
|
</if>
|
|
<if test="applyMajorYear != null">
|
|
apply_major_year = #{applyMajorYear},
|
|
</if>
|
|
<if test="applyTechnicalTitles != null and applyTechnicalTitles != ''">
|
|
apply_technical_titles = #{applyTechnicalTitles},
|
|
</if>
|
|
<if test="applyUserCardPhoto != null and applyUserCardPhoto != ''">
|
|
apply_user_card_photo = #{applyUserCardPhoto},
|
|
</if>
|
|
<if test="applyAuditState != null">
|
|
apply_audit_state = #{applyAuditState},
|
|
</if>
|
|
<if test="applyTestScores != null and applyTestScores != ''">
|
|
apply_test_scores = #{applyTestScores},
|
|
</if>
|
|
gmt_modified = #{gmtModified},
|
|
modifier = #{modifier}
|
|
WHERE
|
|
1 = 1
|
|
<if test="applyId != null and applyId != ''">
|
|
AND apply_id = #{applyId}
|
|
</if>
|
|
<if test="classPlanId != null and classPlanId != ''">
|
|
AND apply_class_id = #{classPlanId}
|
|
</if>
|
|
</update>
|
|
|
|
<!-- 班级学生表详情 -->
|
|
<select id="get" parameterType="map" resultMap="applyStudentsDTO">
|
|
SELECT
|
|
t1.apply_id,
|
|
t1.apply_institution_id,
|
|
t1.apply_class_id,
|
|
t1.apply_class_name,
|
|
t1.apply_work_type_id,
|
|
t1.apply_name,
|
|
t1.apply_sex,
|
|
t1.apply_data_birth,
|
|
t1.apply_card_type,
|
|
t1.apply_card_number,
|
|
t1.apply_phone,
|
|
t1.apply_address,
|
|
t1.apply_culture_level,
|
|
t1.apply_postcode,
|
|
t1.apply_physical_state,
|
|
t1.apply_unit_name,
|
|
t1.apply_unit_phone,
|
|
t1.apply_unit_address,
|
|
t1.apply_position,
|
|
t1.apply_major_year,
|
|
t1.apply_technical_titles,
|
|
t1.apply_user_card_photo,
|
|
t1.apply_audit_state,
|
|
t1.apply_test_scores
|
|
FROM
|
|
e_apply_students t1
|
|
WHERE
|
|
t1.is_delete = 0 AND t1.apply_id = #{applyId}
|
|
</select>
|
|
|
|
<!-- 班级学生表详情 -->
|
|
<select id="getBO" parameterType="map" resultMap="applyStudentsBO">
|
|
SELECT
|
|
t1.apply_id,
|
|
t1.apply_institution_id,
|
|
t1.apply_class_id,
|
|
t1.apply_class_name,
|
|
t1.apply_work_type_id,
|
|
t1.apply_name,
|
|
t1.apply_sex,
|
|
t1.apply_data_birth,
|
|
t1.apply_card_type,
|
|
t1.apply_card_number,
|
|
t1.apply_phone,
|
|
t1.apply_address,
|
|
t1.apply_culture_level,
|
|
t1.apply_postcode,
|
|
t1.apply_physical_state,
|
|
t1.apply_unit_name,
|
|
t1.apply_unit_phone,
|
|
t1.apply_unit_address,
|
|
t1.apply_position,
|
|
t1.apply_major_year,
|
|
t1.apply_technical_titles,
|
|
t1.apply_user_card_photo,
|
|
t1.apply_audit_state,
|
|
t1.apply_test_scores,
|
|
t1.creator,
|
|
t1.gmt_create,
|
|
t1.modifier,
|
|
t1.gmt_modified,
|
|
t1.is_delete
|
|
FROM
|
|
e_apply_students t1
|
|
WHERE
|
|
t1.is_delete = 0 AND t1.apply_id = #{applyId}
|
|
</select>
|
|
|
|
<!-- 班级学生表详情 -->
|
|
<select id="getPO" parameterType="map" resultMap="applyStudentsPO">
|
|
SELECT
|
|
t1.apply_id,
|
|
t1.apply_institution_id,
|
|
t1.apply_class_id,
|
|
t1.apply_class_name,
|
|
t1.apply_work_type_id,
|
|
t1.apply_name,
|
|
t1.apply_sex,
|
|
t1.apply_data_birth,
|
|
t1.apply_card_type,
|
|
t1.apply_card_number,
|
|
t1.apply_phone,
|
|
t1.apply_address,
|
|
t1.apply_culture_level,
|
|
t1.apply_postcode,
|
|
t1.apply_physical_state,
|
|
t1.apply_unit_name,
|
|
t1.apply_unit_phone,
|
|
t1.apply_unit_address,
|
|
t1.apply_position,
|
|
t1.apply_major_year,
|
|
t1.apply_technical_titles,
|
|
t1.apply_user_card_photo,
|
|
t1.apply_audit_state,
|
|
t1.apply_test_scores,
|
|
t1.creator,
|
|
t1.gmt_create,
|
|
t1.modifier,
|
|
t1.gmt_modified,
|
|
t1.is_delete
|
|
FROM
|
|
e_apply_students t1
|
|
WHERE
|
|
t1.is_delete = 0 AND t1.apply_id = #{applyId}
|
|
</select>
|
|
|
|
<!-- 班级学生表列表 -->
|
|
<select id="list" parameterType="map" resultMap="applyStudentsDTO">
|
|
SELECT
|
|
t1.apply_id,
|
|
t1.apply_institution_id,
|
|
t1.apply_class_id,
|
|
t1.apply_class_name,
|
|
t1.apply_work_type_id,
|
|
t1.apply_name,
|
|
t1.apply_sex,
|
|
t1.apply_data_birth,
|
|
t1.apply_card_type,
|
|
t1.apply_card_number,
|
|
t1.apply_phone,
|
|
t1.apply_address,
|
|
t1.apply_culture_level,
|
|
t1.apply_postcode,
|
|
t1.apply_physical_state,
|
|
t1.apply_unit_name,
|
|
t1.apply_unit_phone,
|
|
t1.apply_unit_address,
|
|
t1.apply_position,
|
|
t1.apply_major_year,
|
|
t1.apply_technical_titles,
|
|
t1.apply_user_card_photo,
|
|
t1.apply_audit_state,
|
|
t1.apply_test_scores,
|
|
t1.creator,
|
|
t1.gmt_create,
|
|
t1.modifier,
|
|
t1.gmt_modified,
|
|
t1.is_delete
|
|
FROM
|
|
e_apply_students t1
|
|
WHERE
|
|
t1.is_delete = 0
|
|
<if test="keywords != null and keywords != ''">
|
|
AND (
|
|
t1.apply_card_number LIKE CONCAT('%', #{keywords}, '%')
|
|
)
|
|
</if>
|
|
<if test="applyClassId != null and applyClassId != ''">
|
|
AND t1.apply_class_id = #{applyClassId}
|
|
</if>
|
|
<if test="creator != null and creator != ''">
|
|
AND t1.creator = #{creator}
|
|
</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>
|
|
</select>
|
|
|
|
<!-- 班级学生表列表 -->
|
|
<select id="listBO" parameterType="map" resultMap="applyStudentsBO">
|
|
SELECT
|
|
t1.apply_id,
|
|
t1.apply_institution_id,
|
|
t1.apply_class_id,
|
|
t1.apply_class_name,
|
|
t1.apply_work_type_id,
|
|
t1.apply_name,
|
|
t1.apply_sex,
|
|
t1.apply_data_birth,
|
|
t1.apply_card_type,
|
|
t1.apply_card_number,
|
|
t1.apply_phone,
|
|
t1.apply_address,
|
|
t1.apply_culture_level,
|
|
t1.apply_postcode,
|
|
t1.apply_physical_state,
|
|
t1.apply_unit_name,
|
|
t1.apply_unit_phone,
|
|
t1.apply_unit_address,
|
|
t1.apply_position,
|
|
t1.apply_major_year,
|
|
t1.apply_technical_titles,
|
|
t1.apply_user_card_photo,
|
|
t1.apply_audit_state,
|
|
t1.apply_test_scores,
|
|
t1.creator,
|
|
t1.gmt_create,
|
|
t1.modifier,
|
|
t1.gmt_modified,
|
|
t1.is_delete
|
|
FROM
|
|
e_apply_students 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>
|
|
</select>
|
|
|
|
<!-- 班级学生表列表 -->
|
|
<select id="listPO" parameterType="map" resultMap="applyStudentsPO">
|
|
SELECT
|
|
t1.apply_id,
|
|
t1.apply_institution_id,
|
|
t1.apply_class_id,
|
|
t1.apply_class_name,
|
|
t1.apply_work_type_id,
|
|
t1.apply_name,
|
|
t1.apply_sex,
|
|
t1.apply_data_birth,
|
|
t1.apply_card_type,
|
|
t1.apply_card_number,
|
|
t1.apply_phone,
|
|
t1.apply_address,
|
|
t1.apply_culture_level,
|
|
t1.apply_postcode,
|
|
t1.apply_physical_state,
|
|
t1.apply_unit_name,
|
|
t1.apply_unit_phone,
|
|
t1.apply_unit_address,
|
|
t1.apply_position,
|
|
t1.apply_major_year,
|
|
t1.apply_technical_titles,
|
|
t1.apply_user_card_photo,
|
|
t1.apply_audit_state,
|
|
t1.apply_test_scores,
|
|
t1.creator,
|
|
t1.gmt_create,
|
|
t1.modifier,
|
|
t1.gmt_modified,
|
|
t1.is_delete
|
|
FROM
|
|
e_apply_students 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>
|
|
</select>
|
|
|
|
<!-- 班级学生表统计 -->
|
|
<select id="count" parameterType="map" resultType="Integer">
|
|
SELECT
|
|
COUNT(*)
|
|
FROM
|
|
e_apply_students t1
|
|
WHERE
|
|
t1.is_delete = 0
|
|
</select>
|
|
|
|
</mapper> |