sgj
2026-03-25 a23f3acdf2a09dd056778d2217964a1878b66ea6
大屏首页,AI事件统计,添加当日库区网关掉线的针对文案表述
已修改2个文件
107 ■■■■ 文件已修改
fzzy-igdss-web/src/main/java/com/fzzy/group/manager/GroupManager.java 39 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/static/group/index.js 68 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/java/com/fzzy/group/manager/GroupManager.java
@@ -52,13 +52,12 @@
    private SecCameraService cameraService;
    @Resource
    private BankService bankService;
    @Resource
    private PledgeContractService pledgeContractService;
    @Resource
    private  PledgeContractDepotService pledgeContractDepotService;
    private PledgeContractDepotService pledgeContractDepotService;
    @Resource
    private GatewaySerService gatewaySerService;
    /**
     * 获取省及下属市州集合
@@ -137,11 +136,11 @@
        if (null == area) {
            return null;
        }
        List<DicArea> areaChildren =  new ArrayList<>();
        List<DicArea> areaChildren = new ArrayList<>();
        List<DicArea> list = new ArrayList<>();
        if (Constant.AREA_TYPE_1.equals(area.getType())) {
           //查询所有的质押合同
            //查询所有的质押合同
            List<PledgeContract> pledgeContractList = pledgeContractService.listAll(null);
            //查询所有的库区
            List<Dept> depotList = deptService.listDept(null, ContextUtil.getCompanyId(), null);
@@ -158,12 +157,12 @@
                    IgdsBaseParam param = new IgdsBaseParam();
                    param.setParentId(pledgeContract.getId());
                    List<PledgeContractDepot> pledgeContractDepots = pledgeContractDepotService.listAll(param);
                    if (null == pledgeContractDepots || pledgeContractDepots.isEmpty()){
                    if (null == pledgeContractDepots || pledgeContractDepots.isEmpty()) {
                        continue;
                    }
                    //找到pledgeContractDepots中的deptId集合,并去重
                    List<String> deptIdList = pledgeContractDepots.stream().map(PledgeContractDepot::getPledgeDept).distinct().collect(Collectors.toList());
                    if( deptIdList.contains(dept.getId())){
                    if (deptIdList.contains(dept.getId())) {
                        //从list中找到当前质押银行的数据
                        DicArea pledgeBank = null;
                        int indexBank = -1;
@@ -174,11 +173,11 @@
                                break;
                            }
                        }
                        if( null == pledgeBank){
                        if (null == pledgeBank) {
                            //未找到质押银行数据则新建
                            pledgeBank = new DicArea();
                            pledgeBank.setCode(pledgeContract.getPledgeBank());
                            pledgeBank.setName("质押银行_"+pledgeContract.getPledgeBank());
                            pledgeBank.setName("质押银行_" + pledgeContract.getPledgeBank());
                            //从银行数据中找到质押银行的信息
                            for (Bank bank : bankList) {
                                if (pledgeContract.getPledgeBank().equals(bank.getId())) {
@@ -197,9 +196,9 @@
                            pledgeBank.getChildren().add(deptDic);
                            //新增质押银行数据到list中
                            areaChildren.add(pledgeBank);
                            isPledge=true;
                            isPledge = true;
                            break;
                        }else{
                        } else {
                            //添加质押银行下的库区数据
                            DicArea deptDic = new DicArea();
                            deptDic.setCode(dept.getId());
@@ -211,14 +210,14 @@
                            }
                            pledgeBank.getChildren().add(deptDic);
                            //更新list中的质押银行数据
                            areaChildren.set(indexBank,pledgeBank);
                            isPledge=true;
                            areaChildren.set(indexBank, pledgeBank);
                            isPledge = true;
                            break;
                        }
                    }
                }
                if(!isPledge){
                if (!isPledge) {
                    DicArea deptDic = new DicArea();
                    deptDic.setCode(dept.getId());
                    deptDic.setName(dept.getKqmc());
@@ -231,7 +230,7 @@
                }
            }
            List<DicArea> defaultBankChildren = defaultBank.getChildren();
            if (defaultBankChildren.size()>0) {
            if (defaultBankChildren.size() > 0) {
                areaChildren.add(defaultBank);
            }
            area.setChildren(areaChildren);
@@ -522,7 +521,11 @@
                        }
                    }
                }
                //判断网关是否在线
                GatewaySer cacheSerByDeptId = gatewaySerService.getCacheSerByDeptId(dept.getId());
                if (null == cacheSerByDeptId || (null != cacheSerByDeptId && StringUtils.isNotBlank(cacheSerByDeptId.getStatus()) && cacheSerByDeptId.getStatus().equals(Constant.YN_N))) {
                    deptData.setDailyTotal(-1);
                }
                list.add(deptData);
            }
        }
@@ -599,7 +602,6 @@
    }
    public GroupGisData getGisDataByCompanyId() {
        GroupGisData groupGisData = new GroupGisData();
@@ -662,6 +664,7 @@
        return groupGisData;
    }
    /**
     * 大屏首页-抓拍跟踪信息
     *
fzzy-igdss-web/src/main/resources/static/group/index.js
@@ -98,27 +98,27 @@
            html += '<li style="float: left; width: 246px;">';
            html += '<div class="item">';
            html += '<div class="pic">';
            html += '<img src="'+item.imgName+'" alt="">';
            html += '</div><div class="tit">'+item.snapTime+'</div>';
            html += '<div class="tit" style="white-space: nowrap;">'+deptListMap[item.deptId]+'</div>';
            html += '<img src="' + item.imgName + '" alt="">';
            html += '</div><div class="tit">' + item.snapTime + '</div>';
            html += '<div class="tit" style="white-space: nowrap;">' + deptListMap[item.deptId] + '</div>';
            html += '</div></li>';
        })
    }else {
    } else {
        $.each(deptAllList, function (index, item) {
            html += '<li style="float: left; width: 246px;">';
            html += '<div class="item">';
            html += '<div class="pic">';
            html += '<img src="/img/img-fail.jpg" alt="">';
            html += '</div><div class="tit">近期暂无抓拍图</div>';
            html += '<div class="tit" style="white-space: nowrap;">'+item.kqmc+'</div>';
            html += '<div class="tit" style="white-space: nowrap;">' + item.kqmc + '</div>';
            html += '</div></li>';
        })
    }
    $("#snapList").html(html);
    //抓拍跟踪滚动
    jQuery(".block2").slide({ mainCell: ".bd ul", autoPage: true, effect: "topLoop", autoPlay: true, vis: 4 });
    jQuery(".follow").slide({ mainCell: ".bd ul", autoPlay: true, effect: "leftMarquee", vis: 5, interTime: 40 });
    jQuery(".block2").slide({mainCell: ".bd ul", autoPage: true, effect: "topLoop", autoPlay: true, vis: 4});
    jQuery(".follow").slide({mainCell: ".bd ul", autoPlay: true, effect: "leftMarquee", vis: 5, interTime: 40});
}
@@ -126,8 +126,8 @@
 * 库区定时切换
 */
function timing() {
    timer = setInterval(function() {
        if(deptNum === deptList.length){
    timer = setInterval(function () {
        if (deptNum === deptList.length) {
            deptNum = 0;
        }
@@ -148,11 +148,11 @@
//加载指定地区地图和点位
function renderMapPoints(areaName) {
    if(!areaName){
    if (!areaName) {
        return;
    }
    var names = areaName.split(",");
    if(names.length < 1){
    if (names.length < 1) {
        return;
    }
@@ -167,13 +167,13 @@
    geoMap = [];
    for (var j = 0; j < names.length; j++) {
        for (var i = 0; i < all.length; i++) {
            if(all[i].properties.name === names[j]){
            if (all[i].properties.name === names[j]) {
                map.features.push(all[i]);
                // if(all[i].properties.name === "伊犁哈萨克自治州"){
                    geoMap.push({
                        name: all[i].properties.centerName,
                        value: [all[i].properties.center[0], all[i].properties.center[1], 12]
                    });
                geoMap.push({
                    name: all[i].properties.centerName,
                    value: [all[i].properties.center[0], all[i].properties.center[1], 12]
                });
                // }
                // renderMap();
                break;
@@ -193,7 +193,7 @@
    echarts.registerMap('chinaMapOutline', map);
    var option = {
        backgroundColor:'transparent',
        backgroundColor: 'transparent',
        tooltip: {
            show: false,
            trigger: 'item'
@@ -310,7 +310,7 @@
                type: 'effectScatter',
                coordinateSystem: 'geo',
                data: geoMap,
                symbolSize:  function (val) {
                symbolSize: function (val) {
                    return val[2];
                },
                rippleEffect: {
@@ -339,7 +339,7 @@
        ]
    };
    myChart.setOption( option );
    myChart.setOption(option);
    mapChart = {"chart": myChart, "option": option};
}
@@ -354,15 +354,17 @@
    var flag = false;
    if (deptList != null && deptList.length > 0) {
        $.each(deptList, function (index, item) {
            if(item.dailyTotal === 0){
            if (item.dailyTotal === 0) {
                num1 = '当日一切正常';
            }else{
                num1 = '当日数量'+ item.dailyTotal + '个';
            } else if (item.dailyTotal < 0) {
                num1 = '未检测到网关';
            } else {
                num1 = '当日数量' + item.dailyTotal + '个';
            }
            if(item.warnNum7 === 0){
            if (item.warnNum7 === 0) {
                num7 = '近七天一切正常';
            }else{
                num7 = '近七天数量'+ item.warnNum7 + '个';
            } else {
                num7 = '近七天数量' + item.warnNum7 + '个';
            }
            html += '<div class="panel-content-body-tr">';
            if (item.dailyTotal > 0) {
@@ -379,14 +381,14 @@
            //     html += '<span class="body-item sp" style="color: #f37b3d;">' + num1+ '</span>';
            //     html += '<span class="body-item sp" style="color: #f37b3d;">' + num7 + '</span>';
            // }else {
                html += '<span class="body-item sp" style="flex: 1.5;">' + item.deptName + '</span>';
                html += '<span class="body-item sp">' + num1 + '</span>';
                html += '<span class="body-item sp">' + num7 + '</span>';
            html += '<span class="body-item sp" style="flex: 1.5;">' + item.deptName + '</span>';
            html += '<span class="body-item sp">' + num1 + '</span>';
            html += '<span class="body-item sp">' + num7 + '</span>';
            // }
            html += '</div>';
        })
    }
    if(flag){
    if (flag) {
        $("#panel-title").html('库区AI事件信息  <i class="dot"></i>');
    }
    $("#inventoryInfo").html(html);
@@ -441,13 +443,13 @@
function updateDeptMap() {
    var points = [];
    $.each(deptList, function(index, item) {
    $.each(deptList, function (index, item) {
        var val = [];
        var name = '';
        if(index === deptNum){
        if (index === deptNum) {
            name = item.deptName;
            val = [item.jd, item.wd, 17];
        }else {
        } else {
            val = [item.jd, item.wd, 8];
        }
        points.push({
@@ -563,7 +565,7 @@
function initChart() {
    /* 库存图表加载 */
    allInventoryChartLoad(
        ['小麦', '玉米', '稻谷', '成品粮',  '成品油', '其他'],
        ['小麦', '玉米', '稻谷', '成品粮', '成品油', '其他'],
        [1000, 1200, 1500, 1300, 1100, 1600]
    );
}