| | |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.procurementrecord.pojo.ProcurementPriceManagement; |
| | | import com.ruoyi.procurementrecord.service.ProcurementPriceManagementService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | * @date : 2025/9/17 15:08 |
| | | */ |
| | | @RestController |
| | | @Api(tags = "采购价格管理") |
| | | @Tag(name = "采购价格管理") |
| | | @RequestMapping("/procurementPriceManagement") |
| | | @AllArgsConstructor |
| | | public class ProcurementPriceManagementController extends BaseController { |
| | |
| | | private ProcurementPriceManagementService procurementPriceManagementService; |
| | | |
| | | @GetMapping("/listPage") |
| | | @ApiOperation("采购价格管理-查询") |
| | | @Operation(summary = "采购价格管理-查询") |
| | | public AjaxResult listPage(Page page, ProcurementPriceManagement procurementPriceManagement){ |
| | | IPage<ProcurementPriceManagement> result = procurementPriceManagementService.listPage(page, procurementPriceManagement); |
| | | return AjaxResult.success(result); |
| | | } |
| | | |
| | | @PostMapping("/add") |
| | | @ApiOperation("采购价格管理-添加") |
| | | @Operation(summary = "采购价格管理-添加") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public AjaxResult add(@RequestBody ProcurementPriceManagement procurementPriceManagement){ |
| | | boolean result = procurementPriceManagementService.save(procurementPriceManagement); |
| | |
| | | } |
| | | |
| | | @PostMapping("/update") |
| | | @ApiOperation("采购价格管理-修改") |
| | | @Operation(summary = "采购价格管理-修改") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public AjaxResult update(@RequestBody ProcurementPriceManagement procurementPriceManagement){ |
| | | boolean result = procurementPriceManagementService.updateById(procurementPriceManagement); |
| | |
| | | } |
| | | |
| | | @DeleteMapping("/del") |
| | | @ApiOperation("采购价格管理-删除") |
| | | @Operation(summary = "采购价格管理-删除") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public AjaxResult delete(@RequestBody List<Long> ids){ |
| | | if (ids == null || ids.isEmpty()) { |