Merge branch 'master' into gaea
# Conflicts: # core/src/main/java/com/dite/znpt/domain/entity/ProjectEntity.java
This commit is contained in:
commit
b9900214cd
11
core/pom.xml
11
core/pom.xml
|
@ -140,6 +140,17 @@
|
||||||
<artifactId>metadata-extractor</artifactId>
|
<artifactId>metadata-extractor</artifactId>
|
||||||
<version>2.15.0</version>
|
<version>2.15.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<!-- mapstruct驱动包 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.mapstruct</groupId>
|
||||||
|
<artifactId>mapstruct</artifactId>
|
||||||
|
<version>1.4.1.Final</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.mapstruct</groupId>
|
||||||
|
<artifactId>mapstruct-processor</artifactId>
|
||||||
|
<version>1.4.1.Final</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
package com.dite.znpt.constant;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: gaoxiong
|
||||||
|
* @Date: 2025/4/26 23:19
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
public class Message implements Serializable {
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 4010434089386946123L;
|
||||||
|
|
||||||
|
public static final String IMAGE_IS_EMPTY = "图像信息为空";
|
||||||
|
public static final String IMAGE_PATH_IS_NOT_EXIST = "图像地址不存在";
|
||||||
|
public static final String IMAGE_ID_IS_NOT_EXIST = "图像id不存在";
|
||||||
|
public static final String DEFECT_ID_IS_NOT_EXIST = "缺陷id不存在";
|
||||||
|
}
|
|
@ -0,0 +1,32 @@
|
||||||
|
package com.dite.znpt.converts;
|
||||||
|
|
||||||
|
import com.dite.znpt.domain.entity.DefectEntity;
|
||||||
|
import com.dite.znpt.domain.entity.ImageCollectEntity;
|
||||||
|
import com.dite.znpt.domain.entity.ImageEntity;
|
||||||
|
import com.dite.znpt.domain.vo.DefectReq;
|
||||||
|
import com.dite.znpt.domain.vo.DefectResp;
|
||||||
|
import com.dite.znpt.domain.vo.ImageCollectReq;
|
||||||
|
import com.dite.znpt.domain.vo.ImageReq;
|
||||||
|
import org.mapstruct.Mapper;
|
||||||
|
import org.mapstruct.NullValuePropertyMappingStrategy;
|
||||||
|
import org.mapstruct.factory.Mappers;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: gaoxiong
|
||||||
|
* @Date: 2025/4/26 1:32
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
@Mapper(nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE)
|
||||||
|
public interface Converts {
|
||||||
|
Converts INSTANCE = Mappers.getMapper(Converts.class);
|
||||||
|
|
||||||
|
List<ImageEntity> toImageEntity(List<ImageReq> list);
|
||||||
|
|
||||||
|
ImageCollectEntity toImageCollectEntity(ImageCollectReq req);
|
||||||
|
|
||||||
|
DefectEntity toDefectEntity(DefectReq req);
|
||||||
|
|
||||||
|
DefectResp toDefectResp(DefectEntity entity);
|
||||||
|
}
|
|
@ -20,7 +20,6 @@ import java.util.List;
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@Data
|
@Data
|
||||||
@SuperBuilder(toBuilder = true)
|
|
||||||
public class AuditableEntity implements Serializable {
|
public class AuditableEntity implements Serializable {
|
||||||
private static final long serialVersionUID = 141481953116476081L;
|
private static final long serialVersionUID = 141481953116476081L;
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@ package com.dite.znpt.domain.entity;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.*;
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
import com.dite.znpt.domain.AuditableEntity;
|
import com.dite.znpt.domain.AuditableEntity;
|
||||||
|
@ -29,15 +30,25 @@ public class DefectEntity extends AuditableEntity implements Serializable {
|
||||||
@TableId(value = "defect_id", type = IdType.ASSIGN_UUID)
|
@TableId(value = "defect_id", type = IdType.ASSIGN_UUID)
|
||||||
private String defectId;
|
private String defectId;
|
||||||
|
|
||||||
@ExcelProperty("机组id")
|
@ExcelProperty("图像id")
|
||||||
@ApiModelProperty("机组id")
|
@ApiModelProperty("图像id")
|
||||||
@TableField("turbine_code")
|
@TableField("image_id")
|
||||||
private String turbineId;
|
private String imageId;
|
||||||
|
|
||||||
@ExcelProperty("部件id")
|
@ExcelProperty("缺陷编码")
|
||||||
@ApiModelProperty("部件id")
|
@ApiModelProperty("缺陷编码")
|
||||||
@TableField("part_id")
|
@TableField("defect_code")
|
||||||
private String partId;
|
private String defectCode;
|
||||||
|
|
||||||
|
@ExcelProperty("缺陷名称")
|
||||||
|
@ApiModelProperty("缺陷名称")
|
||||||
|
@TableField("defect_name")
|
||||||
|
private String defectName;
|
||||||
|
|
||||||
|
@ExcelProperty("缺陷部位")
|
||||||
|
@ApiModelProperty("缺陷部位")
|
||||||
|
@TableField("defect_position")
|
||||||
|
private String defectPosition;
|
||||||
|
|
||||||
@ExcelProperty("缺陷类型,枚举DefectTypeEnum")
|
@ExcelProperty("缺陷类型,枚举DefectTypeEnum")
|
||||||
@ApiModelProperty("缺陷类型,枚举DefectTypeEnum")
|
@ApiModelProperty("缺陷类型,枚举DefectTypeEnum")
|
||||||
|
@ -49,15 +60,45 @@ public class DefectEntity extends AuditableEntity implements Serializable {
|
||||||
@TableField("defect_level")
|
@TableField("defect_level")
|
||||||
private String defectLevel;
|
private String defectLevel;
|
||||||
|
|
||||||
|
@ExcelProperty("维修状态,枚举RepairStatusEnum")
|
||||||
|
@ApiModelProperty("维修状态,枚举RepairStatusEnum")
|
||||||
|
@TableField("repair_status")
|
||||||
|
private String repairStatus;
|
||||||
|
|
||||||
@ExcelProperty("图片路径")
|
@ExcelProperty("检测时间")
|
||||||
@ApiModelProperty("图片路径")
|
@ApiModelProperty("检测时间")
|
||||||
@TableField("defect_image_path")
|
@TableField("detection_time")
|
||||||
private String defectImagePath;
|
private LocalDateTime detectionTime;
|
||||||
|
|
||||||
|
@ExcelProperty("来源")
|
||||||
|
@ApiModelProperty("来源")
|
||||||
|
@TableField("source")
|
||||||
|
private String source;
|
||||||
|
|
||||||
|
@ExcelProperty("弦向")
|
||||||
|
@ApiModelProperty("弦向")
|
||||||
|
@TableField("chordwise")
|
||||||
|
private Integer chordwise;
|
||||||
|
|
||||||
|
@ExcelProperty("轴向")
|
||||||
|
@ApiModelProperty("轴向")
|
||||||
|
@TableField("axial")
|
||||||
|
private Integer axial;
|
||||||
|
|
||||||
|
@ExcelProperty("标注信息")
|
||||||
|
@ApiModelProperty("标注信息")
|
||||||
|
@TableField("label_info")
|
||||||
|
private String labelInfo;
|
||||||
|
|
||||||
@ExcelProperty("说明")
|
@ExcelProperty("说明")
|
||||||
@ApiModelProperty("说明")
|
@ApiModelProperty("说明")
|
||||||
@TableField("description")
|
@TableField("description")
|
||||||
private String description;
|
private String description;
|
||||||
|
|
||||||
|
@ExcelProperty("维修建议")
|
||||||
|
@ApiModelProperty("维修建议")
|
||||||
|
@TableField("repair_idea")
|
||||||
|
private String repairIdea;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,9 +29,13 @@ public class ImageCollectEntity extends AuditableEntity implements Serializable
|
||||||
private static final long serialVersionUID = -2957687117182827156L;
|
private static final long serialVersionUID = -2957687117182827156L;
|
||||||
|
|
||||||
@ApiModelProperty("图像采集id")
|
@ApiModelProperty("图像采集id")
|
||||||
@TableId(value = "collect", type = IdType.ASSIGN_UUID)
|
@TableId(value = "collect_id", type = IdType.ASSIGN_UUID)
|
||||||
private String collectId;
|
private String collectId;
|
||||||
|
|
||||||
|
@ApiModelProperty("部件id")
|
||||||
|
@TableField("part_id")
|
||||||
|
private String partId;
|
||||||
|
|
||||||
@ApiModelProperty("拍摄时间-起")
|
@ApiModelProperty("拍摄时间-起")
|
||||||
@TableField("shooting_time_begin")
|
@TableField("shooting_time_begin")
|
||||||
private LocalDateTime shootingTimeBegin;
|
private LocalDateTime shootingTimeBegin;
|
||||||
|
@ -40,8 +44,8 @@ public class ImageCollectEntity extends AuditableEntity implements Serializable
|
||||||
@TableField("shooting_time_end")
|
@TableField("shooting_time_end")
|
||||||
private LocalDateTime shootingTimeEnd;
|
private LocalDateTime shootingTimeEnd;
|
||||||
|
|
||||||
@ApiModelProperty("天气")
|
@ApiModelProperty("天气,枚举:WeatherEnum")
|
||||||
@TableField("weather,枚举:WeatherEnum")
|
@TableField("weather")
|
||||||
private String weather;
|
private String weather;
|
||||||
|
|
||||||
@ApiModelProperty("湿度(百分比)")
|
@ApiModelProperty("湿度(百分比)")
|
||||||
|
@ -64,10 +68,14 @@ public class ImageCollectEntity extends AuditableEntity implements Serializable
|
||||||
@TableField("shooting_method")
|
@TableField("shooting_method")
|
||||||
private String shootingMethod;
|
private String shootingMethod;
|
||||||
|
|
||||||
@ApiModelProperty("拍摄方式,枚举ShootingDistanceEnum")
|
@ApiModelProperty("拍摄距离")
|
||||||
@TableField("shooting_distance")
|
@TableField("shooting_distance")
|
||||||
private Integer shootingDistance;
|
private Integer shootingDistance;
|
||||||
|
|
||||||
|
@ApiModelProperty("采集员id")
|
||||||
|
@TableField("collector_id")
|
||||||
|
private String collectorId;
|
||||||
|
|
||||||
@ApiModelProperty("采集员姓名")
|
@ApiModelProperty("采集员姓名")
|
||||||
@TableField("collector_name")
|
@TableField("collector_name")
|
||||||
private String collectorName;
|
private String collectorName;
|
||||||
|
|
|
@ -12,6 +12,7 @@ import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
import java.io.Serial;
|
import java.io.Serial;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -36,30 +37,46 @@ public class ImageEntity extends AuditableEntity implements Serializable {
|
||||||
@TableField("collect_id")
|
@TableField("collect_id")
|
||||||
private String collectId;
|
private String collectId;
|
||||||
|
|
||||||
@ApiModelProperty("部件id")
|
|
||||||
@TableField("part_id")
|
|
||||||
private String partId;
|
|
||||||
|
|
||||||
@ApiModelProperty("项目id")
|
|
||||||
@TableField("project_id")
|
|
||||||
private String projectId;
|
|
||||||
|
|
||||||
@ApiModelProperty("机组id")
|
|
||||||
@TableField("turbine_id")
|
|
||||||
private String turbineId;
|
|
||||||
|
|
||||||
@ApiModelProperty("图像名称")
|
@ApiModelProperty("图像名称")
|
||||||
@TableField("image_name")
|
@TableField("image_name")
|
||||||
private String imageName;
|
private String imageName;
|
||||||
|
|
||||||
@ApiModelProperty("图像尺寸")
|
@ApiModelProperty("图像大小")
|
||||||
@TableField("image_size")
|
@TableField("image_size")
|
||||||
private String imageSize;
|
private String imageSize;
|
||||||
|
|
||||||
|
@ApiModelProperty("图像宽")
|
||||||
|
@TableField("image_width")
|
||||||
|
private String imageWidth;
|
||||||
|
|
||||||
|
@ApiModelProperty("图像高")
|
||||||
|
@TableField("image_height")
|
||||||
|
private String imageHeight;
|
||||||
|
|
||||||
|
@ApiModelProperty("图像分辨率")
|
||||||
|
@TableField("image_resolution")
|
||||||
|
private String imageResolution;
|
||||||
|
|
||||||
|
@ApiModelProperty("焦平面X轴分辨率")
|
||||||
|
@TableField("x_resolution")
|
||||||
|
private String xResolution;
|
||||||
|
|
||||||
|
@ApiModelProperty("焦平面Y轴分辨率")
|
||||||
|
@TableField("y_resolution")
|
||||||
|
private String YResolution;
|
||||||
|
|
||||||
|
@ApiModelProperty("焦平面分辨率单位")
|
||||||
|
@TableField("resolution_units")
|
||||||
|
private String ResolutionUnits;
|
||||||
|
|
||||||
@ApiModelProperty("焦距")
|
@ApiModelProperty("焦距")
|
||||||
@TableField("focal_distance")
|
@TableField("focal_distance")
|
||||||
private String focalDistance;
|
private String focalDistance;
|
||||||
|
|
||||||
|
@ApiModelProperty("35毫米焦距")
|
||||||
|
@TableField("focal_distance35")
|
||||||
|
private String focalDistance35;
|
||||||
|
|
||||||
@ApiModelProperty("拍摄时间")
|
@ApiModelProperty("拍摄时间")
|
||||||
@TableField("shooting_time")
|
@TableField("shooting_time")
|
||||||
private LocalDateTime shootingTime;
|
private LocalDateTime shootingTime;
|
||||||
|
@ -84,8 +101,12 @@ public class ImageEntity extends AuditableEntity implements Serializable {
|
||||||
@TableField("altitude")
|
@TableField("altitude")
|
||||||
private String altitude;
|
private String altitude;
|
||||||
|
|
||||||
|
@ApiModelProperty("GPS")
|
||||||
|
@TableField("GPS")
|
||||||
|
private String GPS;
|
||||||
|
|
||||||
@ApiModelProperty("影像类型")
|
@ApiModelProperty("影像类型")
|
||||||
@TableField("image_type,枚举ImageTypeEnum")
|
@TableField("image_type")
|
||||||
private String imageType;
|
private String imageType;
|
||||||
|
|
||||||
@ApiModelProperty("图片路径")
|
@ApiModelProperty("图片路径")
|
||||||
|
|
|
@ -38,11 +38,6 @@ public class PersonnelEntity extends AuditableEntity implements Serializable {
|
||||||
@TableField("role_type")
|
@TableField("role_type")
|
||||||
private String roleType;
|
private String roleType;
|
||||||
|
|
||||||
@ExcelProperty("公司id")
|
|
||||||
@ApiModelProperty("公司id")
|
|
||||||
@TableField("company_id")
|
|
||||||
private String companyId;
|
|
||||||
|
|
||||||
@ExcelProperty("密码")
|
@ExcelProperty("密码")
|
||||||
@ApiModelProperty("密码")
|
@ApiModelProperty("密码")
|
||||||
@TableField("password")
|
@TableField("password")
|
||||||
|
|
|
@ -1,41 +0,0 @@
|
||||||
package com.dite.znpt.domain.entity;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.*;
|
|
||||||
import com.dite.znpt.domain.AuditableEntity;
|
|
||||||
import io.swagger.annotations.ApiModel;
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
import com.alibaba.excel.annotation.ExcelProperty;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author huise23
|
|
||||||
* @date 2025/04/11 23:17
|
|
||||||
* @Description: 项目-公司关联信息表实体类
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = false)
|
|
||||||
@TableName("project_company")
|
|
||||||
@ApiModel(value="ProjectCompanyEntity对象", description="项目-公司关联信息表")
|
|
||||||
public class ProjectCompanyEntity extends AuditableEntity implements Serializable {
|
|
||||||
|
|
||||||
private static final long serialVersionUID = -98876147355655939L;
|
|
||||||
|
|
||||||
@ExcelProperty("项目id")
|
|
||||||
@ApiModelProperty("项目id")
|
|
||||||
@TableId(value = "project_id", type = IdType.ASSIGN_UUID)
|
|
||||||
private String projectId;
|
|
||||||
|
|
||||||
@ExcelProperty("公司id")
|
|
||||||
@ApiModelProperty("公司id")
|
|
||||||
@TableField("company_id")
|
|
||||||
private String companyId;
|
|
||||||
|
|
||||||
@ExcelProperty("单位类型(检查/委托)")
|
|
||||||
@ApiModelProperty("单位类型(检查/委托)")
|
|
||||||
@TableField("relation_type")
|
|
||||||
private String relationType;
|
|
||||||
}
|
|
||||||
|
|
|
@ -4,6 +4,7 @@ import java.io.Serializable;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.*;
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
import com.dite.znpt.domain.AuditableEntity;
|
import com.dite.znpt.domain.AuditableEntity;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
@ -33,6 +34,10 @@ public class ProjectEntity extends AuditableEntity implements Serializable {
|
||||||
@TableField("project_name")
|
@TableField("project_name")
|
||||||
private String projectName;
|
private String projectName;
|
||||||
|
|
||||||
|
@ApiModelProperty("项目封面")
|
||||||
|
@TableField("cover_url")
|
||||||
|
private String coverUrl;
|
||||||
|
|
||||||
@ExcelProperty("风场名称")
|
@ExcelProperty("风场名称")
|
||||||
@ApiModelProperty("风场名称")
|
@ApiModelProperty("风场名称")
|
||||||
@TableField("farm_name")
|
@TableField("farm_name")
|
||||||
|
@ -43,10 +48,29 @@ public class ProjectEntity extends AuditableEntity implements Serializable {
|
||||||
@TableField("farm_address")
|
@TableField("farm_address")
|
||||||
private String farmAddress;
|
private String farmAddress;
|
||||||
|
|
||||||
@ExcelProperty("检查方式,字典method_id")
|
@ApiModelProperty("委托单位")
|
||||||
@ApiModelProperty("检查方式,字典method_id")
|
@TableField("client")
|
||||||
@TableField("method_id")
|
private String client;
|
||||||
private String methodId;
|
|
||||||
|
@ApiModelProperty("委托单位联系人")
|
||||||
|
@TableField("client_contact")
|
||||||
|
private String clientContact;
|
||||||
|
|
||||||
|
@ApiModelProperty("委托单位联系电话")
|
||||||
|
@TableField("client_phone")
|
||||||
|
private String clientPhone;
|
||||||
|
|
||||||
|
@ApiModelProperty("检查单位")
|
||||||
|
@TableField("inspection_unit")
|
||||||
|
private String inspectionUnit;
|
||||||
|
|
||||||
|
@ApiModelProperty("检查单位联系人")
|
||||||
|
@TableField("inspection_contact")
|
||||||
|
private String inspectionContact;
|
||||||
|
|
||||||
|
@ApiModelProperty("检查单位联系电话")
|
||||||
|
@TableField("inspection_phone")
|
||||||
|
private String inspectionPhone;
|
||||||
|
|
||||||
@ExcelProperty("项目规模")
|
@ExcelProperty("项目规模")
|
||||||
@ApiModelProperty("项目规模")
|
@ApiModelProperty("项目规模")
|
||||||
|
@ -58,16 +82,61 @@ public class ProjectEntity extends AuditableEntity implements Serializable {
|
||||||
@TableField("turbine_model")
|
@TableField("turbine_model")
|
||||||
private String turbineModel;
|
private String turbineModel;
|
||||||
|
|
||||||
@ExcelProperty("项目状态,字典project_status")
|
@ApiModelProperty("施工人员")
|
||||||
@ApiModelProperty("项目状态,字典project_status")
|
@TableField("construction_personnel")
|
||||||
@TableField("status")
|
private String constructionPersonnel;
|
||||||
private String status;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "项目工作类型 可能有多项,逗号分隔", example = "1", notes = "项目工作类型 可能有多项,逗号分隔")
|
@ApiModelProperty("施工人员id")
|
||||||
|
@TableField("construction_personnel_id")
|
||||||
|
private String constructionPersonnelId;
|
||||||
|
|
||||||
|
@ApiModelProperty("安全员id")
|
||||||
|
@TableField("auditor_id")
|
||||||
|
private String auditorId;
|
||||||
|
|
||||||
|
@ApiModelProperty("质量员id")
|
||||||
|
@TableField("quality_officer_id")
|
||||||
|
private String qualityOfficerId;
|
||||||
|
|
||||||
|
@ApiModelProperty("项目经理id")
|
||||||
|
@TableField("project_manager_id")
|
||||||
|
private String projectManagerId;
|
||||||
|
|
||||||
|
@ApiModelProperty("施工组长id")
|
||||||
|
@TableField("construction_team_leader_id")
|
||||||
|
private String constructionTeamLeaderId;
|
||||||
|
|
||||||
|
@ApiModelProperty("技术方案图片,多个用逗号隔开")
|
||||||
|
@JsonIgnore
|
||||||
|
@TableField("technical_image")
|
||||||
|
private String technicalImage;
|
||||||
|
|
||||||
|
@ApiModelProperty("技术方案内容")
|
||||||
|
@TableField("technical_content")
|
||||||
|
private String technicalContent;
|
||||||
|
|
||||||
|
@ApiModelProperty("安全措施图片,多个用逗号隔开")
|
||||||
|
@JsonIgnore
|
||||||
|
@TableField("safety_image")
|
||||||
|
private String safetyImage;
|
||||||
|
|
||||||
|
@ApiModelProperty("安全措施内容")
|
||||||
|
@TableField("safety_content")
|
||||||
|
private String safetyContent;
|
||||||
|
|
||||||
|
@ApiModelProperty("交底内容")
|
||||||
|
@TableField("disclose_content")
|
||||||
|
private String discloseContent;
|
||||||
|
|
||||||
|
@ApiModelProperty("状态:0待施工,1施工中,2已完工,3已审核,4已验收")
|
||||||
|
@TableField("status")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
@ApiModelProperty("项目工作类型 可能有多项,逗号分隔")
|
||||||
@TableField("work_type")
|
@TableField("work_type")
|
||||||
private String workType;
|
private String workType;
|
||||||
|
|
||||||
@ApiModelProperty(value = "项目工作岗位 可能有多项,逗号分隔", example = "1", notes = "项目工作岗位 可能有多项,逗号分隔")
|
@ApiModelProperty("项目工作岗位 可能有多项,json对象保存")
|
||||||
@TableField("job")
|
@TableField("job")
|
||||||
private String job;
|
private String job;
|
||||||
|
|
||||||
|
|
|
@ -1,51 +0,0 @@
|
||||||
package com.dite.znpt.domain.entity;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.*;
|
|
||||||
import com.dite.znpt.domain.AuditableEntity;
|
|
||||||
import io.swagger.annotations.ApiModel;
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
import com.alibaba.excel.annotation.ExcelProperty;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author huise23
|
|
||||||
* @date 2025/04/11 23:17
|
|
||||||
* @Description: 公司信息表实体类
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = false)
|
|
||||||
@TableName("t_company")
|
|
||||||
@ApiModel(value="TCompanyEntity对象", description="公司信息表")
|
|
||||||
public class TCompanyEntity extends AuditableEntity implements Serializable {
|
|
||||||
|
|
||||||
private static final long serialVersionUID = 348031306551320799L;
|
|
||||||
|
|
||||||
@ExcelProperty("公司id")
|
|
||||||
@ApiModelProperty("公司id")
|
|
||||||
@TableId(value = "company_id", type = IdType.ASSIGN_UUID)
|
|
||||||
private String companyId;
|
|
||||||
|
|
||||||
@ExcelProperty("公司名称")
|
|
||||||
@ApiModelProperty("公司名称")
|
|
||||||
@TableField("company_name")
|
|
||||||
private String companyName;
|
|
||||||
|
|
||||||
@ExcelProperty("公司地址")
|
|
||||||
@ApiModelProperty("公司地址")
|
|
||||||
@TableField("address")
|
|
||||||
private String address;
|
|
||||||
|
|
||||||
@ExcelProperty("联系人")
|
|
||||||
@ApiModelProperty("联系人")
|
|
||||||
@TableField("contact")
|
|
||||||
private String contact;
|
|
||||||
|
|
||||||
@ExcelProperty("电话")
|
|
||||||
@ApiModelProperty("电话")
|
|
||||||
@TableField("phone")
|
|
||||||
private String phone;
|
|
||||||
}
|
|
||||||
|
|
|
@ -52,5 +52,13 @@ public class TurbineEntity extends AuditableEntity implements Serializable {
|
||||||
@ApiModelProperty("机组型号")
|
@ApiModelProperty("机组型号")
|
||||||
@TableField("model")
|
@TableField("model")
|
||||||
private String model;
|
private String model;
|
||||||
|
|
||||||
|
@ApiModelProperty("封面图")
|
||||||
|
@TableField("cover_url")
|
||||||
|
private String coverUrl;
|
||||||
|
|
||||||
|
@ApiModelProperty("状态:0待施工,1施工中,2已完工,3已审核,4已验收")
|
||||||
|
@TableField("status")
|
||||||
|
private Integer status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,9 +27,6 @@ public class DefectListReq implements Serializable {
|
||||||
@ApiModelProperty("机组id")
|
@ApiModelProperty("机组id")
|
||||||
private String turbineId;
|
private String turbineId;
|
||||||
|
|
||||||
@ApiModelProperty("部件id")
|
|
||||||
private String partId;
|
|
||||||
|
|
||||||
@ApiModelProperty("缺陷类型,枚举:DefectTypeEnum")
|
@ApiModelProperty("缺陷类型,枚举:DefectTypeEnum")
|
||||||
private String defectType;
|
private String defectType;
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
package com.dite.znpt.domain.vo;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: gaoxiong
|
||||||
|
* @Date: 2025/4/27 21:23
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel("缺陷记录列表响应实体")
|
||||||
|
public class DefectListResp implements Serializable {
|
||||||
|
|
||||||
|
@ApiModelProperty("缺陷id")
|
||||||
|
private String defectId;
|
||||||
|
|
||||||
|
@ApiModelProperty("缺陷名称")
|
||||||
|
private String defectName;
|
||||||
|
|
||||||
|
@ApiModelProperty("缺陷编码")
|
||||||
|
private String defectCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("部件名称")
|
||||||
|
private String partName;
|
||||||
|
|
||||||
|
@ApiModelProperty("缺陷未知")
|
||||||
|
private String defectPosition;
|
||||||
|
|
||||||
|
@ApiModelProperty("说明")
|
||||||
|
private String description;
|
||||||
|
}
|
|
@ -0,0 +1,59 @@
|
||||||
|
package com.dite.znpt.domain.vo;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: gaoxiong
|
||||||
|
* @Date: 2025/4/27 21:16
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel("缺陷记录请求实体")
|
||||||
|
public class DefectReq implements Serializable {
|
||||||
|
|
||||||
|
@ApiModelProperty("缺陷编码")
|
||||||
|
private String defectCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("缺陷名称")
|
||||||
|
private String defectName;
|
||||||
|
|
||||||
|
@ApiModelProperty("缺陷部位")
|
||||||
|
private String defectPosition;
|
||||||
|
|
||||||
|
@ApiModelProperty("缺陷类型,枚举DefectTypeEnum")
|
||||||
|
private String defectType;
|
||||||
|
|
||||||
|
@ApiModelProperty("危重等级,枚举DefectLevelEnum")
|
||||||
|
private String defectLevel;
|
||||||
|
|
||||||
|
@ApiModelProperty("维修状态,枚举RepairStatusEnum")
|
||||||
|
private String repairStatus;
|
||||||
|
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
@ApiModelProperty("检测时间")
|
||||||
|
private LocalDate detectionDate;
|
||||||
|
|
||||||
|
@ApiModelProperty("来源,枚举:DefectSourceEnum")
|
||||||
|
private String source;
|
||||||
|
|
||||||
|
@ApiModelProperty("弦向")
|
||||||
|
private Integer chordwise;
|
||||||
|
|
||||||
|
@ApiModelProperty("轴向")
|
||||||
|
private Integer axial;
|
||||||
|
|
||||||
|
@ApiModelProperty("标注信息")
|
||||||
|
private String labelInfo;
|
||||||
|
|
||||||
|
@ApiModelProperty("说明")
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
@ApiModelProperty("维修建议")
|
||||||
|
private String repairIdea;
|
||||||
|
}
|
|
@ -1,9 +1,16 @@
|
||||||
package com.dite.znpt.domain.vo;
|
package com.dite.znpt.domain.vo;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
import com.dite.znpt.domain.entity.DefectEntity;
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author huise23
|
* @author huise23
|
||||||
|
@ -11,8 +18,26 @@ import com.dite.znpt.domain.entity.DefectEntity;
|
||||||
* @Description: 缺陷记录响应实体
|
* @Description: 缺陷记录响应实体
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@ApiModel("缺陷记录响应实体")
|
@ApiModel("缺陷记录响应实体")
|
||||||
public class DefectResp extends DefectEntity {
|
public class DefectResp extends DefectReq implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 7723957970600470768L;
|
||||||
|
|
||||||
|
@ApiModelProperty("缺陷id")
|
||||||
|
private String defectId;
|
||||||
|
|
||||||
|
@ApiModelProperty("缺陷类型描述")
|
||||||
|
private String defectTypeLabel;
|
||||||
|
|
||||||
|
@ApiModelProperty("危重等级描述")
|
||||||
|
private String defectLevelLabel;
|
||||||
|
|
||||||
|
@ApiModelProperty("维修状态描述")
|
||||||
|
private String repairStatusLabel;
|
||||||
|
|
||||||
|
@ApiModelProperty("来源描述")
|
||||||
|
private String sourceLabel;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,50 @@
|
||||||
|
package com.dite.znpt.domain.vo;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: gaoxiong
|
||||||
|
* @Date: 2025/4/24 21:16
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel("图像拍摄信息")
|
||||||
|
public class ImageCollectInfo implements Serializable {
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 6594307991137605975L;
|
||||||
|
|
||||||
|
@ApiModelProperty("图像采集信息id")
|
||||||
|
private String collectId;
|
||||||
|
|
||||||
|
@ApiModelProperty("天气,枚举:WeatherEnum")
|
||||||
|
private String weather;
|
||||||
|
|
||||||
|
@ApiModelProperty("天气描述")
|
||||||
|
private String weatherLabel;
|
||||||
|
|
||||||
|
@ApiModelProperty("湿度(百分比)")
|
||||||
|
private Integer humidness;
|
||||||
|
|
||||||
|
@ApiModelProperty("温度")
|
||||||
|
private String temperature;
|
||||||
|
|
||||||
|
@ApiModelProperty("风力等级")
|
||||||
|
private Integer windLevel;
|
||||||
|
|
||||||
|
@ApiModelProperty("拍摄方式,枚举ShootingMethodEnum")
|
||||||
|
private String shootingMethod;
|
||||||
|
|
||||||
|
@ApiModelProperty("拍摄方式描述")
|
||||||
|
private String shootingMethodLabel;
|
||||||
|
|
||||||
|
@ApiModelProperty("拍摄距离")
|
||||||
|
private Integer shootingDistance;
|
||||||
|
|
||||||
|
@ApiModelProperty("采集员姓名")
|
||||||
|
private String collectorName;
|
||||||
|
}
|
|
@ -0,0 +1,63 @@
|
||||||
|
package com.dite.znpt.domain.vo;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: gaoxiong
|
||||||
|
* @Date: 2025/4/26 1:11
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel("图像采集信息请求实体")
|
||||||
|
public class ImageCollectReq implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 8937301872925896770L;
|
||||||
|
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@ApiModelProperty("拍摄时间-起")
|
||||||
|
private LocalDateTime shootingTimeBegin;
|
||||||
|
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@ApiModelProperty("拍摄时间-讫")
|
||||||
|
private LocalDateTime shootingTimeEnd;
|
||||||
|
|
||||||
|
@ApiModelProperty("天气,枚举:WeatherEnum")
|
||||||
|
private String weather;
|
||||||
|
|
||||||
|
@ApiModelProperty("湿度(百分比)")
|
||||||
|
private Integer humidness;
|
||||||
|
|
||||||
|
@ApiModelProperty("温度-低")
|
||||||
|
private Double temperatureMin;
|
||||||
|
|
||||||
|
@ApiModelProperty("温度-高")
|
||||||
|
private Double temperatureMax;
|
||||||
|
|
||||||
|
@ApiModelProperty("风力等级")
|
||||||
|
private Integer windLevel;
|
||||||
|
|
||||||
|
@ApiModelProperty("拍摄方式,枚举ShootingMethodEnum")
|
||||||
|
private String shootingMethod;
|
||||||
|
|
||||||
|
@ApiModelProperty("拍摄距离")
|
||||||
|
private Integer shootingDistance;
|
||||||
|
|
||||||
|
@ApiModelProperty("采集员id")
|
||||||
|
private String collectorId;
|
||||||
|
|
||||||
|
@ApiModelProperty("采集员姓名")
|
||||||
|
private String collectorName;
|
||||||
|
|
||||||
|
@ApiModelProperty("图像信息")
|
||||||
|
private List<ImageReq> imageList;
|
||||||
|
}
|
|
@ -1,9 +0,0 @@
|
||||||
package com.dite.znpt.domain.vo;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Author: gaoxiong
|
|
||||||
* @Date: 2025/4/24 21:16
|
|
||||||
* @Description:
|
|
||||||
*/
|
|
||||||
public class ImageCollectResp {
|
|
||||||
}
|
|
|
@ -0,0 +1,67 @@
|
||||||
|
package com.dite.znpt.domain.vo;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: gaoxiong
|
||||||
|
* @Date: 2025/4/26 23:35
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel("图像Exif信息")
|
||||||
|
public class ImageExifInfo implements Serializable {
|
||||||
|
|
||||||
|
@ApiModelProperty("图像宽")
|
||||||
|
private String imageWidth;
|
||||||
|
|
||||||
|
@ApiModelProperty("图像高")
|
||||||
|
private String imageHeight;
|
||||||
|
|
||||||
|
@ApiModelProperty("图像分辨率")
|
||||||
|
private String imageResolution;
|
||||||
|
|
||||||
|
@ApiModelProperty("焦距")
|
||||||
|
private String focalDistance;
|
||||||
|
|
||||||
|
@ApiModelProperty("35毫米焦距")
|
||||||
|
private String focalDistance35;
|
||||||
|
|
||||||
|
@ApiModelProperty("焦平面X轴分辨率")
|
||||||
|
@TableField("x_resolution")
|
||||||
|
private String xResolution;
|
||||||
|
|
||||||
|
@ApiModelProperty("焦平面Y轴分辨率")
|
||||||
|
@TableField("y_resolution")
|
||||||
|
private String yResolution;
|
||||||
|
|
||||||
|
@ApiModelProperty("焦平面分辨率单位")
|
||||||
|
@TableField("resolution_units")
|
||||||
|
private String resolutionUnits;
|
||||||
|
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@ApiModelProperty("拍摄时间")
|
||||||
|
private LocalDateTime shootingTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("相机制造商")
|
||||||
|
private String cameraManufacturer;
|
||||||
|
|
||||||
|
@ApiModelProperty("相机型号")
|
||||||
|
private String cameraModel;
|
||||||
|
|
||||||
|
@ApiModelProperty("经度")
|
||||||
|
private String longitude;
|
||||||
|
|
||||||
|
@ApiModelProperty("纬度")
|
||||||
|
private String latitude;
|
||||||
|
|
||||||
|
@ApiModelProperty("海拔")
|
||||||
|
private String altitude;
|
||||||
|
|
||||||
|
}
|
|
@ -1,6 +1,7 @@
|
||||||
package com.dite.znpt.domain.vo;
|
package com.dite.znpt.domain.vo;
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serial;
|
import java.io.Serial;
|
||||||
|
@ -12,8 +13,18 @@ import java.io.Serializable;
|
||||||
* @description
|
* @description
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@ApiModel("图像信息列表查询实体")
|
@ApiModel("图像采集信息列表查询实体")
|
||||||
public class ImageListReq implements Serializable {
|
public class ImageListReq implements Serializable {
|
||||||
@Serial
|
@Serial
|
||||||
private static final long serialVersionUID = 671014582625089979L;
|
private static final long serialVersionUID = 671014582625089979L;
|
||||||
|
|
||||||
|
@ApiModelProperty("关键字")
|
||||||
|
private String keyword;
|
||||||
|
|
||||||
|
@ApiModelProperty("机组id")
|
||||||
|
private String turbineId;
|
||||||
|
|
||||||
|
@ApiModelProperty("图像类型")
|
||||||
|
private String[] imageTypes;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,86 @@
|
||||||
|
package com.dite.znpt.domain.vo;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: gaoxiong
|
||||||
|
* @Date: 2025/4/26 21:07
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel("图像列表信息响应实体")
|
||||||
|
public class ImageListResp implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 3168482118066685077L;
|
||||||
|
|
||||||
|
@ApiModelProperty("图像id")
|
||||||
|
private String imageId;
|
||||||
|
|
||||||
|
@ApiModelProperty("图像名称")
|
||||||
|
@TableField("image_name")
|
||||||
|
private String imageName;
|
||||||
|
|
||||||
|
@ApiModelProperty("部件名称")
|
||||||
|
private String partName;
|
||||||
|
|
||||||
|
@ApiModelProperty("图像分辨率")
|
||||||
|
private String imageResolution;
|
||||||
|
|
||||||
|
@ApiModelProperty("焦距")
|
||||||
|
private String focalDistance;
|
||||||
|
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@ApiModelProperty("拍摄时间")
|
||||||
|
private LocalDateTime shootingTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("相机制造商")
|
||||||
|
private String cameraManufacturer;
|
||||||
|
|
||||||
|
@ApiModelProperty("相机型号")
|
||||||
|
private String cameraModel;
|
||||||
|
|
||||||
|
@ApiModelProperty("GPS")
|
||||||
|
private String GPS;
|
||||||
|
|
||||||
|
@ApiModelProperty("天气,枚举:WeatherEnum")
|
||||||
|
private String weather;
|
||||||
|
|
||||||
|
@ApiModelProperty("天气描述")
|
||||||
|
private String weatherLabel;
|
||||||
|
|
||||||
|
@ApiModelProperty("湿度(百分比)")
|
||||||
|
private Integer humidness;
|
||||||
|
|
||||||
|
@ApiModelProperty("温度")
|
||||||
|
private String temperature;
|
||||||
|
|
||||||
|
@ApiModelProperty("风力等级")
|
||||||
|
private Integer windLevel;
|
||||||
|
|
||||||
|
@ApiModelProperty("拍摄方式,枚举ShootingMethodEnum")
|
||||||
|
private String shootingMethod;
|
||||||
|
|
||||||
|
@ApiModelProperty("拍摄方式描述")
|
||||||
|
private String shootingMethodLabel;
|
||||||
|
|
||||||
|
@ApiModelProperty("拍摄距离")
|
||||||
|
private Integer shootingDistance;
|
||||||
|
|
||||||
|
@ApiModelProperty("采集员姓名")
|
||||||
|
private String collectorName;
|
||||||
|
|
||||||
|
@ApiModelProperty("影像类型,枚举ImageTypeEnum")
|
||||||
|
private String imageType;
|
||||||
|
|
||||||
|
@ApiModelProperty("影像类型描述")
|
||||||
|
private String imageTypeLabel;
|
||||||
|
}
|
|
@ -0,0 +1,44 @@
|
||||||
|
package com.dite.znpt.domain.vo;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: gaoxiong
|
||||||
|
* @Date: 2025/4/26 1:18
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel("图像信息请求实体")
|
||||||
|
public class ImageReq extends ImageExifInfo implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = -1726859254176864573L;
|
||||||
|
|
||||||
|
@ApiModelProperty("图像id")
|
||||||
|
private String imageId;
|
||||||
|
|
||||||
|
@ApiModelProperty("图像名称")
|
||||||
|
@TableField("image_name")
|
||||||
|
private String imageName;
|
||||||
|
|
||||||
|
@ApiModelProperty("图像大小")
|
||||||
|
private String imageSize;
|
||||||
|
|
||||||
|
@ApiModelProperty("图像分辨率")
|
||||||
|
private String imageResolution;
|
||||||
|
|
||||||
|
@ApiModelProperty("图片路径")
|
||||||
|
private String imagePath;
|
||||||
|
|
||||||
|
@ApiModelProperty("GPS")
|
||||||
|
private String GPS;
|
||||||
|
|
||||||
|
}
|
|
@ -1,10 +1,14 @@
|
||||||
package com.dite.znpt.domain.vo;
|
package com.dite.znpt.domain.vo;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serial;
|
import java.io.Serial;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Bear.G
|
* @author Bear.G
|
||||||
|
@ -16,4 +20,26 @@ import java.io.Serializable;
|
||||||
public class ImageResp implements Serializable {
|
public class ImageResp implements Serializable {
|
||||||
@Serial
|
@Serial
|
||||||
private static final long serialVersionUID = -5215414858454232077L;
|
private static final long serialVersionUID = -5215414858454232077L;
|
||||||
|
|
||||||
|
@ApiModelProperty("图像id")
|
||||||
|
private String imageId;
|
||||||
|
|
||||||
|
@ApiModelProperty("图像名称")
|
||||||
|
private String imageName;
|
||||||
|
|
||||||
|
@ApiModelProperty("图像路径")
|
||||||
|
private String imagePath;
|
||||||
|
|
||||||
|
@ApiModelProperty("图像大小")
|
||||||
|
private String imageSize;
|
||||||
|
|
||||||
|
@ApiModelProperty("图像分辨率")
|
||||||
|
private String imageResolution;
|
||||||
|
|
||||||
|
@ApiModelProperty("图像Exif信息")
|
||||||
|
private ImageExifInfo imageExifInfo;
|
||||||
|
|
||||||
|
@ApiModelProperty("图像拍摄信息")
|
||||||
|
private ImageCollectInfo imageCollectInfo;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,33 +0,0 @@
|
||||||
package com.dite.znpt.domain.vo;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModel;
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author huise23
|
|
||||||
* @date 2025/04/11 23:17
|
|
||||||
* @Description: 项目-公司关联信息请求实体
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@ApiModel("项目-公司关联信息列表请求实体")
|
|
||||||
public class ProjectCompanyListReq implements Serializable {
|
|
||||||
|
|
||||||
private static final long serialVersionUID = 598388421634125600L;
|
|
||||||
|
|
||||||
@ApiModelProperty("查询关键字")
|
|
||||||
private String keyword;
|
|
||||||
|
|
||||||
@ApiModelProperty("项目-公司关联信息Id")
|
|
||||||
private String projectId;
|
|
||||||
|
|
||||||
@ApiModelProperty("公司id")
|
|
||||||
private String companyId;
|
|
||||||
|
|
||||||
@ApiModelProperty("单位类型(检查/委托)")
|
|
||||||
private String relationType;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,18 +0,0 @@
|
||||||
package com.dite.znpt.domain.vo;
|
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModel;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
import com.dite.znpt.domain.entity.ProjectCompanyEntity;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author huise23
|
|
||||||
* @date 2025/04/11 23:17
|
|
||||||
* @Description: 项目-公司关联信息响应实体
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@ApiModel("项目-公司关联信息响应实体")
|
|
||||||
public class ProjectCompanyResp extends ProjectCompanyEntity {
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,39 +0,0 @@
|
||||||
package com.dite.znpt.domain.vo;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModel;
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author huise23
|
|
||||||
* @date 2025/04/11 23:17
|
|
||||||
* @Description: 公司信息请求实体
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@ApiModel("公司信息列表请求实体")
|
|
||||||
public class TCompanyListReq implements Serializable {
|
|
||||||
|
|
||||||
private static final long serialVersionUID = 710069618133737043L;
|
|
||||||
|
|
||||||
@ApiModelProperty("查询关键字")
|
|
||||||
private String keyword;
|
|
||||||
|
|
||||||
@ApiModelProperty("公司信息Id")
|
|
||||||
private String companyId;
|
|
||||||
|
|
||||||
@ApiModelProperty("公司名称")
|
|
||||||
private String companyName;
|
|
||||||
|
|
||||||
@ApiModelProperty("公司地址")
|
|
||||||
private String address;
|
|
||||||
|
|
||||||
@ApiModelProperty("联系人")
|
|
||||||
private String contact;
|
|
||||||
|
|
||||||
@ApiModelProperty("电话")
|
|
||||||
private String phone;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,18 +0,0 @@
|
||||||
package com.dite.znpt.domain.vo;
|
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModel;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
import com.dite.znpt.domain.entity.TCompanyEntity;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author huise23
|
|
||||||
* @date 2025/04/11 23:17
|
|
||||||
* @Description: 公司信息响应实体
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@ApiModel("公司信息响应实体")
|
|
||||||
public class TCompanyResp extends TCompanyEntity {
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,10 +1,14 @@
|
||||||
package com.dite.znpt.domain.vo;
|
package com.dite.znpt.domain.vo;
|
||||||
|
|
||||||
|
import com.dite.znpt.domain.entity.PartEntity;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import com.dite.znpt.domain.entity.TurbineEntity;
|
import com.dite.znpt.domain.entity.TurbineEntity;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author huise23
|
* @author huise23
|
||||||
* @date 2025/04/11 23:17
|
* @date 2025/04/11 23:17
|
||||||
|
@ -14,5 +18,44 @@ import com.dite.znpt.domain.entity.TurbineEntity;
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@ApiModel("机组-项目关联响应实体")
|
@ApiModel("机组-项目关联响应实体")
|
||||||
public class TurbineResp extends TurbineEntity {
|
public class TurbineResp extends TurbineEntity {
|
||||||
|
|
||||||
|
@ApiModelProperty("部件")
|
||||||
|
private List<PartEntity> partsList;
|
||||||
|
|
||||||
|
@ApiModelProperty("内部工作状态, -1不存在,0未开始、1开始施工、2已提交报告、3审核通过")
|
||||||
|
private String antiThunderWorkStatus;
|
||||||
|
|
||||||
|
@ApiModelProperty("外部工作状态, -1不存在,0未开始、1开始施工、2已提交报告、3审核通过")
|
||||||
|
private String inWorkStatus;
|
||||||
|
|
||||||
|
@ApiModelProperty("防雷工作状态, -1不存在,0未开始、1开始施工、2已提交报告、3审核通过")
|
||||||
|
private String outWorkStatus;
|
||||||
|
|
||||||
|
@ApiModelProperty("数据报告工作状态, -1不存在,0未开始、1开始施工、2已提交报告、3审核通过")
|
||||||
|
private String summaryWorkStatus;
|
||||||
|
|
||||||
|
@ApiModelProperty("内部工作安全员审核状态, -1不存在,0未审核、1审核通过")
|
||||||
|
private String antiThunderWorkSafetyStatus;
|
||||||
|
|
||||||
|
@ApiModelProperty("外部工作安全员审核状态, -1不存在,0未审核、1审核通过")
|
||||||
|
private String inWorkSafetyStatus;
|
||||||
|
|
||||||
|
@ApiModelProperty("防雷工作安全员审核状态, -1不存在,0未审核、1审核通过")
|
||||||
|
private String outWorkSafetyStatus;
|
||||||
|
|
||||||
|
@ApiModelProperty("内部工作质量员审核状态, -1不存在,0未审核、1审核通过")
|
||||||
|
private String antiThunderWorkQualityStatus;
|
||||||
|
|
||||||
|
@ApiModelProperty("外部工作质量员审核状态, -1不存在,0未审核、1审核通过")
|
||||||
|
private String inWorkQualityStatus;
|
||||||
|
|
||||||
|
@ApiModelProperty("防雷工作质量员审核状态, -1不存在,0未审核、1审核通过")
|
||||||
|
private String outWorkQualityStatus;
|
||||||
|
|
||||||
|
@ApiModelProperty("防雷是否不合格,1不合格,0合格")
|
||||||
|
private Boolean lightningUnqualified;
|
||||||
|
|
||||||
|
@ApiModelProperty("来源, app,backend后台,不传参默认后台")
|
||||||
|
private String source;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
package com.dite.znpt.enums;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Author: gaoxiong
|
|
||||||
* @Date: 2025/4/24 21:44
|
|
||||||
* @Description:
|
|
||||||
*/
|
|
||||||
public enum DefectLevel {
|
|
||||||
}
|
|
|
@ -0,0 +1,52 @@
|
||||||
|
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 21:44
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
public enum DefectLevelEnum {
|
||||||
|
SLIGHT("SLIGHT", "轻微缺陷"),
|
||||||
|
GENERAL("GENERAL", "一般缺陷"),
|
||||||
|
SERIOUS("SERIOUS", "比较严重"),
|
||||||
|
CRITICAL("CRITICAL", "非常严重");
|
||||||
|
|
||||||
|
private final String code;
|
||||||
|
private final String desc;
|
||||||
|
|
||||||
|
DefectLevelEnum(String code, String desc){
|
||||||
|
this.code = code;
|
||||||
|
this.desc = desc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static DefectLevelEnum getByCode(String code){
|
||||||
|
for (DefectLevelEnum e : DefectLevelEnum.values() ) {
|
||||||
|
if(e.code.equals(code)){
|
||||||
|
return e;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getDescByCode(String code){
|
||||||
|
DefectLevelEnum e = getByCode(code);
|
||||||
|
return null == e ? null : e.desc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static List<JSONObject> listAll(){
|
||||||
|
List<JSONObject> list = new ArrayList<>(DefectLevelEnum.values().length);
|
||||||
|
for (DefectLevelEnum e : DefectLevelEnum.values() ) {
|
||||||
|
JSONObject jsonObject = new JSONObject();
|
||||||
|
jsonObject.set(e.code, e.desc);
|
||||||
|
list.add(jsonObject);
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,50 @@
|
||||||
|
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/27 20:55
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
public enum DefectSourceEnum {
|
||||||
|
AI("AI", "智能识别"),
|
||||||
|
MANUAL("MANUAL", "人工标注");
|
||||||
|
|
||||||
|
private final String code;
|
||||||
|
private final String desc;
|
||||||
|
|
||||||
|
DefectSourceEnum(String code, String desc){
|
||||||
|
this.code = code;
|
||||||
|
this.desc = desc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static DefectSourceEnum getByCode(String code){
|
||||||
|
for (DefectSourceEnum e : DefectSourceEnum.values() ) {
|
||||||
|
if(e.code.equals(code)){
|
||||||
|
return e;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getDescByCode(String code){
|
||||||
|
DefectSourceEnum e = getByCode(code);
|
||||||
|
return null == e ? null : e.desc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static List<JSONObject> listAll(){
|
||||||
|
List<JSONObject> list = new ArrayList<>(DefectSourceEnum.values().length);
|
||||||
|
for (DefectSourceEnum e : DefectSourceEnum.values() ) {
|
||||||
|
JSONObject jsonObject = new JSONObject();
|
||||||
|
jsonObject.set(e.code, e.desc);
|
||||||
|
list.add(jsonObject);
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,9 +1,60 @@
|
||||||
package com.dite.znpt.enums;
|
package com.dite.znpt.enums;
|
||||||
|
|
||||||
|
import cn.hutool.json.JSONObject;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: gaoxiong
|
* @Author: gaoxiong
|
||||||
* @Date: 2025/4/24 21:43
|
* @Date: 2025/4/24 21:43
|
||||||
* @Description:
|
* @Description:
|
||||||
*/
|
*/
|
||||||
|
@Getter
|
||||||
public enum DefectTypeEnum {
|
public enum DefectTypeEnum {
|
||||||
|
CRAZE("CRAZE", "合缝开裂"),
|
||||||
|
ABRASION("ABRASION", "合缝磨损"),
|
||||||
|
LEATHER_BREAKAGE("LEATHER_BREAKAGE", "蒙皮破损"),
|
||||||
|
FABRIC_BREAKAGE("FABRIC_BREAKAGE", "布层破损"),
|
||||||
|
PART_BREAKAGE(" PART_BREAKAGE", "局部破损"),
|
||||||
|
TOTAL_DAMAGE("TOTAL_DAMAGE", "累计损伤"),
|
||||||
|
LAYER_SHED("LAYER_SHED", "涂层脱落"),
|
||||||
|
PAINT_SHEDDING("PAINT_SHEDDING", "风损掉漆"),
|
||||||
|
SURFACE_CRACK("SURFACE_CRACK", "表面裂纹"),
|
||||||
|
CHORDWISE_CRACK("CHORDWISE_CRACK", "弦向裂纹"),
|
||||||
|
AXIAL_CRACK("AXIAL_CRACK", "轴向裂纹"),
|
||||||
|
WRINKLE("WRINKLE", "褶皱");
|
||||||
|
|
||||||
|
private final String code;
|
||||||
|
private final String desc;
|
||||||
|
|
||||||
|
DefectTypeEnum(String code, String desc){
|
||||||
|
this.code = code;
|
||||||
|
this.desc = desc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static DefectTypeEnum getByCode(String code){
|
||||||
|
for (DefectTypeEnum e : DefectTypeEnum.values() ) {
|
||||||
|
if(e.code.equals(code)){
|
||||||
|
return e;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getDescByCode(String code){
|
||||||
|
DefectTypeEnum e = getByCode(code);
|
||||||
|
return null == e ? null : e.desc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static List<JSONObject> listAll(){
|
||||||
|
List<JSONObject> list = new ArrayList<>(DefectTypeEnum.values().length);
|
||||||
|
for (DefectTypeEnum e : DefectTypeEnum.values() ) {
|
||||||
|
JSONObject jsonObject = new JSONObject();
|
||||||
|
jsonObject.set(e.code, e.desc);
|
||||||
|
list.add(jsonObject);
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package com.dite.znpt.enums;
|
package com.dite.znpt.enums;
|
||||||
|
|
||||||
import cn.hutool.json.JSONObject;
|
import cn.hutool.json.JSONObject;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -10,6 +11,7 @@ import java.util.List;
|
||||||
* @Date: 2025/4/24 21:25
|
* @Date: 2025/4/24 21:25
|
||||||
* @Description:
|
* @Description:
|
||||||
*/
|
*/
|
||||||
|
@Getter
|
||||||
public enum ImageTypeEnum {
|
public enum ImageTypeEnum {
|
||||||
DEFECT("DEFECT", "缺陷影像"),
|
DEFECT("DEFECT", "缺陷影像"),
|
||||||
TYPICAL("TYPICAL", "典型影像"),
|
TYPICAL("TYPICAL", "典型影像"),
|
||||||
|
@ -31,6 +33,11 @@ public enum ImageTypeEnum {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String getDescByCode(String code){
|
||||||
|
ImageTypeEnum e = getByCode(code);
|
||||||
|
return null == e ? null : e.desc;
|
||||||
|
}
|
||||||
|
|
||||||
public static List<JSONObject> listAll(){
|
public static List<JSONObject> listAll(){
|
||||||
List<JSONObject> list = new ArrayList<>(ImageTypeEnum.values().length);
|
List<JSONObject> list = new ArrayList<>(ImageTypeEnum.values().length);
|
||||||
for (ImageTypeEnum e : ImageTypeEnum.values() ) {
|
for (ImageTypeEnum e : ImageTypeEnum.values() ) {
|
||||||
|
|
|
@ -0,0 +1,51 @@
|
||||||
|
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/27 20:55
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
public enum RepairStatusEnum {
|
||||||
|
INCOMPLETE("INCOMPLETE","未维修"),
|
||||||
|
COMPLETED("COMPLETED","已维修"),
|
||||||
|
UNKNOWN("UNKNOWN","未知");
|
||||||
|
|
||||||
|
private final String code;
|
||||||
|
private final String desc;
|
||||||
|
|
||||||
|
RepairStatusEnum(String code, String desc){
|
||||||
|
this.code = code;
|
||||||
|
this.desc = desc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static RepairStatusEnum getByCode(String code){
|
||||||
|
for (RepairStatusEnum e : RepairStatusEnum.values() ) {
|
||||||
|
if(e.code.equals(code)){
|
||||||
|
return e;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getDescByCode(String code){
|
||||||
|
RepairStatusEnum e = getByCode(code);
|
||||||
|
return null == e ? null : e.desc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static List<JSONObject> listAll(){
|
||||||
|
List<JSONObject> list = new ArrayList<>(RepairStatusEnum.values().length);
|
||||||
|
for (RepairStatusEnum e : RepairStatusEnum.values() ) {
|
||||||
|
JSONObject jsonObject = new JSONObject();
|
||||||
|
jsonObject.set(e.code, e.desc);
|
||||||
|
list.add(jsonObject);
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
}
|
|
@ -24,7 +24,7 @@ public enum ShootingMethodEnum {
|
||||||
this.desc = desc;
|
this.desc = desc;
|
||||||
}
|
}
|
||||||
|
|
||||||
private ShootingMethodEnum getByCode(String code){
|
public static ShootingMethodEnum getByCode(String code){
|
||||||
for (ShootingMethodEnum e : ShootingMethodEnum.values() ) {
|
for (ShootingMethodEnum e : ShootingMethodEnum.values() ) {
|
||||||
if(e.code.equals(code)){
|
if(e.code.equals(code)){
|
||||||
return e;
|
return e;
|
||||||
|
@ -33,6 +33,11 @@ public enum ShootingMethodEnum {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String getDescByCode(String code){
|
||||||
|
ShootingMethodEnum e = getByCode(code);
|
||||||
|
return null == e ? null : e.desc;
|
||||||
|
}
|
||||||
|
|
||||||
public static List<JSONObject> listAll(){
|
public static List<JSONObject> listAll(){
|
||||||
List<JSONObject> list = new ArrayList<>(ShootingMethodEnum.values().length);
|
List<JSONObject> list = new ArrayList<>(ShootingMethodEnum.values().length);
|
||||||
for (ShootingMethodEnum e : ShootingMethodEnum.values() ) {
|
for (ShootingMethodEnum e : ShootingMethodEnum.values() ) {
|
||||||
|
|
|
@ -53,6 +53,11 @@ public enum WeatherEnum {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String getDescByCode(String code){
|
||||||
|
WeatherEnum e = getByCode(code);
|
||||||
|
return null == e ? null : e.desc;
|
||||||
|
}
|
||||||
|
|
||||||
public static List<JSONObject> listAll(){
|
public static List<JSONObject> listAll(){
|
||||||
List<JSONObject> list = new ArrayList<>(WeatherEnum.values().length);
|
List<JSONObject> list = new ArrayList<>(WeatherEnum.values().length);
|
||||||
for (WeatherEnum e : WeatherEnum.values() ) {
|
for (WeatherEnum e : WeatherEnum.values() ) {
|
||||||
|
|
|
@ -15,5 +15,6 @@ import java.util.List;
|
||||||
*/
|
*/
|
||||||
public interface DefectMapper extends BaseMapper<DefectEntity> {
|
public interface DefectMapper extends BaseMapper<DefectEntity> {
|
||||||
List<DefectResp> queryBySelective(DefectListReq defectReq);
|
List<DefectResp> queryBySelective(DefectListReq defectReq);
|
||||||
|
DefectResp detail(String defectId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,10 +2,7 @@ package com.dite.znpt.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.dite.znpt.domain.entity.ImageEntity;
|
import com.dite.znpt.domain.entity.ImageEntity;
|
||||||
import com.dite.znpt.domain.vo.ImageListReq;
|
import com.dite.znpt.domain.vo.*;
|
||||||
import com.dite.znpt.domain.vo.ImageResp;
|
|
||||||
import com.dite.znpt.domain.vo.PartListReq;
|
|
||||||
import com.dite.znpt.domain.vo.PartResp;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -15,5 +12,7 @@ import java.util.List;
|
||||||
* @description
|
* @description
|
||||||
*/
|
*/
|
||||||
public interface ImageMapper extends BaseMapper<ImageEntity> {
|
public interface ImageMapper extends BaseMapper<ImageEntity> {
|
||||||
List<ImageResp> queryBySelective(ImageListReq req);
|
List<ImageListResp> queryImageList(ImageListReq req);
|
||||||
|
|
||||||
|
ImageResp detail(String imageId);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,19 +0,0 @@
|
||||||
package com.dite.znpt.mapper;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
||||||
import com.dite.znpt.domain.entity.ProjectCompanyEntity;
|
|
||||||
import com.dite.znpt.domain.vo.ProjectCompanyListReq;
|
|
||||||
import com.dite.znpt.domain.vo.ProjectCompanyResp;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author huise23
|
|
||||||
* @date 2025/04/11 23:17
|
|
||||||
* @Description: 项目-公司关联信息表数据库访问层
|
|
||||||
*/
|
|
||||||
public interface ProjectCompanyMapper extends BaseMapper<ProjectCompanyEntity> {
|
|
||||||
List<ProjectCompanyResp> queryBySelective(ProjectCompanyListReq projectCompanyReq);
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,19 +0,0 @@
|
||||||
package com.dite.znpt.mapper;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
||||||
import com.dite.znpt.domain.entity.TCompanyEntity;
|
|
||||||
import com.dite.znpt.domain.vo.TCompanyListReq;
|
|
||||||
import com.dite.znpt.domain.vo.TCompanyResp;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author huise23
|
|
||||||
* @date 2025/04/11 23:17
|
|
||||||
* @Description: 公司信息表数据库访问层
|
|
||||||
*/
|
|
||||||
public interface TCompanyMapper extends BaseMapper<TCompanyEntity> {
|
|
||||||
List<TCompanyResp> queryBySelective(TCompanyListReq tCompanyReq);
|
|
||||||
}
|
|
||||||
|
|
|
@ -3,6 +3,7 @@ package com.dite.znpt.service;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.dite.znpt.domain.entity.DefectEntity;
|
import com.dite.znpt.domain.entity.DefectEntity;
|
||||||
import com.dite.znpt.domain.vo.DefectListReq;
|
import com.dite.znpt.domain.vo.DefectListReq;
|
||||||
|
import com.dite.znpt.domain.vo.DefectReq;
|
||||||
import com.dite.znpt.domain.vo.DefectResp;
|
import com.dite.znpt.domain.vo.DefectResp;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -17,12 +18,14 @@ public interface DefectService extends IService<DefectEntity> {
|
||||||
/**
|
/**
|
||||||
* 功能描述:查询缺陷记录列表
|
* 功能描述:查询缺陷记录列表
|
||||||
*
|
*
|
||||||
* @param defectReq 缺陷记录
|
* @param req 缺陷记录
|
||||||
* @return {@link List }<{@link DefectEntity }>
|
* @return {@link List }<{@link DefectEntity }>
|
||||||
* @author huise23
|
* @author huise23
|
||||||
* @date 2025/04/11 23:17
|
* @date 2025/04/11 23:17
|
||||||
**/
|
**/
|
||||||
List<DefectResp> selectList(DefectListReq defectReq);
|
List<DefectResp> page(DefectListReq req);
|
||||||
|
|
||||||
|
List<DefectResp> list(DefectListReq req);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 功能描述:查询单条缺陷记录
|
* 功能描述:查询单条缺陷记录
|
||||||
|
@ -32,25 +35,27 @@ public interface DefectService extends IService<DefectEntity> {
|
||||||
* @author huise23
|
* @author huise23
|
||||||
* @date 2025/04/11 23:17
|
* @date 2025/04/11 23:17
|
||||||
**/
|
**/
|
||||||
DefectResp selectById(String defectId);
|
DefectResp detail(String defectId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 功能描述:新增缺陷记录
|
* 功能描述:新增缺陷记录
|
||||||
*
|
*
|
||||||
* @param defect 缺陷记录
|
* @param imageId 缺陷记录
|
||||||
|
* @param req 缺陷记录
|
||||||
* @author huise23
|
* @author huise23
|
||||||
* @date 2025/04/11 23:17
|
* @date 2025/04/11 23:17
|
||||||
**/
|
**/
|
||||||
void saveData(DefectEntity defect);
|
void save(String imageId, DefectReq req);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 功能描述:更新缺陷记录
|
* 功能描述:更新缺陷记录
|
||||||
*
|
*
|
||||||
* @param defect 缺陷记录
|
* @param defectId 缺陷记录
|
||||||
|
* @param req 缺陷记录
|
||||||
* @author huise23
|
* @author huise23
|
||||||
* @date 2025/04/11 23:17
|
* @date 2025/04/11 23:17
|
||||||
**/
|
**/
|
||||||
void updateData(DefectEntity defect);
|
void update(String defectId, DefectReq req);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 功能描述:删除缺陷记录
|
* 功能描述:删除缺陷记录
|
||||||
|
|
|
@ -2,6 +2,7 @@ package com.dite.znpt.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.dite.znpt.domain.entity.ImageCollectEntity;
|
import com.dite.znpt.domain.entity.ImageCollectEntity;
|
||||||
|
import com.dite.znpt.domain.vo.ImageCollectReq;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: gaoxiong
|
* @Author: gaoxiong
|
||||||
|
@ -9,4 +10,5 @@ import com.dite.znpt.domain.entity.ImageCollectEntity;
|
||||||
* @Description:
|
* @Description:
|
||||||
*/
|
*/
|
||||||
public interface ImageCollectService extends IService<ImageCollectEntity> {
|
public interface ImageCollectService extends IService<ImageCollectEntity> {
|
||||||
|
void save(String departId, ImageCollectReq req);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,10 @@ package com.dite.znpt.service;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.dite.znpt.domain.entity.ImageEntity;
|
import com.dite.znpt.domain.entity.ImageEntity;
|
||||||
import com.dite.znpt.domain.vo.ImageListReq;
|
import com.dite.znpt.domain.vo.ImageListReq;
|
||||||
|
import com.dite.znpt.domain.vo.ImageListResp;
|
||||||
|
import com.dite.znpt.domain.vo.ImageReq;
|
||||||
import com.dite.znpt.domain.vo.ImageResp;
|
import com.dite.znpt.domain.vo.ImageResp;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -14,5 +17,13 @@ import java.util.List;
|
||||||
*/
|
*/
|
||||||
public interface ImageService extends IService<ImageEntity> {
|
public interface ImageService extends IService<ImageEntity> {
|
||||||
|
|
||||||
List<ImageResp> selectList(ImageListReq req);
|
List<ImageListResp> list(ImageListReq req);
|
||||||
|
|
||||||
|
List<ImageListResp> page(ImageListReq req);
|
||||||
|
|
||||||
|
ImageResp detail(String imageId);
|
||||||
|
|
||||||
|
List<ImageReq> batchUpload(String departId, MultipartFile[] files);
|
||||||
|
|
||||||
|
void delete(String imageId);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,64 +0,0 @@
|
||||||
package com.dite.znpt.service;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
|
||||||
import com.dite.znpt.domain.entity.ProjectCompanyEntity;
|
|
||||||
import com.dite.znpt.domain.vo.ProjectCompanyListReq;
|
|
||||||
import com.dite.znpt.domain.vo.ProjectCompanyResp;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author huise23
|
|
||||||
* @date 2025/04/11 23:17
|
|
||||||
* @Description: 项目-公司关联信息表服务接口
|
|
||||||
*/
|
|
||||||
public interface ProjectCompanyService extends IService<ProjectCompanyEntity> {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 功能描述:查询项目-公司关联信息列表
|
|
||||||
*
|
|
||||||
* @param projectCompanyReq 项目-公司关联信息
|
|
||||||
* @return {@link List }<{@link ProjectCompanyEntity }>
|
|
||||||
* @author huise23
|
|
||||||
* @date 2025/04/11 23:17
|
|
||||||
**/
|
|
||||||
List<ProjectCompanyResp> selectList(ProjectCompanyListReq projectCompanyReq);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 功能描述:查询单条项目-公司关联信息
|
|
||||||
*
|
|
||||||
* @param projectId 项目-公司关联信息Id
|
|
||||||
* @return {@link ProjectCompanyResp }
|
|
||||||
* @author huise23
|
|
||||||
* @date 2025/04/11 23:17
|
|
||||||
**/
|
|
||||||
ProjectCompanyResp selectById(String projectId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 功能描述:新增项目-公司关联信息
|
|
||||||
*
|
|
||||||
* @param projectCompany 项目-公司关联信息
|
|
||||||
* @author huise23
|
|
||||||
* @date 2025/04/11 23:17
|
|
||||||
**/
|
|
||||||
void saveData(ProjectCompanyEntity projectCompany);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 功能描述:更新项目-公司关联信息
|
|
||||||
*
|
|
||||||
* @param projectCompany 项目-公司关联信息
|
|
||||||
* @author huise23
|
|
||||||
* @date 2025/04/11 23:17
|
|
||||||
**/
|
|
||||||
void updateData(ProjectCompanyEntity projectCompany);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 功能描述:删除项目-公司关联信息
|
|
||||||
*
|
|
||||||
* @param projectId 项目-公司关联信息Id
|
|
||||||
* @author huise23
|
|
||||||
* @date 2025/04/11 23:17
|
|
||||||
**/
|
|
||||||
void deleteById(String projectId);
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,64 +0,0 @@
|
||||||
package com.dite.znpt.service;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
|
||||||
import com.dite.znpt.domain.entity.TCompanyEntity;
|
|
||||||
import com.dite.znpt.domain.vo.TCompanyListReq;
|
|
||||||
import com.dite.znpt.domain.vo.TCompanyResp;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author huise23
|
|
||||||
* @date 2025/04/11 23:17
|
|
||||||
* @Description: 公司信息表服务接口
|
|
||||||
*/
|
|
||||||
public interface TCompanyService extends IService<TCompanyEntity> {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 功能描述:查询公司信息列表
|
|
||||||
*
|
|
||||||
* @param tCompanyReq 公司信息
|
|
||||||
* @return {@link List }<{@link TCompanyEntity }>
|
|
||||||
* @author huise23
|
|
||||||
* @date 2025/04/11 23:17
|
|
||||||
**/
|
|
||||||
List<TCompanyResp> selectList(TCompanyListReq tCompanyReq);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 功能描述:查询单条公司信息
|
|
||||||
*
|
|
||||||
* @param companyId 公司信息Id
|
|
||||||
* @return {@link TCompanyResp }
|
|
||||||
* @author huise23
|
|
||||||
* @date 2025/04/11 23:17
|
|
||||||
**/
|
|
||||||
TCompanyResp selectById(String companyId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 功能描述:新增公司信息
|
|
||||||
*
|
|
||||||
* @param tCompany 公司信息
|
|
||||||
* @author huise23
|
|
||||||
* @date 2025/04/11 23:17
|
|
||||||
**/
|
|
||||||
void saveData(TCompanyEntity tCompany);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 功能描述:更新公司信息
|
|
||||||
*
|
|
||||||
* @param tCompany 公司信息
|
|
||||||
* @author huise23
|
|
||||||
* @date 2025/04/11 23:17
|
|
||||||
**/
|
|
||||||
void updateData(TCompanyEntity tCompany);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 功能描述:删除公司信息
|
|
||||||
*
|
|
||||||
* @param companyId 公司信息Id
|
|
||||||
* @author huise23
|
|
||||||
* @date 2025/04/11 23:17
|
|
||||||
**/
|
|
||||||
void deleteById(String companyId);
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,16 +1,26 @@
|
||||||
package com.dite.znpt.service.impl;
|
package com.dite.znpt.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.dite.znpt.constant.Message;
|
||||||
|
import com.dite.znpt.converts.Converts;
|
||||||
import com.dite.znpt.domain.entity.DefectEntity;
|
import com.dite.znpt.domain.entity.DefectEntity;
|
||||||
import com.dite.znpt.domain.vo.DefectListReq;
|
import com.dite.znpt.domain.vo.DefectListReq;
|
||||||
|
import com.dite.znpt.domain.vo.DefectReq;
|
||||||
import com.dite.znpt.domain.vo.DefectResp;
|
import com.dite.znpt.domain.vo.DefectResp;
|
||||||
|
import com.dite.znpt.enums.DefectSourceEnum;
|
||||||
|
import com.dite.znpt.enums.DefectTypeEnum;
|
||||||
|
import com.dite.znpt.enums.RepairStatusEnum;
|
||||||
|
import com.dite.znpt.exception.ServiceException;
|
||||||
import com.dite.znpt.service.DefectService;
|
import com.dite.znpt.service.DefectService;
|
||||||
import com.dite.znpt.mapper.DefectMapper;
|
import com.dite.znpt.mapper.DefectMapper;
|
||||||
|
import com.dite.znpt.service.ImageService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import com.dite.znpt.util.PageUtil;
|
import com.dite.znpt.util.PageUtil;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -21,22 +31,26 @@ import java.util.List;
|
||||||
@Service
|
@Service
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class DefectServiceImpl extends ServiceImpl<DefectMapper, DefectEntity> implements DefectService {
|
public class DefectServiceImpl extends ServiceImpl<DefectMapper, DefectEntity> implements DefectService {
|
||||||
|
@Resource
|
||||||
|
private ImageService imageService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 功能描述:查询缺陷记录列表
|
* 功能描述:查询缺陷记录列表
|
||||||
*
|
*
|
||||||
* @param defectReq 缺陷记录信息
|
* @param req 缺陷记录信息
|
||||||
* @return {@link List }<{@link DefectResp }>
|
* @return {@link List }<{@link DefectResp }>
|
||||||
* @author huise23
|
* @author huise23
|
||||||
* @date 2025/04/11 23:17
|
* @date 2025/04/11 23:17
|
||||||
**/
|
**/
|
||||||
@Override
|
@Override
|
||||||
public List<DefectResp> selectList(DefectListReq defectReq) {
|
public List<DefectResp> page(DefectListReq req) {
|
||||||
PageUtil.startPage();
|
PageUtil.startPage();
|
||||||
List<DefectResp> defectList= this.baseMapper.queryBySelective(defectReq);
|
return this.list(req);
|
||||||
defectList.forEach(resp -> {
|
}
|
||||||
|
|
||||||
});
|
@Override
|
||||||
|
public List<DefectResp> list(DefectListReq req) {
|
||||||
|
List<DefectResp> defectList= this.baseMapper.queryBySelective(req);
|
||||||
return defectList;
|
return defectList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,37 +63,49 @@ public class DefectServiceImpl extends ServiceImpl<DefectMapper, DefectEntity> i
|
||||||
* @date 2025/04/11 23:17
|
* @date 2025/04/11 23:17
|
||||||
**/
|
**/
|
||||||
@Override
|
@Override
|
||||||
public DefectResp selectById(String defectId) {
|
public DefectResp detail(String defectId) {
|
||||||
DefectListReq defectReq = new DefectListReq();
|
DefectResp defectResp = this.baseMapper.detail(defectId);
|
||||||
defectReq.setDefectId(defectId);
|
defectResp.setDefectTypeLabel(DefectTypeEnum.getDescByCode(defectResp.getDefectType()));
|
||||||
List<DefectResp> list = selectList(defectReq);
|
defectResp.setDefectLevel(DefectTypeEnum.getDescByCode(defectResp.getDefectLevel()));
|
||||||
return list.isEmpty() ? CollUtil.getFirst(list) : new DefectResp();
|
defectResp.setRepairStatusLabel(RepairStatusEnum.getDescByCode(defectResp.getRepairStatus()));
|
||||||
|
defectResp.setSourceLabel(DefectSourceEnum.getDescByCode(defectResp.getSourceLabel()));
|
||||||
|
return defectResp;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 功能描述:新增缺陷记录
|
* 功能描述:新增缺陷记录
|
||||||
*
|
*
|
||||||
* @param defect 缺陷记录
|
* @param imageId
|
||||||
|
* @param req
|
||||||
* @author huise23
|
* @author huise23
|
||||||
* @date 2025/04/11 23:17
|
* @date 2025/04/11 23:17
|
||||||
**/
|
**/
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
@Override
|
@Override
|
||||||
public void saveData(DefectEntity defect) {
|
public void save(String imageId, DefectReq req) {
|
||||||
// todo 校验
|
if(null == imageService.getById(imageId)){
|
||||||
save(defect);
|
throw new ServiceException(Message.IMAGE_ID_IS_NOT_EXIST);
|
||||||
|
}
|
||||||
|
DefectEntity defectEntity = Converts.INSTANCE.toDefectEntity(req);
|
||||||
|
this.save(defectEntity);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 功能描述:更新缺陷记录
|
* 功能描述:更新缺陷记录
|
||||||
*
|
*
|
||||||
* @param defect 缺陷记录
|
* @param defectId
|
||||||
|
* @param req
|
||||||
* @author huise23
|
* @author huise23
|
||||||
* @date 2025/04/11 23:17
|
* @date 2025/04/11 23:17
|
||||||
**/
|
**/
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
@Override
|
@Override
|
||||||
public void updateData(DefectEntity defect) {
|
public void update(String defectId, DefectReq req) {
|
||||||
// todo 校验
|
if(null == this.getById(defectId)){
|
||||||
updateById(defect);
|
throw new ServiceException(Message.DEFECT_ID_IS_NOT_EXIST);
|
||||||
|
}
|
||||||
|
DefectEntity defectEntity = Converts.INSTANCE.toDefectEntity(req);
|
||||||
|
this.updateById(defectEntity);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -89,10 +115,10 @@ public class DefectServiceImpl extends ServiceImpl<DefectMapper, DefectEntity> i
|
||||||
* @author huise23
|
* @author huise23
|
||||||
* @date 2025/04/11 23:17
|
* @date 2025/04/11 23:17
|
||||||
**/
|
**/
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
@Override
|
@Override
|
||||||
public void deleteById(String defectId) {
|
public void deleteById(String defectId) {
|
||||||
// todo 校验
|
this.removeById(defectId);
|
||||||
removeById(defectId);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,25 @@
|
||||||
package com.dite.znpt.service.impl;
|
package com.dite.znpt.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import cn.hutool.core.io.FileUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.dite.znpt.constant.Message;
|
||||||
|
import com.dite.znpt.converts.Converts;
|
||||||
import com.dite.znpt.domain.entity.ImageCollectEntity;
|
import com.dite.znpt.domain.entity.ImageCollectEntity;
|
||||||
|
import com.dite.znpt.domain.entity.ImageEntity;
|
||||||
|
import com.dite.znpt.domain.vo.ImageCollectReq;
|
||||||
|
import com.dite.znpt.exception.ServiceException;
|
||||||
import com.dite.znpt.mapper.ImageCollectMapper;
|
import com.dite.znpt.mapper.ImageCollectMapper;
|
||||||
import com.dite.znpt.service.ImageCollectService;
|
import com.dite.znpt.service.ImageCollectService;
|
||||||
|
import com.dite.znpt.service.ImageService;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.io.File;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: gaoxiong
|
* @Author: gaoxiong
|
||||||
|
@ -14,4 +29,39 @@ import org.springframework.stereotype.Service;
|
||||||
@Service
|
@Service
|
||||||
public class ImageCollectServiceImpl extends ServiceImpl<ImageCollectMapper, ImageCollectEntity> implements ImageCollectService {
|
public class ImageCollectServiceImpl extends ServiceImpl<ImageCollectMapper, ImageCollectEntity> implements ImageCollectService {
|
||||||
|
|
||||||
|
@Value("${upload.perm-path}")
|
||||||
|
private String permPath;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ImageService imageService;
|
||||||
|
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
@Override
|
||||||
|
public void save(String partId, ImageCollectReq req) {
|
||||||
|
if(CollUtil.isEmpty(req.getImageList())){
|
||||||
|
throw new ServiceException(Message.IMAGE_IS_EMPTY);
|
||||||
|
}
|
||||||
|
ImageCollectEntity imageCollect = Converts.INSTANCE.toImageCollectEntity(req);
|
||||||
|
imageCollect.setPartId(partId);
|
||||||
|
this.save(imageCollect);
|
||||||
|
List<ImageEntity> imageList = Converts.INSTANCE.toImageEntity(req.getImageList());
|
||||||
|
String path_prefix = permPath.concat(StrUtil.BACKSLASH).concat(partId).concat(StrUtil.BACKSLASH);
|
||||||
|
imageList.stream().forEach(image -> {
|
||||||
|
image.setCollectId(imageCollect.getCollectId());
|
||||||
|
String path = path_prefix + image.getImageName();
|
||||||
|
File file = new File(image.getImagePath());
|
||||||
|
if (file.exists()) {
|
||||||
|
byte[] bytes = FileUtil.readBytes(file);
|
||||||
|
FileUtil.writeBytes(bytes, path);
|
||||||
|
FileUtil.del(file);
|
||||||
|
image.setImagePath(path);
|
||||||
|
}else {
|
||||||
|
imageList.remove(image);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if(CollUtil.isEmpty(imageList)){
|
||||||
|
throw new ServiceException(Message.IMAGE_PATH_IS_NOT_EXIST);
|
||||||
|
}
|
||||||
|
imageService.saveOrUpdateBatch(imageList);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,28 +1,173 @@
|
||||||
package com.dite.znpt.service.impl;
|
package com.dite.znpt.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import cn.hutool.core.io.FileUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import cn.hutool.json.JSONObject;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.dite.znpt.constant.Message;
|
||||||
import com.dite.znpt.domain.entity.ImageEntity;
|
import com.dite.znpt.domain.entity.ImageEntity;
|
||||||
import com.dite.znpt.domain.vo.ImageListReq;
|
import com.dite.znpt.domain.vo.ImageListReq;
|
||||||
|
import com.dite.znpt.domain.vo.ImageListResp;
|
||||||
|
import com.dite.znpt.domain.vo.ImageReq;
|
||||||
import com.dite.znpt.domain.vo.ImageResp;
|
import com.dite.znpt.domain.vo.ImageResp;
|
||||||
|
import com.dite.znpt.enums.ImageTypeEnum;
|
||||||
|
import com.dite.znpt.enums.ShootingMethodEnum;
|
||||||
|
import com.dite.znpt.enums.WeatherEnum;
|
||||||
|
import com.dite.znpt.exception.ServiceException;
|
||||||
import com.dite.znpt.mapper.ImageMapper;
|
import com.dite.znpt.mapper.ImageMapper;
|
||||||
|
import com.dite.znpt.service.ImageCollectService;
|
||||||
import com.dite.znpt.service.ImageService;
|
import com.dite.znpt.service.ImageService;
|
||||||
|
import com.dite.znpt.util.EXIFUtil;
|
||||||
import com.dite.znpt.util.PageUtil;
|
import com.dite.znpt.util.PageUtil;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.io.File;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.math.RoundingMode;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.regex.Matcher;
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Bear.G
|
* @author Bear.G
|
||||||
* @date 2025/4/24/周四 13:23
|
* @date 2025/4/24/周四 13:23
|
||||||
* @description
|
* @description
|
||||||
*/
|
*/
|
||||||
|
@Service
|
||||||
public class ImageServiceImpl extends ServiceImpl<ImageMapper, ImageEntity> implements ImageService {
|
public class ImageServiceImpl extends ServiceImpl<ImageMapper, ImageEntity> implements ImageService {
|
||||||
@Override
|
|
||||||
public List<ImageResp> selectList(ImageListReq req) {
|
|
||||||
PageUtil.startPage();
|
|
||||||
List<ImageResp> imageList= this.baseMapper.queryBySelective(req);
|
|
||||||
imageList.forEach(resp -> {
|
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ImageCollectService imageCollectService;
|
||||||
|
|
||||||
|
@Value("${upload.temp-path}")
|
||||||
|
private String tempPath;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ImageListResp> list(ImageListReq req) {
|
||||||
|
List<ImageListResp> partList= this.baseMapper.queryImageList(req);
|
||||||
|
partList.forEach(resp -> {
|
||||||
|
resp.setWeatherLabel(WeatherEnum.getDescByCode(resp.getWeather()));
|
||||||
|
resp.setShootingMethodLabel(ShootingMethodEnum.getDescByCode(resp.getShootingMethod()));
|
||||||
|
resp.setImageTypeLabel(ImageTypeEnum.getDescByCode(resp.getImageType()));
|
||||||
});
|
});
|
||||||
return imageList;
|
return partList;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ImageListResp> page(ImageListReq req) {
|
||||||
|
PageUtil.startPage();
|
||||||
|
return this.list(req);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ImageResp detail(String imageId) {
|
||||||
|
ImageResp imageResp = this.baseMapper.detail(imageId);
|
||||||
|
imageResp.getImageCollectInfo().setWeatherLabel(WeatherEnum.getDescByCode(imageResp.getImageCollectInfo().getWeather()));
|
||||||
|
imageResp.getImageCollectInfo().setShootingMethodLabel(ShootingMethodEnum.getDescByCode(imageResp.getImageCollectInfo().getShootingMethodLabel()));
|
||||||
|
return imageResp;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
@Override
|
||||||
|
public List<ImageReq> batchUpload(String departId, MultipartFile[] files) {
|
||||||
|
if(null == files || files.length == 0){
|
||||||
|
throw new ServiceException(Message.IMAGE_IS_EMPTY);
|
||||||
|
}
|
||||||
|
List<ImageReq> list = new ArrayList<>(files.length);
|
||||||
|
String path_prefix = tempPath.concat(StrUtil.BACKSLASH).concat(departId).concat(StrUtil.BACKSLASH);
|
||||||
|
for (MultipartFile file : files) {
|
||||||
|
if (!file.isEmpty()) {
|
||||||
|
try {
|
||||||
|
String path = path_prefix + file.getOriginalFilename();
|
||||||
|
FileUtil.writeBytes(file.getBytes(),path);
|
||||||
|
list.add(imageRespBuilder(path));
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
@Override
|
||||||
|
public void delete(String imageId) {
|
||||||
|
ImageEntity image = this.getById(imageId);
|
||||||
|
if(null ==image){
|
||||||
|
throw new ServiceException(Message.IMAGE_ID_IS_NOT_EXIST);
|
||||||
|
}
|
||||||
|
this.removeById(image);
|
||||||
|
List<ImageEntity> imageList = this.list(Wrappers.<ImageEntity>lambdaQuery().eq(ImageEntity::getCollectId, image.getCollectId()));
|
||||||
|
if(CollUtil.isEmpty(imageList)){
|
||||||
|
imageCollectService.removeById(image.getCollectId());
|
||||||
|
}
|
||||||
|
File file = new File(image.getImagePath());
|
||||||
|
if (file.exists()) {
|
||||||
|
FileUtil.del(file);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private ImageReq imageRespBuilder(String path) throws Exception {
|
||||||
|
ImageReq req = new ImageReq();
|
||||||
|
File file = new File(path);
|
||||||
|
JSONObject obj = EXIFUtil.printImageTags(file);
|
||||||
|
req.setCameraManufacturer(obj.getStr("Make"));
|
||||||
|
req.setCameraModel(obj.getStr("Model"));
|
||||||
|
req.setImageName(obj.getStr("File Name"));
|
||||||
|
req.setImagePath(path);
|
||||||
|
BigDecimal imageSize = new BigDecimal(extractDigit(obj.getStr("File Size"))).divide(new BigDecimal(1024*1024), 4, RoundingMode.HALF_UP);
|
||||||
|
req.setImageSize(imageSize.toString().concat("M"));
|
||||||
|
req.setImageWidth(extractDigit(obj.getStr("Image Width")));
|
||||||
|
req.setImageHeight(extractDigit(obj.getStr("Image Height")));
|
||||||
|
req.setImageResolution(req.getImageWidth().concat("x").concat(req.getImageHeight()));
|
||||||
|
req.setFocalDistance35(extractDigit(obj.getStr("Focal Length 35")));
|
||||||
|
req.setXResolution(extractDigit(obj.getStr("X Resolution")));
|
||||||
|
req.setYResolution(extractDigit(obj.getStr("Y Resolution")));
|
||||||
|
req.setResolutionUnits(obj.getStr("Resolution Units"));
|
||||||
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy:MM:dd HH:mm:ss");
|
||||||
|
req.setShootingTime(LocalDateTime.parse( obj.getStr("Date/Time Original"),formatter));
|
||||||
|
req.setFocalDistance(extractDigit(obj.getStr("Focal Length")));
|
||||||
|
req.setLatitude(obj.getStr("GPS Latitude"));
|
||||||
|
req.setLongitude(obj.getStr("GPS Longitude"));
|
||||||
|
req.setAltitude(extractDigit(obj.getStr("GPS Altitude")));
|
||||||
|
String gps = req.getLatitude().concat("°").concat(directionTranslator(obj.getStr("GPS Latitude Ref"))).concat(StrUtil.COMMA)
|
||||||
|
.concat(req.getLongitude()).concat("°").concat(directionTranslator(obj.getStr("GPS Longitude Ref"))).concat(StrUtil.COMMA)
|
||||||
|
.concat("海拔").concat(req.getAltitude()).concat("m");
|
||||||
|
req.setGPS(gps);
|
||||||
|
return req;
|
||||||
|
}
|
||||||
|
|
||||||
|
private String directionTranslator(String direction){
|
||||||
|
if(direction.equalsIgnoreCase("N")){
|
||||||
|
return "北";
|
||||||
|
} else if (direction.equalsIgnoreCase("S")) {
|
||||||
|
return "南";
|
||||||
|
} else if (direction.equalsIgnoreCase("E")) {
|
||||||
|
return "东";
|
||||||
|
}else if (direction.equalsIgnoreCase("W")) {
|
||||||
|
return "西";
|
||||||
|
}else {
|
||||||
|
return "未知";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static String extractDigit(String str) {
|
||||||
|
Pattern pattern = Pattern.compile("\\d+(\\.\\d+)?");
|
||||||
|
Matcher matcher = pattern.matcher(str);
|
||||||
|
if (matcher.find()) {
|
||||||
|
return matcher.group();
|
||||||
|
} else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -1,99 +0,0 @@
|
||||||
package com.dite.znpt.service.impl;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
||||||
import com.dite.znpt.domain.entity.ProjectCompanyEntity;
|
|
||||||
import com.dite.znpt.domain.vo.ProjectCompanyListReq;
|
|
||||||
import com.dite.znpt.domain.vo.ProjectCompanyResp;
|
|
||||||
import com.dite.znpt.service.ProjectCompanyService;
|
|
||||||
import com.dite.znpt.mapper.ProjectCompanyMapper;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import com.dite.znpt.util.PageUtil;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author huise23
|
|
||||||
* @date 2025/04/11 23:17
|
|
||||||
* @Description: 项目-公司关联信息表服务实现类
|
|
||||||
*/
|
|
||||||
@Service
|
|
||||||
@RequiredArgsConstructor
|
|
||||||
public class ProjectCompanyServiceImpl extends ServiceImpl<ProjectCompanyMapper, ProjectCompanyEntity> implements ProjectCompanyService {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 功能描述:查询项目-公司关联信息列表
|
|
||||||
*
|
|
||||||
* @param projectCompanyReq 项目-公司关联信息信息
|
|
||||||
* @return {@link List }<{@link ProjectCompanyResp }>
|
|
||||||
* @author huise23
|
|
||||||
* @date 2025/04/11 23:17
|
|
||||||
**/
|
|
||||||
@Override
|
|
||||||
public List<ProjectCompanyResp> selectList(ProjectCompanyListReq projectCompanyReq) {
|
|
||||||
PageUtil.startPage();
|
|
||||||
List<ProjectCompanyResp> projectCompanyList= this.baseMapper.queryBySelective(projectCompanyReq);
|
|
||||||
projectCompanyList.forEach(resp -> {
|
|
||||||
|
|
||||||
});
|
|
||||||
return projectCompanyList;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 功能描述:查询单条项目-公司关联信息
|
|
||||||
*
|
|
||||||
* @param projectId 项目-公司关联信息Id
|
|
||||||
* @return {@link ProjectCompanyResp }
|
|
||||||
* @author huise23
|
|
||||||
* @date 2025/04/11 23:17
|
|
||||||
**/
|
|
||||||
@Override
|
|
||||||
public ProjectCompanyResp selectById(String projectId) {
|
|
||||||
ProjectCompanyListReq projectCompanyReq = new ProjectCompanyListReq();
|
|
||||||
projectCompanyReq.setProjectId(projectId);
|
|
||||||
|
|
||||||
List<ProjectCompanyResp> list = selectList(projectCompanyReq);
|
|
||||||
return list.isEmpty() ? CollUtil.getFirst(list) : new ProjectCompanyResp();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 功能描述:新增项目-公司关联信息
|
|
||||||
*
|
|
||||||
* @param projectCompany 项目-公司关联信息
|
|
||||||
* @author huise23
|
|
||||||
* @date 2025/04/11 23:17
|
|
||||||
**/
|
|
||||||
@Override
|
|
||||||
public void saveData(ProjectCompanyEntity projectCompany) {
|
|
||||||
// todo 校验
|
|
||||||
save(projectCompany);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 功能描述:更新项目-公司关联信息
|
|
||||||
*
|
|
||||||
* @param projectCompany 项目-公司关联信息
|
|
||||||
* @author huise23
|
|
||||||
* @date 2025/04/11 23:17
|
|
||||||
**/
|
|
||||||
@Override
|
|
||||||
public void updateData(ProjectCompanyEntity projectCompany) {
|
|
||||||
// todo 校验
|
|
||||||
updateById(projectCompany);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 功能描述:删除项目-公司关联信息
|
|
||||||
*
|
|
||||||
* @param projectId 项目-公司关联信息Id
|
|
||||||
* @author huise23
|
|
||||||
* @date 2025/04/11 23:17
|
|
||||||
**/
|
|
||||||
@Override
|
|
||||||
public void deleteById(String projectId) {
|
|
||||||
// todo 校验
|
|
||||||
removeById(projectId);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,99 +0,0 @@
|
||||||
package com.dite.znpt.service.impl;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
||||||
import com.dite.znpt.domain.entity.TCompanyEntity;
|
|
||||||
import com.dite.znpt.domain.vo.TCompanyListReq;
|
|
||||||
import com.dite.znpt.domain.vo.TCompanyResp;
|
|
||||||
import com.dite.znpt.service.TCompanyService;
|
|
||||||
import com.dite.znpt.mapper.TCompanyMapper;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import com.dite.znpt.util.PageUtil;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author huise23
|
|
||||||
* @date 2025/04/11 23:17
|
|
||||||
* @Description: 公司信息表服务实现类
|
|
||||||
*/
|
|
||||||
@Service
|
|
||||||
@RequiredArgsConstructor
|
|
||||||
public class TCompanyServiceImpl extends ServiceImpl<TCompanyMapper, TCompanyEntity> implements TCompanyService {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 功能描述:查询公司信息列表
|
|
||||||
*
|
|
||||||
* @param tCompanyReq 公司信息信息
|
|
||||||
* @return {@link List }<{@link TCompanyResp }>
|
|
||||||
* @author huise23
|
|
||||||
* @date 2025/04/11 23:17
|
|
||||||
**/
|
|
||||||
@Override
|
|
||||||
public List<TCompanyResp> selectList(TCompanyListReq tCompanyReq) {
|
|
||||||
PageUtil.startPage();
|
|
||||||
List<TCompanyResp> tCompanyList= this.baseMapper.queryBySelective(tCompanyReq);
|
|
||||||
tCompanyList.forEach(resp -> {
|
|
||||||
|
|
||||||
});
|
|
||||||
return tCompanyList;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 功能描述:查询单条公司信息
|
|
||||||
*
|
|
||||||
* @param companyId 公司信息Id
|
|
||||||
* @return {@link TCompanyResp }
|
|
||||||
* @author huise23
|
|
||||||
* @date 2025/04/11 23:17
|
|
||||||
**/
|
|
||||||
@Override
|
|
||||||
public TCompanyResp selectById(String companyId) {
|
|
||||||
TCompanyListReq tCompanyReq = new TCompanyListReq();
|
|
||||||
tCompanyReq.setCompanyId(companyId);
|
|
||||||
|
|
||||||
List<TCompanyResp> list = selectList(tCompanyReq);
|
|
||||||
return list.isEmpty() ? CollUtil.getFirst(list) : new TCompanyResp();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 功能描述:新增公司信息
|
|
||||||
*
|
|
||||||
* @param tCompany 公司信息
|
|
||||||
* @author huise23
|
|
||||||
* @date 2025/04/11 23:17
|
|
||||||
**/
|
|
||||||
@Override
|
|
||||||
public void saveData(TCompanyEntity tCompany) {
|
|
||||||
// todo 校验
|
|
||||||
save(tCompany);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 功能描述:更新公司信息
|
|
||||||
*
|
|
||||||
* @param tCompany 公司信息
|
|
||||||
* @author huise23
|
|
||||||
* @date 2025/04/11 23:17
|
|
||||||
**/
|
|
||||||
@Override
|
|
||||||
public void updateData(TCompanyEntity tCompany) {
|
|
||||||
// todo 校验
|
|
||||||
updateById(tCompany);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 功能描述:删除公司信息
|
|
||||||
*
|
|
||||||
* @param companyId 公司信息Id
|
|
||||||
* @author huise23
|
|
||||||
* @date 2025/04/11 23:17
|
|
||||||
**/
|
|
||||||
@Override
|
|
||||||
public void deleteById(String companyId) {
|
|
||||||
// todo 校验
|
|
||||||
removeById(companyId);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -2,29 +2,35 @@
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.dite.znpt.mapper.DefectMapper">
|
<mapper namespace="com.dite.znpt.mapper.DefectMapper">
|
||||||
|
|
||||||
<sql id="Base_Column_List">
|
|
||||||
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">
|
<select id="queryBySelective" resultType="com.dite.znpt.domain.vo.DefectListResp">
|
||||||
select
|
SELECT
|
||||||
<include refid="Base_Column_List"/>
|
d.defect_id, d.defect_name, d.defect_code, p.part_name, d.defect_position, d.description
|
||||||
from defect a
|
FROM defect d
|
||||||
|
LEFT JOIN image i ON d.image_id = i.image_id
|
||||||
|
LEFT JOIN image_collect ic ON ic.collect_id = i.collect_id
|
||||||
|
LEFT JOIN part p ON ic.part_id = p.part_id
|
||||||
<where>
|
<where>
|
||||||
<if test="keyword != null and keyword != ''">
|
<if test="keyword != null and keyword != ''">
|
||||||
# and (a.defect_name like concat('%', #{keyword,jdbcType=VARCHAR}, '%') or a.defect_code like concat('%', #{keyword,jdbcType=VARCHAR}, '%'))
|
# AND (d.defect_name LIKE concat('%', #{keyword,jdbcType=VARCHAR}, '%') OR d.defect_code LIKE concat('%', #{keyword,jdbcType=VARCHAR}, '%'))
|
||||||
</if>
|
</if>
|
||||||
<if test="partId != null and partId != ''">
|
<if test="turbineId != null and turbineId != ''">
|
||||||
and a.part_id = #{turbineCode}
|
AND p.turbine_id = #{turbineId}
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
<if test="defectType != null and defectType != ''">
|
<if test="defectType != null and defectType != ''">
|
||||||
and a.defect_type = #{defectType}
|
AND d.defect_type = #{defectType}
|
||||||
</if>
|
</if>
|
||||||
<if test="defectLevel != null and defectLevel != ''">
|
<if test="defectLevel != null and defectLevel != ''">
|
||||||
and a.defect_level = #{defectLevel}
|
AND d.defect_level = #{defectLevel}
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
<select id="detail" resultType="com.dite.znpt.domain.vo.DefectResp">
|
||||||
|
SELECT
|
||||||
|
d.defect_id, d.defect_code, d.defect_name, d.defect_position, d.defect_type, d.defect_level, d.repair_status, d.detection_date, d.source,
|
||||||
|
d.chordwise, d.axial, d.area, d.label_info, d.description, d.description
|
||||||
|
FROM defect d
|
||||||
|
WHERE d.defect_id = #{defectId}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
||||||
|
|
|
@ -2,15 +2,5 @@
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.dite.znpt.mapper.ImageCollectMapper">
|
<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>
|
</mapper>
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,68 @@
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.dite.znpt.mapper.ImageMapper">
|
<mapper namespace="com.dite.znpt.mapper.ImageMapper">
|
||||||
|
|
||||||
<sql id="Base_Column_List">
|
<select id="queryImageList" resultType="com.dite.znpt.domain.vo.ImageListResp">
|
||||||
a.image, a.part_id, a.turbine_id, a.project_id, a.image_name, a.image_size, a.focal_distance,
|
SELECT
|
||||||
a.shooting_time, a.camera_manufacture, a.camera_model, a.longitude, a.latitude, a.altitude,
|
i.image_id, i.image_name, ic.part_id, p.part_name, i.image_resolution, i.focal_distance, i.shooting_time, i.camera_manufacturer,
|
||||||
a.image_type, a.image_path
|
i.camera_model, i.GPS, ic.weather, ic.humidness, CONCAT(ic.temperature_min, '℃', '~',temperature_max, '℃') AS temperature, ic.wind_level,
|
||||||
</sql>
|
ic.shooting_method, ic.shooting_distance,ic.collector_name, i.image_type
|
||||||
|
FROM image i
|
||||||
<select id="queryBySelective" resultType="com.dite.znpt.domain.vo.ImageResp">
|
LEFT JOIN image_collect ic ON i.collect_id = ic.collect_id
|
||||||
select
|
LEFT JOIN part p ON ic.part_id = p.part_id
|
||||||
<include refid="Base_Column_List"/>
|
|
||||||
from image a
|
|
||||||
<where>
|
<where>
|
||||||
<if test="keyword != null and keyword != ''">
|
<if test="keyword != null and keyword != ''">
|
||||||
and a.image_name like concat('%', #{keyword,jdbcType=VARCHAR}, '%')
|
AND i.image_name LIKE concat('%', #{keyword}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="turbineId != null and turbineId != ''">
|
||||||
|
AND p.turbine_id = #{turbineId}
|
||||||
|
</if>
|
||||||
|
<if test="imageTypes != null and imageTypes.length > 0">
|
||||||
|
AND i.image_type in <foreach collection="imageTypes" item="imageType" open="(" close=")" separator=",">#{imageType}</foreach>
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<resultMap id="imageRespMap" type="com.dite.znpt.domain.vo.ImageResp">
|
||||||
|
<id property="imageId" column="image_id"></id>
|
||||||
|
<result property="imageName" column="image_name"></result>
|
||||||
|
<result property="imagePath" column="image_path"></result>
|
||||||
|
<result property="imageSize" column="image_size"></result>
|
||||||
|
<result property="imageResolution" column="image_resolution"></result>
|
||||||
|
<association property="imageExifInfo">
|
||||||
|
<result property="imageWidth" column="image_width"></result>
|
||||||
|
<result property="imageHeight" column="image_height"></result>
|
||||||
|
<result property="imageResolution" column="image_resolution"></result>
|
||||||
|
<result property="focalDistance" column="focal_distance"></result>
|
||||||
|
<result property="focalDistance35" column="focal_distance35"></result>
|
||||||
|
<result property="xResolution" column="x_resolution"></result>
|
||||||
|
<result property="yResolution" column="y_resolution"></result>
|
||||||
|
<result property="resolutionUnits" column="resolution_units"></result>
|
||||||
|
<result property="shootingTime" column="shooting_time"></result>
|
||||||
|
<result property="cameraManufacturer" column="camera_manufacturer"></result>
|
||||||
|
<result property="cameraModel" column="camera_model"></result>
|
||||||
|
<result property="longitude" column="latitude"></result>
|
||||||
|
<result property="latitude" column="latitude"></result>
|
||||||
|
<result property="altitude" column="altitude"></result>
|
||||||
|
</association>
|
||||||
|
<association property="imageCollectInfo">
|
||||||
|
<id property="collectId" column="collect_id" ></id>
|
||||||
|
<result property="weather" column="weather"></result>
|
||||||
|
<result property="humidness" column="humidness"></result>
|
||||||
|
<result property="temperature" column="temperature"></result>
|
||||||
|
<result property="windLevel" column="wind_level"></result>
|
||||||
|
<result property="shootingMethod" column="shooting_method"></result>
|
||||||
|
<result property="shootingDistance" column="shooting_distance"></result>
|
||||||
|
<result property="collectorName" column="collector_name"></result>
|
||||||
|
</association>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<select id="detail" resultMap="imageRespMap">
|
||||||
|
SELECT i.image_id, i.image_name, i.image_path, i.image_height, i.image_resolution, i.image_width, i.image_height, i.focal_distance,
|
||||||
|
i.focal_distance35, i.x_resolution, i.y_resolution, i.resolution_units, i.shooting_time, i.camera_manufacturer, i.camera_model,
|
||||||
|
i.latitude, i.latitude, i.altitude, ic.collect_id, ic.weather, CONCAT(ic.temperature_min, '℃', '~',temperature_max, '℃') AS temperature,
|
||||||
|
ic.wind_level, ic.shooting_method, ic.shooting_distance, ic.collector_name
|
||||||
|
FROM image i
|
||||||
|
LEFT JOIN image_collect ic ON i.collect_id = ic.collect_id
|
||||||
|
WHERE i.image_id = #{imageId}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
|
@ -1,29 +0,0 @@
|
||||||
<?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.ProjectCompanyMapper">
|
|
||||||
|
|
||||||
<sql id="Base_Column_List">
|
|
||||||
a.project_id, a.company_id, a.relation_type
|
|
||||||
</sql>
|
|
||||||
|
|
||||||
<select id="queryBySelective" resultType="com.dite.znpt.domain.vo.ProjectCompanyResp">
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List"/>
|
|
||||||
from project_company a
|
|
||||||
<where>
|
|
||||||
<if test="keyword != null and keyword != ''">
|
|
||||||
# and (a.TODO like concat('%', #{keyword,jdbcType=VARCHAR}, '%') or a.TODO like concat('%', #{keyword,jdbcType=VARCHAR}, '%'))
|
|
||||||
</if>
|
|
||||||
<if test="projectId != null and projectId != ''">
|
|
||||||
and a.project_id like concat ('%', #{projectId}, '%')
|
|
||||||
</if>
|
|
||||||
<if test="companyId != null and companyId != ''">
|
|
||||||
and a.company_id like concat ('%', #{companyId}, '%')
|
|
||||||
</if>
|
|
||||||
<if test="relationType != null and relationType != ''">
|
|
||||||
and a.relation_type like concat ('%', #{relationType}, '%')
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
</select>
|
|
||||||
</mapper>
|
|
||||||
|
|
|
@ -1,36 +0,0 @@
|
||||||
<?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.TCompanyMapper">
|
|
||||||
|
|
||||||
<sql id="Base_Column_List">
|
|
||||||
a.company_id, a.company_name, a.address, a.contact,
|
|
||||||
a.phone
|
|
||||||
</sql>
|
|
||||||
|
|
||||||
<select id="queryBySelective" resultType="com.dite.znpt.domain.vo.TCompanyResp">
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List"/>
|
|
||||||
from t_company a
|
|
||||||
<where>
|
|
||||||
<if test="keyword != null and keyword != ''">
|
|
||||||
# and (a.TODO like concat('%', #{keyword,jdbcType=VARCHAR}, '%') or a.TODO like concat('%', #{keyword,jdbcType=VARCHAR}, '%'))
|
|
||||||
</if>
|
|
||||||
<if test="companyId != null and companyId != ''">
|
|
||||||
and a.company_id like concat ('%', #{companyId}, '%')
|
|
||||||
</if>
|
|
||||||
<if test="companyName != null and companyName != ''">
|
|
||||||
and a.company_name like concat ('%', #{companyName}, '%')
|
|
||||||
</if>
|
|
||||||
<if test="address != null and address != ''">
|
|
||||||
and a.address like concat ('%', #{address}, '%')
|
|
||||||
</if>
|
|
||||||
<if test="contact != null and contact != ''">
|
|
||||||
and a.contact like concat ('%', #{contact}, '%')
|
|
||||||
</if>
|
|
||||||
<if test="phone != null and phone != ''">
|
|
||||||
and a.phone like concat ('%', #{phone}, '%')
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
</select>
|
|
||||||
</mapper>
|
|
||||||
|
|
10
web/pom.xml
10
web/pom.xml
|
@ -29,10 +29,10 @@
|
||||||
<artifactId>core</artifactId>
|
<artifactId>core</artifactId>
|
||||||
<version>1.0.0-SNAPSHOT</version>
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<!-- <dependency>-->
|
||||||
<groupId>com.dite.znpt</groupId>
|
<!-- <groupId>com.dite.znpt</groupId>-->
|
||||||
<artifactId>data-bus</artifactId>
|
<!-- <artifactId>data-bus</artifactId>-->
|
||||||
<version>1.0.0-SNAPSHOT</version>
|
<!-- <version>1.0.0-SNAPSHOT</version>-->
|
||||||
</dependency>
|
<!-- </dependency>-->
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
|
@ -3,6 +3,7 @@ package com.dite.znpt.web.controller;
|
||||||
|
|
||||||
import com.dite.znpt.domain.Constants;
|
import com.dite.znpt.domain.Constants;
|
||||||
import com.dite.znpt.domain.vo.DefectListReq;
|
import com.dite.znpt.domain.vo.DefectListReq;
|
||||||
|
import com.dite.znpt.domain.vo.DefectReq;
|
||||||
import com.dite.znpt.domain.vo.DefectResp;
|
import com.dite.znpt.domain.vo.DefectResp;
|
||||||
import com.dite.znpt.domain.entity.DefectEntity;
|
import com.dite.znpt.domain.entity.DefectEntity;
|
||||||
import com.dite.znpt.service.DefectService;
|
import com.dite.znpt.service.DefectService;
|
||||||
|
@ -30,35 +31,41 @@ public class DefectController {
|
||||||
@Resource
|
@Resource
|
||||||
private DefectService defectService;
|
private DefectService defectService;
|
||||||
|
|
||||||
@ApiOperation(value = "获取缺陷记录列表", httpMethod = "GET")
|
@ApiOperation(value = "分页查询缺陷记录列表", httpMethod = "GET")
|
||||||
@GetMapping("/list")
|
@GetMapping("/page")
|
||||||
public PageResult<DefectResp> list(DefectListReq defectReq) {
|
public PageResult<DefectResp> page(@RequestBody DefectListReq req) {
|
||||||
return PageResult.ok(defectService.selectList(defectReq));
|
return PageResult.ok(defectService.page(req));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "根据缺陷记录Id获取详细信息", httpMethod = "GET")
|
@ApiOperation(value = "查询缺陷记录列表", httpMethod = "GET")
|
||||||
@GetMapping("/{defectId}")
|
@GetMapping("/page")
|
||||||
public Result<DefectResp> getInfo(@PathVariable String defectId) {
|
public Result<List<DefectResp>> list(@RequestBody DefectListReq req) {
|
||||||
return Result.ok(defectService.selectById(defectId));
|
return Result.ok(defectService.list(req));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "查询缺详细", httpMethod = "GET")
|
||||||
|
@GetMapping("/detail/{defectId}")
|
||||||
|
public Result<DefectResp> detail(@PathVariable String defectId) {
|
||||||
|
return Result.ok(defectService.detail(defectId));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "新增缺陷记录", httpMethod = "POST")
|
@ApiOperation(value = "新增缺陷记录", httpMethod = "POST")
|
||||||
@PostMapping
|
@PostMapping("/{imageId}")
|
||||||
public Result<Object> add(@RequestBody DefectEntity defect) {
|
public Result save(@PathVariable String imageId, @RequestBody DefectReq req) {
|
||||||
defectService.saveData(defect);
|
defectService.save(imageId, req);
|
||||||
return Result.ok();
|
return Result.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "修改缺陷记录", httpMethod = "PUT")
|
@ApiOperation(value = "修改缺陷记录", httpMethod = "PUT")
|
||||||
@PutMapping
|
@PutMapping("/{defectId}")
|
||||||
public Result<Object> edit(@RequestBody DefectEntity defect) {
|
public Result edit(@PathVariable String defectId, @RequestBody DefectReq req) {
|
||||||
defectService.updateData(defect);
|
defectService.update(defectId, req);
|
||||||
return Result.ok();
|
return Result.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "删除缺陷记录", httpMethod = "DELETE")
|
@ApiOperation(value = "删除缺陷记录", httpMethod = "DELETE")
|
||||||
@DeleteMapping("/{defectId}")
|
@DeleteMapping("/{defectId}")
|
||||||
public Result<Object> remove(@PathVariable String defectId) {
|
public Result remove(@PathVariable String defectId) {
|
||||||
defectService.deleteById(defectId);
|
defectService.deleteById(defectId);
|
||||||
return Result.ok();
|
return Result.ok();
|
||||||
}
|
}
|
||||||
|
@ -67,7 +74,7 @@ public class DefectController {
|
||||||
@GetMapping("/export")
|
@GetMapping("/export")
|
||||||
@ResponseExcel(name = "缺陷记录")
|
@ResponseExcel(name = "缺陷记录")
|
||||||
public List<DefectResp> export(DefectListReq defectReq) {
|
public List<DefectResp> export(DefectListReq defectReq) {
|
||||||
return defectService.selectList(defectReq);
|
return defectService.page(defectReq);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "导入缺陷记录", httpMethod = "POST")
|
@ApiOperation(value = "导入缺陷记录", httpMethod = "POST")
|
||||||
|
|
|
@ -2,28 +2,69 @@ package com.dite.znpt.web.controller;
|
||||||
|
|
||||||
|
|
||||||
import com.dite.znpt.domain.PageResult;
|
import com.dite.znpt.domain.PageResult;
|
||||||
import com.dite.znpt.domain.vo.ImageListReq;
|
import com.dite.znpt.domain.Result;
|
||||||
import com.dite.znpt.domain.vo.ImageResp;
|
import com.dite.znpt.domain.vo.*;
|
||||||
|
import com.dite.znpt.service.ImageCollectService;
|
||||||
import com.dite.znpt.service.ImageService;
|
import com.dite.znpt.service.ImageService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Bear.G
|
* @author Bear.G
|
||||||
* @date 2025/4/24/周四 12:46
|
* @date 2025/4/24/周四 12:46
|
||||||
* @description
|
* @description
|
||||||
*/
|
*/
|
||||||
|
@Api(tags = "图像信息")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/image")
|
||||||
public class ImageController {
|
public class ImageController {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private ImageService imageService;
|
private ImageService imageService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ImageCollectService imageCollectService;
|
||||||
|
|
||||||
@ApiOperation(value = "分页查询图像列表", httpMethod = "GET")
|
@ApiOperation(value = "分页查询图像列表", httpMethod = "GET")
|
||||||
@GetMapping("/page")
|
@GetMapping("/page")
|
||||||
public PageResult<ImageResp> list(ImageListReq req) {
|
public PageResult<ImageListResp> page(@RequestBody ImageListReq req) {
|
||||||
return PageResult.ok(imageService.selectList(req));
|
return PageResult.ok(imageService.page(req));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "查询图像列表", httpMethod = "GET")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public Result<List<ImageListResp>> list(@RequestBody ImageListReq req){
|
||||||
|
return Result.ok(imageService.list(req));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "查询图像详情", httpMethod = "GET")
|
||||||
|
@GetMapping("/detail/{imageId}")
|
||||||
|
public Result<ImageResp> detail(@PathVariable String imageId){
|
||||||
|
return Result.ok(imageService.detail(imageId));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "批量上传图像", httpMethod = "POST")
|
||||||
|
@PostMapping("/upload-batch/{departId}")
|
||||||
|
public Result<List<ImageReq>> uploadBatch(@PathVariable String departId, @RequestParam("files") MultipartFile[] files) {
|
||||||
|
return Result.ok(imageService.batchUpload(departId, files));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "设置信息", httpMethod = "POST")
|
||||||
|
@PostMapping("/setting-info/{departId}")
|
||||||
|
public Result save(@PathVariable String departId, @RequestBody ImageCollectReq req) {
|
||||||
|
imageCollectService.save(departId, req);
|
||||||
|
return Result.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "删除图像", httpMethod = "DELETE")
|
||||||
|
@DeleteMapping("/{imageId}")
|
||||||
|
public Result remove(@PathVariable String imageId){
|
||||||
|
imageService.delete(imageId);
|
||||||
|
return Result.ok();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,7 @@ import java.util.List;
|
||||||
* @author huise23
|
* @author huise23
|
||||||
* @date 2025/04/11 23:17
|
* @date 2025/04/11 23:17
|
||||||
*/
|
*/
|
||||||
@Api(tags = "")
|
@Api(tags = "部件信息")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/part")
|
@RequestMapping("/part")
|
||||||
public class PartController {
|
public class PartController {
|
||||||
|
|
|
@ -1,84 +0,0 @@
|
||||||
package com.dite.znpt.web.controller;
|
|
||||||
|
|
||||||
|
|
||||||
import com.dite.znpt.domain.Constants;
|
|
||||||
import com.dite.znpt.domain.vo.ProjectCompanyListReq;
|
|
||||||
import com.dite.znpt.domain.vo.ProjectCompanyResp;
|
|
||||||
import com.dite.znpt.domain.entity.ProjectCompanyEntity;
|
|
||||||
import com.dite.znpt.service.ProjectCompanyService;
|
|
||||||
import com.dite.znpt.domain.Result;
|
|
||||||
import com.dite.znpt.domain.PageResult;
|
|
||||||
import com.pig4cloud.plugin.excel.annotation.RequestExcel;
|
|
||||||
import com.pig4cloud.plugin.excel.annotation.ResponseExcel;
|
|
||||||
import com.pig4cloud.plugin.excel.vo.ErrorMessage;
|
|
||||||
import io.swagger.annotations.Api;
|
|
||||||
import io.swagger.annotations.ApiOperation;
|
|
||||||
import org.springframework.validation.BindingResult;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author huise23
|
|
||||||
* @date 2025/04/11 23:17
|
|
||||||
*/
|
|
||||||
@Api(tags = "项目-公司关联信息")
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("/project-company")
|
|
||||||
public class ProjectCompanyController {
|
|
||||||
@Resource
|
|
||||||
private ProjectCompanyService projectCompanyService;
|
|
||||||
|
|
||||||
@ApiOperation(value = "获取项目-公司关联信息列表", httpMethod = "GET")
|
|
||||||
@GetMapping("/list")
|
|
||||||
public PageResult<ProjectCompanyResp> list(ProjectCompanyListReq projectCompanyReq) {
|
|
||||||
return PageResult.ok(projectCompanyService.selectList(projectCompanyReq));
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation(value = "根据项目-公司关联信息Id获取详细信息", httpMethod = "GET")
|
|
||||||
@GetMapping("/{projectId}")
|
|
||||||
public Result<ProjectCompanyResp> getInfo(@PathVariable String projectId) {
|
|
||||||
return Result.ok(projectCompanyService.selectById(projectId));
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation(value = "新增项目-公司关联信息", httpMethod = "POST")
|
|
||||||
@PostMapping
|
|
||||||
public Result<Object> add(@RequestBody ProjectCompanyEntity projectCompany) {
|
|
||||||
projectCompanyService.saveData(projectCompany);
|
|
||||||
return Result.ok();
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation(value = "修改项目-公司关联信息", httpMethod = "PUT")
|
|
||||||
@PutMapping
|
|
||||||
public Result<Object> edit(@RequestBody ProjectCompanyEntity projectCompany) {
|
|
||||||
projectCompanyService.updateData(projectCompany);
|
|
||||||
return Result.ok();
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation(value = "删除项目-公司关联信息", httpMethod = "DELETE")
|
|
||||||
@DeleteMapping("/{projectId}")
|
|
||||||
public Result<Object> remove(@PathVariable String projectId) {
|
|
||||||
projectCompanyService.deleteById(projectId);
|
|
||||||
return Result.ok();
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation(value = "导出项目-公司关联信息", httpMethod = "GET")
|
|
||||||
@GetMapping("/export")
|
|
||||||
@ResponseExcel(name = "项目-公司关联信息")
|
|
||||||
public List<ProjectCompanyResp> export(ProjectCompanyListReq projectCompanyReq) {
|
|
||||||
return projectCompanyService.selectList(projectCompanyReq);
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation(value = "导入项目-公司关联信息", httpMethod = "POST")
|
|
||||||
@PostMapping("/import")
|
|
||||||
public Result<Object> importData(@RequestExcel List<ProjectCompanyEntity> dataList, BindingResult bindingResult) {
|
|
||||||
// JSR 303 校验通用校验获取失败的数据
|
|
||||||
List<ErrorMessage> errorMessageList = (List<ErrorMessage>) bindingResult.getTarget();
|
|
||||||
if (errorMessageList != null && !errorMessageList.isEmpty()) {
|
|
||||||
return Result.error(Constants.SERVICE_EXCEPTION, "导入失败");
|
|
||||||
}
|
|
||||||
return Result.okM("导入"+dataList.size()+"条数据");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,84 +0,0 @@
|
||||||
package com.dite.znpt.web.controller;
|
|
||||||
|
|
||||||
|
|
||||||
import com.dite.znpt.domain.Constants;
|
|
||||||
import com.dite.znpt.domain.vo.TCompanyListReq;
|
|
||||||
import com.dite.znpt.domain.vo.TCompanyResp;
|
|
||||||
import com.dite.znpt.domain.entity.TCompanyEntity;
|
|
||||||
import com.dite.znpt.service.TCompanyService;
|
|
||||||
import com.dite.znpt.domain.Result;
|
|
||||||
import com.dite.znpt.domain.PageResult;
|
|
||||||
import com.pig4cloud.plugin.excel.annotation.RequestExcel;
|
|
||||||
import com.pig4cloud.plugin.excel.annotation.ResponseExcel;
|
|
||||||
import com.pig4cloud.plugin.excel.vo.ErrorMessage;
|
|
||||||
import io.swagger.annotations.Api;
|
|
||||||
import io.swagger.annotations.ApiOperation;
|
|
||||||
import org.springframework.validation.BindingResult;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author huise23
|
|
||||||
* @date 2025/04/11 23:17
|
|
||||||
*/
|
|
||||||
@Api(tags = "公司信息")
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("/t-company")
|
|
||||||
public class TCompanyController {
|
|
||||||
@Resource
|
|
||||||
private TCompanyService tCompanyService;
|
|
||||||
|
|
||||||
@ApiOperation(value = "获取公司信息列表", httpMethod = "GET")
|
|
||||||
@GetMapping("/list")
|
|
||||||
public PageResult<TCompanyResp> list(TCompanyListReq tCompanyReq) {
|
|
||||||
return PageResult.ok(tCompanyService.selectList(tCompanyReq));
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation(value = "根据公司信息Id获取详细信息", httpMethod = "GET")
|
|
||||||
@GetMapping("/{companyId}")
|
|
||||||
public Result<TCompanyResp> getInfo(@PathVariable String companyId) {
|
|
||||||
return Result.ok(tCompanyService.selectById(companyId));
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation(value = "新增公司信息", httpMethod = "POST")
|
|
||||||
@PostMapping
|
|
||||||
public Result<Object> add(@RequestBody TCompanyEntity tCompany) {
|
|
||||||
tCompanyService.saveData(tCompany);
|
|
||||||
return Result.ok();
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation(value = "修改公司信息", httpMethod = "PUT")
|
|
||||||
@PutMapping
|
|
||||||
public Result<Object> edit(@RequestBody TCompanyEntity tCompany) {
|
|
||||||
tCompanyService.updateData(tCompany);
|
|
||||||
return Result.ok();
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation(value = "删除公司信息", httpMethod = "DELETE")
|
|
||||||
@DeleteMapping("/{companyId}")
|
|
||||||
public Result<Object> remove(@PathVariable String companyId) {
|
|
||||||
tCompanyService.deleteById(companyId);
|
|
||||||
return Result.ok();
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation(value = "导出公司信息", httpMethod = "GET")
|
|
||||||
@GetMapping("/export")
|
|
||||||
@ResponseExcel(name = "公司信息")
|
|
||||||
public List<TCompanyResp> export(TCompanyListReq tCompanyReq) {
|
|
||||||
return tCompanyService.selectList(tCompanyReq);
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation(value = "导入公司信息", httpMethod = "POST")
|
|
||||||
@PostMapping("/import")
|
|
||||||
public Result<Object> importData(@RequestExcel List<TCompanyEntity> dataList, BindingResult bindingResult) {
|
|
||||||
// JSR 303 校验通用校验获取失败的数据
|
|
||||||
List<ErrorMessage> errorMessageList = (List<ErrorMessage>) bindingResult.getTarget();
|
|
||||||
if (errorMessageList != null && !errorMessageList.isEmpty()) {
|
|
||||||
return Result.error(Constants.SERVICE_EXCEPTION, "导入失败");
|
|
||||||
}
|
|
||||||
return Result.okM("导入"+dataList.size()+"条数据");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -5,6 +5,7 @@ import com.dite.znpt.domain.Constants;
|
||||||
import com.dite.znpt.domain.vo.TurbineListReq;
|
import com.dite.znpt.domain.vo.TurbineListReq;
|
||||||
import com.dite.znpt.domain.vo.TurbineResp;
|
import com.dite.znpt.domain.vo.TurbineResp;
|
||||||
import com.dite.znpt.domain.entity.TurbineEntity;
|
import com.dite.znpt.domain.entity.TurbineEntity;
|
||||||
|
import com.dite.znpt.exception.ServiceException;
|
||||||
import com.dite.znpt.service.TurbineService;
|
import com.dite.znpt.service.TurbineService;
|
||||||
import com.dite.znpt.domain.Result;
|
import com.dite.znpt.domain.Result;
|
||||||
import com.dite.znpt.domain.PageResult;
|
import com.dite.znpt.domain.PageResult;
|
||||||
|
@ -17,6 +18,7 @@ import org.springframework.validation.BindingResult;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import javax.validation.Valid;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -31,7 +33,7 @@ public class TurbineController {
|
||||||
private TurbineService turbineService;
|
private TurbineService turbineService;
|
||||||
|
|
||||||
@ApiOperation(value = "获取机组-项目关联列表", httpMethod = "GET")
|
@ApiOperation(value = "获取机组-项目关联列表", httpMethod = "GET")
|
||||||
@GetMapping("/list")
|
@GetMapping({"/list", "/getByProjectId"})
|
||||||
public PageResult<TurbineResp> list(TurbineListReq turbineReq) {
|
public PageResult<TurbineResp> list(TurbineListReq turbineReq) {
|
||||||
return PageResult.ok(turbineService.selectList(turbineReq));
|
return PageResult.ok(turbineService.selectList(turbineReq));
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# 开发环境配置
|
# 开发环境配置
|
||||||
server:
|
server:
|
||||||
# 服务器的HTTP端口,默认为8080
|
# 服务器的HTTP端口,默认为8080
|
||||||
port: 8080
|
port: 8888
|
||||||
|
|
||||||
# 数据源配置
|
# 数据源配置
|
||||||
spring:
|
spring:
|
||||||
|
@ -10,7 +10,7 @@ spring:
|
||||||
driverClassName: com.mysql.cj.jdbc.Driver
|
driverClassName: com.mysql.cj.jdbc.Driver
|
||||||
url: jdbc:mysql://39.99.201.243:3306/test?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
url: jdbc:mysql://39.99.201.243:3306/test?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||||
username: root
|
username: root
|
||||||
password: h67&E98HS8^6
|
password: BUw8YW6%@^8q
|
||||||
druid:
|
druid:
|
||||||
# 初始连接数
|
# 初始连接数
|
||||||
initialSize: 5
|
initialSize: 5
|
||||||
|
@ -59,11 +59,15 @@ spring:
|
||||||
max-wait: 3000
|
max-wait: 3000
|
||||||
host: 39.99.201.243
|
host: 39.99.201.243
|
||||||
port: 6379
|
port: 6379
|
||||||
password: yfeng@123
|
password: diTeZn@123
|
||||||
timeout: 3000
|
timeout: 3000
|
||||||
# 0 gaea系统,3 gaea-dev/gaea-test系统,4 znpt开发,5 znpt测试 6 znpt生产
|
# 0 gaea系统,3 gaea-dev/gaea-test系统,4 znpt开发,5 znpt测试 6 znpt生产
|
||||||
database: 4
|
database: 4
|
||||||
|
rabbitmq:
|
||||||
|
host: 39.99.201.243
|
||||||
|
port: 3389
|
||||||
|
username: dite
|
||||||
|
password: diTezN@123
|
||||||
## MINIO配置
|
## MINIO配置
|
||||||
#minio:
|
#minio:
|
||||||
# url: http://10.20.32.11:9000
|
# url: http://10.20.32.11:9000
|
||||||
|
@ -80,7 +84,7 @@ spring:
|
||||||
|
|
||||||
sip-config:
|
sip-config:
|
||||||
name: 信令服务
|
name: 信令服务
|
||||||
ip: 10.17.12.203
|
ip: 192.168.0.207
|
||||||
port: 1074
|
port: 1074
|
||||||
charset: gb2312
|
charset: gb2312
|
||||||
domain: 3402000000
|
domain: 3402000000
|
||||||
|
@ -96,18 +100,23 @@ zlm-config:
|
||||||
# 公网ip
|
# 公网ip
|
||||||
publicHost:
|
publicHost:
|
||||||
# 接口ip
|
# 接口ip
|
||||||
apiHost: 10.17.12.203
|
apiHost: 192.168.0.207
|
||||||
# 接口端口
|
# 接口端口
|
||||||
apiPort: 30186
|
apiPort: 8080
|
||||||
# 密钥
|
# 密钥
|
||||||
secretKey: JvVotkdN01y4qZHlrJsdq4gD7n9rK6wV
|
secretKey: 6Q76ivvVOQDsnnfOSKbtVzcYpbgy4n1G
|
||||||
# 流id前缀
|
# 流id前缀
|
||||||
streamPrefix:
|
streamPrefix:
|
||||||
# rtp ip
|
# rtp ip
|
||||||
rtpHost: 10.17.12.203
|
rtpHost: 192.168.0.207
|
||||||
# rtp 端口
|
# rtp 端口
|
||||||
rtpPort: 30186
|
rtpPort: 8080
|
||||||
# 动态端口起始值
|
# 动态端口起始值
|
||||||
dynamicPortStart: 30150
|
dynamicPortStart: 30150
|
||||||
# 动态端口结束值
|
# 动态端口结束值
|
||||||
dynamicPortEnd: 30185
|
dynamicPortEnd: 30185
|
||||||
|
|
||||||
|
upload:
|
||||||
|
temp-path: F:\Upload\Temp
|
||||||
|
perm-path: F:\Upload\Perm
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue