|
|
@@ -215,4 +215,76 @@
|
|
|
ap.deleted=0
|
|
|
and ap.id=#{id}
|
|
|
</select>
|
|
|
+
|
|
|
+ <select id="appletList" resultType="com.template.model.vo.ApplicationProcedureVo">
|
|
|
+ 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
|
|
|
+ <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>
|
|
|
+
|
|
|
+ <select id="appletParentList" resultType="com.template.model.vo.ApplicationProcedureVo">
|
|
|
+ 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
|
|
|
+ <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 FIND_IN_SET(ap.status,#{type})
|
|
|
+ </if>
|
|
|
+ ORDER BY ap.submission_time DESC
|
|
|
+ </select>
|
|
|
</mapper>
|