|
@@ -3,18 +3,23 @@
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<mapper namespace="com.ruoyi.system.mapper.CourseChangeMapper">
|
|
<mapper namespace="com.ruoyi.system.mapper.CourseChangeMapper">
|
|
-
|
|
|
|
|
|
+
|
|
<resultMap type="CourseChange" id="CourseChangeResult">
|
|
<resultMap type="CourseChange" id="CourseChangeResult">
|
|
<result property="id" column="id" />
|
|
<result property="id" column="id" />
|
|
- <result property="schoolId" column="school_id" />
|
|
|
|
- <result property="schoolName" column="school_name" />
|
|
|
|
<result property="applyId" column="apply_id" />
|
|
<result property="applyId" column="apply_id" />
|
|
<result property="applyName" column="apply_name" />
|
|
<result property="applyName" column="apply_name" />
|
|
<result property="applyTime" column="apply_time" />
|
|
<result property="applyTime" column="apply_time" />
|
|
<result property="subjectClassId" column="subject_class_id" />
|
|
<result property="subjectClassId" column="subject_class_id" />
|
|
<result property="subjectClass" column="subject_class" />
|
|
<result property="subjectClass" column="subject_class" />
|
|
<result property="subject" column="subject" />
|
|
<result property="subject" column="subject" />
|
|
|
|
+ <result property="isNum" column="is_num" />
|
|
|
|
+ <result property="subjectTime" column="subject_time" />
|
|
|
|
+ <result property="subjectWeek" column="subject_week" />
|
|
|
|
+ <result property="bePersonnel" column="be_personnel" />
|
|
|
|
+ <result property="bePersonnelId" column="be_personnel_id" />
|
|
<result property="beSubject" column="be_subject" />
|
|
<result property="beSubject" column="be_subject" />
|
|
|
|
+ <result property="beIsNum" column="be_is_num" />
|
|
|
|
+ <result property="beSubjectTime" column="be_subject_time" />
|
|
<result property="week" column="week" />
|
|
<result property="week" column="week" />
|
|
<result property="isPass" column="is_pass" />
|
|
<result property="isPass" column="is_pass" />
|
|
<result property="content" column="content" />
|
|
<result property="content" column="content" />
|
|
@@ -26,29 +31,39 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<result property="auditId" column="audit_id" />
|
|
<result property="auditId" column="audit_id" />
|
|
<result property="auditUser" column="audit_user" />
|
|
<result property="auditUser" column="audit_user" />
|
|
<result property="opinion" column="opinion" />
|
|
<result property="opinion" column="opinion" />
|
|
|
|
+ <result property="schoolId" column="school_id" />
|
|
|
|
+ <result property="schoolName" column="school_name" />
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectCourseChangeVo">
|
|
<sql id="selectCourseChangeVo">
|
|
- select id, apply_id, apply_name, apply_time, subject_class_id, subject_class, subject, be_subject, week, is_pass, content, create_by, create_time, update_by, update_time, remark, audit_id, audit_user, opinion from course_change
|
|
|
|
|
|
+ select id, apply_id, apply_name, apply_time, subject_class_id, subject_class, subject, is_num, subject_time, subject_week, be_personnel, be_personnel_id, be_subject, be_is_num, be_subject_time, week, is_pass, content, create_by, create_time, update_by, update_time, remark, audit_id, audit_user, opinion, school_id, school_name from course_change
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
<select id="selectCourseChangeList" parameterType="CourseChange" resultMap="CourseChangeResult">
|
|
<select id="selectCourseChangeList" parameterType="CourseChange" resultMap="CourseChangeResult">
|
|
<include refid="selectCourseChangeVo"/>
|
|
<include refid="selectCourseChangeVo"/>
|
|
- <where>
|
|
|
|
- <if test="applyId != null "> and apply_id = #{applyId}</if>
|
|
|
|
- <if test="schoolName != null and schoolName != ''"> and school_name like concat('%', #{schoolName}, '%')</if>
|
|
|
|
|
|
+ <where>
|
|
|
|
+ <if test="applyId != null "> and (apply_id = #{applyId} or be_personnel_id = #{bePersonnelId} ) </if>
|
|
<if test="applyName != null and applyName != ''"> and apply_name like concat('%', #{applyName}, '%')</if>
|
|
<if test="applyName != null and applyName != ''"> and apply_name like concat('%', #{applyName}, '%')</if>
|
|
<if test="applyTime != null "> and apply_time = #{applyTime}</if>
|
|
<if test="applyTime != null "> and apply_time = #{applyTime}</if>
|
|
- <if test="subjectClassId != null "> and subject_class_id = #{subjectClassId}</if>
|
|
|
|
|
|
+ <if test="subjectClassId != null and subjectClassId != ''"> and subject_class_id = #{subjectClassId}</if>
|
|
<if test="subjectClass != null and subjectClass != ''"> and subject_class = #{subjectClass}</if>
|
|
<if test="subjectClass != null and subjectClass != ''"> and subject_class = #{subjectClass}</if>
|
|
<if test="subject != null and subject != ''"> and subject = #{subject}</if>
|
|
<if test="subject != null and subject != ''"> and subject = #{subject}</if>
|
|
|
|
+ <if test="isNum != null and isNum != ''"> and is_num = #{isNum}</if>
|
|
|
|
+ <if test="subjectTime != null "> and subject_time = #{subjectTime}</if>
|
|
|
|
+ <if test="subjectWeek != null and subjectWeek != ''"> and subject_week = #{subjectWeek}</if>
|
|
|
|
+ <if test="bePersonnel != null and bePersonnel != ''"> and be_personnel = #{bePersonnel}</if>
|
|
|
|
+<!-- <if test="bePersonnelId != null and bePersonnelId != ''"> and be_personnel_id = #{bePersonnelId}</if>-->
|
|
<if test="beSubject != null and beSubject != ''"> and be_subject = #{beSubject}</if>
|
|
<if test="beSubject != null and beSubject != ''"> and be_subject = #{beSubject}</if>
|
|
|
|
+ <if test="beIsNum != null and beIsNum != ''"> and be_is_num = #{beIsNum}</if>
|
|
|
|
+ <if test="beSubjectTime != null "> and be_subject_time = #{beSubjectTime}</if>
|
|
<if test="week != null and week != ''"> and week = #{week}</if>
|
|
<if test="week != null and week != ''"> and week = #{week}</if>
|
|
<if test="isPass != null and isPass != ''"> and is_pass = #{isPass}</if>
|
|
<if test="isPass != null and isPass != ''"> and is_pass = #{isPass}</if>
|
|
<if test="content != null and content != ''"> and content = #{content}</if>
|
|
<if test="content != null and content != ''"> and content = #{content}</if>
|
|
<if test="auditId != null "> and audit_id = #{auditId}</if>
|
|
<if test="auditId != null "> and audit_id = #{auditId}</if>
|
|
<if test="auditUser != null and auditUser != ''"> and audit_user = #{auditUser}</if>
|
|
<if test="auditUser != null and auditUser != ''"> and audit_user = #{auditUser}</if>
|
|
<if test="opinion != null and opinion != ''"> and opinion = #{opinion}</if>
|
|
<if test="opinion != null and opinion != ''"> and opinion = #{opinion}</if>
|
|
|
|
+ <if test="schoolId != null and schoolId != ''"> and school_id = #{schoolId}</if>
|
|
|
|
+ <if test="schoolName != null and schoolName != ''"> and school_name like concat('%', #{schoolName}, '%')</if>
|
|
<if test="subjectClassIds != null and subjectClassIds.size()>0">
|
|
<if test="subjectClassIds != null and subjectClassIds.size()>0">
|
|
and subject_class_id in
|
|
and subject_class_id in
|
|
<foreach collection="subjectClassIds" index="index" item="item" open="(" separator="," close=")">
|
|
<foreach collection="subjectClassIds" index="index" item="item" open="(" separator="," close=")">
|
|
@@ -72,19 +87,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
and school_id = #{deptId}
|
|
and school_id = #{deptId}
|
|
</if>
|
|
</if>
|
|
</select>
|
|
</select>
|
|
|
|
+ <select id="selectCourseChangeListByEdit" resultMap="CourseChangeResult">
|
|
|
|
+ <include refid="selectCourseChangeVo"/>
|
|
|
|
+ where subject_class_id = #{classId}
|
|
|
|
+ and ((date_format(subject_time,'%y%m%d') >= date_format(#{fist},'%y%m%d') and date_format(subject_time,'%y%m%d') <= date_format(#{five},'%y%m%d'))
|
|
|
|
+ or (date_format(be_subject_time,'%y%m%d') >= date_format(#{fist},'%y%m%d') and date_format(be_subject_time,'%y%m%d') <= date_format(#{five},'%y%m%d')))
|
|
|
|
+ </select>
|
|
|
|
|
|
<insert id="insertCourseChange" parameterType="CourseChange" useGeneratedKeys="true" keyProperty="id">
|
|
<insert id="insertCourseChange" parameterType="CourseChange" useGeneratedKeys="true" keyProperty="id">
|
|
insert into course_change
|
|
insert into course_change
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
- <if test="schoolId != null">school_id,</if>
|
|
|
|
- <if test="schoolName != null">school_name,</if>
|
|
|
|
<if test="applyId != null">apply_id,</if>
|
|
<if test="applyId != null">apply_id,</if>
|
|
<if test="applyName != null">apply_name,</if>
|
|
<if test="applyName != null">apply_name,</if>
|
|
<if test="applyTime != null">apply_time,</if>
|
|
<if test="applyTime != null">apply_time,</if>
|
|
<if test="subjectClassId != null">subject_class_id,</if>
|
|
<if test="subjectClassId != null">subject_class_id,</if>
|
|
<if test="subjectClass != null">subject_class,</if>
|
|
<if test="subjectClass != null">subject_class,</if>
|
|
<if test="subject != null">subject,</if>
|
|
<if test="subject != null">subject,</if>
|
|
|
|
+ <if test="isNum != null">is_num,</if>
|
|
|
|
+ <if test="subjectTime != null">subject_time,</if>
|
|
|
|
+ <if test="subjectWeek != null">subject_week,</if>
|
|
|
|
+ <if test="bePersonnel != null">be_personnel,</if>
|
|
|
|
+ <if test="bePersonnelId != null">be_personnel_id,</if>
|
|
<if test="beSubject != null">be_subject,</if>
|
|
<if test="beSubject != null">be_subject,</if>
|
|
|
|
+ <if test="beIsNum != null">be_is_num,</if>
|
|
|
|
+ <if test="beSubjectTime != null">be_subject_time,</if>
|
|
<if test="week != null">week,</if>
|
|
<if test="week != null">week,</if>
|
|
<if test="isPass != null">is_pass,</if>
|
|
<if test="isPass != null">is_pass,</if>
|
|
<if test="content != null">content,</if>
|
|
<if test="content != null">content,</if>
|
|
@@ -96,17 +122,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="auditId != null">audit_id,</if>
|
|
<if test="auditId != null">audit_id,</if>
|
|
<if test="auditUser != null">audit_user,</if>
|
|
<if test="auditUser != null">audit_user,</if>
|
|
<if test="opinion != null">opinion,</if>
|
|
<if test="opinion != null">opinion,</if>
|
|
- </trim>
|
|
|
|
|
|
+ <if test="schoolId != null">school_id,</if>
|
|
|
|
+ <if test="schoolName != null">school_name,</if>
|
|
|
|
+ </trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
- <if test="schoolId != null">#{schoolId},</if>
|
|
|
|
- <if test="schoolName != null">#{schoolName},</if>
|
|
|
|
<if test="applyId != null">#{applyId},</if>
|
|
<if test="applyId != null">#{applyId},</if>
|
|
<if test="applyName != null">#{applyName},</if>
|
|
<if test="applyName != null">#{applyName},</if>
|
|
<if test="applyTime != null">#{applyTime},</if>
|
|
<if test="applyTime != null">#{applyTime},</if>
|
|
<if test="subjectClassId != null">#{subjectClassId},</if>
|
|
<if test="subjectClassId != null">#{subjectClassId},</if>
|
|
<if test="subjectClass != null">#{subjectClass},</if>
|
|
<if test="subjectClass != null">#{subjectClass},</if>
|
|
<if test="subject != null">#{subject},</if>
|
|
<if test="subject != null">#{subject},</if>
|
|
|
|
+ <if test="isNum != null">#{isNum},</if>
|
|
|
|
+ <if test="subjectTime != null">#{subjectTime},</if>
|
|
|
|
+ <if test="subjectWeek != null">#{subjectWeek},</if>
|
|
|
|
+ <if test="bePersonnel != null">#{bePersonnel},</if>
|
|
|
|
+ <if test="bePersonnelId != null">#{bePersonnelId},</if>
|
|
<if test="beSubject != null">#{beSubject},</if>
|
|
<if test="beSubject != null">#{beSubject},</if>
|
|
|
|
+ <if test="beIsNum != null">#{beIsNum},</if>
|
|
|
|
+ <if test="beSubjectTime != null">#{beSubjectTime},</if>
|
|
<if test="week != null">#{week},</if>
|
|
<if test="week != null">#{week},</if>
|
|
<if test="isPass != null">#{isPass},</if>
|
|
<if test="isPass != null">#{isPass},</if>
|
|
<if test="content != null">#{content},</if>
|
|
<if test="content != null">#{content},</if>
|
|
@@ -118,21 +151,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="auditId != null">#{auditId},</if>
|
|
<if test="auditId != null">#{auditId},</if>
|
|
<if test="auditUser != null">#{auditUser},</if>
|
|
<if test="auditUser != null">#{auditUser},</if>
|
|
<if test="opinion != null">#{opinion},</if>
|
|
<if test="opinion != null">#{opinion},</if>
|
|
- </trim>
|
|
|
|
|
|
+ <if test="schoolId != null">#{schoolId},</if>
|
|
|
|
+ <if test="schoolName != null">#{schoolName},</if>
|
|
|
|
+ </trim>
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
<update id="updateCourseChange" parameterType="CourseChange">
|
|
<update id="updateCourseChange" parameterType="CourseChange">
|
|
update course_change
|
|
update course_change
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
- <if test="schoolId != null">school_id = #{schoolId},</if>
|
|
|
|
- <if test="schoolName != null">school_name = #{schoolName},</if>
|
|
|
|
<if test="applyId != null">apply_id = #{applyId},</if>
|
|
<if test="applyId != null">apply_id = #{applyId},</if>
|
|
<if test="applyName != null">apply_name = #{applyName},</if>
|
|
<if test="applyName != null">apply_name = #{applyName},</if>
|
|
<if test="applyTime != null">apply_time = #{applyTime},</if>
|
|
<if test="applyTime != null">apply_time = #{applyTime},</if>
|
|
<if test="subjectClassId != null">subject_class_id = #{subjectClassId},</if>
|
|
<if test="subjectClassId != null">subject_class_id = #{subjectClassId},</if>
|
|
<if test="subjectClass != null">subject_class = #{subjectClass},</if>
|
|
<if test="subjectClass != null">subject_class = #{subjectClass},</if>
|
|
<if test="subject != null">subject = #{subject},</if>
|
|
<if test="subject != null">subject = #{subject},</if>
|
|
|
|
+ <if test="isNum != null">is_num = #{isNum},</if>
|
|
|
|
+ <if test="subjectTime != null">subject_time = #{subjectTime},</if>
|
|
|
|
+ <if test="subjectWeek != null">subject_week = #{subjectWeek},</if>
|
|
|
|
+ <if test="bePersonnel != null">be_personnel = #{bePersonnel},</if>
|
|
|
|
+ <if test="bePersonnelId != null">be_personnel_id = #{bePersonnelId},</if>
|
|
<if test="beSubject != null">be_subject = #{beSubject},</if>
|
|
<if test="beSubject != null">be_subject = #{beSubject},</if>
|
|
|
|
+ <if test="beIsNum != null">be_is_num = #{beIsNum},</if>
|
|
|
|
+ <if test="beSubjectTime != null">be_subject_time = #{beSubjectTime},</if>
|
|
<if test="week != null">week = #{week},</if>
|
|
<if test="week != null">week = #{week},</if>
|
|
<if test="isPass != null">is_pass = #{isPass},</if>
|
|
<if test="isPass != null">is_pass = #{isPass},</if>
|
|
<if test="content != null">content = #{content},</if>
|
|
<if test="content != null">content = #{content},</if>
|
|
@@ -144,6 +184,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="auditId != null">audit_id = #{auditId},</if>
|
|
<if test="auditId != null">audit_id = #{auditId},</if>
|
|
<if test="auditUser != null">audit_user = #{auditUser},</if>
|
|
<if test="auditUser != null">audit_user = #{auditUser},</if>
|
|
<if test="opinion != null">opinion = #{opinion},</if>
|
|
<if test="opinion != null">opinion = #{opinion},</if>
|
|
|
|
+ <if test="schoolId != null">school_id = #{schoolId},</if>
|
|
|
|
+ <if test="schoolName != null">school_name = #{schoolName},</if>
|
|
</trim>
|
|
</trim>
|
|
where id = #{id}
|
|
where id = #{id}
|
|
</update>
|
|
</update>
|