fuliqi
2024-10-28 87a7362709ac249c3965a392842cf24bc402b6c1
档案考核比、一机一档合格、注册率。数据中心视频类优化完
2个文件已修改
1个文件已添加
342 ■■■■ 已修改文件
ycl-pojo/src/main/java/com/ycl/platform/domain/result/UY/MonitorQualifyResult.java 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-pojo/src/main/java/com/ycl/platform/domain/vo/DataCenter/MonitorQualifyResultVO.java 71 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/java/com/ycl/platform/service/impl/DataCenterServiceImpl.java 228 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-pojo/src/main/java/com/ycl/platform/domain/result/UY/MonitorQualifyResult.java
@@ -1,6 +1,7 @@
package com.ycl.platform.domain.result.UY;
import com.ycl.platform.domain.result.BaseResult;
import com.ycl.platform.domain.vo.DataCenter.MonitorQualifyResultVO;
import lombok.Data;
import org.springframework.data.mongodb.core.index.TextIndexed;
import org.springframework.data.mongodb.core.mapping.Document;
@@ -68,12 +69,12 @@
    public static class QualifyResult {
        /**
         * 是否错误 正常是false,ture表示有问题
         * */
         */
        private Boolean error;
        private String errorMessage;
        /**
         * 展示值
         * */
         */
        @TextIndexed
        private String showValue;
        /**
@@ -85,7 +86,7 @@
    //全对返ture
    public static boolean correct(MonitorQualifyResult result) {
        return  checkError(result.getName()) &&
        return checkError(result.getName()) &&
                checkError(result.getCivilCode()) &&
                checkError(result.getIp()) &&
                checkError(result.getSerialNumber()) &&
@@ -102,6 +103,40 @@
    //检查指标,正常返回true
    public static boolean checkError(MonitorQualifyResult.QualifyResult result) {
        return  result.getError() != null && !result.getError();
        return result.getError() != null && !result.getError();
    }
    public static MonitorQualifyResultVO getVO(MonitorQualifyResult result) {
        MonitorQualifyResultVO vo = new MonitorQualifyResultVO();
        vo.setCivilCode(result.getCivilCode().getShowValue());
        vo.setCivilCodeError(result.getCivilCode().getError());
        vo.setIp(result.getIp().getShowValue());
        vo.setIpError(result.getIp().getError());
        vo.setIntegratedDevice(result.getIntegrated_device().getShowValue());
        vo.setIntegratedDeviceError(result.getIntegrated_device().getError());
        vo.setJkdwlx(result.getJkdwlx().getShowValue());
        vo.setJkdwlxError(result.getJkdwlx().getError());
        vo.setLatitude(result.getLatitude().getShowValue());
        vo.setLatitudeError(result.getLatitude().getError());
        vo.setLongitude(result.getLongitude().getShowValue());
        vo.setLongitudeError(result.getLongitude().getError());
        vo.setMacdz(result.getMacdz().getShowValue());
        vo.setMacdzError(result.getMacdz().getError());
        vo.setName(result.getName().getShowValue());
        vo.setNameError(result.getName().getError());
        vo.setSbzt(result.getSbzt().getShowValue());
        vo.setSbztError(result.getSbzt().getError());
        vo.setSerialNumber(result.getSerialNumber().getShowValue());
        vo.setSerialNumberError(result.getSerialNumber().getError());
        vo.setSxjcjqy(result.getSxjcjqy().getShowValue());
        vo.setSxjcjqyError(result.getSxjcjqy().getError());
        vo.setSxjgnlx(result.getSxjgnlx().getShowValue());
        vo.setSxjgnlxError(result.getSxjgnlx().getError());
        if (result.getNewDevice()) {
            vo.setNewDevice("是");
        } else {
            vo.setNewDevice("否");
        }
        return vo;
    }
}
ycl-pojo/src/main/java/com/ycl/platform/domain/vo/DataCenter/MonitorQualifyResultVO.java
New file
@@ -0,0 +1,71 @@
package com.ycl.platform.domain.vo.DataCenter;
import com.ycl.platform.domain.result.UY.MonitorQualifyResult;
import lombok.Data;
import org.springframework.data.mongodb.core.index.TextIndexed;
@Data
public class MonitorQualifyResultVO {
    /**
     * 行政编码
     */
    private String civilCode;
    private Boolean civilCodeError;
    /**
     * 是否集成设备
     */
    private String integratedDevice;
    private Boolean integratedDeviceError;
    /**
     * IP地址
     */
    private String ip;
    private Boolean ipError;
    /**
     * 监控点位类型
     */
    private String jkdwlx;
    private Boolean jkdwlxError;
    /**
     * 纬度
     */
    private String latitude;
    private Boolean latitudeError;
    /**
     * 经度
     */
    private String longitude;
    private Boolean longitudeError;
    /**
     * mac地址
     */
    private String macdz;
    private Boolean macdzError;
    /**
     * 设备名
     */
    private String name;
    private Boolean nameError;
    /**
     * 设备状态
     */
    private String sbzt;
    private Boolean sbztError;
    /**
     * 设备编码
     */
    private String serialNumber;
    private Boolean serialNumberError;
    /**
     * 摄像机采集区域
     */
    private String sxjcjqy;
    private Boolean sxjcjqyError;
    /**
     * 摄像机功能类型
     */
    private String sxjgnlx;
    private Boolean sxjgnlxError;
    private String newDevice;
}
ycl-server/src/main/java/com/ycl/platform/service/impl/DataCenterServiceImpl.java
@@ -13,6 +13,7 @@
import com.ycl.platform.domain.result.HK.*;
import com.ycl.platform.domain.result.SYS.TMonitorResult;
import com.ycl.platform.domain.result.UY.*;
import com.ycl.platform.domain.vo.DataCenter.MonitorQualifyResultVO;
import com.ycl.platform.domain.vo.PointDetailVO;
import com.ycl.platform.mapper.ImageResourceSecurityDetailMapper;
import com.ycl.platform.mapper.YwPointMapper;
@@ -21,6 +22,7 @@
import com.ycl.system.page.PageUtil;
import com.ycl.utils.DateUtils;
import com.ycl.utils.MongoUtil;
import com.ycl.utils.bean.BeanUtils;
import constant.ApiConstants;
import constant.CheckConstants;
import lombok.RequiredArgsConstructor;
@@ -453,34 +455,40 @@
    @Override
    public Result videoOneMachineDocumentRegister(DataCenterQuery params) {
        List<String> likeFileds = Arrays.asList("ip.showValue", "name.showValue", "serialNumber.showValue");
        Query query = MongoUtil.getQuery(params, TIME_FIELD, likeFileds, null);
        List<Criteria> andCriteria = MongoUtil.getAndCriteria(params, TIME_FIELD, likeFileds, null);
        Query query = new Query();
        Criteria and = new Criteria();
        if(params.getOption()!=null){
            if(params.getOption() ==1){
                andCriteria.add(Criteria.where("newDevice").is(Boolean.TRUE));
            }else if(params.getOption() ==-1){
                andCriteria.add(Criteria.where("newDevice").is(Boolean.FALSE));
            }
        }
        and.andOperator(andCriteria);
        query = Query.query(and);
        long total = mongoTemplate.count(query, MonitorQualifyResult.class);
        MongoUtil.setPage(query, params, TIME_FIELD);
        List<MonitorQualifyResult> resultList = mongoTemplate.find(query, MonitorQualifyResult.class);
        List<MonitorQualifyResultVO> resultVOS = new ArrayList<>();
        for (MonitorQualifyResult result : resultList) {
            MonitorQualifyResultVO vo = MonitorQualifyResult.getVO(result);
            resultVOS.add(vo);
        }
        // 统计数量
        MongoDatabase database = mongoTemplate.getDb();
        MongoCollection<Document> collection = database.getCollection("uy_monitor_qualify");
        //总数
        List<Document> dList1 = new ArrayList<>(2);
        dList1.add(new Document("ip.error", new Document("$eq", Boolean.TRUE)));
        setTag(params, dList1);
        Document totalFilter = new Document("$and",dList1);
        //新设备数
        List<Document> dList2 = new ArrayList<>(2);
        dList2.add(new Document("macdz.error", new Document("$eq", Boolean.TRUE)));
        setTag(params, dList2);
        List<Document> dList3 = new ArrayList<>(2);
        dList3.add(new Document("latitude.error", new Document("$eq", Boolean.TRUE)));
        setTag(params, dList3);
        List<Document> dList4 = new ArrayList<>(2);
        dList4.add(new Document("longitude.error", new Document("$eq", Boolean.TRUE)));
        setTag(params, dList4);
        Document ipErrFilter = new Document("$and", dList1);
        Document macdzErrFilter = new Document("$and", dList2);
        Document latitudeErrFilter = new Document("$and", dList3);
        Document longitudeErrFilter = new Document("$and", dList4);
        dList2.add(new Document("newDevice",Boolean.TRUE));
        Document newFilter = new Document("$and",dList2);
        List<Document> lists = Arrays.asList(ipErrFilter, macdzErrFilter, latitudeErrFilter, longitudeErrFilter);
        List<Document> lists = Arrays.asList(totalFilter, newFilter);
        List<String> rList = lists.stream().map(filter -> {
            // 构建聚合管道
            List<Document> pipeline = Arrays.asList(
@@ -499,11 +507,11 @@
            return uniqueDeviceIdCount + "";
        }).collect(Collectors.toList());
        Date now = new Date();
        List<CheckIndexVideo> videoList = new LambdaQueryChainWrapper<>(checkIndexVideoService.getBaseMapper())
                .select(CheckIndexVideo::getMonitorRegistration)
                .eq(params.getDataType().equals(1), CheckIndexVideo::getExamineTag, CheckConstants.Examine_Tag_Province)
                .between(CheckIndexVideo::getCreateTime, DateUtils.getDayStart(now), DateUtils.getDayEnd(now))
                .eq(params.getDataType().equals(2), CheckIndexVideo::getExamineTag, CheckConstants.Examine_Tag_Dept)
                .between(CheckIndexVideo::getCreateTime, DateUtils.getDayStart(params.getStartTime()), DateUtils.getDayEnd(params.getEndTime()))
                .list();
        BigDecimal onlineRate = BigDecimal.ZERO;
        if (CollectionUtils.isNotEmpty(videoList)) {
@@ -514,7 +522,7 @@
        rList.add(this.remove0(onlineRate));
        HashMap<String, Object> map = new HashMap<>();
        map.put("count", rList);
        map.put("list", resultList);
        map.put("list", resultVOS);
        return Result.ok().data(map).total(total);
    }
@@ -527,34 +535,100 @@
    @Override
    public Result videoOneMachineDocumentQualified(DataCenterQuery params) {
        List<String> likeFileds = Arrays.asList("ip.showValue", "name.showValue", "serialNumber.showValue");
        Query query = MongoUtil.getQuery(params, TIME_FIELD, likeFileds, null);
        List<Criteria> andCriteria = MongoUtil.getAndCriteria(params, TIME_FIELD, likeFileds, null);
        Query query = new Query();
        Criteria and = new Criteria();
        and.andOperator(andCriteria);
        query = Query.query(and);
        if(params.getOption()!=null){
            if(params.getOption() ==1){
                andCriteria.add(Criteria.where("serialNumber.error").is(Boolean.FALSE));
                andCriteria.add(Criteria.where("name.error").is(Boolean.FALSE));
                andCriteria.add(Criteria.where("civilCode.error").is(Boolean.FALSE));
                andCriteria.add(Criteria.where("integrated_device.error").is(Boolean.FALSE));
                andCriteria.add(Criteria.where("jkdwlx.error").is(Boolean.FALSE));
                andCriteria.add(Criteria.where("latitude.error").is(Boolean.FALSE));
                andCriteria.add(Criteria.where("longitude.error").is(Boolean.FALSE));
                andCriteria.add(Criteria.where("macdz.error").is(Boolean.FALSE));
                andCriteria.add(Criteria.where("name.error").is(Boolean.FALSE));
                andCriteria.add(Criteria.where("sbzt.error").is(Boolean.FALSE));
                andCriteria.add(Criteria.where("sxjcjqy.error").is(Boolean.FALSE));
                andCriteria.add(Criteria.where("sxjgnlx.error").is(Boolean.FALSE));
                Criteria and2 = new Criteria();
                and2.andOperator(andCriteria);
                query = Query.query(and2);
            }else if(params.getOption() ==-1){
                Criteria c1 = Criteria.where("serialNumber.error").is(Boolean.TRUE);
                Criteria c2 = Criteria.where("name.error").is(Boolean.TRUE);
                Criteria c3 = Criteria.where("civilCode.error").is(Boolean.TRUE);
                Criteria c4 = Criteria.where("integrated_device.error").is(Boolean.TRUE);
                Criteria c5 = Criteria.where("jkdwlx.error").is(Boolean.TRUE);
                Criteria c6 = Criteria.where("latitude.error").is(Boolean.TRUE);
                Criteria c7 = Criteria.where("longitude.error").is(Boolean.TRUE);
                Criteria c8 = Criteria.where("macdz.error").is(Boolean.TRUE);
                Criteria c9 = Criteria.where("name.error").is(Boolean.TRUE);
                Criteria c10 = Criteria.where("sbzt.error").is(Boolean.TRUE);
                Criteria c11 = Criteria.where("sxjcjqy.error").is(Boolean.TRUE);
                Criteria c12 = Criteria.where("sxjgnlx.error").is(Boolean.TRUE);
                Criteria orOperator = new Criteria().orOperator(c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12);
                orOperator.andOperator(andCriteria);
                query = Query.query(orOperator);
            }
        }
        long total = mongoTemplate.count(query, MonitorQualifyResult.class);
        MongoUtil.setPage(query, params, TIME_FIELD);
        List<MonitorQualifyResult> resultList = mongoTemplate.find(query, MonitorQualifyResult.class);
        List<MonitorQualifyResultVO> resultVOS = new ArrayList<>();
        for (MonitorQualifyResult result : resultList) {
            MonitorQualifyResultVO vo = MonitorQualifyResult.getVO(result);
            resultVOS.add(vo);
        }
        // 统计数量
        MongoDatabase database = mongoTemplate.getDb();
        MongoCollection<Document> collection = database.getCollection("uy_monitor_qualify");
        //总数
        List<Document> dList1 = new ArrayList<>(2);
        dList1.add(new Document("ip.error", new Document("$eq", Boolean.TRUE)));
        setTag(params, dList1);
        Document totalFilter = new Document("$and",dList1);
        //合格数
        List<Document> dList2 = new ArrayList<>(2);
        dList2.add(new Document("macdz.error", new Document("$eq", Boolean.TRUE)));
        setTag(params, dList2);
        List<Document> dList3 = new ArrayList<>(2);
        dList3.add(new Document("latitude.error", new Document("$eq", Boolean.TRUE)));
        setTag(params, dList3);
        List<Document> dList4 = new ArrayList<>(2);
        dList4.add(new Document("longitude.error", new Document("$eq", Boolean.TRUE)));
        setTag(params, dList4);
        Document ipErrFilter = new Document("$and", dList1);
        Document macdzErrFilter = new Document("$and", dList2);
        Document latitudeErrFilter = new Document("$and", dList3);
        Document longitudeErrFilter = new Document("$and", dList4);
        dList2.add(new Document("serialNumber.error",Boolean.FALSE));
        dList2.add(new Document("name.error",Boolean.FALSE));
        dList2.add(new Document("civilCode.error",Boolean.FALSE));
        dList2.add(new Document("integrated_device.error",Boolean.FALSE));
        dList2.add(new Document("jkdwlx.error",Boolean.FALSE));
        dList2.add(new Document("latitude.error",Boolean.FALSE));
        dList2.add(new Document("longitude.error",Boolean.FALSE));
        dList2.add(new Document("macdz.error",Boolean.FALSE));
        dList2.add(new Document("name.error",Boolean.FALSE));
        dList2.add(new Document("sbzt.error",Boolean.FALSE));
        dList2.add(new Document("sxjcjqy.error",Boolean.FALSE));
        dList2.add(new Document("sxjgnlx.error",Boolean.FALSE));
        setTag(params,dList2);
        Document qualifyFilter = new Document("$and",dList2);
        //不合格数
        Document mongoCreateTimeRange = new Document()
                .append("$gte", params.getStartTime())
                .append("$lt", params.getEndTime());
        Document mongoCreateTime = new Document("mongoCreateTime", mongoCreateTimeRange);
        List<Document> errorConditions = new ArrayList<>();
        errorConditions.add(new Document("serialNumber.error", new Document("$eq", Boolean.TRUE)));
        errorConditions.add(new Document("name.error", new Document("$eq", Boolean.TRUE)));
        errorConditions.add(new Document("civilCode.error", new Document("$eq", Boolean.TRUE)));
        errorConditions.add(new Document("integrated_device.error", new Document("$eq", Boolean.TRUE)));
        errorConditions.add(new Document("jkdwlx.error", new Document("$eq", Boolean.TRUE)));
        errorConditions.add(new Document("latitude.error", new Document("$eq", Boolean.TRUE)));
        errorConditions.add(new Document("longitude.error", new Document("$eq", Boolean.TRUE)));
        errorConditions.add(new Document("macdz.error", new Document("$eq", Boolean.TRUE)));
        errorConditions.add(new Document("name.error", new Document("$eq", Boolean.TRUE)));
        errorConditions.add(new Document("sbzt.error", new Document("$eq", Boolean.TRUE)));
        errorConditions.add(new Document("sxjcjqy.error", new Document("$eq", Boolean.TRUE)));
        errorConditions.add(new Document("sxjgnlx.error", new Document("$eq", Boolean.TRUE)));
        Document errorFilter = new Document("$or", errorConditions);
        Document unQualifyFilter = new Document("$and", Arrays.asList(mongoCreateTime, errorFilter));
        List<Document> lists = Arrays.asList(ipErrFilter, macdzErrFilter, latitudeErrFilter, longitudeErrFilter);
        List<Document> lists = Arrays.asList(totalFilter, qualifyFilter, unQualifyFilter);
        List<String> rList = lists.stream().map(filter -> {
            // 构建聚合管道
            List<Document> pipeline = Arrays.asList(
@@ -573,11 +647,11 @@
            return uniqueDeviceIdCount + "";
        }).collect(Collectors.toList());
        Date now = new Date();
        List<CheckIndexVideo> videoList = new LambdaQueryChainWrapper<>(checkIndexVideoService.getBaseMapper())
                .select(CheckIndexVideo::getMonitorQualification)
                .eq(params.getDataType().equals(1), CheckIndexVideo::getExamineTag, CheckConstants.Examine_Tag_Province)
                .between(CheckIndexVideo::getCreateTime, DateUtils.getDayStart(now), DateUtils.getDayEnd(now))
                .eq(params.getDataType().equals(2), CheckIndexVideo::getExamineTag, CheckConstants.Examine_Tag_Dept)
                .between(CheckIndexVideo::getCreateTime, DateUtils.getDayStart(params.getStartTime()), DateUtils.getDayEnd(params.getEndTime()))
                .list();
        BigDecimal onlineRate = BigDecimal.ZERO;
        if (CollectionUtils.isNotEmpty(videoList)) {
@@ -588,47 +662,50 @@
        rList.add(this.remove0(onlineRate));
        HashMap<String, Object> map = new HashMap<>();
        map.put("count", rList);
        map.put("list", resultList);
        map.put("list", resultVOS);
        return Result.ok().data(map).total(total);
    }
    /**
     * 视频:档案考核比
     *
     * 档案留存总量:mongo存的所有去重后的档案
     * 当日档案:当日的档案
     * 档案考核比 = 当日档案/档案留存总量
     * @param params
     * @return
     * @return1
     */
    @Override
    public Result videoAssessmentFileRatio(DataCenterQuery params) {
        List<String> likeFileds = Arrays.asList("ip.showValue", "name.showValue", "serialNumber.showValue");
        Query query = MongoUtil.getQuery(params, TIME_FIELD, likeFileds, null);
        List<Criteria> andCriteria = MongoUtil.getAndCriteria(params, TIME_FIELD, likeFileds, null);
        Query query = new Query();
        Criteria and = new Criteria();
        and.andOperator(andCriteria);
        query = Query.query(and);
        long total = mongoTemplate.count(query, MonitorQualifyResult.class);
        MongoUtil.setPage(query, params, TIME_FIELD);
        List<MonitorQualifyResult> resultList = mongoTemplate.find(query, MonitorQualifyResult.class);
        List<MonitorQualifyResultVO> resultVOS = new ArrayList<>();
        for (MonitorQualifyResult result : resultList) {
            MonitorQualifyResultVO vo = MonitorQualifyResult.getVO(result);
            resultVOS.add(vo);
        }
        // 统计数量
        MongoDatabase database = mongoTemplate.getDb();
        MongoCollection<Document> collection = database.getCollection("uy_monitor_qualify");
        //总数
        List<Document> dList1 = new ArrayList<>(2);
        dList1.add(new Document("ip.error", new Document("$eq", Boolean.TRUE)));
        setTag(params, dList1);
        DataCenterQuery totalParams = new DataCenterQuery();
        BeanUtils.copyProperties(params,totalParams);
        totalParams.setStartTime(null);
        setTag(totalParams, dList1);
        Document totalFilter = new Document("$and",dList1);
        //当日档案数
        List<Document> dList2 = new ArrayList<>(2);
        dList2.add(new Document("macdz.error", new Document("$eq", Boolean.TRUE)));
        setTag(params, dList2);
        List<Document> dList3 = new ArrayList<>(2);
        dList3.add(new Document("latitude.error", new Document("$eq", Boolean.TRUE)));
        setTag(params, dList3);
        List<Document> dList4 = new ArrayList<>(2);
        dList4.add(new Document("longitude.error", new Document("$eq", Boolean.TRUE)));
        setTag(params, dList4);
        Document ipErrFilter = new Document("$and", dList1);
        Document macdzErrFilter = new Document("$and", dList2);
        Document latitudeErrFilter = new Document("$and", dList3);
        Document longitudeErrFilter = new Document("$and", dList4);
        Document newFilter = new Document("$and",dList2);
        List<Document> lists = Arrays.asList(ipErrFilter, macdzErrFilter, latitudeErrFilter, longitudeErrFilter);
        List<Document> lists = Arrays.asList(totalFilter, newFilter);
        List<String> rList = lists.stream().map(filter -> {
            // 构建聚合管道
            List<Document> pipeline = Arrays.asList(
@@ -647,10 +724,22 @@
            return uniqueDeviceIdCount + "";
        }).collect(Collectors.toList());
        rList.add("0%");
        List<CheckIndexVideo> videoList = new LambdaQueryChainWrapper<>(checkIndexVideoService.getBaseMapper())
                .select(CheckIndexVideo::getArchivesRate)
                .eq(params.getDataType().equals(1), CheckIndexVideo::getExamineTag, CheckConstants.Examine_Tag_Province)
                .eq(params.getDataType().equals(2), CheckIndexVideo::getExamineTag, CheckConstants.Examine_Tag_Dept)
                .between(CheckIndexVideo::getCreateTime, DateUtils.getDayStart(params.getStartTime()), DateUtils.getDayEnd(params.getEndTime()))
                .list();
        BigDecimal onlineRate = BigDecimal.ZERO;
        if (CollectionUtils.isNotEmpty(videoList)) {
            BigDecimal sum = videoList.stream().map(CheckIndexVideo::getArchivesRate).reduce(BigDecimal.ZERO, BigDecimal::add);
            BigDecimal count = BigDecimal.valueOf(videoList.size());
            onlineRate = sum.divide(count, 4, RoundingMode.HALF_UP).multiply(BigDecimal.valueOf(100));
        }
        rList.add(this.remove0(onlineRate));
        HashMap<String, Object> map = new HashMap<>();
        map.put("count", rList);
        map.put("list", resultList);
        map.put("list", resultVOS);
        return Result.ok().data(map).total(total);
    }
@@ -900,6 +989,9 @@
        List<String> likeFileds = Arrays.asList("deviceNo", "osdName");
        List<Criteria> andCriteria = MongoUtil.getAndCriteria(params, "checkTime", likeFileds, 3);
        Query query = new Query();
        Criteria and = new Criteria();
        and.andOperator(andCriteria);
        query = Query.query(and);
        //下拉框标注正确查询条件
        if (params.getOption() != null) {
            if(params.getOption()==1) {
@@ -908,9 +1000,9 @@
                andCriteria.add(Criteria.where("osdProvinceCorrect").is(1));
                andCriteria.add(Criteria.where("osdCityCorrect").is(1));
                andCriteria.add(Criteria.where("osdPartCorrect").is(1));
                Criteria and = new Criteria();
                and.andOperator(andCriteria);
                query = Query.query(and);
                Criteria and2 = new Criteria();
                and2.andOperator(andCriteria);
                query = Query.query(and2);
            }else if(params.getOption()==-1){
                // 使用$or条件连接多个字段检查,每个字段检查是否等于-1
                Criteria c1 = Criteria.where("osdNameCorrect").is(-1);
@@ -2324,9 +2416,9 @@
        } else if (params.getDataType().equals(2)) {
            dList.add(new Document("deptTag", new Document("$eq", Boolean.TRUE)));
        }
        Document mongoCreateTimeRange = new Document()
                .append("$gte", params.getStartTime())
                .append("$lt", params.getEndTime());
        Document mongoCreateTimeRange = new Document();
        if (params.getStartTime()!=null) mongoCreateTimeRange.append("$gte", params.getStartTime());
        if (params.getEndTime()!=null) mongoCreateTimeRange .append("$lt", params.getEndTime());
        dList.add(new Document("mongoCreateTime", mongoCreateTimeRange));
    }
}