Commit f411c5d6 authored by liangyb's avatar liangyb

#328-4 结构化非结构化适配

parent b522bb82
...@@ -396,7 +396,7 @@ public class ImportTenderProjectThread implements Runnable { ...@@ -396,7 +396,7 @@ public class ImportTenderProjectThread implements Runnable {
try { try {
List<EvaluationFactor> evaluationFactorList = ParsingXmlUtils.analyELementXMl(element, childProject); List<EvaluationFactor> evaluationFactorList = ParsingXmlUtils.analyELementXMl(element, childProject);
if (null != evaluationFactorList && evaluationFactorList.size() > 0) { if (null != evaluationFactorList && evaluationFactorList.size() > 0) {
changeFactorList(evaluationFactorList, tenderProjectEntity); evaluationFactorList = changeFactorList(evaluationFactorList, tenderProjectEntity);
if(evaluationFactorService.saveDownloadEvaluationFactor(tenderProjectEntity.getId(), evaluationFactorList) > 0){ if(evaluationFactorService.saveDownloadEvaluationFactor(tenderProjectEntity.getId(), evaluationFactorList) > 0){
callBackMsg(true, evaluationFactorList.size() +"个评审指标导入成功!"); callBackMsg(true, evaluationFactorList.size() +"个评审指标导入成功!");
} else { } else {
...@@ -415,7 +415,7 @@ public class ImportTenderProjectThread implements Runnable { ...@@ -415,7 +415,7 @@ public class ImportTenderProjectThread implements Runnable {
try { try {
List<EvaluationFactor> evaluationFactorList = ParsingXmlUtils.analyELementXMl((Element)packEvalFactorList.get(0), tenderProjectEntity); List<EvaluationFactor> evaluationFactorList = ParsingXmlUtils.analyELementXMl((Element)packEvalFactorList.get(0), tenderProjectEntity);
if (null != evaluationFactorList && evaluationFactorList.size() > 0) { if (null != evaluationFactorList && evaluationFactorList.size() > 0) {
changeFactorList(evaluationFactorList, tenderProjectEntity); evaluationFactorList = changeFactorList(evaluationFactorList, tenderProjectEntity);
if(evaluationFactorService.saveDownloadEvaluationFactor(tenderProjectEntity.getId(), evaluationFactorList) > 0){ if(evaluationFactorService.saveDownloadEvaluationFactor(tenderProjectEntity.getId(), evaluationFactorList) > 0){
callBackMsg(true, evaluationFactorList.size() +"个评审指标导入成功!"); callBackMsg(true, evaluationFactorList.size() +"个评审指标导入成功!");
} else { } else {
...@@ -436,8 +436,9 @@ public class ImportTenderProjectThread implements Runnable { ...@@ -436,8 +436,9 @@ public class ImportTenderProjectThread implements Runnable {
String TAX = "bidPrice"; String TAX = "bidPrice";
String NO_TAX = "noTaxBidPrice"; String NO_TAX = "noTaxBidPrice";
List<BidPrice> bidPriceList = bidPriceService.getBidPriceFactorList(tenderProjectEntity.getId()); List<BidPrice> bidPriceList = bidPriceService.getBidPriceFactorList(tenderProjectEntity.getId());
if(null != bidPriceList && bidPriceList.size() > 0){
return evalFactorList = evalFactorList.stream().map(t -> { return evalFactorList = evalFactorList.stream().map(t -> {
if(BidPrice.BID_PRICE_TOTAL_CODE.equals(t.getBidPriceCode()) && bidPriceList.size() == 1) { if(BidPrice.BID_PRICE_TOTAL_CODE.equals(t.getBidPriceCode())) {
t.setBidPriceCode(bidPriceList.get(0).getBidPriceCode()); t.setBidPriceCode(bidPriceList.get(0).getBidPriceCode());
}else if(TAX.equals(t.getBidPriceCode()) || NO_TAX.equals(t.getBidPriceCode())){ }else if(TAX.equals(t.getBidPriceCode()) || NO_TAX.equals(t.getBidPriceCode())){
String tax; String tax;
...@@ -449,11 +450,15 @@ public class ImportTenderProjectThread implements Runnable { ...@@ -449,11 +450,15 @@ public class ImportTenderProjectThread implements Runnable {
BidPrice bidPriceResult = CollectionUtils.get(bidPriceList, s -> { BidPrice bidPriceResult = CollectionUtils.get(bidPriceList, s -> {
return tax.equals(s.getBidPriceCode()); return tax.equals(s.getBidPriceCode());
}); });
if(bidPriceResult != null){
t.setBidPriceCode(bidPriceResult.getBidPriceCode()); t.setBidPriceCode(bidPriceResult.getBidPriceCode());
} }
}
return t; return t;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
} }
return evalFactorList;
}
private void callBackMsg(String msg){ private void callBackMsg(String msg){
if(null != callBack){ if(null != callBack){
callBack.callBackString(" "+ msg); callBack.callBackString(" "+ msg);
......
...@@ -133,8 +133,9 @@ public class NewDownloadEvaluationFactorThread extends MyThread{ ...@@ -133,8 +133,9 @@ public class NewDownloadEvaluationFactorThread extends MyThread{
String TAX = "bidPrice"; String TAX = "bidPrice";
String NO_TAX = "noTaxBidPrice"; String NO_TAX = "noTaxBidPrice";
List<BidPrice> bidPriceList = bidPriceService.getBidPriceFactorList(tenderProjectEntity.getId()); List<BidPrice> bidPriceList = bidPriceService.getBidPriceFactorList(tenderProjectEntity.getId());
if(null != bidPriceList && bidPriceList.size() > 0){
evalFactorList = evalFactorList.stream().map(t -> { evalFactorList = evalFactorList.stream().map(t -> {
if(BidPrice.BID_PRICE_TOTAL_CODE.equals(t.getBidPriceCode()) && bidPriceList.size() == 1) { if(BidPrice.BID_PRICE_TOTAL_CODE.equals(t.getBidPriceCode())) {
t.setBidPriceCode(bidPriceList.get(0).getBidPriceCode()); t.setBidPriceCode(bidPriceList.get(0).getBidPriceCode());
}else if(TAX.equals(t.getBidPriceCode()) || NO_TAX.equals(t.getBidPriceCode())){ }else if(TAX.equals(t.getBidPriceCode()) || NO_TAX.equals(t.getBidPriceCode())){
String tax; String tax;
...@@ -146,10 +147,13 @@ public class NewDownloadEvaluationFactorThread extends MyThread{ ...@@ -146,10 +147,13 @@ public class NewDownloadEvaluationFactorThread extends MyThread{
BidPrice bidPriceResult = CollectionUtils.get(bidPriceList, s -> { BidPrice bidPriceResult = CollectionUtils.get(bidPriceList, s -> {
return tax.equals(s.getBidPriceCode()); return tax.equals(s.getBidPriceCode());
}); });
if(bidPriceResult != null){
t.setBidPriceCode(bidPriceResult.getBidPriceCode()); t.setBidPriceCode(bidPriceResult.getBidPriceCode());
} }
}
return t; return t;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
}
// 批量保存 // 批量保存
if(evaluationFactorService.saveDownloadEvaluationFactor(tenderProjectEntity.getId(), evalFactorList) > 0){ if(evaluationFactorService.saveDownloadEvaluationFactor(tenderProjectEntity.getId(), evalFactorList) > 0){
callBackMsg(true, "[" + tenderProjectEntity.getTenderName() +"] " + evalFactorList.size() +"个评审指标下载成功!"); callBackMsg(true, "[" + tenderProjectEntity.getTenderName() +"] " + evalFactorList.size() +"个评审指标下载成功!");
......
...@@ -4,7 +4,6 @@ import java.math.BigDecimal; ...@@ -4,7 +4,6 @@ import java.math.BigDecimal;
import java.text.MessageFormat; import java.text.MessageFormat;
import java.text.NumberFormat; import java.text.NumberFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -61,7 +60,6 @@ import com.gx.obe.message.Messages; ...@@ -61,7 +60,6 @@ import com.gx.obe.message.Messages;
import com.gx.obe.util.utils.BigDecimalUtils; import com.gx.obe.util.utils.BigDecimalUtils;
import com.gx.obe.util.utils.LogUtils; import com.gx.obe.util.utils.LogUtils;
import com.gx.obe.util.utils.ObjectUtils; 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.util.utils.StringUtils;
import com.gx.obe.web.entity.auth.Menu; import com.gx.obe.web.entity.auth.Menu;
import com.gx.obe.web.entity.evaluation.EvaluationFactor; import com.gx.obe.web.entity.evaluation.EvaluationFactor;
...@@ -1060,6 +1058,15 @@ public class PriceFactorsManagerComposite extends Composite { ...@@ -1060,6 +1058,15 @@ public class PriceFactorsManagerComposite extends Composite {
} }
bidPriceResultService.updateBidPriceAndFinalPrice(supplierMap); bidPriceResultService.updateBidPriceAndFinalPrice(supplierMap);
} }
//结构化投标报价保险写入
if(StringUtils.isEmpty(bid_price_text.getText())) {
List<BidPrice> bidPriceList = bidPriceService.getBidPriceFactorList(tenderProject.getId());
if(bidPriceList != null && bidPriceList.size() == 1) {
bid_price_text.setText(bidPriceList.get(0).getBidPriceName());
curFactor.setBidPriceCode(bidPriceList.get(0).getBidPriceCode());
evaluationFactorService.updateAssignProperty(curFactor, new String[]{"id","bidPriceCode"});
}
}
//del_bid_price.setVisible(true); //del_bid_price.setVisible(true);
}else { }else {
curFactor.setBidPriceCode(null); curFactor.setBidPriceCode(null);
......
...@@ -118,8 +118,9 @@ public class EvaluationFactorXmlResolverThread implements Runnable { ...@@ -118,8 +118,9 @@ public class EvaluationFactorXmlResolverThread implements Runnable {
if(factorList.size() > 0){ if(factorList.size() > 0){
BidPriceService bidPriceService = new BidPriceService(); BidPriceService bidPriceService = new BidPriceService();
List<BidPrice> bidPriceList = bidPriceService.getBidPriceFactorList(tenderProjectEntity.getId()); List<BidPrice> bidPriceList = bidPriceService.getBidPriceFactorList(tenderProjectEntity.getId());
if(null != bidPriceList && bidPriceList.size() > 0){
factorList = factorList.stream().map(t -> { factorList = factorList.stream().map(t -> {
if(BidPrice.BID_PRICE_TOTAL_CODE.equals(t.getBidPriceCode()) && bidPriceList.size() == 1) { if(BidPrice.BID_PRICE_TOTAL_CODE.equals(t.getBidPriceCode())) {
t.setBidPriceCode(bidPriceList.get(0).getBidPriceCode()); t.setBidPriceCode(bidPriceList.get(0).getBidPriceCode());
}else if(TAX.equals(t.getBidPriceCode()) || NO_TAX.equals(t.getBidPriceCode())){ }else if(TAX.equals(t.getBidPriceCode()) || NO_TAX.equals(t.getBidPriceCode())){
String tax; String tax;
...@@ -131,10 +132,13 @@ public class EvaluationFactorXmlResolverThread implements Runnable { ...@@ -131,10 +132,13 @@ public class EvaluationFactorXmlResolverThread implements Runnable {
BidPrice bidPriceResult = CollectionUtils.get(bidPriceList, s -> { BidPrice bidPriceResult = CollectionUtils.get(bidPriceList, s -> {
return tax.equals(s.getBidPriceCode()); return tax.equals(s.getBidPriceCode());
}); });
if(bidPriceResult != null){
t.setBidPriceCode(bidPriceResult.getBidPriceCode()); t.setBidPriceCode(bidPriceResult.getBidPriceCode());
} }
}
return t; return t;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
}
// 批量保存 // 批量保存
if(evaluationFactorService.saveDownloadEvaluationFactor(tenderProjectEntity.getId(), factorList) > 0){ if(evaluationFactorService.saveDownloadEvaluationFactor(tenderProjectEntity.getId(), factorList) > 0){
isImport = true; isImport = true;
......
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