大体积混凝土,深基坑监测
This commit is contained in:
parent
ac9a6a7139
commit
6fcb1af0be
|
|
@ -70,5 +70,8 @@ public class CollectDevAttrVo {
|
|||
*/
|
||||
private String changeVal;
|
||||
|
||||
|
||||
/**
|
||||
* 数据限制
|
||||
*/
|
||||
private int limit;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,6 +61,11 @@ public class ConstInfoVo {
|
|||
* 配置信息
|
||||
*/
|
||||
private String configData;
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
|
||||
private int num;
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -17,4 +17,6 @@ public interface TtSysUserMapper {
|
|||
void addTtSysUser(TtSysUserVo ttSysUserVo);
|
||||
|
||||
void updateTtSysUser(TtSysUserVo ttSysUserVo);
|
||||
|
||||
void deleteTtSysUser(TtSysUserVo ttSysUserVo);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -155,6 +155,6 @@ public class TtSysUserServiceImpl implements TtSysUserService {
|
|||
@Override
|
||||
public void deleteTtSysUser(TtSysUserVo ttSysUserVo) {
|
||||
//修改用户信息
|
||||
ttSysUserMapper.updateTtSysUser(ttSysUserVo);
|
||||
ttSysUserMapper.deleteTtSysUser(ttSysUserVo);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,5 +11,10 @@ public class TypeCodeUtils {
|
|||
*/
|
||||
public final static String GZM_CODE="9000100";
|
||||
|
||||
/**
|
||||
* 大体积混凝土
|
||||
*/
|
||||
public final static String HNT_CODE="9000200";
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,71 @@
|
|||
package com.bonus.base.screen.controller;
|
||||
|
||||
import com.bonus.base.basic.domain.CollectDevVo;
|
||||
import com.bonus.base.basic.domain.ConstInfoVo;
|
||||
import com.bonus.base.screen.domain.CollectDeviceHisVo;
|
||||
import com.bonus.base.screen.domain.DeviceAlarmVo;
|
||||
import com.bonus.base.screen.domain.ProjectOverviewVo;
|
||||
import com.bonus.base.screen.service.ExcavationDetectionService;
|
||||
import com.bonus.common.core.web.controller.BaseController;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 深基坑监测
|
||||
* @author 马三炮
|
||||
* @date 2025/4/17
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/excavationDetection")
|
||||
public class ExcavationDetectionController extends BaseController {
|
||||
|
||||
|
||||
@Resource
|
||||
private ExcavationDetectionService excavationDetectionService;
|
||||
|
||||
@ApiOperation(value = "查询设备列表")
|
||||
@PostMapping("/getMassConcreteList")
|
||||
public AjaxResult getTtSysUserCheckList(@RequestBody ConstInfoVo constInfoVo) {
|
||||
try {
|
||||
List<CollectDevVo> collectDevVoList = excavationDetectionService.getCollectDeviceList(constInfoVo);
|
||||
return success(collectDevVoList);
|
||||
}catch (Exception e){
|
||||
log.error("查询区域列表失败",e.getMessage());
|
||||
return error("查询区域列表失败");
|
||||
}
|
||||
}
|
||||
@ApiOperation(value = "设备统计")
|
||||
@PostMapping("/getDevStatistics")
|
||||
public AjaxResult getDevStatistics(@RequestBody ConstInfoVo constInfoVo) {
|
||||
try {
|
||||
ProjectOverviewVo projectOverviewVo = excavationDetectionService.getDevStatistics(constInfoVo);
|
||||
return success(projectOverviewVo);
|
||||
}catch (Exception e){
|
||||
log.error("查询区域列表失败",e.getMessage());
|
||||
return error("查询区域列表失败");
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "报警信息")
|
||||
@PostMapping("/concreteAlarmList")
|
||||
public AjaxResult concreteAlarmList(@RequestBody ConstInfoVo constInfoVo) {
|
||||
try {
|
||||
|
||||
List<DeviceAlarmVo> deviceAlarmVoList = excavationDetectionService.concreteAlarmList(constInfoVo);
|
||||
return success(deviceAlarmVoList);
|
||||
}catch (Exception e){
|
||||
log.error("区域设备统计失败",e.getMessage());
|
||||
return error("区域设备统计失败");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,106 @@
|
|||
package com.bonus.base.screen.controller;
|
||||
|
||||
import com.bonus.base.basic.domain.CollectDevVo;
|
||||
import com.bonus.base.basic.domain.ConstInfoVo;
|
||||
import com.bonus.base.screen.domain.CollectDeviceHisVo;
|
||||
import com.bonus.base.screen.domain.DeviceAlarmVo;
|
||||
import com.bonus.base.screen.domain.ProjectOverviewVo;
|
||||
import com.bonus.base.screen.service.MassConcreteService;
|
||||
import com.bonus.common.core.web.controller.BaseController;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 大体积混凝土
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/massConcrete")
|
||||
public class MassConcreteController extends BaseController {
|
||||
|
||||
|
||||
@Resource
|
||||
private MassConcreteService massConcreteService;
|
||||
|
||||
@ApiOperation(value = "查询区域列表")
|
||||
@PostMapping("/getMassConcreteList")
|
||||
public AjaxResult getTtSysUserCheckList(@RequestBody ConstInfoVo constInfoVo) {
|
||||
try {
|
||||
List<ConstInfoVo> constInfoVoList = massConcreteService.getTtSysUserCheckList(constInfoVo);
|
||||
return success(constInfoVoList);
|
||||
}catch (Exception e){
|
||||
log.error("查询区域列表失败",e.getMessage());
|
||||
return error("查询区域列表失败");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "查询区域下设备列表")
|
||||
@PostMapping("/getCollectDeviceList")
|
||||
public AjaxResult getCollectDeviceList(@RequestBody ConstInfoVo constInfoVo) {
|
||||
try {
|
||||
List<CollectDevVo> collectDevVoList = massConcreteService.getCollectDeviceList(constInfoVo);
|
||||
return success(collectDevVoList);
|
||||
}catch (Exception e){
|
||||
log.error("查询区域列表失败",e.getMessage());
|
||||
return error("查询区域列表失败");
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "设备统计")
|
||||
@PostMapping("/getDevStatistics")
|
||||
public AjaxResult getDevStatistics(@RequestBody ConstInfoVo constInfoVo) {
|
||||
try {
|
||||
ProjectOverviewVo projectOverviewVo = massConcreteService.getDevStatistics(constInfoVo);
|
||||
return success(projectOverviewVo);
|
||||
}catch (Exception e){
|
||||
log.error("查询区域列表失败",e.getMessage());
|
||||
return error("查询区域列表失败");
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "区域设备统计")
|
||||
@PostMapping("/getCollectDeviceAll")
|
||||
public AjaxResult getCollectDeviceAll(@RequestBody ConstInfoVo constInfoVo) {
|
||||
try {
|
||||
|
||||
List<ConstInfoVo> constInfoVoList = massConcreteService.getCollectDeviceAll(constInfoVo);
|
||||
return success(constInfoVoList);
|
||||
}catch (Exception e){
|
||||
log.error("区域设备统计失败",e.getMessage());
|
||||
return error("区域设备统计失败");
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "报警信息")
|
||||
@PostMapping("/concreteAlarmList")
|
||||
public AjaxResult concreteAlarmList(@RequestBody ConstInfoVo constInfoVo) {
|
||||
try {
|
||||
|
||||
List<DeviceAlarmVo> deviceAlarmVoList = massConcreteService.concreteAlarmList(constInfoVo);
|
||||
return success(deviceAlarmVoList);
|
||||
}catch (Exception e){
|
||||
log.error("区域设备统计失败",e.getMessage());
|
||||
return error("区域设备统计失败");
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "检测温度变化")
|
||||
@PostMapping("/temperatureList")
|
||||
public AjaxResult temperatureList(@RequestBody CollectDeviceHisVo collectDeviceHisVo) {
|
||||
try {
|
||||
|
||||
List<CollectDeviceHisVo> collectDeviceHisVoList = massConcreteService.temperatureList(collectDeviceHisVo);
|
||||
return success(collectDeviceHisVoList);
|
||||
}catch (Exception e){
|
||||
log.error("区域设备统计失败",e.getMessage());
|
||||
return error("区域设备统计失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -53,7 +53,7 @@ public class ScreenDevModelController {
|
|||
|
||||
@ApiOperation(value = "查询预警记录")
|
||||
@PostMapping("getWarnInfo")
|
||||
public AjaxResult getWarnInfo(ParamVo vo) {
|
||||
public AjaxResult getWarnInfo(@RequestBody ParamVo vo) {
|
||||
return service.getWarnInfo(vo);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,52 @@
|
|||
package com.bonus.base.screen.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author 马三炮
|
||||
* @date 2025/4/17
|
||||
*/
|
||||
@Data
|
||||
public class CollectDeviceHisVo {
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 设备id
|
||||
*/
|
||||
private String devId;
|
||||
|
||||
/**
|
||||
* 属性id
|
||||
*/
|
||||
private String attrId;
|
||||
|
||||
/**
|
||||
* 属性名称
|
||||
*/
|
||||
private String attrName;
|
||||
|
||||
/**
|
||||
* 单位
|
||||
*/
|
||||
private String unit;
|
||||
|
||||
/**
|
||||
* 属性值
|
||||
*/
|
||||
private String attrVal;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private String createTime;
|
||||
|
||||
/**
|
||||
* 限制条数
|
||||
*/
|
||||
private int limit;
|
||||
|
||||
}
|
||||
|
|
@ -33,5 +33,8 @@ public class ParamVo {
|
|||
*/
|
||||
private String type;
|
||||
|
||||
|
||||
/**
|
||||
* 分组id
|
||||
*/
|
||||
private String id;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,5 +21,5 @@ public class WarnInfoVo {
|
|||
* 内容
|
||||
*
|
||||
*/
|
||||
private String content;
|
||||
private String remark;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,15 @@
|
|||
package com.bonus.base.screen.mapper;
|
||||
|
||||
import com.bonus.base.basic.domain.CollectDevVo;
|
||||
import com.bonus.base.basic.domain.ConstInfoVo;
|
||||
import com.bonus.base.screen.domain.DeviceAlarmVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ExcavationDetectionMapper {
|
||||
List<CollectDevVo> getCollectDeviceList(ConstInfoVo constInfoVo);
|
||||
|
||||
List<CollectDevVo> getDevStatistics(ConstInfoVo constInfoVo);
|
||||
|
||||
List<DeviceAlarmVo> concreteAlarmList(ConstInfoVo constInfoVo);
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
package com.bonus.base.screen.mapper;
|
||||
|
||||
import com.bonus.base.basic.domain.CollectDevVo;
|
||||
import com.bonus.base.basic.domain.ConstInfoVo;
|
||||
import com.bonus.base.screen.domain.CollectDeviceHisVo;
|
||||
import com.bonus.base.screen.domain.DeviceAlarmVo;
|
||||
import com.bonus.base.screen.domain.ProjectOverviewVo;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface MassConcreteMapper {
|
||||
List<ConstInfoVo> getTtSysUserCheckList(ConstInfoVo constInfoVo);
|
||||
|
||||
List<CollectDevVo> getCollectDeviceList(ConstInfoVo constInfoVo);
|
||||
|
||||
List<CollectDevVo> getDevStatistics(ConstInfoVo constInfoVo);
|
||||
|
||||
List<ConstInfoVo> getCollectDeviceAll(ConstInfoVo constInfoVo);
|
||||
|
||||
List<DeviceAlarmVo> concreteAlarmList(ConstInfoVo constInfoVo);
|
||||
|
||||
List<CollectDeviceHisVo> temperatureList(CollectDeviceHisVo collectDeviceHisVo);
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package com.bonus.base.screen.service;
|
||||
|
||||
import com.bonus.base.basic.domain.CollectDevVo;
|
||||
import com.bonus.base.basic.domain.ConstInfoVo;
|
||||
import com.bonus.base.screen.domain.CollectDeviceHisVo;
|
||||
import com.bonus.base.screen.domain.DeviceAlarmVo;
|
||||
import com.bonus.base.screen.domain.ProjectOverviewVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ExcavationDetectionService {
|
||||
List<CollectDevVo> getCollectDeviceList(ConstInfoVo constInfoVo);
|
||||
|
||||
ProjectOverviewVo getDevStatistics(ConstInfoVo constInfoVo);
|
||||
|
||||
List<DeviceAlarmVo> concreteAlarmList(ConstInfoVo constInfoVo);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
package com.bonus.base.screen.service;
|
||||
|
||||
import com.bonus.base.basic.domain.CollectDevVo;
|
||||
import com.bonus.base.basic.domain.ConstInfoVo;
|
||||
import com.bonus.base.screen.domain.CollectDeviceHisVo;
|
||||
import com.bonus.base.screen.domain.DeviceAlarmVo;
|
||||
import com.bonus.base.screen.domain.ProjectOverviewVo;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface MassConcreteService {
|
||||
/**
|
||||
* 查询区域列表
|
||||
* @param constInfoVo
|
||||
* @return
|
||||
*/
|
||||
List<ConstInfoVo> getTtSysUserCheckList(ConstInfoVo constInfoVo);
|
||||
|
||||
/**
|
||||
* 查询区域下设备列表
|
||||
* @param constInfoVo
|
||||
* @return
|
||||
*/
|
||||
List<CollectDevVo> getCollectDeviceList(ConstInfoVo constInfoVo);
|
||||
|
||||
/**
|
||||
* 设备统计
|
||||
* @param constInfoVo
|
||||
* @return
|
||||
*/
|
||||
ProjectOverviewVo getDevStatistics(ConstInfoVo constInfoVo);
|
||||
|
||||
/**
|
||||
* 区域设备统计
|
||||
* @param constInfoVo
|
||||
* @return
|
||||
*/
|
||||
List<ConstInfoVo> getCollectDeviceAll(ConstInfoVo constInfoVo);
|
||||
|
||||
/**
|
||||
* 报警信息
|
||||
* @param constInfoVo
|
||||
* @return
|
||||
*/
|
||||
List<DeviceAlarmVo> concreteAlarmList(ConstInfoVo constInfoVo);
|
||||
|
||||
/**
|
||||
* 检测温度变化
|
||||
* @param collectDeviceHisVo
|
||||
* @return
|
||||
*/
|
||||
List<CollectDeviceHisVo> temperatureList(CollectDeviceHisVo collectDeviceHisVo);
|
||||
}
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
package com.bonus.base.screen.service.impl;
|
||||
|
||||
import com.bonus.base.basic.domain.CollectDevVo;
|
||||
import com.bonus.base.basic.domain.ConstInfoVo;
|
||||
import com.bonus.base.screen.domain.CollectDeviceHisVo;
|
||||
import com.bonus.base.screen.domain.DeviceAlarmVo;
|
||||
import com.bonus.base.screen.domain.ProjectOverviewVo;
|
||||
import com.bonus.base.screen.mapper.ExcavationDetectionMapper;
|
||||
import com.bonus.base.screen.service.ExcavationDetectionService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author 马三炮
|
||||
* @date 2025/4/17
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class ExcavationDetectionServiceImpl implements ExcavationDetectionService {
|
||||
|
||||
@Resource
|
||||
private ExcavationDetectionMapper excavationDetectionMapper;
|
||||
|
||||
@Override
|
||||
public List<CollectDevVo> getCollectDeviceList(ConstInfoVo constInfoVo) {
|
||||
|
||||
List<CollectDevVo> collectDevVoList = excavationDetectionMapper.getCollectDeviceList(constInfoVo);
|
||||
return collectDevVoList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProjectOverviewVo getDevStatistics(ConstInfoVo constInfoVo) {
|
||||
//获取在线和离线的信息
|
||||
List<CollectDevVo> list=excavationDetectionMapper.getDevStatistics(constInfoVo);
|
||||
ProjectOverviewVo projectOverviewVo = new ProjectOverviewVo();
|
||||
int num=0;
|
||||
for (CollectDevVo collectDevVo:list){
|
||||
if ("1".equals(collectDevVo.getIsOnline())){
|
||||
projectOverviewVo.setOnlineQuantity(collectDevVo.getNum());
|
||||
}
|
||||
num+=collectDevVo.getNum();
|
||||
}
|
||||
projectOverviewVo.setTotalQuantity(num);
|
||||
return projectOverviewVo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DeviceAlarmVo> concreteAlarmList(ConstInfoVo constInfoVo) {
|
||||
List<DeviceAlarmVo> deviceAlarmVoList = excavationDetectionMapper.concreteAlarmList(constInfoVo);
|
||||
return deviceAlarmVoList;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,103 @@
|
|||
package com.bonus.base.screen.service.impl;
|
||||
|
||||
import com.bonus.base.basic.domain.CollectDevVo;
|
||||
import com.bonus.base.basic.domain.ConstInfoVo;
|
||||
import com.bonus.base.screen.domain.CollectDeviceHisVo;
|
||||
import com.bonus.base.screen.domain.DeviceAlarmVo;
|
||||
import com.bonus.base.screen.domain.ProjectOverviewVo;
|
||||
import com.bonus.base.screen.mapper.MassConcreteMapper;
|
||||
import com.bonus.base.screen.service.MassConcreteService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author 马三炮
|
||||
* @date 2025/4/17
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class MassConcreteServiceImpl implements MassConcreteService {
|
||||
|
||||
@Resource
|
||||
private MassConcreteMapper massConcreteMapper;
|
||||
|
||||
/**
|
||||
* 查询区域列表
|
||||
* @param constInfoVo
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<ConstInfoVo> getTtSysUserCheckList(ConstInfoVo constInfoVo) {
|
||||
List<ConstInfoVo> constInfoVoList = massConcreteMapper.getTtSysUserCheckList(constInfoVo);
|
||||
return constInfoVoList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询区域下设备列表
|
||||
* @param constInfoVo
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<CollectDevVo> getCollectDeviceList(ConstInfoVo constInfoVo) {
|
||||
List<CollectDevVo> collectDevVoList = massConcreteMapper.getCollectDeviceList(constInfoVo);
|
||||
return collectDevVoList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设备统计
|
||||
* @param constInfoVo
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ProjectOverviewVo getDevStatistics(ConstInfoVo constInfoVo) {
|
||||
//获取在线和离线的信息
|
||||
List<CollectDevVo> list=massConcreteMapper.getDevStatistics(constInfoVo);
|
||||
ProjectOverviewVo projectOverviewVo = new ProjectOverviewVo();
|
||||
int num=0;
|
||||
for (CollectDevVo collectDevVo:list){
|
||||
if ("1".equals(collectDevVo.getIsOnline())){
|
||||
projectOverviewVo.setOnlineQuantity(collectDevVo.getNum());
|
||||
}
|
||||
num+=collectDevVo.getNum();
|
||||
}
|
||||
projectOverviewVo.setTotalQuantity(num);
|
||||
return projectOverviewVo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 区域设备统计
|
||||
* @param constInfoVo
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<ConstInfoVo> getCollectDeviceAll(ConstInfoVo constInfoVo) {
|
||||
List<ConstInfoVo> constInfoVoList = massConcreteMapper.getCollectDeviceAll(constInfoVo);
|
||||
return constInfoVoList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 报警信息
|
||||
* @param constInfoVo
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<DeviceAlarmVo> concreteAlarmList(ConstInfoVo constInfoVo) {
|
||||
List<DeviceAlarmVo> deviceAlarmVoList = massConcreteMapper.concreteAlarmList(constInfoVo);
|
||||
return deviceAlarmVoList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 检测温度变化
|
||||
* @param collectDeviceHisVo
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<CollectDeviceHisVo> temperatureList(CollectDeviceHisVo collectDeviceHisVo) {
|
||||
List<CollectDeviceHisVo> collectDeviceHisVoList = massConcreteMapper.temperatureList(collectDeviceHisVo);
|
||||
return collectDeviceHisVoList;
|
||||
}
|
||||
}
|
||||
|
|
@ -17,6 +17,10 @@ public class ProjectOverviewServiceImpl implements ProjectOverviewService {
|
|||
private ProjectOverviewMapper projectOverviewMapper;
|
||||
|
||||
|
||||
/**
|
||||
* 获取感知设备总数
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public int getTotalQuantity() {
|
||||
int totalQuantity = projectOverviewMapper.getTotalQuantity();
|
||||
|
|
@ -24,24 +28,40 @@ public class ProjectOverviewServiceImpl implements ProjectOverviewService {
|
|||
return totalQuantity;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设备在线总数
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public int getOnlineQuantity() {
|
||||
int onlineQuantity = projectOverviewMapper.getOnlineQuantity();
|
||||
return onlineQuantity;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设备异常总数
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public int getTotalExceptionCount() {
|
||||
int totalExceptionCount = projectOverviewMapper.getTotalExceptionCount();
|
||||
return totalExceptionCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设备报警次数
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public int getDeviceAlarms() {
|
||||
int deviceAlarms = projectOverviewMapper.getDeviceAlarms();
|
||||
return deviceAlarms;
|
||||
}
|
||||
|
||||
/**
|
||||
* 报警信息
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<DeviceAlarmVo> getDeviceAlarmList() {
|
||||
List<DeviceAlarmVo> deviceAlarmVoList = projectOverviewMapper.getDeviceAlarmList();
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ public class ScreenDevModelServiceImpl implements ScreenDevModelService {
|
|||
num+=collectDevVo.getNum();
|
||||
}
|
||||
map.put("allNum",num);
|
||||
map.put("onLineRate", map.get("online")/num);
|
||||
// map.put("onLineRate", map.get("online")/num);
|
||||
return AjaxResult.success("查询成功",map);
|
||||
}catch (Exception e){
|
||||
map.put("allNum",0);
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
|
||||
<select id="getPageList" resultType="com.bonus.base.basic.domain.CollectDevVo">
|
||||
SELECT tcd.id,tcd.dev_name devName ,tcd.dev_type_id typeId,tcd.dev_code devCode,tdt.type_name devType ,tcd.is_active isActive,
|
||||
tcd.is_online onLione ,tcd.dev_location devLocation ,tcd.background_image backImage ,tcd.remark,tcd.config_data configData,
|
||||
tcd.is_online isOnline ,tcd.dev_location devLocation ,tcd.background_image backImage ,tcd.remark,tcd.config_data configData,
|
||||
tcd.create_time createTime ,tcd.update_time updateTime ,tcd.const_id constId ,tci.`name` constName,
|
||||
tdt.type_code typeCode
|
||||
from tb_collect_device tcd
|
||||
|
|
@ -143,4 +143,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
where del_flag=0
|
||||
|
||||
</select>
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
insert into tb_const_info (id, name, type_id, type_code, type_name,
|
||||
create_time, update_time, is_active,
|
||||
del_flag, remark, background_image, config_data, code
|
||||
) values (#{id},#{name},#{typeId},#{typeCode},#{typeName},now(),now(),0,0,#{remark},#{backImage},#{configData},#{code});
|
||||
) values (#{id},#{name},#{typeId},#{typeCode},#{typeName},now(),now(),#{isActive},0,#{remark},#{backImage},#{configData},#{code});
|
||||
</insert>
|
||||
<update id="updateData">
|
||||
update tb_const_info set name=#{name},type_id=#{typeId},update_time=now(),
|
||||
|
|
@ -21,7 +21,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
|
||||
<select id="getPageList" resultType="com.bonus.base.basic.domain.ConstInfoVo">
|
||||
select tci.id, tci.name, tci.type_id typeId ,tdt.type_code typeCode ,tdt.type_name typeName, tci.create_time createTime ,tci.update_time updateTime , tci.is_active isActive ,
|
||||
tci.remark, tci.background_image backImage , tci.config_data configData
|
||||
tci.remark, tci.background_image backImage , tci.config_data configData,tci.code code
|
||||
from tb_const_info tci
|
||||
left join tb_dev_type tdt on tdt.id=tci.type_id
|
||||
where tci.del_flag=0
|
||||
|
|
@ -44,12 +44,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</if>
|
||||
<if test='type=="1"'>
|
||||
<if test="param.code!=null and param.code!=''">
|
||||
and tci.code=#{param.code}
|
||||
and code=#{param.code}
|
||||
</if>
|
||||
</if>
|
||||
<if test='type=="2"'>
|
||||
<if test="param.name!=null and param.name!=''">
|
||||
and tci.name=#{param.name}
|
||||
and name=#{param.name}
|
||||
</if>
|
||||
</if>
|
||||
</select>
|
||||
|
|
@ -66,4 +66,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
from tb_collect_device
|
||||
WHERE const_id=#{id} and del_flag=0
|
||||
</select>
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,25 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.bonus.base.screen.mapper.ExcavationDetectionMapper">
|
||||
|
||||
|
||||
<select id="getCollectDeviceList" resultType="com.bonus.base.basic.domain.CollectDevVo">
|
||||
select tcd.id, tcd.dev_name,tcd.is_online,tcd.dev_location
|
||||
from tb_collect_device tcd
|
||||
where tcd.del_flag =0 and tcd.dev_type_id = #{typeId}
|
||||
</select>
|
||||
<select id="getDevStatistics" resultType="com.bonus.base.basic.domain.CollectDevVo">
|
||||
SELECT count(1) num, IFNULL(tcd.is_online,0) isOnline
|
||||
FROM tb_collect_device tcd
|
||||
where tcd.is_active=1 and tcd.del_flag=0 and tcd.dev_type_id = #{typeId}
|
||||
GROUP BY IFNULL( tcd.is_online,0)
|
||||
</select>
|
||||
<select id="concreteAlarmList" resultType="com.bonus.base.screen.domain.DeviceAlarmVo">
|
||||
select tcdh.create_time as createTime,tcdh.remark as remark,tcd.dev_name as devName
|
||||
from tb_collect_device_his tcdh
|
||||
left join tb_collect_device tcd on tcdh.dev_id = tcd.id
|
||||
where tcdh.is_warn =1 and tcd.dev_type_id = #{typeId}
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.bonus.base.screen.mapper.MassConcreteMapper">
|
||||
|
||||
|
||||
<select id="getTtSysUserCheckList" resultType="com.bonus.base.basic.domain.ConstInfoVo">
|
||||
select id,name,type_id,type_code,type_name,create_time,update_time,is_active,remark,background_image,
|
||||
config_data,code
|
||||
from tb_const_info where del_flag =0
|
||||
type_id = #{typeId}
|
||||
</select>
|
||||
<select id="getCollectDeviceList" resultType="com.bonus.base.basic.domain.CollectDevVo">
|
||||
select tcd.id, tcd.dev_name,tcd.is_online,tcd.dev_location
|
||||
from tb_const_info tci
|
||||
left join tb_collect_device tcd on tci.id = tcd.const_id
|
||||
where tcd.del_flag =0 and tci.id = #{id}
|
||||
|
||||
</select>
|
||||
<select id="getDevStatistics" resultType="com.bonus.base.basic.domain.CollectDevVo">
|
||||
SELECT count(1) num, IFNULL(tcd.is_online,0) isOnline
|
||||
FROM tb_const_info tci
|
||||
LEFT JOIN tb_collect_device tcd on tci.id=tcd.const_id
|
||||
where tcd.is_active=1 and tcd.del_flag=0 and tci.id=#{id}
|
||||
GROUP BY IFNULL( tcd.is_online,0)
|
||||
|
||||
</select>
|
||||
<select id="getCollectDeviceAll" resultType="com.bonus.base.basic.domain.ConstInfoVo">
|
||||
select name,count(tcd.id) num
|
||||
from tb_const_info tci
|
||||
left join tb_collect_device tcd on tcd.const_id = tci.id
|
||||
where tci.type_id = #{typeId}
|
||||
group by tci.id
|
||||
</select>
|
||||
<select id="concreteAlarmList" resultType="com.bonus.base.screen.domain.DeviceAlarmVo">
|
||||
select tcdh.create_time as createTime,tcdh.remark as remark,tcd.dev_name as devName
|
||||
from tb_collect_device_his tcdh
|
||||
left join tb_collect_device tcd on tcdh.dev_id = tcd.id
|
||||
where tcdh.is_warn =1 and tcd.const_id = #{id}
|
||||
</select>
|
||||
<select id="temperatureList" resultType="com.bonus.base.screen.domain.CollectDeviceHisVo">
|
||||
select tcdh.create_time as createTime,tcdh.remark as remark,tcd.dev_name as devName,tcdh.attr_val as attrVal
|
||||
from tb_collect_device_his tcdh
|
||||
left join tb_collect_device tcd on tcdh.dev_id = tcd.id
|
||||
where tcdh.is_warn =0 and tcd.id = #{id}
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -22,6 +22,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
select tcdh.create_time as createTime,tcdh.remark as remark,tcd.dev_name as devName
|
||||
from tb_collect_device_his tcdh
|
||||
left join tb_collect_device tcd on tcdh.dev_id = tcd.id
|
||||
where tcdh.is_warn =1
|
||||
where tcdh.is_warn =1 LIMIT 20
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</select>
|
||||
<select id="getModelList" resultType="com.bonus.base.basic.domain.CollectDevVo">
|
||||
SELECT tcd.id,tcd.dev_name devName ,tcd.dev_type_id typeId,tcd.dev_code devCode ,tcd.is_active isActive,
|
||||
tcd.is_online onLione ,tcd.dev_location devLocation ,tcd.background_image backImage ,tcd.remark,tcd.config_data configData,
|
||||
tcd.is_online isOnline ,tcd.dev_location devLocation ,tcd.background_image backImage ,tcd.remark,tcd.config_data configData,
|
||||
tcd.create_time createTime ,tcd.update_time updateTime ,tcd.const_id constId ,
|
||||
tdmr.model_id,tdmr.dev_id
|
||||
FROM tb_dev_model_rel tdmr
|
||||
|
|
@ -21,7 +21,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
where tcd.is_active=1 and tcd.del_flag=0 and tdmr.model_id=#{id}
|
||||
</select>
|
||||
<select id="getDevStatistics" resultType="com.bonus.base.basic.domain.CollectDevVo">
|
||||
SELECT count(1) num, IFNULL(tcd.is_online,0) online
|
||||
SELECT count(1) num, IFNULL(tcd.is_online,0) isOnline
|
||||
FROM tb_dev_model_rel tdmr
|
||||
LEFT JOIN tb_collect_device tcd on tdmr.dev_id=tcd.id
|
||||
where tcd.is_active=1 and tcd.del_flag=0 and tdmr.model_id=#{id}
|
||||
|
|
@ -43,10 +43,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
select his.dev_id,his.attr_val,his.create_time,his.remark ,tcd.dev_name
|
||||
from tb_collect_device_his his
|
||||
left join tb_collect_device tcd on tcd.id =his.dev_id
|
||||
where tcd.id=#{devId} and his.is_warn=1
|
||||
left join tb_dev_model_rel tdmr on tcd.id = tdmr.dev_id
|
||||
where tdmr.model_id=#{id} and his.is_warn=1
|
||||
ORDER BY his.create_time desc
|
||||
LIMIT #{limit}
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -85,6 +85,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
update tt_sys_user set team_id = null
|
||||
where team_id =#{teamId}
|
||||
</delete>
|
||||
<delete id="deleteTtSysUser">
|
||||
update tt_sys_user set del_flag = 0
|
||||
where id =#{id}
|
||||
</delete>
|
||||
|
||||
|
||||
<select id="getTtSysUserVoListByTeamId" resultType="com.bonus.base.basic.domain.vo.TtSysUserVo">
|
||||
|
|
|
|||
Loading…
Reference in New Issue