布置图绘制,取消区域限制,所属系统支持多选

This commit is contained in:
xingheng 2025-09-16 10:42:51 +08:00
parent e25921906e
commit 39f8761416
6 changed files with 26 additions and 14 deletions

View File

@ -124,9 +124,23 @@ namespace Learun.Application.Web.AppApi
}
//这里要考虑下拉列表 带 ||的问题
var matchedTagIds = propAll.Where(x => x.PropertyName == keyProp
&& (x.PropertyValue == keyValue || x.PropertyValue.StartsWith(keyValue + GlobalObject.enum_separator))).
Select(X => X.EngineDataID).Distinct().ToList();
List<string> matchedTagIds = new List<string>();
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();
}
//有效范围的设备
var matchedTags = SqlSugarHelper.Db.Queryable<ec_enginedataEntity>().AS(tagTbName).
@ -143,9 +157,9 @@ namespace Learun.Application.Web.AppApi
#region
//甲板 区域都和基点一致的设备
var DeckMatchedTagIds = EquipPropAll.Where(x => x.PropertyName == "甲板号" && x.PropertyValue == basePoint.deck).Select(X => X.EngineDataID).ToList();
var AreaMatchedTagIds = EquipPropAll.Where(x => x.PropertyName == "区域" && x.PropertyValue == basePoint.area).Select(X => X.EngineDataID).ToList();
var matchPointTagIds = DeckMatchedTagIds.Intersect(AreaMatchedTagIds).ToList();
//var AreaMatchedTagIds = EquipPropAll.Where(x => x.PropertyName == "区域" && x.PropertyValue == basePoint.area).Select(X => X.EngineDataID).ToList();
//#task 9542
var matchPointTagIds = DeckMatchedTagIds;//.Intersect(AreaMatchedTagIds).ToList();
foreach (var matchPointTagId in matchPointTagIds)
{

View File

@ -1838,6 +1838,7 @@ namespace Learun.Application.TwoDevelopment.ZZDT_EC
}
}
//更新电缆属性里的 起始设备 和 终止设备
//不需要 查询时会自动处理
}
}
}

View File

@ -8,6 +8,7 @@ using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Controls.Primitives;
using static Learun.Application.TwoDevelopment.ZZDT_EC.GlobalEnum;
using DbType = System.Data.DbType;
namespace Learun.Application.TwoDevelopment.ZZDT_EC

View File

@ -198,7 +198,7 @@ namespace Learun.Application.TwoDevelopment.ZZDT_EC
//DELETE
var tagsExisted = ec_EnginedataService.GetListBySQL("", ProjectId).Where(TAG => DateTime.Compare((DateTime)TAG.CreateTime, (DateTime)Drawing.CheckOutTime) < 0).OrderBy(x => x.ObjectTypeName);
//图纸上所有的pixel记录
var pixelsExisted = new ec_enginedata_pixelService().GetList("{\"ProjectId\":\"" + ProjectId + "\",\"DrawingFileID\":\"" + DrawingID + "\"}").ToList();
var pixelsExisted = new ec_enginedata_pixelService().GetList("{\"ProjectId\":\"" + ProjectId + "\",\"DrawingFileID\":\"" + DrawingID + "\"}",ProjectId).ToList();
// 创建时间 早于 检出时间
foreach (var TAG in tagsExisted)

View File

@ -10,6 +10,7 @@ using System.IO;
using System.Linq;
using System.Web.Caching;
using System.Windows.Input;
using static Learun.Application.TwoDevelopment.ZZDT_EC.GlobalEnum;
using static Learun.Application.TwoDevelopment.ZZDT_EC.ProjectSugar;
using static Learun.Util.SqlSugar.SqlSugarHelper;

View File

@ -2,6 +2,7 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using static Learun.Application.TwoDevelopment.ZZDT_EC.GlobalEnum;
namespace Learun.Application.TwoDevelopment.ZZDT_EC
{
/// <summary>
@ -181,12 +182,6 @@ namespace Learun.Application.TwoDevelopment.ZZDT_EC
#endregion
}
public enum specialType
{
= 0,
= 1,
= 2,
= 3,
}
}