Commit e892d332 authored by liangyb's avatar liangyb

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

parent 34769051
......@@ -5,11 +5,7 @@ import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import com.gx.obe.server.common.base.BaseController;
import com.gx.obe.server.common.json.EntityUtill;
......@@ -46,7 +42,7 @@ public class BidPriceResultController extends BaseController<BidPriceResultServi
* @Description: 获得供应商开标一览表
* @author mazc
* @param tenderId
* @param bidPriceId
* @param supplierId
* @return
*/
@GetMapping("/getBidPriceResultTableList")
......@@ -177,9 +173,6 @@ public class BidPriceResultController extends BaseController<BidPriceResultServi
/**
* @Description: 保存供应商多轮报价
* @author guoyr
* @param tenderId
* @param supplierId
* @param bidPriceResultList
* @return
*/
@PostMapping("/saveSupplierReBidPriceResult")
......@@ -252,6 +245,11 @@ public class BidPriceResultController extends BaseController<BidPriceResultServi
return bidPriceResultService.updateBidPriceResultOrSum(bidPriceResult);
}
@PostMapping("/updateBidPriceAndFinalPrice")
@SysLogAnnotation(detail = "修正含税不含税", operationType = OperationType.UPDATE)
public boolean updateBidPriceAndFinalPrice(@RequestBody Map<String, Object> bidPriceResult) {
return bidPriceResultService.updateBidPriceAndFinalPrice(bidPriceResult);
}
/**
* @Description: 将未完成报价的供应商报价自动填充上一轮报价
......
......@@ -2,6 +2,7 @@ package com.gx.obe.server.management.evaluation.service;
import java.util.Date;
import java.util.List;
import java.util.Map;
import org.springframework.transaction.annotation.Transactional;
......@@ -204,6 +205,8 @@ public interface BidPriceResultService extends IService<BidPriceResult> {
*/
boolean updateBidPriceResultOrSum(BidPriceResult bidPriceResult);
boolean updateBidPriceAndFinalPrice(Map<String, Object> bidPriceResult);
/**
* @Description:
* @author mazc
......
......@@ -632,7 +632,10 @@ public class BidPriceResultServiceImpl extends ServiceImpl<BidPriceResultMapper,
}
return false;
}
public boolean updateBidPriceAndFinalPrice(Map<String, Object> bidPriceResult) {
return supplierOpeningResultService.updateBidPriceAndFinalPrice(bidPriceResult);
}
@Override
@Transactional(rollbackFor = Exception.class)
public boolean updateSupplierIdNotRecordedBidPrice(String tenderId , String roundId ) {
......
......@@ -6,6 +6,7 @@ import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gx.obe.server.management.supplier.entity.SupplierOpeningResult;
import org.apache.ibatis.annotations.Update;
import java.math.BigDecimal;
import java.util.List;
......@@ -34,7 +35,9 @@ public interface SupplierOpeningResultMapper extends BaseMapper<SupplierOpeningR
* @return
*/
SupplierOpeningResult getSupplierOpeningResult(@Param("tenderId") String tenderId, @Param("supplierId") String supplierId);
@Update("UPDATE obe_supplier_opening_result SET BID_PRICE = #{bidPrice.bidPrice},FINAL_BID_PRICE = #{bidPrice.finalBidPrice},EVALUATION_PRICE = #{bidPrice.evaluationPrice} WHERE supplier_id = #{id}")
void updateBidPriceAndFinalPrice(@Param("id") String id, @Param("bidPrice") BidPriceResult bidPrice);
/**
* @Description: 修改供应商的总价
* @author mazc
......
package com.gx.obe.server.management.supplier.service;
import java.util.List;
import java.util.Map;
import com.gx.obe.server.management.evaluation.entity.BidPriceResult;
import org.apache.ibatis.annotations.Param;
......@@ -103,4 +104,6 @@ public interface SupplierOpeningResultService extends IService<SupplierOpeningRe
* @return
*/
boolean updateSumModifyReason(String tenderId, String supplierId);
boolean updateBidPriceAndFinalPrice(Map<String, Object> bidPriceResult);
}
......@@ -3,6 +3,7 @@ package com.gx.obe.server.management.supplier.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.gx.obe.server.common.utils.CollectionUtils;
import com.gx.obe.server.common.utils.IDUtils;
import com.gx.obe.server.common.utils.ObjectUtils;
......@@ -12,7 +13,6 @@ import com.gx.obe.server.management.evaluation.service.BidPriceResultService;
import com.gx.obe.server.management.supplier.dao.SupplierOpeningResultMapper;
import com.gx.obe.server.management.supplier.entity.SupplierOpeningResult;
import com.gx.obe.server.management.supplier.service.SupplierOpeningResultService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
......@@ -20,6 +20,8 @@ import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* @Description:
......@@ -214,4 +216,27 @@ public class SupplierOpeningResultServiceImpl extends ServiceImpl<SupplierOpenin
return update(wrapper);
}
@Override
public boolean updateBidPriceAndFinalPrice(Map<String, Object> bidPriceResult){
ObjectMapper objectMapper = new ObjectMapper();
try {
// 转换 Map<String, Object> 为 Map<String, BidPriceResult>
Map<String, BidPriceResult> bidPriceResultMap = bidPriceResult.entrySet().stream()
.collect(Collectors.toMap(
Map.Entry::getKey,
e -> objectMapper.convertValue(e.getValue(), BidPriceResult.class)
));
for (Map.Entry<String, BidPriceResult> entry : bidPriceResultMap.entrySet()) {
String id = entry.getKey();
BidPriceResult bidPrice = entry.getValue();
supplierOpeningResultMapper.updateBidPriceAndFinalPrice(id, bidPrice);
}
} catch (Exception e) {
// 处理转换错误
}
return true;
}
}
......@@ -333,7 +333,15 @@
AND SUPPLIER_ID = #{ObeBidPriceResult.supplierId}
</update>
<update id="updateBidPriceAndFinalPrice" parameterType="java.util.Map">
UPDATE obe_supplier_opening_result
SET BID_PRICE = #{bidPrice.bidPrice},
FINAL_BID_PRICE = #{bidPrice.finalBidPrice},
EVALUATION_PRICE = #{bidPrice.evaluationPrice}
WHERE supplier_id = #{id}
</update>
<update id="updateEvaluationPriceAndEvaluationPriceOriginal">
UPDATE obe_supplier_opening_result
SET EVALUATION_PRICE = #{evaluationPrice} ,
......
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