|
|
@@ -525,20 +525,27 @@
|
|
|
|
|
|
|
|
|
<select id="listPublicRelease" resultType="com.goafanti.weChat.bo.OutPublicReleaseList">
|
|
|
- select a.id,b.nickname ,c.name aname,date_format(a.release_start,'%Y-%m-%d %H:%i:%S') releaseStarts,a.user_name userName,a.aid,
|
|
|
- date_format(a.release_end ,'%Y-%m-%d %H:%i:%S') releaseEnds,date_format(a.create_time ,'%Y-%m-%d %H:%i:%S') createTimes,a.status,
|
|
|
- a.latitude ,a.longitude ,a.clock_in clockIn,date_format(a.update_time ,'%Y-%m-%d %H:%i:%S') updateTimes,a.update_status updateStatus,
|
|
|
-a.assist,a.assist_aid assistAid,a.assist_aid_name assistAidName,a.type,a.main_name mainName,a.reject_name rejectName
|
|
|
- from public_release a left join `user` b on a.uid =b.id left join admin c on a.aid =c.id
|
|
|
+ select a.id,b.nickname ,c.name aname,date_format(a.release_start,'%Y-%m-%d %H:%i:%S') releaseStarts,a.user_name userName,a.aid,
|
|
|
+ date_format(a.release_end ,'%Y-%m-%d %H:%i:%S') releaseEnds,date_format(a.create_time ,'%Y-%m-%d %H:%i:%S') createTimes,a.status,
|
|
|
+ a.latitude ,a.longitude ,a.clock_in clockIn,date_format(a.update_time ,'%Y-%m-%d %H:%i:%S') updateTimes,a.update_status updateStatus,
|
|
|
+ a.assist,a.assist_aid assistAid,a.assist_aid_name assistAidName,a.type,a.main_name mainName,a.reject_name rejectName,
|
|
|
+ a.assistant_aid assistantAid ,a.assistant_name assistantName
|
|
|
+ from public_release a left join `user` b on a.uid =b.id left join admin c on a.aid =c.id
|
|
|
<if test="type==2">
|
|
|
left join department d on c.department_id =d.id
|
|
|
</if>
|
|
|
where 1=1
|
|
|
<if test="type==0">
|
|
|
- <if test="assist == 2">
|
|
|
- and a.assist =2
|
|
|
- </if>
|
|
|
- <if test="assist !=2 and assistType !=1">
|
|
|
+ <if test="assist == 2">
|
|
|
+ and a.assist =2
|
|
|
+ </if>
|
|
|
+ <if test="assist == 3">
|
|
|
+ and a.assist =3
|
|
|
+ </if>
|
|
|
+ <if test="assist ==4">
|
|
|
+ and a.assist in (2,3)
|
|
|
+ </if>
|
|
|
+ <if test="assist !=2 and assist !=3 and assist !=4 and assistType !=1">
|
|
|
and a.assist in(0,1)
|
|
|
</if>
|
|
|
<if test="assistType ==1">
|
|
|
@@ -557,7 +564,7 @@ a.assist,a.assist_aid assistAid,a.assist_aid_name assistAidName,a.type,a.main_na
|
|
|
and d.manager_id = #{aid}
|
|
|
</if>
|
|
|
<if test="type==3">
|
|
|
- and a.assist=2
|
|
|
+ and a.assist in (2,3)
|
|
|
<if test="aid !=null">
|
|
|
and a.aid= #{aid}
|
|
|
</if>
|
|
|
@@ -601,7 +608,13 @@ a.assist,a.assist_aid assistAid,a.assist_aid_name assistAidName,a.type,a.main_na
|
|
|
<if test="assist == 2">
|
|
|
and a.assist =2
|
|
|
</if>
|
|
|
- <if test="assist !=2 and assistType !=1">
|
|
|
+ <if test="assist == 3">
|
|
|
+ and a.assist =3
|
|
|
+ </if>
|
|
|
+ <if test="assist ==4">
|
|
|
+ and a.assist in (2,3)
|
|
|
+ </if>
|
|
|
+ <if test="assist !=2 and assist !=3 and assist !=4 and assistType !=1">
|
|
|
and a.assist in(0,1)
|
|
|
</if>
|
|
|
<if test="assistType ==1">
|