소스 검색

应付总账调整统计维度

liyuan 6 달 전
부모
커밋
48800d9b8f
1개의 변경된 파일16개의 추가작업 그리고 10개의 파일을 삭제
  1. 16 10
      blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/order/mapper/OrderMapper.xml

+ 16 - 10
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/order/mapper/OrderMapper.xml

@@ -435,15 +435,18 @@
         </if>
         <if test="order.type != null and order.type  == 0">
             and o.bs_type = 'XS'
+            GROUP BY
+            o.saler_id,
+            o.customer_id,
+            DATE_FORMAT(o.busines_date,'%Y-%m')
         </if>
         <if test="order.type != null and order.type  == 1">
             and o.bs_type = 'CG'
+            GROUP BY
+            o.customer_id,
+            DATE_FORMAT(o.busines_date,'%Y-%m')
         </if>
-        GROUP BY
-        o.saler_id,o.customer_id,
-            DATE_FORMAT(
-                o.busines_date,
-                '%Y-%m')
+
         ORDER BY o.saler_name,o.customer_name,
         DATE_FORMAT(
         o.busines_date,
@@ -498,15 +501,18 @@
         </if>
         <if test="order.type != null and order.type  == 0">
             and o.bs_type = 'XS'
+            GROUP BY
+            o.saler_id,
+            o.customer_id,
+            DATE_FORMAT(o.busines_date,'%Y-%m')
         </if>
         <if test="order.type != null and order.type  == 1">
             and o.bs_type = 'CG'
+            GROUP BY
+            o.customer_id,
+            DATE_FORMAT(o.busines_date,'%Y-%m')
         </if>
-        GROUP BY
-        o.saler_id,o.customer_id,
-        DATE_FORMAT(
-        o.busines_date,
-        '%Y-%m')
+
         ORDER BY o.saler_name,o.customer_name,
         DATE_FORMAT(
         o.busines_date,