Commit 3ac6be3f authored by 黄重's avatar 黄重

京能结构化代码提交

parent b7061007
package com.gx.obe.evaluation.step.composite;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.nebula.widgets.grid.Grid;
import org.eclipse.nebula.widgets.grid.GridColumn;
import org.eclipse.nebula.widgets.grid.GridItem;
import org.eclipse.nebula.widgets.grid.listener.GridSelectionListener;
import org.eclipse.swt.SWT;
import org.eclipse.swt.core.ImageResolver;
import org.eclipse.swt.core.utils.SwtUtils;
import org.eclipse.swt.core.widgets.ELink;
import org.eclipse.swt.core.widgets.EMenu;
import org.eclipse.swt.core.widgets.ESepator;
import org.eclipse.swt.core.widgets.ImageButton;
import org.eclipse.swt.custom.CTabFolder;
import org.eclipse.swt.custom.CTabItem;
import org.eclipse.swt.custom.SashForm;
import org.eclipse.swt.events.DisposeEvent;
import org.eclipse.swt.events.DisposeListener;
import org.eclipse.swt.events.MouseAdapter;
import org.eclipse.swt.events.MouseEvent;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.program.Program;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Text;
import com.gx.obe.ColorConstants;
import com.gx.obe.answer.dialog.ImportAnswerQuestionDialog;
import com.gx.obe.business.entity.MenuFunction;
import com.gx.obe.business.enumeration.MenuFunctionEnum;
import com.gx.obe.common.file.adapter.ExportBidFileAdapter;
import com.gx.obe.common.file.dialog.BidFileLocalBorwseDialog;
import com.gx.obe.common.file.entity.BidFile;
import com.gx.obe.common.file.enumeration.FileConstants;
import com.gx.obe.common.icons.IconsActivator;
import com.gx.obe.common.widget.shell.ToolsShell;
import com.gx.obe.common.widget.utils.MenuFunctionUtils;
import com.gx.obe.components.core.Constants;
import com.gx.obe.components.core.I18NEnum;
import com.gx.obe.components.core.enumeration.CommonEnum;
import com.gx.obe.config.ConfigConstants;
import com.gx.obe.config.utils.PropertiesUtils;
import com.gx.obe.message.Messages;
import com.gx.obe.util.utils.CollectionUtils;
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.StringUtils;
import com.gx.obe.web.entity.Supplier;
import com.gx.obe.web.entity.auth.Menu;
import com.gx.obe.web.entity.expert.Expert;
import com.gx.obe.web.entity.tender.TenderProjectEntity;
import com.gx.obe.web.entity.tender.TenderProjectRuleEntity;
import com.gx.obe.web.service.ProjectRuleService;
import com.gx.obe.web.service.SupplierService;
import com.gx.obe.web.service.expert.ExpertService;
import com.gx.tools.ca.CaInfo;
import com.gx.tools.ole.DocumentFactory;
import com.gx.tools.ole.DocumentLoader;
import com.gx.tools.utils.CaInfoUtil;
import com.swtdesigner.ResourceManager;
import com.swtdesigner.SWTResourceManager;
import org.eclipse.swt.widgets.Label;
/**
* @Description: 查看投标人投标文件
* @author guoyr
*/
public class AiFileComposite extends Composite {
private TenderProjectEntity tenderProject;
private String bidFileType;
private Composite evalContentComposite;
private ImageResolver imageResolver = new ImageResolver();
private Composite composite_14;
private List<Supplier> supplierList = new ArrayList<Supplier>();
private boolean useSpecialPdf = true;
private Menu menu;
private Composite composite;
{
LogUtils.logClass(AiFileComposite.class);
}
/**
* @param parent
* @param style
*/
public AiFileComposite(Composite parent, int style) {
super(parent, style);
GridLayout gridLayout = new GridLayout(1, false);
gridLayout.verticalSpacing = 0;
gridLayout.horizontalSpacing = 0;
gridLayout.marginWidth = 0;
gridLayout.marginHeight = 0;
setLayout(gridLayout);
addDisposeListener(new DisposeListener() {
public void widgetDisposed(DisposeEvent e) {
imageResolver.disposite();
if(null != supplierList){
supplierList.clear();
}
}
});
this.tenderProject = (TenderProjectEntity)parent.getData("tenderProjectEntity");
this.bidFileType = (String)parent.getData("bidFileType");
this.menu = (Menu)parent.getData("menu");
if (StringUtils.isEmpty(bidFileType)) {
bidFileType = BidFile.PUBLIC_BID_FILE;
}
evalContentComposite = new Composite(this, SWT.NONE);
evalContentComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
GridLayout gl_evalContentComposite = new GridLayout(1, false);
gl_evalContentComposite.verticalSpacing = 0;
gl_evalContentComposite.horizontalSpacing = 0;
gl_evalContentComposite.marginHeight = 0;
gl_evalContentComposite.marginWidth = 0;
evalContentComposite.setLayout(gl_evalContentComposite);
composite_14 = new Composite(evalContentComposite, SWT.NONE);
composite_14.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
GridLayout gl_composite_14 = new GridLayout(1, false);
gl_composite_14.verticalSpacing = 0;
gl_composite_14.horizontalSpacing = 0;
gl_composite_14.marginHeight = 0;
gl_composite_14.marginWidth = 0;
composite_14.setLayout(gl_composite_14);
composite = new Composite(composite_14, SWT.NONE);
composite.setLayout(new FillLayout(SWT.HORIZONTAL));
composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
loadBidFileAction();
}
/**
* @Description: 加载文件
* @author guoyr
* @param ID
* @param bidFile
* @param bookmark
* @param pageNumber
* @return
*/
private void loadBidFileAction(){
String downLoadPath = new File(FileConstants.getBiddingFilePath(tenderProject.getId()) + "ai.pdf").getAbsolutePath();
File file = new File(downLoadPath);
// 全部采用默认配置的PDF加载器加载
if(file.exists()) {
String pdfType = PropertiesUtils.getProperty(ConfigConstants.PDF_ACTIVE_TYPE, DocumentFactory.DEFAULT_PDF_TYPE);
pdfType = "JinGe";
DocumentLoader documentLoader = DocumentFactory.getDocumentLoader(file.getAbsolutePath(), useSpecialPdf ? pdfType : null);
documentLoader.openDocument(composite, true);
documentLoader.showOrHiddenToolBar(true);
documentLoader.activate();
composite.layout();
}
// if(null != documentLoader){
// int page = 1;
// documentLoader.gotoPage(page);
//
// }
}
@Override
protected void checkSubclass() {
// Disable the check that prevents subclassing of SWT components
}
}
package com.gx.obe.evaluation.step.composite; package com.gx.obe.evaluation.step.composite;
import java.io.File; import java.io.File;
import java.io.IOException;
import java.text.MessageFormat; import java.text.MessageFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
...@@ -13,6 +14,7 @@ import org.eclipse.nebula.widgets.grid.GridColumn; ...@@ -13,6 +14,7 @@ import org.eclipse.nebula.widgets.grid.GridColumn;
import org.eclipse.nebula.widgets.grid.GridItem; import org.eclipse.nebula.widgets.grid.GridItem;
import org.eclipse.nebula.widgets.grid.listener.GridSelectionListener; import org.eclipse.nebula.widgets.grid.listener.GridSelectionListener;
import org.eclipse.swt.SWT; import org.eclipse.swt.SWT;
import org.eclipse.swt.core.CallBack;
import org.eclipse.swt.core.ImageResolver; import org.eclipse.swt.core.ImageResolver;
import org.eclipse.swt.core.MessageDialog; import org.eclipse.swt.core.MessageDialog;
import org.eclipse.swt.core.utils.FileDialogUtils; import org.eclipse.swt.core.utils.FileDialogUtils;
...@@ -48,6 +50,7 @@ import org.eclipse.swt.widgets.Listener; ...@@ -48,6 +50,7 @@ import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Text; import org.eclipse.swt.widgets.Text;
import com.gx.obe.ColorConstants; import com.gx.obe.ColorConstants;
import com.gx.obe.WebserviceConstants;
import com.gx.obe.answer.dialog.ImportAnswerQuestionDialog; import com.gx.obe.answer.dialog.ImportAnswerQuestionDialog;
import com.gx.obe.answer.dialog.InquireEnvelopListDialog; import com.gx.obe.answer.dialog.InquireEnvelopListDialog;
import com.gx.obe.bidata.action.BidDataAction; import com.gx.obe.bidata.action.BidDataAction;
...@@ -56,11 +59,15 @@ import com.gx.obe.bidata.action.SupplierInfoDialogAction; ...@@ -56,11 +59,15 @@ import com.gx.obe.bidata.action.SupplierInfoDialogAction;
import com.gx.obe.bidata.vo.SupplierDTO; import com.gx.obe.bidata.vo.SupplierDTO;
import com.gx.obe.business.entity.MenuFunction; import com.gx.obe.business.entity.MenuFunction;
import com.gx.obe.business.enumeration.MenuFunctionEnum; import com.gx.obe.business.enumeration.MenuFunctionEnum;
import com.gx.obe.business.http.HttpResponse;
import com.gx.obe.business.http.HttpUrl;
import com.gx.obe.business.http.HttpUtils;
import com.gx.obe.common.file.dialog.BidFileLocalBorwseDialog; import com.gx.obe.common.file.dialog.BidFileLocalBorwseDialog;
import com.gx.obe.common.file.entity.BidFile; import com.gx.obe.common.file.entity.BidFile;
import com.gx.obe.common.file.entity.BiddingFile; import com.gx.obe.common.file.entity.BiddingFile;
import com.gx.obe.common.file.entity.EvaluationPoint; import com.gx.obe.common.file.entity.EvaluationPoint;
import com.gx.obe.common.file.enumeration.FileConstants; import com.gx.obe.common.file.enumeration.FileConstants;
import com.gx.obe.common.file.http.HttpURLDown;
import com.gx.obe.common.icons.IconsActivator; import com.gx.obe.common.icons.IconsActivator;
import com.gx.obe.common.widget.button.EvalLeftButton; import com.gx.obe.common.widget.button.EvalLeftButton;
import com.gx.obe.common.widget.button.EvaluationButton; import com.gx.obe.common.widget.button.EvaluationButton;
...@@ -84,12 +91,11 @@ import com.gx.obe.evaluation.step.dialog.ImportBidBondDialog; ...@@ -84,12 +91,11 @@ import com.gx.obe.evaluation.step.dialog.ImportBidBondDialog;
import com.gx.obe.evaluation.step.dialog.ReReasonDialog; import com.gx.obe.evaluation.step.dialog.ReReasonDialog;
import com.gx.obe.evaluation.step.dialog.ViewResultDialog; import com.gx.obe.evaluation.step.dialog.ViewResultDialog;
import com.gx.obe.evaluation.step.inter.IEvaluationTable; import com.gx.obe.evaluation.step.inter.IEvaluationTable;
import com.gx.obe.evaluation.step.listener.CompareBidFileListener;
import com.gx.obe.evaluation.step.listener.CompareSupplierFileListener;
import com.gx.obe.evaluation.step.listener.EvaluationSupplierFactorListener; import com.gx.obe.evaluation.step.listener.EvaluationSupplierFactorListener;
import com.gx.obe.evaluation.step.review.composite.ComplianceEvaluationTableComposite; import com.gx.obe.evaluation.step.review.composite.ComplianceEvaluationTableComposite;
import com.gx.obe.evaluation.step.review.composite.ScoreEvaluationTableComposite; import com.gx.obe.evaluation.step.review.composite.ScoreEvaluationTableComposite;
import com.gx.obe.evaluation.step.shell.ListEvaluationItemShell; import com.gx.obe.evaluation.step.shell.ListEvaluationItemShell;
import com.gx.obe.evaluation.step.shell.MeetingRoomOpenShell;
import com.gx.obe.evaluation.step.shell.ShowCompareSupplierListShell; import com.gx.obe.evaluation.step.shell.ShowCompareSupplierListShell;
import com.gx.obe.evaluation.step.widgets.EvalLeftGroupButton; import com.gx.obe.evaluation.step.widgets.EvalLeftGroupButton;
import com.gx.obe.evaluation.step.widgets.LeftMenuEnum; import com.gx.obe.evaluation.step.widgets.LeftMenuEnum;
...@@ -101,7 +107,6 @@ import com.gx.obe.util.utils.FileUtils; ...@@ -101,7 +107,6 @@ import com.gx.obe.util.utils.FileUtils;
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.util.utils.StringUtils;
import com.gx.obe.web.entity.EvaluationFactorResult; import com.gx.obe.web.entity.EvaluationFactorResult;
import com.gx.obe.web.entity.Supplier; import com.gx.obe.web.entity.Supplier;
...@@ -189,7 +194,7 @@ public class FactorEvaluationComposite extends EvaluationView { ...@@ -189,7 +194,7 @@ public class FactorEvaluationComposite extends EvaluationView {
private int fileCacheCount = 2; private int fileCacheCount = 2;
private boolean showOnloadFileTips = true; private boolean showOnloadFileTips = true;
// private ELink viewInquireEnvelopLink; // private ELink viewInquireEnvelopLink;
private ELink compareFile_link; // private ELink compareFile_link;
private ELink localFile_link; private ELink localFile_link;
private ShowCompareSupplierListShell compareBiddingFileShell; private ShowCompareSupplierListShell compareBiddingFileShell;
private List<Supplier> compareSupplierList = new ArrayList<Supplier>(); private List<Supplier> compareSupplierList = new ArrayList<Supplier>();
...@@ -238,6 +243,7 @@ public class FactorEvaluationComposite extends EvaluationView { ...@@ -238,6 +243,7 @@ public class FactorEvaluationComposite extends EvaluationView {
private Map<String,String> supplierNameMap = new HashMap<String,String>(); private Map<String,String> supplierNameMap = new HashMap<String,String>();
private Composite buttonComposite; private Composite buttonComposite;
private TemplateTableListComposite templateTableListComposite; private TemplateTableListComposite templateTableListComposite;
private EvalLeftButton viewAI_btn;
{ {
LogUtils.logClass(FactorEvaluationComposite.class); LogUtils.logClass(FactorEvaluationComposite.class);
...@@ -383,6 +389,20 @@ public class FactorEvaluationComposite extends EvaluationView { ...@@ -383,6 +389,20 @@ public class FactorEvaluationComposite extends EvaluationView {
}); });
menuFunctionUtils.addFunction(moreTools, "EVALUATION_VIEW_MORE"); menuFunctionUtils.addFunction(moreTools, "EVALUATION_VIEW_MORE");
viewAI_btn = new EvalLeftButton(left_tool_composite, SWT.NONE);
viewAI_btn.setImage(ResourceManager.getPluginImage(IconsActivator.PLUGIN_ID, "icons/btn/white/view.png"));
viewAI_btn.setText("");
viewAI_btn.setToolTipText("标书查重");
viewAI_btn.addMouseListener(new MouseAdapter() {
public void mouseUp(MouseEvent e) {
viewAiAction();
}
});
viewAI_btn.setVisible(false);
// menuFunctionUtils.addFunction(viewAI_btn, "EVALUATION_VIEW_AI");
ESepator toolv_sepator = new ESepator(this, SWT.VERTICAL); ESepator toolv_sepator = new ESepator(this, SWT.VERTICAL);
toolv_sepator.setLayoutData(new GridData(SWT.LEFT, SWT.FILL, false, true, 1, 1)); toolv_sepator.setLayoutData(new GridData(SWT.LEFT, SWT.FILL, false, true, 1, 1));
toolv_sepator.setBackground(ColorConstants.SEP_LIGHT_COLOR); toolv_sepator.setBackground(ColorConstants.SEP_LIGHT_COLOR);
...@@ -447,15 +467,15 @@ public class FactorEvaluationComposite extends EvaluationView { ...@@ -447,15 +467,15 @@ public class FactorEvaluationComposite extends EvaluationView {
menuFunctionUtils.addFunction(viewCredit_link, "VIEW_CREDIT"); menuFunctionUtils.addFunction(viewCredit_link, "VIEW_CREDIT");
compareFile_link = new ELink(supplier_composite, SWT.NONE); // compareFile_link = new ELink(supplier_composite, SWT.NONE);
compareFile_link.addMouseListener(new MouseAdapter() { // compareFile_link.addMouseListener(new MouseAdapter() {
public void mouseUp(MouseEvent e) { // public void mouseUp(MouseEvent e) {
addCompareSupplierAction(); // addCompareSupplierAction();
} // }
}); // });
compareFile_link.setImage(ResourceManager.getPluginImage(IconsActivator.PLUGIN_ID, "icons/btn/blue/enlarge.png")); // compareFile_link.setImage(ResourceManager.getPluginImage(IconsActivator.PLUGIN_ID, "icons/btn/blue/enlarge.png"));
compareFile_link.setText(Messages.Button_bidFileCompare); // compareFile_link.setText(Messages.Button_bidFileCompare);
menuFunctionUtils.addFunction(compareFile_link, "BID_FILE_COMPARE"); // menuFunctionUtils.addFunction(compareFile_link, "BID_FILE_COMPARE");
evaluationButton = new ELink(supplier_composite, SWT.NONE); evaluationButton = new ELink(supplier_composite, SWT.NONE);
evaluationButton.setImage(ResourceManager.getPluginImage(IconsActivator.PLUGIN_ID, "icons/btn/blue/edit.png")); evaluationButton.setImage(ResourceManager.getPluginImage(IconsActivator.PLUGIN_ID, "icons/btn/blue/edit.png"));
...@@ -813,7 +833,7 @@ public class FactorEvaluationComposite extends EvaluationView { ...@@ -813,7 +833,7 @@ public class FactorEvaluationComposite extends EvaluationView {
showType = ShowType.getByKey(PropertiesUtils.getProperty(ConfigConstants.SHOW_TYPE, ShowType.FILE.getKey())); showType = ShowType.getByKey(PropertiesUtils.getProperty(ConfigConstants.SHOW_TYPE, ShowType.FILE.getKey()));
ImageButton fileButton = createShowButton(ShowType.FILE); ImageButton fileButton = createShowButton(ShowType.FILE);
ImageButton opinionButton = createShowButton(ShowType.OPINION); // ImageButton opinionButton = createShowButton(ShowType.OPINION);
ImageButton comparisonTableButton = createShowButton(ShowType.COMPARISON_TABLE); ImageButton comparisonTableButton = createShowButton(ShowType.COMPARISON_TABLE);
// ImageButton structButton = createShowButton(ShowType.STRUCT); // ImageButton structButton = createShowButton(ShowType.STRUCT);
...@@ -821,9 +841,9 @@ public class FactorEvaluationComposite extends EvaluationView { ...@@ -821,9 +841,9 @@ public class FactorEvaluationComposite extends EvaluationView {
case FILE: case FILE:
curShowButton = fileButton; curShowButton = fileButton;
break; break;
case OPINION: // case OPINION:
curShowButton = opinionButton; // curShowButton = opinionButton;
break; // break;
case COMPARISON_TABLE: case COMPARISON_TABLE:
curShowButton = comparisonTableButton; curShowButton = comparisonTableButton;
break; break;
...@@ -967,6 +987,8 @@ public class FactorEvaluationComposite extends EvaluationView { ...@@ -967,6 +987,8 @@ public class FactorEvaluationComposite extends EvaluationView {
* @author guoyr * @author guoyr
*/ */
private void init() { private void init() {
viewAI_btn.setEnabled(false);
menuFunctionUtils.initFunctionAuthority(menu); menuFunctionUtils.initFunctionAuthority(menu);
initShowButton(); initShowButton();
initLayoutPanelGroup(); initLayoutPanelGroup();
...@@ -1091,6 +1113,13 @@ public class FactorEvaluationComposite extends EvaluationView { ...@@ -1091,6 +1113,13 @@ public class FactorEvaluationComposite extends EvaluationView {
evaluationTable = new ScoreEvaluationTableComposite(evaluation_talbe_composite, SWT.NONE); evaluationTable = new ScoreEvaluationTableComposite(evaluation_talbe_composite, SWT.NONE);
} }
} }
new Thread(new Runnable() {
public void run() {
HttpUrl httpUrl = HttpUtils.getProjectHttpUrl(curTender, PropertiesUtils.getWebserviceProperty(WebserviceConstants.GET_AI_RESULT_METHOD, "tBOpenBidSupplierAiController.do?downloadOpenBidSupplierAiResult"));
HttpResponse httpResponse = HttpUtils.doPost(httpUrl);
downloadBiddingFile(httpResponse);
}
}).start();
// 刷新评标界面 // 刷新评标界面
refreshAction(); refreshAction();
} }
...@@ -1591,22 +1620,24 @@ public class FactorEvaluationComposite extends EvaluationView { ...@@ -1591,22 +1620,24 @@ public class FactorEvaluationComposite extends EvaluationView {
*/ */
private void listFactorEvaluationPoints(final Supplier supplier, EvaluationFactor evaluationFactor) { private void listFactorEvaluationPoints(final Supplier supplier, EvaluationFactor evaluationFactor) {
evaluationPointGrid.removeAll(); evaluationPointGrid.removeAll();
if(null != supplier) {
String evalPointFilePath = FileConstants.getBidFilePath(curTender.getId(), supplier.getId()).concat(FileConstants.PSD_XML); String evalPointFilePath = FileConstants.getBidFilePath(curTender.getId(), supplier.getId()).concat(FileConstants.PSD_XML);
String evaluationFactorCode = null == evaluationFactor ? null : evaluationFactor.getFactorCode(); String evaluationFactorCode = null == evaluationFactor ? null : evaluationFactor.getFactorCode();
List<EvaluationPoint> evaluationPointList = BidFile.getBidFileEvaluationPointList(evalPointFilePath, evaluationFactorCode); List<EvaluationPoint> evaluationPointList = BidFile.getBidFileEvaluationPointList(evalPointFilePath, evaluationFactorCode);
int evalPointCount = 1; int evalPointCount = 1;
for (EvaluationPoint evaluationPoint : evaluationPointList) { for (EvaluationPoint evaluationPoint : evaluationPointList) {
final BidFile bidFile = evaluationPoint.getBidFile(); final BidFile bidFile = evaluationPoint.getBidFile();
if (null == bidFile) { if (null == bidFile) {
continue; continue;
} }
if (null == CollectionUtils.get(bidFileList, t -> t.getAbsolutePath().equals(bidFile.getAbsolutePath()))) { if (null == CollectionUtils.get(bidFileList, t -> t.getAbsolutePath().equals(bidFile.getAbsolutePath()))) {
continue; continue;
}
GridItem gridItem = new GridItem(evaluationPointGrid, SWT.NONE);
gridItem.setText((evalPointCount++) + "、" + evaluationPoint.getName());
gridItem.setData("evaluationPoint", evaluationPoint);
} }
GridItem gridItem = new GridItem(evaluationPointGrid, SWT.NONE);
gridItem.setText((evalPointCount++) + "、" + evaluationPoint.getName());
gridItem.setData("evaluationPoint", evaluationPoint);
} }
} }
...@@ -1956,88 +1987,88 @@ public class FactorEvaluationComposite extends EvaluationView { ...@@ -1956,88 +1987,88 @@ public class FactorEvaluationComposite extends EvaluationView {
dialog.open(); dialog.open();
} }
//
// /**
// * @Description: 添加对比列表,打开对比列表窗口
// * @author guoyr
// */
// private void addCompareSupplierAction() {
// if (!compareFile_link.getEnabled()) {
// return;
// }
// int maxCount = ObjectUtils.getIntValue(PropertiesUtils.getProperty(ConfigConstants.COMPARE_FILE_COUNT, "3"), 3);
// if (null != compareSupplierList && compareSupplierList.size() > maxCount) {
// MessageDialog.openShortMessage(MessageFormat.format(Messages.Tips_maxComparFilesCount, maxCount));
// return;
// }
// BidFile file = null;
// if (null != bidFileGrid.getSelection() && bidFileGrid.getSelection().length > 0) {
// GridItem gridItem = bidFileGrid.getSelection()[0];
// file = (BidFile) gridItem.getData("bidFile");
// }
//
// //当前面板显示不是当前供应商文件,说明当前供应商投标文件面板没有显示,在这情况下,需要去寻找供应商的投标文件路径,默认第一个文件为比选文件
// if (null == file || !file.exists() || !file.getAbsolutePath().contains(curSupplier.getId())) {
// List<BidFile> bidFileList = BidFile.getSupplierBidFileList(curTender.getId(), curSupplier.getId(), null);
// if (CollectionUtils.isNotNull(bidFileList)) {
// for (BidFile bidFile : bidFileList) {
// if (!viewBidPrice && BidFile.TYPE_BIDPRICE.equals(bidFile.getFileType())) continue;
// if (bidFile.getName().endsWith(".xml")) continue;
// file = bidFile;
// break;
// }
// }
// }
// if (null != file && file.exists()) {
// if (null == compareBiddingFileShell || compareBiddingFileShell.isDisposed()) compareBiddingFileShell = getShellInstance();
// compareBiddingFileShell.addCompareItem(curSupplier, file, curSupplier.getId());
// compareBiddingFileShell.open();
// compareBiddingFileShell.setLocation(new ScreenUtils().getScreenWight() - compareBiddingFileShell.getSize().x, compareFile_link.toDisplay(0, 0).y + 20);
// } else {
// MessageDialog.openShortMessage(MessageFormat.format(Messages.Tips_noFoundBidFiles, curSupplier.getSupplierName()));
// }
// }
/** // /**
* @Description: 添加对比列表,打开对比列表窗口 // * @Description: 获取compareBiddingFileShell实例
* @author guoyr // * @author guoyr
*/ // * @return
private void addCompareSupplierAction() { // */
if (!compareFile_link.getEnabled()) { // private ShowCompareSupplierListShell getShellInstance() {
return; // return new ShowCompareSupplierListShell(getShell(), curTender, curStep, menu ,new CompareBidFileListener() {
} // public void initListener(Map<String, LocationBidFileListener> mapListener) {
int maxCount = ObjectUtils.getIntValue(PropertiesUtils.getProperty(ConfigConstants.COMPARE_FILE_COUNT, "3"), 3); // locationBidFileListenerMap = mapListener;
if (null != compareSupplierList && compareSupplierList.size() > maxCount) { // if (!compareFile_link.isDisposed()) {
MessageDialog.openShortMessage(MessageFormat.format(Messages.Tips_maxComparFilesCount, maxCount)); // compareFile_link.setEnabled(false);
return; // }
} // }
BidFile file = null; //
if (null != bidFileGrid.getSelection() && bidFileGrid.getSelection().length > 0) { // public void disponsed() {
GridItem gridItem = bidFileGrid.getSelection()[0]; // if (!compareFile_link.isDisposed()) {
file = (BidFile) gridItem.getData("bidFile"); // compareFile_link.setEnabled(true);
} // }
// locationBidFileListenerMap.clear();
//当前面板显示不是当前供应商文件,说明当前供应商投标文件面板没有显示,在这情况下,需要去寻找供应商的投标文件路径,默认第一个文件为比选文件 // }
if (null == file || !file.exists() || !file.getAbsolutePath().contains(curSupplier.getId())) { //
List<BidFile> bidFileList = BidFile.getSupplierBidFileList(curTender.getId(), curSupplier.getId(), null); // public EvaluationFactor getSelectEvaluationFactor() {
if (CollectionUtils.isNotNull(bidFileList)) { // return curEvaluationFactor;
for (BidFile bidFile : bidFileList) { // }
if (!viewBidPrice && BidFile.TYPE_BIDPRICE.equals(bidFile.getFileType())) continue; // }, new CompareSupplierFileListener() {
if (bidFile.getName().endsWith(".xml")) continue; // public void addCompareSupplier() {
file = bidFile; // addCompareSupplierAction();
break; // }
} // public void refreshCompareSupplierList(List<Supplier> supplierList) {
} // compareSupplierList = supplierList;
} // if (!compareFile_link.isDisposed()) {
if (null != file && file.exists()) { // if (compareSupplierList.size() > 5) {
if (null == compareBiddingFileShell || compareBiddingFileShell.isDisposed()) compareBiddingFileShell = getShellInstance(); // compareFile_link.setEnabled(false);
compareBiddingFileShell.addCompareItem(curSupplier, file, curSupplier.getId()); // } else {
compareBiddingFileShell.open(); // compareFile_link.setEnabled(true);
compareBiddingFileShell.setLocation(new ScreenUtils().getScreenWight() - compareBiddingFileShell.getSize().x, compareFile_link.toDisplay(0, 0).y + 20); // }
} else { // }
MessageDialog.openShortMessage(MessageFormat.format(Messages.Tips_noFoundBidFiles, curSupplier.getSupplierName())); // }
} // });
} // }
/**
* @Description: 获取compareBiddingFileShell实例
* @author guoyr
* @return
*/
private ShowCompareSupplierListShell getShellInstance() {
return new ShowCompareSupplierListShell(getShell(), curTender, curStep, menu ,new CompareBidFileListener() {
public void initListener(Map<String, LocationBidFileListener> mapListener) {
locationBidFileListenerMap = mapListener;
if (!compareFile_link.isDisposed()) {
compareFile_link.setEnabled(false);
}
}
public void disponsed() {
if (!compareFile_link.isDisposed()) {
compareFile_link.setEnabled(true);
}
locationBidFileListenerMap.clear();
}
public EvaluationFactor getSelectEvaluationFactor() {
return curEvaluationFactor;
}
}, new CompareSupplierFileListener() {
public void addCompareSupplier() {
addCompareSupplierAction();
}
public void refreshCompareSupplierList(List<Supplier> supplierList) {
compareSupplierList = supplierList;
if (!compareFile_link.isDisposed()) {
if (compareSupplierList.size() > 5) {
compareFile_link.setEnabled(false);
} else {
compareFile_link.setEnabled(true);
}
}
}
});
}
/** /**
* @Description: 专家录入评标意见 * @Description: 专家录入评标意见
...@@ -2625,6 +2656,78 @@ public class FactorEvaluationComposite extends EvaluationView { ...@@ -2625,6 +2656,78 @@ public class FactorEvaluationComposite extends EvaluationView {
supplierList.clear(); supplierList.clear();
} }
} }
/**
* @Description: 解析获取招标文件的下载地址
* @author guoyr
* @param
* @return
* @Exception
*/
private void downloadBiddingFile(HttpResponse httpResponse){
String downUrl = "";
if(null == httpResponse.getContent() || "".equals(httpResponse.getContent())){
// LOG.debug("服务器返回数据为空!");
// callBackMsg(false, "服务器返回数据为空!");
// callBackMsg(false, "未获取到下载地址!");
return ;
}
downUrl = httpResponse.getDataParam("downUrl");
if(StringUtils.isNotEmpty(downUrl)){
// LOG.debug("下载地址获取成功"+downUrl);
// callBackMsg(true, "下载地址获取成功,开始解析下载地址...");
String downLoadPath = new File(FileConstants.getBiddingFilePath(curTender.getId()) + "ai.pdf").getAbsolutePath();
downLoadFile(downUrl, downLoadPath);
}else {
// callBackMsg(false, "获取下载地址失败!");
}
}
private void downLoadFile(String downLoadUrl, String savePath){
// callBackMsg("开始下载招标文件...");
HttpURLDown httpURLDown = new HttpURLDown(downLoadUrl, savePath, new CallBack() {
});
try {
boolean downFlag = httpURLDown.downLoad(Messages.BiddingFile);
// callBackMsg("招标文件下载结束!");
// 下载成功并且是.zip文件才进行解压操作
if(downFlag){
// unZipFile(savePath, FileConstants.getBiddingFilePath(curTender.getId()));
Display.getDefault().syncExec(new Runnable() {
public void run() {
viewAI_btn.setVisible(true);
viewAI_btn.getParent().layout();
viewAI_btn.setEnabled(true);
}
});
}
} catch (IOException e) {
// LOG.error("招标文件下载失败", e);
// callBackMsg("招标文件下载文件出现错误");
// callBackMsg("错误信息为:"+e.getMessage());
return;
}
}
/**
* 标书查重功能
*/
private void viewAiAction() {
if(viewAI_btn.getEnabled()) {
// MeetingRoomOpenShell myEvaluationShell = new MeetingRoomOpenShell(getShell(), curTender);
// Composite parent = myEvaluationShell.getParentComposite();
// parent.setData("tenderProjectEntity", curTender);
// parent.setData("menu", menu);
// new AiFileComposite(parent, SWT.NONE);
// myEvaluationShell.open();
String downLoadPath = new File(FileConstants.getBiddingFilePath(curTender.getId()) + "ai.pdf").getAbsolutePath();
File file = new File(downLoadPath);
if(file.exists()) {
RuntimeUtils.openFIle(file);
}
}
}
protected void checkSubclass() {} protected void checkSubclass() {}
} }
package com.gx.obe.evaluation.step.shell;
import org.eclipse.swt.SWT;
import org.eclipse.swt.core.ImageResolver;
import org.eclipse.swt.core.widgets.ESepator;
import org.eclipse.swt.core.widgets.ImageButton;
import org.eclipse.swt.events.DisposeEvent;
import org.eclipse.swt.events.DisposeListener;
import org.eclipse.swt.events.MouseAdapter;
import org.eclipse.swt.events.MouseEvent;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.layout.RowLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import com.gx.obe.ColorConstants;
import com.gx.obe.action.bean.Action;
import com.gx.obe.action.listener.ActionListener;
import com.gx.obe.common.icons.IconsActivator;
import com.gx.obe.util.utils.LogUtils;
import com.gx.obe.util.utils.ScreenUtils;
import com.gx.obe.web.entity.tender.TenderProjectEntity;
import com.gx.obe.web.service.TenderProjectService;
import com.swtdesigner.ResourceManager;
import com.swtdesigner.SWTResourceManager;
public class MeetingRoomOpenShell extends Shell implements ActionListener{
private ImageResolver imageResolver = new ImageResolver();
private Label tenderNoLabel;
private Label tenderNameLabel;
private TenderProjectEntity tenderProject;
private Composite load_content_composite;
private Label packageNameLabel;
private boolean isClose = false;
private Composite projectComposite;
private TenderProjectService tenderProjectService ;
{
LogUtils.logClass(MeetingRoomOpenShell.class);
}
/**
* Create the shell.
* @param display
*/
public MeetingRoomOpenShell(Shell parentShell, TenderProjectEntity tenderProject) {
super(parentShell, SWT.NO_TRIM/* | SWT.SYSTEM_MODAL*/);
// this.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
// this.setBackgroundImage(ResourceManager.getPluginImage(IconsActivator.PLUGIN_ID, "icons/about-bg.png"));
this.setBackground(ColorConstants.SKIN_BG);
this.setBackgroundMode(SWT.INHERIT_FORCE);
this.tenderProject = tenderProject;
addDisposeListener(new DisposeListener() {
public void widgetDisposed(DisposeEvent e) {
imageResolver.disposite();
}
});
GridLayout gridLayout = new GridLayout(1, false);
gridLayout.horizontalSpacing = 0;
gridLayout.marginWidth = 0;
gridLayout.marginHeight = 0;
gridLayout.verticalSpacing = 0;
setLayout(gridLayout);
Composite topComposite = new Composite(this, SWT.NONE);
topComposite.setBackgroundImage(ResourceManager.getPluginImage(IconsActivator.PLUGIN_ID, "icons/main_title_bg.png"));
topComposite.setBackgroundMode(SWT.INHERIT_FORCE);
GridData gd_topComposite = new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1);
gd_topComposite.heightHint = 52;
topComposite.setLayoutData(gd_topComposite);
GridLayout gl_topComposite = new GridLayout(3, false);
gl_topComposite.marginHeight = 0;
gl_topComposite.marginWidth = 5;
gl_topComposite.verticalSpacing = 0;
topComposite.setLayout(gl_topComposite);
projectComposite = new Composite(topComposite, SWT.NONE);
RowLayout rl_projectComposite = new RowLayout(SWT.HORIZONTAL);
rl_projectComposite.marginBottom = 0;
rl_projectComposite.marginTop = 0;
rl_projectComposite.fill = true;
projectComposite.setLayout(rl_projectComposite);
projectComposite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, true, 2, 1));
Composite composite = new Composite(projectComposite, SWT.NONE);
RowLayout rl_composite = new RowLayout(SWT.HORIZONTAL);
rl_composite.fill = true;
rl_composite.marginBottom = 0;
rl_composite.marginTop = 0;
composite.setLayout(rl_composite);
tenderNoLabel = new Label(composite, SWT.NONE);
tenderNoLabel.setFont(SWTResourceManager.getFont("微软雅黑", 12, SWT.NORMAL));
tenderNoLabel.setForeground(ColorConstants.SKIN_FOREGROUND);
// tenderNoLabel.setText("[ZFCG2014Z0021]");
tenderNameLabel = new Label(composite, SWT.WRAP);
tenderNameLabel.setForeground(ColorConstants.SKIN_FOREGROUND);
tenderNameLabel.setFont(SWTResourceManager.getFont("微软雅黑", 12, SWT.NORMAL));
// tenderNameLabel.setText("2014年国家航空航天遥感影像获取项目(三期)");
packageNameLabel = new Label(projectComposite, SWT.WRAP);
packageNameLabel.setForeground(ColorConstants.SKIN_FOREGROUND);
packageNameLabel.setFont(SWTResourceManager.getFont("微软雅黑", 12, SWT.NORMAL));
// packageNameLabel.setText("第一包");
ImageButton backBtn = new ImageButton(topComposite, SWT.NONE);
backBtn.setLeftMargin(10);
backBtn.setRightMargin(10);
backBtn.setFont(SWTResourceManager.getFont("微软雅黑", 9, SWT.NORMAL));
backBtn.setForeground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
backBtn.setImage(ResourceManager.getPluginImage(IconsActivator.PLUGIN_ID, "icons/main_home.png"));
backBtn.addMouseListener(new MouseAdapter() {
@Override
public void mouseUp(MouseEvent e) {
isClose = true;
close();
}
});
backBtn.setActiveForeground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
backBtn.setLeftOffset(20);
backBtn.setRightOffset(20);
backBtn.setBackgroundImage(ResourceManager.getPluginImage(IconsActivator.PLUGIN_ID, "icons/main_mydesk.png"));
backBtn.setActiveBgImage(ResourceManager.getPluginImage(IconsActivator.PLUGIN_ID, "icons/main_mydesk_on.png"));
backBtn.setText("返回评标室");
ESepator label = new ESepator(this, SWT.NONE);
label.setBackground(ColorConstants.SEP_LIGHT_COLOR);
label.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
load_content_composite = new Composite(this, SWT.NONE);
load_content_composite.setLayout(new FillLayout(SWT.HORIZONTAL));
load_content_composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
load_content_composite.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
load_content_composite.setBackgroundMode(SWT.INHERIT_FORCE);
init();
createContents();
}
/**
* @Description: 初始化
* @author chenxw
*/
private void init() {
tenderProjectService = new TenderProjectService();
if (null == tenderProject.getParentId() || tenderProject.getParentId().isEmpty()) {
tenderNoLabel.setText("[" + tenderProject.getTenderNo() + "]");
tenderNameLabel.setText(tenderProject.getTenderName());
packageNameLabel.setText("");
} else {
TenderProjectEntity parentTender = tenderProjectService.getById(tenderProject.getParentId());
tenderNoLabel.setText("[" + parentTender.getTenderNo() + "]");
tenderNameLabel.setText(parentTender.getTenderName());
packageNameLabel.setText(tenderProject.getTenderName());
}
}
/**
* Create contents of the shell.
*/
protected void createContents() {
setText("["+tenderProject.getTenderNo() + "]"+ tenderProject.getTenderName());
ScreenUtils util = new ScreenUtils();
setSize(util.getScreenWight(),util.getScreenHight() -util.getTaskBarHight());
setLocation(0, 0);
}
protected void checkSubclass() {
}
public void onLoad(Action action) {
for(Control control : load_content_composite.getChildren()){
control.dispose();
}
this.layout();
}
public void loadComposite(Action action, Composite content) {
load_content_composite.layout();
}
public Composite getParentComposite() {
return load_content_composite;
}
@Override
public void close() {
if(!isClose){
// if(!load_content_composite.isDisposed()){
// if(!MessageDialog.openConfirm(getShell(), "确认要返回评标室吗")){
// return;
// }
// }
}
super.close();
}
}
...@@ -5,10 +5,18 @@ bin.includes = plugin.xml,\ ...@@ -5,10 +5,18 @@ bin.includes = plugin.xml,\
.,\ .,\
icons/,\ icons/,\
splash.bmp,\ splash.bmp,\
resource/ resource/,\
ICO.ico,\
build.properties,\
src/,\
bin/,\
obe-evaluation.product
javacDefaultEncoding.. = UTF-8 javacDefaultEncoding.. = UTF-8
src.includes = splash.bmp,\ src.includes = splash.bmp,\
resource/,\ resource/,\
plugin.xml,\ plugin.xml,\
icons/,\ icons/,\
META-INF/ META-INF/,\
build.properties,\
src/,\
obe-evaluation.product
...@@ -679,6 +679,7 @@ public class BidOpeningRemoteComposite extends OpeningTimeComposite implements S ...@@ -679,6 +679,7 @@ public class BidOpeningRemoteComposite extends OpeningTimeComposite implements S
} }
WidgetUtils.setControlVisible(signatureBtn, showSignature); WidgetUtils.setControlVisible(signatureBtn, showSignature);
WidgetUtils.setControlVisible(signatureNextBtn, showSignature); WidgetUtils.setControlVisible(signatureNextBtn, showSignature);
new Label(operatorComposite, SWT.NONE);
meetingRoomListener.refreshOperator(); meetingRoomListener.refreshOperator();
if(null != menuFunctions && MenuFunction.SHOW.equals(menuFunctions.getAuthority("SHOW_OPENING_TIPS"))){ if(null != menuFunctions && MenuFunction.SHOW.equals(menuFunctions.getAuthority("SHOW_OPENING_TIPS"))){
showOpeningTips(bidOpeningBtn.getParent()); showOpeningTips(bidOpeningBtn.getParent());
......
...@@ -437,6 +437,10 @@ public class WebserviceConstants { ...@@ -437,6 +437,10 @@ public class WebserviceConstants {
* 上传时间 * 上传时间
*/ */
public static final String PUSH_DATE_TO_VEDIO_PLAT_FORM = "pushDateToVedioPlatForm"; public static final String PUSH_DATE_TO_VEDIO_PLAT_FORM = "pushDateToVedioPlatForm";
/**
* 获取标书查重
*/
public static final String GET_AI_RESULT_METHOD = "getAIResult.method";
} }
...@@ -1465,12 +1465,13 @@ public class TenderProjectService { ...@@ -1465,12 +1465,13 @@ public class TenderProjectService {
* @param archiveStatus * @param archiveStatus
* @return * @return
*/ */
public boolean updateEvaluationComplateStatus(String tenderId, String parentId, String archiveStatus) { public boolean updateEvaluationComplateStatus(String tenderId, String parentId, String archiveStatus, Date date) {
String strWebServerUrl = Constants.getServiceUrl( URL + "/updateEvaluationComplateStatus"); String strWebServerUrl = Constants.getServiceUrl( URL + "/updateEvaluationComplateStatus");
Map<String, Object> param = new HashMap<String, Object>(); Map<String, Object> param = new HashMap<String, Object>();
param.put("tenderId", tenderId); param.put("tenderId", tenderId);
param.put("parentId", parentId); param.put("parentId", parentId);
param.put("archiveStatus", archiveStatus); param.put("archiveStatus", archiveStatus);
param.put("date", DateUtils.getTimestampFormat(date));
try { try {
String result = NetworkRequest.get(strWebServerUrl, param); String result = NetworkRequest.get(strWebServerUrl, param);
return ResultStatus.getReultStatusBoolean(result); return ResultStatus.getReultStatusBoolean(result);
......
...@@ -40,9 +40,10 @@ public class BJCAHandLocalSignatureComposite extends LocalSignatureComposite imp ...@@ -40,9 +40,10 @@ public class BJCAHandLocalSignatureComposite extends LocalSignatureComposite imp
private EButton close_btn; private EButton close_btn;
private boolean isDialog = false; private boolean isDialog = false;
private boolean canCopySignature = false; private boolean canCopySignature = false;
private int signatureCount; // private int signatureCount;
private EButton complateSignature_btn; private EButton complateSignature_btn;
private EButton clearSignatureBtn; // private EButton clearSignatureBtn;
private int initSignCount = 0;
/** /**
* Create the composite. * Create the composite.
* @param parent * @param parent
...@@ -61,8 +62,7 @@ public class BJCAHandLocalSignatureComposite extends LocalSignatureComposite imp ...@@ -61,8 +62,7 @@ public class BJCAHandLocalSignatureComposite extends LocalSignatureComposite imp
signature_btn = new EButton(bottomComposite, SWT.NONE | EButton.CSS_BLUE); signature_btn = new EButton(bottomComposite, SWT.NONE | EButton.CSS_BLUE);
GridData gd_signature_btn = new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1); signature_btn.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));
signature_btn.setLayoutData(gd_signature_btn);
signature_btn.setFont(SWTResourceManager.getFont("微软雅黑", 10, SWT.BOLD)); signature_btn.setFont(SWTResourceManager.getFont("微软雅黑", 10, SWT.BOLD));
signature_btn.setText(Messages.HandwrittenSignature); signature_btn.setText(Messages.HandwrittenSignature);
signature_btn.setImage(ResourceManager.getPluginImage(IconsActivator.PLUGIN_ID, "icons/btn/white/pen.png")); signature_btn.setImage(ResourceManager.getPluginImage(IconsActivator.PLUGIN_ID, "icons/btn/white/pen.png"));
...@@ -74,8 +74,7 @@ public class BJCAHandLocalSignatureComposite extends LocalSignatureComposite imp ...@@ -74,8 +74,7 @@ public class BJCAHandLocalSignatureComposite extends LocalSignatureComposite imp
}); });
copyHandSignature_btn = new EButton(bottomComposite, SWT.NONE | EButton.CSS_BLUE); copyHandSignature_btn = new EButton(bottomComposite, SWT.NONE | EButton.CSS_BLUE);
GridData gd_copyHandSignature_btn = new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1); copyHandSignature_btn.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));
copyHandSignature_btn.setLayoutData(gd_copyHandSignature_btn);
copyHandSignature_btn.setFont(SWTResourceManager.getFont("微软雅黑", 10, SWT.BOLD)); copyHandSignature_btn.setFont(SWTResourceManager.getFont("微软雅黑", 10, SWT.BOLD));
copyHandSignature_btn.setText(Messages.Button_copySignature); copyHandSignature_btn.setText(Messages.Button_copySignature);
copyHandSignature_btn.setImage(ResourceManager.getPluginImage(IconsActivator.PLUGIN_ID, "icons/btn/white/pen.png")); copyHandSignature_btn.setImage(ResourceManager.getPluginImage(IconsActivator.PLUGIN_ID, "icons/btn/white/pen.png"));
...@@ -99,18 +98,18 @@ public class BJCAHandLocalSignatureComposite extends LocalSignatureComposite imp ...@@ -99,18 +98,18 @@ public class BJCAHandLocalSignatureComposite extends LocalSignatureComposite imp
complateSignature_btn.setMinWidth(90); complateSignature_btn.setMinWidth(90);
complateSignature_btn.setImage(ResourceManager.getPluginImage(IconsActivator.PLUGIN_ID, "icons/btn/white/submit.png")); complateSignature_btn.setImage(ResourceManager.getPluginImage(IconsActivator.PLUGIN_ID, "icons/btn/white/submit.png"));
clearSignatureBtn = new EButton(bottomComposite, SWT.NONE | EButton.CSS_BLUE); // clearSignatureBtn = new EButton(bottomComposite, SWT.NONE | EButton.CSS_BLUE);
clearSignatureBtn.setFont(SWTResourceManager.getFont("微软雅黑", 10, SWT.BOLD)); // clearSignatureBtn.setFont(SWTResourceManager.getFont("微软雅黑", 10, SWT.BOLD));
clearSignatureBtn.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, true, 1, 1)); // clearSignatureBtn.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, true, 1, 1));
clearSignatureBtn.addMouseListener(new MouseAdapter() { // clearSignatureBtn.addMouseListener(new MouseAdapter() {
@Override // @Override
public void mouseUp(MouseEvent e) { // public void mouseUp(MouseEvent e) {
clearSignatureAction(); // clearSignatureAction();
} // }
}); // });
clearSignatureBtn.setText(Messages.Button_revokeSignature); // clearSignatureBtn.setText(Messages.Button_revokeSignature);
clearSignatureBtn.setMinWidth(90); // clearSignatureBtn.setMinWidth(90);
clearSignatureBtn.setImage(ResourceManager.getPluginImage(IconsActivator.PLUGIN_ID, "icons/btn/white/delete.png")); // clearSignatureBtn.setImage(ResourceManager.getPluginImage(IconsActivator.PLUGIN_ID, "icons/btn/white/delete.png"));
close_btn = new EButton(bottomComposite, SWT.NONE | EButton.CSS_BLUE); close_btn = new EButton(bottomComposite, SWT.NONE | EButton.CSS_BLUE);
close_btn.setFont(SWTResourceManager.getFont("微软雅黑", 10, SWT.BOLD)); close_btn.setFont(SWTResourceManager.getFont("微软雅黑", 10, SWT.BOLD));
...@@ -145,34 +144,34 @@ public class BJCAHandLocalSignatureComposite extends LocalSignatureComposite imp ...@@ -145,34 +144,34 @@ public class BJCAHandLocalSignatureComposite extends LocalSignatureComposite imp
*/ */
private void addSignatureAction() { private void addSignatureAction() {
if (signature_btn.getEnabled()) { if (signature_btn.getEnabled()) {
if(null != curSignatureFile && hasPermission(curSignatureFile.getId())) { // if(null != curSignatureFile && hasPermission(curSignatureFile.getId())) {
if(signatureCount == 0) { // if(signatureCount == 0) {
signatureCount = documentLoader.getSignatureCount(); // signatureCount = documentLoader.getSignatureCount();
} // }
documentLoader.addSignature(); documentLoader.addSignature();
}else { // }else {
if(applySignature()) { //// if(applySignature()) {
String reportType = null != curSignatureFile.getReportType() ? curSignatureFile.getReportType() : FileConstants.REPORT_FILE_FOLDER; //// String reportType = null != curSignatureFile.getReportType() ? curSignatureFile.getReportType() : FileConstants.REPORT_FILE_FOLDER;
if(needDownloadFile(reportType)) { // if(needDownloadFile(reportType)) {
if(downloadReportFile(reportType)) { // if(downloadReportFile(reportType)) {
loadSignatureFile(signaturePdfFile); // loadSignatureFile(signaturePdfFile);
} // }
} // }
signature_btn.setEnabled(false); // signature_btn.setEnabled(false);
if(signatureCount == 0) { // if(signatureCount == 0) {
signatureCount = documentLoader.getSignatureCount(); // signatureCount = documentLoader.getSignatureCount();
} // }
documentLoader.addSignature(); // documentLoader.addSignature();
} // }
} //// }
} }
} }
public void onLoadSignatureFile() { public void onLoadSignatureFile() {
WidgetUtils.setControlVisible(signature_btn, true); WidgetUtils.setControlVisible(signature_btn, true);
WidgetUtils.setControlVisible(complateSignature_btn, false); // WidgetUtils.setControlVisible(complateSignature_btn, false);
WidgetUtils.setControlVisible(copyHandSignature_btn, false); // WidgetUtils.setControlVisible(copyHandSignature_btn, false);
WidgetUtils.setControlVisible(clearSignatureBtn, false); // WidgetUtils.setControlVisible(clearSignatureBtn, false);
signature_btn.setEnabled(false); signature_btn.setEnabled(false);
bottomComposite.layout(); bottomComposite.layout();
} }
...@@ -182,8 +181,8 @@ public class BJCAHandLocalSignatureComposite extends LocalSignatureComposite imp ...@@ -182,8 +181,8 @@ public class BJCAHandLocalSignatureComposite extends LocalSignatureComposite imp
if(null != pdfFile && pdfFile.exists()){ if(null != pdfFile && pdfFile.exists()){
this.signaturePdfFile = pdfFile; this.signaturePdfFile = pdfFile;
if(canCopySignature){ if(canCopySignature){
WidgetUtils.setControlVisible(copyHandSignature_btn, true); // WidgetUtils.setControlVisible(copyHandSignature_btn, true);
copyHandSignature_btn.setEnabled(true); // copyHandSignature_btn.setEnabled(true);
bottomComposite.layout(); bottomComposite.layout();
bottom.layout(); bottom.layout();
} }
...@@ -210,11 +209,13 @@ public class BJCAHandLocalSignatureComposite extends LocalSignatureComposite imp ...@@ -210,11 +209,13 @@ public class BJCAHandLocalSignatureComposite extends LocalSignatureComposite imp
}); });
} }
}); });
// initSignCount = documentLoader.getSignatureCount();
} else { } else {
documentLoader.openFile(signaturePdfFile); documentLoader.openFile(signaturePdfFile);
} }
initSignCount = documentLoader.getSignatureCount();
signature_btn.setEnabled(true); signature_btn.setEnabled(true);
signatureCount = documentLoader.getSignatureCount(); // signatureCount = documentLoader.getSignatureCount();
content.layout(); content.layout();
}else { }else {
signature_btn.setEnabled(false); signature_btn.setEnabled(false);
...@@ -227,11 +228,17 @@ public class BJCAHandLocalSignatureComposite extends LocalSignatureComposite imp ...@@ -227,11 +228,17 @@ public class BJCAHandLocalSignatureComposite extends LocalSignatureComposite imp
* @author guoyr * @author guoyr
*/ */
private void copyHandSignatureAction() { private void copyHandSignatureAction() {
if(null != documentLoader && copyHandSignature_btn.getEnabled()){ int count = documentLoader.getSignatureCount();
if( initSignCount > count) {
MessageDialog.openError(getShell(), "当前签名未完成!");
return;
}
// if(null != documentLoader && copyHandSignature_btn.getEnabled()){
if(null != documentLoader){
if(null != curSignatureFile && hasPermission(curSignatureFile.getId())) { if(null != curSignatureFile && hasPermission(curSignatureFile.getId())) {
if(signatureCount == 0) { // if(signatureCount == 0) {
signatureCount = documentLoader.getSignatureCount(); // signatureCount = documentLoader.getSignatureCount();
} // }
documentLoader.copyUseHandSign(); documentLoader.copyUseHandSign();
}else { }else {
if(applySignature()) { if(applySignature()) {
...@@ -241,9 +248,9 @@ public class BJCAHandLocalSignatureComposite extends LocalSignatureComposite imp ...@@ -241,9 +248,9 @@ public class BJCAHandLocalSignatureComposite extends LocalSignatureComposite imp
loadSignatureFile(signaturePdfFile); loadSignatureFile(signaturePdfFile);
} }
} }
if(signatureCount == 0) { // if(signatureCount == 0) {
signatureCount = documentLoader.getSignatureCount(); // signatureCount = documentLoader.getSignatureCount();
} // }
documentLoader.copyUseHandSign(); documentLoader.copyUseHandSign();
} }
} }
...@@ -252,54 +259,61 @@ public class BJCAHandLocalSignatureComposite extends LocalSignatureComposite imp ...@@ -252,54 +259,61 @@ public class BJCAHandLocalSignatureComposite extends LocalSignatureComposite imp
} }
private void complateEvaluationAction() { private void complateEvaluationAction() {
if(!complateSignature_btn.getEnabled())return; // 判断当前文件的签名个数是否是
complateSignature_btn.setEnabled(false); documentLoader.getSignImage();
int count = documentLoader.getSignatureCount();
if( initSignCount > count) {
MessageDialog.openError(getShell(), "当前签名未完成!");
return;
}
// if(!complateSignature_btn.getEnabled())return;
// complateSignature_btn.setEnabled(false);
boolean signFlag = uploadReportFile(); boolean signFlag = uploadReportFile();
if(!signFlag){ if(!signFlag){
releaseApplySignatureFile(); releaseApplySignatureFile();
Display.getDefault().syncExec(new Runnable() { Display.getDefault().syncExec(new Runnable() {
public void run() { public void run() {
if(!bottomComposite.isDisposed()) { if(!bottomComposite.isDisposed()) {
MessageDialog.openShortMessage(Messages.Tips_signatureFail); MessageDialog.openShortMessage("上传文件失败!");
} }
} }
}); });
} }
onLoadSignatureFile(); onLoadSignatureFile();
String reportType = null != curSignatureFile.getReportType() ? curSignatureFile.getReportType() : FileConstants.REPORT_FILE_FOLDER; // String reportType = null != curSignatureFile.getReportType() ? curSignatureFile.getReportType() : FileConstants.REPORT_FILE_FOLDER;
if(needDownloadFile(reportType)) { if(needDownloadFile(reportType)) {
if(downloadReportFile(reportType)) { if(downloadReportFile(reportType)) {
loadSignatureFile(signaturePdfFile); loadSignatureFile(signaturePdfFile);
} }
} }
signatureCount = documentLoader.getSignatureCount(); // signatureCount = documentLoader.getSignatureCount();
refreshButtonStatus(); refreshButtonStatus();
} }
private void clearSignatureAction() { private void clearSignatureAction() {
documentLoader.backoutSign(); documentLoader.backoutSign();
String reportType = null != curSignatureFile.getReportType() ? curSignatureFile.getReportType() : FileConstants.REPORT_FILE_FOLDER; // String reportType = null != curSignatureFile.getReportType() ? curSignatureFile.getReportType() : FileConstants.REPORT_FILE_FOLDER;
if(downloadReportFile(reportType)) { if(downloadReportFile(reportType)) {
loadSignatureFile(signaturePdfFile); loadSignatureFile(signaturePdfFile);
} }
signatureCount = documentLoader.getSignatureCount(); // signatureCount = documentLoader.getSignatureCount();
refreshButtonStatus(); refreshButtonStatus();
} }
private void refreshButtonStatus() { private void refreshButtonStatus() {
signature_btn.setEnabled(true); signature_btn.setEnabled(true);
int nowSignatureCount = documentLoader.getSignatureCount(); // int nowSignatureCount = documentLoader.getSignatureCount();
if(nowSignatureCount > signatureCount) { // if(nowSignatureCount > signatureCount) {
// 北京CA手写板文件加载后不能删除文件,因此不能使用该方法 // // 北京CA手写板文件加载后不能删除文件,因此不能使用该方法
WidgetUtils.setControlVisible(clearSignatureBtn, true); //// WidgetUtils.setControlVisible(clearSignatureBtn, true);
WidgetUtils.setControlVisible(complateSignature_btn, true); //// WidgetUtils.setControlVisible(complateSignature_btn, true);
complateSignature_btn.setEnabled(true); // complateSignature_btn.setEnabled(true);
}else { // }else {
WidgetUtils.setControlVisible(clearSignatureBtn, false); //// WidgetUtils.setControlVisible(clearSignatureBtn, false);
WidgetUtils.setControlVisible(complateSignature_btn, false); //// WidgetUtils.setControlVisible(complateSignature_btn, false);
} // }
if(canCopySignature){ if(canCopySignature){
WidgetUtils.setControlVisible(copyHandSignature_btn, true); // WidgetUtils.setControlVisible(copyHandSignature_btn, true);
copyHandSignature_btn.setEnabled(true); // copyHandSignature_btn.setEnabled(true);
} }
bottomComposite.layout(); bottomComposite.layout();
bottom.layout(); bottom.layout();
......
...@@ -35,7 +35,7 @@ public class BJCAHandPDFLoaderImpl extends DocumentLoader { ...@@ -35,7 +35,7 @@ public class BJCAHandPDFLoaderImpl extends DocumentLoader {
private OleControlSite site; private OleControlSite site;
private OleAutomation oleAutomation; private OleAutomation oleAutomation;
private AutomationWrapper automaticWrapper; private AutomationWrapper automaticWrapper;
private BJCAHandSignThread bjcaHandSignThread; // private BJCAHandSignThread bjcaHandSignThread;
private BJCAHandSignListener handSignListener; private BJCAHandSignListener handSignListener;
private File file; private File file;
private Logger LOG = Logger.getLogger(BJCAHandPDFLoaderImpl.class); private Logger LOG = Logger.getLogger(BJCAHandPDFLoaderImpl.class);
...@@ -71,10 +71,10 @@ public class BJCAHandPDFLoaderImpl extends DocumentLoader { ...@@ -71,10 +71,10 @@ public class BJCAHandPDFLoaderImpl extends DocumentLoader {
site = new OleControlSite(oleFrame, SWT.NONE, BJCAHandPDFConstant.programClassId); site = new OleControlSite(oleFrame, SWT.NONE, BJCAHandPDFConstant.programClassId);
oleFrame.addDisposeListener(new DisposeListener() { oleFrame.addDisposeListener(new DisposeListener() {
public void widgetDisposed(DisposeEvent e) { public void widgetDisposed(DisposeEvent e) {
if(null != bjcaHandSignThread) { // if(null != bjcaHandSignThread) {
bjcaHandSignThread.stop(); // bjcaHandSignThread.stop();
bjcaHandSignThread = null; // bjcaHandSignThread = null;
} // }
if(null != site){ if(null != site){
if(!site.isDisposed()){ if(!site.isDisposed()){
try { try {
...@@ -175,10 +175,10 @@ C:\Program Files (x86)\BJCAClient\PDFClientV2.1\Program\x86目录下的serverCer ...@@ -175,10 +175,10 @@ C:\Program Files (x86)\BJCAClient\PDFClientV2.1\Program\x86目录下的serverCer
* @return * @return
*/ */
public boolean openFile(File file){ public boolean openFile(File file){
if(null != bjcaHandSignThread) { // if(null != bjcaHandSignThread) {
bjcaHandSignThread.stop(); // bjcaHandSignThread.stop();
bjcaHandSignThread = null; // bjcaHandSignThread = null;
} // }
this.file = file; this.file = file;
if(null != file && file.exists() && null != automaticWrapper){ if(null != file && file.exists() && null != automaticWrapper){
Display.getDefault().syncExec(new Runnable(){ Display.getDefault().syncExec(new Runnable(){
...@@ -337,11 +337,11 @@ C:\Program Files (x86)\BJCAClient\PDFClientV2.1\Program\x86目录下的serverCer ...@@ -337,11 +337,11 @@ C:\Program Files (x86)\BJCAClient\PDFClientV2.1\Program\x86目录下的serverCer
// int[] ids = oleAutomation.getIDsOfNames(new String[] {"Pdf_GetSealCount"}); // int[] ids = oleAutomation.getIDsOfNames(new String[] {"Pdf_GetSealCount"});
int[] ids = oleAutomation.getIDsOfNames(new String[] {"pdf_get_sealcount"}); int[] ids = oleAutomation.getIDsOfNames(new String[] {"pdf_get_sealcount"});
int totalCount = 0; int totalCount = 0;
if(null != ids) { totalCount += oleAutomation.invoke(ids[0], new Variant[] {new Variant(0)}).getInt();
for(int i = 1 ; i <= pageCount; i++) { // if(null != ids) {
totalCount += oleAutomation.invoke(ids[0], new Variant[] {new Variant(i)}).getInt(); // for(int i = 1 ; i <= pageCount; i++) {
} // }
} // }
if(totalCount > 0){ if(totalCount > 0){
signatureCount = totalCount; signatureCount = totalCount;
} }
...@@ -424,7 +424,7 @@ C:\Program Files (x86)\BJCAClient\PDFClientV2.1\Program\x86目录下的serverCer ...@@ -424,7 +424,7 @@ C:\Program Files (x86)\BJCAClient\PDFClientV2.1\Program\x86目录下的serverCer
if(null != handSignListener) { if(null != handSignListener) {
handSignListener.signScript(); handSignListener.signScript();
} }
startSignListenerThread(); // startSignListenerThread();
signatureCount ++; signatureCount ++;
}else { }else {
if(null != handSignListener) { if(null != handSignListener) {
...@@ -433,7 +433,31 @@ C:\Program Files (x86)\BJCAClient\PDFClientV2.1\Program\x86目录下的serverCer ...@@ -433,7 +433,31 @@ C:\Program Files (x86)\BJCAClient\PDFClientV2.1\Program\x86目录下的serverCer
} }
} }
} }
/**
* @Description: 签章复用
* @author guoyr
*/
public void getSignImage() {
if(null != automaticWrapper){
String returnValue = automaticWrapper.invoke("Pdf_Get_ScriptImg").getString();
String returnValue2 = automaticWrapper.invoke("Pdf_Get_FpImg").getString();
System.out.println(returnValue);
System.out.println("\r\n");
System.out.println(returnValue2);
// if(returnValue == 0){
// if(null != handSignListener) {
// handSignListener.signScript();
// }
//// startSignListenerThread();
// signatureCount ++;
// }else {
// if(null != handSignListener) {
// handSignListener.signatrue(false);
// }
// }
}
}
/** /**
* @Description: 添加签章 * @Description: 添加签章
* @author guoyr * @author guoyr
...@@ -459,7 +483,7 @@ C:\Program Files (x86)\BJCAClient\PDFClientV2.1\Program\x86目录下的serverCer ...@@ -459,7 +483,7 @@ C:\Program Files (x86)\BJCAClient\PDFClientV2.1\Program\x86目录下的serverCer
if(null != handSignListener) { if(null != handSignListener) {
handSignListener.signScript(); handSignListener.signScript();
} }
startSignListenerThread(); // startSignListenerThread();
// signatureCount ++; // signatureCount ++;
}else { }else {
if(null != handSignListener) { if(null != handSignListener) {
...@@ -469,17 +493,17 @@ C:\Program Files (x86)\BJCAClient\PDFClientV2.1\Program\x86目录下的serverCer ...@@ -469,17 +493,17 @@ C:\Program Files (x86)\BJCAClient\PDFClientV2.1\Program\x86目录下的serverCer
} }
} }
//
private void startSignListenerThread() { // private void startSignListenerThread() {
if(null != bjcaHandSignThread) { // if(null != bjcaHandSignThread) {
bjcaHandSignThread.stop(); // bjcaHandSignThread.stop();
bjcaHandSignThread = null; // bjcaHandSignThread = null;
} // }
if(null != handSignListener) { // if(null != handSignListener) {
bjcaHandSignThread = new BJCAHandSignThread(this, handSignListener); // bjcaHandSignThread = new BJCAHandSignThread(this, handSignListener);
bjcaHandSignThread.start(); // bjcaHandSignThread.start();
} // }
} // }
public AutomationWrapper getAutomationWrapper(){ public AutomationWrapper getAutomationWrapper(){
return automaticWrapper; return automaticWrapper;
......
...@@ -72,7 +72,7 @@ public class LocalSignatureComposite extends Composite { ...@@ -72,7 +72,7 @@ public class LocalSignatureComposite extends Composite {
// private Composite signatureItemLoadComposite; // private Composite signatureItemLoadComposite;
private SignatureFileListener signatureFileListener; private SignatureFileListener signatureFileListener;
// private ESepator signatureItemSep; // private ESepator signatureItemSep;
private String reportType; protected String reportType = FileConstants.REPORT_FILE_FOLDER;
/** /**
* Create the composite. * Create the composite.
...@@ -206,7 +206,7 @@ public class LocalSignatureComposite extends Composite { ...@@ -206,7 +206,7 @@ public class LocalSignatureComposite extends Composite {
public void refreshSignatureFiles(final TenderProjectEntity tenderProject, File pdfFile,String reportType){ public void refreshSignatureFiles(final TenderProjectEntity tenderProject, File pdfFile,String reportType){
this.tenderProject = tenderProject; this.tenderProject = tenderProject;
this.curPdfFile = pdfFile; this.curPdfFile = pdfFile;
this.reportType = reportType; // this.reportType = reportType;
signatureListener.onInit(); signatureListener.onInit();
for (Control control : sinatureFile_composite.getChildren()) { for (Control control : sinatureFile_composite.getChildren()) {
control.dispose(); control.dispose();
...@@ -284,10 +284,10 @@ public class LocalSignatureComposite extends Composite { ...@@ -284,10 +284,10 @@ public class LocalSignatureComposite extends Composite {
} }
curPdfFile = pdfFile; curPdfFile = pdfFile;
curSignatureFile = getSignatureFileByFileName(); curSignatureFile = getSignatureFileByFileName();
String reportType = FileConstants.REPORT_FILE_FOLDER; // String reportType = FileConstants.REPORT_FILE_FOLDER;
if(null != curSignatureFile) { // if(null != curSignatureFile) {
reportType = null != curSignatureFile.getReportType() ? curSignatureFile.getReportType() : FileConstants.REPORT_FILE_FOLDER; // reportType = null != curSignatureFile.getReportType() ? curSignatureFile.getReportType() : FileConstants.REPORT_FILE_FOLDER;
} // }
if(needDownloadFile(reportType)) { if(needDownloadFile(reportType)) {
if(!downloadReportFile(reportType)) { if(!downloadReportFile(reportType)) {
return; return;
...@@ -369,7 +369,7 @@ public class LocalSignatureComposite extends Composite { ...@@ -369,7 +369,7 @@ public class LocalSignatureComposite extends Composite {
return false; return false;
} }
} }
String reportType = null != curSignatureFile.getReportType() ? curSignatureFile.getReportType() : FileConstants.REPORT_FILE_FOLDER; // String reportType = null != curSignatureFile.getReportType() ? curSignatureFile.getReportType() : FileConstants.REPORT_FILE_FOLDER;
if(uploadReportFile(curPdfFile,reportType)){ if(uploadReportFile(curPdfFile,reportType)){
releaseApplySignatureFile(); releaseApplySignatureFile();
return true; return true;
......
...@@ -233,6 +233,8 @@ public class NewDownloadProjectInfoThread extends MyThread{ ...@@ -233,6 +233,8 @@ public class NewDownloadProjectInfoThread extends MyThread{
String signUpStartTimeStr = (String)tenderProjectJSON.get("signUpStartTime");//公告发布时间 String signUpStartTimeStr = (String)tenderProjectJSON.get("signUpStartTime");//公告发布时间
String docSaleStartTimeStr = (String)tenderProjectJSON.get("docSaleStartTime");//文件售卖开始时间 String docSaleStartTimeStr = (String)tenderProjectJSON.get("docSaleStartTime");//文件售卖开始时间
String docSaleEndTimeStr = (String)tenderProjectJSON.get("docSaleEndTime"); String docSaleEndTimeStr = (String)tenderProjectJSON.get("docSaleEndTime");
String appraiseStartTimeStr = (String)tenderProjectJSON.get("appraiseStartTime");
tenderProjectRuleEntity.setParam("appraiseStartTime", appraiseStartTimeStr);
if(null != signUpStartTimeStr && !"".equals(signUpStartTimeStr)){ if(null != signUpStartTimeStr && !"".equals(signUpStartTimeStr)){
try { try {
tenderProjectRuleEntity.setSignupStartTime(format.parse(signUpStartTimeStr)); tenderProjectRuleEntity.setSignupStartTime(format.parse(signUpStartTimeStr));
......
...@@ -129,7 +129,7 @@ public class NewUpdateTenderProjectInfoThread extends MyThread{ ...@@ -129,7 +129,7 @@ public class NewUpdateTenderProjectInfoThread extends MyThread{
if(downloadFlag){ if(downloadFlag){
tenderProjectService.updateAssignProperty(tenderProject, new String[]{"tenderNo", "tenderName", "tenderMethod", "tenderType", "phaseType", "isPack", "remoteStatus"}); tenderProjectService.updateAssignProperty(tenderProject, new String[]{"tenderNo", "tenderName", "tenderMethod", "tenderType", "phaseType", "isPack", "remoteStatus"});
if(!CommonEnum.YES.equals(tenderProject.getIsPack())){ if(!CommonEnum.YES.equals(tenderProject.getIsPack())){
downloadFlag = projectRuleService.updateAssignProperty(projectRule, new String[]{"bidOpeningStage", "bidOpeningStartTime", "priceBidOpeningTime"}); downloadFlag = projectRuleService.updateAssignProperty(projectRule, new String[]{"bidOpeningStage", "bidOpeningStartTime", "priceBidOpeningTime","computerParams"});
} }
// downloadFlag = tenderProjectService.updateDownLoadProject(tenderProject, projectRule); // downloadFlag = tenderProjectService.updateDownLoadProject(tenderProject, projectRule);
} }
...@@ -371,7 +371,7 @@ public class NewUpdateTenderProjectInfoThread extends MyThread{ ...@@ -371,7 +371,7 @@ public class NewUpdateTenderProjectInfoThread extends MyThread{
} }
if(updateTenderRuleList.size() > 0){ if(updateTenderRuleList.size() > 0){
updateTenderRuleList.add(projectRule); updateTenderRuleList.add(projectRule);
return projectRuleService.batchUpdateProperty(updateTenderRuleList, new String[]{"bidOpeningStage", "bidOpeningStartTime", "priceBidOpeningTime","decodeType"}); return projectRuleService.batchUpdateProperty(updateTenderRuleList, new String[]{"bidOpeningStage", "bidOpeningStartTime", "priceBidOpeningTime","decodeType", "computerParams"});
} }
} }
} catch (Exception e) { } catch (Exception e) {
...@@ -412,7 +412,8 @@ public class NewUpdateTenderProjectInfoThread extends MyThread{ ...@@ -412,7 +412,8 @@ public class NewUpdateTenderProjectInfoThread extends MyThread{
tenderPack.setCreateTime(createTime); tenderPack.setCreateTime(createTime);
} }
String bidOpenStage = (String)jsonObj.get("isTwoBidOpening"); String bidOpenStage = (String)jsonObj.get("isTwoBidOpening");
String appraiseStartTimeStr = (String)jsonObj.get("appraiseStartTime");
tenderRule.setParam("appraiseStartTime", appraiseStartTimeStr);
if(TenderProjectEnum.BID_OPENING_TWO_STAGE.equals(bidOpenStage.trim())){ if(TenderProjectEnum.BID_OPENING_TWO_STAGE.equals(bidOpenStage.trim())){
tenderRule.setBidOpeningStage(TenderProjectEnum.BID_OPENING_TWO_STAGE); tenderRule.setBidOpeningStage(TenderProjectEnum.BID_OPENING_TWO_STAGE);
String bidOpeningStartTimeString = (String)jsonObj.get("openBidUnPriceStartTime"); String bidOpeningStartTimeString = (String)jsonObj.get("openBidUnPriceStartTime");
......
<?xml version="1.0" encoding="UTF-8"?>
<sheelList>
<sheel>
<name>施工</name>
<code>A01</code>
<rowList>
<userMassage>
<name>投标人名称</name>
<code>companyName</code>
</userMassage>
<userMassage>
<name>注册地址</name>
<code>registerLocation</code>
</userMassage>
<userMassage>
<name>邮政编码</name>
<code>postalCode</code>
</userMassage>
<userMassage>
<name>联系人</name>
<code>linkMan</code>
</userMassage>
<userMassage>
<name>电话</name>
<code>linkManPhone</code>
</userMassage>
<userMassage>
<name>传真</name>
<code>linkManFax</code>
</userMassage>
<userMassage>
<name>网址</name>
<code>linkManWebsite</code>
</userMassage>
<userMassage>
<name>法人姓名</name>
<code>legalRepresentativeName</code>
</userMassage>
<userMassage>
<name>法人技术职称</name>
<code>legalRepresentativeTitle</code>
</userMassage>
<userMassage>
<name>法人电话</name>
<code>legalRepresentativePhone</code>
</userMassage>
<userMassage>
<name>技术负责人姓名</name>
<code>technicalDirectorName</code>
</userMassage>
<userMassage>
<name>技术负责人技术职称</name>
<code>technicalDirectorTitle</code>
</userMassage>
<userMassage>
<name>技术负责人电话</name>
<code>technicalDirectorPhone</code>
</userMassage>
<userMassage>
<name>成立时间</name>
<code>setupTime</code>
</userMassage>
<userMassage>
<name>企业资质等级</name>
<code>companyQualificationLevel</code>
</userMassage>
<userMassage>
<name>营业执照号</name>
<code>bussinessLicense</code>
</userMassage>
<userMassage>
<name>注册资金(万元)</name>
<code>registeredCapital</code>
</userMassage>
<userMassage>
<name>开户银行</name>
<code>depositBank</code>
</userMassage>
<userMassage>
<name>开户银行账号</name>
<code>bankAccount</code>
</userMassage>
<userMassage>
<name>员工总人数</name>
<code>employeeNumber</code>
</userMassage>
<userMassage>
<name>项目经理人数</name>
<code>purchaserNumber</code>
</userMassage>
<userMassage>
<name>高级职称人数</name>
<code>seniorProfessionalPostNumber</code>
</userMassage>
<userMassage>
<name>中级职称人数</name>
<code>mediumProfessionalPostNumber</code>
</userMassage>
<userMassage>
<name>初级职称人数</name>
<code>primaryProfessionalPostNumber</code>
</userMassage>
<userMassage>
<name>技工人数</name>
<code>artisanNumber</code>
</userMassage>
<userMassage>
<name>组织结构</name>
<code>orgStructure</code>
</userMassage>
<userMassage>
<name>经营范围</name>
<code>businessScope</code>
</userMassage>
<userMassage>
<name>备注</name>
<code>memo</code>
</userMassage>
</rowList>
</sheel>
<sheel>
<name>材料</name>
<code>B02</code>
<rowList>
<userMassage>
<name>投标人名称</name>
<code>companyName</code>
</userMassage>
<userMassage>
<name>注册资金(万元)</name>
<code>registeredCapital</code>
</userMassage>
<userMassage>
<name>成立时间</name>
<code>setupTime</code>
</userMassage>
<userMassage>
<name>注册地址</name>
<code>registerLocation</code>
</userMassage>
<userMassage>
<name>邮政编码</name>
<code>postalCode</code>
</userMassage>
<userMassage>
<name>员工总数</name>
<code>employeeNumber</code>
</userMassage>
<userMassage>
<name>联系人</name>
<code>linkMan</code>
</userMassage>
<userMassage>
<name>电话</name>
<code>linkManPhone</code>
</userMassage>
<userMassage>
<name>传真</name>
<code>linkManFax</code>
</userMassage>
<userMassage>
<name>网址</name>
<code>linkManWebsite</code>
</userMassage>
<userMassage>
<name>法人姓名</name>
<code>legalRepresentativeName</code>
</userMassage>
<userMassage>
<name>法人电话</name>
<code>legalRepresentativePhone</code>
</userMassage>
<userMassage>
<name>基本账户开户银行</name>
<code>depositBank</code>
</userMassage>
<userMassage>
<name>基本账户银行账号</name>
<code>bankAccount</code>
</userMassage>
<userMassage>
<name>近三年营业额</name>
<code>threeYearTurnover</code>
</userMassage>
<userMassage>
<name>投标人须知要求投标人需具有的各类资质证书</name>
<code>bidderHaveQuaCertificate</code>
</userMassage>
<userMassage>
<name>投标人关联企业情况</name>
<code>relatedCompanyInfo</code>
</userMassage>
<userMassage>
<name>投标材料制造商名称</name>
<code>manufacturerName</code>
</userMassage>
<userMassage>
<name>投标人须知要求投标材料制造商需具有的资质证书</name>
<code>manufacturerHaveQuaCertificate</code>
</userMassage>
<userMassage>
<name>备注</name>
<code>memo</code>
</userMassage>
</rowList>
</sheel>
<sheel>
<name>设备</name>
<code>B01</code>
<rowList>
<userMassage>
<name>投标人名称</name>
<code>companyName</code>
</userMassage>
<userMassage>
<name>注册资金(万元)</name>
<code>registeredCapital</code>
</userMassage>
<userMassage>
<name>成立时间</name>
<code>setupTime</code>
</userMassage>
<userMassage>
<name>注册地址</name>
<code>registerLocation</code>
</userMassage>
<userMassage>
<name>邮政编码</name>
<code>postalCode</code>
</userMassage>
<userMassage>
<name>员工总数</name>
<code>employeeNumber</code>
</userMassage>
<userMassage>
<name>联系人</name>
<code>linkMan</code>
</userMassage>
<userMassage>
<name>电话</name>
<code>linkManPhone</code>
</userMassage>
<userMassage>
<name>传真</name>
<code>linkManFax</code>
</userMassage>
<userMassage>
<name>网址</name>
<code>linkManWebsite</code>
</userMassage>
<userMassage>
<name>法人姓名</name>
<code>legalRepresentativeName</code>
</userMassage>
<userMassage>
<name>法人电话</name>
<code>legalRepresentativePhone</code>
</userMassage>
<userMassage>
<name>基本账户开户银行</name>
<code>depositBank</code>
</userMassage>
<userMassage>
<name>基本账户银行账号</name>
<code>bankAccount</code>
</userMassage>
<userMassage>
<name>近三年营业额</name>
<code>threeYearTurnover</code>
</userMassage>
<userMassage>
<name>投标人须知要求投标人需具有的各类资质证书</name>
<code>bidderHaveQuaCertificate</code>
</userMassage>
<userMassage>
<name>投标人关联企业情况</name>
<code>relatedCompanyInfo</code>
</userMassage>
<userMassage>
<name>投标设备制造商名称</name>
<code>manufacturerName</code>
</userMassage>
<userMassage>
<name>投标人须知要求投标设备制造商需具有的资质证书</name>
<code>manufacturerHaveQuaCertificate</code>
</userMassage>
<userMassage>
<name>备注</name>
<code>memo</code>
</userMassage>
</rowList>
</sheel>
<sheel>
<name>勘察</name>
<code>C02</code>
<rowList>
<userMassage>
<name>投标人名称</name>
<code>companyName</code>
</userMassage>
<userMassage>
<name>注册地址</name>
<code>registerLocation</code>
</userMassage>
<userMassage>
<name>邮政编码</name>
<code>postalCode</code>
</userMassage>
<userMassage>
<name>联系人</name>
<code>linkMan</code>
</userMassage>
<userMassage>
<name>电话</name>
<code>linkManPhone</code>
</userMassage>
<userMassage>
<name>传真</name>
<code>linkManFax</code>
</userMassage>
<userMassage>
<name>网址</name>
<code>linkManWebsite</code>
</userMassage>
<userMassage>
<name>法人姓名</name>
<code>legalRepresentativeName</code>
</userMassage>
<userMassage>
<name>法人技术职称</name>
<code>legalRepresentativeTitle</code>
</userMassage>
<userMassage>
<name>法人电话</name>
<code>legalRepresentativePhone</code>
</userMassage>
<userMassage>
<name>技术负责人姓名</name>
<code>technicalDirectorName</code>
</userMassage>
<userMassage>
<name>技术负责人技术职称</name>
<code>technicalDirectorTitle</code>
</userMassage>
<userMassage>
<name>技术负责人电话</name>
<code>technicalDirectorPhone</code>
</userMassage>
<userMassage>
<name>营业执照号</name>
<code>bussinessLicense</code>
</userMassage>
<userMassage>
<name>注册资本(万元)</name>
<code>registeredCapital</code>
</userMassage>
<userMassage>
<name>成立时间</name>
<code>setupTime</code>
</userMassage>
<userMassage>
<name>基本账户开户银行</name>
<code>depositBank</code>
</userMassage>
<userMassage>
<name>基本账户银行账号</name>
<code>bankAccount</code>
</userMassage>
<userMassage>
<name>员工总人数</name>
<code>employeeNumber</code>
</userMassage>
<userMassage>
<name>高级职称人员数</name>
<code>seniorProfessionalPostNumber</code>
</userMassage>
<userMassage>
<name>中级职称人员数</name>
<code>mediumProfessionalPostNumber</code>
</userMassage>
<userMassage>
<name>技术人员数量</name>
<code>artisanNumber</code>
</userMassage>
<userMassage>
<name>各类注册人员</name>
<code>registerPeople</code>
</userMassage>
<userMassage>
<name>企业勘察资质证书</name>
<code>surveyQuaCertificate</code>
</userMassage>
<userMassage>
<name>质量管理体系证书(如有)</name>
<code>isoQuaCertificate</code>
</userMassage>
<userMassage>
<name>经营范围</name>
<code>businessScope</code>
</userMassage>
<userMassage>
<name>投标人关联企业情况</name>
<code>relatedCompanyInfo</code>
</userMassage>
<userMassage>
<name>备注</name>
<code>memo</code>
</userMassage>
</rowList>
</sheel>
<sheel>
<name>设计</name>
<code>C03</code>
<rowList>
<userMassage>
<name>投标人名称</name>
<code>companyName</code>
</userMassage>
<userMassage>
<name>注册地址</name>
<code>registerLocation</code>
</userMassage>
<userMassage>
<name>邮政编码</name>
<code>postalCode</code>
</userMassage>
<userMassage>
<name>联系人</name>
<code>linkMan</code>
</userMassage>
<userMassage>
<name>电话</name>
<code>linkManPhone</code>
</userMassage>
<userMassage>
<name>传真</name>
<code>linkManFax</code>
</userMassage>
<userMassage>
<name>网址</name>
<code>linkManWebsite</code>
</userMassage>
<userMassage>
<name>法人姓名</name>
<code>legalRepresentativeName</code>
</userMassage>
<userMassage>
<name>法人技术职称</name>
<code>legalRepresentativeTitle</code>
</userMassage>
<userMassage>
<name>法人电话</name>
<code>legalRepresentativePhone</code>
</userMassage>
<userMassage>
<name>技术负责人姓名</name>
<code>technicalDirectorName</code>
</userMassage>
<userMassage>
<name>技术负责人技术职称</name>
<code>technicalDirectorTitle</code>
</userMassage>
<userMassage>
<name>技术负责人电话</name>
<code>technicalDirectorPhone</code>
</userMassage>
<userMassage>
<name>营业执照号</name>
<code>bussinessLicense</code>
</userMassage>
<userMassage>
<name>注册资本(万元)</name>
<code>registeredCapital</code>
</userMassage>
<userMassage>
<name>成立时间</name>
<code>setupTime</code>
</userMassage>
<userMassage>
<name>基本账户开户银行</name>
<code>depositBank</code>
</userMassage>
<userMassage>
<name>基本账户银行账号</name>
<code>bankAccount</code>
</userMassage>
<userMassage>
<name>员工总人数</name>
<code>employeeNumber</code>
</userMassage>
<userMassage>
<name>高级职称人员数</name>
<code>seniorProfessionalPostNumber</code>
</userMassage>
<userMassage>
<name>中级职称人员数</name>
<code>mediumProfessionalPostNumber</code>
</userMassage>
<userMassage>
<name>技术人员数量</name>
<code>artisanNumber</code>
</userMassage>
<userMassage>
<name>各类注册人员</name>
<code>registerPeople</code>
</userMassage>
<userMassage>
<name>企业设计资质证书</name>
<code>surveyQuaCertificate</code>
</userMassage>
<userMassage>
<name>质量管理体系证书(如有)</name>
<code>isoQuaCertificate</code>
</userMassage>
<userMassage>
<name>经营范围</name>
<code>businessScope</code>
</userMassage>
<userMassage>
<name>投标人关联企业情况</name>
<code>relatedCompanyInfo</code>
</userMassage>
<userMassage>
<name>备注</name>
<code>memo</code>
</userMassage>
</rowList>
</sheel>
<sheel>
<name>监理</name>
<code>C04</code>
<rowList>
<userMassage>
<name>投标人名称</name>
<code>companyName</code>
</userMassage>
<userMassage>
<name>注册地址</name>
<code>registerLocation</code>
</userMassage>
<userMassage>
<name>邮政编码</name>
<code>postalCode</code>
</userMassage>
<userMassage>
<name>联系人</name>
<code>linkMan</code>
</userMassage>
<userMassage>
<name>电话</name>
<code>linkManPhone</code>
</userMassage>
<userMassage>
<name>传真</name>
<code>linkManFax</code>
</userMassage>
<userMassage>
<name>网址</name>
<code>linkManWebsite</code>
</userMassage>
<userMassage>
<name>法人姓名</name>
<code>legalRepresentativeName</code>
</userMassage>
<userMassage>
<name>法人技术职称</name>
<code>legalRepresentativeTitle</code>
</userMassage>
<userMassage>
<name>法人电话</name>
<code>legalRepresentativePhone</code>
</userMassage>
<userMassage>
<name>技术负责人姓名</name>
<code>technicalDirectorName</code>
</userMassage>
<userMassage>
<name>技术负责人技术职称</name>
<code>technicalDirectorTitle</code>
</userMassage>
<userMassage>
<name>技术负责人电话</name>
<code>technicalDirectorPhone</code>
</userMassage>
<userMassage>
<name>营业执照号</name>
<code>bussinessLicense</code>
</userMassage>
<userMassage>
<name>注册资本(万元)</name>
<code>registeredCapital</code>
</userMassage>
<userMassage>
<name>成立时间</name>
<code>setupTime</code>
</userMassage>
<userMassage>
<name>基本账户开户银行</name>
<code>depositBank</code>
</userMassage>
<userMassage>
<name>基本账户银行账号</name>
<code>bankAccount</code>
</userMassage>
<userMassage>
<name>员工总人数</name>
<code>employeeNumber</code>
</userMassage>
<userMassage>
<name>高级职称人员数</name>
<code>seniorProfessionalPostNumber</code>
</userMassage>
<userMassage>
<name>中级职称人员数</name>
<code>mediumProfessionalPostNumber</code>
</userMassage>
<userMassage>
<name>技术人员数量</name>
<code>artisanNumber</code>
</userMassage>
<userMassage>
<name>各类注册人员</name>
<code>registerPeople</code>
</userMassage>
<userMassage>
<name>企业监理资质证书</name>
<code>surveyQuaCertificate</code>
</userMassage>
<userMassage>
<name>质量管理体系证书</name>
<code>isoQuaCertificate</code>
</userMassage>
<userMassage>
<name>经营范围</name>
<code>businessScope</code>
</userMassage>
<userMassage>
<name>投标人关联企业情况</name>
<code>relatedCompanyInfo</code>
</userMassage>
<userMassage>
<name>备注</name>
<code>memo</code>
</userMassage>
</rowList>
</sheel>
<sheel>
<name>服务</name>
<code>C01</code>
<rowList>
<userMassage>
<name>投标人名称</name>
<code>companyName</code>
</userMassage>
<userMassage>
<name>注册地址</name>
<code>registerLocation</code>
</userMassage>
<userMassage>
<name>邮政编码</name>
<code>postalCode</code>
</userMassage>
<userMassage>
<name>联系人</name>
<code>linkMan</code>
</userMassage>
<userMassage>
<name>电话</name>
<code>linkManPhone</code>
</userMassage>
<userMassage>
<name>传真</name>
<code>linkManFax</code>
</userMassage>
<userMassage>
<name>网址</name>
<code>linkManWebsite</code>
</userMassage>
<userMassage>
<name>法人姓名</name>
<code>legalRepresentativeName</code>
</userMassage>
<userMassage>
<name>法人技术职称</name>
<code>legalRepresentativeTitle</code>
</userMassage>
<userMassage>
<name>法人电话</name>
<code>legalRepresentativePhone</code>
</userMassage>
<userMassage>
<name>技术负责人姓名</name>
<code>technicalDirectorName</code>
</userMassage>
<userMassage>
<name>技术负责人技术职称</name>
<code>technicalDirectorTitle</code>
</userMassage>
<userMassage>
<name>技术负责人电话</name>
<code>technicalDirectorPhone</code>
</userMassage>
<userMassage>
<name>营业执照号</name>
<code>bussinessLicense</code>
</userMassage>
<userMassage>
<name>注册资本(万元)</name>
<code>registeredCapital</code>
</userMassage>
<userMassage>
<name>成立时间</name>
<code>setupTime</code>
</userMassage>
<userMassage>
<name>基本账户开户银行</name>
<code>depositBank</code>
</userMassage>
<userMassage>
<name>基本账户银行账号</name>
<code>bankAccount</code>
</userMassage>
<userMassage>
<name>员工总人数</name>
<code>employeeNumber</code>
</userMassage>
<userMassage>
<name>高级职称人员数</name>
<code>seniorProfessionalPostNumber</code>
</userMassage>
<userMassage>
<name>中级职称人员数</name>
<code>mediumProfessionalPostNumber</code>
</userMassage>
<userMassage>
<name>技术人员数量</name>
<code>artisanNumber</code>
</userMassage>
<userMassage>
<name>各类注册人员</name>
<code>registerPeople</code>
</userMassage>
<userMassage>
<name>企业服务资质证书</name>
<code>serviceQuaCertificate</code>
</userMassage>
<userMassage>
<name>质量管理体系证书(如有)</name>
<code>isoQuaCertificate</code>
</userMassage>
<userMassage>
<name>经营范围</name>
<code>businessScope</code>
</userMassage>
<userMassage>
<name>投标人关联企业情况</name>
<code>relatedCompanyInfo</code>
</userMassage>
<userMassage>
<name>备注</name>
<code>memo</code>
</userMassage>
</rowList>
</sheel>
<sheel>
<name>工程</name>
<code>A02</code>
<rowList>
<userMassage>
<name>投标人名称</name>
<code>companyname</code>
</userMassage>
<userMassage>
<name>注册地址</name>
<code>registerlocation</code>
</userMassage>
<userMassage>
<name>邮政编码</name>
<code>postalcode</code>
</userMassage>
<userMassage>
<name>联系人</name>
<code>linkman</code>
</userMassage>
<userMassage>
<name>电话</name>
<code>linkmanphone</code>
</userMassage>
<userMassage>
<name>传真</name>
<code>linkmanfax</code>
</userMassage>
<userMassage>
<name>网址</name>
<code>linkManWebsite</code>
</userMassage>
<userMassage>
<name>法人姓名(单位负责人)</name>
<code>legalrepresentativename</code>
</userMassage>
<userMassage>
<name>法人技术职称</name>
<code>legalrepresentativetitle</code>
</userMassage>
<userMassage>
<name>法人电话</name>
<code>legalrepresentativephone</code>
</userMassage>
<userMassage>
<name>技术负责人姓名</name>
<code>technicaldirectorname</code>
</userMassage>
<userMassage>
<name>技术负责人技术职称</name>
<code>technicaldirectortitle</code>
</userMassage>
<userMassage>
<name>技术负责人电话</name>
<code>technicaldirectorphone</code>
</userMassage>
<userMassage>
<name>成立时间</name>
<code>setuptime</code>
</userMassage>
<userMassage>
<name>企业资质等级</name>
<code>companyqualificationlevel</code>
</userMassage>
<userMassage>
<name>营业执照号</name>
<code>bussinesslicense</code>
</userMassage>
<userMassage>
<name>注册资金(万元)</name>
<code>registeredcapital</code>
</userMassage>
<userMassage>
<name>开户银行</name>
<code>depositbank</code>
</userMassage>
<userMassage>
<name>开户银行账号</name>
<code>bankaccount</code>
</userMassage>
<userMassage>
<name>员工总人数</name>
<code>employeenumber</code>
</userMassage>
<userMassage>
<name>项目经理数</name>
<code>purchasernumber</code>
</userMassage>
<userMassage>
<name>高级职称人员数</name>
<code>seniorprofessionalpostnumber</code>
</userMassage>
<userMassage>
<name>中级职称人员数</name>
<code>mediumprofessionalpostnumber</code>
</userMassage>
<userMassage>
<name>初级职称人员数</name>
<code>primaryprofessionalpostnumber</code>
</userMassage>
<userMassage>
<name>技工数</name>
<code>artisannumber</code>
</userMassage>
<userMassage>
<name>组织结构</name>
<code>orgstructure</code>
</userMassage>
<userMassage>
<name>经营范围</name>
<code>businessscope</code>
</userMassage>
<userMassage>
<name>备注</name>
<code>memo</code>
</userMassage>
</rowList>
</sheel>
</sheelList>
<?xml version="1.0" encoding="UTF-8"?>
<sheelList>
<sheel>
<name>施工</name>
<code>A01</code>
<rowList>
<userMassage>
<name>企业名称</name>
<code>supplierName</code>
</userMassage>
<userMassage>
<name>业绩状态</name>
<code>status</code>
</userMassage>
<userMassage>
<name>项目名称</name>
<code>projectName</code>
</userMassage>
<userMassage>
<name>项目所在地</name>
<code>projectAddress</code>
</userMassage>
<userMassage>
<name>发包人名称</name>
<code>buyerName</code>
</userMassage>
<userMassage>
<name>发包人地址</name>
<code>buyerAddress</code>
</userMassage>
<userMassage>
<name>发包人电话</name>
<code>buyerPhoneNumber</code>
</userMassage>
<userMassage>
<name>合同价格(万元)</name>
<code>singningTotal</code>
</userMassage>
<userMassage>
<name>开工日期</name>
<code>startTime</code>
</userMassage>
<userMassage>
<name>竣工/计划竣工日期</name>
<code>endTime</code>
</userMassage>
<userMassage>
<name>项目经理</name>
<code>projectManager</code>
</userMassage>
<userMassage>
<name>技术负责人</name>
<code>technicalDirector</code>
</userMassage>
<userMassage>
<name>总监理工程师</name>
<code>chiefSupervisionEngineer</code>
</userMassage>
<userMassage>
<name>总监理工程师电话</name>
<code>csePhoneNumber</code>
</userMassage>
<userMassage>
<name>承担的工作</name>
<code>workUndertaken</code>
</userMassage>
<userMassage>
<name>工程质量</name>
<code>projectQuantity</code>
</userMassage>
<userMassage>
<name>项目描述</name>
<code>projectDesc</code>
</userMassage>
<userMassage>
<name>备注</name>
<code>memo</code>
</userMassage>
</rowList>
</sheel>
<sheel>
<name>材料采购</name>
<code>B02</code>
<rowList>
<userMassage>
<name>企业名称</name>
<code>supplierName</code>
</userMassage>
<userMassage>
<name>业绩状态</name>
<code>status</code>
</userMassage>
<userMassage>
<name>材料名称</name>
<code>deviceName</code>
</userMassage>
<userMassage>
<name>规格和型号</name>
<code>devicetypeSpecification</code>
</userMassage>
<userMassage>
<name>项目名称</name>
<code>projectName</code>
</userMassage>
<userMassage>
<name>买方名称</name>
<code>buyerName</code>
</userMassage>
<userMassage>
<name>买方联系人</name>
<code>buyerLinkman</code>
</userMassage>
<userMassage>
<name>买方联系人电话</name>
<code>buyerPhoneNumber</code>
</userMassage>
<userMassage>
<name>合同价格(万元)</name>
<code>singningTotal</code>
</userMassage>
<userMassage>
<name>合同签订日期</name>
<code>contractTime</code>
</userMassage>
<userMassage>
<name>材料投产日期</name>
<code>startTime</code>
</userMassage>
<userMassage>
<name>项目概况及投标人履约情况</name>
<code>projectDesc</code>
</userMassage>
<userMassage>
<name>备注</name>
<code>memo</code>
</userMassage>
</rowList>
</sheel>
<sheel>
<name>设备采购</name>
<code>B01</code>
<rowList>
<userMassage>
<name>企业名称</name>
<code>supplierName</code>
</userMassage>
<userMassage>
<name>业绩状态</name>
<code>status</code>
</userMassage>
<userMassage>
<name>设备名称</name>
<code>deviceName</code>
</userMassage>
<userMassage>
<name>规格和型号</name>
<code>devicetypeSpecification</code>
</userMassage>
<userMassage>
<name>项目名称</name>
<code>projectName</code>
</userMassage>
<userMassage>
<name>买方名称</name>
<code>buyerName</code>
</userMassage>
<userMassage>
<name>买方联系人</name>
<code>buyerLinkman</code>
</userMassage>
<userMassage>
<name>买方联系人电话</name>
<code>buyerPhoneNumber</code>
</userMassage>
<userMassage>
<name>合同价格(万元)</name>
<code>singningTotal</code>
</userMassage>
<userMassage>
<name>合同签订日期</name>
<code>contractTime</code>
</userMassage>
<userMassage>
<name>设备投产日期</name>
<code>startTime</code>
</userMassage>
<userMassage>
<name>项目概况及投标人履约情况</name>
<code>projectDesc</code>
</userMassage>
<userMassage>
<name>备注</name>
<code>memo</code>
</userMassage>
</rowList>
</sheel>
<sheel>
<name>勘察</name>
<code>C02</code>
<rowList>
<userMassage>
<name>企业名称</name>
<code>supplierName</code>
</userMassage>
<userMassage>
<name>业绩状态</name>
<code>status</code>
</userMassage>
<userMassage>
<name>项目名称</name>
<code>projectName</code>
</userMassage>
<userMassage>
<name>项目所在地</name>
<code>projectAddress</code>
</userMassage>
<userMassage>
<name>发包人名称</name>
<code>buyerName</code>
</userMassage>
<userMassage>
<name>发包人地址</name>
<code>buyerAddress</code>
</userMassage>
<userMassage>
<name>发包人电话</name>
<code>buyerPhoneNumber</code>
</userMassage>
<userMassage>
<name>合同/签约合同价格(万元)</name>
<code>singningTotal</code>
</userMassage>
<userMassage>
<name>合同签订时间</name>
<code>startTime</code>
</userMassage>
<userMassage>
<name>合同完成时间</name>
<code>endTime</code>
</userMassage>
<userMassage>
<name>项目负责人</name>
<code>projectManager</code>
</userMassage>
<userMassage>
<name>勘察服务期限</name>
<code>termOfService</code>
</userMassage>
<userMassage>
<name>勘察内容</name>
<code>content</code>
</userMassage>
<userMassage>
<name>项目描述</name>
<code>projectDesc</code>
</userMassage>
<userMassage>
<name>备注</name>
<code>memo</code>
</userMassage>
</rowList>
</sheel>
<sheel>
<name>设计</name>
<code>C03</code>
<rowList>
<userMassage>
<name>企业名称</name>
<code>supplierName</code>
</userMassage>
<userMassage>
<name>业绩状态</name>
<code>status</code>
</userMassage>
<userMassage>
<name>项目名称</name>
<code>projectName</code>
</userMassage>
<userMassage>
<name>项目所在地</name>
<code>projectAddress</code>
</userMassage>
<userMassage>
<name>发包人名称</name>
<code>buyerName</code>
</userMassage>
<userMassage>
<name>发包人地址</name>
<code>buyerAddress</code>
</userMassage>
<userMassage>
<name>发包人电话</name>
<code>buyerPhoneNumber</code>
</userMassage>
<userMassage>
<name>合同/签约合同价格(万元)</name>
<code>singningTotal</code>
</userMassage>
<userMassage>
<name>合同签订时间</name>
<code>startTime</code>
</userMassage>
<userMassage>
<name>合同完成时间</name>
<code>endTime</code>
</userMassage>
<userMassage>
<name>项目负责人</name>
<code>projectManager</code>
</userMassage>
<userMassage>
<name>设计服务期限</name>
<code>termOfService</code>
</userMassage>
<userMassage>
<name>设计内容</name>
<code>content</code>
</userMassage>
<userMassage>
<name>项目描述</name>
<code>projectDesc</code>
</userMassage>
<userMassage>
<name>备注</name>
<code>memo</code>
</userMassage>
</rowList>
</sheel>
<sheel>
<name>监理</name>
<code>C04</code>
<rowList>
<userMassage>
<name>企业名称</name>
<code>supplierName</code>
</userMassage>
<userMassage>
<name>业绩状态</name>
<code>status</code>
</userMassage>
<userMassage>
<name>项目名称</name>
<code>projectName</code>
</userMassage>
<userMassage>
<name>项目所在地</name>
<code>projectAddress</code>
</userMassage>
<userMassage>
<name>发包人名称</name>
<code>buyerName</code>
</userMassage>
<userMassage>
<name>发包人地址</name>
<code>buyerAddress</code>
</userMassage>
<userMassage>
<name>发包人电话</name>
<code>buyerPhoneNumber</code>
</userMassage>
<userMassage>
<name>合同/签约合同价格(万元)</name>
<code>singningTotal</code>
</userMassage>
<userMassage>
<name>合同签订时间</name>
<code>startTime</code>
</userMassage>
<userMassage>
<name>合同完成时间</name>
<code>endTime</code>
</userMassage>
<userMassage>
<name>总监理工程师</name>
<code>chiefSupervisionEngineer</code>
</userMassage>
<userMassage>
<name>监理服务期限</name>
<code>termOfService</code>
</userMassage>
<userMassage>
<name>监理内容</name>
<code>content</code>
</userMassage>
<userMassage>
<name>项目描述</name>
<code>projectDesc</code>
</userMassage>
<userMassage>
<name>备注</name>
<code>memo</code>
</userMassage>
</rowList>
</sheel>
<sheel>
<name>服务</name>
<code>C01</code>
<rowList>
<userMassage>
<name>企业名称</name>
<code>supplierName</code>
</userMassage>
<userMassage>
<name>业绩状态</name>
<code>status</code>
</userMassage>
<userMassage>
<name>项目名称</name>
<code>projectName</code>
</userMassage>
<userMassage>
<name>项目所在地</name>
<code>projectAddress</code>
</userMassage>
<userMassage>
<name>发包人名称</name>
<code>buyerName</code>
</userMassage>
<userMassage>
<name>发包人地址</name>
<code>buyerAddress</code>
</userMassage>
<userMassage>
<name>发包人电话</name>
<code>buyerPhoneNumber</code>
</userMassage>
<userMassage>
<name>合同/签约合同价格(万元)</name>
<code>singningTotal</code>
</userMassage>
<userMassage>
<name>合同签订时间</name>
<code>startTime</code>
</userMassage>
<userMassage>
<name>合同完成时间</name>
<code>endTime</code>
</userMassage>
<userMassage>
<name>服务期限</name>
<code>termOfService</code>
</userMassage>
<userMassage>
<name>服务内容</name>
<code>content</code>
</userMassage>
<userMassage>
<name>项目负责人</name>
<code>projectManager</code>
</userMassage>
<userMassage>
<name>项目描述</name>
<code>projectDesc</code>
</userMassage>
<userMassage>
<name>备注</name>
<code>memo</code>
</userMassage>
</rowList>
</sheel>
<sheel>
<name>工程</name>
<code>A02</code>
<rowList>
<userMassage>
<name>企业名称</name>
<code>supplierName</code>
</userMassage>
<userMassage>
<name>业绩状态</name>
<code>status</code>
</userMassage>
<userMassage>
<name>项目名称</name>
<code>projectName</code>
</userMassage>
<userMassage>
<name>项目所在地</name>
<code>projectAddress</code>
</userMassage>
<userMassage>
<name>发包人名称</name>
<code>buyerName</code>
</userMassage>
<userMassage>
<name>发包人地址</name>
<code>buyerAddress</code>
</userMassage>
<userMassage>
<name>发包人电话</name>
<code>buyerPhoneNumber</code>
</userMassage>
<userMassage>
<name>合同价格(万元)</name>
<code>singningTotal</code>
</userMassage>
<userMassage>
<name>开工日期</name>
<code>startTime</code>
</userMassage>
<userMassage>
<name>竣工/计划竣日期</name>
<code>endTime</code>
</userMassage>
<userMassage>
<name>项目经理</name>
<code>projectManager</code>
</userMassage>
<userMassage>
<name>技术负责人</name>
<code>technicalDirector</code>
</userMassage>
<userMassage>
<name>承担的工作</name>
<code>workUndertaken</code>
</userMassage>
<userMassage>
<name>工程质量</name>
<code>projectQuantity</code>
</userMassage>
<userMassage>
<name>项目描述</name>
<code>projectDesc</code>
</userMassage>
<userMassage>
<name>备注</name>
<code>memo</code>
</userMassage>
</rowList>
</sheel>
</sheelList>
...@@ -38,6 +38,10 @@ public class Constants { ...@@ -38,6 +38,10 @@ public class Constants {
// } // }
// return PRODUCT_ROOT; // return PRODUCT_ROOT;
} }
/**
* 资源目录
**/
public static String RESOURCE_FOLDER = "resource";
/** /**
* 当前登录的用户 * 当前登录的用户
**/ **/
...@@ -201,6 +205,14 @@ public class Constants { ...@@ -201,6 +205,14 @@ public class Constants {
*/ */
public static final String EVAL_TO_NOTE = "expertToNote.pdf"; public static final String EVAL_TO_NOTE = "expertToNote.pdf";
public static final String EXPERT_COMMITMENT = "EXPERT_COMMITMENT.docx"; public static final String EXPERT_COMMITMENT = "EXPERT_COMMITMENT.docx";
/**
* 小范本TT类型投标人基本信息表表头
*/
public static final String TYPE_BIDDER = "bidder.xml";
/**
* 业绩
*/
public static final String TYPE_YEJI = "yeji.xml";
/** /**
* 更新标识符 * 更新标识符
......
...@@ -7,6 +7,7 @@ import java.text.MessageFormat; ...@@ -7,6 +7,7 @@ import java.text.MessageFormat;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.Properties; import java.util.Properties;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
...@@ -73,6 +74,7 @@ import com.gx.obe.config.utils.PropertiesUtils; ...@@ -73,6 +74,7 @@ import com.gx.obe.config.utils.PropertiesUtils;
import com.gx.obe.enttiytdo.BooleanResultDO; import com.gx.obe.enttiytdo.BooleanResultDO;
import com.gx.obe.listener.CheckUpdateVersionListener; import com.gx.obe.listener.CheckUpdateVersionListener;
import com.gx.obe.message.Messages; import com.gx.obe.message.Messages;
import com.gx.obe.report.utils.Bean2MapUtils;
import com.gx.obe.thread.ApplyMachineThread; import com.gx.obe.thread.ApplyMachineThread;
import com.gx.obe.thread.CheckUpdateThread; import com.gx.obe.thread.CheckUpdateThread;
import com.gx.obe.thread.LoginCacheThread; import com.gx.obe.thread.LoginCacheThread;
...@@ -1343,6 +1345,7 @@ public class LoginDialog { ...@@ -1343,6 +1345,7 @@ public class LoginDialog {
return; return;
} }
Constants.USER = tempUser; Constants.USER = tempUser;
Map map = Bean2MapUtils.createMap(tempUser);
Constants.USER.setEncodePassWord(StringUtil.encodeString(pwd_text.getText().trim())); Constants.USER.setEncodePassWord(StringUtil.encodeString(pwd_text.getText().trim()));
loginType = SWT.OK; loginType = SWT.OK;
shell.close(); shell.close();
......
package com.gx.obe.management; package com.gx.obe.management;
import java.io.File; import java.io.File;
import java.nio.charset.Charset;
import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.Platform;
import org.eclipse.equinox.app.IApplication; import org.eclipse.equinox.app.IApplication;
...@@ -42,6 +43,11 @@ public class ManagementApplication implements IApplication { ...@@ -42,6 +43,11 @@ public class ManagementApplication implements IApplication {
*/ */
public Object start(IApplicationContext context) { public Object start(IApplicationContext context) {
Display display = PlatformUI.createDisplay(); Display display = PlatformUI.createDisplay();
Charset charset = Charset.defaultCharset();
// messageProgress.message("获取目前系统编码格式" + charset.displayName(), 1);
// LOG.error("获取目前系统编码格式" + charset.displayName());
System.out.println("获取目前系统编码格式" + charset.displayName());
try { try {
OnStartInit.initSystemConfig(Constants.TERMINAL_MANAGEMENT ); OnStartInit.initSystemConfig(Constants.TERMINAL_MANAGEMENT );
OnStartInit.initPluginId(Activator.PLUGIN_ID); OnStartInit.initPluginId(Activator.PLUGIN_ID);
......
...@@ -1513,7 +1513,7 @@ public class EvaluationExpertManagerComposite extends Composite { ...@@ -1513,7 +1513,7 @@ public class EvaluationExpertManagerComposite extends Composite {
*/ */
private void synchronousExpertAction() { private void synchronousExpertAction() {
if(synchronousExpertBtn.isEnabled()){ if(synchronousExpertBtn.isEnabled()){
if(isInEvaluationProgress()){return;} // if(isInEvaluationProgress()){return;}
//京能要求上传开标结果才能下载专家 //京能要求上传开标结果才能下载专家
if(MenuFunction.HIDE.equals(menuFunctionUtils.getAuthority(MenuFunctionEnum.HAS_UPLOAD_OPEN_RESULT))){ if(MenuFunction.HIDE.equals(menuFunctionUtils.getAuthority(MenuFunctionEnum.HAS_UPLOAD_OPEN_RESULT))){
......
...@@ -3,9 +3,11 @@ package com.gx.obe.management.composite; ...@@ -3,9 +3,11 @@ package com.gx.obe.management.composite;
import java.io.BufferedReader; import java.io.BufferedReader;
import java.io.File; import java.io.File;
import java.io.FileReader; import java.io.FileReader;
import java.nio.charset.Charset;
import java.text.MessageFormat; import java.text.MessageFormat;
import java.util.List; import java.util.List;
import org.apache.log4j.Logger;
import org.eclipse.swt.SWT; import org.eclipse.swt.SWT;
import org.eclipse.swt.core.CallBack; import org.eclipse.swt.core.CallBack;
import org.eclipse.swt.core.MessageDialog; import org.eclipse.swt.core.MessageDialog;
...@@ -105,7 +107,7 @@ public class EvaluationFactorsManagerComposite extends Composite { ...@@ -105,7 +107,7 @@ public class EvaluationFactorsManagerComposite extends Composite {
private boolean returnFlag = false; private boolean returnFlag = false;
private MenuFunctionUtils menuFunctionUtils = new MenuFunctionUtils(); private MenuFunctionUtils menuFunctionUtils = new MenuFunctionUtils();
private ELink importStructInfoLink; private ELink importStructInfoLink;
private Logger LOG = Logger.getLogger(EvaluationFactorsManagerComposite.class);
{ {
LogUtils.logClass(EvaluationFactorsManagerComposite.class); LogUtils.logClass(EvaluationFactorsManagerComposite.class);
} }
...@@ -256,6 +258,12 @@ public class EvaluationFactorsManagerComposite extends Composite { ...@@ -256,6 +258,12 @@ public class EvaluationFactorsManagerComposite extends Composite {
importBillOfQuantities.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, true, 1, 1)); importBillOfQuantities.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, true, 1, 1));
importBillOfQuantities.setText("一键解析工程量清单"); importBillOfQuantities.setText("一键解析工程量清单");
menuFunctionUtils.addFunction(importBillOfQuantities, "ANALYSIS_BILL"); menuFunctionUtils.addFunction(importBillOfQuantities, "ANALYSIS_BILL");
new Label(eval_method_composite, SWT.NONE);
new Label(eval_method_composite, SWT.NONE);
new Label(eval_method_composite, SWT.NONE);
new Label(eval_method_composite, SWT.NONE);
new Label(eval_method_composite, SWT.NONE);
new Label(eval_method_composite, SWT.NONE);
type_composite = new Composite(this, SWT.NONE); type_composite = new Composite(this, SWT.NONE);
GridLayout gl_score_type_composite = new GridLayout(6, false); GridLayout gl_score_type_composite = new GridLayout(6, false);
...@@ -443,6 +451,9 @@ public class EvaluationFactorsManagerComposite extends Composite { ...@@ -443,6 +451,9 @@ public class EvaluationFactorsManagerComposite extends Composite {
* @author guoyr * @author guoyr
*/ */
private void init() { private void init() {
Charset charset = Charset.defaultCharset();
LOG.error("获取目前系统编码格式" + charset.displayName());
System.out.println("获取目前系统编码格式" + charset.displayName());
this.tenderProjectEntity = projectAction.getTenderProject(); this.tenderProjectEntity = projectAction.getTenderProject();
this.menu = projectAction.getMenu(); this.menu = projectAction.getMenu();
menuFunctionUtils.initFunctionAuthority(menu); menuFunctionUtils.initFunctionAuthority(menu);
...@@ -1057,15 +1068,23 @@ public class EvaluationFactorsManagerComposite extends Composite { ...@@ -1057,15 +1068,23 @@ public class EvaluationFactorsManagerComposite extends Composite {
if(!confirmDialog.getClickStatus().equals("01")){ if(!confirmDialog.getClickStatus().equals("01")){
return; return;
} }
ProgressMessageDialog messageProgress = new ProgressMessageDialog(getShell(), false, -1, new LoadingAdatper() { String bidFilePath = FileConstants.getBiddingFilePath(tenderProjectEntity.getId()).concat("SingleFileBaseInfo.xml");
public void finish(boolean flag) { File SingleFileBaseInfoFile = new File(bidFilePath);
} if(SingleFileBaseInfoFile.exists()) {
});
messageProgress.setTitle("一键解析结构化数据"); ProgressMessageDialog messageProgress = new ProgressMessageDialog(getShell(), false, -1, new LoadingAdatper() {
messageProgress.setOperateVisible(true); public void finish(boolean flag) {
messageProgress.setCountDownTime(2); }
new Thread(new ParsingStructThread(tenderProjectEntity, messageProgress)).start(); });
messageProgress.open(); messageProgress.setTitle("一键解析结构化数据");
messageProgress.setOperateVisible(true);
messageProgress.setCountDownTime(2);
new Thread(new ParsingStructThread(tenderProjectEntity, messageProgress)).start();
messageProgress.open();
}else {
MessageDialog.openError(getShell(), "招标文件不存在或者不完整,请重新下载招标文件!");
return;
}
} }
/** /**
......
package com.gx.obe.management.composite; package com.gx.obe.management.composite;
import java.text.MessageFormat; import java.text.MessageFormat;
import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -41,6 +42,7 @@ import com.gx.obe.business.entity.ExpertEvaluationStep; ...@@ -41,6 +42,7 @@ import com.gx.obe.business.entity.ExpertEvaluationStep;
import com.gx.obe.business.entity.MenuFunction; import com.gx.obe.business.entity.MenuFunction;
import com.gx.obe.business.enumeration.ExpertEnum; import com.gx.obe.business.enumeration.ExpertEnum;
import com.gx.obe.business.enumeration.UserEnum; import com.gx.obe.business.enumeration.UserEnum;
import com.gx.obe.business.http.HttpResponse;
import com.gx.obe.business.http.HttpUrl; import com.gx.obe.business.http.HttpUrl;
import com.gx.obe.business.http.HttpUtils; import com.gx.obe.business.http.HttpUtils;
import com.gx.obe.common.file.dialog.ClearProjectBidFileDialog; import com.gx.obe.common.file.dialog.ClearProjectBidFileDialog;
...@@ -54,7 +56,6 @@ import com.gx.obe.components.core.enumeration.EvaluationStepEnum; ...@@ -54,7 +56,6 @@ import com.gx.obe.components.core.enumeration.EvaluationStepEnum;
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.ConfigConstants;
import com.gx.obe.config.utils.PropertiesUtils; import com.gx.obe.config.utils.PropertiesUtils;
import com.gx.obe.business.http.HttpResponse;
import com.gx.obe.listener.StartEvaluationListener; import com.gx.obe.listener.StartEvaluationListener;
import com.gx.obe.management.dialog.StartEvaluationStepShell; import com.gx.obe.management.dialog.StartEvaluationStepShell;
import com.gx.obe.message.Messages; import com.gx.obe.message.Messages;
...@@ -478,7 +479,7 @@ public class EvaluationStepProgressComposite extends Composite implements StartE ...@@ -478,7 +479,7 @@ public class EvaluationStepProgressComposite extends Composite implements StartE
*/ */
private void completeEvaluationAction() { private void completeEvaluationAction() {
//判断是否废标或者已完成推荐 //判断是否废标或者已完成推荐
if(!completeButton.getEnabled())return ; // if(!completeButton.getEnabled())return ;
tenderProjectEntity = tenderProjectService.getById(tenderProjectEntity.getId()); tenderProjectEntity = tenderProjectService.getById(tenderProjectEntity.getId());
if(CommonEnum.COMPLETE.equals(tenderProjectEntity.getComplateStatus()) || TenderProjectEnum.EFFECTIVE_NO.equals(tenderProjectEntity.getEffectiveType())) { if(CommonEnum.COMPLETE.equals(tenderProjectEntity.getComplateStatus()) || TenderProjectEnum.EFFECTIVE_NO.equals(tenderProjectEntity.getEffectiveType())) {
ConfirmDialog confirmDialog = new ConfirmDialog(getShell(), null, "是否确认结束评标流程?", null); ConfirmDialog confirmDialog = new ConfirmDialog(getShell(), null, "是否确认结束评标流程?", null);
...@@ -496,23 +497,27 @@ public class EvaluationStepProgressComposite extends Composite implements StartE ...@@ -496,23 +497,27 @@ public class EvaluationStepProgressComposite extends Composite implements StartE
return; return;
} }
boolean updateStatus = false; boolean updateStatus = false;
if(null != tenderProjectEntity.getParentId()) { Date date = NowTimeUtils.getNowDate();
if(tenderProjectService.updateEvaluationComplateStatus(tenderProjectEntity.getId(),tenderProjectEntity.getParentId(),CommonEnum.ARCHIVE_STATUS)) { if(tenderProjectService.updateEvaluationComplateStatus(tenderProjectEntity.getId(),tenderProjectEntity.getParentId(),CommonEnum.ARCHIVE_STATUS, date)) {
updateStatus = true; // updateStatus = true;
} updateStatus = uploadTime();
}else {
tenderProjectEntity.setUseStatus(CommonEnum.ARCHIVE_STATUS);
if(tenderProjectService.updateAssignProperty(tenderProjectEntity, new String[]{"useStatus"})) {
updateStatus = true;
}
} }
// if(null != tenderProjectEntity.getParentId()) {
// }else {
// tenderProjectEntity.setUseStatus(CommonEnum.ARCHIVE_STATUS);
// if(tenderProjectService.updateAssignProperty(tenderProjectEntity, new String[]{"useStatus"})) {
// updateStatus = true;
// }
// }
if(updateStatus) { if(updateStatus) {
MessageDialog.openWarning(getShell(), "当前项目已完成评标。"); MessageDialog.openWarning(getShell(), "当前项目已完成评标。");
completeButton.setEnabled(false); completeButton.setEnabled(false);
top_composite.layout(); top_composite.layout();
}else {
MessageDialog.openError(getShell(), "上传结束时间失败!");
} }
uploadTime();
} }
......
package com.gx.obe.management.composite;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.layout.GridData;
public class TestCompoiste extends Composite {
/**
* Create the composite.
* @param parent
* @param style
*/
public TestCompoiste(Composite parent, int style) {
super(parent, style);
setLayout(new GridLayout(1, false));
Composite composite = new Composite(this, SWT.NONE);
composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
Label label = new Label(composite, SWT.NONE);
label.setBounds(51, 42, 90, 24);
label.setText("投标人名称");
}
@Override
protected void checkSubclass() {
// Disable the check that prevents subclassing of SWT components
}
}
...@@ -3,6 +3,8 @@ package com.gx.obe.management.shell; ...@@ -3,6 +3,8 @@ package com.gx.obe.management.shell;
import java.io.IOException; import java.io.IOException;
import java.net.ConnectException; import java.net.ConnectException;
import java.net.SocketException; import java.net.SocketException;
import java.nio.charset.Charset;
import java.util.Arrays;
import org.apache.commons.net.ftp.FTP; import org.apache.commons.net.ftp.FTP;
import org.apache.commons.net.ftp.FTPClient; import org.apache.commons.net.ftp.FTPClient;
...@@ -374,5 +376,13 @@ public class ChooseNetWorkToDownLoadShell extends Shell { ...@@ -374,5 +376,13 @@ public class ChooseNetWorkToDownLoadShell extends Shell {
protected void checkSubclass() { protected void checkSubclass() {
// Disable the check that prevents subclassing of SWT components // Disable the check that prevents subclassing of SWT components
} }
public static void main(String[] args) {
// String str = "Hello World!";
String str= "your string";
Charset charset = Charset.defaultCharset();
System.out.println(charset.displayName());
// byte[] bytes = str.getBytes(); // 使用默认编码方式
// System.out.println(Charset.forName(str));
}
} }
...@@ -6,6 +6,7 @@ import java.util.HashMap; ...@@ -6,6 +6,7 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import org.apache.log4j.Logger;
import org.eclipse.swt.core.CallBack; import org.eclipse.swt.core.CallBack;
import org.eclipse.swt.core.ImageResolver; import org.eclipse.swt.core.ImageResolver;
import org.eclipse.swt.core.utils.MessageCallBack; import org.eclipse.swt.core.utils.MessageCallBack;
...@@ -22,8 +23,10 @@ import com.gx.obe.components.core.Constants; ...@@ -22,8 +23,10 @@ import com.gx.obe.components.core.Constants;
import com.gx.obe.components.core.enumeration.CommonEnum; import com.gx.obe.components.core.enumeration.CommonEnum;
import com.gx.obe.config.ConfigConstants; import com.gx.obe.config.ConfigConstants;
import com.gx.obe.config.utils.PropertiesUtils; import com.gx.obe.config.utils.PropertiesUtils;
import com.gx.obe.evaluation.step.review.composite.ExpertSignEvaluationComposite;
import com.gx.obe.http.util.Base64; import com.gx.obe.http.util.Base64;
import com.gx.obe.message.Messages; import com.gx.obe.message.Messages;
import com.gx.obe.util.utils.LogUtils;
import com.gx.obe.util.utils.MD5Utils; import com.gx.obe.util.utils.MD5Utils;
import com.gx.obe.util.utils.ObjectUtils; import com.gx.obe.util.utils.ObjectUtils;
import com.gx.obe.util.utils.SpellHelper; import com.gx.obe.util.utils.SpellHelper;
...@@ -55,6 +58,10 @@ public class DownloadExpertThread extends Thread { ...@@ -55,6 +58,10 @@ public class DownloadExpertThread extends Thread {
private Image defaultAvatorImage = ResourceManager.getPluginImage(IconsActivator.PLUGIN_ID, "icons/idCard.png");// 默认头像 private Image defaultAvatorImage = ResourceManager.getPluginImage(IconsActivator.PLUGIN_ID, "icons/idCard.png");// 默认头像
private MessageCallBack messageCallBack;; private MessageCallBack messageCallBack;;
private List<Expert> expertList = new ArrayList<Expert>(); private List<Expert> expertList = new ArrayList<Expert>();
private Logger logger = Logger.getLogger(DownloadExpertThread.class);
{
LogUtils.logClass(DownloadExpertThread.class);
}
public DownloadExpertThread(TenderProjectEntity tenderProjectEntity, String webserviceAddress, CallBack callBack) { public DownloadExpertThread(TenderProjectEntity tenderProjectEntity, String webserviceAddress, CallBack callBack) {
this.callBack = callBack; this.callBack = callBack;
...@@ -130,6 +137,16 @@ public class DownloadExpertThread extends Thread { ...@@ -130,6 +137,16 @@ public class DownloadExpertThread extends Thread {
} }
user.setCompany((String)expertJson.get("company")); user.setCompany((String)expertJson.get("company"));
if(null == userService){
userService = new UserService();
}
boolean specialty=userService.updateAssignProperty(user, new String[]{"specialty"});
if(specialty) {
ActionLogUtils.addServerLog(tenderProjectEntity.getId(), "下载专家时更新专家用户表专业信息1", "平台专家"+user.getUserName()+"specialty="+user.getSpecialty());
}else {
ActionLogUtils.addServerLog(tenderProjectEntity.getId(), "下载专家时更新专家用户表专业信息1失败", "平台专家"+user.getUserName()+"specialty="+user.getSpecialty());
}
Expert expert = new Expert(); Expert expert = new Expert();
expert.setUser(user); expert.setUser(user);
if(null != expertJson.get("isLeader") && "01".equals(expertJson.get("isLeader"))){ if(null != expertJson.get("isLeader") && "01".equals(expertJson.get("isLeader"))){
...@@ -140,10 +157,11 @@ public class DownloadExpertThread extends Thread { ...@@ -140,10 +157,11 @@ public class DownloadExpertThread extends Thread {
} }
// expert.setExpertType(ExpertEnum.EXPERT); // expert.setExpertType(ExpertEnum.EXPERT);
String type = ObjectUtils.getObjString(expertJson.get("type")); String type = ObjectUtils.getObjString(expertJson.get("type"));
int busType = type.contains("01") ? ExpertEnum.EXPERT_BUS : 0; // int busType = type.contains("01") ? ExpertEnum.EXPERT_BUS : 0;
int tecType = type.contains("02") ? ExpertEnum.EXPERT_TEC : 0; // int tecType = type.contains("02") ? ExpertEnum.EXPERT_TEC : 0;
int priceType = type.contains("03") ? ExpertEnum.EXPERT_PRICE : 0; // int priceType = type.contains("03") ? ExpertEnum.EXPERT_PRICE : 0;
expert.setEvalBidType(busType | tecType | priceType); // expert.setEvalBidType(busType | tecType | priceType);
expert.setEvalBidType(0);
setExpertMessgae(expert); setExpertMessgae(expert);
if(null != oldExpertMap.get((String)expertJson.get("account"))) { if(null != oldExpertMap.get((String)expertJson.get("account"))) {
...@@ -258,7 +276,13 @@ public class DownloadExpertThread extends Thread { ...@@ -258,7 +276,13 @@ public class DownloadExpertThread extends Thread {
userRoleService.createUserRole(user.getId(), new String[]{UserEnum.ROLE_TYPE_EXPERT}); userRoleService.createUserRole(user.getId(), new String[]{UserEnum.ROLE_TYPE_EXPERT});
}else{// 修改用户信息 }else{// 修改用户信息
user.setId(tempUser.getId()); user.setId(tempUser.getId());
userService.updateAssignProperty(user, new String[]{"userName", "userPassword", "professionalTitle", "userIdcard", "phone", "specialty", "company"}); boolean result=userService.updateAssignProperty(user, new String[]{"userName", "userPassword", "professionalTitle", "userIdcard", "phone", "specialty", "company"});
if(result) {
ActionLogUtils.addServerLog(tenderProjectEntity.getId(), "下载专家时更新专家用户表专业信息2", "平台专家"+user.getUserName()+"specialty="+user.getSpecialty());
}else {
ActionLogUtils.addServerLog(tenderProjectEntity.getId(), "下载专家时更新专家用户表失败", "平台专家"+user.getUserName()+"specialty="+user.getSpecialty());
}
userRoleService.initUserRole(user.getId(), UserEnum.ROLE_TYPE_EXPERT); userRoleService.initUserRole(user.getId(), UserEnum.ROLE_TYPE_EXPERT);
} }
return user; return user;
......
package com.gx.obe.report.dataset.excel;
import java.math.BigDecimal;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.gx.obe.business.enumeration.ExpertEnum;
import com.gx.obe.util.utils.BigDecimalUtils;
import com.gx.obe.util.utils.StringUtil;
import com.gx.obe.web.entity.expert.Expert;
import com.report.excel.ReportDataSet;
public class ExpertEvaluationTimeDateSet extends BaseDateSet{
/**
* 声明实例变量
*/
public List<ReportDataSet> getDateSetList(Map<String, String> paramsMap, Map<String, String> enumsMap) {
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm");
List<ReportDataSet> reportDataList = new ArrayList<ReportDataSet>();
ReportDataSet reportDataSet = getBaseDataSet(paramsMap);
// 获得签到专家集合
Date modifyDate = tenderProjectEntity.getModifyTime();
String appraiseStartTime = tenderProjectRuleEntity.getParamByKey("appraiseStartTime");
// BigDecimal expertEvaluationTime = BigDecimal.ZERO;
StringBuffer buff = new StringBuffer();
if(!StringUtil.empty(appraiseStartTime) && null != modifyDate) {
try {
Date appraiseStartDate = format.parse(appraiseStartTime);
BigDecimal divValue = new BigDecimal(60*60*1000);
BigDecimal centValue = new BigDecimal(60*1000);
long defaultrent = modifyDate.getTime() - appraiseStartDate.getTime();
int hourDefault = BigDecimalUtils.div(new BigDecimal(defaultrent), divValue).intValue();
int sentDefault = BigDecimalUtils.div(BigDecimalUtils.sub(new BigDecimal(defaultrent), new BigDecimal(hourDefault * 60*60*1000)), centValue,0).intValue();
buff.append(hourDefault).append("小时").append(sentDefault).append("分");
// expertEvaluationTime = BigDecimalUtils.div(BigDecimalUtils.sub(new BigDecimal(modifyDate.getTime()), new BigDecimal(appraiseStartDate.getTime())), divValue, 2);//获取评审时长(小时计数)
} catch (ParseException e) {
}
}
//
// String signType = null != paramsMap.get("SIGNTYPE") ? paramsMap.get("SIGNTYPE") : ExpertEnum.SIGN;
List<Expert> signExpertList = expertService.getExpertList(tenderProjectEntity.getId(), ExpertEnum.ALL);
List<Map<String, Object>> expertMapList = new ArrayList<Map<String, Object>>();
for(Expert expert : signExpertList){
Map<String, Object> expertMap = new HashMap<String, Object>();
if (ExpertEnum.BIDDING.equals(expert.getExpertType())) {
continue;
}
// @SuppressWarnings("unchecked")
// Map<String, Object> user = (Map<String, Object>)expertMap.get("user");
//
// if(null != user){
// for(Entry<String, Object> userEntry : user.entrySet()){
// if(!expertMap.containsKey(userEntry.getKey())){
// expertMap.put(userEntry.getKey(), userEntry.getValue());
// }
// }
// }
// 评委会职务
// tenderProjectEntity.getModifyTime();
expertMap.put("userName", expert.getUser().getUserName());
expertMap.put("idCard", expert.getUser().getUserIdcard());
try {
expertMap.put("startTime",!StringUtil.empty(appraiseStartTime)? format.format(format.parse(appraiseStartTime)) : "");
} catch (ParseException e) {
expertMap.put("startTime", "");
}
expertMap.put("endTime",null != modifyDate ? format.format(modifyDate) : "");
expertMap.put("expertEvaluationTime", buff);
expertMapList.add(expertMap);
}
reportDataSet.putDimension("expertList", expertMapList);
reportDataList.add(reportDataSet);
return reportDataList;
}
}
...@@ -689,6 +689,7 @@ public abstract class BaseDateSet implements IWordDataSet{ ...@@ -689,6 +689,7 @@ public abstract class BaseDateSet implements IWordDataSet{
} }
if(null != supplierOpeningResult.getBidPrice()){ if(null != supplierOpeningResult.getBidPrice()){
supplierMap.put("bidPrice", supplierOpeningResult.getBidPriceByUnit(tenderProjectRuleEntity.getPriceUnitUseDefault())); supplierMap.put("bidPrice", supplierOpeningResult.getBidPriceByUnit(tenderProjectRuleEntity.getPriceUnitUseDefault()));
supplierMap.put("bidPriceValue", supplierOpeningResult.getBidPrice());
supplierMap.put("bidPriceWithUnit", supplierOpeningResult.getBidPriceWithUnit(tenderProjectRuleEntity.getPriceUnitUseDefault())); supplierMap.put("bidPriceWithUnit", supplierOpeningResult.getBidPriceWithUnit(tenderProjectRuleEntity.getPriceUnitUseDefault()));
} }
} }
...@@ -900,6 +901,27 @@ public abstract class BaseDateSet implements IWordDataSet{ ...@@ -900,6 +901,27 @@ public abstract class BaseDateSet implements IWordDataSet{
SupplierComparator supplierComparator = new SupplierComparator("sortNo"); SupplierComparator supplierComparator = new SupplierComparator("sortNo");
Collections.sort(finalScoreSupplierList, supplierComparator); Collections.sort(finalScoreSupplierList, supplierComparator);
} }
List<Double> priceSortList = new ArrayList<Double>();
List<Double> busSortList = new ArrayList<Double>();
List<Double> tecSortList = new ArrayList<Double>();
for(Map<String, Object> supplierMap : finalScoreSupplierList) {
priceSortList.add(((BigDecimal)supplierMap.get("bidPriceValue")).doubleValue());
busSortList.add(((BigDecimal)supplierMap.get("busScore")).doubleValue());
tecSortList.add(((BigDecimal)supplierMap.get("tecScore")).doubleValue());
}
SortUtils priceSortUtil = new SortUtils(priceSortList, false);
SortUtils busSortUtil = new SortUtils(busSortList);
SortUtils tecSortUtil = new SortUtils(tecSortList);
for(Map<String, Object> supplierMap : finalScoreSupplierList) {
supplierMap.put("bidPriceSort", priceSortUtil.getSortNo(((BigDecimal)supplierMap.get("bidPriceValue")).doubleValue()));
supplierMap.put("busSort", busSortUtil.getSortNo(((BigDecimal)supplierMap.get("busScore")).doubleValue()));
supplierMap.put("tecSort", tecSortUtil.getSortNo(((BigDecimal)supplierMap.get("tecScore")).doubleValue()));
// priceSortList.add((BigDecimal)supplierMap.get("bidPriceValue"));
// busSortList.add((BigDecimal)supplierMap.get("busScore"));
// tecSortList.add((BigDecimal)supplierMap.get("tecScore"));
}
reportDataSet.putParam("finalScoreSupplierList", finalScoreSupplierList); reportDataSet.putParam("finalScoreSupplierList", finalScoreSupplierList);
return finalScoreSupplierList; return finalScoreSupplierList;
} }
......
...@@ -3,9 +3,12 @@ package com.gx.obe.report.dataset.word; ...@@ -3,9 +3,12 @@ package com.gx.obe.report.dataset.word;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Random;
import java.util.UUID;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import com.gx.obe.business.entity.SupplierEvaluationStep; import com.gx.obe.business.entity.SupplierEvaluationStep;
...@@ -17,11 +20,12 @@ import com.gx.obe.components.core.enumeration.EvaluationStepEnum; ...@@ -17,11 +20,12 @@ import com.gx.obe.components.core.enumeration.EvaluationStepEnum;
import com.gx.obe.components.core.enumeration.TenderProjectEnum; import com.gx.obe.components.core.enumeration.TenderProjectEnum;
import com.gx.obe.components.core.util.MoneyUtils; import com.gx.obe.components.core.util.MoneyUtils;
import com.gx.obe.formula.PriceParam; import com.gx.obe.formula.PriceParam;
import com.gx.obe.message.Messages;
import com.gx.obe.report.utils.Bean2MapUtils; import com.gx.obe.report.utils.Bean2MapUtils;
import com.gx.obe.util.utils.BigDecimalUtils; import com.gx.obe.util.utils.BigDecimalUtils;
import com.gx.obe.util.utils.ListSortUtils; import com.gx.obe.util.utils.ListSortUtils;
import com.gx.obe.util.utils.StringUtils; import com.gx.obe.util.utils.StringUtils;
import com.gx.obe.util.utils.UuidUtils;
import com.gx.obe.web.entity.EvaluationFactorResult;
import com.gx.obe.web.entity.Supplier; import com.gx.obe.web.entity.Supplier;
import com.gx.obe.web.entity.SupplierEvaluationResult; import com.gx.obe.web.entity.SupplierEvaluationResult;
import com.gx.obe.web.entity.SupplierOpeningResult; import com.gx.obe.web.entity.SupplierOpeningResult;
...@@ -33,14 +37,13 @@ import com.gx.obe.web.entity.price.BidPrice; ...@@ -33,14 +37,13 @@ import com.gx.obe.web.entity.price.BidPrice;
import com.gx.obe.web.entity.price.BidPriceResult; import com.gx.obe.web.entity.price.BidPriceResult;
import com.gx.obe.web.entity.tender.TenderProjectEntity; import com.gx.obe.web.entity.tender.TenderProjectEntity;
import com.report.word.WordTemplate; import com.report.word.WordTemplate;
import com.swtdesigner.SWTResourceManager;
public class JingNengEvaluationReportDataSet extends BaseDateSet { public class JingNengEvaluationReportDataSet extends BaseDateSet {
protected boolean isLimitPriceRecommend = false; protected boolean isLimitPriceRecommend = false;
List<Supplier> compliancePassList = new ArrayList<Supplier>(); List<Supplier> compliancePassList = new ArrayList<Supplier>();
List<Supplier> complianceUnPassList = new ArrayList<Supplier>(); List<Supplier> complianceUnPassList = new ArrayList<Supplier>();
String expertID = UuidUtils.getUUID();
public void init(TenderProjectEntity tenderProject, WordTemplate wordTemplate){ public void init(TenderProjectEntity tenderProject, WordTemplate wordTemplate){
super.init(tenderProject, wordTemplate); super.init(tenderProject, wordTemplate);
//获取复议原因和修改的步骤 //获取复议原因和修改的步骤
...@@ -103,11 +106,13 @@ public class JingNengEvaluationReportDataSet extends BaseDateSet { ...@@ -103,11 +106,13 @@ public class JingNengEvaluationReportDataSet extends BaseDateSet {
if(null != busEvaluationStep){ if(null != busEvaluationStep){
List<Map<String, Object>> supplierList = getItemEvaluationResultList(busEvaluationStep); List<Map<String, Object>> supplierList = getItemEvaluationResultList(busEvaluationStep);
reportDataSet.putParam("busScoreSupplierList", supplierList); reportDataSet.putParam("busScoreSupplierList", supplierList);
setEvaluationScoSreMassage(busEvaluationStep);
} }
EvaluationStepBidType tecEvaluationStep = getEvaluationStepBidType(scoreEvaluationStepList, EvaluationFactorEnum.EVAL_BID_TEC); EvaluationStepBidType tecEvaluationStep = getEvaluationStepBidType(scoreEvaluationStepList, EvaluationFactorEnum.EVAL_BID_TEC);
if(null != tecEvaluationStep){ if(null != tecEvaluationStep){
List<Map<String, Object>> supplierList = getItemEvaluationResultList(tecEvaluationStep); List<Map<String, Object>> supplierList = getItemEvaluationResultList(tecEvaluationStep);
reportDataSet.putParam("tecScoreSupplierList", supplierList); reportDataSet.putParam("tecScoreSupplierList", supplierList);
setEvaluationScoSreMassage(tecEvaluationStep);
} }
List<Expert> expertList = expertService.getExpertList(tenderProject.getId(), null); List<Expert> expertList = expertService.getExpertList(tenderProject.getId(), null);
...@@ -146,8 +151,141 @@ public class JingNengEvaluationReportDataSet extends BaseDateSet { ...@@ -146,8 +151,141 @@ public class JingNengEvaluationReportDataSet extends BaseDateSet {
} }
} }
reportDataSet.putParam("monitorNames", monitorNames.toString()); reportDataSet.putParam("monitorNames", monitorNames.toString());
// TODO
// List<Map<String, Object>> factorList = getFactList(5, 3);
// reportDataSet.putListParam("testBusfactorList", factorList);
//
// List<Map<String, Object>> supplierList = new ArrayList<Map<String, Object>>();
// for(int index = 1; index <= 3; index++){
// supplierList.add(addSupplier(index));
// }
//
// reportDataSet.putParam("testbussupplierList", supplierList);
// List<Map<String, Object>> treeCrossList = new ArrayList<Map<String, Object>>();
// for(Map<String, Object> supplier : supplierList){
// double totalScore = 0;
// for(Map<String, Object> factor : factorList){
// Map<String, Object> result = new HashMap<String, Object>();
// double score = Math.random()*100;
// totalScore += score;
// result.put("score", Math.random()*100);
// result.put("memo", getFixLenthString(5));
// result.put("supplierId", supplier.get("supplierId"));
// result.put("factorId", factor.get("factorId"));
// treeCrossList.add(result);
// }
// supplier.put("avgScore", totalScore/expertList.size());
// }
//
// reportDataSet.putParam("testBusfactorList"+"testbussupplierList", treeCrossList);
}
/*
* 返回长度为【strLength】的随机数,在前面补0
*/
private static String getFixLenthString(int strLength) {
Random rm = new Random();
// 获得随机数
double pross = (1 + rm.nextDouble()) * Math.pow(10, strLength);
// 将获得的获得随机数转化为字符串
String fixLenthString = String.valueOf(pross);
// 返回固定的长度的随机数
String str = fixLenthString.substring(1, strLength + 1);
return str;
}
private static Map<String, Object> addSupplier(int index){
Map<String, Object> supplier = new HashMap<String, Object>();
supplier.put("index", index);
supplier.put("supplierName", "试供应商"+ index);
supplier.put("supplierId", UUID.randomUUID().toString());
supplier.put("orgCode", getFixLenthString(5));
// supplier.put("orgCode", "中华人民共和国中华人民共和国中华人民共和国中华人民共和国中华人民共和国中华人民共和国中华人民共和国"+UUID.randomUUID().toString()+ UUID.randomUUID().toString()+"中华人民共和国中华人民共和国");
supplier.put("linker", "郭永荣");
supplier.put("gender", "1");
supplier.put("linkerPhone", "13"+index + getFixLenthString(5));
supplier.put("time", new Date());
BigDecimal bidPrice = BigDecimal.valueOf(Math.random()*1000).setScale(3, BigDecimal.ROUND_HALF_UP);
BigDecimal modifyPrice = BigDecimal.valueOf(Math.random()*20).setScale(3, BigDecimal.ROUND_HALF_UP);
supplier.put("bidPrice", bidPrice);
supplier.put("bidPriceWithUnit", bidPrice+"万元");
supplier.put("bidPriceUnit", "万元");
supplier.put("modifyReason", "单价错误调整"+modifyPrice+"万元");
supplier.put("evaluationPrice", bidPrice.add(modifyPrice));
supplier.put("sort", index);
return supplier;
} }
private static List<Map<String, Object>> getFactList(int topSize, int childCount){
List<Map<String, Object>> factorList = new ArrayList<Map<String, Object>>();
for(int top = 1; top < topSize; top ++){
Map<String, Object> factor = new HashMap<String, Object>();
factor.put("factorId", UUID.randomUUID().toString());
factor.put("name", "一级指标"+ top);// +"是否满足招标文件要求");
factor.put("parentId", null);
factor.put("score", (int)(Math.random()*100));
factor.put("level", top +"");
factor.put("memo", "一级指标"+ top +"是否满足招标文件要求");
factorList.add(factor);
if(top != 1)
for(int i = 1; i < childCount; i++){
Map<String, Object> childFactor = new HashMap<String, Object>();
childFactor.put("factorId", UUID.randomUUID().toString());
childFactor.put("name", "二级指标指标"+ top +""+i);
childFactor.put("parentId", factor.get("factorId").toString());
childFactor.put("score", (int)(Math.random()*100));
childFactor.put("memo", "二级指标指标"+ top +""+i +"是否满足招标文件要求");
childFactor.put("level", top +"-" + i);
factorList.add(childFactor);
if(i % 2 != 0){
for(int j = 0; j < 3; j++){
Map<String, Object> _childFactor = new HashMap<String, Object>();
_childFactor.put("factorId", UUID.randomUUID().toString());
_childFactor.put("name", "三级指标指标"+ top +"_"+i +"_"+j);
_childFactor.put("parentId", childFactor.get("factorId").toString());
_childFactor.put("score", (int)(Math.random()*100));
_childFactor.put("level", top +"-" + i +"-" + j);
_childFactor.put("memo", "三级指标指标"+ top +"_"+i +"_"+j+"是否满足招标文件要求");
factorList.add(_childFactor);
if(j == 6){
for(int n = 0; n < 3; n++){
Map<String, Object> childFactor4 = new HashMap<String, Object>();
childFactor4.put("factorId", UUID.randomUUID().toString());
childFactor4.put("name", "四级指标指标"+ top +"_"+i +"_"+j +"_"+n+"是否满足招标文件要求");
childFactor4.put("parentId", _childFactor.get("factorId").toString());
childFactor4.put("score", (int)(Math.random()*100));
childFactor4.put("level", top +"-" + i +"-" + j +"-"+n);
childFactor4.put("memo", "四级指标指标"+ top +"_"+i +"_"+j +"_"+n+"是否满足招标文件要求");
factorList.add(childFactor4);
if(i % 5 ==0)
for(int m = 0; m < 3; m++){
Map<String, Object> childFactor5 = new HashMap<String, Object>();
childFactor5.put("factorId", UUID.randomUUID().toString());
childFactor5.put("name", "五级指标指标"+ top +"_"+i +"_"+j +"_"+n+"_"+m+"是否满足招标文件要求");
childFactor5.put("parentId", childFactor4.get("factorId").toString());
childFactor5.put("score", (int)(Math.random()*100));
childFactor5.put("level", top +"-" + i +"-" + j +"-"+n+"-"+m);
childFactor5.put("memo", "五级指标指标"+ top +"_"+i +"_"+j +"_"+n+"_"+m+"是否满足招标文件要求");
factorList.add(childFactor5);
}
}
}
}
}
}
}
return factorList;
}
private List<Map<String, Object>> getItemEvaluationResultList(EvaluationStepBidType evaluationStepBidType){ private List<Map<String, Object>> getItemEvaluationResultList(EvaluationStepBidType evaluationStepBidType){
List<EvaluationStep> evaluationStepList = evaluationStepBidType.getEvaluationStepList(); List<EvaluationStep> evaluationStepList = evaluationStepBidType.getEvaluationStepList();
List<Supplier> supplierList = null; List<Supplier> supplierList = null;
...@@ -269,6 +407,189 @@ public class JingNengEvaluationReportDataSet extends BaseDateSet { ...@@ -269,6 +407,189 @@ public class JingNengEvaluationReportDataSet extends BaseDateSet {
return supplierMapList; return supplierMapList;
} }
/**
* 设置指标评审明细结构
*/
/**
* @param evaluationStepBidType
*/
private void setEvaluationScoSreMassage(EvaluationStepBidType evaluationStepBidType) {
// TODO
// 第一步,通过步骤获取指标
// evaluationStepBidType.get
// 第二步:通过步骤获取专家信息
// 第三步:通过步骤获取供应商信息
// 第四步:通过步骤获取专家对供应商步骤评审信息
// 获得专家集合
// System.out.println();
List<EvaluationFactor> factorLis = evaluationFactorService.getEvaluationStepFactorTreeList(tenderProject.getId(), evaluationStepBidType);//(, true);
List<Expert> expertList = getEvalExpertListByEvalNode(evaluationStepBidType);
// 获得投标人集合
List<Supplier> supplierList = supplierService.getEvaluationStepSupplierList(tenderProject.getId(), evaluationStepBidType.getEvaluationStepList().get(0));
// 先组装指标专家表头
// Map<String, Object> factorMapList = new HashMap<>();
List<Map<String, Object>> factorMapList = new ArrayList<Map<String, Object>>();
List<EvaluationFactor> newEvaluationFactors = new ArrayList<>();
List<Supplier> newSuppliers = new ArrayList<>();
Supplier supplierExpert = new Supplier();
newSuppliers.addAll(supplierList);
supplierExpert.setId(expertID);
supplierExpert.setSupplierName("评审专家");
newSuppliers.add(supplierExpert);
Map<String, Map<String, Object>> crossMap = new HashMap<>();// 交叉单元格对象数据集 指标名称 评审专家 供应商名称
for(Expert expert: expertList) {
factorLis.stream().forEach(t ->{
EvaluationFactor parentEvaluationFactor = new EvaluationFactor();
parentEvaluationFactor.setId(t.getId());
parentEvaluationFactor.setFactorName(t.getFactorName());
parentEvaluationFactor.setChildFactorList(t.getChildFactorList());
setChildEvaluationFactor(null, parentEvaluationFactor, expert, crossMap, factorMapList);
Map<String, Object> dateMap = new HashMap<String, Object>();
dateMap.put("name", parentEvaluationFactor.getFactorName());
dateMap.put("factorId",parentEvaluationFactor.getId());
dateMap.put("parentId", null);
parentEvaluationFactor.setFactorCode(expert.getUser().getUserName());
factorMapList.add(dateMap);
newEvaluationFactors.add(parentEvaluationFactor);
});
// 获取专家评审指标结果信息
List<EvaluationFactorResult> evaluationFactorResultList = evaluationFactorResultService.getExpertEvaluationFactorResult(tenderProject.getId(), evaluationStepBidType.getId(), expert.getUserId(), null);
if(null != evaluationFactorResultList && evaluationFactorResultList.size() > 0 ) {
evaluationFactorResultList.forEach(t ->{
Map<String, Object> dateMap1 = new HashMap<String, Object>();
dateMap1.put("supplierId", t.getSupplierId());
dateMap1.put("factorId", t.getFactorId()+ t.getUserId());
dateMap1.put("score", t.getEvaluationScore());
// System.out.println("设置指标评审结果值:"+ t.getFactorId()+ t.getUserId()+t.getSupplierId());
crossMap.put(t.getFactorId()+ t.getUserId()+t.getSupplierId(), dateMap1);
});
}
}
List<Map<String, Object>> crossMapList = new ArrayList<>();
for(EvaluationFactor evaluationFactor : newEvaluationFactors) {
for(Supplier supplier : newSuppliers) {
setValue(crossMapList, evaluationFactor, crossMap, supplier);
}
// Map<String, Object> dateMap = new HashMap<String, Object>();
// dateMap.put("factorId", evaluationFactor.getId());
// dateMap.put("supplierId", expertID);
// dateMap.put("score", evaluationFactor.getFactorCode());
// crossMapList.add(dateMap);
}
List<Map<String, Object>> supplierMapList = new ArrayList<Map<String, Object>>();
for(Supplier supplier : newSuppliers) {
Map<String, Object> supplierMap = new HashMap<String, Object>();
supplierMap.put("supplierId", supplier.getId());
supplierMap.put("supplierName", supplier.getSupplierName());
supplierMapList.add(supplierMap);
}
System.out.println();
if(evaluationStepBidType.getEvalBidType().equals(EvaluationFactorEnum.EVAL_BID_BUS)){
//商务部分
reportDataSet.putParam("busfactorList", factorMapList);
reportDataSet.putParam("bussupplierList", supplierMapList);
// reportDataSet.put("testBusfactorListtestbussupplierList", crossMapList);
reportDataSet.putParam("busfactorList"+"bussupplierList", crossMapList);
}else if(evaluationStepBidType.getEvalBidType().equals(EvaluationFactorEnum.EVAL_BID_TEC)) {
//技术部分
reportDataSet.putParam("tecFactorList", factorMapList);
reportDataSet.putParam("tecSupplierList", supplierMapList);
reportDataSet.putParam("tecFactorList"+"tecSupplierList", crossMapList);
}
}
private void setValue (List<Map<String, Object>> crossMapList, EvaluationFactor evaluationFactor, Map<String, Map<String, Object>> crossMap, Supplier supplier) {
if(null != evaluationFactor.getChildFactorList() && evaluationFactor.getChildFactorList().size() > 0) {
for(EvaluationFactor childEvaluationFactor : evaluationFactor.getChildFactorList()) {
setValue(crossMapList, childEvaluationFactor, crossMap, supplier);
}
}else {
if(null != crossMap.get(evaluationFactor.getId() + supplier.getId())) {
crossMapList.add(crossMap.get(evaluationFactor.getId()+ supplier.getId()));
System.out.println("获取指标主键id值"+evaluationFactor.getId() + supplier.getId() + ": " +crossMap.get(evaluationFactor.getId()+ supplier.getId()));
}
}
}
/**
* 指标id拼接上专家id,作为新的指标主键,这样可以进行专家指标循环设值
* @param evaluationFactor
* @param expert
*/
private void setChildEvaluationFactor(EvaluationFactor parentFactor, EvaluationFactor evaluationFactor, Expert expert, Map<String, Map<String, Object>> crossMap, List<Map<String, Object>> factorMapList){
if(null != evaluationFactor.getChildFactorList() && evaluationFactor.getChildFactorList().size() > 0) {
evaluationFactor.setId(evaluationFactor.getId() + expert.getUserId());
List<EvaluationFactor> childrenList = evaluationFactor.getChildFactorList();
List<EvaluationFactor> newChildrenList = new ArrayList<EvaluationFactor>();
childrenList.stream().forEach(t -> {
EvaluationFactor childEvaluationFactor = new EvaluationFactor();
childEvaluationFactor.setId(t.getId());
childEvaluationFactor.setFactorName(t.getFactorName());
childEvaluationFactor.setParentFactor(evaluationFactor);
childEvaluationFactor.setParentId(evaluationFactor.getId());
newChildrenList.add(childEvaluationFactor);
});
evaluationFactor.setChildFactorList(newChildrenList);
for(EvaluationFactor childEvaluationFactor : evaluationFactor.getChildFactorList()) {
setChildEvaluationFactor(evaluationFactor, childEvaluationFactor, expert, crossMap, factorMapList);
}
}else {
// EvaluationFactor expertEvaluationFactor = new EvaluationFactor();
evaluationFactor.setId(evaluationFactor.getId()+ expert.getUserId());
evaluationFactor.setFactorCode(expert.getUser().getUserName());
Map<String, Object> dateMap = new HashMap<String, Object>();
dateMap.put("supplierId", expertID);
dateMap.put("factorId", evaluationFactor.getId());
dateMap.put("score", expert.getUser().getUserName());
// crossMap.put(key, value)
// System.out.println("设置指标评审结果值:"+ evaluationFactor.getId()+ expert.getUserId()+ "expert");
crossMap.put(evaluationFactor.getId()+ expertID, dateMap);
System.out.println("设置指标评审结果值:"+evaluationFactor.getId()+ expertID);
// expertEvaluationFactor.setFactorCode(factorCode);
// evaluationFactor.addChild(factor);
Map<String, Object> factor = new HashMap<String, Object>();
factor.put("factorId", evaluationFactor.getId());
factor.put("name", evaluationFactor.getFactorName());// +"是否满足招标文件要求");
if(null != parentFactor) {
evaluationFactor.setParentId(parentFactor.getId());
factor.put("parentId", parentFactor.getId());
}else {
factor.put("parentId", null);
}
// factor.put("score", (int)(Math.random()*100));
// factor.put("level", top +"");
factorMapList.add(factor);
}
}
/**
* @Description: 获得指定评标步骤的专家列表
* @author guoyr
* @param evaluationStep
* @return
*/
public List<Expert> getEvalExpertListByEvalNode(EvaluationStep evaluationStep){
List<Expert> expertList = expertService.getEvaluationStepExpertList(tenderProject.getId(), evaluationStep);
// 未获得评审专家,则创建1位临时评审专家。
if(null == expertList || expertList.size() < 1){
expertList = new ArrayList<>();
}
return expertList;
}
/** /**
* @Description: 初步评审 * @Description: 初步评审
* @author wangxiang * @author wangxiang
...@@ -458,6 +779,7 @@ public class JingNengEvaluationReportDataSet extends BaseDateSet { ...@@ -458,6 +779,7 @@ public class JingNengEvaluationReportDataSet extends BaseDateSet {
priceParam = PriceParam.deserializePriceParam(evaluationFactor.getComputerParams()); priceParam = PriceParam.deserializePriceParam(evaluationFactor.getComputerParams());
} }
if (priceParam != null) { if (priceParam != null) {
String separator=System.getProperty("line.separator");
formula = priceParam.getFormula(); formula = priceParam.getFormula();
} }
if (!StringUtils.isEmpty(formula)) { if (!StringUtils.isEmpty(formula)) {
......
...@@ -98,8 +98,9 @@ public class CreateReportThread implements Runnable{ ...@@ -98,8 +98,9 @@ public class CreateReportThread implements Runnable{
private void createReportWidthNewReportEngine(final ProjectTemplate template, File templateFile, File outFile, final String templateName){ private void createReportWidthNewReportEngine(final ProjectTemplate template, File templateFile, File outFile, final String templateName){
try { try {
// ExcelReportUtil.generate(templateFile.getAbsolutePath() , outFile.getAbsolutePath(), new ExcelGenerateAdapter() {
// });
ExcelReportUtil.generate(templateFile.getAbsolutePath() , outFile.getAbsolutePath(), new ExcelGenerateAdapter(){ ExcelReportUtil.generate(templateFile.getAbsolutePath() , outFile.getAbsolutePath(), new ExcelGenerateAdapter(){
@Override
public List<ReportDataSet> initReportDataSetList(String dataSetName, Map<String, String> paramMap, Map<String, String> enumMap) { public List<ReportDataSet> initReportDataSetList(String dataSetName, Map<String, String> paramMap, Map<String, String> enumMap) {
paramMap.put("TEMPLATEFILENAME", templateName); paramMap.put("TEMPLATEFILENAME", templateName);
List<ReportDataSet> reportDataSetList = null; List<ReportDataSet> reportDataSetList = null;
......
package com.gx.obe.util.utils;
import org.apache.log4j.Logger;
import org.eclipse.core.runtime.Platform;
public class PlatformUtils {
private static Logger LOG = Logger.getLogger(PlatformUtils.class);
/**
* @Description: 根据类路径获取对象
* @author chenxw
* @param classPath
* @return
*/
public static Object getByClassPath(String classPath, String SYMBOLIC_NAME) {
Object object = null;
if (null != classPath) {
try {
object = Platform.getBundle(SYMBOLIC_NAME).loadClass(classPath).newInstance();
} catch (InstantiationException e) {
LOG.error(classPath, e);
} catch (IllegalAccessException e) {
LOG.error(classPath, e);
} catch (ClassNotFoundException e) {
LOG.error(classPath, e);
}
}
return object;
}
}
...@@ -171,5 +171,19 @@ public class SortUtils { ...@@ -171,5 +171,19 @@ public class SortUtils {
// } // }
} }
} }
public static void main(String[] args) {
List<Double> list = new ArrayList();
list.add(6.66);
list.add(4.33);
list.add(5.73);
list.add(4.38);
SortUtils so = new SortUtils(list);
System.out.println(so.getSortNo(6.66));
System.out.println(so.getSortNo(4.33));
System.out.println(so.getSortNo(5.73));
System.out.println(so.getSortNo(1.11));
System.out.println(so.getSortNo(4.38));
}
} }
...@@ -340,6 +340,7 @@ public class DownloadDecBidFileComposite extends Composite { ...@@ -340,6 +340,7 @@ public class DownloadDecBidFileComposite extends Composite {
titleComposite.layout(); titleComposite.layout();
projectRuleService = new ProjectRuleService(); projectRuleService = new ProjectRuleService();
tenderProjectService = new TenderProjectService(); tenderProjectService = new TenderProjectService();
zbFileBtn.setSelection(true);
menuService = new MenuService(); menuService = new MenuService();
bidOpeningStageRefresh(); bidOpeningStageRefresh();
if (isFtp) { if (isFtp) {
......
...@@ -38,7 +38,7 @@ public class ComparisonData { ...@@ -38,7 +38,7 @@ public class ComparisonData {
} }
public String putComparisonContent(String rowId, String titleId, String itemId, String value) { public String putComparisonContent(String rowId, String titleId, String itemId, String value) {
System.out.println( "keys:" +rowId +","+ titleId+","+itemId + " value :" + value + "\r\n"); // System.out.println( "keys:" +rowId +","+ titleId+","+itemId + " value :" + value + "\r\n");
return comparisonContentMap.put(Keys.of(rowId, titleId, itemId), value); return comparisonContentMap.put(Keys.of(rowId, titleId, itemId), value);
} }
......
package com.gx.obe.component.comparison;
import java.util.ArrayList;
import java.util.List;
public class KTableDataSource {
public List<List<Object>> rowList = new ArrayList<>();
public List<String> titleList = new ArrayList<>();
public List<List<Object>> getRowList() {
return rowList;
}
public void setRowList(List<List<Object>> rowList) {
this.rowList = rowList;
}
public List<String> getTitleList() {
return titleList;
}
public void setTitleList(List<String> titleList) {
this.titleList = titleList;
}
public void addRowList(List<Object> tempRowList) {
rowList.add(tempRowList);
}
}
package com.gx.obe.component.comparison;
import java.util.Optional;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Composite;
import de.kupzog.ktable.KTable;
import de.kupzog.ktable.KTableCellRenderer;
import de.kupzog.ktable.SWTX;
import de.kupzog.ktable.model.CommonKtableCModel;
import de.kupzog.ktable.renderers.FixedWrapCellRenderer;
import de.kupzog.ktable.renderers.TextWrapCellRenderer;
public class OtherMessageSHowTable extends KTable {
/**
* @Description: 换行文本渲染
*/
private static final FixedWrapCellRenderer FIXED_RENDERER = new FixedWrapCellRenderer();
/**
* @Description: 换行文本渲染
*/
private static final TextWrapCellRenderer TEXT_RENDERER = new TextWrapCellRenderer();
/**
* @Description: 固定行数
*/
private static final int HEAD_ROW = 1;
private final CommonKtableCModel model;
// private final List<Column> headColList;
// private final List<Column> titleColList;
// private final List<Column> itemColList;
// private final List<String> rowList;
// private final Map<Keys, String> headContentMap;
// private final Map<Keys, String> comparisonContentMap;
private KTableDataSource kTableDataSource;
public OtherMessageSHowTable(Composite parent, KTableDataSource kTableDataSource) {
super(parent, SWTX.AUTO_SCROLL | SWT.FULL_SELECTION | SWTX.EDIT_ON_KEY | SWTX.FILL_WITH_LASTCOL);
this.kTableDataSource = Optional.ofNullable(kTableDataSource).orElseGet(KTableDataSource::new);
// this.headColList = comparisonData.getHeadColList();
// this.titleColList = comparisonData.getTitleColList();
// this.itemColList = comparisonData.getItemColList();
// this.rowList = comparisonData.getRowList();
// this.headContentMap = comparisonData.getHeadContentMap();
// this.comparisonContentMap = comparisonData.getComparisonContentMap();
this.model = new CommonKtableCModel(this, 1,1,kTableDataSource.getRowList().size(), kTableDataSource.getTitleList().size());
this.setModel(model);
// IntStream.range(0, headColList.size()).forEach(i -> model.addRowSpan(0, i, HEAD_ROW));
//// IntStream.range(0, titleColList.size()).map(i -> i * itemColList.size()).map(i -> i + headColList.size()).forEach(i -> model.addColSpan(0, i, itemColList.size()));
//
// IntStream.range(0, titleColList.size() * itemColList.size( )+ headColList.size()).forEach(i -> model.setColumnWidth(i, 100));
this.model.setRowHeightRender($ -> 30);
// this.model.setCellBackgroundRender(($, $$) -> SWTResourceManager.getColor(SWT.COLOR_WHITE));
this.model.setCellContentRender(this::receiveContent);
this.model.setCellRender(this::receiveCellRender);
this.model.setCellAlignmentRender(this::receiveCellAlignment);
}
/**
* @Description: 加载内容
* @author chenxw
* @param row
* @param col
* @return
*/
private String receiveContent(int row, int col) {
// System.out.println(row + ": " + col);
if (col < kTableDataSource.getTitleList().size()) {
if(row == 0 ) {
return kTableDataSource.getTitleList().get(col);
}else {
if(null == kTableDataSource.getRowList().get(row -1).get(col) || "null".equals(kTableDataSource.getRowList().get(row -1).get(col))) {
return "";
}
return kTableDataSource.getRowList().get(row -1).get(col) + "";
}
}else {
return "";
}
}
/**
* @Description: 加载渲染器
* @author chenxw
* @param row
* @param col
* @return
*/
private KTableCellRenderer receiveCellRender(int row, int col) {
if (this.model.isFixedCell(col, row)) {
return FIXED_RENDERER;
}
return TEXT_RENDERER;
}
/**
* @Description: 加载单元格对齐方式
* @author chenxw
* @param row
* @param col
* @return
*/
private int receiveCellAlignment(int row, int col) {
return SWTX.ALIGN_VERTICAL_CENTER | SWTX.ALIGN_HORIZONTAL_CENTER;
}
}
package com.gx.obe.struct.beans; package com.gx.obe.struct.beans;
/** /**
* 业绩?
* @author mazc * @author mazc
* @Description: * @Description:
*/ */
......
...@@ -6,12 +6,13 @@ import java.util.concurrent.CopyOnWriteArrayList; ...@@ -6,12 +6,13 @@ import java.util.concurrent.CopyOnWriteArrayList;
public class StructDateInfo { public class StructDateInfo {
private final List<TemplateDataItem> templateDataItemList = new CopyOnWriteArrayList<>(); private final List<TemplateDataItem> templateDataItemList = new CopyOnWriteArrayList<>();
private final List<TemplateTable> templateTableList = new CopyOnWriteArrayList<>(); private final List<TemplateTable> templateTableList = new CopyOnWriteArrayList<>();// TT类型结构化数据
private final List<ModelData> modelDataList = new CopyOnWriteArrayList<>(); private final List<ModelData> modelDataList = new CopyOnWriteArrayList<>();//MD类型数据
private final List<BusinessLicense> businessLicenseList = new CopyOnWriteArrayList<>(); private final List<BusinessLicense> businessLicenseList = new CopyOnWriteArrayList<>();
private final List<Finance> financeList = new CopyOnWriteArrayList<>(); private final List<Finance> financeList = new CopyOnWriteArrayList<>();
private final List<Performance> performanceList = new CopyOnWriteArrayList<>(); private final List<Performance> performanceList = new CopyOnWriteArrayList<>(); // 投标人业绩
private final List<BidderBasicInfo> bidderBasicInfoList = new CopyOnWriteArrayList<>(); private final List<BidderBasicInfo> bidderBasicInfoList = new CopyOnWriteArrayList<>();//投标人基本情况一览表
private final List<Qualification> qualificationList = new CopyOnWriteArrayList<>(); private final List<Qualification> qualificationList = new CopyOnWriteArrayList<>();
private final List<ProjectLeader> projectLeaderList = new CopyOnWriteArrayList<>(); private final List<ProjectLeader> projectLeaderList = new CopyOnWriteArrayList<>();
private final List<AttachmentFile> attachmentFileList = new CopyOnWriteArrayList<>(); private final List<AttachmentFile> attachmentFileList = new CopyOnWriteArrayList<>();
......
package com.gx.obe.struct.composite; package com.gx.obe.struct.composite;
import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.OptionalInt;
import java.util.function.Function; import java.util.function.Function;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import java.util.stream.IntStream;
import org.eclipse.swt.SWT; import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.FillLayout; import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import com.gx.obe.bind.prop.Prop; import com.gx.obe.bind.prop.Prop;
import com.gx.obe.common.file.enumeration.FileConstants;
import com.gx.obe.component.comparison.Column; import com.gx.obe.component.comparison.Column;
import com.gx.obe.component.comparison.ComparisonData; import com.gx.obe.component.comparison.ComparisonData;
import com.gx.obe.component.comparison.ComparisonTable; import com.gx.obe.component.comparison.ComparisonTable;
import com.gx.obe.component.comparison.KTableDataSource;
import com.gx.obe.component.comparison.OtherMessageSHowTable;
import com.gx.obe.component.rx.RxSwt; import com.gx.obe.component.rx.RxSwt;
import com.gx.obe.component.utils.CompositeUtils; import com.gx.obe.component.utils.CompositeUtils;
import com.gx.obe.components.core.Constants; import com.gx.obe.components.core.Constants;
import com.gx.obe.components.core.enumeration.CommonEnum;
//import com.gx.obe.components.core.vo.TableXML; //import com.gx.obe.components.core.vo.TableXML;
//import com.gx.obe.components.core.vo.TableXML.Tr; //import com.gx.obe.components.core.vo.TableXML.Tr;
//import com.gx.obe.components.core.vo.TableXML.Tr.Td; //import com.gx.obe.components.core.vo.TableXML.Tr.Td;
import com.gx.obe.http.json.JsonUtil; import com.gx.obe.http.json.JsonUtil;
import com.gx.obe.message.Messages;
import com.gx.obe.struct.beans.BidderBasicInfo;
import com.gx.obe.struct.beans.Finance;
import com.gx.obe.struct.beans.ModelData;
import com.gx.obe.struct.beans.Performance;
import com.gx.obe.struct.beans.TableXML2; import com.gx.obe.struct.beans.TableXML2;
import com.gx.obe.struct.beans.Td; import com.gx.obe.struct.beans.Td;
import com.gx.obe.struct.beans.TemplateTable; import com.gx.obe.struct.beans.TemplateTable;
import com.gx.obe.struct.beans.Tr; import com.gx.obe.struct.beans.Tr;
import com.gx.obe.struct.enums.DataCategoryEnum;
import com.gx.obe.struct.service.BidderInfoService;
import com.gx.obe.struct.service.FinanceService;
import com.gx.obe.struct.service.ModelDataService;
import com.gx.obe.struct.service.PerformanceService;
import com.gx.obe.struct.service.TemplateTableService; import com.gx.obe.struct.service.TemplateTableService;
import com.gx.obe.struct.utils.Bean2MapUtils;
import com.gx.obe.struct.utils.GetTypeUtils;
import com.gx.obe.util.utils.CollectionUtils; import com.gx.obe.util.utils.CollectionUtils;
import com.gx.obe.util.utils.StringUtils; import com.gx.obe.util.utils.ObjectUtils;
import com.gx.obe.web.entity.Supplier; import com.gx.obe.web.entity.Supplier;
import com.gx.obe.web.entity.tender.TenderProjectRuleEntity;
import com.gx.obe.web.service.ProjectRuleService;
public class TemplateTableComparisonComposite extends Composite { public class TemplateTableComparisonComposite extends Composite {
private final TemplateTableService templateTableService = new TemplateTableService(); private final TemplateTableService templateTableService = new TemplateTableService();
private final PerformanceService performanceService = new PerformanceService();
private final FinanceService financeService = new FinanceService();
private final ModelDataService modelDataService = new ModelDataService();
private final BidderInfoService bidderInfoService = new BidderInfoService();
private final Prop<ComparisonData> comparisonData = new Prop<>(); private final Prop<ComparisonData> comparisonData = new Prop<>();
private KTableDataSource kTableDataSource = null;
private List<Map<String, String>> rowList;
public TemplateTableComparisonComposite(Composite parent, int style) { public TemplateTableComparisonComposite(Composite parent, int style) {
super(parent, style); super(parent, style);
setLayout(new FillLayout(SWT.HORIZONTAL)); setLayout(new FillLayout(SWT.HORIZONTAL));
comparisonData.bind(t -> {
}
private void init(String dataCategory, String relChapterType) {
if(dataCategory.equals("MD") && ( relChapterType.equals("EQ_BidderBasicInfo") || relChapterType.equals("EQ_FinancialReport") || relChapterType.contains("EQ_Performance_"))) {
CompositeUtils.disposeChildren(this); CompositeUtils.disposeChildren(this);
new ComparisonTable(this, t); new OtherMessageSHowTable(this, kTableDataSource);
this.layout(); this.layout();
}); // kTableDataSource.bind(t -> {
// this.layout();
// });
}else {
comparisonData.bind(t -> {
CompositeUtils.disposeChildren(this);
new ComparisonTable(this, t);
this.layout();
});
}
} }
public void refresh(String tenderId, String relChapterType, String dataCode, String dataCategory, List<Supplier> supplierList) {
public void refresh(String tenderId, String relChapterType, String dataCode, List<Supplier> supplierList) { if(dataCategory.equals(DataCategoryEnum.MD.getKey())) {
RxSwt.run(() -> getComparisonData(tenderId, relChapterType, dataCode, supplierList)).checkWidget(this).exe(comparisonData::set); if( relChapterType.equals("EQ_BidderBasicInfo") || relChapterType.equals("EQ_FinancialReport") || relChapterType.contains("EQ_Performance_")) {
kTableDataSource = getEQ_FinancialReportData(tenderId, relChapterType, dataCode, supplierList);
Display.getDefault().syncExec(new Runnable() {
public void run() {
init(dataCategory, relChapterType);
}
});
}else {
init(dataCategory, relChapterType);
RxSwt.run(() -> getComparisonData(tenderId, relChapterType, dataCode, supplierList)).checkWidget(this).exe(comparisonData::set);
}
}else if(dataCategory.equals(DataCategoryEnum.TT.getKey())){
init(dataCategory, relChapterType);
RxSwt.run(() -> getComparisonData(tenderId, relChapterType, dataCode, supplierList)).checkWidget(this).exe(comparisonData::set);
}
} }
/** /**
...@@ -132,7 +186,7 @@ public class TemplateTableComparisonComposite extends Composite { ...@@ -132,7 +186,7 @@ public class TemplateTableComparisonComposite extends Composite {
return; return;
} }
// //
int trIndex = 0; int trIndex = 1;
for(Tr tr: supplierTableXML.getBodyList()) { for(Tr tr: supplierTableXML.getBodyList()) {
int tdIndex = 0; int tdIndex = 0;
for(Td td : tr.getTds()) { for(Td td : tr.getTds()) {
...@@ -146,10 +200,134 @@ public class TemplateTableComparisonComposite extends Composite { ...@@ -146,10 +200,134 @@ public class TemplateTableComparisonComposite extends Composite {
// //
} }
// 财务报告
/**
* 小范本类型数据加载
* @param tenderId
* @param relChapterType
* @param dataCode
* @param supplierList
* @return
*/
private KTableDataSource getEQ_FinancialReportData(String tenderId, String relChapterType, String dataCode, List<Supplier> supplierList) {
ProjectRuleService projectRuleService = new ProjectRuleService();
TenderProjectRuleEntity tenderProjectRuleEntity = projectRuleService.getProjectRule(tenderId);
KTableDataSource kTableDataSource = new KTableDataSource();
List<String> titleList = new ArrayList<>();
titleList.add(Messages.Num);
//
if( relChapterType.equals("EQ_BidderBasicInfo")) {
//投标人基本信息
// 读取xml模版信息
File templateFile = FileConstants.getResourceFile(Constants.TYPE_BIDDER);
Map<String, List<Map<String, String>>> typeMap = GetTypeUtils.resolverPerformance(tenderId, templateFile.getAbsolutePath());
rowList = typeMap.get(tenderProjectRuleEntity.getParamByKey("professionalCode"));
// titleList.add(Messages.LoginDialog_label_2_text);
for(Map<String, String> map : rowList) {
titleList.add(map.get("name"));
}
}else if(relChapterType.equals("EQ_FinancialReport")) {
//财务指标
titleList.add(Messages.LoginDialog_label_15_text);
titleList.add(Messages.LoginDialog_label_16_text);
titleList.add(Messages.LoginDialog_label_17_text);
titleList.add(Messages.LoginDialog_label_18_text);
titleList.add(Messages.LoginDialog_label_19_text);
titleList.add(Messages.LoginDialog_label_20_text);
titleList.add(Messages.LoginDialog_label_21_text);
}else if(relChapterType.contains("EQ_Performance_")) {
File templateFile = FileConstants.getResourceFile(Constants.TYPE_YEJI);
Map<String, List<Map<String, String>>> typeMap = GetTypeUtils.resolverPerformance(tenderId, templateFile.getAbsolutePath());
rowList = typeMap.get(tenderProjectRuleEntity.getParamByKey("professionalCode"));
// titleList.add(Messages.LoginDialog_label_2_text);
for(Map<String, String> map : rowList) {
titleList.add(map.get("name"));
}
}
kTableDataSource.setTitleList(titleList);
int rowIndex = 1;
for(Supplier supplier : supplierList) {
ModelData modelData = modelDataService.getModelData(tenderId, supplier.getId(), relChapterType, dataCode);
if(null != modelData ) {
if( relChapterType.equals("EQ_BidderBasicInfo")) {
List<BidderBasicInfo> bidderBaseInfoList = bidderInfoService.getBidderBasicInfoList(tenderId, modelData.getId());
for(BidderBasicInfo bidderBasicInfo : bidderBaseInfoList) {
List<Object> supplierMessage = new ArrayList<>();
supplierMessage.add(rowIndex);
// supplierMessage.add(supplier.getSupplierName());
Map<String, String> bidderBasicInfoMap = Bean2MapUtils.createMap(bidderBasicInfo);
for(Map<String, String> map : rowList) {
supplierMessage.add(ObjectUtils.getObjString(bidderBasicInfoMap.get(map.get("code"))));
}
kTableDataSource.addRowList(supplierMessage);
rowIndex ++;
}
}else if(relChapterType.equals("EQ_FinancialReport")) {
List<Finance> finaceList = financeService.getFinanceList(tenderId, modelData.getId());
// List<BidderBasicInfo> bidderBaseInfoList = bidderInfoService.getBidderBasicInfoList(tenderId, modelData.getId());
for(Finance finance : finaceList) {
List<Object> supplierMessage = new ArrayList<>();
supplierMessage.add(rowIndex);
supplierMessage.add(supplier.getSupplierName());
supplierMessage.add(finance.getAnnual());
supplierMessage.add(finance.getTotal());
supplierMessage.add(finance.getTotalliabilities());
supplierMessage.add(finance.getLiabilitiesRate());
supplierMessage.add(finance.getPrimeOperatingRevenue());
supplierMessage.add(finance.getRetainedProfits());
supplierMessage.add(finance.getProfitRatio());
kTableDataSource.addRowList(supplierMessage);
rowIndex ++;
}
}else if(relChapterType.contains("EQ_Performance_")) {
String statue = modelData.getDataCode().substring(modelData.getDataCode().length() -2, modelData.getDataCode().length());
List<Performance> performanceList = performanceService.getPerformanceList(tenderId, modelData.getId(), statue);
for(Performance performance : performanceList) {
List<Object> supplierMessage = new ArrayList<>();
supplierMessage.add(rowIndex);
// supplierMessage.add(supplier.getSupplierName());
Map<String, String> bidderBasicInfoMap = Bean2MapUtils.createMap(performance);
for(Map<String, String> map : rowList) {
String code = map.get("code");
if(null != code && code.equals("status") ) {
if(null != performance.getStatus() && CommonEnum.YES.equals(performance.getStatus())) {
supplierMessage.add("已完成");
}else {
supplierMessage.add("未完成");
}
}else {
// supplierMessage.add(bidderBasicInfoMap.get(map.get("code")));
supplierMessage.add(ObjectUtils.getObjString(bidderBasicInfoMap.get(map.get("code"))));
}
}
kTableDataSource.addRowList(supplierMessage);
rowIndex ++;
}
}
}
}
return kTableDataSource;
}
@Override @Override
protected void checkSubclass() {} protected void checkSubclass() {}
public static void main(String[] args) {
Map<String, String> map = new HashMap<>();
map.put("linkManWebsite", "www.wanguo.com");
System.out.println(map.get("linkManWebsite"));
}
} }
...@@ -20,6 +20,7 @@ import com.gx.obe.bind.prop.Prop; ...@@ -20,6 +20,7 @@ import com.gx.obe.bind.prop.Prop;
import com.gx.obe.common.widget.button.RectangleRadioButton; import com.gx.obe.common.widget.button.RectangleRadioButton;
import com.gx.obe.component.handler.TabHandler; import com.gx.obe.component.handler.TabHandler;
import com.gx.obe.component.rx.RxSwt; import com.gx.obe.component.rx.RxSwt;
import com.gx.obe.message.Messages;
import com.gx.obe.struct.enums.DataCategoryEnum; import com.gx.obe.struct.enums.DataCategoryEnum;
import com.gx.obe.struct.service.EvaluationContentService; import com.gx.obe.struct.service.EvaluationContentService;
import com.gx.obe.web.entity.Supplier; import com.gx.obe.web.entity.Supplier;
...@@ -44,6 +45,7 @@ public class TemplateTableListComposite extends Composite { ...@@ -44,6 +45,7 @@ public class TemplateTableListComposite extends Composite {
private String tenderId; private String tenderId;
private String relChapterType; private String relChapterType;
private String dataCode; private String dataCode;
private String dataCategory;
private List<Supplier> supplierList; private List<Supplier> supplierList;
} }
...@@ -66,7 +68,7 @@ public class TemplateTableListComposite extends Composite { ...@@ -66,7 +68,7 @@ public class TemplateTableListComposite extends Composite {
label.setForeground(SWTResourceManager.getColor(200, 200, 200)); label.setForeground(SWTResourceManager.getColor(200, 200, 200));
label.setFont(SWTResourceManager.getFont("宋体", 20, SWT.BOLD)); label.setFont(SWTResourceManager.getFont("宋体", 20, SWT.BOLD));
label.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, true, true, 1, 1)); label.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, true, true, 1, 1));
label.setText("当前指标未绑定小范本表格评审点!"); label.setText(Messages.LoginDialog_label_30_text);
Composite composite = new Composite(this, SWT.NONE); Composite composite = new Composite(this, SWT.NONE);
GridLayout gl_composite = new GridLayout(1, false); GridLayout gl_composite = new GridLayout(1, false);
...@@ -98,7 +100,7 @@ public class TemplateTableListComposite extends Composite { ...@@ -98,7 +100,7 @@ public class TemplateTableListComposite extends Composite {
TemplateTableComparisonComposite comparisonComposite = new TemplateTableComparisonComposite(composite, SWT.NONE); TemplateTableComparisonComposite comparisonComposite = new TemplateTableComparisonComposite(composite, SWT.NONE);
comparisonComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1)); comparisonComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
this.templateTableComparisonData.bind(d -> comparisonComposite.refresh(d.tenderId, d.relChapterType, d.dataCode, d.supplierList)); this.templateTableComparisonData.bind(d -> comparisonComposite.refresh(d.tenderId, d.relChapterType, d.dataCode, d.dataCategory, d.supplierList));
} }
private void selectAction(String tenderId, EvaluationContent evaluationContent, List<Supplier> supplierList) { private void selectAction(String tenderId, EvaluationContent evaluationContent, List<Supplier> supplierList) {
...@@ -106,6 +108,7 @@ public class TemplateTableListComposite extends Composite { ...@@ -106,6 +108,7 @@ public class TemplateTableListComposite extends Composite {
data.tenderId = tenderId; data.tenderId = tenderId;
data.relChapterType = evaluationContent.getRelChapterType(); data.relChapterType = evaluationContent.getRelChapterType();
data.dataCode = evaluationContent.getDataCode(); data.dataCode = evaluationContent.getDataCode();
data.dataCategory = evaluationContent.getDataCategory();
data.supplierList = supplierList; data.supplierList = supplierList;
this.templateTableComparisonData.set(data); this.templateTableComparisonData.set(data);
} }
...@@ -114,7 +117,7 @@ public class TemplateTableListComposite extends Composite { ...@@ -114,7 +117,7 @@ public class TemplateTableListComposite extends Composite {
RxSwt.run(() -> evaluationContentService.getEvaluationContentListByFactorCode(tenderId, factorCode)).checkWidget(this).other(ArrayList::new).exe(l -> { RxSwt.run(() -> evaluationContentService.getEvaluationContentListByFactorCode(tenderId, factorCode)).checkWidget(this).other(ArrayList::new).exe(l -> {
TemplateTableData data = new TemplateTableData(); TemplateTableData data = new TemplateTableData();
data.tenderId = tenderId; data.tenderId = tenderId;
data.evaluationContentList = l.stream().filter(t -> DataCategoryEnum.TT.getKey().equals(t.getDataCategory())).collect(Collectors.toList()); data.evaluationContentList = l.stream().filter(t -> (DataCategoryEnum.TT.getKey().equals(t.getDataCategory()) || DataCategoryEnum.MD.getKey().equals(t.getDataCategory()))).collect(Collectors.toList());
data.supplierList = supplierList; data.supplierList = supplierList;
this.templateTableData.set(data); this.templateTableData.set(data);
}); });
......
...@@ -17,7 +17,9 @@ public enum ModelDataClassEnum { ...@@ -17,7 +17,9 @@ public enum ModelDataClassEnum {
/** /**
* 业绩 * 业绩
*/ */
Performance, EQ_Performance_01,
EQ_Performance_00,
/** /**
* 项目负责人 * 项目负责人
*/ */
......
...@@ -22,26 +22,34 @@ public enum ModelDataTypeEnum { ...@@ -22,26 +22,34 @@ public enum ModelDataTypeEnum {
* 项目负责人 * 项目负责人
*/ */
EQ_ProjectLeader("EQ_ProjectLeader", ModelDataClassEnum.ProjectLeader), EQ_ProjectLeader("EQ_ProjectLeader", ModelDataClassEnum.ProjectLeader),
/**
* 施工业绩 //,
*/
EQ_Construction("EQ_Construction", ModelDataClassEnum.Performance), // ,
/** EQ_Performance_01("EQ_Performance_01", ModelDataClassEnum.EQ_Performance_01),
* 勘察设计 EQ_Performance_00("EQ_Performance_00", ModelDataClassEnum.EQ_Performance_00),
*/
EQ_SurveyDesign("EQ_SurveyDesign", ModelDataClassEnum.Performance),
/** // /**
* 监理业绩 // * 施工业绩
*/ // */
EQ_Supervision("EQ_Supervision", ModelDataClassEnum.Performance), // EQ_Construction("EQ_Construction", ModelDataClassEnum.Performance),
/** // /**
* 采购业绩 // * 勘察设计
*/ // */
EQ_Procurement("EQ_Procurement", ModelDataClassEnum.Performance), // EQ_SurveyDesign("EQ_SurveyDesign", ModelDataClassEnum.Performance),
/** // /**
* 生产业绩 // * 监理业绩
*/ // */
EQ_Production("EQ_Production", ModelDataClassEnum.Performance), // EQ_Supervision("EQ_Supervision", ModelDataClassEnum.Performance),
// /**
// * 采购业绩
// */
// EQ_Procurement("EQ_Procurement", ModelDataClassEnum.Performance),
// /**
// * 生产业绩
// */
// EQ_Production("EQ_Production", ModelDataClassEnum.Performance),
/** /**
* 安全生产许可证 * 安全生产许可证
*/ */
......
...@@ -53,14 +53,14 @@ public class ModelDataFactory { ...@@ -53,14 +53,14 @@ public class ModelDataFactory {
return initBidderBasicInfo(tableParent, modelDataDetail); return initBidderBasicInfo(tableParent, modelDataDetail);
case EQ_BusinessLicense: case EQ_BusinessLicense:
return initBusinessLicense(tableParent, modelDataDetail); return initBusinessLicense(tableParent, modelDataDetail);
case EQ_Construction: // case EQ_Construction:
return initConstruction(tableParent, modelDataDetail); // return initConstruction(tableParent, modelDataDetail);
case EQ_FinancialReport: // case EQ_FinancialReport:
return initFinancialReport(tableParent, modelDataDetail); // return initFinancialReport(tableParent, modelDataDetail);
case EQ_Procurement: // case EQ_Procurement:
return initProcurement(tableParent, modelDataDetail); // return initProcurement(tableParent, modelDataDetail);
case EQ_Production: // case EQ_Production:
return initProduction(tableParent, modelDataDetail); // return initProduction(tableParent, modelDataDetail);
case EQ_ProjectLeader: case EQ_ProjectLeader:
return initProjectLeader(tableParent, modelDataDetail); return initProjectLeader(tableParent, modelDataDetail);
case EQ_Qualification: case EQ_Qualification:
...@@ -93,10 +93,10 @@ public class ModelDataFactory { ...@@ -93,10 +93,10 @@ public class ModelDataFactory {
return initQualification_ZXDJ(tableParent, modelDataDetail); return initQualification_ZXDJ(tableParent, modelDataDetail);
case EQ_Qualification_ZYJK: case EQ_Qualification_ZYJK:
return initQualification_ZYJK(tableParent, modelDataDetail); return initQualification_ZYJK(tableParent, modelDataDetail);
case EQ_Supervision: // case EQ_Supervision:
return initSupervision(tableParent, modelDataDetail); // return initSupervision(tableParent, modelDataDetail);
case EQ_SurveyDesign: // case EQ_SurveyDesign:
return initSurveyDesign(tableParent, modelDataDetail); // return initSurveyDesign(tableParent, modelDataDetail);
} }
return null; return null;
...@@ -290,7 +290,8 @@ public class ModelDataFactory { ...@@ -290,7 +290,8 @@ public class ModelDataFactory {
public void refresh(ModelData modelData) { public void refresh(ModelData modelData) {
supplierId.set(modelData.getSupplierId()); supplierId.set(modelData.getSupplierId());
RxSwt.run(() -> performanceService.getPerformanceList(modelData.getTenderId(), modelData.getId())).checkWidget(fTable).exe(l -> { String statue = modelData.getDataCode().substring(modelData.getDataCode().length() -2, modelData.getDataCode().length());
RxSwt.run(() -> performanceService.getPerformanceList(modelData.getTenderId(), modelData.getId(), statue)).checkWidget(fTable).exe(l -> {
count.set(l.size()); count.set(l.size());
fTable.refresh(l); fTable.refresh(l);
}); });
...@@ -416,7 +417,8 @@ public class ModelDataFactory { ...@@ -416,7 +417,8 @@ public class ModelDataFactory {
public void refresh(ModelData modelData) { public void refresh(ModelData modelData) {
supplierId.set(modelData.getSupplierId()); supplierId.set(modelData.getSupplierId());
RxSwt.run(() -> performanceService.getPerformanceList(modelData.getTenderId(), modelData.getId())).checkWidget(fTable).exe(l -> { String statue = modelData.getDataCode().substring(modelData.getDataCode().length() -2, modelData.getDataCode().length());
RxSwt.run(() -> performanceService.getPerformanceList(modelData.getTenderId(), modelData.getId(), statue)).checkWidget(fTable).exe(l -> {
count.set(l.size()); count.set(l.size());
fTable.refresh(l); fTable.refresh(l);
}); });
...@@ -477,7 +479,8 @@ public class ModelDataFactory { ...@@ -477,7 +479,8 @@ public class ModelDataFactory {
public void refresh(ModelData modelData) { public void refresh(ModelData modelData) {
supplierId.set(modelData.getSupplierId()); supplierId.set(modelData.getSupplierId());
RxSwt.run(() -> performanceService.getPerformanceList(modelData.getTenderId(), modelData.getId())).checkWidget(fTable).exe(l -> { String statue = modelData.getDataCode().substring(modelData.getDataCode().length() -2, modelData.getDataCode().length());
RxSwt.run(() -> performanceService.getPerformanceList(modelData.getTenderId(), modelData.getId(), statue)).checkWidget(fTable).exe(l -> {
count.set(l.size()); count.set(l.size());
fTable.refresh(l); fTable.refresh(l);
}); });
...@@ -1407,7 +1410,8 @@ public class ModelDataFactory { ...@@ -1407,7 +1410,8 @@ public class ModelDataFactory {
public void refresh(ModelData modelData) { public void refresh(ModelData modelData) {
supplierId.set(modelData.getSupplierId()); supplierId.set(modelData.getSupplierId());
RxSwt.run(() -> performanceService.getPerformanceList(modelData.getTenderId(), modelData.getId())).checkWidget(fTable).exe(l -> { String statue = modelData.getDataCode().substring(modelData.getDataCode().length() -2, modelData.getDataCode().length());
RxSwt.run(() -> performanceService.getPerformanceList(modelData.getTenderId(), modelData.getId(), statue)).checkWidget(fTable).exe(l -> {
count.set(l.size()); count.set(l.size());
fTable.refresh(l); fTable.refresh(l);
}); });
...@@ -1465,7 +1469,8 @@ public class ModelDataFactory { ...@@ -1465,7 +1469,8 @@ public class ModelDataFactory {
public void refresh(ModelData modelData) { public void refresh(ModelData modelData) {
supplierId.set(modelData.getSupplierId()); supplierId.set(modelData.getSupplierId());
RxSwt.run(() -> performanceService.getPerformanceList(modelData.getTenderId(), modelData.getId())).checkWidget(fTable).exe(l -> { String statue = modelData.getDataCode().substring(modelData.getDataCode().length() -2, modelData.getDataCode().length());
RxSwt.run(() -> performanceService.getPerformanceList(modelData.getTenderId(), modelData.getId(), statue)).checkWidget(fTable).exe(l -> {
count.set(l.size()); count.set(l.size());
fTable.refresh(l); fTable.refresh(l);
}); });
......
package com.gx.obe.struct.service; package com.gx.obe.struct.service;
import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import com.gx.obe.component.comparison.ComparisonTable;
import com.gx.obe.component.comparison.OtherMessageSHowTable;
import com.gx.obe.component.utils.CompositeUtils;
import com.gx.obe.struct.beans.StructDateInfo; import com.gx.obe.struct.beans.StructDateInfo;
import com.gx.obe.web.entity.Result.RequestBody; import com.gx.obe.web.entity.Result.RequestBody;
import com.gx.obe.web.entity.evaluation.EvaluationContent; import com.gx.obe.web.entity.evaluation.EvaluationContent;
...@@ -36,7 +40,16 @@ public class EvaluationContentService { ...@@ -36,7 +40,16 @@ public class EvaluationContentService {
Map<String, Object> param = new HashMap<>(); Map<String, Object> param = new HashMap<>();
param.put("tenderId", tenderId); param.put("tenderId", tenderId);
param.put("factorCode", factorCode); param.put("factorCode", factorCode);
return ObeHttpUtils.getList(URL.concat("/getEvaluationContentListByFactorCode"), param, EvaluationContent.class); List<EvaluationContent> list = ObeHttpUtils.getList(URL.concat("/getEvaluationContentListByFactorCode"), param, EvaluationContent.class);
List<EvaluationContent> list1 = new ArrayList<>();
for(EvaluationContent evaluationContent : list) {
if(evaluationContent.getDataCategory().equals("MD") && ( evaluationContent.getRelChapterType().equals("EQ_BidderBasicInfo") || evaluationContent.getRelChapterType().equals("EQ_FinancialReport") || evaluationContent.getRelChapterType().contains("EQ_Performance_"))) {
list1.add(evaluationContent);
}if(evaluationContent.getDataCategory().equals("TT")) {
list1.add(evaluationContent);
}
}
return list1;
} }
/** /**
......
...@@ -18,10 +18,11 @@ public class PerformanceService { ...@@ -18,10 +18,11 @@ public class PerformanceService {
* @param modelDataId * @param modelDataId
* @return * @return
*/ */
public List<Performance> getPerformanceList(String tenderId, String modelDataId) { public List<Performance> getPerformanceList(String tenderId, String modelDataId, String statue) {
Map<String, Object> param = new HashMap<>(); Map<String, Object> param = new HashMap<>();
param.put("tenderId", tenderId); param.put("tenderId", tenderId);
param.put("modelDataId", modelDataId); param.put("modelDataId", modelDataId);
param.put("statue", statue);
return ObeHttpUtils.getList(URL.concat("/getPerformanceList"), param, Performance.class); return ObeHttpUtils.getList(URL.concat("/getPerformanceList"), param, Performance.class);
} }
......
package com.gx.obe.struct.thread; package com.gx.obe.struct.thread;
import java.io.File;
import java.nio.charset.Charset;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Optional; import java.util.Optional;
...@@ -7,13 +9,16 @@ import java.util.Set; ...@@ -7,13 +9,16 @@ import java.util.Set;
import java.util.function.Consumer; import java.util.function.Consumer;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import org.apache.log4j.Logger;
import org.dom4j.Document;
import org.dom4j.Element; import org.dom4j.Element;
import com.gx.obe.common.file.enumeration.FileConstants;
import com.gx.obe.common.file.thread.NewDownloadBiddingFileThread;
import com.gx.obe.common.file.utils.BidFileUtils; import com.gx.obe.common.file.utils.BidFileUtils;
import com.gx.obe.common.widget.listener.ProgressMessageAdapter; import com.gx.obe.common.widget.listener.ProgressMessageAdapter;
import com.gx.obe.common.widget.listener.ProgressMessageListener; import com.gx.obe.common.widget.listener.ProgressMessageListener;
import com.gx.obe.components.core.Constants; import com.gx.obe.components.core.Constants;
import com.gx.obe.components.core.enumeration.CommonEnum;
import com.gx.obe.struct.beans.ModelData; import com.gx.obe.struct.beans.ModelData;
import com.gx.obe.struct.beans.StructDateInfo; import com.gx.obe.struct.beans.StructDateInfo;
import com.gx.obe.struct.enums.DataCategoryEnum; import com.gx.obe.struct.enums.DataCategoryEnum;
...@@ -23,9 +28,12 @@ import com.gx.obe.struct.handler.RelChapterTypeHandler; ...@@ -23,9 +28,12 @@ import com.gx.obe.struct.handler.RelChapterTypeHandler;
import com.gx.obe.struct.service.EvaluationContentService; import com.gx.obe.struct.service.EvaluationContentService;
import com.gx.obe.struct.utils.ParsingStructXmlUtils; import com.gx.obe.struct.utils.ParsingStructXmlUtils;
import com.gx.obe.util.utils.UuidUtils; import com.gx.obe.util.utils.UuidUtils;
import com.gx.obe.util.utils.XmlUtils;
import com.gx.obe.web.entity.Supplier; import com.gx.obe.web.entity.Supplier;
import com.gx.obe.web.entity.evaluation.EvaluationContent; import com.gx.obe.web.entity.evaluation.EvaluationContent;
import com.gx.obe.web.entity.tender.TenderProjectEntity; import com.gx.obe.web.entity.tender.TenderProjectEntity;
import com.gx.obe.web.entity.tender.TenderProjectRuleEntity;
import com.gx.obe.web.service.ProjectRuleService;
import com.gx.obe.web.service.SupplierService; import com.gx.obe.web.service.SupplierService;
/** /**
...@@ -36,10 +44,12 @@ public class ParsingStructThread implements Runnable { ...@@ -36,10 +44,12 @@ public class ParsingStructThread implements Runnable {
private final EvaluationContentService evaluationContentService = new EvaluationContentService(); private final EvaluationContentService evaluationContentService = new EvaluationContentService();
private final SupplierService supplierService = new SupplierService(); private final SupplierService supplierService = new SupplierService();
private final ProjectRuleService projectRuleService = new ProjectRuleService();
private final StructDateInfo structDateInfo = new StructDateInfo(); private final StructDateInfo structDateInfo = new StructDateInfo();
private String tenderId; private String tenderId;
private TenderProjectEntity tenderproject; private TenderProjectEntity tenderproject;
private ProgressMessageListener messageProgress; private ProgressMessageListener messageProgress;
private Logger LOG = Logger.getLogger(ParsingStructThread.class);
/** /**
* @author chenxw * @author chenxw
* @param tenderproject.getId() * @param tenderproject.getId()
...@@ -63,15 +73,36 @@ public class ParsingStructThread implements Runnable { ...@@ -63,15 +73,36 @@ public class ParsingStructThread implements Runnable {
*/ */
private void parsingStruct() { private void parsingStruct() {
//--------------------------------获取供应商列表-------------------------------------------------- //--------------------------------获取供应商列表--------------------------------------------------
messageProgress.message("开始解析招标文件规则...", 0);
LOG.error("开始解析招标文件规则...");
String bidFilePath = FileConstants.getBiddingFilePath(tenderId).concat("SingleFileBaseInfo.xml");
// File singleFileBaseInfoFile = new File(bidFilePath);
Document document = XmlUtils.getXmlDocument(bidFilePath);
Element rootElement = document.getRootElement();
Element templateElement = rootElement.element("template");
String professionalCode = templateElement.elementTextTrim("professionalCode");
TenderProjectRuleEntity tenderProjectRuleEntity = projectRuleService.getProjectRule(tenderId);
if(null != tenderProjectRuleEntity) {
tenderProjectRuleEntity.setParam("professionalCode", professionalCode);
projectRuleService.updataRule(tenderProjectRuleEntity);
}
// professionalCodeElement
// professionalCodeElement.att
messageProgress.message("开始获取获取供应商列表...", 0); messageProgress.message("开始获取获取供应商列表...", 0);
LOG.error("开始获取获取供应商列表...");
Optional<List<Supplier>> supplierListQptional = Optional.ofNullable(supplierService.getOpenBidSuccessSupplier(tenderId)).filter(t -> !t.isEmpty()); Optional<List<Supplier>> supplierListQptional = Optional.ofNullable(supplierService.getOpenBidSuccessSupplier(tenderId)).filter(t -> !t.isEmpty());
// isPresent判断是否有值
if (!supplierListQptional.isPresent()) { if (!supplierListQptional.isPresent()) {
messageProgress.message("供应商列表获取失败!", -1); messageProgress.message("供应商列表获取失败!", -1);
LOG.error("供应商列表获取失败!");
return; return;
} }
messageProgress.message("供应商列表获取成功!", 1); messageProgress.message("供应商列表获取成功!", 1);
LOG.error("供应商列表获取成功!");
Charset charset = Charset.defaultCharset();
messageProgress.message("获取目前系统编码格式" + charset.displayName(), 1);
LOG.error("获取目前系统编码格式" + charset.displayName());
System.out.println("获取目前系统编码格式" + charset.displayName());
//--------------------------------解析供应商评议表数据-------------------------------------------------- //--------------------------------解析供应商评议表数据--------------------------------------------------
ParsingSupplierSelfOpinionThread parsingSupplierSelfOpinionThread = new ParsingSupplierSelfOpinionThread(tenderproject, supplierListQptional.get(),new ProgressMessageAdapter () { ParsingSupplierSelfOpinionThread parsingSupplierSelfOpinionThread = new ParsingSupplierSelfOpinionThread(tenderproject, supplierListQptional.get(),new ProgressMessageAdapter () {
...@@ -127,6 +158,7 @@ public class ParsingStructThread implements Runnable { ...@@ -127,6 +158,7 @@ public class ParsingStructThread implements Runnable {
//--------------------------------解析投标结构化数据-------------------------------------------------- //--------------------------------解析投标结构化数据--------------------------------------------------
messageProgress.message("开始解析结构化标书结构...", 0); messageProgress.message("开始解析结构化标书结构...", 0);
LOG.error("开始解析结构化标书结构...");
try { try {
relChapterTypeListMapOptional.map(m -> m.get(DataCategoryEnum.TT.getKey())).map(Set::parallelStream).ifPresent(s -> { relChapterTypeListMapOptional.map(m -> m.get(DataCategoryEnum.TT.getKey())).map(Set::parallelStream).ifPresent(s -> {
s.forEach(t -> { s.forEach(t -> {
...@@ -135,14 +167,17 @@ public class ParsingStructThread implements Runnable { ...@@ -135,14 +167,17 @@ public class ParsingStructThread implements Runnable {
}); });
} catch (Exception e) { } catch (Exception e) {
messageProgress.message("解析招标结构化数据失败,请检查是否下载招标文件!", -1); messageProgress.message("解析招标结构化数据失败,请检查是否下载招标文件!", -1);
LOG.error("解析招标结构化数据失败,请检查是否下载招标文件!");
// System.out.println(e.getMessage()); // System.out.println(e.getMessage());
return; return;
} }
messageProgress.message("结构化标书结构解析成功!", 1); messageProgress.message("结构化标书结构解析成功!", 1);
LOG.error("结构化标书结构解析成功!");
//--------------------------------解析投标结构化数据-------------------------------------------------- //--------------------------------解析投标结构化数据--------------------------------------------------
messageProgress.message("开始解析投标结构化数据!", 1); messageProgress.message("开始解析投标结构化数据!", 1);
LOG.error("结构化标书结构解析成功!");
try { try {
// supplierListQptional.get().parallelStream().forEach(t -> parsingSupplierBidFileStruct(t, relChapterTypeListMapOptional.get(), Constants.getBidFilePath(tenderId, t.getId()))); // supplierListQptional.get().parallelStream().forEach(t -> parsingSupplierBidFileStruct(t, relChapterTypeListMapOptional.get(), Constants.getBidFilePath(tenderId, t.getId())));
supplierListQptional.get().stream().forEach(t -> { supplierListQptional.get().stream().forEach(t -> {
...@@ -181,7 +216,7 @@ public class ParsingStructThread implements Runnable { ...@@ -181,7 +216,7 @@ public class ParsingStructThread implements Runnable {
private void parsingSupplierBidFileStruct(Supplier supplier, Map<String, Set<String>> relChapterTypeSetMap, String bidFilePath) { private void parsingSupplierBidFileStruct(Supplier supplier, Map<String, Set<String>> relChapterTypeSetMap, String bidFilePath) {
//获取BidFileIndexTree.xml中fileItem列表 //获取BidFileIndexTree.xml中fileItem列表
// System.out.println(supplier.getSupplierName()); // System.out.println(supplier.getSupplierName());
// System.out.println(relChapterTypeSetMap); System.out.println(relChapterTypeSetMap);
ParsingStructXmlUtils.resolverBidFileIndexTree(bidFilePath).filter(t -> !t.isEmpty()).ifPresent(el -> { ParsingStructXmlUtils.resolverBidFileIndexTree(bidFilePath).filter(t -> !t.isEmpty()).ifPresent(el -> {
//解析小范本表单数据 //解析小范本表单数据
Optional.ofNullable(relChapterTypeSetMap.get(DataCategoryEnum.TDI.getKey())).ifPresent(l -> structDateInfo.getTemplateDataItemList().addAll(l.stream().map(t -> { Optional.ofNullable(relChapterTypeSetMap.get(DataCategoryEnum.TDI.getKey())).ifPresent(l -> structDateInfo.getTemplateDataItemList().addAll(l.stream().map(t -> {
...@@ -209,16 +244,24 @@ public class ParsingStructThread implements Runnable { ...@@ -209,16 +244,24 @@ public class ParsingStructThread implements Runnable {
private void parsingModelData(String relChapterType, Supplier supplier, List<Element> fileItemElementList, String bidFilePath) { private void parsingModelData(String relChapterType, Supplier supplier, List<Element> fileItemElementList, String bidFilePath) {
//获取结构化数据xml文件地址 //获取结构化数据xml文件地址
RelChapterTypeHandler handler = new RelChapterTypeHandler(relChapterType); RelChapterTypeHandler handler = new RelChapterTypeHandler(relChapterType);
Optional<ModelDataTypeEnum> modelDataTypeEnum = Optional.of(handler.getRelChapterType()).map(ModelDataTypeEnum.MAP::get); System.out.println("relChapterType :"+ relChapterType );
Optional<ModelDataTypeEnum> modelDataTypeEnum ;
if(relChapterType.contains("EQ_Performance")) {
modelDataTypeEnum = Optional.of(ModelDataTypeEnum.MAP.get(relChapterType));
}else {
modelDataTypeEnum = Optional.of(handler.getRelChapterType()).map(ModelDataTypeEnum.MAP::get);
}
fileItemElementList.stream().filter(t -> { fileItemElementList.stream().filter(t -> {
return handler.getRelChapterType().equals(t.elementTextTrim("chapterType")); return handler.getRelChapterType().equals(t.elementTextTrim("chapterType"));
}).findAny().map(this::getBidFileName).filter(Optional::isPresent).map(Optional::get).map(bidFilePath::concat).ifPresent(xmlFilePath -> { }).findAny().map(this::getBidFileName).filter(Optional::isPresent).map(Optional::get).map(bidFilePath::concat).ifPresent(xmlFilePath -> {
ModelData modelData = initModelData(supplier.getId(), modelDataTypeEnum.map(ModelDataTypeEnum.EQ_ProjectLeader::equals).orElse(false) ? handler.getRelChapterType() : relChapterType); // ModelData modelData = initModelData(supplier.getId(), modelDataTypeEnum.map(ModelDataTypeEnum.EQ_ProjectLeader::equals).orElse(false) ? handler.getRelChapterType() : relChapterType);
ModelData modelData = initModelData(supplier.getId(), relChapterType);
structDateInfo.getModelDataList().add(modelData); structDateInfo.getModelDataList().add(modelData);
// System.out.println(handler.getMark()); // System.out.println(handler.getMark());
// System.out.println(relChapterType); // System.out.println(relChapterType);
// ModelDataTypeEnum.getClassEnum
modelDataTypeEnum.map(ModelDataTypeEnum::getClassEnum).ifPresent(t -> parsingModelDataDetail(t, modelData.getId(), xmlFilePath, handler.getMark())); modelDataTypeEnum.map(ModelDataTypeEnum::getClassEnum).ifPresent(t -> parsingModelDataDetail(t, modelData.getId(), xmlFilePath, handler.getMark()));
}); });
} }
...@@ -250,31 +293,36 @@ public class ParsingStructThread implements Runnable { ...@@ -250,31 +293,36 @@ public class ParsingStructThread implements Runnable {
private void parsingModelDataDetail(ModelDataClassEnum modelDataEnum, String modelDataId, String xmlFilePath, String mark) { private void parsingModelDataDetail(ModelDataClassEnum modelDataEnum, String modelDataId, String xmlFilePath, String mark) {
// System.out.println("parsingModelDataDetail"); // System.out.println("parsingModelDataDetail");
Consumer<ParsingStructXmlUtils.AttachmentFileOperation> consumer = t -> ParsingStructXmlUtils.resolverAttachmentFile(t).ifPresent(structDateInfo.getAttachmentFileList()::addAll); Consumer<ParsingStructXmlUtils.AttachmentFileOperation> consumer = t -> ParsingStructXmlUtils.resolverAttachmentFile(t).ifPresent(structDateInfo.getAttachmentFileList()::addAll);
System.out.println();
switch (modelDataEnum) { switch (modelDataEnum) {
case BusinessLicense: // case BusinessLicense://经营许可证
// System.out.println("BusinessLicense"); //// System.out.println("BusinessLicense");
ParsingStructXmlUtils.resolverBusinessLicense(tenderId, modelDataId, xmlFilePath, consumer).ifPresent(structDateInfo.getBusinessLicenseList()::addAll); // ParsingStructXmlUtils.resolverBusinessLicense(tenderId, modelDataId, xmlFilePath, consumer).ifPresent(structDateInfo.getBusinessLicenseList()::addAll);
break; // break;
case BidderInfo: case BidderInfo://供应商基本信息
// System.out.println("BidderInfo"); // System.out.println("BidderInfo");
ParsingStructXmlUtils.resolverBidderBasicInfo(tenderId, modelDataId, xmlFilePath, consumer).ifPresent(structDateInfo.getBidderBasicInfoList()::addAll); ParsingStructXmlUtils.resolverBidderBasicInfo(tenderId, modelDataId, xmlFilePath, consumer).ifPresent(structDateInfo.getBidderBasicInfoList()::addAll);
break; break;
case Finance: case Finance://财务报告
// System.out.println("Finance"); // System.out.println("Finance");
ParsingStructXmlUtils.resolverFinance(tenderId, modelDataId, xmlFilePath, consumer).ifPresent(structDateInfo.getFinanceList()::addAll); ParsingStructXmlUtils.resolverFinance(tenderId, modelDataId, xmlFilePath, consumer).ifPresent(structDateInfo.getFinanceList()::addAll);
break; break;
case Performance: case EQ_Performance_01://业绩
// System.out.println("Performance"); // System.out.println("Performance");
ParsingStructXmlUtils.resolverPerformance(tenderId, modelDataId, xmlFilePath, consumer, mark).ifPresent(structDateInfo.getPerformanceList()::addAll); ParsingStructXmlUtils.resolverPerformance(tenderId, modelDataId, xmlFilePath, consumer, mark).ifPresent(structDateInfo.getPerformanceList()::addAll);
break; break;
case ProjectLeader: case EQ_Performance_00://业绩
// System.out.println("ProjectLeader"); // System.out.println("Performance");
ParsingStructXmlUtils.resolverProjectLeader(tenderId, modelDataId, xmlFilePath, consumer).ifPresent(structDateInfo.getProjectLeaderList()::addAll); ParsingStructXmlUtils.resolverPerformance(tenderId, modelDataId, xmlFilePath, consumer, mark).ifPresent(structDateInfo.getPerformanceList()::addAll);
break;
case Qualification:
// System.out.println("Qualification");
ParsingStructXmlUtils.resolverQualification(tenderId, modelDataId, xmlFilePath, consumer).ifPresent(structDateInfo.getQualificationList()::addAll);
break; break;
// case ProjectLeader:
//// System.out.println("ProjectLeader");项目经理
// ParsingStructXmlUtils.resolverProjectLeader(tenderId, modelDataId, xmlFilePath, consumer).ifPresent(structDateInfo.getProjectLeaderList()::addAll);
// break;
// case Qualification://奖项信息
//// System.out.println("Qualification");
// ParsingStructXmlUtils.resolverQualification(tenderId, modelDataId, xmlFilePath, consumer).ifPresent(structDateInfo.getQualificationList()::addAll);
// break;
default: default:
break; break;
} }
......
package com.gx.obe.struct.utils;
import java.io.Serializable;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;
import org.apache.commons.dbutils.BeanProcessor;
import org.apache.log4j.Logger;
import com.gx.obe.util.utils.BeanUtils;
/**
* @Description:
* @author guoyr
*/
public class Bean2MapUtils extends BeanProcessor{
private static Logger LOG = Logger.getLogger(Bean2MapUtils.class);
/**
* @Description: 将bean转为Map
* @author guoyr
* @param <K>
* @param <V>
* @param bean
* @return
*/
@SuppressWarnings("unchecked")
public static <K, V, T> Map<K, V> createMap(T bean){
if(null == bean){
return null;
}
Class<? extends Object> clazz = bean.getClass();
Map<K, V> beanMap = new HashMap<K, V>();
for(java.lang.reflect.Field field : bean.getClass().getDeclaredFields()){
String property = field.getName();
// if(property.equals("calculationParam")){
// System.out.println(property);
// }
Method getMethod = getClassMethod(clazz, new StringBuilder("get").append(property.substring(0,1).toUpperCase()).append(property.substring(1)).toString(), null);
if(null == getMethod){
if(field.getType() == boolean.class || field.getType() == Boolean.class ){
if(property.startsWith("is")){
getMethod = getClassMethod(clazz, property, null);
}else {
getMethod = getClassMethod(clazz, new StringBuilder("is").append(property.substring(0,1).toUpperCase()).append(property.substring(1)).toString(), null);
}
}
}
if(null != getMethod){
Object obj = null;
try {
obj = getMethod.invoke(bean);
} catch (IllegalArgumentException e) {
LOG.error("获得"+field.getName()+"值时出错", e);
} catch (IllegalAccessException e) {
LOG.error("获得"+field.getName()+"值时出错", e);
} catch (InvocationTargetException e) {
LOG.error("获得"+field.getName()+"值时出错", e);
}
if(null != obj){
if(BeanUtils.isNativeType(field.getType())){
beanMap.put((K)field.getName(), (V) obj);
// }else if(obj instanceof Map || obj instanceof Set || obj instanceof List){
// beanMap.put((K)field.getName(), (V) obj);
}else if(field.getType() instanceof Serializable){
beanMap.put((K)field.getName(), (V)createMap(obj));
}else {
beanMap.put((K)field.getName(), (V) obj);
}
}
}
}
return beanMap;
}
private static java.lang.reflect.Method getClassMethod(Class<?> type, String property, Class<?> propType){
Method setMethod = null;
try {
setMethod = type.getMethod(property);
} catch (SecurityException e) {
} catch (NoSuchMethodException e) {
}
return setMethod;
}
}
package com.gx.obe.struct.utils;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Stream;
import org.dom4j.Document;
import org.dom4j.Element;
import com.gx.obe.util.utils.XmlUtils;
public class GetTypeUtils {
/**
* @Description: 解析业绩
* @author chenxw
* @param tenderId
* @param modelDataId
* @param xmlFilePath
* @param consumer
* @param mark
* @return
*/
public static Map<String, List<Map<String, String>>> resolverPerformance(String tenderId, String xmlFilePath) {
Document document = XmlUtils.getXmlDocument(xmlFilePath);
Element root = document.getRootElement();
List<Element> sheelList = root.elements("sheel");
// Map<String, Map<String, Object>> returnList = new HashMap<String, Map<String, Object>>();
Map<String, List<Map<String, String>>> sheelMap = new HashMap<String, List<Map<String, String>>>();
for(Element element : sheelList) {
String code = element.elementTextTrim("code");
Element rowListelement = element.element("rowList");
List<Map<String, String>> rowList = new ArrayList<Map<String, String>>();
if(null != rowListelement) {
List<Element> elementRowlist = rowListelement.elements("userMassage");
for(Element elementRow : elementRowlist) {
Map<String, String> userMassageMap = new HashMap<>();
userMassageMap.put("name", elementRow.elementTextTrim("name"));
userMassageMap.put("code", elementRow.elementTextTrim("code"));
rowList.add(userMassageMap);
}
}
// sheelMap.put("code", );
sheelMap.put(code, rowList);
// returnList.a
}
return sheelMap;
// return Optional.ofNullable(XmlUtils.getXmlDocument(xmlFilePath)).map(t->t.getRootElement().elements("sheel")).map(l ->streamElement(l).forEach(n->{
//
// }));
// return null;
// return Optional.ofNullable(XmlUtils.getXmlDocument(xmlFilePath)).map(t -> t.getRootElement().elements("sheel")).map(l -> {
//// return streamElement(l).filter(t -> {
//// if(null != mark ) {
//// return mark.equals(t.elementTextTrim("status"));
//// }else {
//// return false;
//// }
//// }).map(t -> {
//// Performance performance = initPerformance(t);
//// consumer.accept(new AttachmentFileOperation(tenderId, performance.getId(), t.element("scanSingning")));
//// return performance;
//// }).peek(t -> {
//// t.setTenderId(tenderId);
//// t.setModelDataId(modelDataId);
//// }).collect(Collectors.toList());
// });
}
private static Stream<Element> streamElement(List<?> list) {
return list.stream().map(t -> (Element) t);
}
}
...@@ -3,7 +3,6 @@ package com.gx.obe.struct.utils; ...@@ -3,7 +3,6 @@ package com.gx.obe.struct.utils;
import java.util.List; import java.util.List;
import java.util.Optional; import java.util.Optional;
import java.util.function.Consumer; import java.util.function.Consumer;
import java.util.function.Predicate;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import java.util.stream.IntStream; import java.util.stream.IntStream;
import java.util.stream.Stream; import java.util.stream.Stream;
...@@ -146,7 +145,6 @@ public class ParsingStructXmlUtils { ...@@ -146,7 +145,6 @@ public class ParsingStructXmlUtils {
// if (Stream.of("CompletedAchievements", "OngoingAchievements").anyMatch(Predicate.isEqual(relChapterType))) { // if (Stream.of("CompletedAchievements", "OngoingAchievements").anyMatch(Predicate.isEqual(relChapterType))) {
// t.setDataCode(relChapterType); // t.setDataCode(relChapterType);
// } // }
System.out.println(t.getXmlPath());
Optional.ofNullable(bidFilePath).map(p -> p.concat(t.getXmlPath())).map(ParsingXmlUtils::parsingTableXML).map(JsonUtil::jsonObjectToStr).ifPresent(t::setTableInfo); Optional.ofNullable(bidFilePath).map(p -> p.concat(t.getXmlPath())).map(ParsingXmlUtils::parsingTableXML).map(JsonUtil::jsonObjectToStr).ifPresent(t::setTableInfo);
}).collect(Collectors.toList()); }).collect(Collectors.toList());
}); });
...@@ -186,7 +184,6 @@ public class ParsingStructXmlUtils { ...@@ -186,7 +184,6 @@ public class ParsingStructXmlUtils {
String tableId = templateTableElement.elementTextTrim("tableId"); String tableId = templateTableElement.elementTextTrim("tableId");
templateTable.setId(StringUtils.isEmpty(tableId) ? UuidUtils.getUUID() : tableId); templateTable.setId(StringUtils.isEmpty(tableId) ? UuidUtils.getUUID() : tableId);
templateTable.setDataCode(templateTableElement.elementTextTrim("dataCode")); templateTable.setDataCode(templateTableElement.elementTextTrim("dataCode"));
System.out.println(templateTableElement.elementTextTrim("dataCode"));
templateTable.setXmlPath(templateTableElement.elementTextTrim("xmlPath")); templateTable.setXmlPath(templateTableElement.elementTextTrim("xmlPath"));
templateTable.setTableName(templateTableElement.elementTextTrim("tableName")); templateTable.setTableName(templateTableElement.elementTextTrim("tableName"));
return templateTable; return templateTable;
......
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