Merge branch 'main' of http://27.154.35.18:7053/yuxingheng/009_DI-Elec
This commit is contained in:
commit
b84f7d9d0f
@ -61,6 +61,12 @@ namespace Learun.Application.Web.AppApi
|
|||||||
{
|
{
|
||||||
return Fail("项目数据字典中,没有找到【肋位号】的下拉项中。");// 或者 无法从数据字典中找到对应的那个下拉
|
return Fail("项目数据字典中,没有找到【肋位号】的下拉项中。");// 或者 无法从数据字典中找到对应的那个下拉
|
||||||
}
|
}
|
||||||
|
ec_dataitemBLL ec_DataitemBLL = new ec_dataitemBLL();
|
||||||
|
var roomLists = ec_DataitemBLL.GetDetailList("RoomNo", "", ProjectId, false);
|
||||||
|
if (roomLists == null)
|
||||||
|
{
|
||||||
|
return Fail("项目数据字典中,没有找到【房间号】的下拉项中。");// 或者 无法从数据字典中找到对应的那个下拉
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@ -85,10 +91,17 @@ namespace Learun.Application.Web.AppApi
|
|||||||
{
|
{
|
||||||
Prop_Frame = Prop_Frame.Split(new string[] { GlobalObject.enum_separator }, StringSplitOptions.None)[0];//插件端对于下拉列表 都是 name || nameEN
|
Prop_Frame = Prop_Frame.Split(new string[] { GlobalObject.enum_separator }, StringSplitOptions.None)[0];//插件端对于下拉列表 都是 name || nameEN
|
||||||
|
|
||||||
|
}
|
||||||
|
var Prop_Room = tagProps.FirstOrDefault(x => x.PropertyName == GlobalObject.propName_Room)?.PropertyValue;
|
||||||
|
if (Prop_Room != null)
|
||||||
|
{
|
||||||
|
Prop_Room = Prop_Room.Split(new string[] { GlobalObject.enum_separator }, StringSplitOptions.None)[0];//插件端对于下拉列表 都是 name || nameEN
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var matchedFrame = frameLists.FirstOrDefault(X => X.Num == Prop_Frame);
|
var matchedFrame = frameLists.FirstOrDefault(X => X.Num == Prop_Frame);
|
||||||
if (matchedFrame == null)
|
var matchedRoom = roomLists.FirstOrDefault(X => X.DataItemName == Prop_Room);
|
||||||
|
if (matchedFrame == null && matchedRoom == null)
|
||||||
{
|
{
|
||||||
//没有
|
//没有
|
||||||
//无效的基点
|
//无效的基点
|
||||||
@ -104,12 +117,22 @@ namespace Learun.Application.Web.AppApi
|
|||||||
res.Add(layoutTagInvalid);
|
res.Add(layoutTagInvalid);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
var xValue = frameLists.FirstOrDefault(X => X.Num == Prop_Frame).Value;
|
double xValue = 0 ;
|
||||||
if (xValue < 400)
|
if (matchedFrame != null)
|
||||||
{
|
{
|
||||||
// 小于400,我几乎可以认为此时肋位号用的是m这个单位。因为如果用的是mm,400mm的肋位号似乎也太小了。
|
xValue = frameLists.FirstOrDefault(X => X.Num == Prop_Frame).Value;
|
||||||
xValue = 1000 * xValue; // 转成mm
|
if (xValue < 400)
|
||||||
|
{
|
||||||
|
// 小于400,我几乎可以认为此时肋位号用的是m这个单位。因为如果用的是mm,400mm的肋位号似乎也太小了。
|
||||||
|
xValue = 1000 * xValue; // 转成mm
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
string strRoom = string.Empty;
|
||||||
|
if (matchedRoom != null)
|
||||||
|
{
|
||||||
|
strRoom = matchedRoom.DataItemName;
|
||||||
|
}
|
||||||
|
|
||||||
var Prop_FrameOff = tagProps.FirstOrDefault(x => x.PropertyName == GlobalObject.propName_FrameOff)?.PropertyValue;
|
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 Prop_YOff = tagProps.FirstOrDefault(x => x.PropertyName == GlobalObject.propName_YOff)?.PropertyValue;
|
||||||
var DECK = tagProps.FirstOrDefault(x => x.PropertyName == "甲板号")?.PropertyValue;
|
var DECK = tagProps.FirstOrDefault(x => x.PropertyName == "甲板号")?.PropertyValue;
|
||||||
@ -128,7 +151,8 @@ namespace Learun.Application.Web.AppApi
|
|||||||
YOff = Prop_YOff,
|
YOff = Prop_YOff,
|
||||||
deck = DECK,
|
deck = DECK,
|
||||||
area = AREA,
|
area = AREA,
|
||||||
Scale = BasePointProp_scale == null ? 1 : (double.TryParse(BasePointProp_scale.PropertyValue, out double scale) ? scale : 1)
|
Scale = BasePointProp_scale == null ? 1 : (double.TryParse(BasePointProp_scale.PropertyValue, out double scale) ? scale : 1),
|
||||||
|
RoomNo = strRoom
|
||||||
};
|
};
|
||||||
layoutTag.Scale = 1.0 / layoutTag.Scale; // 这里的比例是放大多少倍,所以取倒数。
|
layoutTag.Scale = 1.0 / layoutTag.Scale; // 这里的比例是放大多少倍,所以取倒数。
|
||||||
|
|
||||||
@ -195,8 +219,14 @@ namespace Learun.Application.Web.AppApi
|
|||||||
{
|
{
|
||||||
Prop_Frame = Prop_Frame.Split(new string[] { GlobalObject.enum_separator }, StringSplitOptions.None)[0];//插件端对于下拉列表 都是 name || nameEN
|
Prop_Frame = Prop_Frame.Split(new string[] { GlobalObject.enum_separator }, StringSplitOptions.None)[0];//插件端对于下拉列表 都是 name || nameEN
|
||||||
}
|
}
|
||||||
|
var Prop_RoomNo = tagProps.FirstOrDefault(x => x.PropertyName == GlobalObject.propName_Room)?.PropertyValue;
|
||||||
|
if (Prop_RoomNo != null)
|
||||||
|
{
|
||||||
|
Prop_RoomNo = Prop_RoomNo.Split(new string[] { GlobalObject.enum_separator }, StringSplitOptions.None)[0];//插件端对于下拉列表 都是 name || nameEN
|
||||||
|
}
|
||||||
var matchedFrame = frameLists.FirstOrDefault(X => X.Num == Prop_Frame);
|
var matchedFrame = frameLists.FirstOrDefault(X => X.Num == Prop_Frame);
|
||||||
if (matchedFrame == null)
|
var matchedRoom = roomLists.FirstOrDefault(x => x.DataItemName == Prop_RoomNo);
|
||||||
|
if (matchedFrame == null && matchedRoom == null)
|
||||||
{
|
{
|
||||||
var layoutTagInfoInvalid = new layoutTagInfoBrief()
|
var layoutTagInfoInvalid = new layoutTagInfoBrief()
|
||||||
{
|
{
|
||||||
@ -208,11 +238,20 @@ namespace Learun.Application.Web.AppApi
|
|||||||
basePoint.Tags.Add(layoutTagInfoInvalid);
|
basePoint.Tags.Add(layoutTagInfoInvalid);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
var xValue = frameLists.FirstOrDefault(X => X.Num == Prop_Frame).Value;
|
double xValue = 0;
|
||||||
if (xValue < 400)
|
if (matchedFrame != null)
|
||||||
{
|
{
|
||||||
// 小于400,我几乎可以认为此时肋位号用的是m这个单位。因为如果用的是mm,400mm的肋位号似乎也太小了。
|
xValue = frameLists.FirstOrDefault(X => X.Num == Prop_Frame).Value;
|
||||||
xValue = 1000 * xValue; // 转成mm
|
if (xValue < 400)
|
||||||
|
{
|
||||||
|
// 小于400,我几乎可以认为此时肋位号用的是m这个单位。因为如果用的是mm,400mm的肋位号似乎也太小了。
|
||||||
|
xValue = 1000 * xValue; // 转成mm
|
||||||
|
}
|
||||||
|
}
|
||||||
|
string strRoom = string.Empty;
|
||||||
|
if (matchedRoom != null)
|
||||||
|
{
|
||||||
|
strRoom = matchedRoom.DataItemName;
|
||||||
}
|
}
|
||||||
var Prop_FrameOff = tagProps.FirstOrDefault(x => x.PropertyName == GlobalObject.propName_FrameOff)?.PropertyValue;
|
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 Prop_YOff = tagProps.FirstOrDefault(x => x.PropertyName == GlobalObject.propName_YOff)?.PropertyValue;
|
||||||
@ -309,7 +348,8 @@ namespace Learun.Application.Web.AppApi
|
|||||||
YOff = Prop_YOff,
|
YOff = Prop_YOff,
|
||||||
deck = basePoint.deck,
|
deck = basePoint.deck,
|
||||||
area = basePoint.area,
|
area = basePoint.area,
|
||||||
Scale = basePoint.Scale
|
Scale = basePoint.Scale,
|
||||||
|
RoomNo = strRoom
|
||||||
};
|
};
|
||||||
basePoint.Tags.Add(layoutTagInfo);
|
basePoint.Tags.Add(layoutTagInfo);
|
||||||
}
|
}
|
||||||
|
@ -80,6 +80,7 @@ namespace Learun.Application.TwoDevelopment.ZZDT_EC
|
|||||||
public const string propName_FrameOff = "肋位号偏移量(mm)";
|
public const string propName_FrameOff = "肋位号偏移量(mm)";
|
||||||
public const string propName_YOff = "纵骨偏移量(mm)";
|
public const string propName_YOff = "纵骨偏移量(mm)";
|
||||||
public const string propName_TagNumber = "TagNumber";
|
public const string propName_TagNumber = "TagNumber";
|
||||||
|
public const string propName_Room = "房间号";
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region projSetting
|
#region projSetting
|
||||||
|
@ -59,6 +59,7 @@ namespace Learun.Application.TwoDevelopment.ZZDT_EC
|
|||||||
/// 基点从属的、或者说附近的设备位号
|
/// 基点从属的、或者说附近的设备位号
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public List<layoutTagInfoBrief> Tags { get; set; } = new List<layoutTagInfoBrief>();
|
public List<layoutTagInfoBrief> Tags { get; set; } = new List<layoutTagInfoBrief>();
|
||||||
|
public string RoomNo { get; set; }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user