gaodd 1 year ago
parent
commit
9ae869bee0

+ 12 - 4
src/main/java/com/chinaitop/depot/business/mapper/BusinessDrugUseapplyMapper.xml

@@ -561,10 +561,11 @@
561
   </resultMap>
561
   </resultMap>
562
 
562
 
563
   <select id="getApprovalList" resultMap="approvalResultMap" parameterType="java.util.Map" >
563
   <select id="getApprovalList" resultMap="approvalResultMap" parameterType="java.util.Map" >
564
-    select
564
+    <!-- select
565
     c.*
565
     c.*
566
     from
566
     from
567
-    (
567
+    ( -->
568
+    
568
     select
569
     select
569
     a.id id,
570
     a.id id,
570
     a.apply_number apply_number,
571
     a.apply_number apply_number,
@@ -592,6 +593,13 @@
592
       and a.state != 0
593
       and a.state != 0
593
       and a.apply_number = b.task_type_name
594
       and a.apply_number = b.task_type_name
594
       and b.task_type = 'drugUseApply'
595
       and b.task_type = 'drugUseApply'
596
+      AND b.id in (
597
+      select max(id) as id from business_approval where 1=1
598
+      <if test="operator != null">
599
+        AND b.operator = #{operator}
600
+      </if>
601
+      GROUP BY task_type_name
602
+      )
595
       <if test="operator != null">
603
       <if test="operator != null">
596
         and b.operator = #{operator}
604
         and b.operator = #{operator}
597
       </if>
605
       </if>
@@ -607,9 +615,9 @@
607
     </where>
615
     </where>
608
     order by
616
     order by
609
     b.create_time desc
617
     b.create_time desc
610
-    ) c
618
+    <!-- ) c
611
     GROUP BY
619
     GROUP BY
612
-    c.apply_number
620
+    c.apply_number -->
613
     <!--select
621
     <!--select
614
     *
622
     *
615
     from
623
     from