|
@@ -21,6 +21,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="photo" column="photo" />
|
|
|
<result property="deptId" column="dept_id" />
|
|
|
<result property="deptName" column="dept_name" />
|
|
|
+ <result property="initiatorId" column="initiator_id" />
|
|
|
+ <result property="initiatorName" column="initiator_name" />
|
|
|
<result property="absenteeName" column="absentee_name" />
|
|
|
<result property="examinersId" column="examiners_id" />
|
|
|
<result property="examinersName" column="examiners_name" />
|
|
@@ -30,12 +32,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectBusinessTripVo">
|
|
|
- select id, type,transportation,departure_place,destination, start_time, end_time,duration, reason, photo, dept_id, dept_name, absentee_name, examiners_id, examiners_name, is_pass, reject, submit_time from business_trip
|
|
|
+ select id, type,transportation,departure_place,destination, start_time, end_time,duration, reason, photo, dept_id, dept_name,initiator_id,initiator_name, absentee_name, examiners_id, examiners_name, is_pass, reject, submit_time from business_trip
|
|
|
</sql>
|
|
|
|
|
|
<sql id="selectBusinessTripLbVo">
|
|
|
select t.id, t.type,t.transportation,t.departure_place,t.destination, t.start_time, t.end_time,t.duration, t.reason, t.photo, t.dept_id,
|
|
|
- t.dept_name, t.absentee_name, t.examiners_id, t.examiners_name, t.is_pass, t.reject, t.submit_time from business_trip t
|
|
|
+ t.dept_name,t.initiator_id,t.initiator_name, t.absentee_name, t.examiners_id, t.examiners_name, t.is_pass, t.reject, t.submit_time from business_trip t
|
|
|
left join business_user u on t.id = u.business_id
|
|
|
</sql>
|
|
|
|
|
@@ -52,6 +54,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="photo != null and photo != ''"> and photo = #{photo}</if>
|
|
|
<if test="deptId != null "> and dept_id = #{deptId}</if>
|
|
|
<if test="deptName != null and deptName != ''"> and dept_name like concat('%', #{deptName}, '%')</if>
|
|
|
+ <if test="initiatorId != null "> and initiator_id = #{initiatorId}</if>
|
|
|
+ <if test="initiatorName != null and initiatorName != ''"> and initiator_name like concat('%', #{initiatorName}, '%')</if>
|
|
|
<if test="absenteeName != null and absenteeName != ''"> and absentee_name like concat('%', #{absenteeName}, '%')</if>
|
|
|
<if test="examinersId != null "> and examiners_id = #{examinersId}</if>
|
|
|
<if test="examinersName != null and examinersName != ''"> and examiners_name like concat('%', #{examinersName}, '%')</if>
|
|
@@ -70,16 +74,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="transportation != null and transportation != ''"> and t.transportation = #{transportation}</if>
|
|
|
<if test="departurePlace != null and departurePlace != ''"> and t.departure_place like concat('%', #{departurePlace}, '%')</if>
|
|
|
<if test="destination != null and destination != ''"> and t.destination like concat('%', #{destination}, '%')</if>
|
|
|
- <if test="startTime != null "> and t.start_time = #{startTime}</if>
|
|
|
- <if test="endTime != null "> and t.end_time = #{endTime}</if>
|
|
|
<if test="reason != null and reason != ''"> and t.reason = #{reason}</if>
|
|
|
<if test="deptId != null "> and t.dept_id = #{deptId}</if>
|
|
|
<if test="deptName != null and deptName != ''"> and t.dept_name like concat('%', #{deptName}, '%')</if>
|
|
|
+ <if test="initiatorId != null "> and initiator_id = #{initiatorId}</if>
|
|
|
+ <if test="initiatorName != null and initiatorName != ''"> and initiator_name like concat('%', #{initiatorName}, '%')</if>
|
|
|
<if test="absenteeName != null and absenteeName != ''"> and t.absentee_name like concat('%', #{absenteeName}, '%')</if>
|
|
|
<if test="examinersId != null "> and t.examiners_id = #{examinersId}</if>
|
|
|
<if test="examinersName != null and examinersName != ''"> and t.examiners_name like concat('%', #{examinersName}, '%')</if>
|
|
|
<if test="isPass != null and isPass != ''"> and t.is_pass = #{isPass}</if>
|
|
|
<if test="submitTime != null "> and t.submit_time = #{submitTime}</if>
|
|
|
+ <if test="startTime != null and startTime != ''">
|
|
|
+ AND start_time >= #{startTime}
|
|
|
+ </if>
|
|
|
+ <if test="endTime != null and endTime != ''">
|
|
|
+ AND end_time <= #{endTime}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
order by t.is_pass, t.submit_time desc
|
|
|
</select>
|
|
@@ -103,6 +113,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="photo != null">photo,</if>
|
|
|
<if test="deptId != null">dept_id,</if>
|
|
|
<if test="deptName != null">dept_name,</if>
|
|
|
+ <if test="initiatorId != null "> initiator_id ,</if>
|
|
|
+ <if test="initiatorName != null"> initiator_name ,</if>
|
|
|
<if test="absenteeName != null">absentee_name,</if>
|
|
|
<if test="examinersId != null">examiners_id,</if>
|
|
|
<if test="examinersName != null">examiners_name,</if>
|
|
@@ -122,6 +134,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="photo != null">#{photo},</if>
|
|
|
<if test="deptId != null">#{deptId},</if>
|
|
|
<if test="deptName != null">#{deptName},</if>
|
|
|
+ <if test="initiatorId != null "> #{initiatorId},</if>
|
|
|
+ <if test="initiatorName != null "> #{initiatorName}, </if>
|
|
|
<if test="absenteeName != null">#{absenteeName},</if>
|
|
|
<if test="examinersId != null">#{examinersId},</if>
|
|
|
<if test="examinersName != null">#{examinersName},</if>
|
|
@@ -145,6 +159,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="photo != null">photo = #{photo},</if>
|
|
|
<if test="deptId != null">dept_id = #{deptId},</if>
|
|
|
<if test="deptName != null">dept_name = #{deptName},</if>
|
|
|
+ <if test="initiatorId != null "> initiator_id = #{initiatorId},</if>
|
|
|
+ <if test="initiatorName != null "> initiator_name= #{initiatorName},</if>
|
|
|
<if test="absenteeName != null">absentee_name = #{absenteeName},</if>
|
|
|
<if test="examinersId != null">examiners_id = #{examinersId},</if>
|
|
|
<if test="examinersName != null">examiners_name = #{examinersName},</if>
|