Browse Source

后台管理部分字段调整

wangb 2 years ago
parent
commit
3d4d8f52a2
20 changed files with 75 additions and 41 deletions
  1. 1 1
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/config/GeneratorCodeConfig.java
  2. 2 2
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/controller/ProBasicEquipmentController.java
  3. 2 2
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/controller/ProBasicLineController.java
  4. 2 2
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/controller/ProBasicMeterPointController.java
  5. 3 3
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/controller/ProBasicProjectController.java
  6. 2 2
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/controller/ProBasicRegionController.java
  7. 2 1
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/controller/ProEconStopTypeController.java
  8. 18 0
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/controller/SttreeControllel.java
  9. 2 4
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/model/auto/ProBasicMeterPoint.java
  10. 1 1
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/IProBasicEquipmentService.java
  11. 1 1
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/IProBasicLineService.java
  12. 1 1
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/IProBasicMeterPointService.java
  13. 1 1
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/IProBasicProjectService.java
  14. 18 1
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/SttreeService.java
  15. 2 2
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/impl/ProBasicCompanyServiceImpl.java
  16. 5 5
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/impl/ProBasicEquipmentServiceImpl.java
  17. 3 3
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/impl/ProBasicLineServiceImpl.java
  18. 3 3
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/impl/ProBasicMeterPointServiceImpl.java
  19. 3 3
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/impl/ProBasicProjectServiceImpl.java
  20. 3 3
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/impl/ProBasicRegionServiceImpl.java

File diff suppressed because it is too large
+ 1 - 1
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/config/GeneratorCodeConfig.java


+ 2 - 2
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/controller/ProBasicEquipmentController.java

@@ -47,7 +47,7 @@ public class ProBasicEquipmentController {
     @GetMapping(value = "/list")
     @ApiOperation(value = "发电设备-列表", notes = "发电设备-列表")
     public R findList(@RequestParam(value = "id", required = false) String id,
-                      @RequestParam(value = "code", required = false) String code,
+                      @RequestParam(value = "nemCode", required = false) String nemCode,
                       @RequestParam(value = "companyId", required = false) String companyId,
                       @RequestParam(value = "regionId", required = false) String regionId,
                       @RequestParam(value = "windpowerstationId", required = false) String windpowerstationId,
@@ -56,7 +56,7 @@ public class ProBasicEquipmentController {
                       @RequestParam(value = "substationId", required = false) String substationId,
                       @RequestParam(value = "pageNum", required = true) String pageNum,
                       @RequestParam(value = "pageSize", required = true) String pageSize) {
-        IPage<ProBasicEquipment> list = proBasicWindturbineService.list(id, code, companyId,regionId,windpowerstationId, projectId, lineId,substationId, pageNum, pageSize);
+        IPage<ProBasicEquipment> list = proBasicWindturbineService.list(id, nemCode, companyId,regionId,windpowerstationId, projectId, lineId,substationId, pageNum, pageSize);
         if (null != list) {
             return R.ok().data(list);
         } else {

+ 2 - 2
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/controller/ProBasicLineController.java

@@ -43,13 +43,13 @@ public class ProBasicLineController {
     @GetMapping(value = "/listByPage")
     @ApiOperation(value = "集电线路-列表", notes = "集电线路-列表")
     public R findList(@RequestParam(value = "id", required = false) String id,
-                      @RequestParam(value = "code", required = false) String code,
+                      @RequestParam(value = "nemCode", required = false) String nemCode,
                       @RequestParam(value = "name", required = false) String name,
                       @RequestParam(value = "projectId", required = false) String projectId,
                       @RequestParam(value = "aname", required = false) String aname,
                       @RequestParam(value = "pageNum", required = true) String pageNum,
                       @RequestParam(value = "pageSize", required = true) String pageSize) {
-        IPage<ProBasicLine> list = proBasicLineService.list(id, code,name, aname,projectId, pageNum, pageSize);
+        IPage<ProBasicLine> list = proBasicLineService.list(id, nemCode,name, aname,projectId, pageNum, pageSize);
         if (null != list) {
             return R.ok().data(list);
         } else {

+ 2 - 2
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/controller/ProBasicMeterPointController.java

@@ -43,12 +43,12 @@ public class ProBasicMeterPointController {
     @GetMapping(value = "/listByPage")
     @ApiOperation(value = "电计量-列表", notes = "电计量-列表")
     public R findList(@RequestParam(value = "id", required = false) String id,
-                      @RequestParam(value = "code", required = false) String code,
+                      @RequestParam(value = "nemCode", required = false) String nemCode,
                       @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<ProBasicMeterPoint> list = proBasicMeterPointService.list(id, code, windpowerstationId, name, pageNum, pageSize);
+        IPage<ProBasicMeterPoint> list = proBasicMeterPointService.list(id, nemCode, windpowerstationId, name, pageNum, pageSize);
         if (null != list) {
             return R.ok().data(list);
         } else {

+ 3 - 3
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/controller/ProBasicProjectController.java

@@ -34,7 +34,7 @@ public class ProBasicProjectController {
      * 查询
      * @param id
      * @param name
-     * @param code
+     * @param nemCode
      * @param windpowerstationId
      * @param pageNum
      * @param pageSize
@@ -44,12 +44,12 @@ public class ProBasicProjectController {
     @ApiOperation(value = "工程期次-列表", notes = "工程期次-列表")
     public R findList(@RequestParam(value = "id",required = false) String id,
                       @RequestParam(value = "name",required = false) String name,
-                      @RequestParam(value = "code",required = false) String code,
+                      @RequestParam(value = "nemCode",required = false) String nemCode,
                       @RequestParam(value = "windpowerstationId",required = false) String windpowerstationId,
                       @RequestParam(value = "windsubStationId",required = false) String windsubStationId,
                       @RequestParam(value = "pageNum",required = true) String pageNum,
                       @RequestParam(value = "pageSize",required = true) String pageSize){
-        IPage<ProBasicProject> list = proBasicProjectService.getList(id,name,code,windpowerstationId,windsubStationId,pageNum,pageSize);
+        IPage<ProBasicProject> list = proBasicProjectService.getList(id,name,nemCode,windpowerstationId,windsubStationId,pageNum,pageSize);
         if (null != list){
             return R.ok().data(list);
         }else {

+ 2 - 2
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/controller/ProBasicRegionController.java

@@ -46,10 +46,10 @@ public class ProBasicRegionController {
     public R findList(@RequestParam(value = "id", required = false) String id,
                       @RequestParam(value = "name", required = false) String name,
                       @RequestParam(value = "aname", required = false) String aname,
-                      @RequestParam(value = "code", required = false) String code,
+                      @RequestParam(value = "nemCode", required = false) String nemCode,
                       @RequestParam(value = "pageNum", required = true) String pageNum,
                       @RequestParam(value = "pageSize", required = true) String pageSize) {
-        IPage<ProBasicRegion> list = proBasicRegionService.list(id, name, aname, code, pageNum, pageSize);
+        IPage<ProBasicRegion> list = proBasicRegionService.list(id, name, aname, nemCode, pageNum, pageSize);
         if (null != list) {
             return R.ok().data(list);
         } else {

+ 2 - 1
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/controller/ProEconStopTypeController.java

@@ -7,6 +7,7 @@ import com.gyee.backconfig.model.auto.ProEconStopType;
 import com.gyee.backconfig.service.auto.IProEconStopTypeService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
 import java.util.Arrays;
@@ -23,7 +24,7 @@ import java.util.Arrays;
 @Api(value = "停机类型配置" ,tags =  "停机类型配置")
 @RequestMapping("//pro-econ-stop-type")
 public class ProEconStopTypeController {
-
+    @Autowired
     private IProEconStopTypeService proEconStopTypeService;
 
     @GetMapping(value = "/list")

+ 18 - 0
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/controller/SttreeControllel.java

@@ -2,6 +2,7 @@ package com.gyee.backconfig.controller;
 
 import com.gyee.backconfig.config.R;
 import com.gyee.backconfig.model.auto.ProBasicEnergyGroup;
+import com.gyee.backconfig.model.auto.ProBasicPowerstation;
 import com.gyee.backconfig.model.auto.ProBasicRegion;
 import com.gyee.backconfig.service.auto.SttreeService;
 import com.gyee.common.model.StringUtils;
@@ -58,4 +59,21 @@ public class SttreeControllel {
             return R.error().message("访问失败");
         }
     }
+    /**
+     * 期次层级树
+     *
+     * @return
+     */
+    @GetMapping(value = "/projecttrees")
+    @ResponseBody
+    @CrossOrigin(origins = "*", maxAge = 3600)
+    @ApiOperation(value = "期次组织结构树-期次层级树", notes = "期次组织结构树-期次层级树")
+    public R pjls() {
+        List<ProBasicPowerstation> resultList = sttreeService.Projecttree();
+        if (StringUtils.isNotNull(resultList)) {
+            return com.gyee.backconfig.config.R.ok((int) resultList.size()).data(resultList);
+        } else {
+            return R.error().message("访问失败");
+        }
+    }
 }

+ 2 - 4
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/model/auto/ProBasicMeterPoint.java

@@ -2,7 +2,6 @@ package com.gyee.backconfig.model.auto;
 
 import java.math.BigDecimal;
 import com.baomidou.mybatisplus.extension.activerecord.Model;
-import io.swagger.annotations.ApiModel;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
@@ -12,11 +11,10 @@ import lombok.EqualsAndHashCode;
  * </p>
  *
  * @author wang
- * @since 2022-10-31
+ * @since 2022-11-30
  */
 @Data
 @EqualsAndHashCode(callSuper = true)
-@ApiModel(value = "电计量点表-ProBasicMeterPoint", description = "电计量点表")
 public class ProBasicMeterPoint extends Model {
 
     private static final long serialVersionUID = 1L;
@@ -29,7 +27,7 @@ public class ProBasicMeterPoint extends Model {
     /**
      * 编码
      */
-    private String code;
+    private String nemCode;
 
     /**
      * 使用/排序

+ 1 - 1
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/IProBasicEquipmentService.java

@@ -15,7 +15,7 @@ import java.util.List;
  * @since 2022-10-15
  */
 public interface IProBasicEquipmentService extends IService<ProBasicEquipment> {
-    IPage<ProBasicEquipment> list(String id, String code,  String companyId, String regionId,String windpowerstationId, String projectId, String lineId, String substationId,String pageNum, String pageSize);
+    IPage<ProBasicEquipment> list(String id, String nemCode,  String companyId, String regionId,String windpowerstationId, String projectId, String lineId, String substationId,String pageNum, String pageSize);
 
     List<ProBasicEquipment> getWindturbineGyLine(String windpowerstationId, String projectId , String lineId);
 

+ 1 - 1
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/IProBasicLineService.java

@@ -15,7 +15,7 @@ import java.util.List;
  * @since 2022-10-15
  */
 public interface IProBasicLineService extends IService<ProBasicLine> {
-    IPage<ProBasicLine> list(String id,String code, String name, String aname,String projectId, String pageNum, String pageSize);
+    IPage<ProBasicLine> list(String id,String nemCode, String name, String aname,String projectId, String pageNum, String pageSize);
 
     List<ProBasicLine> getList(String projectId);
 }

+ 1 - 1
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/IProBasicMeterPointService.java

@@ -13,5 +13,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
  * @since 2022-10-15
  */
 public interface IProBasicMeterPointService extends IService<ProBasicMeterPoint> {
-    IPage<ProBasicMeterPoint> list(String id, String code, String windpowerstationId, String name, String pageNum, String pageSize);
+    IPage<ProBasicMeterPoint> list(String id, String nemCode, String windpowerstationId, String name, String pageNum, String pageSize);
 }

+ 1 - 1
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/IProBasicProjectService.java

@@ -15,7 +15,7 @@ import java.util.List;
  * @since 2022-10-15
  */
 public interface IProBasicProjectService extends IService<ProBasicProject> {
-    IPage<ProBasicProject> getList(String id, String name, String code, String windpowerstationId,String windsubStationId, String pageNum, String pageSize);
+    IPage<ProBasicProject> getList(String id, String name, String nemCode, String windpowerstationId,String windsubStationId, String pageNum, String pageSize);
 
     List<ProBasicProject> getList(String windpowerstationId);
 }

+ 18 - 1
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/SttreeService.java

@@ -90,7 +90,7 @@ public class SttreeService {
         List<ProBasicPowerstation> wpls = CacheContext.wpls;//场站
         List<ProBasicProject> prols = CacheContext.prols;//期次
         List<ProBasicLine> list = CacheContext.lines;//线路
-        List<ProBasicEquipment> wbls = CacheContext.equipments;//线路
+        List<ProBasicEquipment> wbls = CacheContext.equipments;//风机
 
 //        if (energyls.get(0).getChildren().size() > 0) return energyls;
 
@@ -152,4 +152,21 @@ public class SttreeService {
 
         return regionsls;
     }
+
+    public List<ProBasicPowerstation> Projecttree() {
+        List<ProBasicPowerstation> wpls = CacheContext.wpls;//场站
+        List<ProBasicProject> prols = CacheContext.prols;//期次
+        List<ProBasicLine> list = CacheContext.lines;//线路
+        List<ProBasicEquipment> wbls = CacheContext.equipments;//风机
+        //场站-期次
+        wpls.forEach(pl -> {
+            List<ProBasicProject> cz = prols.stream().filter(p -> null != p.getWindpowerstationId() &&
+                    p.getWindpowerstationId().equals(pl.getId())).collect(Collectors.toList());
+            cz.stream().forEach(c -> {
+                c.getChildren().clear();
+            });
+            pl.getChildren().addAll(cz);
+        });
+        return wpls;
+    }
 }

+ 2 - 2
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/impl/ProBasicCompanyServiceImpl.java

@@ -31,10 +31,10 @@ public class ProBasicCompanyServiceImpl extends ServiceImpl<ProBasicCompanyMappe
             qw.eq("id", id);
         }
         if (StringUtils.isNotEmpty(groupId)) {
-            qw.eq("group_id", groupId);
+            qw.eq("groupId", groupId);
         }
         if (StringUtils.isNotEmpty(regionId)) {
-            qw.eq("region_id", regionId);
+            qw.eq("regionId", regionId);
         }
 
         if (StringUtils.isNotEmpty(name)) {

+ 5 - 5
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/impl/ProBasicEquipmentServiceImpl.java

@@ -24,19 +24,19 @@ import java.util.List;
 public class ProBasicEquipmentServiceImpl extends ServiceImpl<ProBasicEquipmentMapper, ProBasicEquipment> implements IProBasicEquipmentService {
 
     @Override
-    public IPage<ProBasicEquipment> list(String id, String code,  String companyId, String regionId,String windpowerstationId, String projectId, String lineId, String substationId,String pageNum, String pageSize) {
+    public IPage<ProBasicEquipment> list(String id, String nemCode,  String companyId, String regionId,String windpowerstationId, String projectId, String lineId, String substationId,String pageNum, String pageSize) {
         QueryWrapper<ProBasicEquipment> qw = new QueryWrapper<>();
         if (StringUtils.isNotEmpty(id)){
             qw.eq("id",id);
         }
-        if (StringUtils.isNotEmpty(code)){
-            qw.like("nem_code",code);
+        if (StringUtils.isNotEmpty(nemCode)){
+            qw.like("nemCode",nemCode);
         }
         if (StringUtils.isNotEmpty(companyId)) {
-            qw.eq("company_id", companyId);
+            qw.eq("companyId", companyId);
         }
         if (StringUtils.isNotEmpty(regionId)) {
-            qw.eq("region_id", regionId);
+            qw.eq("regionId", regionId);
         }
 
         if (StringUtils.isNotEmpty(windpowerstationId)){

+ 3 - 3
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/impl/ProBasicLineServiceImpl.java

@@ -24,7 +24,7 @@ import java.util.List;
 public class ProBasicLineServiceImpl extends ServiceImpl<ProBasicLineMapper, ProBasicLine> implements IProBasicLineService {
 
     @Override
-    public IPage<ProBasicLine> list(String id, String code, String name, String aname, String projectId,String pageNum, String pageSize) {
+    public IPage<ProBasicLine> list(String id, String nemCode, String name, String aname, String projectId,String pageNum, String pageSize) {
         QueryWrapper<ProBasicLine> qw = new QueryWrapper<>();
         if (StringUtils.isNotEmpty(id)) {
             qw.lambda().eq(ProBasicLine::getId, id);
@@ -34,8 +34,8 @@ public class ProBasicLineServiceImpl extends ServiceImpl<ProBasicLineMapper, Pro
             qw.lambda().eq(ProBasicLine::getProjectId, projectId);
         }
 
-        if (StringUtils.isNotEmpty(code)) {
-            qw.lambda().like(ProBasicLine::getNemCode, code);
+        if (StringUtils.isNotEmpty(nemCode)) {
+            qw.lambda().like(ProBasicLine::getNemCode, nemCode);
         }
 
         if (StringUtils.isNotEmpty(name)) {

+ 3 - 3
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/impl/ProBasicMeterPointServiceImpl.java

@@ -22,13 +22,13 @@ import org.springframework.stereotype.Service;
 public class ProBasicMeterPointServiceImpl extends ServiceImpl<ProBasicMeterPointMapper, ProBasicMeterPoint> implements IProBasicMeterPointService {
 
     @Override
-    public IPage<ProBasicMeterPoint> list(String id, String code, String windpowerstationId, String name, String pageNum, String pageSize) {
+    public IPage<ProBasicMeterPoint> list(String id, String nemCode, String windpowerstationId, String name, String pageNum, String pageSize) {
         QueryWrapper<ProBasicMeterPoint> qw = new QueryWrapper<>();
         if (StringUtils.isNotEmpty(id)) {
             qw.eq("id", id);
         }
-        if (StringUtils.isNotEmpty(code)) {
-            qw.like("code", code);
+        if (StringUtils.isNotEmpty(nemCode)) {
+            qw.like("nemCode", nemCode);
         }
         if (StringUtils.isNotEmpty(windpowerstationId)) {
             qw.like("windpowerstation_id", windpowerstationId);

+ 3 - 3
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/impl/ProBasicProjectServiceImpl.java

@@ -24,15 +24,15 @@ import java.util.List;
 public class ProBasicProjectServiceImpl extends ServiceImpl<ProBasicProjectMapper, ProBasicProject> implements IProBasicProjectService {
 
     @Override
-    public IPage<ProBasicProject> getList(String id, String name, String code, String windpowerstationId, String windsubStationId,String pageNum, String pageSize) {
+    public IPage<ProBasicProject> getList(String id, String name, String nemCode, String windpowerstationId, String windsubStationId,String pageNum, String pageSize) {
         QueryWrapper<ProBasicProject> qw = new QueryWrapper<>();
 
         if (StringUtils.isNotEmpty(id)){
             qw.eq("id",id);
         }
 
-        if (StringUtils.isNotEmpty(code)){
-            qw.like("nem_code",code);
+        if (StringUtils.isNotEmpty(nemCode)){
+            qw.like("nem_code",nemCode);
         }
 
         if (StringUtils.isNotEmpty(name)){

+ 3 - 3
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/impl/ProBasicRegionServiceImpl.java

@@ -23,7 +23,7 @@ import org.springframework.stereotype.Service;
 public class ProBasicRegionServiceImpl extends ServiceImpl<ProBasicRegionMapper, ProBasicRegion> implements IProBasicRegionService {
 
     @Override
-    public IPage<ProBasicRegion> list(String id, String name, String aname, String code,String pageNum, String pageSize) {
+    public IPage<ProBasicRegion> list(String id, String name, String aname, String nemCode,String pageNum, String pageSize) {
         QueryWrapper<ProBasicRegion> qw = new QueryWrapper<>();
 
         if (StringUtils.isNotEmpty(id)){
@@ -37,8 +37,8 @@ public class ProBasicRegionServiceImpl extends ServiceImpl<ProBasicRegionMapper,
         if (StringUtils.isNotEmpty(aname)){
             qw.like("aname",aname);
         }
-        if (StringUtils.isNotEmpty(code)){
-            qw.like("nem_code",code);
+        if (StringUtils.isNotEmpty(nemCode)){
+            qw.like("nemCode",nemCode);
         }
 
         Page<ProBasicRegion> page = new Page<>(Integer.parseInt(pageNum),Integer.parseInt(pageSize));