From daf5a28d644cece1e19972521f0d6f19dfef20a4 Mon Sep 17 00:00:00 2001
From: lius <Lius2225@163.com>
Date: 星期五, 07 七月 2023 09:57:01 +0800
Subject: [PATCH] 率参数标签接口

---
 lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/controller/MdcUtilizationRateController.java |   34 ++++++++++++++++++++++++++++------
 1 files changed, 28 insertions(+), 6 deletions(-)

diff --git a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/controller/MdcUtilizationRateController.java b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/controller/MdcUtilizationRateController.java
index 69156e5..aaf1068 100644
--- a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/controller/MdcUtilizationRateController.java
+++ b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/controller/MdcUtilizationRateController.java
@@ -8,6 +8,7 @@
 import org.jeecg.common.api.vo.Result;
 import org.jeecg.common.aspect.annotation.AutoLog;
 import org.jeecg.common.system.base.controller.JeecgController;
+import org.jeecg.modules.mdc.dto.MdcUtilizationRateDto;
 import org.jeecg.modules.mdc.entity.MdcUtilizationRate;
 import org.jeecg.modules.mdc.service.IMdcUtilizationRateService;
 import org.springframework.web.bind.annotation.*;
@@ -16,6 +17,7 @@
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+import java.util.List;
 
 /**
  * @Description: 鐜囧弬鏁拌缃�
@@ -33,6 +35,7 @@
 
     /**
      * 鍒嗛〉鏌ヨ
+     *
      * @param mdcUtilizationRate
      * @param pageNo
      * @param pageSize
@@ -45,7 +48,7 @@
     public Result<?> queryPageList(MdcUtilizationRate mdcUtilizationRate,
                                    @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
                                    @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
-                                   HttpServletRequest req){
+                                   HttpServletRequest req) {
         //灏嗛〉闈㈣幏鍙栫殑椤靛�煎皝瑁呰嚦Page瀵硅薄鍐�
         Page page = new Page(pageNo, pageSize);
         IPage<MdcUtilizationRate> mdcUtilizationRateIPage = mdcUtilizationRateService.queryPageList(page, req);
@@ -54,69 +57,75 @@
 
     /**
      * 鏂板
+     *
      * @param mdcUtilizationRate
      * @return
      */
     @AutoLog("鐜囧弬鏁拌缃�-鏂板")
     @ApiOperation(value = "鐜囧弬鏁拌缃�-鏂板", notes = "鐜囧弬鏁拌缃�-鏂板")
     @PostMapping("/addUtilization")
-    public Result<?> addUtilization(@RequestBody MdcUtilizationRate mdcUtilizationRate){
+    public Result<?> addUtilization(@RequestBody MdcUtilizationRate mdcUtilizationRate) {
         Boolean flag = mdcUtilizationRateService.addUtilization(mdcUtilizationRate);
         return flag ? Result.OK("鏂板鎴愬姛") : Result.error("鏂板澶辫触");
     }
 
     /**
      * 缂栬緫
+     *
      * @param mdcUtilizationRate
      * @return
      */
     @AutoLog("鐜囧弬鏁拌缃�-缂栬緫")
     @ApiOperation(value = "鐜囧弬鏁拌缃�-缂栬緫", notes = "鐜囧弬鏁拌缃�-缂栬緫")
     @PutMapping("/editUtilization")
-    public Result<?> editUtilization(@RequestBody MdcUtilizationRate mdcUtilizationRate){
+    public Result<?> editUtilization(@RequestBody MdcUtilizationRate mdcUtilizationRate) {
         Boolean flag = mdcUtilizationRateService.editUtilization(mdcUtilizationRate);
         return flag ? Result.OK("淇敼鎴愬姛") : Result.error("淇敼澶辫触");
     }
 
     /**
      * 鏍规嵁id鍒犻櫎
+     *
      * @param id
      * @return
      */
     @AutoLog("鐜囧弬鏁拌缃�-鏍规嵁id鍒犻櫎")
     @ApiOperation(value = "鐜囧弬鏁拌缃�-鏍规嵁id鍒犻櫎", notes = "鐜囧弬鏁拌缃�-鏍规嵁id鍒犻櫎")
     @DeleteMapping("/deleteUtilization")
-    public Result<?> deleteUtilization(@RequestParam(name = "id", required = true) String id){
+    public Result<?> deleteUtilization(@RequestParam(name = "id", required = true) String id) {
         Boolean flag = mdcUtilizationRateService.deleteUtilization(id);
         return flag ? Result.OK("鍒犻櫎鎴愬姛") : Result.error("鍒犻櫎澶辫触");
     }
 
     /**
      * 鎵归噺鍒犻櫎
+     *
      * @param ids
      * @return
      */
     @AutoLog("鐜囧弬鏁拌缃�-鎵归噺鍒犻櫎")
     @ApiOperation(value = "鐜囧弬鏁拌缃�-鎵归噺鍒犻櫎", notes = "鐜囧弬鏁拌缃�-鎵归噺鍒犻櫎")
     @DeleteMapping("/deleteBatchUtilization")
-    public Result<?> deleteBatchUtilization(@RequestParam(name = "ids", required = true) String ids){
+    public Result<?> deleteBatchUtilization(@RequestParam(name = "ids", required = true) String ids) {
         Boolean flag = mdcUtilizationRateService.deleteBatchUtilization(ids);
         return flag ? Result.OK("鎵归噺鍒犻櫎鎴愬姛") : Result.error("鎵归噺鍒犻櫎澶辫触");
     }
 
     /**
      * 瀵煎嚭excel
+     *
      * @param request
      * @param mdcUtilizationRate
      * @return
      */
     @RequestMapping("/exportXls")
-    public ModelAndView exportXls(HttpServletRequest request, MdcUtilizationRate mdcUtilizationRate){
+    public ModelAndView exportXls(HttpServletRequest request, MdcUtilizationRate mdcUtilizationRate) {
         return super.exportXls(request, mdcUtilizationRate, MdcUtilizationRate.class, "鐜囧弬鏁拌缃鍑�");
     }
 
     /**
      * 瀵煎叆excel
+     *
      * @param request
      * @param response
      * @return
@@ -125,4 +134,17 @@
     public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
         return super.importExcel(request, response, MdcUtilizationRate.class);
     }
+
+    /**
+     * 鏍规嵁绫诲瀷鑾峰彇棰滆壊鏍囩
+     *
+     * @param type
+     * @return
+     */
+    @ApiOperation(value = "鐜囧弬鏁拌缃�-鏍规嵁绫诲瀷鑾峰彇棰滆壊鏍囩", notes = "鐜囧弬鏁拌缃�-鏍规嵁绫诲瀷鑾峰彇棰滆壊鏍囩")
+    @GetMapping("/getByType")
+    public Result<List<MdcUtilizationRateDto>> getByType(@RequestParam(name = "type", required = true) String type) {
+        List<MdcUtilizationRateDto> list = mdcUtilizationRateService.getByType(type);
+        return Result.OK(list);
+    }
 }

--
Gitblit v1.9.3