Commit 3e9f4cb97d4efcf75bc9b449f1dfa56db8117890
1 parent
9a3b3e74
运管处路单上传BUG修改
Showing
1 changed file
with
3 additions
and
37 deletions
src/main/java/com/bsth/service/impl/TrafficManageServiceImpl.java
| ... | ... | @@ -20,7 +20,6 @@ import com.bsth.service.traffic.YgcBasicDataService; |
| 20 | 20 | import com.bsth.util.TimeUtils; |
| 21 | 21 | import com.bsth.util.db.DBUtils_MS; |
| 22 | 22 | import com.bsth.webService.trafficManage.geotool.services.InternalPortType; |
| 23 | -import com.bsth.webService.trafficManage.geotool.services.Internal; | |
| 24 | 23 | import com.bsth.webService.trafficManage.org.tempuri.Results; |
| 25 | 24 | import com.bsth.webService.trafficManage.org.tempuri.WebServiceLocator; |
| 26 | 25 | import com.bsth.webService.trafficManage.org.tempuri.WebServiceSoap; |
| ... | ... | @@ -965,47 +964,14 @@ public class TrafficManageServiceImpl implements TrafficManageService{ |
| 965 | 964 | * 下载全量的公交基础数据 |
| 966 | 965 | */ |
| 967 | 966 | public String getDownLoadAllDataFile() { |
| 968 | - String result = "success"; | |
| 967 | + String result = "failure"; | |
| 969 | 968 | try { |
| 970 | - Runtime currRuntime = Runtime.getRuntime (); | |
| 971 | - | |
| 972 | - int nFreeMemory = ( int ) (currRuntime.freeMemory() / 1024 / 1024); | |
| 973 | - | |
| 974 | - int nTotalMemory = ( int ) (currRuntime.totalMemory() / 1024 / 1024); | |
| 975 | - | |
| 976 | - System.out.println("zzz:"+nFreeMemory + "M/" + nTotalMemory +"M(free/total)"); | |
| 977 | - portType = new Internal().getInternalHttpSoap11Endpoint(); | |
| 978 | - byte[] res = portType.downloadAllDataFile("down_pdgj", "down_pdgj123"); | |
| 979 | - String filePath = "E:\\ygc"; | |
| 980 | - BufferedOutputStream bos = null; | |
| 981 | - FileOutputStream fos = null; | |
| 982 | - File file = null; | |
| 983 | 969 | try { |
| 984 | - File dir = new File(filePath); | |
| 985 | - if(!dir.exists()&&dir.isDirectory()){//判断文件目录是否存在 | |
| 986 | - dir.mkdirs(); | |
| 970 | + if(ygcBasicDataService.download("admin","000000","abc.zip")){ | |
| 971 | + result = "success"; | |
| 987 | 972 | } |
| 988 | - file = new File(filePath+"\\abc.rar"); | |
| 989 | - fos = new FileOutputStream(file); | |
| 990 | - bos = new BufferedOutputStream(fos); | |
| 991 | - bos.write(res); | |
| 992 | 973 | } catch (Exception e) { |
| 993 | 974 | e.printStackTrace(); |
| 994 | - } finally { | |
| 995 | - if (bos != null) { | |
| 996 | - try { | |
| 997 | - bos.close(); | |
| 998 | - } catch (IOException e1) { | |
| 999 | - e1.printStackTrace(); | |
| 1000 | - } | |
| 1001 | - } | |
| 1002 | - if (fos != null) { | |
| 1003 | - try { | |
| 1004 | - fos.close(); | |
| 1005 | - } catch (IOException e1) { | |
| 1006 | - e1.printStackTrace(); | |
| 1007 | - } | |
| 1008 | - } | |
| 1009 | 975 | } |
| 1010 | 976 | } catch (Exception e) { |
| 1011 | 977 | e.printStackTrace(); | ... | ... |