Commit e892d332 authored by liangyb's avatar liangyb

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

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