抗压抗折一体机
This commit is contained in:
parent
8c27d7980d
commit
3dbb2476ec
@ -1,8 +1,6 @@
|
|||||||
package com.zhgd.xmgl.enums;
|
package com.zhgd.xmgl.enums;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
import lombok.experimental.UtilityClass;
|
import lombok.experimental.UtilityClass;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
@ -576,5 +574,53 @@ public class ParamEnum {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 试验类型:1混凝土试件抗压强度试验,2钢筋试验,3钢筋焊接接头试验,4钢筋机械连接接头试验,5水泥砂浆立方体抗压强度试验,6水泥砂浆立方体抗压强度试验(建筑),7水泥净浆物理性能试验,8水泥胶砂强度试验,9水泥胶砂抗折试验,10水泥净浆抗折试验,11水泥混凝土圆柱体轴心抗压强度试验,12后张预应力孔道压浆抗压强度试验,13后张预应力孔道压浆抗折强度试验,14无机结合料稳定材料无侧限抗压强度试验,15复检钢筋焊接接头试验,16复检钢筋机械连接接头试验
|
||||||
|
*/
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
|
||||||
|
public enum UniversalTestManageTestTypeEnum implements BaseEnum {
|
||||||
|
HNTSJKYQDSY(1, "混凝土试件抗压强度试验"),
|
||||||
|
GJSY(2, "钢筋试验"),
|
||||||
|
GJHJJTSY(3, "钢筋焊接接头试验"),
|
||||||
|
GJJXLJJTSY(4, "钢筋机械连接接头试验"),
|
||||||
|
SNSJLFTKYQDSY(5, "水泥砂浆立方体抗压强度试验"),
|
||||||
|
SNSJLFTKYQDSYJZ(6, "水泥砂浆立方体抗压强度试验(建筑)"),
|
||||||
|
SNJJWLXNSY(7, "水泥净浆物理性能试验"),
|
||||||
|
SNJSQDSY(8, "水泥胶砂强度试验"),
|
||||||
|
SNJSKZSY(9, "水泥胶砂抗折试验"),
|
||||||
|
SNJJKZSY(10, "水泥净浆抗折试验"),
|
||||||
|
SNHNTYZTZXKYQDSY(11, "水泥混凝土圆柱体轴心抗压强度试验"),
|
||||||
|
HZYYLKDYJKYQDSY(12, "后张预应力孔道压浆抗压强度试验"),
|
||||||
|
HZYYLKDYJKZQDSY(13, "后张预应力孔道压浆抗折强度试验"),
|
||||||
|
WJJHLWDCLWZXKYQDSY(14, "无机结合料稳定材料无侧限抗压强度试验"),
|
||||||
|
FJGJHJJTSY(15, "复检钢筋焊接接头试验"),
|
||||||
|
FJGJJXLJJTSY(16, "复检钢筋机械连接接头试验"),
|
||||||
|
;
|
||||||
|
|
||||||
|
UniversalTestManageTestTypeEnum(Integer value, String desc) {
|
||||||
|
this.value = value;
|
||||||
|
this.desc = desc;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Integer value;
|
||||||
|
private String desc;
|
||||||
|
|
||||||
|
public Integer getValue() {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setValue(Integer value) {
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDesc() {
|
||||||
|
return desc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDesc(String desc) {
|
||||||
|
this.desc = desc;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,8 @@
|
|||||||
package com.zhgd.xmgl.modules.antipressurefold.controller;
|
package com.zhgd.xmgl.modules.antipressurefold.controller;
|
||||||
|
|
||||||
|
import com.zhgd.xmgl.base.entity.vo.SectorVo;
|
||||||
|
import com.zhgd.xmgl.base.entity.vo.TrendOneVo;
|
||||||
|
import com.zhgd.xmgl.modules.antipressurefold.entity.vo.CountAntiPressureFoldManageVo;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
@ -182,4 +185,34 @@ public class AntiPressureFoldManageController {
|
|||||||
return mv;
|
return mv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "统计合格趋势(试验合格率)", notes = "统计合格趋势(试验合格率)", httpMethod = "POST")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "projectSn", value = "项目sn", paramType = "body", required = true, dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "type", value = "1今日2、7日3、30日", paramType = "body", required = true, dataType = "Integer"),
|
||||||
|
@ApiImplicitParam(name = "status", value = "状态:1合格2不合格3未判定", paramType = "body", required = false, dataType = "Integer"),
|
||||||
|
})
|
||||||
|
@PostMapping(value = "/countStatus")
|
||||||
|
public Result<List<TrendOneVo>> countStatus(@ApiIgnore @RequestBody HashMap<String, Object> paramMap) {
|
||||||
|
return Result.success(antiPressureFoldManageService.countStatus(paramMap));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "统计试验类型(今日试验类型)", notes = "统计试验类型(今日试验类型)", httpMethod = "POST")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "projectSn", value = "项目sn", paramType = "body", required = true, dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "devSn", value = "设备sn", paramType = "body", required = false, dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "type", value = "1今日2、7日3、30日", paramType = "body", required = true, dataType = "Integer"),
|
||||||
|
})
|
||||||
|
@PostMapping(value = "/countTestType")
|
||||||
|
public Result<SectorVo> countTestType(@ApiIgnore @RequestBody HashMap<String, Object> paramMap) {
|
||||||
|
return Result.success(antiPressureFoldManageService.countTestType(paramMap));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "统计抗压抗折一体机-管理(实时监测)", notes = "统计抗压抗折一体机-管理(实时监测)", httpMethod = "POST")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "projectSn", value = "项目sn", paramType = "body", required = true, dataType = "String"),
|
||||||
|
})
|
||||||
|
@PostMapping(value = "/countAntiPressureFoldManage")
|
||||||
|
public Result<CountAntiPressureFoldManageVo> countAntiPressureFoldManage(@ApiIgnore @RequestBody HashMap<String, Object> paramMap) {
|
||||||
|
return Result.success(antiPressureFoldManageService.countAntiPressureFoldManage(paramMap));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,12 @@
|
|||||||
|
package com.zhgd.xmgl.modules.antipressurefold.entity.vo;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class CountAntiPressureFoldManageVo {
|
||||||
|
@ApiModelProperty(value = "今日试验次数")
|
||||||
|
private java.lang.Integer testTodayNum;
|
||||||
|
@ApiModelProperty(value = "累计试验次数")
|
||||||
|
private java.lang.Integer testTotalNum;
|
||||||
|
}
|
||||||
@ -4,11 +4,15 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.zhgd.xmgl.base.entity.vo.SectorOneVo;
|
||||||
|
import com.zhgd.xmgl.base.entity.vo.TrendOneVo;
|
||||||
import com.zhgd.xmgl.modules.antipressurefold.entity.AntiPressureFoldManage;
|
import com.zhgd.xmgl.modules.antipressurefold.entity.AntiPressureFoldManage;
|
||||||
|
import com.zhgd.xmgl.modules.antipressurefold.entity.vo.CountAntiPressureFoldManageVo;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -23,4 +27,10 @@ public interface AntiPressureFoldManageMapper extends BaseMapper<AntiPressureFol
|
|||||||
IPage<AntiPressureFoldManage> queryList(Page<AntiPressureFoldManage> page, @Param(Constants.WRAPPER) QueryWrapper<AntiPressureFoldManage> queryWrapper);
|
IPage<AntiPressureFoldManage> queryList(Page<AntiPressureFoldManage> page, @Param(Constants.WRAPPER) QueryWrapper<AntiPressureFoldManage> queryWrapper);
|
||||||
|
|
||||||
List<AntiPressureFoldManage> queryList(@Param(Constants.WRAPPER) QueryWrapper<AntiPressureFoldManage> queryWrapper);
|
List<AntiPressureFoldManage> queryList(@Param(Constants.WRAPPER) QueryWrapper<AntiPressureFoldManage> queryWrapper);
|
||||||
|
|
||||||
|
List<TrendOneVo> countStatus(HashMap<String, Object> paramMap);
|
||||||
|
|
||||||
|
List<SectorOneVo> countTestType(HashMap<String, Object> paramMap);
|
||||||
|
|
||||||
|
CountAntiPressureFoldManageVo countAntiPressureFoldManage(HashMap<String, Object> paramMap);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,4 +6,64 @@
|
|||||||
join anti_pressure_fold_dev apfd on apfd.dev_sn=apfm.dev_sn
|
join anti_pressure_fold_dev apfd on apfd.dev_sn=apfm.dev_sn
|
||||||
${ew.customSqlSegment}
|
${ew.customSqlSegment}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="countStatus" resultType="com.zhgd.xmgl.base.entity.vo.TrendOneVo">
|
||||||
|
select
|
||||||
|
<if test="type == '1'.toString()">
|
||||||
|
date_format(test_time,'%Y-%m-%d %H:00') x,
|
||||||
|
</if>
|
||||||
|
<if test="type == '2'.toString()">
|
||||||
|
date_format(test_time,'%Y-%m-%d') x,
|
||||||
|
</if>
|
||||||
|
<if test="type == '3'.toString()">
|
||||||
|
date_format(test_time,'%Y-%m-%d') x,
|
||||||
|
</if>
|
||||||
|
count(*) y from anti_pressure_fold_manage
|
||||||
|
where project_sn=#{projectSn}
|
||||||
|
<if test="devSn != null and devSn != ''">
|
||||||
|
and dev_sn = #{devSn}
|
||||||
|
</if>
|
||||||
|
<if test="type == '1'.toString()">
|
||||||
|
and test_time > current_date
|
||||||
|
</if>
|
||||||
|
<if test="type == '2'.toString()">
|
||||||
|
and test_time > date_sub(test_time,interval 6 day)
|
||||||
|
</if>
|
||||||
|
<if test="type == '3'.toString()">
|
||||||
|
and test_time > date_sub(test_time,interval 29 day)
|
||||||
|
</if>
|
||||||
|
<if test="status != null and status != ''">
|
||||||
|
and status = #{status}
|
||||||
|
</if>
|
||||||
|
group by x
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="countTestType" resultType="com.zhgd.xmgl.base.entity.vo.SectorOneVo">
|
||||||
|
select test_type enumType,count(*) count
|
||||||
|
from anti_pressure_fold_manage
|
||||||
|
where project_sn=#{projectSn}
|
||||||
|
<if test="devSn != null and devSn != ''">
|
||||||
|
and dev_sn = #{devSn}
|
||||||
|
</if>
|
||||||
|
<if test="type == '1'.toString()">
|
||||||
|
and test_time > current_date
|
||||||
|
</if>
|
||||||
|
<if test="type == '2'.toString()">
|
||||||
|
and test_time > date_sub(test_time,interval 6 day)
|
||||||
|
</if>
|
||||||
|
<if test="type == '3'.toString()">
|
||||||
|
and test_time > date_sub(test_time,interval 29 day)
|
||||||
|
</if>
|
||||||
|
group by test_type
|
||||||
|
</select>
|
||||||
|
<select id="countAntiPressureFoldManage"
|
||||||
|
resultType="com.zhgd.xmgl.modules.antipressurefold.entity.vo.CountAntiPressureFoldManageVo">
|
||||||
|
select count(*) testTotalNum,
|
||||||
|
ifnull(sum(if(test_time>current_date,1,0)),0) testTodayNum
|
||||||
|
from anti_pressure_fold_manage
|
||||||
|
where project_sn=#{projectSn}
|
||||||
|
<if test="devSn != null and devSn != ''">
|
||||||
|
and dev_sn = #{devSn}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@ -1,8 +1,11 @@
|
|||||||
package com.zhgd.xmgl.modules.antipressurefold.service;
|
package com.zhgd.xmgl.modules.antipressurefold.service;
|
||||||
|
|
||||||
|
import com.zhgd.xmgl.base.entity.vo.SectorVo;
|
||||||
|
import com.zhgd.xmgl.base.entity.vo.TrendOneVo;
|
||||||
import com.zhgd.xmgl.modules.antipressurefold.entity.AntiPressureFoldManage;
|
import com.zhgd.xmgl.modules.antipressurefold.entity.AntiPressureFoldManage;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.zhgd.xmgl.modules.antipressurefold.entity.vo.CountAntiPressureFoldManageVo;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -18,4 +21,10 @@ public interface IAntiPressureFoldManageService extends IService<AntiPressureFol
|
|||||||
IPage<AntiPressureFoldManage> queryPageList(HashMap<String, Object> paramMap);
|
IPage<AntiPressureFoldManage> queryPageList(HashMap<String, Object> paramMap);
|
||||||
|
|
||||||
List<AntiPressureFoldManage> queryList(HashMap<String, Object> paramMap);
|
List<AntiPressureFoldManage> queryList(HashMap<String, Object> paramMap);
|
||||||
|
|
||||||
|
List<TrendOneVo> countStatus(HashMap<String, Object> paramMap);
|
||||||
|
|
||||||
|
SectorVo countTestType(HashMap<String, Object> paramMap);
|
||||||
|
|
||||||
|
CountAntiPressureFoldManageVo countAntiPressureFoldManage(HashMap<String, Object> paramMap);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,15 +5,22 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
||||||
|
import com.zhgd.xmgl.base.entity.vo.SectorVo;
|
||||||
|
import com.zhgd.xmgl.base.entity.vo.TrendOneVo;
|
||||||
|
import com.zhgd.xmgl.enums.ParamEnum;
|
||||||
import com.zhgd.xmgl.modules.antipressurefold.entity.AntiPressureFoldManage;
|
import com.zhgd.xmgl.modules.antipressurefold.entity.AntiPressureFoldManage;
|
||||||
|
import com.zhgd.xmgl.modules.antipressurefold.entity.vo.CountAntiPressureFoldManageVo;
|
||||||
import com.zhgd.xmgl.modules.antipressurefold.mapper.AntiPressureFoldManageMapper;
|
import com.zhgd.xmgl.modules.antipressurefold.mapper.AntiPressureFoldManageMapper;
|
||||||
import com.zhgd.xmgl.modules.antipressurefold.service.IAntiPressureFoldManageService;
|
import com.zhgd.xmgl.modules.antipressurefold.service.IAntiPressureFoldManageService;
|
||||||
|
import com.zhgd.xmgl.util.DateUtils;
|
||||||
import com.zhgd.xmgl.util.PageUtil;
|
import com.zhgd.xmgl.util.PageUtil;
|
||||||
import com.zhgd.xmgl.util.RefUtil;
|
import com.zhgd.xmgl.util.RefUtil;
|
||||||
|
import org.apache.commons.collections.MapUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 抗压抗折一体机-管理
|
* @Description: 抗压抗折一体机-管理
|
||||||
@ -38,6 +45,37 @@ public class AntiPressureFoldManageServiceImpl extends ServiceImpl<AntiPressureF
|
|||||||
return dealList(baseMapper.queryList(queryWrapper));
|
return dealList(baseMapper.queryList(queryWrapper));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<TrendOneVo> countStatus(HashMap<String, Object> paramMap) {
|
||||||
|
Integer type = MapUtils.getInteger(paramMap, "type");
|
||||||
|
String format = null;
|
||||||
|
List<String> dateTimeStrList = null;
|
||||||
|
if (Objects.equals(type, 1)) {
|
||||||
|
format = "HH:00";
|
||||||
|
dateTimeStrList = DateUtils.getDateTimeStrList(100, "yyyy-MM-dd HH:00");
|
||||||
|
} else if (Objects.equals(type, 2)) {
|
||||||
|
format = "yyyy-MM-dd";
|
||||||
|
dateTimeStrList = DateUtils.getDateTimeStrList(60, "yyyy-MM-dd");
|
||||||
|
} else if (Objects.equals(type, 3)) {
|
||||||
|
format = "yyyy-MM-dd";
|
||||||
|
dateTimeStrList = DateUtils.getDateTimeStrList(80, "yyyy-MM-dd");
|
||||||
|
} else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
List<TrendOneVo> list = baseMapper.countStatus(paramMap);
|
||||||
|
return TrendOneVo.fillTrendVos(list, dateTimeStrList, format);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SectorVo countTestType(HashMap<String, Object> paramMap) {
|
||||||
|
return SectorVo.getSectorVoByEnum(baseMapper.countTestType(paramMap), ParamEnum.UniversalTestManageTestTypeEnum.values());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CountAntiPressureFoldManageVo countAntiPressureFoldManage(HashMap<String, Object> paramMap) {
|
||||||
|
return baseMapper.countAntiPressureFoldManage(paramMap);
|
||||||
|
}
|
||||||
|
|
||||||
private QueryWrapper<AntiPressureFoldManage> getQueryWrapper(HashMap<String, Object> paramMap) {
|
private QueryWrapper<AntiPressureFoldManage> getQueryWrapper(HashMap<String, Object> paramMap) {
|
||||||
String alias = "apfm.";
|
String alias = "apfm.";
|
||||||
QueryWrapper<AntiPressureFoldManage> queryWrapper = QueryGenerator.initPageQueryWrapper(AntiPressureFoldManage.class, paramMap, alias);
|
QueryWrapper<AntiPressureFoldManage> queryWrapper = QueryGenerator.initPageQueryWrapper(AntiPressureFoldManage.class, paramMap, alias);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user