bug修复
This commit is contained in:
parent
3a0efb8c25
commit
17a9a699da
@ -3,10 +3,9 @@ package com.zhgd.xmgl.modules.concrete.controller;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gexin.fastjson.JSON;
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.jeecg.common.mybatis.EntityMap;
|
||||
import com.zhgd.xmgl.modules.concrete.entity.ConcreteMonitorAlarm;
|
||||
import com.zhgd.xmgl.modules.concrete.entity.vo.CountConcreteMonitorAlarmVo;
|
||||
import com.zhgd.xmgl.modules.concrete.service.IConcreteMonitorAlarmService;
|
||||
import com.zhgd.xmgl.modules.taskprogress.entity.TaskProgressMaterialRel;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
@ -116,4 +115,13 @@ public class ConcreteMonitorAlarmController {
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "统计报警(监测点位总数)", notes = "统计报警(监测点位总数)", httpMethod = "POST")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目sn", paramType = "body", required = true, dataType = "String"),
|
||||
})
|
||||
@PostMapping(value = "/countConcreteMonitorAlarm")
|
||||
public Result<CountConcreteMonitorAlarmVo> countConcreteMonitorAlarm(@ApiIgnore @RequestBody HashMap<String, Object> paramMap) {
|
||||
return Result.success(concreteMonitorAlarmService.countConcreteMonitorAlarm(paramMap));
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,111 @@
|
||||
package com.zhgd.xmgl.modules.concrete.controller;
|
||||
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.jeecg.common.mybatis.EntityMap;
|
||||
import com.zhgd.xmgl.modules.concrete.entity.ConcreteMonitorDevPointPosition;
|
||||
import com.zhgd.xmgl.modules.concrete.entity.ConcreteMonitorDevToPlaneFigure;
|
||||
import com.zhgd.xmgl.modules.concrete.service.ConcreteMonitorDevToPlaneFigureService;
|
||||
import com.zhgd.xmgl.util.MessageUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
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 springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* @Title: Controller
|
||||
* @Description: 混凝土监测-监测点位置和平面图配置中间表
|
||||
* @author: pds
|
||||
* @date: 2021-10-09
|
||||
* @version: V1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/xmgl/concreteMonitorDevToPlaneFigure")
|
||||
@Slf4j
|
||||
@Api(tags = "混凝土监测-监测点位置和平面图配置中间表")
|
||||
public class ConcreteMonitorDevToPlaneFigureController {
|
||||
@Autowired
|
||||
private ConcreteMonitorDevToPlaneFigureService concreteMonitorPlaneFigureCoordinateService;
|
||||
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "编辑混凝土监测-监测点位置和平面图配置中间表信息", notes = "编辑混凝土监测-监测点位置和平面图配置中间表信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<ConcreteMonitorDevToPlaneFigure> edit(@RequestBody ConcreteMonitorDevToPlaneFigure concreteMonitorDevToPlaneFigure) {
|
||||
concreteMonitorPlaneFigureCoordinateService.editPlaneFigureCoordinate(concreteMonitorDevToPlaneFigure);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "编辑混凝土监测-监测点位置和平面图配置中间表信息", notes = "编辑混凝土监测-监测点位置和平面图配置中间表信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/updateFigureCoordinate")
|
||||
public Result<ConcreteMonitorDevToPlaneFigure> updateFigureCoordinate(@RequestBody List<ConcreteMonitorDevToPlaneFigure> list) {
|
||||
concreteMonitorPlaneFigureCoordinateService.updateFigureCoordinate(list);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "删除-通过设备和平面图ID删除混凝土监测-监测点位置和平面图配置中间表信息", notes = "删除-通过设备和平面图ID删除混凝土监测-监测点位置和平面图配置中间表信息", httpMethod = "POST")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "concreteMonitorPlaneFigureId", value = "混凝土监测-平面图配置ID", paramType = "body", required = true, dataType = "String"),
|
||||
@ApiImplicitParam(name = "highSlopeMeasurePointId", value = "高边坡-测点id", paramType = "body", required = true, dataType = "String"),
|
||||
})
|
||||
@PostMapping(value = "/deletePlaneFigureCoordinate")
|
||||
public Result<ConcreteMonitorDevToPlaneFigure> deleteConcreteMonitorPlaneFigureCoordinate(@ApiIgnore @RequestBody Map<String, Object> map) {
|
||||
concreteMonitorPlaneFigureCoordinateService.deleteConcreteMonitorPlaneFigureCoordinate(map);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "删除混凝土监测-监测点位置和平面图配置中间表信息", notes = "删除混凝土监测-监测点位置和平面图配置中间表信息", httpMethod = "POST")
|
||||
@ApiImplicitParam(name = "id", value = "混凝土监测-监测点位置和平面图配置中间表ID", paramType = "body", required = true, dataType = "Integer")
|
||||
@PostMapping(value = "/delete")
|
||||
public Result<ConcreteMonitorDevToPlaneFigure> delete(@ApiIgnore @RequestBody Map<String, Object> map) {
|
||||
Result<ConcreteMonitorDevToPlaneFigure> result = new Result<ConcreteMonitorDevToPlaneFigure>();
|
||||
ConcreteMonitorDevToPlaneFigure concreteMonitorDevToPlaneFigure = concreteMonitorPlaneFigureCoordinateService.getById(MapUtils.getString(map, "id"));
|
||||
if (concreteMonitorDevToPlaneFigure == null) {
|
||||
result.error500(MessageUtil.get("notFindErr"));
|
||||
} else {
|
||||
boolean ok = concreteMonitorPlaneFigureCoordinateService.removeById(MapUtils.getString(map, "id"));
|
||||
if (ok) {
|
||||
result.successMsg(MessageUtil.get("deleteSucess"));
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@ApiOperation(value = "添加混凝土监测-监测点位置和平面图配置中间表信息", notes = "添加混凝土监测-监测点位置和平面图配置中间表信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/adds")
|
||||
public Result<ConcreteMonitorDevToPlaneFigure> adds(@RequestBody ConcreteMonitorDevToPlaneFigure concreteMonitorDevToPlaneFigure) {
|
||||
Result<ConcreteMonitorDevToPlaneFigure> result = new Result<ConcreteMonitorDevToPlaneFigure>();
|
||||
try {
|
||||
concreteMonitorPlaneFigureCoordinateService.save(concreteMonitorDevToPlaneFigure);
|
||||
result.successMsg("添加成功");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
log.info(e.getMessage());
|
||||
result.error500("添加失败");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,138 @@
|
||||
package com.zhgd.xmgl.modules.concrete.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.xmgl.modules.concrete.entity.ConcreteMonitorDevToPlaneFigure;
|
||||
import com.zhgd.xmgl.modules.concrete.entity.ConcreteMonitorPlaneFigure;
|
||||
import com.zhgd.xmgl.modules.concrete.service.ConcreteMonitorDevToPlaneFigureService;
|
||||
import com.zhgd.xmgl.modules.concrete.service.IConcreteMonitorPlaneFigureService;
|
||||
import com.zhgd.xmgl.util.MessageUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
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 springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
/**
|
||||
* @Title: Controller
|
||||
* @Description: 混凝土监测-平面图配置
|
||||
* @author: pds
|
||||
* @date: 2021-10-09
|
||||
* @version: V1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/xmgl/concreteMonitorPlaneFigure")
|
||||
@Slf4j
|
||||
@Api(tags = "混凝土监测-平面图配置")
|
||||
public class ConcreteMonitorPlaneFigureController {
|
||||
@Autowired
|
||||
private IConcreteMonitorPlaneFigureService concreteMonitorPlaneFigureService;
|
||||
|
||||
@Autowired
|
||||
private ConcreteMonitorDevToPlaneFigureService concreteMonitorPlaneFigureCoordinate;
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "列表查询混凝土监测-平面图配置信息", notes = "列表查询混凝土监测-平面图配置信息", httpMethod = "POST")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "body", required = true, dataType = "String"),
|
||||
@ApiImplicitParam(name = "devSn", value = "设备编号", paramType = "body", required = false, dataType = "String"),
|
||||
})
|
||||
@PostMapping(value = "/selectList")
|
||||
public Result<List<ConcreteMonitorPlaneFigure>> selectList(@ApiIgnore @RequestBody Map<String, Object> map) {
|
||||
QueryWrapper<ConcreteMonitorPlaneFigure> queryWrapper = new QueryWrapper<>();
|
||||
String devSn = MapUtils.getString(map, "devSn");
|
||||
queryWrapper.lambda().eq(ConcreteMonitorPlaneFigure::getProjectSn, MapUtils.getString(map, "projectSn"))
|
||||
.eq(StringUtils.isNotBlank(devSn), ConcreteMonitorPlaneFigure::getDevSn, devSn);
|
||||
List<ConcreteMonitorPlaneFigure> list = concreteMonitorPlaneFigureService.list(queryWrapper);
|
||||
for (ConcreteMonitorPlaneFigure concreteMonitorPlaneFigure : list) {
|
||||
LambdaQueryWrapper<ConcreteMonitorDevToPlaneFigure> wrapper = Wrappers.<ConcreteMonitorDevToPlaneFigure>lambdaQuery()
|
||||
.eq(ConcreteMonitorDevToPlaneFigure::getConcreteMonitorPlaneFigureId, concreteMonitorPlaneFigure.getId());
|
||||
|
||||
concreteMonitorPlaneFigure.setConcreteMonitorDevPointPositionIds(concreteMonitorPlaneFigureCoordinate.list(wrapper).stream().map(d -> d.getConcreteMonitorDevPointPositionId().toString()).collect(Collectors.joining(",")));
|
||||
}
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param concreteMonitorPlaneFigure
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "添加混凝土监测-平面图配置信息", notes = "添加混凝土监测-平面图配置信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<ConcreteMonitorPlaneFigure> add(@RequestBody ConcreteMonitorPlaneFigure concreteMonitorPlaneFigure) {
|
||||
concreteMonitorPlaneFigureService.saveConcreteMonitorPlaneFigure(concreteMonitorPlaneFigure);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param concreteMonitorPlaneFigure
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "编辑混凝土监测-平面图配置信息", notes = "编辑混凝土监测-平面图配置信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<ConcreteMonitorPlaneFigure> edit(@RequestBody ConcreteMonitorPlaneFigure concreteMonitorPlaneFigure) {
|
||||
concreteMonitorPlaneFigureService.editConcreteMonitorPlaneFigure(concreteMonitorPlaneFigure);
|
||||
return Result.success(concreteMonitorPlaneFigure);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "删除混凝土监测-平面图配置信息", notes = "删除混凝土监测-平面图配置信息", httpMethod = "POST")
|
||||
@ApiImplicitParam(name = "id", value = "混凝土监测-平面图配置ID", paramType = "body", required = true, dataType = "Integer")
|
||||
@PostMapping(value = "/delete")
|
||||
public Result<ConcreteMonitorPlaneFigure> delete(@ApiIgnore @RequestBody Map<String, Object> map) {
|
||||
concreteMonitorPlaneFigureService.deleteConcreteMonitorPlaneFigure(MapUtils.getString(map, "id"));
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询混凝土监测-平面图配置信息", notes = "通过id查询混凝土监测-平面图配置信息", httpMethod = "POST")
|
||||
@ApiImplicitParam(name = "id", value = "混凝土监测-平面图配置ID", paramType = "body", required = true, dataType = "Integer")
|
||||
@PostMapping(value = "/queryById")
|
||||
public Result<ConcreteMonitorPlaneFigure> queryById(@ApiIgnore @RequestBody Map<String, Object> map) {
|
||||
Result<ConcreteMonitorPlaneFigure> result = new Result<ConcreteMonitorPlaneFigure>();
|
||||
ConcreteMonitorPlaneFigure concreteMonitorPlaneFigure = concreteMonitorPlaneFigureService.getById(MapUtils.getString(map, "id"));
|
||||
if (concreteMonitorPlaneFigure == null) {
|
||||
result.error500(MessageUtil.get("notFindErr"));
|
||||
} else {
|
||||
result.setResult(concreteMonitorPlaneFigure);
|
||||
result.setSuccess(true);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -31,31 +31,31 @@ public class ConcreteMonitorAlarm implements Serializable {
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private java.lang.Long id;
|
||||
private Long id;
|
||||
/**
|
||||
* 设备编号
|
||||
*/
|
||||
@Excel(name = "设备编号", width = 15)
|
||||
@ApiModelProperty(value = "设备编号")
|
||||
private java.lang.String devSn;
|
||||
private String devSn;
|
||||
/**
|
||||
* 监测点点位号
|
||||
*/
|
||||
@Excel(name = "监测点点位号", width = 15)
|
||||
@ApiModelProperty(value = "监测点点位号")
|
||||
private java.lang.Integer pointNo;
|
||||
private Integer pointNo;
|
||||
/**
|
||||
* 项目sn
|
||||
*/
|
||||
@Excel(name = "项目sn", width = 15)
|
||||
@ApiModelProperty(value = "项目sn")
|
||||
private java.lang.String projectSn;
|
||||
private String projectSn;
|
||||
/**
|
||||
* 报警类型
|
||||
*/
|
||||
@Excel(name = "报警类型", width = 15)
|
||||
@ApiModelProperty(value = "报警类型")
|
||||
private java.lang.String alarmType;
|
||||
private String alarmType;
|
||||
/**
|
||||
* 混凝土监测警时间
|
||||
*/
|
||||
@ -68,18 +68,18 @@ public class ConcreteMonitorAlarm implements Serializable {
|
||||
*/
|
||||
@Excel(name = "报警值", width = 15)
|
||||
@ApiModelProperty(value = "报警值")
|
||||
private java.lang.Double alarmValue;
|
||||
private Double alarmValue;
|
||||
/**
|
||||
* 报警等级,1 紧急告警,2 重要告警,3 次要告警,4 提示告警
|
||||
*/
|
||||
@Excel(name = "报警等级,1 紧急告警,2 重要告警,3 次要告警,4 提示告警", width = 15)
|
||||
@ApiModelProperty(value = "报警等级,1 紧急告警,2 重要告警,3 次要告警,4 提示告警")
|
||||
private java.lang.Integer alarmLevel;
|
||||
private Integer alarmLevel;
|
||||
|
||||
@ApiModelProperty(value = "监测点点位名称")
|
||||
@TableField(exist = false)
|
||||
private java.lang.String pointName;
|
||||
private String pointName;
|
||||
@ApiModelProperty(value = "设备名称")
|
||||
@TableField(exist = false)
|
||||
private java.lang.String devName;
|
||||
private String devName;
|
||||
}
|
||||
|
||||
@ -1,50 +1,61 @@
|
||||
package com.zhgd.xmgl.modules.concrete.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.Data;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Description: 混凝土监测-实时数据
|
||||
* @author: pds
|
||||
* @date: 2021-04-22
|
||||
* @date: 2021-04-22
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("concrete_monitor_current_data")
|
||||
@ApiModel(value="ConcreteMonitorCurrentData实体类",description="ConcreteMonitorCurrentData")
|
||||
@ApiModel(value = "ConcreteMonitorCurrentData实体类", description = "ConcreteMonitorCurrentData")
|
||||
public class ConcreteMonitorCurrentData implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value="id")
|
||||
private java.lang.Long id ;
|
||||
/**混凝土监测设备唯一标识*/
|
||||
@Excel(name = "混凝土监测设备唯一标识", width = 15)
|
||||
@ApiModelProperty(value="混凝土监测设备唯一标识")
|
||||
private java.lang.String devSn ;
|
||||
/**监测点点位号*/
|
||||
@Excel(name = "监测点点位号", width = 15)
|
||||
@ApiModelProperty(value="监测点点位号")
|
||||
private java.lang.Integer pointNo ;
|
||||
/**项目唯一标识*/
|
||||
@Excel(name = "项目唯一标识", width = 15)
|
||||
@ApiModelProperty(value="项目唯一标识")
|
||||
private java.lang.String projectSn ;
|
||||
/**接收时间*/
|
||||
@Excel(name = "接收时间", width = 15)
|
||||
@ApiModelProperty(value="接收时间")
|
||||
private java.lang.String receiveTime ;
|
||||
/**温度*/
|
||||
@Excel(name = "温度", width = 15)
|
||||
@ApiModelProperty(value="温度")
|
||||
private java.lang.Double temperature ;
|
||||
@ApiModelProperty(value = "id")
|
||||
private Long id;
|
||||
/**
|
||||
* 混凝土监测设备唯一标识
|
||||
*/
|
||||
@Excel(name = "混凝土监测设备唯一标识", width = 15)
|
||||
@ApiModelProperty(value = "混凝土监测设备唯一标识")
|
||||
private String devSn;
|
||||
/**
|
||||
* 监测点点位号
|
||||
*/
|
||||
@Excel(name = "监测点点位号", width = 15)
|
||||
@ApiModelProperty(value = "监测点点位号")
|
||||
private Integer pointNo;
|
||||
/**
|
||||
* 项目唯一标识
|
||||
*/
|
||||
@Excel(name = "项目唯一标识", width = 15)
|
||||
@ApiModelProperty(value = "项目唯一标识")
|
||||
private String projectSn;
|
||||
/**
|
||||
* 接收时间
|
||||
*/
|
||||
@Excel(name = "接收时间", width = 15)
|
||||
@ApiModelProperty(value = "接收时间")
|
||||
private String receiveTime;
|
||||
/**
|
||||
* 温度
|
||||
*/
|
||||
@Excel(name = "温度", width = 15)
|
||||
@ApiModelProperty(value = "温度")
|
||||
private Double temperature;
|
||||
}
|
||||
|
||||
@ -28,64 +28,86 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
public class ConcreteMonitorDev implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value="id")
|
||||
private java.lang.Long id;
|
||||
/**设备名称*/
|
||||
@Excel(name = "设备名称", width = 15)
|
||||
@ApiModelProperty(value="设备名称")
|
||||
private java.lang.String devName ;
|
||||
/**设备编号*/
|
||||
@Excel(name = "设备编号", width = 15)
|
||||
@ApiModelProperty(value="设备编号")
|
||||
private java.lang.String devSn ;
|
||||
/**创建时间*/
|
||||
@Excel(name = "创建时间", width = 15)
|
||||
@ApiModelProperty(value="创建时间")
|
||||
private java.lang.String addTime ;
|
||||
/**监控点数量*/
|
||||
@Excel(name = "监控点数量", width = 15)
|
||||
@ApiModelProperty(value="监控点数量")
|
||||
private java.lang.Integer pointNum ;
|
||||
/**项目sn*/
|
||||
@Excel(name = "项目sn", width = 15)
|
||||
@ApiModelProperty(value="项目sn")
|
||||
private java.lang.String projectSn ;
|
||||
/**地图X坐标*/
|
||||
@Excel(name = "地图X坐标", width = 15)
|
||||
@ApiModelProperty(value="地图X坐标")
|
||||
private java.lang.String mapX ;
|
||||
/**地图Y坐标*/
|
||||
@Excel(name = "地图Y坐标", width = 15)
|
||||
@ApiModelProperty(value="地图Y坐标")
|
||||
private java.lang.String mapY ;
|
||||
/**接收实时数据时间,30分钟没接收到实时数据表示设备离线*/
|
||||
@Excel(name = "接收实时数据时间,30分钟没接收到实时数据表示设备离线", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value="接收实时数据时间,30分钟没接收到实时数据表示设备离线")
|
||||
private java.util.Date realTime ;
|
||||
/**紧急报警推送人,多个逗号分割*/
|
||||
@Excel(name = "紧急报警推送人,多个逗号分割", width = 15)
|
||||
@ApiModelProperty(value="紧急报警推送人,多个逗号分割")
|
||||
private java.lang.String urgentAlarmPushWorkerId ;
|
||||
/**重要报警推送人,多个逗号分割*/
|
||||
@Excel(name = "重要报警推送人,多个逗号分割", width = 15)
|
||||
@ApiModelProperty(value = "id")
|
||||
private Long id;
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
@Excel(name = "设备名称", width = 15)
|
||||
@ApiModelProperty(value = "设备名称")
|
||||
private String devName;
|
||||
/**
|
||||
* 设备编号
|
||||
*/
|
||||
@Excel(name = "设备编号", width = 15)
|
||||
@ApiModelProperty(value = "设备编号")
|
||||
private String devSn;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Excel(name = "创建时间", width = 15)
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private String addTime;
|
||||
/**
|
||||
* 监控点数量
|
||||
*/
|
||||
@Excel(name = "监控点数量", width = 15)
|
||||
@ApiModelProperty(value = "监控点数量")
|
||||
private Integer pointNum;
|
||||
/**
|
||||
* 项目sn
|
||||
*/
|
||||
@Excel(name = "项目sn", width = 15)
|
||||
@ApiModelProperty(value = "项目sn")
|
||||
private String projectSn;
|
||||
/**
|
||||
* 地图X坐标
|
||||
*/
|
||||
@Excel(name = "地图X坐标", width = 15)
|
||||
@ApiModelProperty(value = "地图X坐标")
|
||||
private String mapX;
|
||||
/**
|
||||
* 地图Y坐标
|
||||
*/
|
||||
@Excel(name = "地图Y坐标", width = 15)
|
||||
@ApiModelProperty(value = "地图Y坐标")
|
||||
private String mapY;
|
||||
/**
|
||||
* 接收实时数据时间,30分钟没接收到实时数据表示设备离线
|
||||
*/
|
||||
@Excel(name = "接收实时数据时间,30分钟没接收到实时数据表示设备离线", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "接收实时数据时间,30分钟没接收到实时数据表示设备离线")
|
||||
private Date realTime;
|
||||
/**
|
||||
* 紧急报警推送人,多个逗号分割
|
||||
*/
|
||||
@Excel(name = "紧急报警推送人,多个逗号分割", width = 15)
|
||||
@ApiModelProperty(value = "紧急报警推送人,多个逗号分割")
|
||||
private String urgentAlarmPushWorkerId;
|
||||
/**
|
||||
* 重要报警推送人,多个逗号分割
|
||||
*/
|
||||
@Excel(name = "重要报警推送人,多个逗号分割", width = 15)
|
||||
@ApiModelProperty(value = "重要报警推送人,多个逗号分割")
|
||||
private java.lang.String importantAlarmPushWorkerId;
|
||||
private String importantAlarmPushWorkerId;
|
||||
/**
|
||||
* 次要报警推送人,多个逗号分割
|
||||
*/
|
||||
@Excel(name = "次要报警推送人,多个逗号分割", width = 15)
|
||||
@ApiModelProperty(value = "次要报警推送人,多个逗号分割")
|
||||
private java.lang.String secondaryAlarmPushWorkerId;
|
||||
private String secondaryAlarmPushWorkerId;
|
||||
/**
|
||||
* 提示告警推送人,多个逗号分割
|
||||
*/
|
||||
@Excel(name = "提示告警推送人,多个逗号分割", width = 15)
|
||||
@ApiModelProperty(value = "提示告警推送人,多个逗号分割")
|
||||
private java.lang.String promptAlarmPushWorkerId;
|
||||
private String promptAlarmPushWorkerId;
|
||||
@ApiModelProperty(value = "入场时间yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
|
||||
@ -29,38 +29,39 @@ public class ConcreteMonitorDevPointPosition implements Serializable {
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private java.lang.Long id;
|
||||
private Long id;
|
||||
/**
|
||||
* 设备编号
|
||||
*/
|
||||
@Excel(name = "设备编号", width = 15)
|
||||
@ApiModelProperty(value = "设备编号")
|
||||
private java.lang.String devSn;
|
||||
private String devSn;
|
||||
/**
|
||||
* 项目sn
|
||||
*/
|
||||
@Excel(name = "项目sn", width = 15)
|
||||
@ApiModelProperty(value = "项目sn")
|
||||
private java.lang.String projectSn;
|
||||
private String projectSn;
|
||||
/**
|
||||
* 监测点点位名称
|
||||
*/
|
||||
@Excel(name = "监测点点位名称", width = 15)
|
||||
@ApiModelProperty(value = "监测点点位名称")
|
||||
private java.lang.String pointName;
|
||||
private String pointName;
|
||||
/**
|
||||
* 监测点点位号
|
||||
*/
|
||||
@Excel(name = "监测点点位号", width = 15)
|
||||
@ApiModelProperty(value = "监测点点位号")
|
||||
private java.lang.Integer pointNo;
|
||||
private Integer pointNo;
|
||||
/**
|
||||
* 温度报警阀值
|
||||
*/
|
||||
@Excel(name = "温度报警阀值", width = 15)
|
||||
@ApiModelProperty(value = "温度报警阀值")
|
||||
private java.lang.Double temperatureThreshold;
|
||||
private Double temperatureThreshold;
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "混凝土监测-实时数据")
|
||||
@ApiModelProperty(value = "混凝土监测-实时数据(最新一条)")
|
||||
private List<ConcreteMonitorCurrentData> list;
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,73 @@
|
||||
package com.zhgd.xmgl.modules.concrete.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Description: 混凝土监测-监测点位置和平面图配置中间表
|
||||
* @author: pds
|
||||
* @date: 2021-10-09
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("concrete_monitor_dev_to_plane_figure")
|
||||
@ApiModel(value = "ConcreteMonitorDevToPlaneFigure实体类", description = "")
|
||||
public class ConcreteMonitorDevToPlaneFigure implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private Long id;
|
||||
/**
|
||||
* 混凝土监测设备-监测点位置id
|
||||
*/
|
||||
@Excel(name = "混凝土监测设备-监测点位置id", width = 15)
|
||||
@ApiModelProperty(value = "混凝土监测设备-监测点位置id")
|
||||
private Long concreteMonitorDevPointPositionId;
|
||||
/**
|
||||
* 混凝土监测-平面图配置ID
|
||||
*/
|
||||
@Excel(name = "混凝土监测-平面图配置ID", width = 15)
|
||||
@ApiModelProperty(value = "混凝土监测-平面图配置ID")
|
||||
private Long concreteMonitorPlaneFigureId;
|
||||
/**
|
||||
* X坐标
|
||||
*/
|
||||
@Excel(name = "X坐标", width = 15)
|
||||
@ApiModelProperty(value = "X坐标")
|
||||
private String mapX;
|
||||
/**
|
||||
* Y坐标
|
||||
*/
|
||||
@Excel(name = "Y坐标", width = 15)
|
||||
@ApiModelProperty(value = "Y坐标")
|
||||
private String mapY;
|
||||
/**
|
||||
* 创建时间 yyyy-MM-dd HH:mm:ss
|
||||
*/
|
||||
@Excel(name = "创建时间 yyyy-MM-dd HH:mm:ss", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建时间 yyyy-MM-dd HH:mm:ss")
|
||||
private java.util.Date createTime;
|
||||
/**
|
||||
* 更新时间 yyyy-MM-dd HH:mm:ss
|
||||
*/
|
||||
@Excel(name = "更新时间 yyyy-MM-dd HH:mm:ss", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新时间 yyyy-MM-dd HH:mm:ss")
|
||||
private java.util.Date updateTime;
|
||||
}
|
||||
@ -0,0 +1,77 @@
|
||||
package com.zhgd.xmgl.modules.concrete.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Description: 混凝土监测-平面图配置
|
||||
* @author: pds
|
||||
* @date: 2021-10-09
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("concrete_monitor_plane_figure")
|
||||
@ApiModel(value = "ConcreteMonitorPlaneFigure实体类", description = "ConcreteMonitorPlaneFigure")
|
||||
public class ConcreteMonitorPlaneFigure implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private Long id;
|
||||
/**
|
||||
* 项目SN
|
||||
*/
|
||||
@Excel(name = "项目SN", width = 15)
|
||||
@ApiModelProperty(value = "项目SN")
|
||||
private String projectSn;
|
||||
/**
|
||||
* 混凝土监测设备唯一标识
|
||||
*/
|
||||
@Excel(name = "混凝土监测设备唯一标识", width = 15)
|
||||
@ApiModelProperty(value = "混凝土监测设备唯一标识")
|
||||
private String devSn;
|
||||
/**
|
||||
* 平面图像名称
|
||||
*/
|
||||
@Excel(name = "平面图像名称", width = 15)
|
||||
@ApiModelProperty(value = "平面图像名称")
|
||||
private String planeFigureName;
|
||||
/**
|
||||
* 图片url
|
||||
*/
|
||||
@Excel(name = "图片url", width = 15)
|
||||
@ApiModelProperty(value = "图片url")
|
||||
private String imageUrl;
|
||||
/**
|
||||
* 创建时间 yyyy-MM-dd HH:mm:ss
|
||||
*/
|
||||
@Excel(name = "创建时间 yyyy-MM-dd HH:mm:ss", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建时间 yyyy-MM-dd HH:mm:ss")
|
||||
private java.util.Date createTime;
|
||||
/**
|
||||
* 更新时间 yyyy-MM-dd HH:mm:ss
|
||||
*/
|
||||
@Excel(name = "更新时间 yyyy-MM-dd HH:mm:ss", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新时间 yyyy-MM-dd HH:mm:ss")
|
||||
private java.util.Date updateTime;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "混凝土监测设备-监测点位置ID,多个逗号分隔")
|
||||
private String concreteMonitorDevPointPositionIds;
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
package com.zhgd.xmgl.modules.concrete.entity.vo;
|
||||
|
||||
import com.zhgd.xmgl.modules.concrete.entity.ConcreteMonitorDevPointPosition;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class CountConcreteMonitorAlarmVo {
|
||||
@ApiModelProperty(value = "监测点位总数(个)")
|
||||
private Integer monitorPositionNum;
|
||||
@ApiModelProperty(value = "告警点位总数(个)")
|
||||
private Integer alarmPositionNum;
|
||||
@ApiModelProperty(value = "告警总数(个)")
|
||||
private Integer alarmNum;
|
||||
|
||||
}
|
||||
@ -3,9 +3,11 @@ package com.zhgd.xmgl.modules.concrete.mapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.zhgd.xmgl.modules.concrete.entity.ConcreteMonitorAlarm;
|
||||
import com.zhgd.xmgl.modules.concrete.entity.vo.CountConcreteMonitorAlarmVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@ -21,4 +23,6 @@ public interface ConcreteMonitorAlarmMapper extends BaseMapper<ConcreteMonitorAl
|
||||
List<ConcreteMonitorAlarm> queryConcreteMonitorAlarmPageList(Page<ConcreteMonitorAlarm> page, @Param("param") Map<String, Object> map);
|
||||
|
||||
List<ConcreteMonitorAlarm> selectDevAlarmList(Map<String, Object> map);
|
||||
|
||||
CountConcreteMonitorAlarmVo countConcreteMonitorAlarm(HashMap<String, Object> paramMap);
|
||||
}
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.zhgd.xmgl.modules.concrete.mapper;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@ -13,11 +14,13 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
/**
|
||||
* @Description: 混凝土监测设备
|
||||
* @author: pds
|
||||
* @date: 2021-04-22
|
||||
* @date: 2021-04-22
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface ConcreteMonitorDevMapper extends BaseMapper<ConcreteMonitorDev> {
|
||||
|
||||
List<EntityMap> selectConcreteMonitorDevPageList(Page<EntityMap> page, @Param("param")Map<String, Object> map);
|
||||
List<EntityMap> selectConcreteMonitorDevPageList(Page<EntityMap> page, @Param("param") Map<String, Object> map);
|
||||
|
||||
Integer countPointNum(HashMap<String, Object> paramMap);
|
||||
}
|
||||
|
||||
@ -0,0 +1,21 @@
|
||||
package com.zhgd.xmgl.modules.concrete.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.zhgd.jeecg.common.mybatis.EntityMap;
|
||||
import com.zhgd.xmgl.modules.concrete.entity.ConcreteMonitorDevToPlaneFigure;
|
||||
import com.zhgd.xmgl.modules.highslope.entity.HighSlopeMeasurePointToPlaneFigure;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 混凝土监测-监测点位置和平面图配置中间表
|
||||
* @author: pds
|
||||
* @date: 2021-10-09
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface ConcreteMonitorDevToPlaneFigureMapper extends BaseMapper<ConcreteMonitorDevToPlaneFigure> {
|
||||
|
||||
List<EntityMap> selectPlaneFigureCoordinateList(Long highSlopePlaneFigureId);
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
package com.zhgd.xmgl.modules.concrete.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.zhgd.xmgl.modules.concrete.entity.ConcreteMonitorPlaneFigure;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @Description: 混凝土监测-平面图配置
|
||||
* @author: pds
|
||||
* @date: 2021-10-09
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface ConcreteMonitorPlaneFigureMapper extends BaseMapper<ConcreteMonitorPlaneFigure> {
|
||||
|
||||
}
|
||||
@ -39,4 +39,12 @@
|
||||
</if>
|
||||
order by a.add_time desc
|
||||
</select>
|
||||
|
||||
<select id="countConcreteMonitorAlarm"
|
||||
resultType="com.zhgd.xmgl.modules.concrete.entity.vo.CountConcreteMonitorAlarmVo">
|
||||
select count(distinct cma.dev_sn,cma.point_no) alarmPositionNum,count(cma.id) alarmNum
|
||||
from concrete_monitor_alarm cma
|
||||
join concrete_monitor_dev_point_position cmdpp on cma.point_no = cmdpp.point_no and cma.dev_sn=cmdpp.dev_sn
|
||||
where cma.project_sn = #{projectSn}
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@ -1,10 +1,15 @@
|
||||
<?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.zhgd.xmgl.modules.concrete.mapper.ConcreteMonitorDevMapper">
|
||||
|
||||
<select id="selectConcreteMonitorDevPageList" resultType="com.zhgd.jeecg.common.mybatis.EntityMap">
|
||||
SELECT a.*
|
||||
FROM concrete_monitor_dev a
|
||||
where a.project_sn=#{param.projectSn}
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
<select id="countPointNum" resultType="java.lang.Integer">
|
||||
SELECT ifnull(sum(point_num),0)
|
||||
FROM concrete_monitor_dev a
|
||||
where a.project_sn=#{projectSn}
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@ -0,0 +1,18 @@
|
||||
<?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.zhgd.xmgl.modules.concrete.mapper.ConcreteMonitorDevToPlaneFigureMapper">
|
||||
<select id="selectPlaneFigureCoordinateList" resultType="com.zhgd.jeecg.common.mybatis.EntityMap">
|
||||
SELECT a.*,
|
||||
b.measure_point_name,
|
||||
b.measure_point_addr,
|
||||
b.measure_point_number,
|
||||
b.alarm_state,
|
||||
demt.monitor_type_name
|
||||
from concrete_monitor_dev_to_plane_figure a
|
||||
INNER JOIN concrete_monitor_dev_point_position b ON a.concrete_monitor_dev_point_position_id = b.id
|
||||
inner join high_slope_engineering_to_monitor_type demtr on demtr.id =
|
||||
b.high_slope_engineering_to_monitor_type_id
|
||||
inner join high_slope_monitor_type demt on demtr.high_slope_monitor_type_id = demt.id
|
||||
WHERE a.concrete_monitor_plane_figure_id = #{concreteMonitorPlaneFigureId}
|
||||
</select>
|
||||
</mapper>
|
||||
@ -0,0 +1,4 @@
|
||||
<?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.zhgd.xmgl.modules.concrete.mapper.ConcreteMonitorPlaneFigureMapper">
|
||||
</mapper>
|
||||
@ -0,0 +1,25 @@
|
||||
package com.zhgd.xmgl.modules.concrete.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.zhgd.jeecg.common.mybatis.EntityMap;
|
||||
import com.zhgd.xmgl.modules.concrete.entity.ConcreteMonitorDevPointPosition;
|
||||
import com.zhgd.xmgl.modules.concrete.entity.ConcreteMonitorDevToPlaneFigure;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description: 混凝土监测-监测点位置和平面图配置中间表
|
||||
* @author: pds
|
||||
* @date: 2021-10-09
|
||||
* @version: V1.0
|
||||
*/
|
||||
public interface ConcreteMonitorDevToPlaneFigureService extends IService<ConcreteMonitorDevToPlaneFigure> {
|
||||
|
||||
|
||||
void editPlaneFigureCoordinate(ConcreteMonitorDevToPlaneFigure concreteMonitorDevToPlaneFigure);
|
||||
|
||||
void deleteConcreteMonitorPlaneFigureCoordinate(Map<String, Object> map);
|
||||
|
||||
void updateFigureCoordinate(List<ConcreteMonitorDevToPlaneFigure> list);
|
||||
}
|
||||
@ -5,7 +5,9 @@ import com.zhgd.jeecg.common.mybatis.EntityMap;
|
||||
import com.zhgd.xmgl.modules.concrete.entity.ConcreteMonitorAlarm;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.zhgd.xmgl.modules.concrete.entity.ConcreteMonitorDev;
|
||||
import com.zhgd.xmgl.modules.concrete.entity.vo.CountConcreteMonitorAlarmVo;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@ -24,4 +26,6 @@ public interface IConcreteMonitorAlarmService extends IService<ConcreteMonitorAl
|
||||
void saveConcreteMonitorAlarm(ConcreteMonitorAlarm concreteMonitorAlarm);
|
||||
|
||||
List<ConcreteMonitorAlarm> selectDevAlarmList(Map<String, Object> map);
|
||||
|
||||
CountConcreteMonitorAlarmVo countConcreteMonitorAlarm(HashMap<String, Object> paramMap);
|
||||
}
|
||||
|
||||
@ -0,0 +1,19 @@
|
||||
package com.zhgd.xmgl.modules.concrete.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.zhgd.xmgl.modules.concrete.entity.ConcreteMonitorPlaneFigure;
|
||||
|
||||
/**
|
||||
* @Description: 混凝土监测-平面图配置
|
||||
* @author: pds
|
||||
* @date: 2021-10-09
|
||||
* @version: V1.0
|
||||
*/
|
||||
public interface IConcreteMonitorPlaneFigureService extends IService<ConcreteMonitorPlaneFigure> {
|
||||
|
||||
void deleteConcreteMonitorPlaneFigure(String id);
|
||||
|
||||
void saveConcreteMonitorPlaneFigure(ConcreteMonitorPlaneFigure concreteMonitorPlaneFigure);
|
||||
|
||||
void editConcreteMonitorPlaneFigure(ConcreteMonitorPlaneFigure concreteMonitorPlaneFigure);
|
||||
}
|
||||
@ -8,6 +8,7 @@ import com.zhgd.jeecg.common.mybatis.EntityMap;
|
||||
import com.zhgd.xmgl.modules.concrete.entity.ConcreteMonitorAlarm;
|
||||
import com.zhgd.xmgl.modules.concrete.entity.ConcreteMonitorDev;
|
||||
import com.zhgd.xmgl.modules.basicdata.entity.Notice;
|
||||
import com.zhgd.xmgl.modules.concrete.entity.vo.CountConcreteMonitorAlarmVo;
|
||||
import com.zhgd.xmgl.modules.concrete.mapper.ConcreteMonitorAlarmMapper;
|
||||
import com.zhgd.xmgl.modules.concrete.mapper.ConcreteMonitorDevMapper;
|
||||
import com.zhgd.xmgl.modules.concrete.service.IConcreteMonitorAlarmService;
|
||||
@ -20,6 +21,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@ -131,4 +133,12 @@ public class ConcreteMonitorAlarmServiceImpl extends ServiceImpl<ConcreteMonitor
|
||||
public List<ConcreteMonitorAlarm> selectDevAlarmList(Map<String, Object> map) {
|
||||
return concreteMonitorAlarmMapper.selectDevAlarmList(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CountConcreteMonitorAlarmVo countConcreteMonitorAlarm(HashMap<String, Object> paramMap) {
|
||||
Integer pn = concreteMonitorDevMapper.countPointNum(paramMap);
|
||||
CountConcreteMonitorAlarmVo vo = baseMapper.countConcreteMonitorAlarm(paramMap);
|
||||
vo.setMonitorPositionNum(pn);
|
||||
return vo;
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,64 @@
|
||||
package com.zhgd.xmgl.modules.concrete.service.impl;
|
||||
|
||||
import cn.hutool.core.map.MapUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.zhgd.jeecg.common.mybatis.EntityMap;
|
||||
import com.zhgd.xmgl.modules.concrete.entity.ConcreteMonitorDevToPlaneFigure;
|
||||
import com.zhgd.xmgl.modules.concrete.mapper.ConcreteMonitorCurrentDataMapper;
|
||||
import com.zhgd.xmgl.modules.concrete.mapper.ConcreteMonitorDevToPlaneFigureMapper;
|
||||
import com.zhgd.xmgl.modules.concrete.service.ConcreteMonitorDevToPlaneFigureService;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Description: 混凝土监测-监测点位置和平面图配置中间表
|
||||
* @author: pds
|
||||
* @date: 2021-10-09
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class ConcreteMonitorDevToPlaneFigureServiceImpl extends ServiceImpl<ConcreteMonitorDevToPlaneFigureMapper, ConcreteMonitorDevToPlaneFigure> implements ConcreteMonitorDevToPlaneFigureService {
|
||||
@Autowired
|
||||
private ConcreteMonitorDevToPlaneFigureMapper concreteMonitorDevToPlaneFigureMapper;
|
||||
@Autowired
|
||||
private ConcreteMonitorCurrentDataMapper concreteMonitorCurrentDataMapper;
|
||||
|
||||
@Override
|
||||
public void editPlaneFigureCoordinate(ConcreteMonitorDevToPlaneFigure concreteMonitorDevToPlaneFigure) {
|
||||
QueryWrapper<ConcreteMonitorDevToPlaneFigure> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.lambda().eq(ConcreteMonitorDevToPlaneFigure::getConcreteMonitorPlaneFigureId, concreteMonitorDevToPlaneFigure.getConcreteMonitorPlaneFigureId())
|
||||
.eq(ConcreteMonitorDevToPlaneFigure::getConcreteMonitorDevPointPositionId, concreteMonitorDevToPlaneFigure.getConcreteMonitorDevPointPositionId());
|
||||
ConcreteMonitorDevToPlaneFigure oldPlaneFigureCoordinate = concreteMonitorDevToPlaneFigureMapper.selectOne(queryWrapper);
|
||||
if (oldPlaneFigureCoordinate != null) {
|
||||
concreteMonitorDevToPlaneFigure.setId(oldPlaneFigureCoordinate.getId());
|
||||
concreteMonitorDevToPlaneFigureMapper.updateById(concreteMonitorDevToPlaneFigure);
|
||||
} else {
|
||||
concreteMonitorDevToPlaneFigureMapper.insert(concreteMonitorDevToPlaneFigure);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteConcreteMonitorPlaneFigureCoordinate(Map<String, Object> map) {
|
||||
QueryWrapper<ConcreteMonitorDevToPlaneFigure> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.lambda().eq(ConcreteMonitorDevToPlaneFigure::getConcreteMonitorPlaneFigureId, MapUtils.getString(map, "concreteMonitorPlaneFigureId"))
|
||||
.eq(ConcreteMonitorDevToPlaneFigure::getConcreteMonitorDevPointPositionId, MapUtils.getString(map, "pointId"));
|
||||
concreteMonitorDevToPlaneFigureMapper.delete(queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateFigureCoordinate(List<ConcreteMonitorDevToPlaneFigure> list) {
|
||||
if (list != null && list.size() > 0) {
|
||||
for (ConcreteMonitorDevToPlaneFigure figureCoordinate : list) {
|
||||
concreteMonitorDevToPlaneFigureMapper.updateById(figureCoordinate);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,97 @@
|
||||
package com.zhgd.xmgl.modules.concrete.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.zhgd.xmgl.modules.concrete.entity.ConcreteMonitorDevToPlaneFigure;
|
||||
import com.zhgd.xmgl.modules.concrete.entity.ConcreteMonitorPlaneFigure;
|
||||
import com.zhgd.xmgl.modules.concrete.mapper.ConcreteMonitorDevToPlaneFigureMapper;
|
||||
import com.zhgd.xmgl.modules.concrete.mapper.ConcreteMonitorPlaneFigureMapper;
|
||||
import com.zhgd.xmgl.modules.concrete.service.IConcreteMonitorPlaneFigureService;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description: 混凝土监测-平面图配置
|
||||
* @author: pds
|
||||
* @date: 2021-10-09
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class ConcreteMonitorPlaneFigureServiceImpl extends ServiceImpl<ConcreteMonitorPlaneFigureMapper, ConcreteMonitorPlaneFigure> implements IConcreteMonitorPlaneFigureService {
|
||||
@Autowired
|
||||
private ConcreteMonitorPlaneFigureMapper concreteMonitorPlaneFigureMapper;
|
||||
@Autowired
|
||||
private ConcreteMonitorDevToPlaneFigureMapper concreteMonitorDevToPlaneFigureMapper;
|
||||
|
||||
@Override
|
||||
public void deleteConcreteMonitorPlaneFigure(String id) {
|
||||
concreteMonitorPlaneFigureMapper.deleteById(id);
|
||||
QueryWrapper<ConcreteMonitorDevToPlaneFigure> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.lambda().eq(ConcreteMonitorDevToPlaneFigure::getConcreteMonitorPlaneFigureId, id);
|
||||
concreteMonitorDevToPlaneFigureMapper.delete(queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveConcreteMonitorPlaneFigure(ConcreteMonitorPlaneFigure concreteMonitorPlaneFigure) {
|
||||
concreteMonitorPlaneFigure.setId(null);
|
||||
concreteMonitorPlaneFigureMapper.insert(concreteMonitorPlaneFigure);
|
||||
if (StringUtils.isNotEmpty(concreteMonitorPlaneFigure.getConcreteMonitorDevPointPositionIds())) {
|
||||
for (String pointId : concreteMonitorPlaneFigure.getConcreteMonitorDevPointPositionIds().split(",")) {
|
||||
ConcreteMonitorDevToPlaneFigure planeFigureCoordinate = new ConcreteMonitorDevToPlaneFigure();
|
||||
planeFigureCoordinate.setConcreteMonitorDevPointPositionId(Long.valueOf(pointId));
|
||||
planeFigureCoordinate.setConcreteMonitorPlaneFigureId(concreteMonitorPlaneFigure.getId());
|
||||
planeFigureCoordinate.setMapY("0");
|
||||
planeFigureCoordinate.setMapX("0");
|
||||
concreteMonitorDevToPlaneFigureMapper.insert(planeFigureCoordinate);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void editConcreteMonitorPlaneFigure(ConcreteMonitorPlaneFigure concreteMonitorPlaneFigure) {
|
||||
concreteMonitorPlaneFigureMapper.updateById(concreteMonitorPlaneFigure);
|
||||
if (StringUtils.isNotEmpty(concreteMonitorPlaneFigure.getConcreteMonitorDevPointPositionIds())) {
|
||||
QueryWrapper<ConcreteMonitorDevToPlaneFigure> planeFigureCoordinateQueryWrapper = new QueryWrapper<>();
|
||||
planeFigureCoordinateQueryWrapper.lambda().eq(ConcreteMonitorDevToPlaneFigure::getConcreteMonitorPlaneFigureId, concreteMonitorPlaneFigure.getId());
|
||||
List<ConcreteMonitorDevToPlaneFigure> list = concreteMonitorDevToPlaneFigureMapper.selectList(planeFigureCoordinateQueryWrapper);
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
if (CollUtil.isNotEmpty(list)) {
|
||||
for (ConcreteMonitorDevToPlaneFigure planeFigureCoordinate : list) {
|
||||
data.put(planeFigureCoordinate.getConcreteMonitorDevPointPositionId().toString(), planeFigureCoordinate.getId());
|
||||
}
|
||||
}
|
||||
|
||||
for (String pointId : concreteMonitorPlaneFigure.getConcreteMonitorDevPointPositionIds().split(",")) {
|
||||
if (data.containsKey(pointId)) {
|
||||
//从历史数据去除还存在的测点,找出已取消的测点
|
||||
data.remove(pointId);
|
||||
} else {
|
||||
//保存新增的测点
|
||||
ConcreteMonitorDevToPlaneFigure planeFigureCoordinate = new ConcreteMonitorDevToPlaneFigure();
|
||||
planeFigureCoordinate.setConcreteMonitorDevPointPositionId(Long.valueOf(pointId));
|
||||
planeFigureCoordinate.setConcreteMonitorPlaneFigureId(concreteMonitorPlaneFigure.getId());
|
||||
planeFigureCoordinate.setMapY("0");
|
||||
planeFigureCoordinate.setMapX("0");
|
||||
concreteMonitorDevToPlaneFigureMapper.insert(planeFigureCoordinate);
|
||||
}
|
||||
}
|
||||
//删除已取消的测点
|
||||
if (data.size() > 0) {
|
||||
for (String key : data.keySet()) {
|
||||
String id = String.valueOf(data.get(key));
|
||||
concreteMonitorDevToPlaneFigureMapper.deleteById(id);
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
concreteMonitorDevToPlaneFigureMapper.delete(Wrappers.<ConcreteMonitorDevToPlaneFigure>lambdaQuery().eq(ConcreteMonitorDevToPlaneFigure::getConcreteMonitorPlaneFigureId, concreteMonitorPlaneFigure.getId()));
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user