Commit 858381da authored by 黄重's avatar 黄重

提交本地更改代码

parent 5896c0ef
...@@ -259,7 +259,7 @@ public class FactorEvaluationComposite extends EvaluationView { ...@@ -259,7 +259,7 @@ public class FactorEvaluationComposite extends EvaluationView {
//渲染图形化界面 //渲染图形化界面
render(); render();
//渲染左侧AI界面,如果不需要直接注释该方法 //渲染左侧AI界面,如果不需要直接注释该方法
renderAi(); // renderAi();
init(); init();
} }
......
...@@ -6,6 +6,7 @@ import org.apache.log4j.Logger; ...@@ -6,6 +6,7 @@ import org.apache.log4j.Logger;
import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.Platform;
import org.eclipse.equinox.app.IApplication; import org.eclipse.equinox.app.IApplication;
import org.eclipse.equinox.app.IApplicationContext; import org.eclipse.equinox.app.IApplicationContext;
import org.eclipse.swt.core.MessageDialog;
import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IWorkbench; import org.eclipse.ui.IWorkbench;
...@@ -44,7 +45,10 @@ public class EvaluationApplication implements IApplication { ...@@ -44,7 +45,10 @@ public class EvaluationApplication implements IApplication {
try { try {
OnStartInit.initSystemConfig(Constants.TERMINAL_EVALUATION ); OnStartInit.initSystemConfig(Constants.TERMINAL_EVALUATION );
OnStartInit.initPluginId(Activator.PLUGIN_ID); OnStartInit.initPluginId(Activator.PLUGIN_ID);
// MessageDialog.openInformation(new Shell(), "程序启动");
if(valLicense()){ if(valLicense()){
LOG.debug("开始进入初始化安装软件类OnStartInit" );
// MessageDialog.openInformation(new Shell(), "\"开始进入初始化安装软件类OnStartInit\" ");
OnStartInit.installDriver(); OnStartInit.installDriver();
// 关闭进度条 // 关闭进度条
Platform.endSplash(); Platform.endSplash();
......
...@@ -58,9 +58,7 @@ import com.gx.obe.components.core.I18NEnum; ...@@ -58,9 +58,7 @@ import com.gx.obe.components.core.I18NEnum;
import com.gx.obe.components.core.enumeration.CommonEnum; import com.gx.obe.components.core.enumeration.CommonEnum;
import com.gx.obe.components.core.enumeration.ExpertEnum; import com.gx.obe.components.core.enumeration.ExpertEnum;
import com.gx.obe.components.core.enumeration.TenderProjectEnum; import com.gx.obe.components.core.enumeration.TenderProjectEnum;
import com.gx.obe.config.ConfigConstants;
import com.gx.obe.config.utils.InputStreamUtil; import com.gx.obe.config.utils.InputStreamUtil;
import com.gx.obe.config.utils.PropertiesUtils;
import com.gx.obe.evaluation.electionExpertLeader.ElectionExpertLeaderComposite; import com.gx.obe.evaluation.electionExpertLeader.ElectionExpertLeaderComposite;
import com.gx.obe.evaluation.listener.ExpertEvaluationRoomListener; import com.gx.obe.evaluation.listener.ExpertEvaluationRoomListener;
import com.gx.obe.evaluation.listener.SelectNetWorkListener; import com.gx.obe.evaluation.listener.SelectNetWorkListener;
...@@ -74,7 +72,7 @@ import com.gx.obe.thread.SyncThreadSet; ...@@ -74,7 +72,7 @@ import com.gx.obe.thread.SyncThreadSet;
import com.gx.obe.util.utils.LogUtils; import com.gx.obe.util.utils.LogUtils;
import com.gx.obe.util.utils.ObjectUtils; import com.gx.obe.util.utils.ObjectUtils;
import com.gx.obe.util.utils.RuntimeUtils; import com.gx.obe.util.utils.RuntimeUtils;
import com.gx.obe.util.utils.ScreenUtils; import com.gx.obe.util.utils.StringUtils;
import com.gx.obe.web.entity.auth.AuthUser; import com.gx.obe.web.entity.auth.AuthUser;
import com.gx.obe.web.entity.auth.Menu; import com.gx.obe.web.entity.auth.Menu;
import com.gx.obe.web.entity.expert.Expert; import com.gx.obe.web.entity.expert.Expert;
...@@ -664,6 +662,12 @@ public class ExpertEvalautionRoomHomeComposite extends Composite implements Acti ...@@ -664,6 +662,12 @@ public class ExpertEvalautionRoomHomeComposite extends Composite implements Acti
downloadBidFileBtn.addMouseListener(new MouseAdapter() { downloadBidFileBtn.addMouseListener(new MouseAdapter() {
public void mouseUp(MouseEvent e) { public void mouseUp(MouseEvent e) {
TenderProjectEntity tenderProjectEntity = tenderProjectService.getById(tenderProject.getId()); TenderProjectEntity tenderProjectEntity = tenderProjectService.getById(tenderProject.getId());
String allowDownLoadBidFileString = tenderProjectEntity.getEvaluationParamByKey("allowDownLoadBidFile");
if(StringUtils.isEmpty(allowDownLoadBidFileString) || allowDownLoadBidFileString.equals(CommonEnum.NO)) {
MessageDialog.openError(getShell(), "项目经理尚未开启允许下载标书");
return;
}
if(CommonEnum.COMPLETE.equals(tenderProjectEntity.getComplateStatus())) {//|| tenderProjectService.isEvaluationComplate(tenderProject.getId())) { if(CommonEnum.COMPLETE.equals(tenderProjectEntity.getComplateStatus())) {//|| tenderProjectService.isEvaluationComplate(tenderProject.getId())) {
MessageDialog.openWarning(getShell(), Messages.Tips_evaluationCompleted); MessageDialog.openWarning(getShell(), Messages.Tips_evaluationCompleted);
return; return;
...@@ -687,7 +691,6 @@ public class ExpertEvalautionRoomHomeComposite extends Composite implements Acti ...@@ -687,7 +691,6 @@ public class ExpertEvalautionRoomHomeComposite extends Composite implements Acti
count++; count++;
type = "HTTP_DOWNLOAD"; type = "HTTP_DOWNLOAD";
} }
if(count == 1) { if(count == 1) {
if("FTP_DOWNLOAD".equals(type)) { if("FTP_DOWNLOAD".equals(type)) {
DownloadDecBidFileDialog dialog = new DownloadDecBidFileDialog(getShell(), tenderProject, true); DownloadDecBidFileDialog dialog = new DownloadDecBidFileDialog(getShell(), tenderProject, true);
......
...@@ -323,7 +323,7 @@ public class MyEvaluationStepComposite extends Composite implements ActionListen ...@@ -323,7 +323,7 @@ public class MyEvaluationStepComposite extends Composite implements ActionListen
preEvalLink.setImage(ResourceManager.getPluginImage(IconsActivator.PLUGIN_ID, "icons/btn/blue/signature.png")); preEvalLink.setImage(ResourceManager.getPluginImage(IconsActivator.PLUGIN_ID, "icons/btn/blue/signature.png"));
menuFunctionUtils.addFunction(preEvalLink, "EVALUATION_PREEVAL"); menuFunctionUtils.addFunction(preEvalLink, "EVALUATION_PREEVAL");
//如果需要屏蔽,直接注释掉该行 //如果需要屏蔽,直接注释掉该行
new AiEvalLeftButton(toolsComposite, SWT.NONE, tenderProject, "标书查重"); // new AiEvalLeftButton(toolsComposite, SWT.NONE, tenderProject, "标书查重");
signature_btn = new ELink(toolsComposite, SWT.NONE); signature_btn = new ELink(toolsComposite, SWT.NONE);
signature_btn.setFont(SWTResourceManager.getFont("微软雅黑", 12, SWT.BOLD)); signature_btn.setFont(SWTResourceManager.getFont("微软雅黑", 12, SWT.BOLD));
......
...@@ -44,13 +44,14 @@ import com.gx.obe.web.service.SysConfigValueService; ...@@ -44,13 +44,14 @@ import com.gx.obe.web.service.SysConfigValueService;
import com.gx.utils.NowTimeUtils; import com.gx.utils.NowTimeUtils;
import com.swtdesigner.SWTResourceManager; import com.swtdesigner.SWTResourceManager;
import common.Logger;
import de.kupzog.ktable.KTable; import de.kupzog.ktable.KTable;
public class OnStartInit { public class OnStartInit {
private static String INSTRALL_PATH; private static String INSTRALL_PATH;
private static String CONFIG_PROPERTIES = "config.properties"; private static String CONFIG_PROPERTIES = "config.properties";
private static Logger LOG = Logger.getLogger(OnStartInit.class);
static { static {
INSTRALL_PATH = Platform.getInstallLocation().getURL().getPath(); INSTRALL_PATH = Platform.getInstallLocation().getURL().getPath();
} }
...@@ -298,59 +299,74 @@ public class OnStartInit { ...@@ -298,59 +299,74 @@ public class OnStartInit {
*/ */
public static void installDriver() { public static void installDriver() {
try { try {
LOG.debug("进入初始化程序安装" );
File driverDir = new File(INSTRALL_PATH.concat(File.separator).concat("drivers")); File driverDir = new File(INSTRALL_PATH.concat(File.separator).concat("drivers"));
if(driverDir.exists() && driverDir.isDirectory()) { if(driverDir.exists() && driverDir.isDirectory()) {
LOG.debug("找到程序安装目录" + driverDir.getAbsolutePath());
String driversPath = driverDir.getAbsolutePath().concat(File.separator).concat("drivers.xml"); String driversPath = driverDir.getAbsolutePath().concat(File.separator).concat("drivers.xml");
Document document = XmlUtils.getXmlDocument(driversPath); Document document = XmlUtils.getXmlDocument(driversPath);
if(null != document){ if(null != document){
Shell parentShell = Display.getDefault().getActiveShell(); Shell parentShell = Display.getDefault().getActiveShell();
ProgressMessageDialog progressDialog = new ProgressMessageDialog(null != parentShell ? parentShell : new Shell(), false, -1, new LoadingAdatper() { // ProgressMessageDialog progressDialog = new ProgressMessageDialog(null != parentShell ? parentShell : new Shell(), false, -1, new LoadingAdatper() {
@Override // @Override
public void finish(boolean flag) { // public void finish(boolean flag) {
} // }
}); // });
new Thread(new Runnable() { new Thread(new Runnable() {
public void run() { public void run() {
// 获得根元素 // 获得根元素
Element rootElement = document.getRootElement(); Display.getDefault().syncExec(new Runnable() {
List<?> driverElementList = rootElement.elements(); public void run() {
if(null != driverElementList) { Element rootElement = document.getRootElement();
boolean isOpen = false; List<?> driverElementList = rootElement.elements();
for (Object object : driverElementList) { if(null != driverElementList) {
Element driver = (Element) object; boolean isOpen = false;
Element ele = driver.element("installOnStart"); for (Object object : driverElementList) {
if(null != ele && "01".equals(ele.getTextTrim())) { Element driver = (Element) object;
if(!isOpen) { Element ele = driver.element("installOnStart");
isOpen = true; if(null != ele && "01".equals(ele.getTextTrim())) {
Display.getDefault().syncExec(new Runnable() { if(!isOpen) {
public void run() { isOpen = true;
if(null != progressDialog && progressDialog.isDisposed()) {
progressDialog.open(); // progressDialog.open();
}
} }
});
} // progressDialog.open();
progressDialog.open(); String name = driver.elementTextTrim("name");
String name = driver.elementTextTrim("name"); String fileName = driver.elementTextTrim("fileName");
String fileName = driver.elementTextTrim("fileName");
File installFile = new File(driverDir.getAbsolutePath().concat(File.separator)+fileName); File installFile = new File(driverDir.getAbsolutePath().concat(File.separator)+fileName);
if(installFile.exists()){ LOG.debug("安装包位置为:" + installFile.getAbsolutePath());
progressDialog.message("正在安装" + name+"...", 0); if(installFile.exists()){
RuntimeUtils.execFile(installFile.getAbsolutePath()); LOG.debug("正在执行安装操作" + installFile.getAbsolutePath());
progressDialog.message(name+"安装结束!", 1); // progressDialog.message("正在安装" + name+"...", 0);
ele.setText(""); RuntimeUtils.openFIle(installFile);
}else { // progressDialog.message(name+"安装结束!", 1);
progressDialog.message("未找到" + name+"驱动文件!", -1); LOG.debug("执行安装操作结束" );
ele.setText("");
}else {
LOG.debug("未找到安装软件" + installFile.getAbsolutePath());
// progressDialog.message("未找到" + name+"驱动文件!", -1);
}
}else {
// MessageDialog.openInformation(new Shell(),"程序标记状态不正确");
LOG.debug("程序标记状态不正确");
}
} }
XmlUtils.createXmlFile(document, driversPath);
} }
// if(!progressDialog.isDisposed()) {
// progressDialog.close();
// }
} }
XmlUtils.createXmlFile(document, driversPath); });
}
progressDialog.finish(true); // progressDialog.finish(true);
} }
}).start(); }).start();
progressDialog.setTitle("正在安装驱动..."); // progressDialog.setTitle("正在安装驱动...");
} }
} }
......
...@@ -121,7 +121,8 @@ public class EvaluationStepProgressComposite extends Composite implements StartE ...@@ -121,7 +121,8 @@ public class EvaluationStepProgressComposite extends Composite implements StartE
private TenderProjectService tenderProjectService; private TenderProjectService tenderProjectService;
private Action projectAction; private Action projectAction;
private ELink completeButton; private ELink completeButton;
private Button allowDownLoadBidFile;
boolean hasAllSign = true;
{ {
LogUtils.logClass(EvaluationStepProgressComposite.class); LogUtils.logClass(EvaluationStepProgressComposite.class);
} }
...@@ -171,7 +172,7 @@ public class EvaluationStepProgressComposite extends Composite implements StartE ...@@ -171,7 +172,7 @@ public class EvaluationStepProgressComposite extends Composite implements StartE
orderReviewComposite = new Composite(composite_title, SWT.NONE); orderReviewComposite = new Composite(composite_title, SWT.NONE);
orderReviewComposite.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1)); orderReviewComposite.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));
GridLayout gl_composite_3 = new GridLayout(4, false); GridLayout gl_composite_3 = new GridLayout(6, false);
gl_composite_3.horizontalSpacing = 0; gl_composite_3.horizontalSpacing = 0;
gl_composite_3.marginHeight = 0; gl_composite_3.marginHeight = 0;
gl_composite_3.marginWidth = 10; gl_composite_3.marginWidth = 10;
...@@ -230,7 +231,20 @@ public class EvaluationStepProgressComposite extends Composite implements StartE ...@@ -230,7 +231,20 @@ public class EvaluationStepProgressComposite extends Composite implements StartE
orderOperatorBtn.setData(EvaluationStepEnum.ORDER_OPERATOR); orderOperatorBtn.setData(EvaluationStepEnum.ORDER_OPERATOR);
menuFunctionUtils.addFunction(orderOperatorBtn, "ORDER_HAND"); menuFunctionUtils.addFunction(orderOperatorBtn, "ORDER_HAND");
Composite composite_2 = new Composite(orderReviewComposite, SWT.NONE);
composite_2.setLayout(new GridLayout(1, false));
allowDownLoadBidFile = new Button(composite_2, SWT.CHECK);
allowDownLoadBidFile.addMouseListener(new MouseAdapter() {
public void mouseUp(MouseEvent e) {
allowDownLoadBidFileAction();
}
});
allowDownLoadBidFile.setText("允许下载标书");
allowDownLoadBidFile.setEnabled(false);
ELink button = new ELink(composite_title, SWT.NONE); ELink button = new ELink(composite_title, SWT.NONE);
button.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, true, false, 1, 1)); button.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, true, false, 1, 1));
button.addMouseListener(new MouseAdapter() { button.addMouseListener(new MouseAdapter() {
...@@ -427,6 +441,15 @@ public class EvaluationStepProgressComposite extends Composite implements StartE ...@@ -427,6 +441,15 @@ public class EvaluationStepProgressComposite extends Composite implements StartE
evaluationGroupService = new EvaluationGroupService(); evaluationGroupService = new EvaluationGroupService();
this.tenderProjectEntity = projectAction.getTenderProject(); this.tenderProjectEntity = projectAction.getTenderProject();
tenderProjectEntity = tenderProjectService.getById(tenderProjectEntity.getId()); tenderProjectEntity = tenderProjectService.getById(tenderProjectEntity.getId());
// boolean result = tenderProjectService.updateAssignProperty(tenderProjectEntity, new String[] {"params"});
// if(!result) {
// }
String allowDownLoadBidFileString = tenderProjectEntity.getEvaluationParamByKey("allowDownLoadBidFile");
if(null != allowDownLoadBidFileString && allowDownLoadBidFileString.equals(CommonEnum.YES)) {
allowDownLoadBidFile.setSelection(true);
}
this.menu = projectAction.getMenu(); this.menu = projectAction.getMenu();
menuFunctionUtils.initFunctionAuthority(menu); menuFunctionUtils.initFunctionAuthority(menu);
evaluationStepExpertService = new EvaluationStepExpertService(); evaluationStepExpertService = new EvaluationStepExpertService();
...@@ -724,8 +747,14 @@ public class EvaluationStepProgressComposite extends Composite implements StartE ...@@ -724,8 +747,14 @@ public class EvaluationStepProgressComposite extends Composite implements StartE
} }
}); });
if(null != expertList && expertList.size() > 0){ if(null != expertList && expertList.size() > 0){
for(final Expert expert : expertList){
if(null == expert.getSignType() || ExpertEnum.AVOID.equals(expert.getSignType())) {
hasAllSign = false;
}
}
myThreadSet.addSyncExec(new SyncThread(new SyncThread.Runnable() { myThreadSet.addSyncExec(new SyncThread(new SyncThread.Runnable() {
public void run(){ public void run(){
for(final Expert expert : expertList){ for(final Expert expert : expertList){
final Map<String, ExpertEvaluationStep> expertStepMap = new HashMap<String, ExpertEvaluationStep>(); final Map<String, ExpertEvaluationStep> expertStepMap = new HashMap<String, ExpertEvaluationStep>();
List<ExpertEvaluationStep> expertEvaluationStepList = expertEvaluationStepService.getExpertEvaluationStepList(tenderProjectEntity.getId(), expert.getUserId()); List<ExpertEvaluationStep> expertEvaluationStepList = expertEvaluationStepService.getExpertEvaluationStepList(tenderProjectEntity.getId(), expert.getUserId());
...@@ -741,14 +770,20 @@ public class EvaluationStepProgressComposite extends Composite implements StartE ...@@ -741,14 +770,20 @@ public class EvaluationStepProgressComposite extends Composite implements StartE
} }
}); });
} }
Display.getDefault().syncExec(new Runnable(){ Display.getDefault().syncExec(new Runnable(){
public void run(){ public void run(){
if(hasAllSign) {
allowDownLoadBidFile.setEnabled(true);
}
if(expert_progress.isDisposed())return; if(expert_progress.isDisposed())return;
composite.layout(); composite.layout();
scrolledComposite.setMinSize(composite.computeSize(scrolledComposite.getBounds().width -20, SWT.DEFAULT)); scrolledComposite.setMinSize(composite.computeSize(scrolledComposite.getBounds().width -20, SWT.DEFAULT));
} }
}); });
} }
})); }));
} }
myThreadSet.start(); myThreadSet.start();
...@@ -1017,4 +1052,14 @@ public class EvaluationStepProgressComposite extends Composite implements StartE ...@@ -1017,4 +1052,14 @@ public class EvaluationStepProgressComposite extends Composite implements StartE
showTotalProgress(); showTotalProgress();
} }
/**
* 是否允许下载标书
*/
private void allowDownLoadBidFileAction() {
tenderProjectEntity.setEvaluationParam("allowDownLoadBidFile", allowDownLoadBidFile.getSelection() ? CommonEnum.YES: CommonEnum.NO);
boolean result = tenderProjectService.updateAssignProperty(tenderProjectEntity, new String[] {"params"});
if(!result) {
allowDownLoadBidFile.setSelection(!allowDownLoadBidFile.getSelection());
}
}
} }
...@@ -162,9 +162,10 @@ public class RuntimeUtils { ...@@ -162,9 +162,10 @@ public class RuntimeUtils {
} }
public static void main(String[] arges){ public static void main(String[] arges){
System.out.println(System.getProperty("user.home")); // System.out.println(System.getProperty("user.home"));
System.out.println(System.getProperty("user.dir")); // System.out.println(System.getProperty("user.dir"));
System.out.println(System.getenv("ComSpec")); // System.out.println(System.getenv("ComSpec"));
System.out.println(System.getProperty("java.io.tmpdir"));//显示当前系统的临时目录 // System.out.println(System.getProperty("java.io.tmpdir"));//显示当前系统的临时目录
// openFIle(new File("C:\\Program Files (x86)\\京能招标集采中心-开评标工具\\drivers\\TrustSignPDFPlugin.Standard.exe"));
} }
} }
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