浏览代码

sql优化

zhouzeyu@c-top.com.cn 3 年之前
父节点
当前提交
c3dfafe1f1

+ 7 - 0
jeecg-boot-material-view/src/main/java/org/jeecg/ctop/material/mapper/xml/MaterialReportOverViewV3Mapper.xml

@@ -734,6 +734,10 @@
             <if test='innovative==1'>
                 and t.material_innovate=1
             </if>
+            <if test='materialType!=null'>
+                and t2.material_id is not null
+            </if>
+
             AND t1.company_id=#{companyId}
         </where>
         GROUP BY t1.signature
@@ -852,6 +856,9 @@
             <if test='innovative==1'>
                 and t.material_innovate=1
             </if>
+            <if test='materialType!=null'>
+                and t2.material_id is not null
+            </if>
             AND t1.company_id=#{companyId}
         </where>
         GROUP BY t1.signature