Browse Source

台账管理开发

gao.qiang 2 years ago
parent
commit
9ce44738ce
22 changed files with 1154 additions and 5 deletions
  1. 15 0
      business-service/pom.xml
  2. 109 0
      business-service/src/main/java/com/ozs/service/entity/BaseAccountManagement.java
  3. 58 0
      business-service/src/main/java/com/ozs/service/entity/BaseCameraRelation.java
  4. 58 0
      business-service/src/main/java/com/ozs/service/entity/BaseLineManagement.java
  5. 53 0
      business-service/src/main/java/com/ozs/service/entity/vo/BaseAccountManagementVo.java
  6. 30 0
      business-service/src/main/java/com/ozs/service/entity/vo/BaseLineManagementVo.java
  7. 16 0
      business-service/src/main/java/com/ozs/service/mapper/BaseAccountManagementMapper.java
  8. 16 0
      business-service/src/main/java/com/ozs/service/mapper/BaseCameraRelationMapper.java
  9. 16 0
      business-service/src/main/java/com/ozs/service/mapper/BaseLineManagementMapper.java
  10. 40 0
      business-service/src/main/java/com/ozs/service/service/BaseAccountManagementService.java
  11. 24 0
      business-service/src/main/java/com/ozs/service/service/BaseLineManagementService.java
  12. 131 0
      business-service/src/main/java/com/ozs/service/service/impl/BaseAccountManagementServiceImpl.java
  13. 86 0
      business-service/src/main/java/com/ozs/service/service/impl/BaseLineManagementServiceImpl.java
  14. 5 0
      business-service/src/main/resources/mapper.service/BaseAccountManagementMapper.xml
  15. 5 0
      business-service/src/main/resources/mapper.service/BaseCameraRelationMapper.xml
  16. 5 0
      business-service/src/main/resources/mapper.service/BaseLineManagementMapper.xml
  17. 66 0
      business-service/src/test/java/com/ozs/service/test/CodeGet.java
  18. 193 0
      hazard-admin/src/main/java/com/ozs/web/controller/accountmanagment/BaseAccountManagementController.java
  19. 153 0
      hazard-admin/src/main/java/com/ozs/web/controller/accountmanagment/BaseLineManagementController.java
  20. 8 1
      hazard-admin/src/main/resources/mybatis/mybatis-config.xml
  21. 37 4
      hazard-sdk/src/main/java/com/ozs/controller/upload/GeoHazardMonitorTokenController.java
  22. 30 0
      hazard-sdk/src/main/java/com/ozs/vo/ReqDeviceVo.java

+ 15 - 0
business-service/pom.xml

@@ -18,7 +18,22 @@
             <groupId>com.ozs</groupId>
             <artifactId>base-common</artifactId>
         </dependency>
+        <dependency>
+            <groupId>com.baomidou</groupId>
+            <artifactId>mybatis-plus-generator</artifactId>
+            <version>3.4.1</version>
+        </dependency>
 
+        <dependency>
+            <groupId>org.apache.velocity</groupId>
+            <artifactId>velocity-engine-core</artifactId>
+            <version>2.0</version>
+        </dependency>
+        <!-- Mysql驱动包 -->
+        <dependency>
+            <groupId>mysql</groupId>
+            <artifactId>mysql-connector-java</artifactId>
+        </dependency>
     </dependencies>
 
 </project>

+ 109 - 0
business-service/src/main/java/com/ozs/service/entity/BaseAccountManagement.java

@@ -0,0 +1,109 @@
+package com.ozs.service.entity;
+
+import java.time.LocalDateTime;
+import java.io.Serializable;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.ozs.common.annotation.Excel;
+import com.ozs.common.core.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+/**
+ * <p>
+ * 台账管理表
+ * </p>
+ *
+ * @author ozs
+ * @since 2023-02-17
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+@ApiModel("台账管理表")
+public class BaseAccountManagement extends BaseEntity implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键ID
+     */
+    @TableId(type = IdType.AUTO)
+    private Long accountManagementId;
+
+    /**
+     * 相机编码
+     */
+    @Excel(name = "相机编码")
+    private Long cameraCode;
+
+    /**
+     * 剩余电量
+     */
+    @Excel(name = "剩余电量")
+    private Integer electricity;
+
+    /**
+     * 通道编号
+     */
+    @Excel(name = "通道编号")
+    private Long channel;
+
+    /**
+     * 所属工务段
+     */
+    @Excel(name = "所属工务段")
+    private String publicWorksSection;
+
+    /**
+     * 行别
+     */
+    @Excel(name = "行别")
+    private String lineType;
+
+    /**
+     * 监控相机安装里程位置
+     */
+    @Excel(name = "监控相机安装里程位置")
+    private Integer installMile;
+
+    /**
+     * 监控范围开始里程位置
+     */
+    @Excel(name = "监控范围开始里程位置")
+    private Integer beginMile;
+
+    /**
+     * 监控范围结束里程位置
+     */
+    @Excel(name = "监控范围结束里程位置")
+    private Integer endMile;
+
+    /**
+     * 监视相机经度
+     */
+    @Excel(name = "监视相机经度")
+    private String installLongitude;
+
+    /**
+     * 监视相机纬度
+     */
+    @Excel(name = "监视相机纬度")
+    private String installLatitude;
+    /**
+     * 线路
+     */
+    @Excel(name = "线路")
+    private String line;
+    /**
+     * 相机状态 1正常 2离线
+     */
+    @Excel(name = "相机状态")
+    private Integer cameraState;
+}

+ 58 - 0
business-service/src/main/java/com/ozs/service/entity/BaseCameraRelation.java

@@ -0,0 +1,58 @@
+package com.ozs.service.entity;
+
+import java.time.LocalDateTime;
+import java.io.Serializable;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.ozs.common.core.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+/**
+ * <p>
+ * 台账管理关联表
+ * </p>
+ *
+ * @author ozs
+ * @since 2023-02-17
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+@ApiModel("台账管理关联表")
+public class BaseCameraRelation extends BaseEntity implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键ID
+     */
+    @TableId(type = IdType.AUTO)
+    private Long cameraRelationId;
+
+    /**
+     * 关联类型(0用户1角色2单位)
+     */
+    private Integer relationType;
+
+    /**
+     * 所属ID
+     */
+    private Long relationId;
+
+    /**
+     * 台账管理ID
+     */
+    private Long accountManagementId;
+
+    /**
+     * 报警信息ID
+     */
+    private Long alarmId;
+}

+ 58 - 0
business-service/src/main/java/com/ozs/service/entity/BaseLineManagement.java

@@ -0,0 +1,58 @@
+package com.ozs.service.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+
+import java.time.LocalDateTime;
+import java.io.Serializable;
+
+import com.ozs.common.annotation.Excel;
+import com.ozs.common.core.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+/**
+ * <p>
+ * 线路台账管理表
+ * </p>
+ *
+ * @author ozs
+ * @since 2023-02-17
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+@ApiModel("线路台账管理表")
+public class BaseLineManagement extends BaseEntity implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键ID
+     */
+    @TableId(value = "line_id", type = IdType.AUTO)
+    private Long lineId;
+
+    /**
+     * 编码(四位数字)
+     */
+    @Excel(name = "编码")
+    private Long lineCode;
+
+    /**
+     * 线路类型(普铁/高铁 )
+     */
+    @Excel(name = "线路类型")
+    private Integer lineType;
+
+    /**
+     * 线路名称
+     */
+    @Excel(name = "线路名称")
+    private String lineName;
+}

+ 53 - 0
business-service/src/main/java/com/ozs/service/entity/vo/BaseAccountManagementVo.java

@@ -0,0 +1,53 @@
+package com.ozs.service.entity.vo;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.ozs.common.core.domain.BaseEntity;
+import com.ozs.common.vo.PageVo;
+import io.swagger.annotations.ApiModel;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+
+/**
+ * <p>
+ * 台账管理表
+ * </p>
+ *
+ * @author ozs
+ * @since 2023-02-17
+ */
+@Data
+public class BaseAccountManagementVo extends PageVo implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+    
+    /**
+     * 所属工务段
+     */
+    private String publicWorksSection;
+
+    /**
+     * 行别
+     */
+    private String lineType;
+
+  
+    /**
+     * 线路
+     */
+    private String line;
+
+    /**
+     * 监控范围开始里程位置
+     */
+    private Integer beginMile;
+
+    /**
+     * 监控范围结束里程位置
+     */
+    private Integer endMile;
+}

+ 30 - 0
business-service/src/main/java/com/ozs/service/entity/vo/BaseLineManagementVo.java

@@ -0,0 +1,30 @@
+package com.ozs.service.entity.vo;
+
+
+import com.ozs.common.vo.PageVo;
+import lombok.Data;
+import java.io.Serializable;
+
+/**
+ * <p>
+ * 线路台账管理表
+ * </p>
+ *
+ * @author ozs
+ * @since 2023-02-17
+ */
+@Data
+public class BaseLineManagementVo extends PageVo implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+    
+    /**
+     * 线路类型(普铁/高铁 )
+     */
+    private Integer lineType;
+
+    /**
+     * 线路名称
+     */
+    private String lineName;
+}

+ 16 - 0
business-service/src/main/java/com/ozs/service/mapper/BaseAccountManagementMapper.java

@@ -0,0 +1,16 @@
+package com.ozs.service.mapper;
+
+import com.ozs.service.entity.BaseAccountManagement;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 台账管理表 Mapper 接口
+ * </p>
+ *
+ * @author ozs
+ * @since 2023-02-17
+ */
+public interface BaseAccountManagementMapper extends BaseMapper<BaseAccountManagement> {
+
+}

+ 16 - 0
business-service/src/main/java/com/ozs/service/mapper/BaseCameraRelationMapper.java

@@ -0,0 +1,16 @@
+package com.ozs.service.mapper;
+
+import com.ozs.service.entity.BaseCameraRelation;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 台账管理关联表 Mapper 接口
+ * </p>
+ *
+ * @author ozs
+ * @since 2023-02-17
+ */
+public interface BaseCameraRelationMapper extends BaseMapper<BaseCameraRelation> {
+
+}

+ 16 - 0
business-service/src/main/java/com/ozs/service/mapper/BaseLineManagementMapper.java

@@ -0,0 +1,16 @@
+package com.ozs.service.mapper;
+
+import com.ozs.service.entity.BaseLineManagement;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author ozs
+ * @since 2023-02-17
+ */
+public interface BaseLineManagementMapper extends BaseMapper<BaseLineManagement> {
+
+}

+ 40 - 0
business-service/src/main/java/com/ozs/service/service/BaseAccountManagementService.java

@@ -0,0 +1,40 @@
+package com.ozs.service.service;
+
+import com.ozs.common.core.domain.AjaxResult;
+import com.ozs.service.entity.BaseAccountManagement;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 台账管理表 服务类
+ * </p>
+ *
+ * @author ozs
+ * @since 2023-02-17
+ */
+public interface BaseAccountManagementService extends IService<BaseAccountManagement> {
+    /**
+     * 关联用户
+     * @param accountManagementId
+     * @param roleId
+     * @return
+     */
+    AjaxResult associatedUser(Long accountManagementId, Long roleId);
+
+    /**
+     * 关联用户回显
+     * @param accountManagementId
+     * @return
+     */
+    AjaxResult getRoleId(Long accountManagementId);
+
+    /**
+     * 台账管理导入
+     * @param accountManageList
+     * @param updateSupport
+     * @return
+     */
+    String importBaseAccountManagement(List<BaseAccountManagement> accountManageList, boolean updateSupport);
+}

+ 24 - 0
business-service/src/main/java/com/ozs/service/service/BaseLineManagementService.java

@@ -0,0 +1,24 @@
+package com.ozs.service.service;
+
+import com.ozs.service.entity.BaseLineManagement;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+import java.util.List;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author ozs
+ * @since 2023-02-17
+ */
+public interface BaseLineManagementService extends IService<BaseLineManagement> {
+    /**
+     * 线路台账导入
+     * @param accountManageList
+     * @param updateSupport
+     * @return
+     */
+    String importBaseLineManagement(List<BaseLineManagement> accountManageList, boolean updateSupport);
+}

+ 131 - 0
business-service/src/main/java/com/ozs/service/service/impl/BaseAccountManagementServiceImpl.java

@@ -0,0 +1,131 @@
+package com.ozs.service.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.ozs.common.core.domain.AjaxResult;
+import com.ozs.common.exception.ServiceException;
+import com.ozs.common.utils.bean.BeanValidators;
+import com.ozs.service.entity.BaseAccountManagement;
+import com.ozs.service.entity.BaseCameraRelation;
+import com.ozs.service.mapper.BaseAccountManagementMapper;
+import com.ozs.service.mapper.BaseCameraRelationMapper;
+import com.ozs.service.service.BaseAccountManagementService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.util.ObjectUtils;
+
+import javax.annotation.Resource;
+import javax.validation.Validator;
+import java.util.List;
+
+/**
+ * <p>
+ * 台账管理表 服务实现类
+ * </p>
+ *
+ * @author ozs
+ * @since 2023-02-17
+ */
+@Service
+public class BaseAccountManagementServiceImpl extends ServiceImpl<BaseAccountManagementMapper, BaseAccountManagement> implements BaseAccountManagementService {
+    @Resource
+    BaseCameraRelationMapper baseCameraRelationMapper;
+    @Autowired
+    protected Validator validator;
+    @Resource
+    BaseAccountManagementMapper baseAccountManagementMapper;
+
+    @Override
+    public AjaxResult associatedUser(Long accountManagementId, Long roleId) {
+        BaseCameraRelation baseCameraRelation;
+        int insert = 0;
+        int update = 0;
+        LambdaQueryWrapper<BaseCameraRelation> lw = new LambdaQueryWrapper<BaseCameraRelation>();
+        if (!ObjectUtils.isEmpty(accountManagementId)) {
+            lw.eq(BaseCameraRelation::getAccountManagementId, accountManagementId);
+        }
+        baseCameraRelation = baseCameraRelationMapper.selectOne(lw);
+        if (!ObjectUtils.isEmpty(baseCameraRelation)) {
+            baseCameraRelation.setRelationId(roleId);
+            update = baseCameraRelationMapper.updateById(baseCameraRelation);
+        } else {
+            baseCameraRelation = new BaseCameraRelation();
+            baseCameraRelation.setRelationId(roleId);
+            baseCameraRelation.setAccountManagementId(accountManagementId);
+            baseCameraRelation.setRelationType(1);
+            insert = baseCameraRelationMapper.insert(baseCameraRelation);
+        }
+        if (update > 0 || insert > 0) {
+            return AjaxResult.success();
+        }
+        return AjaxResult.error();
+    }
+
+    @Override
+    public AjaxResult getRoleId(Long accountManagementId) {
+        LambdaQueryWrapper<BaseCameraRelation> lw = new LambdaQueryWrapper<BaseCameraRelation>();
+        if (!ObjectUtils.isEmpty(accountManagementId)) {
+            lw.eq(BaseCameraRelation::getAccountManagementId, accountManagementId);
+        }
+        BaseCameraRelation baseCameraRelation = baseCameraRelationMapper.selectOne(lw);
+        if (!ObjectUtils.isEmpty(baseCameraRelation)) {
+            return AjaxResult.success(baseCameraRelation.getRelationId());
+        } else {
+            return AjaxResult.error();
+        }
+    }
+
+    /**
+     * 台账管理导入
+     *
+     * @param accountManageList 台账相机列表
+     * @param updateSupport     是否更新支持,如果已存在,则进行更新数据
+     * @return
+     */
+    @Override
+    public String importBaseAccountManagement(List<BaseAccountManagement> accountManageList, boolean updateSupport) {
+        if (com.ozs.common.utils.StringUtils.isNull(accountManageList) || accountManageList.size() == 0) {
+            throw new ServiceException("导入台账管理相机信息不能为空!");
+        }
+        int successNum = 0;
+        int failureNum = 0;
+        StringBuilder successMsg = new StringBuilder();
+        StringBuilder failureMsg = new StringBuilder();
+        for (BaseAccountManagement accountManagement : accountManageList) {
+            try {
+                // 判断相机编码是否存在
+                LambdaQueryWrapper<BaseAccountManagement> lw = new LambdaQueryWrapper<BaseAccountManagement>();
+                if (!ObjectUtils.isEmpty(accountManagement.getCameraCode())) {
+                    lw.eq(BaseAccountManagement::getAccountManagementId, accountManagement.getCameraCode());
+                }
+                BaseAccountManagement baseAccountManagement = baseAccountManagementMapper.selectOne(lw);
+                if (!ObjectUtils.isEmpty(baseAccountManagement)) {
+                    BeanValidators.validateWithException(validator, accountManagement);
+                    baseAccountManagementMapper.insert(accountManagement);
+                    successNum++;
+                    successMsg.append("<br/>" + successNum + "、相机编码 " + accountManagement.getCameraCode() + " 导入成功");
+                } else if (updateSupport) {
+                    BeanValidators.validateWithException(validator, accountManagement);
+                    baseAccountManagementMapper.update(accountManagement, lw);
+                    successNum++;
+                    successMsg.append("<br/>" + successNum + "、相机编码 " + accountManagement.getCameraCode() + " 更新成功");
+                } else {
+                    failureNum++;
+                    failureMsg.append("<br/>" + failureNum + "、相机编码 " + accountManagement.getCameraCode() + " 已存在");
+                }
+            } catch (Exception e) {
+                failureNum++;
+                String msg = "<br/>" + failureNum + "、相机编码 " + accountManagement.getCameraCode() + " 导入失败:";
+                failureMsg.append(msg + e.getMessage());
+                log.error(msg, e);
+            }
+        }
+        if (failureNum > 0) {
+            failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:");
+            throw new ServiceException(failureMsg.toString());
+        } else {
+            successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条。");
+        }
+        return successMsg.toString();
+    }
+}

+ 86 - 0
business-service/src/main/java/com/ozs/service/service/impl/BaseLineManagementServiceImpl.java

@@ -0,0 +1,86 @@
+package com.ozs.service.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.ozs.common.exception.ServiceException;
+import com.ozs.common.utils.bean.BeanValidators;
+import com.ozs.service.entity.BaseLineManagement;
+import com.ozs.service.mapper.BaseLineManagementMapper;
+import com.ozs.service.service.BaseLineManagementService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.util.ObjectUtils;
+
+import javax.annotation.Resource;
+import javax.validation.Validator;
+import java.util.List;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author ozs
+ * @since 2023-02-17
+ */
+@Service
+public class BaseLineManagementServiceImpl extends ServiceImpl<BaseLineManagementMapper, BaseLineManagement> implements BaseLineManagementService {
+   
+    @Resource
+    BaseLineManagementMapper baseLineManagementMapper;
+    @Autowired
+    protected Validator validator;
+
+    /**
+     * 导出线路台账
+     * @param accountManageList 线路台账列表
+     * @param updateSupport 是否更新支持,如果已存在,则进行更新数据
+     * @return
+     */
+    @Override
+    public String importBaseLineManagement(List<BaseLineManagement> accountManageList, boolean updateSupport) {
+        if (com.ozs.common.utils.StringUtils.isNull(accountManageList) || accountManageList.size() == 0) {
+            throw new ServiceException("导入线路台账信息不能为空!");
+        }
+        int successNum = 0;
+        int failureNum = 0;
+        StringBuilder successMsg = new StringBuilder();
+        StringBuilder failureMsg = new StringBuilder();
+        for (BaseLineManagement lineManagement : accountManageList) {
+            try {
+                // 判断相机编码是否存在
+                LambdaQueryWrapper<BaseLineManagement> lw = new LambdaQueryWrapper<BaseLineManagement>();
+                if (!ObjectUtils.isEmpty(lineManagement.getLineCode())) {
+                    lw.eq(BaseLineManagement::getLineCode, lineManagement.getLineCode());
+                }
+                BaseLineManagement baseLineManagement = baseLineManagementMapper.selectOne(lw);
+                if (!ObjectUtils.isEmpty(baseLineManagement)) {
+                    BeanValidators.validateWithException(validator, lineManagement);
+                    baseLineManagementMapper.insert(lineManagement);
+                    successNum++;
+                    successMsg.append("<br/>" + successNum + "、线路编码 " + lineManagement.getLineCode() + " 导入成功");
+                } else if (updateSupport) {
+                    BeanValidators.validateWithException(validator, lineManagement);
+                    baseLineManagementMapper.update(lineManagement,lw);
+                    successNum++;
+                    successMsg.append("<br/>" + successNum + "、线路编码 " + lineManagement.getLineCode()  + " 更新成功");
+                } else {
+                    failureNum++;
+                    failureMsg.append("<br/>" + failureNum + "、线路编码 " + lineManagement.getLineCode() + " 已存在");
+                }
+            } catch (Exception e) {
+                failureNum++;
+                String msg = "<br/>" + failureNum + "、线路编码 " + lineManagement.getLineCode() + " 导入失败:";
+                failureMsg.append(msg + e.getMessage());
+                log.error(msg, e);
+            }
+        }
+        if (failureNum > 0) {
+            failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:");
+            throw new ServiceException(failureMsg.toString());
+        } else {
+            successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条。");
+        }
+        return successMsg.toString();
+    }
+}

+ 5 - 0
business-service/src/main/resources/mapper.service/BaseAccountManagementMapper.xml

@@ -0,0 +1,5 @@
+<?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.ozs.service.mapper.BaseAccountManagementMapper">
+
+</mapper>

+ 5 - 0
business-service/src/main/resources/mapper.service/BaseCameraRelationMapper.xml

@@ -0,0 +1,5 @@
+<?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.ozs.service.mapper.BaseCameraRelationMapper">
+
+</mapper>

+ 5 - 0
business-service/src/main/resources/mapper.service/BaseLineManagementMapper.xml

@@ -0,0 +1,5 @@
+<?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.ozs.service.mapper.BaseLineManagementMapper">
+
+</mapper>

+ 66 - 0
business-service/src/test/java/com/ozs/service/test/CodeGet.java

@@ -0,0 +1,66 @@
+package com.ozs.service.test;
+
+
+import com.baomidou.mybatisplus.annotation.DbType;
+import com.baomidou.mybatisplus.generator.AutoGenerator;
+import com.baomidou.mybatisplus.generator.config.DataSourceConfig;
+import com.baomidou.mybatisplus.generator.config.GlobalConfig;
+import com.baomidou.mybatisplus.generator.config.PackageConfig;
+import com.baomidou.mybatisplus.generator.config.StrategyConfig;
+import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy;
+
+public class CodeGet {
+
+    public static void main(String[] args) {
+
+        // 1、创建代码生成器
+        AutoGenerator mpg = new AutoGenerator();
+
+        // 2、全局配置
+        // 全局配置
+        GlobalConfig gc = new GlobalConfig();
+        gc.setOutputDir("D:\\地址灾害\\GeoHazardMonitor\\business-service"+"/src/main/java");
+
+        // IUserService
+        gc.setServiceName("%sService");	//去掉Service接口的首字母I
+        gc.setAuthor("ozs");
+        gc.setOpen(false);
+        mpg.setGlobalConfig(gc);
+
+        // 3、数据源配置
+        DataSourceConfig dsc = new DataSourceConfig();
+        dsc.setUrl("jdbc:mysql://124.70.58.209:1122/hazard?characterEncoding=utf-8&useSSL=false");
+        dsc.setDriverName("com.mysql.cj.jdbc.Driver");
+        dsc.setUsername("admin");
+        dsc.setPassword("106aD>>ql95K5S");
+        dsc.setDbType(DbType.MYSQL);
+        mpg.setDataSource(dsc);
+
+        // 4、包配置
+        PackageConfig pc = new PackageConfig();
+        pc.setParent("com.ozs");
+        pc.setModuleName("service"); //模块名
+        pc.setController("controller");
+        pc.setService("service");
+        pc.setMapper("mapper");
+        mpg.setPackageInfo(pc);
+
+        // 5、策略配置
+        StrategyConfig strategy = new StrategyConfig();
+
+        strategy.setInclude("base_line_management");
+
+        strategy.setNaming(NamingStrategy.underline_to_camel);//数据库表映射到实体的命名策略
+
+        strategy.setColumnNaming(NamingStrategy.underline_to_camel);//数据库表字段映射到实体的命名策略
+        strategy.setEntityLombokModel(true); // lombok 模型 @Accessors(chain = true) setter链式操作
+
+        strategy.setRestControllerStyle(true); //restful api风格控制器
+        strategy.setControllerMappingHyphenStyle(true); //url中驼峰转连字符
+
+        mpg.setStrategy(strategy);
+
+        // 6、执行
+        mpg.execute();
+    }
+}

+ 193 - 0
hazard-admin/src/main/java/com/ozs/web/controller/accountmanagment/BaseAccountManagementController.java

@@ -0,0 +1,193 @@
+package com.ozs.web.controller.accountmanagment;
+
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.ozs.common.core.domain.AjaxResult;
+import com.ozs.common.utils.StringUtils;
+import com.ozs.common.utils.poi.ExcelUtil;
+import com.ozs.service.entity.BaseAccountManagement;
+import com.ozs.service.entity.vo.BaseAccountManagementVo;
+import com.ozs.service.service.BaseAccountManagementService;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.util.ObjectUtils;
+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.RestController;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+
+/**
+ * <p>
+ * 台账管理表 前端控制器
+ * </p>
+ *
+ * @author ozs
+ * @since 2023-02-17
+ */
+@RestController
+@RequestMapping("/service/baseAccountManagement")
+public class BaseAccountManagementController {
+    @Resource
+    BaseAccountManagementService baseAccountManagementService;
+
+    /**
+     * 相机台账管理分页
+     *
+     * @param baseAccountManagementVo
+     * @return
+     */
+    @ApiOperation(value = "相机台账管理分页")
+    @PostMapping("/list")
+    public AjaxResult selectHomeNotice(@RequestBody BaseAccountManagementVo baseAccountManagementVo) {
+        LambdaQueryWrapper<BaseAccountManagement> lw = new LambdaQueryWrapper<BaseAccountManagement>();
+        if (!StringUtils.isBlank(baseAccountManagementVo.getLine())) {
+            lw.eq(BaseAccountManagement::getLine, baseAccountManagementVo.getLine());
+        }
+        if (!StringUtils.isBlank(baseAccountManagementVo.getLineType())) {
+            lw.eq(BaseAccountManagement::getLineType, baseAccountManagementVo.getLineType());
+        }
+        if (!StringUtils.isBlank(baseAccountManagementVo.getPublicWorksSection())) {
+            lw.eq(BaseAccountManagement::getPublicWorksSection, baseAccountManagementVo.getPublicWorksSection());
+        }
+        if (!ObjectUtils.isEmpty(baseAccountManagementVo.getBeginMile())) {
+            lw.ge(BaseAccountManagement::getBeginMile, baseAccountManagementVo.getBeginMile());
+        }
+        if (!ObjectUtils.isEmpty(baseAccountManagementVo.getEndMile())) {
+            lw.le(BaseAccountManagement::getEndMile, baseAccountManagementVo.getEndMile());
+        }
+        IPage<BaseAccountManagement> page = baseAccountManagementService.page(new Page<>(baseAccountManagementVo.getPageNum(), baseAccountManagementVo.getPageSize()), lw);
+        return AjaxResult.success(page);
+    }
+
+    /**
+     * 删除相机信息
+     *
+     * @param accountManagementIds
+     * @return
+     */
+    @DeleteMapping("/{accountManagementIds}")
+    @ApiOperation("删除相机信息")
+    public AjaxResult removeAccountManagement(@PathVariable List<Long> accountManagementIds) {
+        if (baseAccountManagementService.removeByIds(accountManagementIds)) {
+            return AjaxResult.success();
+        }
+        return AjaxResult.error();
+    }
+
+    /**
+     * 新增相机信息
+     *
+     * @param baseAccountManagement
+     * @return
+     */
+    @PostMapping("/saveAccountManagement")
+    @ApiOperation("新增相机信息")
+    public AjaxResult saveDistributionModule(@RequestBody BaseAccountManagement baseAccountManagement) {
+        if (baseAccountManagementService.save(baseAccountManagement)) {
+            return AjaxResult.success();
+        }
+        return AjaxResult.error();
+    }
+
+    /**
+     * 修改相机信息
+     *
+     * @param baseAccountManagement
+     * @return
+     */
+    @PutMapping("/editAccountManagement")
+    @ApiOperation("修改相机信息")
+    public AjaxResult editAccountManagement(@RequestBody BaseAccountManagement baseAccountManagement) {
+        if (baseAccountManagementService.updateById(baseAccountManagement)) {
+            return AjaxResult.success();
+        }
+        return AjaxResult.error();
+    }
+
+    @GetMapping(value = "/{accountManagementId}")
+    @ApiOperation("根据相机ID获取详细信息")
+    public AjaxResult getInfo(@PathVariable Long accountManagementId) {
+        return AjaxResult.success(baseAccountManagementService.getById(accountManagementId));
+    }
+
+    /**
+     * 关联用户
+     *
+     * @param accountManagementId
+     * @param roleId
+     * @return
+     */
+    @GetMapping("/associatedUser/{accountManagementId}/{roleId}")
+    public AjaxResult associatedUser(@PathVariable Long accountManagementId, @PathVariable Long roleId) {
+        return baseAccountManagementService.associatedUser(accountManagementId, roleId);
+    }
+
+    /**
+     * 关联用户回显
+     *
+     * @param accountManagementId
+     * @return
+     */
+    @GetMapping("/getRoleId/{accountManagementId}")
+    public AjaxResult getRoleId(@PathVariable Long accountManagementId) {
+        return baseAccountManagementService.getRoleId(accountManagementId);
+    }
+
+
+    /**
+     * 台账管理导入
+     *
+     * @param file
+     * @param updateSupport
+     * @return
+     * @throws Exception
+     */
+    @ApiOperation("台账管理导入")
+    @PostMapping("/importBaseAccountManagement")
+    public AjaxResult importBaseAccountManagement(MultipartFile file, boolean updateSupport) throws Exception {
+        ExcelUtil<BaseAccountManagement> util = new ExcelUtil<BaseAccountManagement>(BaseAccountManagement.class);
+        List<BaseAccountManagement> AccountManageList = util.importExcel(file.getInputStream());
+        String message = baseAccountManagementService.importBaseAccountManagement(AccountManageList, updateSupport);
+        return AjaxResult.success(message);
+    }
+
+    /**
+     * 导出台账管理
+     *
+     * @param response
+     */
+    @ApiOperation("导出台账管理")
+    @PostMapping("/exportBaseAccountManagement")
+    public void exportBaseAccountManagement(HttpServletResponse response, @RequestBody BaseAccountManagementVo baseAccountManagementVo) {
+        LambdaQueryWrapper<BaseAccountManagement> lw = new LambdaQueryWrapper<BaseAccountManagement>();
+        if (!StringUtils.isBlank(baseAccountManagementVo.getLine())) {
+            lw.eq(BaseAccountManagement::getLine, baseAccountManagementVo.getLine());
+        }
+        if (!StringUtils.isBlank(baseAccountManagementVo.getLineType())) {
+            lw.eq(BaseAccountManagement::getLineType, baseAccountManagementVo.getLineType());
+        }
+        if (!StringUtils.isBlank(baseAccountManagementVo.getPublicWorksSection())) {
+            lw.eq(BaseAccountManagement::getPublicWorksSection, baseAccountManagementVo.getPublicWorksSection());
+        }
+        if (!ObjectUtils.isEmpty(baseAccountManagementVo.getBeginMile())) {
+            lw.ge(BaseAccountManagement::getBeginMile, baseAccountManagementVo.getBeginMile());
+        }
+        if (!ObjectUtils.isEmpty(baseAccountManagementVo.getEndMile())) {
+            lw.le(BaseAccountManagement::getEndMile, baseAccountManagementVo.getEndMile());
+        }
+        List<BaseAccountManagement> list = baseAccountManagementService.list(lw);
+        ExcelUtil<BaseAccountManagement> util = new ExcelUtil<>(BaseAccountManagement.class);
+        util.exportExcel(response, list, "台账管理相机数据");
+    }
+}
+

+ 153 - 0
hazard-admin/src/main/java/com/ozs/web/controller/accountmanagment/BaseLineManagementController.java

@@ -0,0 +1,153 @@
+package com.ozs.web.controller.accountmanagment;
+
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.ozs.common.core.domain.AjaxResult;
+import com.ozs.common.utils.StringUtils;
+import com.ozs.common.utils.poi.ExcelUtil;
+import com.ozs.service.entity.BaseAccountManagement;
+import com.ozs.service.entity.BaseLineManagement;
+import com.ozs.service.entity.vo.BaseAccountManagementVo;
+import com.ozs.service.entity.vo.BaseLineManagementVo;
+import com.ozs.service.service.BaseLineManagementService;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.util.ObjectUtils;
+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.RestController;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+
+/**
+ * <p>
+ * 线路台账管理表前端控制器
+ * </p>
+ *
+ * @author ozs
+ * @since 2023-02-17
+ */
+@RestController
+@RequestMapping("/service/baseLineManagement")
+public class BaseLineManagementController {
+    @Resource
+    BaseLineManagementService baseLineManagementService;
+
+    /**
+     * 线路台账管理分页
+     *
+     * @param baseLineManagementVo
+     * @return
+     */
+    @ApiOperation(value = "线路台账管理分页")
+    @PostMapping("/list")
+    public AjaxResult selectHomeNotice(@RequestBody BaseLineManagementVo baseLineManagementVo) {
+        LambdaQueryWrapper<BaseLineManagement> lw = new LambdaQueryWrapper<BaseLineManagement>();
+        if (!StringUtils.isBlank(baseLineManagementVo.getLineName())) {
+            lw.eq(BaseLineManagement::getLineName, baseLineManagementVo.getLineName());
+        }
+        if (!ObjectUtils.isEmpty(baseLineManagementVo.getLineType())) {
+            lw.like(BaseLineManagement::getLineType, "%" + baseLineManagementVo.getLineType() + "%");
+        }
+        IPage<BaseLineManagement> page = baseLineManagementService.page(new Page<BaseLineManagement>(baseLineManagementVo.getPageNum(), baseLineManagementVo.getPageSize()), lw);
+        return AjaxResult.success(page);
+    }
+
+    /**
+     * 删除线路台账信息
+     *
+     * @param lineIds
+     * @return
+     */
+    @DeleteMapping("/{lineIds}")
+    @ApiOperation("删除线路台账信息")
+    public AjaxResult removeLineManagement(@PathVariable List<Long> lineIds) {
+        if (baseLineManagementService.removeByIds(lineIds)) {
+            return AjaxResult.success();
+        }
+        return AjaxResult.error();
+    }
+
+    /**
+     * 新增线路台账信息
+     *
+     * @param baseLineManagement
+     * @return
+     */
+    @PostMapping("/saveLineManagement")
+    @ApiOperation("新增线路台账信息")
+    public AjaxResult saveLineManagement(@RequestBody BaseLineManagement baseLineManagement) {
+        if (baseLineManagementService.save(baseLineManagement)) {
+            return AjaxResult.success();
+        }
+        return AjaxResult.error();
+    }
+
+    /**
+     * 修改线路台账信息
+     *
+     * @param baseLineManagement
+     * @return
+     */
+    @PutMapping("/editLineManagement")
+    @ApiOperation("修改线路台账信息")
+    public AjaxResult editLineManagement(@RequestBody BaseLineManagement baseLineManagement) {
+        if (baseLineManagementService.updateById(baseLineManagement)) {
+            return AjaxResult.success();
+        }
+        return AjaxResult.error();
+    }
+
+    @GetMapping(value = "/{lineId}")
+    @ApiOperation("根据台账ID获取详细信息")
+    public AjaxResult getInfo(@PathVariable Long lineId) {
+        return AjaxResult.success(baseLineManagementService.getById(lineId));
+    }
+
+    /**
+     * 线路台账导入
+     *
+     * @param file
+     * @param updateSupport
+     * @return
+     * @throws Exception
+     */
+    @ApiOperation("线路台账导入")
+    @PostMapping("/importBaseLineManagement")
+    public AjaxResult importBaseLineManagement(MultipartFile file, boolean updateSupport) throws Exception {
+        ExcelUtil<BaseLineManagement> util = new ExcelUtil<BaseLineManagement>(BaseLineManagement.class);
+        List<BaseLineManagement> AccountManageList = util.importExcel(file.getInputStream());
+        String message = baseLineManagementService.importBaseLineManagement(AccountManageList, updateSupport);
+        return AjaxResult.success(message);
+    }
+
+    /**
+     * 导出线路台账
+     *
+     * @param response
+     */
+    @ApiOperation("导出线路台账")
+    @PostMapping("/exportBaseLineManagement")
+    public void exportBaseLineManagement(HttpServletResponse response, @RequestBody BaseLineManagementVo baseLineManagementVo) {
+        LambdaQueryWrapper<BaseLineManagement> lw = new LambdaQueryWrapper<BaseLineManagement>();
+        if (!StringUtils.isBlank(baseLineManagementVo.getLineName())) {
+            lw.eq(BaseLineManagement::getLineName, baseLineManagementVo.getLineName());
+        }
+        if (!ObjectUtils.isEmpty(baseLineManagementVo.getLineType())) {
+            lw.like(BaseLineManagement::getLineType, "%" + baseLineManagementVo.getLineType() + "%");
+        }
+        List<BaseLineManagement> list = baseLineManagementService.list(lw);
+        ExcelUtil<BaseLineManagement> util = new ExcelUtil<>(BaseLineManagement.class);
+        util.exportExcel(response, list, "线路台账数据");
+    }
+}
+

+ 8 - 1
hazard-admin/src/main/resources/mybatis/mybatis-config.xml

@@ -16,5 +16,12 @@ PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
         <!-- 使用驼峰命名法转换字段 -->
 		<!-- <setting name="mapUnderscoreToCamelCase" value="true"/> -->
 	</settings>
-	
+
+    <plugins>
+        <!--        配置分页插件-->
+        <plugin interceptor="com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor">
+            <property name="@page" value="com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor"/>
+            <property name="page:dbType" value="MYSQL"/>
+        </plugin>
+    </plugins>
 </configuration>

+ 37 - 4
hazard-sdk/src/main/java/com/ozs/controller/upload/GeoHazardMonitorTokenController.java

@@ -1,11 +1,17 @@
 package com.ozs.controller.upload;
 
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.ozs.common.core.domain.Result;
 import com.ozs.common.utils.ApiTokenUtils;
 import com.ozs.common.utils.StringUtils;
+import com.ozs.service.entity.BaseAccountManagement;
+import com.ozs.service.service.BaseAccountManagementService;
+import com.ozs.vo.ReqDeviceVo;
 import com.ozs.vo.ReqMsgAlarmVo;
 import com.ozs.vo.RespGeoHazardMonitorVo;
 import com.ozs.vo.RespMsgAlarmVo;
+import org.springframework.util.ObjectUtils;
+import org.springframework.util.SimpleIdGenerator;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestParam;
@@ -13,6 +19,8 @@ import org.springframework.web.bind.annotation.RestController;
 
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 
 /**
@@ -25,6 +33,8 @@ public class GeoHazardMonitorTokenController {
 
     @Resource
     private ApiTokenUtils apiTokenUtils;
+    @Resource
+    BaseAccountManagementService baseAccountManagementService;
 
     /**
      * 获取访问令牌
@@ -36,8 +46,8 @@ public class GeoHazardMonitorTokenController {
      */
     @PostMapping("/IPAddress/token")
     public Result getToken(@RequestParam("grantType") String grantType,
-                        @RequestParam("clientId") String clientId,
-                        @RequestParam("clientSecret") String clientSecret) {
+                           @RequestParam("clientId") String clientId,
+                           @RequestParam("clientSecret") String clientSecret) {
         // 生成令牌
         ArrayList<String> objects = apiTokenUtils.createGeoHazardMonitorToken();
         if (objects.size() > 0) {
@@ -52,14 +62,14 @@ public class GeoHazardMonitorTokenController {
     }
 
     /**
-     * 数据传输
+     * 报警信息数据传输
      *
      * @param reqMsgAlarmVo
      * @return
      */
     @PostMapping("/IPAddress/alarm")
     public Result alarm(@RequestBody ReqMsgAlarmVo reqMsgAlarmVo,
-                                     HttpServletRequest request) {
+                        HttpServletRequest request) {
         // 生成令牌
         String token = apiTokenUtils.getGeoHazardMonitorToken(request);
         if (StringUtils.isNotEmpty(token)) {
@@ -73,4 +83,27 @@ public class GeoHazardMonitorTokenController {
             return new Result(2, "失败", "生成token失败!!");
         }
     }
+
+
+    /**
+     * 设备状态数据传输
+     *
+     * @param reqDeviceVo
+     * @return
+     */
+    @PostMapping("/IPAddress /device/state")
+    public Result deviceState(@RequestBody ReqDeviceVo reqDeviceVo) throws ParseException {
+        LambdaQueryWrapper<BaseAccountManagement> lw = new LambdaQueryWrapper<BaseAccountManagement>();
+        if (!ObjectUtils.isEmpty(reqDeviceVo.getCameraCode())) {
+            lw.eq(BaseAccountManagement::getCameraCode, reqDeviceVo.getCameraCode());
+        }
+        BaseAccountManagement baseAccountManagement = baseAccountManagementService.getOne(lw);
+        baseAccountManagement.setElectricity(Integer.valueOf(reqDeviceVo.getElectricity()));
+        baseAccountManagement.setCameraState(Integer.valueOf(reqDeviceVo.getCameraState()));
+        baseAccountManagement.setUpdateTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(reqDeviceVo.getTime()));
+        if (baseAccountManagementService.updateById(baseAccountManagement)) {
+            return new Result(1, "成功");
+        }
+        return new Result(2, "失败");
+    }
 }

+ 30 - 0
hazard-sdk/src/main/java/com/ozs/vo/ReqDeviceVo.java

@@ -0,0 +1,30 @@
+package com.ozs.vo;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @author Administrator
+ */
+@Data
+public class ReqDeviceVo implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+    /**
+     * 相机编码
+     */
+    private Integer cameraCode;
+    /**
+     * 时间
+     */
+    private String time;
+    /**
+     * 剩余电量
+     */
+    private String electricity;
+    /**
+     * 相机状态 1正常 2离线
+     */
+    private String cameraState;
+}