lxw
2023-11-03 2560a5d3d0a504a41691528dc1d8c0a6f1cdd6b7
src/main/java/com/whyc/service/StationInfService.java
@@ -203,16 +203,16 @@
            int togetherFlag = mapper.getMaxTogetherFlag() + 1;
            sinfWrapper.set("together_flag", togetherFlag);
        }
        int flag = mapper.update(null, sinfWrapper);
        int flag = mapper.update((StationInf) ActionUtil.objeNull, sinfWrapper);
        QueryWrapper queryWrapper = new QueryWrapper();
        queryWrapper.eq("stationId", stationId);
        List listB = binfMapper.selectList(queryWrapper);
        if (listB != null && listB.size() > 0) {
            binfMapper.update(null, wrapper);
            binfMapper.update((Battinf) ActionUtil.objeNull, wrapper);
        }
        List listP = pinfMapper.selectList(queryWrapper);
        if (listP != null && listP.size() > 0) {
            pinfMapper.update(null, wrapper);
            pinfMapper.update((PowerInf) ActionUtil.objeNull, wrapper);
        }
        return new Response().set(1, flag > 0, flag > 0 ? "编辑机房名成功" : "编辑机房名失败");
    }
@@ -286,20 +286,20 @@
        } else {
            mapInfo.setAddress("");
        }
        int flag = mapper.update(null, wrapper);
        int flag = mapper.update((StationInf) ActionUtil.objeNull, wrapper);
        if (nofla > 0 || stlag > 0) {
            QueryWrapper qwrapper = new QueryWrapper();
            qwrapper.eq("stationId", stationId);
            List list = binfMapper.selectList(qwrapper);
            if (list.size() > 0) {
                binfMapper.update(null, infwrapper);
                binfMapper.update((Battinf) ActionUtil.objeNull, infwrapper);
            }
            //修改相同机房
            if (sinfEx != null) {
                wrapperEx.eq("stationId", sinfEx.getStationId());
                infwrapperEx.eq("stationId", sinfEx.getStationId());
                mapper.update(null, wrapperEx);
                binfMapper.update(null, infwrapperEx);
                mapper.update((StationInf) ActionUtil.objeNull, wrapperEx);
                binfMapper.update((Battinf) ActionUtil.objeNull, infwrapperEx);
            }
        }
        if (lofla > 0 || lafla > 0 || addfla > 0) {
@@ -307,7 +307,7 @@
            mwrapper.eq("stationId", stationId);
            List list = mapMapper.selectList(mwrapper);
            if (list.size() > 0) {
                mapMapper.update(null, mapwrapper);
                mapMapper.update((BattMapInformation) ActionUtil.objeNull, mapwrapper);
            } else {
                QueryWrapper swrapper = new QueryWrapper();
                swrapper.eq("stationId", stationId);
@@ -325,7 +325,7 @@
                mwrapperEx.eq("stationId", sinfEx.getStationId());
                List listEx = mapMapper.selectList(mwrapperEx);
                if (listEx.size() > 0) {
                    mapMapper.update(null, mapwrapperEx);
                    mapMapper.update((BattMapInformation) ActionUtil.objeNull, mapwrapperEx);
                } else {
                    //插入map
                    mapInfo.setStationId(sinfEx.getStationId());
@@ -530,7 +530,7 @@
            //站点地图
            List<StationInf> mapAndWorkStateList = getStationMapAndWorkState(userId);
            stationInfoMap.put("stationMap", mapAndWorkStateList);
            return new Response().setII(1, true, stationInfoMap, null);
            return new Response().setII(1, true, stationInfoMap, "");
        } catch (Exception e) {
            return new Response().set(1, false, "发生异常:" + e.getCause());
        }
@@ -843,7 +843,7 @@
                UpdateWrapper sinfWrapper = new UpdateWrapper();
                sinfWrapper.set("nodeStation", inf.getNodeStation());
                sinfWrapper.eq("stationId", inf.getStationId());
                flag += mapper.update(null, sinfWrapper);
                flag += mapper.update((StationInf) ActionUtil.objeNull, sinfWrapper);
                //查看在电池组机房是否存在stationId
                QueryWrapper wrapper = new QueryWrapper();
                wrapper.eq("stationId", inf.getStationId());
@@ -853,7 +853,7 @@
                    UpdateWrapper binfWrapper = new UpdateWrapper();
                    binfWrapper.set("nodeStation", inf.getNodeStation());
                    binfWrapper.eq("stationId", inf.getStationId());
                    flag += binfMapper.update(null, binfWrapper);
                    flag += binfMapper.update((Battinf) ActionUtil.objeNull, binfWrapper);
                }
            }
        }