高边坡
This commit is contained in:
parent
54b66901e4
commit
f04d9c8346
@ -138,7 +138,7 @@ public class HighSlopeCurrentDataController {
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "通过分页信息查询所有相关数据(项目监测详情-数据列表、基坑配置-实时数据)", notes = "通过分页信息查询所有相关数据(项目监测详情-数据列表、基坑配置-实时数据)")
|
||||
@ApiOperation(value = "通过分页信息查询所有相关数据(项目监测详情-数据列表、高边坡配置-实时数据)", notes = "通过分页信息查询所有相关数据(项目监测详情-数据列表、高边坡配置-实时数据)")
|
||||
@PostMapping(value = "/selectHighSlopeCurrentDataList")
|
||||
public Result<CurrentDataListVO> selectHighSlopeCurrentDataList(@RequestBody CurrentDataListQO currentDataListQO) {
|
||||
CurrentDataListVO currentDataListVO = new CurrentDataListVO();
|
||||
|
||||
@ -38,9 +38,9 @@ public class HighSlopeMeasurePointController {
|
||||
private IHighSlopeMeasurePointService highSlopeMeasurePointService;
|
||||
|
||||
/**
|
||||
* 基坑配置-测点管理列表
|
||||
* 高边坡配置-测点管理列表
|
||||
*/
|
||||
@ApiOperation(value = "基坑配置-测点管理列表", notes = "基坑配置-测点管理列表", httpMethod = "POST")
|
||||
@ApiOperation(value = "高边坡配置-测点管理列表", notes = "高边坡配置-测点管理列表", httpMethod = "POST")
|
||||
@PostMapping(value = "/selectMeasurePointList")
|
||||
public Result<IPage<HighSlopeMeasurePoint>> selectListByPageInfo(@RequestBody SelectMeasurePointListQO selectMeasurePointListQO) {
|
||||
LambdaQueryWrapper<HighSlopeMeasurePoint> wrapper = Wrappers.<HighSlopeMeasurePoint>lambdaQuery().eq(HighSlopeMeasurePoint::getRelaId, selectMeasurePointListQO.getRelaId());
|
||||
@ -54,7 +54,7 @@ public class HighSlopeMeasurePointController {
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "基坑配置-根据测点编号查询详情", notes = "基坑配置-根据测点编号查询详情")
|
||||
@ApiOperation(value = "高边坡配置-根据测点编号查询详情", notes = "高边坡配置-根据测点编号查询详情")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "measurePointNumber", value = "测点编号", paramType = "query", required = true, dataType = "String")
|
||||
})
|
||||
|
||||
@ -23,7 +23,7 @@ import java.io.Serializable;
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("deep_excavation_current_data")
|
||||
@TableName("high_slope_current_data")
|
||||
@ApiModel(value = "HighSlopeCurrentData实体类", description = "HighSlopeCurrentData")
|
||||
@Accessors(chain = true)
|
||||
@NoArgsConstructor
|
||||
@ -99,10 +99,10 @@ public class HighSlopeCurrentData implements Serializable {
|
||||
private String unit;
|
||||
|
||||
/**
|
||||
* 基坑名称
|
||||
* 高边坡名称
|
||||
*/
|
||||
@Excel(name = "基坑名称", width = 15)
|
||||
@ApiModelProperty(value = "基坑名称")
|
||||
@Excel(name = "高边坡名称", width = 15)
|
||||
@ApiModelProperty(value = "高边坡名称")
|
||||
@TableField(exist = false)
|
||||
private String engineeringName;
|
||||
|
||||
|
||||
@ -20,7 +20,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("deep_excavation_engineering")
|
||||
@TableName("high_slope_engineering")
|
||||
@ApiModel(value = "HighSlopeEngineering实体类", description = "HighSlopeEngineering")
|
||||
public class HighSlopeEngineering implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
@ -80,16 +80,16 @@ public class HighSlopeEngineering implements Serializable {
|
||||
@ApiModelProperty(value = "安全等级")
|
||||
private String safetyLevel;
|
||||
/**
|
||||
* 基坑深度
|
||||
* 高边坡深度
|
||||
*/
|
||||
@Excel(name = "基坑深度", width = 15)
|
||||
@ApiModelProperty(value = "基坑深度")
|
||||
@Excel(name = "高边坡深度", width = 15)
|
||||
@ApiModelProperty(value = "高边坡深度")
|
||||
private String foundationDitchDepth;
|
||||
/**
|
||||
* 基坑周长
|
||||
* 高边坡周长
|
||||
*/
|
||||
@Excel(name = "基坑周长", width = 15)
|
||||
@ApiModelProperty(value = "基坑周长")
|
||||
@Excel(name = "高边坡周长", width = 15)
|
||||
@ApiModelProperty(value = "高边坡周长")
|
||||
private String foundationDitchGirth;
|
||||
/**
|
||||
* 支护形式
|
||||
|
||||
@ -22,7 +22,7 @@ import java.util.List;
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("deep_excavation_measure_point")
|
||||
@TableName("high_slope_measure_point")
|
||||
@ApiModel(value = "HighSlopeMeasurePoint实体类", description = "HighSlopeMeasurePoint")
|
||||
public class HighSlopeMeasurePoint implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
@ -41,10 +41,10 @@ public class HighSlopeMeasurePoint implements Serializable {
|
||||
|
||||
private Long highSlopeId;
|
||||
/**
|
||||
* 基坑与监测内容关系ID
|
||||
* 高边坡与监测内容关系ID
|
||||
*/
|
||||
@Excel(name = "基坑与监测内容关系ID", width = 15)
|
||||
@ApiModelProperty(value = "基坑与监测内容关系ID")
|
||||
@Excel(name = "高边坡与监测内容关系ID", width = 15)
|
||||
@ApiModelProperty(value = "高边坡与监测内容关系ID")
|
||||
|
||||
private Long relaId;
|
||||
/**
|
||||
|
||||
@ -22,7 +22,7 @@ import lombok.experimental.Accessors;
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@TableName(value = "deep_excavation_monitor_type")
|
||||
@TableName(value = "high_slope_monitor_type")
|
||||
@Accessors(chain = true)
|
||||
public class HighSlopeMonitorType {
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
|
||||
@ -18,12 +18,12 @@ import java.io.Serializable;
|
||||
*/
|
||||
|
||||
/**
|
||||
* 高边坡-基坑监测内容关联表
|
||||
* 高边坡-高边坡监测内容关联表
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@TableName(value = "deep_excavation_monitor_type_rela")
|
||||
@TableName(value = "high_slope_monitor_type_rela")
|
||||
public class HighSlopeMonitorTypeRela implements Serializable {
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
@ -47,9 +47,9 @@ public class HighSlopeMonitorTypeRela implements Serializable {
|
||||
private Long monitorTypeId;
|
||||
|
||||
/**
|
||||
* 基坑id
|
||||
* 高边坡id
|
||||
*/
|
||||
@TableField(value = "deep_excavation_id")
|
||||
@TableField(value = "high_slope_id")
|
||||
private Long highSlopeId;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ -20,7 +20,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("deep_excavation_plane_figure")
|
||||
@TableName("high_slope_plane_figure")
|
||||
@ApiModel(value = "HighSlopePlaneFigure实体类", description = "HighSlopePlaneFigure")
|
||||
public class HighSlopePlaneFigure implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ -20,7 +20,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("deep_excavation_plane_figure_coordinate")
|
||||
@TableName("high_slope_plane_figure_coordinate")
|
||||
@ApiModel(value = "HighSlopePlaneFigureCoordinate实体类", description = "HighSlopePlaneFigureCoordinate")
|
||||
public class HighSlopePlaneFigureCoordinate implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ -25,7 +25,7 @@ import java.util.Date;
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@TableName(value = "deep_excavation_sensor")
|
||||
@TableName(value = "high_slope_sensor")
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value = "HighSlopeSensor实体类", description = "HighSlopeSensor")
|
||||
public class HighSlopeSensor implements Serializable {
|
||||
@ -143,9 +143,9 @@ public class HighSlopeSensor implements Serializable {
|
||||
private Date createDate;
|
||||
|
||||
/**
|
||||
* 基坑名称
|
||||
* 高边坡名称
|
||||
*/
|
||||
@ApiModelProperty(value = "基坑名称")
|
||||
@ApiModelProperty(value = "高边坡名称")
|
||||
@TableField(exist = false)
|
||||
private String engineeringName;
|
||||
|
||||
|
||||
@ -19,7 +19,7 @@ import java.io.Serializable;
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("deep_excavation_sensor_type")
|
||||
@TableName("high_slope_sensor_type")
|
||||
@ApiModel(value = "HighSlopeSensorType实体类", description = "HighSlopeSensorType")
|
||||
public class HighSlopeSensorType implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ -21,7 +21,7 @@ public class CurrentDataListQO extends PageQO {
|
||||
@ApiModelProperty(value = "传感器sn", required = false)
|
||||
private String sensorSn;
|
||||
|
||||
@ApiModelProperty(value = "基坑与监测关联id", required = true)
|
||||
@ApiModelProperty(value = "高边坡与监测关联id", required = true)
|
||||
private Long relaId;
|
||||
|
||||
@ApiModelProperty(value = "开始时间 2022-08-19 14:42:17格式", required = false)
|
||||
|
||||
@ -14,7 +14,7 @@ import lombok.Data;
|
||||
@Data
|
||||
@ApiModel(value = "查询测点列表请求对象", description = "查询测点列表请求对象")
|
||||
public class SelectMeasurePointListQO extends PageQO {
|
||||
@ApiModelProperty(value = "基坑与监测内容关系ID", required = true)
|
||||
@ApiModelProperty(value = "高边坡与监测内容关系ID", required = true)
|
||||
private Long relaId;
|
||||
@ApiModelProperty(value = "测点编号")
|
||||
private String measurePointNumber;
|
||||
|
||||
@ -13,7 +13,7 @@ import lombok.Data;
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("基坑历史数据对象")
|
||||
@ApiModel("高边坡历史数据对象")
|
||||
public class CurrentDataListVO {
|
||||
@ApiModelProperty("单位")
|
||||
private String unit;
|
||||
|
||||
@ -12,7 +12,7 @@ import lombok.NoArgsConstructor;
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("基坑报警数量对象")
|
||||
@ApiModel("高边坡报警数量对象")
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class DataAlarmVO {
|
||||
|
||||
@ -19,12 +19,12 @@
|
||||
des.alarm_value,
|
||||
des.fiducial_value,
|
||||
des.rate_alarm_value
|
||||
FROM deep_excavation_current_data decd
|
||||
inner join deep_excavation_sensor des on decd.sensor_sn = des.sensor_sn
|
||||
inner join deep_excavation_measure_point demp
|
||||
FROM high_slope_current_data decd
|
||||
inner join high_slope_sensor des on decd.sensor_sn = des.sensor_sn
|
||||
inner join high_slope_measure_point demp
|
||||
on des.measure_point_number = demp.measure_point_number
|
||||
inner join deep_excavation_engineering dee on demp.deep_excavation_id = dee.id
|
||||
inner join deep_excavation_sensor_type dest on dest.id = des.sensor_type_id
|
||||
inner join high_slope_engineering dee on demp.high_slope_id = dee.id
|
||||
inner join high_slope_sensor_type dest on dest.id = des.sensor_type_id
|
||||
where dee.project_sn = #{projectSn}
|
||||
<if test="sensorTypeId != null">
|
||||
and dest.id = #{sensorTypeId}
|
||||
@ -54,11 +54,11 @@
|
||||
<!-- dee.engineering_name engineeringName,-->
|
||||
<!-- demp.measure_point_name measurePointName,-->
|
||||
<!-- dest.sensor_type_name sensorTypeName-->
|
||||
<!-- from deep_excavation_sensor des-->
|
||||
<!-- left join deep_excavation_measure_point demp-->
|
||||
<!-- from high_slope_sensor des-->
|
||||
<!-- left join high_slope_measure_point demp-->
|
||||
<!-- on des.measure_point_number = demp.measure_point_number-->
|
||||
<!-- left join deep_excavation_engineering dee on demp.deep_excavation_id = dee.id-->
|
||||
<!-- left join deep_excavation_sensor_type dest on dest.id = des.sensor_type_id-->
|
||||
<!-- left join high_slope_engineering dee on demp.high_slope_id = dee.id-->
|
||||
<!-- left join high_slope_sensor_type dest on dest.id = des.sensor_type_id-->
|
||||
<!-- where dee.project_sn = #{projectSn}-->
|
||||
<!-- and des.receive_time >= CONCAT(DATE_FORMAT(now(), '%Y-%m-%d'), ' 00:00:00')-->
|
||||
<!-- order by des.receive_time desc-->
|
||||
@ -67,8 +67,8 @@
|
||||
<select id="selectHighSlopeCurrentDataPage"
|
||||
resultType="com.zhgd.xmgl.modules.highslope.entity.HighSlopeCurrentData">
|
||||
SELECT a.*
|
||||
from deep_excavation_current_data a
|
||||
LEFT JOIN deep_excavation_measure_point b ON
|
||||
from high_slope_current_data a
|
||||
LEFT JOIN high_slope_measure_point b ON
|
||||
a.measuring_point_sn = b.measure_point_number
|
||||
WHERE a.project_sn = #{param.projectSn}
|
||||
<if test="param.measurePointNumber != null and param.measurePointNumber != ''">
|
||||
@ -91,9 +91,9 @@
|
||||
<select id="selectNewestHighSlopeCurrentData"
|
||||
resultType="com.zhgd.xmgl.modules.highslope.entity.HighSlopeCurrentData">
|
||||
SELECT decd.*
|
||||
from deep_excavation_current_data decd
|
||||
inner join deep_excavation_sensor des on des.sensor_sn = decd.sensor_sn
|
||||
inner join deep_excavation_measure_point demp
|
||||
from high_slope_current_data decd
|
||||
inner join high_slope_sensor des on des.sensor_sn = decd.sensor_sn
|
||||
inner join high_slope_measure_point demp
|
||||
on des.measure_point_number = demp.measure_point_number
|
||||
where demp.measure_point_number = #{measurePointNumber}
|
||||
order by decd.receive_time
|
||||
@ -120,12 +120,12 @@
|
||||
des.alarm_value,
|
||||
des.fiducial_value,
|
||||
des.rate_alarm_value
|
||||
from deep_excavation_current_data decd
|
||||
left join deep_excavation_sensor des on decd.sensor_sn = des.sensor_sn
|
||||
left join deep_excavation_measure_point demp
|
||||
from high_slope_current_data decd
|
||||
left join high_slope_sensor des on decd.sensor_sn = des.sensor_sn
|
||||
left join high_slope_measure_point demp
|
||||
on des.measure_point_number = demp.measure_point_number
|
||||
inner join deep_excavation_engineering dee on demp.deep_excavation_id = dee.id
|
||||
left join deep_excavation_sensor_type dest on dest.id = des.sensor_type_id
|
||||
inner join high_slope_engineering dee on demp.high_slope_id = dee.id
|
||||
left join high_slope_sensor_type dest on dest.id = des.sensor_type_id
|
||||
<where>
|
||||
<if test="projectSn != null and projectSn != ''">
|
||||
and dee.project_sn = #{projectSn}
|
||||
@ -154,10 +154,10 @@
|
||||
<select id="selectArticleOneDataList"
|
||||
resultType="com.zhgd.xmgl.modules.highslope.entity.HighSlopeCurrentData">
|
||||
SELECT decd.*
|
||||
from deep_excavation_current_data decd
|
||||
from high_slope_current_data decd
|
||||
inner join
|
||||
(select MIN(id) id, sensor_sn
|
||||
from deep_excavation_current_data
|
||||
from high_slope_current_data
|
||||
WHERE sensor_sn in
|
||||
<foreach collection="collection" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
@ -166,12 +166,12 @@
|
||||
</select>
|
||||
<select id="getAllEndData" resultType="com.zhgd.xmgl.modules.highslope.entity.HighSlopeCurrentData">
|
||||
select sensor_sn, MAX(receive_time) receive_time
|
||||
from deep_excavation_current_data
|
||||
from high_slope_current_data
|
||||
group by sensor_sn
|
||||
</select>
|
||||
|
||||
<update id="updateDataTotalAndAlarmState">
|
||||
update deep_excavation_current_data
|
||||
update high_slope_current_data
|
||||
set data = data_total + ${fiducialValue},
|
||||
alarm_state = IF( data_rate > ${rateAlarmValue}, 4,
|
||||
if(data_total > ${alarmValue}, 2, 1))
|
||||
@ -183,10 +183,10 @@
|
||||
count(*) num,
|
||||
DATE_FORMAT(decd.receive_time, '%Y-%m-%d') time
|
||||
FROM
|
||||
deep_excavation_plane_figure_coordinate a
|
||||
INNER JOIN deep_excavation_measure_point b ON a.point_id = b.id
|
||||
INNER JOIN deep_excavation_sensor des ON b.measure_point_number = des.measure_point_number
|
||||
INNER JOIN deep_excavation_current_data decd ON decd.sensor_sn = des.sensor_sn
|
||||
high_slope_plane_figure_coordinate a
|
||||
INNER JOIN high_slope_measure_point b ON a.point_id = b.id
|
||||
INNER JOIN high_slope_sensor des ON b.measure_point_number = des.measure_point_number
|
||||
INNER JOIN high_slope_current_data decd ON decd.sensor_sn = des.sensor_sn
|
||||
WHERE a.plane_figure_id = #{planeFigureId}
|
||||
and decd.project_sn = #{projectSn}
|
||||
and decd.receive_time >= DATE_SUB(NOW(),INTERVAL 30 day)
|
||||
@ -199,13 +199,13 @@
|
||||
SELECT
|
||||
demt.monitor_type_name as name,count(*) num
|
||||
FROM
|
||||
deep_excavation_plane_figure_coordinate a
|
||||
INNER JOIN deep_excavation_measure_point b ON a.point_id = b.id
|
||||
INNER JOIN deep_excavation_sensor des ON b.measure_point_number = des.measure_point_number
|
||||
INNER JOIN deep_excavation_current_data decd ON decd.sensor_sn = des.sensor_sn
|
||||
INNER JOIN deep_excavation_monitor_type_rela demtr ON demtr.deep_excavation_id = b.deep_excavation_id AND
|
||||
high_slope_plane_figure_coordinate a
|
||||
INNER JOIN high_slope_measure_point b ON a.point_id = b.id
|
||||
INNER JOIN high_slope_sensor des ON b.measure_point_number = des.measure_point_number
|
||||
INNER JOIN high_slope_current_data decd ON decd.sensor_sn = des.sensor_sn
|
||||
INNER JOIN high_slope_monitor_type_rela demtr ON demtr.high_slope_id = b.high_slope_id AND
|
||||
demtr.id=b.rela_id
|
||||
INNER JOIN deep_excavation_monitor_type demt ON demt.id = demtr.monitor_type_id
|
||||
INNER JOIN high_slope_monitor_type demt ON demt.id = demtr.monitor_type_id
|
||||
WHERE a.plane_figure_id = #{planeFigureId}
|
||||
and decd.project_sn = #{projectSn}
|
||||
and decd.receive_time >= DATE_SUB(NOW(),INTERVAL 30 day)
|
||||
@ -216,7 +216,7 @@
|
||||
<!-- <select id="selectHighSlopeCurrentDataList"
|
||||
resultType="com.zhgd.xmgl.modules.highslope.entity.HighSlopeCurrentData">
|
||||
SELECT a.*
|
||||
from deep_excavation_current_data a LEFT JOIN deep_excavation_measure_point b ON
|
||||
from high_slope_current_data a LEFT JOIN high_slope_measure_point b ON
|
||||
a.measuring_point_sn=b.measure_point_number
|
||||
WHERE a.project_sn=#{projectSn}
|
||||
<if test="monitorTypeId!=null and monitorTypeId!=''">
|
||||
|
||||
@ -4,14 +4,14 @@
|
||||
<select id="selectHighSlopeEngineeringPage"
|
||||
resultType="com.zhgd.xmgl.modules.highslope.entity.HighSlopeEngineering">
|
||||
SELECT *
|
||||
from deep_excavation_engineering
|
||||
from high_slope_engineering
|
||||
WHERE project_sn=#{param.projectSn}
|
||||
order by start_time
|
||||
</select>
|
||||
<select id="selectHighSlopeList"
|
||||
resultType="com.zhgd.xmgl.modules.highslope.entity.HighSlopeEngineering">
|
||||
SELECT *
|
||||
from deep_excavation_engineering
|
||||
from high_slope_engineering
|
||||
WHERE project_sn=#{projectSn}
|
||||
order by start_time
|
||||
</select>
|
||||
|
||||
@ -4,9 +4,9 @@
|
||||
<select id="selectHighSlopeAllMeasurePointList"
|
||||
resultType="com.zhgd.xmgl.modules.highslope.entity.HighSlopeMeasurePoint">
|
||||
select a.*
|
||||
from deep_excavation_measure_point a
|
||||
INNER JOIN deep_excavation_monitor_type_rela b ON a.rela_id = b.id
|
||||
where b.deep_excavation_id = #{highSlopeId}
|
||||
from high_slope_measure_point a
|
||||
INNER JOIN high_slope_monitor_type_rela b ON a.rela_id = b.id
|
||||
where b.high_slope_id = #{highSlopeId}
|
||||
<if test="relaId != null and relaId != ''">
|
||||
and a.rela_id = #{relaId}
|
||||
</if>
|
||||
@ -22,7 +22,7 @@
|
||||
</resultMap>
|
||||
<select id="getDetailsByMeasurePointNumber" resultMap="measurePointAndSensor">
|
||||
select demp.id,
|
||||
demp.deep_excavation_id,
|
||||
demp.high_slope_id,
|
||||
demp.rela_id,
|
||||
demp.measure_point_name,
|
||||
demp.measure_point_number,
|
||||
@ -41,8 +41,8 @@
|
||||
des.rate_alarm_value,
|
||||
des.fiducial_value,
|
||||
des.control_value
|
||||
from deep_excavation_measure_point demp
|
||||
left join deep_excavation_sensor des on demp.measure_point_number = des.measure_point_number
|
||||
from high_slope_measure_point demp
|
||||
left join high_slope_sensor des on demp.measure_point_number = des.measure_point_number
|
||||
where demp.measure_point_number = #{measurePointNumber}
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@ -3,24 +3,24 @@
|
||||
<mapper namespace="com.zhgd.xmgl.modules.highslope.mapper.HighSlopeMonitorTypeMapper">
|
||||
<select id="selectHighSlopeMonitorList" resultType="com.zhgd.jeecg.common.mybatis.EntityMap">
|
||||
SELECT a.*, IFNULL(b.num, 0) measure_point_num
|
||||
from deep_excavation_monitor_type a
|
||||
from high_slope_monitor_type a
|
||||
LEFT JOIN
|
||||
(SELECT monitor_type_id, COUNT(1) num
|
||||
from deep_excavation_measure_point
|
||||
from high_slope_measure_point
|
||||
GROUP BY monitor_type_id) b
|
||||
ON a.id = b.monitor_type_id
|
||||
where a.project_sn = #{projectSn}
|
||||
and a.deep_excavation_id = #{highSlopeId}
|
||||
and a.high_slope_id = #{highSlopeId}
|
||||
</select>
|
||||
<select id="selectHighSlopeMonitorTypeCountList"
|
||||
resultType="java.util.Map">
|
||||
SELECT demt.monitor_type_name monitorTypeName, IFNULL(b.num, 0) measurePointNum
|
||||
from deep_excavation_monitor_type_rela demtr
|
||||
left join deep_excavation_monitor_type demt on demt.id = demtr.monitor_type_id
|
||||
from high_slope_monitor_type_rela demtr
|
||||
left join high_slope_monitor_type demt on demt.id = demtr.monitor_type_id
|
||||
LEFT JOIN
|
||||
(SELECT rela_id, COUNT(1) num from deep_excavation_measure_point GROUP BY rela_id) b
|
||||
(SELECT rela_id, COUNT(1) num from high_slope_measure_point GROUP BY rela_id) b
|
||||
ON demtr.id = b.rela_id
|
||||
where demtr.deep_excavation_id = #{highSlopeId}
|
||||
where demtr.high_slope_id = #{highSlopeId}
|
||||
</select>
|
||||
<select id="selectMonitorTypeList" resultType="com.zhgd.jeecg.common.mybatis.EntityMap">
|
||||
SELECT demtr.*,
|
||||
@ -31,27 +31,27 @@
|
||||
IFNULL(c.super_control_number, 0) super_control_number,
|
||||
IFNULL(c.rate_alarm_number, 0) rate_alarm_number,
|
||||
(case when alarm_state_type = 0 then 0 else 1 end) alarm_type
|
||||
from deep_excavation_monitor_type_rela demtr
|
||||
inner join deep_excavation_monitor_type demt on demt.id = demtr.monitor_type_id
|
||||
from high_slope_monitor_type_rela demtr
|
||||
inner join high_slope_monitor_type demt on demt.id = demtr.monitor_type_id
|
||||
LEFT JOIN
|
||||
(SELECT rela_id,
|
||||
COUNT(1) num,
|
||||
IFNULL(SUM((case when alarm_state <![CDATA[ <> ]]> 1 then 1 else 0 end)), 0) alarm_state_type
|
||||
from deep_excavation_measure_point
|
||||
from high_slope_measure_point
|
||||
GROUP BY rela_id) b ON demtr.id = b.rela_id
|
||||
LEFT JOIN (SELECT t2.rela_id,
|
||||
IFNULL(SUM((case when decd.alarm_state = 1 then 1 else 0 end)), 0) normal_number,
|
||||
IFNULL(SUM((case when decd.alarm_state = 2 then 1 else 0 end)), 0) super_alarm_number,
|
||||
IFNULL(SUM((case when decd.alarm_state = 3 then 1 else 0 end)), 0) super_control_number,
|
||||
IFNULL(SUM((case when decd.alarm_state = 4 then 1 else 0 end)), 0) rate_alarm_number
|
||||
from deep_excavation_current_data decd
|
||||
INNER JOIN deep_excavation_sensor des
|
||||
from high_slope_current_data decd
|
||||
INNER JOIN high_slope_sensor des
|
||||
ON des.sensor_sn = decd.sensor_sn
|
||||
INNER JOIN deep_excavation_measure_point t2
|
||||
INNER JOIN high_slope_measure_point t2
|
||||
ON des.measure_point_number = t2.measure_point_number
|
||||
<where>
|
||||
<if test="highSlopeId != null and highSlopeId != ''">
|
||||
t2.deep_excavation_id = #{highSlopeId}
|
||||
t2.high_slope_id = #{highSlopeId}
|
||||
</if>
|
||||
</where>
|
||||
AND decd.receive_time >=
|
||||
@ -59,7 +59,7 @@
|
||||
GROUP BY t2.rela_id) c ON demtr.id = c.rela_id
|
||||
<where>
|
||||
<if test="highSlopeId != null and highSlopeId != ''">
|
||||
demtr.deep_excavation_id = #{highSlopeId}
|
||||
demtr.high_slope_id = #{highSlopeId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
@ -69,17 +69,17 @@
|
||||
IFNULL(c.super_alarm_number, 0) superAlarmNumber,
|
||||
# IFNULL(c.super_control_number, 0) superControlNumber,
|
||||
IFNULL(c.rate_alarm_number, 0) rateAlarmNumber
|
||||
from deep_excavation_monitor_type_rela demtr
|
||||
from high_slope_monitor_type_rela demtr
|
||||
LEFT JOIN (SELECT t2.rela_id,
|
||||
IFNULL(SUM((case when t1.alarm_state = 1 then 1 else 0 end)), 0) normal_number,
|
||||
IFNULL(SUM((case when t1.alarm_state = 2 then 1 else 0 end)), 0) super_alarm_number,
|
||||
# IFNULL(SUM((case when t1.alarm_state = 3 then 1 else 0 end)), 0) super_control_number,
|
||||
IFNULL(SUM((case when t1.alarm_state = 4 then 1 else 0 end)), 0) rate_alarm_number
|
||||
from deep_excavation_current_data t1
|
||||
inner join deep_excavation_sensor des on t1.sensor_sn = des.sensor_sn
|
||||
INNER JOIN deep_excavation_measure_point t2
|
||||
from high_slope_current_data t1
|
||||
inner join high_slope_sensor des on t1.sensor_sn = des.sensor_sn
|
||||
INNER JOIN high_slope_measure_point t2
|
||||
ON des.measure_point_number = t2.measure_point_number
|
||||
WHERE t2.deep_excavation_id=#{highSlopeId}
|
||||
WHERE t2.high_slope_id=#{highSlopeId}
|
||||
<if test="searchType == '1'.toString()">
|
||||
AND t1.receive_time >=CONCAT(DATE_FORMAT(DATE_ADD(NOW()
|
||||
,INTERVAL -6 DAY)
|
||||
@ -93,22 +93,22 @@
|
||||
,' 00:00:00')
|
||||
</if>
|
||||
GROUP BY t2.rela_id) c ON demtr.id = c.rela_id
|
||||
inner join deep_excavation_monitor_type demt on demtr.monitor_type_id = demt.id
|
||||
where demtr.deep_excavation_id = #{highSlopeId}
|
||||
inner join high_slope_monitor_type demt on demtr.monitor_type_id = demt.id
|
||||
where demtr.high_slope_id = #{highSlopeId}
|
||||
|
||||
|
||||
<!-- SELECT a.monitor_type_name monitorTypeName,-->
|
||||
<!-- IFNULL(c.warning_num,0) warningNum,-->
|
||||
<!-- IFNULL(c.alarm_num,0) alarmNum,-->
|
||||
<!-- IFNULL(c.control_num,0) controlNum-->
|
||||
<!-- from deep_excavation_monitor_type a-->
|
||||
<!-- from high_slope_monitor_type a-->
|
||||
<!-- LEFT JOIN (SELECT t2.rela_id,-->
|
||||
<!-- IFNULL(SUM((case when t1.alarm_state=1 then 1 else 0 end)),0) warning_num,-->
|
||||
<!-- IFNULL(SUM((case when t1.alarm_state=2 then 1 else 0 end)),0) alarm_num,-->
|
||||
<!-- IFNULL(SUM((case when t1.alarm_state=3 then 1 else 0 end)),0) control_num-->
|
||||
<!-- from deep_excavation_current_data t1 INNER JOIN deep_excavation_measure_point t2 ON-->
|
||||
<!-- from high_slope_current_data t1 INNER JOIN high_slope_measure_point t2 ON-->
|
||||
<!-- t1.measuring_point_sn=t2.measure_point_number-->
|
||||
<!-- WHERE t1.project_sn=#{projectSn} and t2.deep_excavation_id=#{highSlopeId}-->
|
||||
<!-- WHERE t1.project_sn=#{projectSn} and t2.high_slope_id=#{highSlopeId}-->
|
||||
<!-- <if test="searchType == '1'.toString()">-->
|
||||
<!-- AND t1.receive_time >=CONCAT(DATE_FORMAT(DATE_ADD(NOW(),INTERVAL -6 DAY),'%Y-%m-%d'),' 00:00:00')-->
|
||||
<!-- </if>-->
|
||||
@ -116,18 +116,18 @@
|
||||
<!-- AND t1.receive_time >=CONCAT(DATE_FORMAT(DATE_ADD(NOW(),INTERVAL -30 DAY),'%Y-%m-%d'),' 00:00:00')-->
|
||||
<!-- </if>-->
|
||||
<!-- GROUP BY t2.rela_id) c ON a.id=c.monitor_type_id-->
|
||||
<!-- where a.project_sn=#{projectSn} and a.deep_excavation_id=#{highSlopeId}-->
|
||||
<!-- where a.project_sn=#{projectSn} and a.high_slope_id=#{highSlopeId}-->
|
||||
</select>
|
||||
<select id="selectHighSlopeMonitorPage" resultType="com.zhgd.jeecg.common.mybatis.EntityMap">
|
||||
SELECT demtr.*,
|
||||
demt.monitor_type_name monitor_type_name,
|
||||
IFNULL(conutTable.num, 0) measure_point_num
|
||||
FROM deep_excavation_monitor_type_rela demtr
|
||||
LEFT JOIN deep_excavation_monitor_type demt ON demtr.monitor_type_id = demt.id
|
||||
FROM high_slope_monitor_type_rela demtr
|
||||
LEFT JOIN high_slope_monitor_type demt ON demtr.monitor_type_id = demt.id
|
||||
LEFT JOIN(SELECT rela_id, COUNT(1) num
|
||||
FROM deep_excavation_measure_point
|
||||
where deep_excavation_id = #{highSlopeId}
|
||||
FROM high_slope_measure_point
|
||||
where high_slope_id = #{highSlopeId}
|
||||
GROUP BY rela_id) conutTable ON conutTable.rela_id = demtr.id
|
||||
WHERE demtr.deep_excavation_id = #{highSlopeId}
|
||||
WHERE demtr.high_slope_id = #{highSlopeId}
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@ -3,15 +3,15 @@
|
||||
<mapper namespace="com.zhgd.xmgl.modules.highslope.mapper.HighSlopeMonitorTypeRelaMapper">
|
||||
<resultMap id="BaseResultMap" type="com.zhgd.xmgl.modules.highslope.entity.HighSlopeMonitorTypeRela">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table deep_excavation_monitor_type_rela-->
|
||||
<!--@Table high_slope_monitor_type_rela-->
|
||||
<id column="id" jdbcType="BIGINT" property="id"/>
|
||||
<result column="update_date" jdbcType="VARCHAR" property="updateDate"/>
|
||||
<result column="create_date" jdbcType="VARCHAR" property="createDate"/>
|
||||
<result column="monitor_type_id" jdbcType="BIGINT" property="monitorTypeId"/>
|
||||
<result column="deep_excavation_id" jdbcType="BIGINT" property="highSlopeId"/>
|
||||
<result column="high_slope_id" jdbcType="BIGINT" property="highSlopeId"/>
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
id, update_date, create_date, monitor_type_id, deep_excavation_id
|
||||
id, update_date, create_date, monitor_type_id, high_slope_id
|
||||
</sql>
|
||||
</mapper>
|
||||
|
||||
@ -8,10 +8,10 @@
|
||||
b.measure_point_number,
|
||||
b.alarm_state,
|
||||
demt.monitor_type_name
|
||||
from deep_excavation_plane_figure_coordinate a
|
||||
INNER JOIN deep_excavation_measure_point b ON a.point_id = b.id
|
||||
inner join deep_excavation_monitor_type_rela demtr on demtr.id = b.rela_id
|
||||
inner join deep_excavation_monitor_type demt on demtr.monitor_type_id = demt.id
|
||||
from high_slope_plane_figure_coordinate a
|
||||
INNER JOIN high_slope_measure_point b ON a.point_id = b.id
|
||||
inner join high_slope_monitor_type_rela demtr on demtr.id = b.rela_id
|
||||
inner join high_slope_monitor_type demt on demtr.monitor_type_id = demt.id
|
||||
WHERE a.plane_figure_id = #{planeFigureId}
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@ -3,10 +3,10 @@
|
||||
<mapper namespace="com.zhgd.xmgl.modules.highslope.mapper.HighSlopeSensorMapper">
|
||||
<select id="getListBySensorSnSet" resultType="com.zhgd.xmgl.modules.highslope.entity.HighSlopeSensor">
|
||||
select des.*, dee.project_sn,dest.sensor_type_code
|
||||
from deep_excavation_sensor des
|
||||
left join deep_excavation_measure_point demp on des.measure_point_number = demp.measure_point_number
|
||||
left join deep_excavation_sensor_type dest ON dest.id = des.sensor_type_id
|
||||
left join deep_excavation_engineering dee on dee.id = demp.deep_excavation_id
|
||||
from high_slope_sensor des
|
||||
left join high_slope_measure_point demp on des.measure_point_number = demp.measure_point_number
|
||||
left join high_slope_sensor_type dest ON dest.id = des.sensor_type_id
|
||||
left join high_slope_engineering dee on dee.id = demp.high_slope_id
|
||||
where 1 = 1
|
||||
<if test="collection != null and collection.size() != 0">
|
||||
and des.sensor_sn in
|
||||
@ -32,8 +32,8 @@
|
||||
des.control_value,
|
||||
dest.unit,
|
||||
dest.sensor_type_name
|
||||
FROM deep_excavation_sensor des
|
||||
left join deep_excavation_sensor_type dest on dest.id = des.sensor_type_id
|
||||
FROM high_slope_sensor des
|
||||
left join high_slope_sensor_type dest on dest.id = des.sensor_type_id
|
||||
WHERE measure_point_number IN
|
||||
<foreach collection="list" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
@ -42,10 +42,10 @@
|
||||
<select id="getListBySensorSnList"
|
||||
resultType="com.zhgd.xmgl.modules.highslope.entity.HighSlopeSensor">
|
||||
select des.*, dee.project_sn
|
||||
from deep_excavation_sensor des
|
||||
left join deep_excavation_measure_point demp
|
||||
from high_slope_sensor des
|
||||
left join high_slope_measure_point demp
|
||||
on des.measure_point_number = demp.measure_point_number
|
||||
left join deep_excavation_engineering dee on demp.deep_excavation_id = dee.id
|
||||
left join high_slope_engineering dee on demp.high_slope_id = dee.id
|
||||
where 1 = 1
|
||||
<if test="list != null and list.size() != 0">
|
||||
and des.sensor_sn in
|
||||
@ -58,8 +58,8 @@
|
||||
<select id="getUnitAndAlarmValueBySnAndPointNumber"
|
||||
resultType="com.zhgd.xmgl.modules.highslope.entity.HighSlopeSensor">
|
||||
select dest.unit, des.alarm_value, des.fiducial_value
|
||||
from deep_excavation_sensor_type dest
|
||||
inner join deep_excavation_sensor des on dest.id = des.sensor_type_id
|
||||
from high_slope_sensor_type dest
|
||||
inner join high_slope_sensor des on dest.id = des.sensor_type_id
|
||||
where des.sensor_sn = #{sensorSn}
|
||||
and des.measure_point_number = #{measurePointNumber}
|
||||
</select>
|
||||
|
||||
@ -11,7 +11,7 @@ import com.zhgd.xmgl.modules.highslope.entity.HighSlopeMonitorTypeRela;
|
||||
*/
|
||||
public interface HighSlopeMonitorTypeRelaService extends IService<HighSlopeMonitorTypeRela> {
|
||||
/**
|
||||
* 根据基坑id删除监测内容
|
||||
* 根据高边坡id删除监测内容
|
||||
*
|
||||
* @param id
|
||||
*/
|
||||
|
||||
@ -124,7 +124,7 @@ public class HighSlopeCurrentDataServiceImpl extends ServiceImpl<HighSlopeCurren
|
||||
}
|
||||
String[] heads = {"测点名称", "传感器名称", "传感器编号", "传感器类型", "初始值", "采集时间", "上次值", "本次值", "本次变化量", "累计值", "累计值预警值", "变化速率", "变化速率预警值", "报警状态"};
|
||||
String[] headsStr = {"measurePointName", "sensorName", "sensorSn", "sensorTypeName", "fiducialValue", "receiveTime", "lastTimeData", "data", "dataThis", "dataTotal", "alarmValue", "dataRate", "rateAlarmValue", "alarmStateStr"};
|
||||
JxlExcelUtils.excelExport("基坑实时数据列表", heads, headsStr, list, response);
|
||||
JxlExcelUtils.excelExport("高边坡实时数据列表", heads, headsStr, list, response);
|
||||
} catch (Exception e) {
|
||||
log.error("导出培训记录数据异常" + e);
|
||||
}
|
||||
@ -138,9 +138,9 @@ public class HighSlopeCurrentDataServiceImpl extends ServiceImpl<HighSlopeCurren
|
||||
currentData.setLastTimeData(NumberUtil.sub(Optional.ofNullable(currentData.getData()).orElse(0f), Optional.ofNullable(currentData.getDataThis()).orElse(0f)).floatValue());
|
||||
currentData.setAlarmStateStr(DataStatusEnum.getStatusNameById(currentData.getAlarmState()));
|
||||
}
|
||||
String[] heads = {"基坑名称", "测点名称", "传感器类型", "传感器名称", "传感器编号", "初始值", "采集时间", "上次值", "本次值", "本次变化量", "累计值", "累计值预警值", "变化速率", "变化速率预警值", "报警状态"};
|
||||
String[] heads = {"高边坡名称", "测点名称", "传感器类型", "传感器名称", "传感器编号", "初始值", "采集时间", "上次值", "本次值", "本次变化量", "累计值", "累计值预警值", "变化速率", "变化速率预警值", "报警状态"};
|
||||
String[] headsStr = {"engineeringName", "measurePointName", "sensorTypeName", "sensorName", "sensorSn", "fiducialValue", "receiveTime", "lastTimeData", "data", "dataThis", "dataTotal", "alarmValue", "dataRate", "rateAlarmValue", "alarmStateStr"};
|
||||
JxlExcelUtils.excelExport("基坑实时数据列表", heads, headsStr, list, response);
|
||||
JxlExcelUtils.excelExport("高边坡实时数据列表", heads, headsStr, list, response);
|
||||
} catch (Exception e) {
|
||||
log.error("导出培训记录数据异常" + e);
|
||||
}
|
||||
@ -309,7 +309,7 @@ public class HighSlopeCurrentDataServiceImpl extends ServiceImpl<HighSlopeCurren
|
||||
highSlopeCurrentDataList.add(new HighSlopeCurrentData(highSlopeCurrentData));
|
||||
|
||||
if (alarmState != DataStatusEnum.NORMAL.getId()) {
|
||||
log.info("基坑数据异常,进行通知,通知传感器编号为:{},数据为:{}", sensorSn, highSlopeCurrentData);
|
||||
log.info("高边坡数据异常,进行通知,通知传感器编号为:{},数据为:{}", sensorSn, highSlopeCurrentData);
|
||||
//asyncHighSlope.sendExceptionData(alarmState, sensor);todo
|
||||
}
|
||||
if (!Objects.equals(sensor.getStatus(), alarmState)) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user