|
@@ -0,0 +1,57 @@
|
|
|
+package com.gyee.backconfig.controller;
|
|
|
+
|
|
|
+
|
|
|
+import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
+import com.gyee.backconfig.config.R;
|
|
|
+import com.gyee.backconfig.model.auto.Meterpoint;
|
|
|
+import com.gyee.backconfig.model.auto.Square;
|
|
|
+import com.gyee.backconfig.service.auto.IMeterpointService;
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+
|
|
|
+import org.springframework.web.bind.annotation.RequestParam;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+
|
|
|
+import javax.annotation.Resource;
|
|
|
+
|
|
|
+/**
|
|
|
+ * <p>电计量点表
|
|
|
+ * 前端控制器
|
|
|
+ * </p>
|
|
|
+ *
|
|
|
+ * @author wang
|
|
|
+ * @since 2022-10-18
|
|
|
+ */
|
|
|
+@RestController
|
|
|
+@RequestMapping("//meterpoint")
|
|
|
+public class MeterpointController {
|
|
|
+ @Resource
|
|
|
+ private IMeterpointService meterpointService;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询
|
|
|
+ * @param id
|
|
|
+ * @param code
|
|
|
+ * @param windpowerstationid
|
|
|
+ * @param name
|
|
|
+ * @param pageNum
|
|
|
+ * @param pageSize
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @GetMapping(value = "/listByPage")
|
|
|
+ public R findList(@RequestParam(value = "id", required = false) String id,
|
|
|
+ @RequestParam(value = "code", required = false) String code,
|
|
|
+ @RequestParam(value = "windpowerstationid", required = false) String windpowerstationid,
|
|
|
+ @RequestParam(value = "name", required = false) String name,
|
|
|
+ @RequestParam(value = "pageNum", required = true) String pageNum,
|
|
|
+ @RequestParam(value = "pageSize", required = true) String pageSize) {
|
|
|
+ IPage<Meterpoint> list = meterpointService.list(id, code, windpowerstationid, name, pageNum, pageSize);
|
|
|
+ if (null != list) {
|
|
|
+ return R.ok().data(list);
|
|
|
+ } else {
|
|
|
+ return R.error().data("查询失败!");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+}
|