learshaw 6 ماه پیش
والد
کامیت
080c7f743b
1فایلهای تغییر یافته به همراه0 افزوده شده و 88 حذف شده
  1. 0 88
      ems/ems-cloud/ems-server/src/main/java/com/ruoyi/ems/controller/MeterBoundaryRelController.java

+ 0 - 88
ems/ems-cloud/ems-server/src/main/java/com/ruoyi/ems/controller/MeterBoundaryRelController.java

@@ -1,88 +0,0 @@
-package com.ruoyi.ems.controller;
-
-import com.ruoyi.common.core.web.controller.BaseController;
-import com.ruoyi.common.core.web.domain.AjaxResult;
-import com.ruoyi.common.log.annotation.Log;
-import com.ruoyi.common.log.enums.BusinessType;
-import com.ruoyi.common.security.annotation.RequiresPermissions;
-import com.ruoyi.ems.domain.MeterBoundaryRel;
-import com.ruoyi.ems.service.IMeterBoundaryRelService;
-import io.swagger.annotations.Api;
-import org.apache.commons.collections4.CollectionUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
-
-import java.util.List;
-
-/**
- * 计量设备绑定边界对象关系Controller
- *
- * @author ruoyi
- * @date 2024-12-09
- */
-@RestController
-@RequestMapping("/meterBoundaryRel")
-@Api(value = "MeterBoundaryRelController", description = "计量设备绑定边界对象关系")
-public class MeterBoundaryRelController extends BaseController {
-    @Autowired
-    private IMeterBoundaryRelService relService;
-
-    /**
-     * 查询计量设备绑定边界对象关系列表
-     */
-    @RequiresPermissions("ems:meterBoundaryRel:list")
-    @GetMapping("/listByObj")
-    public AjaxResult list(@RequestParam(value = "objType") Integer objType,
-        @RequestParam(value = "boundaryObj") String boundaryObj, @RequestParam(value = "meterCls") Integer meterCls) {
-        List<MeterBoundaryRel> list = relService.selectRelByObj(objType, boundaryObj, meterCls);
-        return success(list);
-    }
-
-    /**
-     * 新增计量设备绑定边界对象关系
-     */
-    @RequiresPermissions("ems:meterBoundaryRel:add")
-    @Log(title = "计量设备绑定边界对象关系", businessType = BusinessType.INSERT)
-    @PostMapping("/addBatch")
-    public AjaxResult addBatch(@RequestBody List<MeterBoundaryRel> list) {
-        return toAjax(relService.insertRelBatch(list));
-    }
-
-    /**
-     * 新增计量设备绑定边界对象关系
-     */
-    @RequiresPermissions("ems:meterBoundaryRel:add")
-    @Log(title = "计量设备绑定边界对象关系", businessType = BusinessType.UPDATE)
-    @PutMapping("/merge")
-    public AjaxResult merge(@RequestParam(value = "objType") Integer objType,
-        @RequestParam(value = "boundaryObj") String boundaryObj, @RequestParam(value = "meterCls") Integer meterCls,
-        @RequestBody List<MeterBoundaryRel> list) {
-
-        relService.deleteRelByObj(objType, boundaryObj, meterCls);
-        int cnt = 0;
-
-        if (CollectionUtils.isNotEmpty(list)) {
-            cnt = relService.insertRelBatch(list);
-        }
-
-        return toAjax(cnt);
-    }
-
-    /**
-     * 删除计量设备绑定边界对象关系
-     */
-    @RequiresPermissions("ems:meterBoundaryRel:remove")
-    @Log(title = "计量设备绑定边界对象关系", businessType = BusinessType.DELETE)
-    @DeleteMapping("/delByObj")
-    public AjaxResult delByObj(@RequestParam(value = "objType") Integer objType,
-        @RequestParam(value = "boundaryObj") String boundaryObj, @RequestParam(value = "meterCls") Integer meterCls) {
-        return toAjax(relService.deleteRelByObj(objType, boundaryObj, meterCls));
-    }
-}