|
|
@@ -168,7 +168,7 @@ public class HanaOrderComponent {
|
|
|
" A.KVGR4, "+
|
|
|
" A.POSID, "+
|
|
|
" A.PD_NO, "+
|
|
|
- " A.BSTKD,"+
|
|
|
+ " REPLACE(A.BSTKD, '$', '') as BSTKD, "+
|
|
|
" A.NETPR, "+
|
|
|
" A.NTGEW_MARA,"+
|
|
|
" A.PSTYV,"+
|
|
|
@@ -356,8 +356,7 @@ public class HanaOrderComponent {
|
|
|
}
|
|
|
}*/
|
|
|
|
|
|
- //C类
|
|
|
- private int createTmabcTxt(ResultSet result) throws Exception {
|
|
|
+ private int createDeliverSignatureTxt(ResultSet result) throws Exception {
|
|
|
File file = null;
|
|
|
FileWriter fw = null;
|
|
|
Connection conn = null;
|
|
|
@@ -367,19 +366,18 @@ public class HanaOrderComponent {
|
|
|
long i =0;
|
|
|
|
|
|
//创建IO需求的条件,并声明输出路径
|
|
|
- file = new File((Global.getTemdataPath()+"erpOrderByC/"));
|
|
|
- log.info("erpOrderByC数据缓存路径:" + Global.getTemdataPath()+"erpOrderByC/");
|
|
|
+ file = new File((Global.getTemdataPath()+"deliverSignature/"));
|
|
|
+ log.info("deliverSignature数据缓存路径:" + Global.getTemdataPath()+"deliverSignature/");
|
|
|
if(!file.exists()){
|
|
|
file.mkdir();
|
|
|
}
|
|
|
|
|
|
- file = new File(Global.getTemdataPath()+"erpOrderByC/"+j+".txt");
|
|
|
+ file = new File(Global.getTemdataPath()+"deliverSignature/"+j+".txt");
|
|
|
if(!file.exists()){
|
|
|
file.createNewFile();
|
|
|
}else {
|
|
|
//取得这个目录下的所有子文件对象
|
|
|
- File[] files = new File(Global.getTemdataPath()+"erpOrderByC/").listFiles();
|
|
|
- //遍历该目录下的文件对象
|
|
|
+ File[] files = new File(Global.getTemdataPath()+"deliverSignature/").listFiles();
|
|
|
|
|
|
for (File f: files){
|
|
|
f.delete();
|
|
|
@@ -392,18 +390,31 @@ public class HanaOrderComponent {
|
|
|
while (result.next()){
|
|
|
|
|
|
fw.write(
|
|
|
- result.getString("MAABC")
|
|
|
- +"$$"+ result.getString("SPRAS")
|
|
|
- +"$$"+ result.getString("TMABC")
|
|
|
+ result.getString("VBELN")
|
|
|
+ +"$$"+ result.getString("POSNR")
|
|
|
+ +"$$"+ result.getString("MATNR")
|
|
|
+ +"$$"+ result.getString("VGBEL")
|
|
|
+ +"$$"+ result.getString("VGPOS")
|
|
|
+ +"$$"+ result.getString("ERDAT_SO")
|
|
|
+ +"$$"+ result.getString("LFIMG")
|
|
|
+ +"$$"+ result.getString("MODIFIEDVALUE")
|
|
|
+ +"$$"+ result.getString("LFIMG_CY")
|
|
|
+ +"$$"+ result.getString("ZDATE_KH")
|
|
|
+ +"$$"+ result.getString("ZTIME_KH")
|
|
|
+ +"$$"+ result.getString("ZVBELN_YCHH")
|
|
|
+ +"$$"+ result.getString("ZSTATUS_HH")
|
|
|
+ +"$$"+ result.getString("CONTRACTID")
|
|
|
+ +"$$"+ result.getString("BIZNO")
|
|
|
+"$$"+ result.getString("MANDT")
|
|
|
+ "\r\n");
|
|
|
|
|
|
+
|
|
|
fw.flush();
|
|
|
i++;
|
|
|
if (i%50000==0){
|
|
|
j++;
|
|
|
//创建IO需求的条件,并声明输出路径
|
|
|
- file = new File(Global.getTemdataPath()+"erpOrderByC/"+j+".txt");
|
|
|
+ file = new File(Global.getTemdataPath()+"deliverSignature/"+j+".txt");
|
|
|
if(!file.exists()){
|
|
|
file.createNewFile();
|
|
|
}else {
|
|
|
@@ -415,8 +426,7 @@ public class HanaOrderComponent {
|
|
|
}
|
|
|
}
|
|
|
Long endTime = System.currentTimeMillis();
|
|
|
- log.info("生成erpOrderByC-TXT用时:" + (endTime - startTime) + "毫秒");
|
|
|
-
|
|
|
+ log.info("生成deliverSignature-TXT用时:" + (endTime - startTime) + "毫秒");
|
|
|
|
|
|
}catch (Exception e){
|
|
|
e.printStackTrace();
|
|
|
@@ -442,9 +452,9 @@ public class HanaOrderComponent {
|
|
|
return j;
|
|
|
}
|
|
|
|
|
|
-//电子单签收
|
|
|
|
|
|
- private int createDeliverSignatureTxt(ResultSet result) throws Exception {
|
|
|
+ //C类
|
|
|
+ private int createTmabcTxt(ResultSet result) throws Exception {
|
|
|
File file = null;
|
|
|
FileWriter fw = null;
|
|
|
Connection conn = null;
|
|
|
@@ -454,18 +464,19 @@ public class HanaOrderComponent {
|
|
|
long i =0;
|
|
|
|
|
|
//创建IO需求的条件,并声明输出路径
|
|
|
- file = new File((Global.getTemdataPath()+"deliverSignature/"));
|
|
|
- log.info("deliverSignature数据缓存路径:" + Global.getTemdataPath()+"deliverSignature/");
|
|
|
+ file = new File((Global.getTemdataPath()+"erpOrderByC/"));
|
|
|
+ log.info("erpOrderByC数据缓存路径:" + Global.getTemdataPath()+"erpOrderByC/");
|
|
|
if(!file.exists()){
|
|
|
file.mkdir();
|
|
|
}
|
|
|
|
|
|
- file = new File(Global.getTemdataPath()+"deliverSignature/"+j+".txt");
|
|
|
+ file = new File(Global.getTemdataPath()+"erpOrderByC/"+j+".txt");
|
|
|
if(!file.exists()){
|
|
|
file.createNewFile();
|
|
|
}else {
|
|
|
//取得这个目录下的所有子文件对象
|
|
|
- File[] files = new File(Global.getTemdataPath()+"deliverSignature/").listFiles();
|
|
|
+ File[] files = new File(Global.getTemdataPath()+"erpOrderByC/").listFiles();
|
|
|
+ //遍历该目录下的文件对象
|
|
|
|
|
|
for (File f: files){
|
|
|
f.delete();
|
|
|
@@ -478,31 +489,18 @@ public class HanaOrderComponent {
|
|
|
while (result.next()){
|
|
|
|
|
|
fw.write(
|
|
|
- result.getString("VBELN")
|
|
|
- +"$$"+ result.getString("POSNR")
|
|
|
- +"$$"+ result.getString("MATNR")
|
|
|
- +"$$"+ result.getString("VGBEL")
|
|
|
- +"$$"+ result.getString("VGPOS")
|
|
|
- +"$$"+ result.getString("ERDAT_SO")
|
|
|
- +"$$"+ result.getString("LFIMG")
|
|
|
- +"$$"+ result.getString("MODIFIEDVALUE")
|
|
|
- +"$$"+ result.getString("LFIMG_CY")
|
|
|
- +"$$"+ result.getString("ZDATE_KH")
|
|
|
- +"$$"+ result.getString("ZTIME_KH")
|
|
|
- +"$$"+ result.getString("ZVBELN_YCHH")
|
|
|
- +"$$"+ result.getString("ZSTATUS_HH")
|
|
|
- +"$$"+ result.getString("CONTRACTID")
|
|
|
- +"$$"+ result.getString("BIZNO")
|
|
|
+ result.getString("MAABC")
|
|
|
+ +"$$"+ result.getString("SPRAS")
|
|
|
+ +"$$"+ result.getString("TMABC")
|
|
|
+"$$"+ result.getString("MANDT")
|
|
|
+ "\r\n");
|
|
|
|
|
|
-
|
|
|
fw.flush();
|
|
|
i++;
|
|
|
if (i%50000==0){
|
|
|
j++;
|
|
|
//创建IO需求的条件,并声明输出路径
|
|
|
- file = new File(Global.getTemdataPath()+"deliverSignature/"+j+".txt");
|
|
|
+ file = new File(Global.getTemdataPath()+"erpOrderByC/"+j+".txt");
|
|
|
if(!file.exists()){
|
|
|
file.createNewFile();
|
|
|
}else {
|
|
|
@@ -514,7 +512,8 @@ public class HanaOrderComponent {
|
|
|
}
|
|
|
}
|
|
|
Long endTime = System.currentTimeMillis();
|
|
|
- log.info("生成deliverSignature-TXT用时:" + (endTime - startTime) + "毫秒");
|
|
|
+ log.info("生成erpOrderByC-TXT用时:" + (endTime - startTime) + "毫秒");
|
|
|
+
|
|
|
|
|
|
}catch (Exception e){
|
|
|
e.printStackTrace();
|