fix: 修复DTO工号验证规范问题
- 申请人工号验证从@Size改为@Pattern正则表达式
- 采购负责人工号验证从@Size改为@Pattern正则表达式
- 统一使用7位数字格式验证(^\d{7}$)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -165,7 +165,7 @@ public class CcdiPurchaseTransactionAddDTO implements Serializable {
|
|||||||
|
|
||||||
/** 申请人工号 */
|
/** 申请人工号 */
|
||||||
@NotBlank(message = "申请人工号不能为空")
|
@NotBlank(message = "申请人工号不能为空")
|
||||||
@Size(max = 7, message = "申请人工号长度不能超过7个字符")
|
@Pattern(regexp = "^\\d{7}$", message = "申请人工号必须为7位数字")
|
||||||
@Schema(description = "申请人工号")
|
@Schema(description = "申请人工号")
|
||||||
private String applicantId;
|
private String applicantId;
|
||||||
|
|
||||||
@@ -182,7 +182,7 @@ public class CcdiPurchaseTransactionAddDTO implements Serializable {
|
|||||||
private String applyDepartment;
|
private String applyDepartment;
|
||||||
|
|
||||||
/** 采购负责人工号 */
|
/** 采购负责人工号 */
|
||||||
@Size(max = 7, message = "采购负责人工号长度不能超过7个字符")
|
@Pattern(regexp = "^\\d{7}$", message = "采购负责人工号必须为7位数字")
|
||||||
@Schema(description = "采购负责人工号")
|
@Schema(description = "采购负责人工号")
|
||||||
private String purchaseLeaderId;
|
private String purchaseLeaderId;
|
||||||
|
|
||||||
|
|||||||
@@ -165,7 +165,7 @@ public class CcdiPurchaseTransactionEditDTO implements Serializable {
|
|||||||
|
|
||||||
/** 申请人工号 */
|
/** 申请人工号 */
|
||||||
@NotBlank(message = "申请人工号不能为空")
|
@NotBlank(message = "申请人工号不能为空")
|
||||||
@Size(max = 7, message = "申请人工号长度不能超过7个字符")
|
@Pattern(regexp = "^\\d{7}$", message = "申请人工号必须为7位数字")
|
||||||
@Schema(description = "申请人工号")
|
@Schema(description = "申请人工号")
|
||||||
private String applicantId;
|
private String applicantId;
|
||||||
|
|
||||||
@@ -182,7 +182,7 @@ public class CcdiPurchaseTransactionEditDTO implements Serializable {
|
|||||||
private String applyDepartment;
|
private String applyDepartment;
|
||||||
|
|
||||||
/** 采购负责人工号 */
|
/** 采购负责人工号 */
|
||||||
@Size(max = 7, message = "采购负责人工号长度不能超过7个字符")
|
@Pattern(regexp = "^\\d{7}$", message = "采购负责人工号必须为7位数字")
|
||||||
@Schema(description = "采购负责人工号")
|
@Schema(description = "采购负责人工号")
|
||||||
private String purchaseLeaderId;
|
private String purchaseLeaderId;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user