Commit d45e3f29 authored by 黄重's avatar 黄重

提交结构话修改代码

parent c37b8c75
package com.gx.obe.evaluation.step.composite;
import java.io.File;
import java.io.IOException;
import org.eclipse.swt.SWT;
import org.eclipse.swt.core.CallBack;
import org.eclipse.swt.core.widgets.ImageButton;
import org.eclipse.swt.events.MouseAdapter;
import org.eclipse.swt.events.MouseEvent;
import org.eclipse.swt.events.MouseListener;
import org.eclipse.swt.events.MouseTrackAdapter;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import com.gx.obe.ColorConstants;
import com.gx.obe.WebserviceConstants;
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.enumeration.FileConstants;
import com.gx.obe.common.file.http.HttpURLDown;
import com.gx.obe.common.icons.IconsActivator;
import com.gx.obe.components.core.enumeration.CommonEnum;
import com.gx.obe.config.utils.PropertiesUtils;
import com.gx.obe.evaluation.step.shell.ShowAiProcessShell;
import com.gx.obe.evaluation.step.widgets.EvalLeftGroupButton;
import com.gx.obe.evaluation.step.widgets.LeftMenuMouseAdapter;
import com.gx.obe.message.Messages;
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.tender.TenderProjectEntity;
import com.swtdesigner.ResourceManager;
import com.swtdesigner.SWTResourceManager;
public class AiEvalLeftButton extends ImageButton{
private TenderProjectEntity curTender;
// private ShowAiProcessShell menuTipShell;
private MouseListener listener;
private ShowAiProcessShell showAiProcessShell;
public static Color BG = ColorConstants.SKIN_BG;
public AiEvalLeftButton(Composite parent, int style,TenderProjectEntity curTender) {
super(parent, SWT.CENTER|SWT.NONE);
this.setTopMargin(3);
this.setBottomMargin(3);
this.setLeftMargin(5);
this.setRightMargin(5);
this.setImage(ResourceManager.getPluginImage(IconsActivator.PLUGIN_ID, "icons/evaluaton_step/default.png"));
this.curTender = curTender;
// button.setCursor(SWTResourceManager.getCursor(SWT.CURSOR_HAND));
// button.setSurroundColor(SWTResourceManager.getColor(60, 138, 226));
this.setFont(SWTResourceManager.getFont("微软雅黑", 10, SWT.NORMAL));
this.setForeground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
// this.setBorderColor(SWTResourceManager.getColor(SWT.COLOR_WHITE));
this.setActiveBgColor(BG);
this.setActiveBgColor(SWTResourceManager.getColor(255, 153, 0));
// this.setActiveSurroundColor(SWTResourceManager.getColor(255, 153, 0));
this.setActiveForeground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
// this.setActiveSurroundColor(SWTResourceManager.getColor(SWT.COLOR_WHITE));
this.setSelectionBgColor(ColorConstants.SKIN_SELECTION_BG);
// this.setSelectionBorderColor(SWTResourceManager.getColor(255, 153, 0));
this.setArcWidth(6);
// button.setText(Messages.Button_reduce);
// button.setSurroundMargin(2);
// button.setFillSurround(false);
init();
}
public void init(){
addMouseTrackListener(new MouseTrackAdapter() {
@Override
public void mouseEnter(MouseEvent e) {
HttpUrl httpUrl = HttpUtils.getProjectHttpUrl(curTender, PropertiesUtils.getWebserviceProperty(WebserviceConstants.GET_AI_RESULT_METHOD, "bidOpeningHS.do?downloadOpenBidSupplierAiResult"));
HttpResponse httpResponse = HttpUtils.doPost(httpUrl);
downloadBiddingFile(httpResponse);
// showAiProcessShell = new ShowAiProcessShell(getShell(), EvalLeftButton1.this, 0, "");
// if(null != showAiProcessShell && !showAiProcessShell.isDisposed()){
// showAiProcessShell.open();
//// showAiProcessShell.setVisible(true);
// }
}
//
// @Override
// public void mouseExit(MouseEvent e) {
// if(null != menuTipShell && !menuTipShell.isDisposed()){
// menuTipShell.close();
// }
// super.mouseExit(e);
// }
});
}
private void downloadBiddingFile(HttpResponse httpResponse){
String downUrl = "";
if(null == httpResponse.getContent() || "".equals(httpResponse.getContent())){
// LOG.debug("服务器返回数据为空!");
// callBackMsg(false, "服务器返回数据为空!");
// callBackMsg(false, "未获取到下载地址!");
return ;
}
String packageAiType = httpResponse.getDataParam("packageAiType");
downUrl = httpResponse.getDataParam("downUrl");
if(StringUtils.isNotEmpty(packageAiType) && packageAiType.equals(CommonEnum.YES) && StringUtils.isNotEmpty(downUrl) ){
// LOG.debug("下载地址获取成功"+downUrl);
// callBackMsg(true, "下载地址获取成功,开始解析下载地址...");
String downLoadPath = new File(FileConstants.getBiddingFilePath(curTender.getId()) + "ai.pdf").getAbsolutePath();
downLoadFile(downUrl, downLoadPath);
}else {
String progress = httpResponse.getDataParam("progress");
String waitTime = httpResponse.getDataParam("waitTime");
showAiProcessShell = new ShowAiProcessShell(getShell(), AiEvalLeftButton.this, ObjectUtils.getIntValue(progress, 0), waitTime);
showAiProcessShell.open();
// ShowViewAiProcessDialog showViewAiProcessDialog = new ShowViewAiProcessDialog(getShell(), ObjectUtils.getIntValue(progress, 0), waitTime);
// showViewAiProcessDialog.open();
// callBackMsg(false, "获取下载地址失败!");
}
}
private void downLoadFile(String downLoadUrl, String savePath){
// callBackMsg("开始下载招标文件...");
HttpURLDown httpURLDown = new HttpURLDown(downLoadUrl, savePath, new CallBack() {
});
try {
boolean downFlag = httpURLDown.downLoad("标书比对相似度分析");
// callBackMsg("招标文件下载结束!");
// 下载成功并且是.zip文件才进行解压操作
if(downFlag){
final AiEvalLeftButton groupButton = AiEvalLeftButton.this;
groupButton.setToolTipText("标书比对相似度分析");
if(null == listener) {
listener = new MouseAdapter() {
public void mouseUp(MouseEvent e) {
if(!groupButton.getEnabled()) return;
RuntimeUtils.openFIle(new File(savePath));
}
};
groupButton.addMouseListener(listener);
}
// unZipFile(savePath, FileConstants.getBiddingFilePath(curTender.getId()));
}
} catch (IOException e) {
// LOG.error("招标文件下载失败", e);
// callBackMsg("招标文件下载文件出现错误");
// callBackMsg("错误信息为:"+e.getMessage());
return;
}
}
// HttpUrl httpUrl = HttpUtils.getProjectHttpUrl(curTender, PropertiesUtils.getWebserviceProperty(WebserviceConstants.GET_AI_RESULT_METHOD, "bidOpeningHS.do?downloadOpenBidSupplierAiResult"));
// HttpResponse httpResponse = HttpUtils.doPost(httpUrl);
// downloadBiddingFile(httpResponse);
}
...@@ -50,7 +50,6 @@ import org.eclipse.swt.widgets.Listener; ...@@ -50,7 +50,6 @@ 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;
...@@ -60,8 +59,6 @@ import com.gx.obe.bidata.vo.SupplierDTO; ...@@ -60,8 +59,6 @@ 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.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;
...@@ -95,7 +92,7 @@ import com.gx.obe.evaluation.step.listener.EvaluationSupplierFactorListener; ...@@ -95,7 +92,7 @@ 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.ShowAiProcessShell;
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;
...@@ -243,7 +240,8 @@ public class FactorEvaluationComposite extends EvaluationView { ...@@ -243,7 +240,8 @@ 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; private AiEvalLeftButton viewAI_btn;
private ShowAiProcessShell showAiProcessShell;
{ {
LogUtils.logClass(FactorEvaluationComposite.class); LogUtils.logClass(FactorEvaluationComposite.class);
...@@ -390,8 +388,32 @@ public class FactorEvaluationComposite extends EvaluationView { ...@@ -390,8 +388,32 @@ 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 = new AiEvalLeftButton(left_tool_composite, SWT.NONE,curTender);
// viewAI_btn.addFocusListener(new FocusAdapter() {
// @Override
// public void focusLost(FocusEvent e) {
//// TODO
// if(null != showAiProcessShell && !showAiProcessShell.isDisposed()) {
// showAiProcessShell.close();
// }
//
// }
// });
// viewAI_btn.addMouseTrackListener(new MouseTrackAdapter() {
// @Override
// public void mouseEnter(MouseEvent e) {
// viewAiAction();
// }
////
//// @Override
//// public void mouseExit(MouseEvent e) {
//// if(null != showAiProcessShell && !showAiProcessShell.isDisposed()) {
//// showAiProcessShell.close();
////// showAiProcessShell.dispose();
//// }
//// }
//
// });
viewAI_btn.setImage(ResourceManager.getPluginImage(IconsActivator.PLUGIN_ID, "icons/btn/white/view.png")); viewAI_btn.setImage(ResourceManager.getPluginImage(IconsActivator.PLUGIN_ID, "icons/btn/white/view.png"));
viewAI_btn.setText(""); viewAI_btn.setText("");
viewAI_btn.setToolTipText("标书查重"); viewAI_btn.setToolTipText("标书查重");
...@@ -400,7 +422,7 @@ public class FactorEvaluationComposite extends EvaluationView { ...@@ -400,7 +422,7 @@ public class FactorEvaluationComposite extends EvaluationView {
viewAiAction(); viewAiAction();
} }
}); });
viewAI_btn.setVisible(false); // viewAI_btn.setVisible(false);
// menuFunctionUtils.addFunction(viewAI_btn, "EVALUATION_VIEW_AI"); // menuFunctionUtils.addFunction(viewAI_btn, "EVALUATION_VIEW_AI");
ESepator toolv_sepator = new ESepator(this, SWT.VERTICAL); ESepator toolv_sepator = new ESepator(this, SWT.VERTICAL);
...@@ -501,6 +523,8 @@ public class FactorEvaluationComposite extends EvaluationView { ...@@ -501,6 +523,8 @@ public class FactorEvaluationComposite extends EvaluationView {
localFile_link.setImage(ResourceManager.getPluginImage(IconsActivator.PLUGIN_ID, "icons/btn/blue/location.png")); localFile_link.setImage(ResourceManager.getPluginImage(IconsActivator.PLUGIN_ID, "icons/btn/blue/location.png"));
localFile_link.setText(Messages.Button_viewLocalFiles); localFile_link.setText(Messages.Button_viewLocalFiles);
menuFunctionUtils.addFunction(localFile_link, "VIEW_LOCAL_FILE"); menuFunctionUtils.addFunction(localFile_link, "VIEW_LOCAL_FILE");
new Label(supplier_composite, SWT.NONE);
new Label(supplier_composite, SWT.NONE);
ESepator supllerSep = new ESepator(right_composite, SWT.HORIZONTAL); ESepator supllerSep = new ESepator(right_composite, SWT.HORIZONTAL);
supllerSep.setBackground(ColorConstants.SEP_LIGHT_COLOR); supllerSep.setBackground(ColorConstants.SEP_LIGHT_COLOR);
...@@ -993,7 +1017,7 @@ public class FactorEvaluationComposite extends EvaluationView { ...@@ -993,7 +1017,7 @@ public class FactorEvaluationComposite extends EvaluationView {
*/ */
private void init() { private void init() {
viewAI_btn.setEnabled(false); // viewAI_btn.setEnabled(false);
menuFunctionUtils.initFunctionAuthority(menu); menuFunctionUtils.initFunctionAuthority(menu);
initShowButton(); initShowButton();
initLayoutPanelGroup(); initLayoutPanelGroup();
...@@ -1118,13 +1142,11 @@ public class FactorEvaluationComposite extends EvaluationView { ...@@ -1118,13 +1142,11 @@ 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() { // new Thread(new Runnable() {
public void run() { // 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();
}
}).start();
// 刷新评标界面 // 刷新评标界面
refreshAction(); refreshAction();
} }
...@@ -2677,14 +2699,24 @@ public class FactorEvaluationComposite extends EvaluationView { ...@@ -2677,14 +2699,24 @@ public class FactorEvaluationComposite extends EvaluationView {
// callBackMsg(false, "未获取到下载地址!"); // callBackMsg(false, "未获取到下载地址!");
return ; return ;
} }
String packageAiType = httpResponse.getDataParam("packageAiType");
downUrl = httpResponse.getDataParam("downUrl"); downUrl = httpResponse.getDataParam("downUrl");
if(StringUtils.isNotEmpty(downUrl)){ if(StringUtils.isNotEmpty(packageAiType) && packageAiType.equals(CommonEnum.YES) && StringUtils.isNotEmpty(downUrl) ){
// LOG.debug("下载地址获取成功"+downUrl); // LOG.debug("下载地址获取成功"+downUrl);
// callBackMsg(true, "下载地址获取成功,开始解析下载地址..."); // callBackMsg(true, "下载地址获取成功,开始解析下载地址...");
String downLoadPath = new File(FileConstants.getBiddingFilePath(curTender.getId()) + "ai.pdf").getAbsolutePath(); String downLoadPath = new File(FileConstants.getBiddingFilePath(curTender.getId()) + "ai.pdf").getAbsolutePath();
downLoadFile(downUrl, downLoadPath); downLoadFile(downUrl, downLoadPath);
}else { }else {
String progress = httpResponse.getDataParam("progress");
String waitTime = httpResponse.getDataParam("waitTime");
showAiProcessShell = new ShowAiProcessShell(getShell(), viewAI_btn, ObjectUtils.getIntValue(progress, 0), waitTime);
showAiProcessShell.open();
// ShowViewAiProcessDialog showViewAiProcessDialog = new ShowViewAiProcessDialog(getShell(), ObjectUtils.getIntValue(progress, 0), waitTime);
// showViewAiProcessDialog.open();
// callBackMsg(false, "获取下载地址失败!"); // callBackMsg(false, "获取下载地址失败!");
} }
} }
...@@ -2703,7 +2735,7 @@ public class FactorEvaluationComposite extends EvaluationView { ...@@ -2703,7 +2735,7 @@ public class FactorEvaluationComposite extends EvaluationView {
public void run() { public void run() {
viewAI_btn.setVisible(true); viewAI_btn.setVisible(true);
viewAI_btn.getParent().layout(); viewAI_btn.getParent().layout();
viewAI_btn.setEnabled(true); // viewAI_btn.setEnabled(true);
} }
}); });
} }
...@@ -2719,19 +2751,23 @@ public class FactorEvaluationComposite extends EvaluationView { ...@@ -2719,19 +2751,23 @@ public class FactorEvaluationComposite extends EvaluationView {
* 标书查重功能 * 标书查重功能
*/ */
private void viewAiAction() { private void viewAiAction() {
if(viewAI_btn.getEnabled()) { // HttpUrl httpUrl = HttpUtils.getProjectHttpUrl(curTender, PropertiesUtils.getWebserviceProperty(WebserviceConstants.GET_AI_RESULT_METHOD, "bidOpeningHS.do?downloadOpenBidSupplierAiResult"));
// MeetingRoomOpenShell myEvaluationShell = new MeetingRoomOpenShell(getShell(), curTender); // HttpResponse httpResponse = HttpUtils.doPost(httpUrl);
// Composite parent = myEvaluationShell.getParentComposite(); // downloadBiddingFile(httpResponse);
// parent.setData("tenderProjectEntity", curTender);
// parent.setData("menu", menu); // if(viewAI_btn.getEnabled()) {
// new AiFileComposite(parent, SWT.NONE); //// MeetingRoomOpenShell myEvaluationShell = new MeetingRoomOpenShell(getShell(), curTender);
// myEvaluationShell.open(); //// Composite parent = myEvaluationShell.getParentComposite();
String downLoadPath = new File(FileConstants.getBiddingFilePath(curTender.getId()) + "ai.pdf").getAbsolutePath(); //// parent.setData("tenderProjectEntity", curTender);
File file = new File(downLoadPath); //// parent.setData("menu", menu);
if(file.exists()) { //// new AiFileComposite(parent, SWT.NONE);
RuntimeUtils.openFIle(file); //// 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.dialog;
import org.eclipse.swt.SWT;
import org.eclipse.swt.core.widgets.EDialog;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.ProgressBar;
import org.eclipse.swt.widgets.Shell;
import com.gx.obe.message.Messages;
import org.eclipse.wb.swt.SWTResourceManager;
/**
* @Description: 审核
* @author chenxw
*/
public class ShowViewAiProcessDialog extends EDialog {
private Composite messageComposite;
private int pointY = 120;
private boolean isAdopt = true;
private AuditListener listener;
private Label lblNewLabel_1;
private int process;
private String needTime;
/**
* Create the dialog.
*
* @param parentShell
* @param callBack
*/
public ShowViewAiProcessDialog(Shell parentShell, int process, String needTime) {
super(parentShell);
setTitle("标书相似度分析进度...");
this.process = process;
this.needTime = needTime;
}
/**
* Create contents of the dialog.
*
* @param parent
*/
@Override
protected Control createDialogArea(Composite parent) {
Composite container = (Composite) super.createDialogArea(parent);
container.setLayout(new GridLayout(1, false));
messageComposite = new Composite(container, SWT.NONE);
messageComposite.setLayout(new GridLayout(4, false));
messageComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1));
// messageComposite.setVisible(false);
Label lblNewLabel = new Label(messageComposite, SWT.NONE);
lblNewLabel.setForeground(SWTResourceManager.getColor(SWT.COLOR_RED));
lblNewLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));
lblNewLabel.setText(Messages.ShowViewAiProcessDialog_lblNewLabel_text);
lblNewLabel_1 = new Label(messageComposite, SWT.NONE);
lblNewLabel_1.setForeground(SWTResourceManager.getColor(SWT.COLOR_RED));
GridData gd_lblNewLabel_1 = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
gd_lblNewLabel_1.widthHint = 40;
lblNewLabel_1.setLayoutData(gd_lblNewLabel_1);
lblNewLabel_1.setText(process + "%");
Label lblNewLabel_2 = new Label(messageComposite, SWT.NONE);
lblNewLabel_2.setForeground(SWTResourceManager.getColor(SWT.COLOR_RED));
lblNewLabel_2.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));
lblNewLabel_2.setText(" 预计还需要:");
Label lblNewLabel_3 = new Label(messageComposite, SWT.NONE);
lblNewLabel_3.setForeground(SWTResourceManager.getColor(SWT.COLOR_RED));
lblNewLabel_3.setText(needTime);
ProgressBar progressBar = new ProgressBar(container, SWT.NONE);
progressBar.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
progressBar.setSelection(process);
return container;
}
public interface AuditListener {
void audit(boolean isAdopt, String message);
boolean isSuccess();
}
public void addAuditListener(AuditListener listener) {
this.listener = listener;
}
/**
* Return the initial size of the dialog.
*/
@Override
protected Point getInitialSize() {
return new Point(667, 110);
}
}
...@@ -1838,7 +1838,7 @@ public class ScoreEvaluationTableComposite extends Composite implements IEvaluat ...@@ -1838,7 +1838,7 @@ public class ScoreEvaluationTableComposite extends Composite implements IEvaluat
*/ */
private void showFactorEvaluationOpinion(EvaluationFactorResult evalFactorResult){ private void showFactorEvaluationOpinion(EvaluationFactorResult evalFactorResult){
if(null != evalFactorResult){ if(null != evalFactorResult){
System.out.println("第一处"+ObjectUtils.getObjString(evalFactorResult.getEvaluationOpinion())); // System.out.println("第一处"+ObjectUtils.getObjString(evalFactorResult.getEvaluationOpinion()));
factor_evaluation_opinion.setText(ObjectUtils.getObjString(evalFactorResult.getEvaluationOpinion())); factor_evaluation_opinion.setText(ObjectUtils.getObjString(evalFactorResult.getEvaluationOpinion()));
factor_evaluation_opinion.setToolTipText(ObjectUtils.getObjString(factor_evaluation_opinion.getText())); factor_evaluation_opinion.setToolTipText(ObjectUtils.getObjString(factor_evaluation_opinion.getText()));
factor_evaluation_opinion.setData("evalFactorResult", evalFactorResult); factor_evaluation_opinion.setData("evalFactorResult", evalFactorResult);
......
package com.gx.obe.evaluation.step.shell;
import org.eclipse.swt.SWT;
import org.eclipse.swt.core.utils.SwtUtils;
import org.eclipse.swt.core.widgets.ImageButton;
import org.eclipse.swt.events.MouseEvent;
import org.eclipse.swt.events.MouseTrackAdapter;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.graphics.Region;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.ProgressBar;
import org.eclipse.swt.widgets.Shell;
import com.gx.obe.evaluation.step.composite.AiEvalLeftButton;
import com.gx.obe.message.Messages;
import com.swtdesigner.SWTResourceManager;
/**
* @Description:
* @author guoyr
*/
public class ShowAiProcessShell extends Shell {
// private Composite composite;
private AiEvalLeftButton groupMenuBtn;
private ImageButton curBtn;
private Composite curComposite;
private Composite composite;
private Composite messageComposite;
private Label lblNewLabel_1;
private Listener deactivateListener;
// private int process;
// private String needTime;
/**
* Create the shell.
* @param display
*/
public ShowAiProcessShell(final Shell shell, AiEvalLeftButton shortMenu, int process, String needTime) {
super(shell, SWT.NO_TRIM | SWT.TOP);
this.groupMenuBtn = shortMenu;
// this.process = process;
// this.needTime = needTime;
// super(parent.getShell(), SWT.NO_TRIM | SWT.ON_TOP | SWT.TOOL);
// addDisposeListener(new DisposeListener() {
// public void widgetDisposed(DisposeEvent e) {
// removeListener(SWT.Deactivate, deactivateListener);
// }
// });
GridLayout gridLayout = new GridLayout(2, false);
gridLayout.horizontalSpacing = 0;
gridLayout.verticalSpacing = 0;
gridLayout.marginHeight = 1;
gridLayout.marginWidth = 1;
setLayout(gridLayout);
setBackground(shortMenu.getActiveBackgroundColor());
// setBackground(shortMenu.getBackground());
setBackgroundMode(SWT.INHERIT_FORCE);
curComposite = new Composite(this, SWT.NONE);
curComposite.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false, 1, 2));
GridLayout gl_curComposite = new GridLayout(1, false);
gl_curComposite.marginHeight = 0;
gl_curComposite.marginWidth = 0;
gl_curComposite.marginRight = 5;
curComposite.setLayout(gl_curComposite);
curComposite.setBackground(shortMenu.getActiveBackgroundColor());
// curComposite.setBackground(SWTResourceManager.getColor(123, 13, 15));
curBtn = new ImageButton(curComposite, SWT.NONE);
curBtn.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, true, 1, 1));
curBtn.setImage(shortMenu.getImage());
// curBtn.setTopMargin(3);
// curBtn.setBottomMargin(3);
curBtn.setLeftMargin(5);
curBtn.setRightMargin(5);
composite = new Composite(this, SWT.NONE);
composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 2));
GridLayout gl_composite = new GridLayout(1, false);
gl_composite.marginWidth = 0;
gl_composite.horizontalSpacing = 0;
gl_composite.marginHeight = 0;
gl_composite.verticalSpacing = 0;
composite.setLayout(gl_composite);
composite.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
Label labe = new Label(composite, SWT.None);
labe.setText("标书相似度分析进度");
messageComposite = new Composite(composite, SWT.NONE);
messageComposite.setLayout(new GridLayout(4, false));
messageComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1));
// messageComposite.setVisible(false);
Label lblNewLabel = new Label(messageComposite, SWT.NONE);
lblNewLabel.setForeground(SWTResourceManager.getColor(SWT.COLOR_RED));
lblNewLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));
lblNewLabel.setText(Messages.ShowViewAiProcessDialog_lblNewLabel_text);
lblNewLabel_1 = new Label(messageComposite, SWT.NONE);
lblNewLabel_1.setForeground(SWTResourceManager.getColor(SWT.COLOR_RED));
GridData gd_lblNewLabel_1 = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
gd_lblNewLabel_1.widthHint = 40;
lblNewLabel_1.setLayoutData(gd_lblNewLabel_1);
lblNewLabel_1.setText(process + "%");
Label lblNewLabel_2 = new Label(messageComposite, SWT.NONE);
lblNewLabel_2.setForeground(SWTResourceManager.getColor(SWT.COLOR_RED));
lblNewLabel_2.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));
lblNewLabel_2.setText(" 预计还需要:");
Label lblNewLabel_3 = new Label(messageComposite, SWT.NONE);
lblNewLabel_3.setForeground(SWTResourceManager.getColor(SWT.COLOR_RED));
lblNewLabel_3.setText(needTime);
ProgressBar progressBar = new ProgressBar(composite, SWT.NONE);
progressBar.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, true, 1, 1));
progressBar.setSelection(process);
init();
createContents();
}
private void init(){
deactivateListener = new Listener(){
public void handleEvent(Event arg0) {
close();
}
};
addListener(SWT.Deactivate, deactivateListener);
MouseTrackAdapter mouseExit = new MouseTrackAdapter() {
public void mouseExit(MouseEvent e) {
super.mouseExit(e);
Point mousePoint = SwtUtils.getMouseLoaction();
Point p = Display. getDefault ().map(composite, null , 0,0);
Point p2 = Display. getDefault ().map(curComposite, null , 0,0);
Rectangle rectangle1 = new Rectangle(p2.x + 1, p2.y + 0, curComposite.getBounds().width, curComposite.getBounds().height -0);
Rectangle rectangle2 = new Rectangle(p.x + 1, p.y + 0, composite.getBounds().width -0, composite.getBounds().height -2);
// System.out.println(rectangle1 +"\t"+rectangle2 +"\t"+ mousePoint +"\t"+ rectangle1.contains(mousePoint) +"\t"+rectangle2.contains(mousePoint));
if(rectangle1.contains(mousePoint) || rectangle2.contains(mousePoint)) {
}else {
close();
}
}
};
// addMouseTrackListener(mouseExit);
curBtn.addMouseTrackListener(mouseExit);
curComposite.addMouseTrackListener(mouseExit);
composite.addMouseTrackListener(mouseExit);
composite.addMouseTrackListener(mouseExit);
// SwtUtils.setCircleRegion(this, 3);
}
@Override
public void open() {
this.setMinimumSize(250, 80);
this.setAlpha(250);
this.pack();
Point point = groupMenuBtn.toDisplay(new Point(0,0));
Region region = new Region();
region.add(0, 0,curComposite.getBounds().width, curComposite.getBounds().height + 2);
region.add(curComposite.getBounds().width + 0, 0, this.getBounds().width, this.getBounds().height);
this.setRegion(region);
region.dispose();
setLocation(point.x , point.y);
super.open();
}
// @Override
// public void close() {
// super.close();
// }
/**
* Create contents of the shell.
*/
protected void createContents() {
setText("");
setSize(480, 68);
}
@Override
protected void checkSubclass() {
// Disable the check that prevents subclassing of SWT components
}
}
BID-EVALUATION/splash.bmp

394 KB | W: | H:

BID-EVALUATION/splash.bmp

394 KB | W: | H:

BID-EVALUATION/splash.bmp
BID-EVALUATION/splash.bmp
BID-EVALUATION/splash.bmp
BID-EVALUATION/splash.bmp
  • 2-up
  • Swipe
  • Onion skin
BID-OPENING/splash.bmp

394 KB | W: | H:

BID-OPENING/splash.bmp

394 KB | W: | H:

BID-OPENING/splash.bmp
BID-OPENING/splash.bmp
BID-OPENING/splash.bmp
BID-OPENING/splash.bmp
  • 2-up
  • Swipe
  • Onion skin
...@@ -386,6 +386,7 @@ public class RemoteDecryptStatusThread extends MyRunnable{ ...@@ -386,6 +386,7 @@ public class RemoteDecryptStatusThread extends MyRunnable{
try { try {
updateSupplierOpeningResultList.add(future.get()); updateSupplierOpeningResultList.add(future.get());
} catch (InterruptedException e) { } catch (InterruptedException e) {
} catch (ExecutionException e) { } catch (ExecutionException e) {
} }
} }
......
OBE-COMMON-ICONS/icons/login/logo.png

9.73 KB | W: | H:

OBE-COMMON-ICONS/icons/login/logo.png

13.8 KB | W: | H:

OBE-COMMON-ICONS/icons/login/logo.png
OBE-COMMON-ICONS/icons/login/logo.png
OBE-COMMON-ICONS/icons/login/logo.png
OBE-COMMON-ICONS/icons/login/logo.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -774,27 +774,27 @@ ...@@ -774,27 +774,27 @@
<userMassage> <userMassage>
<name>投标人名称</name> <name>投标人名称</name>
<code>companyname</code> <code>companyName</code>
</userMassage> </userMassage>
<userMassage> <userMassage>
<name>注册地址</name> <name>注册地址</name>
<code>registerlocation</code> <code>registerLocation</code>
</userMassage> </userMassage>
<userMassage> <userMassage>
<name>邮政编码</name> <name>邮政编码</name>
<code>postalcode</code> <code>postalCode</code>
</userMassage> </userMassage>
<userMassage> <userMassage>
<name>联系人</name> <name>联系人</name>
<code>linkman</code> <code>linkMan</code>
</userMassage> </userMassage>
<userMassage> <userMassage>
<name>电话</name> <name>电话</name>
<code>linkmanphone</code> <code>linkManPhone</code>
</userMassage> </userMassage>
<userMassage> <userMassage>
<name>传真</name> <name>传真</name>
<code>linkmanfax</code> <code>linkManFax</code>
</userMassage> </userMassage>
<userMassage> <userMassage>
<name>网址</name> <name>网址</name>
...@@ -802,83 +802,83 @@ ...@@ -802,83 +802,83 @@
</userMassage> </userMassage>
<userMassage> <userMassage>
<name>法人姓名(单位负责人)</name> <name>法人姓名(单位负责人)</name>
<code>legalrepresentativename</code> <code>legalRepresentativeName</code>
</userMassage> </userMassage>
<userMassage> <userMassage>
<name>法人技术职称</name> <name>法人技术职称</name>
<code>legalrepresentativetitle</code> <code>legalRepresentativeTitle</code>
</userMassage> </userMassage>
<userMassage> <userMassage>
<name>法人电话</name> <name>法人电话</name>
<code>legalrepresentativephone</code> <code>legalRepresentativePhone</code>
</userMassage> </userMassage>
<userMassage> <userMassage>
<name>技术负责人姓名</name> <name>技术负责人姓名</name>
<code>technicaldirectorname</code> <code>technicalDirectorName</code>
</userMassage> </userMassage>
<userMassage> <userMassage>
<name>技术负责人技术职称</name> <name>技术负责人技术职称</name>
<code>technicaldirectortitle</code> <code>technicalDirectorTitle</code>
</userMassage> </userMassage>
<userMassage> <userMassage>
<name>技术负责人电话</name> <name>技术负责人电话</name>
<code>technicaldirectorphone</code> <code>technicalDirectorPhone</code>
</userMassage> </userMassage>
<userMassage> <userMassage>
<name>成立时间</name> <name>成立时间</name>
<code>setuptime</code> <code>setupTime</code>
</userMassage> </userMassage>
<userMassage> <userMassage>
<name>企业资质等级</name> <name>企业资质等级</name>
<code>companyqualificationlevel</code> <code>companyQualificationLevel</code>
</userMassage> </userMassage>
<userMassage> <userMassage>
<name>营业执照号</name> <name>营业执照号</name>
<code>bussinesslicense</code> <code>bussinessLicense</code>
</userMassage> </userMassage>
<userMassage> <userMassage>
<name>注册资金(万元)</name> <name>注册资金(万元)</name>
<code>registeredcapital</code> <code>registeredCapital</code>
</userMassage> </userMassage>
<userMassage> <userMassage>
<name>开户银行</name> <name>开户银行</name>
<code>depositbank</code> <code>depositBank</code>
</userMassage> </userMassage>
<userMassage> <userMassage>
<name>开户银行账号</name> <name>开户银行账号</name>
<code>bankaccount</code> <code>bankAccount</code>
</userMassage> </userMassage>
<userMassage> <userMassage>
<name>员工总人数</name> <name>员工总人数</name>
<code>employeenumber</code> <code>employeeNumber</code>
</userMassage> </userMassage>
<userMassage> <userMassage>
<name>项目经理数</name> <name>项目经理数</name>
<code>purchasernumber</code> <code>purchaserNumber</code>
</userMassage> </userMassage>
<userMassage> <userMassage>
<name>高级职称人员数</name> <name>高级职称人员数</name>
<code>seniorprofessionalpostnumber</code> <code>seniorProfessionalPostNumber</code>
</userMassage> </userMassage>
<userMassage> <userMassage>
<name>中级职称人员数</name> <name>中级职称人员数</name>
<code>mediumprofessionalpostnumber</code> <code>mediumProfessionalPostNumber</code>
</userMassage> </userMassage>
<userMassage> <userMassage>
<name>初级职称人员数</name> <name>初级职称人员数</name>
<code>primaryprofessionalpostnumber</code> <code>primaryProfessionalPostNumber</code>
</userMassage> </userMassage>
<userMassage> <userMassage>
<name>技工数</name> <name>技工数</name>
<code>artisannumber</code> <code>artisanNumber</code>
</userMassage> </userMassage>
<userMassage> <userMassage>
<name>组织结构</name> <name>组织结构</name>
<code>orgstructure</code> <code>orgStructure</code>
</userMassage> </userMassage>
<userMassage> <userMassage>
<name>经营范围</name> <name>经营范围</name>
<code>businessscope</code> <code>businessScope</code>
</userMassage> </userMassage>
<userMassage> <userMassage>
<name>备注</name> <name>备注</name>
......
...@@ -76,10 +76,87 @@ public class Finance implements Serializable { ...@@ -76,10 +76,87 @@ public class Finance implements Serializable {
*/ */
private BigDecimal mainIncomeProfits; private BigDecimal mainIncomeProfits;
// private BigDecimal 企业名称
private BigDecimal companyName;
// private BigDecimal 年度
// private BigDecimal annual;
// private BigDecimal 营业收入(万元)
private BigDecimal operatingIncome;
// private BigDecimal 流动资产(万元)
// private BigDecimal currentAssets;
// private BigDecimal 流动负债(万元)
// private BigDecimal currentLiabilities;
// private BigDecimal 流动比率(%)
// private BigDecimal currentRate;
// private BigDecimal 净利润(万元)
// private BigDecimal retainedProfits;
// private BigDecimal 股东权益(万元)
private BigDecimal stockholdersEquity;
// private BigDecimal 净资产收益率(%)
private BigDecimal returnOnEquity;
// private BigDecimal 负债总额(万元)
private BigDecimal totalliabilities;
// private BigDecimal 资产总额(万元)
// private BigDecimal total;
// private BigDecimal 资产负债率(%)
// private BigDecimal liabilitiesRate;
/**
* 模型数据ID
*/
private String modelDataId;
private String tenderId;
public String getTenderId() {
return tenderId;
}
public void setTenderId(String tenderId) {
this.tenderId = tenderId;
}
public String getId() { public String getId() {
return id; return id;
} }
public BigDecimal getCompanyName() {
return companyName;
}
public void setCompanyName(BigDecimal companyName) {
this.companyName = companyName;
}
public BigDecimal getOperatingIncome() {
return operatingIncome;
}
public void setOperatingIncome(BigDecimal operatingIncome) {
this.operatingIncome = operatingIncome;
}
public BigDecimal getStockholdersEquity() {
return stockholdersEquity;
}
public void setStockholdersEquity(BigDecimal stockholdersEquity) {
this.stockholdersEquity = stockholdersEquity;
}
public BigDecimal getReturnOnEquity() {
return returnOnEquity;
}
public void setReturnOnEquity(BigDecimal returnOnEquity) {
this.returnOnEquity = returnOnEquity;
}
public BigDecimal getTotalliabilities() {
return totalliabilities;
}
public void setTotalliabilities(BigDecimal totalliabilities) {
this.totalliabilities = totalliabilities;
}
public void setId(String id) { public void setId(String id) {
this.id = id; this.id = id;
} }
...@@ -196,4 +273,12 @@ public class Finance implements Serializable { ...@@ -196,4 +273,12 @@ public class Finance implements Serializable {
return mainIncomeProfits; return mainIncomeProfits;
} }
public String getModelDataId() {
return modelDataId;
}
public void setModelDataId(String modelDataId) {
this.modelDataId = modelDataId;
}
} }
...@@ -65,6 +65,7 @@ public class TableXML { ...@@ -65,6 +65,7 @@ public class TableXML {
tr.setTitle("true".equalsIgnoreCase(trElement.attributeValue("isTitle"))); tr.setTitle("true".equalsIgnoreCase(trElement.attributeValue("isTitle")));
tr.setCount("true".equalsIgnoreCase(trElement.attributeValue("isCount"))); tr.setCount("true".equalsIgnoreCase(trElement.attributeValue("isCount")));
tr.setSubjectTableID(trElement.attributeValue("subjectTableID")); tr.setSubjectTableID(trElement.attributeValue("subjectTableID"));
return tr; return tr;
} }
...@@ -92,7 +93,7 @@ public class TableXML { ...@@ -92,7 +93,7 @@ public class TableXML {
width = tdElement.attributeValue("width").replaceAll("%", ""); width = tdElement.attributeValue("width").replaceAll("%", "");
} }
Td td = new Td(tdElement.attributeValue("colType"), tdElement.getTextTrim(), ObjectUtils.getIntValue(width, 100)); Td td = new Td(tdElement.attributeValue("colType"), tdElement.getTextTrim(), ObjectUtils.getIntValue(width, 100),"true".equals(tdElement.attributeValue("isNeedFill")));
try { try {
tds[Integer.valueOf(tdElement.attributeValue("realCol").trim())] = td; tds[Integer.valueOf(tdElement.attributeValue("realCol").trim())] = td;
} catch (Exception e) { } catch (Exception e) {
...@@ -108,11 +109,13 @@ public class TableXML { ...@@ -108,11 +109,13 @@ public class TableXML {
private String colType; private String colType;
private String content; private String content;
private int width; private int width;
private boolean isNeedFill;
public Td(String colType, String content, int width) { public Td(String colType, String content, int width, boolean isNeedFill ) {
this.colType = colType; this.colType = colType;
this.content = content; this.content = content;
this.width = width; this.width = width;
this.isNeedFill = isNeedFill;
} }
public String getColType() { public String getColType() {
...@@ -126,6 +129,15 @@ public class TableXML { ...@@ -126,6 +129,15 @@ public class TableXML {
public int getWidth() { public int getWidth() {
return width; return width;
} }
public boolean isNeedFill() {
return isNeedFill;
}
public void setNeedFill(boolean isNeedFill) {
this.isNeedFill = isNeedFill;
}
} }
public void setTds(Td[] tds) { public void setTds(Td[] tds) {
......
#Eclipse modern messages class #Eclipse modern messages class
#Tue Jan 23 11:29:02 CST 2024 #Tue Apr 16 13:51:53 CST 2024
About=\u5173\u4E8E About=\u5173\u4E8E
AboutAttachment=\u76F8\u5173\u9644\u4EF6 AboutAttachment=\u76F8\u5173\u9644\u4EF6
AboveDifferenceCondition=\u9AD8\u4E8E\u5DEE\u989D\u6761\u4EF6 AboveDifferenceCondition=\u9AD8\u4E8E\u5DEE\u989D\u6761\u4EF6
...@@ -118,7 +118,7 @@ Button_appllyForBack=\u7533\u8BF7\u9000\u56DE ...@@ -118,7 +118,7 @@ Button_appllyForBack=\u7533\u8BF7\u9000\u56DE
Button_appllyForBackFormat=\u7533\u8BF7\u9000\u56DE{0} Button_appllyForBackFormat=\u7533\u8BF7\u9000\u56DE{0}
Button_applySignature=\u7533\u8BF7\u7B7E\u540D Button_applySignature=\u7533\u8BF7\u7B7E\u540D
Button_applyToOthers=\u590D\u5236\u5230\u5176\u4ED6{0} Button_applyToOthers=\u590D\u5236\u5230\u5176\u4ED6{0}
Button_approval=\u5BA1\u6838 Button_approval=\u5BA1\u67E5
Button_approvalFormat=\u5BA1\u6838{0} Button_approvalFormat=\u5BA1\u6838{0}
Button_assignEvalGroup=\u5206\u914D\u8BC4\u5BA1\u8981\u7D20\u5355\u5143 Button_assignEvalGroup=\u5206\u914D\u8BC4\u5BA1\u8981\u7D20\u5355\u5143
Button_assignWorker=\u5206\u914D\u6E05\u6807\u4EBA\u5458 Button_assignWorker=\u5206\u914D\u6E05\u6807\u4EBA\u5458
...@@ -786,34 +786,6 @@ LoginDialog_connectionFail=\u670D\u52A1\u5668\u8FDE\u63A5\u5931\u8D25\uFF01 ...@@ -786,34 +786,6 @@ LoginDialog_connectionFail=\u670D\u52A1\u5668\u8FDE\u63A5\u5931\u8D25\uFF01
LoginDialog_editConfig=\u4FEE\u6539\u914D\u7F6E LoginDialog_editConfig=\u4FEE\u6539\u914D\u7F6E
LoginDialog_environment=\u73AF\u5883\u68C0\u6D4B LoginDialog_environment=\u73AF\u5883\u68C0\u6D4B
LoginDialog_installCaDriverTips=\u82E5\u60A8\u7684\u7535\u8111\u5C1A\u672A\u5B89\u88C5USBKey\u9A71\u52A8\u7A0B\u5E8F\uFF0C\u8BF7\u5148\u5B89\u88C5\u3002 LoginDialog_installCaDriverTips=\u82E5\u60A8\u7684\u7535\u8111\u5C1A\u672A\u5B89\u88C5USBKey\u9A71\u52A8\u7A0B\u5E8F\uFF0C\u8BF7\u5148\u5B89\u88C5\u3002
LoginDialog_label_10_text=\u4F01\u4E1A\u8D44\u8D28\u7B49\u7EA7
LoginDialog_label_11_text=\u6CE8\u518C\u8D44\u91D1(\u4E07\u5143 )
LoginDialog_label_12_text=\u8425\u4E1A\u6267\u7167\u53F7
LoginDialog_label_13_text=\u5F00\u6237\u94F6\u884C
LoginDialog_label_14_text=\u94F6\u884C\u8D26\u53F7
LoginDialog_label_15_text=\u8D22\u52A1\u5E74\u5EA6\u62A5\u544A
LoginDialog_label_16_text=\u8D44\u4EA7\u603B\u989D(\u4E07\u5143)
LoginDialog_label_17_text=\u8D1F\u503A\u989D(\u4E07\u5143)
LoginDialog_label_18_text=\u8D44\u4EA7\u8D1F\u503A\u7387(%)
LoginDialog_label_19_text=\u4E3B\u8425\u4E1A\u52A1\u6536\u5165(\u4E07\u5143)
LoginDialog_label_1_text=\u4F9B\u5E94\u5546\u540D\u79F0
LoginDialog_label_20_text=\u51C0\u5229\u6DA6(\u4E07\u5143)
LoginDialog_label_21_text=\u51C0\u5229\u7387(%)
LoginDialog_label_22_text=\u9879\u76EE\u540D\u79F0
LoginDialog_label_23_text=\u9879\u76EE\u6240\u5728\u5730
LoginDialog_label_24_text=\u53D1\u5305\u4EBA\u540D\u79F0
LoginDialog_label_25_text=\u53D1\u5305\u4EBA\u5730\u5740
LoginDialog_label_26_text=\u53D1\u5305\u4EBA\u7535\u8BDD
LoginDialog_label_27_text=\u5408\u540C\u4EF7\u683C(\u4E07\u5143)
LoginDialog_label_28_text=\u5F00\u5DE5\u65E5\u671F
LoginDialog_label_29_text=\u8BA1\u5212\u7AE3\u5DE5\u65E5\u671F
LoginDialog_label_2_text=\u6CE8\u518C\u5730\u5740
LoginDialog_label_30_text=\u5F53\u524D\u6307\u6807\u672A\u7ED1\u5B9A\u8BC4\u5BA1\u70B9
LoginDialog_label_3_text=\u8054\u7CFB\u4EBA
LoginDialog_label_5_text=\u7EC4\u7EC7\u673A\u6784
LoginDialog_label_6_text=\u6CD5\u4EBA\u540D\u79F0
LoginDialog_label_7_text=\u6280\u672F\u8D1F\u8D23\u4EBA\u540D\u79F0
LoginDialog_label_8_text=\u6210\u7ACB\u65F6\u95F4
LoginDialog_login=\u767B \u5F55 LoginDialog_login=\u767B \u5F55
LoginDialog_logoIco=icons/login/logo.png LoginDialog_logoIco=icons/login/logo.png
LoginDialog_machineCode=\u673A\u4F4D\u6807\u8BC6\u7801 LoginDialog_machineCode=\u673A\u4F4D\u6807\u8BC6\u7801
...@@ -1068,8 +1040,10 @@ Setup_noFormat=\u672A\u8BBE\u7F6E{0} ...@@ -1068,8 +1040,10 @@ Setup_noFormat=\u672A\u8BBE\u7F6E{0}
Setup_yes=\u5DF2\u8BBE\u7F6E Setup_yes=\u5DF2\u8BBE\u7F6E
Setup_yesFormat=\u5DF2\u8BBE\u7F6E{0} Setup_yesFormat=\u5DF2\u8BBE\u7F6E{0}
ShortlistedRules=\u5165\u56F4\u89C4\u5219 ShortlistedRules=\u5165\u56F4\u89C4\u5219
ShowAiProcessShell_lblNewLabel_4_text=New Label
ShowBidPrice=\u663E\u793A\u6295\u6807\u62A5\u4EF7 ShowBidPrice=\u663E\u793A\u6295\u6807\u62A5\u4EF7
ShowLimitPrice=\u663E\u793A\u9650\u4EF7 ShowLimitPrice=\u663E\u793A\u9650\u4EF7
ShowViewAiProcessDialog_lblNewLabel_text=\u5F53\u524D\u8FDB\u5EA6\uFF1A
SignFile=\u7B7E\u5230\u6587\u4EF6 SignFile=\u7B7E\u5230\u6587\u4EF6
SignInStatus_avoid=\u5DF2\u56DE\u907F SignInStatus_avoid=\u5DF2\u56DE\u907F
SignInStatus_no=\u672A\u7B7E\u5230 SignInStatus_no=\u672A\u7B7E\u5230
......
...@@ -1887,34 +1887,34 @@ public class Messages extends NLS { ...@@ -1887,34 +1887,34 @@ public class Messages extends NLS {
public static String ips_noOpenLiveing; public static String ips_noOpenLiveing;
public static String RecommonedEvaluationComposite_text_text; public static String RecommonedEvaluationComposite_text_text;
public static String RecommonedEvaluationTableComposite_text_text; public static String RecommonedEvaluationTableComposite_text_text;
public static String LoginDialog_label_1_text; // public static String LoginDialog_label_1_text;
public static String LoginDialog_label_2_text; // public static String LoginDialog_label_2_text;
public static String LoginDialog_label_3_text; // public static String LoginDialog_label_3_text;
public static String LoginDialog_label_5_text; // public static String LoginDialog_label_5_text;
public static String LoginDialog_label_6_text; // public static String LoginDialog_label_6_text;
public static String LoginDialog_label_7_text; // public static String LoginDialog_label_7_text;
public static String LoginDialog_label_8_text; // public static String LoginDialog_label_8_text;
public static String LoginDialog_label_10_text; // public static String LoginDialog_label_10_text;
public static String LoginDialog_label_11_text; // public static String LoginDialog_label_11_text;
public static String LoginDialog_label_12_text; // public static String LoginDialog_label_12_text;
public static String LoginDialog_label_13_text; // public static String LoginDialog_label_13_text;
public static String LoginDialog_label_14_text; // public static String LoginDialog_label_14_text;
public static String LoginDialog_label_15_text; // public static String LoginDialog_label_15_text;
public static String LoginDialog_label_16_text; // public static String LoginDialog_label_16_text;
public static String LoginDialog_label_17_text; // public static String LoginDialog_label_17_text;
public static String LoginDialog_label_18_text; // public static String LoginDialog_label_18_text;
public static String LoginDialog_label_19_text; // public static String LoginDialog_label_19_text;
public static String LoginDialog_label_20_text; // public static String LoginDialog_label_20_text;
public static String LoginDialog_label_21_text; // public static String LoginDialog_label_21_text;
public static String LoginDialog_label_22_text; // public static String LoginDialog_label_22_text;
public static String LoginDialog_label_23_text; // public static String LoginDialog_label_23_text;
public static String LoginDialog_label_24_text; // public static String LoginDialog_label_24_text;
public static String LoginDialog_label_25_text; // public static String LoginDialog_label_25_text;
public static String LoginDialog_label_26_text; // public static String LoginDialog_label_26_text;
public static String LoginDialog_label_27_text; // public static String LoginDialog_label_27_text;
public static String LoginDialog_label_28_text; // public static String LoginDialog_label_28_text;
public static String LoginDialog_label_29_text; // public static String LoginDialog_label_29_text;
public static String LoginDialog_label_30_text; // public static String LoginDialog_label_30_text;
public static String FileDownloadShell2_label_1_text; public static String FileDownloadShell2_label_1_text;
public static String FileDownloadShell2_label_2_text; public static String FileDownloadShell2_label_2_text;
public static String FileDownloadShell2_label_3_text; public static String FileDownloadShell2_label_3_text;
...@@ -1931,6 +1931,8 @@ public class Messages extends NLS { ...@@ -1931,6 +1931,8 @@ public class Messages extends NLS {
public static String FileDownloadShell2_label_13_text; public static String FileDownloadShell2_label_13_text;
public static String FileDownloadShell2_label_14_text; public static String FileDownloadShell2_label_14_text;
public static String FileDownloadShell2_label_15_text; public static String FileDownloadShell2_label_15_text;
public static String ShowViewAiProcessDialog_lblNewLabel_text;
public static String ShowAiProcessShell_lblNewLabel_4_text;
static { static {
......
#Eclipse modern messages class #Eclipse modern messages class
#Tue Jan 23 11:29:02 CST 2024 #Tue Apr 16 13:51:53 CST 2024
About=\u5173\u4E8E About=\u5173\u4E8E
AboutAttachment=\u76F8\u5173\u9644\u4EF6 AboutAttachment=\u76F8\u5173\u9644\u4EF6
AboveDifferenceCondition=\u9AD8\u4E8E\u5DEE\u989D\u6761\u4EF6 AboveDifferenceCondition=\u9AD8\u4E8E\u5DEE\u989D\u6761\u4EF6
...@@ -118,7 +118,7 @@ Button_appllyForBack=\u7533\u8BF7\u9000\u56DE ...@@ -118,7 +118,7 @@ Button_appllyForBack=\u7533\u8BF7\u9000\u56DE
Button_appllyForBackFormat=\u7533\u8BF7\u9000\u56DE{0} Button_appllyForBackFormat=\u7533\u8BF7\u9000\u56DE{0}
Button_applySignature=\u7533\u8BF7\u7B7E\u540D Button_applySignature=\u7533\u8BF7\u7B7E\u540D
Button_applyToOthers=\u590D\u5236\u5230\u5176\u4ED6{0} Button_applyToOthers=\u590D\u5236\u5230\u5176\u4ED6{0}
Button_approval=\u5BA1\u6838 Button_approval=\u5BA1\u67E5
Button_approvalFormat=\u5BA1\u6838{0} Button_approvalFormat=\u5BA1\u6838{0}
Button_assignEvalGroup=\u5206\u914D\u8BC4\u5BA1\u8981\u7D20\u5355\u5143 Button_assignEvalGroup=\u5206\u914D\u8BC4\u5BA1\u8981\u7D20\u5355\u5143
Button_assignWorker=\u5206\u914D\u6E05\u6807\u4EBA\u5458 Button_assignWorker=\u5206\u914D\u6E05\u6807\u4EBA\u5458
...@@ -786,34 +786,6 @@ LoginDialog_connectionFail=\u670D\u52A1\u5668\u8FDE\u63A5\u5931\u8D25\uFF01 ...@@ -786,34 +786,6 @@ LoginDialog_connectionFail=\u670D\u52A1\u5668\u8FDE\u63A5\u5931\u8D25\uFF01
LoginDialog_editConfig=\u4FEE\u6539\u914D\u7F6E LoginDialog_editConfig=\u4FEE\u6539\u914D\u7F6E
LoginDialog_environment=\u73AF\u5883\u68C0\u6D4B LoginDialog_environment=\u73AF\u5883\u68C0\u6D4B
LoginDialog_installCaDriverTips=\u82E5\u60A8\u7684\u7535\u8111\u5C1A\u672A\u5B89\u88C5USBKey\u9A71\u52A8\u7A0B\u5E8F\uFF0C\u8BF7\u5148\u5B89\u88C5\u3002 LoginDialog_installCaDriverTips=\u82E5\u60A8\u7684\u7535\u8111\u5C1A\u672A\u5B89\u88C5USBKey\u9A71\u52A8\u7A0B\u5E8F\uFF0C\u8BF7\u5148\u5B89\u88C5\u3002
LoginDialog_label_10_text=\u4F01\u4E1A\u8D44\u8D28\u7B49\u7EA7
LoginDialog_label_11_text=\u6CE8\u518C\u8D44\u91D1(\u4E07\u5143 )
LoginDialog_label_12_text=\u8425\u4E1A\u6267\u7167\u53F7
LoginDialog_label_13_text=\u5F00\u6237\u94F6\u884C
LoginDialog_label_14_text=\u94F6\u884C\u8D26\u53F7
LoginDialog_label_15_text=\u8D22\u52A1\u5E74\u5EA6\u62A5\u544A
LoginDialog_label_16_text=\u8D44\u4EA7\u603B\u989D(\u4E07\u5143)
LoginDialog_label_17_text=\u8D1F\u503A\u989D(\u4E07\u5143)
LoginDialog_label_18_text=\u8D44\u4EA7\u8D1F\u503A\u7387(%)
LoginDialog_label_19_text=\u4E3B\u8425\u4E1A\u52A1\u6536\u5165(\u4E07\u5143)
LoginDialog_label_1_text=\u4F9B\u5E94\u5546\u540D\u79F0
LoginDialog_label_20_text=\u51C0\u5229\u6DA6(\u4E07\u5143)
LoginDialog_label_21_text=\u51C0\u5229\u7387(%)
LoginDialog_label_22_text=\u9879\u76EE\u540D\u79F0
LoginDialog_label_23_text=\u9879\u76EE\u6240\u5728\u5730
LoginDialog_label_24_text=\u53D1\u5305\u4EBA\u540D\u79F0
LoginDialog_label_25_text=\u53D1\u5305\u4EBA\u5730\u5740
LoginDialog_label_26_text=\u53D1\u5305\u4EBA\u7535\u8BDD
LoginDialog_label_27_text=\u5408\u540C\u4EF7\u683C(\u4E07\u5143)
LoginDialog_label_28_text=\u5F00\u5DE5\u65E5\u671F
LoginDialog_label_29_text=\u8BA1\u5212\u7AE3\u5DE5\u65E5\u671F
LoginDialog_label_2_text=\u6CE8\u518C\u5730\u5740
LoginDialog_label_30_text=\u5F53\u524D\u6307\u6807\u672A\u7ED1\u5B9A\u8BC4\u5BA1\u70B9
LoginDialog_label_3_text=\u8054\u7CFB\u4EBA
LoginDialog_label_5_text=\u7EC4\u7EC7\u673A\u6784
LoginDialog_label_6_text=\u6CD5\u4EBA\u540D\u79F0
LoginDialog_label_7_text=\u6280\u672F\u8D1F\u8D23\u4EBA\u540D\u79F0
LoginDialog_label_8_text=\u6210\u7ACB\u65F6\u95F4
LoginDialog_login=\u767B \u5F55 LoginDialog_login=\u767B \u5F55
LoginDialog_logoIco=icons/login/logo.png LoginDialog_logoIco=icons/login/logo.png
LoginDialog_machineCode=\u673A\u4F4D\u6807\u8BC6\u7801 LoginDialog_machineCode=\u673A\u4F4D\u6807\u8BC6\u7801
...@@ -1068,8 +1040,10 @@ Setup_noFormat=\u672A\u8BBE\u7F6E{0} ...@@ -1068,8 +1040,10 @@ Setup_noFormat=\u672A\u8BBE\u7F6E{0}
Setup_yes=\u5DF2\u8BBE\u7F6E Setup_yes=\u5DF2\u8BBE\u7F6E
Setup_yesFormat=\u5DF2\u8BBE\u7F6E{0} Setup_yesFormat=\u5DF2\u8BBE\u7F6E{0}
ShortlistedRules=\u5165\u56F4\u89C4\u5219 ShortlistedRules=\u5165\u56F4\u89C4\u5219
ShowAiProcessShell_lblNewLabel_4_text=New Label
ShowBidPrice=\u663E\u793A\u6295\u6807\u62A5\u4EF7 ShowBidPrice=\u663E\u793A\u6295\u6807\u62A5\u4EF7
ShowLimitPrice=\u663E\u793A\u9650\u4EF7 ShowLimitPrice=\u663E\u793A\u9650\u4EF7
ShowViewAiProcessDialog_lblNewLabel_text=\u5F53\u524D\u8FDB\u5EA6\uFF1A
SignFile=\u7B7E\u5230\u6587\u4EF6 SignFile=\u7B7E\u5230\u6587\u4EF6
SignInStatus_avoid=\u5DF2\u56DE\u907F SignInStatus_avoid=\u5DF2\u56DE\u907F
SignInStatus_no=\u672A\u7B7E\u5230 SignInStatus_no=\u672A\u7B7E\u5230
......
package com.gx.obe.management.text;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.ss.util.CellRangeAddress;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
public class ExcelTest {
public static String createExcel(String[] field, String[] title, List<List<Map<String, String>>> listList, int[] mergeIndex) {
long startTime = System.currentTimeMillis();
if (title.length == 0) {
return null;
}
// 初始化excel模板
Workbook workbook = new XSSFWorkbook();
Sheet sheet = null;
int n = 0;
//循环sheet页 实例化sheet对象并且设置sheet名称,book对象
try {
sheet = workbook.createSheet();
workbook.setSheetName(n, "sheet1");
workbook.setSelectedTab(0);
} catch (Exception e) {
e.printStackTrace();
}
// 数据总数
int size = listList.stream().mapToInt(List::size).sum();
assert sheet != null;
Row row0 = sheet.createRow(0);
for (int i = 0; i < title.length; i++) {
Cell cell_1 = row0.createCell(i);
cell_1.setCellValue(title[i]);
}
List<PoiModel> poiModels = new ArrayList();
for (List<Map<String, String>> list : listList) {
for (Map<String, String> map : list) {
int index = sheet.getLastRowNum() + 1;
Row row = sheet.createRow(index);
for (int i = 0; i < title.length; i++) {
String titleField = field[i];
String old = null;
if (index > 1) {
old = poiModels.get(i) == null ? null : poiModels.get(i).getContent();
}
for (int k : mergeIndex) {
if (index == 1) {
// PoiModel poiModel = PoiModel.builder().oldContent(map.get(titleField)).content(map.get(titleField)).rowIndex(1).cellIndex(i).build();
PoiModel poiModel = new PoiModel();
poiModel.setContent(map.get(titleField));
poiModel.setRowIndex(1);
poiModel.setOldContent(map.get(titleField));
poiModel.setCellIndex(i);
// map.get(titleField)
poiModels.add(poiModel);
break;
}
PoiModel poiModel = poiModels.get(i);
String content = map.get(titleField);
// 当前行的当前列与上一行的当前列的内容不一致时,则把当前行以上的合并
if (i > 0 && k == i) {
// 如果不需要考虑当前行与上一行内容相同,但是它们的前一列内容不一样则不合并的情况,把或条件删除
if (!poiModel.getContent().equals(content) || poiModel.getContent().equals(content) && !poiModels.get(i - 1).getOldContent().equals(map.get(field[i - 1]))) {
get(poiModel, content, index, i, sheet);
}
}
// 处理第一列的情况
if (k == i && i == 0 && !poiModel.getContent().equals(content)) {
get(poiModel, content, index, i, sheet);
}
// 最后一行没有后续的行与之比较,所有当到最后一行时则直接合并对应列的相同内容
if (k == i && index == size && poiModels.get(i).getRowIndex() != index) {
CellRangeAddress cra = new CellRangeAddress(poiModels.get(i).getRowIndex(), index, poiModels.get(i).getCellIndex(), poiModels.get(i).getCellIndex());
sheet.addMergedRegion(cra);
}
}
Cell cell = row.createCell(i);
cell.setCellValue(map.get(titleField));
poiModels.get(i).setOldContent(old);
}
}
}
File file = new File("E:/demo.xlsx");
FileOutputStream fout;
try {
fout = new FileOutputStream(file);
workbook.write(fout);
fout.close();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
long endTime = System.currentTimeMillis(); //获取结束时间
System.out.println("程序运行时间:" + (endTime - startTime) + "ms"); //输出程序运行时间
return file.getAbsolutePath();
}
/**
* 合并单元格
*
* @param poiModel
* @param content
* @param index
* @param i
* @param sheet
*/
private static void get(PoiModel poiModel, String content, int index, int i, Sheet sheet) {
if (poiModel.getRowIndex() != index - 1) {
CellRangeAddress cra = new CellRangeAddress(poiModel.getRowIndex(), index - 1, poiModel.getCellIndex(), poiModel.getCellIndex());
//在sheet里增加合并单元格
sheet.addMergedRegion(cra);
}
/*重新记录该列的内容为当前内容,行标记改为当前行标记,列标记则为当前列*/
poiModel.setContent(content);
poiModel.setRowIndex(index);
poiModel.setCellIndex(i);
}
public static void main(String[] args) throws IOException {
// 此处标题的数组则对应excel的标题
String[] title = {"id", "标题", "描述", "负责人", "开始时间", "名字", "年龄", "性别", "班级"};
String[] field = {"id", "title", "dec", "manager", "beginTime", "name", "age", "sex", "clazz"};
List<Map<String, String>> list = new ArrayList();
// 这边是制造一些数据,注意每个list中map的key要和标题数组中的元素一致
for (int i = 0; i < 100; i++) {
HashMap<String, String> map = new HashMap();
if (i > 40) {
if (i < 45) {
map.put("id", "333");
map.put("title", "美女");
} else if (i > 50 && i < 55) {
map.put("id", "444");
map.put("title", "美男");
} else {
map.put("id", "444");
map.put("title", "少男");
}
} else if (i > 25) {
map.put("id", "222");
map.put("title", "少女");
} else if (i == 5 || i == 8) {
map.put("id", "222");
map.put("title", "少年");
} else {
map.put("id", "222");
map.put("title", "青年");
}
map.put("dec", "都是有用的人");
map.put("manager", "管理员");
map.put("beginTime", "2017-02-27 11:20:26");
map.put("name", "tsy");
map.put("age", "28");
map.put("sex", "男");
if (i > 80) {
if (i < 82) {
map.put("clazz", "er版");
} else {
map.put("clazz", "");
}
} else {
map.put("clazz", "一版");
}
list.add(map);
}
Map<String, List<Map<String, String>>> map =new HashMap();
map.put("测试合并数据", list);
// 模拟大数据量情况下,任务中心可分页查询接口,分批返回数据
List<List<Map<String, String>>> groups = pageByNum(list, 5);
// 此处数组为需要合并的列,可能有的需求是只需要某些列里面相同内容合并
System.out.println(createExcel(field, title, groups, new int[]{0, 1, 2, 8}));
}
public static <T> List<List<T>> pageByNum(List<T> list, int pageSize) {
return IntStream.range(0, list.size()).boxed().filter(t -> t % pageSize == 0).map(t -> list.stream().skip(t).limit(pageSize).collect(Collectors.toList())).collect(Collectors.toList());
}
}
package com.gx.obe.management.text;
public class PoiModel {
private String content;
private String oldContent;
private String primaryKey;
private int rowIndex;
private int cellIndex;
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public String getOldContent() {
return oldContent;
}
public void setOldContent(String oldContent) {
this.oldContent = oldContent;
}
public String getPrimaryKey() {
return primaryKey;
}
public void setPrimaryKey(String primaryKey) {
this.primaryKey = primaryKey;
}
public int getRowIndex() {
return rowIndex;
}
public void setRowIndex(int rowIndex) {
this.rowIndex = rowIndex;
}
public int getCellIndex() {
return cellIndex;
}
public void setCellIndex(int cellIndex) {
this.cellIndex = cellIndex;
}
}
...@@ -46,3 +46,5 @@ Export-Package: com.gx.obe.report, ...@@ -46,3 +46,5 @@ Export-Package: com.gx.obe.report,
com.report.util, com.report.util,
com.report.word, com.report.word,
com.report.word.demo com.report.word.demo
Import-Package: com.gx.obe.struct.beans,
com.gx.obe.struct.service
...@@ -366,6 +366,7 @@ public class ScoreDetailedDateSet extends BaseDateSet{ ...@@ -366,6 +366,7 @@ public class ScoreDetailedDateSet extends BaseDateSet{
for(Supplier supplier : supplierList){ for(Supplier supplier : supplierList){
Map<String, Object> supplierMap = Bean2MapUtils.createMap(supplier); Map<String, Object> supplierMap = Bean2MapUtils.createMap(supplier);
supplierMap.put("supplierId", supplier.getId()); supplierMap.put("supplierId", supplier.getId());
supplierMap.put("supplierName1", supplier.getSupplierName());
BigDecimal supplierSumScore = null; BigDecimal supplierSumScore = null;
BigDecimal supplierSumFinalScore = null; BigDecimal supplierSumFinalScore = null;
if(null != evaluationFactorResultList && evaluationFactorResultList.size() > 0){ if(null != evaluationFactorResultList && evaluationFactorResultList.size() > 0){
...@@ -474,6 +475,7 @@ public class ScoreDetailedDateSet extends BaseDateSet{ ...@@ -474,6 +475,7 @@ public class ScoreDetailedDateSet extends BaseDateSet{
} }
reportDataSet.putDimension("supplierList", supplierMapList); reportDataSet.putDimension("supplierList", supplierMapList);
reportDataSet.putDimension("supplierList1", supplierMapList);
reportDataSet.putDimension("factorList", evalFactorList); reportDataSet.putDimension("factorList", evalFactorList);
reportDataSet.putCrossData(crossData); reportDataSet.putCrossData(crossData);
reportDataList.add(reportDataSet); reportDataList.add(reportDataSet);
......
package com.gx.obe.report.dataset.excel;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.function.Function;
import java.util.stream.Collectors;
import com.gx.obe.components.core.Constants;
import com.gx.obe.http.json.JsonUtil;
import com.gx.obe.struct.beans.TableXML2;
import com.gx.obe.struct.beans.Td;
import com.gx.obe.struct.beans.TemplateTable;
import com.gx.obe.struct.beans.Tr;
import com.gx.obe.struct.service.EvaluationContentService;
import com.gx.obe.struct.service.TemplateTableService;
import com.gx.obe.util.utils.CollectionUtils;
import com.gx.obe.util.utils.ObjectUtils;
import com.gx.obe.util.utils.UuidUtils;
import com.gx.obe.web.entity.Supplier;
import com.gx.obe.web.entity.evaluation.EvaluationContent;
import com.gx.obe.web.entity.evaluation.EvaluationFactor;
import com.report.excel.ReportDataSet;
/**
* @Description: 打分明细表
* @author guoyr
*/
public class TechnicalComparisonDateSet extends BaseDateSet{
Set<String> fineName = new HashSet<String>();
boolean crossObj = false;
TemplateTableService templateTableService = new TemplateTableService();
public List<ReportDataSet> getDateSetList(Map<String, String> paramsMap, Map<String, String> enumsMap) {
List<ReportDataSet> reportDataList = new ArrayList<ReportDataSet>();
// 获得打分评标步骤
try {
EvaluationContentService evaluationContentService = new EvaluationContentService();
List<EvaluationContent> evaluationContentList = evaluationContentService.getEvaluationContentList(tenderProjectEntity.getId());
String templateFileName = (String)paramsMap.get("TEMPLATEFILENAME");
if(null != templateFileName && templateFileName.indexOf(".") > 0){
templateFileName = templateFileName.substring(0, templateFileName.lastIndexOf("."));
}
System.out.println();
List<Supplier> supplierList = supplierService.getAllSupplierList(tenderProjectEntity.getId());//(detailEvalNode, true);
for(EvaluationContent evaluationContent : evaluationContentList){
List<EvaluationFactor> factorList = new ArrayList<EvaluationFactor>();
if(evaluationContent.getDataCategory().equals("TT") && (evaluationContent.getRelChapterType().contains("TechnicalParameter"))) {
ReportDataSet reportDataSet = new ReportDataSet();
String tenderName = ObjectUtils.getObjString(tenderProjectEntity.getTenderName());
String tenderNo = ObjectUtils.getObjString(tenderProjectEntity.getTenderNo());
if(!fineName.add(evaluationContent.getTenderStructName()+ ".xlsx")) {
continue;
}
reportDataSet.setFileName(evaluationContent.getTenderStructName()+ ".xlsx");
if(null != tenderProjectEntity.getParentId()){
reportDataSet.putParam("projectName", ObjectUtils.getObjString(parentProject.getTenderName()));// 项目名称
reportDataSet.putParam("projectCode", ObjectUtils.getObjString(parentProject.getTenderNo()));// 项目编号
reportDataSet.putParam("packageCodeAndName", "\r\n"+tenderNo+":"+tenderName);// 分包编号和名称
reportDataSet.putParam("packageNameAndCode", "\r\n"+tenderName+":"+tenderNo);// 分包名称和编号
reportDataSet.putParam("packageName", tenderName);// 包件名称
reportDataSet.putParam("packageCode", tenderNo);// 包件编号
}else {
reportDataSet.putParam("projectName", tenderName);// 项目名称
reportDataSet.putParam("projectCode", tenderNo);// 项目编号
reportDataSet.putParam("packageCodeAndName", "");
reportDataSet.putParam("packageNameAndCode", "");
reportDataSet.putParam("packageName", "");// 包件名称
reportDataSet.putParam("packageCode", "");// 包件编号
}
List<TemplateTable> templateTableList = templateTableService.getTemplateTableList(tenderProjectEntity.getId(), evaluationContent.getRelChapterType(), evaluationContent.getDataCode());
if (CollectionUtils.isNull(templateTableList)) {
return null;
}
//获取供应商行数最多作为展示表格的行数
Map<String, TemplateTable> templateTableMap = templateTableList.stream().collect(Collectors.toMap(TemplateTable::getSupplierId, Function.identity()));
//获取招标文件的小范本,解析表头
TemplateTable templateTable = templateTableMap.get(Constants.BIDDING_ID);
if (templateTable == null) {
return null;
}
//表头解析
TableXML2 tableXML = JsonUtil.jsonToBean(templateTable.getTableInfo(), TableXML2.class);
if (tableXML == null) {
return null;
}
List<Tr> headList = tableXML.getHeadList();
if (headList.size() != 1) {
return null;
}
Tr head = headList.get(0);
//表头列
List<Map<String, String>> supplierMapList = new ArrayList<Map<String, String>>();
List<Tr> bodyList1 = tableXML.getBodyList();
for(int bodyRowIndex = 0; bodyRowIndex < bodyList1.size(); bodyRowIndex ++ ) {
Map<String, String> supplier = new HashMap<String, String>();
String id = UuidUtils.getUUID();
supplier.put("supplierId", id);
supplier.put("id", id);
supplier.put("supplierName", "供应商名称" + bodyRowIndex);
supplierMapList.add(supplier);
}
List<Td> tdList = new ArrayList<Td>();
List<Integer> indexList = new ArrayList<Integer>();
Map<String, Object> crossData = new HashMap<String, Object>();
if(null != head && null != head.getTds() && head.getTds().length > 0) {
for(int index = 0; index <head.getTds().length; index ++ ) {
Td td = head.getTds()[index];
if (!td.isNeedFill()) {
EvaluationFactor evaluationFactor = new EvaluationFactor();
evaluationFactor.setId(UuidUtils.getUUID());
evaluationFactor.setFactorName(td.getContent());
evaluationFactor.setLevel(2);
factorList.add(evaluationFactor);
List<Tr> bodyList = tableXML.getBodyList();
for(int bodyRowIndex = 0; bodyRowIndex < bodyList.size(); bodyRowIndex ++ ) {
Map<String, String> supplier = supplierMapList.get(bodyRowIndex);
Tr bodyTr = bodyList.get(bodyRowIndex);
Td bodyTd = bodyTr.getTds()[index];
crossData.put(evaluationFactor.getId() + supplier.get("supplierId") , ObjectUtils.getObjString(bodyTd.getContent()));
}
}else {
indexList.add(index);
tdList.add(td);
}
}
}
for(Supplier supplier : supplierList) {
TemplateTable supplierTemplateTable = templateTableMap.get(supplier.getId());
EvaluationFactor evaluationFactor = new EvaluationFactor();
evaluationFactor.setFactorName(supplier.getSupplierName());
evaluationFactor.setId(UuidUtils.getUUID());
evaluationFactor.setId(supplier.getId());
evaluationFactor.setLevel(1);
for(int a = 0; a< indexList.size();a ++) {
int tdIndex = indexList.get(a);
Td td = tdList.get(a);
EvaluationFactor childEvaluationFactor = new EvaluationFactor();
childEvaluationFactor.setFactorName( ObjectUtils.getObjString(td.getContent()));
childEvaluationFactor.setId(UuidUtils.getUUID());
childEvaluationFactor.setParentFactor(evaluationFactor);
childEvaluationFactor.setLevel(2);
childEvaluationFactor.setParentId(evaluationFactor.getId());
evaluationFactor.addChild(childEvaluationFactor);
if (supplierTemplateTable == null) {
continue;
}
TableXML2 supplierTableXML = JsonUtil.jsonToBean(supplierTemplateTable.getTableInfo(), TableXML2.class);
if (supplierTableXML == null) {
continue;
}
int trIndex = 0;
for(Tr tr: supplierTableXML.getBodyList()) {
if(trIndex >= supplierMapList.size()) {
continue;
}
Map<String, String> supplierMap = supplierMapList.get(trIndex);
if(tdIndex >= tr.getTds().length) {
continue;
}
Td bodyTd = tr.getTds()[tdIndex];//获取供应商相应表格数据索引位置
crossData.put(childEvaluationFactor.getId() + supplierMap.get("supplierId") , ObjectUtils.getObjString(bodyTd.getContent()));
trIndex++;
}
factorList.add(childEvaluationFactor);
}
factorList.add(evaluationFactor);
}
reportDataSet.putParam("expert", evaluationContent.getTenderStructName());
reportDataSet.putDimension("supplierList", supplierMapList);
reportDataSet.putDimension("factorList", factorList);
reportDataSet.putCrossData(crossData);
reportDataList.add(reportDataSet);
}
}
} catch (Exception e) {
System.out.println(e.getMessage());
}
return reportDataList;
}
}
...@@ -33,6 +33,7 @@ import com.gx.obe.formula.DeviateRateItem; ...@@ -33,6 +33,7 @@ import com.gx.obe.formula.DeviateRateItem;
import com.gx.obe.formula.FilterCountConditionItem; import com.gx.obe.formula.FilterCountConditionItem;
import com.gx.obe.formula.PriceParam; import com.gx.obe.formula.PriceParam;
import com.gx.obe.formula.SpecimenFilterConditionItem; import com.gx.obe.formula.SpecimenFilterConditionItem;
import com.gx.obe.http.json.JsonUtil;
import com.gx.obe.util.utils.BigDecimalUtils; import com.gx.obe.util.utils.BigDecimalUtils;
import com.gx.obe.util.utils.CollectionUtils; import com.gx.obe.util.utils.CollectionUtils;
import com.gx.obe.util.utils.DateUtils; import com.gx.obe.util.utils.DateUtils;
...@@ -73,10 +74,6 @@ public class ParsingXmlUtils { ...@@ -73,10 +74,6 @@ public class ParsingXmlUtils {
*/ */
public static TableXML parsingTableXML(String tableXMLPath) { public static TableXML parsingTableXML(String tableXMLPath) {
File xmlFile = new File(tableXMLPath); File xmlFile = new File(tableXMLPath);
if(tableXMLPath.contains("4fbf7eab25f645d8b5937d7e022d2f1a.xml")) {
System.out.println(tableXMLPath);
}
if (!xmlFile.isFile() || !xmlFile.exists()) { if (!xmlFile.isFile() || !xmlFile.exists()) {
return null; return null;
} }
...@@ -257,6 +254,7 @@ public class ParsingXmlUtils { ...@@ -257,6 +254,7 @@ public class ParsingXmlUtils {
Finance finance = new Finance(); Finance finance = new Finance();
finance.setAnnual(element.elementTextTrim("annual")); finance.setAnnual(element.elementTextTrim("annual"));
finance.setTotal(ObjectUtils.getObjBigDecimal(element.elementTextTrim("total"))); finance.setTotal(ObjectUtils.getObjBigDecimal(element.elementTextTrim("total")));
finance.setLiabilities(ObjectUtils.getObjBigDecimal(element.elementTextTrim("liabilities"))); finance.setLiabilities(ObjectUtils.getObjBigDecimal(element.elementTextTrim("liabilities")));
finance.setIncome(ObjectUtils.getObjBigDecimal(element.elementTextTrim("income"))); finance.setIncome(ObjectUtils.getObjBigDecimal(element.elementTextTrim("income")));
finance.setMainIncome(ObjectUtils.getObjBigDecimal(element.elementTextTrim("mainIncome"))); finance.setMainIncome(ObjectUtils.getObjBigDecimal(element.elementTextTrim("mainIncome")));
...@@ -269,6 +267,14 @@ public class ParsingXmlUtils { ...@@ -269,6 +267,14 @@ public class ParsingXmlUtils {
finance.setPaidUpCapital(ObjectUtils.getObjBigDecimal(element.elementTextTrim("paidUpCapital"))); finance.setPaidUpCapital(ObjectUtils.getObjBigDecimal(element.elementTextTrim("paidUpCapital")));
finance.setRetainedProfits(ObjectUtils.getObjBigDecimal(element.elementTextTrim("retainedProfits"))); finance.setRetainedProfits(ObjectUtils.getObjBigDecimal(element.elementTextTrim("retainedProfits")));
finance.setMainIncomeProfits(ObjectUtils.getObjBigDecimal(element.elementTextTrim("mainIncomeProfits"))); finance.setMainIncomeProfits(ObjectUtils.getObjBigDecimal(element.elementTextTrim("mainIncomeProfits")));
finance.setOperatingIncome(ObjectUtils.getObjBigDecimal(element.elementTextTrim("operatingIncome")));
finance.setCompanyName(ObjectUtils.getObjBigDecimal(element.elementTextTrim("companyName")));
finance.setStockholdersEquity(ObjectUtils.getObjBigDecimal(element.elementTextTrim("stockholdersEquity")));
finance.setReturnOnEquity(ObjectUtils.getObjBigDecimal(element.elementTextTrim("returnOnEquity")));
finance.setTotalliabilities(ObjectUtils.getObjBigDecimal(element.elementTextTrim("totalliabilities")));
// finance.setOperatingIncome(ObjectUtils.getObjBigDecimal(element.elementTextTrim("total")));
// finance.setOperatingIncome(ObjectUtils.getObjBigDecimal(element.elementTextTrim("total")));
return finance; return finance;
} }
......
...@@ -16,7 +16,7 @@ public class ComparisonData { ...@@ -16,7 +16,7 @@ public class ComparisonData {
private Map<Keys, String> headContentMap = new HashMap<>(); private Map<Keys, String> headContentMap = new HashMap<>();
private Map<Keys, String> comparisonContentMap = new HashMap<>(); private Map<Keys, String> comparisonContentMap = new HashMap<>();
private Map<String, Object> dataMap = new HashMap<>();
public boolean addHeadCol(Column col) { public boolean addHeadCol(Column col) {
return headColList.add(col); return headColList.add(col);
} }
...@@ -66,4 +66,12 @@ public class ComparisonData { ...@@ -66,4 +66,12 @@ public class ComparisonData {
return comparisonContentMap; return comparisonContentMap;
} }
public Map<String, Object> getDataMap() {
return dataMap;
}
public void setDataMap(String key, Object value) {
dataMap.put(key, value);
}
} }
...@@ -3,6 +3,7 @@ package com.gx.obe.component.comparison; ...@@ -3,6 +3,7 @@ package com.gx.obe.component.comparison;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Optional; import java.util.Optional;
import java.util.Set;
import java.util.stream.IntStream; import java.util.stream.IntStream;
import org.eclipse.swt.SWT; import org.eclipse.swt.SWT;
...@@ -39,9 +40,11 @@ public class ComparisonTable extends KTable { ...@@ -39,9 +40,11 @@ public class ComparisonTable extends KTable {
private final List<Column> titleColList; private final List<Column> titleColList;
private final List<Column> itemColList; private final List<Column> itemColList;
private final List<String> rowList; private final List<String> rowList;
private final Map<String, Object> dataMap;
private final Map<Keys, String> headContentMap; private final Map<Keys, String> headContentMap;
private final Map<Keys, String> comparisonContentMap; private final Map<Keys, String> comparisonContentMap;
private final Set set;
public ComparisonTable(Composite parent, ComparisonData comparisonData) { public ComparisonTable(Composite parent, ComparisonData comparisonData) {
super(parent, SWTX.AUTO_SCROLL | SWT.FULL_SELECTION | SWTX.EDIT_ON_KEY | SWTX.FILL_WITH_LASTCOL); super(parent, SWTX.AUTO_SCROLL | SWT.FULL_SELECTION | SWTX.EDIT_ON_KEY | SWTX.FILL_WITH_LASTCOL);
...@@ -52,17 +55,41 @@ public class ComparisonTable extends KTable { ...@@ -52,17 +55,41 @@ public class ComparisonTable extends KTable {
this.titleColList = comparisonData.getTitleColList(); this.titleColList = comparisonData.getTitleColList();
this.itemColList = comparisonData.getItemColList(); this.itemColList = comparisonData.getItemColList();
this.rowList = comparisonData.getRowList(); this.rowList = comparisonData.getRowList();
this.dataMap = comparisonData.getDataMap();
this.headContentMap = comparisonData.getHeadContentMap(); this.headContentMap = comparisonData.getHeadContentMap();
this.comparisonContentMap = comparisonData.getComparisonContentMap(); this.comparisonContentMap = comparisonData.getComparisonContentMap();
this.set = (Set)dataMap.get("hasFixTableRow");
this.model = new CommonKtableCModel(this, HEAD_ROW, headColList.size(), this.rowList.size(), titleColList.size() * itemColList.size());
this.setModel(model);
// this.model.setColumnWidth(sortCol, 40); // this.model.setColumnWidth(sortCol, 40);
// this.model.setColumnMaxWidth(sortCol, 80); // this.model.setColumnMaxWidth(sortCol, 80);
if(null != set && set.size() > 0) {
this.model = new CommonKtableCModel(this, HEAD_ROW, headColList.size(), this.rowList.size(),(titleColList.size() -set.size()) * itemColList.size() + set.size());
this.setModel(model);
IntStream.range(0, set.size()).forEach(i -> model.addRowSpan(0, i, HEAD_ROW));
// for(int index = set.size() ; index < titleColList.size(); index ++) {
int colIndex = 0;
for(Column Column : titleColList) {
if(colIndex >= set.size()) {
// System.out.println("合并列数据:" + colIndex + " : " + itemColList.size());
model.addColSpan(0, colIndex, itemColList.size());
}
colIndex+= itemColList.size();
}
////
//
//// index += itemColList.size();
// }
// IntStream.range(set.size(), titleColList.size()).map(i -> i * itemColList.size()).map(i -> i + headColList.size()).forEach(i -> model.addColSpan(0, i, itemColList.size()));
}else {
this.model = new CommonKtableCModel(this, HEAD_ROW, headColList.size(), this.rowList.size(),titleColList.size() * itemColList.size());
this.setModel(model);
IntStream.range(0, headColList.size()).forEach(i -> model.addRowSpan(0, i, HEAD_ROW)); 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()).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 -> { IntStream.range(0, titleColList.size() * itemColList.size( )+ headColList.size()).forEach(i -> {
model.setColumnWidth(i, 100); model.setColumnWidth(i, 100);
model.setColumnMaxWidth(i, 200); model.setColumnMaxWidth(i, 200);
...@@ -84,11 +111,35 @@ public class ComparisonTable extends KTable { ...@@ -84,11 +111,35 @@ public class ComparisonTable extends KTable {
* @return * @return
*/ */
private String receiveContent(int row, int col) { private String receiveContent(int row, int col) {
if (col < headColList.size()) { if(null != set && set.size() > 0) {
if (row == 0) return Optional.of(headColList.get(col)).map(Column::getName).orElse(""); if (col < set.size()) {
if (row == 0) {
return Optional.of(titleColList.get(col)).map(Column::getName).orElse("");
}
if (row == 1) return ""; if (row == 1) return "";
return Optional.of(Keys.of(rowList.get(row - 2), headColList.get(col).getId())).map(headContentMap::get).orElse(""); // System.out.println( Keys.of(rowList.get(row - 2), "",titleColList.get(col).getId()));
return Optional.of(Keys.of(rowList.get(row - 2),"", titleColList.get(col).getId())).map(comparisonContentMap::get).orElse("");
}else {
// System.out.println("col:" + col);
col -= set.size();
int itemSize = itemColList.size();
if (row == 0) {
// System.out.println("列数据输出"+ col );
return Optional.of(titleColList.get(col / itemSize + set.size())).map(Column::getName).orElse("");
} }
if (row == 1) return Optional.of(itemColList.get(col % itemSize)).map(Column::getName).orElse("");
try {
// System.out.println( "get keys:" +rowList.get(row - 2) +","+ titleColList.get(col / itemSize).getId()+","+itemColList.get(col % itemSize).getId() + " value :" + comparisonContentMap.get(Keys.of(rowList.get(row - 2), titleColList.get(col / itemSize).getId(), itemColList.get(col % itemSize).getId())) + "\r\n");
// System.out.println(Keys.of(rowList.get(row - 2), titleColList.get(col / itemSize).getId(), itemColList.get(col % itemSize).getId()));
// System.ou t.println(comparisonContentMap.get(Keys.of(rowList.get(row - 2), titleColList.get(col / itemSize).getId(), itemColList.get(col % itemSize).getId())));
return Optional.of(Keys.of(rowList.get(row - 2), titleColList.get(col / itemSize + set.size()).getId(), itemColList.get(col % itemSize).getId())).map(comparisonContentMap::get).orElse("");
} catch (Exception e) {
return "";
}
}
}else {
col -= headColList.size(); col -= headColList.size();
int itemSize = itemColList.size(); int itemSize = itemColList.size();
if (row == 0) return Optional.of(titleColList.get(col / itemSize)).map(Column::getName).orElse(""); if (row == 0) return Optional.of(titleColList.get(col / itemSize)).map(Column::getName).orElse("");
...@@ -102,6 +153,8 @@ public class ComparisonTable extends KTable { ...@@ -102,6 +153,8 @@ public class ComparisonTable extends KTable {
return ""; return "";
} }
} }
// return "";
}
/** /**
* @Description: 加载渲染器 * @Description: 加载渲染器
......
...@@ -21,14 +21,13 @@ Require-Bundle: org.eclipse.ui, ...@@ -21,14 +21,13 @@ Require-Bundle: org.eclipse.ui,
com.gx.obe.component;bundle-version="1.0.0", com.gx.obe.component;bundle-version="1.0.0",
com.gx.obe.common.widget, com.gx.obe.common.widget,
com.gx.obe.httputil;bundle-version="1.0.0", com.gx.obe.httputil;bundle-version="1.0.0",
com.gx.obe.components.messages com.gx.obe.components.messages;bundle-version="1.0.0"
Export-Package: com.gx.obe.evaluation.struct.enumeration, Export-Package: com.gx.obe.evaluation.struct.enumeration,
com.gx.obe.struct, com.gx.obe.struct,
com.gx.obe.struct.beans, com.gx.obe.struct.beans,
com.gx.obe.struct.composite, com.gx.obe.struct.composite,
com.gx.obe.struct.dialog, com.gx.obe.struct.dialog,
com.gx.obe.struct.enums, com.gx.obe.struct.enums,
com.gx.obe.struct.factory,
com.gx.obe.struct.handler, com.gx.obe.struct.handler,
com.gx.obe.struct.inters, com.gx.obe.struct.inters,
com.gx.obe.struct.listener, com.gx.obe.struct.listener,
......
...@@ -2,3 +2,4 @@ source.. = src/ ...@@ -2,3 +2,4 @@ source.. = src/
output.. = bin/ output.. = bin/
bin.includes = META-INF/,\ bin.includes = META-INF/,\
. .
javacDefaultEncoding.. = UTF-8
package com.gx.obe.struct.beans;
import java.math.BigDecimal;
/**
* @Description: 财务报表
* @author chenxw
*/
public class Finance {
/**
* 主键
*/
private String id;
/**
* 项目ID
*/
private String tenderId;
/**
* 模型数据ID
*/
private String modelDataId;
/**
* 年度
*/
private String annual;
/**
* 注册资本
*/
// private BigDecimal registeredCapital;
/**
* 总资产(万元)
*/
private BigDecimal total;
/**
* 利润总额(万元)
*/
private BigDecimal profitLossProfit;
/**
* 营业收入(万元)
*/
private BigDecimal operatingIncome;
/**
* 资产负债率(%)
*/
private BigDecimal liabilitiesRate;
/**
* 流动资产(万元)
*/
private BigDecimal currentAssets;
/**
* 流动负债(万元)
*/
private BigDecimal currentLiabilities;
/**
* 流动比率(%)
*/
private BigDecimal currentRate;
/**
* 净利率(%)
*/
private BigDecimal profitRatio;
/**
* 主营业务利润率(%)
*/
private BigDecimal operatingMargin;
/**
* 净利润(万元)
*/
private BigDecimal retainedProfits;
/**
* 企业名称
*/
private String companyName;
/**
* 净资产(万元)
*/
private BigDecimal netWorth;
/**
* 固定资产(万元)
*/
// private BigDecimal fixedAssets;
/**
* 现金流量净额(万元)
*/
// private BigDecimal netCashFlow;
/**
* 净资产收益率(%)
*/
// private BigDecimal returnOnEquity;
/**
* 总资产报酬率(%)
*/
// private BigDecimal returnOnTotalAsset;
/**
* 速动比率(%)
*/
private BigDecimal quickRatio;
/**
* 负债合计(万元)
*/
private BigDecimal totalliabilities;
/**
* 成本费用总额(万元)
*/
private BigDecimal totalcost;
/**
* 速动资产(万元)
*/
private BigDecimal quickassets;
/**
* 主营业务利润(万元)
*/
private BigDecimal mainIncomeProfits;
/**
* 主营业务收入(万元)
*/
private BigDecimal primeOperatingRevenue;
/**
* 资产负债表
*/
// private BalanceSheet balanceSheet;
/**
* 损益表
*/
// private ProfitlossSheet profitlossSheet;
/**
* 现金流量表
*/
// private CashSheet cashSheet;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getTenderId() {
return tenderId;
}
public void setTenderId(String tenderId) {
this.tenderId = tenderId;
}
public String getModelDataId() {
return modelDataId;
}
public void setModelDataId(String modelDataId) {
this.modelDataId = modelDataId;
}
public String getAnnual() {
return annual;
}
public void setAnnual(String annual) {
this.annual = annual;
}
public BigDecimal getTotal() {
return total;
}
public void setTotal(BigDecimal total) {
this.total = total;
}
public BigDecimal getOperatingIncome() {
return operatingIncome;
}
public void setOperatingIncome(BigDecimal operatingIncome) {
this.operatingIncome = operatingIncome;
}
public BigDecimal getLiabilitiesRate() {
return liabilitiesRate;
}
public void setLiabilitiesRate(BigDecimal liabilitiesRate) {
this.liabilitiesRate = liabilitiesRate;
}
public BigDecimal getCurrentAssets() {
return currentAssets;
}
public void setCurrentAssets(BigDecimal currentAssets) {
this.currentAssets = currentAssets;
}
public BigDecimal getCurrentLiabilities() {
return currentLiabilities;
}
public void setCurrentLiabilities(BigDecimal currentLiabilities) {
this.currentLiabilities = currentLiabilities;
}
public BigDecimal getCurrentRate() {
return currentRate;
}
public void setCurrentRate(BigDecimal currentRate) {
this.currentRate = currentRate;
}
public BigDecimal getOperatingMargin() {
return operatingMargin;
}
public void setOperatingMargin(BigDecimal operatingMargin) {
this.operatingMargin = operatingMargin;
}
public BigDecimal getRetainedProfits() {
return retainedProfits;
}
public void setRetainedProfits(BigDecimal retainedProfits) {
this.retainedProfits = retainedProfits;
}
public String getCompanyName() {
return companyName;
}
public void setCompanyName(String companyName) {
this.companyName = companyName;
}
public BigDecimal getNetWorth() {
return netWorth;
}
public void setNetWorth(BigDecimal netWorth) {
this.netWorth = netWorth;
}
// public BigDecimal getFixedAssets() {
// return fixedAssets;
// }
//
// public void setFixedAssets(BigDecimal fixedAssets) {
// this.fixedAssets = fixedAssets;
// }
//
// public BigDecimal getNetCashFlow() {
// return netCashFlow;
// }
//
// public void setNetCashFlow(BigDecimal netCashFlow) {
// this.netCashFlow = netCashFlow;
// }
//
// public BigDecimal getReturnOnEquity() {
// return returnOnEquity;
// }
//
// public void setReturnOnEquity(BigDecimal returnOnEquity) {
// this.returnOnEquity = returnOnEquity;
// }
//
// public BigDecimal getReturnOnTotalAsset() {
// return returnOnTotalAsset;
// }
//
// public void setReturnOnTotalAsset(BigDecimal returnOnTotalAsset) {
// this.returnOnTotalAsset = returnOnTotalAsset;
// }
public BigDecimal getQuickRatio() {
return quickRatio;
}
public void setQuickRatio(BigDecimal quickRatio) {
this.quickRatio = quickRatio;
}
public BigDecimal getTotalliabilities() {
return totalliabilities;
}
public void setTotalliabilities(BigDecimal totalliabilities) {
this.totalliabilities = totalliabilities;
}
// public BalanceSheet getBalanceSheet() {
// return balanceSheet;
// }
//
// public void setBalanceSheet(BalanceSheet balanceSheet) {
// this.balanceSheet = balanceSheet;
// }
//
// public ProfitlossSheet getProfitlossSheet() {
// return profitlossSheet;
// }
//
// public void setProfitlossSheet(ProfitlossSheet profitlossSheet) {
// this.profitlossSheet = profitlossSheet;
// }
//
// public CashSheet getCashSheet() {
// return cashSheet;
// }
//
// public void setCashSheet(CashSheet cashSheet) {
// this.cashSheet = cashSheet;
// }
// public BigDecimal getRegisteredCapital() {
// return registeredCapital;
// }
//
// public void setRegisteredCapital(BigDecimal registeredCapital) {
// this.registeredCapital = registeredCapital;
// }
public BigDecimal getTotalcost() {
return totalcost;
}
public void setTotalcost(BigDecimal totalcost) {
this.totalcost = totalcost;
}
public BigDecimal getQuickassets() {
return quickassets;
}
public void setQuickassets(BigDecimal quickassets) {
this.quickassets = quickassets;
}
public BigDecimal getMainIncomeProfits() {
return mainIncomeProfits;
}
public void setMainIncomeProfits(BigDecimal mainIncomeProfits) {
this.mainIncomeProfits = mainIncomeProfits;
}
public BigDecimal getPrimeOperatingRevenue() {
return primeOperatingRevenue;
}
public void setPrimeOperatingRevenue(BigDecimal primeOperatingRevenue) {
this.primeOperatingRevenue = primeOperatingRevenue;
}
public BigDecimal getProfitLossProfit() {
return profitLossProfit;
}
public void setProfitLossProfit(BigDecimal profitLossProfit) {
this.profitLossProfit = profitLossProfit;
}
public BigDecimal getProfitRatio() {
return profitRatio;
}
public void setProfitRatio(BigDecimal profitRatio) {
this.profitRatio = profitRatio;
}
}
\ No newline at end of file
...@@ -3,6 +3,8 @@ package com.gx.obe.struct.beans; ...@@ -3,6 +3,8 @@ package com.gx.obe.struct.beans;
import java.util.List; import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList; import java.util.concurrent.CopyOnWriteArrayList;
import com.gx.obe.components.core.vo.Finance;
public class StructDateInfo { public class StructDateInfo {
private final List<TemplateDataItem> templateDataItemList = new CopyOnWriteArrayList<>(); private final List<TemplateDataItem> templateDataItemList = new CopyOnWriteArrayList<>();
......
...@@ -5,7 +5,7 @@ public class Td { ...@@ -5,7 +5,7 @@ public class Td {
private String colType; private String colType;
private String content; private String content;
private int width; private int width;
private boolean needFill; private boolean isNeedFill;
public String getColType() { public String getColType() {
return colType; return colType;
...@@ -32,11 +32,11 @@ public class Td { ...@@ -32,11 +32,11 @@ public class Td {
} }
public boolean isNeedFill() { public boolean isNeedFill() {
return needFill; return isNeedFill;
} }
public void setNeedFill(boolean needFill) { public void setIsNeedFill(boolean isNeedFill) {
this.needFill = needFill; this.isNeedFill = isNeedFill;
} }
} }
\ No newline at end of file
package com.gx.obe.struct.composite;
import java.util.List;
import java.util.Optional;
import java.util.function.Consumer;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import org.eclipse.swt.SWT;
import org.eclipse.swt.core.widgets.ELink;
import org.eclipse.swt.core.widgets.ESepator;
import org.eclipse.swt.custom.StackLayout;
import org.eclipse.swt.events.MouseListener;
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.Label;
import com.gx.obe.ColorConstants;
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.components.core.Constants;
import com.gx.obe.components.core.global.Global;
import com.gx.obe.components.core.inter.PdfFileView;
import com.gx.obe.struct.beans.ModelData;
import com.gx.obe.struct.enums.DataCategoryEnum;
import com.gx.obe.struct.enums.EvaluationFactorTypeEnum;
import com.gx.obe.struct.enums.ModelDataTypeEnum;
import com.gx.obe.struct.handler.RelChapterTypeHandler;
import com.gx.obe.struct.parse.BidFileIndexTreeXmlParse;
import com.gx.obe.struct.service.EvaluationContentService;
import com.gx.obe.struct.service.ModelDataService;
import com.gx.obe.util.utils.CollectionUtils;
import com.gx.obe.web.entity.evaluation.EvaluationContent;
import com.swtdesigner.SWTResourceManager;
public class EvaluationContentComposite extends Composite {
private final EvaluationContentService evaluationContentService = new EvaluationContentService();
private final ModelDataService modelDataService = new ModelDataService();
private final String tenderId;
private final Prop<EvaluationContentData> evaluationContentData = new Prop<>();
private final Prop<PdfFileData> pdfFileData = new Prop<>();
private final Prop<String> tips = new Prop<>();
private final Prop<Boolean> showFile = new Prop<>();
private final Prop<Boolean> showSwitch = new Prop<>(false);
private class RootNodeChapterData {
private String name;
private String type;
}
private class EvaluationContentData {
private String supplierId;
private EvaluationFactorTypeEnum factorTypeEnum;
private List<EvaluationContent> evaluationContentList;
}
private class PdfFileData {
private String url;
private int pageNum;
}
public EvaluationContentComposite(Composite parent, String tenderId) {
super(parent, SWT.NONE);
this.tenderId = tenderId;
setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
setBackgroundMode(SWT.INHERIT_FORCE);
GridLayout gridLayout = new GridLayout(1, false);
gridLayout.verticalSpacing = 0;
gridLayout.marginHeight = 0;
gridLayout.marginWidth = 0;
setLayout(gridLayout);
Composite composite_5 = new Composite(this, SWT.NONE);
composite_5.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1));
GridLayout gl_composite_5 = new GridLayout(2, false);
gl_composite_5.marginHeight = 0;
gl_composite_5.marginWidth = 0;
composite_5.setLayout(gl_composite_5);
Composite composite = new Composite(composite_5, SWT.NONE);
composite.setLayoutData(new GridData(SWT.FILL, SWT.BOTTOM, true, true, 1, 1));
RowLayout rl_composite = new RowLayout(SWT.HORIZONTAL);
rl_composite.marginBottom = 0;
rl_composite.marginTop = 0;
composite.setLayout(rl_composite);
TabHandler<RectangleRadioButton> handler = new TabHandler<>(composite, t -> new RectangleRadioButton(t, SWT.NONE));
Composite composite_6 = new Composite(composite_5, SWT.NONE);
GridLayout gl_composite_6 = new GridLayout(1, false);
gl_composite_6.marginHeight = 4;
composite_6.setLayout(gl_composite_6);
ELink link = new ELink(composite_6, SWT.NONE);
link.addMouseListener(MouseListener.mouseUpAdapter($ -> showFile.replace(t -> !t)));
link.setText("切换视图");
showSwitch.bind(link::setVisible);
ESepator label_1 = new ESepator(this, SWT.HORIZONTAL);
label_1.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
label_1.setBackground(ColorConstants.SKIN_BG);
StackLayout stackLayout = new StackLayout();
Composite composite_1 = new Composite(this, SWT.NONE);
composite_1.setLayout(stackLayout);
composite_1.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
Consumer<Composite> topControl = t -> {
stackLayout.topControl = t;
composite_1.layout();
};
ModelDataComposite composite_2 = new ModelDataComposite(composite_1, tenderId);
Composite composite_3 = new Composite(composite_1, SWT.NONE);
composite_3.setLayout(new FillLayout(SWT.HORIZONTAL));
PdfFileView load = Global.PDF_FILE_VIEW.load(composite_3, SWT.NONE);
load.setFileNotExistMessage("文件不存在,请检查是否已下载投标文件!");
pdfFileData.bind(t -> load.openFile(t.url, t.pageNum));
Composite composite_4 = new Composite(composite_1, SWT.NONE);
composite_4.setLayout(new GridLayout(1, false));
Label label = new Label(composite_4, SWT.WRAP);
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));
tips.bind(t -> {
label.setText(t);
label.getParent().layout();
});
showFile.bind(t -> {
if (t) topControl.accept(composite_3);
else topControl.accept(composite_2);
});
evaluationContentData.bind(d -> {
showSwitch.set(false);
handler.start();
if (CollectionUtils.isNull(d.evaluationContentList)) {
rootNodeChapter(handler, d.factorTypeEnum, t -> {
showFile.set(true);
RxSwt.run(() -> getFilePath(d.supplierId, t.type)).checkWidget(this).exe(pdfFileData::set);
});
} else {
handler.listHand(d.evaluationContentList, EvaluationContent::getEvalPointName, t -> {
showSwitch.set(false);
switch (DataCategoryEnum.MAP.getOrDefault(t.getDataCategory(), DataCategoryEnum.NULL)) {
case MD:
getModelData(t.getRelChapterType(), d.supplierId, md -> {
if (md == null) {
topControl.accept(composite_4);
tips.set("当前供应商未检测到" + t.getEvalPointName() + ",请检查是否已解析结构化数据!");
} else {
if (ModelDataTypeEnum.EQ_ProjectLeader.getKey().equals(md.getRelChapterType())) {
showSwitch.set(true);
showFile.set(false);
composite_2.refresh(t, md);
RxSwt.run(() -> getFilePath(d.supplierId, "EnterpriseQualification_technology")).checkWidget(this).exe(pdfFileData::set);
} else {
showFile.set(false);
composite_2.refresh(t, md);
}
}
});
break;
case TDI:
case TT:
case NULL:
showFile.set(true);
RxSwt.run(() -> getFilePath(d.supplierId, t.getRelChapterType())).checkWidget(this).exe(pdfFileData::set);
break;
}
});
}
handler.end();
});
}
private void rootNodeChapter(TabHandler<RectangleRadioButton> handler, EvaluationFactorTypeEnum factorTypeEnum, Consumer<RootNodeChapterData> callback) {
handler.listHand(initRootNodeChapterList(factorTypeEnum).map(t -> {
String[] split = t.split("-", 2);
RootNodeChapterData chapterData = new RootNodeChapterData();
chapterData.type = split[0];
chapterData.name = split[1];
return chapterData;
}).collect(Collectors.toList()), t -> t.name, callback);
}
private void getModelData(String _relChapterType, String supplierId, Consumer<ModelData> consumer) {
RelChapterTypeHandler typeHandler = new RelChapterTypeHandler(_relChapterType);
Optional<ModelDataTypeEnum> modelDataTypeEnum = Optional.of(typeHandler.getRelChapterType()).map(ModelDataTypeEnum.MAP::get);
String relChapterType = modelDataTypeEnum.map(ModelDataTypeEnum.EQ_ProjectLeader::equals).orElse(false) ? typeHandler.getRelChapterType() : _relChapterType;
RxSwt.run(() -> modelDataService.getModelData(tenderId, supplierId, relChapterType, relChapterType)).checkWidget(this).exe(consumer);
}
private Stream<String> initRootNodeChapterList(EvaluationFactorTypeEnum factorTypeEnum) {
if (EvaluationFactorTypeEnum.BUSINESS == factorTypeEnum) {
return Stream.of("Business-商务标");
}
if (EvaluationFactorTypeEnum.TECHNOLOGY == factorTypeEnum) {
return Stream.of("Technology-技术标");
}
return Stream.of("Business-商务标", "Technology-技术标", "Price-报价");
}
public void refresh(String supplierId, String factorCode, EvaluationFactorTypeEnum factorTypeEnum) {
RxSwt.run(() -> {
EvaluationContentData evaluationContentData = new EvaluationContentData();
evaluationContentData.supplierId = supplierId;
evaluationContentData.factorTypeEnum = factorTypeEnum;
evaluationContentData.evaluationContentList = evaluationContentService.getEvaluationContentListByFactorCode(tenderId, factorCode);
return evaluationContentData;
}).checkWidget(this).exe(evaluationContentData::set);
}
private PdfFileData getFilePath(String supplierId, String relChapterType) {
BidFileIndexTreeXmlParse bidFileIndexTreeXmlParse = new BidFileIndexTreeXmlParse(Constants.getBidFilePath(tenderId, supplierId), relChapterType);
PdfFileData pdfFileData = new PdfFileData();
pdfFileData.url = bidFileIndexTreeXmlParse.getRootNodeFilePath();
pdfFileData.pageNum = bidFileIndexTreeXmlParse.getPageNumInGenerateFile();
return pdfFileData;
}
@Override
protected void checkSubclass() {}
}
package com.gx.obe.struct.composite;
import java.util.Optional;
import org.eclipse.swt.SWT;
import org.eclipse.swt.core.listener.RoundBorderLineListener;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import com.gx.obe.ColorConstants;
import com.gx.obe.bind.call.Call;
import com.gx.obe.bind.prop.Prop;
import com.gx.obe.struct.beans.ModelData;
import com.gx.obe.struct.enums.ModelDataTypeEnum;
import com.gx.obe.struct.factory.ModelDataFactory;
import com.gx.obe.struct.handler.RelChapterTypeHandler;
import com.gx.obe.struct.inters.IModelData;
import com.gx.obe.struct.inters.IModelDataDetail;
import com.gx.obe.web.entity.evaluation.EvaluationContent;
import com.swtdesigner.SWTResourceManager;
public class ModelDataComposite extends Composite {
private final Prop<String> title = new Prop<>();
private final Prop<Integer> count = new Prop<>();
private final Prop<ModelDataTypeEnum> modelDataTypeEnum = new Prop<>();
private final Prop<ModelData> modelData = new Prop<>();
private final Call call = new Call();
public ModelDataComposite(Composite parent, String tenderId) {
super(parent, SWT.NONE);
setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
setBackgroundMode(SWT.INHERIT_FORCE);
GridLayout gridLayout = new GridLayout(1, false);
gridLayout.verticalSpacing = 0;
gridLayout.marginHeight = 0;
gridLayout.marginWidth = 0;
setLayout(gridLayout);
Composite composite = new Composite(this, SWT.NONE);
GridLayout gl_composite = new GridLayout(1, false);
gl_composite.marginTop = 5;
gl_composite.marginHeight = 0;
gl_composite.marginWidth = 0;
composite.setLayout(gl_composite);
GridData gd_composite = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1);
gd_composite.heightHint = 400;
composite.setLayoutData(gd_composite);
Composite composite_2 = new Composite(composite, SWT.NONE);
GridLayout gl_composite_2 = new GridLayout(2, false);
gl_composite_2.marginWidth = 0;
composite_2.setLayout(gl_composite_2);
composite_2.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
Label lblNewLabel = new Label(composite_2, SWT.NONE);
lblNewLabel.setFont(SWTResourceManager.getFont("Microsoft YaHei UI", 10, SWT.BOLD));
title.bind(t -> {
lblNewLabel.setText(t);
composite_2.layout();
});
Composite composite_4 = new Composite(composite_2, SWT.NONE);
composite_4.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
GridLayout gl_composite_4 = new GridLayout(3, false);
gl_composite_4.marginHeight = 0;
composite_4.setLayout(gl_composite_4);
Label lblNewLabel_1 = new Label(composite_4, SWT.NONE);
lblNewLabel_1.setLayoutData(new GridData(SWT.LEFT, SWT.BOTTOM, false, false, 1, 1));
lblNewLabel_1.setText("共有");
Label lblNewLabel_2 = new Label(composite_4, SWT.NONE);
lblNewLabel_2.setForeground(SWTResourceManager.getColor(255, 93, 0));
lblNewLabel_2.setFont(SWTResourceManager.getFont("Microsoft YaHei UI", 10, SWT.BOLD));
count.bind(t -> {
lblNewLabel_2.setText(String.valueOf(t));
composite_4.layout();
});
Label lblNewLabel_3 = new Label(composite_4, SWT.NONE);
lblNewLabel_3.setLayoutData(new GridData(SWT.LEFT, SWT.BOTTOM, false, false, 1, 1));
title.bind(t -> {
lblNewLabel_3.setText("条" + t + "信息");
composite_4.layout();
});
Composite composite_3 = new Composite(composite, SWT.NONE);
FillLayout fl_composite_3 = new FillLayout(SWT.HORIZONTAL);
fl_composite_3.marginHeight = 1;
fl_composite_3.marginWidth = 1;
composite_3.setLayout(fl_composite_3);
composite_3.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
composite_3.addPaintListener(new RoundBorderLineListener(ColorConstants.BORDER_LINE_COLOR));
ModelDataDetailComposite composite_1 = new ModelDataDetailComposite(this, tenderId);
composite_1.setLayout(new GridLayout(1, false));
GridData gd_composite_1 = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1);
gd_composite_1.heightHint = 500;
composite_1.setLayoutData(gd_composite_1);
IModelDataDetail modelDataDetail = composite_1.getModelDataDetail();
call.bind(() -> modelDataDetail.refreshTitle(""));
modelDataTypeEnum.bind(t -> {
IModelData iModelData = ModelDataFactory.create(composite_3, modelDataDetail, t);
iModelData.setCountWrite(count::set);
modelData.bind(iModelData::refresh);
});
}
public void refresh(EvaluationContent evaluationContent, ModelData modelData) {
Optional.of(evaluationContent).map(EvaluationContent::getEvalPointName).ifPresent(title::set);
Optional.of(evaluationContent).map(t -> {
return new RelChapterTypeHandler(t.getRelChapterType()).getRelChapterType();
}).map(ModelDataTypeEnum.MAP::get).ifPresent(modelDataTypeEnum::set);
this.modelData.set(modelData);
this.call.exe();
}
@Override
protected void checkSubclass() {}
}
...@@ -68,7 +68,7 @@ public class TemplateTableListComposite extends Composite { ...@@ -68,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(Messages.LoginDialog_label_30_text); label.setText("当前指标未绑定评审点");
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);
......
...@@ -4,7 +4,7 @@ import java.util.HashMap; ...@@ -4,7 +4,7 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import com.gx.obe.struct.beans.Finance; import com.gx.obe.components.core.vo.Finance;
import com.gx.obe.web.utils.ObeHttpUtils; import com.gx.obe.web.utils.ObeHttpUtils;
public class FinanceService { public class FinanceService {
......
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;
...@@ -14,9 +12,7 @@ import org.dom4j.Document; ...@@ -14,9 +12,7 @@ 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.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.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.message.Messages; import com.gx.obe.message.Messages;
...@@ -169,7 +165,6 @@ public class ParsingStructThread implements Runnable { ...@@ -169,7 +165,6 @@ public class ParsingStructThread implements Runnable {
} catch (Exception e) { } catch (Exception e) {
messageProgress.message(Messages.FileDownloadShell2_label_6_text, -1); messageProgress.message(Messages.FileDownloadShell2_label_6_text, -1);
LOG.error(Messages.FileDownloadShell2_label_6_text); LOG.error(Messages.FileDownloadShell2_label_6_text);
// System.out.println(e.getMessage());
return; return;
} }
messageProgress.message(Messages.FileDownloadShell2_label_7_text, 1); messageProgress.message(Messages.FileDownloadShell2_label_7_text, 1);
...@@ -216,7 +211,6 @@ public class ParsingStructThread implements Runnable { ...@@ -216,7 +211,6 @@ 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);
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 -> {
...@@ -244,7 +238,6 @@ public class ParsingStructThread implements Runnable { ...@@ -244,7 +238,6 @@ 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);
System.out.println("relChapterType :"+ relChapterType );
Optional<ModelDataTypeEnum> modelDataTypeEnum ; Optional<ModelDataTypeEnum> modelDataTypeEnum ;
if(relChapterType.contains("EQ_Performance")) { if(relChapterType.contains("EQ_Performance")) {
modelDataTypeEnum = Optional.of(ModelDataTypeEnum.MAP.get(relChapterType)); modelDataTypeEnum = Optional.of(ModelDataTypeEnum.MAP.get(relChapterType));
...@@ -293,7 +286,6 @@ public class ParsingStructThread implements Runnable { ...@@ -293,7 +286,6 @@ 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");
......
...@@ -13,12 +13,12 @@ import org.dom4j.Element; ...@@ -13,12 +13,12 @@ import org.dom4j.Element;
import com.gx.obe.bind.recursion.Recursions; import com.gx.obe.bind.recursion.Recursions;
import com.gx.obe.common.file.utils.ParsingXmlUtils; import com.gx.obe.common.file.utils.ParsingXmlUtils;
import com.gx.obe.components.core.Constants; import com.gx.obe.components.core.Constants;
import com.gx.obe.components.core.vo.Finance;
import com.gx.obe.http.json.JsonUtil; import com.gx.obe.http.json.JsonUtil;
import com.gx.obe.struct.beans.AttachmentFile; import com.gx.obe.struct.beans.AttachmentFile;
import com.gx.obe.struct.beans.BidderBasicInfo; import com.gx.obe.struct.beans.BidderBasicInfo;
import com.gx.obe.struct.beans.BusinessLicense; import com.gx.obe.struct.beans.BusinessLicense;
import com.gx.obe.struct.beans.Certificate; import com.gx.obe.struct.beans.Certificate;
import com.gx.obe.struct.beans.Finance;
import com.gx.obe.struct.beans.Performance; import com.gx.obe.struct.beans.Performance;
import com.gx.obe.struct.beans.ProjectLeader; import com.gx.obe.struct.beans.ProjectLeader;
import com.gx.obe.struct.beans.Qualification; import com.gx.obe.struct.beans.Qualification;
...@@ -324,27 +324,45 @@ public class ParsingStructXmlUtils { ...@@ -324,27 +324,45 @@ public class ParsingStructXmlUtils {
finance.setAnnual(financeElement.elementTextTrim("annual")); finance.setAnnual(financeElement.elementTextTrim("annual"));
// finance.setRegisteredCapital(ObjectUtils.getObjBigDecimal(financeElement.elementTextTrim("registeredCapital"))); // finance.setRegisteredCapital(ObjectUtils.getObjBigDecimal(financeElement.elementTextTrim("registeredCapital")));
finance.setTotal(ObjectUtils.getObjBigDecimal(financeElement.elementTextTrim("total"))); finance.setTotal(ObjectUtils.getObjBigDecimal(financeElement.elementTextTrim("total")));
finance.setProfitLossProfit(ObjectUtils.getObjBigDecimal(financeElement.elementTextTrim("profitLossprofit"))); // finance.setProfitLossProfit(ObjectUtils.getObjBigDecimal(financeElement.elementTextTrim("profitLossprofit")));
finance.setOperatingIncome(ObjectUtils.getObjBigDecimal(financeElement.elementTextTrim("operatingIncome"))); finance.setOperatingIncome(ObjectUtils.getObjBigDecimal(financeElement.elementTextTrim("operatingIncome")));
finance.setLiabilitiesRate(ObjectUtils.getObjBigDecimal(financeElement.elementTextTrim("liabilitiesRate"))); finance.setLiabilitiesRate(ObjectUtils.getObjBigDecimal(financeElement.elementTextTrim("liabilitiesRate")));
finance.setCurrentAssets(ObjectUtils.getObjBigDecimal(financeElement.elementTextTrim("currentAssets"))); finance.setCurrentAssets(ObjectUtils.getObjBigDecimal(financeElement.elementTextTrim("currentAssets")));
finance.setCurrentLiabilities(ObjectUtils.getObjBigDecimal(financeElement.elementTextTrim("currentLiabilities"))); finance.setCurrentLiabilities(ObjectUtils.getObjBigDecimal(financeElement.elementTextTrim("currentLiabilities")));
finance.setCurrentRate(ObjectUtils.getObjBigDecimal(financeElement.elementTextTrim("currentRate"))); finance.setCurrentRate(ObjectUtils.getObjBigDecimal(financeElement.elementTextTrim("currentRate")));
finance.setProfitRatio(ObjectUtils.getObjBigDecimal(financeElement.elementTextTrim("profitRatio"))); // finance.setProfitRatio(ObjectUtils.getObjBigDecimal(financeElement.elementTextTrim("profitRatio")));
finance.setOperatingMargin(ObjectUtils.getObjBigDecimal(financeElement.elementTextTrim("operatingMargin"))); finance.setOperatingMargin(ObjectUtils.getObjBigDecimal(financeElement.elementTextTrim("operatingMargin")));
finance.setRetainedProfits(ObjectUtils.getObjBigDecimal(financeElement.elementTextTrim("retainedProfits"))); finance.setRetainedProfits(ObjectUtils.getObjBigDecimal(financeElement.elementTextTrim("retainedProfits")));
finance.setCompanyName(financeElement.elementTextTrim("companyName")); // finance.setCompanyName(financeElement.elementTextTrim("companyName"));
finance.setNetWorth(ObjectUtils.getObjBigDecimal(financeElement.elementTextTrim("netWorth"))); // finance.setNetWorth(ObjectUtils.getObjBigDecimal(financeElement.elementTextTrim("netWorth")));
// finance.setFixedAssets(ObjectUtils.getObjBigDecimal(financeElement.elementTextTrim("fixedAssets"))); // finance.setFixedAssets(ObjectUtils.getObjBigDecimal(financeElement.elementTextTrim("fixedAssets")));
// finance.setNetCashFlow(ObjectUtils.getObjBigDecimal(financeElement.elementTextTrim("netCashFlow"))); // finance.setNetCashFlow(ObjectUtils.getObjBigDecimal(financeElement.elementTextTrim("netCashFlow")));
// finance.setReturnOnEquity(ObjectUtils.getObjBigDecimal(financeElement.elementTextTrim("returnOnEquity"))); // finance.setReturnOnEquity(ObjectUtils.getObjBigDecimal(financeElement.elementTextTrim("returnOnEquity")));
// finance.setReturnOnTotalAsset(ObjectUtils.getObjBigDecimal(financeElement.elementTextTrim("returnOnTotalAsset"))); // finance.setReturnOnTotalAsset(ObjectUtils.getObjBigDecimal(financeElement.elementTextTrim("returnOnTotalAsset")));
finance.setQuickRatio(ObjectUtils.getObjBigDecimal(financeElement.elementTextTrim("quickRatio"))); // finance.setQuickRatio(ObjectUtils.getObjBigDecimal(financeElement.elementTextTrim("quickRatio")));
finance.setTotalliabilities(ObjectUtils.getObjBigDecimal(financeElement.elementTextTrim("totalliabilities"))); finance.setTotalliabilities(ObjectUtils.getObjBigDecimal(financeElement.elementTextTrim("totalliabilities")));
finance.setTotalcost(ObjectUtils.getObjBigDecimal(financeElement.elementTextTrim("totalcost"))); // finance.setTotalcost(ObjectUtils.getObjBigDecimal(financeElement.elementTextTrim("totalcost")));
finance.setQuickassets(ObjectUtils.getObjBigDecimal(financeElement.elementTextTrim("quickassets"))); // finance.setQuickassets(ObjectUtils.getObjBigDecimal(financeElement.elementTextTrim("quickassets")));
finance.setMainIncomeProfits(ObjectUtils.getObjBigDecimal(financeElement.elementTextTrim("mainIncomeProfits"))); finance.setMainIncomeProfits(ObjectUtils.getObjBigDecimal(financeElement.elementTextTrim("mainIncomeProfits")));
finance.setPrimeOperatingRevenue(ObjectUtils.getObjBigDecimal(financeElement.elementTextTrim("primeOperatingRevenue"))); finance.setLiabilities(ObjectUtils.getObjBigDecimal(financeElement.elementTextTrim("liabilities")));
finance.setIncome(ObjectUtils.getObjBigDecimal(financeElement.elementTextTrim("income")));
finance.setMainIncome(ObjectUtils.getObjBigDecimal(financeElement.elementTextTrim("mainIncome")));
finance.setProfit(ObjectUtils.getObjBigDecimal(financeElement.elementTextTrim("profit")));
finance.setLiabilitiesRate(ObjectUtils.getObjBigDecimal(financeElement.elementTextTrim("liabilitiesRate")));
finance.setCurrentAssets(ObjectUtils.getObjBigDecimal(financeElement.elementTextTrim("currentAssets")));
finance.setCurrentLiabilities(ObjectUtils.getObjBigDecimal(financeElement.elementTextTrim("currentLiabilities")));
finance.setCurrentRate(ObjectUtils.getObjBigDecimal(financeElement.elementTextTrim("currentRate")));
finance.setOperatingMargin(ObjectUtils.getObjBigDecimal(financeElement.elementTextTrim("operatingMargin")));
finance.setPaidUpCapital(ObjectUtils.getObjBigDecimal(financeElement.elementTextTrim("paidUpCapital")));
finance.setRetainedProfits(ObjectUtils.getObjBigDecimal(financeElement.elementTextTrim("retainedProfits")));
finance.setMainIncomeProfits(ObjectUtils.getObjBigDecimal(financeElement.elementTextTrim("mainIncomeProfits")));
finance.setOperatingIncome(ObjectUtils.getObjBigDecimal(financeElement.elementTextTrim("operatingIncome")));
finance.setCompanyName(ObjectUtils.getObjBigDecimal(financeElement.elementTextTrim("companyName")));
finance.setStockholdersEquity(ObjectUtils.getObjBigDecimal(financeElement.elementTextTrim("stockholdersEquity")));
finance.setReturnOnEquity(ObjectUtils.getObjBigDecimal(financeElement.elementTextTrim("returnOnEquity")));
finance.setTotalliabilities(ObjectUtils.getObjBigDecimal(financeElement.elementTextTrim("totalliabilities")));
// finance.setPrimeOperatingRevenue(ObjectUtils.getObjBigDecimal(financeElement.elementTextTrim("primeOperatingRevenue")));
// finance.setBalanceSheet(initBalanceSheet(financeElement.element("BalanceSheet"))); // finance.setBalanceSheet(initBalanceSheet(financeElement.element("BalanceSheet")));
// finance.setProfitlossSheet(initProfitlossSheet(financeElement.element("ProfitLossSheet"))); // finance.setProfitlossSheet(initProfitlossSheet(financeElement.element("ProfitLossSheet")));
// finance.setCashSheet(initCashSheet(financeElement.element("CashSheet"))); // finance.setCashSheet(initCashSheet(financeElement.element("CashSheet")));
......
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