| | |
| | | throw new IllegalArgumentException("部门ID不能为空"); |
| | | } |
| | | try { |
| | | |
| | | //utilMethod.authorizationVerification(boxSn.length); |
| | | |
| | | // 1. 检查已存在的无人机盒子 |
| | | List<ArdDroneInfo> existingDrones = getExistingDrones(boxSn); |
| | | // 2. 授权数量验证 |
| | |
| | | drone.setId(IdUtils.simpleUUID()); |
| | | drone.setBoxSn(box.getBoxSn()); |
| | | drone.setBoxName(box.getBoxName()); |
| | | drone.setBoxAliasName(box.getBoxName()); |
| | | drone.setStartTime(new Date()); |
| | | drone.setOnLine(box.getOnLine()); |
| | | drone.setVideoServer(box.getVideoServer()); |
| | |
| | | */ |
| | | private int batchInsertDrones(List<ArdDroneInfo> drones) { |
| | | if (drones.isEmpty()) { |
| | | log.info("没有需要插入的无人机信息"); |
| | | return 0; |
| | | } |
| | | |
| | | int result = ArdDroneInfoMapper.insertArdDroneLs(drones); |
| | | log.info("成功插入 {} 条无人机记录", result); |
| | | return result; |
| | | return ArdDroneInfoMapper.insertArdDroneLs(drones); |
| | | } |
| | | |
| | | /** |