whyclxw
2025-05-19 638fe30c57a2f7aecbad4e9bf1e8f5c6e80397a0
编辑机房电源,电池组信息时判断机房名
1个文件已修改
7 ■■■■■ 已修改文件
src/main/java/com/whyc/service/BattInfService.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/service/BattInfService.java
@@ -170,6 +170,12 @@
        StationInf sinf=pinf.getSinf();
        UpdateWrapper wrapper1=new UpdateWrapper();
        if(sinf.getStationName()!=null){
            //先查看机房名和stationid是不是匹配的
            QueryWrapper wrapper2=new QueryWrapper();
            wrapper2.eq("station_id",sinf.getStationId());
            wrapper2.last("limit 1");
            StationInf s=sinfMapper.selectOne(wrapper2);
            if(!s.getStationName().equalsIgnoreCase(sinf.getStationName())){
            wrapper1.set("station_name",sinf.getStationName());
            String fullName=sinf.getProvice()+"_"+sinf.getCity()+"_"+sinf.getCountry()+"_"+sinf.getStationName();
            //检测该机房下要修改的电源名是否存在
@@ -182,6 +188,7 @@
            }
            wrapper1.set("full_name",fullName);
        }
        }
        if(sinf.getStationType()!=null){
            wrapper1.set("station_type",sinf.getStationType());
        }