parent
0f31e605d0
commit
68b24c4d7d
9 changed files with 717 additions and 2 deletions
@ -0,0 +1,73 @@ |
|||||||
|
package org.springblade.desk.quality.enums; |
||||||
|
|
||||||
|
import lombok.AllArgsConstructor; |
||||||
|
import lombok.Getter; |
||||||
|
|
||||||
|
/** |
||||||
|
* 审核结果枚举 |
||||||
|
* |
||||||
|
* @author qyl |
||||||
|
* @since 2026-05-13 |
||||||
|
*/ |
||||||
|
@Getter |
||||||
|
@AllArgsConstructor |
||||||
|
public enum AuditResultEnum { |
||||||
|
|
||||||
|
/** |
||||||
|
* 通过 |
||||||
|
*/ |
||||||
|
PASS(1, "通过"), |
||||||
|
|
||||||
|
/** |
||||||
|
* 不通过 |
||||||
|
*/ |
||||||
|
REJECT(2, "不通过"); |
||||||
|
|
||||||
|
/** |
||||||
|
* 结果代码 |
||||||
|
*/ |
||||||
|
private final Integer code; |
||||||
|
|
||||||
|
/** |
||||||
|
* 结果描述 |
||||||
|
*/ |
||||||
|
private final String description; |
||||||
|
|
||||||
|
/** |
||||||
|
* 根据代码获取枚举 |
||||||
|
* |
||||||
|
* @param code 结果代码 |
||||||
|
* @return 枚举值 |
||||||
|
*/ |
||||||
|
public static AuditResultEnum getByCode(Integer code) { |
||||||
|
if (code == null) { |
||||||
|
return null; |
||||||
|
} |
||||||
|
for (AuditResultEnum result : values()) { |
||||||
|
if (result.getCode().equals(code)) { |
||||||
|
return result; |
||||||
|
} |
||||||
|
} |
||||||
|
return null; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 判断是否通过 |
||||||
|
* |
||||||
|
* @param code 结果代码 |
||||||
|
* @return true-通过,false-不通过 |
||||||
|
*/ |
||||||
|
public static boolean isPass(Integer code) { |
||||||
|
return PASS.getCode().equals(code); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 判断是否不通过 |
||||||
|
* |
||||||
|
* @param code 结果代码 |
||||||
|
* @return true-不通过,false-通过 |
||||||
|
*/ |
||||||
|
public static boolean isReject(Integer code) { |
||||||
|
return REJECT.getCode().equals(code); |
||||||
|
} |
||||||
|
} |
||||||
@ -0,0 +1,50 @@ |
|||||||
|
package org.springblade.desk.quality.pojo.request; |
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema; |
||||||
|
import lombok.Data; |
||||||
|
import org.springblade.desk.quality.enums.AuditResultEnum; |
||||||
|
|
||||||
|
import jakarta.validation.constraints.NotNull; |
||||||
|
import java.io.Serializable; |
||||||
|
|
||||||
|
/** |
||||||
|
* 审核请求DTO |
||||||
|
* |
||||||
|
* @author qyl |
||||||
|
* @since 2026-05-13 |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
@Schema(description = "审核请求DTO") |
||||||
|
public class ProReTemplateAuditRequest implements Serializable { |
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L; |
||||||
|
|
||||||
|
@NotNull(message = "模板ID不能为空") |
||||||
|
@Schema(description = "模板ID") |
||||||
|
private Long id; |
||||||
|
|
||||||
|
@NotNull(message = "审核结果不能为空") |
||||||
|
@Schema(description = "审核结果: 1-通过, 2-不通过", allowableValues = {"1", "2"}) |
||||||
|
private Integer result; |
||||||
|
|
||||||
|
@Schema(description = "审核意见(不通过时必填)") |
||||||
|
private String remark; |
||||||
|
|
||||||
|
/** |
||||||
|
* 判断是否通过 |
||||||
|
* |
||||||
|
* @return true-通过,false-不通过 |
||||||
|
*/ |
||||||
|
public boolean isPass() { |
||||||
|
return AuditResultEnum.isPass(this.result); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 判断是否不通过 |
||||||
|
* |
||||||
|
* @return true-不通过,false-通过 |
||||||
|
*/ |
||||||
|
public boolean isReject() { |
||||||
|
return AuditResultEnum.isReject(this.result); |
||||||
|
} |
||||||
|
} |
||||||
@ -0,0 +1,86 @@ |
|||||||
|
package org.springblade.desk.quality.pojo.vo; |
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema; |
||||||
|
import lombok.Data; |
||||||
|
|
||||||
|
import java.io.Serializable; |
||||||
|
import java.util.Date; |
||||||
|
|
||||||
|
/** |
||||||
|
* 过程记录模板审核历史VO |
||||||
|
* |
||||||
|
* @author qyl |
||||||
|
* @since 2026-05-13 |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
@Schema(description = "过程记录模板审核历史VO") |
||||||
|
public class ProReTemplateAuditHistoryVO implements Serializable { |
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L; |
||||||
|
|
||||||
|
/** |
||||||
|
* 模板ID |
||||||
|
*/ |
||||||
|
@Schema(description = "模板ID") |
||||||
|
private Long id; |
||||||
|
|
||||||
|
/** |
||||||
|
* 模板名称 |
||||||
|
*/ |
||||||
|
@Schema(description = "模板名称") |
||||||
|
private String name; |
||||||
|
|
||||||
|
/** |
||||||
|
* 审核状态: 0-待审核, 1-审核中, 2-审核通过, 3-审核不通过 |
||||||
|
*/ |
||||||
|
@Schema(description = "审核状态: 0-待审核, 1-审核中, 2-审核通过, 3-审核不通过") |
||||||
|
private Integer auditStatus; |
||||||
|
|
||||||
|
/** |
||||||
|
* 审核状态名称 |
||||||
|
*/ |
||||||
|
@Schema(description = "审核状态名称") |
||||||
|
private String auditStatusName; |
||||||
|
|
||||||
|
/** |
||||||
|
* 一级审核人ID |
||||||
|
*/ |
||||||
|
@Schema(description = "一级审核人ID") |
||||||
|
private Long auditor1Id; |
||||||
|
|
||||||
|
/** |
||||||
|
* 一级审核人姓名 |
||||||
|
*/ |
||||||
|
@Schema(description = "一级审核人姓名") |
||||||
|
private String auditor1Name; |
||||||
|
|
||||||
|
/** |
||||||
|
* 一级审核时间 |
||||||
|
*/ |
||||||
|
@Schema(description = "一级审核时间") |
||||||
|
private Date auditTime1; |
||||||
|
|
||||||
|
/** |
||||||
|
* 二级审核人ID |
||||||
|
*/ |
||||||
|
@Schema(description = "二级审核人ID") |
||||||
|
private Long auditor2Id; |
||||||
|
|
||||||
|
/** |
||||||
|
* 二级审核人姓名 |
||||||
|
*/ |
||||||
|
@Schema(description = "二级审核人姓名") |
||||||
|
private String auditor2Name; |
||||||
|
|
||||||
|
/** |
||||||
|
* 二级审核时间 |
||||||
|
*/ |
||||||
|
@Schema(description = "二级审核时间") |
||||||
|
private Date auditTime2; |
||||||
|
|
||||||
|
/** |
||||||
|
* 审核意见 |
||||||
|
*/ |
||||||
|
@Schema(description = "审核意见") |
||||||
|
private String auditRemark; |
||||||
|
} |
||||||
Loading…
Reference in new issue