查询楼层质量回弹测量结果

This commit is contained in:
guo 2024-03-16 11:08:18 +08:00
parent 80dd32b079
commit 3d6b80dab8
7 changed files with 409 additions and 302 deletions

View File

@ -20,6 +20,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -242,4 +243,14 @@ public class MassReboundSurveyAreaController {
public Result<List<EntityMap>> selectProjectWarnList(@RequestBody Map<String, Object> map) { public Result<List<EntityMap>> selectProjectWarnList(@RequestBody Map<String, Object> map) {
return Result.success(massReboundSurveyAreaService.selectProjectWarnList(map)); return Result.success(massReboundSurveyAreaService.selectProjectWarnList(map));
} }
@ApiOperation(value = "查询楼层质量回弹测量结果", notes = "查询楼层质量回弹测量结果", httpMethod = "GET")
@ApiImplicitParams({
@ApiImplicitParam(name = "floorId", value = "楼层ID", paramType = "query", required = false, dataType = "Integer"),
@ApiImplicitParam(name = "projectSn", value = "项目sn", paramType = "query", required = false, dataType = "String")
})
@GetMapping(value = "/getMassReboundSurveyArea")
public Result<List<MassReboundSurveyArea>> getMassReboundSurveyArea(String floorId, String projectSn) {
return Result.success(massReboundSurveyAreaService.getMassReboundSurveyArea(floorId, projectSn));
}
} }

View File

@ -1,17 +1,16 @@
package com.zhgd.xmgl.modules.massrebound.entity; package com.zhgd.xmgl.modules.massrebound.entity;
import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField; 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.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.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.jeecgframework.poi.excel.annotation.Excel;
import java.io.Serializable;
/** /**
* @Description: 质量回弹-测区强度 * @Description: 质量回弹-测区强度
* @author pds * @author pds
@ -20,173 +19,253 @@ import io.swagger.annotations.ApiModelProperty;
*/ */
@Data @Data
@TableName("mass_rebound_survey_area") @TableName("mass_rebound_survey_area")
@ApiModel(value="MassReboundSurveyArea实体类",description="MassReboundSurveyArea") @ApiModel(value = "MassReboundSurveyArea实体类", description = "MassReboundSurveyArea")
public class MassReboundSurveyArea implements Serializable { public class MassReboundSurveyArea implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/**id*/ /**
* id
*/
@TableId(type = IdType.ASSIGN_ID) @TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value="id") @ApiModelProperty(value = "id")
private java.lang.Long id ; private java.lang.Long id;
/**坐标X*/ /**
* 坐标X
*/
@Excel(name = "坐标X", width = 15) @Excel(name = "坐标X", width = 15)
@ApiModelProperty(value="坐标X") @ApiModelProperty(value = "坐标X")
private java.lang.String coordinateX ; private java.lang.String coordinateX;
/**坐标Y*/ /**
* 坐标Y
*/
@Excel(name = "坐标Y", width = 15) @Excel(name = "坐标Y", width = 15)
@ApiModelProperty(value="坐标Y") @ApiModelProperty(value = "坐标Y")
private java.lang.String coordinateY ; private java.lang.String coordinateY;
/**楼层ID*/ /**
* 楼层ID
*/
@Excel(name = "楼层ID", width = 15) @Excel(name = "楼层ID", width = 15)
@ApiModelProperty(value="楼层ID") @ApiModelProperty(value = "楼层ID")
private java.lang.Long floorId ; private java.lang.Long floorId;
/**创建时间*/ /**
* 创建时间
*/
@Excel(name = "创建时间", width = 15) @Excel(name = "创建时间", width = 15)
@ApiModelProperty(value="创建时间") @ApiModelProperty(value = "创建时间")
private java.lang.String createTime ; private java.lang.String createTime;
/**项目SN*/ /**
* 项目SN
*/
@Excel(name = "项目SN", width = 15) @Excel(name = "项目SN", width = 15)
@ApiModelProperty(value="项目SN") @ApiModelProperty(value = "项目SN")
private java.lang.String projectSn ; private java.lang.String projectSn;
/**项目sn*/ /**
* 项目sn
*/
@Excel(name = "设计强度", width = 15) @Excel(name = "设计强度", width = 15)
@ApiModelProperty(value="设计强度") @ApiModelProperty(value = "设计强度")
private java.lang.String designStrength ; private java.lang.String designStrength;
@Excel(name = "测量设备类型1普通设备2高强设备", width = 15) @Excel(name = "测量设备类型1普通设备2高强设备", width = 15)
@ApiModelProperty(value="测量设备类型1普通设备2高强设备") @ApiModelProperty(value = "测量设备类型1普通设备2高强设备")
private java.lang.Integer measureDevType ; private java.lang.Integer measureDevType;
/**项目SN*/ /**
* 项目SN
*/
@Excel(name = "1 测区混凝土强度换算2泵送混凝土测区强度3动能4.5J回弹仪测区强度换算", width = 15) @Excel(name = "1 测区混凝土强度换算2泵送混凝土测区强度3动能4.5J回弹仪测区强度换算", width = 15)
@ApiModelProperty(value="1 测区混凝土强度换算2泵送混凝土测区强度3动能4.5J回弹仪测区强度换算") @ApiModelProperty(value = "1 测区混凝土强度换算2泵送混凝土测区强度3动能4.5J回弹仪测区强度换算")
private java.lang.Integer surveyType ; private java.lang.Integer surveyType;
/**测区回弹值1*/ /**
* 测区回弹值1
*/
@Excel(name = "测区回弹值1", width = 15) @Excel(name = "测区回弹值1", width = 15)
@ApiModelProperty(value="测区回弹值1") @ApiModelProperty(value = "测区回弹值1")
private java.lang.Double reboundValue1 ; private java.lang.Double reboundValue1;
/**测区回弹值2*/ /**
* 测区回弹值2
*/
@Excel(name = "测区回弹值2", width = 15) @Excel(name = "测区回弹值2", width = 15)
@ApiModelProperty(value="测区回弹值2") @ApiModelProperty(value = "测区回弹值2")
private java.lang.Double reboundValue2 ; private java.lang.Double reboundValue2;
/**测区回弹值3*/ /**
* 测区回弹值3
*/
@Excel(name = "测区回弹值3", width = 15) @Excel(name = "测区回弹值3", width = 15)
@ApiModelProperty(value="测区回弹值3") @ApiModelProperty(value = "测区回弹值3")
private java.lang.Double reboundValue3 ; private java.lang.Double reboundValue3;
/**测区回弹值4*/ /**
* 测区回弹值4
*/
@Excel(name = "测区回弹值4", width = 15) @Excel(name = "测区回弹值4", width = 15)
@ApiModelProperty(value="测区回弹值4") @ApiModelProperty(value = "测区回弹值4")
private java.lang.Double reboundValue4 ; private java.lang.Double reboundValue4;
/**测区回弹值5*/ /**
* 测区回弹值5
*/
@Excel(name = "测区回弹值5", width = 15) @Excel(name = "测区回弹值5", width = 15)
@ApiModelProperty(value="测区回弹值5") @ApiModelProperty(value = "测区回弹值5")
private java.lang.Double reboundValue5 ; private java.lang.Double reboundValue5;
/**测区回弹值6*/ /**
* 测区回弹值6
*/
@Excel(name = "测区回弹值6", width = 15) @Excel(name = "测区回弹值6", width = 15)
@ApiModelProperty(value="测区回弹值6") @ApiModelProperty(value = "测区回弹值6")
private java.lang.Double reboundValue6 ; private java.lang.Double reboundValue6;
/**测区回弹值7*/ /**
* 测区回弹值7
*/
@Excel(name = "测区回弹值7", width = 15) @Excel(name = "测区回弹值7", width = 15)
@ApiModelProperty(value="测区回弹值7") @ApiModelProperty(value = "测区回弹值7")
private java.lang.Double reboundValue7 ; private java.lang.Double reboundValue7;
/**测区回弹值8*/ /**
* 测区回弹值8
*/
@Excel(name = "测区回弹值8", width = 15) @Excel(name = "测区回弹值8", width = 15)
@ApiModelProperty(value="测区回弹值8") @ApiModelProperty(value = "测区回弹值8")
private java.lang.Double reboundValue8 ; private java.lang.Double reboundValue8;
/**测区回弹值9*/ /**
* 测区回弹值9
*/
@Excel(name = "测区回弹值9", width = 15) @Excel(name = "测区回弹值9", width = 15)
@ApiModelProperty(value="测区回弹值9") @ApiModelProperty(value = "测区回弹值9")
private java.lang.Double reboundValue9 ; private java.lang.Double reboundValue9;
/**测区回弹值10*/ /**
* 测区回弹值10
*/
@Excel(name = "测区回弹值10", width = 15) @Excel(name = "测区回弹值10", width = 15)
@ApiModelProperty(value="测区回弹值10") @ApiModelProperty(value = "测区回弹值10")
private java.lang.Double reboundValue10 ; private java.lang.Double reboundValue10;
/**测区回弹值11*/ /**
* 测区回弹值11
*/
@Excel(name = "测区回弹值11", width = 15) @Excel(name = "测区回弹值11", width = 15)
@ApiModelProperty(value="测区回弹值11") @ApiModelProperty(value = "测区回弹值11")
private java.lang.Double reboundValue11 ; private java.lang.Double reboundValue11;
/**测区回弹值12*/ /**
* 测区回弹值12
*/
@Excel(name = "测区回弹值12", width = 15) @Excel(name = "测区回弹值12", width = 15)
@ApiModelProperty(value="测区回弹值12") @ApiModelProperty(value = "测区回弹值12")
private java.lang.Double reboundValue12 ; private java.lang.Double reboundValue12;
/**测区回弹值13*/ /**
* 测区回弹值13
*/
@Excel(name = "测区回弹值13", width = 15) @Excel(name = "测区回弹值13", width = 15)
@ApiModelProperty(value="测区回弹值13") @ApiModelProperty(value = "测区回弹值13")
private java.lang.Double reboundValue13 ; private java.lang.Double reboundValue13;
/**测区回弹值14*/ /**
* 测区回弹值14
*/
@Excel(name = "测区回弹值14", width = 15) @Excel(name = "测区回弹值14", width = 15)
@ApiModelProperty(value="测区回弹值14") @ApiModelProperty(value = "测区回弹值14")
private java.lang.Double reboundValue14 ; private java.lang.Double reboundValue14;
/**测区回弹值15*/ /**
* 测区回弹值15
*/
@Excel(name = "测区回弹值15", width = 15) @Excel(name = "测区回弹值15", width = 15)
@ApiModelProperty(value="测区回弹值15") @ApiModelProperty(value = "测区回弹值15")
private java.lang.Double reboundValue15 ; private java.lang.Double reboundValue15;
/**测区回弹值16*/ /**
* 测区回弹值16
*/
@Excel(name = "测区回弹值16", width = 15) @Excel(name = "测区回弹值16", width = 15)
@ApiModelProperty(value="测区回弹值16") @ApiModelProperty(value = "测区回弹值16")
private java.lang.Double reboundValue16 ; private java.lang.Double reboundValue16;
/**测区回弹值平均值*/ /**
* 测区回弹值平均值
*/
@Excel(name = "测区回弹值平均值", width = 15) @Excel(name = "测区回弹值平均值", width = 15)
@ApiModelProperty(value="测区回弹值平均值") @ApiModelProperty(value = "测区回弹值平均值")
private java.lang.Double reboundAvgValue ; private java.lang.Double reboundAvgValue;
/**碳化深度值1*/ /**
* 碳化深度值1
*/
@Excel(name = "碳化深度值1", width = 15) @Excel(name = "碳化深度值1", width = 15)
@ApiModelProperty(value="碳化深度值1") @ApiModelProperty(value = "碳化深度值1")
private java.lang.Double carbonationDepth1 ; private java.lang.Double carbonationDepth1;
/**碳化深度值2*/ /**
* 碳化深度值2
*/
@Excel(name = "碳化深度值2", width = 15) @Excel(name = "碳化深度值2", width = 15)
@ApiModelProperty(value="碳化深度值2") @ApiModelProperty(value = "碳化深度值2")
private java.lang.Double carbonationDepth2 ; private java.lang.Double carbonationDepth2;
/**碳化深度值3*/ /**
* 碳化深度值3
*/
@Excel(name = "碳化深度值3", width = 15) @Excel(name = "碳化深度值3", width = 15)
@ApiModelProperty(value="碳化深度值3") @ApiModelProperty(value = "碳化深度值3")
private java.lang.Double carbonationDepth3 ; private java.lang.Double carbonationDepth3;
/**碳化深度平均值*/ /**
* 碳化深度平均值
*/
@Excel(name = "碳化深度平均值", width = 15) @Excel(name = "碳化深度平均值", width = 15)
@ApiModelProperty(value="碳化深度平均值") @ApiModelProperty(value = "碳化深度平均值")
private java.lang.Double carbonationDepthAvg ; private java.lang.Double carbonationDepthAvg;
/**角度*/ /**
* 角度
*/
@Excel(name = "角度", width = 15) @Excel(name = "角度", width = 15)
@ApiModelProperty(value="角度") @ApiModelProperty(value = "角度")
private java.lang.Integer angle ; private java.lang.Integer angle;
/**测区强度*/ /**
* 测区强度
*/
@Excel(name = "测区强度", width = 15) @Excel(name = "测区强度", width = 15)
@ApiModelProperty(value="测区强度") @ApiModelProperty(value = "测区强度")
private java.lang.String surveyStrength; private java.lang.String surveyStrength;
/**测量结果是否正常1正常2异常*/ /**
* 测量结果是否正常1正常2异常
*/
@Excel(name = "测量结果是否正常1正常2异常", width = 15) @Excel(name = "测量结果是否正常1正常2异常", width = 15)
@ApiModelProperty(value="测量结果是否正常1正常2异常") @ApiModelProperty(value = "测量结果是否正常1正常2异常")
private java.lang.Integer resultType ; private java.lang.Integer resultType;
@ApiModelProperty(value="测量编号") @ApiModelProperty(value = "测量编号")
private java.lang.Integer surveyNo ; private java.lang.Integer surveyNo;
@TableField(exist = false) @TableField(exist = false)
@ApiModelProperty(value="操作类型0保存1不保存默认保存") @ApiModelProperty(value = "操作类型0保存1不保存默认保存")
private java.lang.Integer opType ; private java.lang.Integer opType;
/**浇筑令ID*/ /**
* 浇筑令ID
*/
@TableField(exist = false) @TableField(exist = false)
@ApiModelProperty(value="浇筑令ID") @ApiModelProperty(value = "浇筑令ID")
private Long pouringId ; private Long pouringId;
@TableField(exist = false) @TableField(exist = false)
@ApiModelProperty(value="构件类型1水平构件2竖向构件") @ApiModelProperty(value = "构件类型1水平构件2竖向构件")
private Integer memberType ; private Integer memberType;
@TableField(exist = false) @TableField(exist = false)
@ApiModelProperty(value="轴线X") @ApiModelProperty(value = "轴线X")
private String axisX ; private String axisX;
/**轴线Y*/ /**
* 轴线Y
*/
@TableField(exist = false) @TableField(exist = false)
@ApiModelProperty(value="轴线Y") @ApiModelProperty(value = "轴线Y")
private String axisY ; private String axisY;
@TableField(exist = false) @TableField(exist = false)
@ApiModelProperty(value="创建人") @ApiModelProperty(value = "创建人")
private java.lang.Long createUser;
@TableField(exist = false)
@ApiModelProperty(value = "楼栋名称")
private String buildName;
@TableField(exist = false)
@ApiModelProperty(value = "实测实量楼层")
private String floorName;
@TableField(exist = false)
private String areaname;
@TableField(exist = false)
private String surveyTypeName;
@TableField(exist = false)
private String resultTypeName;
private java.lang.Long createUser ;
} }

View File

@ -30,7 +30,7 @@ public interface MassReboundSurveyAreaMapper extends BaseMapper<MassReboundSurve
List<EntityMap> selectProjectWarnList(Map<String, Object> map); List<EntityMap> selectProjectWarnList(Map<String, Object> map);
List<EntityMap> selectMassReboundSurveyAreaList(@Param("floorId") String floorId); List<MassReboundSurveyArea> selectMassReboundSurveyAreaList(@Param("floorId") String floorId, @Param("projectSn") String projectSn);
Integer selectMaxSurveyNo(@Param("floorId")Long floorId, @Param("projectSn")String projectSn); Integer selectMaxSurveyNo(@Param("floorId")Long floorId, @Param("projectSn")String projectSn);
} }

View File

@ -194,7 +194,8 @@
</if> </if>
order by sy.pour_time order by sy.pour_time
</select> </select>
<select id="selectMassReboundSurveyAreaList" resultType="com.zhgd.jeecg.common.mybatis.EntityMap"> <select id="selectMassReboundSurveyAreaList"
resultType="com.zhgd.xmgl.modules.massrebound.entity.MassReboundSurveyArea">
select a.*, select a.*,
c.build_name,b.floor_name,CONCAT(c.build_name,'-',b.floor_name,'层') areaname, c.build_name,b.floor_name,CONCAT(c.build_name,'-',b.floor_name,'层') areaname,
(case when a.survey_type=1 then '非泵送混凝土' (case when a.survey_type=1 then '非泵送混凝土'
@ -203,7 +204,13 @@
when a.result_type=2 then '不合格' else '' end ) result_type_name when a.result_type=2 then '不合格' else '' end ) result_type_name
from mass_rebound_survey_area a LEFT JOIN mass_rebound_floor b ON a.floor_id=b.floor_id from mass_rebound_survey_area a LEFT JOIN mass_rebound_floor b ON a.floor_id=b.floor_id
LEFT JOIN mass_rebound_build c ON b.build_id=c.id LEFT JOIN mass_rebound_build c ON b.build_id=c.id
where a.floor_id=#{floorId} where 1=1
<if test="floorId != null">
and a.floor_id=#{floorId}
</if>
<if test="projectSn != null and projectSn != ''">
and a.project_sn = #{projectSn}
</if>
</select> </select>
<select id="selectMaxSurveyNo" resultType="java.lang.Integer"> <select id="selectMaxSurveyNo" resultType="java.lang.Integer">
SELECT MAX(survey_no) SELECT MAX(survey_no)

View File

@ -31,4 +31,6 @@ public interface IMassReboundSurveyAreaService extends IService<MassReboundSurve
MassReboundSurveyArea saveAnewSurvey(MassReboundSurveyArea massReboundSurveyArea); MassReboundSurveyArea saveAnewSurvey(MassReboundSurveyArea massReboundSurveyArea);
void exporExcelMassReboundSurveyArea(HttpServletResponse response, String floorId); void exporExcelMassReboundSurveyArea(HttpServletResponse response, String floorId);
List<MassReboundSurveyArea> getMassReboundSurveyArea(String floorId, String projectSn);
} }

View File

@ -1,22 +1,21 @@
package com.zhgd.xmgl.modules.massrebound.service.impl; package com.zhgd.xmgl.modules.massrebound.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; 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.jeecg.common.mybatis.EntityMap;
import com.zhgd.xmgl.modules.basicdata.service.ICompanyService;
import com.zhgd.xmgl.modules.massrebound.entity.MassReboundAngleCorrect; import com.zhgd.xmgl.modules.massrebound.entity.MassReboundAngleCorrect;
import com.zhgd.xmgl.modules.massrebound.entity.MassReboundConcreteStrengthConversion; import com.zhgd.xmgl.modules.massrebound.entity.MassReboundConcreteStrengthConversion;
import com.zhgd.xmgl.modules.massrebound.entity.MassReboundSurveyArea; import com.zhgd.xmgl.modules.massrebound.entity.MassReboundSurveyArea;
import com.zhgd.xmgl.modules.massrebound.mapper.MassReboundAngleCorrectMapper; import com.zhgd.xmgl.modules.massrebound.mapper.MassReboundAngleCorrectMapper;
import com.zhgd.xmgl.modules.massrebound.mapper.MassReboundConcreteStrengthConversionMapper; import com.zhgd.xmgl.modules.massrebound.mapper.MassReboundConcreteStrengthConversionMapper;
import com.zhgd.xmgl.modules.massrebound.mapper.MassReboundSurveyAreaMapper; import com.zhgd.xmgl.modules.massrebound.mapper.MassReboundSurveyAreaMapper;
import com.zhgd.xmgl.modules.basicdata.service.ICompanyService;
import com.zhgd.xmgl.modules.massrebound.service.IMassReboundSurveyAreaService; import com.zhgd.xmgl.modules.massrebound.service.IMassReboundSurveyAreaService;
import com.zhgd.xmgl.util.JxlExcelUtils; import com.zhgd.xmgl.util.JxlExcelUtils;
import org.apache.commons.collections.MapUtils; import org.apache.commons.collections.MapUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
@ -44,7 +43,7 @@ public class MassReboundSurveyAreaServiceImpl extends ServiceImpl<MassReboundSur
@Override @Override
public MassReboundSurveyArea saveMassReboundSurveyArea(MassReboundSurveyArea massReboundSurveyArea) { public MassReboundSurveyArea saveMassReboundSurveyArea(MassReboundSurveyArea massReboundSurveyArea) {
List<Double> list=new ArrayList<>(); List<Double> list = new ArrayList<>();
list.add(massReboundSurveyArea.getReboundValue1()); list.add(massReboundSurveyArea.getReboundValue1());
list.add(massReboundSurveyArea.getReboundValue2()); list.add(massReboundSurveyArea.getReboundValue2());
list.add(massReboundSurveyArea.getReboundValue3()); list.add(massReboundSurveyArea.getReboundValue3());
@ -63,20 +62,20 @@ public class MassReboundSurveyAreaServiceImpl extends ServiceImpl<MassReboundSur
list.add(massReboundSurveyArea.getReboundValue16()); list.add(massReboundSurveyArea.getReboundValue16());
Collections.sort(list); Collections.sort(list);
//16个数字去掉3个最大和3个最小计算剩下10个数的平均值 //16个数字去掉3个最大和3个最小计算剩下10个数的平均值
double sum=0d; double sum = 0d;
for (int i=3;i<13;i++){ for (int i = 3; i < 13; i++) {
sum+=list.get(i); sum += list.get(i);
} }
//回弹平均值 //回弹平均值
double reboundAvgValue=new BigDecimal(sum).divide(new BigDecimal("10"),1,BigDecimal.ROUND_HALF_UP).doubleValue(); double reboundAvgValue = new BigDecimal(sum).divide(new BigDecimal("10"), 1, BigDecimal.ROUND_HALF_UP).doubleValue();
massReboundSurveyArea.setReboundAvgValue(reboundAvgValue); massReboundSurveyArea.setReboundAvgValue(reboundAvgValue);
if(StringUtils.isEmpty(massReboundSurveyArea.getCreateTime())) { if (StringUtils.isEmpty(massReboundSurveyArea.getCreateTime())) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
massReboundSurveyArea.setCreateTime(sdf.format(new Date())); massReboundSurveyArea.setCreateTime(sdf.format(new Date()));
} }
//普通设备需要修正角度和碳化深度值高强度设备不用 //普通设备需要修正角度和碳化深度值高强度设备不用
if(massReboundSurveyArea.getMeasureDevType()==1) { if (massReboundSurveyArea.getMeasureDevType() == 1) {
//非水平测量时候查询回弹值得修正值 //非水平测量时候查询回弹值得修正值
if (massReboundSurveyArea.getAngle() != 0) { if (massReboundSurveyArea.getAngle() != 0) {
double angleValue = 0d; double angleValue = 0d;
@ -152,56 +151,56 @@ public class MassReboundSurveyAreaServiceImpl extends ServiceImpl<MassReboundSur
} }
reboundAvgValue = reboundAvgValue + angleValue; reboundAvgValue = reboundAvgValue + angleValue;
} }
String surveyStrength=""; String surveyStrength = "";
//1 测区混凝土强度换算2泵送混凝土测区强度 //1 测区混凝土强度换算2泵送混凝土测区强度
if(massReboundSurveyArea.getSurveyType()==1){ if (massReboundSurveyArea.getSurveyType() == 1) {
if(reboundAvgValue<20d){ if (reboundAvgValue < 20d) {
surveyStrength="小于10"; surveyStrength = "小于10";
}else if(reboundAvgValue>60d){ } else if (reboundAvgValue > 60d) {
surveyStrength="大于60"; surveyStrength = "大于60";
}else{ } else {
surveyStrength=getSurveyDifference(reboundAvgValue,1,massReboundSurveyArea.getCarbonationDepthAvg()); surveyStrength = getSurveyDifference(reboundAvgValue, 1, massReboundSurveyArea.getCarbonationDepthAvg());
} }
}else if(massReboundSurveyArea.getSurveyType()==2){ } else if (massReboundSurveyArea.getSurveyType() == 2) {
if(reboundAvgValue<18.6d){ if (reboundAvgValue < 18.6d) {
surveyStrength="小于10"; surveyStrength = "小于10";
}else if(reboundAvgValue>52.8d){ } else if (reboundAvgValue > 52.8d) {
surveyStrength="大于60"; surveyStrength = "大于60";
}else{ } else {
surveyStrength=getSurveyDifference(reboundAvgValue,2,massReboundSurveyArea.getCarbonationDepthAvg()); surveyStrength = getSurveyDifference(reboundAvgValue, 2, massReboundSurveyArea.getCarbonationDepthAvg());
} }
} }
//根据选择的设计强度判断是否合格 //根据选择的设计强度判断是否合格
double designStrength=Double.valueOf(massReboundSurveyArea.getDesignStrength().substring(1)); double designStrength = Double.valueOf(massReboundSurveyArea.getDesignStrength().substring(1));
if("小于10".equals(surveyStrength)){ if ("小于10".equals(surveyStrength)) {
massReboundSurveyArea.setResultType(2); massReboundSurveyArea.setResultType(2);
}else if("大于60".equals(surveyStrength)){ } else if ("大于60".equals(surveyStrength)) {
massReboundSurveyArea.setResultType(1); massReboundSurveyArea.setResultType(1);
}else{ } else {
if(Double.valueOf(surveyStrength)>=designStrength){ if (Double.valueOf(surveyStrength) >= designStrength) {
massReboundSurveyArea.setResultType(1); massReboundSurveyArea.setResultType(1);
}else{ } else {
massReboundSurveyArea.setResultType(2); massReboundSurveyArea.setResultType(2);
} }
} }
massReboundSurveyArea.setSurveyStrength(surveyStrength); massReboundSurveyArea.setSurveyStrength(surveyStrength);
}else{ } else {
if(massReboundSurveyArea.getSurveyType()==3){ if (massReboundSurveyArea.getSurveyType() == 3) {
double surveyStrength=getHighStrengthReboundValue(reboundAvgValue); double surveyStrength = getHighStrengthReboundValue(reboundAvgValue);
double designStrength=Double.valueOf(massReboundSurveyArea.getDesignStrength().substring(1)); double designStrength = Double.valueOf(massReboundSurveyArea.getDesignStrength().substring(1));
if(surveyStrength>=designStrength){ if (surveyStrength >= designStrength) {
massReboundSurveyArea.setResultType(1); massReboundSurveyArea.setResultType(1);
}else{ } else {
massReboundSurveyArea.setResultType(2); massReboundSurveyArea.setResultType(2);
} }
massReboundSurveyArea.setSurveyStrength(String.valueOf(surveyStrength)); massReboundSurveyArea.setSurveyStrength(String.valueOf(surveyStrength));
} }
} }
if(massReboundSurveyArea.getOpType()==null||massReboundSurveyArea.getOpType()==0){ if (massReboundSurveyArea.getOpType() == null || massReboundSurveyArea.getOpType() == 0) {
Integer maxNum=massReboundSurveyAreaMapper.selectMaxSurveyNo(massReboundSurveyArea.getFloorId(),massReboundSurveyArea.getProjectSn()); Integer maxNum = massReboundSurveyAreaMapper.selectMaxSurveyNo(massReboundSurveyArea.getFloorId(), massReboundSurveyArea.getProjectSn());
if(maxNum==null||maxNum==0){ if (maxNum == null || maxNum == 0) {
maxNum=1; maxNum = 1;
}else{ } else {
maxNum++; maxNum++;
} }
massReboundSurveyArea.setSurveyNo(maxNum); massReboundSurveyArea.setSurveyNo(maxNum);
@ -209,125 +208,128 @@ public class MassReboundSurveyAreaServiceImpl extends ServiceImpl<MassReboundSur
} }
return massReboundSurveyArea; return massReboundSurveyArea;
} }
private String getSurveyDifference(double reboundAvgValue,Integer surveyType,double carbonationDepthAvg){
private String getSurveyDifference(double reboundAvgValue, Integer surveyType, double carbonationDepthAvg) {
//查询回弹平均值大于的离的最近一行数据 //查询回弹平均值大于的离的最近一行数据
MassReboundConcreteStrengthConversion greaterThan=massReboundConcreteStrengthConversionMapper.getGreaterThanValue(reboundAvgValue,surveyType); MassReboundConcreteStrengthConversion greaterThan = massReboundConcreteStrengthConversionMapper.getGreaterThanValue(reboundAvgValue, surveyType);
//查询回弹平均值小于的离的最近一行数据 //查询回弹平均值小于的离的最近一行数据
MassReboundConcreteStrengthConversion lessThan=massReboundConcreteStrengthConversionMapper.getLessThanValue(reboundAvgValue,surveyType); MassReboundConcreteStrengthConversion lessThan = massReboundConcreteStrengthConversionMapper.getLessThanValue(reboundAvgValue, surveyType);
double starty=0d; double starty = 0d;
double endy=0d; double endy = 0d;
if(carbonationDepthAvg==0d){ if (carbonationDepthAvg == 0d) {
starty=lessThan.getCarbonationDepthZero(); starty = lessThan.getCarbonationDepthZero();
endy=greaterThan.getCarbonationDepthZero(); endy = greaterThan.getCarbonationDepthZero();
}else if(carbonationDepthAvg==0.5d){ } else if (carbonationDepthAvg == 0.5d) {
starty=lessThan.getCarbonationDepthZeroPointFive(); starty = lessThan.getCarbonationDepthZeroPointFive();
endy=greaterThan.getCarbonationDepthZeroPointFive(); endy = greaterThan.getCarbonationDepthZeroPointFive();
}else if(carbonationDepthAvg==1d){ } else if (carbonationDepthAvg == 1d) {
starty=lessThan.getCarbonationDepthOne(); starty = lessThan.getCarbonationDepthOne();
endy=greaterThan.getCarbonationDepthOne(); endy = greaterThan.getCarbonationDepthOne();
}else if(carbonationDepthAvg==1.5d){ } else if (carbonationDepthAvg == 1.5d) {
starty=lessThan.getCarbonationDepthOnePointFive(); starty = lessThan.getCarbonationDepthOnePointFive();
endy=greaterThan.getCarbonationDepthOnePointFive(); endy = greaterThan.getCarbonationDepthOnePointFive();
}else if(carbonationDepthAvg==2d){ } else if (carbonationDepthAvg == 2d) {
starty=lessThan.getCarbonationDepthTwo(); starty = lessThan.getCarbonationDepthTwo();
endy=greaterThan.getCarbonationDepthTwo(); endy = greaterThan.getCarbonationDepthTwo();
}else if(carbonationDepthAvg==2.5d){ } else if (carbonationDepthAvg == 2.5d) {
starty=lessThan.getCarbonationDepthTwoPointFive(); starty = lessThan.getCarbonationDepthTwoPointFive();
endy=greaterThan.getCarbonationDepthTwoPointFive(); endy = greaterThan.getCarbonationDepthTwoPointFive();
}else if(carbonationDepthAvg==3d){ } else if (carbonationDepthAvg == 3d) {
starty=lessThan.getCarbonationDepthThree(); starty = lessThan.getCarbonationDepthThree();
endy=greaterThan.getCarbonationDepthThree(); endy = greaterThan.getCarbonationDepthThree();
}else if(carbonationDepthAvg==3.5d){ } else if (carbonationDepthAvg == 3.5d) {
starty=lessThan.getCarbonationDepthThreePointFive(); starty = lessThan.getCarbonationDepthThreePointFive();
endy=greaterThan.getCarbonationDepthThreePointFive(); endy = greaterThan.getCarbonationDepthThreePointFive();
}else if(carbonationDepthAvg==4d){ } else if (carbonationDepthAvg == 4d) {
starty=lessThan.getCarbonationDepthFour(); starty = lessThan.getCarbonationDepthFour();
endy=greaterThan.getCarbonationDepthFour(); endy = greaterThan.getCarbonationDepthFour();
}else if(carbonationDepthAvg==4.5d){ } else if (carbonationDepthAvg == 4.5d) {
starty=lessThan.getCarbonationDepthFourPointFive(); starty = lessThan.getCarbonationDepthFourPointFive();
endy=greaterThan.getCarbonationDepthFourPointFive(); endy = greaterThan.getCarbonationDepthFourPointFive();
}else if(carbonationDepthAvg==5d){ } else if (carbonationDepthAvg == 5d) {
starty=lessThan.getCarbonationDepthFive(); starty = lessThan.getCarbonationDepthFive();
endy=greaterThan.getCarbonationDepthFive(); endy = greaterThan.getCarbonationDepthFive();
}else if(carbonationDepthAvg==5.5d){ } else if (carbonationDepthAvg == 5.5d) {
starty=lessThan.getCarbonationDepthFivePointFive(); starty = lessThan.getCarbonationDepthFivePointFive();
endy=greaterThan.getCarbonationDepthFivePointFive(); endy = greaterThan.getCarbonationDepthFivePointFive();
}else if(carbonationDepthAvg>=6d){ } else if (carbonationDepthAvg >= 6d) {
starty=lessThan.getCarbonationDepthSix(); starty = lessThan.getCarbonationDepthSix();
endy=greaterThan.getCarbonationDepthSix(); endy = greaterThan.getCarbonationDepthSix();
} }
if(starty==-1d){ if (starty == -1d) {
return "小于10"; return "小于10";
} }
if(starty==-2d){ if (starty == -2d) {
return "大于60"; return "大于60";
} }
if(endy==-1d){ if (endy == -1d) {
return "小于10"; return "小于10";
} }
if(endy==-2d){ if (endy == -2d) {
return "大于60"; return "大于60";
} }
return getDifference(lessThan.getReboundAvgValue(),starty,greaterThan.getReboundAvgValue(),endy,reboundAvgValue)+""; return getDifference(lessThan.getReboundAvgValue(), starty, greaterThan.getReboundAvgValue(), endy, reboundAvgValue) + "";
} }
private double getDifference(double startx,double starty,double endx,double endy,double median){
if(startx==endx){ private double getDifference(double startx, double starty, double endx, double endy, double median) {
if (startx == endx) {
return starty; return starty;
}else { } else {
double temp = endx - startx; double temp = endx - startx;
double mediany = 0d; double mediany = 0d;
if (temp != 0d) { if (temp != 0d) {
//mediany = new BigDecimal((endy - starty)).multiply(new BigDecimal((median - startx))).divide(new BigDecimal((endx - startx)), 1, BigDecimal.ROUND_HALF_UP).doubleValue() + starty; //mediany = new BigDecimal((endy - starty)).multiply(new BigDecimal((median - startx))).divide(new BigDecimal((endx - startx)), 1, BigDecimal.ROUND_HALF_UP).doubleValue() + starty;
mediany = (new BigDecimal((endy - starty)).multiply(new BigDecimal((median - startx))).divide(new BigDecimal((endx - startx)), 1, BigDecimal.ROUND_HALF_UP)).add(new BigDecimal(String.valueOf(starty))).setScale(1,BigDecimal.ROUND_HALF_UP).doubleValue(); mediany = (new BigDecimal((endy - starty)).multiply(new BigDecimal((median - startx))).divide(new BigDecimal((endx - startx)), 1, BigDecimal.ROUND_HALF_UP)).add(new BigDecimal(String.valueOf(starty))).setScale(1, BigDecimal.ROUND_HALF_UP).doubleValue();
} }
return mediany; return mediany;
} }
} }
private double getHighStrengthReboundValue(double reboundAvgValue){
BigDecimal tempValue=new BigDecimal(reboundAvgValue+""); private double getHighStrengthReboundValue(double reboundAvgValue) {
BigDecimal tempValue = new BigDecimal(reboundAvgValue + "");
//计算公式 0.0079*R*R+0.75*R-7.83 公式中R为平均回弹值 //计算公式 0.0079*R*R+0.75*R-7.83 公式中R为平均回弹值
return ((tempValue.multiply(tempValue).multiply(new BigDecimal("0.0079")).setScale(2,BigDecimal.ROUND_HALF_UP)) return ((tempValue.multiply(tempValue).multiply(new BigDecimal("0.0079")).setScale(2, BigDecimal.ROUND_HALF_UP))
.add(tempValue.multiply(new BigDecimal("0.75")).setScale(2,BigDecimal.ROUND_HALF_UP)) .add(tempValue.multiply(new BigDecimal("0.75")).setScale(2, BigDecimal.ROUND_HALF_UP))
.subtract(new BigDecimal("7.83"))).setScale(1,BigDecimal.ROUND_HALF_UP).doubleValue(); .subtract(new BigDecimal("7.83"))).setScale(1, BigDecimal.ROUND_HALF_UP).doubleValue();
} }
@Override @Override
public Map<String, Object> selectMassReboundSurveyAreaStatistics(Map<String, Object> param) { public Map<String, Object> selectMassReboundSurveyAreaStatistics(Map<String, Object> param) {
Map<String, Object> data=new HashMap<>(); Map<String, Object> data = new HashMap<>();
Map<String,Object> map=companyService.getCompanyType(param); Map<String, Object> map = companyService.getCompanyType(param);
List<Map<String, Object>> list=massReboundSurveyAreaMapper.selectMassReboundSurveyAreaStatistics(map); List<Map<String, Object>> list = massReboundSurveyAreaMapper.selectMassReboundSurveyAreaStatistics(map);
Map<String, Object> count=massReboundSurveyAreaMapper.selectMassReboundSurveyAreaTotalCount(map); Map<String, Object> count = massReboundSurveyAreaMapper.selectMassReboundSurveyAreaTotalCount(map);
data.put("list",list); data.put("list", list);
data.put("count",count); data.put("count", count);
return data; return data;
} }
@Override @Override
public List<Map<String, Object>> selectProvinceMassReboundSurveyAreaCountList(Map<String, Object> param) { public List<Map<String, Object>> selectProvinceMassReboundSurveyAreaCountList(Map<String, Object> param) {
Map<String,Object> map=companyService.getCompanyType(param); Map<String, Object> map = companyService.getCompanyType(param);
return massReboundSurveyAreaMapper.selectProvinceMassReboundSurveyAreaCountList(map); return massReboundSurveyAreaMapper.selectProvinceMassReboundSurveyAreaCountList(map);
} }
@Override @Override
public Map<String, Object> selectProjectListByProvince(Map<String, Object> param) { public Map<String, Object> selectProjectListByProvince(Map<String, Object> param) {
Map<String, Object> data=new HashMap<>(); Map<String, Object> data = new HashMap<>();
Map<String,Object> map=companyService.getCompanyType(param); Map<String, Object> map = companyService.getCompanyType(param);
List<Map<String, Object>> list=massReboundSurveyAreaMapper.selectProvinceSurveyAreaProjectList(map); List<Map<String, Object>> list = massReboundSurveyAreaMapper.selectProvinceSurveyAreaProjectList(map);
Map<String, Object> count=new HashMap<>(); Map<String, Object> count = new HashMap<>();
count.put("projectNum",list.size()); count.put("projectNum", list.size());
int totalSurveyNum=0; int totalSurveyNum = 0;
int abnormalSurveyNum=0; int abnormalSurveyNum = 0;
if(list.size()>0){ if (list.size() > 0) {
for (Map<String, Object> result:list){ for (Map<String, Object> result : list) {
totalSurveyNum=totalSurveyNum+MapUtils.getInteger(result,"totalSurveyNum"); totalSurveyNum = totalSurveyNum + MapUtils.getInteger(result, "totalSurveyNum");
abnormalSurveyNum=abnormalSurveyNum+MapUtils.getInteger(result,"abnormalSurveyNum"); abnormalSurveyNum = abnormalSurveyNum + MapUtils.getInteger(result, "abnormalSurveyNum");
} }
} }
count.put("totalSurveyNum",totalSurveyNum); count.put("totalSurveyNum", totalSurveyNum);
count.put("abnormalSurveyNum",abnormalSurveyNum); count.put("abnormalSurveyNum", abnormalSurveyNum);
data.put("list",list); data.put("list", list);
data.put("count",count); data.put("count", count);
return data; return data;
} }
@ -338,7 +340,7 @@ public class MassReboundSurveyAreaServiceImpl extends ServiceImpl<MassReboundSur
@Override @Override
public List<EntityMap> selectProjectWarnList(Map<String, Object> param) { public List<EntityMap> selectProjectWarnList(Map<String, Object> param) {
Map<String,Object> map=companyService.getCompanyType(param); Map<String, Object> map = companyService.getCompanyType(param);
return massReboundSurveyAreaMapper.selectProjectWarnList(map); return massReboundSurveyAreaMapper.selectProjectWarnList(map);
} }
@ -352,18 +354,23 @@ public class MassReboundSurveyAreaServiceImpl extends ServiceImpl<MassReboundSur
@Override @Override
public void exporExcelMassReboundSurveyArea(HttpServletResponse response, String floorId) { public void exporExcelMassReboundSurveyArea(HttpServletResponse response, String floorId) {
try { try {
List<EntityMap> list=massReboundSurveyAreaMapper.selectMassReboundSurveyAreaList(floorId); List<MassReboundSurveyArea> list = massReboundSurveyAreaMapper.selectMassReboundSurveyAreaList(floorId, null);
String[] heads = {"编号","测区","测量时间","测量角度(°)","测区混凝土类型","设计强度","碳化深度平均值","回弹平均值","测区强度","测区结果","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16"}; String[] heads = {"编号", "测区", "测量时间", "测量角度(°)", "测区混凝土类型", "设计强度", "碳化深度平均值", "回弹平均值", "测区强度", "测区结果", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16"};
String[] headsStr = {"surveyNo","areaname","createTime","angle","surveyTypeName","designStrength","carbonationDepthAvg","reboundAvgValue","surveyStrength","resultTypeName","reboundValue1","reboundValue2", String[] headsStr = {"surveyNo", "areaname", "createTime", "angle", "surveyTypeName", "designStrength", "carbonationDepthAvg", "reboundAvgValue", "surveyStrength", "resultTypeName", "reboundValue1", "reboundValue2",
"reboundValue3","reboundValue4","reboundValue5","reboundValue6","reboundValue7","reboundValue8","reboundValue9","reboundValue10","reboundValue11", "reboundValue3", "reboundValue4", "reboundValue5", "reboundValue6", "reboundValue7", "reboundValue8", "reboundValue9", "reboundValue10", "reboundValue11",
"reboundValue12","reboundValue13","reboundValue14","reboundValue15","reboundValue16"}; "reboundValue12", "reboundValue13", "reboundValue14", "reboundValue15", "reboundValue16"};
JxlExcelUtils.excelExport("测量数据列表",heads,headsStr,list,response); JxlExcelUtils.excelExport("测量数据列表", heads, headsStr, list, response);
}catch (Exception e){ } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
} }
@Override
public List<MassReboundSurveyArea> getMassReboundSurveyArea(String floorId, String projectSn) {
return massReboundSurveyAreaMapper.selectMassReboundSurveyAreaList(floorId, projectSn);
}
} }

View File

@ -328,6 +328,7 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
.antMatchers("/xmgl/carPassRecord/addCarPassRecord").permitAll() .antMatchers("/xmgl/carPassRecord/addCarPassRecord").permitAll()
.antMatchers("/xmgl/notice/add").permitAll() .antMatchers("/xmgl/notice/add").permitAll()
.antMatchers("/xmgl/upload/uploadBase64").permitAll() .antMatchers("/xmgl/upload/uploadBase64").permitAll()
.antMatchers("/xmgl/massReboundSurveyArea/getMassReboundSurveyArea").permitAll()
.antMatchers(HttpMethod.OPTIONS, "/**").anonymous() .antMatchers(HttpMethod.OPTIONS, "/**").anonymous()
.anyRequest().authenticated() // 剩下所有的验证都需要验证. .anyRequest().authenticated() // 剩下所有的验证都需要验证.
.and() .and()