| | |
| | | /** |
| | | * 无人机盒子Service业务层处理 |
| | | * |
| | | * @author ruoyi |
| | | * @author ard |
| | | * @date 2025-03-04 |
| | | */ |
| | | @Slf4j |
| | |
| | | |
| | | @Resource |
| | | private AuthorizeService authorizeService; |
| | | |
| | | UtilMethod utilMethod = new UtilMethod(); |
| | | |
| | | /** |
| | | * 查询无人机盒子 |
| | |
| | | throw new IllegalArgumentException("部门ID不能为空"); |
| | | } |
| | | try { |
| | | |
| | | //utilMethod.authorizationVerification(boxSn.length); |
| | | |
| | | // 1. 检查已存在的无人机盒子 |
| | | List<ArdDroneInfo> existingDrones = getExistingDrones(boxSn); |
| | | // 2. 授权数量验证 |
| | |
| | | log.error("批量新增无人机盒子失败, boxSn: {}, deptId: {}", Arrays.toString(boxSn), deptId, e); |
| | | throw new ServiceException("批量新增无人机盒子失败: " + e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 修改无人机状态 |
| | | */ |
| | | @Override |
| | | public int updateDroneStatus(String serverId, String status) { |
| | | return ArdDroneInfoMapper.updateDroneStatus(serverId, status); |
| | | } |
| | | |
| | | /** |
| | |
| | | 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); |
| | | } |
| | | |
| | | /** |