|
@@ -111,8 +111,8 @@
|
|
|
<select id="noAbsentSearch" parameterType="hashmap" resultType="java.util.HashMap">
|
|
|
<![CDATA[
|
|
|
select a.person_id,
|
|
|
- (SELECT b.sign_time FROM business_meeting_person_recode b WHERE b.person_id = a.person_id and b.sign_type='0' and meetingInfo_id = #{searchParams.meetingId}) as startTime,
|
|
|
- (SELECT b.sign_time FROM business_meeting_person_recode b WHERE b.person_id = a.person_id and b.sign_type='1' and meetingInfo_id = #{searchParams.meetingId}) as endTime
|
|
|
+ (SELECT b.sign_time FROM business_meeting_person_recode b WHERE b.person_id = a.person_id and b.sign_type='0' and meetingInfo_id = #{searchParams.meetingId} limit 1) as startTime,
|
|
|
+ (SELECT b.sign_time FROM business_meeting_person_recode b WHERE b.person_id = a.person_id and b.sign_type='1' and meetingInfo_id = #{searchParams.meetingId} limit 1) as endTime
|
|
|
FROM business_meeting_person_recode a
|
|
|
]]>
|
|
|
<where>
|
|
@@ -129,8 +129,8 @@
|
|
|
<select id="realToSearch" parameterType="hashmap" resultType="java.util.HashMap">
|
|
|
<![CDATA[
|
|
|
select a.person_id,
|
|
|
- (SELECT b.sign_time FROM business_meeting_person_recode b WHERE b.person_id = a.person_id and b.sign_type='0' and meetingInfo_id = #{searchParams.meetingId}) as startTime,
|
|
|
- (SELECT b.sign_time FROM business_meeting_person_recode b WHERE b.person_id = a.person_id and b.sign_type='1' and meetingInfo_id = #{searchParams.meetingId}) as endTime
|
|
|
+ (SELECT b.sign_time FROM business_meeting_person_recode b WHERE b.person_id = a.person_id and b.sign_type='0' and meetingInfo_id = #{searchParams.meetingId} limit 1) as startTime,
|
|
|
+ (SELECT b.sign_time FROM business_meeting_person_recode b WHERE b.person_id = a.person_id and b.sign_type='1' and meetingInfo_id = #{searchParams.meetingId} limit 1) as endTime
|
|
|
FROM business_meeting_person_recode a
|
|
|
]]>
|
|
|
<where>
|
|
@@ -138,7 +138,7 @@
|
|
|
and meetingInfo_id = #{searchParams.meetingId}
|
|
|
</if>
|
|
|
<![CDATA[
|
|
|
- and (SELECT b.sign_time FROM business_meeting_person_recode b WHERE b.person_id = a.person_id and meetingInfo_id = #{searchParams.meetingId}) is not null
|
|
|
+ and (SELECT b.sign_time FROM business_meeting_person_recode b WHERE b.person_id = a.person_id and meetingInfo_id = #{searchParams.meetingId} limit 1) is not null
|
|
|
]]>
|
|
|
</where>
|
|
|
GROUP BY a.person_id
|
|
@@ -152,8 +152,8 @@
|
|
|
<select id="lateSearch" parameterType="hashmap" resultType="java.util.HashMap">
|
|
|
<![CDATA[
|
|
|
select a.person_id,
|
|
|
- (SELECT b.sign_time FROM business_meeting_person_recode b WHERE b.person_id = a.person_id and b.sign_type='0' and meetingInfo_id = #{searchParams.meetingId}) as startTime,
|
|
|
- (SELECT b.sign_time FROM business_meeting_person_recode b WHERE b.person_id = a.person_id and b.sign_type='1' and meetingInfo_id = #{searchParams.meetingId}) as endTime
|
|
|
+ (SELECT b.sign_time FROM business_meeting_person_recode b WHERE b.person_id = a.person_id and b.sign_type='0' and meetingInfo_id = #{searchParams.meetingId} limit 1) as startTime,
|
|
|
+ (SELECT b.sign_time FROM business_meeting_person_recode b WHERE b.person_id = a.person_id and b.sign_type='1' and meetingInfo_id = #{searchParams.meetingId} limit 1) as endTime
|
|
|
FROM business_meeting_person_recode a
|
|
|
]]>
|
|
|
<where>
|
|
@@ -161,7 +161,7 @@
|
|
|
and meetingInfo_id = #{searchParams.meetingId}
|
|
|
</if>
|
|
|
<![CDATA[
|
|
|
- and (SELECT b.sign_time FROM business_meeting_person_recode b WHERE b.person_id = a.person_id and b.sign_type='2' and meetingInfo_id = #{searchParams.meetingId}) is not null
|
|
|
+ and (SELECT b.sign_time FROM business_meeting_person_recode b WHERE b.person_id = a.person_id and b.sign_type='2' and meetingInfo_id = #{searchParams.meetingId} limit 1) is not null
|
|
|
]]>
|
|
|
</where>
|
|
|
GROUP BY a.person_id
|
|
@@ -173,8 +173,8 @@
|
|
|
<select id="leaveEarlySearch" parameterType="hashmap" resultType="java.util.HashMap">
|
|
|
<![CDATA[
|
|
|
select a.person_id,
|
|
|
- (SELECT b.sign_time FROM business_meeting_person_recode b WHERE b.person_id = a.person_id and b.sign_type='0' and meetingInfo_id = #{searchParams.meetingId}) as startTime,
|
|
|
- (SELECT b.sign_time FROM business_meeting_person_recode b WHERE b.person_id = a.person_id and b.sign_type='1' and meetingInfo_id = #{searchParams.meetingId}) as endTime
|
|
|
+ (SELECT b.sign_time FROM business_meeting_person_recode b WHERE b.person_id = a.person_id and b.sign_type='0' and meetingInfo_id = #{searchParams.meetingId} limit 1) as startTime,
|
|
|
+ (SELECT b.sign_time FROM business_meeting_person_recode b WHERE b.person_id = a.person_id and b.sign_type='1' and meetingInfo_id = #{searchParams.meetingId} limit 1) as endTime
|
|
|
FROM business_meeting_person_recode a
|
|
|
]]>
|
|
|
<where>
|
|
@@ -182,8 +182,8 @@
|
|
|
and meetingInfo_id = #{searchParams.meetingId}
|
|
|
</if>
|
|
|
<![CDATA[
|
|
|
- and (SELECT b.sign_time FROM business_meeting_person_recode b WHERE b.person_id = a.person_id and b.sign_type='0' and meetingInfo_id = #{searchParams.meetingId}) is not null
|
|
|
- and (SELECT b.sign_time FROM business_meeting_person_recode b WHERE b.person_id = a.person_id and b.sign_type='1' and meetingInfo_id = #{searchParams.meetingId}) is null
|
|
|
+ and (SELECT b.sign_time FROM business_meeting_person_recode b WHERE b.person_id = a.person_id and b.sign_type='0' and meetingInfo_id = #{searchParams.meetingId} limit 1) is not null
|
|
|
+ and (SELECT b.sign_time FROM business_meeting_person_recode b WHERE b.person_id = a.person_id and b.sign_type='1' and meetingInfo_id = #{searchParams.meetingId} limit 1) is null
|
|
|
]]>
|
|
|
</where>
|
|
|
GROUP BY a.person_id
|