高支模测量bug修改
This commit is contained in:
parent
822c1dbeb6
commit
c05ab50c5e
@ -118,7 +118,6 @@ public class HighFormworkMeasureCurrentDataController {
|
||||
*/
|
||||
@ApiOperation(value = "大屏高支模分页列表查询", notes = "大屏高支模分页列表查询", httpMethod = "POST")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "measurePointNumber", value = "监测点编号", paramType = "body", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "startTime", value = "开始时间,格式2021-05-08", paramType = "body", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "endTime", value = "结束时间,格式2021-05-08", paramType = "body", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "alarmState", value = "报警状态,1正常,2预警,3报警", paramType = "body", required = false, dataType = "String"),
|
||||
|
||||
@ -6,7 +6,6 @@ import java.util.Map;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.zhgd.jeecg.common.mybatis.EntityMap;
|
||||
import com.zhgd.xmgl.modules.highformwork.entity.vo.BigScreenHighFormworkVo;
|
||||
import com.zhgd.xmgl.modules.highformwork.entity.vo.DataPerHourForTheLastDayVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
@ -26,7 +25,7 @@ public interface HighFormworkMeasureCurrentDataMapper extends BaseMapper<HighFor
|
||||
List<HighFormworkMeasureCurrentData> selectMeasureCurrentDataPage(Page<HighFormworkMeasureCurrentData> page, @Param("param") Map<String, Object> map);
|
||||
|
||||
|
||||
HighFormworkMeasureCurrentData selectNewestHighFormworkMeasureCurrentData(@Param("measurePointNumber") String measurePointNumber, @Param("projectSn") String projectSn);
|
||||
HighFormworkMeasureCurrentData selectNewestHighFormworkMeasureCurrentData(@Param("measurePointNumber") String measurePointNumber, @Param("projectSn") String projectSn, @Param("acquisitionInstrumentNumber") String acquisitionInstrumentNumber);
|
||||
|
||||
IPage<BigScreenHighFormworkVo> queryBigScreenPageList(Page<BigScreenHighFormworkVo> p, @Param("q") Map<String, Object> map);
|
||||
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
resultType="com.zhgd.xmgl.modules.highformwork.entity.HighFormworkMeasureCurrentData">
|
||||
select hfmcd.id,
|
||||
hfmcd.measure_point_number,
|
||||
hfmcd.acquisition_instrument_number,
|
||||
hfmcd.project_sn,
|
||||
DATE_FORMAT(hfmcd.collect_time, '%Y-%m-%d %H:%i:%s') as collect_time,
|
||||
hfmcd.electric_power,
|
||||
@ -20,7 +21,8 @@
|
||||
hfmcd.foundation_settlement,
|
||||
hfmp.measure_point_name
|
||||
from high_formwork_measure_current_data hfmcd
|
||||
join high_formwork_measure_point hfmp on hfmcd.measure_point_number = hfmp.measure_point_number
|
||||
join high_formwork_measure_point hfmp on hfmcd.measure_point_number = hfmp.measure_point_number and
|
||||
hfmcd.acquisition_instrument_number = hfmp.acquisition_instrument_number
|
||||
where hfmcd.project_sn = #{param.projectSn}
|
||||
<if test="param.startTime != null and param.startTime != ''">
|
||||
AND hfmcd.collect_time >= CONCAT(DATE_FORMAT(#{param.startTime}, "%Y-%m-%d"), ' 00:00:00')
|
||||
@ -31,6 +33,9 @@
|
||||
<if test="param.measurePointNumber != null and param.measurePointNumber != ''">
|
||||
and hfmcd.measure_point_number like CONCAT(CONCAT('%', #{param.measurePointNumber}), '%')
|
||||
</if>
|
||||
<if test="param.acquisitionInstrumentNumber != null and param.acquisitionInstrumentNumber != ''">
|
||||
and hfmcd.acquisition_instrument_number like CONCAT(CONCAT('%', #{param.acquisitionInstrumentNumber}), '%')
|
||||
</if>
|
||||
<if test="param.alarmState != null and param.alarmState != ''">
|
||||
and hfmcd.alarm_state = #{param.alarmState}
|
||||
</if>
|
||||
@ -42,6 +47,7 @@
|
||||
from high_formwork_measure_current_data
|
||||
where project_sn = #{projectSn}
|
||||
and measure_point_number = #{measurePointNumber}
|
||||
and acquisition_instrument_number = #{acquisitionInstrumentNumber}
|
||||
order by collect_time desc
|
||||
LIMIT 1
|
||||
</select>
|
||||
@ -51,7 +57,8 @@
|
||||
mp.measure_point_name,
|
||||
mp.measure_point_number
|
||||
FROM high_formwork_measure_current_data cd
|
||||
INNER JOIN high_formwork_measure_point mp ON mp.measure_point_number = cd.measure_point_number
|
||||
INNER JOIN high_formwork_measure_point mp ON mp.measure_point_number = cd.measure_point_number and
|
||||
mp.acquisition_instrument_number = cd.acquisition_instrument_number
|
||||
WHERE cd.project_sn = #{q.projectSn}
|
||||
order by cd.id DESC
|
||||
</select>
|
||||
@ -69,7 +76,8 @@
|
||||
ifnull(avg(cd.pole_tilt),0) as pole_tilt,
|
||||
ifnull(avg(cd.foundation_settlement),0) as foundation_settlement
|
||||
from high_formwork_measure_current_data cd
|
||||
INNER JOIN high_formwork_measure_point mp ON mp.measure_point_number = cd.measure_point_number
|
||||
INNER JOIN high_formwork_measure_point mp ON mp.measure_point_number = cd.measure_point_number and
|
||||
cd.acquisition_instrument_number = mp.acquisition_instrument_number
|
||||
where cd.project_sn = #{projectSn}
|
||||
and cd.measure_point_number = #{measurePointNumber}
|
||||
and mp.acquisition_instrument_number = #{acquisitionInstrumentNumber}
|
||||
|
||||
@ -3,7 +3,8 @@
|
||||
<mapper namespace="com.zhgd.xmgl.modules.highformwork.mapper.HighFormworkPlaneFigureCoordinateMapper">
|
||||
|
||||
<select id="selectPlaneFigureCoordinateList" resultType="com.zhgd.jeecg.common.mybatis.EntityMap">
|
||||
SELECT a.*,b.measure_point_name,b.measure_point_number,b.project_sn,b.alarm_state
|
||||
SELECT
|
||||
a.*,b.measure_point_name,b.measure_point_number,b.project_sn,b.alarm_state,b.acquisition_instrument_number
|
||||
from high_formwork_plane_figure_coordinate a INNER JOIN high_formwork_measure_point b ON a.measure_point_id=b.id
|
||||
WHERE a.plane_figure_id=#{planeFigureId}
|
||||
</select>
|
||||
@ -14,4 +15,4 @@
|
||||
where a.project_sn=#{projectSn} and b.id is null
|
||||
|
||||
</select>
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
||||
@ -19,7 +19,7 @@ import java.util.Map;
|
||||
/**
|
||||
* @Description: 高支模-平面图设备坐标
|
||||
* @author: pds
|
||||
* @date: 2021-11-19
|
||||
* @date: 2021-11-19
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Service
|
||||
@ -32,22 +32,22 @@ public class HighFormworkPlaneFigureCoordinateServiceImpl extends ServiceImpl<Hi
|
||||
|
||||
@Override
|
||||
public void editHighFormworkPlaneFigureCoordinate(HighFormworkPlaneFigureCoordinate highFormworkPlaneFigureCoordinate) {
|
||||
QueryWrapper<HighFormworkPlaneFigureCoordinate> queryWrapper=new QueryWrapper<>();
|
||||
queryWrapper.lambda().eq(HighFormworkPlaneFigureCoordinate::getPlaneFigureId,highFormworkPlaneFigureCoordinate.getPlaneFigureId())
|
||||
.eq(HighFormworkPlaneFigureCoordinate::getMeasurePointId,highFormworkPlaneFigureCoordinate.getMeasurePointId());
|
||||
HighFormworkPlaneFigureCoordinate oldHighFormworkPlaneFigureCoordinate=highFormworkPlaneFigureCoordinateMapper.selectOne(queryWrapper);
|
||||
if(oldHighFormworkPlaneFigureCoordinate!=null){
|
||||
QueryWrapper<HighFormworkPlaneFigureCoordinate> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.lambda().eq(HighFormworkPlaneFigureCoordinate::getPlaneFigureId, highFormworkPlaneFigureCoordinate.getPlaneFigureId())
|
||||
.eq(HighFormworkPlaneFigureCoordinate::getMeasurePointId, highFormworkPlaneFigureCoordinate.getMeasurePointId());
|
||||
HighFormworkPlaneFigureCoordinate oldHighFormworkPlaneFigureCoordinate = highFormworkPlaneFigureCoordinateMapper.selectOne(queryWrapper);
|
||||
if (oldHighFormworkPlaneFigureCoordinate != null) {
|
||||
highFormworkPlaneFigureCoordinate.setId(oldHighFormworkPlaneFigureCoordinate.getId());
|
||||
highFormworkPlaneFigureCoordinateMapper.updateById(highFormworkPlaneFigureCoordinate);
|
||||
}else{
|
||||
} else {
|
||||
highFormworkPlaneFigureCoordinateMapper.insert(highFormworkPlaneFigureCoordinate);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateFigureCoordinate(List<HighFormworkPlaneFigureCoordinate> list) {
|
||||
if(list!=null&&list.size()>0){
|
||||
for (HighFormworkPlaneFigureCoordinate figureCoordinate:list){
|
||||
if (list != null && list.size() > 0) {
|
||||
for (HighFormworkPlaneFigureCoordinate figureCoordinate : list) {
|
||||
highFormworkPlaneFigureCoordinateMapper.updateById(figureCoordinate);
|
||||
}
|
||||
}
|
||||
@ -55,19 +55,19 @@ public class HighFormworkPlaneFigureCoordinateServiceImpl extends ServiceImpl<Hi
|
||||
|
||||
@Override
|
||||
public void deleteHighFormworkPlaneFigureCoordinate(Map<String, Object> map) {
|
||||
QueryWrapper<HighFormworkPlaneFigureCoordinate> queryWrapper=new QueryWrapper<>();
|
||||
queryWrapper.lambda().eq(HighFormworkPlaneFigureCoordinate::getPlaneFigureId, MapUtils.getString(map,"planeFigureId"))
|
||||
.eq(HighFormworkPlaneFigureCoordinate::getMeasurePointId,MapUtils.getString(map,"measurePointId"));
|
||||
QueryWrapper<HighFormworkPlaneFigureCoordinate> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.lambda().eq(HighFormworkPlaneFigureCoordinate::getPlaneFigureId, MapUtils.getString(map, "planeFigureId"))
|
||||
.eq(HighFormworkPlaneFigureCoordinate::getMeasurePointId, MapUtils.getString(map, "measurePointId"));
|
||||
highFormworkPlaneFigureCoordinateMapper.delete(queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<EntityMap> selectPlaneFigureCoordinateList(Map<String, Object> map) {
|
||||
List<EntityMap> list=highFormworkPlaneFigureCoordinateMapper.selectPlaneFigureCoordinateList(map);
|
||||
if(list.size()>0){
|
||||
for (EntityMap data:list){
|
||||
HighFormworkMeasureCurrentData currentData=highFormworkMeasureCurrentDataMapper.selectNewestHighFormworkMeasureCurrentData(MapUtils.getString(data,"measurePointNumber"),MapUtils.getString(data,"projectSn"));
|
||||
data.put("currentData",currentData);
|
||||
List<EntityMap> list = highFormworkPlaneFigureCoordinateMapper.selectPlaneFigureCoordinateList(map);
|
||||
if (list.size() > 0) {
|
||||
for (EntityMap data : list) {
|
||||
HighFormworkMeasureCurrentData currentData = highFormworkMeasureCurrentDataMapper.selectNewestHighFormworkMeasureCurrentData(MapUtils.getString(data, "measurePointNumber"), MapUtils.getString(data, "projectSn"), MapUtils.getString(data, "acquisitionInstrumentNumber"));
|
||||
data.put("currentData", currentData);
|
||||
}
|
||||
}
|
||||
return list;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user