|
@@ -0,0 +1,412 @@
|
|
|
+<?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.ruoyi.system.mapper.StuBaseInfoMapper">
|
|
|
+
|
|
|
+ <resultMap type="StuBaseInfo" id="StuBaseInfoResult">
|
|
|
+ <result property="id" column="id" />
|
|
|
+ <result property="studentName" column="student_name" />
|
|
|
+ <result property="sex" column="sex" />
|
|
|
+ <result property="educationBackground" column="education_background" />
|
|
|
+ <result property="freshStudent" column="fresh_student" />
|
|
|
+ <result property="studentNumber" column="student_number"/>
|
|
|
+ <result property="idCardNumber" column="id_card_number" />
|
|
|
+ <result property="studentStatus" column="student_status" />
|
|
|
+ <result property="phone" column="phone" />
|
|
|
+ <result property="shouldRegisterDate" column="should_register_date"/>
|
|
|
+ <result property="originOfStudent" column="origin_of_student" />
|
|
|
+ <result property="graduatedFrom" column="graduated_from" />
|
|
|
+ <result property="professionId" column="profession_id" />
|
|
|
+ <result property="professionName" column="profession_name" />
|
|
|
+ <result property="classId" column="class_id" />
|
|
|
+ <result property="className" column="class_name" />
|
|
|
+ <result property="insuranceIsBuy" column="insurance_is_buy" />
|
|
|
+ <result property="dormIsAllot" column="dorm_is_allot" />
|
|
|
+ <result property="uniformIsHandOut" column="uniform_is_hand_out" />
|
|
|
+ <result property="textbookIsHandOut" column="textbook_is_hand_out" />
|
|
|
+ <result property="score" column="score" />
|
|
|
+ <result property="scoreBy" column="score_by" />
|
|
|
+ <result property="remark" column="remark" />
|
|
|
+ <result property="companyName" column="company_name" />
|
|
|
+ <result property="entryDate" column="entry_date" />
|
|
|
+ <result property="companyAddress" column="company_address" />
|
|
|
+ <result property="contactName" column="contact_name" />
|
|
|
+ <result property="companyPhone" column="company_phone" />
|
|
|
+ <result property="poorHouseholdsIs" column="poor_households_is" />
|
|
|
+ <result property="registerDate" column="register_date" />
|
|
|
+ <result property="enrollmentDate" column="enrollment_date" />
|
|
|
+ <result property="receivableIncidentals" column="receivable_incidentals" />
|
|
|
+ <result property="receivableQuarterage" column="receivable_quarterage" />
|
|
|
+ <result property="receivableTotal" column="receivable_total" />
|
|
|
+ <result property="officialIncidentals" column="official_incidentals" />
|
|
|
+ <result property="incidentalsBillNo" column="incidentals_bill_no" />
|
|
|
+ <result property="officialQuarterage" column="official_quarterage" />
|
|
|
+ <result property="officialTotal" column="official_total" />
|
|
|
+ <result property="quarterageBillNo" column="quarterage_bill_no" />
|
|
|
+ <result property="chargerName" column="charger_name" />
|
|
|
+ <result property="paymentDate" column="payment_date" />
|
|
|
+ <result property="paymentMethod" column="payment_method" />
|
|
|
+ <result property="drawer" column="drawer" />
|
|
|
+ <result property="contactTeacher" column="contact_teacher" />
|
|
|
+ <result property="incidentalsBillSerial" column="incidentals_bill_serial" />
|
|
|
+ <result property="firstLowHalfIs" column="first_low_half_is" />
|
|
|
+ <result property="secondUpHalfIs" column="second_up_half_is" />
|
|
|
+ <result property="secondLowHalfIs" column="second_low_half_is" />
|
|
|
+ <result property="thirdUpHalfIs" column="third_up_half_is" />
|
|
|
+ <result property="thirdLowHalfIs" column="third_low_half_is" />
|
|
|
+ <result property="chargeTimes" column="charge_times" />
|
|
|
+ <result property="createBy" column="create_by" />
|
|
|
+ <result property="createTime" column="create_time" />
|
|
|
+ <result property="updateBy" column="update_by" />
|
|
|
+ <result property="updateTime" column="update_time" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <resultMap id="allBaseInfo" type="StuBaseInfo" extends="StuBaseInfoResult">
|
|
|
+ <result property="departmentId" column="department_id" />
|
|
|
+ <result property="departmentName" column="department_name" />
|
|
|
+
|
|
|
+ <result property="collegeId" column="college_id" />
|
|
|
+ <result property="collegeName" column="college_name" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectStuBaseInfoVo">
|
|
|
+ select sbi.id, sbi.student_name, sbi.sex, sbi.education_background, sbi.fresh_student, sbi.id_card_number,sbi.student_number, sbi.student_status, sbi.phone,sbi.should_register_date,sbi.origin_of_student, sbi.graduated_from, sbi.profession_id, sbi.profession_name, sbi.class_id, sbi.class_name, sbi.insurance_is_buy, sbi.dorm_is_allot, sbi.uniform_is_hand_out, sbi.textbook_is_hand_out, sbi.score, sbi.score_by, sbi.remark, sbi.company_name, sbi.entry_date, company_address, contact_name, company_phone, poor_households_is, register_date, enrollment_date, receivable_incidentals, receivable_quarterage, official_incidentals,receivable_total,official_total, incidentals_bill_no, official_quarterage, quarterage_bill_no, charger_name, payment_date,payment_method, drawer, contact_teacher, incidentals_bill_serial, first_low_half_is, second_up_half_is, second_low_half_is, third_up_half_is, third_low_half_is, charge_times, sbi.create_by, sbi.create_time, sbi.update_by, sbi.update_time
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectStuBaseInfoList" parameterType="StuBaseInfo" resultMap="StuBaseInfoResult">
|
|
|
+ <include refid="selectStuBaseInfoVo"/> from stu_base_info sbi
|
|
|
+
|
|
|
+ <where>
|
|
|
+ <if test="studentName != null and studentName != ''"> and student_name like concat('%', #{studentName}, '%')</if>
|
|
|
+ <if test="sex != null and sex != ''"> and sex = #{sex}</if>
|
|
|
+ <if test="educationBackground != null and educationBackground != ''"> and education_background = #{educationBackground}</if>
|
|
|
+ <if test="freshStudent != null and freshStudent != ''"> and fresh_student = #{freshStudent}</if>
|
|
|
+ <if test="idCardNumber != null and idCardNumber != ''"> and id_card_number = #{idCardNumber}</if>
|
|
|
+ <if test="studentNumber != null and studentNumber !=''"> and student_number=#{studentNumber}</if>
|
|
|
+
|
|
|
+ <if test="studentStatus != null ">
|
|
|
+ <choose>
|
|
|
+ <when test="studentStatus==99 ">
|
|
|
+ and student_status IN(2,3,4,5,6,7)
|
|
|
+ </when>
|
|
|
+ <otherwise>
|
|
|
+ and student_status = #{studentStatus}
|
|
|
+ </otherwise>
|
|
|
+ </choose>
|
|
|
+ </if>
|
|
|
+ <if test="phone != null and phone != ''"> and phone = #{phone}</if>
|
|
|
+ <if test="originOfStudent != null and originOfStudent != ''"> and origin_of_student = #{originOfStudent}</if>
|
|
|
+ <if test="graduatedFrom != null and graduatedFrom != ''"> and graduated_from = #{graduatedFrom}</if>
|
|
|
+ <if test="professionId != null "> and profession_id = #{professionId}</if>
|
|
|
+ <if test="professionName != null and professionName != ''"> and profession_name like concat('%', #{professionName}, '%')</if>
|
|
|
+ <if test="classId != null "> and class_id = #{classId}</if>
|
|
|
+ <if test="className != null and className != ''"> and class_name like concat('%', #{className}, '%')</if>
|
|
|
+ <if test="insuranceIsBuy != null "> and insurance_is_buy = #{insuranceIsBuy}</if>
|
|
|
+ <if test="dormIsAllot != null "> and dorm_is_allot = #{dormIsAllot}</if>
|
|
|
+ <if test="uniformIsHandOut != null "> and uniform_is_hand_out = #{uniformIsHandOut}</if>
|
|
|
+ <if test="textbookIsHandOut != null "> and textbook_is_hand_out = #{textbookIsHandOut}</if>
|
|
|
+ <if test="score != null "> and score = #{score}</if>
|
|
|
+ <if test="scoreBy != null and scoreBy != ''"> and score_by = #{scoreBy}</if>
|
|
|
+ <if test="companyName != null and companyName != ''"> and company_name like concat('%', #{companyName}, '%')</if>
|
|
|
+ <if test="entryDate != null "> and entry_date = #{entryDate}</if>
|
|
|
+ <if test="companyAddress != null and companyAddress != ''"> and company_address = #{companyAddress}</if>
|
|
|
+ <if test="contactName != null and contactName != ''"> and contact_name like concat('%', #{contactName}, '%')</if>
|
|
|
+ <if test="companyPhone != null and companyPhone != ''"> and company_phone = #{companyPhone}</if>
|
|
|
+ <if test="poorHouseholdsIs != null "> and poor_households_is = #{poorHouseholdsIs}</if>
|
|
|
+ <if test="registerDate != null "> and register_date = #{registerDate}</if>
|
|
|
+ <if test="enrollmentDate != null "> and enrollment_date = #{enrollmentDate}</if>
|
|
|
+ <if test="receivableIncidentals != null "> and receivable_incidentals = #{receivableIncidentals}</if>
|
|
|
+ <if test="receivableQuarterage != null "> and receivable_quarterage = #{receivableQuarterage}</if>
|
|
|
+ <if test="officialIncidentals != null "> and official_incidentals = #{officialIncidentals}</if>
|
|
|
+ <if test="incidentalsBillNo != null and incidentalsBillNo != ''"> and incidentals_bill_no = #{incidentalsBillNo}</if>
|
|
|
+ <if test="officialQuarterage != null "> and official_quarterage = #{officialQuarterage}</if>
|
|
|
+ <if test="quarterageBillNo != null and quarterageBillNo != ''"> and quarterage_bill_no = #{quarterageBillNo}</if>
|
|
|
+ <if test="chargerName != null and chargerName != ''"> and charger_name like concat('%', #{chargerName}, '%')</if>
|
|
|
+ <if test="paymentDate != null "> and payment_date = #{paymentDate}</if>
|
|
|
+ <if test="paymentMethod != null "> and payment_method = #{paymentMethod}</if>
|
|
|
+ <if test="drawer != null and drawer != ''"> and drawer = #{drawer}</if>
|
|
|
+ <if test="contactTeacher != null and contactTeacher != ''"> and contact_teacher = #{contactTeacher}</if>
|
|
|
+ <if test="incidentalsBillSerial != null and incidentalsBillSerial != ''"> and incidentals_bill_serial = #{incidentalsBillSerial}</if>
|
|
|
+ <if test="chargeTimes != null "> and charge_times = #{chargeTimes}</if>
|
|
|
+ <if test="shouldRegisterDate != null "> and should_register_date = #{shouldRegisterDate}</if>
|
|
|
+ </where>
|
|
|
+ order by update_time desc
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectStuBaseInfoById" parameterType="Long" resultMap="allBaseInfo">
|
|
|
+ <include refid="selectStuBaseInfoVo"/>,p.department_id,d.department_name,d.college_id,co.college_name
|
|
|
+ from stu_base_info sbi
|
|
|
+ LEFT JOIN stu_profession p ON sbi.profession_id = p.id
|
|
|
+ LEFT JOIN stu_department d ON p.department_id = d.id
|
|
|
+ LEFT JOIN stu_college co ON d.college_id = co.id
|
|
|
+ where sbi.id = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertStuBaseInfo" parameterType="StuBaseInfo" useGeneratedKeys="true" keyProperty="id">
|
|
|
+ insert into stu_base_info
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="studentName != null">student_name,</if>
|
|
|
+ <if test="sex != null">sex,</if>
|
|
|
+ <if test="educationBackground != null">education_background,</if>
|
|
|
+ <if test="freshStudent != null">fresh_student,</if>
|
|
|
+ <if test="idCardNumber != null">id_card_number,</if>
|
|
|
+ <if test="studentNumber !=null">student_number,</if>
|
|
|
+ <if test="studentStatus != null">student_status,</if>
|
|
|
+ <if test="phone != null">phone,</if>
|
|
|
+ <if test="shouldRegisterDate">should_register_date,</if>
|
|
|
+ <if test="originOfStudent != null">origin_of_student,</if>
|
|
|
+ <if test="graduatedFrom != null">graduated_from,</if>
|
|
|
+ <if test="professionId != null">profession_id,</if>
|
|
|
+ <if test="professionName != null">profession_name,</if>
|
|
|
+ <if test="classId != null">class_id,</if>
|
|
|
+ <if test="className != null">class_name,</if>
|
|
|
+ <if test="insuranceIsBuy != null">insurance_is_buy,</if>
|
|
|
+ <if test="dormIsAllot != null">dorm_is_allot,</if>
|
|
|
+ <if test="uniformIsHandOut != null">uniform_is_hand_out,</if>
|
|
|
+ <if test="textbookIsHandOut != null">textbook_is_hand_out,</if>
|
|
|
+ <if test="score != null">score,</if>
|
|
|
+ <if test="scoreBy != null">score_by,</if>
|
|
|
+ <if test="remark != null">remark,</if>
|
|
|
+ <if test="companyName != null">company_name,</if>
|
|
|
+ <if test="entryDate != null">entry_date,</if>
|
|
|
+ <if test="companyAddress != null">company_address,</if>
|
|
|
+ <if test="contactName != null">contact_name,</if>
|
|
|
+ <if test="companyPhone != null">company_phone,</if>
|
|
|
+ <if test="poorHouseholdsIs != null">poor_households_is,</if>
|
|
|
+ <if test="registerDate != null">register_date,</if>
|
|
|
+ <if test="enrollmentDate != null">enrollment_date,</if>
|
|
|
+ <if test="receivableIncidentals != null">receivable_incidentals,</if>
|
|
|
+ <if test="receivableQuarterage != null">receivable_quarterage,</if>
|
|
|
+ <if test="receivableTotal != null">receivable_total,</if>
|
|
|
+ <if test="officialIncidentals != null">official_incidentals,</if>
|
|
|
+ <if test="incidentalsBillNo != null">incidentals_bill_no,</if>
|
|
|
+ <if test="officialQuarterage != null">official_quarterage,</if>
|
|
|
+ <if test="officialTotal !=null">official_total,</if>
|
|
|
+ <if test="quarterageBillNo != null">quarterage_bill_no,</if>
|
|
|
+ <if test="chargerName != null">charger_name,</if>
|
|
|
+ <if test="paymentDate != null">payment_date,</if>
|
|
|
+ <if test="paymentMethod">payment_method,</if>
|
|
|
+ <if test="drawer != null">drawer,</if>
|
|
|
+ <if test="contactTeacher != null">contact_teacher,</if>
|
|
|
+ <if test="incidentalsBillSerial != null">incidentals_bill_serial,</if>
|
|
|
+ <if test="firstLowHalfIs != null">first_low_half_is,</if>
|
|
|
+ <if test="secondUpHalfIs != null">second_up_half_is,</if>
|
|
|
+ <if test="secondLowHalfIs != null">second_low_half_is,</if>
|
|
|
+ <if test="thirdUpHalfIs != null">third_up_half_is,</if>
|
|
|
+ <if test="thirdLowHalfIs != null">third_low_half_is,</if>
|
|
|
+ <if test="chargeTimes != null">charge_times,</if>
|
|
|
+ <if test="createBy != null">create_by,</if>
|
|
|
+ <if test="createTime != null">create_time,</if>
|
|
|
+ <if test="updateBy != null">update_by,</if>
|
|
|
+ <if test="updateTime != null">update_time,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="studentName != null">#{studentName},</if>
|
|
|
+ <if test="sex != null">#{sex},</if>
|
|
|
+ <if test="educationBackground != null">#{educationBackground},</if>
|
|
|
+ <if test="freshStudent != null">#{freshStudent},</if>
|
|
|
+ <if test="idCardNumber != null">#{idCardNumber},</if>
|
|
|
+ <if test="studentNumber">#{studentNumber},</if>
|
|
|
+ <if test="studentStatus != null">#{studentStatus},</if>
|
|
|
+ <if test="phone != null">#{phone},</if>
|
|
|
+ <if test="shouldRegisterDate">#{shouldRegisterDate},</if>
|
|
|
+ <if test="originOfStudent != null">#{originOfStudent},</if>
|
|
|
+ <if test="graduatedFrom != null">#{graduatedFrom},</if>
|
|
|
+ <if test="professionId != null">#{professionId},</if>
|
|
|
+ <if test="professionName != null">#{professionName},</if>
|
|
|
+ <if test="classId != null">#{classId},</if>
|
|
|
+ <if test="className != null">#{className},</if>
|
|
|
+ <if test="insuranceIsBuy != null">#{insuranceIsBuy},</if>
|
|
|
+ <if test="dormIsAllot != null">#{dormIsAllot},</if>
|
|
|
+ <if test="uniformIsHandOut != null">#{uniformIsHandOut},</if>
|
|
|
+ <if test="textbookIsHandOut != null">#{textbookIsHandOut},</if>
|
|
|
+ <if test="score != null">#{score},</if>
|
|
|
+ <if test="scoreBy != null">#{scoreBy},</if>
|
|
|
+ <if test="remark != null">#{remark},</if>
|
|
|
+ <if test="companyName != null">#{companyName},</if>
|
|
|
+ <if test="entryDate != null">#{entryDate},</if>
|
|
|
+ <if test="companyAddress != null">#{companyAddress},</if>
|
|
|
+ <if test="contactName != null">#{contactName},</if>
|
|
|
+ <if test="companyPhone != null">#{companyPhone},</if>
|
|
|
+ <if test="poorHouseholdsIs != null">#{poorHouseholdsIs},</if>
|
|
|
+ <if test="registerDate != null">#{registerDate},</if>
|
|
|
+ <if test="enrollmentDate != null">#{enrollmentDate},</if>
|
|
|
+ <if test="receivableIncidentals != null">#{receivableIncidentals},</if>
|
|
|
+ <if test="receivableQuarterage != null">#{receivableQuarterage},</if>
|
|
|
+ <if test="receivableTotal != null">#{receivableTotal},</if>
|
|
|
+ <if test="officialIncidentals != null">#{officialIncidentals},</if>
|
|
|
+ <if test="incidentalsBillNo != null">#{incidentalsBillNo},</if>
|
|
|
+ <if test="officialQuarterage != null">#{officialQuarterage},</if>
|
|
|
+ <if test="officialTotal != null">#{officialTotal},</if>
|
|
|
+ <if test="quarterageBillNo != null">#{quarterageBillNo},</if>
|
|
|
+ <if test="chargerName != null">#{chargerName},</if>
|
|
|
+ <if test="paymentDate != null">#{paymentDate},</if>
|
|
|
+ <if test="paymentMethod">#{paymentMethod},</if>
|
|
|
+ <if test="drawer != null">#{drawer},</if>
|
|
|
+ <if test="contactTeacher != null">#{contactTeacher},</if>
|
|
|
+ <if test="incidentalsBillSerial != null">#{incidentalsBillSerial},</if>
|
|
|
+ <if test="firstLowHalfIs != null">#{firstLowHalfIs},</if>
|
|
|
+ <if test="secondUpHalfIs != null">#{secondUpHalfIs},</if>
|
|
|
+ <if test="secondLowHalfIs != null">#{secondLowHalfIs},</if>
|
|
|
+ <if test="thirdUpHalfIs != null">#{thirdUpHalfIs},</if>
|
|
|
+ <if test="thirdLowHalfIs != null">#{thirdLowHalfIs},</if>
|
|
|
+ <if test="chargeTimes != null">#{chargeTimes},</if>
|
|
|
+ <if test="createBy != null">#{createBy},</if>
|
|
|
+ <if test="createTime != null">#{createTime},</if>
|
|
|
+ <if test="updateBy != null">#{updateBy},</if>
|
|
|
+ <if test="updateTime != null">#{updateTime},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateStuBaseInfo" parameterType="StuBaseInfo">
|
|
|
+ update stu_base_info
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="studentName != null">student_name = #{studentName},</if>
|
|
|
+ <if test="sex != null">sex = #{sex},</if>
|
|
|
+ <if test="educationBackground != null">education_background = #{educationBackground},</if>
|
|
|
+ <if test="freshStudent != null">fresh_student = #{freshStudent},</if>
|
|
|
+ <if test="idCardNumber != null">id_card_number = #{idCardNumber},</if>
|
|
|
+ <if test="studentNumber !=null">student_number=#{studentNumber},</if>
|
|
|
+ <if test="studentStatus != null">student_status = #{studentStatus},</if>
|
|
|
+ <if test="phone != null">phone = #{phone},</if>
|
|
|
+ <if test="shouldRegisterDate">should_register_date=#{shouldRegisterDate},</if>
|
|
|
+ <if test="originOfStudent != null">origin_of_student = #{originOfStudent},</if>
|
|
|
+ <if test="graduatedFrom != null">graduated_from = #{graduatedFrom},</if>
|
|
|
+ <if test="professionId != null">profession_id = #{professionId},</if>
|
|
|
+ <if test="professionName != null">profession_name = #{professionName},</if>
|
|
|
+ <if test="classId != null">class_id = #{classId},</if>
|
|
|
+ <if test="className != null">class_name = #{className},</if>
|
|
|
+ <if test="insuranceIsBuy != null">insurance_is_buy = #{insuranceIsBuy},</if>
|
|
|
+ <if test="dormIsAllot != null">dorm_is_allot = #{dormIsAllot},</if>
|
|
|
+ <if test="uniformIsHandOut != null">uniform_is_hand_out = #{uniformIsHandOut},</if>
|
|
|
+ <if test="textbookIsHandOut != null">textbook_is_hand_out = #{textbookIsHandOut},</if>
|
|
|
+ <if test="score != null">score = #{score},</if>
|
|
|
+ <if test="scoreBy != null">score_by = #{scoreBy},</if>
|
|
|
+ <if test="remark != null">remark = #{remark},</if>
|
|
|
+ <if test="companyName != null">company_name = #{companyName},</if>
|
|
|
+ <if test="entryDate != null">entry_date = #{entryDate},</if>
|
|
|
+ <if test="companyAddress != null">company_address = #{companyAddress},</if>
|
|
|
+ <if test="contactName != null">contact_name = #{contactName},</if>
|
|
|
+ <if test="companyPhone != null">company_phone = #{companyPhone},</if>
|
|
|
+ <if test="poorHouseholdsIs != null">poor_households_is = #{poorHouseholdsIs},</if>
|
|
|
+ <if test="registerDate != null">register_date = #{registerDate},</if>
|
|
|
+ <if test="enrollmentDate != null">enrollment_date = #{enrollmentDate},</if>
|
|
|
+ <if test="receivableIncidentals != null">receivable_incidentals = #{receivableIncidentals},</if>
|
|
|
+ <if test="receivableQuarterage != null">receivable_quarterage = #{receivableQuarterage},</if>
|
|
|
+ <if test="receivableTotal != null">receivable_total = #{receivableTotal},</if>
|
|
|
+ <if test="officialIncidentals != null">official_incidentals = #{officialIncidentals},</if>
|
|
|
+ <if test="incidentalsBillNo != null">incidentals_bill_no = #{incidentalsBillNo},</if>
|
|
|
+ <if test="officialQuarterage != null">official_quarterage = #{officialQuarterage},</if>
|
|
|
+ <if test="officialTotal != null">official_total = #{officialTotal},</if>
|
|
|
+ <if test="quarterageBillNo != null">quarterage_bill_no = #{quarterageBillNo},</if>
|
|
|
+ <if test="chargerName != null">charger_name = #{chargerName},</if>
|
|
|
+ <if test="paymentDate != null">payment_date = #{paymentDate},</if>
|
|
|
+ <if test="paymentMethod != null">payment_method=#{paymentMethod},</if>
|
|
|
+ <if test="drawer != null">drawer = #{drawer},</if>
|
|
|
+ <if test="contactTeacher != null">contact_teacher = #{contactTeacher},</if>
|
|
|
+ <if test="incidentalsBillSerial != null">incidentals_bill_serial = #{incidentalsBillSerial},</if>
|
|
|
+ <if test="firstLowHalfIs != null">first_low_half_is = #{firstLowHalfIs},</if>
|
|
|
+ <if test="secondUpHalfIs != null">second_up_half_is = #{secondUpHalfIs},</if>
|
|
|
+ <if test="secondLowHalfIs != null">second_low_half_is = #{secondLowHalfIs},</if>
|
|
|
+ <if test="thirdUpHalfIs != null">third_up_half_is = #{thirdUpHalfIs},</if>
|
|
|
+ <if test="thirdLowHalfIs != null">third_low_half_is = #{thirdLowHalfIs},</if>
|
|
|
+ <if test="chargeTimes != null">charge_times = #{chargeTimes},</if>
|
|
|
+ <if test="createBy != null">create_by = #{createBy},</if>
|
|
|
+ <if test="createTime != null">create_time = #{createTime},</if>
|
|
|
+ <if test="updateBy != null">update_by = #{updateBy},</if>
|
|
|
+ <if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
+ </trim>
|
|
|
+ where id = #{id}
|
|
|
+</update>
|
|
|
+ <!-- 身份证号更新 -->
|
|
|
+ <update id="updateStuBaseInfoByNumber" parameterType="StuBaseInfo">
|
|
|
+ update stu_base_info
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="studentName != null">student_name = #{studentName},</if>
|
|
|
+ <if test="sex != null">sex = #{sex},</if>
|
|
|
+ <if test="educationBackground != null">education_background = #{educationBackground},</if>
|
|
|
+ <if test="freshStudent != null">fresh_student = #{freshStudent},</if>
|
|
|
+ <if test="idCardNumber != null">id_card_number = #{idCardNumber},</if>
|
|
|
+ <if test="studentNumber !=null">student_number=#{studentNumber},</if>
|
|
|
+ <if test="studentStatus != null">student_status = #{studentStatus},</if>
|
|
|
+ <if test="phone != null">phone = #{phone},</if>
|
|
|
+ <if test="shouldRegisterDate">should_register_date=#{shouldRegisterDate},</if>
|
|
|
+ <if test="originOfStudent != null">origin_of_student = #{originOfStudent},</if>
|
|
|
+ <if test="graduatedFrom != null">graduated_from = #{graduatedFrom},</if>
|
|
|
+ <if test="professionId != null">profession_id = #{professionId},</if>
|
|
|
+ <if test="professionName != null">profession_name = #{professionName},</if>
|
|
|
+ <if test="classId != null">class_id = #{classId},</if>
|
|
|
+ <if test="className != null">class_name = #{className},</if>
|
|
|
+ <if test="insuranceIsBuy != null">insurance_is_buy = #{insuranceIsBuy},</if>
|
|
|
+ <if test="dormIsAllot != null">dorm_is_allot = #{dormIsAllot},</if>
|
|
|
+ <if test="uniformIsHandOut != null">uniform_is_hand_out = #{uniformIsHandOut},</if>
|
|
|
+ <if test="textbookIsHandOut != null">textbook_is_hand_out = #{textbookIsHandOut},</if>
|
|
|
+ <if test="score != null">score = #{score},</if>
|
|
|
+ <if test="scoreBy != null">score_by = #{scoreBy},</if>
|
|
|
+ <if test="remark != null">remark = #{remark},</if>
|
|
|
+ <if test="companyName != null">company_name = #{companyName},</if>
|
|
|
+ <if test="entryDate != null">entry_date = #{entryDate},</if>
|
|
|
+ <if test="companyAddress != null">company_address = #{companyAddress},</if>
|
|
|
+ <if test="contactName != null">contact_name = #{contactName},</if>
|
|
|
+ <if test="companyPhone != null">company_phone = #{companyPhone},</if>
|
|
|
+ <if test="poorHouseholdsIs != null">poor_households_is = #{poorHouseholdsIs},</if>
|
|
|
+ <if test="registerDate != null">register_date = #{registerDate},</if>
|
|
|
+ <if test="enrollmentDate != null">enrollment_date = #{enrollmentDate},</if>
|
|
|
+ <if test="receivableIncidentals != null">receivable_incidentals = #{receivableIncidentals},</if>
|
|
|
+ <if test="receivableQuarterage != null">receivable_quarterage = #{receivableQuarterage},</if>
|
|
|
+ <if test="receivableTotal != null">receivable_total = #{receivableTotal},</if>
|
|
|
+ <if test="officialIncidentals != null">official_incidentals = #{officialIncidentals},</if>
|
|
|
+ <if test="incidentalsBillNo != null">incidentals_bill_no = #{incidentalsBillNo},</if>
|
|
|
+ <if test="officialQuarterage != null">official_quarterage = #{officialQuarterage},</if>
|
|
|
+ <if test="officialTotal != null">official_total = #{officialTotal},</if>
|
|
|
+ <if test="quarterageBillNo != null">quarterage_bill_no = #{quarterageBillNo},</if>
|
|
|
+ <if test="chargerName != null">charger_name = #{chargerName},</if>
|
|
|
+ <if test="paymentDate != null">payment_date = #{paymentDate},</if>
|
|
|
+ <if test="paymentMethod != null">payment_method=#{paymentMethod},</if>
|
|
|
+ <if test="drawer != null">drawer = #{drawer},</if>
|
|
|
+ <if test="contactTeacher != null">contact_teacher = #{contactTeacher},</if>
|
|
|
+ <if test="incidentalsBillSerial != null">incidentals_bill_serial = #{incidentalsBillSerial},</if>
|
|
|
+ <if test="firstLowHalfIs != null">first_low_half_is = #{firstLowHalfIs},</if>
|
|
|
+ <if test="secondUpHalfIs != null">second_up_half_is = #{secondUpHalfIs},</if>
|
|
|
+ <if test="secondLowHalfIs != null">second_low_half_is = #{secondLowHalfIs},</if>
|
|
|
+ <if test="thirdUpHalfIs != null">third_up_half_is = #{thirdUpHalfIs},</if>
|
|
|
+ <if test="thirdLowHalfIs != null">third_low_half_is = #{thirdLowHalfIs},</if>
|
|
|
+ <if test="chargeTimes != null">charge_times = #{chargeTimes},</if>
|
|
|
+ <if test="createBy != null">create_by = #{createBy},</if>
|
|
|
+ <if test="createTime != null">create_time = #{createTime},</if>
|
|
|
+ <if test="updateBy != null">update_by = #{updateBy},</if>
|
|
|
+ <if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
+ </trim>
|
|
|
+ where id_card_number = #{idCardNumber}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deleteStuBaseInfoById" parameterType="Long">
|
|
|
+ delete from stu_base_info where id = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteStuBaseInfoByIds" parameterType="String">
|
|
|
+ delete from stu_base_info where id in
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <!-- 根据身份证号获取学生 -->
|
|
|
+ <select id="selectStudentByIDNumber" parameterType="String" resultMap="StuBaseInfoResult">
|
|
|
+ <include refid="selectStuBaseInfoVo"/>
|
|
|
+ from stu_base_info sbi
|
|
|
+ where id_card_number = #{idCardNumber}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!-- 查询要毕业的学生-->
|
|
|
+ <select id="selectGraduationStudent" resultType="StudentGraduationStatusVo">
|
|
|
+ SELECT id,student_status AS studentStatus FROM stu_base_info WHERE datediff(CURDATE(),enrollment_date)>730
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!-- 更新毕业学生的状态 -->
|
|
|
+ <update id="updateStudentStatus" parameterType="StudentGraduationStatusVo">
|
|
|
+ update stu_base_info set student_status=#{studentStatus} where id=#{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+</mapper>
|