Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
京
京能客户端
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王亚宁
京能客户端
Commits
4c7b25aa
Commit
4c7b25aa
authored
Oct 18, 2024
by
黄重
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
正式站分支提交代码
parent
0069d857
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
10 deletions
+38
-10
OBE-MANAGEMENT/src/com/gx/obe/management/webservice/UploadEvaluationResultAndFile.java
.../management/webservice/UploadEvaluationResultAndFile.java
+2
-0
com.gx.obe.common.file/src/com/gx/obe/common/file/download/DownloadFileUtill.java
...rc/com/gx/obe/common/file/download/DownloadFileUtill.java
+36
-10
No files found.
OBE-MANAGEMENT/src/com/gx/obe/management/webservice/UploadEvaluationResultAndFile.java
View file @
4c7b25aa
...
@@ -2049,6 +2049,8 @@ public class UploadEvaluationResultAndFile implements IUploadEvaluateResult{
...
@@ -2049,6 +2049,8 @@ public class UploadEvaluationResultAndFile implements IUploadEvaluateResult{
SupplierEvaluationStep
result
=
resultMap
.
get
(
supplier
.
getId
());
SupplierEvaluationStep
result
=
resultMap
.
get
(
supplier
.
getId
());
if
(
null
!=
result
)
{
if
(
null
!=
result
)
{
supplierElement
.
addElement
(
"result"
).
setText
(
result
.
getAccessment
().
equals
(
com
.
gx
.
obe
.
components
.
core
.
enumeration
.
EvaluationStepEnum
.
QUALIFIED
)
?
"符合"
:
"不符合"
);
supplierElement
.
addElement
(
"result"
).
setText
(
result
.
getAccessment
().
equals
(
com
.
gx
.
obe
.
components
.
core
.
enumeration
.
EvaluationStepEnum
.
QUALIFIED
)
?
"符合"
:
"不符合"
);
}
else
{
supplierElement
.
addElement
(
"result"
).
setText
(
""
);
}
}
}
}
}
}
...
...
com.gx.obe.common.file/src/com/gx/obe/common/file/download/DownloadFileUtill.java
View file @
4c7b25aa
package
com
.
gx
.
obe
.
common
.
file
.
download
;
package
com
.
gx
.
obe
.
common
.
file
.
download
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.concurrent.ExecutorService
;
import
java.util.concurrent.ExecutorService
;
import
org.apache.log4j.Logger
;
import
org.eclipse.swt.widgets.Display
;
import
org.eclipse.swt.widgets.Display
;
import
org.eclipse.swt.widgets.Shell
;
import
org.eclipse.swt.widgets.Shell
;
...
@@ -14,14 +16,16 @@ import com.gx.obe.common.file.download.infer.FileDownloadListener;
...
@@ -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.common.widget.dialog.ProgressDialog
;
import
com.gx.obe.components.core.Constants
;
import
com.gx.obe.components.core.Constants
;
import
com.gx.obe.http.util.Base64
;
import
com.gx.obe.http.util.Base64
;
import
com.gx.obe.util.utils.ObjectUtils
;
/**
/**
* @Description: 文件工具类
* @Description: 文件工具类
* @author mazc
* @author mazc
*/
*/
public
class
DownloadFileUtill
{
public
class
DownloadFileUtill
{
private
static
Logger
LOG
=
Logger
.
getLogger
(
DownloadFileUtill
.
class
);
private
SiteFileFetch
siteFileFetch
;
private
SiteFileFetch
siteFileFetch
;
private
static
final
Map
<
String
,
Boolean
>
fileDownLoadStatue
=
new
HashMap
<
String
,
Boolean
>();
private
boolean
pause
;
private
boolean
pause
;
/**
/**
...
@@ -134,10 +138,10 @@ public class DownloadFileUtill {
...
@@ -134,10 +138,10 @@ public class DownloadFileUtill {
public
static
boolean
startDownloadVideoFileSync
(
String
fileURL
,
String
fileName
,
String
filePath
,
String
message
)
{
public
static
boolean
startDownloadVideoFileSync
(
String
fileURL
,
String
fileName
,
String
filePath
,
String
message
)
{
final
ProgressDialog
synchShell
=
new
ProgressDialog
(
Display
.
getDefault
().
getActiveShell
(),
message
);
final
ProgressDialog
synchShell
=
new
ProgressDialog
(
Display
.
getDefault
().
getActiveShell
(),
message
);
DownloadReportFile
downloadReportFile
=
new
DownloadReportFile
()
{
DownloadReportFile
downloadReportFile
=
new
DownloadReportFile
()
{
private
boolean
d
ownloadFlag
;
private
boolean
fileD
ownloadFlag
;
public
void
complate
(
boolean
loginFlag
)
{
public
void
complate
(
boolean
loginFlag
)
{
this
.
d
ownloadFlag
=
loginFlag
;
this
.
fileD
ownloadFlag
=
loginFlag
;
Display
.
getDefault
().
syncExec
(
new
Runnable
()
{
Display
.
getDefault
().
syncExec
(
new
Runnable
()
{
public
void
run
()
{
public
void
run
()
{
synchShell
.
close
();
synchShell
.
close
();
...
@@ -146,7 +150,7 @@ public class DownloadFileUtill {
...
@@ -146,7 +150,7 @@ public class DownloadFileUtill {
}
}
public
boolean
isDownload
()
{
public
boolean
isDownload
()
{
return
d
ownloadFlag
;
return
fileD
ownloadFlag
;
}
}
};
};
new
DownloadFileUtill
(
fileURL
,
fileName
,
filePath
,
downloadReportFile
).
startDownloadFile
();
new
DownloadFileUtill
(
fileURL
,
fileName
,
filePath
,
downloadReportFile
).
startDownloadFile
();
...
@@ -165,12 +169,19 @@ public class DownloadFileUtill {
...
@@ -165,12 +169,19 @@ public class DownloadFileUtill {
* @param message
* @param message
*/
*/
public
static
boolean
startDownloadFileSync
(
String
fileURL
,
String
fileName
,
String
filePath
,
String
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
);
final
ProgressDialog
synchShell
=
new
ProgressDialog
(
null
!=
Display
.
getDefault
().
getActiveShell
()
?
Display
.
getDefault
().
getActiveShell
()
:
new
Shell
(),
message
);
DownloadReportFile
downloadReportFile
=
new
DownloadReportFile
()
{
DownloadReportFile
downloadReportFile
=
new
DownloadReportFile
()
{
private
boolean
downloadFlag
;
// private boolean downloadFlag1
;
public
void
complate
(
boolean
loginFlag
)
{
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
()
{
Display
.
getDefault
().
syncExec
(
new
Runnable
()
{
public
void
run
()
{
public
void
run
()
{
synchShell
.
close
();
synchShell
.
close
();
...
@@ -178,13 +189,28 @@ public class DownloadFileUtill {
...
@@ -178,13 +189,28 @@ public class DownloadFileUtill {
});
});
}
}
public
boolean
isDownload
()
{
// public boolean isDownload() {
return
downloadFlag
;
// if(downloadFlag1) {
}
// LOG.error("回调成功111,下载文件" + filePath + "成功");
// }else {
// LOG.error("回调成功111,下载文件" + filePath + "失败");
// }
// return downloadFlag1;
// }
};
};
new
DownloadFileUtill
(
fileURL
,
fileName
,
null
,
filePath
,
downloadReportFile
).
startDownloadFile
();
new
DownloadFileUtill
(
fileURL
,
fileName
,
null
,
filePath
,
downloadReportFile
).
startDownloadFile
();
synchShell
.
open
();
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
;
}
}
/**
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment