|
@@ -23,7 +23,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="className" column="class_name" />
|
|
|
<result property="insuranceIsBuy" column="insurance_is_buy" />
|
|
|
<result property="roomId" column="room_id" />
|
|
|
+ <result property="roomName" column="room_name" />
|
|
|
<result property="buildingId" column="building_id" />
|
|
|
+ <result property="buildingName" column="building_name" />
|
|
|
<result property="uniformIsHandOut" column="uniform_is_hand_out" />
|
|
|
<result property="textbookIsHandOut" column="textbook_is_hand_out" />
|
|
|
<result property="score" column="score" />
|
|
@@ -52,15 +54,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="contactTeacher" column="contact_teacher" />
|
|
|
<result property="incidentalsBillSerial" column="incidentals_bill_serial" />
|
|
|
<result property="firstLowHalfIs" column="first_low_half_is" />
|
|
|
+ <result property="firstLowFees" column="first_low_fees" />
|
|
|
<result property="secondUpHalfIs" column="second_up_half_is" />
|
|
|
+ <result property="secondUpFees" column="second_up_fees" />
|
|
|
<result property="secondLowHalfIs" column="second_low_half_is" />
|
|
|
+ <result property="secondLowFees" column="second_low_fees" />
|
|
|
<result property="thirdUpHalfIs" column="third_up_half_is" />
|
|
|
+ <result property="thirdUpFees" column="third_up_fees" />
|
|
|
<result property="thirdLowHalfIs" column="third_low_half_is" />
|
|
|
+ <result property="thirdLowFees" column="third_low_fees" />
|
|
|
<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" />
|
|
|
+ <result property="quitApplyStatus" column="quit_apply_status" />
|
|
|
+ <result property="outApplyStatus" column="out_apply_status" />
|
|
|
+ <result property="bookApplyStatus" column="book_apply_status" />
|
|
|
</resultMap>
|
|
|
|
|
|
<resultMap id="allBaseInfo" type="StuBaseInfo" extends="StuBaseInfoResult">
|
|
@@ -72,11 +82,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</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.room_id, sbi.building_id,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
|
|
|
+ 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.room_id, sbi.building_id,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, first_low_fees, second_up_half_is, second_up_fees, second_low_half_is, second_low_fees, third_up_half_is, third_up_fees, third_low_half_is, third_low_fees, charge_times, sbi.create_by, sbi.create_time, sbi.update_by, sbi.update_time,sbi.quit_apply_status,sbi.out_apply_status,sbi.book_apply_status
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectStuBaseInfoList" parameterType="StuBaseInfo" resultMap="StuBaseInfoResult">
|
|
|
- <include refid="selectStuBaseInfoVo"/> from stu_base_info sbi
|
|
|
+ <include refid="selectStuBaseInfoVo"/>,r.room_name,r.building_name
|
|
|
+ FROM stu_base_info sbi
|
|
|
+ LEFT JOIN stu_room r ON sbi.room_id = r.id
|
|
|
+ <if test="userId != null and userId != ''">
|
|
|
+ LEFT JOIN stu_class c ON c.id=sbi.class_id
|
|
|
+ </if>
|
|
|
|
|
|
<where>
|
|
|
<if test="studentName != null and studentName != ''"> and student_name like concat('%', #{studentName}, '%')</if>
|
|
@@ -85,7 +100,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<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="userId != null and userId != ''"> and c.class_teacher_id = #{userId}</if>
|
|
|
<if test="studentStatus != null ">
|
|
|
<choose>
|
|
|
<when test="studentStatus==99 ">
|
|
@@ -133,7 +148,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<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
|
|
|
+ order by update_time desc,student_name asc
|
|
|
</select>
|
|
|
|
|
|
<select id="selectStuBaseInfoById" parameterType="Long" resultMap="allBaseInfo">
|
|
@@ -194,10 +209,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<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="firstLowFees != null">first_low_fees,</if>
|
|
|
<if test="secondUpHalfIs != null">second_up_half_is,</if>
|
|
|
+ <if test="secondUpFees != null">second_up_fees,</if>
|
|
|
<if test="secondLowHalfIs != null">second_low_half_is,</if>
|
|
|
+ <if test="secondLowFees != null">second_low_fees,</if>
|
|
|
<if test="thirdUpHalfIs != null">third_up_half_is,</if>
|
|
|
+ <if test="thirdUpFees != null">third_up_fees,</if>
|
|
|
<if test="thirdLowHalfIs != null">third_low_half_is,</if>
|
|
|
+ <if test="thirdLowFees != null">third_low_fees,</if>
|
|
|
<if test="chargeTimes != null">charge_times,</if>
|
|
|
<if test="createBy != null">create_by,</if>
|
|
|
<if test="createTime != null">create_time,</if>
|
|
@@ -250,10 +270,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="contactTeacher != null">#{contactTeacher},</if>
|
|
|
<if test="incidentalsBillSerial != null">#{incidentalsBillSerial},</if>
|
|
|
<if test="firstLowHalfIs != null">#{firstLowHalfIs},</if>
|
|
|
+ <if test="firstLowFees != null">#{firstLowFees},</if>
|
|
|
<if test="secondUpHalfIs != null">#{secondUpHalfIs},</if>
|
|
|
+ <if test="secondUpFees != null">#{secondUpFees},</if>
|
|
|
<if test="secondLowHalfIs != null">#{secondLowHalfIs},</if>
|
|
|
+ <if test="secondLowFees != null">#{secondLowFees},</if>
|
|
|
<if test="thirdUpHalfIs != null">#{thirdUpHalfIs},</if>
|
|
|
+ <if test="thirdUpFees != null">#{thirdUpFees},</if>
|
|
|
<if test="thirdLowHalfIs != null">#{thirdLowHalfIs},</if>
|
|
|
+ <if test="thirdLowFees != null">#{thirdLowFees},</if>
|
|
|
<if test="chargeTimes != null">#{chargeTimes},</if>
|
|
|
<if test="createBy != null">#{createBy},</if>
|
|
|
<if test="createTime != null">#{createTime},</if>
|
|
@@ -311,15 +336,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<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="firstLowFees != null">first_low_fees = #{firstLowFees},</if>
|
|
|
<if test="secondUpHalfIs != null">second_up_half_is = #{secondUpHalfIs},</if>
|
|
|
+ <if test="secondUpFees != null">second_up_fees = #{secondUpFees},</if>
|
|
|
<if test="secondLowHalfIs != null">second_low_half_is = #{secondLowHalfIs},</if>
|
|
|
+ <if test="secondLowFees != null">second_low_fees = #{secondLowFees},</if>
|
|
|
<if test="thirdUpHalfIs != null">third_up_half_is = #{thirdUpHalfIs},</if>
|
|
|
+ <if test="thirdUpFees != null">third_up_fees = #{thirdUpFees},</if>
|
|
|
<if test="thirdLowHalfIs != null">third_low_half_is = #{thirdLowHalfIs},</if>
|
|
|
+ <if test="thirdLowFees != null">third_low_fees = #{thirdLowFees},</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>
|
|
|
+ <if test="quitApplyStatus != null">quit_apply_status = #{quitApplyStatus},</if>
|
|
|
+ <if test="outApplyStatus != null">out_apply_status = #{outApplyStatus},</if>
|
|
|
+ <if test="bookApplyStatus != null">book_apply_status = #{bookApplyStatus},</if>
|
|
|
</trim>
|
|
|
where id = #{id}
|
|
|
</update>
|
|
@@ -373,15 +406,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<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="firstLowFees != null">first_low_fees = #{firstLowFees},</if>
|
|
|
<if test="secondUpHalfIs != null">second_up_half_is = #{secondUpHalfIs},</if>
|
|
|
+ <if test="secondUpFees != null">second_up_fees = #{secondUpFees},</if>
|
|
|
<if test="secondLowHalfIs != null">second_low_half_is = #{secondLowHalfIs},</if>
|
|
|
+ <if test="secondLowFees != null">second_low_fees = #{secondLowFees},</if>
|
|
|
<if test="thirdUpHalfIs != null">third_up_half_is = #{thirdUpHalfIs},</if>
|
|
|
+ <if test="thirdUpFees != null">third_up_fees = #{thirdUpFees},</if>
|
|
|
<if test="thirdLowHalfIs != null">third_low_half_is = #{thirdLowHalfIs},</if>
|
|
|
+ <if test="thirdLowFees != null">third_low_fees = #{thirdLowFees},</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>
|
|
|
+ <if test="quitApplyStatus != null">quit_apply_status = #{quitApplyStatus},</if>
|
|
|
+ <if test="outApplyStatus != null">out_apply_status = #{outApplyStatus},</if>
|
|
|
+ <if test="bookApplyStatus != null">book_apply_status = #{bookApplyStatus},</if>
|
|
|
</trim>
|
|
|
where id_card_number = #{idCardNumber}
|
|
|
</update>
|
|
@@ -401,7 +442,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<select id="selectStudentByIDNumber" parameterType="String" resultMap="StuBaseInfoResult">
|
|
|
<include refid="selectStuBaseInfoVo"/>
|
|
|
from stu_base_info sbi
|
|
|
- where id_card_number = #{idCardNumber}
|
|
|
+ where id_card_number = #{idCardNumber} and student_status not in(11,12)
|
|
|
</select>
|
|
|
|
|
|
|
|
@@ -440,4 +481,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
stu_base_info
|
|
|
</select>
|
|
|
|
|
|
+ <select id="selectStudentByRoomId" parameterType="Long" resultType="com.ruoyi.system.domain.vo.RoomStudentVo">
|
|
|
+ <![CDATA[SELECT id,student_name,student_number FROM stu_base_info WHERE room_id=#{roomId} AND student_status < 9]]>
|
|
|
+ </select>
|
|
|
+
|
|
|
+
|
|
|
</mapper>
|