diff --git a/Learun.Application.Web/AppApi/ObjectTypeApiController.cs b/Learun.Application.Web/AppApi/ObjectTypeApiController.cs index 68d4aee0..2918232a 100644 --- a/Learun.Application.Web/AppApi/ObjectTypeApiController.cs +++ b/Learun.Application.Web/AppApi/ObjectTypeApiController.cs @@ -481,7 +481,7 @@ namespace Learun.Application.Web.AppApi } else { - prop.EnumDataCode += detail.DataItemName + "||" + detail.DataItemNameEN + ",";//同时带出属性的中文和英文 + prop.EnumDataCode += detail.DataItemName + GlobalObject.enum_separator + detail.DataItemNameEN + ",";//同时带出属性的中文和英文 } } } @@ -774,7 +774,7 @@ namespace Learun.Application.Web.AppApi } else { - prop.EnumDataCode += detail.DataItemName + "||" + detail.DataItemNameEN + ",";//同时带出属性的中文和英文 + prop.EnumDataCode += detail.DataItemName + GlobalObject.enum_separator + detail.DataItemNameEN + ",";//同时带出属性的中文和英文 } } } diff --git a/Learun.Application.Web/AppApi/PlotLayoutApiController.cs b/Learun.Application.Web/AppApi/PlotLayoutApiController.cs index ae5c6f49..66370f68 100644 --- a/Learun.Application.Web/AppApi/PlotLayoutApiController.cs +++ b/Learun.Application.Web/AppApi/PlotLayoutApiController.cs @@ -1,6 +1,7 @@ using Learun.Application.TwoDevelopment.ZZDT_EC; using Learun.Util; using Learun.Util.SqlSugar; +using NPOI.SS.Formula.Functions; using NPOI.SS.Formula.PTG; using NPOI.Util.Collections; using Pipelines.Sockets.Unofficial.Arenas; @@ -103,7 +104,13 @@ 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[] { "||" }, StringSplitOptions.None)[0];//插件端对于下拉列表 都是 name || nameEN + Prop_Frame = Prop_Frame.Split(new string[] { GlobalObject.enum_separator }, StringSplitOptions.None)[0];//插件端对于下拉列表 都是 name || nameEN + var xValue = frameLists.FirstOrDefault(X => X.Num == Prop_Frame).Value; + if (xValue < 400) + { + // 小于400,我几乎可以认为此时肋位号用的是m这个单位。因为如果用的是mm,400mm的肋位号似乎也太小了。 + xValue = 1000* xValue; // 转成mm + } 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 DECK = tagProps.FirstOrDefault(x => x.PropertyName == "甲板号")?.PropertyValue; @@ -114,7 +121,7 @@ namespace Learun.Application.Web.AppApi FileId = "", PixelOnDwg = pointsOnDwg.FirstOrDefault(x => x.EngineDataID == pointTag.EngineDataID)?.PixelCode, TagNumber = pointTag.TagNumber, - X = frameLists.FirstOrDefault(X => X.Num == Prop_Frame).Value, + X = xValue, XOff = Prop_FrameOff, YOff = Prop_YOff, deck = DECK, @@ -138,7 +145,7 @@ namespace Learun.Application.Web.AppApi //这里要考虑下拉列表 带 ||的问题 var matchedTagIds = propAll.Where(x => x.PropertyName == keyProp - && (x.PropertyValue == keyValue || x.PropertyValue.StartsWith(keyValue + "||"))). + && (x.PropertyValue == keyValue || x.PropertyValue.StartsWith(keyValue + GlobalObject.enum_separator))). Select(X => X.EngineDataID).Distinct().ToList(); //有效范围的设备 @@ -164,12 +171,19 @@ namespace Learun.Application.Web.AppApi { 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[] { "||" }, StringSplitOptions.None)[0];//插件端对于下拉列表 都是 name || nameEN + Prop_Frame = Prop_Frame.Split(new string[] { GlobalObject.enum_separator }, StringSplitOptions.None)[0];//插件端对于下拉列表 都是 name || nameEN + var xValue = frameLists.FirstOrDefault(X => X.Num == Prop_Frame).Value; + if (xValue < 400) + { + // 小于400,我几乎可以认为此时肋位号用的是m这个单位。因为如果用的是mm,400mm的肋位号似乎也太小了。 + xValue = 1000 * xValue; // 转成mm + } 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 判断是否满足特定条件 var fileId = tagInfo.DefaultLayoutLibFileID; var matched = false; @@ -228,14 +242,33 @@ namespace Learun.Application.Web.AppApi } } #endregion + + #region 拆tag number + var TagNumber_Upper = ""; var TagNumber_Lower = ""; + 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); + } + else + { + TagNumber_Upper = tagInfo.TagNumber; + TagNumber_Lower = ""; + } + #endregion var layoutTagInfo = new layoutTagInfoBrief() { EngineDataID = matchPointTagId, FileId = fileId, //2个优先级 - IsNotDefaultSymbol= isNotDefaultSymbol, + IsNotDefaultSymbol = isNotDefaultSymbol, PixelOnDwg = "", TagNumber = tagInfo.TagNumber, - X = frameLists.FirstOrDefault(X => X.Num == Prop_Frame).Value, + TagNumber_Upper = TagNumber_Upper, + TagNumber_Lower = TagNumber_Lower, + System = systemProp, + Tag = tagProp, + X = xValue, XOff = Prop_FrameOff, YOff = Prop_YOff, deck = basePoint.deck, diff --git a/Learun.Application.Web/Areas/ZZDT_EC/Controllers/ec_report_fileController.cs b/Learun.Application.Web/Areas/ZZDT_EC/Controllers/ec_report_fileController.cs index cd08a3c8..fe32a0cb 100644 --- a/Learun.Application.Web/Areas/ZZDT_EC/Controllers/ec_report_fileController.cs +++ b/Learun.Application.Web/Areas/ZZDT_EC/Controllers/ec_report_fileController.cs @@ -1494,8 +1494,8 @@ namespace Learun.Application.Web.Areas.ZZDT_EC.Controllers 英文名称 = SqlFunc.IIF(eep.PropertyName == "英文名称", eep.PropertyValue, string.Empty), 设备单元 = SqlFunc.IIF(eep.PropertyName =="设备单元",eep.PropertyValue, string.Empty), 甲板号 = SqlFunc.IIF(eep.PropertyName == "甲板号", SqlFunc.IIF( - SqlFunc.Contains(eep.PropertyValue, "||"), - SqlFunc.Trim(SqlFunc.Substring(eep.PropertyValue, 0, SqlFunc.CharIndexNew(eep.PropertyValue, "||") - 1)), + SqlFunc.Contains(eep.PropertyValue, GlobalObject.enum_separator), + SqlFunc.Trim(SqlFunc.Substring(eep.PropertyValue, 0, SqlFunc.CharIndexNew(eep.PropertyValue, GlobalObject.enum_separator) - 1)), eep.PropertyValue), string.Empty), 房间号 = SqlFunc.IIF(eep.PropertyName == "房间号", eep.PropertyValue, string.Empty), 肋位号 = SqlFunc.IIF(eep.PropertyName == "肋位号", eep.PropertyValue, string.Empty) diff --git a/Learun.Application.Web/Learun.Application.Web.csproj.user b/Learun.Application.Web/Learun.Application.Web.csproj.user index 480a2725..7b853d90 100644 --- a/Learun.Application.Web/Learun.Application.Web.csproj.user +++ b/Learun.Application.Web/Learun.Application.Web.csproj.user @@ -2,7 +2,7 @@ Debug|Any CPU - C:\repo\CODE\009\Server\Learun.Application.Web\Properties\PublishProfiles\FolderProfile2.pubxml + C:\repo\CODE\009_DI-Elec\Learun.Application.Web\Properties\PublishProfiles\FolderProfile3.pubxml true diff --git a/Learun.Application.Web/obj/Release/Package/PackageTmp/Areas/ZZDT_EC/Views/ec_LookupTable/LookupIndex.js b/Learun.Application.Web/obj/Release/Package/PackageTmp/Areas/ZZDT_EC/Views/ec_LookupTable/LookupIndex.js index 0674af40..90420316 100644 --- a/Learun.Application.Web/obj/Release/Package/PackageTmp/Areas/ZZDT_EC/Views/ec_LookupTable/LookupIndex.js +++ b/Learun.Application.Web/obj/Release/Package/PackageTmp/Areas/ZZDT_EC/Views/ec_LookupTable/LookupIndex.js @@ -15,6 +15,17 @@ var bootstrap = function ($, learun) { page.bind(); }, bind: function () { + // 复制 + $('#lr_copy').on('click', function () { + learun.layerForm({ + id: 'lookupBatchCopy', + title: '对象类型多选', + url: top.$.rootUrl + '/ZZDT_EC/ec_LookupTable/SelectObjectType?objectTypeId=' + typeId + "&ProjectId=" + ProjectId, + width: 700, + height: 600, + btn: null + }); + }); // 查询 $('#btn_Search').on('click', function () { page.search(); diff --git a/Learun.Application.Web/obj/Release/Package/PackageTmp/Areas/ZZDT_EC/Views/ec_dataitem/Form.js b/Learun.Application.Web/obj/Release/Package/PackageTmp/Areas/ZZDT_EC/Views/ec_dataitem/Form.js index 58235f4f..2891817a 100644 --- a/Learun.Application.Web/obj/Release/Package/PackageTmp/Areas/ZZDT_EC/Views/ec_dataitem/Form.js +++ b/Learun.Application.Web/obj/Release/Package/PackageTmp/Areas/ZZDT_EC/Views/ec_dataitem/Form.js @@ -30,10 +30,10 @@ var bootstrap = function ($, learun) { }).lrselectSet(upDataItemDetailID);//lrselectSet获取下拉框选择的值,传入UpObjectTypeID /*检测重复项*/ $('#DataItemName').on('blur', function () { - $.lrExistField(keyValue, 'DataItemName', top.$.rootUrl + '/ZZDT_EC/ec_dataitem/ExistDetailItemName', { itemCode: itemCode, ProjectId: ProjectId }); + $.lrExistField(keyValue, 'DataItemName', top.$.rootUrl + '/ZZDT_EC/ec_dataitem/ExistDetailItemName', { itemCode: dataItemID, ProjectId: ProjectId }); }); $('#DataItemCode').on('blur', function () { - $.lrExistField(keyValue, 'DataItemCode', top.$.rootUrl + '/ZZDT_EC/ec_dataitem/ExistDetailItemCode', { itemCode: itemCode, ProjectId: ProjectId }); + $.lrExistField(keyValue, 'DataItemCode', top.$.rootUrl + '/ZZDT_EC/ec_dataitem/ExistDetailItemCode', { itemCode: dataItemID, ProjectId: ProjectId }); }); }, initData: function () { diff --git a/Learun.Application.Web/obj/Release/Package/PackageTmp/Areas/ZZDT_EC/Views/ec_dataitem/Index.cshtml b/Learun.Application.Web/obj/Release/Package/PackageTmp/Areas/ZZDT_EC/Views/ec_dataitem/Index.cshtml index 57b02ea9..d0d8ff5e 100644 --- a/Learun.Application.Web/obj/Release/Package/PackageTmp/Areas/ZZDT_EC/Views/ec_dataitem/Index.cshtml +++ b/Learun.Application.Web/obj/Release/Package/PackageTmp/Areas/ZZDT_EC/Views/ec_dataitem/Index.cshtml @@ -43,7 +43,10 @@  字典分类 diff --git a/Learun.Application.Web/obj/Release/Package/PackageTmp/Areas/ZZDT_EC/Views/ec_dataitem/Index.js b/Learun.Application.Web/obj/Release/Package/PackageTmp/Areas/ZZDT_EC/Views/ec_dataitem/Index.js index 5168bc44..c91c508a 100644 --- a/Learun.Application.Web/obj/Release/Package/PackageTmp/Areas/ZZDT_EC/Views/ec_dataitem/Index.js +++ b/Learun.Application.Web/obj/Release/Package/PackageTmp/Areas/ZZDT_EC/Views/ec_dataitem/Index.js @@ -92,6 +92,23 @@ var bootstrap = function ($, learun) { //excel导入 $('#lr_bulkload').on('click', function () { + var format = 'xlsx'; + var uploadKeyValue = Guid.NewGuid().toString(); + learun.layerForm({ + id: 'importfile2', + title: '数据字典通用导入', + url: top.$.rootUrl + '/LR_SystemModule/Annexes/UploadForm?keyVaule=' + uploadKeyValue + "&multiple=false" + "&format=" + format, + width: 600, + height: 400, + maxmin: true, + btn: ['确认'], + callBack: function (id) { + learun.layerClose('importfile2');//关闭上传excel的弹窗 + ExcelImport(uploadKeyValue); + } + }); + }); + $('#lr_bulkload_3D').on('click', function () { var format = 'xlsx'; var uploadKeyValue = Guid.NewGuid().toString(); learun.layerForm({ @@ -103,11 +120,26 @@ var bootstrap = function ($, learun) { maxmin: true, btn: ['确认'], callBack: function (id) { - learun.layerClose('importfile'); - ExcelImport(uploadKeyValue); + learun.layerClose('importfile');//关闭上传excel的弹窗 + ExcelImport_3D(uploadKeyValue); } }); }); + + // lr_export + $('#lr_export').on('click', function () { + + var iframeUrl = top.$.rootUrl + '/ZZDT_EC/ec_dataitem/exportSingle?ProjectId=' + ProjectId + "&dataItemID=" + dataItemID;//"&dataItemDetailIDOrDwgCategoryID=" + dataItemDetailIDOrDrawingCategoryID + "&model=" + model; + learun.loading(true, "生成报表中..."); + var body = document.getElementsByTagName("body")[0]; + var downloadIframe = document.createElement("iframe"); + downloadIframe.setAttribute("src", iframeUrl); + downloadIframe.setAttribute("style", "display:none;") + body.appendChild(downloadIframe); + learun.loading(false); + + + }); }, initTree: function () { $('#lr_left_tree').lrtree({ @@ -161,7 +193,6 @@ var bootstrap = function ($, learun) { } - function ExcelImport(fileId) { var learun = top.learun; learun.loading(true, "数据字典导入中..."); @@ -185,3 +216,26 @@ function ExcelImport(fileId) { } }); } +function ExcelImport_3D(fileId) { + var learun = top.learun; + learun.loading(true, "3D数据导入中..."); + $.ajax({ + type: 'POST', + url: top.$.rootUrl + '/ZZDT_EC/ec_dataitem/ExcelImport3D?ProjectId=' + ProjectId + "&keyValue=" + fileId, + data: { ProjectId: ProjectId, fileId: fileId }, + traditional: true, + success: function (data) { + var data = JSON.parse(data); + if (data.code == '200') { + location.reload(); + } + learun.alert.success(data.info); + }, + error: function (msg) { + learun.alert.error(msg); + }, + complete: function (data) { + learun.loading(false); + } + }); +} diff --git a/Learun.Application.Web/obj/Release/Package/PackageTmp/Areas/ZZDT_EC/Views/ec_library_file/SelectIndex.js b/Learun.Application.Web/obj/Release/Package/PackageTmp/Areas/ZZDT_EC/Views/ec_library_file/SelectIndex.js index b6f8e4aa..79e8cedf 100644 --- a/Learun.Application.Web/obj/Release/Package/PackageTmp/Areas/ZZDT_EC/Views/ec_library_file/SelectIndex.js +++ b/Learun.Application.Web/obj/Release/Package/PackageTmp/Areas/ZZDT_EC/Views/ec_library_file/SelectIndex.js @@ -108,7 +108,7 @@ var bootstrap = function ($, learun) { } } }); - page.search(); + //page.search(); 默认显示,但此时并没有选catalogue }, search: function (param) { param = param || {}; diff --git a/Learun.Application.Web/obj/Release/Package/PackageTmp/Areas/ZZDT_EC/Views/ec_property/PropertyDependent.js b/Learun.Application.Web/obj/Release/Package/PackageTmp/Areas/ZZDT_EC/Views/ec_property/PropertyDependent.js index a9525c9a..17068cad 100644 --- a/Learun.Application.Web/obj/Release/Package/PackageTmp/Areas/ZZDT_EC/Views/ec_property/PropertyDependent.js +++ b/Learun.Application.Web/obj/Release/Package/PackageTmp/Areas/ZZDT_EC/Views/ec_property/PropertyDependent.js @@ -136,14 +136,40 @@ var bootstrap = function ($, learun) { Save = function (callBack) { var formData = $('#form').lrGetFormData(); - + console.log(formData.trigger_property_id); + console.log(formData.dependency_type); + console.log(formData.trigger_operator); //VALIDATE - if (formData.trigger_property_id != -1) { - if (formData.dependency_type == -1 || formData.dependency_type == 0) { - learun.alert.warning('请选择一个需要的联动类型。'); + //if (formData.trigger_property_id != -1) { + // if (formData.dependency_type == -1 || formData.dependency_type == 0) { + // learun.alert.warning('请选择一个需要的联动类型。'); + // return; + // } + //} + + //没选 联动类型,就会保存为 不需要 + if (formData.dependency_type === "" || formData.dependency_type === "-1") { + learun.alert.warning('请选择一个需要的联动类型。'); return; + } + else if (formData.dependency_type == 1) { + if (formData.trigger_property_id === "" || formData.trigger_property_id === "-1") { + learun.alert.warning('请选择一个前置属性。'); return; } + } + else if (formData.dependency_type == 2) { + if (formData.trigger_property_id === "" || formData.trigger_property_id === "-1") { + learun.alert.warning('请选择一个前置属性。'); return; + } + if (formData.trigger_value === "" || formData.trigger_value === "-1") { + learun.alert.warning('前置属性的属性值需要填写。'); return; + } + if (formData.trigger_operator === "" || formData.trigger_operator === "-1") { + learun.alert.warning('前置属性的操作符需要填写。'); return; + } + } + var obj = { PropertyID: PropertyID, // 这里根据你的数据模型,提取需要的字段 IsRequired: IsRequired, @@ -153,7 +179,7 @@ var bootstrap = function ($, learun) { dependency_type: formData.dependency_type, trigger_value: formData.trigger_value, trigger_operator: formData.trigger_operator, - PropertyType:"1" + PropertyType: "1" } console.log(obj); var dataList = [obj]; // 将单个对象包装成数组 diff --git a/Learun.Application.Web/obj/Release/Package/PackageTmp/Areas/ZZDT_EC/Views/ec_property/SelectObjectType.js b/Learun.Application.Web/obj/Release/Package/PackageTmp/Areas/ZZDT_EC/Views/ec_property/SelectObjectType.js index a1df4705..f5c9c1fe 100644 --- a/Learun.Application.Web/obj/Release/Package/PackageTmp/Areas/ZZDT_EC/Views/ec_property/SelectObjectType.js +++ b/Learun.Application.Web/obj/Release/Package/PackageTmp/Areas/ZZDT_EC/Views/ec_property/SelectObjectType.js @@ -30,6 +30,7 @@ var bootstrap = function ($, learun) { type: "GET", dataType: "json", success: function (data) { + //这个data就是整个http返回结果,也就是Success(XXX)这个结构 if (data.code == 200 && data.data.length > 0) { $.each(data.data, function (i, item) { selectData.push(item.ObjectTypeID); diff --git a/Learun.Application.Web/obj/Release/Package/PackageTmp/Areas/ZZDT_EC/Views/ec_property/SelectProperty.js b/Learun.Application.Web/obj/Release/Package/PackageTmp/Areas/ZZDT_EC/Views/ec_property/SelectProperty.js index f838b476..b70fe221 100644 --- a/Learun.Application.Web/obj/Release/Package/PackageTmp/Areas/ZZDT_EC/Views/ec_property/SelectProperty.js +++ b/Learun.Application.Web/obj/Release/Package/PackageTmp/Areas/ZZDT_EC/Views/ec_property/SelectProperty.js @@ -120,6 +120,60 @@ var bootstrap = function ($, learun) { table.rows().invalidate().draw(); }); + $('#lr_propertyImport').on('click', function () { + //批量导入 + var format = 'xlsx'; + var uploadKeyValue = Guid.NewGuid().toString(); + learun.layerForm({ + id: 'importfile', + title: '对象类型 - 必填属性导入', + url: top.$.rootUrl + '/LR_SystemModule/Annexes/UploadForm?keyVaule=' + uploadKeyValue + "&multiple=false" + "&format=" + format, + width: 600, + height: 400, + maxmin: true, + btn: ['确认'], + callBack: function (id) { + learun.layerClose('importfile'); + //MuliteImport(uploadKeyValue); + + learun.loading(true, "批量导入数据中..."); + $.ajax({ + type: 'POST', + url: top.$.rootUrl + "/ZZDT_EC/ec_objecttype/ImportPropsIfNeed?rdo=" + Math.random(), + data: { fileId: fileId, ProjectId: ProjectId }, + traditional: true, + success: function (data) { + var data = JSON.parse(data); + if (data.code == '200') { + location.reload(); + } + learun.alert.success(data.info); + }, + error: function (msg) { + learun.alert.error(msg); + }, complete: function (data) { + learun.loading(false); + } + }); + + } + }); + + }); + //属性必填矩阵导出 + $('#lr_propertyExport').on('click', function () { + + learun.loading(true, "导出中..."); + var iframeUrl = top.$.rootUrl + '/ZZDT_EC/ec_objecttype/ExportPropsIfNeed?ProjectId=' + ProjectId; + + var body = document.getElementsByTagName("body")[0]; + var downloadIframe = document.createElement("iframe"); + downloadIframe.setAttribute("src", iframeUrl); + downloadIframe.setAttribute("style", "display:none;") + body.appendChild(downloadIframe); + learun.loading(false); + }); + }, // 初始化列表 initGird: function () { @@ -231,7 +285,7 @@ var bootstrap = function ($, learun) { - + diff --git a/Learun.Application.Web/obj/Release/Package/PackageTmp/bin/Learun.Application.Web.dll b/Learun.Application.Web/obj/Release/Package/PackageTmp/bin/Learun.Application.Web.dll index d0b32087..eb12a5ef 100644 Binary files a/Learun.Application.Web/obj/Release/Package/PackageTmp/bin/Learun.Application.Web.dll and b/Learun.Application.Web/obj/Release/Package/PackageTmp/bin/Learun.Application.Web.dll differ diff --git a/Learun.Application.Web/obj/Release/Package/PackageTmp/bin/Learun.Application.Web.pdb b/Learun.Application.Web/obj/Release/Package/PackageTmp/bin/Learun.Application.Web.pdb index 5a7ccd15..06fb70a6 100644 Binary files a/Learun.Application.Web/obj/Release/Package/PackageTmp/bin/Learun.Application.Web.pdb and b/Learun.Application.Web/obj/Release/Package/PackageTmp/bin/Learun.Application.Web.pdb 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 40928255..00cf9631 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 @@ -116,9 +116,9 @@ namespace Learun.Application.TwoDevelopment.ZZDT_EC EngineDataID = x.EngineDataID, PropertyName = x.PropertyName, PropertyValue = SqlFunc.IIF(x.PropertyName == "所属系统", SqlFunc.IIF( - SqlFunc.Contains(x.PropertyValue, "||"), + SqlFunc.Contains(x.PropertyValue, GlobalObject.enum_separator), SqlFunc.Trim(SqlFunc.Substring(x.PropertyValue, 0, - SqlFunc.CharIndexNew(x.PropertyValue, "||") - 1)), + SqlFunc.CharIndexNew(x.PropertyValue, GlobalObject.enum_separator) - 1)), x.PropertyValue), x.PropertyValue) }) .ToList(); diff --git a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ZZDT_EC/ec_enginedata/layoutTagInfoBrief.cs b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ZZDT_EC/ec_enginedata/layoutTagInfoBrief.cs index e527b21a..1b375968 100644 --- a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ZZDT_EC/ec_enginedata/layoutTagInfoBrief.cs +++ b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ZZDT_EC/ec_enginedata/layoutTagInfoBrief.cs @@ -23,8 +23,14 @@ namespace Learun.Application.TwoDevelopment.ZZDT_EC /// 位号 /// public string TagNumber { get; set; } = ""; + public string TagNumber_Upper { get; set; } + public string TagNumber_Lower { get; set; } + public string System { get; set; } + public string Tag { get; set; } /// - /// 是否默认图标 + /// 是否默认图标。默认图标就是。(此时拆) + /// 不是默认时,就是满足某个细分规则里的图标。(此时不拆) + /// 同时也影响位号的文字放置(一行 / 两行) /// public bool IsNotDefaultSymbol { get; set; } /// diff --git a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ZZDT_EC/ec_enginedata_pixel/ec_enginedata_pixelBLL.cs b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ZZDT_EC/ec_enginedata_pixel/ec_enginedata_pixelBLL.cs index 9656eff8..64eed1dd 100644 --- a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ZZDT_EC/ec_enginedata_pixel/ec_enginedata_pixelBLL.cs +++ b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ZZDT_EC/ec_enginedata_pixel/ec_enginedata_pixelBLL.cs @@ -412,9 +412,9 @@ namespace Learun.Application.TwoDevelopment.ZZDT_EC EngineDataID = x.EngineDataID, PropertyName = x.PropertyName, PropertyValue = SqlFunc.IIF(x.PropertyName == "所属系统", SqlFunc.IIF( - SqlFunc.Contains(x.PropertyValue, "||"), + SqlFunc.Contains(x.PropertyValue, GlobalObject.enum_separator), SqlFunc.Trim(SqlFunc.Substring(x.PropertyValue, 0, - SqlFunc.CharIndexNew(x.PropertyValue, "||") - 1)), + SqlFunc.CharIndexNew(x.PropertyValue, GlobalObject.enum_separator) - 1)), x.PropertyValue), x.PropertyValue) }) .ToList(); @@ -766,9 +766,9 @@ namespace Learun.Application.TwoDevelopment.ZZDT_EC EngineDataID = x.EngineDataID, PropertyName = x.PropertyName, PropertyValue = SqlFunc.IIF(x.PropertyName == "所属系统", SqlFunc.IIF( - SqlFunc.Contains(x.PropertyValue, "||"), + SqlFunc.Contains(x.PropertyValue, GlobalObject.enum_separator), SqlFunc.Trim(SqlFunc.Substring(x.PropertyValue, 0, - SqlFunc.CharIndexNew(x.PropertyValue, "||") - 1)), + SqlFunc.CharIndexNew(x.PropertyValue, GlobalObject.enum_separator) - 1)), x.PropertyValue), string.Empty) }) .ToList(); diff --git a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ZZDT_EC/ec_enginedata_rel/ec_enginedata_relBLL.cs b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ZZDT_EC/ec_enginedata_rel/ec_enginedata_relBLL.cs index f4f8f0f6..a354c4ff 100644 --- a/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ZZDT_EC/ec_enginedata_rel/ec_enginedata_relBLL.cs +++ b/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/ZZDT_EC/ec_enginedata_rel/ec_enginedata_relBLL.cs @@ -57,7 +57,7 @@ namespace Learun.Application.TwoDevelopment.ZZDT_EC InnerJoin((a, b, c) => b.ObjectTypeID == c.ObjectTypeID).AS(typeTbName).Where( (a, b, c) => a.PropertyName == GlobalObject.propName_System - && (a.PropertyValue == curSystem.DataItemName || a.PropertyValue.Replace(" ", "").Replace("||", "") == curSystem.DataItemName.Replace(" ", "") + curSystem.DataItemNameEN.Replace(" ", "")) + && (a.PropertyValue == curSystem.DataItemName || a.PropertyValue.Replace(" ", "").Replace(GlobalObject.enum_separator, "") == curSystem.DataItemName.Replace(" ", "") + curSystem.DataItemNameEN.Replace(" ", "")) && !c.ObjectTypeName.EndsWith("电缆") ). Select(a => a.EngineDataID).Distinct(). @@ -155,7 +155,7 @@ namespace Learun.Application.TwoDevelopment.ZZDT_EC Where( (a, b, c) => a.PropertyName == GlobalObject.propName_PackageUnit - && (a.PropertyValue == curUnit.DataItemName || a.PropertyValue.Replace(" ", "").Replace("||", "") == curUnit.DataItemName.Replace(" ", "") + curUnit.DataItemNameEN.Replace(" ", "")) + && (a.PropertyValue == curUnit.DataItemName || a.PropertyValue.Replace(" ", "").Replace(GlobalObject.enum_separator, "") == curUnit.DataItemName.Replace(" ", "") + curUnit.DataItemNameEN.Replace(" ", "")) && !c.ObjectTypeName.EndsWith("电缆") ). Select(a => a.EngineDataID).Distinct(). @@ -218,7 +218,7 @@ namespace Learun.Application.TwoDevelopment.ZZDT_EC { var propertyvalue = x.ToTag?.EngineDataProperty?. FirstOrDefault(y => y.PropertyName == GlobalObject.propName_PackageUnit)?.PropertyValue; - return propertyvalue == UnitName || propertyvalue?.Replace(" ", "").Replace("||", "") == curUnit?.DataItemName?.Replace(" ", "") + curUnit?.DataItemNameEN?.Replace(" ", ""); + return propertyvalue == UnitName || propertyvalue?.Replace(" ", "").Replace(GlobalObject.enum_separator, "") == curUnit?.DataItemName?.Replace(" ", "") + curUnit?.DataItemNameEN?.Replace(" ", ""); }); if (res2.connected_cables.Count == 0) {