Commit c159cbbc by 章家宝

feat:新增取消类型

1 parent ec824a2e
......@@ -101,6 +101,14 @@ public class InspectionWorkOrder extends AuditingEntity implements Serializable
@Column(name = "wo_id", nullable = false, length = 50)
private String woId;
/**
* 取消类型
*/
@JsonView(value = Summary.class)
@Size(max = 50, groups = {CreateValidGroup.class, UpdateValidGroup.class})
@Column(name = "cancel_type", nullable = false, length = 50)
private String cancelType;
@JsonView(value = Summary.class)
@Size(max = 500, groups = {CreateValidGroup.class, UpdateValidGroup.class}) // 移除@NotBlank,数据库允许NULL
@Column(name = "audit_content", nullable = true, length = 500) // length改为500
......
......@@ -319,6 +319,7 @@ public class InspectionWorkOrderService {
Integer originalStatus = wo.getStatus();
wo.setStatus(InspectionWorkOrderStatusEnum.CANCELED.getCode());
wo.setCancelType(vo.getCancelType());
wo.setCancelContent(vo.getCancelReason());
wo.setUpdateBy(opName);
wo.setUpdateTime(LocalDateTime.now());
......
......@@ -14,6 +14,9 @@ public class InspectionWorkOrderCancelVO {
@Schema(description = "主键ID")
private Long id;
@Schema(description = "取消类型")
private String cancelType;
@Schema(description = "取消原因")
private String cancelReason;
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!