2022-10-12 组件二维码导入修改,三维界面修改。

This commit is contained in:
李鹏飞 2022-10-12 18:36:04 +08:00
parent 0e42d35160
commit 6d0290896e
10 changed files with 67 additions and 32 deletions

View File

@ -166,6 +166,26 @@ namespace BLL
var newVersion = MaxVersion + 0.1m;
return newVersion;
}
public static string Getlatest3DModelNameByUnitWorkId(string UnitWorkId )
{
string result = "";
var q = (from x in Funs.DB.HJGL_DataImport
where x.UnitWorkId == UnitWorkId && x.ImportType == "1"
group x by x.UnitWorkId into tt
from t in tt.DefaultIfEmpty()
select new
{
FileName = (from x2 in tt where x2.Version == tt.Max(x => x.Version ) select x2.FileName).FirstOrDefault()
}
).FirstOrDefault();
//where t.Key == UnitWorkId & x.FileType == "1" select x.Version).Distinct().ToList();
if (!string.IsNullOrEmpty(q.FileName))
{
result=q.FileName.Substring (0,q.FileName.LastIndexOf('.'));
}
return result;
}
public static void InitVersionDownList(FineUIPro.DropDownList dropName, string UnitWorkId)
{

View File

@ -22,6 +22,7 @@
function BindData(dataList, Url_item,Url) {
receiver.src = Url_item;
// var newdatalist = dataList.split(",");
// console.log(dataList);
receiver.contentWindow.postMessage(dataList, Url);
}
function iFrameHeight() {

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Report ScriptLanguage="CSharp" ReportInfo.Created="12/29/2021 10:56:08" ReportInfo.Modified="10/08/2022 11:29:22" ReportInfo.CreatorVersion="2017.1.16.0">
<Report ScriptLanguage="CSharp" ReportInfo.Created="12/29/2021 10:56:08" ReportInfo.Modified="10/11/2022 17:46:58" ReportInfo.CreatorVersion="2017.1.16.0">
<ScriptText>using System;
using System.Collections;
using System.Collections.Generic;
@ -99,7 +99,7 @@ namespace FastReport
}
</ScriptText>
<Dictionary>
<MsSqlDataConnection Name="Connection" ConnectionString="rijcmlqvJIqZbrmqGn7L0P56UFhaUHihKXxbhpqie4wmZgM2ymDKry7UxzO5md9ybQlkfKpN2rHYbp9GtH1LDQPa7z2vVu/kEnNnTKeHt9obmaC7TQDh0IvsUBSuzhGZdfAIK7YyBqykCgeZm5rvA6K5b7zHGdA+7pUpJ/9ZLpp1NuxWRFqSkg1H3QEwUeSOkG0QSLU"/>
<MsSqlDataConnection Name="Connection" ConnectionString="rijcmlqvJIqZbrmqGn7L0P56UFhaUHihKXxbhpqie4wmZgM2ymDKry7UxzO5md9ybQlkfKpN2rHYbp9GtH1LDQPa7z2vVu/kEnNnTKeHt9obmaC7TQDh0IvsUBSuzhGZdfAIK7YyBqykCgeZm5rvA6K5b7zHGdA+7pUpJ/9ZLpp1NuxWRH2dno7dvT5Tp8SqogGWhTx"/>
<TableDataSource Name="Table1" ReferenceName="Table1" DataType="System.Int32" Enabled="true">
<Column Name="PrefabricatedComponents" DataType="System.String" PropName="CH_TrustCode"/>
<Column Name="PlanStartDate" DataType="System.String" PropName="CH_TrustMan"/>

View File

@ -83,7 +83,7 @@
</f:Toolbar>
</Toolbars>
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="管线信息"
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="管线信息" OnRowClick="Grid1_RowClick" EnableRowClickEvent="true"
EnableCollapse="true" runat="server" BoxFlex="1" DataKeyNames="PipelineId"
AllowColumnLocking="true" EnableColumnLines="true" DataIDField="PipelineId"
AllowSorting="true" SortField="PipelineCode" SortDirection="ASC" OnSort="Grid1_Sort"

View File

@ -115,10 +115,10 @@ namespace FineUIPro.Web.HJGL.InfoQuery
Model.ColorModel colorModel = new Model.ColorModel();
colorModel = BLL.Project_SysSetService.GetColorModel(this.CurrUser.LoginProjectId);
parameter3D.ColorModel = colorModel;
parameter3D.TagNum = "/E-9001,/E-9002";
parameter3D.TagNum = "";
parameter3D.ButtonType = "0,2";
ctlAuditFlow.Url_item = BLL.Project_SysSetService.GetAvevaNetUrl(this.CurrUser.LoginProjectId) + "item/IPE%7CVPD%7CArea-15A";
ctlAuditFlow.Url_item = BLL.Project_SysSetService.GetAvevaNetUrl(this.CurrUser.LoginProjectId) + "item/IPE%7CVPD%7C"+HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(tvControlItem.SelectedNodeID);
ctlAuditFlow.data = parameter3D;
ctlAuditFlow.BindData();
@ -359,5 +359,21 @@ namespace FineUIPro.Web.HJGL.InfoQuery
}
protected void Grid1_RowClick(object sender, GridRowClickEventArgs e)
{
var q = PipelineService.GetPipelineByPipelineId(Grid1.SelectedRowID);
var pipecode ="/"+ q.PipelineCode;
Model.Parameter3D parameter3D = new Model.Parameter3D();
Model.ColorModel colorModel = new Model.ColorModel();
colorModel = BLL.Project_SysSetService.GetColorModel(this.CurrUser.LoginProjectId);
parameter3D.ColorModel = colorModel;
parameter3D.TagNum = pipecode;
parameter3D.ButtonType = "0,2";
parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(tvControlItem.SelectedNodeID);
ctlAuditFlow.Url_item = BLL.Project_SysSetService.GetAvevaNetUrl(this.CurrUser.LoginProjectId) + "item/IPE%7CVPD%7C" + HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(tvControlItem.SelectedNodeID);
ctlAuditFlow.data = parameter3D;
ctlAuditFlow.BindData();
}
}
}

View File

@ -72,10 +72,10 @@
FieldType="String" HeaderText="二维码信息" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
<f:RenderField Width="200px" ColumnID="DrawingName" DataField="DrawingName" SortField="DrawingName"
<%-- <f:RenderField Width="200px" ColumnID="DrawingName" DataField="DrawingName" SortField="DrawingName"
FieldType="String" HeaderText="预制图纸名称" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
</f:RenderField>--%>
</Columns>
<PageItems>

View File

@ -169,17 +169,17 @@ namespace FineUIPro.Web.HJGL.PreDesign
Model.HJGL_Pipeline pipeline = new Model.HJGL_Pipeline();
Model.HJGL_Pipeline_Component hJGL_Pipeline_Component = new Model.HJGL_Pipeline_Component();
string pioelinecode = pds.Rows[i]["管线号"].ToString();
string pipelinecode = pds.Rows[i]["管线号"].ToString();
string PipelineComponentCode = pds.Rows[i]["预制组件"].ToString();
string QRCode = pds.Rows[i]["二维码信息"].ToString();
if (string.IsNullOrEmpty(pioelinecode))
if (string.IsNullOrEmpty(pipelinecode))
{
result += "第" + (i + 2).ToString() + "行," + "管线号" + "," + "此项为必填项!" + "|";
}
else
{
pipeline = getPipeline.FirstOrDefault(x => x.PipelineCode == pioelinecode);
pipeline = getPipeline.FirstOrDefault(x => x.PipelineCode == pipelinecode);
if (pipeline == null)
{
result += "第" + (i + 2).ToString() + "行," + "不存在此管线号" + "|";
@ -194,9 +194,9 @@ namespace FineUIPro.Web.HJGL.PreDesign
else
{
hJGL_Pipeline_Component = HJGL_PipelineComponentService.GetPipelineComponentByCodeandpipelineId(PipelineComponentCode, pipeline.PipelineId);
if (pipeline == null)
if (hJGL_Pipeline_Component == null)
{
result += "第" + (i + 2).ToString() + "行," + "不存在此预制组件" + "|";
result += "第" + (i + 2).ToString() + "行," + "不存在此预制组件 " + PipelineComponentCode + " |";
continue;
}
@ -222,20 +222,21 @@ namespace FineUIPro.Web.HJGL.PreDesign
.GroupBy(x => new {
pipelinecode = x.Field<string>("管线号"),
PipelineComponentCode = x.Field<string>("预制组件"),
DrawingName = x.Field<string>("预制图纸名称"),
// DrawingName = x.Field<string>("预制图纸名称"),
})
.Select(x => new
{
pipelinecode = x.Key.pipelinecode,
PipelineComponentCode = x.Key.PipelineComponentCode,
DrawingName = x.Key.DrawingName,
// DrawingName = x.Key.DrawingName,
QRCode = String.Join("&", x.Select(z => z.Field<string>("二维码信息")))
});
foreach (var item in dt)
{
var pipeline = PipelineService.GetPipelineByPipelineCode(item.pipelinecode.Replace("\n", "").Replace(" ", "").Replace("\t", "").Replace("\r", ""));
var hJGL_Pipeline_Component = HJGL_PipelineComponentService.GetPipelineComponentByCodeandpipelineId(item.PipelineComponentCode.Replace("\n", "").Replace(" ", "").Replace("\t", "").Replace("\r", ""), pipeline.PipelineId);
if (hJGL_Pipeline_Component!=null)
{
model.Pipeline_ComponentQRCodeRootName rootName = new model.Pipeline_ComponentQRCodeRootName();
rootName.QRCode = new List<model.Pipeline_ComponentQRCodeQRCodeItem>();
var elementlist = item.QRCode.Split('&');
@ -246,9 +247,11 @@ namespace FineUIPro.Web.HJGL.PreDesign
rootName.QRCode.Add(qRCodeQRCodeItem);
}
hJGL_Pipeline_Component.QRCode = JsonConvert.SerializeObject(rootName);
hJGL_Pipeline_Component.DrawingName = item.DrawingName;
//hJGL_Pipeline_Component.DrawingName = item.DrawingName;
Pipeline_ComponentList.Add(hJGL_Pipeline_Component);
}
}
errorInfos = string.Empty;
// ShowNotify("审核完成,请点击导入!", MessageBoxIcon.Success);

View File

@ -13,22 +13,15 @@
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
<Items>
<f:ContentPanel ID="ContentPanel1" runat="server" ShowHeader="false" EnableCollapse="true"
BodyPadding="0px">
<uc1:_3DLook ID="ctlAuditFlow" runat="server" Width="1000px" Height="1000px" />
</f:ContentPanel>
</Items>
</f:Panel>
</form>
<script>
</script>
</body>
</html>

View File

@ -12,6 +12,8 @@ namespace Model
/// 按钮类别
/// </summary>
public string ButtonType { get; set; }
public string ModelName { get; set; }
/// <summary>
/// 颜色模型
/// </summary>