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.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,\
.,\
icons/,\
splash.bmp,\
resource/
resource/,\
ICO.ico,\
build.properties,\
src/,\
bin/,\
obe-evaluation.product
javacDefaultEncoding.. = UTF-8
src.includes = splash.bmp,\
resource/,\
plugin.xml,\
icons/,\
META-INF/
META-INF/,\
build.properties,\
src/,\
obe-evaluation.product
......@@ -679,6 +679,7 @@ public class BidOpeningRemoteComposite extends OpeningTimeComposite implements S
}
WidgetUtils.setControlVisible(signatureBtn, showSignature);
WidgetUtils.setControlVisible(signatureNextBtn, showSignature);
new Label(operatorComposite, SWT.NONE);
meetingRoomListener.refreshOperator();
if(null != menuFunctions && MenuFunction.SHOW.equals(menuFunctions.getAuthority("SHOW_OPENING_TIPS"))){
showOpeningTips(bidOpeningBtn.getParent());
......
......@@ -437,6 +437,10 @@ public class WebserviceConstants {
* 上传时间
*/
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 {
* @param archiveStatus
* @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");
Map<String, Object> param = new HashMap<String, Object>();
param.put("tenderId", tenderId);
param.put("parentId", parentId);
param.put("archiveStatus", archiveStatus);
param.put("date", DateUtils.getTimestampFormat(date));
try {
String result = NetworkRequest.get(strWebServerUrl, param);
return ResultStatus.getReultStatusBoolean(result);
......
......@@ -35,7 +35,7 @@ public class BJCAHandPDFLoaderImpl extends DocumentLoader {
private OleControlSite site;
private OleAutomation oleAutomation;
private AutomationWrapper automaticWrapper;
private BJCAHandSignThread bjcaHandSignThread;
// private BJCAHandSignThread bjcaHandSignThread;
private BJCAHandSignListener handSignListener;
private File file;
private Logger LOG = Logger.getLogger(BJCAHandPDFLoaderImpl.class);
......@@ -71,10 +71,10 @@ public class BJCAHandPDFLoaderImpl extends DocumentLoader {
site = new OleControlSite(oleFrame, SWT.NONE, BJCAHandPDFConstant.programClassId);
oleFrame.addDisposeListener(new DisposeListener() {
public void widgetDisposed(DisposeEvent e) {
if(null != bjcaHandSignThread) {
bjcaHandSignThread.stop();
bjcaHandSignThread = null;
}
// if(null != bjcaHandSignThread) {
// bjcaHandSignThread.stop();
// bjcaHandSignThread = null;
// }
if(null != site){
if(!site.isDisposed()){
try {
......@@ -175,10 +175,10 @@ C:\Program Files (x86)\BJCAClient\PDFClientV2.1\Program\x86目录下的serverCer
* @return
*/
public boolean openFile(File file){
if(null != bjcaHandSignThread) {
bjcaHandSignThread.stop();
bjcaHandSignThread = null;
}
// if(null != bjcaHandSignThread) {
// bjcaHandSignThread.stop();
// bjcaHandSignThread = null;
// }
this.file = file;
if(null != file && file.exists() && null != automaticWrapper){
Display.getDefault().syncExec(new Runnable(){
......@@ -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_get_sealcount"});
int totalCount = 0;
if(null != ids) {
for(int i = 1 ; i <= pageCount; i++) {
totalCount += oleAutomation.invoke(ids[0], new Variant[] {new Variant(i)}).getInt();
}
}
totalCount += oleAutomation.invoke(ids[0], new Variant[] {new Variant(0)}).getInt();
// if(null != ids) {
// for(int i = 1 ; i <= pageCount; i++) {
// }
// }
if(totalCount > 0){
signatureCount = totalCount;
}
......@@ -424,7 +424,7 @@ C:\Program Files (x86)\BJCAClient\PDFClientV2.1\Program\x86目录下的serverCer
if(null != handSignListener) {
handSignListener.signScript();
}
startSignListenerThread();
// startSignListenerThread();
signatureCount ++;
}else {
if(null != handSignListener) {
......@@ -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: 添加签章
* @author guoyr
......@@ -459,7 +483,7 @@ C:\Program Files (x86)\BJCAClient\PDFClientV2.1\Program\x86目录下的serverCer
if(null != handSignListener) {
handSignListener.signScript();
}
startSignListenerThread();
// startSignListenerThread();
// signatureCount ++;
}else {
if(null != handSignListener) {
......@@ -469,17 +493,17 @@ C:\Program Files (x86)\BJCAClient\PDFClientV2.1\Program\x86目录下的serverCer
}
}
private void startSignListenerThread() {
if(null != bjcaHandSignThread) {
bjcaHandSignThread.stop();
bjcaHandSignThread = null;
}
if(null != handSignListener) {
bjcaHandSignThread = new BJCAHandSignThread(this, handSignListener);
bjcaHandSignThread.start();
}
}
//
// private void startSignListenerThread() {
// if(null != bjcaHandSignThread) {
// bjcaHandSignThread.stop();
// bjcaHandSignThread = null;
// }
// if(null != handSignListener) {
// bjcaHandSignThread = new BJCAHandSignThread(this, handSignListener);
// bjcaHandSignThread.start();
// }
// }
public AutomationWrapper getAutomationWrapper(){
return automaticWrapper;
......
......@@ -72,7 +72,7 @@ public class LocalSignatureComposite extends Composite {
// private Composite signatureItemLoadComposite;
private SignatureFileListener signatureFileListener;
// private ESepator signatureItemSep;
private String reportType;
protected String reportType = FileConstants.REPORT_FILE_FOLDER;
/**
* Create the composite.
......@@ -206,7 +206,7 @@ public class LocalSignatureComposite extends Composite {
public void refreshSignatureFiles(final TenderProjectEntity tenderProject, File pdfFile,String reportType){
this.tenderProject = tenderProject;
this.curPdfFile = pdfFile;
this.reportType = reportType;
// this.reportType = reportType;
signatureListener.onInit();
for (Control control : sinatureFile_composite.getChildren()) {
control.dispose();
......@@ -284,10 +284,10 @@ public class LocalSignatureComposite extends Composite {
}
curPdfFile = pdfFile;
curSignatureFile = getSignatureFileByFileName();
String reportType = FileConstants.REPORT_FILE_FOLDER;
if(null != curSignatureFile) {
reportType = null != curSignatureFile.getReportType() ? curSignatureFile.getReportType() : FileConstants.REPORT_FILE_FOLDER;
}
// String reportType = FileConstants.REPORT_FILE_FOLDER;
// if(null != curSignatureFile) {
// reportType = null != curSignatureFile.getReportType() ? curSignatureFile.getReportType() : FileConstants.REPORT_FILE_FOLDER;
// }
if(needDownloadFile(reportType)) {
if(!downloadReportFile(reportType)) {
return;
......@@ -369,7 +369,7 @@ public class LocalSignatureComposite extends Composite {
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)){
releaseApplySignatureFile();
return true;
......
......@@ -233,6 +233,8 @@ public class NewDownloadProjectInfoThread extends MyThread{
String signUpStartTimeStr = (String)tenderProjectJSON.get("signUpStartTime");//公告发布时间
String docSaleStartTimeStr = (String)tenderProjectJSON.get("docSaleStartTime");//文件售卖开始时间
String docSaleEndTimeStr = (String)tenderProjectJSON.get("docSaleEndTime");
String appraiseStartTimeStr = (String)tenderProjectJSON.get("appraiseStartTime");
tenderProjectRuleEntity.setParam("appraiseStartTime", appraiseStartTimeStr);
if(null != signUpStartTimeStr && !"".equals(signUpStartTimeStr)){
try {
tenderProjectRuleEntity.setSignupStartTime(format.parse(signUpStartTimeStr));
......
......@@ -129,7 +129,7 @@ public class NewUpdateTenderProjectInfoThread extends MyThread{
if(downloadFlag){
tenderProjectService.updateAssignProperty(tenderProject, new String[]{"tenderNo", "tenderName", "tenderMethod", "tenderType", "phaseType", "isPack", "remoteStatus"});
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);
}
......@@ -371,7 +371,7 @@ public class NewUpdateTenderProjectInfoThread extends MyThread{
}
if(updateTenderRuleList.size() > 0){
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) {
......@@ -412,7 +412,8 @@ public class NewUpdateTenderProjectInfoThread extends MyThread{
tenderPack.setCreateTime(createTime);
}
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())){
tenderRule.setBidOpeningStage(TenderProjectEnum.BID_OPENING_TWO_STAGE);
String bidOpeningStartTimeString = (String)jsonObj.get("openBidUnPriceStartTime");
......
This diff is collapsed.
This diff is collapsed.
......@@ -38,6 +38,10 @@ public class Constants {
// }
// return PRODUCT_ROOT;
}
/**
* 资源目录
**/
public static String RESOURCE_FOLDER = "resource";
/**
* 当前登录的用户
**/
......@@ -201,6 +205,14 @@ public class Constants {
*/
public static final String EVAL_TO_NOTE = "expertToNote.pdf";
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;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import org.apache.log4j.Logger;
......@@ -73,6 +74,7 @@ import com.gx.obe.config.utils.PropertiesUtils;
import com.gx.obe.enttiytdo.BooleanResultDO;
import com.gx.obe.listener.CheckUpdateVersionListener;
import com.gx.obe.message.Messages;
import com.gx.obe.report.utils.Bean2MapUtils;
import com.gx.obe.thread.ApplyMachineThread;
import com.gx.obe.thread.CheckUpdateThread;
import com.gx.obe.thread.LoginCacheThread;
......@@ -1343,6 +1345,7 @@ public class LoginDialog {
return;
}
Constants.USER = tempUser;
Map map = Bean2MapUtils.createMap(tempUser);
Constants.USER.setEncodePassWord(StringUtil.encodeString(pwd_text.getText().trim()));
loginType = SWT.OK;
shell.close();
......
package com.gx.obe.management;
import java.io.File;
import java.nio.charset.Charset;
import org.eclipse.core.runtime.Platform;
import org.eclipse.equinox.app.IApplication;
......@@ -42,6 +43,11 @@ public class ManagementApplication implements IApplication {
*/
public Object start(IApplicationContext context) {
Display display = PlatformUI.createDisplay();
Charset charset = Charset.defaultCharset();
// messageProgress.message("获取目前系统编码格式" + charset.displayName(), 1);
// LOG.error("获取目前系统编码格式" + charset.displayName());
System.out.println("获取目前系统编码格式" + charset.displayName());
try {
OnStartInit.initSystemConfig(Constants.TERMINAL_MANAGEMENT );
OnStartInit.initPluginId(Activator.PLUGIN_ID);
......
......@@ -1513,7 +1513,7 @@ public class EvaluationExpertManagerComposite extends Composite {
*/
private void synchronousExpertAction() {
if(synchronousExpertBtn.isEnabled()){
if(isInEvaluationProgress()){return;}
// if(isInEvaluationProgress()){return;}
//京能要求上传开标结果才能下载专家
if(MenuFunction.HIDE.equals(menuFunctionUtils.getAuthority(MenuFunctionEnum.HAS_UPLOAD_OPEN_RESULT))){
......
......@@ -3,9 +3,11 @@ package com.gx.obe.management.composite;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.nio.charset.Charset;
import java.text.MessageFormat;
import java.util.List;
import org.apache.log4j.Logger;
import org.eclipse.swt.SWT;
import org.eclipse.swt.core.CallBack;
import org.eclipse.swt.core.MessageDialog;
......@@ -105,7 +107,7 @@ public class EvaluationFactorsManagerComposite extends Composite {
private boolean returnFlag = false;
private MenuFunctionUtils menuFunctionUtils = new MenuFunctionUtils();
private ELink importStructInfoLink;
private Logger LOG = Logger.getLogger(EvaluationFactorsManagerComposite.class);
{
LogUtils.logClass(EvaluationFactorsManagerComposite.class);
}
......@@ -256,6 +258,12 @@ public class EvaluationFactorsManagerComposite extends Composite {
importBillOfQuantities.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, true, 1, 1));
importBillOfQuantities.setText("一键解析工程量清单");
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);
GridLayout gl_score_type_composite = new GridLayout(6, false);
......@@ -443,6 +451,9 @@ public class EvaluationFactorsManagerComposite extends Composite {
* @author guoyr
*/
private void init() {
Charset charset = Charset.defaultCharset();
LOG.error("获取目前系统编码格式" + charset.displayName());
System.out.println("获取目前系统编码格式" + charset.displayName());
this.tenderProjectEntity = projectAction.getTenderProject();
this.menu = projectAction.getMenu();
menuFunctionUtils.initFunctionAuthority(menu);
......@@ -1057,15 +1068,23 @@ public class EvaluationFactorsManagerComposite extends Composite {
if(!confirmDialog.getClickStatus().equals("01")){
return;
}
ProgressMessageDialog messageProgress = new ProgressMessageDialog(getShell(), false, -1, new LoadingAdatper() {
public void finish(boolean flag) {
}
});
messageProgress.setTitle("一键解析结构化数据");
messageProgress.setOperateVisible(true);
messageProgress.setCountDownTime(2);
new Thread(new ParsingStructThread(tenderProjectEntity, messageProgress)).start();
messageProgress.open();
String bidFilePath = FileConstants.getBiddingFilePath(tenderProjectEntity.getId()).concat("SingleFileBaseInfo.xml");
File SingleFileBaseInfoFile = new File(bidFilePath);
if(SingleFileBaseInfoFile.exists()) {
ProgressMessageDialog messageProgress = new ProgressMessageDialog(getShell(), false, -1, new LoadingAdatper() {
public void finish(boolean flag) {
}
});
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;
import java.text.MessageFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
......@@ -41,6 +42,7 @@ import com.gx.obe.business.entity.ExpertEvaluationStep;
import com.gx.obe.business.entity.MenuFunction;
import com.gx.obe.business.enumeration.ExpertEnum;
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.HttpUtils;
import com.gx.obe.common.file.dialog.ClearProjectBidFileDialog;
......@@ -54,7 +56,6 @@ import com.gx.obe.components.core.enumeration.EvaluationStepEnum;
import com.gx.obe.components.core.enumeration.TenderProjectEnum;
import com.gx.obe.config.ConfigConstants;
import com.gx.obe.config.utils.PropertiesUtils;
import com.gx.obe.business.http.HttpResponse;
import com.gx.obe.listener.StartEvaluationListener;
import com.gx.obe.management.dialog.StartEvaluationStepShell;
import com.gx.obe.message.Messages;
......@@ -478,7 +479,7 @@ public class EvaluationStepProgressComposite extends Composite implements StartE
*/
private void completeEvaluationAction() {
//判断是否废标或者已完成推荐
if(!completeButton.getEnabled())return ;
// if(!completeButton.getEnabled())return ;
tenderProjectEntity = tenderProjectService.getById(tenderProjectEntity.getId());
if(CommonEnum.COMPLETE.equals(tenderProjectEntity.getComplateStatus()) || TenderProjectEnum.EFFECTIVE_NO.equals(tenderProjectEntity.getEffectiveType())) {
ConfirmDialog confirmDialog = new ConfirmDialog(getShell(), null, "是否确认结束评标流程?", null);
......@@ -496,23 +497,27 @@ public class EvaluationStepProgressComposite extends Composite implements StartE
return;
}
boolean updateStatus = false;
if(null != tenderProjectEntity.getParentId()) {
if(tenderProjectService.updateEvaluationComplateStatus(tenderProjectEntity.getId(),tenderProjectEntity.getParentId(),CommonEnum.ARCHIVE_STATUS)) {
updateStatus = true;
}
}else {
tenderProjectEntity.setUseStatus(CommonEnum.ARCHIVE_STATUS);
if(tenderProjectService.updateAssignProperty(tenderProjectEntity, new String[]{"useStatus"})) {
updateStatus = true;
}
Date date = NowTimeUtils.getNowDate();
if(tenderProjectService.updateEvaluationComplateStatus(tenderProjectEntity.getId(),tenderProjectEntity.getParentId(),CommonEnum.ARCHIVE_STATUS, date)) {
// updateStatus = true;
updateStatus = uploadTime();
}
// if(null != tenderProjectEntity.getParentId()) {
// }else {
// tenderProjectEntity.setUseStatus(CommonEnum.ARCHIVE_STATUS);
// if(tenderProjectService.updateAssignProperty(tenderProjectEntity, new String[]{"useStatus"})) {
// updateStatus = true;
// }
// }
if(updateStatus) {
MessageDialog.openWarning(getShell(), "当前项目已完成评标。");
completeButton.setEnabled(false);
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;
import java.io.IOException;
import java.net.ConnectException;
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.FTPClient;
......@@ -374,5 +376,13 @@ public class ChooseNetWorkToDownLoadShell extends Shell {
protected void checkSubclass() {
// 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;
import java.util.List;
import java.util.Map;
import org.apache.log4j.Logger;
import org.eclipse.swt.core.CallBack;
import org.eclipse.swt.core.ImageResolver;
import org.eclipse.swt.core.utils.MessageCallBack;
......@@ -22,8 +23,10 @@ import com.gx.obe.components.core.Constants;
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.evaluation.step.review.composite.ExpertSignEvaluationComposite;
import com.gx.obe.http.util.Base64;
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.ObjectUtils;
import com.gx.obe.util.utils.SpellHelper;
......@@ -55,6 +58,10 @@ public class DownloadExpertThread extends Thread {
private Image defaultAvatorImage = ResourceManager.getPluginImage(IconsActivator.PLUGIN_ID, "icons/idCard.png");// 默认头像
private MessageCallBack messageCallBack;;
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) {
this.callBack = callBack;
......@@ -130,6 +137,16 @@ public class DownloadExpertThread extends Thread {
}
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.setUser(user);
if(null != expertJson.get("isLeader") && "01".equals(expertJson.get("isLeader"))){
......@@ -140,10 +157,11 @@ public class DownloadExpertThread extends Thread {
}
// expert.setExpertType(ExpertEnum.EXPERT);
String type = ObjectUtils.getObjString(expertJson.get("type"));
int busType = type.contains("01") ? ExpertEnum.EXPERT_BUS : 0;
int tecType = type.contains("02") ? ExpertEnum.EXPERT_TEC : 0;
int priceType = type.contains("03") ? ExpertEnum.EXPERT_PRICE : 0;
expert.setEvalBidType(busType | tecType | priceType);
// int busType = type.contains("01") ? ExpertEnum.EXPERT_BUS : 0;
// int tecType = type.contains("02") ? ExpertEnum.EXPERT_TEC : 0;
// int priceType = type.contains("03") ? ExpertEnum.EXPERT_PRICE : 0;
// expert.setEvalBidType(busType | tecType | priceType);
expert.setEvalBidType(0);
setExpertMessgae(expert);
if(null != oldExpertMap.get((String)expertJson.get("account"))) {
......@@ -258,7 +276,13 @@ public class DownloadExpertThread extends Thread {
userRoleService.createUserRole(user.getId(), new String[]{UserEnum.ROLE_TYPE_EXPERT});
}else{// 修改用户信息
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);
}
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{
}
if(null != supplierOpeningResult.getBidPrice()){
supplierMap.put("bidPrice", supplierOpeningResult.getBidPriceByUnit(tenderProjectRuleEntity.getPriceUnitUseDefault()));
supplierMap.put("bidPriceValue", supplierOpeningResult.getBidPrice());
supplierMap.put("bidPriceWithUnit", supplierOpeningResult.getBidPriceWithUnit(tenderProjectRuleEntity.getPriceUnitUseDefault()));
}
}
......@@ -900,6 +901,27 @@ public abstract class BaseDateSet implements IWordDataSet{
SupplierComparator supplierComparator = new SupplierComparator("sortNo");
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);
return finalScoreSupplierList;
}
......
......@@ -98,8 +98,9 @@ public class CreateReportThread implements Runnable{
private void createReportWidthNewReportEngine(final ProjectTemplate template, File templateFile, File outFile, final String templateName){
try {
// 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) {
paramMap.put("TEMPLATEFILENAME", templateName);
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 {
// }
}
}
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 {
titleComposite.layout();
projectRuleService = new ProjectRuleService();
tenderProjectService = new TenderProjectService();
zbFileBtn.setSelection(true);
menuService = new MenuService();
bidOpeningStageRefresh();
if (isFtp) {
......
......@@ -38,7 +38,7 @@ public class ComparisonData {
}
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);
}
......
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;
/**
* 业绩?
* @author mazc
* @Description:
*/
......
......@@ -6,12 +6,13 @@ import java.util.concurrent.CopyOnWriteArrayList;
public class StructDateInfo {
private final List<TemplateDataItem> templateDataItemList = new CopyOnWriteArrayList<>();
private final List<TemplateTable> templateTableList = new CopyOnWriteArrayList<>();
private final List<ModelData> modelDataList = new CopyOnWriteArrayList<>();
private final List<TemplateTable> templateTableList = new CopyOnWriteArrayList<>();// TT类型结构化数据
private final List<ModelData> modelDataList = new CopyOnWriteArrayList<>();//MD类型数据
private final List<BusinessLicense> businessLicenseList = new CopyOnWriteArrayList<>();
private final List<Finance> financeList = new CopyOnWriteArrayList<>();
private final List<Performance> performanceList = new CopyOnWriteArrayList<>();
private final List<BidderBasicInfo> bidderBasicInfoList = new CopyOnWriteArrayList<>();
private final List<Performance> performanceList = new CopyOnWriteArrayList<>(); // 投标人业绩
private final List<BidderBasicInfo> bidderBasicInfoList = new CopyOnWriteArrayList<>();//投标人基本情况一览表
private final List<Qualification> qualificationList = new CopyOnWriteArrayList<>();
private final List<ProjectLeader> projectLeaderList = new CopyOnWriteArrayList<>();
private final List<AttachmentFile> attachmentFileList = new CopyOnWriteArrayList<>();
......
......@@ -20,6 +20,7 @@ import com.gx.obe.bind.prop.Prop;
import com.gx.obe.common.widget.button.RectangleRadioButton;
import com.gx.obe.component.handler.TabHandler;
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.service.EvaluationContentService;
import com.gx.obe.web.entity.Supplier;
......@@ -44,6 +45,7 @@ public class TemplateTableListComposite extends Composite {
private String tenderId;
private String relChapterType;
private String dataCode;
private String dataCategory;
private List<Supplier> supplierList;
}
......@@ -66,7 +68,7 @@ public class TemplateTableListComposite extends Composite {
label.setForeground(SWTResourceManager.getColor(200, 200, 200));
label.setFont(SWTResourceManager.getFont("宋体", 20, SWT.BOLD));
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);
GridLayout gl_composite = new GridLayout(1, false);
......@@ -98,7 +100,7 @@ public class TemplateTableListComposite extends Composite {
TemplateTableComparisonComposite comparisonComposite = new TemplateTableComparisonComposite(composite, SWT.NONE);
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) {
......@@ -106,6 +108,7 @@ public class TemplateTableListComposite extends Composite {
data.tenderId = tenderId;
data.relChapterType = evaluationContent.getRelChapterType();
data.dataCode = evaluationContent.getDataCode();
data.dataCategory = evaluationContent.getDataCategory();
data.supplierList = supplierList;
this.templateTableComparisonData.set(data);
}
......@@ -114,7 +117,7 @@ public class TemplateTableListComposite extends Composite {
RxSwt.run(() -> evaluationContentService.getEvaluationContentListByFactorCode(tenderId, factorCode)).checkWidget(this).other(ArrayList::new).exe(l -> {
TemplateTableData data = new TemplateTableData();
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;
this.templateTableData.set(data);
});
......
......@@ -17,7 +17,9 @@ public enum ModelDataClassEnum {
/**
* 业绩
*/
Performance,
EQ_Performance_01,
EQ_Performance_00,
/**
* 项目负责人
*/
......
......@@ -22,26 +22,34 @@ public enum ModelDataTypeEnum {
* 项目负责人
*/
EQ_ProjectLeader("EQ_ProjectLeader", ModelDataClassEnum.ProjectLeader),
/**
* 施工业绩
*/
EQ_Construction("EQ_Construction", ModelDataClassEnum.Performance),
/**
* 勘察设计
*/
EQ_SurveyDesign("EQ_SurveyDesign", ModelDataClassEnum.Performance),
/**
* 监理业绩
*/
EQ_Supervision("EQ_Supervision", ModelDataClassEnum.Performance),
/**
* 采购业绩
*/
EQ_Procurement("EQ_Procurement", ModelDataClassEnum.Performance),
/**
* 生产业绩
*/
EQ_Production("EQ_Production", ModelDataClassEnum.Performance),
//,
// ,
EQ_Performance_01("EQ_Performance_01", ModelDataClassEnum.EQ_Performance_01),
EQ_Performance_00("EQ_Performance_00", ModelDataClassEnum.EQ_Performance_00),
// /**
// * 施工业绩
// */
// EQ_Construction("EQ_Construction", ModelDataClassEnum.Performance),
// /**
// * 勘察设计
// */
// EQ_SurveyDesign("EQ_SurveyDesign", 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 {
return initBidderBasicInfo(tableParent, modelDataDetail);
case EQ_BusinessLicense:
return initBusinessLicense(tableParent, modelDataDetail);
case EQ_Construction:
return initConstruction(tableParent, modelDataDetail);
case EQ_FinancialReport:
return initFinancialReport(tableParent, modelDataDetail);
case EQ_Procurement:
return initProcurement(tableParent, modelDataDetail);
case EQ_Production:
return initProduction(tableParent, modelDataDetail);
// case EQ_Construction:
// return initConstruction(tableParent, modelDataDetail);
// case EQ_FinancialReport:
// return initFinancialReport(tableParent, modelDataDetail);
// case EQ_Procurement:
// return initProcurement(tableParent, modelDataDetail);
// case EQ_Production:
// return initProduction(tableParent, modelDataDetail);
case EQ_ProjectLeader:
return initProjectLeader(tableParent, modelDataDetail);
case EQ_Qualification:
......@@ -93,10 +93,10 @@ public class ModelDataFactory {
return initQualification_ZXDJ(tableParent, modelDataDetail);
case EQ_Qualification_ZYJK:
return initQualification_ZYJK(tableParent, modelDataDetail);
case EQ_Supervision:
return initSupervision(tableParent, modelDataDetail);
case EQ_SurveyDesign:
return initSurveyDesign(tableParent, modelDataDetail);
// case EQ_Supervision:
// return initSupervision(tableParent, modelDataDetail);
// case EQ_SurveyDesign:
// return initSurveyDesign(tableParent, modelDataDetail);
}
return null;
......@@ -290,7 +290,8 @@ public class ModelDataFactory {
public void refresh(ModelData modelData) {
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());
fTable.refresh(l);
});
......@@ -416,7 +417,8 @@ public class ModelDataFactory {
public void refresh(ModelData modelData) {
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());
fTable.refresh(l);
});
......@@ -477,7 +479,8 @@ public class ModelDataFactory {
public void refresh(ModelData modelData) {
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());
fTable.refresh(l);
});
......@@ -1407,7 +1410,8 @@ public class ModelDataFactory {
public void refresh(ModelData modelData) {
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());
fTable.refresh(l);
});
......@@ -1465,7 +1469,8 @@ public class ModelDataFactory {
public void refresh(ModelData modelData) {
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());
fTable.refresh(l);
});
......
package com.gx.obe.struct.service;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
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.web.entity.Result.RequestBody;
import com.gx.obe.web.entity.evaluation.EvaluationContent;
......@@ -36,7 +40,16 @@ public class EvaluationContentService {
Map<String, Object> param = new HashMap<>();
param.put("tenderId", tenderId);
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 {
* @param modelDataId
* @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<>();
param.put("tenderId", tenderId);
param.put("modelDataId", modelDataId);
param.put("statue", statue);
return ObeHttpUtils.getList(URL.concat("/getPerformanceList"), param, Performance.class);
}
......
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;
import java.util.List;
import java.util.Optional;
import java.util.function.Consumer;
import java.util.function.Predicate;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
import java.util.stream.Stream;
......@@ -146,7 +145,6 @@ public class ParsingStructXmlUtils {
// if (Stream.of("CompletedAchievements", "OngoingAchievements").anyMatch(Predicate.isEqual(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);
}).collect(Collectors.toList());
});
......@@ -186,7 +184,6 @@ public class ParsingStructXmlUtils {
String tableId = templateTableElement.elementTextTrim("tableId");
templateTable.setId(StringUtils.isEmpty(tableId) ? UuidUtils.getUUID() : tableId);
templateTable.setDataCode(templateTableElement.elementTextTrim("dataCode"));
System.out.println(templateTableElement.elementTextTrim("dataCode"));
templateTable.setXmlPath(templateTableElement.elementTextTrim("xmlPath"));
templateTable.setTableName(templateTableElement.elementTextTrim("tableName"));
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