
14 changed files with 309 additions and 0 deletions
@ -0,0 +1,45 @@ |
|||||
|
package com.yxt.supervise.monitor.api.entity; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import com.yxt.common.core.domain.EntityWithId; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
@Data |
||||
|
@ApiModel(value = "有ID的实体", description = "有ID的实体") |
||||
|
@TableName("y_call_police") |
||||
|
public class CallPolice extends EntityWithId { |
||||
|
// `id`使用继承的
|
||||
|
|
||||
|
@ApiModelProperty("记录创建时间") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
||||
|
private Date createTime = new Date(); // 记录创建时间
|
||||
|
|
||||
|
@ApiModelProperty("备注说明") |
||||
|
private String remarks; // 备注说明
|
||||
|
|
||||
|
@ApiModelProperty("信息状态") |
||||
|
private String state; |
||||
|
|
||||
|
@ApiModelProperty("是否删除") |
||||
|
private String isDelte; |
||||
|
|
||||
|
@ApiModelProperty("修改时间") |
||||
|
private String modifyTime; |
||||
|
|
||||
|
@ApiModelProperty("是否可用") |
||||
|
private String isEnable; |
||||
|
|
||||
|
@ApiModelProperty("创建人") |
||||
|
private String createBySid; |
||||
|
|
||||
|
@ApiModelProperty("更新人") |
||||
|
private String updateBySid; |
||||
|
|
||||
|
@ApiModelProperty("设备ID") |
||||
|
private String deviceId; |
||||
|
} |
@ -0,0 +1,51 @@ |
|||||
|
package com.yxt.supervise.monitor.api.entity; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import com.yxt.common.core.domain.EntityWithId; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
@Data |
||||
|
@ApiModel(value = "有ID的实体", description = "有ID的实体") |
||||
|
@TableName("y_device_log") |
||||
|
public class DeviceLog extends EntityWithId { |
||||
|
// `id`使用继承的
|
||||
|
|
||||
|
@ApiModelProperty("记录创建时间") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
||||
|
private Date createTime = new Date(); // 记录创建时间
|
||||
|
|
||||
|
@ApiModelProperty("备注说明") |
||||
|
private String remarks; // 备注说明
|
||||
|
|
||||
|
@ApiModelProperty("状态") |
||||
|
private String status; |
||||
|
|
||||
|
@ApiModelProperty("信息状态") |
||||
|
private String state; |
||||
|
|
||||
|
@ApiModelProperty("是否删除") |
||||
|
private String isDelte; |
||||
|
|
||||
|
@ApiModelProperty("修改时间") |
||||
|
private String modifyTime; |
||||
|
|
||||
|
@ApiModelProperty("是否可用") |
||||
|
private String isEnable; |
||||
|
|
||||
|
@ApiModelProperty("创建人") |
||||
|
private String createBySid; |
||||
|
|
||||
|
@ApiModelProperty("更新人") |
||||
|
private String updateBySid; |
||||
|
|
||||
|
@ApiModelProperty("设备ID") |
||||
|
private String deviceId; |
||||
|
|
||||
|
@ApiModelProperty("日志内容") |
||||
|
private String content; |
||||
|
} |
@ -0,0 +1,32 @@ |
|||||
|
package com.yxt.supervise.monitor.biz.controller; |
||||
|
|
||||
|
import com.yxt.supervise.monitor.api.entity.Device; |
||||
|
import com.yxt.supervise.monitor.biz.service.YCallPoliceService; |
||||
|
import com.yxt.supervise.monitor.biz.service.YDeviceService; |
||||
|
import io.swagger.annotations.Api; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.GetMapping; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RequestParam; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
|
||||
|
import java.util.Map; |
||||
|
|
||||
|
@Api(tags = "报警控制器") |
||||
|
@RestController("com.yxt.supervise.monitor.biz.controller.YCallPoliceRest") |
||||
|
@RequestMapping("/callPolice") |
||||
|
public class YCallPoliceRest { |
||||
|
|
||||
|
@Autowired |
||||
|
private YCallPoliceService yCallPoliceService; |
||||
|
|
||||
|
|
||||
|
@ApiOperation("分页获取报警列表") |
||||
|
@GetMapping("/getDevicePage") |
||||
|
public String getDevicePage(@RequestParam Map<String,String> searchVo) { |
||||
|
yCallPoliceService.getDevicePage(searchVo); |
||||
|
return null; |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,33 @@ |
|||||
|
package com.yxt.supervise.monitor.biz.controller; |
||||
|
|
||||
|
import com.yxt.supervise.monitor.api.entity.Device; |
||||
|
import com.yxt.supervise.monitor.biz.service.YDeviceLogService; |
||||
|
import com.yxt.supervise.monitor.biz.service.YDeviceService; |
||||
|
import io.swagger.annotations.Api; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.GetMapping; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RequestParam; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
|
||||
|
import java.util.Map; |
||||
|
|
||||
|
@Api(tags = "设备日志控制器") |
||||
|
@RestController("com.yxt.supervise.monitor.biz.controller.YDeviceRest") |
||||
|
@RequestMapping("/device") |
||||
|
public class YDeviceLogRest { |
||||
|
|
||||
|
@Autowired |
||||
|
private YDeviceLogService yDeviceLogService; |
||||
|
|
||||
|
|
||||
|
@ApiOperation("分页获取设备日志列表") |
||||
|
@GetMapping("/getDevicePage") |
||||
|
public String getDevicePage(@RequestParam Map<String,String> searchVo) { |
||||
|
yDeviceLogService.getDevicePage(searchVo); |
||||
|
return null; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,14 @@ |
|||||
|
package com.yxt.supervise.monitor.biz.mapper; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.yxt.supervise.monitor.api.entity.CallPolice; |
||||
|
import com.yxt.supervise.monitor.api.entity.Device; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
@Mapper |
||||
|
public interface YCallPoliceMapper extends BaseMapper<CallPolice> { |
||||
|
|
||||
|
|
||||
|
IPage<Device> getDevicePage(); |
||||
|
} |
@ -0,0 +1,14 @@ |
|||||
|
package com.yxt.supervise.monitor.biz.mapper; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.yxt.supervise.monitor.api.entity.Device; |
||||
|
import com.yxt.supervise.monitor.api.entity.DeviceLog; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
@Mapper |
||||
|
public interface YDeviceLogMapper extends BaseMapper<DeviceLog> { |
||||
|
|
||||
|
|
||||
|
IPage<Device> getDevicePage(); |
||||
|
} |
@ -0,0 +1,18 @@ |
|||||
|
package com.yxt.supervise.monitor.biz.service; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
import com.yxt.supervise.monitor.api.entity.CallPolice; |
||||
|
import com.yxt.supervise.monitor.api.entity.Device; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.util.Map; |
||||
|
|
||||
|
@Service |
||||
|
public interface YCallPoliceService extends IService<CallPolice> { |
||||
|
|
||||
|
IPage<Device> getDevicePage(Map<String,String> searchVo); |
||||
|
|
||||
|
|
||||
|
String createDevice(Device device); |
||||
|
} |
@ -0,0 +1,18 @@ |
|||||
|
package com.yxt.supervise.monitor.biz.service; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
import com.yxt.supervise.monitor.api.entity.Device; |
||||
|
import com.yxt.supervise.monitor.api.entity.DeviceLog; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.util.Map; |
||||
|
|
||||
|
@Service |
||||
|
public interface YDeviceLogService extends IService<DeviceLog> { |
||||
|
|
||||
|
IPage<Device> getDevicePage(Map<String,String> searchVo); |
||||
|
|
||||
|
|
||||
|
String createDevice(Device device); |
||||
|
} |
@ -0,0 +1,31 @@ |
|||||
|
package com.yxt.supervise.monitor.biz.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
|
import com.yxt.supervise.monitor.api.entity.CallPolice; |
||||
|
import com.yxt.supervise.monitor.api.entity.Device; |
||||
|
import com.yxt.supervise.monitor.biz.mapper.YCallPoliceMapper; |
||||
|
import com.yxt.supervise.monitor.biz.mapper.YDeviceMapper; |
||||
|
import com.yxt.supervise.monitor.biz.service.YCallPoliceService; |
||||
|
import com.yxt.supervise.monitor.biz.service.YDeviceService; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import javax.annotation.Resource; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
@Service |
||||
|
public class IYCallPoliceServiceImpl extends ServiceImpl<YCallPoliceMapper, CallPolice> implements YCallPoliceService { |
||||
|
|
||||
|
@Resource YDeviceMapper yDeviceMapper; |
||||
|
|
||||
|
|
||||
|
@Override |
||||
|
public IPage<Device> getDevicePage(Map<String,String> searchVo){ |
||||
|
return yDeviceMapper.getDevicePage(); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public String createDevice(Device device){ |
||||
|
return null; |
||||
|
} |
||||
|
} |
@ -0,0 +1,31 @@ |
|||||
|
package com.yxt.supervise.monitor.biz.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
|
import com.yxt.supervise.monitor.api.entity.Device; |
||||
|
import com.yxt.supervise.monitor.api.entity.DeviceLog; |
||||
|
import com.yxt.supervise.monitor.biz.mapper.YDeviceLogMapper; |
||||
|
import com.yxt.supervise.monitor.biz.mapper.YDeviceMapper; |
||||
|
import com.yxt.supervise.monitor.biz.service.YDeviceLogService; |
||||
|
import com.yxt.supervise.monitor.biz.service.YDeviceService; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import javax.annotation.Resource; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
@Service |
||||
|
public class IYDeviceLogServiceImpl extends ServiceImpl<YDeviceLogMapper, DeviceLog> implements YDeviceLogService { |
||||
|
|
||||
|
@Resource YDeviceMapper yDeviceMapper; |
||||
|
|
||||
|
|
||||
|
@Override |
||||
|
public IPage<Device> getDevicePage(Map<String,String> searchVo){ |
||||
|
return yDeviceMapper.getDevicePage(); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public String createDevice(Device device){ |
||||
|
return null; |
||||
|
} |
||||
|
} |
Loading…
Reference in new issue