fix: 修复DTO工号验证规范问题

- 申请人工号验证从@Size改为@Pattern正则表达式
- 采购负责人工号验证从@Size改为@Pattern正则表达式
- 统一使用7位数字格式验证(^\d{7}$)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
wkc
2026-02-06 15:36:05 +08:00
parent 1d09c88bec
commit ac3b9cd740
2 changed files with 4 additions and 4 deletions

View File

@@ -165,7 +165,7 @@ public class CcdiPurchaseTransactionAddDTO implements Serializable {
/** 申请人工号 */
@NotBlank(message = "申请人工号不能为空")
@Size(max = 7, message = "申请人工号长度不能超过7个字符")
@Pattern(regexp = "^\\d{7}$", message = "申请人工号必须为7位数字")
@Schema(description = "申请人工号")
private String applicantId;
@@ -182,7 +182,7 @@ public class CcdiPurchaseTransactionAddDTO implements Serializable {
private String applyDepartment;
/** 采购负责人工号 */
@Size(max = 7, message = "采购负责人工号长度不能超过7个字符")
@Pattern(regexp = "^\\d{7}$", message = "采购负责人工号必须为7位数字")
@Schema(description = "采购负责人工号")
private String purchaseLeaderId;

View File

@@ -165,7 +165,7 @@ public class CcdiPurchaseTransactionEditDTO implements Serializable {
/** 申请人工号 */
@NotBlank(message = "申请人工号不能为空")
@Size(max = 7, message = "申请人工号长度不能超过7个字符")
@Pattern(regexp = "^\\d{7}$", message = "申请人工号必须为7位数字")
@Schema(description = "申请人工号")
private String applicantId;
@@ -182,7 +182,7 @@ public class CcdiPurchaseTransactionEditDTO implements Serializable {
private String applyDepartment;
/** 采购负责人工号 */
@Size(max = 7, message = "采购负责人工号长度不能超过7个字符")
@Pattern(regexp = "^\\d{7}$", message = "采购负责人工号必须为7位数字")
@Schema(description = "采购负责人工号")
private String purchaseLeaderId;