88 lines
2.1 KiB
Plaintext
88 lines
2.1 KiB
Plaintext
|
|
package com.sercurityControl.proteam.service.impl;
|
|||
|
|
|
|||
|
|
import com.securityControl.common.core.web.domain.AjaxResult;
|
|||
|
|
import com.sercurityControl.proteam.domain.ClassData;
|
|||
|
|
import com.sercurityControl.proteam.domain.UAVBandProEntity;
|
|||
|
|
import com.sercurityControl.proteam.domain.UavEntity;
|
|||
|
|
import com.sercurityControl.proteam.mapper.UavPatrolMapper;
|
|||
|
|
import com.sercurityControl.proteam.service.UavPatrolService;
|
|||
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|||
|
|
import org.springframework.stereotype.Service;
|
|||
|
|
|
|||
|
|
import java.util.*;
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* @author Administrator
|
|||
|
|
*/
|
|||
|
|
@Service("UavService")
|
|||
|
|
public class UavPatrolServiceImpl implements UavPatrolService {
|
|||
|
|
|
|||
|
|
@Autowired
|
|||
|
|
private UavPatrolMapper mapper;
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* 通过userId判断权限,来获取无人机数据
|
|||
|
|
*
|
|||
|
|
* @param userId 用户id
|
|||
|
|
* @return 集合
|
|||
|
|
**/
|
|||
|
|
@Override
|
|||
|
|
public AjaxResult getUavData(String userId) {
|
|||
|
|
return AjaxResult.success(mapper.getUavData(userId));
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* 获取无人机数据 绑定信息
|
|||
|
|
*
|
|||
|
|
* @return 集合
|
|||
|
|
**/
|
|||
|
|
@Override
|
|||
|
|
public List<UAVBandProEntity> getUavBandProList() {
|
|||
|
|
return mapper.getUavBandProList();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* 获取工程集合
|
|||
|
|
*
|
|||
|
|
* @return 集合
|
|||
|
|
**/
|
|||
|
|
@Override
|
|||
|
|
public AjaxResult getProList() {
|
|||
|
|
return AjaxResult.success(mapper.getProList());
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* 修改设备绑定工程
|
|||
|
|
*
|
|||
|
|
* @param entity 条件
|
|||
|
|
* @return 集合
|
|||
|
|
**/
|
|||
|
|
@Override
|
|||
|
|
public AjaxResult updateBand(UAVBandProEntity entity) {
|
|||
|
|
try {
|
|||
|
|
Integer integer = mapper.updateBand(entity);
|
|||
|
|
if (integer == 1) {
|
|||
|
|
return AjaxResult.success("修改成功");
|
|||
|
|
} else {
|
|||
|
|
return AjaxResult.success("修改失败");
|
|||
|
|
}
|
|||
|
|
} catch (Exception e) {
|
|||
|
|
e.printStackTrace();
|
|||
|
|
return AjaxResult.success("修改失败");
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* 获取站班会信息
|
|||
|
|
*
|
|||
|
|
* @param entity 条件
|
|||
|
|
* @return 集合
|
|||
|
|
*/
|
|||
|
|
@Override
|
|||
|
|
public List<ClassData> getClass(ClassData entity) {
|
|||
|
|
return mapper.getClass(entity);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
}
|