From 4f3a98f19143865cdc1de4791e8a95d96bd40c65 Mon Sep 17 00:00:00 2001 From: maven <2163098428@qq.com> Date: 星期五, 01 八月 2025 13:27:59 +0800 Subject: [PATCH] yys 密码已重置 --- cnas-require/src/main/java/com/ruoyi/require/controller/SupplierManagementController.java | 91 +++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 91 insertions(+), 0 deletions(-) diff --git a/cnas-require/src/main/java/com/ruoyi/require/controller/SupplierManagementController.java b/cnas-require/src/main/java/com/ruoyi/require/controller/SupplierManagementController.java new file mode 100644 index 0000000..831d5f4 --- /dev/null +++ b/cnas-require/src/main/java/com/ruoyi/require/controller/SupplierManagementController.java @@ -0,0 +1,91 @@ +package com.ruoyi.require.controller; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.ruoyi.common.core.domain.Result; +import com.ruoyi.common.utils.SecurityUtils; +import com.ruoyi.require.pojo.SupplierManagement; +import com.ruoyi.require.service.ProcurementSuppliesContentsService; +import com.ruoyi.require.service.SupplierManagementService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.AllArgsConstructor; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + +/** + * <p> + * 鍓嶇鎺у埗鍣� + * </p> + * + * @author + * @since 2024-11-15 02:46:45 + */ +@Api(tags = "渚涘簲鍟嗙鐞�") +@RestController +@RequestMapping("/supplierManagement") +@AllArgsConstructor +public class SupplierManagementController { + + @Autowired + private SupplierManagementService supplierManagementService; + + @Autowired + private ProcurementSuppliesContentsService procurementSuppliesContentsService; + + + @ApiOperation("鏌ヨ渚涙柟鍚嶅綍") + @GetMapping("/selectSupplierManagementByParentId/{parentId}") + public Result<List<SupplierManagement>> selectSupplierManagementByParentId(@PathVariable Integer parentId) throws Exception { + return Result.success(supplierManagementService.selectSupplierManagementByParentId(parentId)); + } + + + @ApiOperation("鍒嗛〉鏌ヨ鍚堟牸渚涙柟鍚嶅綍") + @GetMapping("/selectQualifiedSupplierManagementPage") + public Result<IPage<SupplierManagement>> selectQualifiedSupplierManagement(SupplierManagement supplierManagement, Page page) throws Exception { + return Result.success(supplierManagementService.selectQualifiedSupplierManagement(page, supplierManagement)); + } + + @ApiOperation("鏍规嵁ID鏌ヨ渚涘簲鍟�") + @GetMapping("/selectQualifiedSupplierManagementById/{supplierManagementId}") + public Result<List<SupplierManagement>> selectQualifiedSupplierManagementById(@PathVariable Integer supplierManagementId) throws Exception { + return Result.success(supplierManagementService.selectQualifiedSupplierManagementById(supplierManagementId)); + } + + @ApiOperation("鏂板渚涘簲鍟�") + @PostMapping("/addSupplierManagement") + public Result addSupplierManagement(@RequestBody SupplierManagement supplierManagement) { + return Result.success(supplierManagementService.save(supplierManagement)); + } + + @ApiOperation("淇敼渚涘簲鍟�") + @PostMapping("/updateSupplierManagement") + public Result updateSupplierManagement(@RequestBody SupplierManagement supplierManagement) { + supplierManagement.setUpdateUser(SecurityUtils.getUserId().intValue()); + return Result.success(supplierManagementService.updateById(supplierManagement)); + } + + @ApiOperation("鍒犻櫎渚涘簲鍟�") + @DeleteMapping("/delSupplierManagement") + public Result delSupplierManagement(Integer supplierManagementId) { + return Result.success(supplierManagementService.removeById(supplierManagementId)); + } + + @ApiOperation("瀵煎嚭渚涘簲鍟�") + @PostMapping("/exportSupplierManagement/{parentId}") + public void exportSupplierManagement(@PathVariable Integer parentId, HttpServletResponse response) throws Exception { + supplierManagementService.exportSupplierManagement(parentId, response); + } + + @ApiOperation("鏌ヨ鍏ㄩ儴渚涙柟鍚嶅綍") + @GetMapping("/selectSupplierManagementAll") + public Result<List<SupplierManagement>> selectSupplierManagementAll() throws Exception { + return Result.success(supplierManagementService.selectSupplierManagementAll()); + } + +} -- Gitblit v1.9.3