|
@@ -3,6 +3,7 @@ package com.hh.bidding.controller;
|
|
|
import java.io.IOException;
|
|
|
import java.io.OutputStream;
|
|
|
import java.io.UnsupportedEncodingException;
|
|
|
+import java.math.BigDecimal;
|
|
|
import java.net.HttpURLConnection;
|
|
|
import java.net.URL;
|
|
|
import java.security.NoSuchAlgorithmException;
|
|
@@ -14,6 +15,7 @@ import com.alibaba.nacos.common.utils.MD5Utils;
|
|
|
import com.hh.bidding.domain.*;
|
|
|
import com.hh.bidding.domain.BidTender;
|
|
|
import com.hh.bidding.service.*;
|
|
|
+import com.ruoyi.common.core.constant.PriceConstants;
|
|
|
import com.ruoyi.common.core.constant.SecurityConstants;
|
|
|
import com.ruoyi.common.core.domain.R;
|
|
|
import com.ruoyi.common.core.utils.DateUtils;
|
|
@@ -23,6 +25,7 @@ import com.ruoyi.common.security.service.TokenService;
|
|
|
import com.ruoyi.common.security.utils.SecurityUtils;
|
|
|
import com.ruoyi.system.api.RemoteBidTenderService;
|
|
|
import com.ruoyi.system.api.RemoteMaterialService;
|
|
|
+import com.ruoyi.system.api.RemotePlanService;
|
|
|
import com.ruoyi.system.api.RemoteUserService;
|
|
|
import com.ruoyi.system.api.domain.*;
|
|
|
import com.ruoyi.system.api.util.DeptUtil;
|
|
@@ -78,6 +81,9 @@ public class BidTenderController extends BaseController {
|
|
|
@Autowired
|
|
|
private RemoteMaterialService remoteMaterialService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private RemotePlanService remotePlanService;
|
|
|
+
|
|
|
@Autowired
|
|
|
private TokenService tokenService;
|
|
|
|
|
@@ -625,9 +631,13 @@ public class BidTenderController extends BaseController {
|
|
|
|
|
|
// 查询可终止项目
|
|
|
@GetMapping("/selectTenderByState")
|
|
|
- public TableDataInfo selectTenderByState(@RequestParam("sState") Long sState) {
|
|
|
+ public TableDataInfo selectTenderByState(BidTender bidTender) {
|
|
|
System.out.println(SecurityUtils.getUserId());
|
|
|
|
|
|
+ Long sState = bidTender.getsState();
|
|
|
+ String sName = bidTender.getsName();
|
|
|
+ String sCode = bidTender.getsCode();
|
|
|
+
|
|
|
startPage();
|
|
|
Long userId = SecurityUtils.getLoginUser().getSysUser().getUserId();
|
|
|
List<Long> childrenCompany = remoteUserService.getDeptIds(userId, 10, "CHILDREN_COMPANY", SecurityConstants.INNER);
|
|
@@ -639,6 +649,8 @@ public class BidTenderController extends BaseController {
|
|
|
join = "("+join+")";
|
|
|
Map<String,Object> map = new HashMap<>();
|
|
|
map.put("sState",sState);
|
|
|
+ map.put("sName",sName);
|
|
|
+ map.put("sCode",sCode);
|
|
|
map.put("join",join);
|
|
|
List<BidTender> bidTenderList = bidTenderService.selectTenderByState(map);
|
|
|
for(BidTender item : bidTenderList){
|
|
@@ -684,10 +696,14 @@ public class BidTenderController extends BaseController {
|
|
|
}
|
|
|
|
|
|
// 查询中标后可变更项目
|
|
|
- @GetMapping("selectTenderByChange")
|
|
|
- public TableDataInfo selectTenderByChange(){
|
|
|
+ @GetMapping("/selectTenderByChange")
|
|
|
+ public TableDataInfo selectTenderByChange(BidTender bidTender){
|
|
|
System.out.println(SecurityUtils.getUserId());
|
|
|
|
|
|
+ Long cState = bidTender.getcState();
|
|
|
+ String sName = bidTender.getsName();
|
|
|
+ String sCode = bidTender.getsCode();
|
|
|
+
|
|
|
startPage();
|
|
|
Long userId = SecurityUtils.getLoginUser().getSysUser().getUserId();
|
|
|
List<Long> childrenCompany = remoteUserService.getDeptIds(userId, 10, "CHILDREN_COMPANY", SecurityConstants.INNER);
|
|
@@ -697,7 +713,12 @@ public class BidTenderController extends BaseController {
|
|
|
}
|
|
|
String join = String.join(",", deptIds);
|
|
|
join = "("+join+")";
|
|
|
- List<BidTender> bidTenders = bidTenderService.selectTenderByChange(join);
|
|
|
+ Map<String,Object> map = new HashMap<>();
|
|
|
+ map.put("cState",cState);
|
|
|
+ map.put("sName",sName);
|
|
|
+ map.put("sCode",sCode);
|
|
|
+ map.put("join",join);
|
|
|
+ List<BidTender> bidTenders = bidTenderService.selectTenderByChange(map);
|
|
|
for (BidTender item : bidTenders){
|
|
|
Long ownerDept = item.getOwnerDept();
|
|
|
SysDept info = remoteUserService.getInfoById(ownerDept,SecurityConstants.INNER);
|
|
@@ -708,6 +729,278 @@ public class BidTenderController extends BaseController {
|
|
|
return getDataTable(bidTenders);
|
|
|
}
|
|
|
|
|
|
+ // 中标变更申请
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
+ @PutMapping("/updateTenderByCState")
|
|
|
+ public AjaxResult updateTenderByCState(@RequestBody BidTender bidTender){
|
|
|
+ BidTender res = bidTenderService.selectBidTenderBySid(bidTender.getSid());
|
|
|
+ if(res.getsState().equals(bidTender.getsState())){
|
|
|
+ return toAjax(bidTenderService.updateBidTender(bidTender));
|
|
|
+ }
|
|
|
+
|
|
|
+ BidApprovalRecord bidApprovalRecord = new BidApprovalRecord();
|
|
|
+ bidApprovalRecord.setSid(bidTender.getSid());
|
|
|
+ bidApprovalRecord.setProcessedBy(SecurityUtils.getLoginUser().getSysUser().getUserName());
|
|
|
+ bidApprovalRecord.setDepnt(SecurityUtils.getLoginUser().getSysUser().getDept().getDeptName());
|
|
|
+ bidApprovalRecord.setFlagType("ChangeTender"); //中标终止标记
|
|
|
+ bidApprovalRecord.setNode("采购人申请");
|
|
|
+ bidApprovalRecord.setOpinion("中标变更");
|
|
|
+ bidApprovalRecordService.insertBidApprovalRecord(bidApprovalRecord);
|
|
|
+ return toAjax(bidTenderService.updateBidTender(bidTender));
|
|
|
+ }
|
|
|
+
|
|
|
+ // 中标变更服务费计算
|
|
|
+ @GetMapping("getServicePrice")
|
|
|
+ public AjaxResult getServicePrice(@RequestParam("sid") Long sid,@RequestParam("hid") Long hid){
|
|
|
+ BidTender bidTender = bidTenderService.selectBidTenderBySid(sid);
|
|
|
+ PpmProcurementPlan plan = remotePlanService.getPlan(bidTender.getXyId(), SecurityConstants.INNER);
|
|
|
+ Long materialId = plan.getMaterialId();
|
|
|
+ String buyingMode = plan.getBuyingMode();
|
|
|
+ Map<String,Long> map = new HashMap<>();
|
|
|
+ map.put("sid",sid);
|
|
|
+ map.put("hid",hid);
|
|
|
+ BidQuote bidQuote = bidQuoteService.selectQuoteBySupplier(map);
|
|
|
+ BigDecimal finalPrice = bidQuote.getQuotePrice();
|
|
|
+ BigDecimal servicePrice = new BigDecimal(0);
|
|
|
+ if (buyingMode.equals("1")) {
|
|
|
+ // 服务取费
|
|
|
+ if (materialId == 39 || materialId == 40 || materialId == 41 || materialId == 42) {
|
|
|
+ if (finalPrice.compareTo(new BigDecimal(1000000)) <= 0) {
|
|
|
+ servicePrice = finalPrice.multiply(PriceConstants.SERVICE_PERCENT_ONE).multiply(PriceConstants.SERVICE_SAVE_ONE).multiply(PriceConstants.SAVE);
|
|
|
+ } else if (finalPrice.compareTo(new BigDecimal(1000000)) > 0 && finalPrice.compareTo(new BigDecimal(5000000)) <= 0) {
|
|
|
+ servicePrice = PriceConstants.SERVICE_PRICE_ONE.add(
|
|
|
+ finalPrice.subtract(new BigDecimal(1000000)).multiply(PriceConstants.SERVICE_PERCENT_TWO)
|
|
|
+ ).multiply(PriceConstants.SERVICE_SAVE_TWO).multiply(PriceConstants.SAVE);
|
|
|
+ } else if (finalPrice.compareTo(new BigDecimal(5000000)) > 0 && finalPrice.compareTo(new BigDecimal(10000000)) <= 0) {
|
|
|
+ servicePrice = PriceConstants.SERVICE_PRICE_ONE.add(PriceConstants.SERVICE_PRICE_TWO).add(
|
|
|
+ finalPrice.subtract(new BigDecimal(5000000)).multiply(PriceConstants.SERVICE_PERCENT_THREE)
|
|
|
+ ).multiply(PriceConstants.SERVICE_SAVE_TWO).multiply(PriceConstants.SAVE);
|
|
|
+ } else if (finalPrice.compareTo(new BigDecimal(10000000)) > 0 && finalPrice.compareTo(new BigDecimal(50000000)) <= 0) {
|
|
|
+ servicePrice = PriceConstants.SERVICE_PRICE_ONE
|
|
|
+ .add(PriceConstants.SERVICE_PRICE_TWO)
|
|
|
+ .add(PriceConstants.SERVICE_PRICE_THREE)
|
|
|
+ .add(
|
|
|
+ finalPrice.subtract(new BigDecimal(10000000)).multiply(PriceConstants.SERVICE_PERCENT_FOUR)
|
|
|
+ ).multiply(PriceConstants.SERVICE_SAVE_TWO).multiply(PriceConstants.SAVE);
|
|
|
+ } else if (finalPrice.compareTo(new BigDecimal(50000000)) > 0 && finalPrice.compareTo(new BigDecimal(100000000)) <= 0) {
|
|
|
+ servicePrice = PriceConstants.SERVICE_PRICE_ONE
|
|
|
+ .add(PriceConstants.SERVICE_PRICE_TWO)
|
|
|
+ .add(PriceConstants.SERVICE_PRICE_THREE)
|
|
|
+ .add(PriceConstants.SERVICE_PRICE_FOUR)
|
|
|
+ .add(
|
|
|
+ finalPrice.subtract(new BigDecimal(50000000)).multiply(PriceConstants.SERVICE_PERCENT_FIVE)
|
|
|
+ ).multiply(PriceConstants.SERVICE_SAVE_TWO).multiply(PriceConstants.SAVE);
|
|
|
+ } else {
|
|
|
+ servicePrice = PriceConstants.SERVICE_PRICE_ONE
|
|
|
+ .add(PriceConstants.SERVICE_PRICE_TWO)
|
|
|
+ .add(PriceConstants.SERVICE_PRICE_THREE)
|
|
|
+ .add(PriceConstants.SERVICE_PRICE_FOUR)
|
|
|
+ .add(PriceConstants.SERVICE_PRICE_FIVE)
|
|
|
+ .add(
|
|
|
+ finalPrice.subtract(new BigDecimal(100000000)).multiply(PriceConstants.SERVICE_PERCENT_SIX)
|
|
|
+ ).multiply(PriceConstants.SERVICE_SAVE_TWO).multiply(PriceConstants.SAVE);
|
|
|
+ }
|
|
|
+ // 工程取费
|
|
|
+ } else if (materialId == 35 || materialId == 36 || materialId == 37 || materialId == 38) {
|
|
|
+ if (finalPrice.compareTo(new BigDecimal(1000000)) < 0) {
|
|
|
+ servicePrice = finalPrice.multiply(PriceConstants.PROJECT_PERCENT_ONE).multiply(PriceConstants.PROJECT_SAVE_ONE).multiply(PriceConstants.SAVE);
|
|
|
+ } else if (finalPrice.compareTo(new BigDecimal(1000000)) > 0 && finalPrice.compareTo(new BigDecimal(5000000)) <= 0) {
|
|
|
+ servicePrice = PriceConstants.PROJECT_PRICE_ONE.add(
|
|
|
+ finalPrice.subtract(new BigDecimal(1000000)).multiply(PriceConstants.PROJECT_PERCENT_TWO)
|
|
|
+ ).multiply(PriceConstants.PROJECT_SAVE_TWO).multiply(PriceConstants.SAVE);
|
|
|
+ } else if (finalPrice.compareTo(new BigDecimal(5000000)) > 0 && finalPrice.compareTo(new BigDecimal(10000000)) <= 0) {
|
|
|
+ servicePrice = PriceConstants.PROJECT_PRICE_ONE
|
|
|
+ .add(PriceConstants.PROJECT_PRICE_TWO)
|
|
|
+ .add(
|
|
|
+ finalPrice.subtract(new BigDecimal(5000000)).multiply(PriceConstants.PROJECT_PERCENT_THREE)
|
|
|
+ ).multiply(PriceConstants.PROJECT_SAVE_THREE).multiply(PriceConstants.SAVE);
|
|
|
+ } else if (finalPrice.compareTo(new BigDecimal(10000000)) > 0 && finalPrice.compareTo(new BigDecimal(50000000)) <= 0) {
|
|
|
+ servicePrice = PriceConstants.PROJECT_PRICE_ONE
|
|
|
+ .add(PriceConstants.PROJECT_PRICE_TWO)
|
|
|
+ .add(PriceConstants.PROJECT_PRICE_THREE)
|
|
|
+ .add(
|
|
|
+ finalPrice.subtract(new BigDecimal(10000000)).multiply(PriceConstants.PROJECT_PERCENT_FOUR)
|
|
|
+ ).multiply(PriceConstants.PROJECT_SAVE_FOUR);
|
|
|
+ } else if (finalPrice.compareTo(new BigDecimal(50000000)) > 0 && finalPrice.compareTo(new BigDecimal(100000000)) <= 0) {
|
|
|
+ servicePrice = PriceConstants.PROJECT_PRICE_ONE
|
|
|
+ .add(PriceConstants.PROJECT_PRICE_TWO)
|
|
|
+ .add(PriceConstants.PROJECT_PRICE_THREE)
|
|
|
+ .add(PriceConstants.PROJECT_PRICE_FOUR)
|
|
|
+ .add(
|
|
|
+ finalPrice.subtract(new BigDecimal(50000000)).multiply(PriceConstants.PROJECT_PERCENT_FIVE)
|
|
|
+ ).multiply(PriceConstants.PROJECT_SAVE_FOUR).multiply(PriceConstants.SAVE);
|
|
|
+ } else {
|
|
|
+ servicePrice = PriceConstants.PROJECT_PRICE_ONE
|
|
|
+ .add(PriceConstants.PROJECT_PRICE_TWO)
|
|
|
+ .add(PriceConstants.PROJECT_PRICE_THREE)
|
|
|
+ .add(PriceConstants.PROJECT_PRICE_FOUR)
|
|
|
+ .add(PriceConstants.PROJECT_PRICE_FIVE)
|
|
|
+ .add(
|
|
|
+ finalPrice.subtract(new BigDecimal(100000000)).multiply(PriceConstants.PROJECT_PERCENT_SIX)
|
|
|
+ ).multiply(PriceConstants.PROJECT_SAVE_FOUR).multiply(PriceConstants.SAVE);
|
|
|
+ }
|
|
|
+ // 货物取费
|
|
|
+ } else {
|
|
|
+ if (finalPrice.compareTo(new BigDecimal(1000000)) < 0) {
|
|
|
+ servicePrice = finalPrice.multiply(PriceConstants.GOOD_PERCENT_ONE).multiply(PriceConstants.GOOD_SAVE_ONE).multiply(PriceConstants.SAVE);
|
|
|
+ } else if (finalPrice.compareTo(new BigDecimal(1000000)) > 0 && finalPrice.compareTo(new BigDecimal(5000000)) <= 0) {
|
|
|
+ servicePrice = PriceConstants.GOOD_PRICE_ONE.add(
|
|
|
+ finalPrice.subtract(new BigDecimal(1000000)).multiply(PriceConstants.GOOD_PERCENT_TWO)
|
|
|
+ ).multiply(PriceConstants.GOOD_SAVE_TWO).multiply(PriceConstants.SAVE);
|
|
|
+ } else if (finalPrice.compareTo(new BigDecimal(5000000)) > 0 && finalPrice.compareTo(new BigDecimal(10000000)) <= 0) {
|
|
|
+ servicePrice = PriceConstants.GOOD_PRICE_ONE
|
|
|
+ .add(PriceConstants.GOOD_PRICE_TWO)
|
|
|
+ .add(
|
|
|
+ finalPrice.subtract(new BigDecimal(5000000)).multiply(PriceConstants.GOOD_PERCENT_THREE)
|
|
|
+ ).multiply(PriceConstants.GOOD_SAVE_THREE).multiply(PriceConstants.SAVE);
|
|
|
+ } else if (finalPrice.compareTo(new BigDecimal(10000000)) > 0 && finalPrice.compareTo(new BigDecimal(50000000)) <= 0) {
|
|
|
+ servicePrice = PriceConstants.GOOD_PRICE_ONE
|
|
|
+ .add(PriceConstants.GOOD_PRICE_TWO)
|
|
|
+ .add(PriceConstants.GOOD_PRICE_THREE)
|
|
|
+ .add(
|
|
|
+ finalPrice.subtract(new BigDecimal(10000000)).multiply(PriceConstants.GOOD_PERCENT_FOUR)
|
|
|
+ ).multiply(PriceConstants.GOOD_SAVE_FOUR).multiply(PriceConstants.SAVE);
|
|
|
+ } else if (finalPrice.compareTo(new BigDecimal(50000000)) > 0 && finalPrice.compareTo(new BigDecimal(100000000)) <= 0) {
|
|
|
+ servicePrice = PriceConstants.GOOD_PRICE_ONE
|
|
|
+ .add(PriceConstants.GOOD_PRICE_TWO)
|
|
|
+ .add(PriceConstants.GOOD_PRICE_THREE)
|
|
|
+ .add(PriceConstants.GOOD_PRICE_FOUR)
|
|
|
+ .add(
|
|
|
+ finalPrice.subtract(new BigDecimal(50000000)).multiply(PriceConstants.GOOD_PERCENT_FIVE)
|
|
|
+ ).multiply(PriceConstants.GOOD_SAVE_FOUR).multiply(PriceConstants.SAVE);
|
|
|
+ } else {
|
|
|
+ servicePrice = PriceConstants.GOOD_PRICE_ONE
|
|
|
+ .add(PriceConstants.GOOD_PRICE_TWO)
|
|
|
+ .add(PriceConstants.GOOD_PRICE_THREE)
|
|
|
+ .add(PriceConstants.GOOD_PRICE_FOUR)
|
|
|
+ .add(PriceConstants.GOOD_PRICE_FIVE)
|
|
|
+ .add(
|
|
|
+ finalPrice.subtract(new BigDecimal(100000000)).multiply(PriceConstants.GOOD_PERCENT_SIX)
|
|
|
+ ).multiply(PriceConstants.GOOD_SAVE_FOUR).multiply(PriceConstants.SAVE);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ // 服务取费
|
|
|
+ if (materialId == 39 || materialId == 40 || materialId == 41 || materialId == 42) {
|
|
|
+ if (finalPrice.compareTo(new BigDecimal(1000000)) <= 0) {
|
|
|
+ servicePrice = finalPrice.multiply(PriceConstants.SERVICE_PERCENT_ONE).multiply(PriceConstants.SERVICE_SAVE_ONE);
|
|
|
+ } else if (finalPrice.compareTo(new BigDecimal(1000000)) > 0 && finalPrice.compareTo(new BigDecimal(5000000)) <= 0) {
|
|
|
+ servicePrice = PriceConstants.SERVICE_PRICE_ONE.add(
|
|
|
+ finalPrice.subtract(new BigDecimal(1000000)).multiply(PriceConstants.SERVICE_PERCENT_TWO)
|
|
|
+ ).multiply(PriceConstants.SERVICE_SAVE_TWO);
|
|
|
+ } else if (finalPrice.compareTo(new BigDecimal(5000000)) > 0 && finalPrice.compareTo(new BigDecimal(10000000)) <= 0) {
|
|
|
+ servicePrice = PriceConstants.SERVICE_PRICE_ONE.add(PriceConstants.SERVICE_PRICE_TWO).add(
|
|
|
+ finalPrice.subtract(new BigDecimal(5000000)).multiply(PriceConstants.SERVICE_PERCENT_THREE)
|
|
|
+ ).multiply(PriceConstants.SERVICE_SAVE_TWO);
|
|
|
+ } else if (finalPrice.compareTo(new BigDecimal(10000000)) > 0 && finalPrice.compareTo(new BigDecimal(50000000)) <= 0) {
|
|
|
+ servicePrice = PriceConstants.SERVICE_PRICE_ONE
|
|
|
+ .add(PriceConstants.SERVICE_PRICE_TWO)
|
|
|
+ .add(PriceConstants.SERVICE_PRICE_THREE)
|
|
|
+ .add(
|
|
|
+ finalPrice.subtract(new BigDecimal(10000000)).multiply(PriceConstants.SERVICE_PERCENT_FOUR)
|
|
|
+ ).multiply(PriceConstants.SERVICE_SAVE_TWO);
|
|
|
+ } else if (finalPrice.compareTo(new BigDecimal(50000000)) > 0 && finalPrice.compareTo(new BigDecimal(100000000)) <= 0) {
|
|
|
+ servicePrice = PriceConstants.SERVICE_PRICE_ONE
|
|
|
+ .add(PriceConstants.SERVICE_PRICE_TWO)
|
|
|
+ .add(PriceConstants.SERVICE_PRICE_THREE)
|
|
|
+ .add(PriceConstants.SERVICE_PRICE_FOUR)
|
|
|
+ .add(
|
|
|
+ finalPrice.subtract(new BigDecimal(50000000)).multiply(PriceConstants.SERVICE_PERCENT_FIVE)
|
|
|
+ ).multiply(PriceConstants.SERVICE_SAVE_TWO);
|
|
|
+ } else {
|
|
|
+ servicePrice = PriceConstants.SERVICE_PRICE_ONE
|
|
|
+ .add(PriceConstants.SERVICE_PRICE_TWO)
|
|
|
+ .add(PriceConstants.SERVICE_PRICE_THREE)
|
|
|
+ .add(PriceConstants.SERVICE_PRICE_FOUR)
|
|
|
+ .add(PriceConstants.SERVICE_PRICE_FIVE)
|
|
|
+ .add(
|
|
|
+ finalPrice.subtract(new BigDecimal(100000000)).multiply(PriceConstants.SERVICE_PERCENT_SIX)
|
|
|
+ ).multiply(PriceConstants.SERVICE_SAVE_TWO);
|
|
|
+ }
|
|
|
+ // 工程取费
|
|
|
+ } else if (materialId == 35 || materialId == 36 || materialId == 37 || materialId == 38) {
|
|
|
+ if (finalPrice.compareTo(new BigDecimal(1000000)) < 0) {
|
|
|
+ servicePrice = finalPrice.multiply(PriceConstants.PROJECT_PERCENT_ONE).multiply(PriceConstants.PROJECT_SAVE_ONE);
|
|
|
+ } else if (finalPrice.compareTo(new BigDecimal(1000000)) > 0 && finalPrice.compareTo(new BigDecimal(5000000)) <= 0) {
|
|
|
+ servicePrice = PriceConstants.PROJECT_PRICE_ONE.add(
|
|
|
+ finalPrice.subtract(new BigDecimal(1000000)).multiply(PriceConstants.PROJECT_PERCENT_TWO)
|
|
|
+ ).multiply(PriceConstants.PROJECT_SAVE_TWO);
|
|
|
+ } else if (finalPrice.compareTo(new BigDecimal(5000000)) > 0 && finalPrice.compareTo(new BigDecimal(10000000)) <= 0) {
|
|
|
+ servicePrice = PriceConstants.PROJECT_PRICE_ONE
|
|
|
+ .add(PriceConstants.PROJECT_PRICE_TWO)
|
|
|
+ .add(
|
|
|
+ finalPrice.subtract(new BigDecimal(5000000)).multiply(PriceConstants.PROJECT_PERCENT_THREE)
|
|
|
+ ).multiply(PriceConstants.PROJECT_SAVE_THREE);
|
|
|
+ } else if (finalPrice.compareTo(new BigDecimal(10000000)) > 0 && finalPrice.compareTo(new BigDecimal(50000000)) <= 0) {
|
|
|
+ servicePrice = PriceConstants.PROJECT_PRICE_ONE
|
|
|
+ .add(PriceConstants.PROJECT_PRICE_TWO)
|
|
|
+ .add(PriceConstants.PROJECT_PRICE_THREE)
|
|
|
+ .add(
|
|
|
+ finalPrice.subtract(new BigDecimal(10000000)).multiply(PriceConstants.PROJECT_PERCENT_FOUR)
|
|
|
+ ).multiply(PriceConstants.PROJECT_SAVE_FOUR);
|
|
|
+ } else if (finalPrice.compareTo(new BigDecimal(50000000)) > 0 && finalPrice.compareTo(new BigDecimal(100000000)) <= 0) {
|
|
|
+ servicePrice = PriceConstants.PROJECT_PRICE_ONE
|
|
|
+ .add(PriceConstants.PROJECT_PRICE_TWO)
|
|
|
+ .add(PriceConstants.PROJECT_PRICE_THREE)
|
|
|
+ .add(PriceConstants.PROJECT_PRICE_FOUR)
|
|
|
+ .add(
|
|
|
+ finalPrice.subtract(new BigDecimal(50000000)).multiply(PriceConstants.PROJECT_PERCENT_FIVE)
|
|
|
+ ).multiply(PriceConstants.PROJECT_SAVE_FOUR);
|
|
|
+ } else {
|
|
|
+ servicePrice = PriceConstants.PROJECT_PRICE_ONE
|
|
|
+ .add(PriceConstants.PROJECT_PRICE_TWO)
|
|
|
+ .add(PriceConstants.PROJECT_PRICE_THREE)
|
|
|
+ .add(PriceConstants.PROJECT_PRICE_FOUR)
|
|
|
+ .add(PriceConstants.PROJECT_PRICE_FIVE)
|
|
|
+ .add(
|
|
|
+ finalPrice.subtract(new BigDecimal(100000000)).multiply(PriceConstants.PROJECT_PERCENT_SIX)
|
|
|
+ ).multiply(PriceConstants.PROJECT_SAVE_FOUR);
|
|
|
+ }
|
|
|
+ // 货物取费
|
|
|
+ } else {
|
|
|
+ if (finalPrice.compareTo(new BigDecimal(1000000)) < 0) {
|
|
|
+ servicePrice = finalPrice.multiply(PriceConstants.GOOD_PERCENT_ONE).multiply(PriceConstants.GOOD_SAVE_ONE);
|
|
|
+ } else if (finalPrice.compareTo(new BigDecimal(1000000)) > 0 && finalPrice.compareTo(new BigDecimal(5000000)) <= 0) {
|
|
|
+ servicePrice = PriceConstants.GOOD_PRICE_ONE.add(
|
|
|
+ finalPrice.subtract(new BigDecimal(1000000)).multiply(PriceConstants.GOOD_PERCENT_TWO)
|
|
|
+ ).multiply(PriceConstants.GOOD_SAVE_TWO);
|
|
|
+ } else if (finalPrice.compareTo(new BigDecimal(5000000)) > 0 && finalPrice.compareTo(new BigDecimal(10000000)) <= 0) {
|
|
|
+ servicePrice = PriceConstants.GOOD_PRICE_ONE
|
|
|
+ .add(PriceConstants.GOOD_PRICE_TWO)
|
|
|
+ .add(
|
|
|
+ finalPrice.subtract(new BigDecimal(5000000)).multiply(PriceConstants.GOOD_PERCENT_THREE)
|
|
|
+ ).multiply(PriceConstants.GOOD_SAVE_THREE);
|
|
|
+ } else if (finalPrice.compareTo(new BigDecimal(10000000)) > 0 && finalPrice.compareTo(new BigDecimal(50000000)) <= 0) {
|
|
|
+ servicePrice = PriceConstants.GOOD_PRICE_ONE
|
|
|
+ .add(PriceConstants.GOOD_PRICE_TWO)
|
|
|
+ .add(PriceConstants.GOOD_PRICE_THREE)
|
|
|
+ .add(
|
|
|
+ finalPrice.subtract(new BigDecimal(10000000)).multiply(PriceConstants.GOOD_PERCENT_FOUR)
|
|
|
+ ).multiply(PriceConstants.GOOD_SAVE_FOUR);
|
|
|
+ } else if (finalPrice.compareTo(new BigDecimal(50000000)) > 0 && finalPrice.compareTo(new BigDecimal(100000000)) <= 0) {
|
|
|
+ servicePrice = PriceConstants.GOOD_PRICE_ONE
|
|
|
+ .add(PriceConstants.GOOD_PRICE_TWO)
|
|
|
+ .add(PriceConstants.GOOD_PRICE_THREE)
|
|
|
+ .add(PriceConstants.GOOD_PRICE_FOUR)
|
|
|
+ .add(
|
|
|
+ finalPrice.subtract(new BigDecimal(50000000)).multiply(PriceConstants.GOOD_PERCENT_FIVE)
|
|
|
+ ).multiply(PriceConstants.GOOD_SAVE_FOUR);
|
|
|
+ } else {
|
|
|
+ servicePrice = PriceConstants.GOOD_PRICE_ONE
|
|
|
+ .add(PriceConstants.GOOD_PRICE_TWO)
|
|
|
+ .add(PriceConstants.GOOD_PRICE_THREE)
|
|
|
+ .add(PriceConstants.GOOD_PRICE_FOUR)
|
|
|
+ .add(PriceConstants.GOOD_PRICE_FIVE)
|
|
|
+ .add(
|
|
|
+ finalPrice.subtract(new BigDecimal(100000000)).multiply(PriceConstants.GOOD_PERCENT_SIX)
|
|
|
+ ).multiply(PriceConstants.GOOD_SAVE_FOUR);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return success(servicePrice);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 获取招标项目详细信息
|
|
|
*/
|