| | |
| | | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| | | import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
| | | import cn.iocoder.yudao.module.srm.controller.admin.tender.vo.*; |
| | | import cn.iocoder.yudao.module.srm.dal.dataobject.SrmBidAwardDO; |
| | | import cn.iocoder.yudao.module.srm.service.tender.SrmBidAwardService; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.Parameter; |
| | |
| | | return success(BeanUtils.toBean(bidAwardService.getAward(id), SrmBidAwardRespVO.class)); |
| | | } |
| | | |
| | | @GetMapping("/get-by-project") |
| | | @Operation(summary = "根据招标项目ID获取定标详情") |
| | | @PreAuthorize("@ss.hasPermission('srm:bid-award:query')") |
| | | public CommonResult<SrmBidAwardRespVO> getAwardByProject(@RequestParam("tenderProjectId") Long tenderProjectId) { |
| | | SrmBidAwardDO award = bidAwardService.getAwardByProjectId(tenderProjectId); |
| | | if (award == null) { |
| | | return success((SrmBidAwardRespVO) null); |
| | | } |
| | | return success(BeanUtils.toBean(award, SrmBidAwardRespVO.class)); |
| | | } |
| | | |
| | | @DeleteMapping("/delete") |
| | | @Operation(summary = "删除定标") |
| | | @Parameter(name = "id", description = "定标ID", required = true) |
| | | @PreAuthorize("@ss.hasPermission('srm:bid-award:update')") |
| | | public CommonResult<Boolean> deleteAward(@RequestParam("id") Long id) { |
| | | bidAwardService.deleteAward(id); |
| | | return success(true); |
| | | } |
| | | |
| | | @PutMapping("/approve") |
| | | @Operation(summary = "审批定标") |
| | | @Parameter(name = "id", description = "定标ID", required = true) |