|
|
@@ -656,13 +656,12 @@
|
|
|
|
|
|
|
|
|
<select id="listPublicRelease" resultType="com.goafanti.weChat.bo.OutPublicReleaseList">
|
|
|
- select a.id ,c.name aname,date_format(a.release_start,'%Y-%m-%d %H:%i:%S') releaseStarts,a.aid,a.public_type publicType,
|
|
|
+ select a.id ,c.name aname,date_format(a.release_start,'%Y-%m-%d %H:%i:%S') releaseStarts,a.aid,a.public_type publicType,
|
|
|
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,
|
|
|
date_format(a.update_time ,'%Y-%m-%d %H:%i:%S') updateTimes,a.update_status updateStatus,a.district_name districtName,
|
|
|
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,a.public_again publicAgain,a.user_names userNames,
|
|
|
- a.clock_in clockIn,a.assist_process assistProcess,
|
|
|
- a.tech_start_process techStartProcess
|
|
|
+ a.clock_in clockIn,a.assist_process assistProcess,a.tech_start_process techStartProcess
|
|
|
from public_release a left join admin c on a.aid =c.id
|
|
|
left join expense_account ea ON a.id = ea.prid AND ea.status IN (0, 1, 2, 3)
|
|
|
<if test="type==2">
|
|
|
@@ -679,10 +678,6 @@
|
|
|
<if test="type==1">
|
|
|
left join admin_public_reviewer apr on a.aid=apr.aid
|
|
|
</if>
|
|
|
- <if test="type==6">
|
|
|
- left join public_release pr on pr.main_id =a.id
|
|
|
- left join admin_public_reviewer apr on pr.aid=apr.aid
|
|
|
- </if>
|
|
|
where 1=1
|
|
|
<include refid="listPublicReleaseSql"/>
|
|
|
ORDER BY (case when a.status=1 then 1 when a.status=2 then 2 when a.status=3 then 5
|
|
|
@@ -759,8 +754,12 @@
|
|
|
<if test="status==2">and a.tech_start_process in (2) </if>
|
|
|
</if>
|
|
|
<if test="type==6">
|
|
|
- and a.type=0 and a.assist=1 and apr.type=1
|
|
|
- and apr.reviewer_id= #{aid}
|
|
|
+ and a.type=0 and a.assist=1
|
|
|
+ and a.id in (select pr.main_id
|
|
|
+ from public_release pr left join admin_public_reviewer apr on
|
|
|
+ pr.aid = apr.aid
|
|
|
+ where pr.`type` =3 and apr.type = 1
|
|
|
+ and apr.reviewer_id = #{aid})
|
|
|
</if>
|
|
|
<if test="clockIn !=null">
|
|
|
and a.clock_in =#{clockIn}
|
|
|
@@ -781,7 +780,7 @@
|
|
|
</if>
|
|
|
</sql>
|
|
|
<select id="countPublicRelease" resultType="java.lang.Integer">
|
|
|
- select count(DISTINCT a.id)
|
|
|
+ select count(*)
|
|
|
from public_release a left join admin c on a.aid =c.id
|
|
|
<if test="type==2">
|
|
|
left join department d on c.department_id =d.id
|
|
|
@@ -790,9 +789,8 @@
|
|
|
left join public_release_details b on a.id=b.prid
|
|
|
left join user e on b.uid=e.id left join admin ad on e.aid=ad.id
|
|
|
</if>
|
|
|
- <if test="type==1 or type==6">
|
|
|
- left join public_release pr on pr.main_id =a.id
|
|
|
- left join admin_public_reviewer apr on pr.aid=apr.aid
|
|
|
+ <if test="type==1">
|
|
|
+ left join admin_public_reviewer apr on a.aid=apr.aid
|
|
|
</if>
|
|
|
where 1=1
|
|
|
<include refid="listPublicReleaseSql"/>
|