新增图像采集信息,调整缺陷信息
This commit is contained in:
parent
bb63c4b66f
commit
7429c6d43f
|
@ -32,46 +32,32 @@ public class DefectEntity extends AuditableEntity implements Serializable {
|
|||
@ExcelProperty("机组id")
|
||||
@ApiModelProperty("机组id")
|
||||
@TableField("turbine_code")
|
||||
private String turbineCode;
|
||||
private String turbineId;
|
||||
|
||||
@ExcelProperty("叶片号")
|
||||
@ApiModelProperty("叶片号")
|
||||
@TableField("blade_code")
|
||||
private String bladeCode;
|
||||
@ExcelProperty("部件id")
|
||||
@ApiModelProperty("部件id")
|
||||
@TableField("part_id")
|
||||
private String partId;
|
||||
|
||||
@ExcelProperty("损伤面,字典surface_type")
|
||||
@ApiModelProperty("损伤面,字典surface_type")
|
||||
@TableField("surface_type")
|
||||
private String surfaceType;
|
||||
|
||||
@ExcelProperty("缺陷类型,字典defect_type")
|
||||
@ApiModelProperty("缺陷类型,字典defect_type")
|
||||
@ExcelProperty("缺陷类型,枚举DefectTypeEnum")
|
||||
@ApiModelProperty("缺陷类型,枚举DefectTypeEnum")
|
||||
@TableField("defect_type")
|
||||
private String defectType;
|
||||
|
||||
@ExcelProperty("危重等级,字典defect_level")
|
||||
@ApiModelProperty("危重等级,字典defect_level")
|
||||
@ExcelProperty("危重等级,枚举DefectLevelEnum")
|
||||
@ApiModelProperty("危重等级,枚举DefectLevelEnum")
|
||||
@TableField("defect_level")
|
||||
private String defectLevel;
|
||||
|
||||
@ExcelProperty("轴向长度(mm)")
|
||||
@ApiModelProperty("轴向长度(mm)")
|
||||
@TableField("axial_length")
|
||||
private BigDecimal axialLength;
|
||||
|
||||
@ExcelProperty("弦向长度(mm)")
|
||||
@ApiModelProperty("弦向长度(mm)")
|
||||
@TableField("chord_length")
|
||||
private BigDecimal chordLength;
|
||||
|
||||
@ExcelProperty("图片路径")
|
||||
@ApiModelProperty("图片路径")
|
||||
@TableField("image_path")
|
||||
private String imagePath;
|
||||
@TableField("defect_image_path")
|
||||
private String defectImagePath;
|
||||
|
||||
@ExcelProperty("图片详情")
|
||||
@ApiModelProperty("图片详情")
|
||||
@TableField("image_hash")
|
||||
private String imageHash;
|
||||
@ExcelProperty("说明")
|
||||
@ApiModelProperty("说明")
|
||||
@TableField("description")
|
||||
private String description;
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,74 @@
|
|||
package com.dite.znpt.domain.entity;
|
||||
|
||||
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.dite.znpt.domain.AuditableEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @Author: gaoxiong
|
||||
* @Date: 2025/4/24 20:33
|
||||
* @Description:
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("image_collect")
|
||||
@ApiModel(value="ImageEntity对象", description="图像采集信息表")
|
||||
public class ImageCollectEntity extends AuditableEntity implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = -2957687117182827156L;
|
||||
|
||||
@ApiModelProperty("图像采集id")
|
||||
@TableId(value = "collect", type = IdType.ASSIGN_UUID)
|
||||
private String collectId;
|
||||
|
||||
@ApiModelProperty("拍摄时间-起")
|
||||
@TableField("shooting_time_begin")
|
||||
private LocalDateTime shootingTimeBegin;
|
||||
|
||||
@ApiModelProperty("拍摄时间-讫")
|
||||
@TableField("shooting_time_end")
|
||||
private LocalDateTime shootingTimeEnd;
|
||||
|
||||
@ApiModelProperty("天气")
|
||||
@TableField("weather,枚举:WeatherEnum")
|
||||
private String weather;
|
||||
|
||||
@ApiModelProperty("湿度(百分比)")
|
||||
@TableField("humidness")
|
||||
private Integer humidness;
|
||||
|
||||
@ApiModelProperty("温度-低")
|
||||
@TableField("temperature_min")
|
||||
private Double temperatureMin;
|
||||
|
||||
@ApiModelProperty("温度-高")
|
||||
@TableField("temperature_max")
|
||||
private Double temperatureMax;
|
||||
|
||||
@ApiModelProperty("风力等级")
|
||||
@TableField("wind_level")
|
||||
private Integer windLevel;
|
||||
|
||||
@ApiModelProperty("拍摄方式,枚举ShootingMethodEnum")
|
||||
@TableField("shooting_method")
|
||||
private String shootingMethod;
|
||||
|
||||
@ApiModelProperty("拍摄方式,枚举ShootingDistanceEnum")
|
||||
@TableField("shooting_distance")
|
||||
private Integer shootingDistance;
|
||||
|
||||
@ApiModelProperty("采集员姓名")
|
||||
@TableField("collector_name")
|
||||
private String collectorName;
|
||||
}
|
|
@ -23,15 +23,19 @@ import java.time.LocalDateTime;
|
|||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("image")
|
||||
@ApiModel(value="ImageEntity对象", description="图像信息表")
|
||||
public class ImageEntity extends AuditableEntity implements Serializable {
|
||||
public class ImageEntity extends AuditableEntity implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = -7702927820673158420L;
|
||||
|
||||
@ApiModelProperty("图像id")
|
||||
@TableId(value = "part_id", type = IdType.ASSIGN_UUID)
|
||||
@TableId(value = "image_id", type = IdType.ASSIGN_UUID)
|
||||
private String imageId;
|
||||
|
||||
@ApiModelProperty("图像采集id")
|
||||
@TableField("collect_id")
|
||||
private String collectId;
|
||||
|
||||
@ApiModelProperty("部件id")
|
||||
@TableField("part_id")
|
||||
private String partId;
|
||||
|
@ -68,4 +72,12 @@ public class ImageEntity extends AuditableEntity implements Serializable {
|
|||
@TableField("camera_model")
|
||||
private String cameraModel;
|
||||
|
||||
@ApiModelProperty("影像类型")
|
||||
@TableField("image_type,枚举ImageTypeEnum")
|
||||
private String imageType;
|
||||
|
||||
@ApiModelProperty("图片路径")
|
||||
@TableField("image_path")
|
||||
private String imagePath;
|
||||
|
||||
}
|
||||
|
|
|
@ -21,35 +21,20 @@ public class DefectListReq implements Serializable {
|
|||
@ApiModelProperty("查询关键字")
|
||||
private String keyword;
|
||||
|
||||
@ApiModelProperty("缺陷记录Id")
|
||||
@ApiModelProperty("缺陷id")
|
||||
private String defectId;
|
||||
|
||||
@ApiModelProperty("机组id")
|
||||
private String turbineCode;
|
||||
private String turbineId;
|
||||
|
||||
@ApiModelProperty("叶片号")
|
||||
private String bladeCode;
|
||||
@ApiModelProperty("部件id")
|
||||
private String partId;
|
||||
|
||||
@ApiModelProperty("损伤面,字典surface_type")
|
||||
private String surfaceType;
|
||||
|
||||
@ApiModelProperty("缺陷类型,字典defect_type")
|
||||
@ApiModelProperty("缺陷类型,枚举:DefectTypeEnum")
|
||||
private String defectType;
|
||||
|
||||
@ApiModelProperty("危重等级,字典defect_level")
|
||||
@ApiModelProperty("危重等级,枚举:DefectLevelEnum")
|
||||
private String defectLevel;
|
||||
|
||||
@ApiModelProperty("轴向长度(mm)")
|
||||
private BigDecimal axialLength;
|
||||
|
||||
@ApiModelProperty("弦向长度(mm)")
|
||||
private BigDecimal chordLength;
|
||||
|
||||
@ApiModelProperty("图片路径")
|
||||
private String imagePath;
|
||||
|
||||
@ApiModelProperty("图片详情")
|
||||
private String imageHash;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
package com.dite.znpt.domain.vo;
|
||||
|
||||
/**
|
||||
* @Author: gaoxiong
|
||||
* @Date: 2025/4/24 21:16
|
||||
* @Description:
|
||||
*/
|
||||
public class ImageCollectResp {
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
package com.dite.znpt.enums;
|
||||
|
||||
/**
|
||||
* @Author: gaoxiong
|
||||
* @Date: 2025/4/24 21:44
|
||||
* @Description:
|
||||
*/
|
||||
public enum DefectLevel {
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
package com.dite.znpt.enums;
|
||||
|
||||
/**
|
||||
* @Author: gaoxiong
|
||||
* @Date: 2025/4/24 21:43
|
||||
* @Description:
|
||||
*/
|
||||
public enum DefectTypeEnum {
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
package com.dite.znpt.enums;
|
||||
|
||||
import cn.hutool.json.JSONObject;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: gaoxiong
|
||||
* @Date: 2025/4/24 21:25
|
||||
* @Description:
|
||||
*/
|
||||
public enum ImageTypeEnum {
|
||||
DEFECT("DEFECT", "缺陷影像"),
|
||||
TYPICAL("TYPICAL", "典型影像"),
|
||||
OTHER("OTHER", "其他影像");
|
||||
private final String code;
|
||||
private final String desc;
|
||||
|
||||
ImageTypeEnum(String code, String desc){
|
||||
this.code = code;
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
public static ImageTypeEnum getByCode(String code){
|
||||
for (ImageTypeEnum e : ImageTypeEnum.values() ) {
|
||||
if(e.code.equals(code)){
|
||||
return e;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static List<JSONObject> listAll(){
|
||||
List<JSONObject> list = new ArrayList<>(ImageTypeEnum.values().length);
|
||||
for (ImageTypeEnum e : ImageTypeEnum.values() ) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.set(e.code, e.desc);
|
||||
list.add(jsonObject);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
package com.dite.znpt.enums;
|
||||
|
||||
import cn.hutool.json.JSONObject;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: gaoxiong
|
||||
* @Date: 2025/4/24 20:43
|
||||
* @Description:
|
||||
*/
|
||||
@Getter
|
||||
public enum ShootingMethodEnum {
|
||||
UAV("UAV", "无人机航拍"),
|
||||
HANDHELD_CAMERA("HANDHELD_CAMERA", "手持相机拍摄");
|
||||
|
||||
private final String code;
|
||||
private final String desc;
|
||||
|
||||
ShootingMethodEnum(String code, String desc){
|
||||
this.code = code;
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
private ShootingMethodEnum getByCode(String code){
|
||||
for (ShootingMethodEnum e : ShootingMethodEnum.values() ) {
|
||||
if(e.code.equals(code)){
|
||||
return e;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static List<JSONObject> listAll(){
|
||||
List<JSONObject> list = new ArrayList<>(ShootingMethodEnum.values().length);
|
||||
for (ShootingMethodEnum e : ShootingMethodEnum.values() ) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.set(e.code, e.desc);
|
||||
list.add(jsonObject);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,66 @@
|
|||
package com.dite.znpt.enums;
|
||||
|
||||
import cn.hutool.json.JSONObject;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: gaoxiong
|
||||
* @Date: 2025/4/24 20:40
|
||||
* @Description:
|
||||
*/
|
||||
@Getter
|
||||
public enum WeatherEnum {
|
||||
|
||||
SUNNY("SUNNY","晴天"),
|
||||
CLOUDY("CLOUDY","多云"),
|
||||
OVERCAST("OVERCAST","阴天"),
|
||||
LIGHT_RAIN("LIGHT_RAIN","小雨"),
|
||||
MODERATE_RAIN("MODERATE_RAIN","中雨"),
|
||||
HEAVY_RAIN("HEAVY_RAIN","大雨"),
|
||||
CLOUDBURST("CLOUDBURST","暴雨"),
|
||||
SHOWER("SHOWER","阵雨"),
|
||||
THUNDERSHOWER("THUNDERSHOWER","雷阵雨"),
|
||||
THUNDER("THUNDER","雷电"),
|
||||
HAIL("HAIL","冰雹"),
|
||||
LIGHT_FOG("LIGHT_FOG","轻雾"),
|
||||
FOG("FOG","雾"),
|
||||
THICK_FOG("THICK_FOG","浓雾"),
|
||||
HAZE("HAZE","霾"),
|
||||
SLEET("SLEET","雨夹雪"),
|
||||
LIGHT_SNOW("LIGHT_SNOW","小雪"),
|
||||
MODERATE_SNOW("MODERATE_SNOW","中雪"),
|
||||
HEAVY_SNOW("HEAVY_SNOW","大雪"),
|
||||
BLIZZARD("BLIZZARD","暴雪"),
|
||||
FREEZING_RAIN("FREEZING_RAIN","冻雨");
|
||||
|
||||
private final String code;
|
||||
private final String desc;
|
||||
|
||||
WeatherEnum(String code, String desc){
|
||||
this.code = code;
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
public static WeatherEnum getByCode(String code){
|
||||
for (WeatherEnum e : WeatherEnum.values() ) {
|
||||
if(e.code.equals(code)){
|
||||
return e;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static List<JSONObject> listAll(){
|
||||
List<JSONObject> list = new ArrayList<>(WeatherEnum.values().length);
|
||||
for (WeatherEnum e : WeatherEnum.values() ) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.set(e.code, e.desc);
|
||||
list.add(jsonObject);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
package com.dite.znpt.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.dite.znpt.domain.entity.ImageCollectEntity;
|
||||
|
||||
/**
|
||||
* @Author: gaoxiong
|
||||
* @Date: 2025/4/24 21:14
|
||||
* @Description:
|
||||
*/
|
||||
public interface ImageCollectMapper extends BaseMapper<ImageCollectEntity> {
|
||||
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
package com.dite.znpt.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.dite.znpt.domain.entity.ImageCollectEntity;
|
||||
|
||||
/**
|
||||
* @Author: gaoxiong
|
||||
* @Date: 2025/4/24 21:20
|
||||
* @Description:
|
||||
*/
|
||||
public interface ImageCollectService extends IService<ImageCollectEntity> {
|
||||
}
|
|
@ -52,7 +52,6 @@ public class DefectServiceImpl extends ServiceImpl<DefectMapper, DefectEntity> i
|
|||
public DefectResp selectById(String defectId) {
|
||||
DefectListReq defectReq = new DefectListReq();
|
||||
defectReq.setDefectId(defectId);
|
||||
|
||||
List<DefectResp> list = selectList(defectReq);
|
||||
return list.isEmpty() ? CollUtil.getFirst(list) : new DefectResp();
|
||||
}
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
package com.dite.znpt.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.dite.znpt.domain.entity.ImageCollectEntity;
|
||||
import com.dite.znpt.mapper.ImageCollectMapper;
|
||||
import com.dite.znpt.service.ImageCollectService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @Author: gaoxiong
|
||||
* @Date: 2025/4/24 21:20
|
||||
* @Description:
|
||||
*/
|
||||
@Service
|
||||
public class ImageCollectServiceImpl extends ServiceImpl<ImageCollectMapper, ImageCollectEntity> implements ImageCollectService {
|
||||
|
||||
}
|
|
@ -3,9 +3,7 @@
|
|||
<mapper namespace="com.dite.znpt.mapper.DefectMapper">
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
a.defect_id, a.turbine_code, a.blade_code, a.surface_type,
|
||||
a.defect_type, a.defect_level, a.axial_length, a.chord_length,
|
||||
a.image_path, a.image_hash
|
||||
a.defect_id, a.turbine_id, a.part_id, a.defect_code, a.defect_name, a.defect_type, a.defect_level, a.defect_image_path, a.description
|
||||
</sql>
|
||||
|
||||
<select id="queryBySelective" resultType="com.dite.znpt.domain.vo.DefectResp">
|
||||
|
@ -14,37 +12,17 @@
|
|||
from defect a
|
||||
<where>
|
||||
<if test="keyword != null and keyword != ''">
|
||||
# and (a.TODO like concat('%', #{keyword,jdbcType=VARCHAR}, '%') or a.TODO like concat('%', #{keyword,jdbcType=VARCHAR}, '%'))
|
||||
# and (a.defect_name like concat('%', #{keyword,jdbcType=VARCHAR}, '%') or a.defect_code like concat('%', #{keyword,jdbcType=VARCHAR}, '%'))
|
||||
</if>
|
||||
<if test="defectId != null and defectId != ''">
|
||||
and a.defect_id like concat ('%', #{defectId}, '%')
|
||||
</if>
|
||||
<if test="turbineCode != null and turbineCode != ''">
|
||||
and a.turbine_code like concat ('%', #{turbineCode}, '%')
|
||||
</if>
|
||||
<if test="bladeCode != null and bladeCode != ''">
|
||||
and a.blade_code like concat ('%', #{bladeCode}, '%')
|
||||
</if>
|
||||
<if test="surfaceType != null and surfaceType != ''">
|
||||
and a.surface_type like concat ('%', #{surfaceType}, '%')
|
||||
<if test="partId != null and partId != ''">
|
||||
and a.part_id = #{turbineCode}
|
||||
</if>
|
||||
|
||||
<if test="defectType != null and defectType != ''">
|
||||
and a.defect_type like concat ('%', #{defectType}, '%')
|
||||
and a.defect_type = #{defectType}
|
||||
</if>
|
||||
<if test="defectLevel != null and defectLevel != ''">
|
||||
and a.defect_level like concat ('%', #{defectLevel}, '%')
|
||||
</if>
|
||||
<if test="axialLength != null">
|
||||
and a.axial_length = #{axialLength}
|
||||
</if>
|
||||
<if test="chordLength != null">
|
||||
and a.chord_length = #{chordLength}
|
||||
</if>
|
||||
<if test="imagePath != null and imagePath != ''">
|
||||
and a.image_path like concat ('%', #{imagePath}, '%')
|
||||
</if>
|
||||
<if test="imageHash != null and imageHash != ''">
|
||||
and a.image_hash like concat ('%', #{imageHash}, '%')
|
||||
and a.defect_level = #{defectLevel}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
<?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">
|
||||
<mapper namespace="com.dite.znpt.mapper.ImageCollectMapper">
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
a.collect_id, a.shooting_time_begin, a.shooting_time_end, a.weather, a.humidness, a.temperature_min, a.temperature_max, a.wind_level, a.shooting_method,
|
||||
a.shooting_distance, a.collector_name,
|
||||
</sql>
|
||||
|
||||
<select id="queryBySelective" resultType="com.dite.znpt.domain.vo.ImageCollectResp">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from image_collect_info a
|
||||
</select>
|
||||
</mapper>
|
||||
|
Loading…
Reference in New Issue