Browse Source

销售统计报表 数据问题

liuchaohui 3 years ago
parent
commit
f7260461a7

+ 6 - 3
jeecg-boot-module-system/src/main/java/org/jeecg/modules/report/mapper/xml/SoSoDetailsMapper.xml

@@ -24,8 +24,9 @@
         left join Department de on ss.cDepCode=de.cDepCode
         left join Customer cc on ss.cCusCode = cc.cCusCode
         <where>
+            (ss.iStatus = 1 or ss.iStatus = 0 )
         <if test="map.startYearMonth!=null and map.startYearMonth!='' and map.endYearMonth!=null and map.endYearMonth!=''">
-             CONVERT ( CHAR ( 7 ), ssd.dPreDate, 120 ) <![CDATA[ >= ]]> #{map.startYearMonth}
+            AND CONVERT ( CHAR ( 7 ), ssd.dPreDate, 120 ) <![CDATA[ >= ]]> #{map.startYearMonth}
             AND CONVERT ( CHAR ( 7 ), ssd.dPreDate, 120 ) <![CDATA[ <= ]]> #{map.endYearMonth}
         </if>
         <if test="map.vendorType!=null and map.vendorType!='' and map.vendorType=='内部'">
@@ -66,8 +67,9 @@
         left join Department de on ss.cDepCode=de.cDepCode
         left join Customer cc on ss.cCusCode = cc.cCusCode
         <where>
+            (ss.iStatus = 1 or ss.iStatus = 0 )
         <if test="startYearMonth!=null and startYearMonth!='' and endYearMonth!=null and endYearMonth!=''">
-             CONVERT ( CHAR ( 7 ), ssd.dPreDate, 120 ) <![CDATA[ >= ]]> #{startYearMonth}
+            AND CONVERT ( CHAR ( 7 ), ssd.dPreDate, 120 ) <![CDATA[ >= ]]> #{startYearMonth}
             AND CONVERT ( CHAR ( 7 ), ssd.dPreDate, 120 ) <![CDATA[ <= ]]> #{endYearMonth}
         </if>
         <if test="vendorType!=null and vendorType!='' and vendorType=='内部'">
@@ -107,8 +109,9 @@
         left join Customer cc on ss.cCusCode = cc.cCusCode
         left join Department de on ss.cDepCode=de.cDepCode
         <where>
+            (ss.iStatus = 1 or ss.iStatus = 0 )
         <if test="startYearMonth!=null and startYearMonth!='' and endYearMonth!=null and endYearMonth!=''">
-             CONVERT ( CHAR ( 7 ), ssd.dPreDate, 120 ) <![CDATA[ >= ]]> #{startYearMonth}
+            AND CONVERT ( CHAR ( 7 ), ssd.dPreDate, 120 ) <![CDATA[ >= ]]> #{startYearMonth}
             AND CONVERT ( CHAR ( 7 ), ssd.dPreDate, 120 ) <![CDATA[ <= ]]> #{endYearMonth}
         </if>
         <if test="vendorType!=null and vendorType!='' and vendorType=='内部'">