whycxzp
2025-03-26 4b7a32dd5523d9d58ae9a39709b3d96380876f69
src/main/java/com/whyc/service/PowerInfService.java
@@ -108,9 +108,10 @@
        if(powerInf.getChannelCount() == null){
            powerInf.setChannelCount(1);
        }
        //电源id查询最大值
        int powerId = mapper.getMaxPowerId();
        powerInf.setPowerId(powerId+1);
        mapper.insert(powerInf);
        //电源id获取
        int powerId = powerInf.getPowerId();
        //对站点名称进行查询,如果存在则直接绑定关系
        //如果不存在,则新增后,再绑定关系
        StationInf stationInf = stationInfService.getByStationName(powerInf.getStationName());
@@ -125,7 +126,6 @@
        }
        //站点和电源id关联
        stationPowerRelationService.add(stationId,powerId);
        mapper.insert(powerInf);
        return new Response().setII(1,"新增完成");
    }