Selaa lähdekoodia

取非冻结经销商

njs 1 vuosi sitten
vanhempi
commit
642983e720

+ 2 - 2
suishenbang-sync/suishenbang-sync-common/src/main/java/com/dgtly/sync/service/HanaOrderComponent.java

@@ -400,13 +400,13 @@ public class HanaOrderComponent {
     /**HANA已冻结经销商**/
     public void hanaFreezeCustomer()throws Exception{
         Connection con = this.getHanaConnection();
-        PreparedStatement pstmt = con.prepareStatement(" SELECT   KUNNR \n" +
+        PreparedStatement pstmt = con.prepareStatement(" SELECT  DISTINCT KUNNR \n" +
                 "                FROM ERP.KNVV  \n" +
                 "                WHERE \n" +
                 "                 (SPART = (case   when  SPART='14' then '14' \n" +
                 "                 when SPART='15' then '15' \n" +
                 "                 else  '16' end )   and (LIFSD IS NULL or LIFSD = '')  AND VTWEG = 'D9'and VKORG = 'S200' and KVGR3 not in ('D03')) or (KVGR3 = 'D03'  and (LIFSD IS NULL or LIFSD = '') AND VTWEG = 'D9' ) \n" +
-                "         group by KUNNR order by SPART asc ");
+                "                 order by SPART asc ");
         Long startTime = System.currentTimeMillis();
         ResultSet rs = pstmt.executeQuery();
         Long endTime = System.currentTimeMillis();