Commit 7e976938 authored by 梁砚博's avatar 梁砚博

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

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

See merge request !4
parents da614865 71a5bf38
......@@ -482,6 +482,17 @@ public class BidPriceResultService {
}
}
public boolean updateBidPriceAndFinalPrice(Map<String, Object> param) {
String strWebServerUrl = Constants.getServiceUrl(URL + "/updateBidPriceAndFinalPrice");
try {
String result = NetworkRequest.post(strWebServerUrl, JsonUtil.jsonObjectToStr(param));
return ResultStatus.getReultStatusBoolean(result);
} catch (Exception e) {
logger.error(e.getMessage(), e);
return false;
}
}
/**
* @Description: 灏嗘湭瀹屾垚鎶ヤ环鐨勪緵搴斿晢鎶ヤ环鑷姩濉厖涓婁竴杞姤浠�
* @author mazc
......
......@@ -67,8 +67,10 @@ import com.gx.obe.web.entity.auth.Menu;
import com.gx.obe.web.entity.evaluation.EvaluationFactor;
import com.gx.obe.web.entity.evaluation.EvaluationStep;
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.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.ProjectRuleService;
import com.gx.obe.web.service.TenderProjectService;
......@@ -719,29 +721,38 @@ public class PriceFactorsManagerComposite extends Composite {
// }
// }
if(null != bidPriceList && bidPriceList.size() > 0){
BidPriceSelectShell shell = new BidPriceSelectShell(getShell(), bidPriceList);
shell.addBidPriceSelectionListener(new BidPriceSelection(){
public void select(String bidPriceCode, String bidPriceName) {
curFactor.setBidPriceCode(bidPriceCode);
bid_price_text.setText(bidPriceName);
del_bid_price.setVisible(true);
bid_price_text.getParent().layout();
if(null != curFactor.getId()){
evaluationFactorService.updateAssignProperty(curFactor, new String[]{"id","bidPriceCode"});
MessageDialog.openShortMessage(Messages.Tips_operateSuccess);
ActionLogUtils.addServerLog(tenderProject.getId(),"价格指标关联报价", curFactor.getId() + curFactor.getFactorName(), "bidPriceCode:"+bidPriceCode + "\tbidPriceName:"+bidPriceName);
if(null != bidPriceList && bidPriceList.size() > 0){
BidPriceSelectShell shell = new BidPriceSelectShell(getShell(), bidPriceList);
shell.addBidPriceSelectionListener(new BidPriceSelection(){
public void select(String bidPriceCode, String bidPriceName, String id) {
curFactor.setBidPriceCode(bidPriceCode);
bid_price_text.setText(bidPriceName);
del_bid_price.setVisible(true);
bid_price_text.getParent().layout();
if(null != curFactor.getId()){
evaluationFactorService.updateAssignProperty(curFactor, new String[]{"id","bidPriceCode"});
BidPriceResultService bidPriceResultService = new BidPriceResultService();
List<BidPriceResult> bidPriceResultList = bidPriceResultService.getBidPriceResultList(tenderProject.getId(), id);
Map<String, Object> supplierMap = new HashMap<>();
if(bidPriceResultList.size() > 0) {
for(BidPriceResult bidPriceResult : bidPriceResultList) {
supplierMap.put(bidPriceResult.getSupplierId(), bidPriceResult);
}
bidPriceResultService.updateBidPriceAndFinalPrice(supplierMap);
}
MessageDialog.openShortMessage(Messages.Tips_operateSuccess);
ActionLogUtils.addServerLog(tenderProject.getId(),"价格指标关联报价", curFactor.getId() + curFactor.getFactorName(), "bidPriceCode:"+bidPriceCode + "\tbidPriceName:"+bidPriceName);
}
}
}
});
shell.setLocation(config_bid_price.toDisplay(0,config_bid_price.getBounds().height));
shell.open();
}else {
MessageDialog.openShortMessage(Messages.Tips_noConfigBidPrice);
});
shell.setLocation(config_bid_price.toDisplay(0,config_bid_price.getBounds().height));
shell.open();
}else {
MessageDialog.openShortMessage(Messages.Tips_noConfigBidPrice);
}
}
}
}
/**
* @Description: 删除投标报价
* @author guoyr
......
......@@ -159,7 +159,7 @@ public class BidPriceSelectShell extends Shell {
public void mouseUp(MouseEvent e) {
getShell().close();
if(null != bidPriceSelection){
bidPriceSelection.select(bidPrice.getBidPriceCode(), bidPrice.getBidPriceName());
bidPriceSelection.select(bidPrice.getBidPriceCode(), bidPrice.getBidPriceName(), bidPrice.getId());
}
}
});
......@@ -182,7 +182,7 @@ public class BidPriceSelectShell extends Shell {
}
public interface BidPriceSelection{
public void select(String bidPriceCode, String bidPriceName);
public void select(String bidPriceCode, String bidPriceName, String id);
}
public void close() {
super.close();
......
......@@ -162,8 +162,10 @@ public class PriceScoreDateSet extends BaseDateSet{
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());
if(bidPriceList != null && bidPriceList.size() > 0) {
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", "");
// 投标总报价
......
......@@ -845,7 +845,7 @@ 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();
String priceStruct = element.element("basePriceCalcMethod") != null ? element.element("basePriceCalcMethod").getText() : "";
priceParam.setEvalStructMessage(priceStruct);
Element priceFormula = element.element("priceFormula");
if (null != priceFormula) {
......
......@@ -3,6 +3,7 @@ package com.gx.obe.common.widget.dialog;
import java.math.BigDecimal;
import java.text.MessageFormat;
import java.util.List;
import java.util.stream.Collectors;
import org.eclipse.nebula.widgets.grid.Grid;
import org.eclipse.nebula.widgets.grid.GridColumn;
......@@ -47,9 +48,11 @@ import com.gx.obe.util.utils.CollectionUtils;
import com.gx.obe.util.utils.NumberFormatUtils;
import com.gx.obe.util.utils.ObjectUtils;
import com.gx.obe.web.entity.Supplier;
import com.gx.obe.web.entity.price.BidPrice;
import com.gx.obe.web.entity.price.BidPriceResult;
import com.gx.obe.web.entity.tender.TenderProjectRuleEntity;
import com.gx.obe.web.service.BidPriceResultService;
import com.gx.obe.web.service.BidPriceService;
import com.swtdesigner.SWTResourceManager;
/**
......@@ -742,7 +745,25 @@ public class EditSubBidPriceItemDialog extends EDialog {
private boolean success;
public void threadRun() {
success = bidPriceResultService.updateBidPriceResultOrSum(curBidPriceResult);
BidPriceService bidPriceService = new BidPriceService();
List<BidPriceResult> bidStructPriceResultList = null;
List<BidPrice> bidPriceList = bidPriceService.getBidPriceFactorList(projectRule.getTenderId());
//如果当前bidPrice是结构化的必然剩下一个含税或者不含税的,如果是非结构化的当前bidPrice为空,执行原有逻辑
if(bidPriceList != null && bidPriceList.size() > 0) {
bidStructPriceResultList = bidPriceResultService.getBidPriceResultTableList(projectRule.getTenderId(), supplier.getId());
BidPriceResult bidPriceResult = CollectionUtils.get(bidStructPriceResultList, t -> bidPriceList.get(0).getBidPriceCode().equals(t.getBidPriceCode()));
if(bidPriceResult.getBidPriceCode().equals(curBidPriceResult.getBidPriceCode())) {
bidPriceResult.setFinalBidPrice(curBidPriceResult.getFinalBidPrice());
bidPriceResult.setEvaluationPrice(curBidPriceResult.getEvaluationPrice());
success = bidPriceResultService.updateAssignProperty(bidPriceResult, new String[] {"bidPrice", "evaluationPrice", "finalBidPrice"});
}else {
success = bidPriceResultService.updateBidPriceResultOrSum(curBidPriceResult);
}
}else {
success = bidPriceResultService.updateBidPriceResultOrSum(curBidPriceResult);
}
}
public void asyncExec() {
......
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