gaodd 1 jaar geleden
bovenliggende
commit
9ae869bee0
1 gewijzigde bestanden met toevoegingen van 12 en 4 verwijderingen
  1. 12 4
      src/main/java/com/chinaitop/depot/business/mapper/BusinessDrugUseapplyMapper.xml

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

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