diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/DeviceInfoController.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/DeviceInfoController.java index 9981990..9b652dd 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/DeviceInfoController.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/DeviceInfoController.java @@ -8,7 +8,6 @@ import com.newfiber.common.log.annotation.Log; import com.newfiber.common.log.enums.BusinessType; import com.newfiber.termite.domain.DeviceInfo; -import com.newfiber.termite.domain.SnDeviceInfo; import com.newfiber.termite.domain.request.deviceInfo.*; import com.newfiber.termite.service.IDeviceInfoService; import io.swagger.annotations.Api; @@ -129,39 +128,4 @@ return success(list); } - -// /** -// * 列表查询当前用户设备sn信息 -// */ -// @GetMapping("/snList") -// @ApiOperation(value = "列表查询当前用户设备信息", position = 60) -// public Result> snlist(DeviceSnInfoQueryRequest request) { -// List list = deviceInfoService.selectSnList(request); -// return success(list); -// } -// -// -// /** -// * 分页查询当前用户设备sn信息 -// */ -// @GetMapping("/snPage") -// @ApiOperation(value = "列表查询当前用户设备信息", position = 60) -// public Result> snPage(DeviceInfoQueryRequest request) { -// startPage(); -// List list = deviceInfoService.selectSnPage(request); -// return pageResult(list); -// } -// -// /** -// * SN编号查询监测记录 -// */ -// @GetMapping("/snQuerMonitoryList") -// @ApiOperation(value = "SN编号查询用户设备监测信息", position = 60) -// public Result> snQuerMonitoryList(DeviceInfoQueryRequest request) { -// List list = deviceInfoService.snQuerMonitoryList(request); -// return success(list); -// -// } - - } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/DeviceInfoController.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/DeviceInfoController.java index 9981990..9b652dd 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/DeviceInfoController.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/DeviceInfoController.java @@ -8,7 +8,6 @@ import com.newfiber.common.log.annotation.Log; import com.newfiber.common.log.enums.BusinessType; import com.newfiber.termite.domain.DeviceInfo; -import com.newfiber.termite.domain.SnDeviceInfo; import com.newfiber.termite.domain.request.deviceInfo.*; import com.newfiber.termite.service.IDeviceInfoService; import io.swagger.annotations.Api; @@ -129,39 +128,4 @@ return success(list); } - -// /** -// * 列表查询当前用户设备sn信息 -// */ -// @GetMapping("/snList") -// @ApiOperation(value = "列表查询当前用户设备信息", position = 60) -// public Result> snlist(DeviceSnInfoQueryRequest request) { -// List list = deviceInfoService.selectSnList(request); -// return success(list); -// } -// -// -// /** -// * 分页查询当前用户设备sn信息 -// */ -// @GetMapping("/snPage") -// @ApiOperation(value = "列表查询当前用户设备信息", position = 60) -// public Result> snPage(DeviceInfoQueryRequest request) { -// startPage(); -// List list = deviceInfoService.selectSnPage(request); -// return pageResult(list); -// } -// -// /** -// * SN编号查询监测记录 -// */ -// @GetMapping("/snQuerMonitoryList") -// @ApiOperation(value = "SN编号查询用户设备监测信息", position = 60) -// public Result> snQuerMonitoryList(DeviceInfoQueryRequest request) { -// List list = deviceInfoService.snQuerMonitoryList(request); -// return success(list); -// -// } - - } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/SnDeviceInfo.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/SnDeviceInfo.java deleted file mode 100644 index 0cb05d0..0000000 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/SnDeviceInfo.java +++ /dev/null @@ -1,216 +0,0 @@ -package com.newfiber.termite.domain; - - -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableName; -import com.newfiber.common.core.web.domain.BaseEntity; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; - -import java.util.Date; - -@Data -@TableName("ter_device_info") -@EqualsAndHashCode(callSuper = true) -@ApiModel(value = "设备信息", description = "设备信息") -public class SnDeviceInfo extends BaseEntity { - private static final long serialVersionUID = 1L; - - /** - * 分类(生产 production | 项目 project) - */ - @ApiModelProperty(value = "分类(生产 production | 项目 project)") - private String category; - - /** - * 项目编号 - */ - @ApiModelProperty(value = "项目编号") - private String projectCode; - - /** - * 设备编号 - */ - @ApiModelProperty(value = "设备编号") - private String sn; - - /** - * 设备类型(4G/WiFi) - */ - @ApiModelProperty(value = "设备类型(4G/WiFi)") - private String deviceType; - - /** - * 位置类型(内圈 inner | 外圈 outer) - */ - @ApiModelProperty(value = "位置类型(内圈 inner | 外圈 outer)") - private String locationType; - - /** - * 设备地址 - */ - @ApiModelProperty(value = "设备地址") - private String location; - - /** - * 初始照片 - */ - @ApiModelProperty(value = "初始照片") - private String initialpictu; - - /** - * 经纬度 - */ - @ApiModelProperty(value = "经纬度") - private String lonandlat; - - /** - * 扩展配置(JSON) - */ - @ApiModelProperty(value = "扩展配置(JSON)") - private String extendConfig; - - /** - * - */ - @ApiModelProperty(value = "") - private Date lastPicTime; - - /** - * 上次加热时间 - */ - @ApiModelProperty(value = "上次加热时间") - private Date lastHeatTime; - - /** - * 上次投药时间 - */ - @ApiModelProperty(value = "上次投药时间") - private Date lastMedicateTime; - - /** - * 首次报警时间(连续3次手动确认则报警) - */ - @ApiModelProperty(value = "首次报警时间(连续3次手动确认则报警)") - private Date firstWarnDatetime; - - /** - * 是否投过药(1是 | 2 否) - */ - @ApiModelProperty(value = "是否投过药(1是 | 2 否)") - private String druging; - - /** - *同步状态(成功 success | 失败 fail) - */ - @ApiModelProperty(value = "同步状态(成功 success | 失败 fail)") - private String syncState; - - /** - * - */ - @ApiModelProperty(value = "软件版本") - private String software; - - /** - * - */ - @ApiModelProperty(value = "硬件版本") - private String hardware; - - /** - * - */ - @ApiModelProperty(value = "电压") - private String voltage; - - /** - * - */ - @ApiModelProperty(value = "温度") - private String temperature; - - /** - * - */ - @ApiModelProperty(value = "信号质量") - private String rssi; - - /** - * - */ - @ApiModelProperty(value = "中继名称") - private String ap; - - /** - * - */ - @ApiModelProperty(value = "摄像头") - private String camera; - - /** - * - */ - @ApiModelProperty(value = "模块厂商") - private String lteManufactor; - - /** - * - */ - @ApiModelProperty(value = "模块型号") - private String lteModel; - - /** - * - */ - @ApiModelProperty(value = "固件版本") - private String lteFirmware; - - /** - * - */ - @ApiModelProperty(value = "IMEI") - private String lteImei; - - /** - * - */ - @ApiModelProperty(value = "ICCID") - private String lteIccid; - - /** - * - */ - @ApiModelProperty(value = "服务商") - private String lteCpos; - - // DB Property - - /** - * 上传地址 - */ - @TableField(exist = false) - @ApiModelProperty(value = "上传地址") - private String uploadApi; - - /** - * 项目名称 - */ - @TableField(exist = false) - @ApiModelProperty(value = "项目名称") - private String projectName; - - - - @ApiModelProperty(value = "是否在线") - private String isOnline; - - - @ApiModelProperty(value = "有无白蚁") - private String yesnoant; - - @ApiModelProperty(value = "告警时间") - private String snDate; -} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/DeviceInfoController.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/DeviceInfoController.java index 9981990..9b652dd 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/DeviceInfoController.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/DeviceInfoController.java @@ -8,7 +8,6 @@ import com.newfiber.common.log.annotation.Log; import com.newfiber.common.log.enums.BusinessType; import com.newfiber.termite.domain.DeviceInfo; -import com.newfiber.termite.domain.SnDeviceInfo; import com.newfiber.termite.domain.request.deviceInfo.*; import com.newfiber.termite.service.IDeviceInfoService; import io.swagger.annotations.Api; @@ -129,39 +128,4 @@ return success(list); } - -// /** -// * 列表查询当前用户设备sn信息 -// */ -// @GetMapping("/snList") -// @ApiOperation(value = "列表查询当前用户设备信息", position = 60) -// public Result> snlist(DeviceSnInfoQueryRequest request) { -// List list = deviceInfoService.selectSnList(request); -// return success(list); -// } -// -// -// /** -// * 分页查询当前用户设备sn信息 -// */ -// @GetMapping("/snPage") -// @ApiOperation(value = "列表查询当前用户设备信息", position = 60) -// public Result> snPage(DeviceInfoQueryRequest request) { -// startPage(); -// List list = deviceInfoService.selectSnPage(request); -// return pageResult(list); -// } -// -// /** -// * SN编号查询监测记录 -// */ -// @GetMapping("/snQuerMonitoryList") -// @ApiOperation(value = "SN编号查询用户设备监测信息", position = 60) -// public Result> snQuerMonitoryList(DeviceInfoQueryRequest request) { -// List list = deviceInfoService.snQuerMonitoryList(request); -// return success(list); -// -// } - - } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/SnDeviceInfo.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/SnDeviceInfo.java deleted file mode 100644 index 0cb05d0..0000000 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/SnDeviceInfo.java +++ /dev/null @@ -1,216 +0,0 @@ -package com.newfiber.termite.domain; - - -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableName; -import com.newfiber.common.core.web.domain.BaseEntity; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; - -import java.util.Date; - -@Data -@TableName("ter_device_info") -@EqualsAndHashCode(callSuper = true) -@ApiModel(value = "设备信息", description = "设备信息") -public class SnDeviceInfo extends BaseEntity { - private static final long serialVersionUID = 1L; - - /** - * 分类(生产 production | 项目 project) - */ - @ApiModelProperty(value = "分类(生产 production | 项目 project)") - private String category; - - /** - * 项目编号 - */ - @ApiModelProperty(value = "项目编号") - private String projectCode; - - /** - * 设备编号 - */ - @ApiModelProperty(value = "设备编号") - private String sn; - - /** - * 设备类型(4G/WiFi) - */ - @ApiModelProperty(value = "设备类型(4G/WiFi)") - private String deviceType; - - /** - * 位置类型(内圈 inner | 外圈 outer) - */ - @ApiModelProperty(value = "位置类型(内圈 inner | 外圈 outer)") - private String locationType; - - /** - * 设备地址 - */ - @ApiModelProperty(value = "设备地址") - private String location; - - /** - * 初始照片 - */ - @ApiModelProperty(value = "初始照片") - private String initialpictu; - - /** - * 经纬度 - */ - @ApiModelProperty(value = "经纬度") - private String lonandlat; - - /** - * 扩展配置(JSON) - */ - @ApiModelProperty(value = "扩展配置(JSON)") - private String extendConfig; - - /** - * - */ - @ApiModelProperty(value = "") - private Date lastPicTime; - - /** - * 上次加热时间 - */ - @ApiModelProperty(value = "上次加热时间") - private Date lastHeatTime; - - /** - * 上次投药时间 - */ - @ApiModelProperty(value = "上次投药时间") - private Date lastMedicateTime; - - /** - * 首次报警时间(连续3次手动确认则报警) - */ - @ApiModelProperty(value = "首次报警时间(连续3次手动确认则报警)") - private Date firstWarnDatetime; - - /** - * 是否投过药(1是 | 2 否) - */ - @ApiModelProperty(value = "是否投过药(1是 | 2 否)") - private String druging; - - /** - *同步状态(成功 success | 失败 fail) - */ - @ApiModelProperty(value = "同步状态(成功 success | 失败 fail)") - private String syncState; - - /** - * - */ - @ApiModelProperty(value = "软件版本") - private String software; - - /** - * - */ - @ApiModelProperty(value = "硬件版本") - private String hardware; - - /** - * - */ - @ApiModelProperty(value = "电压") - private String voltage; - - /** - * - */ - @ApiModelProperty(value = "温度") - private String temperature; - - /** - * - */ - @ApiModelProperty(value = "信号质量") - private String rssi; - - /** - * - */ - @ApiModelProperty(value = "中继名称") - private String ap; - - /** - * - */ - @ApiModelProperty(value = "摄像头") - private String camera; - - /** - * - */ - @ApiModelProperty(value = "模块厂商") - private String lteManufactor; - - /** - * - */ - @ApiModelProperty(value = "模块型号") - private String lteModel; - - /** - * - */ - @ApiModelProperty(value = "固件版本") - private String lteFirmware; - - /** - * - */ - @ApiModelProperty(value = "IMEI") - private String lteImei; - - /** - * - */ - @ApiModelProperty(value = "ICCID") - private String lteIccid; - - /** - * - */ - @ApiModelProperty(value = "服务商") - private String lteCpos; - - // DB Property - - /** - * 上传地址 - */ - @TableField(exist = false) - @ApiModelProperty(value = "上传地址") - private String uploadApi; - - /** - * 项目名称 - */ - @TableField(exist = false) - @ApiModelProperty(value = "项目名称") - private String projectName; - - - - @ApiModelProperty(value = "是否在线") - private String isOnline; - - - @ApiModelProperty(value = "有无白蚁") - private String yesnoant; - - @ApiModelProperty(value = "告警时间") - private String snDate; -} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/mapper/DeviceInfoMapper.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/mapper/DeviceInfoMapper.java index 2b6dbeb..333c460 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/mapper/DeviceInfoMapper.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/mapper/DeviceInfoMapper.java @@ -2,7 +2,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.newfiber.termite.domain.DeviceInfo; -import com.newfiber.termite.domain.SnDeviceInfo; import com.newfiber.termite.domain.request.deviceInfo.DeviceInfoQueryRequest; import com.newfiber.termite.domain.response.statistic.ProjectStatisticDetail; import java.util.List; @@ -34,13 +33,6 @@ */ DeviceInfo selectOneById(@Param("id") Long id); - List selectSnByCondition(@Param("request") DeviceInfoQueryRequest request); - - - //List snQuerMonitoryList(@Param("request") DeviceInfoQueryRequest request); - - - /** * */ diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/DeviceInfoController.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/DeviceInfoController.java index 9981990..9b652dd 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/DeviceInfoController.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/DeviceInfoController.java @@ -8,7 +8,6 @@ import com.newfiber.common.log.annotation.Log; import com.newfiber.common.log.enums.BusinessType; import com.newfiber.termite.domain.DeviceInfo; -import com.newfiber.termite.domain.SnDeviceInfo; import com.newfiber.termite.domain.request.deviceInfo.*; import com.newfiber.termite.service.IDeviceInfoService; import io.swagger.annotations.Api; @@ -129,39 +128,4 @@ return success(list); } - -// /** -// * 列表查询当前用户设备sn信息 -// */ -// @GetMapping("/snList") -// @ApiOperation(value = "列表查询当前用户设备信息", position = 60) -// public Result> snlist(DeviceSnInfoQueryRequest request) { -// List list = deviceInfoService.selectSnList(request); -// return success(list); -// } -// -// -// /** -// * 分页查询当前用户设备sn信息 -// */ -// @GetMapping("/snPage") -// @ApiOperation(value = "列表查询当前用户设备信息", position = 60) -// public Result> snPage(DeviceInfoQueryRequest request) { -// startPage(); -// List list = deviceInfoService.selectSnPage(request); -// return pageResult(list); -// } -// -// /** -// * SN编号查询监测记录 -// */ -// @GetMapping("/snQuerMonitoryList") -// @ApiOperation(value = "SN编号查询用户设备监测信息", position = 60) -// public Result> snQuerMonitoryList(DeviceInfoQueryRequest request) { -// List list = deviceInfoService.snQuerMonitoryList(request); -// return success(list); -// -// } - - } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/SnDeviceInfo.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/SnDeviceInfo.java deleted file mode 100644 index 0cb05d0..0000000 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/SnDeviceInfo.java +++ /dev/null @@ -1,216 +0,0 @@ -package com.newfiber.termite.domain; - - -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableName; -import com.newfiber.common.core.web.domain.BaseEntity; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; - -import java.util.Date; - -@Data -@TableName("ter_device_info") -@EqualsAndHashCode(callSuper = true) -@ApiModel(value = "设备信息", description = "设备信息") -public class SnDeviceInfo extends BaseEntity { - private static final long serialVersionUID = 1L; - - /** - * 分类(生产 production | 项目 project) - */ - @ApiModelProperty(value = "分类(生产 production | 项目 project)") - private String category; - - /** - * 项目编号 - */ - @ApiModelProperty(value = "项目编号") - private String projectCode; - - /** - * 设备编号 - */ - @ApiModelProperty(value = "设备编号") - private String sn; - - /** - * 设备类型(4G/WiFi) - */ - @ApiModelProperty(value = "设备类型(4G/WiFi)") - private String deviceType; - - /** - * 位置类型(内圈 inner | 外圈 outer) - */ - @ApiModelProperty(value = "位置类型(内圈 inner | 外圈 outer)") - private String locationType; - - /** - * 设备地址 - */ - @ApiModelProperty(value = "设备地址") - private String location; - - /** - * 初始照片 - */ - @ApiModelProperty(value = "初始照片") - private String initialpictu; - - /** - * 经纬度 - */ - @ApiModelProperty(value = "经纬度") - private String lonandlat; - - /** - * 扩展配置(JSON) - */ - @ApiModelProperty(value = "扩展配置(JSON)") - private String extendConfig; - - /** - * - */ - @ApiModelProperty(value = "") - private Date lastPicTime; - - /** - * 上次加热时间 - */ - @ApiModelProperty(value = "上次加热时间") - private Date lastHeatTime; - - /** - * 上次投药时间 - */ - @ApiModelProperty(value = "上次投药时间") - private Date lastMedicateTime; - - /** - * 首次报警时间(连续3次手动确认则报警) - */ - @ApiModelProperty(value = "首次报警时间(连续3次手动确认则报警)") - private Date firstWarnDatetime; - - /** - * 是否投过药(1是 | 2 否) - */ - @ApiModelProperty(value = "是否投过药(1是 | 2 否)") - private String druging; - - /** - *同步状态(成功 success | 失败 fail) - */ - @ApiModelProperty(value = "同步状态(成功 success | 失败 fail)") - private String syncState; - - /** - * - */ - @ApiModelProperty(value = "软件版本") - private String software; - - /** - * - */ - @ApiModelProperty(value = "硬件版本") - private String hardware; - - /** - * - */ - @ApiModelProperty(value = "电压") - private String voltage; - - /** - * - */ - @ApiModelProperty(value = "温度") - private String temperature; - - /** - * - */ - @ApiModelProperty(value = "信号质量") - private String rssi; - - /** - * - */ - @ApiModelProperty(value = "中继名称") - private String ap; - - /** - * - */ - @ApiModelProperty(value = "摄像头") - private String camera; - - /** - * - */ - @ApiModelProperty(value = "模块厂商") - private String lteManufactor; - - /** - * - */ - @ApiModelProperty(value = "模块型号") - private String lteModel; - - /** - * - */ - @ApiModelProperty(value = "固件版本") - private String lteFirmware; - - /** - * - */ - @ApiModelProperty(value = "IMEI") - private String lteImei; - - /** - * - */ - @ApiModelProperty(value = "ICCID") - private String lteIccid; - - /** - * - */ - @ApiModelProperty(value = "服务商") - private String lteCpos; - - // DB Property - - /** - * 上传地址 - */ - @TableField(exist = false) - @ApiModelProperty(value = "上传地址") - private String uploadApi; - - /** - * 项目名称 - */ - @TableField(exist = false) - @ApiModelProperty(value = "项目名称") - private String projectName; - - - - @ApiModelProperty(value = "是否在线") - private String isOnline; - - - @ApiModelProperty(value = "有无白蚁") - private String yesnoant; - - @ApiModelProperty(value = "告警时间") - private String snDate; -} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/mapper/DeviceInfoMapper.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/mapper/DeviceInfoMapper.java index 2b6dbeb..333c460 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/mapper/DeviceInfoMapper.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/mapper/DeviceInfoMapper.java @@ -2,7 +2,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.newfiber.termite.domain.DeviceInfo; -import com.newfiber.termite.domain.SnDeviceInfo; import com.newfiber.termite.domain.request.deviceInfo.DeviceInfoQueryRequest; import com.newfiber.termite.domain.response.statistic.ProjectStatisticDetail; import java.util.List; @@ -34,13 +33,6 @@ */ DeviceInfo selectOneById(@Param("id") Long id); - List selectSnByCondition(@Param("request") DeviceInfoQueryRequest request); - - - //List snQuerMonitoryList(@Param("request") DeviceInfoQueryRequest request); - - - /** * */ diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/IDeviceInfoService.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/IDeviceInfoService.java index 7f8016e..3f27d94 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/IDeviceInfoService.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/IDeviceInfoService.java @@ -1,14 +1,12 @@ package com.newfiber.termite.service; import com.newfiber.termite.domain.DeviceInfo; -import com.newfiber.termite.domain.SnDeviceInfo; import com.newfiber.termite.domain.dto.TermiteDataUpRequest; import com.newfiber.termite.domain.request.deviceInfo.DeviceInfoBatchSaveRequest; import com.newfiber.termite.domain.request.deviceInfo.DeviceInfoQueryRequest; import com.newfiber.termite.domain.request.deviceInfo.DeviceInfoSaveRequest; import com.newfiber.termite.domain.request.deviceInfo.DeviceInfoStateSyncRequest; import com.newfiber.termite.domain.request.deviceInfo.DeviceInfoUpdateRequest; -import com.newfiber.termite.domain.request.deviceInfo.DeviceSnInfoQueryRequest; import com.newfiber.termite.domain.response.statistic.ProjectStatisticDetail; import com.newfiber.termite.enums.EDeviceSyncState; import java.util.List; @@ -122,18 +120,4 @@ List selectList(String projectCode); - List selectSnList(DeviceSnInfoQueryRequest request); - - - /** - * 分页查询设备信息 - * - * @param request 分页参数 - * @return 设备信息集合 -// */ -// List selectSnPage(DeviceInfoQueryRequest request); -// -// -// List snQuerMonitoryList(DeviceInfoQueryRequest request); - } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/DeviceInfoController.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/DeviceInfoController.java index 9981990..9b652dd 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/DeviceInfoController.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/DeviceInfoController.java @@ -8,7 +8,6 @@ import com.newfiber.common.log.annotation.Log; import com.newfiber.common.log.enums.BusinessType; import com.newfiber.termite.domain.DeviceInfo; -import com.newfiber.termite.domain.SnDeviceInfo; import com.newfiber.termite.domain.request.deviceInfo.*; import com.newfiber.termite.service.IDeviceInfoService; import io.swagger.annotations.Api; @@ -129,39 +128,4 @@ return success(list); } - -// /** -// * 列表查询当前用户设备sn信息 -// */ -// @GetMapping("/snList") -// @ApiOperation(value = "列表查询当前用户设备信息", position = 60) -// public Result> snlist(DeviceSnInfoQueryRequest request) { -// List list = deviceInfoService.selectSnList(request); -// return success(list); -// } -// -// -// /** -// * 分页查询当前用户设备sn信息 -// */ -// @GetMapping("/snPage") -// @ApiOperation(value = "列表查询当前用户设备信息", position = 60) -// public Result> snPage(DeviceInfoQueryRequest request) { -// startPage(); -// List list = deviceInfoService.selectSnPage(request); -// return pageResult(list); -// } -// -// /** -// * SN编号查询监测记录 -// */ -// @GetMapping("/snQuerMonitoryList") -// @ApiOperation(value = "SN编号查询用户设备监测信息", position = 60) -// public Result> snQuerMonitoryList(DeviceInfoQueryRequest request) { -// List list = deviceInfoService.snQuerMonitoryList(request); -// return success(list); -// -// } - - } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/SnDeviceInfo.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/SnDeviceInfo.java deleted file mode 100644 index 0cb05d0..0000000 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/SnDeviceInfo.java +++ /dev/null @@ -1,216 +0,0 @@ -package com.newfiber.termite.domain; - - -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableName; -import com.newfiber.common.core.web.domain.BaseEntity; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; - -import java.util.Date; - -@Data -@TableName("ter_device_info") -@EqualsAndHashCode(callSuper = true) -@ApiModel(value = "设备信息", description = "设备信息") -public class SnDeviceInfo extends BaseEntity { - private static final long serialVersionUID = 1L; - - /** - * 分类(生产 production | 项目 project) - */ - @ApiModelProperty(value = "分类(生产 production | 项目 project)") - private String category; - - /** - * 项目编号 - */ - @ApiModelProperty(value = "项目编号") - private String projectCode; - - /** - * 设备编号 - */ - @ApiModelProperty(value = "设备编号") - private String sn; - - /** - * 设备类型(4G/WiFi) - */ - @ApiModelProperty(value = "设备类型(4G/WiFi)") - private String deviceType; - - /** - * 位置类型(内圈 inner | 外圈 outer) - */ - @ApiModelProperty(value = "位置类型(内圈 inner | 外圈 outer)") - private String locationType; - - /** - * 设备地址 - */ - @ApiModelProperty(value = "设备地址") - private String location; - - /** - * 初始照片 - */ - @ApiModelProperty(value = "初始照片") - private String initialpictu; - - /** - * 经纬度 - */ - @ApiModelProperty(value = "经纬度") - private String lonandlat; - - /** - * 扩展配置(JSON) - */ - @ApiModelProperty(value = "扩展配置(JSON)") - private String extendConfig; - - /** - * - */ - @ApiModelProperty(value = "") - private Date lastPicTime; - - /** - * 上次加热时间 - */ - @ApiModelProperty(value = "上次加热时间") - private Date lastHeatTime; - - /** - * 上次投药时间 - */ - @ApiModelProperty(value = "上次投药时间") - private Date lastMedicateTime; - - /** - * 首次报警时间(连续3次手动确认则报警) - */ - @ApiModelProperty(value = "首次报警时间(连续3次手动确认则报警)") - private Date firstWarnDatetime; - - /** - * 是否投过药(1是 | 2 否) - */ - @ApiModelProperty(value = "是否投过药(1是 | 2 否)") - private String druging; - - /** - *同步状态(成功 success | 失败 fail) - */ - @ApiModelProperty(value = "同步状态(成功 success | 失败 fail)") - private String syncState; - - /** - * - */ - @ApiModelProperty(value = "软件版本") - private String software; - - /** - * - */ - @ApiModelProperty(value = "硬件版本") - private String hardware; - - /** - * - */ - @ApiModelProperty(value = "电压") - private String voltage; - - /** - * - */ - @ApiModelProperty(value = "温度") - private String temperature; - - /** - * - */ - @ApiModelProperty(value = "信号质量") - private String rssi; - - /** - * - */ - @ApiModelProperty(value = "中继名称") - private String ap; - - /** - * - */ - @ApiModelProperty(value = "摄像头") - private String camera; - - /** - * - */ - @ApiModelProperty(value = "模块厂商") - private String lteManufactor; - - /** - * - */ - @ApiModelProperty(value = "模块型号") - private String lteModel; - - /** - * - */ - @ApiModelProperty(value = "固件版本") - private String lteFirmware; - - /** - * - */ - @ApiModelProperty(value = "IMEI") - private String lteImei; - - /** - * - */ - @ApiModelProperty(value = "ICCID") - private String lteIccid; - - /** - * - */ - @ApiModelProperty(value = "服务商") - private String lteCpos; - - // DB Property - - /** - * 上传地址 - */ - @TableField(exist = false) - @ApiModelProperty(value = "上传地址") - private String uploadApi; - - /** - * 项目名称 - */ - @TableField(exist = false) - @ApiModelProperty(value = "项目名称") - private String projectName; - - - - @ApiModelProperty(value = "是否在线") - private String isOnline; - - - @ApiModelProperty(value = "有无白蚁") - private String yesnoant; - - @ApiModelProperty(value = "告警时间") - private String snDate; -} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/mapper/DeviceInfoMapper.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/mapper/DeviceInfoMapper.java index 2b6dbeb..333c460 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/mapper/DeviceInfoMapper.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/mapper/DeviceInfoMapper.java @@ -2,7 +2,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.newfiber.termite.domain.DeviceInfo; -import com.newfiber.termite.domain.SnDeviceInfo; import com.newfiber.termite.domain.request.deviceInfo.DeviceInfoQueryRequest; import com.newfiber.termite.domain.response.statistic.ProjectStatisticDetail; import java.util.List; @@ -34,13 +33,6 @@ */ DeviceInfo selectOneById(@Param("id") Long id); - List selectSnByCondition(@Param("request") DeviceInfoQueryRequest request); - - - //List snQuerMonitoryList(@Param("request") DeviceInfoQueryRequest request); - - - /** * */ diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/IDeviceInfoService.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/IDeviceInfoService.java index 7f8016e..3f27d94 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/IDeviceInfoService.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/IDeviceInfoService.java @@ -1,14 +1,12 @@ package com.newfiber.termite.service; import com.newfiber.termite.domain.DeviceInfo; -import com.newfiber.termite.domain.SnDeviceInfo; import com.newfiber.termite.domain.dto.TermiteDataUpRequest; import com.newfiber.termite.domain.request.deviceInfo.DeviceInfoBatchSaveRequest; import com.newfiber.termite.domain.request.deviceInfo.DeviceInfoQueryRequest; import com.newfiber.termite.domain.request.deviceInfo.DeviceInfoSaveRequest; import com.newfiber.termite.domain.request.deviceInfo.DeviceInfoStateSyncRequest; import com.newfiber.termite.domain.request.deviceInfo.DeviceInfoUpdateRequest; -import com.newfiber.termite.domain.request.deviceInfo.DeviceSnInfoQueryRequest; import com.newfiber.termite.domain.response.statistic.ProjectStatisticDetail; import com.newfiber.termite.enums.EDeviceSyncState; import java.util.List; @@ -122,18 +120,4 @@ List selectList(String projectCode); - List selectSnList(DeviceSnInfoQueryRequest request); - - - /** - * 分页查询设备信息 - * - * @param request 分页参数 - * @return 设备信息集合 -// */ -// List selectSnPage(DeviceInfoQueryRequest request); -// -// -// List snQuerMonitoryList(DeviceInfoQueryRequest request); - } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/impl/DeviceInfoServiceImpl.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/impl/DeviceInfoServiceImpl.java index 5e49d60..0f8318c 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/impl/DeviceInfoServiceImpl.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/impl/DeviceInfoServiceImpl.java @@ -6,7 +6,6 @@ import com.newfiber.common.core.web.service.BaseServiceImpl; import com.newfiber.termite.domain.DeviceInfo; import com.newfiber.termite.domain.ProjectInfo; -import com.newfiber.termite.domain.SnDeviceInfo; import com.newfiber.termite.domain.dto.TermiteDataUpRequest; import com.newfiber.termite.domain.request.deviceInfo.DeviceInfoBatchSaveRequest; import com.newfiber.termite.domain.request.deviceInfo.DeviceInfoImportRequest; @@ -211,46 +210,4 @@ request.setProjectCode(projectCode); return deviceInfoMapper.selectByCondition(request); } - - @Override - public List selectSnList(DeviceSnInfoQueryRequest request) { - // 项目信息 - Set projectInfoSet = projectInfoService.getUserProjectList(request.getUserId()); - List projectCodeList = projectInfoSet.stream().map(ProjectInfo::getProjectCode).collect(Collectors.toList()); - //设备列表 - DeviceInfoQueryRequest deviceInfoQueryRequest = new DeviceInfoQueryRequest(); - deviceInfoQueryRequest.setProjectCodeList(projectCodeList); - List deviceInfoList = deviceInfoMapper.selectSnByCondition(deviceInfoQueryRequest); - //设备在线离线状态判断 - deviceInfoList.forEach(e->{ - Date date1 = new Date(); - if(e.getLastPicTime() != null){ - Date date2 =e.getLastPicTime(); - double diff = Math.abs(date1.getTime()-date2.getTime()); - double diffdays = diff/(1000l*60l*60l*24l); - if(diffdays>1){ - e.setIsOnline("2"); - }else{ - e.setIsOnline("1"); - } - }else { - e.setIsOnline("2"); - } - }); - return deviceInfoList; - } - - - -// @Override -// public List selectSnPage(DeviceInfoQueryRequest request) { -// List deviceInfoList = new ArrayList<>(); -// return deviceInfoList; -// } -// -// @Override -// public List snQuerMonitoryList(DeviceInfoQueryRequest request) { -// return deviceInfoMapper.snQuerMonitoryList(request); -// } - } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/DeviceInfoController.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/DeviceInfoController.java index 9981990..9b652dd 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/DeviceInfoController.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/DeviceInfoController.java @@ -8,7 +8,6 @@ import com.newfiber.common.log.annotation.Log; import com.newfiber.common.log.enums.BusinessType; import com.newfiber.termite.domain.DeviceInfo; -import com.newfiber.termite.domain.SnDeviceInfo; import com.newfiber.termite.domain.request.deviceInfo.*; import com.newfiber.termite.service.IDeviceInfoService; import io.swagger.annotations.Api; @@ -129,39 +128,4 @@ return success(list); } - -// /** -// * 列表查询当前用户设备sn信息 -// */ -// @GetMapping("/snList") -// @ApiOperation(value = "列表查询当前用户设备信息", position = 60) -// public Result> snlist(DeviceSnInfoQueryRequest request) { -// List list = deviceInfoService.selectSnList(request); -// return success(list); -// } -// -// -// /** -// * 分页查询当前用户设备sn信息 -// */ -// @GetMapping("/snPage") -// @ApiOperation(value = "列表查询当前用户设备信息", position = 60) -// public Result> snPage(DeviceInfoQueryRequest request) { -// startPage(); -// List list = deviceInfoService.selectSnPage(request); -// return pageResult(list); -// } -// -// /** -// * SN编号查询监测记录 -// */ -// @GetMapping("/snQuerMonitoryList") -// @ApiOperation(value = "SN编号查询用户设备监测信息", position = 60) -// public Result> snQuerMonitoryList(DeviceInfoQueryRequest request) { -// List list = deviceInfoService.snQuerMonitoryList(request); -// return success(list); -// -// } - - } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/SnDeviceInfo.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/SnDeviceInfo.java deleted file mode 100644 index 0cb05d0..0000000 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/SnDeviceInfo.java +++ /dev/null @@ -1,216 +0,0 @@ -package com.newfiber.termite.domain; - - -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableName; -import com.newfiber.common.core.web.domain.BaseEntity; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; - -import java.util.Date; - -@Data -@TableName("ter_device_info") -@EqualsAndHashCode(callSuper = true) -@ApiModel(value = "设备信息", description = "设备信息") -public class SnDeviceInfo extends BaseEntity { - private static final long serialVersionUID = 1L; - - /** - * 分类(生产 production | 项目 project) - */ - @ApiModelProperty(value = "分类(生产 production | 项目 project)") - private String category; - - /** - * 项目编号 - */ - @ApiModelProperty(value = "项目编号") - private String projectCode; - - /** - * 设备编号 - */ - @ApiModelProperty(value = "设备编号") - private String sn; - - /** - * 设备类型(4G/WiFi) - */ - @ApiModelProperty(value = "设备类型(4G/WiFi)") - private String deviceType; - - /** - * 位置类型(内圈 inner | 外圈 outer) - */ - @ApiModelProperty(value = "位置类型(内圈 inner | 外圈 outer)") - private String locationType; - - /** - * 设备地址 - */ - @ApiModelProperty(value = "设备地址") - private String location; - - /** - * 初始照片 - */ - @ApiModelProperty(value = "初始照片") - private String initialpictu; - - /** - * 经纬度 - */ - @ApiModelProperty(value = "经纬度") - private String lonandlat; - - /** - * 扩展配置(JSON) - */ - @ApiModelProperty(value = "扩展配置(JSON)") - private String extendConfig; - - /** - * - */ - @ApiModelProperty(value = "") - private Date lastPicTime; - - /** - * 上次加热时间 - */ - @ApiModelProperty(value = "上次加热时间") - private Date lastHeatTime; - - /** - * 上次投药时间 - */ - @ApiModelProperty(value = "上次投药时间") - private Date lastMedicateTime; - - /** - * 首次报警时间(连续3次手动确认则报警) - */ - @ApiModelProperty(value = "首次报警时间(连续3次手动确认则报警)") - private Date firstWarnDatetime; - - /** - * 是否投过药(1是 | 2 否) - */ - @ApiModelProperty(value = "是否投过药(1是 | 2 否)") - private String druging; - - /** - *同步状态(成功 success | 失败 fail) - */ - @ApiModelProperty(value = "同步状态(成功 success | 失败 fail)") - private String syncState; - - /** - * - */ - @ApiModelProperty(value = "软件版本") - private String software; - - /** - * - */ - @ApiModelProperty(value = "硬件版本") - private String hardware; - - /** - * - */ - @ApiModelProperty(value = "电压") - private String voltage; - - /** - * - */ - @ApiModelProperty(value = "温度") - private String temperature; - - /** - * - */ - @ApiModelProperty(value = "信号质量") - private String rssi; - - /** - * - */ - @ApiModelProperty(value = "中继名称") - private String ap; - - /** - * - */ - @ApiModelProperty(value = "摄像头") - private String camera; - - /** - * - */ - @ApiModelProperty(value = "模块厂商") - private String lteManufactor; - - /** - * - */ - @ApiModelProperty(value = "模块型号") - private String lteModel; - - /** - * - */ - @ApiModelProperty(value = "固件版本") - private String lteFirmware; - - /** - * - */ - @ApiModelProperty(value = "IMEI") - private String lteImei; - - /** - * - */ - @ApiModelProperty(value = "ICCID") - private String lteIccid; - - /** - * - */ - @ApiModelProperty(value = "服务商") - private String lteCpos; - - // DB Property - - /** - * 上传地址 - */ - @TableField(exist = false) - @ApiModelProperty(value = "上传地址") - private String uploadApi; - - /** - * 项目名称 - */ - @TableField(exist = false) - @ApiModelProperty(value = "项目名称") - private String projectName; - - - - @ApiModelProperty(value = "是否在线") - private String isOnline; - - - @ApiModelProperty(value = "有无白蚁") - private String yesnoant; - - @ApiModelProperty(value = "告警时间") - private String snDate; -} diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/mapper/DeviceInfoMapper.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/mapper/DeviceInfoMapper.java index 2b6dbeb..333c460 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/mapper/DeviceInfoMapper.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/mapper/DeviceInfoMapper.java @@ -2,7 +2,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.newfiber.termite.domain.DeviceInfo; -import com.newfiber.termite.domain.SnDeviceInfo; import com.newfiber.termite.domain.request.deviceInfo.DeviceInfoQueryRequest; import com.newfiber.termite.domain.response.statistic.ProjectStatisticDetail; import java.util.List; @@ -34,13 +33,6 @@ */ DeviceInfo selectOneById(@Param("id") Long id); - List selectSnByCondition(@Param("request") DeviceInfoQueryRequest request); - - - //List snQuerMonitoryList(@Param("request") DeviceInfoQueryRequest request); - - - /** * */ diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/IDeviceInfoService.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/IDeviceInfoService.java index 7f8016e..3f27d94 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/IDeviceInfoService.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/IDeviceInfoService.java @@ -1,14 +1,12 @@ package com.newfiber.termite.service; import com.newfiber.termite.domain.DeviceInfo; -import com.newfiber.termite.domain.SnDeviceInfo; import com.newfiber.termite.domain.dto.TermiteDataUpRequest; import com.newfiber.termite.domain.request.deviceInfo.DeviceInfoBatchSaveRequest; import com.newfiber.termite.domain.request.deviceInfo.DeviceInfoQueryRequest; import com.newfiber.termite.domain.request.deviceInfo.DeviceInfoSaveRequest; import com.newfiber.termite.domain.request.deviceInfo.DeviceInfoStateSyncRequest; import com.newfiber.termite.domain.request.deviceInfo.DeviceInfoUpdateRequest; -import com.newfiber.termite.domain.request.deviceInfo.DeviceSnInfoQueryRequest; import com.newfiber.termite.domain.response.statistic.ProjectStatisticDetail; import com.newfiber.termite.enums.EDeviceSyncState; import java.util.List; @@ -122,18 +120,4 @@ List selectList(String projectCode); - List selectSnList(DeviceSnInfoQueryRequest request); - - - /** - * 分页查询设备信息 - * - * @param request 分页参数 - * @return 设备信息集合 -// */ -// List selectSnPage(DeviceInfoQueryRequest request); -// -// -// List snQuerMonitoryList(DeviceInfoQueryRequest request); - } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/impl/DeviceInfoServiceImpl.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/impl/DeviceInfoServiceImpl.java index 5e49d60..0f8318c 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/impl/DeviceInfoServiceImpl.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/service/impl/DeviceInfoServiceImpl.java @@ -6,7 +6,6 @@ import com.newfiber.common.core.web.service.BaseServiceImpl; import com.newfiber.termite.domain.DeviceInfo; import com.newfiber.termite.domain.ProjectInfo; -import com.newfiber.termite.domain.SnDeviceInfo; import com.newfiber.termite.domain.dto.TermiteDataUpRequest; import com.newfiber.termite.domain.request.deviceInfo.DeviceInfoBatchSaveRequest; import com.newfiber.termite.domain.request.deviceInfo.DeviceInfoImportRequest; @@ -211,46 +210,4 @@ request.setProjectCode(projectCode); return deviceInfoMapper.selectByCondition(request); } - - @Override - public List selectSnList(DeviceSnInfoQueryRequest request) { - // 项目信息 - Set projectInfoSet = projectInfoService.getUserProjectList(request.getUserId()); - List projectCodeList = projectInfoSet.stream().map(ProjectInfo::getProjectCode).collect(Collectors.toList()); - //设备列表 - DeviceInfoQueryRequest deviceInfoQueryRequest = new DeviceInfoQueryRequest(); - deviceInfoQueryRequest.setProjectCodeList(projectCodeList); - List deviceInfoList = deviceInfoMapper.selectSnByCondition(deviceInfoQueryRequest); - //设备在线离线状态判断 - deviceInfoList.forEach(e->{ - Date date1 = new Date(); - if(e.getLastPicTime() != null){ - Date date2 =e.getLastPicTime(); - double diff = Math.abs(date1.getTime()-date2.getTime()); - double diffdays = diff/(1000l*60l*60l*24l); - if(diffdays>1){ - e.setIsOnline("2"); - }else{ - e.setIsOnline("1"); - } - }else { - e.setIsOnline("2"); - } - }); - return deviceInfoList; - } - - - -// @Override -// public List selectSnPage(DeviceInfoQueryRequest request) { -// List deviceInfoList = new ArrayList<>(); -// return deviceInfoList; -// } -// -// @Override -// public List snQuerMonitoryList(DeviceInfoQueryRequest request) { -// return deviceInfoMapper.snQuerMonitoryList(request); -// } - } diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/resources/mapper/termite/DeviceInfoMapper.xml b/newfiber-termites/newfiber-termites-dataup/src/main/resources/mapper/termite/DeviceInfoMapper.xml index f50e6ec..b4c5d80 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/resources/mapper/termite/DeviceInfoMapper.xml +++ b/newfiber-termites/newfiber-termites-dataup/src/main/resources/mapper/termite/DeviceInfoMapper.xml @@ -98,34 +98,6 @@ - - - - - - - - - - - - - - - - -