소스 검색

导出sql经销商id一致情况下处理

njs 2 년 전
부모
커밋
afb81ff9ea
1개의 변경된 파일4개의 추가작업 그리고 23개의 파일을 삭제
  1. 4 23
      suishenbang-order/src/main/resources/mapper/order/CustomersStartMapper.xml

+ 4 - 23
suishenbang-order/src/main/resources/mapper/order/CustomersStartMapper.xml

@@ -66,33 +66,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             ce.org_attestation_time authTime
         FROM
             customers_ext ce
-                LEFT JOIN (
-                SELECT
-                    company_code,
-                    company_name,
-                    saledept_code,
-                    saledept_name,
-                    office_code,
-                    office_name,
-                    suboffice_code,
-                    suboffice_name,
-                    customer_id,
-                    BUSINESS_UNIT,
-                    customer_name
-                FROM
-                    order_sales_sum_tuc_customer
-                WHERE
-                    company_code != ''
-                and office_code !=''
-                GROUP BY
-                    customer_id
-            ) mds ON ce.chains_code = mds.customer_id
+
+                LEFT JOIN order_sales_sum_tuc_customer mds on ce.chains_code=mds.customer_id
+
         WHERE
             ce.org_attestation_time IS NOT NULL
         GROUP BY
             ce.chains_code,mds.BUSINESS_UNIT
-        ORDER BY
-            mds.company_name DESC
+        ORDER BY mds.company_name DESC
     </select>
 
     <insert id="insertCustomersStart" parameterType="com.dgtly.order.domain.CustomersStart">