소스 검색

fix(s0): validate remaining supply input lengths

YY968XX 1 일 전
부모
커밋
86d1cdb492
2개의 변경된 파일23개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      server/Admin.NET.Web.Entry/Admin.NET.Web.Entry.csproj
  2. 20 0
      server/Plugins/Admin.NET.Plugin.AiDOP/Dto/S0/Supply/AdoS0SupplyDtos.cs

+ 3 - 3
server/Admin.NET.Web.Entry/Admin.NET.Web.Entry.csproj

@@ -11,9 +11,9 @@
     <GenerateSatelliteAssembliesForCore>true</GenerateSatelliteAssembliesForCore>
     <GenerateSatelliteAssembliesForCore>true</GenerateSatelliteAssembliesForCore>
     <Copyright>Admin.NET</Copyright>
     <Copyright>Admin.NET</Copyright>
     <Description>Admin.NET 通用权限开发平台</Description>
     <Description>Admin.NET 通用权限开发平台</Description>
-    <AssemblyVersion>1.0.187</AssemblyVersion>
-    <FileVersion>1.0.187</FileVersion>
-    <Version>1.0.187</Version>
+    <AssemblyVersion>1.0.188</AssemblyVersion>
+    <FileVersion>1.0.188</FileVersion>
+    <Version>1.0.188</Version>
   </PropertyGroup>
   </PropertyGroup>
 
 
   <ItemGroup>
   <ItemGroup>

+ 20 - 0
server/Plugins/Admin.NET.Plugin.AiDOP/Dto/S0/Supply/AdoS0SupplyDtos.cs

@@ -109,22 +109,29 @@ public class AdoS0CategoryLeadTimeUpsertDto
     [Range(1, long.MaxValue, ErrorMessage = "工厂不能为空")]
     [Range(1, long.MaxValue, ErrorMessage = "工厂不能为空")]
     public long FactoryRefId { get; set; }
     public long FactoryRefId { get; set; }
 
 
+    [MaxLength(50)]
     public string? DomainCode { get; set; }
     public string? DomainCode { get; set; }
 
 
     [Required(ErrorMessage = "品类编码不能为空")]
     [Required(ErrorMessage = "品类编码不能为空")]
+    [MaxLength(100)]
     public string CategoryCode { get; set; } = string.Empty;
     public string CategoryCode { get; set; } = string.Empty;
 
 
+    [MaxLength(200)]
     public string? CategoryName { get; set; }
     public string? CategoryName { get; set; }
 
 
     [Required(ErrorMessage = "物料属性不能为空")]
     [Required(ErrorMessage = "物料属性不能为空")]
+    [MaxLength(100)]
     public string OwnerApplication { get; set; } = string.Empty;
     public string OwnerApplication { get; set; } = string.Empty;
 
 
     [Range(0, int.MaxValue, ErrorMessage = "采购前置期不能为负")]
     [Range(0, int.MaxValue, ErrorMessage = "采购前置期不能为负")]
     public int LeadTimeDays { get; set; }
     public int LeadTimeDays { get; set; }
 
 
+    [MaxLength(500)]
     public string? Remarks { get; set; }
     public string? Remarks { get; set; }
     public bool IsActive { get; set; } = true;
     public bool IsActive { get; set; } = true;
+    [MaxLength(100)]
     public string? CreateUser { get; set; }
     public string? CreateUser { get; set; }
+    [MaxLength(100)]
     public string? UpdateUser { get; set; }
     public string? UpdateUser { get; set; }
 }
 }
 
 
@@ -162,19 +169,25 @@ public class AdoS0SrmPurchaseUpsertDto
     [Range(0, long.MaxValue, ErrorMessage = "工厂不能为空")]
     [Range(0, long.MaxValue, ErrorMessage = "工厂不能为空")]
     public long FactoryRefId { get; set; }
     public long FactoryRefId { get; set; }
 
 
+    [MaxLength(50)]
     public string? DomainCode { get; set; }
     public string? DomainCode { get; set; }
 
 
     [Range(1, long.MaxValue, ErrorMessage = "物料不能为空")]
     [Range(1, long.MaxValue, ErrorMessage = "物料不能为空")]
     public long IcitemId { get; set; }
     public long IcitemId { get; set; }
 
 
+    [MaxLength(200)]
     public string? IcitemName { get; set; }
     public string? IcitemName { get; set; }
+    [MaxLength(50)]
     public string? SupplierType { get; set; }
     public string? SupplierType { get; set; }
+    [MaxLength(64)]
     public string? IsActive { get; set; }
     public string? IsActive { get; set; }
 
 
     [Range(1, long.MaxValue, ErrorMessage = "供应商不能为空")]
     [Range(1, long.MaxValue, ErrorMessage = "供应商不能为空")]
     public long SupplierId { get; set; }
     public long SupplierId { get; set; }
 
 
+    [MaxLength(200)]
     public string? SupplierName { get; set; }
     public string? SupplierName { get; set; }
+    [MaxLength(100)]
     public string? SupplierNumber { get; set; }
     public string? SupplierNumber { get; set; }
 
 
     public decimal? OrderPrice { get; set; }
     public decimal? OrderPrice { get; set; }
@@ -182,6 +195,7 @@ public class AdoS0SrmPurchaseUpsertDto
     public decimal? Taxrate { get; set; }
     public decimal? Taxrate { get; set; }
     public decimal? Tariff { get; set; }
     public decimal? Tariff { get; set; }
     public decimal? Freight { get; set; }
     public decimal? Freight { get; set; }
+    [MaxLength(200)]
     public string? PriceTerms { get; set; }
     public string? PriceTerms { get; set; }
     public DateTime? EffectiveDate { get; set; }
     public DateTime? EffectiveDate { get; set; }
     public DateTime? ExpiringDate { get; set; }
     public DateTime? ExpiringDate { get; set; }
@@ -189,11 +203,15 @@ public class AdoS0SrmPurchaseUpsertDto
     public decimal? LeadTime { get; set; }
     public decimal? LeadTime { get; set; }
     public decimal? QtyMin { get; set; }
     public decimal? QtyMin { get; set; }
     public decimal? PackagingQty { get; set; }
     public decimal? PackagingQty { get; set; }
+    [MaxLength(100)]
     public string? OrderRectorName { get; set; }
     public string? OrderRectorName { get; set; }
+    [MaxLength(100)]
     public string? OrderRectorNum { get; set; }
     public string? OrderRectorNum { get; set; }
     public int IsRequireGoods { get; set; }
     public int IsRequireGoods { get; set; }
 
 
+    [MaxLength(100)]
     public string? CreateUser { get; set; }
     public string? CreateUser { get; set; }
+    [MaxLength(100)]
     public string? UpdateUser { get; set; }
     public string? UpdateUser { get; set; }
 }
 }
 
 
@@ -231,7 +249,9 @@ public class AdoS0MaterialPlanCycleUpsertDto
     public string? Remarks { get; set; }
     public string? Remarks { get; set; }
 
 
     public bool IsActive { get; set; } = true;
     public bool IsActive { get; set; } = true;
+    [MaxLength(100)]
     public string? CreateUser { get; set; }
     public string? CreateUser { get; set; }
+    [MaxLength(100)]
     public string? UpdateUser { get; set; }
     public string? UpdateUser { get; set; }
 }
 }