2022-10-13 焊接修改

This commit is contained in:
2022-10-13 18:52:45 +08:00
parent 1ca00540a3
commit 9183f74b55
25 changed files with 4019 additions and 115 deletions
+6
View File
@@ -97,6 +97,11 @@
<Reference Include="office, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"> <Reference Include="office, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">
<EmbedInteropTypes>True</EmbedInteropTypes> <EmbedInteropTypes>True</EmbedInteropTypes>
</Reference> </Reference>
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="QRCoder, Version=1.4.3.0, Culture=neutral, PublicKeyToken=c4ed5b9ae8358a28, processorArchitecture=MSIL">
<HintPath>..\packages\QRCoder.1.4.3\lib\net40\QRCoder.dll</HintPath>
</Reference>
<Reference Include="RestSharp, Version=106.15.0.0, Culture=neutral, PublicKeyToken=598062e77f915f75, processorArchitecture=MSIL"> <Reference Include="RestSharp, Version=106.15.0.0, Culture=neutral, PublicKeyToken=598062e77f915f75, processorArchitecture=MSIL">
<HintPath>..\packages\RestSharp.106.15.0\lib\net452\RestSharp.dll</HintPath> <HintPath>..\packages\RestSharp.106.15.0\lib\net452\RestSharp.dll</HintPath>
</Reference> </Reference>
@@ -134,6 +139,7 @@
<Reference Include="ThoughtWorks.QRCode"> <Reference Include="ThoughtWorks.QRCode">
<HintPath>..\FineUIPro\Reference BLL\ThoughtWorks.QRCode.dll</HintPath> <HintPath>..\FineUIPro\Reference BLL\ThoughtWorks.QRCode.dll</HintPath>
</Reference> </Reference>
<Reference Include="WindowsBase" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="API\APIBaseInfoService.cs" /> <Compile Include="API\APIBaseInfoService.cs" />
+1 -1
View File
@@ -3024,7 +3024,7 @@
/// <summary> /// <summary>
/// PDMS输出(设计)数据导入模板 /// PDMS输出(设计)数据导入模板
/// </summary> /// </summary>
public const string PDMSPipelineTemplateUrl = "File\\Excel\\DataIn\\PDMS输出(设计)数据模板.xls"; public const string PDMSPipelineTemplateUrl = "File\\Excel\\DataIn\\PDMS输出(设计)数据模板.xlsx";
/// <summary> /// <summary>
/// 施工计划模板 /// 施工计划模板
/// </summary> /// </summary>
+28 -9
View File
@@ -1,7 +1,9 @@
using System; using NPOI.OpenXmlFormats.Shared;
using System;
using System.IO; using System.IO;
using System.Text; using System.Text;
using ThoughtWorks.QRCode.Codec; using ThoughtWorks.QRCode.Codec;
using QRCoder;
namespace BLL namespace BLL
{ {
@@ -49,6 +51,16 @@ namespace BLL
return null; return null;
} }
} }
/*
public Bitmap GetGraphic(int pixelsPerModule, Color darkColor, Color lightColor, [Bitmap icon=null], [int iconSizePercent=15], [int iconBorderWidth=6], [bool drawQuietZones=true])
int pixelsPerModule:生成二维码图片的像素大小;
Color darkColor:二维码图像暗色,一般设置为Color.Black。
Color lightColor:二维码图像亮色, 一般设置为Color.White。
Bitmap icon:二维码中间水印图标。
int iconSizePercent:水印图标的大小比例。
int iconBorderWidth:水印图标的边框。不能设为0,否则会显示“参数错误”,程序运行出错。
bool drawQuietZones:静止区,即是否绘画二维码的空白边框区域,默认为true。
*/
public static string CreateCode_Simple(string nr,string filename) public static string CreateCode_Simple(string nr,string filename)
{ {
try try
@@ -56,14 +68,21 @@ namespace BLL
string imageUrl = string.Empty; string imageUrl = string.Empty;
if (!string.IsNullOrEmpty(nr)) if (!string.IsNullOrEmpty(nr))
{ {
QRCodeEncoder qrCodeEncoder = new QRCodeEncoder //QRCodeEncoder qrCodeEncoder = new QRCodeEncoder
{ //{
QRCodeEncodeMode = QRCodeEncoder.ENCODE_MODE.BYTE, // QRCodeEncodeMode = QRCodeEncoder.ENCODE_MODE.BYTE,
QRCodeScale = nr.Length, // QRCodeScale = nr.Length,
QRCodeVersion = 0, // QRCodeVersion =0,
QRCodeErrorCorrect = QRCodeEncoder.ERROR_CORRECTION.M // QRCodeErrorCorrect = QRCodeEncoder.ERROR_CORRECTION.M
}; //};
System.Drawing.Image image = qrCodeEncoder.Encode(nr, Encoding.UTF8); //System.Drawing.Image image = qrCodeEncoder.Encode(nr, Encoding.UTF8);
QRCoder.QRCode qRCode = new QRCoder.QRCode();
QRCodeGenerator qrGenerator = new QRCodeGenerator();
QRCodeData qrCodeData = qrGenerator.CreateQrCode(nr, QRCodeGenerator.ECCLevel.Q);
QRCode qrcode = new QRCode(qrCodeData);
System.Drawing.Image image = qrcode.GetGraphic(100);
string filepath = Funs.RootPath + UploadFileService.QRCodeImageFilePath; string filepath = Funs.RootPath + UploadFileService.QRCodeImageFilePath;
//如果文件夹不存在,则创建 //如果文件夹不存在,则创建
if (!Directory.Exists(filepath)) if (!Directory.Exists(filepath))
@@ -43,10 +43,10 @@ namespace BLL
/// <param name="FileName"></param> /// <param name="FileName"></param>
/// <param name="project"></param> /// <param name="project"></param>
/// <returns></returns> /// <returns></returns>
public static Model.HJGL_DataImport GetLatestFileByFileName(string FileName, string project) public static Model.HJGL_DataImport GetLatestFileByFileName(string FileName,string ImportType, string project)
{ {
var q = (from x in Funs.DB.HJGL_DataImport var q = (from x in Funs.DB.HJGL_DataImport
where x.FileName.Contains(FileName) && x.ProjectId == project where x.FileName.Contains(FileName) && x.ProjectId == project&&x.ImportType==ImportType
select x select x
).OrderByDescending(x => x.Version).FirstOrDefault(); ).OrderByDescending(x => x.Version).FirstOrDefault();
return q; return q;
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
@@ -63,7 +63,7 @@
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="焊口台账总览" <f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="焊口台账总览"
EnableCollapse="true" runat="server" BoxFlex="1" EnableColumnLines="true" DataKeyNames="WeldJointId" EnableCollapse="true" runat="server" BoxFlex="1" EnableColumnLines="true" DataKeyNames="WeldJointId"
ClicksToEdit="2" DataIDField="WeldJointId" AllowSorting="true" ClicksToEdit="2" DataIDField="WeldJointId" AllowSorting="true"
SortField="UnitWorkCode,PipelineCode,WeldJointCode" OnSort="Grid1_Sort" SortField="UnitWorkCode,PipelineCode,WeldJointCode" OnSort="Grid1_Sort" OnRowClick="Grid1_RowClick" EnableRowClickEvent="true"
AllowPaging="true" IsDatabasePaging="true" PageSize="15" OnPageIndexChange="Grid1_PageIndexChange" AllowPaging="true" IsDatabasePaging="true" PageSize="15" OnPageIndexChange="Grid1_PageIndexChange"
EnableTextSelection="True"> EnableTextSelection="True">
<Toolbars> <Toolbars>
@@ -1,4 +1,5 @@
using BLL; using BLL;
using Model;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Data; using System.Data;
@@ -169,10 +170,11 @@ namespace FineUIPro.Web.HJGL.InfoQuery
Model.ColorModel colorModel = new Model.ColorModel(); Model.ColorModel colorModel = new Model.ColorModel();
colorModel = BLL.Project_SysSetService.GetColorModel(this.CurrUser.LoginProjectId); colorModel = BLL.Project_SysSetService.GetColorModel(this.CurrUser.LoginProjectId);
parameter3D.ColorModel = colorModel; parameter3D.ColorModel = colorModel;
parameter3D.TagNum = "/E-9001,/E-9002"; parameter3D.TagNum = "";
parameter3D.ButtonType = "0,2"; parameter3D.ButtonType = "0,2";
parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(tvControlItem.SelectedNodeID);
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.data = parameter3D;
ctlAuditFlow.BindData(); ctlAuditFlow.BindData();
@@ -365,5 +367,20 @@ namespace FineUIPro.Web.HJGL.InfoQuery
} }
#endregion #endregion
protected void Grid1_RowClick(object sender, GridRowClickEventArgs e)
{
var q = WeldJointService.GetViewWeldJointById(Grid1.SelectedRowID).PipelineCode;
var pipecode = "/" + q;
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();
}
} }
} }
@@ -341,11 +341,11 @@ namespace FineUIPro.Web.HJGL.InfoQuery
var id = Grid1.SelectedRowID; var id = Grid1.SelectedRowID;
if (string.IsNullOrEmpty(id)) if (string.IsNullOrEmpty(id))
{ {
ShowNotify("请选择相对应的图", MessageBoxIcon.Warning); ShowNotify("请选择相对应的ISO轴测图", MessageBoxIcon.Warning);
return; return;
} }
var SingleName = (from x in Funs.DB.View_HJGL_Pipeline where x.PipelineId == id select (x.SingleName)).FirstOrDefault(); var SingleName = (from x in Funs.DB.View_HJGL_Pipeline where x.PipelineId == id select (x.SingleName)).FirstOrDefault();
var filemodel= BLL.HJGL_DataImportService.GetLatestFileByFileName(SingleName, this.CurrUser.LoginProjectId); var filemodel= BLL.HJGL_DataImportService.GetLatestFileByFileName(SingleName,"0", this.CurrUser.LoginProjectId);
if (filemodel!=null) if (filemodel!=null)
{ {
string httpUrl = filemodel.FilePath; string httpUrl = filemodel.FilePath;
@@ -354,7 +354,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
} }
else else
{ {
ShowNotify("请上传相关图", MessageBoxIcon.Warning); ShowNotify("请上传相关ISO轴测图", MessageBoxIcon.Warning);
return; return;
} }
@@ -98,6 +98,7 @@
AllowColumnLocking="true" EnableColumnLines="true" ClicksToEdit="2" DataIDField="PipelineId" AllowColumnLocking="true" EnableColumnLines="true" ClicksToEdit="2" DataIDField="PipelineId"
AllowSorting="true" SortField="PipelineCode" SortDirection="ASC" OnSort="Grid1_Sort" EnableCheckBoxSelect="true" AllowSorting="true" SortField="PipelineCode" SortDirection="ASC" OnSort="Grid1_Sort" EnableCheckBoxSelect="true"
AllowPaging="true" IsDatabasePaging="true" PageSize="15" OnPageIndexChange="Grid1_PageIndexChange" AllowPaging="true" IsDatabasePaging="true" PageSize="15" OnPageIndexChange="Grid1_PageIndexChange"
OnRowClick="Grid1_RowClick" EnableRowClickEvent="true"
EnableTextSelection="True" EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick"> EnableTextSelection="True" EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick">
<Columns> <Columns>
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" <f:RowNumberField EnablePagingNumber="true" HeaderText="序号"
@@ -119,10 +119,11 @@ namespace FineUIPro.Web.HJGL.PreDesign
Model.ColorModel colorModel = new Model.ColorModel(); Model.ColorModel colorModel = new Model.ColorModel();
colorModel = BLL.Project_SysSetService.GetColorModel(this.CurrUser.LoginProjectId); colorModel = BLL.Project_SysSetService.GetColorModel(this.CurrUser.LoginProjectId);
parameter3D.ColorModel = colorModel; parameter3D.ColorModel = colorModel;
parameter3D.TagNum = "/E-9001,/E-9002"; parameter3D.TagNum = "";
parameter3D.ButtonType = "0,4"; parameter3D.ButtonType = "0,4";
parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(tvControlItem.SelectedNodeID);
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.data = parameter3D;
ctlAuditFlow.BindData(); ctlAuditFlow.BindData();
@@ -237,7 +238,21 @@ namespace FineUIPro.Web.HJGL.PreDesign
ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
} }
} }
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,4";
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();
}
#endregion #endregion
#region #region
@@ -82,7 +82,7 @@
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="组件信息" <f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="组件信息"
EnableCollapse="true" runat="server" BoxFlex="1" DataKeyNames="PipelineComponentId" AllowCellEditing="true" EnableCollapse="true" runat="server" BoxFlex="1" DataKeyNames="PipelineComponentId" AllowCellEditing="true"
AllowColumnLocking="true" EnableColumnLines="true" ClicksToEdit="2" DataIDField="PipelineComponentId" AllowColumnLocking="true" EnableColumnLines="true" ClicksToEdit="2" DataIDField="PipelineComponentId"
AllowSorting="true" SortField="PipelineComponentCode" SortDirection="ASC" OnSort="Grid1_Sort" AllowSorting="true" SortField="PipelineComponentCode" SortDirection="ASC" OnSort="Grid1_Sort" OnRowCommand="Grid1_RowCommand"
AllowPaging="true" IsDatabasePaging="true" PageSize="15" OnPageIndexChange="Grid1_PageIndexChange" AllowPaging="true" IsDatabasePaging="true" PageSize="15" OnPageIndexChange="Grid1_PageIndexChange"
EnableTextSelection="True" EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick"> EnableTextSelection="True" EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick">
<Columns> <Columns>
@@ -94,10 +94,10 @@
Title="组件编号" DataToolTipField="PipelineComponentCode" SortField="PipelineComponentCode" Title="组件编号" DataToolTipField="PipelineComponentCode" SortField="PipelineComponentCode"
Locked="true"> Locked="true">
</f:WindowField> </f:WindowField>
<f:RenderField HeaderText="预制单位" ColumnID="PreUnit" <%--<f:RenderField HeaderText="预制单位" ColumnID="PreUnit"
DataField="PreUnit" SortField="PreUnit" FieldType="String" HeaderTextAlign="Center" DataField="PreUnit" SortField="PreUnit" FieldType="String" HeaderTextAlign="Center"
TextAlign="Left" Width="240px"> TextAlign="Left" Width="240px">
</f:RenderField> </f:RenderField>--%>
<f:RenderField Width="200px" ColumnID="BoxNumber" DataField="BoxNumber" SortField="BoxNumber" <f:RenderField Width="200px" ColumnID="BoxNumber" DataField="BoxNumber" SortField="BoxNumber"
FieldType="String" HeaderText="物流箱号" HeaderTextAlign="Center" FieldType="String" HeaderText="物流箱号" HeaderTextAlign="Center"
TextAlign="Left"> TextAlign="Left">
@@ -113,12 +113,13 @@
HeaderTextAlign="Center" HeaderTextAlign="Center"
TextAlign="Left"> TextAlign="Left">
</f:RenderField> </f:RenderField>
<f:TemplateField ColumnID="tfImageUrl1" Width="180px" HeaderText="组件二维码" HeaderTextAlign="Center" <%-- <f:TemplateField ColumnID="tfImageUrl1" Width="180px" HeaderText="组件二维码" HeaderTextAlign="Center"
TextAlign="Left"> TextAlign="Left">
<ItemTemplate> <ItemTemplate>
<asp:Label ID="lbImageUrl" runat="server" Text='<%# ConvertImageUrlByImage(Eval("QRCode"),Eval("PipelineComponentId")) %>'></asp:Label> <asp:Label ID="lbImageUrl" runat="server" Text='<%# ConvertImageUrlByImage(Eval("QRCode"),Eval("PipelineComponentId")) %>'></asp:Label>
</ItemTemplate> </ItemTemplate>
</f:TemplateField> </f:TemplateField>--%>
<f:LinkButtonField Width="100px" TextAlign="Center" CommandName="PreviewQRCode" Text="二维码" EnableAjax="false" />
<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" FieldType="String" HeaderText="预制图纸名称" HeaderTextAlign="Center"
TextAlign="Left"> TextAlign="Left">
@@ -258,7 +258,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
{ {
BLL.FastReportService.ResetData(); BLL.FastReportService.ResetData();
string strSql = @" SELECT com.PipelineComponentId,com.PipelineComponentCode,com.BoxNumber, string strSql = @" SELECT com.PipelineComponentId,com.PipelineComponentCode,com.BoxNumber,unitwork.UnitWorkName,
com.PipelineId, punit.UnitName AS PreUnit,aunit.UnitName AS AssembleUnit,mat.PrefabricatedComponents, com.PipelineId, punit.UnitName AS PreUnit,aunit.UnitName AS AssembleUnit,mat.PrefabricatedComponents,
com.QRCode,com.State,CONVERT(varchar(100), pipe.PlanStartDate, 23) as PlanStartDate,pipe.PipelineCode, com.QRCode,com.State,CONVERT(varchar(100), pipe.PlanStartDate, 23) as PlanStartDate,pipe.PipelineCode,
('PrePipeline$'+com.PipelineComponentId )as QRCode2 ('PrePipeline$'+com.PipelineComponentId )as QRCode2
@@ -267,6 +267,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
LEFT JOIN HJGL_Pipeline pipe ON pipe.PipelineId =com.PipelineId LEFT JOIN HJGL_Pipeline pipe ON pipe.PipelineId =com.PipelineId
LEFT JOIN dbo.Base_Unit punit ON punit.UnitId=com.PreUnit LEFT JOIN dbo.Base_Unit punit ON punit.UnitId=com.PreUnit
LEFT JOIN dbo.Base_Unit aunit ON aunit.UnitId=com.AssembleUnit LEFT JOIN dbo.Base_Unit aunit ON aunit.UnitId=com.AssembleUnit
LEFT JOIN dbo.WBS_UnitWork unitwork on pipe.UnitWorkId=unitwork.UnitWorkId
WHERE com.QRCode!=''"; WHERE com.QRCode!=''";
List<SqlParameter> listStr = new List<SqlParameter> { }; List<SqlParameter> listStr = new List<SqlParameter> { };
@@ -456,11 +457,11 @@ namespace FineUIPro.Web.HJGL.PreDesign
var id = Grid1.SelectedRowID; var id = Grid1.SelectedRowID;
if (string.IsNullOrEmpty(id)) if (string.IsNullOrEmpty(id))
{ {
ShowNotify("请选择相对应的图", MessageBoxIcon.Warning); ShowNotify("请选择相对应的管道预制加工图", MessageBoxIcon.Warning);
return; return;
} }
var SingleName = (from x in Funs.DB.HJGL_Pipeline_Component where x.PipelineComponentId == id select (x.DrawingName)).FirstOrDefault(); var SingleName = (from x in Funs.DB.HJGL_Pipeline_Component where x.PipelineComponentId == id select (x.DrawingName)).FirstOrDefault();
var filemodel = BLL.HJGL_DataImportService.GetLatestFileByFileName(SingleName, this.CurrUser.LoginProjectId); var filemodel = BLL.HJGL_DataImportService.GetLatestFileByFileName(SingleName,"3", this.CurrUser.LoginProjectId);
if (filemodel != null) if (filemodel != null)
{ {
string httpUrl = filemodel.FilePath; string httpUrl = filemodel.FilePath;
@@ -469,12 +470,37 @@ namespace FineUIPro.Web.HJGL.PreDesign
} }
else else
{ {
ShowNotify("请上传相关图", MessageBoxIcon.Warning); ShowNotify("请上传相关管道预制加工图", MessageBoxIcon.Warning);
return; return;
} }
} }
protected void Grid1_RowCommand(object sender, GridCommandEventArgs e)
{
if (e.CommandName == "PreviewQRCode")
{
var ID = e.RowID;
var q = HJGL_PipelineComponentService.GetPipelineComponentById(ID);
string path = "";
if (!string.IsNullOrEmpty(q.QRCode))
{
path = BLL.CreateQRCodeService.CreateCode_Simple(q.QRCode, ID);
if (!string.IsNullOrEmpty(path))
{
string filepath = Funs.SGGLUrl + path.Replace("\\", "//");
ClientScript.RegisterStartupScript(ClientScript.GetType(), "myscript", "<script type='text/javascript'>window.open('" + filepath + "');</script>");
}
}
}
}
} }
} }
@@ -230,15 +230,6 @@ namespace FineUIPro.Web.HJGL.PreDesign
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Label lbstate; protected global::System.Web.UI.WebControls.Label lbstate;
/// <summary>
/// lbImageUrl 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lbImageUrl;
/// <summary> /// <summary>
/// ToolbarSeparator1 控件。 /// ToolbarSeparator1 控件。
/// </summary> /// </summary>
@@ -45,7 +45,7 @@
TitleToolTip="试压包" AutoScroll="true" RegionPercent="30%"> TitleToolTip="试压包" AutoScroll="true" RegionPercent="30%">
<Items> <Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" Title="试压包明细" EnableCollapse="true" Collapsed="false" <f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" Title="试压包明细" EnableCollapse="true" Collapsed="false"
runat="server" BoxFlex="1" DataKeyNames="PT_PipeId" AllowCellEditing="true" runat="server" BoxFlex="1" DataKeyNames="PT_PipeId" AllowCellEditing="true" OnRowClick="Grid1_RowClick" EnableRowClickEvent="true"
EnableColumnLines="true" ClicksToEdit="2" DataIDField="PT_PipeId" AllowSorting="true" EnableColumnLines="true" ClicksToEdit="2" DataIDField="PT_PipeId" AllowSorting="true"
SortField="PipelineCode" SortDirection="ASC" OnSort="Grid1_Sort" EnableTextSelection="True" SortField="PipelineCode" SortDirection="ASC" OnSort="Grid1_Sort" EnableTextSelection="True"
AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange" ForceFit="true"> AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange" ForceFit="true">
@@ -224,10 +224,11 @@ namespace FineUIPro.Web.HJGL.TestPackage
Model.ColorModel colorModel = new Model.ColorModel(); Model.ColorModel colorModel = new Model.ColorModel();
colorModel = BLL.Project_SysSetService.GetColorModel(this.CurrUser.LoginProjectId); colorModel = BLL.Project_SysSetService.GetColorModel(this.CurrUser.LoginProjectId);
parameter3D.ColorModel = colorModel; parameter3D.ColorModel = colorModel;
parameter3D.TagNum = "/E-9001,/E-9002"; parameter3D.TagNum = "";
parameter3D.ButtonType = "0,4"; parameter3D.ButtonType = "0,4";
parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(tvControlItem.SelectedNodeID);
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.data = parameter3D;
ctlAuditFlow.BindData(); ctlAuditFlow.BindData();
} }
@@ -527,5 +528,24 @@ namespace FineUIPro.Web.HJGL.TestPackage
return; return;
} }
} }
protected void Grid1_RowClick(object sender, GridRowClickEventArgs e)
{
var pTP_Pipeline = (from x in Funs.DB.PTP_PipelineList
where x.PT_PipeId == Grid1.SelectedRowID
select x).FirstOrDefault();
var pipe = PipelineService.GetPipelineByPipelineId(pTP_Pipeline.PipelineId);
var pipecode = "/" + pipe.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,4";
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();
}
} }
} }
@@ -1,4 +1,5 @@
using BLL; using BLL;
using MiniExcelLibs;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Data; using System.Data;
@@ -116,7 +117,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
return; return;
} }
string IsXls = Path.GetExtension(this.fuAttachUrl.FileName).ToString().Trim().ToLower(); string IsXls = Path.GetExtension(this.fuAttachUrl.FileName).ToString().Trim().ToLower();
if (IsXls != ".xls") if (IsXls != ".xlsx")
{ {
ShowNotify("只可以选择Excel文件!", MessageBoxIcon.Warning); ShowNotify("只可以选择Excel文件!", MessageBoxIcon.Warning);
return; return;
@@ -156,32 +157,34 @@ namespace FineUIPro.Web.HJGL.WeldingManage
//支持.xls和.xlsx,即包括office2010等版本的 HDR=Yes代表第一行是标题,不是数据; //支持.xls和.xlsx,即包括office2010等版本的 HDR=Yes代表第一行是标题,不是数据;
try try
{ {
string oleDBConnString = String.Empty; //string oleDBConnString = String.Empty;
oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;"; //oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;";
oleDBConnString += "Data Source="; //oleDBConnString += "Data Source=";
oleDBConnString += fileName; //oleDBConnString += fileName;
oleDBConnString += ";Extended Properties=Excel 8.0;"; //oleDBConnString += ";Extended Properties=Excel 8.0;";
OleDbConnection oleDBConn = null; //OleDbConnection oleDBConn = null;
OleDbDataAdapter oleAdMaster = null; //OleDbDataAdapter oleAdMaster = null;
DataTable m_tableName = new DataTable(); //DataTable m_tableName = new DataTable();
DataSet ds = new DataSet(); //DataSet ds = new DataSet();
oleDBConn = new OleDbConnection(oleDBConnString); //oleDBConn = new OleDbConnection(oleDBConnString);
oleDBConn.Open(); //oleDBConn.Open();
m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null); //m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
if (m_tableName != null && m_tableName.Rows.Count > 0) //if (m_tableName != null && m_tableName.Rows.Count > 0)
{ //{
m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim(); // m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim();
} //}
string sqlMaster; //string sqlMaster;
sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; //sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]";
oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn); //oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn);
oleAdMaster.Fill(ds, "m_tableName"); //oleAdMaster.Fill(ds, "m_tableName");
oleAdMaster.Dispose(); //oleAdMaster.Dispose();
oleDBConn.Close(); //oleDBConn.Close();
oleDBConn.Dispose(); //oleDBConn.Dispose();
var reposedata= AddDatasetToSQL(ds.Tables[0], 27); var ds = MiniExcel.QueryAsDataTable(fileName, useHeaderRow: true);
var reposedata = AddDatasetToSQL(ds, 27);
if (reposedata.code==1) if (reposedata.code==1)
{ {
State = (int)ButtonState.Import; State = (int)ButtonState.Import;
@@ -77,7 +77,7 @@
</Toolbars> </Toolbars>
<Items> <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="MaterialCode,Number" EnableCollapse="true" runat="server" BoxFlex="1" DataKeyNames="MaterialCode,Number"
EnableColumnLines="true" DataIDField="MaterialCode" AllowSorting="true" OnRowDataBound="Grid1_RowDataBound" EnableColumnLines="true" DataIDField="MaterialCode" AllowSorting="true" OnRowDataBound="Grid1_RowDataBound"
SortField="MaterialCode" SortDirection="ASC" OnSort="Grid1_Sort"> SortField="MaterialCode" SortDirection="ASC" OnSort="Grid1_Sort">
@@ -230,10 +230,11 @@ namespace FineUIPro.Web.HJGL.WeldingManage
Model.ColorModel colorModel = new Model.ColorModel(); Model.ColorModel colorModel = new Model.ColorModel();
colorModel = BLL.Project_SysSetService.GetColorModel(this.CurrUser.LoginProjectId); colorModel = BLL.Project_SysSetService.GetColorModel(this.CurrUser.LoginProjectId);
parameter3D.ColorModel = colorModel; parameter3D.ColorModel = colorModel;
parameter3D.TagNum = "/E-9001,/E-9002"; parameter3D.TagNum = "";
parameter3D.ButtonType = "0,3"; parameter3D.ButtonType = "0,3";
parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(tvControlItem.SelectedNodeID);
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.data = parameter3D;
ctlAuditFlow.BindData(); ctlAuditFlow.BindData();
} }
@@ -306,7 +307,22 @@ namespace FineUIPro.Web.HJGL.WeldingManage
{ {
} }
protected void Grid1_RowClick(object sender, GridRowClickEventArgs e)
{
var model = PipelineMatService.GetPipeLineMat(Grid1.SelectedRowID);
var q = PipelineService.GetPipelineByPipelineId(model.PipelineId);
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();
}
/// <summary> /// <summary>
/// 查询 /// 查询
/// </summary> /// </summary>
@@ -56,7 +56,7 @@
TitleToolTip="焊接日报" AutoScroll="true"> TitleToolTip="焊接日报" AutoScroll="true">
<Items> <Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="焊接日报明细" EnableCollapse="true" <f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="焊接日报明细" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="WeldJointId" AllowCellEditing="true" runat="server" BoxFlex="1" DataKeyNames="WeldJointId" AllowCellEditing="true" OnRowClick="Grid1_RowClick" EnableRowClickEvent="true"
AllowColumnLocking="true" EnableColumnLines="true" ClicksToEdit="2" DataIDField="WeldJointId" AllowColumnLocking="true" EnableColumnLines="true" ClicksToEdit="2" DataIDField="WeldJointId"
AllowSorting="true" SortField="PipelineCode,WeldJointCode" SortDirection="ASC" OnSort="Grid1_Sort" AllowSorting="true" SortField="PipelineCode,WeldJointCode" SortDirection="ASC" OnSort="Grid1_Sort"
AllowPaging="true" IsDatabasePaging="true" PageSize="15" OnPageIndexChange="Grid1_PageIndexChange"> AllowPaging="true" IsDatabasePaging="true" PageSize="15" OnPageIndexChange="Grid1_PageIndexChange">
@@ -151,10 +151,11 @@ namespace FineUIPro.Web.HJGL.WeldingManage
Model.ColorModel colorModel = new Model.ColorModel(); Model.ColorModel colorModel = new Model.ColorModel();
colorModel = BLL.Project_SysSetService.GetColorModel(this.CurrUser.LoginProjectId); colorModel = BLL.Project_SysSetService.GetColorModel(this.CurrUser.LoginProjectId);
parameter3D.ColorModel = colorModel; parameter3D.ColorModel = colorModel;
parameter3D.TagNum = "/E-9001,/E-9002"; parameter3D.TagNum = "";
parameter3D.ButtonType = "0,4"; parameter3D.ButtonType = "0,4";
parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(tvControlItem.SelectedNodeID);
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.data = parameter3D;
ctlAuditFlow.BindData(); ctlAuditFlow.BindData();
@@ -268,7 +269,24 @@ namespace FineUIPro.Web.HJGL.WeldingManage
// ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); // ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
// } // }
//} //}
protected void Grid1_RowClick(object sender, GridRowClickEventArgs e)
{
var model = (from x in Funs.DB.View_HJGL_WeldJoint
where x.WeldJointId == Grid1.SelectedRowID
select x).FirstOrDefault();
var q = PipelineService.GetPipelineByPipelineId(model.PipelineId);
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();
}
/// <summary> /// <summary>
/// 增加焊接日报 /// 增加焊接日报
/// </summary> /// </summary>
@@ -96,7 +96,7 @@
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="管线信息" <f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="管线信息"
EnableCollapse="true" runat="server" BoxFlex="1" DataKeyNames="ID" AllowCellEditing="true" EnableCollapse="true" runat="server" BoxFlex="1" DataKeyNames="ID" AllowCellEditing="true"
AllowColumnLocking="true" EnableColumnLines="true" ClicksToEdit="2" DataIDField="ID" AllowColumnLocking="true" EnableColumnLines="true" ClicksToEdit="2" DataIDField="ID"
AllowSorting="true" SortField="PipelineCode" SortDirection="ASC" OnSort="Grid1_Sort" AllowSorting="true" SortField="PipelineCode" SortDirection="ASC" OnSort="Grid1_Sort" OnRowClick="Grid1_RowClick" EnableRowClickEvent="true"
AllowPaging="true" IsDatabasePaging="true" PageSize="15" OnPageIndexChange="Grid1_PageIndexChange" AllowPaging="true" IsDatabasePaging="true" PageSize="15" OnPageIndexChange="Grid1_PageIndexChange"
EnableTextSelection="True" EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick"> EnableTextSelection="True" EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick">
<Columns> <Columns>
@@ -125,10 +125,11 @@ namespace FineUIPro.Web.HJGL.WeldingManage
Model.ColorModel colorModel = new Model.ColorModel(); Model.ColorModel colorModel = new Model.ColorModel();
colorModel = BLL.Project_SysSetService.GetColorModel(this.CurrUser.LoginProjectId); colorModel = BLL.Project_SysSetService.GetColorModel(this.CurrUser.LoginProjectId);
parameter3D.ColorModel = colorModel; parameter3D.ColorModel = colorModel;
parameter3D.TagNum = "/E-9001,/E-9002"; parameter3D.TagNum = "";
parameter3D.ButtonType = "0,1"; parameter3D.ButtonType = "0,1";
parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(tvControlItem.SelectedNodeID);
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.data = parameter3D;
ctlAuditFlow.BindData(); ctlAuditFlow.BindData();
} }
@@ -140,7 +141,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
/// </summary> /// </summary>
private void BindGrid() private void BindGrid()
{ {
string strSql = @"select line.PipelineId+'&'+com.PipelineComponentId as ID string strSql = @"select (line.PipelineId+'&'+ISNULL(com.PipelineComponentId,'') ) as ID
,line.PipelineId ,line.PipelineId
,line.PipelineCode ,line.PipelineCode
,line.ProjectId ,line.ProjectId
@@ -286,7 +287,21 @@ namespace FineUIPro.Web.HJGL.WeldingManage
ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
} }
} }
protected void Grid1_RowClick(object sender, GridRowClickEventArgs e)
{
var q = PipelineService.GetPipelineByPipelineId(Grid1.SelectedRowID.Split('&')[0]);
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,1";
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();
}
#endregion #endregion
#region #region