|
|
@@ -1,21 +1,14 @@
|
|
|
package com.uas.main;
|
|
|
|
|
|
import java.io.File;
|
|
|
-import java.io.FileInputStream;
|
|
|
import java.sql.Connection;
|
|
|
import java.sql.SQLException;
|
|
|
-import java.sql.Statement;
|
|
|
-import java.text.SimpleDateFormat;
|
|
|
import java.util.*;
|
|
|
-
|
|
|
import com.uas.fileUtil.FileUtil;
|
|
|
import org.apache.commons.net.ftp.FTPClient;
|
|
|
-
|
|
|
import com.uas.util.BaseUtil;
|
|
|
import com.uas.util.FtpUtil;
|
|
|
import com.uas.util.JdbcUtil;
|
|
|
-import org.apache.http.entity.ContentType;
|
|
|
-import org.springframework.mock.web.MockMultipartFile;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
public class Download {
|
|
|
@@ -26,14 +19,14 @@ public class Download {
|
|
|
Map<String,Object> servMap = JdbcUtil.getFtpConfigs();
|
|
|
Set<String> set = servMap.keySet();
|
|
|
boolean bol = false;
|
|
|
- Connection consz ;
|
|
|
- Connection conhk ;
|
|
|
- Connection conzx ;
|
|
|
- Connection conza ;
|
|
|
for(String key:set){
|
|
|
if("12".equals(key)||"13".equals(key)){
|
|
|
Map<String,Object> ftpMap = (Map<String,Object>)servMap.get(key);
|
|
|
FTPClient client = null;
|
|
|
+ Connection consz = null ;
|
|
|
+ Connection conhk = null ;
|
|
|
+ Connection conzx = null ;
|
|
|
+ Connection conza = null ;
|
|
|
try {
|
|
|
client = FtpUtil.connect(ftpMap);
|
|
|
if(client!=null){
|
|
|
@@ -285,9 +278,7 @@ public class Download {
|
|
|
}else if("14".equals(key)){
|
|
|
Map<String,Object> ftpMap = (Map<String,Object>)servMap.get(key);
|
|
|
FTPClient client = null;
|
|
|
- Map<String, Object> map = null;
|
|
|
- Connection con = null;
|
|
|
- con = JdbcUtil.getConnectBySob("YHND_SZ");
|
|
|
+ Connection con = JdbcUtil.getConnectBySob("YHND_SZ");
|
|
|
try {
|
|
|
client = FtpUtil.connect(ftpMap);
|
|
|
if(client!=null){
|