Parcourir la source

协单审核修改

anderx il y a 1 an
Parent
commit
1ea2dbecec

+ 10 - 5
src/main/java/com/goafanti/common/mapper/PublicReleaseMapper.xml

@@ -676,9 +676,13 @@
             left join t_order_new ton on a.order_no =ton.order_no
             left join t_order_mid tom on a.order_no=tom.order_no
         </if>
-        <if test="type==1 or type==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
@@ -755,8 +759,8 @@
             <if test="status==2">and a.tech_start_process in (2) </if>
         </if>
         <if test="type==6">
-            and a.type=3 and a.assist=2
-            and apr.reviewer_id= #{aid} and apr.type=1
+            and a.type=0 and a.assist=1 and apr.type=1
+            and apr.reviewer_id= #{aid}
         </if>
         <if test="clockIn !=null">
             and a.clock_in =#{clockIn}
@@ -777,7 +781,7 @@
         </if>
     </sql>
     <select id="countPublicRelease" resultType="java.lang.Integer">
-        select  count(*)
+        select  count(DISTINCT a.id)
         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
@@ -787,7 +791,8 @@
             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 admin_public_reviewer apr on a.aid=apr.aid
+            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"/>