diff --git a/src/main/java/com/zhgd/xmgl/modules/massrebound/controller/MassReboundSurveyAreaController.java b/src/main/java/com/zhgd/xmgl/modules/massrebound/controller/MassReboundSurveyAreaController.java index 320010553..7888fde0f 100644 --- a/src/main/java/com/zhgd/xmgl/modules/massrebound/controller/MassReboundSurveyAreaController.java +++ b/src/main/java/com/zhgd/xmgl/modules/massrebound/controller/MassReboundSurveyAreaController.java @@ -20,6 +20,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; import java.util.List; import java.util.Map; @@ -234,12 +235,22 @@ public class MassReboundSurveyAreaController { } - @ApiOperation(value = "浇筑令预警", notes = "浇筑令预警") - @ApiImplicitParams({ + @ApiOperation(value = "浇筑令预警", notes = "浇筑令预警") + @ApiImplicitParams({ @ApiImplicitParam(name = "sn", value = "公司sn或项目sn", paramType = "body", required = true, dataType = "String"), }) - @PostMapping("/selectProjectWarnList") - public Result> selectProjectWarnList(@RequestBody Map map) { - return Result.success(massReboundSurveyAreaService.selectProjectWarnList(map)); - } + @PostMapping("/selectProjectWarnList") + public Result> selectProjectWarnList(@RequestBody Map 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> getMassReboundSurveyArea(String floorId, String projectSn) { + return Result.success(massReboundSurveyAreaService.getMassReboundSurveyArea(floorId, projectSn)); + } } diff --git a/src/main/java/com/zhgd/xmgl/modules/massrebound/entity/MassReboundSurveyArea.java b/src/main/java/com/zhgd/xmgl/modules/massrebound/entity/MassReboundSurveyArea.java index 0c6585fd7..ce4227ef2 100644 --- a/src/main/java/com/zhgd/xmgl/modules/massrebound/entity/MassReboundSurveyArea.java +++ b/src/main/java/com/zhgd/xmgl/modules/massrebound/entity/MassReboundSurveyArea.java @@ -1,192 +1,271 @@ package com.zhgd.xmgl.modules.massrebound.entity; -import java.io.Serializable; - 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.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-19 + * @date: 2021-04-19 * @version: V1.0 */ @Data @TableName("mass_rebound_survey_area") -@ApiModel(value="MassReboundSurveyArea实体类",description="MassReboundSurveyArea") +@ApiModel(value = "MassReboundSurveyArea实体类", description = "MassReboundSurveyArea") public class MassReboundSurveyArea implements Serializable { private static final long serialVersionUID = 1L; - - /**id*/ + + /** + * id + */ @TableId(type = IdType.ASSIGN_ID) - @ApiModelProperty(value="id") - private java.lang.Long id ; - /**坐标X*/ - @Excel(name = "坐标X", width = 15) - @ApiModelProperty(value="坐标X") - private java.lang.String coordinateX ; - /**坐标Y*/ - @Excel(name = "坐标Y", width = 15) - @ApiModelProperty(value="坐标Y") - private java.lang.String coordinateY ; - /**楼层ID*/ - @Excel(name = "楼层ID", width = 15) - @ApiModelProperty(value="楼层ID") - - private java.lang.Long floorId ; - /**创建时间*/ - @Excel(name = "创建时间", width = 15) - @ApiModelProperty(value="创建时间") - private java.lang.String createTime ; - /**项目SN*/ - @Excel(name = "项目SN", width = 15) - @ApiModelProperty(value="项目SN") - private java.lang.String projectSn ; - /**项目sn*/ + @ApiModelProperty(value = "id") + private java.lang.Long id; + /** + * 坐标X + */ + @Excel(name = "坐标X", width = 15) + @ApiModelProperty(value = "坐标X") + private java.lang.String coordinateX; + /** + * 坐标Y + */ + @Excel(name = "坐标Y", width = 15) + @ApiModelProperty(value = "坐标Y") + private java.lang.String coordinateY; + /** + * 楼层ID + */ + @Excel(name = "楼层ID", width = 15) + @ApiModelProperty(value = "楼层ID") + + private java.lang.Long floorId; + /** + * 创建时间 + */ + @Excel(name = "创建时间", width = 15) + @ApiModelProperty(value = "创建时间") + private java.lang.String createTime; + /** + * 项目SN + */ + @Excel(name = "项目SN", width = 15) + @ApiModelProperty(value = "项目SN") + private java.lang.String projectSn; + /** + * 项目sn + */ @Excel(name = "设计强度", width = 15) - @ApiModelProperty(value="设计强度") - private java.lang.String designStrength ; + @ApiModelProperty(value = "设计强度") + private java.lang.String designStrength; @Excel(name = "测量设备类型,1普通设备,2高强设备", width = 15) - @ApiModelProperty(value="测量设备类型,1普通设备,2高强设备") - private java.lang.Integer measureDevType ; + @ApiModelProperty(value = "测量设备类型,1普通设备,2高强设备") + private java.lang.Integer measureDevType; - /**项目SN*/ - @Excel(name = "1 测区混凝土强度换算,2泵送混凝土测区强度,3动能4.5J回弹仪测区强度换算", width = 15) - @ApiModelProperty(value="1 测区混凝土强度换算,2泵送混凝土测区强度,3动能4.5J回弹仪测区强度换算") - private java.lang.Integer surveyType ; - /**测区回弹值1*/ - @Excel(name = "测区回弹值1", width = 15) - @ApiModelProperty(value="测区回弹值1") - private java.lang.Double reboundValue1 ; - /**测区回弹值2*/ - @Excel(name = "测区回弹值2", width = 15) - @ApiModelProperty(value="测区回弹值2") - private java.lang.Double reboundValue2 ; - /**测区回弹值3*/ - @Excel(name = "测区回弹值3", width = 15) - @ApiModelProperty(value="测区回弹值3") - private java.lang.Double reboundValue3 ; - /**测区回弹值4*/ - @Excel(name = "测区回弹值4", width = 15) - @ApiModelProperty(value="测区回弹值4") - private java.lang.Double reboundValue4 ; - /**测区回弹值5*/ - @Excel(name = "测区回弹值5", width = 15) - @ApiModelProperty(value="测区回弹值5") - private java.lang.Double reboundValue5 ; - /**测区回弹值6*/ - @Excel(name = "测区回弹值6", width = 15) - @ApiModelProperty(value="测区回弹值6") - private java.lang.Double reboundValue6 ; - /**测区回弹值7*/ - @Excel(name = "测区回弹值7", width = 15) - @ApiModelProperty(value="测区回弹值7") - private java.lang.Double reboundValue7 ; - /**测区回弹值8*/ - @Excel(name = "测区回弹值8", width = 15) - @ApiModelProperty(value="测区回弹值8") - private java.lang.Double reboundValue8 ; - /**测区回弹值9*/ - @Excel(name = "测区回弹值9", width = 15) - @ApiModelProperty(value="测区回弹值9") - private java.lang.Double reboundValue9 ; - /**测区回弹值10*/ - @Excel(name = "测区回弹值10", width = 15) - @ApiModelProperty(value="测区回弹值10") - private java.lang.Double reboundValue10 ; - /**测区回弹值11*/ - @Excel(name = "测区回弹值11", width = 15) - @ApiModelProperty(value="测区回弹值11") - private java.lang.Double reboundValue11 ; - /**测区回弹值12*/ - @Excel(name = "测区回弹值12", width = 15) - @ApiModelProperty(value="测区回弹值12") - private java.lang.Double reboundValue12 ; - /**测区回弹值13*/ - @Excel(name = "测区回弹值13", width = 15) - @ApiModelProperty(value="测区回弹值13") - private java.lang.Double reboundValue13 ; - /**测区回弹值14*/ - @Excel(name = "测区回弹值14", width = 15) - @ApiModelProperty(value="测区回弹值14") - private java.lang.Double reboundValue14 ; - /**测区回弹值15*/ - @Excel(name = "测区回弹值15", width = 15) - @ApiModelProperty(value="测区回弹值15") - private java.lang.Double reboundValue15 ; - /**测区回弹值16*/ - @Excel(name = "测区回弹值16", width = 15) - @ApiModelProperty(value="测区回弹值16") - private java.lang.Double reboundValue16 ; - /**测区回弹值平均值*/ - @Excel(name = "测区回弹值平均值", width = 15) - @ApiModelProperty(value="测区回弹值平均值") - private java.lang.Double reboundAvgValue ; - /**碳化深度值1*/ - @Excel(name = "碳化深度值1", width = 15) - @ApiModelProperty(value="碳化深度值1") - private java.lang.Double carbonationDepth1 ; - /**碳化深度值2*/ - @Excel(name = "碳化深度值2", width = 15) - @ApiModelProperty(value="碳化深度值2") - private java.lang.Double carbonationDepth2 ; - /**碳化深度值3*/ - @Excel(name = "碳化深度值3", width = 15) - @ApiModelProperty(value="碳化深度值3") - private java.lang.Double carbonationDepth3 ; - /**碳化深度平均值*/ - @Excel(name = "碳化深度平均值", width = 15) - @ApiModelProperty(value="碳化深度平均值") - private java.lang.Double carbonationDepthAvg ; - /**角度*/ - @Excel(name = "角度", width = 15) - @ApiModelProperty(value="角度") - private java.lang.Integer angle ; - /**测区强度*/ - @Excel(name = "测区强度", width = 15) - @ApiModelProperty(value="测区强度") - private java.lang.String surveyStrength; - /**测量结果是否正常,1正常,2异常*/ + /** + * 项目SN + */ + @Excel(name = "1 测区混凝土强度换算,2泵送混凝土测区强度,3动能4.5J回弹仪测区强度换算", width = 15) + @ApiModelProperty(value = "1 测区混凝土强度换算,2泵送混凝土测区强度,3动能4.5J回弹仪测区强度换算") + private java.lang.Integer surveyType; + /** + * 测区回弹值1 + */ + @Excel(name = "测区回弹值1", width = 15) + @ApiModelProperty(value = "测区回弹值1") + private java.lang.Double reboundValue1; + /** + * 测区回弹值2 + */ + @Excel(name = "测区回弹值2", width = 15) + @ApiModelProperty(value = "测区回弹值2") + private java.lang.Double reboundValue2; + /** + * 测区回弹值3 + */ + @Excel(name = "测区回弹值3", width = 15) + @ApiModelProperty(value = "测区回弹值3") + private java.lang.Double reboundValue3; + /** + * 测区回弹值4 + */ + @Excel(name = "测区回弹值4", width = 15) + @ApiModelProperty(value = "测区回弹值4") + private java.lang.Double reboundValue4; + /** + * 测区回弹值5 + */ + @Excel(name = "测区回弹值5", width = 15) + @ApiModelProperty(value = "测区回弹值5") + private java.lang.Double reboundValue5; + /** + * 测区回弹值6 + */ + @Excel(name = "测区回弹值6", width = 15) + @ApiModelProperty(value = "测区回弹值6") + private java.lang.Double reboundValue6; + /** + * 测区回弹值7 + */ + @Excel(name = "测区回弹值7", width = 15) + @ApiModelProperty(value = "测区回弹值7") + private java.lang.Double reboundValue7; + /** + * 测区回弹值8 + */ + @Excel(name = "测区回弹值8", width = 15) + @ApiModelProperty(value = "测区回弹值8") + private java.lang.Double reboundValue8; + /** + * 测区回弹值9 + */ + @Excel(name = "测区回弹值9", width = 15) + @ApiModelProperty(value = "测区回弹值9") + private java.lang.Double reboundValue9; + /** + * 测区回弹值10 + */ + @Excel(name = "测区回弹值10", width = 15) + @ApiModelProperty(value = "测区回弹值10") + private java.lang.Double reboundValue10; + /** + * 测区回弹值11 + */ + @Excel(name = "测区回弹值11", width = 15) + @ApiModelProperty(value = "测区回弹值11") + private java.lang.Double reboundValue11; + /** + * 测区回弹值12 + */ + @Excel(name = "测区回弹值12", width = 15) + @ApiModelProperty(value = "测区回弹值12") + private java.lang.Double reboundValue12; + /** + * 测区回弹值13 + */ + @Excel(name = "测区回弹值13", width = 15) + @ApiModelProperty(value = "测区回弹值13") + private java.lang.Double reboundValue13; + /** + * 测区回弹值14 + */ + @Excel(name = "测区回弹值14", width = 15) + @ApiModelProperty(value = "测区回弹值14") + private java.lang.Double reboundValue14; + /** + * 测区回弹值15 + */ + @Excel(name = "测区回弹值15", width = 15) + @ApiModelProperty(value = "测区回弹值15") + private java.lang.Double reboundValue15; + /** + * 测区回弹值16 + */ + @Excel(name = "测区回弹值16", width = 15) + @ApiModelProperty(value = "测区回弹值16") + private java.lang.Double reboundValue16; + /** + * 测区回弹值平均值 + */ + @Excel(name = "测区回弹值平均值", width = 15) + @ApiModelProperty(value = "测区回弹值平均值") + private java.lang.Double reboundAvgValue; + /** + * 碳化深度值1 + */ + @Excel(name = "碳化深度值1", width = 15) + @ApiModelProperty(value = "碳化深度值1") + private java.lang.Double carbonationDepth1; + /** + * 碳化深度值2 + */ + @Excel(name = "碳化深度值2", width = 15) + @ApiModelProperty(value = "碳化深度值2") + private java.lang.Double carbonationDepth2; + /** + * 碳化深度值3 + */ + @Excel(name = "碳化深度值3", width = 15) + @ApiModelProperty(value = "碳化深度值3") + private java.lang.Double carbonationDepth3; + /** + * 碳化深度平均值 + */ + @Excel(name = "碳化深度平均值", width = 15) + @ApiModelProperty(value = "碳化深度平均值") + private java.lang.Double carbonationDepthAvg; + /** + * 角度 + */ + @Excel(name = "角度", width = 15) + @ApiModelProperty(value = "角度") + private java.lang.Integer angle; + /** + * 测区强度 + */ + @Excel(name = "测区强度", width = 15) + @ApiModelProperty(value = "测区强度") + private java.lang.String surveyStrength; + /** + * 测量结果是否正常,1正常,2异常 + */ @Excel(name = "测量结果是否正常,1正常,2异常", width = 15) - @ApiModelProperty(value="测量结果是否正常,1正常,2异常") - private java.lang.Integer resultType ; + @ApiModelProperty(value = "测量结果是否正常,1正常,2异常") + private java.lang.Integer resultType; - @ApiModelProperty(value="测量编号") - private java.lang.Integer surveyNo ; + @ApiModelProperty(value = "测量编号") + private java.lang.Integer surveyNo; @TableField(exist = false) - @ApiModelProperty(value="操作类型,0保存,1不保存,默认保存") - private java.lang.Integer opType ; + @ApiModelProperty(value = "操作类型,0保存,1不保存,默认保存") + private java.lang.Integer opType; - /**浇筑令ID*/ + /** + * 浇筑令ID + */ @TableField(exist = false) - - @ApiModelProperty(value="浇筑令ID") - private Long pouringId ; + + @ApiModelProperty(value = "浇筑令ID") + private Long pouringId; @TableField(exist = false) - @ApiModelProperty(value="构件类型,1水平构件,2竖向构件") - private Integer memberType ; + @ApiModelProperty(value = "构件类型,1水平构件,2竖向构件") + private Integer memberType; @TableField(exist = false) - @ApiModelProperty(value="轴线X") - private String axisX ; + @ApiModelProperty(value = "轴线X") + private String axisX; - /**轴线Y*/ + /** + * 轴线Y + */ @TableField(exist = false) - @ApiModelProperty(value="轴线Y") - private String axisY ; + @ApiModelProperty(value = "轴线Y") + private String axisY; @TableField(exist = false) - @ApiModelProperty(value="创建人") - - private java.lang.Long createUser ; + @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; + } diff --git a/src/main/java/com/zhgd/xmgl/modules/massrebound/mapper/MassReboundSurveyAreaMapper.java b/src/main/java/com/zhgd/xmgl/modules/massrebound/mapper/MassReboundSurveyAreaMapper.java index e757255f4..fa4922d93 100644 --- a/src/main/java/com/zhgd/xmgl/modules/massrebound/mapper/MassReboundSurveyAreaMapper.java +++ b/src/main/java/com/zhgd/xmgl/modules/massrebound/mapper/MassReboundSurveyAreaMapper.java @@ -30,7 +30,7 @@ public interface MassReboundSurveyAreaMapper extends BaseMapper selectProjectWarnList(Map map); - List selectMassReboundSurveyAreaList(@Param("floorId") String floorId); + List selectMassReboundSurveyAreaList(@Param("floorId") String floorId, @Param("projectSn") String projectSn); Integer selectMaxSurveyNo(@Param("floorId")Long floorId, @Param("projectSn")String projectSn); } diff --git a/src/main/java/com/zhgd/xmgl/modules/massrebound/mapper/xml/MassReboundSurveyAreaMapper.xml b/src/main/java/com/zhgd/xmgl/modules/massrebound/mapper/xml/MassReboundSurveyAreaMapper.xml index e7c5bf8ba..a5bc2940c 100644 --- a/src/main/java/com/zhgd/xmgl/modules/massrebound/mapper/xml/MassReboundSurveyAreaMapper.xml +++ b/src/main/java/com/zhgd/xmgl/modules/massrebound/mapper/xml/MassReboundSurveyAreaMapper.xml @@ -194,16 +194,23 @@ order by sy.pour_time - select a.*, - c.build_name,b.floor_name,CONCAT(c.build_name,'-',b.floor_name,'层') areaname, - (case when a.survey_type=1 then '非泵送混凝土' - when a.survey_type=2 then '泵送混凝土' else '' end ) survey_type_name, - (case when a.result_type=1 then '合格' - when a.result_type=2 then '不合格' else '' end ) result_type_name + c.build_name,b.floor_name,CONCAT(c.build_name,'-',b.floor_name,'层') areaname, + (case when a.survey_type=1 then '非泵送混凝土' + when a.survey_type=2 then '泵送混凝土' else '' end ) survey_type_name, + (case when a.result_type=1 then '合格' + 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 - LEFT JOIN mass_rebound_build c ON b.build_id=c.id - where a.floor_id=#{floorId} + LEFT JOIN mass_rebound_build c ON b.build_id=c.id + where 1=1 + + and a.floor_id=#{floorId} + + + and a.project_sn = #{projectSn} + - \ No newline at end of file + diff --git a/src/main/java/com/zhgd/xmgl/modules/massrebound/service/IMassReboundSurveyAreaService.java b/src/main/java/com/zhgd/xmgl/modules/massrebound/service/IMassReboundSurveyAreaService.java index 83f8bf206..9c1e93c5f 100644 --- a/src/main/java/com/zhgd/xmgl/modules/massrebound/service/IMassReboundSurveyAreaService.java +++ b/src/main/java/com/zhgd/xmgl/modules/massrebound/service/IMassReboundSurveyAreaService.java @@ -31,4 +31,6 @@ public interface IMassReboundSurveyAreaService extends IService getMassReboundSurveyArea(String floorId, String projectSn); } diff --git a/src/main/java/com/zhgd/xmgl/modules/massrebound/service/impl/MassReboundSurveyAreaServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/massrebound/service/impl/MassReboundSurveyAreaServiceImpl.java index 5dbf0df4f..6790f41d6 100644 --- a/src/main/java/com/zhgd/xmgl/modules/massrebound/service/impl/MassReboundSurveyAreaServiceImpl.java +++ b/src/main/java/com/zhgd/xmgl/modules/massrebound/service/impl/MassReboundSurveyAreaServiceImpl.java @@ -1,22 +1,21 @@ package com.zhgd.xmgl.modules.massrebound.service.impl; 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.basicdata.service.ICompanyService; import com.zhgd.xmgl.modules.massrebound.entity.MassReboundAngleCorrect; import com.zhgd.xmgl.modules.massrebound.entity.MassReboundConcreteStrengthConversion; import com.zhgd.xmgl.modules.massrebound.entity.MassReboundSurveyArea; import com.zhgd.xmgl.modules.massrebound.mapper.MassReboundAngleCorrectMapper; import com.zhgd.xmgl.modules.massrebound.mapper.MassReboundConcreteStrengthConversionMapper; 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.util.JxlExcelUtils; import org.apache.commons.collections.MapUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.springframework.transaction.annotation.Transactional; import javax.servlet.http.HttpServletResponse; @@ -27,7 +26,7 @@ import java.util.*; /** * @Description: 质量回弹-测区强度 * @author: pds - * @date: 2021-04-19 + * @date: 2021-04-19 * @version: V1.0 */ @Service @@ -44,7 +43,7 @@ public class MassReboundSurveyAreaServiceImpl extends ServiceImpl list=new ArrayList<>(); + List list = new ArrayList<>(); list.add(massReboundSurveyArea.getReboundValue1()); list.add(massReboundSurveyArea.getReboundValue2()); list.add(massReboundSurveyArea.getReboundValue3()); @@ -63,20 +62,20 @@ public class MassReboundSurveyAreaServiceImpl extends ServiceImpl60d){ - surveyStrength="大于60"; - }else{ - surveyStrength=getSurveyDifference(reboundAvgValue,1,massReboundSurveyArea.getCarbonationDepthAvg()); + if (massReboundSurveyArea.getSurveyType() == 1) { + if (reboundAvgValue < 20d) { + surveyStrength = "小于10"; + } else if (reboundAvgValue > 60d) { + surveyStrength = "大于60"; + } else { + surveyStrength = getSurveyDifference(reboundAvgValue, 1, massReboundSurveyArea.getCarbonationDepthAvg()); } - }else if(massReboundSurveyArea.getSurveyType()==2){ - if(reboundAvgValue<18.6d){ - surveyStrength="小于10"; - }else if(reboundAvgValue>52.8d){ - surveyStrength="大于60"; - }else{ - surveyStrength=getSurveyDifference(reboundAvgValue,2,massReboundSurveyArea.getCarbonationDepthAvg()); + } else if (massReboundSurveyArea.getSurveyType() == 2) { + if (reboundAvgValue < 18.6d) { + surveyStrength = "小于10"; + } else if (reboundAvgValue > 52.8d) { + surveyStrength = "大于60"; + } else { + surveyStrength = getSurveyDifference(reboundAvgValue, 2, massReboundSurveyArea.getCarbonationDepthAvg()); } } //根据选择的设计强度判断是否合格 - double designStrength=Double.valueOf(massReboundSurveyArea.getDesignStrength().substring(1)); - if("小于10".equals(surveyStrength)){ + double designStrength = Double.valueOf(massReboundSurveyArea.getDesignStrength().substring(1)); + if ("小于10".equals(surveyStrength)) { massReboundSurveyArea.setResultType(2); - }else if("大于60".equals(surveyStrength)){ + } else if ("大于60".equals(surveyStrength)) { massReboundSurveyArea.setResultType(1); - }else{ - if(Double.valueOf(surveyStrength)>=designStrength){ + } else { + if (Double.valueOf(surveyStrength) >= designStrength) { massReboundSurveyArea.setResultType(1); - }else{ + } else { massReboundSurveyArea.setResultType(2); } } massReboundSurveyArea.setSurveyStrength(surveyStrength); - }else{ - if(massReboundSurveyArea.getSurveyType()==3){ - double surveyStrength=getHighStrengthReboundValue(reboundAvgValue); - double designStrength=Double.valueOf(massReboundSurveyArea.getDesignStrength().substring(1)); - if(surveyStrength>=designStrength){ + } else { + if (massReboundSurveyArea.getSurveyType() == 3) { + double surveyStrength = getHighStrengthReboundValue(reboundAvgValue); + double designStrength = Double.valueOf(massReboundSurveyArea.getDesignStrength().substring(1)); + if (surveyStrength >= designStrength) { massReboundSurveyArea.setResultType(1); - }else{ + } else { massReboundSurveyArea.setResultType(2); } massReboundSurveyArea.setSurveyStrength(String.valueOf(surveyStrength)); } } - if(massReboundSurveyArea.getOpType()==null||massReboundSurveyArea.getOpType()==0){ - Integer maxNum=massReboundSurveyAreaMapper.selectMaxSurveyNo(massReboundSurveyArea.getFloorId(),massReboundSurveyArea.getProjectSn()); - if(maxNum==null||maxNum==0){ - maxNum=1; - }else{ + if (massReboundSurveyArea.getOpType() == null || massReboundSurveyArea.getOpType() == 0) { + Integer maxNum = massReboundSurveyAreaMapper.selectMaxSurveyNo(massReboundSurveyArea.getFloorId(), massReboundSurveyArea.getProjectSn()); + if (maxNum == null || maxNum == 0) { + maxNum = 1; + } else { maxNum++; } massReboundSurveyArea.setSurveyNo(maxNum); @@ -209,125 +208,128 @@ public class MassReboundSurveyAreaServiceImpl extends ServiceImpl=6d){ - starty=lessThan.getCarbonationDepthSix(); - endy=greaterThan.getCarbonationDepthSix(); + MassReboundConcreteStrengthConversion lessThan = massReboundConcreteStrengthConversionMapper.getLessThanValue(reboundAvgValue, surveyType); + double starty = 0d; + double endy = 0d; + if (carbonationDepthAvg == 0d) { + starty = lessThan.getCarbonationDepthZero(); + endy = greaterThan.getCarbonationDepthZero(); + } else if (carbonationDepthAvg == 0.5d) { + starty = lessThan.getCarbonationDepthZeroPointFive(); + endy = greaterThan.getCarbonationDepthZeroPointFive(); + } else if (carbonationDepthAvg == 1d) { + starty = lessThan.getCarbonationDepthOne(); + endy = greaterThan.getCarbonationDepthOne(); + } else if (carbonationDepthAvg == 1.5d) { + starty = lessThan.getCarbonationDepthOnePointFive(); + endy = greaterThan.getCarbonationDepthOnePointFive(); + } else if (carbonationDepthAvg == 2d) { + starty = lessThan.getCarbonationDepthTwo(); + endy = greaterThan.getCarbonationDepthTwo(); + } else if (carbonationDepthAvg == 2.5d) { + starty = lessThan.getCarbonationDepthTwoPointFive(); + endy = greaterThan.getCarbonationDepthTwoPointFive(); + } else if (carbonationDepthAvg == 3d) { + starty = lessThan.getCarbonationDepthThree(); + endy = greaterThan.getCarbonationDepthThree(); + } else if (carbonationDepthAvg == 3.5d) { + starty = lessThan.getCarbonationDepthThreePointFive(); + endy = greaterThan.getCarbonationDepthThreePointFive(); + } else if (carbonationDepthAvg == 4d) { + starty = lessThan.getCarbonationDepthFour(); + endy = greaterThan.getCarbonationDepthFour(); + } else if (carbonationDepthAvg == 4.5d) { + starty = lessThan.getCarbonationDepthFourPointFive(); + endy = greaterThan.getCarbonationDepthFourPointFive(); + } else if (carbonationDepthAvg == 5d) { + starty = lessThan.getCarbonationDepthFive(); + endy = greaterThan.getCarbonationDepthFive(); + } else if (carbonationDepthAvg == 5.5d) { + starty = lessThan.getCarbonationDepthFivePointFive(); + endy = greaterThan.getCarbonationDepthFivePointFive(); + } else if (carbonationDepthAvg >= 6d) { + starty = lessThan.getCarbonationDepthSix(); + endy = greaterThan.getCarbonationDepthSix(); } - if(starty==-1d){ + if (starty == -1d) { return "小于10"; } - if(starty==-2d){ + if (starty == -2d) { return "大于60"; } - if(endy==-1d){ + if (endy == -1d) { return "小于10"; } - if(endy==-2d){ + if (endy == -2d) { 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; - }else { + } else { double temp = endx - startx; double mediany = 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)).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; } } - 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为平均回弹值 - 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)) - .subtract(new BigDecimal("7.83"))).setScale(1,BigDecimal.ROUND_HALF_UP).doubleValue(); + 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)) + .subtract(new BigDecimal("7.83"))).setScale(1, BigDecimal.ROUND_HALF_UP).doubleValue(); } @Override public Map selectMassReboundSurveyAreaStatistics(Map param) { - Map data=new HashMap<>(); - Map map=companyService.getCompanyType(param); - List> list=massReboundSurveyAreaMapper.selectMassReboundSurveyAreaStatistics(map); - Map count=massReboundSurveyAreaMapper.selectMassReboundSurveyAreaTotalCount(map); - data.put("list",list); - data.put("count",count); + Map data = new HashMap<>(); + Map map = companyService.getCompanyType(param); + List> list = massReboundSurveyAreaMapper.selectMassReboundSurveyAreaStatistics(map); + Map count = massReboundSurveyAreaMapper.selectMassReboundSurveyAreaTotalCount(map); + data.put("list", list); + data.put("count", count); return data; } @Override public List> selectProvinceMassReboundSurveyAreaCountList(Map param) { - Map map=companyService.getCompanyType(param); + Map map = companyService.getCompanyType(param); return massReboundSurveyAreaMapper.selectProvinceMassReboundSurveyAreaCountList(map); } @Override public Map selectProjectListByProvince(Map param) { - Map data=new HashMap<>(); - Map map=companyService.getCompanyType(param); - List> list=massReboundSurveyAreaMapper.selectProvinceSurveyAreaProjectList(map); - Map count=new HashMap<>(); - count.put("projectNum",list.size()); - int totalSurveyNum=0; - int abnormalSurveyNum=0; - if(list.size()>0){ - for (Map result:list){ - totalSurveyNum=totalSurveyNum+MapUtils.getInteger(result,"totalSurveyNum"); - abnormalSurveyNum=abnormalSurveyNum+MapUtils.getInteger(result,"abnormalSurveyNum"); + Map data = new HashMap<>(); + Map map = companyService.getCompanyType(param); + List> list = massReboundSurveyAreaMapper.selectProvinceSurveyAreaProjectList(map); + Map count = new HashMap<>(); + count.put("projectNum", list.size()); + int totalSurveyNum = 0; + int abnormalSurveyNum = 0; + if (list.size() > 0) { + for (Map result : list) { + totalSurveyNum = totalSurveyNum + MapUtils.getInteger(result, "totalSurveyNum"); + abnormalSurveyNum = abnormalSurveyNum + MapUtils.getInteger(result, "abnormalSurveyNum"); } } - count.put("totalSurveyNum",totalSurveyNum); - count.put("abnormalSurveyNum",abnormalSurveyNum); - data.put("list",list); - data.put("count",count); + count.put("totalSurveyNum", totalSurveyNum); + count.put("abnormalSurveyNum", abnormalSurveyNum); + data.put("list", list); + data.put("count", count); return data; } @@ -338,7 +340,7 @@ public class MassReboundSurveyAreaServiceImpl extends ServiceImpl selectProjectWarnList(Map param) { - Map map=companyService.getCompanyType(param); + Map map = companyService.getCompanyType(param); return massReboundSurveyAreaMapper.selectProjectWarnList(map); } @@ -352,18 +354,23 @@ public class MassReboundSurveyAreaServiceImpl extends ServiceImpl list=massReboundSurveyAreaMapper.selectMassReboundSurveyAreaList(floorId); + List list = massReboundSurveyAreaMapper.selectMassReboundSurveyAreaList(floorId, null); - 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", - "reboundValue3","reboundValue4","reboundValue5","reboundValue6","reboundValue7","reboundValue8","reboundValue9","reboundValue10","reboundValue11", - "reboundValue12","reboundValue13","reboundValue14","reboundValue15","reboundValue16"}; - JxlExcelUtils.excelExport("测量数据列表",heads,headsStr,list,response); + 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", + "reboundValue3", "reboundValue4", "reboundValue5", "reboundValue6", "reboundValue7", "reboundValue8", "reboundValue9", "reboundValue10", "reboundValue11", + "reboundValue12", "reboundValue13", "reboundValue14", "reboundValue15", "reboundValue16"}; + JxlExcelUtils.excelExport("测量数据列表", heads, headsStr, list, response); - }catch (Exception e){ + } catch (Exception e) { e.printStackTrace(); } } + @Override + public List getMassReboundSurveyArea(String floorId, String projectSn) { + return massReboundSurveyAreaMapper.selectMassReboundSurveyAreaList(floorId, projectSn); + } + } diff --git a/src/main/java/com/zhgd/xmgl/security/WebSecurityConfig.java b/src/main/java/com/zhgd/xmgl/security/WebSecurityConfig.java index 3c881a090..2bf989708 100644 --- a/src/main/java/com/zhgd/xmgl/security/WebSecurityConfig.java +++ b/src/main/java/com/zhgd/xmgl/security/WebSecurityConfig.java @@ -328,6 +328,7 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter { .antMatchers("/xmgl/carPassRecord/addCarPassRecord").permitAll() .antMatchers("/xmgl/notice/add").permitAll() .antMatchers("/xmgl/upload/uploadBase64").permitAll() + .antMatchers("/xmgl/massReboundSurveyArea/getMassReboundSurveyArea").permitAll() .antMatchers(HttpMethod.OPTIONS, "/**").anonymous() .anyRequest().authenticated() // 剩下所有的验证都需要验证. .and()