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