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/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/Learun.Application.Organization/bin/Release/Learun.Cache.Base.dll b/Learun.Application.Organization/bin/Release/Learun.Cache.Base.dll index 4c9f7345..94bf2508 100644 Binary files a/Learun.Application.Organization/bin/Release/Learun.Cache.Base.dll and b/Learun.Application.Organization/bin/Release/Learun.Cache.Base.dll differ diff --git a/Learun.Application.Organization/bin/Release/Learun.Cache.Base.pdb b/Learun.Application.Organization/bin/Release/Learun.Cache.Base.pdb index c3bc65f3..f38ef8bf 100644 Binary files a/Learun.Application.Organization/bin/Release/Learun.Cache.Base.pdb and b/Learun.Application.Organization/bin/Release/Learun.Cache.Base.pdb differ 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/IOModuleApiController.cs b/Learun.Application.Web/AppApi/IOModuleApiController.cs index 4c6149ea..95e49413 100644 --- a/Learun.Application.Web/AppApi/IOModuleApiController.cs +++ b/Learun.Application.Web/AppApi/IOModuleApiController.cs @@ -48,36 +48,117 @@ namespace Learun.Application.Web.AppApi /// /// 找到某一个预分配箱子 附近的某一个箱子 + /// /// /// - /// Digital,4-20mA,10v,pt100,pulse - /// + /// 所有柜子的属性 + /// Digital,4-20mA,10v,pt100,pulse /// - private ec_PanelEntity FindPanelNearby(List frameLists, List allPanel, List allPanelProps - , string IOTypeOnCable) + private ec_PanelEntity FindPanelNearby(string curPanelId, List frameLists, List allPanel, + Dictionary> allPanelProps, string IOTypeOnCable) { + double GetPanelXYDistance2Target(string panelId, double targetX, double targetY) + { + var nearPanel = allPanel.FirstOrDefault(x => x.PanelID == panelId); + var nearPanelProps = allPanelProps[nearPanel.EngineerDataID]; + var X = nearPanelProps.FirstOrDefault(x => x.PropertyName == GlobalObject.propName_Frame)?.PropertyValue; + X = X.Split(new string[] { GlobalObject.enum_separator }, StringSplitOptions.None)[0];//插件端对于下拉列表 都是 name || nameEN + var validFrme2 = frameLists.FirstOrDefault(f => f.Num == X); + if (validFrme2 == null) + { + return -1;//无效的肋位号导致的 + } + + + var XValue = validFrme2.Value; + + if (XValue < 400)//null也没事 + { + // 小于400,我几乎可以认为此时肋位号用的是m这个单位。因为如果用的是mm,400mm的肋位号似乎也太小了。 + XValue = 1000 * XValue; // 转成mm + } + if (double.TryParse(nearPanelProps.FirstOrDefault(x => x.PropertyName == GlobalObject.propName_FrameOff)?.PropertyValue, + out double XOffValue)) + { + + } + else + { + return -1;//无效的x off导致的 + } + if (double.TryParse(nearPanelProps.FirstOrDefault(x => x.PropertyName == GlobalObject.propName_YOff)?.PropertyValue, + , out double YOffValue)) + { + + } + else + { + return -1;//无效的y off导致的 + } + + var distance = Math.Sqrt(Math.Pow(targetX - XValue - XOffValue, 2) + Math.Pow(targetY - YOffValue, 2)); + return distance; + } + var curPanel = allPanel.FirstOrDefault(x => x.PanelID == curPanelId); + var curPanelProps = allPanelProps[curPanel.EngineerDataID]; //当前预分配的箱子的位置 - var AssignPanelX = allPanelProps.FirstOrDefault(x => x.PropertyName == GlobalObject.propName_Frame)?.PropertyValue; + var AssignPanelX = curPanelProps.FirstOrDefault(x => x.PropertyName == GlobalObject.propName_Frame)?.PropertyValue; AssignPanelX = AssignPanelX.Split(new string[] { GlobalObject.enum_separator }, StringSplitOptions.None)[0];//插件端对于下拉列表 都是 name || nameEN - var AssignPanelXValue = frameLists.FirstOrDefault(X => X.Num == AssignPanelX)?.Value; + var validFrme = frameLists.FirstOrDefault(X => X.Num == AssignPanelX); + if (validFrme == null) + { + return null;//无效的肋位号导致的 + } + + + var AssignPanelXValue = validFrme.Value; + if (AssignPanelXValue < 400)//null也没事 { // 小于400,我几乎可以认为此时肋位号用的是m这个单位。因为如果用的是mm,400mm的肋位号似乎也太小了。 AssignPanelXValue = 1000 * AssignPanelXValue; // 转成mm } - var AssignPanelXOff = allPanelProps.FirstOrDefault(x => x.PropertyName == GlobalObject.propName_FrameOff)?.PropertyValue; - - var AssignPanelY = allPanelProps.FirstOrDefault(x => x.PropertyName == GlobalObject.propName_YOff)?.PropertyValue; - - foreach (var panel in allPanel) + if (double.TryParse(curPanelProps.FirstOrDefault(x => x.PropertyName == GlobalObject.propName_FrameOff)?.PropertyValue, + out double AssignPanelXOffValue)) { + + } + else + { + return null;//无效的x off导致的 + } + if (double.TryParse(curPanelProps.FirstOrDefault(x => x.PropertyName == GlobalObject.propName_YOff)?.PropertyValue, +, out double AssignPanelYValue)) + { + + } + else + { + return null;//无效的y off导致的 + } + double minDistance = 0.1; ec_PanelEntity nearestPanel = null; + foreach (var panel in allPanel.Where(x => x.PanelID != curPanelId)) + { + #region io + + #endregion + #region distance //拿到每一个的xy属性 //然后和预分配箱子进行对比 - //这也太耗时了把 - } - //然后排序一次 + var DISTANCE = GetPanelXYDistance2Target(panel.PanelID, AssignPanelXValue + AssignPanelXOffValue, AssignPanelYValue); + + if (0.1 == minDistance && DISTANCE > 0) + { + minDistance = DISTANCE; nearestPanel = panel; + } + else if (DISTANCE < minDistance && DISTANCE > 0) + { + minDistance = DISTANCE; nearestPanel = panel; + } + #endregion + } //根据电缆上的信号,去找匹配的排序第一位(已经按照距离排序过)的箱子 switch (IOTypeOnCable.ToUpper()) { @@ -87,7 +168,7 @@ namespace Learun.Application.Web.AppApi default: break; } - return null; + return nearestPanel; } /// @@ -282,6 +363,8 @@ namespace Learun.Application.Web.AppApi } } + + ICache redisObj = CacheFactory.CaChe(); /// /// 自动分配通道(点表信号自动分配)。 /// @@ -334,15 +417,21 @@ namespace Learun.Application.Web.AppApi if (AcceptNearbyPanel)//允许进行 { //有不匹配的,但是用户允许继续 - //在之后的自动分配过程中会自动寻找匹配的采集箱,原则上从就近的开始找,如果没有匹配的采集箱,则提示“未找到具有XX类型的采集箱,请新增后再次分配,是否取消自动分配进程?” + //如果选是,则在之后的自动分配过程中会自动寻找匹配的采集箱,原则上从就近的开始找,如果没有匹配的采集箱,则提示“未找到具有XX类型的采集箱,请新增后再次分配,是否取消自动分配进程?” bool nearbyFound = false; foreach (var cable in cablesNotMatchIO) { - var nearPanel = FindPanelNearby(allFrames, allPanel, allPanelProp[cable.ToPanel.EngineerDataID], cable.PreAssignIOType); + var nearPanel = FindPanelNearby(cable.PanelID, allFrames, allPanel, allPanelProp, cable.PreAssignIOType); if (nearPanel == null) { nearbyFound = false; + //必要的数据存入redis,以便后续步骤使用 + redisObj.Remove("IOModule_AutoAssign2Ch_" + projId, CacheId.IOModule_AutoAssign2Ch); + redisObj.Write>("IOModule_AutoAssign2Ch_" + projId, cablesNeedAssigned, CacheId.IOModule_AutoAssign2Ch); return Fail($"在附近未找到具有{cable.PreAssignIOType}类型的采集箱,请新增后再次分配,是否取消自动分配进程?"); + //之后插件端进行选择。 + //如果不想新增,则选择否,继续自动分配,没有分配到的信号在备注上填写由于何种原因没有被分配,弹出未被分配的信号列表供查看。 + //也就是这里要等所有循环结束后才能return结果,而不是目前一个nearByFound = false时就退出了。 } else { @@ -355,7 +444,7 @@ namespace Learun.Application.Web.AppApi } else { - //不继续自动分配,中断进程,等添加完正确的模块后再继续自动分配 + //如果选否,则不继续自动分配,中断进程,等添加完正确的模块后再继续自动分配 var cableNamesNotMatched = string.Join(",", cablesNotMatchIO.Select(x => x.TagNumber).ToList()); var panelIOMissing = new List(); foreach (ec_CableEntity cableNotMatchIO in cablesNotMatchIO) @@ -373,7 +462,6 @@ namespace Learun.Application.Web.AppApi } //必要的数据存入redis,以便后续步骤使用 - ICache redisObj = CacheFactory.CaChe(); redisObj.Remove("IOModule_AutoAssign2Ch_" + projId, CacheId.IOModule_AutoAssign2Ch); redisObj.Write>("IOModule_AutoAssign2Ch_" + projId, cablesNeedAssigned, CacheId.IOModule_AutoAssign2Ch); @@ -385,18 +473,36 @@ namespace Learun.Application.Web.AppApi } /// - /// + /// 根据step1的初步采集箱判断情况,来进行分配预览。 /// /// /// + [HttpPost] public IHttpActionResult AutoAssignCable2Channel_step2(string projId) { ICache redisObj = CacheFactory.CaChe(); var cablesNeedAssigned = redisObj.Read>("IOModule_AutoAssign2Ch_" + projId, CacheId.IOModule_AutoAssign2Ch); - //#region 1.2 + //#region 1.2 开始自动分配(不保存到数据库) #region 先分组 1.2.2 - cablesNeedAssigned = cablesNeedAssigned.OrderBy(x => new { x.PanelID, x.PreAssignIOType, x.System }).ToList(); + var cablesGrouped = cablesNeedAssigned.OrderBy(x => x.PanelID).ThenBy(x => x.PreAssignIOType).ThenBy(x => x.System).ToList(); + + foreach (var item in cablesNeedAssigned) + { + if (item.Sets == null || item.Sets.Count() == 0) + { + //也归类到未成功 + } + else + { + foreach (var set in item.Sets) + { + set.ConnectionInfo = $"采集箱:{item.ToPanel.TagNumber}/模块(端子排):{"test_ts"}/通道:{"test_ch"}"; + set.AssignedTerms = set.Wires.Select(x => x.PreAssignChannelTermNo).ToList();// new List() { "test_term1", "test_term2" };//假数据 + } + } + + } //var curPanel = new ec_PanelEntity(); //curPanel = panelsNeed.FirstOrDefault(x => x.PanelID == cablesNeedAssigned[0].PanelID);//先定位到第一个电缆所在的箱子 //curPanel.strips = stripsNeed.Where(x => x.PanelID == curPanel.PanelID).ToList(); @@ -430,7 +536,22 @@ namespace Learun.Application.Web.AppApi //} //#endregion - return Success("自动关联完成"); + return Success(cablesNeedAssigned); + + + } + + /// + /// 根据step2的预分配结果,进行实际的分配,修改数据库。 + /// + /// + /// 传入有效的cable即可,未成功分配的cable不需要 + /// + [HttpPost] + public IHttpActionResult AutoAssignCable2Channel_step3(string projId, [FromBody] List cables) + { + //大原则:同一根电缆的信号不能跨采集箱,跨模块可以。 + return Success(cables); } diff --git a/Learun.Application.Web/AppApi/ObjectTypeApiController.cs b/Learun.Application.Web/AppApi/ObjectTypeApiController.cs index 113ee1e8..8fe7effb 100644 --- a/Learun.Application.Web/AppApi/ObjectTypeApiController.cs +++ b/Learun.Application.Web/AppApi/ObjectTypeApiController.cs @@ -631,13 +631,10 @@ namespace Learun.Application.Web.AppApi //每个位号的属性信息 foreach (var tag in objectType.tags) { - if (string.IsNullOrEmpty(tag.CreateUserID)) + if (userDict.TryGetValue(tag.CreateUserID, out string createUserName)) { - tag.CreateUserName = string.Empty; - } - else - { - tag.CreateUserName = userDict[tag.CreateUserID];// allUser.FirstOrDefault(x => x.F_UserId == item.CreateUserID)?.F_RealName; + tag.CreateUserName = createUserName;// allUser.FirstOrDefault(x => x.F_UserId == item.CreateUserID)?.F_RealName; + } tag.EngineDataProperty = tagPropDictByTag[tag.EngineDataID];// tagPropAll.Where(x => x.EngineDataID == tag.EngineDataID).ToList(); diff --git a/Learun.Application.Web/AppApi/PlotLayoutApiController.cs b/Learun.Application.Web/AppApi/PlotLayoutApiController.cs index 3f2d00b5..e219c15f 100644 --- a/Learun.Application.Web/AppApi/PlotLayoutApiController.cs +++ b/Learun.Application.Web/AppApi/PlotLayoutApiController.cs @@ -81,7 +81,29 @@ namespace Learun.Application.Web.AppApi { var tagProps = propAll.FindAll(x => x.EngineDataID == pointTag.EngineDataID); var Prop_Frame = tagProps.FirstOrDefault(x => x.PropertyName == GlobalObject.propName_Frame)?.PropertyValue; - Prop_Frame = Prop_Frame.Split(new string[] { GlobalObject.enum_separator }, StringSplitOptions.None)[0];//插件端对于下拉列表 都是 name || nameEN + if (Prop_Frame != null) + { + Prop_Frame = Prop_Frame.Split(new string[] { GlobalObject.enum_separator }, StringSplitOptions.None)[0];//插件端对于下拉列表 都是 name || nameEN + + } + + var matchedFrame = frameLists.FirstOrDefault(X => X.Num == Prop_Frame); + if (matchedFrame == null) + { + //没有 + //无效的基点 + var layoutTagInvalid = new layoutTagInfoBrief() + { + + EngineDataID = pointTag.EngineDataID, + FileId = "", + PixelOnDwg = pointsOnDwg.FirstOrDefault(x => x.EngineDataID == pointTag.EngineDataID)?.PixelCode, + TagNumber = pointTag.TagNumber, + area = "ERR" + }; + res.Add(layoutTagInvalid); + continue; + } var xValue = frameLists.FirstOrDefault(X => X.Num == Prop_Frame).Value; if (xValue < 400) { @@ -126,26 +148,28 @@ namespace Learun.Application.Web.AppApi //这里要考虑下拉列表 带 ||的问题 List matchedTagIds = new List(); - if (keyProp == GlobalObject.propName_System) - { - //#task 9536 - // 筛选出所有以 "a||" 或 "b||" 开头的元素 - var validSystems = keyValue.Split().ToList(); - matchedTagIds = propAll.Where(item => - validSystems.Any(prefix => item.PropertyValue == prefix) || validSystems.Any(prefix => item.PropertyValue.StartsWith(prefix + GlobalObject.enum_separator)) - ).Select(X => X.EngineDataID).Distinct().ToList(); - } - else - { - matchedTagIds = propAll.Where(x => x.PropertyName == keyProp - && (x.PropertyValue == keyValue || x.PropertyValue.StartsWith(keyValue + GlobalObject.enum_separator))). - Select(X => X.EngineDataID).Distinct().ToList(); - } + //if (keyProp == GlobalObject.propName_System) + //{ + //#task 9536 + // 筛选出所有以 "a||" 或 "b||" 开头的元素 + var validSystems = keyValue.Split(';').ToList(); + matchedTagIds = propAll.Where(item => + item.PropertyName == keyProp && + validSystems.Any(prefix => item.PropertyValue == prefix) || validSystems.Any(prefix => item.PropertyValue.StartsWith(prefix + GlobalObject.enum_separator)) + ).Select(X => X.EngineDataID).Distinct().ToList(); + //} + //else + //{ + // matchedTagIds = propAll.Where(x => x.PropertyName == keyProp + // && (x.PropertyValue == keyValue || x.PropertyValue.StartsWith(keyValue + GlobalObject.enum_separator))). + // Select(X => X.EngineDataID).Distinct().ToList(); + //} //有效范围的设备 var matchedTags = SqlSugarHelper.Db.Queryable().AS(tagTbName). InnerJoin((a, b) => a.ObjectTypeID == b.ObjectTypeID).AS(typeTbName). + Where(a => matchedTagIds.Contains(a.EngineDataID) && a.ObjectTypeID != pointType.ObjectTypeID) .Select((a, b) => new { a.EngineDataID, a.TagNumber, a.ObjectTypeID, b.DefaultLayoutLibFileID }) @@ -164,9 +188,26 @@ namespace Learun.Application.Web.AppApi foreach (var matchPointTagId in matchPointTagIds) { + var tagInfo = matchedTags.FirstOrDefault(X => X.EngineDataID == matchPointTagId); var tagProps = EquipPropAll.Where(x => x.EngineDataID == matchPointTagId).ToList(); var Prop_Frame = tagProps.FirstOrDefault(x => x.PropertyName == GlobalObject.propName_Frame)?.PropertyValue; - Prop_Frame = Prop_Frame.Split(new string[] { GlobalObject.enum_separator }, StringSplitOptions.None)[0];//插件端对于下拉列表 都是 name || nameEN + if (Prop_Frame != null) + { + Prop_Frame = Prop_Frame.Split(new string[] { GlobalObject.enum_separator }, StringSplitOptions.None)[0];//插件端对于下拉列表 都是 name || nameEN + } + var matchedFrame = frameLists.FirstOrDefault(X => X.Num == Prop_Frame); + if (matchedFrame == null) + { + var layoutTagInfoInvalid = new layoutTagInfoBrief() + { + EngineDataID = matchPointTagId, + PixelOnDwg = "", + TagNumber = tagInfo.TagNumber, + area = "ERR", + }; + basePoint.Tags.Add(layoutTagInfoInvalid); + continue; + } var xValue = frameLists.FirstOrDefault(X => X.Num == Prop_Frame).Value; if (xValue < 400) { @@ -176,7 +217,7 @@ namespace Learun.Application.Web.AppApi var Prop_FrameOff = tagProps.FirstOrDefault(x => x.PropertyName == GlobalObject.propName_FrameOff)?.PropertyValue; var Prop_YOff = tagProps.FirstOrDefault(x => x.PropertyName == GlobalObject.propName_YOff)?.PropertyValue; - var tagInfo = matchedTags.FirstOrDefault(X => X.EngineDataID == matchPointTagId); + var systemProp = tagProps.FirstOrDefault(x => x.PropertyName == GlobalObject.propName_System)?.PropertyValue; var tagProp = tagProps.FirstOrDefault(x => x.PropertyName == GlobalObject.propName_Tag)?.PropertyValue; #region 判断是否满足特定条件 @@ -243,13 +284,13 @@ namespace Learun.Application.Web.AppApi var lastDashPos = tagInfo.TagNumber.LastIndexOf('-');//最后一个'-'的位置 if (lastDashPos > 0 && lastDashPos < tagInfo.TagNumber.Length - 1) { - TagNumber_Upper = tagInfo.TagNumber.Substring(0, lastDashPos); - TagNumber_Lower = tagInfo.TagNumber.Substring(lastDashPos + 1); - } + TagNumber_Upper = tagInfo.TagNumber.Substring(lastDashPos + 1);//tag + TagNumber_Lower = tagInfo.TagNumber.Substring(0, lastDashPos);//system + } else { - TagNumber_Upper = tagInfo.TagNumber; - TagNumber_Lower = ""; + TagNumber_Upper = tagInfo.TagNumber;//tag + TagNumber_Lower = ""; //system } #endregion var layoutTagInfo = new layoutTagInfoBrief() diff --git a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.AppMagager/bin/Release/Learun.Cache.Base.dll b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.AppMagager/bin/Release/Learun.Cache.Base.dll index 4c9f7345..94bf2508 100644 Binary files a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.AppMagager/bin/Release/Learun.Cache.Base.dll and b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.AppMagager/bin/Release/Learun.Cache.Base.dll differ diff --git a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.AppMagager/bin/Release/Learun.Cache.Base.pdb b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.AppMagager/bin/Release/Learun.Cache.Base.pdb index c3bc65f3..f38ef8bf 100644 Binary files a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.AppMagager/bin/Release/Learun.Cache.Base.pdb and b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.AppMagager/bin/Release/Learun.Cache.Base.pdb differ 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/bin/Release/Learun.Cache.Base.dll b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/bin/Release/Learun.Cache.Base.dll index 4c9f7345..94bf2508 100644 Binary files a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/bin/Release/Learun.Cache.Base.dll and b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/bin/Release/Learun.Cache.Base.dll differ diff --git a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/bin/Release/Learun.Cache.Base.pdb b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/bin/Release/Learun.Cache.Base.pdb index c3bc65f3..f38ef8bf 100644 Binary files a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/bin/Release/Learun.Cache.Base.pdb and b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/bin/Release/Learun.Cache.Base.pdb 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/bin/Release/Learun.Cache.Base.dll b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Form/bin/Release/Learun.Cache.Base.dll index 4c9f7345..94bf2508 100644 Binary files a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Form/bin/Release/Learun.Cache.Base.dll and b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Form/bin/Release/Learun.Cache.Base.dll differ diff --git a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Form/bin/Release/Learun.Cache.Base.pdb b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Form/bin/Release/Learun.Cache.Base.pdb index c3bc65f3..f38ef8bf 100644 Binary files a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Form/bin/Release/Learun.Cache.Base.pdb and b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Form/bin/Release/Learun.Cache.Base.pdb 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/bin/Release/Learun.Cache.Base.dll b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.IM/bin/Release/Learun.Cache.Base.dll index 4c9f7345..94bf2508 100644 Binary files a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.IM/bin/Release/Learun.Cache.Base.dll and b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.IM/bin/Release/Learun.Cache.Base.dll differ diff --git a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.IM/bin/Release/Learun.Cache.Base.pdb b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.IM/bin/Release/Learun.Cache.Base.pdb index c3bc65f3..f38ef8bf 100644 Binary files a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.IM/bin/Release/Learun.Cache.Base.pdb and b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.IM/bin/Release/Learun.Cache.Base.pdb 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/bin/Release/Learun.Cache.Base.dll b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/bin/Release/Learun.Cache.Base.dll index 4c9f7345..94bf2508 100644 Binary files a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/bin/Release/Learun.Cache.Base.dll and b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/bin/Release/Learun.Cache.Base.dll differ diff --git a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/bin/Release/Learun.Cache.Base.pdb b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/bin/Release/Learun.Cache.Base.pdb index c3bc65f3..f38ef8bf 100644 Binary files a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/bin/Release/Learun.Cache.Base.pdb and b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/bin/Release/Learun.Cache.Base.pdb 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/bin/Release/Learun.Cache.Base.dll b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Message/bin/Release/Learun.Cache.Base.dll index 4c9f7345..94bf2508 100644 Binary files a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Message/bin/Release/Learun.Cache.Base.dll and b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Message/bin/Release/Learun.Cache.Base.dll differ diff --git a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Message/bin/Release/Learun.Cache.Base.pdb b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Message/bin/Release/Learun.Cache.Base.pdb index c3bc65f3..f38ef8bf 100644 Binary files a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Message/bin/Release/Learun.Cache.Base.pdb and b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Message/bin/Release/Learun.Cache.Base.pdb 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/bin/Release/Learun.Cache.Base.dll b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/bin/Release/Learun.Cache.Base.dll index 4c9f7345..94bf2508 100644 Binary files a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/bin/Release/Learun.Cache.Base.dll and b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/bin/Release/Learun.Cache.Base.dll differ diff --git a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/bin/Release/Learun.Cache.Base.pdb b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/bin/Release/Learun.Cache.Base.pdb index c3bc65f3..f38ef8bf 100644 Binary files a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/bin/Release/Learun.Cache.Base.pdb and b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/bin/Release/Learun.Cache.Base.pdb 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/bin/Release/Learun.Cache.Base.dll b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Report/bin/Release/Learun.Cache.Base.dll index 4c9f7345..94bf2508 100644 Binary files a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Report/bin/Release/Learun.Cache.Base.dll and b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Report/bin/Release/Learun.Cache.Base.dll differ diff --git a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Report/bin/Release/Learun.Cache.Base.pdb b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Report/bin/Release/Learun.Cache.Base.pdb index c3bc65f3..f38ef8bf 100644 Binary files a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Report/bin/Release/Learun.Cache.Base.pdb and b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Report/bin/Release/Learun.Cache.Base.pdb 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/bin/Release/Learun.Cache.Base.dll b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Scheduler/bin/Release/Learun.Cache.Base.dll index 4c9f7345..94bf2508 100644 Binary files a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Scheduler/bin/Release/Learun.Cache.Base.dll and b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Scheduler/bin/Release/Learun.Cache.Base.dll differ diff --git a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Scheduler/bin/Release/Learun.Cache.Base.pdb b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Scheduler/bin/Release/Learun.Cache.Base.pdb index c3bc65f3..f38ef8bf 100644 Binary files a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Scheduler/bin/Release/Learun.Cache.Base.pdb and b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Scheduler/bin/Release/Learun.Cache.Base.pdb 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_cable/ec_CableBLL.cs b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ZZDT_EC/ec_cable/ec_CableBLL.cs index 8a05f5be..46cc3663 100644 --- a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ZZDT_EC/ec_cable/ec_CableBLL.cs +++ b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ZZDT_EC/ec_cable/ec_CableBLL.cs @@ -254,19 +254,19 @@ namespace Learun.Application.TwoDevelopment.ZZDT_EC Where(x => panels.Select(xx => xx.EngineerDataID).Contains(x.EngineDataID)).ToList().ToDictionary(x => x.EngineDataID); var FromRels = new Dictionary();//key是cable,value是from设备的id var allpropOnFrom = new List(); + + var relTypeObj = SqlSugarHelper.Db.Queryable().AS(relTypeTable).ToList(). + FirstOrDefault(x => x.RelType == enum_RelType.设备_电缆); + + FromRels = SqlSugarHelper.Db.Queryable().AS(relTable). + Where(x => x.RelTypeID == relTypeObj.RelTypeID && preAssignedCables.Select(c => c.EngineerDataID).Contains(x.RelEngineData2ID)). + Distinct(). + ToList().ToDictionary(x => x.RelEngineData2ID, x => x.RelEngineData1ID); + + //设备上的属性 + //电缆在2,因为1.2.2里用于取的是from端的设备(设备在1,电缆在2) if (needProp) { - var relTypeObj = SqlSugarHelper.Db.Queryable().AS(relTypeTable).ToList(). - FirstOrDefault(x => x.RelType == enum_RelType.设备_电缆); - - FromRels = SqlSugarHelper.Db.Queryable().AS(relTable). - Where(x => x.RelTypeID == relTypeObj.RelTypeID && preAssignedCables.Select(c => c.EngineerDataID).Contains(x.RelEngineData2ID)). - Distinct(). - ToList().ToDictionary(x => x.RelEngineData2ID, x => x.RelEngineData1ID); - - //设备上的属性 - //电缆在2,因为1.2.2里用于取的是from端的设备(设备在1,电缆在2) - allpropOnFrom = SqlSugarHelper.Db.Queryable().AS(propTable). Where(x => FromRels.Values.Contains(x.EngineDataID)).ToList(); @@ -284,23 +284,29 @@ namespace Learun.Application.TwoDevelopment.ZZDT_EC cable.TagNumber = tags[cable.EngineerDataID]?.TagNumber; - var panelObj = panelDict[cable.PanelID]; - if (panelObj == null) + ec_PanelEntity panelObj; + if (panelDict.TryGetValue(cable.PanelID, out panelObj)) + { + + } + else { continue;//分配就已经不合理了 } - else if (panelObj != null) - { - panelObj.TagNumber = panelTags[panelObj.EngineerDataID]?.TagNumber; - //1.2.2 系统属性从电缆的from端上的设备中取设备的系统 - var panelId = FromRels[cable.EngineerDataID]; + panelObj.TagNumber = panelTags[panelObj.EngineerDataID]?.TagNumber; + + //1.2.2 系统属性从电缆的from端上的设备中取设备的系统 + var panelId = FromRels[cable.EngineerDataID]; + if (needProp) + { var panelProps = allPropOnFromDict[panelId]; cable.System = panelProps[GlobalObject.propName_System]?.PropertyValue; - - } + + + cable.ToPanel = panelObj;//暂用一下topanel属性,相当于电缆预分配的采集箱背后的Panel对象。 var IOsOnPanel = panelObj.allowedIOTypes.Split(',').ToList(); diff --git a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ZZDT_EC/ec_cable/ec_CableEntity.cs b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ZZDT_EC/ec_cable/ec_CableEntity.cs index 5e4bbd34..bea6c0f0 100644 --- a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ZZDT_EC/ec_cable/ec_CableEntity.cs +++ b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ZZDT_EC/ec_cable/ec_CableEntity.cs @@ -152,6 +152,7 @@ namespace Learun.Application.TwoDevelopment.ZZDT_EC [SugarColumn(IsIgnore = true)] public ec_PanelEntity ToPanel { set; get; } + #endregion } } diff --git a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ZZDT_EC/ec_cable/ec_CableSetEntity.cs b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ZZDT_EC/ec_cable/ec_CableSetEntity.cs index aed17d4f..a91e4334 100644 --- a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ZZDT_EC/ec_cable/ec_CableSetEntity.cs +++ b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ZZDT_EC/ec_cable/ec_CableSetEntity.cs @@ -160,6 +160,11 @@ namespace Learun.Application.TwoDevelopment.ZZDT_EC /// [SugarColumn(IsIgnore = true)] public bool DeleteFlg { set; get; } = false; + + #region 预分配后的结果 + public List AssignedTerms; + #endregion + #endregion public ec_CableSetEntity() diff --git a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/bin/Release/Learun.Cache.Base.dll b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/bin/Release/Learun.Cache.Base.dll index 4c9f7345..94bf2508 100644 Binary files a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/bin/Release/Learun.Cache.Base.dll and b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/bin/Release/Learun.Cache.Base.dll differ diff --git a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/bin/Release/Learun.Cache.Base.pdb b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/bin/Release/Learun.Cache.Base.pdb index c3bc65f3..f38ef8bf 100644 Binary files a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/bin/Release/Learun.Cache.Base.pdb and b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/bin/Release/Learun.Cache.Base.pdb differ diff --git a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WeChat/bin/Release/Learun.Cache.Base.dll b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WeChat/bin/Release/Learun.Cache.Base.dll index 4c9f7345..94bf2508 100644 Binary files a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WeChat/bin/Release/Learun.Cache.Base.dll and b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WeChat/bin/Release/Learun.Cache.Base.dll differ diff --git a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WeChat/bin/Release/Learun.Cache.Base.pdb b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WeChat/bin/Release/Learun.Cache.Base.pdb index c3bc65f3..f38ef8bf 100644 Binary files a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WeChat/bin/Release/Learun.Cache.Base.pdb and b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WeChat/bin/Release/Learun.Cache.Base.pdb differ 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 e67f1c24..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/bin/Release/Learun.Cache.Base.dll b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/bin/Release/Learun.Cache.Base.dll index 4c9f7345..94bf2508 100644 Binary files a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/bin/Release/Learun.Cache.Base.dll and b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/bin/Release/Learun.Cache.Base.dll differ diff --git a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/bin/Release/Learun.Cache.Base.pdb b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/bin/Release/Learun.Cache.Base.pdb index c3bc65f3..f38ef8bf 100644 Binary files a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/bin/Release/Learun.Cache.Base.pdb and b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/bin/Release/Learun.Cache.Base.pdb 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/bin/Release/Learun.Cache.Base.dll b/Learun.Framework.Module/Learun.Cache/LeaRun.Cache.Factory/bin/Release/Learun.Cache.Base.dll index 4c9f7345..94bf2508 100644 Binary files a/Learun.Framework.Module/Learun.Cache/LeaRun.Cache.Factory/bin/Release/Learun.Cache.Base.dll and b/Learun.Framework.Module/Learun.Cache/LeaRun.Cache.Factory/bin/Release/Learun.Cache.Base.dll differ diff --git a/Learun.Framework.Module/Learun.Cache/LeaRun.Cache.Factory/bin/Release/Learun.Cache.Base.pdb b/Learun.Framework.Module/Learun.Cache/LeaRun.Cache.Factory/bin/Release/Learun.Cache.Base.pdb index c3bc65f3..f38ef8bf 100644 Binary files a/Learun.Framework.Module/Learun.Cache/LeaRun.Cache.Factory/bin/Release/Learun.Cache.Base.pdb and b/Learun.Framework.Module/Learun.Cache/LeaRun.Cache.Factory/bin/Release/Learun.Cache.Base.pdb 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/bin/Release/Learun.Cache.Base.dll b/Learun.Framework.Module/Learun.Cache/Learun.Cache.Base/bin/Release/Learun.Cache.Base.dll index 4c9f7345..94bf2508 100644 Binary files a/Learun.Framework.Module/Learun.Cache/Learun.Cache.Base/bin/Release/Learun.Cache.Base.dll and b/Learun.Framework.Module/Learun.Cache/Learun.Cache.Base/bin/Release/Learun.Cache.Base.dll differ diff --git a/Learun.Framework.Module/Learun.Cache/Learun.Cache.Base/bin/Release/Learun.Cache.Base.pdb b/Learun.Framework.Module/Learun.Cache/Learun.Cache.Base/bin/Release/Learun.Cache.Base.pdb index c3bc65f3..f38ef8bf 100644 Binary files a/Learun.Framework.Module/Learun.Cache/Learun.Cache.Base/bin/Release/Learun.Cache.Base.pdb and b/Learun.Framework.Module/Learun.Cache/Learun.Cache.Base/bin/Release/Learun.Cache.Base.pdb 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.Base/obj/Release/Learun.Cache.Base.csproj.FileListAbsolute.txt b/Learun.Framework.Module/Learun.Cache/Learun.Cache.Base/obj/Release/Learun.Cache.Base.csproj.FileListAbsolute.txt index f00916dd..3dc8d743 100644 --- a/Learun.Framework.Module/Learun.Cache/Learun.Cache.Base/obj/Release/Learun.Cache.Base.csproj.FileListAbsolute.txt +++ b/Learun.Framework.Module/Learun.Cache/Learun.Cache.Base/obj/Release/Learun.Cache.Base.csproj.FileListAbsolute.txt @@ -4,3 +4,9 @@ C:\repo\CODE\009\Server\Learun.Framework.Module\Learun.Cache\Learun.Cache.Base\o C:\repo\CODE\009\Server\Learun.Framework.Module\Learun.Cache\Learun.Cache.Base\obj\Release\Learun.Cache.Base.csproj.CoreCompileInputs.cache C:\repo\CODE\009\Server\Learun.Framework.Module\Learun.Cache\Learun.Cache.Base\obj\Release\Learun.Cache.Base.dll C:\repo\CODE\009\Server\Learun.Framework.Module\Learun.Cache\Learun.Cache.Base\obj\Release\Learun.Cache.Base.pdb +C:\repo\CODE\009_DI-Elec\Learun.Framework.Module\Learun.Cache\Learun.Cache.Base\bin\Release\Learun.Cache.Base.dll +C:\repo\CODE\009_DI-Elec\Learun.Framework.Module\Learun.Cache\Learun.Cache.Base\bin\Release\Learun.Cache.Base.pdb +C:\repo\CODE\009_DI-Elec\Learun.Framework.Module\Learun.Cache\Learun.Cache.Base\obj\Release\Learun.Cache.Base.csproj.AssemblyReference.cache +C:\repo\CODE\009_DI-Elec\Learun.Framework.Module\Learun.Cache\Learun.Cache.Base\obj\Release\Learun.Cache.Base.csproj.CoreCompileInputs.cache +C:\repo\CODE\009_DI-Elec\Learun.Framework.Module\Learun.Cache\Learun.Cache.Base\obj\Release\Learun.Cache.Base.dll +C:\repo\CODE\009_DI-Elec\Learun.Framework.Module\Learun.Cache\Learun.Cache.Base\obj\Release\Learun.Cache.Base.pdb diff --git a/Learun.Framework.Module/Learun.Cache/Learun.Cache.Base/obj/Release/Learun.Cache.Base.dll b/Learun.Framework.Module/Learun.Cache/Learun.Cache.Base/obj/Release/Learun.Cache.Base.dll index 4c9f7345..94bf2508 100644 Binary files a/Learun.Framework.Module/Learun.Cache/Learun.Cache.Base/obj/Release/Learun.Cache.Base.dll and b/Learun.Framework.Module/Learun.Cache/Learun.Cache.Base/obj/Release/Learun.Cache.Base.dll differ diff --git a/Learun.Framework.Module/Learun.Cache/Learun.Cache.Base/obj/Release/Learun.Cache.Base.pdb b/Learun.Framework.Module/Learun.Cache/Learun.Cache.Base/obj/Release/Learun.Cache.Base.pdb index c3bc65f3..f38ef8bf 100644 Binary files a/Learun.Framework.Module/Learun.Cache/Learun.Cache.Base/obj/Release/Learun.Cache.Base.pdb and b/Learun.Framework.Module/Learun.Cache/Learun.Cache.Base/obj/Release/Learun.Cache.Base.pdb differ diff --git a/Learun.Framework.Module/Learun.Cache/Learun.Cache.Redis/bin/Release/Learun.Cache.Base.dll b/Learun.Framework.Module/Learun.Cache/Learun.Cache.Redis/bin/Release/Learun.Cache.Base.dll index 4c9f7345..94bf2508 100644 Binary files a/Learun.Framework.Module/Learun.Cache/Learun.Cache.Redis/bin/Release/Learun.Cache.Base.dll and b/Learun.Framework.Module/Learun.Cache/Learun.Cache.Redis/bin/Release/Learun.Cache.Base.dll differ diff --git a/Learun.Framework.Module/Learun.Cache/Learun.Cache.Redis/bin/Release/Learun.Cache.Base.pdb b/Learun.Framework.Module/Learun.Cache/Learun.Cache.Redis/bin/Release/Learun.Cache.Base.pdb index c3bc65f3..f38ef8bf 100644 Binary files a/Learun.Framework.Module/Learun.Cache/Learun.Cache.Redis/bin/Release/Learun.Cache.Base.pdb and b/Learun.Framework.Module/Learun.Cache/Learun.Cache.Redis/bin/Release/Learun.Cache.Base.pdb 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 c3986afc..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.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 8e1769fc..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.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 d4b9e141..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.Repository/bin/Release/Learun.Cache.Base.dll b/Learun.Framework.Module/Learun.Db/Learun.DataBase.Repository/bin/Release/Learun.Cache.Base.dll index 4c9f7345..94bf2508 100644 Binary files a/Learun.Framework.Module/Learun.Db/Learun.DataBase.Repository/bin/Release/Learun.Cache.Base.dll and b/Learun.Framework.Module/Learun.Db/Learun.DataBase.Repository/bin/Release/Learun.Cache.Base.dll differ diff --git a/Learun.Framework.Module/Learun.Db/Learun.DataBase.Repository/bin/Release/Learun.Cache.Base.pdb b/Learun.Framework.Module/Learun.Db/Learun.DataBase.Repository/bin/Release/Learun.Cache.Base.pdb index c3bc65f3..f38ef8bf 100644 Binary files a/Learun.Framework.Module/Learun.Db/Learun.DataBase.Repository/bin/Release/Learun.Cache.Base.pdb and b/Learun.Framework.Module/Learun.Db/Learun.DataBase.Repository/bin/Release/Learun.Cache.Base.pdb differ 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/bin/Release/Learun.Cache.Base.dll b/Learun.Framework.Module/Learun.Db/Learun.DataBase/bin/Release/Learun.Cache.Base.dll index 4c9f7345..94bf2508 100644 Binary files a/Learun.Framework.Module/Learun.Db/Learun.DataBase/bin/Release/Learun.Cache.Base.dll and b/Learun.Framework.Module/Learun.Db/Learun.DataBase/bin/Release/Learun.Cache.Base.dll differ diff --git a/Learun.Framework.Module/Learun.Db/Learun.DataBase/bin/Release/Learun.Cache.Base.pdb b/Learun.Framework.Module/Learun.Db/Learun.DataBase/bin/Release/Learun.Cache.Base.pdb index c3bc65f3..f38ef8bf 100644 Binary files a/Learun.Framework.Module/Learun.Db/Learun.DataBase/bin/Release/Learun.Cache.Base.pdb and b/Learun.Framework.Module/Learun.Db/Learun.DataBase/bin/Release/Learun.Cache.Base.pdb 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/bin/Release/Learun.Cache.Base.dll b/Learun.Framework.Module/Learun.Util/Learun.Util.Operat/bin/Release/Learun.Cache.Base.dll index 4c9f7345..94bf2508 100644 Binary files a/Learun.Framework.Module/Learun.Util/Learun.Util.Operat/bin/Release/Learun.Cache.Base.dll and b/Learun.Framework.Module/Learun.Util/Learun.Util.Operat/bin/Release/Learun.Cache.Base.dll differ diff --git a/Learun.Framework.Module/Learun.Util/Learun.Util.Operat/bin/Release/Learun.Cache.Base.pdb b/Learun.Framework.Module/Learun.Util/Learun.Util.Operat/bin/Release/Learun.Cache.Base.pdb index c3bc65f3..f38ef8bf 100644 Binary files a/Learun.Framework.Module/Learun.Util/Learun.Util.Operat/bin/Release/Learun.Cache.Base.pdb and b/Learun.Framework.Module/Learun.Util/Learun.Util.Operat/bin/Release/Learun.Cache.Base.pdb 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.Util/Learun.Util/bin/Release/Learun.Cache.Base.dll b/Learun.Framework.Module/Learun.Util/Learun.Util/bin/Release/Learun.Cache.Base.dll index 4c9f7345..94bf2508 100644 Binary files a/Learun.Framework.Module/Learun.Util/Learun.Util/bin/Release/Learun.Cache.Base.dll and b/Learun.Framework.Module/Learun.Util/Learun.Util/bin/Release/Learun.Cache.Base.dll differ diff --git a/Learun.Framework.Module/Learun.Util/Learun.Util/bin/Release/Learun.Cache.Base.pdb b/Learun.Framework.Module/Learun.Util/Learun.Util/bin/Release/Learun.Cache.Base.pdb index c3bc65f3..f38ef8bf 100644 Binary files a/Learun.Framework.Module/Learun.Util/Learun.Util/bin/Release/Learun.Cache.Base.pdb and b/Learun.Framework.Module/Learun.Util/Learun.Util/bin/Release/Learun.Cache.Base.pdb differ diff --git a/Learun.Framework.Module/Learun.Workflow/Learun.Workflow.Engine/bin/Release/Learun.Cache.Base.dll b/Learun.Framework.Module/Learun.Workflow/Learun.Workflow.Engine/bin/Release/Learun.Cache.Base.dll index 4c9f7345..94bf2508 100644 Binary files a/Learun.Framework.Module/Learun.Workflow/Learun.Workflow.Engine/bin/Release/Learun.Cache.Base.dll and b/Learun.Framework.Module/Learun.Workflow/Learun.Workflow.Engine/bin/Release/Learun.Cache.Base.dll differ diff --git a/Learun.Framework.Module/Learun.Workflow/Learun.Workflow.Engine/bin/Release/Learun.Cache.Base.pdb b/Learun.Framework.Module/Learun.Workflow/Learun.Workflow.Engine/bin/Release/Learun.Cache.Base.pdb index c3bc65f3..f38ef8bf 100644 Binary files a/Learun.Framework.Module/Learun.Workflow/Learun.Workflow.Engine/bin/Release/Learun.Cache.Base.pdb and b/Learun.Framework.Module/Learun.Workflow/Learun.Workflow.Engine/bin/Release/Learun.Cache.Base.pdb 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/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#前端/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; + if (ResHttp.code == 200) + { + isShowDialog = true; + } + else + { + if (AcceptNearbyPanel) + { + result = System.Windows.MessageBox.Show($"{ResHttp.info}", "KunHengCAD", MessageBoxButton.YesNo, MessageBoxImage.Question); + if (result == MessageBoxResult.Yes) + { + return; + } + else + { + isShowDialog = true; + + } + } + else + { + var info = ResHttp.info; + // 找到第一个句号的位置 + int firstPeriodIndex = info.IndexOf('。'); + if (firstPeriodIndex >= 0) + { + // 从第一个句号后开始找第二个句号 + int secondPeriodIndex = info.IndexOf('。', firstPeriodIndex + 1); + if (secondPeriodIndex >= 0) + { + // 截取到第二个句号(包括句号) + info = info.Substring(0, secondPeriodIndex + 1); + } + } + System.Windows.MessageBox.Show($"{info}", "KunHengCAD", MessageBoxButton.OK, MessageBoxImage.Warning); return; + } + } + if (isShowDialog) + { + //打开窗体 + 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 (RES.Result == ButtonResult.Yes) + { + + } + else if (RES.Result == ButtonResult.No) + { } + }); + } + + } + else + { + System.Windows.MessageBox.Show("未勾选预分配电缆", "KunHengCAD", MessageBoxButton.OK, MessageBoxImage.Warning); return; + } + //返回的结果 - IDialogParameters res = new Prism.Services.Dialogs.DialogParameters(); + //IDialogParameters res = new Prism.Services.Dialogs.DialogParameters(); //res.Add(GlobalObject.dialogPar.para1.ToString(), SelectedStripParametersInfo); - RequestClose.Invoke(new DialogResult(ButtonResult.Yes, res)); + //RequestClose.Invoke(new DialogResult(ButtonResult.Yes, res)); } public override void ExecuteCloseCommand(object parameter) { @@ -119,7 +192,7 @@ namespace SWS.CAD.ViewModels } return; } - if(parameter.ToString().Equals("清空")) + if (parameter.ToString().Equals("清空")) { foreach (var item in PreAssignCables) { @@ -133,9 +206,18 @@ namespace SWS.CAD.ViewModels #endregion } - public class PreAssignCable: DialogBase + public class PreAssignCable : DialogBase { #region 页面渲染字段 + private string _CableId; + + public string CableId + { + get { return _CableId; } + set { _CableId = value; } + } + + private int _Index; /// /// 序号 @@ -152,7 +234,9 @@ namespace SWS.CAD.ViewModels public bool IsChecked { get { return _IsChecked; } - set { _IsChecked = value; + set + { + _IsChecked = value; RaisePropertyChanged(nameof(IsChecked)); } } @@ -196,14 +280,15 @@ namespace SWS.CAD.ViewModels public PreAssignCable() { - + } public PreAssignCable(ec_Cable ec_Cable) { + CableId = ec_Cable.CableID; TagNumber = ec_Cable.TagNumber; PreAssignIOType = ec_Cable.PreAssignIOType; - CableClass =ec_Cable.CableClass.Equals("homerun") ? "是":"否"; - ToPanel_TagNumber = ec_Cable.ToPanel!=null?ec_Cable.ToPanel.TagNumber:null; + CableClass = ec_Cable.CableClass.Equals("homerun") ? "是" : "否"; + ToPanel_TagNumber = ec_Cable.ToPanel != null ? ec_Cable.ToPanel.TagNumber : null; } #endregion diff --git a/newFront/c#前端/SWS.CAD/ViewModels/DialogIODistributionVM/DialogCablePreAssignResultViewModel.cs b/newFront/c#前端/SWS.CAD/ViewModels/DialogIODistributionVM/DialogCablePreAssignResultViewModel.cs index 30c3fab7..a7b1498b 100644 --- a/newFront/c#前端/SWS.CAD/ViewModels/DialogIODistributionVM/DialogCablePreAssignResultViewModel.cs +++ b/newFront/c#前端/SWS.CAD/ViewModels/DialogIODistributionVM/DialogCablePreAssignResultViewModel.cs @@ -7,17 +7,51 @@ using Telerik.Windows.Controls; using Prism.Services.Dialogs; using SWS.Commons; using SWS.Model; +using SWS.Service; +using Unity; +using System.Linq; +using Telerik.Windows.Controls.MaskedInput.Tokens.Numeric; namespace SWS.CAD.ViewModels { public class DialogCablePreAssignResultViewModel : DialogBase, IDialogAware { #region 字段 - private ObservableCollection _PreAssignCables = new ObservableCollection(); + private ObservableCollection _PreAllocationResultls = new ObservableCollection(); /// - /// 端子排参数信息列表 + /// 预分配结果表格源 /// - public ObservableCollection PreAssignCables + public ObservableCollection PreAllocationResultls + { + get { return _PreAllocationResultls; } + set + { + _PreAllocationResultls = value; + RaisePropertyChanged(nameof(PreAllocationResultls)); + } + } + + + private string _SuccessOrFailure = "分配成功"; + /// + /// 选择成功还是选择失败 + /// + public string SuccessOrFailure + { + get { return _SuccessOrFailure; } + set + { + _SuccessOrFailure = value; + RaisePropertyChanged(nameof(SuccessOrFailure)); + UpdataPreAssignCables(); + } + } + + private ObservableCollection _PreAssignCables = new ObservableCollection(); + /// + /// 左侧预分配电缆列表 + /// + public ObservableCollection PreAssignCables { get { return _PreAssignCables; } set @@ -27,90 +61,28 @@ namespace SWS.CAD.ViewModels } } - private StripParametersInfo _SelectedStripParametersInfo; + private ec_Cable _SelectedPreAssignCable; /// - /// 当前选中的信号类型 + /// 选择的预分配电缆 /// - public StripParametersInfo SelectedStripParametersInfo + public ec_Cable SelectedPreAssignCable { - get { return _SelectedStripParametersInfo; } + get { return _SelectedPreAssignCable; } set { - _SelectedStripParametersInfo = value; - RaisePropertyChanged(nameof(SelectedStripParametersInfo)); - } - } - private bool _IsReadOnly; - /// - /// 是否可编辑 - /// - public bool IsReadOnly - { - get { return _IsReadOnly; } - set - { - _IsReadOnly = value; - RaisePropertyChanged(nameof(IsReadOnly)); - } - } - - #region 表格下拉列表 - private List _TermNamingType_ls = new List() { "数字", "字母" }; - /// - /// 端子编号类型 - /// - public List TermNamingType_ls - { - get { return _TermNamingType_ls; } - set - { - _TermNamingType_ls = value; - RaisePropertyChanged(nameof(TermNamingType_ls)); - } - } - private List _TermNamingRule_ls = new List() { "按端子排全局编号", "按通道内端子编号", "按通道编号" }; - /// - /// 端子编号规则 - /// - public List TermNamingRule_ls - { - get { return _TermNamingRule_ls; } - set - { - _TermNamingRule_ls = value; - RaisePropertyChanged(nameof(TermNamingRule_ls)); - } - } - private List _TermNamePrefix_ls = new List() { "通道编号", "+,-,s", "无" }; - /// - /// 端子前缀 - /// - public List TermNamePrefix_ls - { - get { return _TermNamePrefix_ls; } - set - { - _TermNamePrefix_ls = value; - RaisePropertyChanged(nameof(TermNamePrefix_ls)); - } - } - private List _TermNameSuffix_ls = new List() { "通道编号", "+,-,s", "无" }; - /// - /// 端子后缀 - /// - public List TermNameSuffix_ls - { - get { return _TermNameSuffix_ls; } - set - { - _TermNameSuffix_ls = value; - RaisePropertyChanged(nameof(TermNameSuffix_ls)); + _SelectedPreAssignCable = value; + RaisePropertyChanged(nameof(SelectedPreAssignCable)); + UpdataPreAllocationResultls(_SelectedPreAssignCable); } } - #endregion #endregion + IOModuleService _iOModuleService; + public DialogCablePreAssignResultViewModel() + { + _iOModuleService = GlobalObject.container.Resolve(); + } public string Title => ""; public event Action RequestClose; @@ -124,18 +96,31 @@ namespace SWS.CAD.ViewModels } - private List CablePreAssigns; + //全部预分配电缆 + private List AllPreAssignCables; public async void OnDialogOpened(IDialogParameters parameters) { //title = parameters.GetValue(GlobalObject.dialogPar.title.ToString()); title = "信号预分配结果"; - _PreAssignCables = parameters.GetValue>(GlobalObject.dialogPar.para1.ToString()); - _IsReadOnly = parameters.GetValue(GlobalObject.dialogPar.para2.ToString()); + AllPreAssignCables = await _iOModuleService.AutoAssignCable2channel_step2(); + UpdataPreAssignCables(); } - public override void ExecuteOKCommandAsync(object para) + public override async void ExecuteOKCommandAsync(object para) { - + var Cables = new List(); + if (AllPreAssignCables != null) + { + foreach (var PreAssignCable in AllPreAssignCables) + { + if (PreAssignCable.Sets != null && !string.IsNullOrEmpty(PreAssignCable.Sets.FirstOrDefault().ConnectionInfo)) + { + Cables.Add(PreAssignCable); + } + } + } + + var resHttp = await _iOModuleService.AutoAssignCable2channel_step3(Cables); //返回结果 IDialogParameters res = new Prism.Services.Dialogs.DialogParameters(); //res.Add(GlobalObject.dialogPar.para1.ToString(), SelectedStripParametersInfo); @@ -156,6 +141,61 @@ namespace SWS.CAD.ViewModels } #region 方法 + /// + /// 修改预分配电缆列表,成功或者失败的电缆列表 + /// + public void UpdataPreAssignCables() + { + PreAssignCables = new ObservableCollection(); + if (AllPreAssignCables != null) + { + if (SuccessOrFailure.Equals("分配成功")) + { + foreach (var PreAssignCable in AllPreAssignCables) + { + if (PreAssignCable.Sets != null && !string.IsNullOrEmpty(PreAssignCable.Sets.FirstOrDefault().ConnectionInfo)) + { + PreAssignCables.Add(PreAssignCable); + } + } + } + else + { + foreach (var PreAssignCable in AllPreAssignCables) + { + if (PreAssignCable.Sets == null || string.IsNullOrEmpty(PreAssignCable.Sets.FirstOrDefault().ConnectionInfo)) + { + PreAssignCables.Add(PreAssignCable); + } + } + } + } + } + /// + /// 修改表格显示数据 + /// + public void UpdataPreAllocationResultls(ec_Cable cable) + { + + PreAllocationResultls = new ObservableCollection(); + if (cable == null) return; + if (cable.Sets != null) + { + foreach (var Set in cable.Sets) + { + PreAllocationResult preAllocationResult = new PreAllocationResult(); + preAllocationResult.CablePair = Set.CableSetName; + preAllocationResult.IOType = cable.PreAssignIOType; + preAllocationResult.ToPanel_TagNumber = cable.ToPanel == null ? "" : cable.ToPanel.TagNumber; + preAllocationResult.Panel_TagNumber = string.IsNullOrEmpty(Set.ConnectionInfo) ? "" : Set.ConnectionInfo.Split('/')[0].Split(':')[1].Trim(); + preAllocationResult.StripName = string.IsNullOrEmpty(Set.ConnectionInfo) ? "" : Set.ConnectionInfo.Split('/')[1].Split(':')[1].Trim(); + preAllocationResult.Terms = new ObservableCollection(Set.AssignedTerms); + PreAllocationResultls.Add(preAllocationResult); + } + } + + } + public ICommand EditEndCmd => new DelegateCommand(EditEnd); /// /// 编辑结束事件 @@ -168,7 +208,73 @@ namespace SWS.CAD.ViewModels } #endregion } + /// + /// 预分配结果类 + /// + public class PreAllocationResult : DialogBase + { + private string _CablePair; + /// + /// 电缆对 + /// + public string CablePair + { + get { return _CablePair; } + set { _CablePair = value; } + } + + private string _IOType; + /// + /// IO类型 + /// + public string IOType + { + get { return _IOType; } + set { _IOType = value; } + } + private string _ToPanel_TagNumber; + /// + /// 预分配的系统柜 + /// + public string ToPanel_TagNumber + { + get { return _ToPanel_TagNumber; } + set { _ToPanel_TagNumber = value; } + } + + private string _Panel_TagNumber; + /// + /// 实际分配的系统柜 + /// + public string Panel_TagNumber + { + get { return _Panel_TagNumber; } + set { _Panel_TagNumber = value; } + } + + private string _StripName; + /// + /// 实际分配的端子排 + /// + public string StripName + { + get { return _StripName; } + set { _StripName = value; } + } + + private ObservableCollection _Terms; + /// + /// 实际端子 + /// + public ObservableCollection Terms + { + get { return _Terms; } + set { _Terms = value; } + } + + + } } diff --git a/newFront/c#前端/SWS.CAD/ViewModels/DialogIODistributionVM/DialogIODistributionViewModel.cs b/newFront/c#前端/SWS.CAD/ViewModels/DialogIODistributionVM/DialogIODistributionViewModel.cs index fe8399c7..f0f93dd9 100644 --- a/newFront/c#前端/SWS.CAD/ViewModels/DialogIODistributionVM/DialogIODistributionViewModel.cs +++ b/newFront/c#前端/SWS.CAD/ViewModels/DialogIODistributionVM/DialogIODistributionViewModel.cs @@ -2706,12 +2706,17 @@ namespace SWS.CAD.ViewModels //获取到所有预分配的电缆并设置到页面渲染对象中 IsBusy = true; List CablePreAssigns = await _iOModuleService.GetCablePreAssignPreview(); + if (CablePreAssigns==null) + { + CablePreAssigns = new List(); + } var PreAssignCables = new ObservableCollection(); int index = 0; + foreach (var CablePreAssign in CablePreAssigns) { index++; - PreAssignCables.Add(new PreAssignCable(CablePreAssign) { Index = index }); + PreAssignCables.Add(new PreAssignCable(CablePreAssign) { Index = index ,IsChecked=true}); } IsBusy = false; //打开窗体 diff --git a/newFront/c#前端/SWS.CAD/Views/Dialog/DialogIODistributions/DialogCablePreAssignResult.xaml b/newFront/c#前端/SWS.CAD/Views/Dialog/DialogIODistributions/DialogCablePreAssignResult.xaml index 4e5e9a04..27116793 100644 --- a/newFront/c#前端/SWS.CAD/Views/Dialog/DialogIODistributions/DialogCablePreAssignResult.xaml +++ b/newFront/c#前端/SWS.CAD/Views/Dialog/DialogIODistributions/DialogCablePreAssignResult.xaml @@ -6,6 +6,7 @@ xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" xmlns:i="http://schemas.microsoft.com/xaml/behaviors" xmlns:local="clr-namespace:SWS.CAD.Views.CustomControl" + xmlns:cvt="clr-namespace:SWS.Commons.Helper.Converter;assembly=SWS.Commons" mc:Ignorable="d" d:DesignHeight="450" d:DesignWidth="800"> @@ -13,6 +14,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -23,22 +59,55 @@ - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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/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 AutoAssignCable2channel_step1(List CableIds ,bool AcceptNearbyPanel) + { + var res = await this.PostBodyAsync>($"IOModuleApi/AutoAssignCable2Channel_step1?projId={GlobalObject.curProject?.ProjectId}&AcceptNearbyPanel={AcceptNearbyPanel}", CableIds); + //if (res.code == 200) + //{ + // return res.data; + //} + //else + //{ + //} + return res; + } + + public async Task> AutoAssignCable2channel_step2() + { + var res = await this.PostBodyAsync, object>($"IOModuleApi/AutoAssignCable2Channel_step2?projId={GlobalObject.curProject?.ProjectId}", null); + if (res.code == 200) + { + return res.data; + } + else + { + } + return null; + } + + public async Task> AutoAssignCable2channel_step3(List CableIds) + { + var res = await this.PostBodyAsync, object>($"IOModuleApi/AutoAssignCable2Channel_step3?projId={GlobalObject.curProject?.ProjectId}", CableIds); + if (res.code == 200) + { + return res.data; + } + else + { + } + return null; + } + + /// /// SaveConnections 专用 /// @@ -341,5 +381,7 @@ namespace SWS.Service public string ID { get; set; } public List Conns { get; set; } } + + } }