Commit 4c7b25aa authored by 黄重's avatar 黄重

正式站分支提交代码

parent 0069d857
......@@ -2049,6 +2049,8 @@ public class UploadEvaluationResultAndFile implements IUploadEvaluateResult{
SupplierEvaluationStep result = resultMap.get(supplier.getId());
if(null != result) {
supplierElement.addElement("result").setText(result.getAccessment().equals(com.gx.obe.components.core.enumeration.EvaluationStepEnum.QUALIFIED) ? "符合":"不符合");
}else {
supplierElement.addElement("result").setText("");
}
}
}
......
package com.gx.obe.common.file.download;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ExecutorService;
import org.apache.log4j.Logger;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
......@@ -14,14 +16,16 @@ import com.gx.obe.common.file.download.infer.FileDownloadListener;
import com.gx.obe.common.widget.dialog.ProgressDialog;
import com.gx.obe.components.core.Constants;
import com.gx.obe.http.util.Base64;
import com.gx.obe.util.utils.ObjectUtils;
/**
* @Description: 文件工具类
* @author mazc
*/
public class DownloadFileUtill {
private static Logger LOG = Logger.getLogger(DownloadFileUtill.class);
private SiteFileFetch siteFileFetch;
private static final Map<String, Boolean> fileDownLoadStatue = new HashMap<String, Boolean>();
private boolean pause;
/**
......@@ -134,10 +138,10 @@ public class DownloadFileUtill {
public static boolean startDownloadVideoFileSync(String fileURL, String fileName, String filePath, String message) {
final ProgressDialog synchShell = new ProgressDialog(Display.getDefault().getActiveShell(), message);
DownloadReportFile downloadReportFile = new DownloadReportFile() {
private boolean downloadFlag;
private boolean fileDownloadFlag;
public void complate(boolean loginFlag) {
this.downloadFlag = loginFlag;
this.fileDownloadFlag = loginFlag;
Display.getDefault().syncExec(new Runnable() {
public void run() {
synchShell.close();
......@@ -146,7 +150,7 @@ public class DownloadFileUtill {
}
public boolean isDownload() {
return downloadFlag;
return fileDownloadFlag;
}
};
new DownloadFileUtill(fileURL, fileName, filePath, downloadReportFile).startDownloadFile();
......@@ -165,12 +169,19 @@ public class DownloadFileUtill {
* @param message
*/
public static boolean startDownloadFileSync(String fileURL, String fileName, String filePath, String message) {
final ProgressDialog synchShell = new ProgressDialog(null != Display.getDefault().getActiveShell() ? Display.getDefault().getActiveShell() : new Shell(), message);
DownloadReportFile downloadReportFile = new DownloadReportFile() {
private boolean downloadFlag;
// private boolean downloadFlag1;
public void complate(boolean loginFlag) {
this.downloadFlag = loginFlag;
if(loginFlag) {
LOG.error("回调成功,下载文件" + filePath + "成功");
}else {
LOG.error("回调成功,下载文件" + filePath + "失败");
}
fileDownLoadStatue.put(filePath, loginFlag);
// this.downloadFlag1 = loginFlag;
Display.getDefault().syncExec(new Runnable() {
public void run() {
synchShell.close();
......@@ -178,13 +189,28 @@ public class DownloadFileUtill {
});
}
public boolean isDownload() {
return downloadFlag;
}
// public boolean isDownload() {
// if(downloadFlag1) {
// LOG.error("回调成功111,下载文件" + filePath + "成功");
// }else {
// LOG.error("回调成功111,下载文件" + filePath + "失败");
// }
// return downloadFlag1;
// }
};
new DownloadFileUtill(fileURL, fileName, null, filePath, downloadReportFile).startDownloadFile();
synchShell.open();
return downloadReportFile.isDownload();
// if(nu) {
//
// }
boolean flag = ObjectUtils.getObjBoolean(fileDownLoadStatue.get(filePath));
// boolean flag = downloadReportFile.isDownload();
if(flag) {
LOG.error("接口信息:下载文件" + filePath + "成功");
}else {
LOG.error("接口信息:下载文件" + filePath + "失败");
}
return flag;
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment