|
@@ -4,40 +4,40 @@
|
|
|
|
|
|
|
|
<select id="pageList" resultType="com.template.model.vo.ApplicationProcedureVo">
|
|
<select id="pageList" resultType="com.template.model.vo.ApplicationProcedureVo">
|
|
|
SELECT
|
|
SELECT
|
|
|
- apu.id as id,
|
|
|
|
|
- apu.user_name as usersName,
|
|
|
|
|
- apu.start_time as startTime,
|
|
|
|
|
- apu.end_time as endTime,
|
|
|
|
|
- apu.department as department,
|
|
|
|
|
- apu.change_user_name as changeUsersName,
|
|
|
|
|
- apu.reason_application as reasonApplication,
|
|
|
|
|
- apu.submission_time as submissionTime,
|
|
|
|
|
- apu.`status` as status,
|
|
|
|
|
- apu.approver_user_name as approverUserName,
|
|
|
|
|
- apu.examine_and_approve_time as examineAndApproveTime,
|
|
|
|
|
- apu.examine_and_approve_remark as examineAndApproveRemark
|
|
|
|
|
|
|
+ apu.id as id,
|
|
|
|
|
+ apu.user_name as usersName,
|
|
|
|
|
+ apu.start_time as startTime,
|
|
|
|
|
+ apu.end_time as endTime,
|
|
|
|
|
+ apu.department as department,
|
|
|
|
|
+ apu.change_user_name as changeUsersName,
|
|
|
|
|
+ apu.reason_application as reasonApplication,
|
|
|
|
|
+ apu.submission_time as submissionTime,
|
|
|
|
|
+ apu.`status` as status,
|
|
|
|
|
+ apu.approver_user_name as approverUserName,
|
|
|
|
|
+ apu.examine_and_approve_time as examineAndApproveTime,
|
|
|
|
|
+ apu.examine_and_approve_remark as examineAndApproveRemark
|
|
|
FROM
|
|
FROM
|
|
|
- (
|
|
|
|
|
- SELECT
|
|
|
|
|
- ap.id,
|
|
|
|
|
- u.user_name AS user_name ,
|
|
|
|
|
- ap.start_time,
|
|
|
|
|
- ap.end_time,
|
|
|
|
|
- ap.department,
|
|
|
|
|
- u2.user_name as change_user_name,
|
|
|
|
|
- ap.reason_application,
|
|
|
|
|
- ap.submission_time,
|
|
|
|
|
- ap.`status`,
|
|
|
|
|
- u3.user_name as approver_user_name,
|
|
|
|
|
- ap.examine_and_approve_time,
|
|
|
|
|
- ap.examine_and_approve_remark
|
|
|
|
|
- FROM
|
|
|
|
|
- `application_procedure` ap
|
|
|
|
|
- LEFT JOIN users u ON ap.users_id = u.id
|
|
|
|
|
- LEFT JOIN users u2 ON ap.change_users_id = u2.id
|
|
|
|
|
- LEFT JOIN users u3 ON ap.approver_id = u3.id
|
|
|
|
|
- WHERE ap.deleted=0
|
|
|
|
|
- ) apu
|
|
|
|
|
|
|
+ (
|
|
|
|
|
+ SELECT
|
|
|
|
|
+ ap.id,
|
|
|
|
|
+ u.user_name AS user_name ,
|
|
|
|
|
+ ap.start_time,
|
|
|
|
|
+ ap.end_time,
|
|
|
|
|
+ ap.department,
|
|
|
|
|
+ u2.user_name as change_user_name,
|
|
|
|
|
+ ap.reason_application,
|
|
|
|
|
+ ap.submission_time,
|
|
|
|
|
+ ap.`status`,
|
|
|
|
|
+ u3.user_name as approver_user_name,
|
|
|
|
|
+ ap.examine_and_approve_time,
|
|
|
|
|
+ ap.examine_and_approve_remark
|
|
|
|
|
+ FROM
|
|
|
|
|
+ `application_procedure` ap
|
|
|
|
|
+ LEFT JOIN users u ON ap.users_id = u.id
|
|
|
|
|
+ LEFT JOIN users u2 ON ap.change_users_id = u2.id
|
|
|
|
|
+ LEFT JOIN users u3 ON ap.approver_id = u3.id
|
|
|
|
|
+ WHERE ap.deleted=0
|
|
|
|
|
+ ) apu
|
|
|
<where>
|
|
<where>
|
|
|
<if test="submissionStartTime != null and submissionStartTime != '' and submissionEndTime != null and submissionEndTime != '' ">
|
|
<if test="submissionStartTime != null and submissionStartTime != '' and submissionEndTime != null and submissionEndTime != '' ">
|
|
|
and apu.submission_time >= #{submissionStartTime} and #{submissionEndTime}>= apu.submission_time
|
|
and apu.submission_time >= #{submissionStartTime} and #{submissionEndTime}>= apu.submission_time
|
|
@@ -48,7 +48,8 @@
|
|
|
</if>
|
|
</if>
|
|
|
|
|
|
|
|
<if test="examineAndApproveStartTime != null and examineAndApproveStartTime != '' and examineAndApproveEndTime != null and examineAndApproveEndTime != '' ">
|
|
<if test="examineAndApproveStartTime != null and examineAndApproveStartTime != '' and examineAndApproveEndTime != null and examineAndApproveEndTime != '' ">
|
|
|
- and apu.examine_and_approve_time >= #{examineAndApproveStartTime} and #{examineAndApproveEndTime}>= apu.examine_and_approve_time
|
|
|
|
|
|
|
+ and apu.examine_and_approve_time >= #{examineAndApproveStartTime} and #{examineAndApproveEndTime}>=
|
|
|
|
|
+ apu.examine_and_approve_time
|
|
|
</if>
|
|
</if>
|
|
|
|
|
|
|
|
<if test="type != null and type != ''">
|
|
<if test="type != null and type != ''">
|
|
@@ -108,7 +109,8 @@
|
|
|
</if>
|
|
</if>
|
|
|
|
|
|
|
|
<if test="examineAndApproveStartTime != null and examineAndApproveStartTime != '' and examineAndApproveEndTime != null and examineAndApproveEndTime != '' ">
|
|
<if test="examineAndApproveStartTime != null and examineAndApproveStartTime != '' and examineAndApproveEndTime != null and examineAndApproveEndTime != '' ">
|
|
|
- and apu.examine_and_approve_time >= #{examineAndApproveStartTime} and #{examineAndApproveEndTime}>= apu.examine_and_approve_time
|
|
|
|
|
|
|
+ and apu.examine_and_approve_time >= #{examineAndApproveStartTime} and #{examineAndApproveEndTime}>=
|
|
|
|
|
+ apu.examine_and_approve_time
|
|
|
</if>
|
|
</if>
|
|
|
|
|
|
|
|
<!--<if test="type != null and type != ''">
|
|
<!--<if test="type != null and type != ''">
|
|
@@ -122,4 +124,41 @@
|
|
|
</where>
|
|
</where>
|
|
|
ORDER BY apu.submission_time
|
|
ORDER BY apu.submission_time
|
|
|
</select>
|
|
</select>
|
|
|
|
|
+ <select id="appletRecordPage" resultType="com.template.model.vo.ApplicationProcedureRecordVo">
|
|
|
|
|
+ SELECT
|
|
|
|
|
+ ap.id,
|
|
|
|
|
+ ap.users_id as usersId,
|
|
|
|
|
+ ap.start_time as startTime,
|
|
|
|
|
+ ap.end_time as endTime,
|
|
|
|
|
+ ap.department,
|
|
|
|
|
+ ap.change_users_id as changeUsersId,
|
|
|
|
|
+ ap.reason_application as reasonApplication,
|
|
|
|
|
+ ap.submission_time as submissionTime,
|
|
|
|
|
+ ap.status,
|
|
|
|
|
+ ap.approver_id as approverId,
|
|
|
|
|
+ ap.examine_and_approve_time as examineAndApproveTime,
|
|
|
|
|
+ ap.examine_and_approve_remark as examineAndApproveRemark,
|
|
|
|
|
+ ap.secondary_approver_id as secondaryApproverId,
|
|
|
|
|
+ ap.secondary_examine_and_approve_time as secondaryExamineAndApproveTime,
|
|
|
|
|
+ ap.secondary_examine_and_approve_remark as secondaryExamineAndApproveRemark,
|
|
|
|
|
+ u.user_name as changeUsersName,
|
|
|
|
|
+ a.name as approverName,
|
|
|
|
|
+ a2.name as secondaryApproverName
|
|
|
|
|
+ FROM
|
|
|
|
|
+ `application_procedure` ap
|
|
|
|
|
+ LEFT JOIN users u on u.id=ap.change_users_id
|
|
|
|
|
+ LEFT JOIN admin a on a.id=ap.approver_id
|
|
|
|
|
+ LEFT JOIN admin a2 on a2.id=ap.secondary_approver_id
|
|
|
|
|
+ where
|
|
|
|
|
+ ap.deleted=0
|
|
|
|
|
+ AND ap.users_id=#{userId}
|
|
|
|
|
+ <if test="startTime != null and startTime != '' and endTime != null and startTime != '' ">
|
|
|
|
|
+ AND ap.submission_time>=#{startTime} and #{endTime}>=ap.submission_time
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="status != null and status != ''">
|
|
|
|
|
+ AND ap.`status`=#{status}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ ORDER BY ap.submission_time DESC
|
|
|
|
|
+
|
|
|
|
|
+ </select>
|
|
|
</mapper>
|
|
</mapper>
|