|
@@ -400,7 +400,18 @@ public class HanaOrderComponent {
|
|
|
/**HANA已冻结经销商**/
|
|
|
public void hanaFreezeCustomer()throws Exception{
|
|
|
Connection con = this.getHanaConnection();
|
|
|
- PreparedStatement pstmt = con.prepareStatement("SELECT DISTINCT KUNNR,VTWEG FROM ERP.KNVV WHERE LIFSD IS NOT NULL AND LIFSD != '' and VTWEG ='D9' ");
|
|
|
+ PreparedStatement pstmt = con.prepareStatement("SELECT DISTINCT KUNNR,VTWEG FROM ERP.KNVV WHERE KVGR3 = 'D03' and (LIFSD IS NULL or LIFSD = '') AND VTWEG = 'D9' union all SELECT DISTINCT\n" +
|
|
|
+ "\tKUNNR,\n" +
|
|
|
+ "\tVTWEG \n" +
|
|
|
+ "FROM\n" +
|
|
|
+ "\tERP.KNVV \n" +
|
|
|
+ "WHERE\n" +
|
|
|
+ "\tSPART=(case when SPART='14' then '14'\n" +
|
|
|
+ "\twhen SPART='15' then '15'\n" +
|
|
|
+ "\telse '16' end ) and KVGR3 != 'D03'\n" +
|
|
|
+ "\tand (LIFSD IS NULL or LIFSD = '') \n" +
|
|
|
+ "\tAND VTWEG = 'D9'\n" +
|
|
|
+ "\tand VKORG = 'S200' order by SPART asc ");
|
|
|
Long startTime = System.currentTimeMillis();
|
|
|
ResultSet rs = pstmt.executeQuery();
|
|
|
Long endTime = System.currentTimeMillis();
|
|
@@ -1033,10 +1044,10 @@ public class HanaOrderComponent {
|
|
|
try {
|
|
|
conn = getMysqlConnection();
|
|
|
//生产表
|
|
|
- String sql = "TRUNCATE TABLE meta_hana_freeze_customer";
|
|
|
+ String sql = "TRUNCATE TABLE meta_hana_not_freeze_customer";
|
|
|
pstm = conn.prepareStatement(sql);
|
|
|
pstm.execute();
|
|
|
- String testSql = "LOAD DATA LOCAL INFILE 'testIO.txt' into table meta_hana_freeze_customer fields terminated by '$$' lines terminated by '\\n'";
|
|
|
+ String testSql = "LOAD DATA LOCAL INFILE 'testIO.txt' into table meta_hana_not_freeze_customer fields terminated by '$$' lines terminated by '\\n'";
|
|
|
long beginTime=System.currentTimeMillis();
|
|
|
int rows=this.bulkLoadFromInputStream(testSql, mergeGetStream(new File((Global.getTemdataPath()+"freezeCustomer/"))));
|
|
|
long endTime=System.currentTimeMillis();
|