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

提交本地更改代码

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