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
5896c0ef
Commit
5896c0ef
authored
Sep 03, 2024
by
liangyb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#20240903 ai查重结构调整,整合到专家评标界面
parent
b28a56cc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2234 additions
and
2292 deletions
+2234
-2292
BID-EVALUATION-STEP/src/com/gx/obe/evaluation/step/composite/AiEvalLeftButton.java
...om/gx/obe/evaluation/step/composite/AiEvalLeftButton.java
+76
-51
BID-EVALUATION-STEP/src/com/gx/obe/evaluation/step/composite/FactorEvaluationComposite.java
.../evaluation/step/composite/FactorEvaluationComposite.java
+2155
-2239
BID-EVALUATION/src/com/gx/obe/evaluation/composite/MyEvaluationStepComposite.java
...x/obe/evaluation/composite/MyEvaluationStepComposite.java
+3
-2
No files found.
BID-EVALUATION-STEP/src/com/gx/obe/evaluation/step/composite/AiEvalLeftButton.java
View file @
5896c0ef
...
...
@@ -35,57 +35,63 @@ import com.gx.obe.config.utils.PropertiesUtils;
import
com.gx.obe.evaluation.step.shell.ShowAiProcessShell
;
import
com.gx.obe.util.utils.ObjectUtils
;
import
com.gx.obe.util.utils.RuntimeUtils
;
import
com.gx.obe.util.utils.StringUtil
;
import
com.gx.obe.util.utils.StringUtils
;
import
com.gx.obe.web.entity.tender.TenderProjectEntity
;
import
com.swtdesigner.ResourceManager
;
import
com.swtdesigner.SWTResourceManager
;
/**
* AI查重
* @author lyb
* @version 2024-09-02 14:45:00
*
*/
public
class
AiEvalLeftButton
extends
ImageButton
{
private
TenderProjectEntity
curTender
;
// private ShowAiProcessShell menuTipShell;
private
MouseListener
listener
;
private
ShowAiProcessShell
showAiProcessShell
;
private
String
name
;
private
File
downLoadPath
;
public
static
Color
BG
=
ColorConstants
.
SKIN_BG
;
private
static
final
String
title
=
"标书正在下载中... 请勿离开该页面"
;
private
static
final
String
todo
=
" 已耗时:"
;
//过渡弹窗,如果需要的话就放开
// private static final String title = "标书正在下载中... 请勿离开该页面";
// private static final String todo = " 已耗时:";
private
static
final
ReentrantLock
lock
=
new
ReentrantLock
();
private
static
volatile
Future
<
Boolean
>
future
=
null
;
/**
* AI查重
* @param parent 父级控件
* @param style 界面布局
* @param curTender 项目信息
*/
public
AiEvalLeftButton
(
Composite
parent
,
int
style
,
TenderProjectEntity
curTender
)
{
super
(
parent
,
SWT
.
CENTER
|
SWT
.
NONE
);
this
.
setTopMargin
(
3
);
this
.
setBottomMargin
(
3
);
this
.
setLeftMargin
(
5
);
this
.
setRightMargin
(
5
);
this
.
setImage
(
ResourceManager
.
getPluginImage
(
IconsActivator
.
PLUGIN_ID
,
"icons/evaluaton_step/default.png"
));
this
.
curTender
=
curTender
;
// button.setCursor(SWTResourceManager.getCursor(SWT.CURSOR_HAND));
// button.setSurroundColor(SWTResourceManager.getColor(60, 138, 226));
this
.
setFont
(
SWTResourceManager
.
getFont
(
"微软雅黑"
,
10
,
SWT
.
NORMAL
));
this
.
setForeground
(
SWTResourceManager
.
getColor
(
SWT
.
COLOR_WHITE
));
// this.setBorderColor(SWTResourceManager.getColor(SWT.COLOR_WHITE));
this
.
setActiveBgColor
(
BG
);
this
.
setActiveBgColor
(
SWTResourceManager
.
getColor
(
255
,
153
,
0
));
// this.setActiveSurroundColor(SWTResourceManager.getColor(255, 153, 0));
this
.
setActiveForeground
(
SWTResourceManager
.
getColor
(
SWT
.
COLOR_WHITE
));
// this.setActiveSurroundColor(SWTResourceManager.getColor(SWT.COLOR_WHITE));
this
.
setSelectionBgColor
(
ColorConstants
.
SKIN_SELECTION_BG
);
// this.setSelectionBorderColor(SWTResourceManager.getColor(255, 153, 0));
this
.
setArcWidth
(
6
);
// button.setText(Messages.Button_reduce);
// button.setSurroundMargin(2);
// button.setFillSurround(false);
//渲染图形化界面
render
();
init
();
}
public
AiEvalLeftButton
(
Composite
parent
,
int
style
,
TenderProjectEntity
curTender
,
String
name
)
{
super
(
parent
,
SWT
.
CENTER
|
SWT
.
NONE
);
this
.
curTender
=
curTender
;
this
.
name
=
name
;
//渲染图形化界面
render
();
init
();
}
/**
* AI文件下载
*/
public
void
init
(){
addMouseTrackListener
(
new
MouseTrackAdapter
()
{
@Override
public
void
mouseEnter
(
MouseEvent
e
)
{
HttpUrl
httpUrl
=
HttpUtils
.
getProjectHttpUrl
(
curTender
,
PropertiesUtils
.
getWebserviceProperty
(
WebserviceConstants
.
GET_AI_RESULT_METHOD
,
"bidOpeningHS.do?downloadOpenBidSupplierAiResult"
));
...
...
@@ -104,36 +110,23 @@ public class AiEvalLeftButton extends ImageButton{
return
;
}
downloadBiddingFile
(
httpResponse
);
// showAiProcessShell = new ShowAiProcessShell(getShell(), EvalLeftButton1.this, 0, "");
// if(null != showAiProcessShell && !showAiProcessShell.isDisposed()){
// showAiProcessShell.open();
//// showAiProcessShell.setVisible(true);
// }
}
//
// @Override
// public void mouseExit(MouseEvent e) {
// if(null != menuTipShell && !menuTipShell.isDisposed()){
// menuTipShell.close();
// }
// super.mouseExit(e);
// }
});
}
/**
* 根据AI平台返回结果选择是否进行下载文件与展示等待时间
* @param httpResponse 请求响应结果集
*/
private
void
downloadBiddingFile
(
HttpResponse
httpResponse
){
String
downUrl
=
""
;
if
(
null
==
httpResponse
.
getContent
()
||
""
.
equals
(
httpResponse
.
getContent
())){
// LOG.debug("服务器返回数据为空!");
// callBackMsg(false, "服务器返回数据为空!");
// callBackMsg(false, "未获取到下载地址!");
return
;
}
String
packageAiType
=
httpResponse
.
getDataParam
(
"packageAiType"
);
downUrl
=
httpResponse
.
getDataParam
(
"downUrl"
);
if
(
StringUtils
.
isNotEmpty
(
packageAiType
)
&&
packageAiType
.
equals
(
CommonEnum
.
YES
)
&&
StringUtils
.
isNotEmpty
(
downUrl
)
){
// LOG.debug("下载地址获取成功"+downUrl);
// callBackMsg(true, "下载地址获取成功,开始解析下载地址...");
String
downLoadPaths
=
downLoadPath
.
getAbsolutePath
();
downLoadFile
(
downUrl
,
downLoadPaths
);
}
else
{
...
...
@@ -142,14 +135,15 @@ public class AiEvalLeftButton extends ImageButton{
String
waitTime
=
httpResponse
.
getDataParam
(
"waitTime"
);
showAiProcessShell
=
new
ShowAiProcessShell
(
getShell
(),
AiEvalLeftButton
.
this
,
ObjectUtils
.
getIntValue
(
progress
,
0
),
waitTime
);
showAiProcessShell
.
open
();
// ShowViewAiProcessDialog showViewAiProcessDialog = new ShowViewAiProcessDialog(getShell(), ObjectUtils.getIntValue(progress, 0), waitTime);
// showViewAiProcessDialog.open();
// callBackMsg(false, "获取下载地址失败!");
}
}
/**
* 下载AI文件
* @param downLoadUrl 下载URL,如果有的话
* @param downLoadPaths 目标下载路径
*/
private
void
downLoadFile
(
String
downLoadUrl
,
String
downLoadPaths
){
// callBackMsg("开始下载招标文件...");
HttpURLDown
httpURLDown
=
new
HttpURLDown
(
downLoadUrl
,
downLoadPaths
,
new
CallBack
()
{});
// 初始化ExecutorService
ExecutorService
executor
=
Executors
.
newSingleThreadExecutor
();
...
...
@@ -168,6 +162,7 @@ public class AiEvalLeftButton extends ImageButton{
future
=
executor
.
submit
(
downLoadTask
);
// 调用异步前的操作
AiEvalLeftButton
.
this
.
setImage
(
ResourceManager
.
getPluginImage
(
IconsActivator
.
PLUGIN_ID
,
"icons/btn/white/hourglass.png"
));
//过渡弹窗,如果需要的话就放开
// showAiProcessShell = new ShowAiProcessShell(getShell(), AiEvalLeftButton.this, ObjectUtils.getIntValue("0", 0), "0s", title, todo);
// showAiProcessShell.open();
}
else
{
...
...
@@ -218,17 +213,47 @@ public class AiEvalLeftButton extends ImageButton{
// 每隔5秒检查一次任务状态
scheduler
.
scheduleAtFixedRate
(
checkTask
,
0
,
5
,
TimeUnit
.
SECONDS
);
}
// HttpUrl httpUrl = HttpUtils.getProjectHttpUrl(curTender, PropertiesUtils.getWebserviceProperty(WebserviceConstants.GET_AI_RESULT_METHOD, "bidOpeningHS.do?downloadOpenBidSupplierAiResult"));
// HttpResponse httpResponse = HttpUtils.doPost(httpUrl);
// downloadBiddingFile(httpResponse);
/**
* 下载过程ui变化
* @param start 进度起始
* @param end 进度终点
* @param picture 过渡picture
*/
private
void
changeStyle
(
String
start
,
String
end
,
String
picture
)
{
Display
.
getDefault
().
syncExec
(
new
Runnable
()
{
public
void
run
()
{
//过渡弹窗,如果需要的话就放开
// showAiProcessShell = new ShowAiProcessShell(getShell(), AiEvalLeftButton.this, ObjectUtils.getIntValue(start, 0), end, title, todo);
// showAiProcessShell.open();
AiEvalLeftButton
.
this
.
setImage
(
ResourceManager
.
getPluginImage
(
IconsActivator
.
PLUGIN_ID
,
picture
));
}
});
}
/**
* 渲染图形化界面
*/
private
void
render
()
{
this
.
setTopMargin
(
3
);
this
.
setBottomMargin
(
3
);
this
.
setLeftMargin
(
5
);
this
.
setRightMargin
(
5
);
this
.
setImage
(
ResourceManager
.
getPluginImage
(
IconsActivator
.
PLUGIN_ID
,
"icons/btn/white/view.png"
));
this
.
setText
(
name
);
this
.
setToolTipText
(
"标书查重"
);
if
(
StringUtil
.
empty
(
name
))
{
this
.
setFont
(
SWTResourceManager
.
getFont
(
"微软雅黑"
,
10
,
SWT
.
NORMAL
));
this
.
setForeground
(
SWTResourceManager
.
getColor
(
SWT
.
COLOR_WHITE
));
}
else
{
this
.
setFont
(
SWTResourceManager
.
getFont
(
"微软雅黑"
,
12
,
SWT
.
BOLD
));
this
.
setForeground
(
SWTResourceManager
.
getColor
(
60
,
138
,
226
));
}
// this.setActiveBgColor(BG);
this
.
setActiveBgColor
(
SWTResourceManager
.
getColor
(
255
,
153
,
0
));
this
.
setActiveForeground
(
SWTResourceManager
.
getColor
(
SWT
.
COLOR_WHITE
));
this
.
setSelectionBgColor
(
ColorConstants
.
SKIN_SELECTION_BG
);
this
.
setArcWidth
(
6
);
}
}
BID-EVALUATION-STEP/src/com/gx/obe/evaluation/step/composite/FactorEvaluationComposite.java
View file @
5896c0ef
This source diff could not be displayed because it is too large. You can
view the blob
instead.
BID-EVALUATION/src/com/gx/obe/evaluation/composite/MyEvaluationStepComposite.java
View file @
5896c0ef
...
...
@@ -57,6 +57,7 @@ import com.gx.obe.components.core.enumeration.TenderProjectEnum;
import
com.gx.obe.evaluation.dialog.EvaluationGroupDialog
;
import
com.gx.obe.evaluation.dialog.MyAuditDialog
;
import
com.gx.obe.evaluation.shell.MeetingRoomOpenShell
;
import
com.gx.obe.evaluation.step.composite.AiEvalLeftButton
;
import
com.gx.obe.evaluation.step.form.WasteBidStepDialog
;
import
com.gx.obe.evaluation.step.listener.ExpertEvaluationListener
;
import
com.gx.obe.evaluation.step.resutl.action.BusinessEvaluationResultAction
;
...
...
@@ -321,14 +322,14 @@ public class MyEvaluationStepComposite extends Composite implements ActionListen
preEvalLink
.
setForeground
(
SWTResourceManager
.
getColor
(
60
,
138
,
226
));
preEvalLink
.
setImage
(
ResourceManager
.
getPluginImage
(
IconsActivator
.
PLUGIN_ID
,
"icons/btn/blue/signature.png"
));
menuFunctionUtils
.
addFunction
(
preEvalLink
,
"EVALUATION_PREEVAL"
);
//如果需要屏蔽,直接注释掉该行
new
AiEvalLeftButton
(
toolsComposite
,
SWT
.
NONE
,
tenderProject
,
"标书查重"
);
signature_btn
=
new
ELink
(
toolsComposite
,
SWT
.
NONE
);
signature_btn
.
setFont
(
SWTResourceManager
.
getFont
(
"微软雅黑"
,
12
,
SWT
.
BOLD
));
signature_btn
.
setForeground
(
SWTResourceManager
.
getColor
(
60
,
138
,
226
));
menuFunctionUtils
.
addFunction
(
signature_btn
,
"EVALUATION_SIGNATURE"
);
wasteBiddding_btn
=
new
ELink
(
toolsComposite
,
SWT
.
NONE
);
wasteBiddding_btn
.
setFont
(
SWTResourceManager
.
getFont
(
"微软雅黑"
,
12
,
SWT
.
BOLD
));
wasteBiddding_btn
.
setForeground
(
SWTResourceManager
.
getColor
(
60
,
138
,
226
));
...
...
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