设备在线率统计等
This commit is contained in:
@ -20,7 +20,7 @@ import com.fastbee.framework.web.domain.Server;
|
|||||||
public class ServerController
|
public class ServerController
|
||||||
{
|
{
|
||||||
@ApiOperation("获取服务器信息")
|
@ApiOperation("获取服务器信息")
|
||||||
@PreAuthorize("@ss.hasPermi('monitor:server:list')")
|
// @PreAuthorize("@ss.hasPermi('monitor:server:list')")
|
||||||
@GetMapping()
|
@GetMapping()
|
||||||
public AjaxResult getInfo() throws Exception
|
public AjaxResult getInfo() throws Exception
|
||||||
{
|
{
|
||||||
|
@ -40,7 +40,7 @@ public class SysNoticeController extends BaseController
|
|||||||
* 获取通知公告列表
|
* 获取通知公告列表
|
||||||
*/
|
*/
|
||||||
@ApiOperation("获取通知公告列表")
|
@ApiOperation("获取通知公告列表")
|
||||||
@PreAuthorize("@ss.hasPermi('system:notice:list')")
|
// @PreAuthorize("@ss.hasPermi('system:notice:list')")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(SysNotice notice)
|
public TableDataInfo list(SysNotice notice)
|
||||||
{
|
{
|
||||||
|
@ -61,7 +61,7 @@ public class ResourcesConfig implements WebMvcConfigurer
|
|||||||
"/tool/gen/**");
|
"/tool/gen/**");
|
||||||
//配置项目数据隔离拦截器
|
//配置项目数据隔离拦截器
|
||||||
registry.addInterceptor(projectDataIsolationInterceptor)
|
registry.addInterceptor(projectDataIsolationInterceptor)
|
||||||
.addPathPatterns("/gis/groups/**", "/gis/legend/**","/gis/site/**","/project/**","/system/**");
|
.addPathPatterns("/gis/groups/**", "/gis/legend/**","/gis/site/**","/project/**","/system/**","/device/statistics/**");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -131,6 +131,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
|
|||||||
//安防小板
|
//安防小板
|
||||||
.antMatchers("/iot/photos","/iot/photos/**","/yinghsiyun/webhook").permitAll()
|
.antMatchers("/iot/photos","/iot/photos/**","/yinghsiyun/webhook").permitAll()
|
||||||
.antMatchers("/test/**/*").permitAll()
|
.antMatchers("/test/**/*").permitAll()
|
||||||
|
.antMatchers("/prod-api/**").permitAll()
|
||||||
.antMatchers("/system/district/tree").permitAll()
|
.antMatchers("/system/district/tree").permitAll()
|
||||||
// 除上面外的所有请求全部需要鉴权认证
|
// 除上面外的所有请求全部需要鉴权认证
|
||||||
.anyRequest().authenticated()
|
.anyRequest().authenticated()
|
||||||
|
@ -51,7 +51,7 @@ public class AlertLogController extends BaseController
|
|||||||
* 查询设备告警列表
|
* 查询设备告警列表
|
||||||
*/
|
*/
|
||||||
@ApiOperation("查询设备告警列表")
|
@ApiOperation("查询设备告警列表")
|
||||||
@PreAuthorize("@ss.hasPermi('iot:alertLog:list')")
|
// @PreAuthorize("@ss.hasPermi('iot:alertLog:list')")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(AlertLog alertLog)
|
public TableDataInfo list(AlertLog alertLog)
|
||||||
{
|
{
|
||||||
|
@ -31,7 +31,7 @@ public class XjInspectionRecordsController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 查询记录列表
|
* 查询记录列表
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('inspection:records:list')")
|
// @PreAuthorize("@ss.hasPermi('inspection:records:list')")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(XjInspectionRecords klxjInspectionRecords)
|
public TableDataInfo list(XjInspectionRecords klxjInspectionRecords)
|
||||||
{
|
{
|
||||||
@ -44,7 +44,7 @@ public class XjInspectionRecordsController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 导出记录列表
|
* 导出记录列表
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('inspection:records:export')")
|
// @PreAuthorize("@ss.hasPermi('inspection:records:export')")
|
||||||
@Log(title = "记录", businessType = BusinessType.EXPORT)
|
@Log(title = "记录", businessType = BusinessType.EXPORT)
|
||||||
@PostMapping("/export")
|
@PostMapping("/export")
|
||||||
public void export(HttpServletResponse response, XjInspectionRecords klxjInspectionRecords)
|
public void export(HttpServletResponse response, XjInspectionRecords klxjInspectionRecords)
|
||||||
@ -57,7 +57,7 @@ public class XjInspectionRecordsController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 获取记录详细信息
|
* 获取记录详细信息
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('inspection:records:query')")
|
// @PreAuthorize("@ss.hasPermi('inspection:records:query')")
|
||||||
@GetMapping(value = "/{id}")
|
@GetMapping(value = "/{id}")
|
||||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||||
{
|
{
|
||||||
@ -67,7 +67,7 @@ public class XjInspectionRecordsController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 新增记录
|
* 新增记录
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('inspection:records:add')")
|
// @PreAuthorize("@ss.hasPermi('inspection:records:add')")
|
||||||
@Log(title = "记录", businessType = BusinessType.INSERT)
|
@Log(title = "记录", businessType = BusinessType.INSERT)
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@RequestBody XjInspectionRecords klxjInspectionRecords)
|
public AjaxResult add(@RequestBody XjInspectionRecords klxjInspectionRecords)
|
||||||
@ -78,7 +78,7 @@ public class XjInspectionRecordsController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 修改记录
|
* 修改记录
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('inspection:records:edit')")
|
// @PreAuthorize("@ss.hasPermi('inspection:records:edit')")
|
||||||
@Log(title = "记录", businessType = BusinessType.UPDATE)
|
@Log(title = "记录", businessType = BusinessType.UPDATE)
|
||||||
@PutMapping
|
@PutMapping
|
||||||
public AjaxResult edit(@RequestBody XjInspectionRecords klxjInspectionRecords)
|
public AjaxResult edit(@RequestBody XjInspectionRecords klxjInspectionRecords)
|
||||||
@ -89,7 +89,7 @@ public class XjInspectionRecordsController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 删除记录
|
* 删除记录
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('inspection:records:remove')")
|
// @PreAuthorize("@ss.hasPermi('inspection:records:remove')")
|
||||||
@Log(title = "记录", businessType = BusinessType.DELETE)
|
@Log(title = "记录", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{ids}")
|
@DeleteMapping("/{ids}")
|
||||||
public AjaxResult remove(@PathVariable Long[] ids)
|
public AjaxResult remove(@PathVariable Long[] ids)
|
||||||
|
@ -91,8 +91,10 @@ public class DeviceDateTask {
|
|||||||
*/
|
*/
|
||||||
public void getDevLinkMoistureDeviceRealtimeData() throws Exception{
|
public void getDevLinkMoistureDeviceRealtimeData() throws Exception{
|
||||||
DeviceRealtimedataMoisture deviceRealtimedataMoisture = moistureDataService.setData(moistureDataService.getDeviceRealTimeData("3270"));
|
DeviceRealtimedataMoisture deviceRealtimedataMoisture = moistureDataService.setData(moistureDataService.getDeviceRealTimeData("3270"));
|
||||||
|
DeviceRealtimedataMoisture deviceRealtimedataMoisture1 = moistureDataService.setData(moistureDataService.getDeviceRealTimeData("3271"));
|
||||||
int i = deviceRealtimedataMoistureMapper.insert(deviceRealtimedataMoisture);
|
int i = deviceRealtimedataMoistureMapper.insert(deviceRealtimedataMoisture);
|
||||||
if (i<1)
|
int i1 = deviceRealtimedataMoistureMapper.insert(deviceRealtimedataMoisture1);
|
||||||
|
if (i<1||i1<1)
|
||||||
System.out.println("插入数据失败!");
|
System.out.println("插入数据失败!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,4 +32,6 @@ public class ProjectLoginBaseInfo {
|
|||||||
private BigDecimal longitude;
|
private BigDecimal longitude;
|
||||||
// 项目的行政区划中心点纬度
|
// 项目的行政区划中心点纬度
|
||||||
private BigDecimal latitude;
|
private BigDecimal latitude;
|
||||||
|
// 项目类型
|
||||||
|
private Long projectType;
|
||||||
}
|
}
|
||||||
|
@ -426,7 +426,7 @@ public class ProjectServiceImpl implements IProjectService
|
|||||||
//查询该管理员所管理的项目id以及子项目id列表
|
//查询该管理员所管理的项目id以及子项目id列表
|
||||||
Project project = new LambdaQueryChainWrapper<>(projectMapper)
|
Project project = new LambdaQueryChainWrapper<>(projectMapper)
|
||||||
.select(Project::getId, Project::getProjectName,Project::getLevel,Project::getDeptId
|
.select(Project::getId, Project::getProjectName,Project::getLevel,Project::getDeptId
|
||||||
,Project::getCityCode,Project::getCountyCode)
|
,Project::getCityCode,Project::getCountyCode,Project::getType)
|
||||||
.eq(Project::getId, sysDept.getProjectId())
|
.eq(Project::getId, sysDept.getProjectId())
|
||||||
.one();
|
.one();
|
||||||
if(Objects.isNull(project)){
|
if(Objects.isNull(project)){
|
||||||
@ -443,6 +443,8 @@ public class ProjectServiceImpl implements IProjectService
|
|||||||
projectLoginBaseInfo.setProjectId(project.getId());
|
projectLoginBaseInfo.setProjectId(project.getId());
|
||||||
//设置项目名称
|
//设置项目名称
|
||||||
projectLoginBaseInfo.setProjectName(project.getProjectName());
|
projectLoginBaseInfo.setProjectName(project.getProjectName());
|
||||||
|
//设置项目类型
|
||||||
|
projectLoginBaseInfo.setProjectType(project.getType());
|
||||||
|
|
||||||
//根据项目级别获取对应的行政区划编码
|
//根据项目级别获取对应的行政区划编码
|
||||||
if(project.getLevel().equals("市级")){
|
if(project.getLevel().equals("市级")){
|
||||||
|
Reference in New Issue
Block a user