11 changed files with 533 additions and 0 deletions
@ -0,0 +1,142 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.epmet.dto.result.yt; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 监控设备表 |
||||
|
* |
||||
|
* @author elink elink@elink-cn.com |
||||
|
* @since v1.0.0 2023-10-18 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class IcMonitoringDeviceDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 主键 |
||||
|
*/ |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 客户id |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 监控设备名称 |
||||
|
*/ |
||||
|
private String deviceName; |
||||
|
|
||||
|
/** |
||||
|
* 监控设备编码 |
||||
|
*/ |
||||
|
private String deviceCode; |
||||
|
|
||||
|
/** |
||||
|
* 状态,1:在线,0:离线 |
||||
|
*/ |
||||
|
private String deviceStatus; |
||||
|
|
||||
|
/** |
||||
|
* 设备类型,1:球机,2:半球,3: |
||||
|
固定枪机,5:卡口枪机,53:其他 |
||||
|
*/ |
||||
|
private String deviceType; |
||||
|
|
||||
|
/** |
||||
|
* 摄像头详细地址 |
||||
|
*/ |
||||
|
private String deviceAddress; |
||||
|
|
||||
|
/** |
||||
|
* 备注 |
||||
|
*/ |
||||
|
private String remark; |
||||
|
|
||||
|
/** |
||||
|
* 中心点位:经度 |
||||
|
*/ |
||||
|
private String longitude; |
||||
|
|
||||
|
/** |
||||
|
* 中心点位:纬度 |
||||
|
*/ |
||||
|
private String latitude; |
||||
|
|
||||
|
/** |
||||
|
* 组织id |
||||
|
*/ |
||||
|
private String agencyId; |
||||
|
|
||||
|
/** |
||||
|
* 上级组织id |
||||
|
*/ |
||||
|
private String parentAgencyId; |
||||
|
|
||||
|
/** |
||||
|
* 组织的所有上级组织id |
||||
|
*/ |
||||
|
private String agencyPids; |
||||
|
|
||||
|
/** |
||||
|
* 网格id |
||||
|
*/ |
||||
|
private String gridId; |
||||
|
|
||||
|
/** |
||||
|
* 网格名称 |
||||
|
*/ |
||||
|
private String gridName; |
||||
|
|
||||
|
/** |
||||
|
* 删除标识 0未删除、1已删除 |
||||
|
*/ |
||||
|
private String delFlag; |
||||
|
|
||||
|
/** |
||||
|
* 乐观锁 |
||||
|
*/ |
||||
|
private Integer revision; |
||||
|
|
||||
|
/** |
||||
|
* 创建人 |
||||
|
*/ |
||||
|
private String createdBy; |
||||
|
|
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
private Date createdTime; |
||||
|
|
||||
|
/** |
||||
|
* 更新人 |
||||
|
*/ |
||||
|
private String updatedBy; |
||||
|
|
||||
|
/** |
||||
|
* 更新时间 |
||||
|
*/ |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
} |
@ -0,0 +1,58 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.epmet.controller; |
||||
|
|
||||
|
|
||||
|
import com.epmet.commons.tools.annotation.LoginUser; |
||||
|
import com.epmet.commons.tools.dto.form.PageFormDTO; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.security.dto.TokenDto; |
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.commons.tools.validator.ValidatorUtils; |
||||
|
import com.epmet.dto.result.yt.IcMonitoringDeviceDTO; |
||||
|
import com.epmet.service.IcMonitoringDeviceService; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import javax.servlet.http.HttpServletResponse; |
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 监控设备表 |
||||
|
* |
||||
|
* @author elink elink@elink-cn.com |
||||
|
* @since v1.0.0 2023-10-18 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("icmonitoringdevice") |
||||
|
public class IcMonitoringDeviceController { |
||||
|
|
||||
|
@Autowired |
||||
|
private IcMonitoringDeviceService icMonitoringDeviceService; |
||||
|
|
||||
|
@GetMapping("page") |
||||
|
public Result<PageData<IcMonitoringDeviceDTO>> page(@RequestBody PageFormDTO formDTO){ |
||||
|
ValidatorUtils.validateEntity(formDTO, PageFormDTO.AddUserInternalGroup.class); |
||||
|
PageData<IcMonitoringDeviceDTO> page = icMonitoringDeviceService.page(formDTO); |
||||
|
return new Result<PageData<IcMonitoringDeviceDTO>>().ok(page); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,34 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.epmet.dao; |
||||
|
|
||||
|
|
||||
|
import com.epmet.commons.mybatis.dao.BaseDao; |
||||
|
import com.epmet.entity.IcMonitoringDeviceEntity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
/** |
||||
|
* 监控设备表 |
||||
|
* |
||||
|
* @author elink elink@elink-cn.com |
||||
|
* @since v1.0.0 2023-10-18 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface IcMonitoringDeviceDao extends BaseDao<IcMonitoringDeviceEntity> { |
||||
|
|
||||
|
} |
@ -0,0 +1,113 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.epmet.entity; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
|
||||
|
|
||||
|
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* 监控设备表 |
||||
|
* |
||||
|
* @author elink elink@elink-cn.com |
||||
|
* @since v1.0.0 2023-10-18 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("ic_monitoring_device") |
||||
|
public class IcMonitoringDeviceEntity extends BaseEpmetEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 客户id |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 监控设备名称 |
||||
|
*/ |
||||
|
private String deviceName; |
||||
|
|
||||
|
/** |
||||
|
* 监控设备编码 |
||||
|
*/ |
||||
|
private String deviceCode; |
||||
|
|
||||
|
/** |
||||
|
* 状态,1:在线,0:离线 |
||||
|
*/ |
||||
|
private String deviceStatus; |
||||
|
|
||||
|
/** |
||||
|
* 设备类型,1:球机,2:半球,3: |
||||
|
固定枪机,5:卡口枪机,53:其他 |
||||
|
*/ |
||||
|
private String deviceType; |
||||
|
|
||||
|
/** |
||||
|
* 摄像头详细地址 |
||||
|
*/ |
||||
|
private String deviceAddress; |
||||
|
|
||||
|
/** |
||||
|
* 备注 |
||||
|
*/ |
||||
|
private String remark; |
||||
|
|
||||
|
/** |
||||
|
* 中心点位:经度 |
||||
|
*/ |
||||
|
private String longitude; |
||||
|
|
||||
|
/** |
||||
|
* 中心点位:纬度 |
||||
|
*/ |
||||
|
private String latitude; |
||||
|
|
||||
|
/** |
||||
|
* 组织id |
||||
|
*/ |
||||
|
private String agencyId; |
||||
|
|
||||
|
/** |
||||
|
* 上级组织id |
||||
|
*/ |
||||
|
private String parentAgencyId; |
||||
|
|
||||
|
/** |
||||
|
* 组织的所有上级组织id |
||||
|
*/ |
||||
|
private String agencyPids; |
||||
|
|
||||
|
/** |
||||
|
* 网格id |
||||
|
*/ |
||||
|
private String gridId; |
||||
|
|
||||
|
/** |
||||
|
* 网格名称 |
||||
|
*/ |
||||
|
private String gridName; |
||||
|
|
||||
|
} |
@ -0,0 +1,51 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.epmet.service; |
||||
|
|
||||
|
|
||||
|
|
||||
|
import com.epmet.commons.mybatis.service.BaseService; |
||||
|
import com.epmet.commons.tools.dto.form.PageFormDTO; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.security.dto.TokenDto; |
||||
|
import com.epmet.dto.result.yt.IcMonitoringDeviceDTO; |
||||
|
import com.epmet.entity.IcMonitoringDeviceEntity; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 监控设备表 |
||||
|
* |
||||
|
* @author elink elink@elink-cn.com |
||||
|
* @since v1.0.0 2023-10-18 |
||||
|
*/ |
||||
|
public interface IcMonitoringDeviceService extends BaseService<IcMonitoringDeviceEntity> { |
||||
|
|
||||
|
/** |
||||
|
* 默认分页 |
||||
|
* |
||||
|
* @param |
||||
|
* @return PageData<IcMonitoringDeviceDTO> |
||||
|
* @author generator |
||||
|
* @date 2023-10-18 |
||||
|
*/ |
||||
|
PageData<IcMonitoringDeviceDTO> page(PageFormDTO formDTO); |
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,61 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.epmet.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
||||
|
import com.epmet.commons.tools.dto.form.PageFormDTO; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.security.dto.TokenDto; |
||||
|
import com.epmet.commons.tools.security.user.SecurityUser; |
||||
|
import com.epmet.commons.tools.utils.ConvertUtils; |
||||
|
import com.epmet.dao.IcMonitoringDeviceDao; |
||||
|
import com.epmet.dto.result.yt.IcMonitoringDeviceDTO; |
||||
|
import com.epmet.entity.IcMonitoringDeviceEntity; |
||||
|
import com.epmet.service.IcMonitoringDeviceService; |
||||
|
import com.github.pagehelper.PageHelper; |
||||
|
import com.github.pagehelper.PageInfo; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 监控设备表 |
||||
|
* |
||||
|
* @author elink elink@elink-cn.com |
||||
|
* @since v1.0.0 2023-10-18 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class IcMonitoringDeviceServiceImpl extends BaseServiceImpl<IcMonitoringDeviceDao, IcMonitoringDeviceEntity> implements IcMonitoringDeviceService { |
||||
|
|
||||
|
|
||||
|
@Override |
||||
|
public PageData<IcMonitoringDeviceDTO> page(PageFormDTO formDTO) { |
||||
|
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); |
||||
|
QueryWrapper<IcMonitoringDeviceEntity> wrapper = new QueryWrapper<>(); |
||||
|
// wrapper.eq("AGENCY_ID",SecurityUser.getDeptId());
|
||||
|
List<IcMonitoringDeviceEntity> list = baseDao.selectList(wrapper); |
||||
|
List<IcMonitoringDeviceDTO> icMonitoringDeviceDTOS = ConvertUtils.sourceToTarget(list, IcMonitoringDeviceDTO.class); |
||||
|
PageInfo<IcMonitoringDeviceDTO> pageInfo = new PageInfo<>(icMonitoringDeviceDTOS); |
||||
|
return new PageData<>(icMonitoringDeviceDTOS, pageInfo.getTotal()); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,31 @@ |
|||||
|
<?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.epmet.dao.IcMonitoringDeviceDao"> |
||||
|
|
||||
|
<resultMap type="com.epmet.entity.IcMonitoringDeviceEntity" id="icMonitoringDeviceMap"> |
||||
|
<result property="id" column="ID"/> |
||||
|
<result property="customerId" column="CUSTOMER_ID"/> |
||||
|
<result property="deviceName" column="DEVICE_NAME"/> |
||||
|
<result property="deviceCode" column="DEVICE_CODE"/> |
||||
|
<result property="deviceStatus" column="DEVICE_STATUS"/> |
||||
|
<result property="deviceType" column="DEVICE_TYPE"/> |
||||
|
<result property="deviceAddress" column="DEVICE_ADDRESS"/> |
||||
|
<result property="remark" column="REMARK"/> |
||||
|
<result property="longitude" column="LONGITUDE"/> |
||||
|
<result property="latitude" column="LATITUDE"/> |
||||
|
<result property="agencyId" column="AGENCY_ID"/> |
||||
|
<result property="parentAgencyId" column="PARENT_AGENCY_ID"/> |
||||
|
<result property="agencyPids" column="AGENCY_PIDS"/> |
||||
|
<result property="gridId" column="GRID_ID"/> |
||||
|
<result property="gridName" column="GRID_NAME"/> |
||||
|
<result property="delFlag" column="DEL_FLAG"/> |
||||
|
<result property="revision" column="REVISION"/> |
||||
|
<result property="createdBy" column="CREATED_BY"/> |
||||
|
<result property="createdTime" column="CREATED_TIME"/> |
||||
|
<result property="updatedBy" column="UPDATED_BY"/> |
||||
|
<result property="updatedTime" column="UPDATED_TIME"/> |
||||
|
</resultMap> |
||||
|
|
||||
|
|
||||
|
</mapper> |
Loading…
Reference in new issue