From fdf4cdbf9723d9d05938fe56d2014769dd7ece4c Mon Sep 17 00:00:00 2001 From: schangxiang@126.com <schangxiang@126.com> Date: 周六, 10 5月 2025 12:17:19 +0800 Subject: [PATCH] 修复 模糊查询bug --- PipeLineLems/server/src/CMS.Plugin.PipeLineLems.EntityFrameworkCore/Extensions/CMSPluginEfCoreExtensions.WorkPlan.cs | 93 ++++++++++++++++++++++------------------------ 1 files changed, 44 insertions(+), 49 deletions(-) diff --git a/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.EntityFrameworkCore/Extensions/CMSPluginEfCoreExtensions.WorkPlan.cs b/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.EntityFrameworkCore/Extensions/CMSPluginEfCoreExtensions.WorkPlan.cs index 36d28bf..e9d55d9 100644 --- a/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.EntityFrameworkCore/Extensions/CMSPluginEfCoreExtensions.WorkPlan.cs +++ b/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.EntityFrameworkCore/Extensions/CMSPluginEfCoreExtensions.WorkPlan.cs @@ -1,4 +1,6 @@ +using CMS.Plugin.MyExtension.Domain; using CMS.Plugin.PipeLineLems.Domain; +using CMS.Plugin.PipeLineLems.Domain.Shared.MyTestEntityNames; using CMS.Plugin.PipeLineLems.Domain.WorkPlan; using Microsoft.EntityFrameworkCore; using Volo.Abp; @@ -9,7 +11,7 @@ /// <summary> /// EfCore鎵╁睍 /// </summary> -public static partial class CMSPluginEfCoreExtensions +public static partial class CMSPluginEfCoreExtensions { /// <summary> /// Includes the details. @@ -42,58 +44,51 @@ b.ConfigureByConvention(); - //Properties - b.Property(x => x.TaskCode).HasMaxLength(64).IsRequired().HasComment("浠诲姟缂栫爜"); - b.Property(x => x.OrgMaterialCode).HasMaxLength(64).IsRequired().HasComment("鍘熸枡缂栧彿"); - b.Property(x => x.Sort).HasComment("鎺掑簭"); - b.Property(x => x.IsDisabled).IsRequired(false).HasComment("鏄惁绂佺敤"); - b.Property(x => x.Remark).HasMaxLength(256).IsRequired(false).HasComment("澶囨敞"); + // Configure properties + b.Property(x => x.TaskCode).HasMaxLength(256).IsRequired().HasComment("浠诲姟缂栫爜"); + b.Property(x => x.DataIdentifier).HasMaxLength(256).HasComment("鍘熸枡鏍囪瘑"); + b.Property(x => x.MaterialMode).HasMaxLength(256).HasComment("鍘熸枡鍨嬪彿"); + b.Property(x => x.Length).HasColumnType("decimal(18,2)").HasComment("闀垮害(mm)"); + b.Property(x => x.MarkingContent).HasMaxLength(1024).HasComment("鎵撶爜鍐呭"); - b.Property(x => x.OrgMaterialCode).HasMaxLength(64).HasComment("鍘熸枡缂栧彿"); - b.Property(x => x.FactoryCode).HasMaxLength(64).HasComment("宸ュ巶浠g爜"); - b.Property(x => x.ProductCode).HasMaxLength(64).HasComment("浜у搧浠g爜"); - b.Property(x => x.WorkstationCode).HasMaxLength(64).HasComment("宸ヤ綅浠g爜"); - b.Property(x => x.EquipmentCode).HasMaxLength(64).HasComment("璁惧浠g爜"); - b.Property(x => x.WorkpieceName).HasMaxLength(64).HasComment("宸ヤ欢鍚嶇О"); - b.Property(x => x.ProcessName).HasMaxLength(64).HasComment("宸ュ簭鍚嶇О"); - b.Property(x => x.PipeFittingCode).HasMaxLength(64).HasComment("绠′欢缂栫爜"); - b.Property(x => x.PreSerialNumber).HasMaxLength(64).HasComment("椤哄簭鍙�"); - b.Property(x => x.DataIdentifier).HasMaxLength(64).HasComment("鍘熸枡鏍囪瘑"); - b.Property(x => x.PipeSpecCode).HasMaxLength(64).HasComment("绠¤鏍肩爜"); - b.Property(x => x.PipeSectionName).HasMaxLength(64).HasComment("绠℃鍚嶇О"); - b.Property(x => x.OuterDiameter).HasMaxLength(64).HasComment("澶栧緞"); - b.Property(x => x.Bevel).HasMaxLength(64).HasComment("鍧″彛"); - b.Property(x => x.Material).HasMaxLength(64).HasComment("鏉愯川"); - b.Property(x => x.Length).HasMaxLength(64).HasComment("闀垮害"); - b.Property(x => x.DrillingPosition).HasMaxLength(64).HasComment("鎵撳瓟浣�"); - b.Property(x => x.Intersecting).HasMaxLength(64).HasComment("鐩歌疮"); - b.Property(x => x.InterfaceRequirement).HasMaxLength(64).HasComment("鎺ュ彛瑕佹眰"); - b.Property(x => x.HasMainSignature).HasComment("鏄惁鏈変富绛�"); - b.Property(x => x.Quantity).HasComment("鍖呮嫭鏁伴噺"); - b.Property(x => x.MarkingContent).HasMaxLength(64).HasComment("鎵撶爜鍐呭"); - b.Property(x => x.CuttingFile).HasMaxLength(64).HasComment("鍒囧壊鏂囦欢"); - b.Property(x => x.BranchOuterDiameter).HasMaxLength(64).HasComment("鏀寰�"); - b.Property(x => x.BranchWallThickness).HasMaxLength(64).HasComment("鏀澹佸帤"); - b.Property(x => x.BranchMaterial).HasMaxLength(64).HasComment("鏀鏉愯川"); - b.Property(x => x.BranchPortRadius).HasMaxLength(64).HasComment("鏀绔彛鏇茬巼鍗婂緞"); - b.Property(x => x.BranchPortAngle).HasMaxLength(64).HasComment("鏀绔彛瑙掑害"); - b.Property(x => x.BranchPortRequirement).HasMaxLength(64).HasComment("鏀绔彛瑕佹眰"); - b.Property(x => x.IntersectingLineType).HasMaxLength(64).HasComment("鐩歌疮绾跨被鍨�"); - b.Property(x => x.IntersectingLineCategory).HasMaxLength(64).HasComment("鐩歌疮绾跨被鍒�"); - b.Property(x => x.FinishedProductScale).HasMaxLength(64).HasComment("鎴愬搧鍥惧箙"); - b.Property(x => x.FlangeThickness).HasMaxLength(64).HasComment("娉曞叞鍘氬害"); - b.Property(x => x.FlangeInnerDiameter).HasMaxLength(64).HasComment("娉曞叞鍐呭緞"); - b.Property(x => x.WeldingHeatInput).HasMaxLength(64).HasComment("鐒婃帴鐑緭鍏�"); - b.Property(x => x.PipeAllowableStress).HasMaxLength(64).HasComment("绠¢亾鍏佽搴斿姏"); - b.Property(x => x.PipeDiameter).HasMaxLength(64).HasComment("绠″緞"); - b.Property(x => x.PipeWallThickness).HasMaxLength(64).HasComment("绠¢亾澹佸帤"); - b.Property(x => x.VRData).HasMaxLength(64).HasComment("VR鏁版嵁"); - b.Property(x => x.ProcessRouteNumber).HasMaxLength(64).HasComment("宸ヨ壓璺嚎缂栧彿"); + b.Property(x => x.Quantity).HasComment("绠℃鏁伴噺"); + b.Property(x => x.FlangeThickness).HasColumnType("decimal(18,2)").HasComment("娉曞叞鍘氬害(mm)"); + b.Property(x => x.FlangeInnerDiameter).HasColumnType("decimal(18,2)").HasComment("娉曞叞鐩村緞(mm)"); + b.Property(x => x.WeldingHeatInput).HasMaxLength(256).HasComment("娉曞叞鍏О鍘嬪姏"); + b.Property(x => x.PipeAllowableStress).HasMaxLength(256).HasComment("娉曞叞鍐茬爜鍐呭"); + b.Property(x => x.PipeDiameter).HasColumnType("decimal(18,2)").HasComment("濂楃闀垮害(mm)"); + b.Property(x => x.PipeWallThickness).HasColumnType("decimal(18,2)").HasComment("濂楃鐩村緞(mm)"); + b.Property(x => x.FactoryCode).HasMaxLength(256).HasComment("宸ュ巶浠g爜"); + b.Property(x => x.ProductCode).HasMaxLength(256).HasComment("浜у搧浠g爜"); + b.Property(x => x.WorkstationCode).HasMaxLength(256).HasComment("宸ヤ綅浠g爜"); + b.Property(x => x.EquipmentCode).HasMaxLength(256).HasComment("璁惧浠g爜"); + b.Property(x => x.WorkpieceName).HasMaxLength(256).HasComment("宸ヤ欢鍚嶇О"); + b.Property(x => x.ProcessName).HasMaxLength(256).HasComment("宸ュ簭鍚嶇О"); + b.Property(x => x.PipeFittingCode).HasMaxLength(256).HasComment("绠′欢缂栫爜"); + b.Property(x => x.PreSerialNumber).HasMaxLength(256).HasComment("椤哄簭鍙�"); + b.Property(x => x.PipeSpecCode).HasMaxLength(256).HasComment("绠℃缂栫爜"); + b.Property(x => x.PipeSectionName).HasMaxLength(256).HasComment("绠℃鍚嶇О"); + b.Property(x => x.OuterDiameter).HasColumnType("decimal(18,2)").HasComment("澶栧緞(mm)"); + b.Property(x => x.Thickness).HasColumnType("decimal(18,2)").HasComment("澹佸帤(mm)"); + b.Property(x => x.Material).HasMaxLength(256).HasComment("鏉愯川"); + b.Property(x => x.HasMainSignature).HasComment("鏄惁涓绘敮绠�"); + + b.Property(x => x.MarkingPosition).HasColumnType("decimal(18,2)").HasComment("鎵撶爜浣嶇疆"); + b.Property(x => x.CuttingPosition).HasColumnType("decimal(18,2)").HasComment("鍒囧壊浣嶇疆"); + + b.Property(x => x.ProcessRouteNumber).HasMaxLength(256).HasComment("宸ヨ壓娴佸悜缂栧彿"); b.Property(x => x.PlannedStartTime).HasComment("璁″垝寮�濮嬫椂闂�"); b.Property(x => x.PlannedEndTime).HasComment("璁″垝瀹屾垚鏃堕棿"); - b.Property(x => x.TimeInfo).HasMaxLength(64).HasComment("鏃堕棿淇℃伅"); + b.Property(x => x.TeamInfo).HasMaxLength(256).HasComment("鐝粍淇℃伅"); + b.Property(x => x.Timestamp).HasMaxLength(256).HasComment("鏃堕棿鎴�"); - b.HasIndex(u => u.TaskCode); + b.ConfigureMyCmsEntity(); + + // Configure indexes + b.HasIndex(u => u.TaskCode).IsUnique(); + b.HasIndex(u => u.DataIdentifier); + b.HasIndex(u => u.PlannedStartTime); + b.HasIndex(u => u.PlannedEndTime); b.ApplyObjectExtensionMappings(); }); -- Gitblit v1.9.3