Commit 894626f2 authored by liangyb's avatar liangyb

#328 报表以及评标工具界面含税不含税数据错乱修改

parent 71a5bf38
......@@ -9,6 +9,7 @@ import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import org.dom4j.Document;
import org.eclipse.swt.SWT;
import org.eclipse.swt.core.ImageResolver;
import org.eclipse.swt.core.MessageDialog;
......@@ -27,6 +28,8 @@ import org.eclipse.swt.widgets.Label;
import com.gx.obe.ColorConstants;
import com.gx.obe.business.vo.PriceEvaluationFactor;
import com.gx.obe.common.file.enumeration.FileConstants;
import com.gx.obe.common.file.utils.ParsingXmlUtils;
import com.gx.obe.common.icons.IconsActivator;
import com.gx.obe.components.core.I18NEnum;
import com.gx.obe.components.core.enumeration.BidPriceEnum;
......@@ -36,12 +39,14 @@ import com.gx.obe.evaluation.step.calculator.PriceScoreCalculator;
import com.gx.obe.evaluation.step.entity.CalculationResult;
import com.gx.obe.evaluation.step.inter.IPriceEvaluationTable;
import com.gx.obe.evaluation.step.listener.PriceReviewEvaluationListener;
import com.gx.obe.formula.PriceParam;
import com.gx.obe.message.Messages;
import com.gx.obe.util.utils.BigDecimalUtils;
import com.gx.obe.util.utils.NumberFormatUtils;
import com.gx.obe.util.utils.ObjectUtils;
import com.gx.obe.util.utils.SortUtils;
import com.gx.obe.util.utils.UuidUtils;
import com.gx.obe.util.utils.XmlUtils;
import com.gx.obe.web.entity.EvaluationFactorResult;
import com.gx.obe.web.entity.Supplier;
import com.gx.obe.web.entity.SupplierOpeningResult;
......@@ -55,6 +60,7 @@ import com.gx.obe.web.entity.tender.TenderProjectEntity;
import com.gx.obe.web.entity.tender.TenderProjectRuleEntity;
import com.gx.obe.web.service.BidPriceResultService;
import com.gx.obe.web.service.BidPriceService;
import com.gx.obe.web.service.SupplierService;
import com.gx.obe.web.service.evaluation.EvaluationFactorResultService;
import com.gx.obe.web.service.evaluation.EvaluationFactorService;
import com.gx.obe.web.service.expert.ExpertEvaluationResultService;
......@@ -89,6 +95,7 @@ public class PriceEvaluationTableComposite extends Composite implements IPriceEv
private Expert CURRENT_EXPERT;
private ImageResolver imageResolver = new ImageResolver();
private EvaluationFactorService evaluationFactorService = new EvaluationFactorService();
private SupplierService supplierService = new SupplierService();
private ExpertEvaluationStepService expertEvaluationStepService ;
private EvaluationFactorResultService evaluationFactorResultService = new EvaluationFactorResultService();
private ExpertEvaluationResultService expertEvaluationResultService;
......@@ -327,6 +334,8 @@ public class PriceEvaluationTableComposite extends Composite implements IPriceEv
evaluation_factor_memo.setText("");
if(null != evaluationFactor){
PriceParam priceParam = PriceParam.deserializePriceParam(evaluationFactor.getComputerParams());
String evalStructMessage = priceParam.getEvalStructMessage();
StringBuilder evaluationFactorMemo = new StringBuilder();
evaluationFactorMemo.append(Messages.ScoreRange + ":[").append(null != evaluationFactor.getFactorMinScore() ? NumberFormat.getInstance().format(evaluationFactor.getFactorMinScore()) : " ").append("-").append(null != evaluationFactor.getFactorMaxScore() ? NumberFormat.getInstance().format(evaluationFactor.getFactorMaxScore()) : "").append(Messages.Points + "]");
if(null != evaluationFactor.getFactorWeight()){
......@@ -356,12 +365,30 @@ public class PriceEvaluationTableComposite extends Composite implements IPriceEv
evaluationFactorMemo.append("\r\n");
startIndex = evaluationFactorMemo.length();
factorMemoTitleStyleRange = getTitleStyleRange(startIndex, Messages.EvalExplain.length() + 1);
evaluationFactorMemo.append(Messages.EvalExplain + ":").append(evaluationFactor.getMemo());
styleFactorMemoRange = new StyleRange();
styleFactorMemoRange.start = startIndex + Messages.EvalExplain.length() + 1;
styleFactorMemoRange.length = evaluationFactor.getMemo().length();
styleFactorMemoRange.foreground = SWTResourceManager.getColor(100, 100, 100);
styleFactorMemoRange.fontStyle = SWT.NORMAL;
if(parserStructProject()) {
evaluationFactorMemo.append(Messages.EvalExplainPrice).append(":").append(evalStructMessage).append("\r\n");
styleFactorMemoRange = new StyleRange();
styleFactorMemoRange.start = startIndex + Messages.EvalExplainPrice.length() + 1;
styleFactorMemoRange.length = evalStructMessage.length();
styleFactorMemoRange.foreground = SWTResourceManager.getColor(100, 100, 100);
styleFactorMemoRange.fontStyle = SWT.NORMAL;
startIndex = evaluationFactorMemo.length();
evaluationFactorMemo.append(Messages.BidExplainPrice).append(":").append(evaluationFactor.getMemo());
StyleRange styleFactorMemoRange1 = new StyleRange();
styleFactorMemoRange1.start = startIndex + Messages.BidExplainPrice.length() + 1;
styleFactorMemoRange1.length = evaluationFactor.getMemo().length();
styleFactorMemoRange1.foreground = SWTResourceManager.getColor(100, 100, 100);
styleFactorMemoRange1.fontStyle = SWT.NORMAL;
}else {
evaluationFactorMemo.append(Messages.EvalExplain + ":").append(evaluationFactor.getMemo());
styleFactorMemoRange = new StyleRange();
styleFactorMemoRange.start = startIndex + Messages.EvalExplain.length() + 1;
styleFactorMemoRange.length = evaluationFactor.getMemo().length();
styleFactorMemoRange.foreground = SWTResourceManager.getColor(100, 100, 100);
styleFactorMemoRange.fontStyle = SWT.NORMAL;
}
}
evaluation_factor_memo.setText(evaluationFactorMemo.toString());
evaluation_factor_memo.setStyleRange(getTitleStyleRange(0, Messages.EvalExplain.length() + 1));
......@@ -370,7 +397,7 @@ public class PriceEvaluationTableComposite extends Composite implements IPriceEv
evaluation_factor_memo.setStyleRange(styleFactorNameRange);
GridData gridData = (GridData)evaluation_factor_memo.getLayoutData();
if(evaluation_factor_memo.computeSize(SWT.DEFAULT, SWT.DEFAULT).y > 58){
gridData.heightHint = 58;
gridData.heightHint = 105;
}
if(null != factorMemoTitleStyleRange){
......@@ -1186,8 +1213,30 @@ public class PriceEvaluationTableComposite extends Composite implements IPriceEv
super.dispose();
}
@Override
protected void checkSubclass() {
// Disable the check that prevents subclassing of SWT components
}
public boolean parserStructProject() {
// 获得招标文件的指标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 == null ? false:ParsingXmlUtils.parsingDocStructXML(factorDoc);
}
}
......@@ -793,7 +793,7 @@ public class JingNengEvaluationReportDataSet extends BaseDateSet {
if (!StringUtils.isEmpty(formula)) {
boolean isStruct = parserStructProject();
if (!StringUtils.isEmpty(evalStructMessage) && isStruct) {
formula = formula + "\n\n" + Messages.EvalExplainPrice + ":" + evalStructMessage + "\n\n" + Messages.BidExplainPrice + ":"+ evaluationFactor.getMemo();
formula = Messages.EvalExplainPrice + ":" + evalStructMessage + "\n\n" + Messages.BidExplainPrice + ":"+ evaluationFactor.getMemo();
}
if(!StringUtils.isEmpty(evaluationFactor.getMemo()) && !isStruct) {
formula = formula + "\n\n" + Messages.EvalExplain + ":" + evaluationFactor.getMemo();
......
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