diff --git a/OBE-CONFIG/config_final.properties b/OBE-CONFIG/config_final.properties index e615f07293a874b9f08811e0861e579201f91cd5..84184b66c4f49a7d260124d121cbee4f1ed48a8d 100644 --- a/OBE-CONFIG/config_final.properties +++ b/OBE-CONFIG/config_final.properties @@ -1,5 +1,5 @@ #\u7cfb\u7edf\u7248\u672c -version=OBEV7.7.9. +version=OBEV7.7.9.20240611 keyCharacter= #\u6b63\u5f0f\u7248\u672c\u68c0\u67e5\u5347\u7ea7\u7f16\u7801 versionUpdateType=OBE_FinalService diff --git a/OBE-REPORT/src/com/gx/obe/report/dataset/word/BaseDateSet.java b/OBE-REPORT/src/com/gx/obe/report/dataset/word/BaseDateSet.java index 982a0d1bf32ddf9eff7ba7cfd08979abc8fbc204..8d179bb0be86061045f49ef581d3534d7f9e5119 100644 --- a/OBE-REPORT/src/com/gx/obe/report/dataset/word/BaseDateSet.java +++ b/OBE-REPORT/src/com/gx/obe/report/dataset/word/BaseDateSet.java @@ -285,8 +285,6 @@ public abstract class BaseDateSet implements IWordDataSet{ 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()){ @@ -824,7 +822,6 @@ public abstract class BaseDateSet implements IWordDataSet{ String[] fields; if(isStruct) { fields = new String[] { - "æŠ•æ ‡äººåç§° &&supplierName0", "å¼€æ ‡ä»·æ ¼ --(å«ç¨Žï¼‰&&bidPrice0", "å¼€æ ‡ä»·æ ¼ --(ä¸å«ç¨Žï¼‰&&bidPrice1", "ä¿®æ£åŽæŠ•æ ‡æŠ¥ä»·ï¼ˆå«ç¨Žï¼‰&&evaluationPrice0", @@ -836,7 +833,6 @@ public abstract class BaseDateSet implements IWordDataSet{ }; }else { fields = new String[] { - "æŠ•æ ‡äººåç§°&&supplierName0", "å¼€æ ‡ä»·æ ¼ --&&bidPrice0", "ä¿®æ£åŽæŠ•æ ‡æŠ¥ä»·&&evaluationPrice0", "ä¿®æ£åŽŸå› &&modifyReason0", @@ -891,7 +887,7 @@ 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; + String unit = supplierMapList.size() > 0 && supplierMapList.get(0).get("supplierOpeningResult") != null ? (String)((Map<String, Object>) supplierMapList.get(0).get("supplierOpeningResult")).get("priceUnit") : null; tableColList = getTableColNameList(fields, unit); getStructCrossData(tableColList, supplierMapList); reportDataSet.put("tableColList", tableColList); @@ -910,7 +906,7 @@ public abstract class BaseDateSet implements IWordDataSet{ List<Map<String, Object>> factorList = new ArrayList<Map<String, Object>>(); int index = 1; for(String field : fields){ - if(field.contains("--")) { + if(field.contains("--") && unit != null) { field = field.replaceAll("--", unit); } Map<String, Object> colMap = new HashMap<String, Object>(); diff --git a/OBE-REPORT/src/com/gx/obe/report/dataset/word/JingNengEvaluationReportDataSet.java b/OBE-REPORT/src/com/gx/obe/report/dataset/word/JingNengEvaluationReportDataSet.java index eaf17f572c96a9cec3a1b633c126291f04534f4b..0378ad9e642721ced7ee60fcc23d35a5412db109 100644 --- a/OBE-REPORT/src/com/gx/obe/report/dataset/word/JingNengEvaluationReportDataSet.java +++ b/OBE-REPORT/src/com/gx/obe/report/dataset/word/JingNengEvaluationReportDataSet.java @@ -11,6 +11,9 @@ import java.util.Random; import java.util.UUID; import java.util.stream.Collectors; +import org.dom4j.Document; +import com.gx.obe.common.file.enumeration.FileConstants; +import com.gx.obe.common.file.utils.ParsingXmlUtils; import com.gx.obe.business.entity.SupplierEvaluationStep; import com.gx.obe.business.entity.Worker; import com.gx.obe.business.enumeration.ExpertEnum; @@ -20,6 +23,7 @@ import com.gx.obe.components.core.enumeration.EvaluationStepEnum; import com.gx.obe.components.core.enumeration.TenderProjectEnum; import com.gx.obe.components.core.util.MoneyUtils; import com.gx.obe.formula.PriceParam; +import com.gx.obe.message.Messages; import com.gx.obe.report.utils.Bean2MapUtils; import com.gx.obe.util.utils.BigDecimalUtils; import com.gx.obe.util.utils.ListSortUtils; @@ -37,6 +41,7 @@ import com.gx.obe.web.entity.price.BidPrice; import com.gx.obe.web.entity.price.BidPriceResult; import com.gx.obe.web.entity.tender.TenderProjectEntity; import com.report.word.WordTemplate; +import com.gx.obe.util.utils.XmlUtils; public class JingNengEvaluationReportDataSet extends BaseDateSet { @@ -774,15 +779,25 @@ public class JingNengEvaluationReportDataSet extends BaseDateSet { private void getFactorMessage() { EvaluationFactor evaluationFactor =evaluationFactorService.getPriceEvaluationFactor(tenderProject.getId()); String formula = null; + String evalStructMessage = null; PriceParam priceParam =null; if(evaluationFactor != null) { priceParam = PriceParam.deserializePriceParam(evaluationFactor.getComputerParams()); + } if (priceParam != null) { String separator=System.getProperty("line.separator"); formula = priceParam.getFormula(); + evalStructMessage = priceParam.getEvalStructMessage(); } 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(); + } + if(!StringUtils.isEmpty(evaluationFactor.getMemo()) && !isStruct) { + formula = formula + "\n\n" + Messages.EvalExplain + ":" + evaluationFactor.getMemo(); + } reportDataSet.putParam("formula", formula); } //获å–商务技术打分æƒé‡ @@ -804,5 +819,28 @@ public class JingNengEvaluationReportDataSet extends BaseDateSet { reportDataSet.putParam("priWeight", step.getScore()); } } -} + } + + 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); + } } diff --git a/com.gx.obe.common.file/src/com/gx/obe/common/file/utils/ParsingXmlUtils.java b/com.gx.obe.common.file/src/com/gx/obe/common/file/utils/ParsingXmlUtils.java index f8eedfe74f221e2d3cef0907265c9b6c71bb8fe2..114714feaea2eca10b36800139750d5a54c25d81 100644 --- a/com.gx.obe.common.file/src/com/gx/obe/common/file/utils/ParsingXmlUtils.java +++ b/com.gx.obe.common.file/src/com/gx/obe/common/file/utils/ParsingXmlUtils.java @@ -486,9 +486,9 @@ public class ParsingXmlUtils { Element rootElement = factorDoc.getRootElement(); // 查找 isTemplate å…ƒç´ - Element isTemplateElement = rootElement.element("isTemplate"); + Element isTemplateElement = rootElement.element("isNewVersionFile"); if (isTemplateElement != null) { - return Boolean.parseBoolean(isTemplateElement.getText()); + return isTemplateElement.getText().equals("01"); } return false; }