Commit c37b8c75 authored by 王亚宁's avatar 王亚宁

Merge branch 'bug/master/#160' into 'master'

#261 评标管理新增的本地用户删除失效 #252 并表办法-价格指标-关联要计算得分的投标报价,首次点击下拉框总报价(含税)字段重复(中) #160 开标工具bug (监督人相关) #159 推荐组长及失信被执行人查询卡顿 #158 初审时否决相关意见 #157 报表生成失败问题 #156 专家签到时,被抽取专业以及姓名错乱

See merge request !3
parents 466be37c 8c0d5f80
......@@ -479,8 +479,13 @@ public class FactorEvaluationComposite extends EvaluationView {
evaluationButton = new ELink(supplier_composite, SWT.NONE);
evaluationButton.setImage(ResourceManager.getPluginImage(IconsActivator.PLUGIN_ID, "icons/btn/blue/edit.png"));
evaluationButton.setEnabled(false);
evaluationButton.addMouseListener(new MouseAdapter() {
@Override
public void mouseUp(MouseEvent e) {
if (!evaluationButton.getEnabled()) {
return;
}
setSupplierEvaluationOpinion();
}
});
......@@ -1105,10 +1110,10 @@ public class FactorEvaluationComposite extends EvaluationView {
isShowBidFileOpinion = false;
}
if (curStep.getStepType().equals(com.gx.obe.components.core.enumeration.EvaluationStepEnum.COMPLIANCE)) {
evaluationTable = new ComplianceEvaluationTableComposite(evaluation_talbe_composite, SWT.NONE);
evaluationTable = new ComplianceEvaluationTableComposite(evaluation_talbe_composite, evaluationButton, SWT.NONE);
} else {
if (null != curStep.getSummaryType() && curStep.getSummaryType().equals(com.gx.obe.components.core.enumeration.EvaluationStepEnum.SUMMARY_SCORE_BY_QUALIFIED)) {
evaluationTable = new ComplianceEvaluationTableComposite(evaluation_talbe_composite, SWT.NONE);
evaluationTable = new ComplianceEvaluationTableComposite(evaluation_talbe_composite, evaluationButton, SWT.NONE);
} else {
evaluationTable = new ScoreEvaluationTableComposite(evaluation_talbe_composite, SWT.NONE);
}
......
......@@ -18,6 +18,7 @@ import org.eclipse.swt.SWT;
import org.eclipse.swt.core.CallBack;
import org.eclipse.swt.core.ImageResolver;
import org.eclipse.swt.core.MessageDialog;
import org.eclipse.swt.core.widgets.ELink;
import org.eclipse.swt.core.widgets.EMenu;
import org.eclipse.swt.core.widgets.ESepator;
import org.eclipse.swt.custom.CLabel;
......@@ -113,6 +114,7 @@ public class ComplianceEvaluationTableComposite extends Composite implements IEv
private Composite evaluationTableComposite;
private Composite composite_9;
private Text factor_evaluation_opinion;
private ELink evaluationButton;
private StyledText evaluation_factor_memo;
private List<EvaluationFactor> evaluationFactorList = new ArrayList<EvaluationFactor>();
private int maxLevel = 1;
......@@ -153,6 +155,7 @@ public class ComplianceEvaluationTableComposite extends Composite implements IEv
private ExpertEvaluationResultService expertEvaluationResultService;
private SupplierOpeningResultService supplierOpeningResultService;
private Map<String, String> objectiveFactorIdMap = new HashMap<String, String>();
private Map<Integer,Object> colContent = new HashMap<>();
private final Map<Keys, Color> objectiveBackgroundMap = new HashMap<Keys, Color>();
private boolean sameScoreCheck = true;
/**
......@@ -214,8 +217,9 @@ public class ComplianceEvaluationTableComposite extends Composite implements IEv
* @param parent
* @param style
*/
public ComplianceEvaluationTableComposite(Composite parent, int style) {
public ComplianceEvaluationTableComposite(Composite parent,ELink evaluationBtn, int style) {
super(parent, style);
evaluationButton = evaluationBtn;
GridLayout gridLayout = new GridLayout(1, false);
gridLayout.marginHeight = 0;
gridLayout.marginWidth = 0;
......@@ -1491,8 +1495,10 @@ public class ComplianceEvaluationTableComposite extends Composite implements IEv
ExpertEvaluationResult expertEvaluationResult = expertEvaluationResultMap.get(supplier.getId());
if (null != expertEvaluationResult && null != expertEvaluationResult.getAccessment()) {
if (expertEvaluationResult.getAccessment().equals(EvaluationStepEnum.QUALIFIED)) {
colContent.put(col, EVAL_ACCESSMENT_YES);
return EVAL_ACCESSMENT_YES;
} else if (expertEvaluationResult.getAccessment().equals(EvaluationStepEnum.UNQUALIFIED)) {
colContent.put(col, EVAL_ACCESSMENT_NO);
return EVAL_ACCESSMENT_NO;
}
}
......@@ -1763,6 +1769,12 @@ public class ComplianceEvaluationTableComposite extends Composite implements IEv
if (null != supplier && null != evaluationFactor) {
evalFactorResult = supplierEvaluationFactorResultMap.get(supplier.getId()).get(evaluationFactor.getId());
}
if(StringUtils.isNotEmpty(colContent.get(col).toString())) {
evaluationButton.setEnabled(!EVAL_ACCESSMENT_YES.equals(colContent.get(col).toString()));
//重绘控件,控件刷新具有滞后性
evaluationButton.redraw();
}
resultClickEventAction(supplier, evaluationFactor, evalFactorResult);
return;
}
......
......@@ -864,9 +864,9 @@ public class ExpertSignEvaluationComposite extends Composite {
userService.updateAssignProperty(user, updatePropertyList.toArray(new String[updatePropertyList.size()]));
}
}else {
return false;
return signFlag;
}
return true;
return signFlag;
}
......
......@@ -10,6 +10,8 @@ import java.util.Map;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.CLabel;
import org.eclipse.swt.custom.ScrolledComposite;
import org.eclipse.swt.events.DisposeEvent;
import org.eclipse.swt.events.DisposeListener;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.layout.RowLayout;
......@@ -57,7 +59,15 @@ public class ElectionExpertLeaderComposite extends Composite implements Evaluati
*/
public ElectionExpertLeaderComposite(Composite parent, TenderProjectEntity tenderProject, Expert expert) {
super(parent, SWT.NONE);
addDisposeListener(new DisposeListener() {
@Override
public void widgetDisposed(DisposeEvent e) {
if(null != refreshVotesThread) {
refreshVotesThread.stop();
}
}
});
this.tenderProject = tenderProject;
this.curExpert = expert;
......@@ -96,7 +106,6 @@ public class ElectionExpertLeaderComposite extends Composite implements Evaluati
*/
private void init() {
refreshExpertAction();
refreshVotesThread = new RefreshVotesThread(tenderProject, new RefreshVotesThread.RefreshVotesListener() {
public void refreshExpertVotes(final boolean isCanVote, final Map<String, Integer> votesMap, final int turnCount, final int noVoteCount) {
Display.getDefault().syncExec(new Runnable() {
......@@ -116,6 +125,7 @@ public class ElectionExpertLeaderComposite extends Composite implements Evaluati
}
}
}
expertVoteComposite.redraw();
}
if (isCanVote) {
message_label.setText(MessageFormat.format(Messages.Tips_voteExpertLeaderRound, turnCount));
......@@ -170,11 +180,14 @@ public class ElectionExpertLeaderComposite extends Composite implements Evaluati
composite.initDate(tenderProject, expert, curExpert);
composite.refreshVote(expert.getVotes());
composite.setVoteEnable(false);
composite.redraw();
composite.addExpertVoteListener(new ExpertVoteComposite.ExpertVoteListener() {
@Override
public void expertVote() {
if(!message_label.isDisposed()){
for (String expertId : expertVoteCompositeMap.keySet()) {
expertVoteCompositeMap.get(expertId).setVoteEnable(false);
expertVoteCompositeMap.get(expertId).redraw();
}
message_label.setText(Messages.Tips_youHaveVoted);
}
......@@ -186,6 +199,7 @@ public class ElectionExpertLeaderComposite extends Composite implements Evaluati
@Override
public void dispose() {
System.out.println("ElectionExpertLeaderComposite is being disposed");
if(null != refreshVotesThread) {
refreshVotesThread.stop();
}
......
......@@ -221,13 +221,14 @@ public class ExpertVoteComposite extends Composite {
}
canRefresh = false;
voteLink.setEnabled(false);
redraw();
if (TenderProjectEnum.GKZB.equals(tenderProject.getTenderMethod()) || TenderProjectEnum.YQZB.equals(tenderProject.getTenderMethod())) {
if (ExpertEnum.BIDDING.equals(targetExpert.getExpertType())) {
MessageDialog.openWarning(getShell(), "当前专家为招标代表,不可以推荐为专家组长!");
return;
}
}
voteLink.setText("投票中...");
voteLink.setText("正在投票中...");
voteLink.getParent().layout();
new Thread(new Runnable(){
public void run(){
......@@ -236,7 +237,7 @@ public class ExpertVoteComposite extends Composite {
public void run(){
if(!voteLink.isDisposed()){
voteLink.setText(Messages.Button_vote);
voteLink.getParent().layout();
// voteLink.getParent().layout();
if (voteFlag) {
refreshVote(votes++);
listener.expertVote();
......@@ -244,8 +245,8 @@ public class ExpertVoteComposite extends Composite {
MessageDialog.openInformation(getShell(), Messages.Tips_operateFail);
voteLink.setEnabled(true);
}
redraw();
}
}
});
canRefresh = true;
......@@ -289,10 +290,14 @@ public class ExpertVoteComposite extends Composite {
*/
public void setVoteEnable(boolean canVote) {
if(canRefresh) {
voteLink.setEnabled(canVote);
this.voteLink.setEnabled(canVote);
}
}
public void redraw() {
this.voteLink.redraw();
}
public void addExpertVoteListener(ExpertVoteListener listener) {
this.listener = listener;
}
......
......@@ -48,6 +48,17 @@ public class PriceParam implements Serializable{
// private StringBuilder desc;
private StringBuilder formula;//组装公式描述
private String evalStructMessage;
public String getEvalStructMessage() {
return evalStructMessage;
}
public void setEvalStructMessage(String evalStructMessage) {
this.evalStructMessage = evalStructMessage;
}
public BasePriceRangeParam getSpecimenParam() {
if(null == specimenParam) {
specimenParam = new BasePriceRangeParam();
......
......@@ -596,6 +596,8 @@ EvalContent=\u8BC4\u5BA1\u5185\u5BB9
EvalEndTime=\u8BC4\u6807\u7ED3\u675F\u65F6\u95F4
EvalExpert=\u8BC4\u6807\u4E13\u5BB6
EvalExplain=\u8BC4\u5BA1\u8BF4\u660E
EvalExplainPrice=\u8BC4\u6807\u57FA\u51C6\u4EF7\u8BA1\u7B97\u65B9\u6CD5
BidExplainPrice=\u6295\u6807\u62A5\u4EF7\u8BA1\u7B97\u65B9\u6CD5
EvalFactor=\u8BC4\u5BA1\u6307\u6807
EvalGroup=\u8BC4\u5BA1\u5355\u5143
EvalManage=\u8BC4\u6807\u7BA1\u7406
......
......@@ -517,6 +517,8 @@ public class Messages extends NLS {
public static String EvalFactor;
public static String EvalContent;
public static String EvalExplain;
public static String EvalExplainPrice;
public static String BidExplainPrice;
public static String Explain;
public static String Description;
public static String ScoreDecimalDigits;
......
......@@ -596,6 +596,8 @@ EvalContent=\u8BC4\u5BA1\u5185\u5BB9
EvalEndTime=\u8BC4\u6807\u7ED3\u675F\u65F6\u95F4
EvalExpert=\u8BC4\u6807\u4E13\u5BB6
EvalExplain=\u8BC4\u5BA1\u8BF4\u660E
EvalExplainPrice=\u8BC4\u6807\u57FA\u51C6\u4EF7\u8BA1\u7B97\u65B9\u6CD5
BidExplainPrice=\u6295\u6807\u62A5\u4EF7\u8BA1\u7B97\u65B9\u6CD5
EvalFactor=\u8BC4\u5BA1\u6307\u6807
EvalGroup=\u8BC4\u5BA1\u5355\u5143
EvalManage=\u8BC4\u6807\u7BA1\u7406
......
#\u7cfb\u7edf\u7248\u672c
version=OBEV7.7.9.20230602
version=OBEV7.7.9.
keyCharacter=
#\u6b63\u5f0f\u7248\u672c\u68c0\u67e5\u5347\u7ea7\u7f16\u7801
versionUpdateType=OBE_FinalService
......
#\u7cfb\u7edf\u7248\u672c
version=OBEV7.7.9.20230602
version=OBEV7.7.9.20240611
keyCharacter=g
versionUpdateType=OBE_Service
#\u6d4b\u8bd5\u7ad9\u4e13\u5bb6\u7b7e\u670d\u52a1
......
......@@ -501,17 +501,7 @@ public class EvaluationFactorsManagerComposite extends Composite {
isInProgress = tenderProjectService.isInProgress(tenderProjectEntity.getId(), null);
List<String> nodeList = evaluationStepService.getIdByTenderIdCount(tenderProjectEntity.getId());
isExistEvaluationStep = CollectionUtils.isNotNull(nodeList);
if(isInProgress || isExistEvaluationStep) {
return;
}
final int factorCount = evaluationFactorService.getFactorCountByTenderId(tenderProjectEntity.getId());
// 验证项目下是否存在评审指标,如果没有则自动导入招标文件或投标文件下的指标信息。
if (factorCount > 0) {
return;
}
// 导入评审指标线程(项目下没有评审指标,先从招标文件下找(EvalFactors.xml),未找到则再从投标文件下找(EvalFactors.xml)。)
new EvaluationFactorXmlResolverThread(tenderProjectEntity, new CallBack() {
EvaluationFactorXmlResolverThread xmlResolverThread = new EvaluationFactorXmlResolverThread(projectAction, new CallBack() {
public void callBackBoolean(boolean bool) {
Display.getDefault().asyncExec(new Runnable(){
public void run(){
......@@ -522,7 +512,18 @@ public class EvaluationFactorsManagerComposite extends Composite {
}
});
}
}).start();
});
xmlResolverThread.parserStructProject(projectAction);
if(isInProgress || isExistEvaluationStep) {
return;
}
final int factorCount = evaluationFactorService.getFactorCountByTenderId(tenderProjectEntity.getId());
// 验证项目下是否存在评审指标,如果没有则自动导入招标文件或投标文件下的指标信息。
if (factorCount > 0) {
return;
}
// 导入评审指标线程(项目下没有评审指标,先从招标文件下找(EvalFactors.xml),未找到则再从投标文件下找(EvalFactors.xml)。)
xmlResolverThread.start();
}
}));
myThreadSet.setMessage(Messages.Tips_requesting);
......
......@@ -4,6 +4,7 @@ import java.math.BigDecimal;
import java.text.MessageFormat;
import java.text.NumberFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
......@@ -60,6 +61,7 @@ import com.gx.obe.message.Messages;
import com.gx.obe.util.utils.BigDecimalUtils;
import com.gx.obe.util.utils.LogUtils;
import com.gx.obe.util.utils.ObjectUtils;
import com.gx.obe.util.utils.SerializeUtils;
import com.gx.obe.util.utils.StringUtils;
import com.gx.obe.web.entity.auth.Menu;
import com.gx.obe.web.entity.evaluation.EvaluationFactor;
......@@ -84,6 +86,7 @@ public class PriceFactorsManagerComposite extends Composite {
private Text factor_name_text;
private Text factor_memo_text;
private Text factor_memo_text1;
private ELink add_btn;
private ELink add_sub_btn;
private ELink import_bid_price_factor;
......@@ -132,7 +135,6 @@ public class PriceFactorsManagerComposite extends Composite {
private EvaluationStepService evaluationStepService;
private EvaluationFactorService evaluationFactorService;
private ProjectRuleService projectRuleService;
private Action projectAction;
private ELink applyToOtherFactorBtn;
{
LogUtils.logClass(PriceFactorsManagerComposite.class);
......@@ -156,7 +158,9 @@ public class PriceFactorsManagerComposite extends Composite {
imageResolver.disposite();
}
});
this.projectAction = projectAction;
this.tenderProject = projectAction.getTenderProject();
this.menu = projectAction.getMenu();
this.projectRule = projectAction.getTenderProjectRule();
composite_1 = new Composite(this, SWT.NONE);
GridData gd_composite_1 = new GridData(SWT.FILL, SWT.FILL, false, true, 1, 1);
......@@ -535,6 +539,32 @@ public class PriceFactorsManagerComposite extends Composite {
gd_formula_text.widthHint = 200;
formula_text.setLayoutData(gd_formula_text);
// 结构化区分渲染
if(isStruct()) {
Label label_1 = new Label(composite_5, SWT.RIGHT);
label_1.setFont(SWTResourceManager.getFont("微软雅黑", 10, SWT.NORMAL));
label_1.setLayoutData(new GridData(SWT.RIGHT, SWT.TOP, false, false, 1, 1));
label_1.setText(Messages.EvalExplainPrice + ":");
factor_memo_text1 = new Text(composite_5, SWT.BORDER | SWT.WRAP | SWT.V_SCROLL | SWT.MULTI);
GridData gd_factorMemoText = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1);
gd_factorMemoText.widthHint = 200;
gd_factorMemoText.heightHint = 50;
factor_memo_text1.setLayoutData(gd_factorMemoText);
factor_memo_text1.setTextLimit(1000);
Label label_0 = new Label(composite_5, SWT.RIGHT);
label_0.setFont(SWTResourceManager.getFont("微软雅黑", 10, SWT.NORMAL));
label_0.setLayoutData(new GridData(SWT.RIGHT, SWT.TOP, false, false, 1, 1));
label_0.setText(Messages.BidExplainPrice + ":");
factor_memo_text = new Text(composite_5, SWT.BORDER | SWT.WRAP | SWT.V_SCROLL | SWT.MULTI);
GridData gd_factorMemoText_1 = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1);
gd_factorMemoText_1.widthHint = 200;
gd_factorMemoText_1.heightHint = 50;
factor_memo_text.setLayoutData(gd_factorMemoText_1);
factor_memo_text.setTextLimit(1000);
}else {
Label label_1 = new Label(composite_5, SWT.RIGHT);
label_1.setFont(SWTResourceManager.getFont("微软雅黑", 10, SWT.NORMAL));
label_1.setLayoutData(new GridData(SWT.RIGHT, SWT.TOP, false, false, 1, 1));
......@@ -546,6 +576,7 @@ public class PriceFactorsManagerComposite extends Composite {
gd_factorMemoText.heightHint = 50;
factor_memo_text.setLayoutData(gd_factorMemoText);
factor_memo_text.setTextLimit(1000);
}
scrolledComposite.setContent(scroContentComposite);
scrolledComposite.setMinSize(scroContentComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT));
......@@ -572,10 +603,6 @@ public class PriceFactorsManagerComposite extends Composite {
* @author guoyr
*/
private void init(){
this.tenderProject = projectAction.getTenderProject();
this.menu = projectAction.getMenu();
this.projectRule = projectAction.getTenderProjectRule();
applyToOtherPackBtn.setText(MessageFormat.format(Messages.Button_applyToOthers, com.gx.obe.components.core.I18N.getString(I18NEnum.SUBPACKAGE, tenderProject.getTenderType())));
bidPriceService = new BidPriceService();
tenderProjectService = new TenderProjectService();
......@@ -593,6 +620,7 @@ public class PriceFactorsManagerComposite extends Composite {
menuOpenImage = imageResolver.loadImage(IconsActivator.PLUGIN_ID,"icons/tree_parent.png");
menuImage = imageResolver.loadImage(IconsActivator.PLUGIN_ID,"icons/tree_item.png");
// 初始化检查
initInputListener();
// 添选中事件和右键菜单事件
factors_grid.addListener(SWT.Selection, new GridSelectionListener(){
......@@ -655,6 +683,10 @@ public class PriceFactorsManagerComposite extends Composite {
max_score_text.addKeyListener(factorMaxScoreListener);
}
private boolean isStruct() {
return tenderProject.getEvaluationParamByKey(tenderProject.getId() + "struct");
}
/**
* @Description: 设置投标报价
* @author guoyr
......@@ -678,14 +710,14 @@ public class PriceFactorsManagerComposite extends Composite {
}
// 只有存在多个报价时,才显示总报价
// if(bidPriceMap.keySet().size() > 1){
BidPrice bidPriceTotal = new BidPrice();
bidPriceTotal.setBidPriceCode(BidPrice.BID_PRICE_TOTAL_CODE);
bidPriceTotal.setBidPriceName(Messages.BidPriceTotal);
if(null != bidPriceList && bidPriceList.size() > 1){
bidPriceTotal.setBidPriceName(bidPriceList.get(0).getBidPriceName());
}
bidPriceList.add(0, bidPriceTotal);
// if(StringUtils.isEmpty(bid_price_text.getText()) || bidPriceList.size() < 2) {
// BidPrice bidPriceTotal = new BidPrice();
// bidPriceTotal.setBidPriceCode(BidPrice.BID_PRICE_TOTAL_CODE);
// bidPriceTotal.setBidPriceName(Messages.BidPriceTotal);
// bidPriceList.add(bidPriceTotal);
// }
// }
// }
if(null != bidPriceList && bidPriceList.size() > 0){
BidPriceSelectShell shell = new BidPriceSelectShell(getShell(), bidPriceList);
......@@ -847,7 +879,12 @@ public class PriceFactorsManagerComposite extends Composite {
formula_text.setForeground(SWTResourceManager.getColor(10, 10, 10));
formula_text.setText(formula);
}
if(isStruct()) {
factor_memo_text1.setText(priceParam.getEvalStructMessage());
}
}
/**
* @Description: 刷新指标树
* @author guoyr
......
......@@ -591,7 +591,8 @@ public class SupplierEvaluactionOpinionComposite extends Composite {
}
return;
}
if(supplierEvaluationResultService.saveSupplierEvaluationOpinion(true, tenderProjectEntity.getId(), supplier.getId(), requirementText.getText(), supplierEvalOpinionText.getText(),null !=supplierEvaluationResult.getVetoType()? supplierEvaluationResult.getVetoType(): null )){
String vetoType = null !=supplierEvaluationResult.getVetoType()? supplierEvaluationResult.getVetoType(): null;
if(supplierEvaluationResultService.saveSupplierEvaluationOpinion(true, tenderProjectEntity.getId(), supplier.getId(), requirementText.getText(), supplierEvalOpinionText.getText(), vetoType)){
supplierEvaluationResult.setApplyUserId(null);
MessageDialog.openShortMessage(Messages.Tips_saveSuccess);
}else {
......
......@@ -7,6 +7,7 @@ import org.dom4j.Document;
import org.eclipse.swt.core.CallBack;
import org.eclipse.swt.widgets.Display;
import com.gx.obe.action.bean.Action;
import com.gx.obe.common.file.enumeration.FileConstants;
import com.gx.obe.common.file.utils.ParsingXmlUtils;
import com.gx.obe.thread.CreateEvaluationStepThread;
......@@ -29,6 +30,7 @@ public class EvaluationFactorXmlResolverThread implements Runnable {
private Thread thread;
private TenderProjectEntity tenderProjectEntity;
private CallBack callBack;
private Action projectAction;
private Logger LOG = Logger.getLogger(EvaluationFactorXmlResolverThread.class);
private int sorNo = 1;
......@@ -50,6 +52,12 @@ public class EvaluationFactorXmlResolverThread implements Runnable {
this.callBack = callBack;
}
public EvaluationFactorXmlResolverThread(Action projectAction, CallBack callBack){
this.tenderProjectEntity = projectAction.getTenderProject();
this.callBack = callBack;
this.projectAction = projectAction;
}
/**
* @Description: 开启线程
* @author guoyr
......@@ -88,6 +96,10 @@ public class EvaluationFactorXmlResolverThread implements Runnable {
boolean isImport = false;
// 获得评审指标Document对象
Document factorDoc = getZbOrTbFactorDoc();
// 获得当前结构化项目标签进行判断
// if(projectAction != null) {
// parserStructProject(projectAction);
// }
List<EvaluationFactor> factorList = null;
final StringBuilder msg = new StringBuilder();
try {
......@@ -103,6 +115,7 @@ public class EvaluationFactorXmlResolverThread implements Runnable {
if(evaluationFactorService.saveDownloadEvaluationFactor(tenderProjectEntity.getId(), factorList) > 0){
isImport = true;
LOG.debug(factorList.size() +"个评审指标导入成功!");
LOG.info(factorList.size() +"个评审指标导入成功!");
msg.append(factorList.size()+"个评审指标导入成功!\r\n");
callBack.callBackString(factorList.size() +"个评审指标导入成功!");
......@@ -153,16 +166,47 @@ public class EvaluationFactorXmlResolverThread implements Runnable {
if(null != supplierList && supplierList.size() > 0){
// 遍历投标人信息
for(Supplier supplier : supplierList){
if(null != factorDoc){
break;
}
// 获得投标人投标文件下的指标路径
String supplierFactorXmlPath = FileConstants.getBidFilePath(tenderProjectEntity.getId(), supplier.getId()) + FileConstants.PSZB_XML;
// 获得投标文件的指标Document
factorDoc = XmlUtils.getXmlDocument(supplierFactorXmlPath);
}
}
}
return factorDoc;
}
/**
* @Description 获取结构化项目指标
* @author lyb
* @param projectAction
*/
public void parserStructProject(Action projectAction) {
// 获得招标文件的指标Document
Document factorDoc = XmlUtils.getXmlDocument(FileConstants.getBiddingFilePath(tenderProjectEntity.getId()) + FileConstants.PST_XML);
// 未找到招标文件的指标,则获得投标文件的指标。
if(null == factorDoc){
// 获得投标人集合
List<Supplier> supplierList = supplierService.getSupplierOpenBidList(tenderProjectEntity.getId());
if(null != supplierList && supplierList.size() > 0){
// 遍历投标人信息
for(Supplier supplier : supplierList){
if(null != factorDoc){
break;
}
// 获得投标人投标文件下的指标路径
String supplierFactorXmlPath = FileConstants.getBidFilePath(tenderProjectEntity.getId(), supplier.getId()) + FileConstants.PST_XML;
// 获得投标文件的指标Document
factorDoc = XmlUtils.getXmlDocument(supplierFactorXmlPath);
}
}
}
return factorDoc;
boolean isStruct = factorDoc == null ? false:ParsingXmlUtils.parsingDocStructXML(factorDoc);
tenderProjectEntity.setEvaluationParam(tenderProjectEntity.getId() + "struct", isStruct);
projectAction.setTenderProject(tenderProjectEntity);
}
}
......@@ -614,11 +614,27 @@ public abstract class BaseDateSet implements IDataSet{
}
}
public void initBidPriceResultDataSet(Map<String, Object> supplierMap, List<BidPriceResult> bidPriceResult) {
if(null != bidPriceResult && bidPriceResult.size() > 0) {
for(int i = 0; i < bidPriceResult.size(); i++) {
supplierMap.put("bidPrice" + i, bidPriceResult.get(i).getBidPriceByUnit(tenderProjectRuleEntity.getPriceUnitUseDefault()));
supplierMap.put("bidPriceWithUnit" + i, bidPriceResult.get(i).getBidPriceWithUnit(tenderProjectRuleEntity.getPriceUnitUseDefault()));
supplierMap.put("evaluationPrice" + i, bidPriceResult.get(i).getEvaluatoinPriceByUnit(tenderProjectRuleEntity.getEvalPriceUnit()));
supplierMap.put("evaluationPriceWithUnit" + i, bidPriceResult.get(i).getEvaluatoinPriceWithUnit(tenderProjectRuleEntity.getEvalPriceUnit()));
String modifyReason = (String)supplierMap.get("modifyReason");
if(null == modifyReason || modifyReason.length() == 0){
modifyReason = bidPriceResult.get(i).getModifyReason();
}
supplierMap.put("modifyReason" + i, modifyReason);
}
}
}
public void initBidPriceResultDataSet(Map<String, Object> supplierMap, BidPriceResult bidPriceResult) {
if(null != bidPriceResult) {
if(null != bidPriceResult ) {
supplierMap.put("bidPrice", bidPriceResult.getBidPriceByUnit(tenderProjectRuleEntity.getPriceUnitUseDefault()));
supplierMap.put("bidPriceWithUnit", bidPriceResult.getBidPriceWithUnit(tenderProjectRuleEntity.getPriceUnitUseDefault()));
supplierMap.put("evaluationPrice",bidPriceResult.getEvaluatoinPriceByUnit(tenderProjectRuleEntity.getEvalPriceUnit()));
supplierMap.put("evaluationPrice", bidPriceResult.getEvaluatoinPriceByUnit(tenderProjectRuleEntity.getEvalPriceUnit()));
supplierMap.put("evaluationPriceWithUnit", bidPriceResult.getEvaluatoinPriceWithUnit(tenderProjectRuleEntity.getEvalPriceUnit()));
String modifyReason = (String)supplierMap.get("modifyReason");
if(null == modifyReason || modifyReason.length() == 0){
......@@ -626,6 +642,8 @@ public abstract class BaseDateSet implements IDataSet{
}
supplierMap.put("modifyReason", modifyReason);
}
}
protected boolean isSameFileName(String templateFileName, String stepName){
if(null != templateFileName && templateFileName.contains(stepName.length() > 2 ? stepName.substring(0, 2) : stepName)){
......
......@@ -3,6 +3,7 @@ package com.gx.obe.report.dataset.word;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.Date;
......@@ -12,12 +13,17 @@ import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import org.dom4j.Document;
import com.gx.obe.action.bean.Action;
import com.gx.obe.business.entity.SupplierEvaluationStep;
import com.gx.obe.business.entity.Worker;
import com.gx.obe.business.enumeration.ExpertEnum;
import com.gx.obe.business.enumeration.SupplierEnum;
import com.gx.obe.business.enumeration.UserEnum;
import com.gx.obe.business.vo.EvaluationStepBidType;
import com.gx.obe.common.file.enumeration.FileConstants;
import com.gx.obe.common.file.utils.ParsingXmlUtils;
import com.gx.obe.components.core.Constants;
import com.gx.obe.components.core.enumeration.CommonEnum;
import com.gx.obe.components.core.enumeration.EvaluationFactorEnum;
......@@ -31,6 +37,7 @@ import com.gx.obe.util.utils.ObjectUtils;
import com.gx.obe.util.utils.SortUtils;
import com.gx.obe.util.utils.StringUtils;
import com.gx.obe.util.utils.UuidUtils;
import com.gx.obe.util.utils.XmlUtils;
import com.gx.obe.web.entity.BidOpeningRoom;
import com.gx.obe.web.entity.Supplier;
import com.gx.obe.web.entity.SupplierEvaluationResult;
......@@ -276,7 +283,11 @@ public abstract class BaseDateSet implements IWordDataSet{
if(null != wordTableList && wordTableList.size() > 0){
for(WordTable wordTable : wordTableList){
if(wordTable.isCross()){
if(null != wordTable.getRowList()){
assembleListDataSet(wordTable.getRowList(), wordTable.getParams());
}else if(null != wordTable.getColList()){
assembleListDataSet(wordTable.getRowList(), wordTable.getParams());
}
}else{
if(null != wordTable.getRowList()){
assembleListDataSet(wordTable.getRowList(), wordTable.getParams());
......@@ -806,8 +817,33 @@ public abstract class BaseDateSet implements IWordDataSet{
* @param paramsMap
*/
public List<Map<String, Object>> getPriceScoreSupplierList(Map<String, String> paramsMap){
PriceScoreDateSet priceScoreDate = new PriceScoreDateSet();
boolean isStruct = parserStructProject();
PriceScoreDateSet priceScoreDate = new PriceScoreDateSet(isStruct);
priceScoreDate.init(tenderProject);
List<Map<String, Object>> tableColList;
String[] fields;
if(isStruct) {
fields = new String[] {
"投标人名称 &&supplierName0",
"开标价格 --(含税)&&bidPrice0",
"开标价格 --(不含税)&&bidPrice1",
"修正后投标报价(含税)&&evaluationPrice0",
"修正后投标报价(不含税)&&evaluationPrice1",
"修正原因(含税)&&modifyReason0",
"修正原因(不含税)&&modifyReason1",
"基准价&&basePrice",
"价格得分&&priceFinalScore"
};
}else {
fields = new String[] {
"投标人名称&&supplierName0",
"开标价格 --&&bidPrice0",
"修正后投标报价&&evaluationPrice0",
"修正原因&&modifyReason0",
"基准价&&basePrice",
"价格得分&&priceFinalScore"
};
}
List<Map<String, Object>> evaluationPriceSupplierList = new ArrayList<Map<String, Object>>();
// 价格评审
List<com.report.excel.ReportDataSet> reportDataList = priceScoreDate.getDateSetList(paramsMap, null);
......@@ -848,7 +884,6 @@ public abstract class BaseDateSet implements IWordDataSet{
priceScore=priceStep.getEvaluationFinalScore();
supplierMap.put("SourcePriFinalScore",priceScore);//复议之前的价格得分
}
supplierMap.put("sortNo", sortNo);
supplierMap.put("sortNoCN", NumericChineseUtils.getChinese(sortNo));
supplierMap.put("sort", index ++);
......@@ -856,7 +891,12 @@ public abstract class BaseDateSet implements IWordDataSet{
supplierMap.put("priceFinalScore", BigDecimalUtils.round(ObjectUtils.getObjBigDecimal(supplierMap.get("priceFinalScore")), 2));
evaluationPriceSupplierList.add(supplierMap);
}
String unit = supplierMapList.size() > 0 ? (String)((Map<String, Object>) supplierMapList.get(0).get("supplierOpeningResult")).get("priceUnit") : null;
tableColList = getTableColNameList(fields, unit);
getStructCrossData(tableColList, supplierMapList);
reportDataSet.put("tableColList", tableColList);
reportDataSet.putParam("priceScoreSupplierList", supplierMapList);
//List<Map<String,Object>> supplierOpeningResult = (List<Map<String,Object>>)supplierMapList.get(0).get("supplierOpeningResult");
reportDataSet.putParam("basePrice", _reportDataSet.getParam("basePrice"));
reportDataSet.putParam("minEvaluationPrice",evaluationPriceSupplierList.get(0).get("evaluationPrice"));
break;
......@@ -866,7 +906,32 @@ public abstract class BaseDateSet implements IWordDataSet{
return evaluationPriceSupplierList;
}
private List<Map<String, Object>> getTableColNameList(String[] fields, String unit){
List<Map<String, Object>> factorList = new ArrayList<Map<String, Object>>();
int index = 1;
for(String field : fields){
if(field.contains("--")) {
field = field.replaceAll("--", unit);
}
Map<String, Object> colMap = new HashMap<String, Object>();
String[] f = field.split("&&");
colMap.put("colName", f[0]);
colMap.put("colNameId", "colNameId" + index++);
colMap.put("colValue", f[1]);
factorList.add(colMap);
}
return factorList;
}
private void getStructCrossData(List<Map<String, Object>> tableColList, List<Map<String, Object>> supplierMapList) {
Map<String, Object> crossData = new HashMap<String, Object>();
for(Map<String, Object> factor : tableColList){
for(Map<String, Object> supplier : supplierMapList){
crossData.put(supplier.get("id").toString() + factor.get("colNameId"), supplier.get(factor.get("colValue")));
}
}
reportDataSet.putParam("priceScoreSupplierList"+"tableColList", crossData);
}
/**
* @Description: 获得供应商的评审结果列表
......@@ -1308,6 +1373,28 @@ public abstract class BaseDateSet implements IWordDataSet{
return score;
}
public boolean parserStructProject() {
// 获得招标文件的指标Document
Document factorDoc = XmlUtils.getXmlDocument(FileConstants.getBiddingFilePath(tenderProject.getId()) + FileConstants.PST_XML);
// 未找到招标文件的指标,则获得投标文件的指标。
if(null == factorDoc){
// 获得投标人集合
List<Supplier> supplierList = supplierService.getSupplierOpenBidList(tenderProject.getId());
if(null != supplierList && supplierList.size() > 0){
// 遍历投标人信息
for(Supplier supplier : supplierList){
if(null != factorDoc){
break;
}
// 获得投标人投标文件下的指标路径
String supplierFactorXmlPath = FileConstants.getBidFilePath(tenderProject.getId(), supplier.getId()) + FileConstants.PST_XML;
// 获得投标文件的指标Document
factorDoc = XmlUtils.getXmlDocument(supplierFactorXmlPath);
}
}
}
return factorDoc == null ? false:ParsingXmlUtils.parsingDocStructXML(factorDoc);
}
/**
* @Description:
......
......@@ -6,6 +6,7 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import com.gx.obe.components.core.enumeration.EvaluationStepEnum;
import com.gx.obe.formula.BenchmarkPriceParam;
......@@ -34,6 +35,16 @@ import com.report.excel.ReportDataSet;
*/
public class PriceScoreDateSet extends BaseDateSet{
private boolean isStruct;
public PriceScoreDateSet() {}
public PriceScoreDateSet(boolean isStruct) {
this.isStruct = isStruct;
}
public List<ReportDataSet> getDateSetList(Map<String, String> paramsMap, Map<String, String> enumsMap) {
List<ReportDataSet> reportDataList = new ArrayList<ReportDataSet>();
......@@ -97,31 +108,33 @@ public class PriceScoreDateSet extends BaseDateSet{
}
String reportName = Messages.QuotedPrice;
BidPrice bidPrice = null;
List<BidPriceResult> bidPriceResultList = null;
// BidPrice bidPrice = null;
// List<BidPriceResult> bidPriceResultList = null;
List<BidPriceResult> bidStructPriceResultList = null;
if(hasBidPriceTotal){
if(!priceEvalFactor.getBidPriceCode().equals(BidPrice.BID_PRICE_TOTAL_CODE)){
continue;
}
}else {
if(null != bidPriceList){
for(BidPrice _bidPrice : bidPriceList){
if(priceEvalFactor.getBidPriceCode().equals(_bidPrice.getBidPriceCode())){
bidPrice = _bidPrice;
break;
}
}
}
if(null != bidPrice){
reportName = bidPrice.getBidPriceName();
bidPriceResultList = bidPriceResultService.getBidPriceResultList(tenderProjectEntity.getId(), bidPrice.getId());
// if(null != bidPriceResultList && bidPriceResultList.size() > 0){
// for(BidPriceResult bidPriceResult : bidPriceResultList){
// supplierBidPriceResultMap.put(bidPriceResult.getSupplierId()+"_"+bidPriceResult.getBidPriceId(), bidPriceResult);
// else {
// if(null != bidPriceList){
// for(BidPrice _bidPrice : bidPriceList){
// if(priceEvalFactor.getBidPriceCode().equals(_bidPrice.getBidPriceCode())){
// bidPrice = _bidPrice;
// break;
// }
// }
// }
// if(null != bidPrice){
// reportName = bidPrice.getBidPriceName();
// bidPriceResultList = bidPriceResultService.getBidPriceResultList(tenderProjectEntity.getId(), bidPrice.getId());
//// if(null != bidPriceResultList && bidPriceResultList.size() > 0){
//// for(BidPriceResult bidPriceResult : bidPriceResultList){
//// supplierBidPriceResultMap.put(bidPriceResult.getSupplierId()+"_"+bidPriceResult.getBidPriceId(), bidPriceResult);
//// }
//// }
// }
// }
}
}
// List<Map<String, Object>> priceScoreMapList = new ArrayList<Map<String, Object>>();
// Map<String, Object> priceScoreMap = new HashMap<String, Object>();
// priceScoreMap.put("id", priceEvalFactor.getId());
......@@ -148,10 +161,13 @@ public class PriceScoreDateSet extends BaseDateSet{
List<Double> sortList = new ArrayList<Double>();
for(final Supplier supplier : supplierList){
Map<String, Object> supplierMap = Bean2MapUtils.createMap(supplier);
bidStructPriceResultList = bidPriceResultService.getBidPriceResultTableList(tenderProjectEntity.getId(), supplier.getId());
List<String> result = bidPriceList.stream().map(t -> t.getId()).collect(Collectors.toList());
bidStructPriceResultList = bidStructPriceResultList.stream().filter(p -> result.contains(p.getBidPriceId())).collect(Collectors.toList());
// 投标总报价
supplierMap.put("sortNo", "");
// 投标总报价
if(hasBidPriceTotal || ((null == bidPriceList || bidPriceList.size() == 1) && (null == bidPriceResultList || bidPriceResultList.size() == 0))){
if(hasBidPriceTotal || ((null == bidPriceList || bidPriceList.size() == 1) && (null == bidStructPriceResultList || bidStructPriceResultList.size() == 0))){
// 投标人开标结果
SupplierOpeningResult supplierOpeningResult = supplier.getSupplierOpeningResult();
......@@ -160,13 +176,17 @@ public class PriceScoreDateSet extends BaseDateSet{
}
}else {
BidPriceResult bidPriceResult = CollectionUtils.get(bidPriceResultList, t -> {
return null != t.getSupplierId() && supplier.getId().equals(t.getSupplierId());
});
if (null != bidPriceResult) {
initBidPriceResultDataSet(supplierMap, bidPriceResult);
// BidPriceResult bidPriceResult = CollectionUtils.get(bidPriceResultList, t -> {
// return null != t.getSupplierId() && supplier.getId().equals(t.getSupplierId());
// });
//
// if (null != bidPriceResult) {
//
// }
if(!isStruct) {
bidStructPriceResultList = bidStructPriceResultList.stream().filter(t -> priceEvalFactor.getBidPriceCode().equals(t.getBidPriceCode())).collect(Collectors.toList());
}
initBidPriceResultDataSet(supplierMap, bidStructPriceResultList);
}
supplierMap.put("basePriceFloat", basePriceFloat);
for(EvaluationFactorResult evaluationFactorResult : expertEvaluateFactorResultList){
......
......@@ -323,6 +323,7 @@ public class FileConstants {
public static String BID_PRICE_XML = "BidPrice.xml";
public static String SUPPLIER_SIGN_PDF = "Sign.pdf";
public static String PSZB_XML = "EvaluationFactors.xml";
public static String PST_XML = "DocProps.xml";
public static String PSD_XML = "RespItem.xml";
public static String BID_FILE_INDEX_XML = "BidFileIndex.xml";
public static String PROJECT_DATA_XML = "DataItems.xml";
......
......@@ -475,6 +475,23 @@ public class ParsingXmlUtils {
return factorList;
}
/**
* @Description: 解析基准价格节点信息
* @author lyb
* @param factorDoc
* @return
*/
public static boolean parsingDocStructXML(Document factorDoc) {
// 获取根元素
Element rootElement = factorDoc.getRootElement();
// 查找 isTemplate 元素
Element isTemplateElement = rootElement.element("isTemplate");
if (isTemplateElement != null) {
return Boolean.parseBoolean(isTemplateElement.getText());
}
return false;
}
/**
* @Description: 解析指标节点信息
* @author chenxw
......@@ -813,7 +830,7 @@ public class ParsingXmlUtils {
}
/**
* @Description: 解析价格指标参数
* @Description: 得分计算公式
* @author chenxw
* @param evaluationFactor
* @param element
......@@ -822,6 +839,8 @@ public class ParsingXmlUtils {
private static void resolverPriceFactorParams(EvaluationFactor evaluationFactor, Element element, TenderProjectEntity tenderProjectEntity) {
PriceParam priceParam = new PriceParam();
priceParam.setFormula(element.elementTextTrim("remarks"));
String priceStruct = element.element("basePriceCalcMethod").getText();
priceParam.setEvalStructMessage(priceStruct);
Element priceFormula = element.element("priceFormula");
if (null != priceFormula) {
// 基准价取样范围
......
......@@ -20,7 +20,8 @@ Require-Bundle: org.eclipse.ui,
com.gx.obe.bind;bundle-version="1.0.0",
com.gx.obe.component;bundle-version="1.0.0",
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
Export-Package: com.gx.obe.evaluation.struct.enumeration,
com.gx.obe.struct,
com.gx.obe.struct.beans,
......
......@@ -4,6 +4,7 @@ package org.eclipse.swt.core.listener;
* @Description: 输入验证
* @author guoyr
*/
@FunctionalInterface
public interface VerifyValueListener{
public static String ACCEPT = "";
......
......@@ -22,6 +22,7 @@ import org.eclipse.swt.core.utils.SwtUtils;
import org.eclipse.swt.custom.CLabel;
import org.eclipse.swt.events.MouseAdapter;
import org.eclipse.swt.events.MouseEvent;
import org.eclipse.swt.events.MouseMoveListener;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.graphics.Font;
......@@ -209,6 +210,8 @@ public abstract class EDialog extends Window {
*/
private static final int VERTICAL_DIALOG_UNITS_PER_CHAR = 8;
private static Point initialMouseDownPoint;
private CallBack callBack;
/**
......@@ -544,6 +547,38 @@ public abstract class EDialog extends Window {
}
}
}
/**
* @Description: 文本框可拖拽
* @author liangyb
* @param shell
*/
public static void addDragSupport(final Shell shell) {
shell.addMouseListener(new MouseAdapter() {
@Override
public void mouseDown(MouseEvent e) {
initialMouseDownPoint = new Point(e.x, e.y);
}
});
shell.addMouseMoveListener(new MouseMoveListener() {
@Override
public void mouseMove(MouseEvent e) {
if (initialMouseDownPoint != null) {
Point p = shell.toDisplay(e.x, e.y);
p.x -= initialMouseDownPoint.x;
p.y -= initialMouseDownPoint.y;
shell.setLocation(p);
}
}
});
shell.addMouseListener(new MouseAdapter() {
@Override
public void mouseUp(MouseEvent e) {
initialMouseDownPoint = null;
}
});
}
/**
* Notifies that this dialog's button with the given id has been pressed.
......
......@@ -18,6 +18,7 @@ import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;
import com.swtdesigner.SWTResourceManager;
......@@ -233,10 +234,11 @@ public class ELink extends CLabel {
return text;
}
public void setEnabled(boolean enabled){
if(enabled != this.enabled){
// if(enabled != this.enabled){
// this.enabled = enabled;
// this.redraw();
// }
this.enabled = enabled;
this.redraw();
}
}
public boolean getEnabled(){
......
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