| | |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Set; |
| | |
| | | |
| | | @GetMapping("/get") |
| | | @Operation(summary = "获取投标详情") |
| | | @PreAuthorize("@ss.hasPermission('srm:tender-bid:query')") |
| | | public CommonResult<SrmTenderBidRespVO> getBid(@RequestParam("id") Long id) { |
| | | SrmTenderBidRespVO resp = BeanUtils.toBean(tenderBidService.getBid(id), SrmTenderBidRespVO.class); |
| | | enrichSupplierName(resp); |
| | |
| | | |
| | | @GetMapping("/list-by-project") |
| | | @Operation(summary = "按招标项目获取投标列表") |
| | | @PreAuthorize("@ss.hasPermission('srm:tender-bid:query')") |
| | | public CommonResult<List<SrmTenderBidRespVO>> getBidListByProject(@RequestParam("tenderProjectId") Long tenderProjectId) { |
| | | List<SrmTenderBidRespVO> list = BeanUtils.toBean(tenderBidService.getBidListByProject(tenderProjectId), SrmTenderBidRespVO.class); |
| | | enrichSupplierNames(list); |
| | |
| | | @PreAuthorize("@ss.hasPermission('srm:tender-bid:update')") |
| | | public CommonResult<Boolean> withdrawBid(@RequestParam("id") Long id) { |
| | | tenderBidService.withdrawBid(id); |
| | | return success(true); |
| | | } |
| | | |
| | | @PutMapping("/update-total") |
| | | @Operation(summary = "更新投标总金额") |
| | | @Parameter(name = "id", description = "投标ID", required = true) |
| | | @Parameter(name = "bidTotalAmount", description = "投标总金额(报价合计自动带出后可人工调整)") |
| | | @PreAuthorize("@ss.hasPermission('srm:tender-bid:update')") |
| | | public CommonResult<Boolean> updateBidTotal(@RequestParam("id") Long id, |
| | | @RequestParam(value = "bidTotalAmount", required = false) BigDecimal bidTotalAmount) { |
| | | tenderBidService.updateBidTotal(id, bidTotalAmount); |
| | | return success(true); |
| | | } |
| | | |
| | |
| | | |
| | | @GetMapping("/quote/list-by-bid") |
| | | @Operation(summary = "按投标获取报价列表") |
| | | @PreAuthorize("@ss.hasPermission('srm:supplier-quote:query')") |
| | | public CommonResult<List<SrmSupplierQuoteRespVO>> getQuoteListByBid(@RequestParam("bidId") Long bidId) { |
| | | List<SrmSupplierQuoteRespVO> list = BeanUtils.toBean(tenderBidService.getQuoteList(bidId), SrmSupplierQuoteRespVO.class); |
| | | enrichQuoteMaterialInfo(list); |
| | |
| | | if (material != null) { |
| | | vo.setTenderMaterialCode(material.getProductCode()); |
| | | vo.setTenderMaterialName(material.getProductName()); |
| | | vo.setMaterialName(material.getProductName()); |
| | | vo.setTenderMaterialSpec(material.getProductSpec()); |
| | | vo.setTenderMaterialUnit(material.getUnit()); |
| | | } |