| | |
| | | return id; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å¤å¶ä¸æ¡ |
| | | /// </summary> |
| | | [Route("Copy@V1.0")] |
| | | [HttpPost] |
| | | public long Copy([Required] CopyBimfaceFileInput input) |
| | | { |
| | | var model = _service.GetByID(input.ID); |
| | | if (model == null) |
| | | { |
| | | throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.D001, $"ID:{input.ID} æ°æ®ä¸åå¨"); |
| | | } |
| | | var id = _service.Copy(input.ID, input.Name, out string Msg); |
| | | if (id < 1) |
| | | { |
| | | throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.V001, Msg); |
| | | } |
| | | return id; |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region Update |
| | |
| | | --> |
| | | <Project> |
| | | <PropertyGroup> |
| | | <History>True|2024-05-29T02:26:53.6778257Z;True|2024-05-13T09:56:26.5764615+08:00;True|2024-03-30T15:58:57.0562769+08:00;True|2024-03-26T13:36:10.2897546+08:00;True|2024-03-08T15:59:55.5907811+08:00;True|2024-01-27T11:10:13.2471580+08:00;True|2024-01-21T15:28:08.5978203+08:00;True|2023-12-19T21:23:58.5068063+08:00;True|2023-12-16T12:51:56.7900544+08:00;True|2023-12-04T19:19:23.0447363+08:00;True|2023-12-04T19:18:52.6801105+08:00;True|2023-12-01T15:50:53.6079593+08:00;True|2023-12-01T15:50:44.8578963+08:00;True|2023-11-30T15:54:23.5609269+08:00;True|2023-11-30T15:39:50.5144968+08:00;True|2023-11-15T09:23:23.1277615+08:00;True|2023-11-13T11:14:23.7047654+08:00;True|2023-11-07T15:28:54.3174797+08:00;True|2023-10-27T13:22:55.8696581+08:00;True|2023-10-21T18:17:31.4681547+08:00;True|2023-10-18T17:29:57.6963038+08:00;True|2023-09-15T12:09:34.4888678+08:00;True|2023-09-14T15:15:33.6113596+08:00;True|2023-08-21T13:09:54.7440181+08:00;True|2023-07-25T15:08:42.3375388+08:00;True|2023-07-17T10:31:53.5181752+08:00;True|2023-07-17T10:31:44.6652344+08:00;True|2023-07-13T12:10:11.2591498+08:00;True|2023-05-25T18:02:16.3580168+08:00;True|2023-05-25T15:44:32.4909866+08:00;</History> |
| | | <History>True|2024-05-29T05:36:17.9791198Z;True|2024-05-29T10:26:53.6778257+08:00;True|2024-05-13T09:56:26.5764615+08:00;True|2024-03-30T15:58:57.0562769+08:00;True|2024-03-26T13:36:10.2897546+08:00;True|2024-03-08T15:59:55.5907811+08:00;True|2024-01-27T11:10:13.2471580+08:00;True|2024-01-21T15:28:08.5978203+08:00;True|2023-12-19T21:23:58.5068063+08:00;True|2023-12-16T12:51:56.7900544+08:00;True|2023-12-04T19:19:23.0447363+08:00;True|2023-12-04T19:18:52.6801105+08:00;True|2023-12-01T15:50:53.6079593+08:00;True|2023-12-01T15:50:44.8578963+08:00;True|2023-11-30T15:54:23.5609269+08:00;True|2023-11-30T15:39:50.5144968+08:00;True|2023-11-15T09:23:23.1277615+08:00;True|2023-11-13T11:14:23.7047654+08:00;True|2023-11-07T15:28:54.3174797+08:00;True|2023-10-27T13:22:55.8696581+08:00;True|2023-10-21T18:17:31.4681547+08:00;True|2023-10-18T17:29:57.6963038+08:00;True|2023-09-15T12:09:34.4888678+08:00;True|2023-09-14T15:15:33.6113596+08:00;True|2023-08-21T13:09:54.7440181+08:00;True|2023-07-25T15:08:42.3375388+08:00;True|2023-07-17T10:31:53.5181752+08:00;True|2023-07-17T10:31:44.6652344+08:00;True|2023-07-13T12:10:11.2591498+08:00;True|2023-05-25T18:02:16.3580168+08:00;True|2023-05-25T15:44:32.4909866+08:00;</History> |
| | | <LastFailureDetails /> |
| | | </PropertyGroup> |
| | | </Project> |
| | |
| | | <RootNamespace>Yw.Application</RootNamespace> |
| | | <GenerateDocumentationFile>True</GenerateDocumentationFile> |
| | | <GeneratePackageOnBuild>True</GeneratePackageOnBuild> |
| | | <Version>3.0.3</Version> |
| | | <Version>3.0.5</Version> |
| | | <Description>å¼ç¨å级</Description> |
| | | </PropertyGroup> |
| | | |
| | |
| | | |
| | | <ItemGroup> |
| | | <PackageReference Include="Yw.Application.Core" Version="3.0.7" /> |
| | | <PackageReference Include="Yw.Dto.Bimface.Core" Version="3.0.3" /> |
| | | <PackageReference Include="Yw.Dto.Bimface.Core" Version="3.0.5" /> |
| | | </ItemGroup> |
| | | |
| | | </Project> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | namespace Yw.Dto |
| | | { |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public class CopyBimfaceFileInput : IDInput |
| | | { |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | [Required] |
| | | public string Name { get; set; } |
| | | } |
| | | } |
| | |
| | | --> |
| | | <Project> |
| | | <PropertyGroup> |
| | | <History>True|2024-05-29T02:16:55.9139463Z;True|2024-05-13T09:55:49.0381011+08:00;True|2024-05-13T09:55:33.3101267+08:00;True|2024-03-30T15:57:20.3638057+08:00;True|2024-03-26T13:30:20.8534150+08:00;</History> |
| | | <History>True|2024-05-29T05:34:51.2242928Z;True|2024-05-29T10:16:55.9139463+08:00;True|2024-05-13T09:55:49.0381011+08:00;True|2024-05-13T09:55:33.3101267+08:00;True|2024-03-30T15:57:20.3638057+08:00;True|2024-03-26T13:30:20.8534150+08:00;</History> |
| | | <LastFailureDetails /> |
| | | </PropertyGroup> |
| | | </Project> |
| | |
| | | <TargetFramework>net6.0</TargetFramework> |
| | | <ImplicitUsings>enable</ImplicitUsings> |
| | | <Nullable>disable</Nullable> |
| | | <Version>3.0.3</Version> |
| | | <Version>3.0.5</Version> |
| | | <GeneratePackageOnBuild>True</GeneratePackageOnBuild> |
| | | </PropertyGroup> |
| | | |
| | | <ItemGroup> |
| | | <PackageReference Include="Yw.Dto.Core" Version="3.0.7" /> |
| | | <PackageReference Include="Yw.Service.Bimface.Core" Version="3.0.3" /> |
| | | <PackageReference Include="Yw.Service.Bimface.Core" Version="3.0.5" /> |
| | | </ItemGroup> |
| | | |
| | | </Project> |
| | |
| | | /// </summary> |
| | | public interface IBimfaceFile : IBaseDAL<Entity.BimfaceFile>, IUpdateParas, IUpdateFlags, IUpdateTagName, IUpdateSorter |
| | | { |
| | | /// <summary> |
| | | /// æå
¥æå± |
| | | /// </summary> |
| | | long InsertEx(Entity.BimfaceFile entity, List<Entity.BimfaceFileLabel> entityLabelList); |
| | | |
| | | /// <summary> |
| | | /// æ´æ° FileStatus |
| | |
| | | /// </summary> |
| | | public interface IBimfaceFileRelation : IBaseDAL<Entity.BimfaceFileRelation>, IUpdateSorter |
| | | { |
| | | /// <summary> |
| | | /// æå
¥æå± |
| | | /// </summary> |
| | | long InsertEx(Entity.BimfaceFileRelation entity, List<Entity.BimfaceFileRelationLabel> entityLabelList); |
| | | |
| | | /// <summary> |
| | | /// æ´æ° Purpose |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æå
¥æå± |
| | | /// </summary> |
| | | public long InsertEx(Entity.BimfaceFile entity, List<Entity.BimfaceFileLabel> entityLabelList) |
| | | { |
| | | if (entity == null) |
| | | { |
| | | return default; |
| | | } |
| | | using (var db = new SqlSugarClient(ConnectionConfig)) |
| | | { |
| | | try |
| | | { |
| | | db.BeginTran(); |
| | | if (entity.ID > 0) |
| | | { |
| | | var bol = db.Insertable(entity).ExecuteCommand() > 0; |
| | | if (!bol) |
| | | { |
| | | db.RollbackTran(); |
| | | return default; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | entity.ID = db.Insertable(entity).ExecuteReturnSnowflakeId(); |
| | | } |
| | | if (entity.ID < 1) |
| | | { |
| | | db.RollbackTran(); |
| | | return default; |
| | | } |
| | | if (entityLabelList != null && entityLabelList.Count > 0) |
| | | { |
| | | entityLabelList.ForEach(x => |
| | | { |
| | | x.BimfaceFileID = entity.ID; |
| | | if (x.ID < 1) |
| | | { |
| | | x.ID = SnowFlakeSingle.instance.NextId(); |
| | | } |
| | | }); |
| | | var bol = db.Insertable(entityLabelList).ExecuteCommand() > 0; |
| | | if (!bol) |
| | | { |
| | | db.RollbackTran(); |
| | | return default; |
| | | } |
| | | } |
| | | db.CommitTran(); |
| | | return entity.ID; |
| | | } |
| | | catch |
| | | { |
| | | db.RollbackTran(); |
| | | throw; |
| | | } |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ´æ° FileStatus |
| | | /// </summary> |
| | | public bool UpdateFileStatus(long ID, int FileStatus) |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æå
¥æå± |
| | | /// </summary> |
| | | public long InsertEx(Entity.BimfaceFileRelation entity, List<Entity.BimfaceFileRelationLabel> entityLabelList) |
| | | { |
| | | if (entity == null) |
| | | { |
| | | return default; |
| | | } |
| | | using (var db = new SqlSugarClient(ConnectionConfig)) |
| | | { |
| | | try |
| | | { |
| | | db.BeginTran(); |
| | | if (entity.ID > 0) |
| | | { |
| | | var bol = db.Insertable(entity).ExecuteCommand() > 0; |
| | | if (!bol) |
| | | { |
| | | db.RollbackTran(); |
| | | return default; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | entity.ID = db.Insertable(entity).ExecuteReturnSnowflakeId(); |
| | | } |
| | | if (entity.ID < 1) |
| | | { |
| | | db.RollbackTran(); |
| | | return default; |
| | | } |
| | | if (entityLabelList != null && entityLabelList.Count > 0) |
| | | { |
| | | entityLabelList.ForEach(x => |
| | | { |
| | | x.RelationID = entity.ID; |
| | | if (x.ID < 1) |
| | | { |
| | | x.ID = SnowFlakeSingle.instance.NextId(); |
| | | } |
| | | }); |
| | | var bol = db.Insertable(entityLabelList).ExecuteCommand() > 0; |
| | | if (!bol) |
| | | { |
| | | db.RollbackTran(); |
| | | return default; |
| | | } |
| | | } |
| | | db.CommitTran(); |
| | | return entity.ID; |
| | | } |
| | | catch |
| | | { |
| | | db.RollbackTran(); |
| | | throw; |
| | | } |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ´æ° Purpose |
| | | /// </summary> |
| | | public bool UpdatePurpose(long ID, string Purpose) |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æå
¥æå± |
| | | /// </summary> |
| | | public long InsertEx(Entity.BimfaceFile entity, List<Entity.BimfaceFileLabel> entityLabelList) |
| | | { |
| | | if (entity == null) |
| | | { |
| | | return default; |
| | | } |
| | | using (var db = new SqlSugarClient(ConnectionConfig)) |
| | | { |
| | | try |
| | | { |
| | | db.BeginTran(); |
| | | if (entity.ID > 0) |
| | | { |
| | | var bol = db.Insertable(entity).ExecuteCommand() > 0; |
| | | if (!bol) |
| | | { |
| | | db.RollbackTran(); |
| | | return default; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | entity.ID = db.Insertable(entity).ExecuteReturnSnowflakeId(); |
| | | } |
| | | if (entity.ID < 1) |
| | | { |
| | | db.RollbackTran(); |
| | | return default; |
| | | } |
| | | if (entityLabelList != null && entityLabelList.Count > 0) |
| | | { |
| | | entityLabelList.ForEach(x => |
| | | { |
| | | x.BimfaceFileID = entity.ID; |
| | | if (x.ID < 1) |
| | | { |
| | | x.ID = SnowFlakeSingle.instance.NextId(); |
| | | } |
| | | }); |
| | | var bol = db.Insertable(entityLabelList).ExecuteCommand() > 0; |
| | | if (!bol) |
| | | { |
| | | db.RollbackTran(); |
| | | return default; |
| | | } |
| | | } |
| | | db.CommitTran(); |
| | | return entity.ID; |
| | | } |
| | | catch |
| | | { |
| | | db.RollbackTran(); |
| | | throw; |
| | | } |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ´æ° FileStatus |
| | | /// </summary> |
| | | public bool UpdateFileStatus(long ID, int FileStatus) |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æå
¥æå± |
| | | /// </summary> |
| | | public long InsertEx(Entity.BimfaceFileRelation entity, List<Entity.BimfaceFileRelationLabel> entityLabelList) |
| | | { |
| | | if (entity == null) |
| | | { |
| | | return default; |
| | | } |
| | | using (var db = new SqlSugarClient(ConnectionConfig)) |
| | | { |
| | | try |
| | | { |
| | | db.BeginTran(); |
| | | if (entity.ID > 0) |
| | | { |
| | | var bol = db.Insertable(entity).ExecuteCommand() > 0; |
| | | if (!bol) |
| | | { |
| | | db.RollbackTran(); |
| | | return default; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | entity.ID = db.Insertable(entity).ExecuteReturnSnowflakeId(); |
| | | } |
| | | if (entity.ID < 1) |
| | | { |
| | | db.RollbackTran(); |
| | | return default; |
| | | } |
| | | if (entityLabelList != null && entityLabelList.Count > 0) |
| | | { |
| | | entityLabelList.ForEach(x => |
| | | { |
| | | x.RelationID = entity.ID; |
| | | if (x.ID < 1) |
| | | { |
| | | x.ID = SnowFlakeSingle.instance.NextId(); |
| | | } |
| | | }); |
| | | var bol = db.Insertable(entityLabelList).ExecuteCommand() > 0; |
| | | if (!bol) |
| | | { |
| | | db.RollbackTran(); |
| | | return default; |
| | | } |
| | | } |
| | | db.CommitTran(); |
| | | return entity.ID; |
| | | } |
| | | catch |
| | | { |
| | | db.RollbackTran(); |
| | | throw; |
| | | } |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ´æ° Purpose |
| | | /// </summary> |
| | | public bool UpdatePurpose(long ID, string Purpose) |
| | |
| | | { |
| | | if (list == null || list.Count < 1) |
| | | { |
| | | return default; |
| | | return false; |
| | | } |
| | | var dal = DALCreateHelper.CreateDAL<Yw.DAL.IBimfaceFile>(); |
| | | var entity_list = Model2Entities(list); |
| | |
| | | return false; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å¤å¶ |
| | | /// </summary> |
| | | public long Copy(long ID, string Name, out string Msg) |
| | | { |
| | | Msg = string.Empty; |
| | | var model = GetByID(ID); |
| | | if (model == null) |
| | | { |
| | | Msg = "æ°æ®ä¸åå¨"; |
| | | return default; |
| | | } |
| | | var entity = Model2Entity(model); |
| | | entity.ID = 0; |
| | | entity.Name = Name; |
| | | entity.TagName = string.Empty; |
| | | entity.SortCode = GetMaxSortCode() + 1; |
| | | |
| | | var labelList = new Yw.Service.BimfaceFileLabel().GetByBimfaceFileID(ID); |
| | | var entityLabelList = BimfaceFileLabel.Model2Entities(labelList); |
| | | entityLabelList?.ForEach(x => |
| | | { |
| | | x.ID = 0; |
| | | x.BimfaceFileID = 0; |
| | | }); |
| | | |
| | | var dal = DALCreateHelper.CreateDAL<Yw.DAL.IBimfaceFile>(); |
| | | var id = dal.InsertEx(entity, entityLabelList); |
| | | if (id > 0) |
| | | { |
| | | UpdateCache(id); |
| | | BimfaceFileLabel.UpdateCacheByBimfaceFileID(id); |
| | | } |
| | | |
| | | return id; |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region Update |
| | |
| | | --> |
| | | <Project> |
| | | <PropertyGroup> |
| | | <History>True|2024-05-29T02:11:59.5788332Z;True|2024-05-13T09:54:44.0143996+08:00;True|2024-03-30T15:56:02.1286253+08:00;True|2024-03-26T13:14:41.0228396+08:00;True|2024-03-08T15:59:03.9347848+08:00;True|2024-01-21T15:24:10.4761424+08:00;True|2023-12-19T21:22:17.3259489+08:00;True|2023-12-16T12:50:52.1208136+08:00;True|2023-12-04T19:10:10.0862917+08:00;True|2023-12-04T19:03:22.1382800+08:00;True|2023-12-04T18:45:47.2344462+08:00;True|2023-12-04T18:43:17.3052814+08:00;True|2023-12-01T15:50:02.2518271+08:00;True|2023-11-30T15:37:07.6925176+08:00;True|2023-11-30T15:35:38.6518588+08:00;True|2023-11-13T11:13:38.2876503+08:00;True|2023-11-07T15:26:15.8664916+08:00;True|2023-10-27T13:21:57.8245827+08:00;True|2023-10-21T18:15:57.8975745+08:00;True|2023-10-18T17:28:42.7347523+08:00;True|2023-09-15T12:08:33.6892307+08:00;True|2023-09-14T15:13:47.6095636+08:00;True|2023-08-21T13:08:28.2298969+08:00;True|2023-07-17T10:30:15.0370305+08:00;True|2023-07-13T11:54:33.7989040+08:00;True|2023-07-13T11:54:23.3967174+08:00;True|2023-07-06T09:49:52.7407983+08:00;True|2023-05-25T15:37:23.5406830+08:00;False|2023-05-25T15:36:09.3589239+08:00;</History> |
| | | <History>True|2024-05-29T05:33:02.1030901Z;True|2024-05-29T10:11:59.5788332+08:00;True|2024-05-13T09:54:44.0143996+08:00;True|2024-03-30T15:56:02.1286253+08:00;True|2024-03-26T13:14:41.0228396+08:00;True|2024-03-08T15:59:03.9347848+08:00;True|2024-01-21T15:24:10.4761424+08:00;True|2023-12-19T21:22:17.3259489+08:00;True|2023-12-16T12:50:52.1208136+08:00;True|2023-12-04T19:10:10.0862917+08:00;True|2023-12-04T19:03:22.1382800+08:00;True|2023-12-04T18:45:47.2344462+08:00;True|2023-12-04T18:43:17.3052814+08:00;True|2023-12-01T15:50:02.2518271+08:00;True|2023-11-30T15:37:07.6925176+08:00;True|2023-11-30T15:35:38.6518588+08:00;True|2023-11-13T11:13:38.2876503+08:00;True|2023-11-07T15:26:15.8664916+08:00;True|2023-10-27T13:21:57.8245827+08:00;True|2023-10-21T18:15:57.8975745+08:00;True|2023-10-18T17:28:42.7347523+08:00;True|2023-09-15T12:08:33.6892307+08:00;True|2023-09-14T15:13:47.6095636+08:00;True|2023-08-21T13:08:28.2298969+08:00;True|2023-07-17T10:30:15.0370305+08:00;True|2023-07-13T11:54:33.7989040+08:00;True|2023-07-13T11:54:23.3967174+08:00;True|2023-07-06T09:49:52.7407983+08:00;True|2023-05-25T15:37:23.5406830+08:00;False|2023-05-25T15:36:09.3589239+08:00;</History> |
| | | <LastFailureDetails /> |
| | | </PropertyGroup> |
| | | </Project> |
| | |
| | | <RootNamespace>Yw</RootNamespace> |
| | | <GenerateDocumentationFile>True</GenerateDocumentationFile> |
| | | <GeneratePackageOnBuild>True</GeneratePackageOnBuild> |
| | | <Version>3.0.3</Version> |
| | | <Version>3.0.5</Version> |
| | | <Description>å¼ç¨å级</Description> |
| | | </PropertyGroup> |
| | | |