Sfoglia il codice sorgente

新增公出营销员和技术他人公出列表审核中显示BUG修复

anderx 1 anno fa
parent
commit
fd6a1949a5

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

@@ -375,8 +375,11 @@
         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,
-        ea.total_amount expenseAmount ,a.clock_in clockIn,c2.name reviewerName,a.tech_start_process techStartProcess,
-        ad.name userAdminName
+        ea.total_amount expenseAmount ,a.clock_in clockIn,c2.name reviewerName,
+        <if test="type==4 or type==5">
+        ad.name userAdminName,
+        </if>
+        a.tech_start_process techStartProcess
         from public_release a  left join admin c on a.aid =c.id
         left join admin c2 on c.reviewer=c2.id
         left join expense_account ea ON a.id = ea.prid AND ea.status IN (0, 1, 2, 3)
@@ -449,12 +452,14 @@
         <if test="type==4">
             and a.assist in(0,1)
             and e.aid = #{aid}
+            and a.status=1
             <if test="status==null">and a.public_type in (1,2) </if>
             <if test="status==1">and a.public_type in (1) </if>
             <if test="status==2">and a.public_type in (2) </if>
         </if>
         <if test="type==5">
-            and ton.salesman_id =#{aid}
+            and e.aid =#{aid}
+            and a.status=1
             <if test="status==null">and a.tech_start_process in (1,2) </if>
             <if test="status==1">and a.tech_start_process in (1) </if>
             <if test="status==2">and a.tech_start_process in (2) </if>
@@ -486,12 +491,9 @@
         <if test="type==2">
             left join department d on c.department_id =d.id
         </if>
-        <if test="type==4 or userName !=null">
+        <if test="type==4 or type==5 or  userName !=null">
             left join public_release_details b on a.id=b.prid
-            left join user e on b.uid=e.id
-        </if>
-        <if test="type==5">
-            left join t_order_new ton on a.order_no =ton.order_no
+            left join user e on b.uid=e.id  left join admin ad on e.aid=ad.id
         </if>
         where 1=1
         <include refid="listPublicReleaseSql"/>