parent
a65975a520
commit
25d828a319
|
@ -66,4 +66,5 @@ public class Message implements Serializable {
|
||||||
public static final String IMAGE_AUTO_MARK_ERROR = "自动标注出错:";
|
public static final String IMAGE_AUTO_MARK_ERROR = "自动标注出错:";
|
||||||
public static final String SUGGESTION_ID_IS_NOT_EXIST = "维修建议id不存在";
|
public static final String SUGGESTION_ID_IS_NOT_EXIST = "维修建议id不存在";
|
||||||
public static final String SUGGESTION_LEVEL_TYPE_FORBID_REPEAT = "存在缺陷级别为[{}]缺陷类型为[{}]的维修建议";
|
public static final String SUGGESTION_LEVEL_TYPE_FORBID_REPEAT = "存在缺陷级别为[{}]缺陷类型为[{}]的维修建议";
|
||||||
|
public static final String CHECK_SCHEME_ID_IS_NOT_EXIST = "检查方案id不存在";
|
||||||
}
|
}
|
||||||
|
|
|
@ -103,5 +103,10 @@ public interface Converts {
|
||||||
MaintainSuggestionResp toMaintainSuggestionResp(MaintainSuggestionEntity entity);
|
MaintainSuggestionResp toMaintainSuggestionResp(MaintainSuggestionEntity entity);
|
||||||
|
|
||||||
MaintainSuggestionEntity toMaintainSuggestionEntity(MaintainSuggestionReq req);
|
MaintainSuggestionEntity toMaintainSuggestionEntity(MaintainSuggestionReq req);
|
||||||
|
|
||||||
|
List<CheckSchemeResp> toCheckSchemeResp(List<CheckSchemeEntity> list);
|
||||||
|
CheckSchemeResp toCheckSchemeResp(CheckSchemeEntity entity);
|
||||||
|
|
||||||
|
CheckSchemeEntity toCheckSchemeEntity(CheckSchemeReq req);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,57 @@
|
||||||
|
package com.dite.znpt.domain.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.dite.znpt.domain.AuditableEntity;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: gaoxiong
|
||||||
|
* @Date: 2025/7/9 23:29
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@TableName("check_scheme")
|
||||||
|
@ApiModel(value="CheckSchemeEntity对象", description="检查方案")
|
||||||
|
public class CheckSchemeEntity extends AuditableEntity implements Serializable {
|
||||||
|
|
||||||
|
@ApiModelProperty("方案id")
|
||||||
|
@TableId(value = "scheme_id", type = IdType.ASSIGN_UUID)
|
||||||
|
private String schemeId;
|
||||||
|
|
||||||
|
@ApiModelProperty("工作内容")
|
||||||
|
@TableField("work_content")
|
||||||
|
private String workContent;
|
||||||
|
|
||||||
|
@ApiModelProperty("人员配置")
|
||||||
|
@TableField("staff_config")
|
||||||
|
private String staffConfig;
|
||||||
|
|
||||||
|
@ApiModelProperty("设备配置")
|
||||||
|
@TableField("device_config")
|
||||||
|
private String deviceConfig;
|
||||||
|
|
||||||
|
@ApiModelProperty("实施方案")
|
||||||
|
@TableField("construction_scheme")
|
||||||
|
private String constructionScheme;
|
||||||
|
|
||||||
|
@ApiModelProperty("检查方式,枚举CheckTypeEnum")
|
||||||
|
@TableField("check_type")
|
||||||
|
private String checkType;
|
||||||
|
|
||||||
|
@ApiModelProperty("备注")
|
||||||
|
@TableField("remark")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
@ApiModelProperty("删除标志(0代表存在 1代表删除)")
|
||||||
|
@TableField("delFlag")
|
||||||
|
private String delFlag;
|
||||||
|
}
|
|
@ -13,6 +13,7 @@ import lombok.EqualsAndHashCode;
|
||||||
import java.io.Serial;
|
import java.io.Serial;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Bear.G
|
* @author Bear.G
|
||||||
|
@ -27,7 +28,6 @@ public class InspectionReportEntity extends AuditableEntity implements Serializa
|
||||||
@Serial
|
@Serial
|
||||||
private static final long serialVersionUID = 6994234156669409533L;
|
private static final long serialVersionUID = 6994234156669409533L;
|
||||||
|
|
||||||
|
|
||||||
@ApiModelProperty("报告id")
|
@ApiModelProperty("报告id")
|
||||||
@TableId(value = "report_id", type = IdType.ASSIGN_UUID)
|
@TableId(value = "report_id", type = IdType.ASSIGN_UUID)
|
||||||
private String reportId;
|
private String reportId;
|
||||||
|
@ -40,9 +40,17 @@ public class InspectionReportEntity extends AuditableEntity implements Serializa
|
||||||
@TableField("sub_title")
|
@TableField("sub_title")
|
||||||
private String subTitle;
|
private String subTitle;
|
||||||
|
|
||||||
@ApiModelProperty("报告日期")
|
@ApiModelProperty("封面")
|
||||||
@TableField("report_date")
|
@TableField("cover_image")
|
||||||
private LocalDate reportDate;
|
private String coverImage;
|
||||||
|
|
||||||
|
@ApiModelProperty("项目id")
|
||||||
|
@TableField("project_id")
|
||||||
|
private String projectId;
|
||||||
|
|
||||||
|
@ApiModelProperty("机组id")
|
||||||
|
@TableField("turbine_id")
|
||||||
|
private String turbineId;
|
||||||
|
|
||||||
@ApiModelProperty("检查日期")
|
@ApiModelProperty("检查日期")
|
||||||
@TableField("check_date")
|
@TableField("check_date")
|
||||||
|
@ -68,11 +76,23 @@ public class InspectionReportEntity extends AuditableEntity implements Serializa
|
||||||
@TableField("report_writer")
|
@TableField("report_writer")
|
||||||
private String reportWriter;
|
private String reportWriter;
|
||||||
|
|
||||||
|
@ApiModelProperty("报告编制时间")
|
||||||
|
@TableField("report_write_time")
|
||||||
|
private LocalDateTime reportWriteTime;
|
||||||
|
|
||||||
@ApiModelProperty("报告复核人员id")
|
@ApiModelProperty("报告复核人员id")
|
||||||
@TableField("report_reviewer")
|
@TableField("report_reviewer")
|
||||||
private String reportReviewer;
|
private String reportReviewer;
|
||||||
|
|
||||||
|
@ApiModelProperty("报告复核时间")
|
||||||
|
@TableField("report_review_time")
|
||||||
|
private LocalDateTime reportReviewTime;
|
||||||
|
|
||||||
@ApiModelProperty("报告审核人员id")
|
@ApiModelProperty("报告审核人员id")
|
||||||
@TableField("report_auditor")
|
@TableField("report_auditor")
|
||||||
private String reportAuditor;
|
private String reportAuditor;
|
||||||
|
|
||||||
|
@ApiModelProperty("报告审核时间")
|
||||||
|
@TableField("report_audit_time")
|
||||||
|
private LocalDateTime reportAuditTime;
|
||||||
}
|
}
|
||||||
|
|
|
@ -80,6 +80,11 @@ public class ProjectEntity extends AuditableEntity implements Serializable {
|
||||||
@TableField("scale")
|
@TableField("scale")
|
||||||
private String scale;
|
private String scale;
|
||||||
|
|
||||||
|
@ExcelProperty("总工期,单位天")
|
||||||
|
@ApiModelProperty("总工期,单位天")
|
||||||
|
@TableField("duration")
|
||||||
|
private Integer duration;
|
||||||
|
|
||||||
@ExcelProperty("风机型号")
|
@ExcelProperty("风机型号")
|
||||||
@ApiModelProperty("风机型号")
|
@ApiModelProperty("风机型号")
|
||||||
@TableField("turbine_model")
|
@TableField("turbine_model")
|
||||||
|
|
|
@ -0,0 +1,51 @@
|
||||||
|
package com.dite.znpt.domain.vo;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.Size;
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: gaoxiong
|
||||||
|
* @Date: 2025/7/9 23:35
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel("检查方案请求实体")
|
||||||
|
public class CheckSchemeReq implements Serializable {
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 2699725873314667276L;
|
||||||
|
|
||||||
|
@NotBlank(message = "工作内容不能为空")
|
||||||
|
@Size(max = 1000, message = "工作内容不能超过1000个字")
|
||||||
|
@ApiModelProperty("工作内容")
|
||||||
|
private String workContent;
|
||||||
|
|
||||||
|
@NotBlank(message = "人员配置不能为空")
|
||||||
|
@Size(max = 200, message = "人员配置不能超过200个字")
|
||||||
|
@ApiModelProperty("人员配置")
|
||||||
|
private String staffConfig;
|
||||||
|
|
||||||
|
@NotBlank(message = "设备配置不能为空")
|
||||||
|
@Size(max = 500, message = "设备配置不能超过500个字")
|
||||||
|
@ApiModelProperty("设备配置")
|
||||||
|
private String deviceConfig;
|
||||||
|
|
||||||
|
@NotBlank(message = "实施方案不能为空")
|
||||||
|
@Size(max = 2000, message = "实施方案不能超过2000个字")
|
||||||
|
@ApiModelProperty("实施方案")
|
||||||
|
private String constructionScheme;
|
||||||
|
|
||||||
|
@NotBlank(message = "检查方式不能为空")
|
||||||
|
@ApiModelProperty("检查方式,枚举CheckMethodEnum")
|
||||||
|
private String checkMethod;
|
||||||
|
|
||||||
|
@NotBlank(message = "备注不能为空")
|
||||||
|
@Size(max = 500, message = "备注不能超过500个字")
|
||||||
|
@ApiModelProperty("备注")
|
||||||
|
private String remark;
|
||||||
|
}
|
|
@ -0,0 +1,44 @@
|
||||||
|
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/7/9 23:14
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel("检查方案响应实体")
|
||||||
|
public class CheckSchemeResp implements Serializable {
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 2327453920890578467L;
|
||||||
|
|
||||||
|
@ApiModelProperty("方案id")
|
||||||
|
private String schemeId;
|
||||||
|
|
||||||
|
@ApiModelProperty("工作内容")
|
||||||
|
private String workContent;
|
||||||
|
|
||||||
|
@ApiModelProperty("人员配置")
|
||||||
|
private String staffConfig;
|
||||||
|
|
||||||
|
@ApiModelProperty("设备配置")
|
||||||
|
private String deviceConfig;
|
||||||
|
|
||||||
|
@ApiModelProperty("实施方案")
|
||||||
|
private String constructionScheme;
|
||||||
|
|
||||||
|
@ApiModelProperty("检查方式,枚举CheckMethodEnum")
|
||||||
|
private String checkMethod;
|
||||||
|
|
||||||
|
@ApiModelProperty("检查方式描述")
|
||||||
|
private String checkMethodLabel;
|
||||||
|
|
||||||
|
@ApiModelProperty("备注")
|
||||||
|
private String remark;
|
||||||
|
}
|
|
@ -0,0 +1,38 @@
|
||||||
|
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.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: gaoxiong
|
||||||
|
* @Date: 2025/7/9 22:23
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel("检查报告检查信息")
|
||||||
|
public class InspectionReportCheckInfo implements Serializable {
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 193233798058399831L;
|
||||||
|
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
@ApiModelProperty("检查日期")
|
||||||
|
private LocalDate checkDate;
|
||||||
|
|
||||||
|
@ApiModelProperty("检查位置")
|
||||||
|
private String checkPosition;
|
||||||
|
|
||||||
|
@ApiModelProperty("检查内容")
|
||||||
|
private String checkContent;
|
||||||
|
|
||||||
|
@ApiModelProperty("检查方式")
|
||||||
|
private String checkMethod;
|
||||||
|
|
||||||
|
@ApiModelProperty("检查人员id,多个人员英文逗号分隔")
|
||||||
|
private String checkUserId;
|
||||||
|
}
|
|
@ -0,0 +1,61 @@
|
||||||
|
package com.dite.znpt.domain.vo;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
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/7/9 22:16
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel("检查报告封面信息")
|
||||||
|
public class InspectionReportCoverInfo implements Serializable {
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 2416173276374292199L;
|
||||||
|
|
||||||
|
@ApiModelProperty("报告id")
|
||||||
|
private String reportId;
|
||||||
|
|
||||||
|
@ApiModelProperty("主标题")
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
@ApiModelProperty("副标题")
|
||||||
|
private String subTitle;
|
||||||
|
|
||||||
|
@ApiModelProperty("封面")
|
||||||
|
private String coverImage;
|
||||||
|
|
||||||
|
@ApiModelProperty("报告编制人员id")
|
||||||
|
private String reportWriter;
|
||||||
|
|
||||||
|
@ApiModelProperty("报告编制人员")
|
||||||
|
private String reportWriterName;
|
||||||
|
|
||||||
|
@ApiModelProperty("报告编制时间")
|
||||||
|
private LocalDateTime reportWriteTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("报告复核人员id")
|
||||||
|
private String reportReviewer;
|
||||||
|
|
||||||
|
@ApiModelProperty("报告复核人员")
|
||||||
|
private String reportReviewerName;
|
||||||
|
|
||||||
|
@ApiModelProperty("报告复核时间")
|
||||||
|
private LocalDateTime reportReviewTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("报告审核人员id")
|
||||||
|
private String reportAuditor;
|
||||||
|
|
||||||
|
@ApiModelProperty("报告审核人员")
|
||||||
|
private String reportAuditName;
|
||||||
|
|
||||||
|
@ApiModelProperty("报告审核时间")
|
||||||
|
private LocalDateTime reportAuditTime;
|
||||||
|
}
|
|
@ -0,0 +1,78 @@
|
||||||
|
package com.dite.znpt.domain.vo;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
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.LocalDate;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: gaoxiong
|
||||||
|
* @Date: 2025/7/9 22:08
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel("检查报告请求实体")
|
||||||
|
public class InspectionReportReq implements Serializable {
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 4937399975205847660L;
|
||||||
|
|
||||||
|
@ApiModelProperty("报告id")
|
||||||
|
private String reportId;
|
||||||
|
|
||||||
|
@ApiModelProperty("主标题")
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
@ApiModelProperty("副标题")
|
||||||
|
private String subTitle;
|
||||||
|
|
||||||
|
@ApiModelProperty("封面")
|
||||||
|
private String coverImage;
|
||||||
|
|
||||||
|
@ApiModelProperty("项目id")
|
||||||
|
private String projectId;
|
||||||
|
|
||||||
|
@ApiModelProperty("机组id")
|
||||||
|
private String turbineId;
|
||||||
|
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
@ApiModelProperty("检查日期")
|
||||||
|
private LocalDate checkDate;
|
||||||
|
|
||||||
|
@ApiModelProperty("检查位置")
|
||||||
|
private String checkPosition;
|
||||||
|
|
||||||
|
@ApiModelProperty("检查内容")
|
||||||
|
private String checkContent;
|
||||||
|
|
||||||
|
@ApiModelProperty("检查方式,多个方式英文逗号分隔")
|
||||||
|
private String checkMethod;
|
||||||
|
|
||||||
|
@ApiModelProperty("检查人员id,多个人员英文逗号分隔")
|
||||||
|
private String checkUserId;
|
||||||
|
|
||||||
|
@ApiModelProperty("报告编制人员id")
|
||||||
|
private String reportWriter;
|
||||||
|
|
||||||
|
@ApiModelProperty("报告编制时间")
|
||||||
|
private LocalDateTime reportWriteTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("报告复核人员id")
|
||||||
|
private String reportReviewer;
|
||||||
|
|
||||||
|
@ApiModelProperty("报告复核时间")
|
||||||
|
private LocalDateTime reportReviewTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("报告审核人员id")
|
||||||
|
private String reportAuditor;
|
||||||
|
|
||||||
|
@ApiModelProperty("报告审核时间")
|
||||||
|
private LocalDateTime reportAuditTime;
|
||||||
|
}
|
|
@ -0,0 +1,39 @@
|
||||||
|
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;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: gaoxiong
|
||||||
|
* @Date: 2025/7/9 22:14
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel("检查报告响应实体")
|
||||||
|
public class InspectionReportResp implements Serializable {
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = -2229157312487991799L;
|
||||||
|
|
||||||
|
@ApiModelProperty("封面信息")
|
||||||
|
private InspectionReportCoverInfo coverInfo;
|
||||||
|
|
||||||
|
@ApiModelProperty("项目信息")
|
||||||
|
private ProjectResp projectInfo;
|
||||||
|
|
||||||
|
@ApiModelProperty("检查信息")
|
||||||
|
private InspectionReportCheckInfo checkInfo;
|
||||||
|
|
||||||
|
@ApiModelProperty("机组信息")
|
||||||
|
private TurbineInfoResp turbineInfo;
|
||||||
|
|
||||||
|
@ApiModelProperty("检查方案")
|
||||||
|
private List<CheckSchemeResp> schemeInfoList;
|
||||||
|
|
||||||
|
@ApiModelProperty("缺陷信息")
|
||||||
|
private List<DefectResp> defectInfoList;
|
||||||
|
}
|
|
@ -0,0 +1,40 @@
|
||||||
|
package com.dite.znpt.domain.vo;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
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/7/9 22:24
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel("检查报告方案信息")
|
||||||
|
public class InspectionReportSchemeInfo implements Serializable {
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty("检查日期")
|
||||||
|
@TableField("check_date")
|
||||||
|
private LocalDate checkDate;
|
||||||
|
|
||||||
|
@ApiModelProperty("检查位置")
|
||||||
|
@TableField("check_position")
|
||||||
|
private String checkPosition;
|
||||||
|
|
||||||
|
@ApiModelProperty("检查内容")
|
||||||
|
@TableField("check_content")
|
||||||
|
private String checkContent;
|
||||||
|
|
||||||
|
@ApiModelProperty("检查方式")
|
||||||
|
@TableField("check_method")
|
||||||
|
private String checkMethod;
|
||||||
|
|
||||||
|
@ApiModelProperty("检查人员id,多个人员英文逗号分隔")
|
||||||
|
@TableField("check_user_id")
|
||||||
|
private String checkUserId;
|
||||||
|
}
|
|
@ -67,6 +67,9 @@ public class ProjectListResp implements Serializable {
|
||||||
@ApiModelProperty("项目规模")
|
@ApiModelProperty("项目规模")
|
||||||
private String scale;
|
private String scale;
|
||||||
|
|
||||||
|
@ApiModelProperty("总工期,单位天")
|
||||||
|
private Integer duration;
|
||||||
|
|
||||||
@ApiModelProperty("风机型号")
|
@ApiModelProperty("风机型号")
|
||||||
private String turbineModel;
|
private String turbineModel;
|
||||||
|
|
||||||
|
|
|
@ -74,6 +74,9 @@ public class ProjectReq implements Serializable {
|
||||||
@ApiModelProperty("项目规模")
|
@ApiModelProperty("项目规模")
|
||||||
private String scale;
|
private String scale;
|
||||||
|
|
||||||
|
@ApiModelProperty("总工期,单位天")
|
||||||
|
private Integer duration;
|
||||||
|
|
||||||
@Size(groups = {ValidationGroup.Insert.class, ValidationGroup.Update.class}, max = 20, message = "风机型号不能超过20字符")
|
@Size(groups = {ValidationGroup.Insert.class, ValidationGroup.Update.class}, max = 20, message = "风机型号不能超过20字符")
|
||||||
@ApiModelProperty("风机型号")
|
@ApiModelProperty("风机型号")
|
||||||
private String turbineModel;
|
private String turbineModel;
|
||||||
|
|
|
@ -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/7/9 23:23
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
public enum CheckMethodEnum {
|
||||||
|
BLADE_OUTSIDE("blade-outside","叶片外观检查"),
|
||||||
|
BLADE_INSIDE("blade-inside","叶片内腔检查"),
|
||||||
|
BLADE_LIGHTNING_PROTECTION("blade-lightning-protection","叶片叶尖防雷导通检测"),
|
||||||
|
TURBINE_LIGHTNING_PROTECTION("turbine-lightning-protection","风电机组防雷检测"),
|
||||||
|
;
|
||||||
|
private final String code;
|
||||||
|
private final String desc;
|
||||||
|
|
||||||
|
CheckMethodEnum(String code, String desc){
|
||||||
|
this.code = code;
|
||||||
|
this.desc = desc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static CheckMethodEnum getByCode(String code){
|
||||||
|
for (CheckMethodEnum e : CheckMethodEnum.values() ) {
|
||||||
|
if(e.code.equals(code)){
|
||||||
|
return e;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getDescByCode(String code){
|
||||||
|
CheckMethodEnum e = getByCode(code);
|
||||||
|
return null == e ? null : e.desc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static List<JSONObject> listAll(){
|
||||||
|
List<JSONObject> list = new ArrayList<>(CheckMethodEnum.values().length);
|
||||||
|
for (CheckMethodEnum e : CheckMethodEnum.values() ) {
|
||||||
|
JSONObject jsonObject = new JSONObject();
|
||||||
|
jsonObject.set(e.code, e.desc);
|
||||||
|
list.add(jsonObject);
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.dite.znpt.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.dite.znpt.domain.entity.CheckSchemeEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: gaoxiong
|
||||||
|
* @Date: 2025/7/9 23:37
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
public interface CheckSchemeMapper extends BaseMapper<CheckSchemeEntity> {
|
||||||
|
}
|
|
@ -0,0 +1,23 @@
|
||||||
|
package com.dite.znpt.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.dite.znpt.domain.entity.CheckSchemeEntity;
|
||||||
|
import com.dite.znpt.domain.vo.CheckSchemeReq;
|
||||||
|
import com.dite.znpt.domain.vo.CheckSchemeResp;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: gaoxiong
|
||||||
|
* @Date: 2025/7/9 23:38
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
public interface CheckSchemeService extends IService<CheckSchemeEntity> {
|
||||||
|
List<CheckSchemeResp> page(String checkType);
|
||||||
|
List<CheckSchemeResp> list(String checkType);
|
||||||
|
CheckSchemeResp detail(String checkSchemeId);
|
||||||
|
void save(CheckSchemeReq req);
|
||||||
|
void update(String checkSchemeId, CheckSchemeReq req);
|
||||||
|
void deleteById(String checkSchemeId);
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,84 @@
|
||||||
|
package com.dite.znpt.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.dite.znpt.constant.Constants;
|
||||||
|
import com.dite.znpt.constant.Message;
|
||||||
|
import com.dite.znpt.converts.Converts;
|
||||||
|
import com.dite.znpt.domain.entity.CheckSchemeEntity;
|
||||||
|
import com.dite.znpt.domain.vo.CheckSchemeReq;
|
||||||
|
import com.dite.znpt.domain.vo.CheckSchemeResp;
|
||||||
|
import com.dite.znpt.enums.CheckMethodEnum;
|
||||||
|
import com.dite.znpt.exception.ServiceException;
|
||||||
|
import com.dite.znpt.mapper.CheckSchemeMapper;
|
||||||
|
import com.dite.znpt.service.CheckSchemeService;
|
||||||
|
import com.dite.znpt.util.PageUtil;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: gaoxiong
|
||||||
|
* @Date: 2025/7/9 23:39
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class CheckSchemeServiceImpl extends ServiceImpl<CheckSchemeMapper, CheckSchemeEntity> implements CheckSchemeService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<CheckSchemeResp> page(String checkType) {
|
||||||
|
PageUtil.startPage();
|
||||||
|
return this.list(checkType);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<CheckSchemeResp> list(String checkType) {
|
||||||
|
List<CheckSchemeResp> result = Converts.INSTANCE.toCheckSchemeResp(this.list(Wrappers.lambdaQuery(CheckSchemeEntity.class).eq(StrUtil.isNotBlank(checkType), CheckSchemeEntity::getCheckType, checkType)));
|
||||||
|
result.forEach(resp -> {
|
||||||
|
resp.setCheckMethodLabel(CheckMethodEnum.getDescByCode(resp.getCheckMethod()));
|
||||||
|
});
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CheckSchemeResp detail(String checkSchemeId) {
|
||||||
|
CheckSchemeEntity checkScheme = this.getById(checkSchemeId);
|
||||||
|
if(null == checkScheme || checkScheme.getDelFlag() != Constants.DEL_FLAG_0){
|
||||||
|
throw new ServiceException(Message.CHECK_SCHEME_ID_IS_NOT_EXIST);
|
||||||
|
}
|
||||||
|
CheckSchemeResp resp = Converts.INSTANCE.toCheckSchemeResp(checkScheme);
|
||||||
|
resp.setCheckMethodLabel(CheckMethodEnum.getDescByCode(resp.getCheckMethod()));
|
||||||
|
return resp;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
@Override
|
||||||
|
public void save(CheckSchemeReq req) {
|
||||||
|
this.save(Converts.INSTANCE.toCheckSchemeEntity(req));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
@Override
|
||||||
|
public void update(String checkSchemeId, CheckSchemeReq req) {
|
||||||
|
CheckSchemeEntity checkScheme = this.getById(checkSchemeId);
|
||||||
|
if(null == checkScheme || checkScheme.getDelFlag() != Constants.DEL_FLAG_0){
|
||||||
|
throw new ServiceException(Message.CHECK_SCHEME_ID_IS_NOT_EXIST);
|
||||||
|
}
|
||||||
|
CheckSchemeEntity entity = Converts.INSTANCE.toCheckSchemeEntity(req);
|
||||||
|
entity.setSchemeId(checkSchemeId);
|
||||||
|
this.updateById(entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
@Override
|
||||||
|
public void deleteById(String checkSchemeId) {
|
||||||
|
CheckSchemeEntity checkScheme = this.getById(checkSchemeId);
|
||||||
|
if(null == checkScheme || checkScheme.getDelFlag() != Constants.DEL_FLAG_0){
|
||||||
|
throw new ServiceException(Message.CHECK_SCHEME_ID_IS_NOT_EXIST);
|
||||||
|
}
|
||||||
|
checkScheme.setDelFlag(Constants.DEL_FLAG_1);
|
||||||
|
this.updateById(checkScheme);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,65 @@
|
||||||
|
package com.dite.znpt.web.controller;
|
||||||
|
|
||||||
|
import com.dite.znpt.domain.PageResult;
|
||||||
|
import com.dite.znpt.domain.Result;
|
||||||
|
import com.dite.znpt.domain.vo.CheckSchemeReq;
|
||||||
|
import com.dite.znpt.domain.vo.CheckSchemeResp;
|
||||||
|
import com.dite.znpt.service.CheckSchemeService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: gaoxiong
|
||||||
|
* @Date: 2025/7/9 23:39
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
@Api(tags = "检查方案")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/check-scheme")
|
||||||
|
public class CheckSchemeController {
|
||||||
|
@Resource
|
||||||
|
private CheckSchemeService checkSchemeService;
|
||||||
|
|
||||||
|
@ApiOperation(value = "分页查询检查方案信息", httpMethod = "GET")
|
||||||
|
@GetMapping("/page")
|
||||||
|
public PageResult<CheckSchemeResp> page(@RequestParam(required = false) String checkType){
|
||||||
|
return PageResult.ok(checkSchemeService.page(checkType));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "查询检查方案信息列表", httpMethod = "GET")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public Result<List<CheckSchemeResp>> list(@RequestParam(required = false) String checkType){
|
||||||
|
return Result.ok(checkSchemeService.list(checkType));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "查询检查方案详情", httpMethod = "GET")
|
||||||
|
@GetMapping("/detail/{checkSchemeId}")
|
||||||
|
public Result<CheckSchemeResp> detail(@PathVariable String checkSchemeId){
|
||||||
|
return Result.ok(checkSchemeService.detail(checkSchemeId));
|
||||||
|
}
|
||||||
|
@ApiOperation(value = "新增检查方案", httpMethod = "POST")
|
||||||
|
@PostMapping()
|
||||||
|
public Result<?> add(@Validated @RequestBody CheckSchemeReq req){
|
||||||
|
checkSchemeService.save(req);
|
||||||
|
return Result.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "修改检查方案", httpMethod = "PUT")
|
||||||
|
@PutMapping("/{checkSchemeId}")
|
||||||
|
public Result<?> update(@PathVariable String checkSchemeId, @Validated @RequestBody CheckSchemeReq req){
|
||||||
|
checkSchemeService.update(checkSchemeId, req);
|
||||||
|
return Result.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "删除检查方案", httpMethod = "DELETE")
|
||||||
|
@DeleteMapping("/{checkSchemeId}")
|
||||||
|
public Result<?> remove(@PathVariable String checkSchemeId){
|
||||||
|
checkSchemeService.deleteById(checkSchemeId);
|
||||||
|
return Result.ok();
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue