learshaw пре 3 месеци
родитељ
комит
995b363d7f

+ 0 - 101
ems/ems-application/ems-admin/src/main/java/com/ruoyi/web/controller/ems/DeviceComponentController.java

@@ -1,101 +0,0 @@
-package com.ruoyi.web.controller.ems;
-
-import com.huashe.common.domain.AjaxResult;
-import com.ruoyi.common.annotation.Log;
-import com.ruoyi.common.core.controller.BaseController;
-import com.ruoyi.common.core.page.TableDataInfo;
-import com.ruoyi.common.enums.BusinessType;
-import com.ruoyi.ems.domain.EmsDeviceComponent;
-import com.ruoyi.ems.service.IEmsDeviceComponentService;
-import io.swagger.annotations.Api;
-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.PathVariable;
-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-09-23
- */
-@RestController
-@RequestMapping("/ems/device/component")
-@Api(value = "DeviceController", description = "设备部件管理")
-public class DeviceComponentController extends BaseController {
-    @Autowired
-    private IEmsDeviceComponentService componentService;
-
-    /**
-     * 查询能源设备部件列表
-     */
-    @GetMapping("/list")
-    public TableDataInfo list(EmsDeviceComponent component) {
-        startPage();
-        List<EmsDeviceComponent> list = componentService.selectList(component);
-        return getDataTable(list);
-    }
-
-    /**
-     * 查询能源设备部件列表
-     *
-     * @param deviceCode 设备编号
-     * @return AjaxResult
-     */
-    @GetMapping("/listByDevice")
-    public AjaxResult list(@RequestParam(name = "deviceCode") String deviceCode) {
-        List<EmsDeviceComponent> list = componentService.selectByDeviceCode(deviceCode);
-        return success(list);
-    }
-
-    /**
-     * 获取能源设备部件详细信息
-     */
-    @GetMapping(value = "/{id}")
-    public AjaxResult getInfo(@PathVariable("id") Long id) {
-        return success(componentService.selectById(id));
-    }
-
-    /**
-     * 获取能源设备部件详细信息
-     */
-    @GetMapping(value = "/getByCode")
-    public AjaxResult getByCode(@RequestParam("compoCode") String compoCode) {
-        return success(componentService.selectByCode(compoCode));
-    }
-
-    /**
-     * 新增能源设备部件
-     */
-    @Log(title = "能源设备部件", businessType = BusinessType.INSERT)
-    @PostMapping
-    public AjaxResult add(@RequestBody EmsDeviceComponent component) {
-        return toAjax(componentService.insertComponent(component));
-    }
-
-    /**
-     * 修改能源设备部件
-     */
-    @Log(title = "能源设备部件", businessType = BusinessType.UPDATE)
-    @PutMapping
-    public AjaxResult edit(@RequestBody EmsDeviceComponent component) {
-        return toAjax(componentService.updateComponent(component));
-    }
-
-    /**
-     * 删除能源设备部件
-     */
-    @Log(title = "能源设备部件", businessType = BusinessType.DELETE)
-    @DeleteMapping("/{ids}")
-    public AjaxResult remove(@PathVariable Long[] ids) {
-        return toAjax(componentService.deleteComponentByIds(ids));
-    }
-}

+ 0 - 10
ems/ems-application/ems-admin/src/main/java/com/ruoyi/web/controller/ems/EmsObjAttrController.java

@@ -8,12 +8,10 @@ import com.ruoyi.common.core.page.TableDataInfo;
 import com.ruoyi.common.enums.BusinessType;
 import com.ruoyi.common.exception.Assert;
 import com.ruoyi.ems.domain.EmsDevice;
-import com.ruoyi.ems.domain.EmsDeviceComponent;
 import com.ruoyi.ems.domain.EmsFacs;
 import com.ruoyi.ems.domain.EmsObjAttr;
 import com.ruoyi.ems.domain.EmsObjAttrValue;
 import com.ruoyi.ems.enums.DevObjType;
-import com.ruoyi.ems.service.IEmsDeviceComponentService;
 import com.ruoyi.ems.service.IEmsDeviceService;
 import com.ruoyi.ems.service.IEmsFacsService;
 import com.ruoyi.ems.service.IEmsObjAttrService;
@@ -56,9 +54,6 @@ public class EmsObjAttrController extends BaseController {
     @Autowired
     private IEmsFacsService facsService;
 
-    @Autowired
-    private IEmsDeviceComponentService componentService;
-
     /**
      * 查询能源对象属性列表
      */
@@ -98,11 +93,6 @@ public class EmsObjAttrController extends BaseController {
                 Assert.notNull(device, -1, "能源设备不存在");
                 modeCode = device.getDeviceModel();
             }
-            else if (objType == DevObjType.COMPONENT.getCode()) {
-                EmsDeviceComponent devCompo = componentService.selectByCode(objCode);
-                Assert.notNull(devCompo, -1, "设备部件不存在");
-                modeCode = devCompo.getCompoModel();
-            }
 
             JSONObject json = new JSONObject();
             json.put("objType", objType);

+ 0 - 11
ems/ems-application/ems-admin/src/main/java/com/ruoyi/web/controller/ems/EmsObjAttrValueController.java

@@ -6,11 +6,9 @@ import com.ruoyi.common.core.controller.BaseController;
 import com.ruoyi.common.enums.BusinessType;
 import com.ruoyi.common.exception.Assert;
 import com.ruoyi.ems.domain.EmsDevice;
-import com.ruoyi.ems.domain.EmsDeviceComponent;
 import com.ruoyi.ems.domain.EmsFacs;
 import com.ruoyi.ems.domain.EmsObjAttrValue;
 import com.ruoyi.ems.enums.DevObjType;
-import com.ruoyi.ems.service.IEmsDeviceComponentService;
 import com.ruoyi.ems.service.IEmsDeviceService;
 import com.ruoyi.ems.service.IEmsFacsService;
 import com.ruoyi.ems.service.IEmsObjAttrValueService;
@@ -47,9 +45,6 @@ public class EmsObjAttrValueController extends BaseController {
     @Autowired
     private IEmsFacsService facsService;
 
-    @Autowired
-    private IEmsDeviceComponentService componentService;
-
     /**
      * 查询能源对象属性值列表
      */
@@ -117,12 +112,6 @@ public class EmsObjAttrValueController extends BaseController {
             modeCode = device.getDeviceModel();
             cnt = objAttrValueService.deleteByObjCode(modeCode, objCode);
         }
-        else if (objType == DevObjType.COMPONENT.getCode()) {
-            EmsDeviceComponent devCompo = componentService.selectByCode(objCode);
-            Assert.notNull(devCompo, -1, "设备部件不存在");
-            modeCode = devCompo.getCompoModel();
-            cnt = objAttrValueService.deleteByObjCode(modeCode, objCode);
-        }
 
         return toAjax(cnt);
     }

+ 0 - 101
ems/ems-cloud/ems-server/src/main/java/com/ruoyi/ems/controller/DeviceComponentController.java

@@ -1,101 +0,0 @@
-package com.ruoyi.ems.controller;
-
-import com.ruoyi.common.core.web.controller.BaseController;
-import com.huashe.common.domain.AjaxResult;
-import com.ruoyi.common.core.web.page.TableDataInfo;
-import com.ruoyi.common.log.annotation.Log;
-import com.ruoyi.common.log.enums.BusinessType;
-import com.ruoyi.ems.domain.EmsDeviceComponent;
-import com.ruoyi.ems.service.IEmsDeviceComponentService;
-import io.swagger.annotations.Api;
-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.PathVariable;
-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-09-23
- */
-@RestController
-@RequestMapping("/device/component")
-@Api(value = "DeviceController", description = "设备部件管理")
-public class DeviceComponentController extends BaseController {
-    @Autowired
-    private IEmsDeviceComponentService componentService;
-
-    /**
-     * 查询能源设备部件列表
-     */
-    @GetMapping("/list")
-    public TableDataInfo list(EmsDeviceComponent component) {
-        startPage();
-        List<EmsDeviceComponent> list = componentService.selectList(component);
-        return getDataTable(list);
-    }
-
-    /**
-     * 查询能源设备部件列表
-     *
-     * @param deviceCode 设备编号
-     * @return AjaxResult
-     */
-    @GetMapping("/listByDevice")
-    public AjaxResult list(@RequestParam(name = "deviceCode") String deviceCode) {
-        List<EmsDeviceComponent> list = componentService.selectByDeviceCode(deviceCode);
-        return success(list);
-    }
-
-    /**
-     * 获取能源设备部件详细信息
-     */
-    @GetMapping(value = "/{id}")
-    public AjaxResult getInfo(@PathVariable("id") Long id) {
-        return success(componentService.selectById(id));
-    }
-
-    /**
-     * 获取能源设备部件详细信息
-     */
-    @GetMapping(value = "/getByCode")
-    public AjaxResult getByCode(@RequestParam("compoCode") String compoCode) {
-        return success(componentService.selectByCode(compoCode));
-    }
-
-    /**
-     * 新增能源设备部件
-     */
-    @Log(title = "能源设备部件", businessType = BusinessType.INSERT)
-    @PostMapping
-    public AjaxResult add(@RequestBody EmsDeviceComponent component) {
-        return toAjax(componentService.insertComponent(component));
-    }
-
-    /**
-     * 修改能源设备部件
-     */
-    @Log(title = "能源设备部件", businessType = BusinessType.UPDATE)
-    @PutMapping
-    public AjaxResult edit(@RequestBody EmsDeviceComponent component) {
-        return toAjax(componentService.updateComponent(component));
-    }
-
-    /**
-     * 删除能源设备部件
-     */
-    @Log(title = "能源设备部件", businessType = BusinessType.DELETE)
-    @DeleteMapping("/{ids}")
-    public AjaxResult remove(@PathVariable Long[] ids) {
-        return toAjax(componentService.deleteComponentByIds(ids));
-    }
-}

+ 0 - 11
ems/ems-cloud/ems-server/src/main/java/com/ruoyi/ems/controller/EmsObjAttrValueController.java

@@ -6,11 +6,9 @@ import com.ruoyi.common.core.web.controller.BaseController;
 import com.ruoyi.common.log.annotation.Log;
 import com.ruoyi.common.log.enums.BusinessType;
 import com.ruoyi.ems.domain.EmsDevice;
-import com.ruoyi.ems.domain.EmsDeviceComponent;
 import com.ruoyi.ems.domain.EmsFacs;
 import com.ruoyi.ems.domain.EmsObjAttrValue;
 import com.ruoyi.ems.enums.DevObjType;
-import com.ruoyi.ems.service.IEmsDeviceComponentService;
 import com.ruoyi.ems.service.IEmsDeviceService;
 import com.ruoyi.ems.service.IEmsFacsService;
 import com.ruoyi.ems.service.IEmsObjAttrValueService;
@@ -47,9 +45,6 @@ public class EmsObjAttrValueController extends BaseController {
     @Autowired
     private IEmsFacsService facsService;
 
-    @Autowired
-    private IEmsDeviceComponentService componentService;
-
     /**
      * 查询能源对象属性值列表
      */
@@ -116,12 +111,6 @@ public class EmsObjAttrValueController extends BaseController {
             modeCode = device.getDeviceModel();
             cnt = objAttrValueService.deleteByObjCode(modeCode, objCode);
         }
-        else if (objType == DevObjType.COMPONENT.getCode()) {
-            EmsDeviceComponent devCompo = componentService.selectByCode(objCode);
-            Assert.notNull(devCompo, -1, "设备部件不存在");
-            modeCode = devCompo.getCompoModel();
-            cnt = objAttrValueService.deleteByObjCode(modeCode, objCode);
-        }
 
         return toAjax(cnt);
     }

+ 0 - 177
ems/ems-core/src/main/java/com/ruoyi/ems/domain/EmsDeviceComponent.java

@@ -1,177 +0,0 @@
-package com.ruoyi.ems.domain;
-
-import com.huashe.common.domain.BaseEntity;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-
-/**
- * 能源设备部件对象 adm_ems_device_component
- * 
- * @author ruoyi
- * @date 2024-09-23
- */
-public class EmsDeviceComponent extends BaseEntity
-{
-    private static final long serialVersionUID = 1L;
-
-    /** 序号 */
-    private Long id;
-
-    /** 设备编码 */
-    private String deviceCode;
-
-    /** 部件编码 */
-    private String compoCode;
-
-    /** 部件标签 */
-    private String compoTag;
-
-    /** 外部系统编码 */
-    private String extCompoCode;
-
-    /**
-     * 工艺代码
-     */
-    private String psCode;
-
-    /** 工艺名称 */
-    private String psName;
-
-    /** 部件模型 */
-    private String compoModel;
-
-    /** 部件品牌 */
-    private String compoBrand;
-
-    /** 部件型号 */
-    private String compoSpec;
-
-    /** 祖籍列表 */
-    private String ancestors;
-
-    /** 上级部件 */
-    private String parentCompo;
-
-    public void setId(Long id) 
-    {
-        this.id = id;
-    }
-
-    public Long getId() 
-    {
-        return id;
-    }
-    public void setDeviceCode(String deviceCode) 
-    {
-        this.deviceCode = deviceCode;
-    }
-
-    public String getDeviceCode() 
-    {
-        return deviceCode;
-    }
-    public void setCompoCode(String compoCode) 
-    {
-        this.compoCode = compoCode;
-    }
-
-    public String getCompoCode() 
-    {
-        return compoCode;
-    }
-
-    public String getCompoTag() {
-        return compoTag;
-    }
-
-    public void setCompoTag(String compoTag) {
-        this.compoTag = compoTag;
-    }
-
-    public void setExtCompoCode(String extCompoCode)
-    {
-        this.extCompoCode = extCompoCode;
-    }
-
-    public String getExtCompoCode() 
-    {
-        return extCompoCode;
-    }
-
-    public String getPsCode() {
-        return psCode;
-    }
-
-    public void setPsCode(String psCode) {
-        this.psCode = psCode;
-    }
-
-    public String getPsName() {
-        return psName;
-    }
-
-    public void setPsName(String psName) {
-        this.psName = psName;
-    }
-
-    public void setCompoModel(String compoModel)
-    {
-        this.compoModel = compoModel;
-    }
-
-    public String getCompoModel() 
-    {
-        return compoModel;
-    }
-    public void setCompoBrand(String compoBrand) 
-    {
-        this.compoBrand = compoBrand;
-    }
-
-    public String getCompoBrand() 
-    {
-        return compoBrand;
-    }
-    public void setCompoSpec(String compoSpec) 
-    {
-        this.compoSpec = compoSpec;
-    }
-
-    public String getCompoSpec() 
-    {
-        return compoSpec;
-    }
-    public void setAncestors(String ancestors) 
-    {
-        this.ancestors = ancestors;
-    }
-
-    public String getAncestors() 
-    {
-        return ancestors;
-    }
-    public void setParentCompo(String parentCompo) 
-    {
-        this.parentCompo = parentCompo;
-    }
-
-    public String getParentCompo() 
-    {
-        return parentCompo;
-    }
-
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("id", getId())
-            .append("deviceCode", getDeviceCode())
-            .append("compoCode", getCompoCode())
-            .append("extCompoCode", getExtCompoCode())
-            .append("compoModel", getCompoModel())
-            .append("compoBrand", getCompoBrand())
-            .append("compoSpec", getCompoSpec())
-            .append("ancestors", getAncestors())
-            .append("parentCompo", getParentCompo())
-            .toString();
-    }
-}

+ 0 - 78
ems/ems-core/src/main/java/com/ruoyi/ems/mapper/EmsDeviceComponentMapper.java

@@ -1,78 +0,0 @@
-package com.ruoyi.ems.mapper;
-
-import com.ruoyi.ems.domain.EmsDeviceComponent;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-
-/**
- * 能源设备部件Mapper接口
- *
- * @author ruoyi
- * @date 2024-09-23
- */
-public interface EmsDeviceComponentMapper {
-    /**
-     * 查询能源设备部件
-     *
-     * @param id 能源设备部件主键
-     * @return 能源设备部件
-     */
-    EmsDeviceComponent selectById(Long id);
-
-    /**
-     * 查询能源设备部件
-     *
-     * @param compoCode 能源设备部件代码
-     * @return 能源设备部件
-     */
-    EmsDeviceComponent selectByCode(@Param("compoCode") String compoCode);
-
-    /**
-     * 查询能源设备部件列表
-     *
-     * @param deviceComponent 能源设备部件
-     * @return 能源设备部件集合
-     */
-    List<EmsDeviceComponent> selectList(EmsDeviceComponent deviceComponent);
-
-    /**
-     * 查询能源设备部件列表
-     *
-     * @param deviceCode 设备代码
-     * @return 能源设备部件集合
-     */
-    List<EmsDeviceComponent> selectByDeviceCode(@Param("deviceCode") String deviceCode);
-
-    /**
-     * 新增能源设备部件
-     *
-     * @param deviceComponent 能源设备部件
-     * @return 结果
-     */
-    int insertComponent(EmsDeviceComponent deviceComponent);
-
-    /**
-     * 修改能源设备部件
-     *
-     * @param deviceComponent 能源设备部件
-     * @return 结果
-     */
-    int updateComponent(EmsDeviceComponent deviceComponent);
-
-    /**
-     * 删除能源设备部件
-     *
-     * @param id 能源设备部件主键
-     * @return 结果
-     */
-    int deleteComponentById(Long id);
-
-    /**
-     * 批量删除能源设备部件
-     *
-     * @param ids 需要删除的数据主键集合
-     * @return 结果
-     */
-    int deleteComponentByIds(Long[] ids);
-}

+ 0 - 77
ems/ems-core/src/main/java/com/ruoyi/ems/service/IEmsDeviceComponentService.java

@@ -1,77 +0,0 @@
-package com.ruoyi.ems.service;
-
-import com.ruoyi.ems.domain.EmsDeviceComponent;
-
-import java.util.List;
-
-/**
- * 能源设备部件Service接口
- *
- * @author ruoyi
- * @date 2024-09-23
- */
-public interface IEmsDeviceComponentService {
-    /**
-     * 查询能源设备部件
-     *
-     * @param id 能源设备部件主键
-     * @return 能源设备部件
-     */
-    EmsDeviceComponent selectById(Long id);
-
-    /**
-     * 查询能源设备部件
-     *
-     * @param componentCode 设备部件代码
-     * @return 能源设备部件
-     */
-    EmsDeviceComponent selectByCode(String componentCode);
-
-    /**
-     * 查询能源设备部件列表
-     *
-     * @param deviceComponent 能源设备部件
-     * @return 能源设备部件集合
-     */
-    List<EmsDeviceComponent> selectList(EmsDeviceComponent deviceComponent);
-
-    /**
-     * 查询能源设备部件列表
-     *
-     * @param deviceCode 设备编号
-     * @return 能源设备部件集合
-     */
-    List<EmsDeviceComponent> selectByDeviceCode(String deviceCode);
-
-    /**
-     * 新增能源设备部件
-     *
-     * @param deviceComponent 能源设备部件
-     * @return 结果
-     */
-    int insertComponent(EmsDeviceComponent deviceComponent);
-
-    /**
-     * 修改能源设备部件
-     *
-     * @param deviceComponent 能源设备部件
-     * @return 结果
-     */
-    int updateComponent(EmsDeviceComponent deviceComponent);
-
-    /**
-     * 批量删除能源设备部件
-     *
-     * @param ids 需要删除的能源设备部件主键集合
-     * @return 结果
-     */
-    int deleteComponentByIds(Long[] ids);
-
-    /**
-     * 删除能源设备部件信息
-     *
-     * @param id 能源设备部件主键
-     * @return 结果
-     */
-    int deleteComponentById(Long id);
-}

+ 0 - 103
ems/ems-core/src/main/java/com/ruoyi/ems/service/impl/EmsDeviceComponentServiceImpl.java

@@ -1,103 +0,0 @@
-package com.ruoyi.ems.service.impl;
-
-import com.ruoyi.ems.domain.EmsDeviceComponent;
-import com.ruoyi.ems.mapper.EmsDeviceComponentMapper;
-import com.ruoyi.ems.service.IEmsDeviceComponentService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-
-/**
- * 能源设备部件Service业务层处理
- *
- * @author ruoyi
- * @date 2024-09-23
- */
-@Service
-public class EmsDeviceComponentServiceImpl implements IEmsDeviceComponentService {
-    @Autowired
-    private EmsDeviceComponentMapper componentMapper;
-
-    /**
-     * 查询能源设备部件
-     *
-     * @param id 能源设备部件主键
-     * @return 能源设备部件
-     */
-    @Override
-    public EmsDeviceComponent selectById(Long id) {
-        return componentMapper.selectById(id);
-    }
-
-    @Override
-    public EmsDeviceComponent selectByCode(String componentCode) {
-        return componentMapper.selectByCode(componentCode);
-    }
-
-    /**
-     * 查询能源设备部件列表
-     *
-     * @param deviceComponent 能源设备部件
-     * @return 能源设备部件
-     */
-    @Override
-    public List<EmsDeviceComponent> selectList(EmsDeviceComponent deviceComponent) {
-        return componentMapper.selectList(deviceComponent);
-    }
-
-    /**
-     * 根据设备编号查询能源设备部件
-     *
-     * @param deviceCode 设备编号
-     * @return 能源设备部件
-     */
-    @Override
-    public List<EmsDeviceComponent> selectByDeviceCode(String deviceCode) {
-        return componentMapper.selectByDeviceCode(deviceCode);
-    }
-
-    /**
-     * 新增能源设备部件
-     *
-     * @param deviceComponent 能源设备部件
-     * @return 结果
-     */
-    @Override
-    public int insertComponent(EmsDeviceComponent deviceComponent) {
-        return componentMapper.insertComponent(deviceComponent);
-    }
-
-    /**
-     * 修改能源设备部件
-     *
-     * @param deviceComponent 能源设备部件
-     * @return 结果
-     */
-    @Override
-    public int updateComponent(EmsDeviceComponent deviceComponent) {
-        return componentMapper.updateComponent(deviceComponent);
-    }
-
-    /**
-     * 批量删除能源设备部件
-     *
-     * @param ids 需要删除的能源设备部件主键
-     * @return 结果
-     */
-    @Override
-    public int deleteComponentByIds(Long[] ids) {
-        return componentMapper.deleteComponentByIds(ids);
-    }
-
-    /**
-     * 删除能源设备部件信息
-     *
-     * @param id 能源设备部件主键
-     * @return 结果
-     */
-    @Override
-    public int deleteComponentById(Long id) {
-        return componentMapper.deleteComponentById(id);
-    }
-}

+ 1 - 9
ems/ems-core/src/main/java/com/ruoyi/ems/service/impl/EmsObjAttrServiceImpl.java

@@ -1,14 +1,12 @@
 package com.ruoyi.ems.service.impl;
 
 import com.ruoyi.ems.domain.EmsDevice;
-import com.ruoyi.ems.domain.EmsDeviceComponent;
 import com.ruoyi.ems.domain.EmsFacs;
 import com.ruoyi.ems.domain.EmsObjAttr;
 import com.ruoyi.ems.domain.EmsObjAttrDto;
 import com.ruoyi.ems.domain.EmsObjAttrEnum;
 import com.ruoyi.ems.enums.DevObjType;
 import com.ruoyi.ems.mapper.EmsObjAttrMapper;
-import com.ruoyi.ems.service.IEmsDeviceComponentService;
 import com.ruoyi.ems.service.IEmsDeviceService;
 import com.ruoyi.ems.service.IEmsFacsService;
 import com.ruoyi.ems.service.IEmsObjAttrEnumService;
@@ -40,9 +38,6 @@ public class EmsObjAttrServiceImpl implements IEmsObjAttrService {
     @Autowired
     private IEmsFacsService facsService;
 
-    @Autowired
-    private IEmsDeviceComponentService componentService;
-
     /**
      * 查询能源对象属性
      *
@@ -217,10 +212,7 @@ public class EmsObjAttrServiceImpl implements IEmsObjAttrService {
             EmsDevice device = deviceService.selectByCode(objCode);
             modeCode = null != device ? device.getDeviceModel() : null;
         }
-        else if (objType == DevObjType.COMPONENT.getCode()) {
-            EmsDeviceComponent devCompo = componentService.selectByCode(objCode);
-            modeCode = null != devCompo ? devCompo.getCompoModel() : null;
-        }
+
         return modeCode;
     }
 }

+ 0 - 112
ems/ems-core/src/main/resources/mapper/ems/EmsDeviceComponentMapper.xml

@@ -1,112 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper
-PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.ruoyi.ems.mapper.EmsDeviceComponentMapper">
-    
-    <resultMap type="com.ruoyi.ems.domain.EmsDeviceComponent" id="DeviceComponentResult">
-        <result property="id"    column="id"    />
-        <result property="deviceCode"      column="device_code"    />
-        <result property="compoCode"       column="compo_code"    />
-        <result property="compoTag"        column="compo_tag"    />
-        <result property="extCompoCode"    column="ext_compo_code"    />
-        <result property="psCode"          column="ps_code"    />
-        <result property="psName"          column="ps_name"    />
-        <result property="compoModel"      column="compo_model"    />
-        <result property="compoBrand"      column="compo_brand"    />
-        <result property="compoSpec"       column="compo_spec"    />
-        <result property="ancestors"       column="ancestors"    />
-        <result property="parentCompo"     column="parent_compo"    />
-    </resultMap>
-
-    <sql id="selectComponentVo">
-        select id, device_code, compo_code, compo_tag, ps_code, ext_compo_code, compo_model, compo_brand, compo_spec, ancestors, parent_compo from adm_ems_device_component
-    </sql>
-
-    <select id="selectList" parameterType="com.ruoyi.ems.domain.EmsDeviceComponent" resultMap="DeviceComponentResult">
-        <include refid="selectComponentVo"/>
-        <where>  
-            <if test="deviceCode != null  and deviceCode != ''"> and device_code = #{deviceCode}</if>
-            <if test="compoCode != null  and compoCode != ''"> and compo_code = #{compoCode}</if>
-            <if test="psCode != null  and psCode != ''"> and ps_code = #{psCode}</if>
-            <if test="extCompoCode != null  and extCompoCode != ''"> and ext_compo_code = #{extCompoCode}</if>
-            <if test="compoModel != null  and compoModel != ''"> and compo_model = #{compoModel}</if>
-            <if test="parentCompo != null  and parentCompo != ''"> and parent_compo = #{parentCompo}</if>
-        </where>
-    </select>
-
-    <select id="selectByDeviceCode" parameterType="java.lang.String" resultMap="DeviceComponentResult">
-        select
-            c.id, c.device_code, c.compo_code, c.compo_tag, c.ps_code, c.ext_compo_code, c.compo_model, c.compo_brand, c.compo_spec, c.ancestors, c.parent_compo,
-            p.ps_name
-        from adm_ems_device_component c
-          left join dim_ems_dev_process p on c.ps_code = p.ps_code
-        where device_code = #{deviceCode}
-    </select>
-
-    <select id="selectById" parameterType="Long" resultMap="DeviceComponentResult">
-        <include refid="selectComponentVo"/>
-        where id = #{id}
-    </select>
-
-    <select id="selectByCode"  resultMap="DeviceComponentResult">
-        <include refid="selectComponentVo"/>
-        where compo_code = #{compoCode}
-    </select>
-
-    <insert id="insertComponent" parameterType="com.ruoyi.ems.domain.EmsDeviceComponent" useGeneratedKeys="true" keyProperty="id">
-        insert into adm_ems_device_component
-        <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="deviceCode != null and deviceCode != ''">device_code,</if>
-            <if test="compoCode != null and compoCode != ''">compo_code,</if>
-            <if test="compoTag != null and compoTag != ''">compo_tag,</if>
-            <if test="psCode != null and psCode != ''">ps_code,</if>
-            <if test="extCompoCode != null">ext_compo_code,</if>
-            <if test="compoModel != null">compo_model,</if>
-            <if test="compoBrand != null">compo_brand,</if>
-            <if test="compoSpec != null">compo_spec,</if>
-            <if test="ancestors != null">ancestors,</if>
-            <if test="parentCompo != null">parent_compo,</if>
-         </trim>
-        <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="deviceCode != null and deviceCode != ''">#{deviceCode},</if>
-            <if test="compoCode != null and compoCode != ''">#{compoCode},</if>
-            <if test="compoTag != null and compoTag != ''">#{compoTag},</if>
-            <if test="psCode != null and psCode != ''">#{psCode},</if>
-            <if test="extCompoCode != null">#{extCompoCode},</if>
-            <if test="compoModel != null">#{compoModel},</if>
-            <if test="compoBrand != null">#{compoBrand},</if>
-            <if test="compoSpec != null">#{compoSpec},</if>
-            <if test="ancestors != null">#{ancestors},</if>
-            <if test="parentCompo != null">#{parentCompo},</if>
-         </trim>
-    </insert>
-
-    <update id="updateComponent" parameterType="com.ruoyi.ems.domain.EmsDeviceComponent">
-        update adm_ems_device_component
-        <trim prefix="SET" suffixOverrides=",">
-            <if test="deviceCode != null and deviceCode != ''">device_code = #{deviceCode},</if>
-            <if test="compoCode != null and compoCode != ''">compo_code = #{compoCode},</if>
-            <if test="compoTag != null and compoTag != ''">compo_tag = #{compoTag},</if>
-            <if test="psCode != null and psCode != ''">ps_code = #{psCode},</if>
-            <if test="extCompoCode != null">ext_compo_code = #{extCompoCode},</if>
-            <if test="compoModel != null">compo_model = #{compoModel},</if>
-            <if test="compoBrand != null">compo_brand = #{compoBrand},</if>
-            <if test="compoSpec != null">compo_spec = #{compoSpec},</if>
-            <if test="ancestors != null">ancestors = #{ancestors},</if>
-            <if test="parentCompo != null">parent_compo = #{parentCompo},</if>
-        </trim>
-        where id = #{id}
-    </update>
-
-    <delete id="deleteComponentById" parameterType="Long">
-        delete from adm_ems_device_component where id = #{id}
-    </delete>
-
-    <delete id="deleteComponentByIds" parameterType="String">
-        delete from adm_ems_device_component where id in 
-        <foreach item="id" collection="array" open="(" separator="," close=")">
-            #{id}
-        </foreach>
-    </delete>
-</mapper>

+ 5 - 5
ems/ems-core/src/main/resources/mapper/ems/EmsDeviceMapper.xml

@@ -220,23 +220,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <select id="calcDeviceOnlineSummary">
         SELECT
-            device_status  deviceStatus,
             sc.`name` typeName,
             count( devc.id ) total,
-            SUM( CASE WHEN device_status = '0' THEN 1 ELSE 0 END ) AS onlineCount
+            SUM( CASE WHEN device_status = 1 THEN 1 ELSE 0 END ) AS onlineCount
         FROM
             adm_ems_device devc
-            INNER JOIN dim_ems_facs_subcategory sc ON devc.device_category = sc.`code`
+            LEFT JOIN adm_ems_facs f ON devc.`ref_facs` = f.`facs_code`
+            LEFT JOIN dim_ems_facs_subcategory sc ON f.facs_subcategory = sc.`code`
             <if test="areaCode !=null and areaCode!=''">
                 LEFT JOIN adm_area area ON devc.location_ref = area.area_code
             </if>
         <where>
             <if test="areaCode !=null and areaCode!=''">
-                area.ancestors like CONCAT('%/',#{areaCode},'/%')
+                area.ancestors like CONCAT('%',#{areaCode},'%')
             </if>
         </where>
         GROUP BY
-           device_category
+          facs_subcategory
     </select>
 
 </mapper>

+ 17 - 14
ems/sql/ems_init_data.sql

@@ -228,10 +228,12 @@ INSERT INTO `adm_ems_facs` (`facs_code`, `facs_name`, `facs_category`, `facs_sub
 INSERT INTO `adm_ems_facs` (`facs_code`, `facs_name`, `facs_category`, `facs_subcategory`, `enable`, `ref_area`, `facs_model`) VALUES ('Z102', '北区-室外照明', 'Z', 'Z010', 1, '321283124S3001', null);
 INSERT INTO `adm_ems_facs` (`facs_code`, `facs_name`, `facs_category`, `facs_subcategory`, `enable`, `ref_area`, `facs_model`) VALUES ('Z110', '北区-公共设施', 'Z', 'Z040', 1, '321283124S3001', null);
 INSERT INTO `adm_ems_facs` (`facs_code`, `facs_name`, `facs_category`, `facs_subcategory`, `enable`, `ref_area`, `facs_model`) VALUES ('Z120', '北区-空调设施', 'Z', 'Z020', 1, '321283124S3001', null);
+INSERT INTO `adm_ems_facs` (`facs_code`, `facs_name`, `facs_category`, `facs_subcategory`, `enable`, `ref_area`, `facs_model`) VALUES ('Z130', '北区-充电桩', 'Z', 'Z040', 1, '321283124S3001', null);
 INSERT INTO `adm_ems_facs` (`facs_code`, `facs_name`, `facs_category`, `facs_subcategory`, `enable`, `ref_area`, `facs_model`) VALUES ('Z201', '南区-室内照明', 'Z', 'Z010', 1, '321283124S3002', null);
 INSERT INTO `adm_ems_facs` (`facs_code`, `facs_name`, `facs_category`, `facs_subcategory`, `enable`, `ref_area`, `facs_model`) VALUES ('Z202', '南区-室外照明', 'Z', 'Z010', 1, '321283124S3002', null);
 INSERT INTO `adm_ems_facs` (`facs_code`, `facs_name`, `facs_category`, `facs_subcategory`, `enable`, `ref_area`, `facs_model`) VALUES ('Z210', '南区-公共设施', 'Z', 'Z040', 1, '321283124S3002', null);
 INSERT INTO `adm_ems_facs` (`facs_code`, `facs_name`, `facs_category`, `facs_subcategory`, `enable`, `ref_area`, `facs_model`) VALUES ('Z220', '南区-空调设施', 'Z', 'Z020', 1, '321283124S3002', null);
+INSERT INTO `adm_ems_facs` (`facs_code`, `facs_name`, `facs_category`, `facs_subcategory`, `enable`, `ref_area`, `facs_model`) VALUES ('Z230', '南区-充电桩', 'Z', 'Z040', 1, '321283124S3002', null);
 
 
 -- 策略初始数据
@@ -337,11 +339,13 @@ INSERT INTO `adm_ems_obj_event` (`model_code`, `event_type`, `event_key`, `event
 INSERT INTO `adm_ems_flow_rel` (`export_obj`, `export_obj_type`, `input_obj`, `input_obj_type`, `ems_cls`, `flow_desc`) VALUES ('W201', 1, 'Z101', 1, '45', '供电');
 INSERT INTO `adm_ems_flow_rel` (`export_obj`, `export_obj_type`, `input_obj`, `input_obj_type`, `ems_cls`, `flow_desc`) VALUES ('E501', 1, 'W201', 1, '45', '供电');
 INSERT INTO `adm_ems_flow_rel` (`export_obj`, `export_obj_type`, `input_obj`, `input_obj_type`, `ems_cls`, `flow_desc`) VALUES ('E501', 1, 'Z101', 1, '45', '供电');
-INSERT INTO `adm_ems_flow_rel` (`export_obj`, `export_obj_type`, `input_obj`, `input_obj_type`, `ems_cls`, `flow_desc`) VALUES ('D-B-T-1001', 2, 'D-B-1001', 2, '45', '供电');
-INSERT INTO `adm_ems_flow_rel` (`export_obj`, `export_obj_type`, `input_obj`, `input_obj_type`, `ems_cls`, `flow_desc`) VALUES ('D-B-T-1001', 2, 'D-B-1002', 2, '45', '供电');
-INSERT INTO `adm_ems_flow_rel` (`export_obj`, `export_obj_type`, `input_obj`, `input_obj_type`, `ems_cls`, `flow_desc`) VALUES ('D-N-T-1002', 2, 'D-N-1001', 2, '45', '供电');
-INSERT INTO `adm_ems_flow_rel` (`export_obj`, `export_obj_type`, `input_obj`, `input_obj_type`, `ems_cls`, `flow_desc`) VALUES ('D-N-T-1002', 2, 'D-N-1002', 2, '45', '供电');
-
+INSERT INTO `adm_ems_flow_rel` (`export_obj`, `export_obj_type`, `input_obj`, `input_obj_type`, `ems_cls`, `flow_desc`) VALUES ('D-B-T-1001', 2, 'D-B-AP-10001', 2, '45', '供电');
+INSERT INTO `adm_ems_flow_rel` (`export_obj`, `export_obj_type`, `input_obj`, `input_obj_type`, `ems_cls`, `flow_desc`) VALUES ('D-B-T-1001', 2, 'D-B-AP-10002', 2, '45', '供电');
+INSERT INTO `adm_ems_flow_rel` (`export_obj`, `export_obj_type`, `input_obj`, `input_obj_type`, `ems_cls`, `flow_desc`) VALUES ('D-N-T-1002', 2, 'D-N-AP-10001', 2, '45', '供电');
+INSERT INTO `adm_ems_flow_rel` (`export_obj`, `export_obj_type`, `input_obj`, `input_obj_type`, `ems_cls`, `flow_desc`) VALUES ('D-N-T-1002', 2, 'D-N-AP-10002', 2, '45', '供电');
+INSERT INTO `adm_ems_flow_rel` (`export_obj`, `export_obj_type`, `input_obj`, `input_obj_type`, `ems_cls`, `flow_desc`) VALUES ('D-B-AP-10001', 2, 'D-B-AP-10001-QR_00', 2, '45', '供电');
+INSERT INTO `adm_ems_flow_rel` (`export_obj`, `export_obj_type`, `input_obj`, `input_obj_type`, `ems_cls`, `flow_desc`) VALUES ('D-B-AP-10001', 2, 'D-B-AP-10001-QF_01', 2, '45', '供电');
+INSERT INTO `adm_ems_flow_rel` (`export_obj`, `export_obj_type`, `input_obj`, `input_obj_type`, `ems_cls`, `flow_desc`) VALUES ('D-B-AP-10001', 2, 'D-B-AP-10001-QF_02', 2, '45', '供电');
 
 -- 能源设备
 INSERT INTO `adm_ems_device` (`device_code`, `device_name`, `device_brand`, `device_spec`, `device_status`, `location`, `location_ref`, `area_code`, `device_model`, `ref_facs`, `ps_code`, `subsystem_code`) VALUES ( 'Z010-R101-001', '开水炉',              '美的', 'C10', '2', '开水间', 'B-101', '321283124S3001', null, 'Z110', null, 'SYS_BA');
@@ -451,15 +455,14 @@ INSERT INTO `adm_ems_device` (`device_code`, `device_name`, `device_brand`, `dev
 
 INSERT INTO `adm_ems_device` (`device_code`, `device_name`, `device_brand`, `device_spec`, `device_status`, `location`, `location_ref`, `area_code`, `device_model`, `ref_facs`, `ps_code`, `subsystem_code`) VALUES ('D-B-T-1001', '北区总变',      '西门子', 'T221123', 1, '北区', '321283124S3001', '321283124S3001', 'M_W2_T', 'W201', 'T', null);
 INSERT INTO `adm_ems_device` (`device_code`, `device_name`, `device_brand`, `device_spec`, `device_status`, `location`, `location_ref`, `area_code`, `device_model`, `ref_facs`, `ps_code`, `subsystem_code`) VALUES ('D-N-T-1002', '南区总变',      '西门子', 'T221212', 1, '南区',  '321283124S3002', '321283124S3002', 'M_W2_T', 'W201', 'T', null);
-INSERT INTO `adm_ems_device` (`device_code`, `device_name`, `device_brand`, `device_spec`, `device_status`, `location`, `location_ref`, `area_code`, `device_model`, `ref_facs`, `ps_code`, `subsystem_code`) VALUES ('D-B-1001', '北区-综合楼配电',  '安科瑞', 'DX2121021', 1, '综合楼配电间', '321283124S3001', '321283124S3001', null, 'W201', 'AP', null);
-INSERT INTO `adm_ems_device` (`device_code`, `device_name`, `device_brand`, `device_spec`, `device_status`, `location`, `location_ref`, `area_code`, `device_model`, `ref_facs`, `ps_code`, `subsystem_code`) VALUES ('D-B-1002', '北区-广场配电',    '安科瑞', 'DX2121021', 1, '广场配电柜', '321283124S3001', '321283124S3001',  null, 'W201', 'AP', null);
-INSERT INTO `adm_ems_device` (`device_code`, `device_name`, `device_brand`, `device_spec`, `device_status`, `location`, `location_ref`, `area_code`, `device_model`, `ref_facs`, `ps_code`, `subsystem_code`) VALUES ('D-N-1001', '南区-综合楼配电',  '安科瑞', 'DX2121021', 1, '综合楼配电间', '321283124S3002', '321283124S3002', null, 'W202', 'AP', null);
-INSERT INTO `adm_ems_device` (`device_code`, `device_name`, `device_brand`, `device_spec`, `device_status`, `location`, `location_ref`, `area_code`, `device_model`, `ref_facs`, `ps_code`, `subsystem_code`) VALUES ('D-N-1002', '南区-广场配电',    '安科瑞', 'DX2121021', 1, '广场配电柜',  '321283124S3002', '321283124S3002', null, 'W202', 'AP', null);
-
--- 设备部件表
-INSERT INTO `adm_ems_device_component` (`device_code`, `compo_code`, `compo_tag`, `ps_code`, `ext_compo_code`, `compo_model`, `compo_brand`, `compo_spec`, `ancestors`, `parent_compo`) VALUES ('D-B-1001', 'D-B-1001-QR_00', '总开', 'QR', '0x000101', 'M_W2_QR', '德力西', 'DZ47P-C10', '', '');
-INSERT INTO `adm_ems_device_component` (`device_code`, `compo_code`, `compo_tag`, `ps_code`, `ext_compo_code`, `compo_model`, `compo_brand`, `compo_spec`, `ancestors`, `parent_compo`) VALUES ('D-B-1001', 'D-B-1001-QF_01', '照明', 'QF', '0x000102', 'M_W2_QF', '施耐德', 'NXB-63-C16', 'D-B-1001-QS_00/D-B-1001-QF_01', 'D-B-1001-QS_00');
-INSERT INTO `adm_ems_device_component` (`device_code`, `compo_code`, `compo_tag`, `ps_code`, `ext_compo_code`, `compo_model`, `compo_brand`, `compo_spec`, `ancestors`, `parent_compo`) VALUES ('D-B-1001', 'D-B-1001-QF_02', '风机', 'QF', '0x000103', 'M_W2_QF', '施耐德', 'NXB-63-C16', 'D-B-1001-QS_00/D-B-1001-QF_02', 'D-B-1001-QS_00');
+INSERT INTO `adm_ems_device` (`device_code`, `device_name`, `device_brand`, `device_spec`, `device_status`, `location`, `location_ref`, `area_code`, `device_model`, `ref_facs`, `ps_code`, `subsystem_code`) VALUES ('D-B-AP-10001', '北区-综合楼配电',  '安科瑞', 'DX2121021', 1, '综合楼配电间', '321283124S3001', '321283124S3001', null, 'W201', 'AP', null);
+INSERT INTO `adm_ems_device` (`device_code`, `device_name`, `device_brand`, `device_spec`, `device_status`, `location`, `location_ref`, `area_code`, `device_model`, `ref_facs`, `ps_code`, `subsystem_code`) VALUES ('D-B-AP-10002', '北区-广场配电',    '安科瑞', 'DX2121021', 1, '广场配电柜', '321283124S3001', '321283124S3001',  null, 'W201', 'AP', null);
+INSERT INTO `adm_ems_device` (`device_code`, `device_name`, `device_brand`, `device_spec`, `device_status`, `location`, `location_ref`, `area_code`, `device_model`, `ref_facs`, `ps_code`, `subsystem_code`) VALUES ('D-N-AP-10001', '南区-综合楼配电',  '安科瑞', 'DX2121021', 1, '综合楼配电间', '321283124S3002', '321283124S3002', null, 'W202', 'AP', null);
+INSERT INTO `adm_ems_device` (`device_code`, `device_name`, `device_brand`, `device_spec`, `device_status`, `location`, `location_ref`, `area_code`, `device_model`, `ref_facs`, `ps_code`, `subsystem_code`) VALUES ('D-N-AP-10002', '南区-广场配电',    '安科瑞', 'DX2121021', 1, '广场配电柜',  '321283124S3002', '321283124S3002', null, 'W202', 'AP', null);
+
+INSERT INTO `adm_ems_device` (`device_code`, `device_name`, `device_brand`, `device_spec`, `device_status`, `location`, `location_ref`, `area_code`, `device_model`, `ref_facs`, `ps_code`, `subsystem_code`) VALUES ('D-B-AP-10001-QR_00', '总开',    '施耐德', 'DX2121021', 1, '广场配电柜', '321283124S3001', '321283124S3001',  null, 'W201', 'QR', null);
+INSERT INTO `adm_ems_device` (`device_code`, `device_name`, `device_brand`, `device_spec`, `device_status`, `location`, `location_ref`, `area_code`, `device_model`, `ref_facs`, `ps_code`, `subsystem_code`) VALUES ('D-B-AP-10001-QF_01', '照明',    '施耐德', 'DX2121021', 1, '广场配电柜', '321283124S3001', '321283124S3001',  null, 'W201', 'QR', null);
+INSERT INTO `adm_ems_device` (`device_code`, `device_name`, `device_brand`, `device_spec`, `device_status`, `location`, `location_ref`, `area_code`, `device_model`, `ref_facs`, `ps_code`, `subsystem_code`) VALUES ('D-B-AP-10001-QF_02', '风机',    '施耐德', 'DX2121021', 1, '广场配电柜', '321283124S3001', '321283124S3001',  null, 'W201', 'QR', null);
 
 
 -- 区域&标签关系表

+ 0 - 21
ems/sql/ems_server.sql

@@ -482,27 +482,6 @@ create table adm_ems_device  (
 
 
 -- ----------------------------
--- 能源设备部件表
--- ----------------------------
-drop table if exists adm_ems_device_component;
-create table adm_ems_device_component  (
-  `id`              bigint(20)      not null auto_increment      comment '序号',
-  `device_code`     varchar(64)     not null                     comment '设备编码',
-  `compo_code`      varchar(64)     not null                     comment '部件编码',
-  `compo_tag`       varchar(256)    default null                 comment '部件标签',
-  `ps_code`         varchar(16)     not null                     comment '工艺标识',
-  `ext_compo_code`  varchar(256)    default null                 comment '外部系统编码',
-  `compo_model`     varchar(16)     default null                 comment '部件模型',
-  `compo_brand`     varchar(128)    default null                 comment '部件品牌',
-  `compo_spec`      varchar(128)    default null                 comment '部件型号',
-  `ancestors`       varchar(256)    default null                 comment '祖籍列表',
-  `parent_compo`    varchar(64)     default null                 comment '上级部件',
-  primary key (`id`),
-  unique key ux_device_component(`device_code`,`compo_code`)
-) engine=innodb auto_increment=1 comment = '能源设备部件表';
-
-
--- ----------------------------
 -- 计量设备表
 -- ----------------------------
 drop table if exists adm_meter_device;

+ 8 - 6
ems/sql/ems_sys_data.sql

@@ -39,12 +39,13 @@ insert into sys_menu values ('99', '开发工具', '0', '99', 'tool',
 insert into sys_menu values ('100',  '服务区',         '1',   '1',   '/largeScreen',         'view/servicearea',          '', 1, 0, 'C', '0', '0',   'view:service-area',      'servicearea',    'admin', sysdate(), '', null, '园区能源概览');
 insert into sys_menu values ('101',  '主路光伏',       '1',   '2',   'hp-view-rpv',        'view/road/photovoltaic',    '', 1, 0, 'C', '0', '0',   'view:road-pv',           'photovoltaic',   'admin', sysdate(), '', null, '主路光伏概览');
 
-insert into sys_menu values ('112',  '源网',            '2',    '1',  'strategy-pg',        'mgr/powergrid',             '', 1, 0, 'C', '0', '0',   'power-mgr:pg',           'powergrid',      'admin', sysdate(), '', null, '源网协调');
-insert into sys_menu values ('113',  '储能',            '2',    '2',  'strategy-gs',        'mgr/powerstore',            '', 1, 0, 'C', '0', '0',   'power-mgr:gs',           'powerstore',     'admin', sysdate(), '', null, '网储互动');
-insert into sys_menu values ('114',  '负荷',            '2',    '3',  'strategy-use',       'mgr/poweruse',              '', 1, 0, 'C', '0', '0',   'power-mgr:use',          'powerload',      'admin', sysdate(), '', null, '源荷互动');
-insert into sys_menu values ('115',  '配电',            '2',    '4',  'powerdist',          'mgr/powerdist',             '', 1, 0, 'C', '0', '0',   'power-mgr:dist',         'powerdist',      'admin', sysdate(), '', null, '配电监控');
-insert into sys_menu values ('116',  '计费',            '2',    '5',  'charging',           'mgr/charging',              '', 1, 0, 'C', '0', '0',   'power-mgr:charging',     'charging',       'admin', sysdate(), '', null, '配电监控');
-insert into sys_menu values ('117',  '策略',            '2',    '6',  'strategy-mgr',       'mgr/strategy',              '', 1, 0, 'C', '0', '0',   'power-mgr:strategy',     'strategy',       'admin', sysdate(), '', null, '管能策略');
+insert into sys_menu values ('111',  '源网',            '2',    '1',  'strategy-pg',        'mgr/powergrid',             '', 1, 0, 'C', '0', '0',   'power-mgr:pg',           'powergrid',      'admin', sysdate(), '', null, '源网协调');
+insert into sys_menu values ('112',  '储能',            '2',    '2',  'strategy-gs',        'mgr/powerstore',            '', 1, 0, 'C', '0', '0',   'power-mgr:gs',           'powerstore',     'admin', sysdate(), '', null, '网储互动');
+insert into sys_menu values ('113',  '负荷',            '2',    '3',  'strategy-use',       'mgr/poweruse',              '', 1, 0, 'C', '0', '0',   'power-mgr:use',          'powerload',      'admin', sysdate(), '', null, '源荷互动');
+insert into sys_menu values ('114',  '配电',            '2',    '4',  'powerdist',          'mgr/powerdist',             '', 1, 0, 'C', '0', '0',   'power-mgr:dist',         'powerdist',      'admin', sysdate(), '', null, '配电监控');
+insert into sys_menu values ('115',  '充电桩',          '2',    '5',  'charging-pile',      'mgr/chargingpile',          '', 1, 0, 'C', '0', '0',   'power-mgr:chargingpile', 'chargingpile',   'admin', sysdate(), '', null, '充电桩');
+insert into sys_menu values ('116',  '计费',            '2',    '6',  'charging',           'mgr/charging',              '', 1, 0, 'C', '0', '0',   'power-mgr:charging',     'charging',       'admin', sysdate(), '', null, '计费');
+insert into sys_menu values ('117',  '策略',            '2',    '7',  'strategy-mgr',       'mgr/strategy',              '', 1, 0, 'C', '0', '0',   'power-mgr:strategy',     'strategy',       'admin', sysdate(), '', null, '管能策略');
 
 insert into sys_menu values ('126',  '产能分析',       '3',    '1',  'power-prod',         'analysis/power/prod',       '', 1, 0, 'C', '0', '0',    'analysis:power:prod',    'energyprod',     'admin', sysdate(), '', null, '产能分析');
 insert into sys_menu values ('127',  '储能分析',       '3',    '2',  'power-store',        'analysis/power/store',      '', 1, 0, 'C', '0', '0',    'analysis:power:store',   'energystore',    'admin', sysdate(), '', null, '储能分析');
@@ -351,6 +352,7 @@ INSERT INTO sys_role_menu (`role_id`, `menu_id`) VALUES (2, 113);
 INSERT INTO sys_role_menu (`role_id`, `menu_id`) VALUES (2, 114);
 INSERT INTO sys_role_menu (`role_id`, `menu_id`) VALUES (2, 115);
 INSERT INTO sys_role_menu (`role_id`, `menu_id`) VALUES (2, 116);
+INSERT INTO sys_role_menu (`role_id`, `menu_id`) VALUES (2, 117);
 INSERT INTO sys_role_menu (`role_id`, `menu_id`) VALUES (2, 120);
 INSERT INTO sys_role_menu (`role_id`, `menu_id`) VALUES (2, 121);
 INSERT INTO sys_role_menu (`role_id`, `menu_id`) VALUES (2, 126);