xiangpei
2024-09-06 d49b037cd6d42cff6e8a15b3590a3edac2c4568b
点位在线监测
4个文件已修改
1个文件已添加
502 ■■■■■ 已修改文件
ycl-pojo/src/main/java/com/ycl/platform/domain/query/DataCenterQuery.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-pojo/src/main/java/com/ycl/platform/domain/vo/PointDetailVO.java 167 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/java/com/ycl/platform/mapper/YwPointMapper.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/java/com/ycl/platform/service/impl/DataCenterServiceImpl.java 234 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/resources/mapper/zgyw/YwPointMapper.xml 85 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-pojo/src/main/java/com/ycl/platform/domain/query/DataCenterQuery.java
@@ -35,6 +35,12 @@
    /** 数据类型:0 全部  1省厅 */
    private Integer dataType = 0;
    /** 标签:1 部级  2 省厅  3 重点  4 重点指挥图像  5 新设备 */
    private Integer deptTag;
    /** 1 视频 2 车辆 3 人脸 */
    private Integer deviceType;
    public void setTime() {
        if (Objects.nonNull(this.startTime)) {
ycl-pojo/src/main/java/com/ycl/platform/domain/vo/PointDetailVO.java
New file
@@ -0,0 +1,167 @@
package com.ycl.platform.domain.vo;
import annotation.Excel;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.util.Date;
/**
 * @author:xp
 * @date:2024/9/6 15:18
 */
@Data
public class PointDetailVO {
    /**
     * 设备编码
     */
    private String serialNumber;
    /**
     * 设备名称
     */
    private String name;
    /**
     * 监控点位类型 [1.一类视频监控点;2.二类视频监控点;3.三类视频监控点;4.公安内部视频监控点;9.其他点位;]
     */
    private Long siteType;
    /**
     * 摄像机Mac地址
     */
    private String macAddr;
    /**
     * 摄像机IPV4或IPV6地址
     */
    private String ip;
    /**
     * 摄像机功能类型[1.视频监控;2.车辆识别;3.人员识别;] 数据格式[填入多个值并以/隔开。例如  1/2]
     */
    private String cameraFunType;
    /**
     * 设备经度,至少保留六位小数
     */
    private String longitude;
    /**
     * 设备维度,至少保留六位小数
     */
    private String latitude;
    /**
     * 摄像机采集区域参考字典表,数据多选以/隔开
     */
    private String cameraCaptureArea;
    /**
     * 设备状态 1/2 可用/不可用
     */
    private Long onState;
    /**
     * 行政区域
     */
    private String civilCode;
    /**
     * 是否集成设备,0/1 不是/是
     */
    private Long integratedDevice;
    /**
     * 摄像机品牌 [1.海康威视;2.大华;3.天地伟业;4.科达;5.安讯士;6.博世;7.亚安;8.英飞拓;9.宇视;10.海信;11.中星电子;12.明景;13.联想;14.中兴;15.索尼;16.三星;99.其它;
     */
    private Long cameraBrand;
    /**
     * 安装地址
     */
    private String address;
    /**
     * 联网属性 0/1 已联网/未联网
     */
    private Long netWorking;
    /**
     * 所属辖区公安机关
     */
    private String publicSecurity;
    /**
     * 安装时间 yyyy-MM-dd HH:mm:ss
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date installedTime;
    /**
     * 管理单位
     */
    private String managementUnit;
    /**
     * 管理单位联系方式
     */
    private String muContactInfo;
    /**
     * 录象保存天数 0 - 2147483647
     */
    private Long storageDays;
    /**
     * 监视方位 [1.东;2.西;3.南;4.北;5.东南;6.东北;7.西南;8.西北;9.全向;]
     */
    private Long monitorAzimuth;
    /**
     * 摄像机场景预设照片URL
     */
    private String scenePhotoAddr;
    /**
     * 设备型号
     */
    private String model;
    /**
     * 点位俗称
     */
    private String siteVulgo;
    /**
     * 摄像机类型 [1.球机;2.半球;3.固定枪机;4.遥控枪机;5.卡口枪机;99.未知;
     */
    private Long cameraType;
    /**
     * 补光属性[1.无补光;2.红外补光;3.白光补光;9.其他补光;]
     */
    private Long cameraLightType;
    /**
     * 摄像机编码格式 [1.MPEG-4;2.H.264;3.SVAC;4.H.265;]
     */
    private Long encodedFormat;
    /**
     * 所属部门/行业 取值范围(多选) : [1.公安机关;2.环保部门;3.文博部门;4.医疗部门;5.旅游管理;6.新闻广电;7.食品医药监督管理部门;8.教育管理部门;9.检察院;10.法院;11.金融部门;12.交通部门;13.住房和城乡建设部门;14.水利部门;15.林业部门;16.安全生产监督部门;17.市政市容委;18.国土局;] 数据格式[填入多个值并以/隔开。例如  1/2]
     */
    private String cameraDept;
    /**
     * 行业编码 [00.社会治安路面接入;01.社会治安社区接入;02.社会治安内部接入;03.社会治安其他接入;04.交通路面接入;05.交通卡口接入;06.交通内部接入;07.交通其他接入;08.城市管理接入;09.卫生环保接入;10.商检海关接入;11.教育部门接入;]
     */
    private String hybm;
    /**
     * 类型编码 : [131.摄像机编码;132.网络摄像机编码;]
     */
    private Long lxbm;
}
ycl-server/src/main/java/com/ycl/platform/mapper/YwPointMapper.java
@@ -5,8 +5,10 @@
import com.ycl.platform.base.BaseSelect;
import com.ycl.platform.domain.entity.ReportAuditingRecord;
import com.ycl.platform.domain.entity.YwPoint;
import com.ycl.platform.domain.query.DataCenterQuery;
import com.ycl.platform.domain.query.YwPointQuery;
import com.ycl.platform.domain.vo.CheckTagVO;
import com.ycl.platform.domain.vo.PointDetailVO;
import com.ycl.platform.domain.vo.ReportAuditingRecordVO;
import com.ycl.platform.domain.vo.YwPointVO;
import com.ycl.platform.domain.excel.PointExport;
@@ -33,6 +35,8 @@
    List<BaseSelect> selectData(@Param("keyword") String keyword, @Param("unitId") Integer unitId);
    IPage page(IPage<YwPointVO> page, @Param("query") YwPointQuery query);
    IPage dataCenterPage(IPage<PointDetailVO> page, @Param("query") DataCenterQuery query);
    /**
     * 首页到期预警
@@ -113,4 +117,10 @@
     * @return
     */
    List<CheckTagVO> getTagsByGB(@Param("gbList") List<String> gbList);
    /**
     * 查询设备总数
     * @return
     */
    Integer distinctCount(@Param("query") DataCenterQuery query);
}
ycl-server/src/main/java/com/ycl/platform/service/impl/DataCenterServiceImpl.java
@@ -11,6 +11,7 @@
import com.ycl.platform.domain.query.DataCenterQuery;
import com.ycl.platform.domain.result.HK.*;
import com.ycl.platform.domain.result.UY.*;
import com.ycl.platform.domain.vo.PointDetailVO;
import com.ycl.platform.mapper.ImageResourceSecurityDetailMapper;
import com.ycl.platform.mapper.YwPointMapper;
import com.ycl.platform.service.*;
@@ -65,19 +66,14 @@
     */
    @Override
    public Result videoPointOnlineRate(DataCenterQuery params) {
        // 生成查询
        List<String> likeFileds = Arrays.asList("arealayerName", "ipAddr", "deviceName", "deviceId");
        Query query = MongoUtil.getQuery(params, TIME_FIELD, likeFileds, null);
        params.setDeptTag(-1);
        params.setDeviceType(1);
        IPage<PointDetailVO> page = PageUtil.getPage(params, PointDetailVO.class);
        pointMapper.dataCenterPage(page, params);
        // 先查总数再分页
        long total = mongoTemplate.count(query, VideoOnlineResult.class);
        MongoUtil.setPage(query, params, TIME_FIELD);
        List<VideoOnlineResult> resultList = mongoTemplate.find(query, VideoOnlineResult.class);
        // 统计设备数量
        Integer distinctCount = pointMapper.distinctCount(params);
        // 统计数量
        MongoDatabase database = mongoTemplate.getDb();
        MongoCollection<Document> collection = database.getCollection("uy_online");
        long distinctCount = collection.distinct("deviceId", String.class).into(new ArrayList<>()).size();
        Date now = new Date();
        List<CheckIndexVideo> videoList = new LambdaQueryChainWrapper<>(checkIndexVideoService.getBaseMapper())
                .select(CheckIndexVideo::getSiteOnline)
@@ -91,8 +87,8 @@
        }
        HashMap<String, Object> map = new HashMap<>();
        map.put("count", Arrays.asList(distinctCount + "",this.remove0(onlineRate)));
        map.put("list", resultList);
        return Result.ok().data(map).total(total);
        map.put("list", page.getRecords());
        return Result.ok().data(map).total(page.getTotal());
    }
    /**
@@ -103,40 +99,14 @@
     */
    @Override
    public Result deptVideoPointOnlineRate(DataCenterQuery params) {
        params.setDeptTag(1);
        params.setDeviceType(1);
        IPage<PointDetailVO> page = PageUtil.getPage(params, PointDetailVO.class);
        pointMapper.dataCenterPage(page, params);
        List<String> likeFileds = Arrays.asList("arealayerName", "ipAddr", "deviceName", "deviceId");
        // 生成查询
        Query query = MongoUtil.getQuery(params, TIME_FIELD, likeFileds, 1);
        // 统计设备数量
        Integer distinctCount = pointMapper.distinctCount(params);
        // 先查总数再分页
        long total = mongoTemplate.count(query, VideoOnlineResult.class);
        MongoUtil.setPage(query, params, TIME_FIELD);
        List<VideoOnlineResult> resultList = mongoTemplate.find(query, VideoOnlineResult.class);
        // 统计数量
        MongoDatabase database = mongoTemplate.getDb();
        MongoCollection<Document> collection = database.getCollection("uy_online");
        List<Document> dList = new ArrayList<>(2);
        dList.add(new Document("deptTag", new Document("$eq", Boolean.TRUE)));
        if (params.getDataType().equals(1)) {
            dList.add(new Document("provinceTag", new Document("$eq", Boolean.TRUE)));
        }
        Document filter = new Document("$and", dList);
        // 构建聚合管道
        List<Document> pipeline = Arrays.asList(
                // 只要部级的
                new Document("$match", filter),
                // $group 去重
                new Document("$group", new Document("_id", "$deviceId")),
                new Document("$count", "uniqueDeviceIds")
        );
        // 执行聚合查询并获取结果
        AggregateIterable<Document> result = collection.aggregate(pipeline);
        Integer uniqueDeviceIdCount = 0;
        for (Document doc : result) {
            uniqueDeviceIdCount = doc.getInteger("uniqueDeviceIds");
            break; // 不需要继续遍历,因为 $count 只会产生一个结果
        }
        Date now = new Date();
        List<CheckIndexVideo> videoList = new LambdaQueryChainWrapper<>(checkIndexVideoService.getBaseMapper())
                .select(CheckIndexVideo::getMinistrySiteOnline)
@@ -150,9 +120,9 @@
            onlineRate = sum.divide(count, 4, RoundingMode.HALF_UP).multiply(BigDecimal.valueOf(100));
        }
        HashMap<String, Object> map = new HashMap<>();
        map.put("count", Arrays.asList(uniqueDeviceIdCount + "", this.remove0(onlineRate)));
        map.put("list", resultList);
        return Result.ok().data(map).total(total);
        map.put("count", Arrays.asList(distinctCount + "", this.remove0(onlineRate)));
        map.put("list", page.getRecords());
        return Result.ok().data(map).total(page.getTotal());
    }
    /**
@@ -163,37 +133,13 @@
     */
    @Override
    public Result videoImportantPointOnlineRate(DataCenterQuery params) {
        List<String> likeFileds = Arrays.asList("arealayerName", "ipAddr", "deviceName", "deviceId");
        Query query = MongoUtil.getQuery(params, TIME_FIELD, likeFileds, 3);
        params.setDeptTag(3);
        params.setDeviceType(1);
        IPage<PointDetailVO> page = PageUtil.getPage(params, PointDetailVO.class);
        pointMapper.dataCenterPage(page, params);
        long total = mongoTemplate.count(query, VideoOnlineResult.class);
        MongoUtil.setPage(query, params, TIME_FIELD);
        List<VideoOnlineResult> resultList = mongoTemplate.find(query, VideoOnlineResult.class);
        // 统计数量
        MongoDatabase database = mongoTemplate.getDb();
        MongoCollection<Document> collection = database.getCollection("uy_online");
        List<Document> dList = new ArrayList<>(2);
        dList.add(new Document("importantTag", new Document("$eq", Boolean.TRUE)));
        if (params.getDataType().equals(1)) {
            dList.add(new Document("provinceTag", new Document("$eq", Boolean.TRUE)));
        }
        Document filter = new Document("$and", dList);
        // 构建聚合管道
        List<Document> pipeline = Arrays.asList(
                new Document("$match", filter),
                // $group 去重
                new Document("$group", new Document("_id", "$deviceId")),
                new Document("$count", "uniqueDeviceIds")
        );
        // 执行聚合查询并获取结果
        AggregateIterable<Document> result = collection.aggregate(pipeline);
        Integer uniqueDeviceIdCount = 0;
        for (Document doc : result) {
            uniqueDeviceIdCount = doc.getInteger("uniqueDeviceIds");
            break; // 不需要继续遍历,因为 $count 只会产生一个结果
        }
        // 统计设备数量
        Integer distinctCount = pointMapper.distinctCount(params);
        Date now = new Date();
        List<CheckIndexVideo> videoList = new LambdaQueryChainWrapper<>(checkIndexVideoService.getBaseMapper())
@@ -208,9 +154,9 @@
            onlineRate = sum.divide(count, 4, RoundingMode.HALF_UP).multiply(BigDecimal.valueOf(100));
        }
        HashMap<String, Object> map = new HashMap<>();
        map.put("count", Arrays.asList(uniqueDeviceIdCount + "", this.remove0(onlineRate)));
        map.put("list", resultList);
        return Result.ok().data(map).total(total);
        map.put("count", Arrays.asList(distinctCount + "", this.remove0(onlineRate)));
        map.put("list", page.getRecords());
        return Result.ok().data(map).total(page.getTotal());
    }
    /**
@@ -221,37 +167,13 @@
     */
    @Override
    public Result videoImportantPointImageOnlineRate(DataCenterQuery params) {
        List<String> likeFileds = Arrays.asList("arealayerName", "ipAddr", "deviceName", "deviceId");
        Query query = MongoUtil.getQuery(params, TIME_FIELD, likeFileds, 4);
        params.setDeptTag(4);
        params.setDeviceType(1);
        IPage<PointDetailVO> page = PageUtil.getPage(params, PointDetailVO.class);
        pointMapper.dataCenterPage(page, params);
        long total = mongoTemplate.count(query, VideoOnlineResult.class);
        MongoUtil.setPage(query, params, TIME_FIELD);
        List<VideoOnlineResult> resultList = mongoTemplate.find(query, VideoOnlineResult.class);
        // 统计数量
        MongoDatabase database = mongoTemplate.getDb();
        MongoCollection<Document> collection = database.getCollection("uy_online");
        List<Document> dList = new ArrayList<>(2);
        dList.add(new Document("importantCommandImageTag", new Document("$eq", Boolean.TRUE)));
        if (params.getDataType().equals(1)) {
            dList.add(new Document("provinceTag", new Document("$eq", Boolean.TRUE)));
        }
        Document filter = new Document("$and", dList);
        // 构建聚合管道
        List<Document> pipeline = Arrays.asList(
                new Document("$match", filter),
                // $group 去重
                new Document("$group", new Document("_id", "$deviceId")),
                new Document("$count", "uniqueDeviceIds")
        );
        // 执行聚合查询并获取结果
        AggregateIterable<Document> result = collection.aggregate(pipeline);
        Integer uniqueDeviceIdCount = 0;
        for (Document doc : result) {
            uniqueDeviceIdCount = doc.getInteger("uniqueDeviceIds");
            break; // 不需要继续遍历,因为 $count 只会产生一个结果
        }
        // 统计设备数量
        Integer distinctCount = pointMapper.distinctCount(params);
        Date now = new Date();
        List<CheckIndexVideo> videoList = new LambdaQueryChainWrapper<>(checkIndexVideoService.getBaseMapper())
@@ -266,9 +188,9 @@
            onlineRate = sum.divide(count, 4, RoundingMode.HALF_UP).multiply(BigDecimal.valueOf(100));
        }
        HashMap<String, Object> map = new HashMap<>();
        map.put("count", Arrays.asList(uniqueDeviceIdCount + "", this.remove0(onlineRate)));
        map.put("list", resultList);
        return Result.ok().data(map).total(total);
        map.put("count", Arrays.asList(distinctCount + "", this.remove0(onlineRate)));
        map.put("list", page.getRecords());
        return Result.ok().data(map).total(page.getTotal());
    }
    /**
@@ -996,17 +918,13 @@
     */
    @Override
    public Result vehiclePointOnlineRate(DataCenterQuery params) {
        List<String> likeFileds = Arrays.asList("externalIndexCode", "deviceName");
        Query query = MongoUtil.getQuery(params, TIME_FIELD, likeFileds, null);
        params.setDeptTag(-1);
        params.setDeviceType(2);
        IPage<PointDetailVO> page = PageUtil.getPage(params, PointDetailVO.class);
        pointMapper.dataCenterPage(page, params);
        long total = mongoTemplate.count(query, SnapshotDataMonitorResult.class);
        MongoUtil.setPage(query, params, TIME_FIELD);
        List<SnapshotDataMonitorResult> resultList = mongoTemplate.find(query, SnapshotDataMonitorResult.class);
        // 统计数量
        MongoDatabase database = mongoTemplate.getDb();
        MongoCollection<Document> collection = database.getCollection("hk_snapshot_data_monitor");
        long distinctCount = collection.distinct("externalIndexCode", String.class).into(new ArrayList<>()).size();
        // 统计设备数量
        Integer distinctCount = pointMapper.distinctCount(params);
        Date now = new Date();
        List<CheckIndexCar> videoList = new LambdaQueryChainWrapper<>(checkIndexCarService.getBaseMapper())
@@ -1022,8 +940,8 @@
        }
        HashMap<String, Object> map = new HashMap<>();
        map.put("count", Arrays.asList(distinctCount + "", this.remove0(onlineRate)));
        map.put("list", resultList);
        return Result.ok().data(map).total(total);
        map.put("list", page.getRecords());
        return Result.ok().data(map).total(page.getTotal());
    }
    /**
@@ -1528,59 +1446,13 @@
     */
    @Override
    public Result facePointOnlineRate(DataCenterQuery params) {
        List<String> likeFileds = Arrays.asList("externalIndexCode", "deviceName");
        Query query = MongoUtil.getQuery(params, TIME_FIELD, likeFileds, null);
        params.setDeptTag(-1);
        params.setDeviceType(3);
        IPage<PointDetailVO> page = PageUtil.getPage(params, PointDetailVO.class);
        pointMapper.dataCenterPage(page, params);
        long total = mongoTemplate.count(query, SnapshotDataMonitorResult.class);
        MongoUtil.setPage(query, params, TIME_FIELD);
        List<SnapshotDataMonitorResult> resultList = mongoTemplate.find(query, SnapshotDataMonitorResult.class);
        // 统计数量
        MongoDatabase database = mongoTemplate.getDb();
        MongoCollection<Document> collection = database.getCollection("hk_snapshot_data_monitor");
        List<Document> dList1 = new ArrayList<>(2);
        dList1.add(new Document("resultType", new Document("$eq", 1)));
        if (params.getDataType().equals(1)) {
            dList1.add(new Document("provinceTag", new Document("$eq", Boolean.TRUE)));
        }
        List<Document> dList2 = new ArrayList<>(2);
        dList2.add(new Document("resultType", new Document("$eq", 2)));
        if (params.getDataType().equals(1)) {
            dList2.add(new Document("provinceTag", new Document("$eq", Boolean.TRUE)));
        }
        List<Document> dList3 = new ArrayList<>(2);
        dList3.add(new Document("resultType", new Document("$eq", 3)));
        if (params.getDataType().equals(1)) {
            dList3.add(new Document("provinceTag", new Document("$eq", Boolean.TRUE)));
        }
        List<Document> dList4 = new ArrayList<>(2);
        dList4.add(new Document("resultType", new Document("$eq", 4)));
        if (params.getDataType().equals(1)) {
            dList4.add(new Document("provinceTag", new Document("$eq", Boolean.TRUE)));
        }
        Document normalFilter = new Document("$and", dList1);
        Document noDataFilter = new Document("$and", dList2);
        Document trFilter = new Document("$and", dList3);
        Document littleFilter = new Document("$and", dList4);
        List<Document> lists = Arrays.asList(normalFilter, noDataFilter, trFilter, littleFilter);
        List<String> rList = lists.stream().map(filter -> {
            // 构建聚合管道
            List<Document> pipeline = Arrays.asList(
                    new Document("$match", filter),
                    // $group 去重
                    new Document("$group", new Document("_id", "$externalIndexCode")),
                    new Document("$count", "uniqueDeviceIds")
            );
            // 执行聚合查询并获取结果
            AggregateIterable<Document> result = collection.aggregate(pipeline);
            Integer uniqueDeviceIdCount = 0;
            for (Document doc : result) {
                uniqueDeviceIdCount = doc.getInteger("uniqueDeviceIds");
                break; // 不需要继续遍历,因为 $count 只会产生一个结果
            }
            return uniqueDeviceIdCount + "";
        }).collect(Collectors.toList());
        // 统计设备数量
        Integer distinctCount = pointMapper.distinctCount(params);
        Date now = new Date();
        List<CheckIndexFace> videoList = new LambdaQueryChainWrapper<>(checkIndexFaceService.getBaseMapper())
@@ -1594,11 +1466,13 @@
            BigDecimal count = BigDecimal.valueOf(videoList.size());
            onlineRate = sum.divide(count, 4, RoundingMode.HALF_UP).multiply(BigDecimal.valueOf(100));
        }
        List<String> rList = new ArrayList<>(2);
        rList.add(distinctCount + "");
        rList.add(this.remove0(onlineRate));
        HashMap<String, Object> map = new HashMap<>();
        map.put("count", rList);
        map.put("list", resultList);
        return Result.ok().data(map).total(total);
        map.put("list", page.getRecords());
        return Result.ok().data(map).total(page.getTotal());
    }
    /**
ycl-server/src/main/resources/mapper/zgyw/YwPointMapper.xml
@@ -55,6 +55,90 @@
        </where>
    </select>
    <select id="dataCenterPage">
        SELECT
               m.*
        FROM
             t_yw_point p INNER JOIN t_monitor m ON p.serial_number = m.serial_number
        <where>
            AND p.create_time between #{query.startTime} and #{query.endTime}
            <if test="query.keyword != null and query.keyword != ''">
                AND (m.name like concat('%', #{query.keyword}, '%') OR m.serial_number like concat('%', #{query.keyword}, '%'))
            </if>
            <if test="query.dataType == 1">
                AND p.province_tag = 1
            </if>
            <choose>
                <when test="query.deptTag == 1">
                    AND p.dept_tag = 1
                </when>
                <when test="query.deptTag == 2">
                    AND p.province_tag = 1
                </when>
                <when test="query.deptTag == 3">
                    AND p.important_tag = 1
                </when>
                <when test="query.deptTag == 4">
                    AND p.important_command_image_tag = 1
                </when>
                <when test="query.deptTag == 5">
                    AND p.new_device = 1
                </when>
            </choose>
            <choose>
                <when test="query.deviceType == 1">
                    AND m.camera_fun_type like '%1%'
                </when>
                <when test="query.deviceType == 2">
                    AND m.camera_fun_type like '%2%'
                </when>
                <when test="query.deviceType == 3">
                    AND m.camera_fun_type like '%3%'
                </when>
            </choose>
        </where>
    </select>
    <select id="distinctCount" resultType="integer">
        SELECT
            count(DISTINCT m.serial_number)
        FROM
            t_yw_point p INNER JOIN t_monitor m ON p.serial_number = m.serial_number
        <where>
            <if test="query.dataType == 1">
                AND p.province_tag = 1
            </if>
            <choose>
                <when test="query.deptTag == 1">
                    AND dept_tag = 1
                </when>
                <when test="query.deptTag == 2">
                    AND province_tag = 1
                </when>
                <when test="query.deptTag == 3">
                    AND important_tag = 1
                </when>
                <when test="query.deptTag == 4">
                    AND important_command_image_tag = 1
                </when>
                <when test="query.deptTag == 5">
                    AND new_device = 1
                </when>
            </choose>
            <choose>
                <when test="query.deviceType == 1">
                    AND m.camera_fun_type like '%1%'
                </when>
                <when test="query.deviceType == 2">
                    AND m.camera_fun_type like '%2%'
                </when>
                <when test="query.deviceType == 3">
                    AND m.camera_fun_type like '%3%'
                </when>
            </choose>
        </where>
    </select>
    <select id="home" resultType="com.ycl.platform.domain.entity.YwPoint">
        <![CDATA[
        SELECT t_yw_point.id, point_name, start_time, end_time, status, unit_name AS remark
@@ -225,4 +309,5 @@
            serial_number, province_tag, important_tag, important_command_image_tag, dept_tag
    </select>
</mapper>