bug修复

This commit is contained in:
guo 2024-02-18 17:48:33 +08:00
parent 2e5ebd29b1
commit d3ca213c24
6 changed files with 36 additions and 29 deletions

View File

@ -54,7 +54,7 @@ public class HighFormworkMeasureCurrentDataController {
@ApiImplicitParam(name = "pageSize", value = "每页显示条数", paramType = "body", required = true, dataType = "Integer"), @ApiImplicitParam(name = "pageSize", value = "每页显示条数", paramType = "body", required = true, dataType = "Integer"),
}) })
@PostMapping(value = "/list") @PostMapping(value = "/list")
public Result<IPage<EntityMap>> queryPageList(@RequestBody Map<String, Object> map) { public Result<IPage<HighFormworkMeasureCurrentData>> queryPageList(@RequestBody Map<String, Object> map) {
return Result.success(highFormworkMeasureCurrentDataService.selectMeasureCurrentDataPage(map)); return Result.success(highFormworkMeasureCurrentDataService.selectMeasureCurrentDataPage(map));
} }

View File

@ -1,6 +1,7 @@
package com.zhgd.xmgl.modules.highformwork.entity; package com.zhgd.xmgl.modules.highformwork.entity;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
@ -84,4 +85,7 @@ public class HighFormworkMeasureCurrentData implements Serializable {
@ApiModelProperty(value = "报警状态1正常2预警3报警4离线") @ApiModelProperty(value = "报警状态1正常2预警3报警4离线")
private java.lang.Integer alarmState; private java.lang.Integer alarmState;
@TableField(exist = false)
@ApiModelProperty(value = "测量点名称")
private java.lang.String measurePointName;
} }

View File

@ -22,7 +22,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@Mapper @Mapper
public interface HighFormworkMeasureCurrentDataMapper extends BaseMapper<HighFormworkMeasureCurrentData> { public interface HighFormworkMeasureCurrentDataMapper extends BaseMapper<HighFormworkMeasureCurrentData> {
List<EntityMap> selectMeasureCurrentDataPage(Page<EntityMap> page, @Param("param") Map<String, Object> map); 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);

View File

@ -1,37 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zhgd.xmgl.modules.highformwork.mapper.HighFormworkMeasureCurrentDataMapper"> <mapper namespace="com.zhgd.xmgl.modules.highformwork.mapper.HighFormworkMeasureCurrentDataMapper">
<select id="selectMeasureCurrentDataPage" resultType="com.zhgd.jeecg.common.mybatis.EntityMap"> <select id="selectMeasureCurrentDataPage"
select id, resultType="com.zhgd.xmgl.modules.highformwork.entity.HighFormworkMeasureCurrentData">
measure_point_number, select hfmcd.id,
project_sn, hfmcd.measure_point_number,
DATE_FORMAT(collect_time, '%Y-%m-%d %H:%i:%s') as collect_time, hfmcd.project_sn,
electric_power, DATE_FORMAT(hfmcd.collect_time, '%Y-%m-%d %H:%i:%s') as collect_time,
angle_x_axis, hfmcd.electric_power,
angle_y_axis, hfmcd.angle_x_axis,
pressure, hfmcd.angle_y_axis,
subside, hfmcd.pressure,
alarm_state, hfmcd.subside,
pole_axial_force, hfmcd.alarm_state,
horizontal_displacement, hfmcd.pole_axial_force,
formwork_settlement, hfmcd.horizontal_displacement,
pole_tilt, hfmcd.formwork_settlement,
foundation_settlement hfmcd.pole_tilt,
from high_formwork_measure_current_data hfmcd.foundation_settlement,
where project_sn = #{param.projectSn} 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
where hfmcd.project_sn = #{param.projectSn}
<if test="param.startTime != null and param.startTime != ''"> <if test="param.startTime != null and param.startTime != ''">
AND collect_time >= CONCAT(DATE_FORMAT(#{param.startTime}, "%Y-%m-%d"), ' 00:00:00') AND hfmcd.collect_time >= CONCAT(DATE_FORMAT(#{param.startTime}, "%Y-%m-%d"), ' 00:00:00')
</if> </if>
<if test="param.endTime != null and param.endTime != ''"> <if test="param.endTime != null and param.endTime != ''">
and collect_time &lt;= CONCAT(DATE_FORMAT(#{param.endTime}, "%Y-%m-%d"), ' 23:59:59') and hfmcd.collect_time &lt;= CONCAT(DATE_FORMAT(#{param.endTime}, "%Y-%m-%d"), ' 23:59:59')
</if> </if>
<if test="param.measurePointNumber != null and param.measurePointNumber != ''"> <if test="param.measurePointNumber != null and param.measurePointNumber != ''">
and measure_point_number like CONCAT(CONCAT('%', #{param.measurePointNumber}), '%') and hfmcd.measure_point_number like CONCAT(CONCAT('%', #{param.measurePointNumber}), '%')
</if> </if>
<if test="param.alarmState != null and param.alarmState != ''"> <if test="param.alarmState != null and param.alarmState != ''">
and alarm_state = #{param.alarmState} and hfmcd.alarm_state = #{param.alarmState}
</if> </if>
order by collect_time desc order by hfmcd.collect_time desc
</select> </select>
<select id="selectNewestHighFormworkMeasureCurrentData" <select id="selectNewestHighFormworkMeasureCurrentData"
resultType="com.zhgd.xmgl.modules.highformwork.entity.HighFormworkMeasureCurrentData"> resultType="com.zhgd.xmgl.modules.highformwork.entity.HighFormworkMeasureCurrentData">

View File

@ -18,7 +18,7 @@ import java.util.Map;
*/ */
public interface IHighFormworkMeasureCurrentDataService extends IService<HighFormworkMeasureCurrentData> { public interface IHighFormworkMeasureCurrentDataService extends IService<HighFormworkMeasureCurrentData> {
IPage<EntityMap> selectMeasureCurrentDataPage(Map<String, Object> map); IPage<HighFormworkMeasureCurrentData> selectMeasureCurrentDataPage(Map<String, Object> map);
void saveHighFormworkMeasureCurrentData(HighFormworkMeasureCurrentData highFormworkMeasureCurrentData); void saveHighFormworkMeasureCurrentData(HighFormworkMeasureCurrentData highFormworkMeasureCurrentData);

View File

@ -42,11 +42,11 @@ public class HighFormworkMeasureCurrentDataServiceImpl extends ServiceImpl<HighF
private HighFormworkMeasurePointThresholdMapper highFormworkMeasurePointThresholdMapper; private HighFormworkMeasurePointThresholdMapper highFormworkMeasurePointThresholdMapper;
@Override @Override
public IPage<EntityMap> selectMeasureCurrentDataPage(Map<String, Object> map) { public IPage<HighFormworkMeasureCurrentData> selectMeasureCurrentDataPage(Map<String, Object> map) {
int pageNo = Integer.parseInt(map.getOrDefault("pageNo", 1).toString()); int pageNo = Integer.parseInt(map.getOrDefault("pageNo", 1).toString());
int pageSize = Integer.parseInt(map.getOrDefault("pageSize", 10).toString()); int pageSize = Integer.parseInt(map.getOrDefault("pageSize", 10).toString());
Page<EntityMap> page = new Page<>(pageNo, pageSize); Page<HighFormworkMeasureCurrentData> page = new Page<>(pageNo, pageSize);
List<EntityMap> list = highFormworkMeasureCurrentDataMapper.selectMeasureCurrentDataPage(page, map); List<HighFormworkMeasureCurrentData> list = highFormworkMeasureCurrentDataMapper.selectMeasureCurrentDataPage(page, map);
return page.setRecords(list); return page.setRecords(list);
} }