diff --git a/.gitignore b/.gitignore
index d1c32de5..060bd2ca 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1110,3 +1110,6 @@ newFront/c#前端/.vs/
/newFront/c#前端/.vs/SWS.CAD/FileContentIndex/f03e1583-e8e0-43b7-9dbb-a1896ce4b92d.vsidx
/newFront/c#前端/.vs/SWS.CAD/FileContentIndex/f2e37380-e651-406b-9320-af642620eee9.vsidx
/SWSDBSchemeUpgradeTool/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
+/Learun.Framework.Module/Learun.Db/Learun.DataBase.EF.Oracle/obj/Debug/Learun.DataBase.Oracle.csproj.AssemblyReference.cache
+/Learun.Framework.Module/Learun.Db/Learun.DataBase.EF.Sqlserver/obj/Debug/Learun.DataBase.SqlServer.csproj.AssemblyReference.cache
+/Learun.Framework.Module/Learun.Db/Learun.DataBase.MySql/obj/Debug/Learun.DataBase.MySqlEx.csproj.AssemblyReference.cache
diff --git a/009_DI-Electrical.sln b/009_DI-Electrical.sln
index f6d4f9fc..c646d901 100644
--- a/009_DI-Electrical.sln
+++ b/009_DI-Electrical.sln
@@ -94,6 +94,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "04 Plugin", "04 Plugin", "{
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Department2", "Department2\Department2.csproj", "{74A88CCC-F53B-471C-B350-A2BB5804619C}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SWS.Share", "newFront\c#前端\SWS.Share\SWS.Share.csproj", "{87E71797-E60A-4637-BA32-C8B57154ABC3}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Android = Debug|Android
@@ -806,6 +808,30 @@ Global
{74A88CCC-F53B-471C-B350-A2BB5804619C}.Release|Windows-x64.Build.0 = Release|Any CPU
{74A88CCC-F53B-471C-B350-A2BB5804619C}.Release|Windows-x86.ActiveCfg = Release|Any CPU
{74A88CCC-F53B-471C-B350-A2BB5804619C}.Release|Windows-x86.Build.0 = Release|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Debug|Android.ActiveCfg = Debug|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Debug|Android.Build.0 = Debug|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Debug|iOS.ActiveCfg = Debug|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Debug|iOS.Build.0 = Debug|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Debug|Windows-ARM.ActiveCfg = Debug|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Debug|Windows-ARM.Build.0 = Debug|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Debug|Windows-x64.ActiveCfg = Debug|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Debug|Windows-x64.Build.0 = Debug|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Debug|Windows-x86.ActiveCfg = Debug|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Debug|Windows-x86.Build.0 = Debug|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Release|Android.ActiveCfg = Release|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Release|Android.Build.0 = Release|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Release|Any CPU.Build.0 = Release|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Release|iOS.ActiveCfg = Release|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Release|iOS.Build.0 = Release|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Release|Windows-ARM.ActiveCfg = Release|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Release|Windows-ARM.Build.0 = Release|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Release|Windows-x64.ActiveCfg = Release|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Release|Windows-x64.Build.0 = Release|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Release|Windows-x86.ActiveCfg = Release|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Release|Windows-x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -848,10 +874,11 @@ Global
{56F9A112-FD96-4809-98F4-0D7C5DE0711B} = {D5BF3E92-22DA-4C1B-A736-B9E847A3DE27}
{A448AD52-CB49-4206-BBDC-E433574BB88F} = {27B3C269-FF3F-4E1C-9B92-A40F6B4857E0}
{74A88CCC-F53B-471C-B350-A2BB5804619C} = {E011739D-4EC0-4E88-B6D1-A86242FBE6B0}
+ {87E71797-E60A-4637-BA32-C8B57154ABC3} = {D5BF3E92-22DA-4C1B-A736-B9E847A3DE27}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
- EnterpriseLibraryConfigurationToolBinariesPath = packages\Unity.2.1.505.0\lib\NET35
SolutionGuid = {968C278F-4142-4DFF-96B0-B3D70A649451}
+ EnterpriseLibraryConfigurationToolBinariesPath = packages\Unity.2.1.505.0\lib\NET35
EndGlobalSection
GlobalSection(Performance) = preSolution
HasPerformanceSessions = true
diff --git a/Department2/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Department2/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
deleted file mode 100644
index 7089ade8..00000000
Binary files a/Department2/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and /dev/null differ
diff --git a/Department2/obj/Debug/build.force b/Department2/obj/Debug/build.force
deleted file mode 100644
index e69de29b..00000000
diff --git a/Learun.Application.Organization/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Learun.Application.Organization/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
deleted file mode 100644
index b69111f4..00000000
Binary files a/Learun.Application.Organization/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and /dev/null differ
diff --git a/Learun.Application.Web/AppApi/PlotBOMApiController.cs b/Learun.Application.Web/AppApi/PlotBOMApiController.cs
index ffff394e..56a34701 100644
--- a/Learun.Application.Web/AppApi/PlotBOMApiController.cs
+++ b/Learun.Application.Web/AppApi/PlotBOMApiController.cs
@@ -6,6 +6,7 @@ using NPOI.SS.Formula.PTG;
using NPOI.Util.Collections;
using OfficeOpenXml.Drawing.Vml;
using Pipelines.Sockets.Unofficial.Arenas;
+using SWS.Share;
using System;
using System.Collections;
using System.Collections.Generic;
@@ -31,7 +32,7 @@ namespace Learun.Application.Web.AppApi
///
///
[HttpGet]
- public IHttpActionResult GetBOMGroupInfo(string ProjectId = "c151f5d4-cbe1-4522-945c-501b1ad990d5", string drawingId = "277d883d-e271-45e4-990b-926585321fa8")
+ public IHttpActionResult GetBOMGroupInfo(string ProjectId = "403ee1e6-ca2e-4acc-9667-273afd4ea93c", string drawingId = "db834963-f62b-4c44-8180-1b9073819546")
{
var res = new List();//声明结果
@@ -77,7 +78,7 @@ namespace Learun.Application.Web.AppApi
#region 预处理每个位号,然后进行分组
foreach (ec_enginedataEntity tag in allTag)
{
- var matchedTypes = new List();
+ var matchedTypes = new List();
var idx = 0;
var GroupName = TrimTagNubmer(tag.TagNumber, out idx);// 如 A-B1,A-B2,取出来的group就是A-B,idx为0
var seq = tag.TagNumber.Substring(idx).Replace(GroupName, "");// 1,2
@@ -127,19 +128,25 @@ namespace Learun.Application.Web.AppApi
{
List allTagsInThisGroup = group.ToList();
var GroupName = group.Key.Group; //A-ABC, 正常情况下A是system,放下面;B是tag,放上面
+ string part1 = string.Empty;
+ string part0 = string.Empty;
if (!GroupName.Contains("-"))
- {
-
- continue;
+ {
+ part1 = GroupName;
}
- var upper_text_Part1 = GroupName.Split('-')[1];//ABC
+ else
+ {
+ part0 = GroupName.Split('-')[0];
+ part1 = GroupName.Split('-')[1];//ABC
+ }
+ var upper_text_Part1 = part1;//ABC
var upper_text_Part2 = "";//seq
#region seq的不同情况
//得到每个位号下的seq
var allSeqText = allTagsInThisGroup.OrderBy(x => x.Seq).Select(x => x.Seq).ToList();
var allSeq = ExtractNumbers(allSeqText);//把1A 1B 这种情况也处理了,变成1,1
- if (allSeq.Distinct().Count() == 1)
+ if (allSeq.Distinct().Count() <= 1)
{
//TAG如果一样的就取这个TAG就行???
upper_text_Part2 = allSeqText.First();
@@ -165,7 +172,7 @@ namespace Learun.Application.Web.AppApi
var BOMGroupInfo = new BOMGroupInfo
{
upper_text = upper_text_Part1 + upper_text_Part2,
- lower_text = GroupName.Split('-')[0],//A
+ lower_text = part0,//A
Count = group.Count(),
Remark = group.Key.vendor,
Model = group.Key.Model,
@@ -290,32 +297,5 @@ namespace Learun.Application.Web.AppApi
///
public string Name { set; get; }
}
- public class BOMGroupInfo
- {
- public string upper_text { set; get; }
- public string lower_text { set; get; }
- ///
- /// 每一行用的symbol是什么
- ///
- public string FileId { set; get; }
- ///
- /// 个数
- ///
- public int Count { set; get; }
- ///
- /// 备注(由 厂商)
- ///
- public string Remark { set; get; }
- ///
- /// 规格(由 电制 额定功率 ip等级 防爆等级等属性拼接而成)
- ///
- public string Spec { set; get; }
-
- ///
- /// 型号
- ///
- public string Model { set; get; }
-
- }
}
\ No newline at end of file
diff --git a/Learun.Application.Web/AppApi/ProjectApiController.cs b/Learun.Application.Web/AppApi/ProjectApiController.cs
index 5e5c73e4..b9f80969 100644
--- a/Learun.Application.Web/AppApi/ProjectApiController.cs
+++ b/Learun.Application.Web/AppApi/ProjectApiController.cs
@@ -1,4 +1,6 @@
-using Learun.Application.TwoDevelopment.ZZDT_EC;
+using DocumentFormat.OpenXml.Drawing.Spreadsheet;
+using Learun.Application.Base.SystemModule;
+using Learun.Application.TwoDevelopment.ZZDT_EC;
using Learun.Util;
using Learun.Util.SqlSugar;
using SqlSugar;
@@ -109,5 +111,25 @@ namespace Learun.Application.Web.AppApi
return Success(resAll);
}
+ ///
+ /// 获取项目信息
+ ///
+ /// 项目ID
+ ///
+ [HttpGet]
+ [ResponseType(typeof(TwoDevelopment.ZZDT_EC.ec_projectEntity))]
+ public IHttpActionResult GetEntity(string projectId)
+ {
+ try
+ {
+ ec_projectIBLL ec_projectIBLL = new ec_projectBLL();
+ var entity = ec_projectIBLL.GetEntity(projectId);
+ return Success(entity);
+ }
+ catch (Exception ex)
+ {
+ return Fail(ex.Message);
+ }
+ }
}
}
\ No newline at end of file
diff --git a/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Application.Web/Learun.Application.Web.csproj
index 75876b25..3bda2aa7 100644
--- a/Learun.Application.Web/Learun.Application.Web.csproj
+++ b/Learun.Application.Web/Learun.Application.Web.csproj
@@ -3814,6 +3814,9 @@
+
+ PreserveNewest
+
@@ -3909,6 +3912,10 @@
{1d192591-b85a-41db-ae3a-4bf9765786c1}
Learun.Workflow.Engine
+
+ {87e71797-e60a-4637-ba32-c8b57154abc3}
+ SWS.Share
+
10.0
diff --git a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.AppMagager/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.AppMagager/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
deleted file mode 100644
index bacd09a8..00000000
Binary files a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.AppMagager/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and /dev/null differ
diff --git a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
deleted file mode 100644
index df847b10..00000000
Binary files a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and /dev/null differ
diff --git a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Form/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Form/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
deleted file mode 100644
index f7c88177..00000000
Binary files a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Form/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and /dev/null differ
diff --git a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.IM/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.IM/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
deleted file mode 100644
index 72280f02..00000000
Binary files a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.IM/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and /dev/null differ
diff --git a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
deleted file mode 100644
index 2c49f0f7..00000000
Binary files a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and /dev/null differ
diff --git a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Message/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Message/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
deleted file mode 100644
index 5811a0e1..00000000
Binary files a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Message/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and /dev/null differ
diff --git a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
deleted file mode 100644
index 482099e2..00000000
Binary files a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and /dev/null differ
diff --git a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Report/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Report/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
deleted file mode 100644
index 047f894f..00000000
Binary files a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Report/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and /dev/null differ
diff --git a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Scheduler/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Scheduler/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
deleted file mode 100644
index 8c3861e2..00000000
Binary files a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Scheduler/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and /dev/null differ
diff --git a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ZZDT_EC/ec_enginedata/ec_enginedataBLL.cs b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ZZDT_EC/ec_enginedata/ec_enginedataBLL.cs
index 51fffc7e..210cdc43 100644
--- a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ZZDT_EC/ec_enginedata/ec_enginedataBLL.cs
+++ b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ZZDT_EC/ec_enginedata/ec_enginedataBLL.cs
@@ -1562,6 +1562,7 @@ namespace Learun.Application.TwoDevelopment.ZZDT_EC
var typeTbName = ProjectSugar.TableName(projectId);
var dwgTbName = ProjectSugar.TableName(projectId);
var pixelTbName = ProjectSugar.TableName(projectId);
+ var dataitemdetailTableName = TableName(projectId);
var allType = SqlSugarHelper.Db.Queryable().AS(typeTbName).ToList();
var systems = new ec_dataitemBLL().GetDetailList(GlobalObject.enumlist_System, "", projectId);
@@ -1573,14 +1574,24 @@ namespace Learun.Application.TwoDevelopment.ZZDT_EC
{
var cableSystemObj = entity.EngineDataProperty.FirstOrDefault(x => x.PropertyName == GlobalObject.propName_System);
- var cableSystem = cableSystemObj == null ? "" : systems.FirstOrDefault(x => x.DataItemName == cableSystemObj.PropertyValue)?.DataItemDetailID;
- if (cableSystem != null)
+ string systemNameAfterDealWith = string.Empty;
+ var cableSystem =string.Empty;
+ var topDataItemDetailIDofDwg = string.Empty;
+ var topDataItemDetailIDofEng = string.Empty;
+ if (cableSystemObj != null)
{
- if (dwgObj.DrawingSystem == cableSystem && !string.IsNullOrEmpty(dwgObj.DrawingSystem))
+ int index = cableSystemObj.PropertyValue.IndexOf("||");
+ systemNameAfterDealWith = index >= 0 ? cableSystemObj.PropertyValue.Substring(0, index) : cableSystemObj.PropertyValue;
+ cableSystem = systems.FirstOrDefault(x => x.DataItemName == systemNameAfterDealWith)?.DataItemDetailID;
+ //获取图纸系统的最上级ID
+ topDataItemDetailIDofDwg = GetTopParentDataItemDetailByID(dataitemdetailTableName, dwgObj.DrawingSystem);
+ //获取位号系统的最上级ID
+ topDataItemDetailIDofEng= GetTopParentDataItemDetailByID(dataitemdetailTableName, cableSystem);
+ if (topDataItemDetailIDofDwg == topDataItemDetailIDofEng && !string.IsNullOrEmpty(dwgObj.DrawingSystem))
{
//可以修改
}
- else if (string.IsNullOrEmpty(cableSystem))
+ else if (string.IsNullOrEmpty(topDataItemDetailIDofEng))
{
//不可以
allowPropertyModify = false;
@@ -1606,6 +1617,12 @@ namespace Learun.Application.TwoDevelopment.ZZDT_EC
}
}
+ //var cableSystem = cableSystemObj == null ? "" : systems.FirstOrDefault(x => x.DataItemName == cableSystemObj.PropertyValue)?.DataItemDetailID;
+ //if (cableSystem != null)
+ //{
+
+
+ //}
}
else
{
@@ -2412,6 +2429,38 @@ namespace Learun.Application.TwoDevelopment.ZZDT_EC
return current.DataItemName;
}
+ ///
+ /// 找到最上级的DataItemDetailID
+ ///
+ /// 表名
+ /// 当前的DataItemName
+ /// 最上层的Name
+ public string GetTopParentDataItemDetailByID(string DtatTableName, string strDataItemDetailID)
+ {
+ // 先找到初始节点
+ var current = Db.Queryable().AS(DtatTableName).Where(x => x.DataItemDetailID == strDataItemDetailID).First();
+
+ // 如果找不到,直接返回 null
+ if (current == null)
+ return null;
+
+ // 循环向上查找
+ while (current.UpDataItemDetailID != "0")
+ {
+ // upDataItemDetailID是上级节点的DataItemDetailID
+ var parent = Db.Queryable().AS(DtatTableName).Where(x => x.DataItemDetailID == current.UpDataItemDetailID).First();
+
+ // 如果找不到就返回 null(防止死循环)
+ if (parent == null)
+ return null;
+
+ current = parent;
+ }
+
+ // 返回最上层的 DataItemDetailID(也就是 0对应的ID)
+ return current.DataItemDetailID;
+ }
+
///
/// 过滤掉与图纸系统最上层不一致的 EngineDataID
///
@@ -2583,5 +2632,7 @@ namespace Learun.Application.TwoDevelopment.ZZDT_EC
return result;
}
+
+
}
}
diff --git a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WeChat/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WeChat/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
deleted file mode 100644
index 97b19aa8..00000000
Binary files a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WeChat/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and /dev/null differ
diff --git a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
deleted file mode 100644
index fb81b89a..00000000
Binary files a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and /dev/null differ
diff --git a/Learun.Framework.Module/Learun.Cache/LeaRun.Cache.Factory/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Learun.Framework.Module/Learun.Cache/LeaRun.Cache.Factory/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
deleted file mode 100644
index b44f01da..00000000
Binary files a/Learun.Framework.Module/Learun.Cache/LeaRun.Cache.Factory/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and /dev/null differ
diff --git a/Learun.Framework.Module/Learun.Cache/Learun.Cache.Base/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Learun.Framework.Module/Learun.Cache/Learun.Cache.Base/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
deleted file mode 100644
index 1ac5c3ba..00000000
Binary files a/Learun.Framework.Module/Learun.Cache/Learun.Cache.Base/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and /dev/null differ
diff --git a/Learun.Framework.Module/Learun.Cache/Learun.Cache.Redis/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Learun.Framework.Module/Learun.Cache/Learun.Cache.Redis/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
deleted file mode 100644
index f0ab5e75..00000000
Binary files a/Learun.Framework.Module/Learun.Cache/Learun.Cache.Redis/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and /dev/null differ
diff --git a/Learun.Framework.Module/Learun.Db/Learun.DataBase.EF.Oracle/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Learun.Framework.Module/Learun.Db/Learun.DataBase.EF.Oracle/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
deleted file mode 100644
index 49788da8..00000000
Binary files a/Learun.Framework.Module/Learun.Db/Learun.DataBase.EF.Oracle/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and /dev/null differ
diff --git a/Learun.Framework.Module/Learun.Db/Learun.DataBase.EF.Oracle/obj/Debug/Learun.DataBase.Oracle.csproj.AssemblyReference.cache b/Learun.Framework.Module/Learun.Db/Learun.DataBase.EF.Oracle/obj/Debug/Learun.DataBase.Oracle.csproj.AssemblyReference.cache
deleted file mode 100644
index 0b7d950e..00000000
Binary files a/Learun.Framework.Module/Learun.Db/Learun.DataBase.EF.Oracle/obj/Debug/Learun.DataBase.Oracle.csproj.AssemblyReference.cache and /dev/null differ
diff --git a/Learun.Framework.Module/Learun.Db/Learun.DataBase.EF.Oracle/obj/Debug/build.force b/Learun.Framework.Module/Learun.Db/Learun.DataBase.EF.Oracle/obj/Debug/build.force
deleted file mode 100644
index e69de29b..00000000
diff --git a/Learun.Framework.Module/Learun.Db/Learun.DataBase.EF.Sqlserver/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Learun.Framework.Module/Learun.Db/Learun.DataBase.EF.Sqlserver/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
deleted file mode 100644
index a941e9d8..00000000
Binary files a/Learun.Framework.Module/Learun.Db/Learun.DataBase.EF.Sqlserver/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and /dev/null differ
diff --git a/Learun.Framework.Module/Learun.Db/Learun.DataBase.EF.Sqlserver/obj/Debug/Learun.DataBase.SqlServer.csproj.AssemblyReference.cache b/Learun.Framework.Module/Learun.Db/Learun.DataBase.EF.Sqlserver/obj/Debug/Learun.DataBase.SqlServer.csproj.AssemblyReference.cache
deleted file mode 100644
index 0a03554a..00000000
Binary files a/Learun.Framework.Module/Learun.Db/Learun.DataBase.EF.Sqlserver/obj/Debug/Learun.DataBase.SqlServer.csproj.AssemblyReference.cache and /dev/null differ
diff --git a/Learun.Framework.Module/Learun.Db/Learun.DataBase.EF.Sqlserver/obj/Debug/build.force b/Learun.Framework.Module/Learun.Db/Learun.DataBase.EF.Sqlserver/obj/Debug/build.force
deleted file mode 100644
index e69de29b..00000000
diff --git a/Learun.Framework.Module/Learun.Db/Learun.DataBase.MySql/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Learun.Framework.Module/Learun.Db/Learun.DataBase.MySql/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
deleted file mode 100644
index 04c5509b..00000000
Binary files a/Learun.Framework.Module/Learun.Db/Learun.DataBase.MySql/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and /dev/null differ
diff --git a/Learun.Framework.Module/Learun.Db/Learun.DataBase.MySql/obj/Debug/Learun.DataBase.MySqlEx.csproj.AssemblyReference.cache b/Learun.Framework.Module/Learun.Db/Learun.DataBase.MySql/obj/Debug/Learun.DataBase.MySqlEx.csproj.AssemblyReference.cache
deleted file mode 100644
index 293a4e6b..00000000
Binary files a/Learun.Framework.Module/Learun.Db/Learun.DataBase.MySql/obj/Debug/Learun.DataBase.MySqlEx.csproj.AssemblyReference.cache and /dev/null differ
diff --git a/Learun.Framework.Module/Learun.Db/Learun.DataBase.MySql/obj/Debug/build.force b/Learun.Framework.Module/Learun.Db/Learun.DataBase.MySql/obj/Debug/build.force
deleted file mode 100644
index e69de29b..00000000
diff --git a/Learun.Framework.Module/Learun.Db/Learun.DataBase.Repository/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Learun.Framework.Module/Learun.Db/Learun.DataBase.Repository/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
deleted file mode 100644
index 8190e54d..00000000
Binary files a/Learun.Framework.Module/Learun.Db/Learun.DataBase.Repository/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and /dev/null differ
diff --git a/Learun.Framework.Module/Learun.Db/Learun.DataBase/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Learun.Framework.Module/Learun.Db/Learun.DataBase/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
deleted file mode 100644
index 0d64f379..00000000
Binary files a/Learun.Framework.Module/Learun.Db/Learun.DataBase/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and /dev/null differ
diff --git a/Learun.Framework.Module/Learun.Ioc/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Learun.Framework.Module/Learun.Ioc/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
deleted file mode 100644
index 0d8f2245..00000000
Binary files a/Learun.Framework.Module/Learun.Ioc/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and /dev/null differ
diff --git a/Learun.Framework.Module/Learun.Log/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Learun.Framework.Module/Learun.Log/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
deleted file mode 100644
index ca2d0f1e..00000000
Binary files a/Learun.Framework.Module/Learun.Log/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and /dev/null differ
diff --git a/Learun.Framework.Module/Learun.Util/Learun.Util.Operat/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Learun.Framework.Module/Learun.Util/Learun.Util.Operat/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
deleted file mode 100644
index 79a992d6..00000000
Binary files a/Learun.Framework.Module/Learun.Util/Learun.Util.Operat/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and /dev/null differ
diff --git a/Learun.Framework.Module/Learun.Workflow/Learun.Workflow.Engine/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Learun.Framework.Module/Learun.Workflow/Learun.Workflow.Engine/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
deleted file mode 100644
index ae4160ff..00000000
Binary files a/Learun.Framework.Module/Learun.Workflow/Learun.Workflow.Engine/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and /dev/null differ
diff --git a/SWSDBSchemeUpgradeTool/obj/Debug/SWSDBSchemeUpgradeTool_MarkupCompile.lref b/SWSDBSchemeUpgradeTool/obj/Debug/SWSDBSchemeUpgradeTool_MarkupCompile.lref
new file mode 100644
index 00000000..2fe5958e
--- /dev/null
+++ b/SWSDBSchemeUpgradeTool/obj/Debug/SWSDBSchemeUpgradeTool_MarkupCompile.lref
@@ -0,0 +1,5 @@
+
+
+FD:\陈进步\项目\009\SWSDBSchemeUpgradeTool\MainWindow.xaml;;
+FD:\陈进步\项目\009\SWSDBSchemeUpgradeTool\SQLPreview.xaml;;
+
diff --git a/newFront/c#前端/.vs/SWS.CAD/CopilotIndices/17.13.444.19527/CodeChunks.db b/newFront/c#前端/.vs/SWS.CAD/CopilotIndices/17.13.444.19527/CodeChunks.db
deleted file mode 100644
index 11e675fa..00000000
Binary files a/newFront/c#前端/.vs/SWS.CAD/CopilotIndices/17.13.444.19527/CodeChunks.db and /dev/null differ
diff --git a/newFront/c#前端/.vs/SWS.CAD/CopilotIndices/17.13.444.19527/CodeChunks.db-shm b/newFront/c#前端/.vs/SWS.CAD/CopilotIndices/17.13.444.19527/CodeChunks.db-shm
deleted file mode 100644
index 31b0d793..00000000
Binary files a/newFront/c#前端/.vs/SWS.CAD/CopilotIndices/17.13.444.19527/CodeChunks.db-shm and /dev/null differ
diff --git a/newFront/c#前端/.vs/SWS.CAD/CopilotIndices/17.13.444.19527/CodeChunks.db-wal b/newFront/c#前端/.vs/SWS.CAD/CopilotIndices/17.13.444.19527/CodeChunks.db-wal
deleted file mode 100644
index 0b6297d7..00000000
Binary files a/newFront/c#前端/.vs/SWS.CAD/CopilotIndices/17.13.444.19527/CodeChunks.db-wal and /dev/null differ
diff --git a/newFront/c#前端/.vs/SWS.CAD/CopilotIndices/17.13.444.19527/SemanticSymbols.db b/newFront/c#前端/.vs/SWS.CAD/CopilotIndices/17.13.444.19527/SemanticSymbols.db
deleted file mode 100644
index ddab609d..00000000
Binary files a/newFront/c#前端/.vs/SWS.CAD/CopilotIndices/17.13.444.19527/SemanticSymbols.db and /dev/null differ
diff --git a/newFront/c#前端/.vs/SWS.CAD/CopilotIndices/17.13.444.19527/SemanticSymbols.db-shm b/newFront/c#前端/.vs/SWS.CAD/CopilotIndices/17.13.444.19527/SemanticSymbols.db-shm
deleted file mode 100644
index 0e854215..00000000
Binary files a/newFront/c#前端/.vs/SWS.CAD/CopilotIndices/17.13.444.19527/SemanticSymbols.db-shm and /dev/null differ
diff --git a/newFront/c#前端/.vs/SWS.CAD/CopilotIndices/17.13.444.19527/SemanticSymbols.db-wal b/newFront/c#前端/.vs/SWS.CAD/CopilotIndices/17.13.444.19527/SemanticSymbols.db-wal
deleted file mode 100644
index 05236062..00000000
Binary files a/newFront/c#前端/.vs/SWS.CAD/CopilotIndices/17.13.444.19527/SemanticSymbols.db-wal and /dev/null differ
diff --git a/newFront/c#前端/DI-Electrical/ViewModels/MainWindowViewModel.cs b/newFront/c#前端/DI-Electrical/ViewModels/MainWindowViewModel.cs
index 85691f4d..21e0f884 100644
--- a/newFront/c#前端/DI-Electrical/ViewModels/MainWindowViewModel.cs
+++ b/newFront/c#前端/DI-Electrical/ViewModels/MainWindowViewModel.cs
@@ -50,6 +50,7 @@ namespace DI_Electrical.ViewModels
}
public void onShowDialogTest(object o)
{
+
IDialogParameters par = new Prism.Services.Dialogs.DialogParameters();
par.Add(GlobalObject.dialogPar.para1.ToString(), "abc你我他");
_dialogService.ShowDialog(nameof(DialogTest), par, (result) =>
diff --git a/newFront/c#前端/SWS.CAD.Base/General.cs b/newFront/c#前端/SWS.CAD.Base/General.cs
index c8ee2e9f..36bdcaf5 100644
--- a/newFront/c#前端/SWS.CAD.Base/General.cs
+++ b/newFront/c#前端/SWS.CAD.Base/General.cs
@@ -109,8 +109,10 @@ namespace SWS.CAD.Base
///
/// 读取图块图纸插入当前文档
///
- ///
- public static ObjectId InsertBlock(string fileName, string blockName)
+ /// 块图纸路径
+ /// 块名
+ /// 坐标位
+ public static ObjectId InsertBlock(string fileName, string blockName, Point3d position)
{
ObjectId entity = ObjectId.Null;
@@ -135,9 +137,10 @@ namespace SWS.CAD.Base
using (Transaction trans = db.TransactionManager.StartTransaction())
{
BlockTable bt = trans.GetObject(db.BlockTableId, OpenMode.ForRead) as BlockTable;
- ObjectId idBtr = doc.Database.Insert(blockName, blockName, blockDb, true);
+ ObjectId idBtr = doc.Database.Insert(blockName, blockName, blockDb, true);
BlockTableRecord curBtr = trans.GetObject(db.CurrentSpaceId, OpenMode.ForWrite) as BlockTableRecord;
var block = new BlockReference(Point3d.Origin, idBtr);
+ block.Position = position;
curBtr.AppendEntity(block);
trans.AddNewlyCreatedDBObject(block, true);
entity = block.Id;
@@ -721,6 +724,7 @@ namespace SWS.CAD.Base
}
#endregion
+
#region 读取元件块,插入图纸
///
/// 读取元件块,插入图纸
@@ -730,15 +734,15 @@ namespace SWS.CAD.Base
/// 位号值
/// 元件类型ID
/// 比例大小
- /// 坐标位置
+ /// 坐标位置
///
- public static ObjectId AddTagDWG(string filePath, string tagName, string tag, string objTypeId, double scale, Point3d tagPoint)
+ public static ObjectId AddTagDWG(string filePath, string tagName, string tag, string objTypeId, double scale, Point3d position)
{
if (scale == 0)
{ scale = 1; }
Document doc = Application.DocumentManager.MdiActiveDocument;
var ed = doc.Editor;
- ObjectId oid = ObjectId.Null;
+ ObjectId oid = ObjectId.Null;
if (!File.Exists(filePath))
{
ed.WriteMessage("\n 错误:图元文件不存在!\n");
@@ -754,7 +758,7 @@ namespace SWS.CAD.Base
using (Database sourceDb = new Database(false, true))
{
sourceDb.ReadDwgFile(filePath, FileOpenMode.OpenForReadAndAllShare, false, null);
-
+
// 生成唯一块名(避免重名)
string blockName = GetUniqueBlockName(destDb, tagName);
// 将外部DWG转换为块定义
@@ -764,7 +768,7 @@ namespace SWS.CAD.Base
Point3d.Origin, // 插入点(可修改)
blockId// bt[blockName]
);
- br.Position = tagPoint;
+ br.Position = position;
// 设置比例和旋转
br.ScaleFactors = new Scale3d(scale); //比例因子
br.Rotation = 0.0; // 旋转角度(弧度)
@@ -948,18 +952,13 @@ namespace SWS.CAD.Base
///
/// 保存图纸
///
- public static void SaveDwg(string filename)
+ public static void SaveAndCloseDwg(string filename)
{
Document doc = Application.DocumentManager.MdiActiveDocument;
Database db = doc.Database;
if (db.Filename.Equals(filename))
{
- using (Transaction tr = doc.TransactionManager.StartTransaction())
- {
- // 操作数据库...
- tr.Commit(); // 必须提交
- }
- doc.Database.Save();
+ doc.CloseAndSave(filename);
}
}
#endregion
@@ -1013,6 +1012,7 @@ namespace SWS.CAD.Base
}
else { doc.CloseAndDiscard(); }
// 重新打开
+ Thread.Sleep(200);
Application.DocumentManager.Open(filePath, isReadOnly);
doc = Application.DocumentManager.MdiActiveDocument;
ed = doc.Editor;
@@ -1996,6 +1996,144 @@ namespace SWS.CAD.Base
}
#endregion
+
+ #region 插入文本内容
+ public static string InsertTextInfo(List listTextInfo)
+ {
+ string res = string.Empty;
+ try
+ {
+ Document doc = Application.DocumentManager.MdiActiveDocument;
+ Database db = doc.Database;
+ Editor ed = doc.Editor;
+ // 开始事务处理
+ using (Transaction tr = db.TransactionManager.StartTransaction())
+ {
+ // 打开当前空间(模型空间或图纸空间)用于写入
+ BlockTableRecord currentSpace = (BlockTableRecord)tr.GetObject(
+ db.CurrentSpaceId, OpenMode.ForWrite);
+ foreach (var textInfo in listTextInfo)
+ {
+ if (textInfo.IsMText)
+ {
+ // 创建多行文字对象
+ MText mText = new MText();
+ mText.Contents = textInfo.Text;
+ mText.Location = textInfo.Position;
+ mText.TextHeight = textInfo.Height;
+ mText.Width = textInfo.Width; // 设置文本宽度,控制自动换行
+ if (textInfo.Align == 0)
+ {
+ mText.Attachment = AttachmentPoint.MiddleLeft; // 设置对齐居左
+ }
+ else if (textInfo.Align == 1)
+ {
+ mText.Attachment = AttachmentPoint.BaseCenter; // 设置对齐居中
+ }
+ // 将文字添加到当前空间
+ currentSpace.AppendEntity(mText);
+ tr.AddNewlyCreatedDBObject(mText, true);
+ }
+ else
+ {
+ // 创建单行文字对象
+ DBText dbText = new DBText();
+ dbText.TextString = textInfo.Text;
+ dbText.Position = textInfo.Position;
+ dbText.AlignmentPoint= textInfo.Position;
+ dbText.Height = textInfo.Height;
+ if (textInfo.Align == 0)
+ {
+ dbText.HorizontalMode = TextHorizontalMode.TextLeft; // 设置对齐居左
+ }
+ else if (textInfo.Align == 1)
+ {
+ dbText.HorizontalMode = TextHorizontalMode.TextCenter; // 设置对齐居中
+ }
+
+ // 将文字添加到当前空间
+ currentSpace.AppendEntity(dbText);
+ tr.AddNewlyCreatedDBObject(dbText, true);
+ }
+ }
+
+ // 提交事务
+ tr.Commit();
+ }
+ return res;
+ }
+ catch (Exception ex)
+ {
+ return ex.Message;
+ }
+ }
+ #endregion
+
+ #region 读取源图纸,插入当前图纸
+ ///
+ /// 读取源图纸,插入当前图纸
+ ///
+ /// 源图纸路径
+ /// 块名
+ /// 坐标位置
+ ///
+ public static ObjectId AddBlockDWG(string filePath, string blockName, Point3d position)
+ {
+ Document doc = Application.DocumentManager.MdiActiveDocument;
+ var ed = doc.Editor;
+ ObjectId oid = ObjectId.Null;
+ if (!File.Exists(filePath))
+ {
+ ed.WriteMessage("\n 错误: 源图纸不存在!\n");
+ return oid;
+ }
+ // 获取当前数据库
+ Database destDb = HostApplicationServices.WorkingDatabase;
+ using (Transaction tr = destDb.TransactionManager.StartTransaction())
+ {
+ try
+ {
+ // 创建临时数据库读取外部DWG
+ using (Database sourceDb = new Database(false, true))
+ {
+ sourceDb.ReadDwgFile(filePath, FileOpenMode.OpenForReadAndAllShare, false, null);
+
+ // 生成唯一块名(避免重名)
+ //string blockName = GetUniqueBlockName(destDb, blockName);
+ // 将外部DWG转换为块定义
+ ObjectId blockId = destDb.Insert(blockName, sourceDb, true);
+ // 创建块参照
+ BlockReference br = new BlockReference(
+ Point3d.Origin, // 插入点(可修改)
+ blockId// bt[blockName]
+ );
+ br.Position = position;
+ // 设置比例和旋转
+ br.ScaleFactors = new Scale3d(1.0); //比例因子
+ br.Rotation = 0.0; // 旋转角度(弧度)
+ BlockTableRecord btr = (BlockTableRecord)tr.GetObject(
+ SymbolUtilityServices.GetBlockModelSpaceId(destDb),
+ OpenMode.ForWrite
+ );
+
+ // 处理插入结果
+ btr.AppendEntity(br);
+ tr.AddNewlyCreatedDBObject(br, true);
+ tr.Commit();
+ oid = br.Id;
+ }
+ }
+ catch (Exception ex)
+ {
+ tr.Abort();
+ ed.WriteMessage($"\n错误: {ex.Message}\n");
+ }
+ }
+ return oid;
+
+
+ }
+ #endregion
}
}
diff --git a/newFront/c#前端/SWS.CAD.Base/Model/DtoCadTextInfo.cs b/newFront/c#前端/SWS.CAD.Base/Model/DtoCadTextInfo.cs
new file mode 100644
index 00000000..2ceebadb
--- /dev/null
+++ b/newFront/c#前端/SWS.CAD.Base/Model/DtoCadTextInfo.cs
@@ -0,0 +1,37 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Teigha.Geometry;
+
+namespace SWS.CAD.Base
+{
+ public class DtoCadTextInfo
+ {
+ ///
+ /// 坐标
+ ///
+ public Point3d Position { get; set; }
+ ///
+ /// 是否为多行文本
+ ///
+ public bool IsMText { get; set; }
+ ///
+ /// 文本内容,多行文本用\n 进行换行
+ ///
+ public string Text { get; set; }
+ ///
+ /// 文本高度
+ ///
+ public double Height { get; set; }
+ ///
+ /// 文本宽度
+ ///
+ public double Width { get; set; }
+ ///
+ /// 文本对齐方式 0:居左对齐 1:居中对齐
+ ///
+ public double Align { get; set; }
+ }
+}
diff --git a/newFront/c#前端/SWS.CAD.Base/SWS.CAD.Base.csproj b/newFront/c#前端/SWS.CAD.Base/SWS.CAD.Base.csproj
index ee676d80..9412e79b 100644
--- a/newFront/c#前端/SWS.CAD.Base/SWS.CAD.Base.csproj
+++ b/newFront/c#前端/SWS.CAD.Base/SWS.CAD.Base.csproj
@@ -52,6 +52,7 @@
+
diff --git a/newFront/c#前端/SWS.CAD.sln b/newFront/c#前端/SWS.CAD.sln
index 87f32b55..e6768535 100644
--- a/newFront/c#前端/SWS.CAD.sln
+++ b/newFront/c#前端/SWS.CAD.sln
@@ -27,6 +27,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SWS.WPF", "SWS.WPF\SWS.WPF.
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SWS.CAD", "SWS.CAD\SWS.CAD.csproj", "{6BD9B3FC-7D55-4762-AF68-A50183342537}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SWS.Share", "SWS.Share\SWS.Share.csproj", "{87E71797-E60A-4637-BA32-C8B57154ABC3}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -215,6 +217,22 @@ Global
{6BD9B3FC-7D55-4762-AF68-A50183342537}.Release|x64.Build.0 = Release|Any CPU
{6BD9B3FC-7D55-4762-AF68-A50183342537}.Release|x86.ActiveCfg = Release|Any CPU
{6BD9B3FC-7D55-4762-AF68-A50183342537}.Release|x86.Build.0 = Release|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Debug|ARM64.ActiveCfg = Debug|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Debug|ARM64.Build.0 = Debug|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Debug|x64.Build.0 = Debug|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Debug|x86.Build.0 = Debug|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Release|Any CPU.Build.0 = Release|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Release|ARM64.ActiveCfg = Release|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Release|ARM64.Build.0 = Release|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Release|x64.ActiveCfg = Release|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Release|x64.Build.0 = Release|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Release|x86.ActiveCfg = Release|Any CPU
+ {87E71797-E60A-4637-BA32-C8B57154ABC3}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/newFront/c#前端/SWS.CAD/GlobalObje.cs b/newFront/c#前端/SWS.CAD/GlobalObje.cs
index de4a2900..3e72df60 100644
--- a/newFront/c#前端/SWS.CAD/GlobalObje.cs
+++ b/newFront/c#前端/SWS.CAD/GlobalObje.cs
@@ -132,7 +132,7 @@ namespace SWS.CAD
if (_dwgStage == null)
{
- var serv =GlobalObject.container.Resolve();
+ var serv = GlobalObject.container.Resolve();
var res = Task.Run(() => serv.GetDetails(DBConst.Be_DrawingStage.ToString()));
var res2 = res.Result;
return res2;
diff --git a/newFront/c#前端/SWS.CAD/Helper/TreeHelper.cs b/newFront/c#前端/SWS.CAD/Helper/TreeHelper.cs
index 1682d52b..b0b6bf2b 100644
--- a/newFront/c#前端/SWS.CAD/Helper/TreeHelper.cs
+++ b/newFront/c#前端/SWS.CAD/Helper/TreeHelper.cs
@@ -58,27 +58,27 @@ namespace SWS.CAD.Helper
}
#endregion
- #region 获取树节点所有图纸名
+ #region 获取树节点所有图纸名
- ///
- /// 获取树节点所有图纸名
- ///
+ ///
+ /// 获取树节点所有图纸名
+ ///
public static void GetTreeText(Model.TreeModel node)
{
// 如果根节点为空,则返回null
- if (node == null) return ;
+ if (node == null) return;
//没有子节点就返回null
- if (node.ChildNodes == null) return ;
+ if (node.ChildNodes == null) return;
// 否则,递归地在子节点中查找
foreach (var child in node.ChildNodes)
{
GetTreeText(child);
-
+
}
if (node.Text.ToLower().EndsWith(".dwg") && !GlobalObject.AllDwgName.Contains(node.Text))
{ GlobalObject.AllDwgName.Add(node.Text); }
// 如果在当前树中没有找到,返回null
- return ;
+ return;
}
#endregion
}
diff --git a/newFront/c#前端/SWS.CAD/ViewModels/DialogIODistributionVM/DialogCablePreAssignPreviewViewModel.cs b/newFront/c#前端/SWS.CAD/ViewModels/DialogIODistributionVM/DialogCablePreAssignPreviewViewModel.cs
index 4cc233ee..c70099f6 100644
--- a/newFront/c#前端/SWS.CAD/ViewModels/DialogIODistributionVM/DialogCablePreAssignPreviewViewModel.cs
+++ b/newFront/c#前端/SWS.CAD/ViewModels/DialogIODistributionVM/DialogCablePreAssignPreviewViewModel.cs
@@ -10,6 +10,9 @@ using SWS.CAD.Views.Dialog;
using Prism.Services.Dialogs;
using SWS.Commons;
using SWS.Model;
+using System.Windows;
+using SWS.Service;
+using Unity;
namespace SWS.CAD.ViewModels
{
@@ -30,6 +33,11 @@ namespace SWS.CAD.ViewModels
}
}
#endregion
+ IOModuleService _iOModuleService;
+ public DialogCablePreAssignPreviewViewModel()
+ {
+ _iOModuleService = GlobalObject.container.Resolve();
+ }
public string Title => "";
@@ -52,30 +60,95 @@ namespace SWS.CAD.ViewModels
_PreAssignCables = parameters.GetValue>(GlobalObject.dialogPar.para1.ToString());
}
- public override void ExecuteOKCommandAsync(object parameter)
+ public override async void ExecuteOKCommandAsync(object parameter)
{
-
- if (PreAssignCables.Any(p => p.IsChecked == true))
+ bool isShowDialog = false;
+ List cableids = new List();
+ foreach (var preAssignCable in PreAssignCables)
{
- //打开窗体
- IDialogParameters para = new Prism.Services.Dialogs.DialogParameters();
- para.Add(GlobalObject.dialogPar.para1.ToString(), PreAssignCables);
- var _dialogService = GlobalObject._prismContainer.Resolve();
- _dialogService.ShowDialog(nameof(DialogCablePreAssignResult), para, async (RES) =>
+ if (preAssignCable.IsChecked)
{
- if (RES.Result == ButtonResult.Yes)
- {
-
- }
- else if (RES.Result == ButtonResult.No)
- { }
- });
+ cableids.Add(preAssignCable.CableId);
+ }
}
-
+ if (cableids != null && cableids.Count() > 0)
+ {
+ bool AcceptNearbyPanel;
+ MessageBoxResult result = System.Windows.MessageBox.Show($"遇到I/O类型不合适的采集箱,是否需要自动更换就近的采集箱", "KunHengCAD", MessageBoxButton.YesNo, MessageBoxImage.Question);
+ if (result == MessageBoxResult.Yes)
+ {
+ AcceptNearbyPanel = true;
+ }
+ else
+ {
+ AcceptNearbyPanel = false;
+ }
+
+ var ResHttp = await _iOModuleService.AutoAssignCable2channel_step1(cableids, AcceptNearbyPanel) as learunHttpRes
diff --git a/newFront/c#前端/SWS.CustomControl/MultiSelectComboBox/MultiSelectComboBox.cs b/newFront/c#前端/SWS.CustomControl/MultiSelectComboBox/MultiSelectComboBox.cs
new file mode 100644
index 00000000..41477d9e
--- /dev/null
+++ b/newFront/c#前端/SWS.CustomControl/MultiSelectComboBox/MultiSelectComboBox.cs
@@ -0,0 +1,182 @@
+using System;
+using System.ComponentModel;
+using System.Linq;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Controls.Primitives;
+using System.Windows.Input;
+using System.Windows.Threading;
+
+namespace SWS.CustomControl
+{
+ public class MultiSelectComboBox : ListBox
+ {
+ private const string PART_Popup = "PART_Popup";
+ private const string PART_CheckBoxAll = "PART_CheckBoxAll";
+
+ public static readonly DependencyProperty IsDropDownOpenProperty =
+ DependencyProperty.Register("IsDropDownOpen", typeof(bool), typeof(MultiSelectComboBox),
+ new PropertyMetadata(false));
+
+ public static readonly DependencyProperty MaxDropDownHeightProperty
+ = DependencyProperty.Register("MaxDropDownHeight", typeof(double), typeof(MultiSelectComboBox),
+ new PropertyMetadata(SystemParameters.PrimaryScreenHeight / 3));
+
+ public static readonly DependencyProperty SelectAllContentProperty =
+ DependencyProperty.Register("SelectAllContent", typeof(object), typeof(MultiSelectComboBox),
+ new PropertyMetadata("全选"));
+
+ public static readonly DependencyProperty IsSelectAllActiveProperty =
+ DependencyProperty.Register("IsSelectAllActive", typeof(bool), typeof(MultiSelectComboBox),
+ new PropertyMetadata(false));
+
+ public static readonly DependencyProperty DelimiterProperty =
+ DependencyProperty.Register("Delimiter", typeof(string), typeof(MultiSelectComboBox),
+ new PropertyMetadata(";"));
+
+ public static readonly DependencyProperty TextProperty =
+ DependencyProperty.Register("Text", typeof(string), typeof(MultiSelectComboBox),
+ new PropertyMetadata(string.Empty, OnTextChanged));
+
+ private bool _ignoreTextValueChanged;
+ private MultiSelectComboBoxItem _multiSelectComboBoxItem;
+ private Popup _popup;
+
+ public bool IsDropDownOpen
+ {
+ get => (bool)GetValue(IsDropDownOpenProperty);
+ set => SetValue(IsDropDownOpenProperty, value);
+ }
+
+
+ [Bindable(true)]
+ [Category("Layout")]
+ [TypeConverter(typeof(LengthConverter))]
+ public double MaxDropDownHeight
+ {
+ get => (double)GetValue(MaxDropDownHeightProperty);
+ set => SetValue(MaxDropDownHeightProperty, value);
+ }
+
+
+ public object SelectAllContent
+ {
+ get => GetValue(SelectAllContentProperty);
+ set => SetValue(SelectAllContentProperty, value);
+ }
+
+
+ public bool IsSelectAllActive
+ {
+ get => (bool)GetValue(IsSelectAllActiveProperty);
+ set => SetValue(IsSelectAllActiveProperty, value);
+ }
+
+
+ public string Delimiter
+ {
+ get => (string)GetValue(DelimiterProperty);
+ set => SetValue(DelimiterProperty, value);
+ }
+
+
+ public string Text
+ {
+ get => (string)GetValue(TextProperty);
+ set => SetValue(TextProperty, value);
+ }
+
+ private static void OnIsDropDownOpenChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
+ {
+ var MultiSelectComboBox = (MultiSelectComboBox)d;
+
+ if (!(bool)e.NewValue)
+ MultiSelectComboBox.Dispatcher.BeginInvoke(new Action(() => { Mouse.Capture(null); }),
+ DispatcherPriority.Send);
+ }
+
+ private static void OnTextChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
+ {
+ }
+
+
+ protected override bool IsItemItsOwnContainerOverride(object item)
+ {
+ return item is MultiSelectComboBoxItem;
+ }
+
+ protected override DependencyObject GetContainerForItemOverride()
+ {
+ return new MultiSelectComboBoxItem();
+ }
+
+ protected override void OnSelectionChanged(SelectionChangedEventArgs e)
+ {
+ UpdateText();
+ base.OnSelectionChanged(e);
+ }
+
+ public override void OnApplyTemplate()
+ {
+ base.OnApplyTemplate();
+
+ _popup = GetTemplateChild(PART_Popup) as Popup;
+ _multiSelectComboBoxItem = GetTemplateChild(PART_CheckBoxAll) as MultiSelectComboBoxItem;
+ _multiSelectComboBoxItem.Selected += _MultiSelectComboBoxItem_Selected;
+ _multiSelectComboBoxItem.Unselected += _MultiSelectComboBoxItem_Unselected;
+ }
+
+ private void _MultiSelectComboBoxItem_Unselected(object sender, RoutedEventArgs e)
+ {
+ if (_ignoreTextValueChanged) return;
+ _ignoreTextValueChanged = true;
+ UnselectAll();
+ _ignoreTextValueChanged = false;
+ UpdateText();
+ }
+
+ private void _MultiSelectComboBoxItem_Selected(object sender, RoutedEventArgs e)
+ {
+ if (_ignoreTextValueChanged) return;
+ _ignoreTextValueChanged = true;
+ SelectAll();
+ _ignoreTextValueChanged = false;
+ UpdateText();
+ }
+
+ protected virtual void UpdateText()
+ {
+ if (_ignoreTextValueChanged) return;
+ var newValue = string.Join(Delimiter, SelectedItems.Cast
public string TagNumber_Lower { get; set; } = "";
-
+
///
/// 图元文件Id
///
@@ -48,23 +48,33 @@ namespace SWS.Model
///
/// 肋位号 和 偏移量
///
- public double X { get; set; }
- public string XOff { get; set; }
+ public double X { get; set; }
+ private string _XOff;
+ public string XOff
+ {
+ get { return string.IsNullOrEmpty(_XOff) ? "0" : _XOff; }
+ set { _XOff = value; }
+ }
///
/// 纵骨号 偏移量
///
- public string YOff { get; set; }
+ private string _YOff;
+ public string YOff
+ {
+ get { return string.IsNullOrEmpty(_YOff) ? "0" : _YOff; }
+ set { _YOff = value; }
+ }
- public string deck { get; set; }
+ public string deck { get; set; }
public string area { get; set; }
-
+
///
/// 基点从属的、或者说附近的设备位号
///
public List Tags { get; set; } = new List();
#endregion
-
+
}
}
diff --git a/newFront/c#前端/SWS.Model/NoEntity/BomConfig.cs b/newFront/c#前端/SWS.Model/NoEntity/BomConfig.cs
new file mode 100644
index 00000000..8f7062c5
--- /dev/null
+++ b/newFront/c#前端/SWS.Model/NoEntity/BomConfig.cs
@@ -0,0 +1,133 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace SWS.Model
+{
+ ///
+ /// 材料表配置
+ /// 用于生成图纸的材料表
+ ///
+ public class BomConfig
+ {
+ ///
+ /// 材料表宽度
+ ///
+ public int Width { get; set; }
+ ///
+ /// 材料表高度
+ ///
+ public int Height { get; set; }
+
+ ///
+ /// 材料表一行有几页A4表格
+ ///
+ public int RowPageCount { get; set; }
+ ///
+ /// 行数量
+ ///
+ public int RowCount { get; set; }
+ ///
+ /// 行高度
+ ///
+ public int RowHeight { get; set; }
+ ///
+ /// 第1行第1列的X坐标
+ ///
+ public int Column1X { get; set; }
+ ///
+ /// 第1行第1列的Y坐标
+ ///
+ public int Column1Y { get; set; }
+ ///
+ /// 第1行第1列的宽度
+ ///
+ public int Column1Width { get; set; }
+ ///
+ /// 第1行第1列的对齐方式 0:居左对齐 1:居中对齐
+ ///
+ public int Column1Align { get; set; }
+ ///
+ /// 第1行第2列的X坐标
+ ///
+ public int Column2X { get; set; }
+ ///
+ /// 第1行第2列的Y坐标
+ ///
+ public int Column2Y { get; set; }
+ ///
+ /// 第1行第2列的宽度
+ ///
+ public int Column2Width { get; set; }
+ ///
+ /// 第1行第2列的对齐方式 0:居左对齐 1:居中对齐
+ ///
+ public int Column2Align { get; set; }
+ ///
+ /// 第1行第3列的X坐标
+ ///
+ public int Column3X { get; set; }
+ ///
+ /// 第1行第3列的Y坐标
+ ///
+ public int Column3Y { get; set; }
+ ///
+ /// 第1行第3列的宽度
+ ///
+ public int Column3Width { get; set; }
+ ///
+ /// 第1行第3列的对齐方式 0:居左对齐 1:居中对齐
+ ///
+ public int Column3Align { get; set; }
+ ///
+ /// 第1行第4列的X坐标
+ ///
+ public int Column4X { get; set; }
+ ///
+ /// 第1行第4列的Y坐标
+ ///
+ public int Column4Y { get; set; }
+ ///
+ /// 第1行第4列的宽度
+ ///
+ public int Column4Width { get; set; }
+ ///
+ /// 第1行第4列的对齐方式 0:居左对齐 1:居中对齐
+ ///
+ public int Column4Align { get; set; }
+ ///
+ /// 第1行第5列的X坐标
+ ///
+ public int Column5X { get; set; }
+ ///
+ /// 第1行第5列的Y坐标
+ ///
+ public int Column5Y { get; set; }
+ ///
+ /// 第1行第5列的宽度
+ ///
+ public int Column5Width { get; set; }
+ ///
+ /// 第1行第5列的对齐方式 0:居左对齐 1:居中对齐
+ ///
+ public int Column5Align { get; set; }
+ ///
+ /// 第1行第6列的X坐标
+ ///
+ public int Column6X { get; set; }
+ ///
+ /// 第1行第6列的Y坐标
+ ///
+ public int Column6Y { get; set; }
+ ///
+ /// 第1行第6列的宽度
+ ///
+ public int Column6Width { get; set; }
+ ///
+ /// 第1行第6列的对齐方式 0:居左对齐 1:居中对齐
+ ///
+ public int Column6Align { get; set; }
+ }
+}
diff --git a/newFront/c#前端/SWS.Model/NoEntity/TreeModel.cs b/newFront/c#前端/SWS.Model/NoEntity/TreeModel.cs
index e457f8dd..a4d38a56 100644
--- a/newFront/c#前端/SWS.Model/NoEntity/TreeModel.cs
+++ b/newFront/c#前端/SWS.Model/NoEntity/TreeModel.cs
@@ -1,10 +1,11 @@
-using System.Collections.ObjectModel;
+using System;
+using System.Collections.ObjectModel;
using System.Windows.Media;
using Telerik.Windows.Controls;
namespace SWS.Model
{
- public class TreeModel : ViewModelBase, System.ICloneable
+ public class TreeModel : ViewModelBase, System.ICloneable
{
public string ID { get; set; }
private string _Text;
@@ -37,6 +38,17 @@ namespace SWS.Model
get { return _isexpand; }
set { _isexpand = value; OnPropertyChanged(nameof(isexpand)); }
}
+ private bool isChecked=false;
+ ///
+ /// 是否选中状态
+ ///
+ public bool IsChecked
+ {
+ get { return isChecked; }
+ set { isChecked = value; OnPropertyChanged(nameof(IsChecked));
+
+ }
+ }
///
/// 节点类型
///
diff --git a/newFront/c#前端/SWS.Model/SWS.Model.csproj b/newFront/c#前端/SWS.Model/SWS.Model.csproj
index 4ae32f4a..f5417adc 100644
--- a/newFront/c#前端/SWS.Model/SWS.Model.csproj
+++ b/newFront/c#前端/SWS.Model/SWS.Model.csproj
@@ -116,6 +116,7 @@
+
diff --git a/newFront/c#前端/SWS.Model/ec_CableSet.cs b/newFront/c#前端/SWS.Model/ec_CableSet.cs
index 6ff93978..92376844 100644
--- a/newFront/c#前端/SWS.Model/ec_CableSet.cs
+++ b/newFront/c#前端/SWS.Model/ec_CableSet.cs
@@ -117,6 +117,9 @@ namespace SWS.Model
/// 删除标记
///
public bool DeleteFlg { set; get; } = false;
+
+ public List AssignedTerms { set; get; }
+
#endregion
public ec_CableSet()
diff --git a/newFront/c#前端/SWS.Service/DrawingServce.cs b/newFront/c#前端/SWS.Service/DrawingServce.cs
index cce48a49..788eef87 100644
--- a/newFront/c#前端/SWS.Service/DrawingServce.cs
+++ b/newFront/c#前端/SWS.Service/DrawingServce.cs
@@ -32,7 +32,7 @@ namespace SWS.Service
///
/// 查询图纸目录树
///
- /// 是否只查询文件夹。1代表只查询文件夹
+ /// 是否只查询文件夹。0:包含图纸文件的查询, 1代表只查询文件夹
///
public async Task> GetDrawingCatalogue(string onlyFolderFlag = "0")
{
diff --git a/newFront/c#前端/SWS.Service/IOModuleService.cs b/newFront/c#前端/SWS.Service/IOModuleService.cs
index 7fc4aff5..80105677 100644
--- a/newFront/c#前端/SWS.Service/IOModuleService.cs
+++ b/newFront/c#前端/SWS.Service/IOModuleService.cs
@@ -333,6 +333,46 @@ namespace SWS.Service
return null;
}
+ public async Task