| | |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.procurementrecord.pojo.ProcurementPlan; |
| | | import com.ruoyi.procurementrecord.service.ProcurementPlanService; |
| | | 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.web.bind.annotation.*; |
| | |
| | | * @date : 2025/9/18 16:13 |
| | | */ |
| | | @RestController |
| | | @Api(tags = "采购计划") |
| | | @Tag(name = "采购计划") |
| | | @RequestMapping("/procurementPlan") |
| | | @AllArgsConstructor |
| | | public class ProcurementPlanController extends BaseController { |
| | |
| | | private ProcurementPlanService procurementPlanService; |
| | | |
| | | @RequestMapping("/listPage") |
| | | @ApiOperation("采购计划-查询") |
| | | @Operation(summary = "采购计划-查询") |
| | | public AjaxResult listPage(Page page, ProcurementPlan procurementPlan){ |
| | | IPage<ProcurementPlan> result = procurementPlanService.listPage(page, procurementPlan); |
| | | return AjaxResult.success(result); |
| | | } |
| | | |
| | | @PostMapping("/add") |
| | | @ApiOperation("采购计划-添加") |
| | | @Operation(summary = "采购计划-添加") |
| | | public AjaxResult add(@RequestBody ProcurementPlan procurementPlan){ |
| | | boolean result = procurementPlanService.save(procurementPlan); |
| | | return result ? AjaxResult.success() : AjaxResult.error(); |
| | | } |
| | | |
| | | @PostMapping("/update") |
| | | @ApiOperation("采购计划-修改") |
| | | @Operation(summary = "采购计划-修改") |
| | | public AjaxResult update(@RequestBody ProcurementPlan procurementPlan){ |
| | | boolean result = procurementPlanService.updateById(procurementPlan); |
| | | return result ? AjaxResult.success() : AjaxResult.error(); |
| | | } |
| | | |
| | | @DeleteMapping("/del") |
| | | @ApiOperation("采购计划-删除") |
| | | @Operation(summary = "采购计划-删除") |
| | | public AjaxResult del(@RequestBody List<Long> ids){ |
| | | boolean result = procurementPlanService.removeByIds(ids); |
| | | return result ? AjaxResult.success() : AjaxResult.error(); |