This commit is contained in:
佘春生 2024-10-10 10:35:01 +08:00
parent 94fc0c6aa5
commit 022aebc00d
45 changed files with 1525 additions and 487 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -162,7 +162,7 @@
</site> </site>
<site name="WebApi" id="2"> <site name="WebApi" id="2">
<application path="/" applicationPool="Clr4IntegratedAppPool"> <application path="/" applicationPool="Clr4IntegratedAppPool">
<virtualDirectory path="/" physicalPath="E:\湛江巴斯夫\Basf_TCC7\HJGL\WebApi" /> <virtualDirectory path="/" physicalPath="E:\MyProject\ZJ_BSF\Basf_TCC7\HJGL\WebApi" />
</application> </application>
<bindings> <bindings>
<binding protocol="http" bindingInformation="*:3862:localhost" /> <binding protocol="http" bindingInformation="*:3862:localhost" />

Binary file not shown.

View File

@ -81,19 +81,20 @@
list[3] = new ListItem("低合金钢", "4"); list[3] = new ListItem("低合金钢", "4");
list[4] = new ListItem("镍合金钢", "5"); list[4] = new ListItem("镍合金钢", "5");
list[5] = new ListItem("钛合金钢", "6"); list[5] = new ListItem("钛合金钢", "6");
list[6] = new ListItem("其", "7"); list[6] = new ListItem("其", "7");
return list; return list;
} }
// 材质类型 // 材质类型
public static ListItem[] MaterialTypeList() public static ListItem[] MaterialTypeList()
{ {
ListItem[] list = new ListItem[5]; ListItem[] list = new ListItem[6];
list[0] = new ListItem("低碳钢(Fe)", "Fe"); list[0] = new ListItem("低碳钢(Fe)", "Fe");
list[1] = new ListItem("低合金钢(FeⅡ)", "FeⅡ"); list[1] = new ListItem("低合金钢(FeⅡ)", "FeⅡ");
list[2] = new ListItem("Cr≥5%铬钼钢、铁素体钢、马氏体钢(FeⅢ)", "FeⅢ"); list[2] = new ListItem("Cr≥5%铬钼钢、铁素体钢、马氏体钢(FeⅢ)", "FeⅢ");
list[3] = new ListItem("奥氏体钢、奥氏体与铁素体双相钢(FeⅣ)", "FeⅣ"); list[3] = new ListItem("奥氏体钢、奥氏体与铁素体双相钢(FeⅣ)", "FeⅣ");
list[4] = new ListItem("其他", "其他"); list[4] = new ListItem("NiⅢ", "NiⅢ");
list[5] = new ListItem("其它", "其它");
return list; return list;
} }

View File

@ -367,6 +367,12 @@ namespace BLL
} }
if (rate.DetectionRateValue == 100)
{
UpdatePointBatchItem(pointBatchItemId, "1", System.DateTime.Now, null);
UpdatePointBatchOrder(pointBatchItemId, true);
}
#region #region
//// 一个段位的数量 //// 一个段位的数量
//int dnum = Convert.ToInt32((double)100 / (double)rate.DetectionRateValue); //int dnum = Convert.ToInt32((double)100 / (double)rate.DetectionRateValue);

View File

@ -319,12 +319,13 @@ namespace BLL
/// </summary> /// </summary>
/// <param name="dropName"></param> /// <param name="dropName"></param>
/// <param name="workAreaId"></param> /// <param name="workAreaId"></param>
public static void InitPipelineDropDownList(FineUIPro.DropDownList dropName,string workAreaId) public static void InitPipelineDropDownList(FineUIPro.DropDownList dropName,string workAreaId, string itemText)
{ {
dropName.DataValueField = "PipelineId"; dropName.DataValueField = "PipelineId";
dropName.DataTextField = "PipelineCode"; dropName.DataTextField = "PipelineCode";
dropName.DataSource = GetPipelineList(workAreaId); dropName.DataSource = GetPipelineList(workAreaId);
dropName.DataBind(); dropName.DataBind();
Funs.FineUIPleaseSelect(dropName, itemText);
} }
} }
} }

View File

@ -168,6 +168,55 @@ namespace BLL
} }
} }
public static void UpdateWeldJointByGly(Model.Pipeline_WeldJoint weldJoint)
{
Model.HJGLDB db = Funs.DB;
Model.Pipeline_WeldJoint newWeldJoint = db.Pipeline_WeldJoint.FirstOrDefault(e => e.WeldJointId == weldJoint.WeldJointId);
if (newWeldJoint != null)
{
newWeldJoint.WeldJointCode = weldJoint.WeldJointCode;
newWeldJoint.WeldTypeId = weldJoint.WeldTypeId;
newWeldJoint.Material1Id = weldJoint.Material1Id;
newWeldJoint.Material2Id = weldJoint.Material2Id;
newWeldJoint.Thickness = weldJoint.Thickness;
newWeldJoint.Dia = weldJoint.Dia;
newWeldJoint.Size = weldJoint.Size;
newWeldJoint.JointAttribute = weldJoint.JointAttribute;
newWeldJoint.JointArea = weldJoint.JointArea;
newWeldJoint.WeldingMethodId = weldJoint.WeldingMethodId;
newWeldJoint.IsHotProess = weldJoint.IsHotProess;
newWeldJoint.WeldingLocationId = weldJoint.WeldingLocationId;
newWeldJoint.WeldMatId = weldJoint.WeldMatId;
newWeldJoint.WeldSilkId = weldJoint.WeldSilkId;
newWeldJoint.GrooveTypeId = weldJoint.GrooveTypeId;
newWeldJoint.PipeSegment = weldJoint.PipeSegment;
newWeldJoint.PipeAssembly1Id = weldJoint.PipeAssembly1Id;
newWeldJoint.PipeAssembly2Id = weldJoint.PipeAssembly2Id;
newWeldJoint.PipeAssemblyCount = weldJoint.PipeAssemblyCount;
newWeldJoint.HeartNo1 = weldJoint.HeartNo1;
newWeldJoint.HeartNo2 = weldJoint.HeartNo2;
newWeldJoint.LastTemp = weldJoint.LastTemp;
newWeldJoint.CellTemp = weldJoint.CellTemp;
newWeldJoint.PrepareTemp = weldJoint.PrepareTemp;
newWeldJoint.Electricity = weldJoint.Electricity;
newWeldJoint.Voltage = weldJoint.Voltage;
newWeldJoint.IsPMI = weldJoint.IsPMI;
newWeldJoint.TestPackageNo = weldJoint.TestPackageNo;
newWeldJoint.PipingClassId = weldJoint.PipingClassId;
newWeldJoint.Specification = weldJoint.Specification;
newWeldJoint.DoneDin = weldJoint.DoneDin;
newWeldJoint.SystemNumber = weldJoint.SystemNumber;
newWeldJoint.Remark = weldJoint.Remark;
//newWeldJoint.IsCancel = weldJoint.IsCancel;
newWeldJoint.IsGoldJoint = weldJoint.IsGoldJoint;
newWeldJoint.WPQId = weldJoint.WPQId;
newWeldJoint.DetectionType = weldJoint.DetectionType;
newWeldJoint.PageNum = weldJoint.PageNum;
newWeldJoint.ANSISCH = weldJoint.ANSISCH;
db.SubmitChanges();
}
}
/// <summary> /// <summary>
/// 修改部分内容 /// 修改部分内容
/// </summary> /// </summary>
@ -302,152 +351,6 @@ namespace BLL
} }
} }
/// <summary>
/// 修改部分内容TCC11,暂时
/// </summary>
/// <param name="weldJoint"></param>
public static void UpdateDepartWeldJointToTCC11(Model.Pipeline_WeldJoint weldJoint)
{
Model.HJGLDB db = Funs.DB;
Model.Pipeline_WeldJoint newWeldJoint = db.Pipeline_WeldJoint.FirstOrDefault(e => e.WeldJointId == weldJoint.WeldJointId);
if (newWeldJoint != null)
{
newWeldJoint.WeldJointCode = weldJoint.WeldJointCode;
//newWeldJoint.WeldTypeId = weldJoint.WeldTypeId;
//newWeldJoint.Material1Id = weldJoint.Material1Id;
//newWeldJoint.Material2Id = weldJoint.Material2Id;
if (weldJoint.Thickness != null)
{
newWeldJoint.Thickness = weldJoint.Thickness;
}
if (weldJoint.Dia != null)
{
newWeldJoint.Dia = weldJoint.Dia;
}
if (weldJoint.Size != null)
{
newWeldJoint.Size = weldJoint.Size;
}
if (!string.IsNullOrEmpty(weldJoint.JointAttribute))
{
newWeldJoint.JointAttribute = weldJoint.JointAttribute;
}
if (!string.IsNullOrEmpty(weldJoint.JointArea))
{
newWeldJoint.JointArea = weldJoint.JointArea;
}
//newWeldJoint.WeldingMethodId = weldJoint.WeldingMethodId;
if (weldJoint.IsHotProess != null)
{
newWeldJoint.IsHotProess = weldJoint.IsHotProess;
}
if (!string.IsNullOrEmpty(weldJoint.WeldingLocationId))
{
newWeldJoint.WeldingLocationId = weldJoint.WeldingLocationId;
}
if (!string.IsNullOrEmpty(weldJoint.WeldMatId))
{
newWeldJoint.WeldMatId = weldJoint.WeldMatId;
}
if (!string.IsNullOrEmpty(weldJoint.WeldSilkId))
{
newWeldJoint.WeldSilkId = weldJoint.WeldSilkId;
}
//newWeldJoint.GrooveTypeId = weldJoint.GrooveTypeId;
if (!string.IsNullOrEmpty(weldJoint.PipeSegment))
{
newWeldJoint.PipeSegment = weldJoint.PipeSegment;
}
if (!string.IsNullOrEmpty(weldJoint.PipeAssembly1Id))
{
newWeldJoint.PipeAssembly1Id = weldJoint.PipeAssembly1Id;
}
if (!string.IsNullOrEmpty(weldJoint.PipeAssembly2Id))
{
newWeldJoint.PipeAssembly2Id = weldJoint.PipeAssembly2Id;
}
if (weldJoint.PipeAssemblyCount != null)
{
newWeldJoint.PipeAssemblyCount = weldJoint.PipeAssemblyCount;
}
if (!string.IsNullOrEmpty(weldJoint.HeartNo1))
{
newWeldJoint.HeartNo1 = weldJoint.HeartNo1;
}
if (!string.IsNullOrEmpty(weldJoint.HeartNo2))
{
newWeldJoint.HeartNo2 = weldJoint.HeartNo2;
}
if (!string.IsNullOrEmpty(weldJoint.LastTemp))
{
newWeldJoint.LastTemp = weldJoint.LastTemp;
}
if (!string.IsNullOrEmpty(weldJoint.CellTemp))
{
newWeldJoint.CellTemp = weldJoint.CellTemp;
}
if (!string.IsNullOrEmpty(weldJoint.PrepareTemp))
{
newWeldJoint.PrepareTemp = weldJoint.PrepareTemp;
}
if (!string.IsNullOrEmpty(weldJoint.Electricity))
{
newWeldJoint.Electricity = weldJoint.Electricity;
}
if (!string.IsNullOrEmpty(weldJoint.Voltage))
{
newWeldJoint.Voltage = weldJoint.Voltage;
}
if (!string.IsNullOrEmpty(weldJoint.TestPackageNo))
{
newWeldJoint.TestPackageNo = weldJoint.TestPackageNo;
}
//newWeldJoint.WeldingDailyCode = weldJoint.WeldingDailyCode;
//newWeldJoint.BackingWelderId = weldJoint.BackingWelderId;
//newWeldJoint.CoverWelderId = weldJoint.CoverWelderId;
//newWeldJoint.WeldingDate = weldJoint.WeldingDate;
//newWeldJoint.WeldingDailyId = weldJoint.WeldingDailyId;
//newWeldJoint.PipingClassId = weldJoint.PipingClassId;
if (!string.IsNullOrEmpty(weldJoint.Specification))
{
newWeldJoint.Specification = weldJoint.Specification;
}
//newWeldJoint.DoneDin = weldJoint.DoneDin;
if (!string.IsNullOrEmpty(weldJoint.SystemNumber))
{
newWeldJoint.SystemNumber = weldJoint.SystemNumber;
}
if (!string.IsNullOrEmpty(weldJoint.Remark))
{
newWeldJoint.Remark = weldJoint.Remark;
}
//newWeldJoint.IsCancel = weldJoint.IsCancel;
if (weldJoint.IsGoldJoint != null)
{
newWeldJoint.IsGoldJoint = weldJoint.IsGoldJoint;
}
if (!string.IsNullOrEmpty(weldJoint.WPQId))
{
newWeldJoint.WPQId = weldJoint.WPQId;
}
if (!string.IsNullOrEmpty(weldJoint.DetectionType))
{
newWeldJoint.DetectionType = weldJoint.DetectionType;
}
if (!string.IsNullOrEmpty(weldJoint.PageNum))
{
newWeldJoint.PageNum = weldJoint.PageNum;
}
if (!string.IsNullOrEmpty(weldJoint.ANSISCH))
{
newWeldJoint.ANSISCH = weldJoint.ANSISCH;
}
db.SubmitChanges();
}
}
/// <summary> /// <summary>
/// 根据主键删除焊口信息 /// 根据主键删除焊口信息
/// </summary> /// </summary>

View File

@ -62,7 +62,8 @@ namespace BLL
newWeldReportItem.WeldingLocationId = item.WeldingLocationId; newWeldReportItem.WeldingLocationId = item.WeldingLocationId;
newWeldReportItem.WeldingLocationCode = item.WeldingLocationCode; newWeldReportItem.WeldingLocationCode = item.WeldingLocationCode;
newWeldReportItem.JointAttribute = item.JointAttribute; newWeldReportItem.JointAttribute = item.JointAttribute;
newWeldReportItem.DoneDin = item.DoneDin; newWeldReportItem.DoneDin = item.Size;
newWeldReportItem.Size = item.Size;
newWeldReportItem.Dia = item.Dia; newWeldReportItem.Dia = item.Dia;
newWeldReportItem.Thickness = item.Thickness; newWeldReportItem.Thickness = item.Thickness;
newWeldReportItem.Specification = item.Specification; newWeldReportItem.Specification = item.Specification;
@ -157,14 +158,8 @@ namespace BLL
//newWeldReportItem.WeldMatCode = weldline.WeldMatCode; //newWeldReportItem.WeldMatCode = weldline.WeldMatCode;
if (weldline.DoneDin == null) newWeldReportItem.DoneDin = weldline.Size;
{ newWeldReportItem.Size = weldline.Size;
newWeldReportItem.DoneDin = weldline.Size;
}
else
{
newWeldReportItem.DoneDin = weldline.DoneDin;
}
newWeldReportItem.Dia = weldline.Dia; newWeldReportItem.Dia = weldline.Dia;
newWeldReportItem.Thickness = weldline.Thickness; newWeldReportItem.Thickness = weldline.Thickness;
newWeldReportItem.Specification = weldline.Specification; newWeldReportItem.Specification = weldline.Specification;

View File

@ -1312,6 +1312,7 @@
<Content Include="WeldingProcess\WeldingReport\IsoCmprehensive.aspx" /> <Content Include="WeldingProcess\WeldingReport\IsoCmprehensive.aspx" />
<Content Include="WeldingProcess\WeldingReport\IsoCompreInfo.aspx" /> <Content Include="WeldingProcess\WeldingReport\IsoCompreInfo.aspx" />
<Content Include="WeldingProcess\WeldingReport\JointComprehensive.aspx" /> <Content Include="WeldingProcess\WeldingReport\JointComprehensive.aspx" />
<Content Include="WeldingProcess\WeldingReport\RTRateConfirm.aspx" />
<Content Include="WeldingProcess\WeldingReport\WeldDailyExport.aspx" /> <Content Include="WeldingProcess\WeldingReport\WeldDailyExport.aspx" />
<Content Include="WeldingProcess\WeldingReport\MediaComprehensive.aspx" /> <Content Include="WeldingProcess\WeldingReport\MediaComprehensive.aspx" />
<Content Include="WeldingProcess\WeldingReport\NDEDetectionInformation.aspx" /> <Content Include="WeldingProcess\WeldingReport\NDEDetectionInformation.aspx" />
@ -5792,6 +5793,13 @@
<Compile Include="WeldingProcess\WeldingReport\JointComprehensive.aspx.designer.cs"> <Compile Include="WeldingProcess\WeldingReport\JointComprehensive.aspx.designer.cs">
<DependentUpon>JointComprehensive.aspx</DependentUpon> <DependentUpon>JointComprehensive.aspx</DependentUpon>
</Compile> </Compile>
<Compile Include="WeldingProcess\WeldingReport\RTRateConfirm.aspx.cs">
<DependentUpon>RTRateConfirm.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WeldingProcess\WeldingReport\RTRateConfirm.aspx.designer.cs">
<DependentUpon>RTRateConfirm.aspx</DependentUpon>
</Compile>
<Compile Include="WeldingProcess\WeldingReport\WeldDailyExport.aspx.cs"> <Compile Include="WeldingProcess\WeldingReport\WeldDailyExport.aspx.cs">
<DependentUpon>WeldDailyExport.aspx</DependentUpon> <DependentUpon>WeldDailyExport.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType> <SubType>ASPXCodeBehind</SubType>

View File

@ -2,7 +2,7 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<ProjectView>ProjectFiles</ProjectView> <ProjectView>ProjectFiles</ProjectView>
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig> <LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
<UseIISExpress>true</UseIISExpress> <UseIISExpress>true</UseIISExpress>
<Use64BitIISExpress /> <Use64BitIISExpress />
<IISExpressSSLPort /> <IISExpressSSLPort />

View File

@ -51,7 +51,7 @@
<add path="ChartImg.axd" verb="GET,POST,HEAD" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/> <add path="ChartImg.axd" verb="GET,POST,HEAD" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
<add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=15.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91" validate="false"/> <add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=15.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91" validate="false"/>
</httpHandlers> </httpHandlers>
<compilation debug="false" targetFramework="4.8"> <compilation debug="true" targetFramework="4.8">
<assemblies> <assemblies>
<!--<add assembly="Microsoft.Build.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />--> <!--<add assembly="Microsoft.Build.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />-->
<add assembly="System.Management, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> <add assembly="System.Management, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>

View File

@ -39,6 +39,7 @@
<f:ListItem Value="FeⅡ" Text="FeⅡ"/> <f:ListItem Value="FeⅡ" Text="FeⅡ"/>
<f:ListItem Value="FeⅢ" Text="FeⅢ"/> <f:ListItem Value="FeⅢ" Text="FeⅢ"/>
<f:ListItem Value="FeⅣ" Text="FeⅣ"/> <f:ListItem Value="FeⅣ" Text="FeⅣ"/>
<f:ListItem Value="NiⅢ" Text="NiⅢ"/>
<f:ListItem Value="其它" Text="其它"/> <f:ListItem Value="其它" Text="其它"/>
</f:DropDownList> </f:DropDownList>
</Items> </Items>

View File

@ -112,7 +112,7 @@ namespace FineUIPro.Web.WelderManage
} }
if (!string.IsNullOrEmpty(numSizesMin.Text)) if (!string.IsNullOrEmpty(numSizesMin.Text))
{ {
updateQue.SizesMin = Convert.ToInt32(numSizesMin.Text); updateQue.SizesMin = Convert.ToDecimal(numSizesMin.Text);
} }
else else
{ {
@ -120,7 +120,7 @@ namespace FineUIPro.Web.WelderManage
} }
if (!string.IsNullOrEmpty(numThicknessMax.Text)) if (!string.IsNullOrEmpty(numThicknessMax.Text))
{ {
updateQue.ThicknessMax = Convert.ToInt32(numThicknessMax.Text); updateQue.ThicknessMax = Convert.ToDecimal(numThicknessMax.Text);
} }
else else
{ {

View File

@ -474,7 +474,7 @@ namespace FineUIPro.Web.WelderManage
} }
else else
{ {
if (queProject[2] == ("6G")) if (queProject[2].Contains("6G"))
{ {
weldType = "1,2,3"; weldType = "1,2,3";
} }

View File

@ -627,7 +627,7 @@ namespace FineUIPro.Web.WelderManage
listData.Add(model); listData.Add(model);
} }
string type = "Fe,FeⅡ,FeⅢ,FeⅣ,其他"; string type = "Fe,FeⅡ,FeⅢ,FeⅣ,NiⅢ,其它";
var isAnyMeaterail = weldMeatrail.Split(','); var isAnyMeaterail = weldMeatrail.Split(',');
foreach (var item in isAnyMeaterail) foreach (var item in isAnyMeaterail)
{ {
@ -637,7 +637,7 @@ namespace FineUIPro.Web.WelderManage
model.rowId = i; model.rowId = i;
model.createdTime = DateTime.Now; model.createdTime = DateTime.Now;
model.columnName = "焊接材质"; model.columnName = "焊接材质";
model.errMsg = "材质应为Fe,FeⅡ,FeⅢ,FeⅣ,其他,多个用','隔开"; model.errMsg = "材质应为Fe,FeⅡ,FeⅢ,FeⅣ,NiⅢ,其它,多个用','隔开";
model.isSuccess = false; model.isSuccess = false;
listData.Add(model); listData.Add(model);

View File

@ -486,6 +486,11 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage
List<Model.View_Batch_NDEItem> GetNDEItem = this.CollectGridNDEItem(); List<Model.View_Batch_NDEItem> GetNDEItem = this.CollectGridNDEItem();
string errlog = string.Empty; string errlog = string.Empty;
if (GetNDEItem.Count()==0)
{
ShowNotify("请勾选检测细明!", MessageBoxIcon.Warning);
return;
}
foreach (var item in GetNDEItem) foreach (var item in GetNDEItem)
{ {
var oldItem = BLL.Batch_NDEItemService.GetNDEItemById(item.NDEItemID); var oldItem = BLL.Batch_NDEItemService.GetNDEItemById(item.NDEItemID);

View File

@ -73,15 +73,18 @@
</f:HiddenField> </f:HiddenField>
<f:ToolbarFill ID="ToolbarFill1" runat="server"> <f:ToolbarFill ID="ToolbarFill1" runat="server">
</f:ToolbarFill> </f:ToolbarFill>
<f:Button ID="btnSave" Text="<%$ Resources:Lan,Save %>" ToolTip="<%$ Resources:Lan,Save %>" <f:Button ID="btnSave" Text="<%$ Resources:Lan,Submit %>" ToolTip="<%$ Resources:Lan,Submit %>"
Icon="SystemSave" runat="server" OnClick="btnSave_Click"> Icon="SystemSave" runat="server" OnClick="btnSave_Click">
</f:Button> </f:Button>
<f:Button ID="btnPointAudit" Text="扩透口审核" ToolTip="监理审核后才可生成委托单" Icon="ArrowNsew" runat="server" <f:Button ID="btnPointAudit" Text="扩透口审核" ToolTip="监理审核后才可生成委托单" Icon="ArrowNsew" runat="server"
OnClick="btnPointAudit_Click" Hidden="true"> OnClick="btnPointAudit_Click" Hidden="true">
</f:Button> </f:Button>
<f:Button ID="btnGenerate" Text="生成" ToolTip="生成委托单" Icon="TableEdit" runat="server" <f:Button ID="btnGenerate" Text="生成" ToolTip="生成委托单" Icon="TableEdit" runat="server"
OnClick="btnGenerate_Click" > OnClick="btnGenerate_Click" Hidden="true">
</f:Button> </f:Button>
<f:button id="btnDelete" text="<%$ Resources:Lan,Delete %>" icon="Delete" runat="server"
onclick="btnDelete_Click">
</f:button>
<f:Button ID="btnSee" Text="查看底片" OnClick="btnSee_Click" runat="server"></f:Button> <f:Button ID="btnSee" Text="查看底片" OnClick="btnSee_Click" runat="server"></f:Button>
</Items> </Items>
</f:Toolbar> </f:Toolbar>

View File

@ -7,6 +7,7 @@ using System.Web;
using System.Web.UI; using System.Web.UI;
using System.Web.UI.WebControls; using System.Web.UI.WebControls;
using BLL; using BLL;
using NPOI.SS.Formula.Functions;
namespace FineUIPro.Web.WeldingProcess.CheckManage namespace FineUIPro.Web.WeldingProcess.CheckManage
{ {
@ -239,7 +240,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage
JointArea,Size,WeldingDate,PipelineCode,PipingClassName JointArea,Size,WeldingDate,PipelineCode,PipingClassName
FROM dbo.View_Batch_PointBatchItem FROM dbo.View_Batch_PointBatchItem
WHERE ProjectId=@ProjectId AND DetectionTypeId=@DetectionTypeId WHERE ProjectId=@ProjectId AND DetectionTypeId=@DetectionTypeId
AND (PointDate IS NULL OR (PointDate IS NOT NULL AND RepairRecordId=@RepairRecordId))"; AND (PState IS NULL OR (PState='2' AND RepairRecordId=@RepairRecordId))";
} }
List<SqlParameter> listStr = new List<SqlParameter>(); List<SqlParameter> listStr = new List<SqlParameter>();
@ -392,32 +393,107 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage
if (ckbIsCut.Checked) if (ckbIsCut.Checked)
{ {
repair.IsCut = true; repair.IsCut = true;
repair.RepairRecordCode = repair.RepairRecordCode.Substring(0, repair.RepairRecordCode.Length - 1) + "C"; repair.RepairRecordCode = repair.RepairRecordCode.Substring(0, repair.RepairRecordCode.Length - 2) + "C1";
//先还原
var joint = BLL.Pipeline_WeldJointService.GetWeldJointByWeldJointId(repair.WeldJointId);
if (!string.IsNullOrEmpty(joint.OldWeldJointCode))
{
joint.WeldJointCode = joint.OldWeldJointCode;
joint.OldWeldJointCode = null;
Funs.DB.SubmitChanges();
}
// 回写焊口号
var rjot = BLL.Pipeline_WeldJointService.GetWeldJointByWeldJointId(repair.WeldJointId);
rjot.WeldJointCode = rjot.WeldJointCode.Replace("R1","").Replace("P1", "").Replace("S1", "").Trim() + "C1";
rjot.OldWeldJointCode = rjot.WeldJointCode;
Funs.DB.SubmitChanges();
}
else
{
// 回写焊口号 撤消
var joint = BLL.Pipeline_WeldJointService.GetWeldJointByWeldJointId(repair.WeldJointId);
if (joint.WeldJointCode.Contains("C1") && joint.OldWeldJointCode != null)
{
joint.WeldJointCode = joint.OldWeldJointCode;
joint.OldWeldJointCode = null;
Funs.DB.SubmitChanges();
}
} }
} }
// 更新返修口 #region
var batchItem = db.Batch_PointBatchItem.FirstOrDefault(x => x.WeldJointId == repair.WeldJointId && x.RepairDate == null); //var batchItem = db.Batch_PointBatchItem.FirstOrDefault(x => x.WeldJointId == repair.WeldJointId && x.RepairDate == null);
if (batchItem != null) //if (batchItem != null)
//{
// batchItem.RepairDate = Convert.ToDateTime(this.txtRepairDate.Text);
// batchItem.RepairRecordId = repairRecordId;
// if (ckbIsCut.Checked)
// {
// batchItem.CutDate = DateTime.Now.Date;
// }
// db.SubmitChanges();
//}
//else
//{
// var updatebatchItem = db.Batch_PointBatchItem.FirstOrDefault(x => x.WeldJointId == repair.WeldJointId && x.RepairRecordId == repairRecordId);
// if (updatebatchItem != null)
// {
// updatebatchItem.RepairDate = Convert.ToDateTime(this.txtRepairDate.Text);
// db.SubmitChanges();
// }
//}
#endregion
// 点口状态3表示返修口
var repairbatchItem = db.Batch_PointBatchItem.FirstOrDefault(x => x.WeldJointId == repair.WeldJointId && x.RepairRecordId == repairRecordId && (x.PointState == "3" || x.PointState == "4" || x.PointState == "5"));
var repairbatch = (from x in db.Batch_PointBatchItem
join y in db.Batch_PointBatch on x.PointBatchId equals y.PointBatchId
where x.WeldJointId==repair.WeldJointId && y.DetectionTypeId==repair.DetectionTypeId
select x).FirstOrDefault();
if (repairbatchItem == null) // 增加返修口
{ {
batchItem.RepairDate = Convert.ToDateTime(this.txtRepairDate.Text); if (repairbatch != null)
batchItem.RepairRecordId = repairRecordId;
if (ckbIsCut.Checked)
{ {
batchItem.CutDate = DateTime.Now.Date; if (ckbIsCut.Checked) // 切除
} {
db.SubmitChanges(); repairbatch.CutDate = DateTime.Now.Date;
}
else
{
Model.Batch_PointBatchItem addRepairPointBatch = new Model.Batch_PointBatchItem();
string itemId = SQLHelper.GetNewID(typeof(Model.Batch_PointBatchItem));
addRepairPointBatch.PointBatchItemId = itemId;
addRepairPointBatch.PointBatchId = repairbatch.PointBatchId;
addRepairPointBatch.WeldJointId = repair.WeldJointId;
addRepairPointBatch.WeldingDate = Convert.ToDateTime(this.txtRepairDate.Text);
addRepairPointBatch.RepairDate = Convert.ToDateTime(this.txtRepairDate.Text);
addRepairPointBatch.AcceptLevel = repairbatch.AcceptLevel;
addRepairPointBatch.PointDate = DateTime.Now;
addRepairPointBatch.RepairRecordId = repairRecordId;
addRepairPointBatch.IsCheckRepair = false;
addRepairPointBatch.EnterDate= DateTime.Now;
if (repair.RepairMark.Contains("R"))
{
addRepairPointBatch.PointState = "3";
}
if (repair.RepairMark.Contains("P"))
{
addRepairPointBatch.PointState = "4";
}
if (repair.RepairMark.Contains("S"))
{
addRepairPointBatch.PointState = "5";
}
BLL.Batch_PointBatchItemService.AddPointBatchItem(addRepairPointBatch);
}
}
} }
else else
{ {
var updatebatchItem = db.Batch_PointBatchItem.FirstOrDefault(x => x.WeldJointId == repair.WeldJointId && x.RepairRecordId == repairRecordId); repairbatchItem.RepairDate = Convert.ToDateTime(this.txtRepairDate.Text);
if (updatebatchItem != null) db.SubmitChanges();
{
updatebatchItem.RepairDate = Convert.ToDateTime(this.txtRepairDate.Text);
db.SubmitChanges();
}
} }
var exp = BLL.RepairRecordService.GetExportItem(repairRecordId); var exp = BLL.RepairRecordService.GetExportItem(repairRecordId);
if (exp != null) if (exp != null)
@ -433,8 +509,14 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage
newPointBatchItem.RepairRecordId = null; newPointBatchItem.RepairRecordId = null;
db.SubmitChanges(); db.SubmitChanges();
} }
// 回写焊口号
var joint = BLL.Pipeline_WeldJointService.GetWeldJointByWeldJointId(item.WeldJointId);
joint.WeldJointCode = joint.OldWeldJointCode;
joint.OldWeldJointCode = null;
Funs.DB.SubmitChanges();
} }
} }
// 更新扩透口 // 更新扩透口
string[] checkedRow = Grid1.SelectedRowIDArray; string[] checkedRow = Grid1.SelectedRowIDArray;
if (checkedRow.Count() > 0) if (checkedRow.Count() > 0)
@ -451,6 +533,15 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage
newPointBatchItem.PointDate = DateTime.Now; newPointBatchItem.PointDate = DateTime.Now;
newPointBatchItem.RepairRecordId = repairRecordId; newPointBatchItem.RepairRecordId = repairRecordId;
db.SubmitChanges(); db.SubmitChanges();
// 回写焊口号
var joint = BLL.Pipeline_WeldJointService.GetWeldJointByWeldJointId(newPointBatchItem.WeldJointId);
if (!joint.WeldJointCode.Contains("EX1"))
{
joint.WeldJointCode = joint.WeldJointCode + "EX1";
joint.OldWeldJointCode = joint.WeldJointCode;
Funs.DB.SubmitChanges();
}
} }
// 大于500的焊口扩透口是自身这时要增加批明细 // 大于500的焊口扩透口是自身这时要增加批明细
else else
@ -472,8 +563,17 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage
addPointBatchItem.IsCheckRepair = false; addPointBatchItem.IsCheckRepair = false;
BLL.Batch_PointBatchItemService.AddPointBatchItem(addPointBatchItem); BLL.Batch_PointBatchItemService.AddPointBatchItem(addPointBatchItem);
// 回写焊口号 不用回写,本身是返修口又是扩透口
//var joint = BLL.Pipeline_WeldJointService.GetWeldJointByWeldJointId(repair.WeldJointId);
//joint.WeldJointCode = joint.WeldJointCode + "EX1";
//joint.OldWeldJointCode = joint.WeldJointCode;
//Funs.DB.SubmitChanges();
} }
} }
} }
} }
} }
@ -492,6 +592,52 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage
} }
} }
protected void btnDelete_Click(object sender, EventArgs e)
{
if (CurrUser.UserId == Const.GlyId)
{
Model.HJGLDB db = Funs.DB;
string repairRecordId = tvControlItem.SelectedNodeID;
var repair = db.Repair_RepairRecord.FirstOrDefault(x => x.RepairRecordId == repairRecordId);
var repairTrust = from x in db.Batch_PointBatchItem where x.RepairRecordId == repairRecordId && (x.PointState == "2" || x.PointState == "3") select x;
if (repairTrust.Count() > 0)
{
ShowNotify("返修扩透数据已提交,不能删除!", MessageBoxIcon.Warning);
return;
}
// 回写焊口
var joint = BLL.Pipeline_WeldJointService.GetWeldJointByWeldJointId(repair.WeldJointId);
if (!string.IsNullOrEmpty(joint.OldWeldJointCode))
{
joint.WeldJointCode = joint.OldWeldJointCode;
joint.OldWeldJointCode = null;
Funs.DB.SubmitChanges();
}
//var exp = BLL.RepairRecordService.GetExportItem(repairRecordId);
//if (exp != null)
//{
// foreach (Model.Batch_PointBatchItem item in exp)
// {
// Model.Batch_PointBatchItem newPointBatchItem = db.Batch_PointBatchItem.FirstOrDefault(x => x.PointBatchItemId == item.PointBatchItemId);
// newPointBatchItem.PointState = null;
// newPointBatchItem.PointDate = null;
// newPointBatchItem.RepairRecordId = null;
// db.SubmitChanges();
// }
//}
db.Repair_RepairRecord.DeleteOnSubmit(repair);
db.SubmitChanges();
this.InitTreeMenu();//加载树
Alert.ShowInTop("删除成功!", MessageBoxIcon.Success);
}
else
{
ShowNotify(Resources.Lan.NoPrivilegePrompt, MessageBoxIcon.Warning);
return;
}
}
protected void btnPointAudit_Click(object sender, EventArgs e) protected void btnPointAudit_Click(object sender, EventArgs e)
{ {
Model.HJGLDB db = Funs.DB; Model.HJGLDB db = Funs.DB;
@ -534,9 +680,13 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage
Model.Repair_RepairRecord repairRecord = BLL.RepairRecordService.GetRepairRecordById(repairRecordId); Model.Repair_RepairRecord repairRecord = BLL.RepairRecordService.GetRepairRecordById(repairRecordId);
var pipe = BLL.Pipeline_WeldJointService.GetViewWeldJointById(repairRecord.WeldJointId); var pipe = BLL.Pipeline_WeldJointService.GetViewWeldJointById(repairRecord.WeldJointId);
string pipelineId = string.Empty; string pipelineId = string.Empty;
string weldingMethodId = string.Empty;
string grooveTypeId = string.Empty;
if (pipe != null) if (pipe != null)
{ {
pipelineId = pipe.PipelineId; pipelineId = pipe.PipelineId;
weldingMethodId = pipe.WeldingMethodId;
grooveTypeId = pipe.GrooveTypeId;
} }
var t = from x in Funs.DB.Batch_BatchTrustItem where x.RepairRecordId == repairRecordId select x; var t = from x in Funs.DB.Batch_BatchTrustItem where x.RepairRecordId == repairRecordId select x;
if (t.Count() == 0) if (t.Count() == 0)
@ -557,6 +707,9 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage
newRepairTrust.WorkAreaId = repairRecord.WorkAreaId; newRepairTrust.WorkAreaId = repairRecord.WorkAreaId;
newRepairTrust.DetectionTypeId = repairRecord.DetectionTypeId; newRepairTrust.DetectionTypeId = repairRecord.DetectionTypeId;
newRepairTrust.PipelineId = pipelineId; newRepairTrust.PipelineId = pipelineId;
newRepairTrust.WeldingMethodId = weldingMethodId;
newRepairTrust.GrooveTypeId = grooveTypeId;
BLL.Batch_BatchTrustService.AddBatchTrust(newRepairTrust); // 新增返修委托单 BLL.Batch_BatchTrustService.AddBatchTrust(newRepairTrust); // 新增返修委托单
Model.Batch_BatchTrustItem newRepairTrustItem = new Model.Batch_BatchTrustItem(); Model.Batch_BatchTrustItem newRepairTrustItem = new Model.Batch_BatchTrustItem();
@ -572,6 +725,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage
var exp = BLL.RepairRecordService.GetExportItem(repairRecordId); var exp = BLL.RepairRecordService.GetExportItem(repairRecordId);
if (exp != null) if (exp != null)
{ {
var jot = BLL.Pipeline_WeldJointService.GetWeldJointByWeldJointId(exp.First().WeldJointId);
string exportTrustCode = string.Empty; string exportTrustCode = string.Empty;
if (repairRecord.RepairRecordCode.Substring(repairRecord.RepairRecordCode.Length - 5) == "EX1R2") if (repairRecord.RepairRecordCode.Substring(repairRecord.RepairRecordCode.Length - 5) == "EX1R2")
{ {
@ -600,6 +754,8 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage
newExportTrust.WorkAreaId = repairRecord.WorkAreaId; newExportTrust.WorkAreaId = repairRecord.WorkAreaId;
newExportTrust.DetectionTypeId = repairRecord.DetectionTypeId; newExportTrust.DetectionTypeId = repairRecord.DetectionTypeId;
newExportTrust.PipelineId = pipelineId; newExportTrust.PipelineId = pipelineId;
newExportTrust.WeldingMethodId = jot.WeldingMethodId;
newExportTrust.GrooveTypeId = jot.GrooveTypeId;
BLL.Batch_BatchTrustService.AddBatchTrust(newExportTrust); // 新增扩透委托单 BLL.Batch_BatchTrustService.AddBatchTrust(newExportTrust); // 新增扩透委托单
foreach (var q in exp) foreach (var q in exp)

View File

@ -7,11 +7,13 @@
// </自动生成> // </自动生成>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace FineUIPro.Web.WeldingProcess.CheckManage { namespace FineUIPro.Web.WeldingProcess.CheckManage
{
public partial class RepairAndExpand {
public partial class RepairAndExpand
{
/// <summary> /// <summary>
/// form1 控件。 /// form1 控件。
/// </summary> /// </summary>
@ -20,7 +22,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1; protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary> /// <summary>
/// PageManager1 控件。 /// PageManager1 控件。
/// </summary> /// </summary>
@ -29,7 +31,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.PageManager PageManager1; protected global::FineUIPro.PageManager PageManager1;
/// <summary> /// <summary>
/// Panel1 控件。 /// Panel1 控件。
/// </summary> /// </summary>
@ -38,7 +40,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.Panel Panel1; protected global::FineUIPro.Panel Panel1;
/// <summary> /// <summary>
/// panelLeftRegion 控件。 /// panelLeftRegion 控件。
/// </summary> /// </summary>
@ -47,7 +49,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.Panel panelLeftRegion; protected global::FineUIPro.Panel panelLeftRegion;
/// <summary> /// <summary>
/// Toolbar4 控件。 /// Toolbar4 控件。
/// </summary> /// </summary>
@ -56,7 +58,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.Toolbar Toolbar4; protected global::FineUIPro.Toolbar Toolbar4;
/// <summary> /// <summary>
/// drpTrust 控件。 /// drpTrust 控件。
/// </summary> /// </summary>
@ -65,7 +67,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.DropDownList drpTrust; protected global::FineUIPro.DropDownList drpTrust;
/// <summary> /// <summary>
/// Toolbar1 控件。 /// Toolbar1 控件。
/// </summary> /// </summary>
@ -74,7 +76,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.Toolbar Toolbar1; protected global::FineUIPro.Toolbar Toolbar1;
/// <summary> /// <summary>
/// txtRepairMonth 控件。 /// txtRepairMonth 控件。
/// </summary> /// </summary>
@ -83,7 +85,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.DatePicker txtRepairMonth; protected global::FineUIPro.DatePicker txtRepairMonth;
/// <summary> /// <summary>
/// Toolbar5 控件。 /// Toolbar5 控件。
/// </summary> /// </summary>
@ -92,7 +94,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.Toolbar Toolbar5; protected global::FineUIPro.Toolbar Toolbar5;
/// <summary> /// <summary>
/// txtSearchCode 控件。 /// txtSearchCode 控件。
/// </summary> /// </summary>
@ -101,7 +103,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.TextBox txtSearchCode; protected global::FineUIPro.TextBox txtSearchCode;
/// <summary> /// <summary>
/// tvControlItem 控件。 /// tvControlItem 控件。
/// </summary> /// </summary>
@ -110,7 +112,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.Tree tvControlItem; protected global::FineUIPro.Tree tvControlItem;
/// <summary> /// <summary>
/// panelCenterRegion 控件。 /// panelCenterRegion 控件。
/// </summary> /// </summary>
@ -119,7 +121,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.Panel panelCenterRegion; protected global::FineUIPro.Panel panelCenterRegion;
/// <summary> /// <summary>
/// Toolbar2 控件。 /// Toolbar2 控件。
/// </summary> /// </summary>
@ -128,7 +130,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.Toolbar Toolbar2; protected global::FineUIPro.Toolbar Toolbar2;
/// <summary> /// <summary>
/// hdNDEID 控件。 /// hdNDEID 控件。
/// </summary> /// </summary>
@ -137,7 +139,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.HiddenField hdNDEID; protected global::FineUIPro.HiddenField hdNDEID;
/// <summary> /// <summary>
/// ToolbarFill1 控件。 /// ToolbarFill1 控件。
/// </summary> /// </summary>
@ -146,7 +148,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.ToolbarFill ToolbarFill1; protected global::FineUIPro.ToolbarFill ToolbarFill1;
/// <summary> /// <summary>
/// btnSave 控件。 /// btnSave 控件。
/// </summary> /// </summary>
@ -155,7 +157,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.Button btnSave; protected global::FineUIPro.Button btnSave;
/// <summary> /// <summary>
/// btnPointAudit 控件。 /// btnPointAudit 控件。
/// </summary> /// </summary>
@ -164,7 +166,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.Button btnPointAudit; protected global::FineUIPro.Button btnPointAudit;
/// <summary> /// <summary>
/// btnGenerate 控件。 /// btnGenerate 控件。
/// </summary> /// </summary>
@ -173,7 +175,16 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.Button btnGenerate; protected global::FineUIPro.Button btnGenerate;
/// <summary>
/// btnDelete 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnDelete;
/// <summary> /// <summary>
/// btnSee 控件。 /// btnSee 控件。
/// </summary> /// </summary>
@ -182,7 +193,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.Button btnSee; protected global::FineUIPro.Button btnSee;
/// <summary> /// <summary>
/// SimpleForm1 控件。 /// SimpleForm1 控件。
/// </summary> /// </summary>
@ -191,7 +202,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.Form SimpleForm1; protected global::FineUIPro.Form SimpleForm1;
/// <summary> /// <summary>
/// txtPipeCode 控件。 /// txtPipeCode 控件。
/// </summary> /// </summary>
@ -200,7 +211,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.Label txtPipeCode; protected global::FineUIPro.Label txtPipeCode;
/// <summary> /// <summary>
/// txtWeldJointCode 控件。 /// txtWeldJointCode 控件。
/// </summary> /// </summary>
@ -209,7 +220,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.Label txtWeldJointCode; protected global::FineUIPro.Label txtWeldJointCode;
/// <summary> /// <summary>
/// txtRepairLocation 控件。 /// txtRepairLocation 控件。
/// </summary> /// </summary>
@ -218,7 +229,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.Label txtRepairLocation; protected global::FineUIPro.Label txtRepairLocation;
/// <summary> /// <summary>
/// txtWelder 控件。 /// txtWelder 控件。
/// </summary> /// </summary>
@ -227,7 +238,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.Label txtWelder; protected global::FineUIPro.Label txtWelder;
/// <summary> /// <summary>
/// txtJudgeGrade 控件。 /// txtJudgeGrade 控件。
/// </summary> /// </summary>
@ -236,7 +247,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.Label txtJudgeGrade; protected global::FineUIPro.Label txtJudgeGrade;
/// <summary> /// <summary>
/// txtCheckDefects 控件。 /// txtCheckDefects 控件。
/// </summary> /// </summary>
@ -245,7 +256,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.Label txtCheckDefects; protected global::FineUIPro.Label txtCheckDefects;
/// <summary> /// <summary>
/// drpRepairWelder 控件。 /// drpRepairWelder 控件。
/// </summary> /// </summary>
@ -254,7 +265,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.DropDownList drpRepairWelder; protected global::FineUIPro.DropDownList drpRepairWelder;
/// <summary> /// <summary>
/// txtRepairDate 控件。 /// txtRepairDate 控件。
/// </summary> /// </summary>
@ -263,7 +274,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.DatePicker txtRepairDate; protected global::FineUIPro.DatePicker txtRepairDate;
/// <summary> /// <summary>
/// ckbIsCut 控件。 /// ckbIsCut 控件。
/// </summary> /// </summary>
@ -272,7 +283,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.CheckBox ckbIsCut; protected global::FineUIPro.CheckBox ckbIsCut;
/// <summary> /// <summary>
/// lbIsAudit 控件。 /// lbIsAudit 控件。
/// </summary> /// </summary>
@ -281,7 +292,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.Label lbIsAudit; protected global::FineUIPro.Label lbIsAudit;
/// <summary> /// <summary>
/// Grid1 控件。 /// Grid1 控件。
/// </summary> /// </summary>
@ -290,7 +301,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.Grid Grid1; protected global::FineUIPro.Grid Grid1;
/// <summary> /// <summary>
/// Toolbar3 控件。 /// Toolbar3 控件。
/// </summary> /// </summary>
@ -299,7 +310,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.Toolbar Toolbar3; protected global::FineUIPro.Toolbar Toolbar3;
/// <summary> /// <summary>
/// ckbWelder 控件。 /// ckbWelder 控件。
/// </summary> /// </summary>
@ -308,7 +319,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.CheckBox ckbWelder; protected global::FineUIPro.CheckBox ckbWelder;
/// <summary> /// <summary>
/// ckbPipe 控件。 /// ckbPipe 控件。
/// </summary> /// </summary>
@ -317,7 +328,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.CheckBox ckbPipe; protected global::FineUIPro.CheckBox ckbPipe;
/// <summary> /// <summary>
/// ckbRepairBefore 控件。 /// ckbRepairBefore 控件。
/// </summary> /// </summary>
@ -326,7 +337,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.CheckBox ckbRepairBefore; protected global::FineUIPro.CheckBox ckbRepairBefore;
/// <summary> /// <summary>
/// ckbMat 控件。 /// ckbMat 控件。
/// </summary> /// </summary>
@ -335,7 +346,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.CheckBox ckbMat; protected global::FineUIPro.CheckBox ckbMat;
/// <summary> /// <summary>
/// ckbSpec 控件。 /// ckbSpec 控件。
/// </summary> /// </summary>
@ -344,7 +355,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.CheckBox ckbSpec; protected global::FineUIPro.CheckBox ckbSpec;
/// <summary> /// <summary>
/// ToolbarSeparator1 控件。 /// ToolbarSeparator1 控件。
/// </summary> /// </summary>
@ -353,7 +364,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
/// <summary> /// <summary>
/// ToolbarText1 控件。 /// ToolbarText1 控件。
/// </summary> /// </summary>
@ -362,7 +373,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.ToolbarText ToolbarText1; protected global::FineUIPro.ToolbarText ToolbarText1;
/// <summary> /// <summary>
/// ddlPageSize 控件。 /// ddlPageSize 控件。
/// </summary> /// </summary>
@ -371,7 +382,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.DropDownList ddlPageSize; protected global::FineUIPro.DropDownList ddlPageSize;
/// <summary> /// <summary>
/// Window1 控件。 /// Window1 控件。
/// </summary> /// </summary>

View File

@ -2,6 +2,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using BLL; using BLL;
using NPOI.SS.Formula.Functions;
namespace FineUIPro.Web.WeldingProcess.CheckManage namespace FineUIPro.Web.WeldingProcess.CheckManage
{ {
@ -27,7 +28,18 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage
select x; select x;
if (mark.Count() == 0) if (mark.Count() == 0)
{ {
txtRepairMark.Text = "R1"; if (q.PassFilm != q.TotalFilm)
{
txtRepairMark.Text = "R1";
}
if (q.Remark.Contains("修磨"))
{
txtRepairMark.Text = "P1";
}
if (q.Remark.Contains("异物"))
{
txtRepairMark.Text = "S1";
}
} }
else else
{ {
@ -57,54 +69,159 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage
var repair = BLL.RepairRecordService.GetRepairRecordByNdeItemId(ndeItemId); var repair = BLL.RepairRecordService.GetRepairRecordByNdeItemId(ndeItemId);
Model.Repair_RepairRecord newItem = new Model.Repair_RepairRecord(); Model.Repair_RepairRecord newItem = new Model.Repair_RepairRecord();
string newJointCode = string.Empty;
if (repair == null) if (repair == null)
{ {
newItem.RepairRecordId = SQLHelper.GetNewID(typeof(Model.Repair_RepairRecord)); if (q.CheckResult != null)
{
newItem.RepairRecordId = SQLHelper.GetNewID(typeof(Model.Repair_RepairRecord));
string code = q.TrustBatchCode; string code = q.TrustBatchCode;
if (code.Substring(code.Length - 2, 1) == "R") if (code.Substring(code.Length - 2, 1) == "R")
{
string first = code.Substring(0, code.Length - 1);
string last = code.Substring(code.Length - 1);
int n = Convert.ToInt32(last) + 1;
newItem.RepairRecordCode = first + n.ToString();
}
else
{
if (code.Substring(code.Length - 3, 2) == "EX")
{ {
newItem.RepairRecordCode = q.TrustBatchCode.Substring(0, code.Length - 3) + "-" + q.WeldJointCode + "EX1R1"; string first = code.Substring(0, code.Length - 1);
string last = code.Substring(code.Length - 1);
int n = Convert.ToInt32(last) + 1;
newItem.RepairRecordCode = first + n.ToString();
newJointCode = q.WeldJointCode.Substring(0, q.WeldJointCode.Length - 2) + "R" + n.ToString();
} }
else else
{ {
if (q.Remark.Contains("修磨")) if (q.CheckResult != "1") // 不合格
{ {
newItem.RepairRecordCode = q.TrustBatchCode + "-" + q.WeldJointCode + "P1"; if (code.Substring(code.Length - 3, 2) == "EX")
{
newItem.RepairRecordCode = q.TrustBatchCode.Substring(0, code.Length - 3) + "-" + "EX1R1";
}
else
{
newItem.RepairRecordCode = q.TrustBatchCode + "R1";
}
if (!q.WeldJointCode.Contains("R1"))
{
newJointCode = q.WeldJointCode + "R1";
}
else
{
newJointCode = q.WeldJointCode;
}
} }
else if (q.Remark.Contains("异物")) else // 合格但有修磨或异物
{ {
newItem.RepairRecordCode = q.TrustBatchCode + "-" + q.WeldJointCode + "S1"; if (q.Remark.Contains("修磨"))
} {
else newItem.RepairRecordCode = q.TrustBatchCode + "P1";
{ if (!q.WeldJointCode.Contains("P1"))
newItem.RepairRecordCode = q.TrustBatchCode + "-" + q.WeldJointCode + "R1"; {
newJointCode = q.WeldJointCode + "P1";
}
else
{
newJointCode = q.WeldJointCode;
}
}
if (q.Remark.Contains("异物"))
{
newItem.RepairRecordCode = q.TrustBatchCode + "S1";
if (!q.WeldJointCode.Contains("S1"))
{
newJointCode = q.WeldJointCode + "S1";
}
else
{
newJointCode = q.WeldJointCode;
}
}
} }
#region
//if (code.Substring(code.Length - 3, 2) == "EX")
//{
// newItem.RepairRecordCode = q.TrustBatchCode.Substring(0, code.Length - 3) + "-" + "EX1R1";
// if (!q.WeldJointCode.Contains("R1"))
// {
// newJointCode = q.WeldJointCode + "R1";
// }
// else
// {
// newJointCode = q.WeldJointCode;
// }
//}
//else
//{
// if (q.Remark.Contains("修磨"))
// {
// newItem.RepairRecordCode = q.TrustBatchCode + "P1";
// if (!q.WeldJointCode.Contains("P1"))
// {
// newJointCode = q.WeldJointCode + "P1";
// }
// else
// {
// newJointCode = q.WeldJointCode;
// }
// }
// else if (q.Remark.Contains("异物"))
// {
// newItem.RepairRecordCode = q.TrustBatchCode + "S1";
// if (!q.WeldJointCode.Contains("S1"))
// {
// newJointCode = q.WeldJointCode + "S1";
// }
// else
// {
// newJointCode = q.WeldJointCode;
// }
// }
// else
// {
// newItem.RepairRecordCode = q.TrustBatchCode + "R1";
// if (!q.WeldJointCode.Contains("R1"))
// {
// newJointCode = q.WeldJointCode + "R1";
// }
// else
// {
// newJointCode = q.WeldJointCode;
// }
// }
//}
#endregion
} }
var isExistRepairRecordCode = from x in Funs.DB.Repair_RepairRecord where x.RepairRecordCode == newItem.RepairRecordCode select x;
if (isExistRepairRecordCode.Count() > 0)
{
ShowNotify("该返修号已存在!请修改已存在的返修号", MessageBoxIcon.Warning);
return;
}
newItem.ProjectId = q.ProjectId;
newItem.UnitId = q.UnitId;
newItem.InstallationId = q.InstallationId;
newItem.WorkAreaId = q.WorkAreaId;
newItem.NoticeDate = DateTime.Now;
newItem.NDEItemID = ndeItemId;
newItem.WeldJointId = q.WeldJointId;
newItem.DetectionTypeId = q.DetectionTypeId;
newItem.WelderId = q.BackingWelderId;
newItem.RepairLocation = q.RepairLocation;
newItem.CheckDefects = txtCheckDefects.Text;
newItem.RepairMark = txtRepairMark.Text;
newItem.PhotoUrl = imgPhoto.ImageUrl;
BLL.RepairRecordService.AddRepairRecord(newItem);
// 回写焊口号
var joint = BLL.Pipeline_WeldJointService.GetWeldJointByWeldJointId(q.WeldJointId);
joint.WeldJointCode = newJointCode;
joint.OldWeldJointCode = q.WeldJointCode;
Funs.DB.SubmitChanges();
}
else
{
ShowNotify("没有检测结果!不能生成委托单", MessageBoxIcon.Warning);
} }
newItem.ProjectId = q.ProjectId;
newItem.UnitId = q.UnitId;
newItem.InstallationId = q.InstallationId;
newItem.WorkAreaId = q.WorkAreaId;
newItem.NoticeDate = DateTime.Now;
newItem.NDEItemID = ndeItemId;
newItem.WeldJointId = q.WeldJointId;
newItem.DetectionTypeId = q.DetectionTypeId;
newItem.WelderId = q.BackingWelderId;
newItem.RepairLocation = q.RepairLocation;
newItem.CheckDefects = txtCheckDefects.Text;
newItem.RepairMark = txtRepairMark.Text;
newItem.PhotoUrl = imgPhoto.ImageUrl;
BLL.RepairRecordService.AddRepairRecord(newItem);
} }
else else
{ {

View File

@ -36,6 +36,23 @@
.f-grid-row.Purple { .f-grid-row.Purple {
background-color: Purple; background-color: Purple;
} }
/*定义父容器*/
.content {
width: 550px;
height: 30px;
background: #E4F1FB;
margin: 0 auto;
}
/*定义进度条*/
.box {
width: 0px;
height: 30px;
line-height: 30px;
text-align: center;
background: #3BAAE3;
color: #fff;
}
</style> </style>
</head> </head>
<body> <body>
@ -293,6 +310,23 @@
EnableMaximize="true" Target="Top" EnableResize="true" runat="server" EnableMaximize="true" Target="Top" EnableResize="true" runat="server"
IsModal="true" Width="1000px" Height="520px"> IsModal="true" Width="1000px" Height="520px">
</f:Window> </f:Window>
<f:Window ID="WindowExport" Hidden="true" runat="server" MinHeight="30px"
Target="Parent" ShowHeader="false" BodyPadding="0" Margin="0"
IsModal="true" Width="550px" Height="30px">
<Items>
<f:ContentPanel ShowBorder="false" Height="30px" ShowHeader="false" ID="ContentPanel3" runat="server">
<div class="content" id="content">
<div class="box" id="box"></div>
</div>
</f:ContentPanel>
</Items>
</f:Window>
<asp:ScriptManager ID="ScriptManager2" runat="server" EnablePageMethods="true">
<Scripts>
<asp:ScriptReference Path="~/res/ProcessBar.js" />
</Scripts>
</asp:ScriptManager>
</form> </form>
<script type="text/javascript"> <script type="text/javascript">
// 返回false来阻止浏览器右键菜单 // 返回false来阻止浏览器右键菜单

View File

@ -2,23 +2,19 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Data; using System.Data;
using System.Data.SqlClient; using System.Data.SqlClient;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;
using System.Runtime.InteropServices; using System.Threading;
using System.Web; using System.Web;
using System.Web.UI; using System.Web.UI;
using System.Web.UI.WebControls; using System.Web.UI.WebControls;
using System.Windows.Forms;
using BLL; using BLL;
using FineUIPro.Web.Common.ProjectSet;
using Model; using Model;
using Model.ViewModels; using Model.ViewModels;
using Newtonsoft.Json.Linq; using Newtonsoft.Json.Linq;
using NPOI.HSSF.UserModel; using NPOI.HSSF.UserModel;
using NPOI.SS.Formula.Functions;
using NPOI.SS.UserModel; using NPOI.SS.UserModel;
using NPOI.SS.Util; using NPOI.SS.Util;
using NPOI.XSSF.Streaming; using NPOI.XSSF.Streaming;
@ -30,6 +26,21 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
{ {
public partial class TestPackageManageAudit : PageBase public partial class TestPackageManageAudit : PageBase
{ {
public static int percent { get; set; }
public static string url { get; set; }
[System.Web.Services.WebMethod]
public static int getPercent()
{
return percent;
}
[System.Web.Services.WebMethod]
public static string getUrl()
{
return url;
}
#region #region
/// <summary> /// <summary>
/// 试压包主键 /// 试压包主键
@ -672,7 +683,13 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
return; return;
} }
CreateDataExcel(selectValArray); percent = 0;
url = "";
Thread t = new Thread(new ThreadStart(() => { CreateDataExcel(selectValArray); }));
t.Start();
PageContext.RegisterStartupScript("showProcessBar()");
//CreateDataExcel(selectValArray);
} }
#region #region
@ -3457,7 +3474,7 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
ws.GetRow(rowIndex + 17).GetCell(1).CellStyle = ws.GetRow(rowIndex + 23).GetCell(1).CellStyle = ws.GetRow(rowIndex + 23).GetCell(6).CellStyle = ws.GetRow(rowIndex + 23).GetCell(11).CellStyle = style2; ws.GetRow(rowIndex + 17).GetCell(1).CellStyle = ws.GetRow(rowIndex + 23).GetCell(1).CellStyle = ws.GetRow(rowIndex + 23).GetCell(6).CellStyle = ws.GetRow(rowIndex + 23).GetCell(11).CellStyle = style2;
#endregion #endregion
rowIndex += 19; rowIndex += 24;
} }
ws.PrintSetup.Landscape = false; ws.PrintSetup.Landscape = false;
@ -4097,10 +4114,10 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
on c.PipelineId=a.PipelineId on c.PipelineId=a.PipelineId
inner join Pipeline_Pipeline as d inner join Pipeline_Pipeline as d
on c.PipelineId=d.PipelineId on c.PipelineId=d.PipelineId
where b.PTP_ID=@PTPID and b.ProjectId=@projectId where b.PTP_ID=@PTPID and b.ProjectId=@projectId AND c.WelderCode IS NOT NULL
) as t ) as t
group by t.PipelineCode,t.MaterialCode,t.Specification,t.jointCount,t.FjointCount,t.WelderCode,t.WelderNum,t.NdeNum,t.FNdeNum,t.NdeReportNo"; group by t.PipelineCode,t.MaterialCode,t.Specification,t.jointCount,t.FjointCount,t.WelderCode,t.WelderNum,t.NdeNum,t.FNdeNum,t.NdeReportNo
ORDER BY t.PipelineCode,t.MaterialCode,t.Specification,t.jointCount,t.FjointCount,t.WelderCode";
SqlParameter[] parms = SqlParameter[] parms =
{ {
new SqlParameter("@PTPID",this.tvControlItem.SelectedNodeID), new SqlParameter("@PTPID",this.tvControlItem.SelectedNodeID),
@ -4694,7 +4711,7 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
ws.GetRow(rowIndex + 7).GetCell(20).SetCellValue("Examination Report No."); ws.GetRow(rowIndex + 7).GetCell(20).SetCellValue("Examination Report No.");
//这里创建行数据 //这里创建行数据
ws = ExcelCreateRow(ws, hssfworkbook, rowIndex + 8, rowIndex + 23, style, 0, 20, true); ws = ExcelCreateRow(ws, hssfworkbook, rowIndex + 8, rowIndex + 17, style, 0, 20, true);
var dStart = 0; var dStart = 0;
var dEnd = 0; var dEnd = 0;
@ -4735,20 +4752,20 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
#region #region
style = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.None, BorderStyle.None, BorderStyle.None, BorderStyle.None, VerticalAlignment.Center, NPOI.SS.UserModel.HorizontalAlignment.Left, 11, true, false); style = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.None, BorderStyle.None, BorderStyle.None, BorderStyle.None, VerticalAlignment.Center, NPOI.SS.UserModel.HorizontalAlignment.Left, 11, true, false);
ws = ExcelCreateRow(ws, hssfworkbook, rowIndex + 23, rowIndex + 25, style, 0, 20, true); ws = ExcelCreateRow(ws, hssfworkbook, rowIndex + 18, rowIndex + 25, style, 0, 20, true);
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 23, rowIndex + 23, 0, 3)); ws.AddMergedRegion(new CellRangeAddress(rowIndex + 18, rowIndex + 18, 0, 3));
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 23, rowIndex + 23, 4, 9)); ws.AddMergedRegion(new CellRangeAddress(rowIndex + 18, rowIndex + 18, 4, 9));
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 23, rowIndex + 23, 10, 16)); ws.AddMergedRegion(new CellRangeAddress(rowIndex + 18, rowIndex + 18, 10, 16));
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 23, rowIndex + 23, 17, 20)); ws.AddMergedRegion(new CellRangeAddress(rowIndex + 18, rowIndex + 18, 17, 20));
ws.GetRow(rowIndex + 23).GetCell(0).SetCellValue("建设/监理单位\r\nOwner/Supervision Contractor"); ws.GetRow(rowIndex + 18).GetCell(0).SetCellValue("建设/监理单位\r\nOwner/Supervision Contractor");
ws.GetRow(rowIndex + 23).GetCell(4).SetCellValue("总承包单位\r\nGeneral Contractor"); ws.GetRow(rowIndex + 18).GetCell(4).SetCellValue("总承包单位\r\nGeneral Contractor");
ws.GetRow(rowIndex + 23).GetCell(10).SetCellValue("检 测 单 位\r\nExamination Contractor"); ws.GetRow(rowIndex + 18).GetCell(10).SetCellValue("检 测 单 位\r\nExamination Contractor");
ws.GetRow(rowIndex + 23).GetCell(17).SetCellValue("施 工 单 位\r\nConstruction Company"); ws.GetRow(rowIndex + 18).GetCell(17).SetCellValue("施 工 单 位\r\nConstruction Company");
ws.GetRow(rowIndex + 23).Height = 28 * 20; ws.GetRow(rowIndex + 18).Height = 28 * 20;
var style1 = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.None, BorderStyle.None, BorderStyle.None, BorderStyle.None, VerticalAlignment.Center, NPOI.SS.UserModel.HorizontalAlignment.Center, 11, true, false); var style1 = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.None, BorderStyle.None, BorderStyle.None, BorderStyle.None, VerticalAlignment.Center, NPOI.SS.UserModel.HorizontalAlignment.Center, 11, true, false);
ws.GetRow(rowIndex + 23).GetCell(0).CellStyle = ws.GetRow(rowIndex + 23).GetCell(4).CellStyle = ws.GetRow(rowIndex + 23).GetCell(10).CellStyle = ws.GetRow(rowIndex + 23).GetCell(17).CellStyle = style1; ws.GetRow(rowIndex + 18).GetCell(0).CellStyle = ws.GetRow(rowIndex + 18).GetCell(4).CellStyle = ws.GetRow(rowIndex + 18).GetCell(10).CellStyle = ws.GetRow(rowIndex + 18).GetCell(17).CellStyle = style1;
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 19, rowIndex + 19, 0, 3)); ws.AddMergedRegion(new CellRangeAddress(rowIndex + 19, rowIndex + 19, 0, 3));
@ -6997,8 +7014,8 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
ws.GetRow(rowIndex + 16).GetCell(0).SetCellValue("临时加固措施、盲板位置与标识符和施工方案要求。Temporary reinforcement measures, blind position and markings must be incompliance with Specification."); ws.GetRow(rowIndex + 16).GetCell(0).SetCellValue("临时加固措施、盲板位置与标识符和施工方案要求。Temporary reinforcement measures, blind position and markings must be incompliance with Specification.");
ws.GetRow(rowIndex + 17).GetCell(0).CellStyle = style2; ws.GetRow(rowIndex + 17).GetCell(0).CellStyle = style2;
ws.GetRow(rowIndex + 17).GetCell(0).SetCellValue("焊接接头及需要检验的部位未被覆盖。Welds and other positions to be tested have not yet been painted and heat-insulated."); ws.GetRow(rowIndex + 17).GetCell(0).SetCellValue("焊接接头及需要检验的部位未被覆盖。Welds and other positions to be tested have not yet been painted and heat-insulated.");
ws.GetRow(rowIndex + 23).GetCell(0).CellStyle = style2; ws.GetRow(rowIndex + 18).GetCell(0).CellStyle = style2;
ws.GetRow(rowIndex + 23).GetCell(0).SetCellValue("试压用压力表量程、精度等级、检定状态符合规范要求。Scale, accuracy and calibration state of test use pressure gauge must be incompliance with specification. "); ws.GetRow(rowIndex + 18).GetCell(0).SetCellValue("试压用压力表量程、精度等级、检定状态符合规范要求。Scale, accuracy and calibration state of test use pressure gauge must be incompliance with specification. ");
ws.GetRow(rowIndex + 19).GetCell(0).CellStyle = style2; ws.GetRow(rowIndex + 19).GetCell(0).CellStyle = style2;
ws.GetRow(rowIndex + 19).GetCell(0).SetCellValue("不锈钢管道试验用水符合规范要求。Test use water of stainless steel pipline must be incompliance with specification."); ws.GetRow(rowIndex + 19).GetCell(0).SetCellValue("不锈钢管道试验用水符合规范要求。Test use water of stainless steel pipline must be incompliance with specification.");
@ -7296,7 +7313,7 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
ws.GetRow(rowIndex + 15).GetCell(0).SetCellValue("所有的阀门涂油脂和试压已经完成。All valves have been greased and stroked."); ws.GetRow(rowIndex + 15).GetCell(0).SetCellValue("所有的阀门涂油脂和试压已经完成。All valves have been greased and stroked.");
ws.GetRow(rowIndex + 16).GetCell(0).SetCellValue("螺纹连接根据规范要求进行。Compound on screwed connections in accordance with specification."); ws.GetRow(rowIndex + 16).GetCell(0).SetCellValue("螺纹连接根据规范要求进行。Compound on screwed connections in accordance with specification.");
ws.GetRow(rowIndex + 17).GetCell(0).SetCellValue("安装所有的制动装置和联动装置。All locking device/interlocks installed."); ws.GetRow(rowIndex + 17).GetCell(0).SetCellValue("安装所有的制动装置和联动装置。All locking device/interlocks installed.");
ws.GetRow(rowIndex + 23).GetCell(0).SetCellValue("检查和确定弹簧支架、滑动支架装置。Spring Support,Gags removed&support settings confirmed/Checked."); ws.GetRow(rowIndex + 18).GetCell(0).SetCellValue("检查和确定弹簧支架、滑动支架装置。Spring Support,Gags removed&support settings confirmed/Checked.");
ws.GetRow(rowIndex + 19).GetCell(0).SetCellValue("如果需要释放给化学清洗、油洗。System released for chemical cleaning /hot oil flushing ,if required."); ws.GetRow(rowIndex + 19).GetCell(0).SetCellValue("如果需要释放给化学清洗、油洗。System released for chemical cleaning /hot oil flushing ,if required.");
#endregion #endregion
@ -7584,6 +7601,9 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
hssfworkbook = (XSSFWorkbook)WorkbookFactory.Create(file); hssfworkbook = (XSSFWorkbook)WorkbookFactory.Create(file);
} }
int totalNum = templateFileIds.Count();
int rowIndex = 1;
//操作目录模版sheet是否存在,不存在就把对应的sheet删除掉特殊处理 //操作目录模版sheet是否存在,不存在就把对应的sheet删除掉特殊处理
int index = 0; int index = 0;
if (!templateFileIds.Contains("2BEFB0F4-A466-4C59-963F-9092BACF2E52")) if (!templateFileIds.Contains("2BEFB0F4-A466-4C59-963F-9092BACF2E52"))
@ -7743,6 +7763,13 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
break; break;
} }
if ((int)(90 * (rowIndex) / totalNum) > percent)
{
percent = (int)(100 * (rowIndex) / totalNum);
}
rowIndex++;
} }
//生成第{N}个模版 //生成第{N}个模版
@ -7751,22 +7778,26 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
{ {
hssfworkbook.Write(filess); hssfworkbook.Write(filess);
} }
try
{ percent = 100;
FileInfo filet = new FileInfo(ReportFileName); url = ReportFileName.Replace(Server.MapPath("~/"), "");
Response.Clear();
Response.ContentType = "application/x-zip-compressed"; //try
Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8)); //{
Response.AddHeader("Content-Length", filet.Length.ToString()); // FileInfo filet = new FileInfo(ReportFileName);
Response.TransmitFile(ReportFileName, 0, filet.Length); // Response.Clear();
Response.Flush(); // Response.ContentType = "application/x-zip-compressed";
Response.Close(); // Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));
System.IO.File.Delete(ReportFileName); // Response.AddHeader("Content-Length", filet.Length.ToString());
} // Response.TransmitFile(ReportFileName, 0, filet.Length);
catch (Exception ex) // Response.Flush();
{ // Response.Close();
BLL.ErrLogInfo.WriteLog(ex.Message); // System.IO.File.Delete(ReportFileName);
} //}
//catch (Exception ex)
//{
// BLL.ErrLogInfo.WriteLog(ex.Message);
//}
} }

View File

@ -616,5 +616,32 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.Window Window3; protected global::FineUIPro.Window Window3;
/// <summary>
/// WindowExport 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window WindowExport;
/// <summary>
/// ContentPanel3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ContentPanel ContentPanel3;
/// <summary>
/// ScriptManager2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.ScriptManager ScriptManager2;
} }
} }

View File

@ -235,12 +235,22 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
if (selectedRowIDArray.Length > 0) if (selectedRowIDArray.Length > 0)
{ {
string strSql = @"SELECT pItem.PointBatchId,jot.WeldingMethodId,jot.GrooveTypeId, string strSql = @"SELECT pItem.PointBatchId,jot.WeldingMethodId,jot.GrooveTypeId,
(CASE WHEN pItem.IsWelderFirst=1 THEN 1 ELSE 0 END) AS IsWelderFirst (CASE WHEN pItem.IsWelderFirst=1 THEN 1 ELSE 0 END) AS IsWelderFirst,
pItem.PointState,NULL AS RepairRecordId
FROM Batch_PointBatchItem AS pItem FROM Batch_PointBatchItem AS pItem
LEFT JOIN Pipeline_WeldJoint AS jot ON jot.WeldJointId=pItem.WeldJointId LEFT JOIN Pipeline_WeldJoint AS jot ON jot.WeldJointId=pItem.WeldJointId
WHERE CHARINDEX(PointBatchItemId,@PointBatchItemList)>0 WHERE CHARINDEX(PointBatchItemId,@PointBatchItemList)>0 AND
GROUP BY pItem.PointBatchId, jot.WeldingMethodId,jot.GrooveTypeId, pItem.PointState='1'
(CASE WHEN pItem.IsWelderFirst=1 THEN 1 ELSE 0 END)"; GROUP BY pItem.PointBatchId, pItem.PointState, jot.WeldingMethodId,jot.GrooveTypeId,
(CASE WHEN pItem.IsWelderFirst=1 THEN 1 ELSE 0 END)
UNION ALL
SELECT pItem.PointBatchId, MAX(jot.WeldingMethodId) AS WeldingMethodId,MAX(jot.GrooveTypeId) AS GrooveTypeId ,
0 AS IsWelderFirst, pItem.PointState, pItem.RepairRecordId
FROM Batch_PointBatchItem AS pItem
LEFT JOIN Pipeline_WeldJoint AS jot ON jot.WeldJointId=pItem.WeldJointId
WHERE CHARINDEX(PointBatchItemId,@PointBatchItemList)>0 AND
pItem.PointState<>'1'
GROUP BY pItem.PointBatchId,pItem.PointState,pItem.RepairRecordId";
List<SqlParameter> listStr = new List<SqlParameter>(); List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@PointBatchItemList", PointBatchItemList)); listStr.Add(new SqlParameter("@PointBatchItemList", PointBatchItemList));
@ -258,10 +268,39 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
var work = BLL.Project_WorkAreaService.GetProject_WorkAreaByWorkAreaId(iso.WorkAreaId); var work = BLL.Project_WorkAreaService.GetProject_WorkAreaByWorkAreaId(iso.WorkAreaId);
Model.Batch_BatchTrust newBatchTrust = new Model.Batch_BatchTrust(); Model.Batch_BatchTrust newBatchTrust = new Model.Batch_BatchTrust();
string perfix = string.Empty; string trustBatchcode = string.Empty;
perfix = ndt.DetectionTypeCode + "-" + unit.UnitCode + "-" + work.WorkAreaCode + "-PI" + "-"; if (r["PointState"].ToString() == "1") // 点口
newBatchTrust.TrustBatchCode = BLL.SQLHelper.RunProcNewId("SpGetNewCode", "dbo.Batch_BatchTrust", "TrustBatchCode", project.ProjectId, perfix); {
string perfix = string.Empty;
perfix = ndt.DetectionTypeCode + "-" + unit.UnitCode + "-" + work.WorkAreaCode + "-PI" + "-";
trustBatchcode = BLL.SQLHelper.RunProcNewId("SpGetNewCode", "dbo.Batch_BatchTrust", "TrustBatchCode", project.ProjectId, perfix);
}
if (r["PointState"].ToString() == "2") // 扩透
{
var exp = BLL.RepairRecordService.GetRepairRecordById(r["RepairRecordId"].ToString());
trustBatchcode = exp.RepairRecordCode.Substring(0, exp.RepairRecordCode.Length - 2) + "EX1";
}
if (r["PointState"].ToString() == "3") // 返修
{
var repair = BLL.RepairRecordService.GetRepairRecordById(r["RepairRecordId"].ToString());
trustBatchcode = repair.RepairRecordCode;
}
if (r["PointState"].ToString() == "4") // 修磨
{
var repair = BLL.RepairRecordService.GetRepairRecordById(r["RepairRecordId"].ToString());
trustBatchcode = repair.RepairRecordCode;
}
if (r["PointState"].ToString() == "5") // 异物
{
var repair = BLL.RepairRecordService.GetRepairRecordById(r["RepairRecordId"].ToString());
trustBatchcode = repair.RepairRecordCode;
}
newBatchTrust.TrustBatchCode = trustBatchcode;
string trustBatchId = SQLHelper.GetNewID(typeof(Model.Batch_BatchTrust)); string trustBatchId = SQLHelper.GetNewID(typeof(Model.Batch_BatchTrust));
newBatchTrust.TrustBatchId = trustBatchId; newBatchTrust.TrustBatchId = trustBatchId;
@ -275,27 +314,43 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
newBatchTrust.IsWelderFirst = Convert.ToBoolean(r["IsWelderFirst"]); newBatchTrust.IsWelderFirst = Convert.ToBoolean(r["IsWelderFirst"]);
newBatchTrust.DetectionTypeId = point.DetectionTypeId; newBatchTrust.DetectionTypeId = point.DetectionTypeId;
newBatchTrust.PipelineId = point.PipelineId; newBatchTrust.PipelineId = point.PipelineId;
newBatchTrust.TrustType= r["PointState"].ToString();
BLL.Batch_BatchTrustService.AddBatchTrust(newBatchTrust); // 新增委托单 BLL.Batch_BatchTrustService.AddBatchTrust(newBatchTrust); // 新增委托单
// 生成委托明细,并回写点口明细信息 // 生成委托明细,并回写点口明细信息
string itemSql=string.Empty;
// 扩透口,如两个焊接方法或坡口类型不一至也放一个委托单
string itemSql = @"SELECT pItem.PointBatchItemId,pItem.PointBatchId,jot.WeldingMethodId, if (r["PointState"].ToString() == "1")
{
itemSql = @"SELECT pItem.PointBatchItemId,pItem.PointBatchId,jot.WeldingMethodId,
jot.GrooveTypeId,(CASE WHEN pItem.IsWelderFirst=1 THEN 1 ELSE 0 END) AS IsWelderFirst jot.GrooveTypeId,(CASE WHEN pItem.IsWelderFirst=1 THEN 1 ELSE 0 END) AS IsWelderFirst
FROM Batch_PointBatchItem AS pItem FROM Batch_PointBatchItem AS pItem
LEFT JOIN Pipeline_WeldJoint AS jot ON jot.WeldJointId=pItem.WeldJointId LEFT JOIN Pipeline_WeldJoint AS jot ON jot.WeldJointId=pItem.WeldJointId
WHERE CHARINDEX(PointBatchItemId,@PointBatchItemList)>0 WHERE CHARINDEX(PointBatchItemId,@PointBatchItemList)>0
AND PointBatchId=@PointBatchId AND jot.WeldingMethodId=@WeldingMethodId AND PointBatchId=@PointBatchId AND jot.WeldingMethodId=@WeldingMethodId
AND jot.GrooveTypeId=@GrooveTypeId AND jot.GrooveTypeId=@GrooveTypeId AND pItem.PointState=@PointState
AND (CASE WHEN pItem.IsWelderFirst=1 THEN '1' ELSE '0' END)=@IsWelderFirst"; AND (CASE WHEN pItem.IsWelderFirst=1 THEN '1' ELSE '0' END)=@IsWelderFirst";
}
else
{
itemSql = @"SELECT pItem.PointBatchItemId,pItem.PointBatchId,jot.WeldingMethodId,
jot.GrooveTypeId,0 AS IsWelderFirst
FROM Batch_PointBatchItem AS pItem
LEFT JOIN Pipeline_WeldJoint AS jot ON jot.WeldJointId=pItem.WeldJointId
WHERE CHARINDEX(PointBatchItemId,@PointBatchItemList)>0
AND PointBatchId=@PointBatchId AND pItem.PointState=@PointState
AND pItem.RepairRecordId=@RepairRecordId";
}
List<SqlParameter> param = new List<SqlParameter>(); List<SqlParameter> param = new List<SqlParameter>();
param.Add(new SqlParameter("@PointBatchItemList", PointBatchItemList)); param.Add(new SqlParameter("@PointBatchItemList", PointBatchItemList));
param.Add(new SqlParameter("@PointBatchId", r["PointBatchId"].ToString())); param.Add(new SqlParameter("@PointBatchId", r["PointBatchId"].ToString()));
param.Add(new SqlParameter("@WeldingMethodId", newBatchTrust.WeldingMethodId)); param.Add(new SqlParameter("@WeldingMethodId", newBatchTrust.WeldingMethodId));
param.Add(new SqlParameter("@GrooveTypeId", newBatchTrust.GrooveTypeId)); param.Add(new SqlParameter("@GrooveTypeId", newBatchTrust.GrooveTypeId));
param.Add(new SqlParameter("@PointState", r["PointState"].ToString()));
param.Add(new SqlParameter("@IsWelderFirst", r["IsWelderFirst"].ToString())); param.Add(new SqlParameter("@IsWelderFirst", r["IsWelderFirst"].ToString()));
param.Add(new SqlParameter("@RepairRecordId", r["RepairRecordId"].ToString()));
SqlParameter[] paramList = param.ToArray(); SqlParameter[] paramList = param.ToArray();
DataTable dtItem = SQLHelper.GetDataTableRunText(itemSql, paramList); DataTable dtItem = SQLHelper.GetDataTableRunText(itemSql, paramList);

View File

@ -242,7 +242,7 @@
<f:RenderField ColumnID="IsPointAudit" DataField="IsPointAudit" <f:RenderField ColumnID="IsPointAudit" DataField="IsPointAudit"
FieldType="String" Hidden="true"> FieldType="String" Hidden="true">
</f:RenderField> </f:RenderField>
</Columns> </Columns>
<Listeners> <Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" /> <f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
</Listeners> </Listeners>

View File

@ -600,8 +600,8 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
CONVERT(INT,dbo.Fun_GetParseInt(WeldJointCode)) AS ConvertJoint, CONVERT(INT,dbo.Fun_GetParseInt(WeldJointCode)) AS ConvertJoint,
(CASE WHEN IsWelderFirst=1 THEN '是' ELSE '否' END) AS IsWelderFirst, (CASE WHEN IsWelderFirst=1 THEN '是' ELSE '否' END) AS IsWelderFirst,
(CASE WHEN IsCompletedPoint=1 THEN '' ELSE '' END) CompletedState, (CASE WHEN IsCompletedPoint=1 THEN '' ELSE '' END) CompletedState,
JLAudit,GLGSAudit,QTAudit,IsPointAudit, JLAudit,GLGSAudit,QTAudit,IsPointAudit,TrustBatchItemId,
(CASE WHEN PointDate IS NOT NULL AND IsBuildTrust=1 THEN '' (CASE WHEN PointDate IS NOT NULL AND (IsBuildTrust=1 OR TrustBatchItemId IS NOT NULL) THEN ''
ELSE (CASE WHEN PointDate IS NOT NULL THEN '' ELSE '' END) END) AS IsTrust ELSE (CASE WHEN PointDate IS NOT NULL THEN '' ELSE '' END) END) AS IsTrust
FROM dbo.View_Batch_PointBatchItem FROM dbo.View_Batch_PointBatchItem
WHERE PointBatchId=@PointBatchId"; WHERE PointBatchId=@PointBatchId";
@ -614,11 +614,11 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
{ {
if (drpIsTrust.SelectedValue == "1") if (drpIsTrust.SelectedValue == "1")
{ {
strSql += " AND PointDate IS NOT NULL AND IsBuildTrust IS NULL"; strSql += " AND PointDate IS NOT NULL AND IsBuildTrust IS NULL AND TrustBatchItemId IS NULL";
} }
else else
{ {
strSql += " AND PointDate IS NOT NULL AND IsBuildTrust IS NOT NULL"; strSql += " AND PointDate IS NOT NULL AND (IsBuildTrust IS NOT NULL OR TrustBatchItemId IS NOT NULL)";
} }
} }
if (drpIsCompletedPoint.SelectedValue != "0") if (drpIsCompletedPoint.SelectedValue != "0")
@ -682,10 +682,14 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
//bool isPointAudit = Convert.ToBoolean(row["IsPointAudit"]); //bool isPointAudit = Convert.ToBoolean(row["IsPointAudit"]);
string isTrust = row["IsTrust"].ToString(); string isTrust = row["IsTrust"].ToString();
int isPointAudit = Convert.ToInt32(row["IsPointAudit"].ToString()); int isPointAudit = Convert.ToInt32(row["IsPointAudit"].ToString());
if (row["PointState"].ToString() == "返修")
{
string dd = row["IsTrust"].ToString();
}
// 未审核的或已委托的口禁用复选框 // 未审核的或已委托的口禁用复选框
if (isPointAudit!=1 || isTrust == "已委托") if (isPointAudit!=1 || isTrust == "已委托")
{ {
//e.RowSelectable = false; //e.RowSelectable = false;
e.CellCssClasses[ckbIsPointAudit.ColumnIndex] = "hidethis"; e.CellCssClasses[ckbIsPointAudit.ColumnIndex] = "hidethis";
@ -885,15 +889,61 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
{ {
foreach (DataRow r in dt.Rows) foreach (DataRow r in dt.Rows)
{ {
int detectionRateValue = Convert.ToInt32(r["DetectionRateValue"]);
// 已处理但批段未关闭的焊口 // 已处理但批段未关闭的焊口
List<PointBatchList> batchNoClose = (from x in Funs.DB.Batch_PointBatchItem List<PointBatchList> compBatchNoClose = (from x in Funs.DB.Batch_PointBatchItem
join y in Funs.DB.Pipeline_WeldJoint on x.WeldJointId equals y.WeldJointId join y in Funs.DB.Pipeline_WeldJoint on x.WeldJointId equals y.WeldJointId
where x.PointBatchId == r["PointBatchId"].ToString() where x.PointBatchId == r["PointBatchId"].ToString()
&& y.CoverWelderId == r["CoverWelderId"].ToString() && y.CoverWelderId == r["CoverWelderId"].ToString()
&& (x.BatchOrder == false || x.BatchOrder == null) && (x.BatchOrder == false || x.BatchOrder == null)
&& x.IsCompletedPoint == true && x.IsCompletedPoint == true
&& (y.IsCancel == false || y.IsCancel == null) && (y.IsCancel == false || y.IsCancel == null)
select new PointBatchList { PointBatchItemId = x.PointBatchItemId, JointAttribute = y.JointAttribute }).ToList(); orderby x.EnterDate
select new PointBatchList { PointBatchItemId = x.PointBatchItemId, JointAttribute = y.JointAttribute, PointState = x.PointState }).ToList();
// 先处理:已处理但批段未关闭的焊口大于批段
if (detectionRateValue != 0)
{
// 批中一段的数量
int dnum = Convert.ToInt32((double)100 / detectionRateValue);
// 已处理但批段未关闭的焊口数量
int compBatchNoCloseNum = compBatchNoClose.Count();
int i = 0;
if (compBatchNoCloseNum > dnum)
{
while (i < compBatchNoCloseNum)
{
if (compBatchNoCloseNum - i >= dnum)
{
var lastBatch = compBatchNoClose.GetRange(i, dnum);
var GlastBatch = lastBatch.Where(x => x.JointAttribute == "固定F").ToList();
// 点口
GetRandomPoint(GlastBatch, lastBatch);
//关闭批段
foreach (var g in lastBatch)
{
//BLL.Batch_PointBatchItemService.UpdateIsCompletedPoint(g.PointBatchItemId, true);
BLL.Batch_PointBatchItemService.UpdatePointBatchOrder(g.PointBatchItemId, true);
}
}
else
{
break;
}
i = i + dnum;
}
}
}
// 已处理但批段未关闭的焊口
List<PointBatchList> batchNoClose = (from x in Funs.DB.Batch_PointBatchItem
join y in Funs.DB.Pipeline_WeldJoint on x.WeldJointId equals y.WeldJointId
where x.PointBatchId == r["PointBatchId"].ToString()
&& y.CoverWelderId == r["CoverWelderId"].ToString()
&& (x.BatchOrder == false || x.BatchOrder == null)
&& x.IsCompletedPoint == true
&& (y.IsCancel == false || y.IsCancel == null)
orderby x.EnterDate
select new PointBatchList { PointBatchItemId = x.PointBatchItemId, JointAttribute = y.JointAttribute, PointState = x.PointState }).ToList();
// 未处理焊口 // 未处理焊口
List<PointBatchList> jotList = (from x in Funs.DB.Batch_PointBatchItem List<PointBatchList> jotList = (from x in Funs.DB.Batch_PointBatchItem
@ -903,12 +953,12 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
&& (x.IsCompletedPoint == false || x.IsCompletedPoint == null) && (x.IsCompletedPoint == false || x.IsCompletedPoint == null)
&& (y.IsCancel == false || y.IsCancel == null) && (y.IsCancel == false || y.IsCancel == null)
orderby x.EnterDate orderby x.EnterDate
select new PointBatchList { PointBatchItemId = x.PointBatchItemId, JointAttribute = y.JointAttribute }).ToList(); select new PointBatchList { PointBatchItemId = x.PointBatchItemId, JointAttribute = y.JointAttribute, PointState=x.PointState }).ToList();
// 未处理固定焊口 // 未处理固定焊口
List<PointBatchList> GJot = jotList.Where(x => x.JointAttribute == "固定F").ToList(); List<PointBatchList> GJot = jotList.Where(x => x.JointAttribute == "固定F").ToList();
if (Convert.ToInt32(r["DetectionRateValue"]) != 0) if (detectionRateValue != 0)
{ {
// 批中一段的数量 // 批中一段的数量
int dnum = Convert.ToInt32((double)100 / (int)r["DetectionRateValue"]); int dnum = Convert.ToInt32((double)100 / (int)r["DetectionRateValue"]);
@ -922,8 +972,10 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
#region batchNoCloseNum大于0表示批段已处理但批段未关闭的焊口集合里 #region batchNoCloseNum大于0表示批段已处理但批段未关闭的焊口集合里
if (batchNoCloseNum > 0) if (batchNoCloseNum > 0)
{ {
// 如批段未关闭的焊口大于段数
if ((batchNoCloseNum + jotListNum) > dnum) if ((batchNoCloseNum + jotListNum) > dnum)
{ {
// 关闭上一个批段还需要的数量 // 关闭上一个批段还需要的数量
int closeNum = dnum - batchNoCloseNum; int closeNum = dnum - batchNoCloseNum;
var bachtclose = jotList.GetRange(0, closeNum); var bachtclose = jotList.GetRange(0, closeNum);
@ -1515,12 +1567,35 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
var unit = BLL.Base_UnitService.GetUnit(trust.UnitId); var unit = BLL.Base_UnitService.GetUnit(trust.UnitId);
var ndt = BLL.Base_DetectionTypeService.GetDetectionTypeByDetectionTypeId(trust.DetectionTypeId); var ndt = BLL.Base_DetectionTypeService.GetDetectionTypeByDetectionTypeId(trust.DetectionTypeId);
var work = BLL.Project_WorkAreaService.GetProject_WorkAreaByWorkAreaId(trust.WorkAreaId); var work = BLL.Project_WorkAreaService.GetProject_WorkAreaByWorkAreaId(trust.WorkAreaId);
string trustBatchcode = string.Empty;
string perfix = string.Empty; string perfix = string.Empty;
//perfix = unit.UnitCode + "-" + ins.InstallationCode + "-GD-" + ndt.DetectionTypeCode + "-";
perfix = ndt.DetectionTypeCode + "-" + unit.UnitCode + "-" + work.WorkAreaCode + "-PI" + "-"; perfix = ndt.DetectionTypeCode + "-" + unit.UnitCode + "-" + work.WorkAreaCode + "-PI" + "-";
newBatchTrust.TrustBatchCode = BLL.SQLHelper.RunProcNewId("SpGetNewCode", "dbo.Batch_BatchTrust", "TrustBatchCode", project.ProjectId, perfix);
if (trust.PointState == "1")
{
trustBatchcode = BLL.SQLHelper.RunProcNewId("SpGetNewCode", "dbo.Batch_BatchTrust", "TrustBatchCode", project.ProjectId, perfix);
}
if (trust.PointState == "2")
{
var exp = BLL.RepairRecordService.GetRepairRecordById(trust.RepairRecordId);
trustBatchcode = exp.RepairRecordCode.Substring(0, exp.RepairRecordCode.Length - 2) + "EX1";
}
if (trust.PointState == "3")
{
var repair = BLL.RepairRecordService.GetRepairRecordById(trust.RepairRecordId);
trustBatchcode = repair.RepairRecordCode;
}
if (trust.PointState == "4")
{
var repair = BLL.RepairRecordService.GetRepairRecordById(trust.RepairRecordId);
trustBatchcode = repair.RepairRecordCode;
}
if (trust.PointState == "5")
{
var repair = BLL.RepairRecordService.GetRepairRecordById(trust.RepairRecordId);
trustBatchcode = repair.RepairRecordCode;
}
newBatchTrust.TrustBatchCode = trustBatchcode;
string trustBatchId = SQLHelper.GetNewID(typeof(Model.Batch_BatchTrust)); string trustBatchId = SQLHelper.GetNewID(typeof(Model.Batch_BatchTrust));
newBatchTrust.TrustBatchId = trustBatchId; newBatchTrust.TrustBatchId = trustBatchId;
@ -1537,14 +1612,28 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
BLL.Batch_BatchTrustService.AddBatchTrust(newBatchTrust); // 新增委托单 BLL.Batch_BatchTrustService.AddBatchTrust(newBatchTrust); // 新增委托单
List<Model.View_GenerateTrustItem_FJ> generateTrustItem = new List<Model.View_GenerateTrustItem_FJ>();
// 生成委托条件对比 // 生成委托条件对比
var generateTrustItem = from x in db.View_GenerateTrustItem_FJ if (trust.PointState == "1")
where x.ProjectId == trust.ProjectId && x.InstallationId == trust.InstallationId {
&& x.WorkAreaId == trust.WorkAreaId && x.UnitId == trust.UnitId generateTrustItem = (from x in db.View_GenerateTrustItem_FJ
&& x.WeldingMethodId==trust.WeldingMethodId && x.GrooveTypeId==trust.GrooveTypeId where x.ProjectId == trust.ProjectId && x.InstallationId == trust.InstallationId
&& x.IsWelderFirst==trust.IsWelderFirst && x.DetectionTypeId == trust.DetectionTypeId && x.WorkAreaId == trust.WorkAreaId && x.UnitId == trust.UnitId
&& x.PipelineId == trust.PipelineId && x.WeldingMethodId == trust.WeldingMethodId && x.GrooveTypeId == trust.GrooveTypeId
select x; && x.IsWelderFirst == trust.IsWelderFirst && x.DetectionTypeId == trust.DetectionTypeId
&& x.PipelineId == trust.PipelineId && x.PointState == trust.PointState
select x).ToList();
}
else
{
generateTrustItem = (from x in db.View_GenerateTrustItem_FJ
where x.ProjectId == trust.ProjectId && x.InstallationId == trust.InstallationId
&& x.WorkAreaId == trust.WorkAreaId && x.UnitId == trust.UnitId
&& x.DetectionTypeId == trust.DetectionTypeId && x.PipelineId == trust.PipelineId
&& x.RepairRecordId==trust.RepairRecordId && x.PointState == trust.PointState
select x).ToList();
}
string toPointBatch = string.Empty; string toPointBatch = string.Empty;
// 生成委托明细,并回写点口明细信息 // 生成委托明细,并回写点口明细信息
foreach (var item in generateTrustItem) foreach (var item in generateTrustItem)
@ -1990,6 +2079,12 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
get; get;
set; set;
} }
public string PointState
{
get;
set;
}
} }

View File

@ -323,9 +323,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
{ {
if (this.tvControlItem.SelectedNode != null) if (this.tvControlItem.SelectedNode != null)
{ {
string strSql = @"SELECT batchItem.TrustBatchItemId, pipe.PipelineCode,jot.Specification, string strSql = @"SELECT batchItem.TrustBatchItemId, pipe.PipelineCode,jot.Specification,jot.WeldJointCode,
(CASE WHEN PointBatchItem.PointState='2' then jot.WeldJointCode+'K'
ELSE jot.WeldJointCode END) AS WeldJointCode,
(CASE WHEN CoverWelder.WelderCode IS NOT NULL AND BackingWelder.WelderCode IS NOT NULL (CASE WHEN CoverWelder.WelderCode IS NOT NULL AND BackingWelder.WelderCode IS NOT NULL
THEN backingWelder.WelderCode + '/' + coverWelder.WelderCode THEN backingWelder.WelderCode + '/' + coverWelder.WelderCode
ELSE (ISNULL(coverWelder.WelderCode,'') + ISNULL(backingWelder.WelderCode,'')) END) AS WelderCode, ELSE (ISNULL(coverWelder.WelderCode,'') + ISNULL(backingWelder.WelderCode,'')) END) AS WelderCode,

View File

@ -4,6 +4,12 @@
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server"> <head runat="server">
<title>委托单查询</title> <title>委托单查询</title>
<style>
.f-grid-row-summary .f-grid-cell-inner {
font-weight: bold;
color: red;
}
</style>
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" /> <link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
</head> </head>
<body> <body>
@ -18,12 +24,15 @@
DataIDField="TrustBatchItemId" AllowSorting="true" SortField="TrustBatchCode,PipelineCode,WeldJointCode" DataIDField="TrustBatchItemId" AllowSorting="true" SortField="TrustBatchCode,PipelineCode,WeldJointCode"
SortDirection="ASC" OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true" SortDirection="ASC" OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true"
PageSize="20" OnPageIndexChange="Grid1_PageIndexChange" EnableTextSelection="True" PageSize="20" OnPageIndexChange="Grid1_PageIndexChange" EnableTextSelection="True"
EnableCheckBoxSelect="true"> EnableCheckBoxSelect="true" EnableSummary="true" SummaryPosition="Flow">
<Toolbars> <Toolbars>
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left"> <f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left">
<Items> <Items>
<f:DropDownList ID="drpInstallation" runat="server" Label="<%$ Resources:Lan,InstallationCode %>" <f:DropDownList ID="drpInstallation" runat="server" Label="<%$ Resources:Lan,InstallationCode %>"
LabelAlign="Right" EnableEdit="true" Width="240" LabelWidth="90px" > LabelAlign="Right" EnableEdit="true" Width="240" LabelWidth="90px" AutoPostBack="true" OnSelectedIndexChanged="drpInstallation_SelectedIndexChanged">
</f:DropDownList>
<f:DropDownList ID="drpWorkAreaId" runat="server" Label="<%$ Resources:Lan,ConstructionArea %>"
LabelAlign="Right" Width="280px">
</f:DropDownList> </f:DropDownList>
<f:TextBox ID="txtTrustBatchCode" runat="server" Label="<%$ Resources:Lan,RequestSheetNumber %>" <f:TextBox ID="txtTrustBatchCode" runat="server" Label="<%$ Resources:Lan,RequestSheetNumber %>"
LabelAlign="Right" Width="280px" LabelWidth="90"> LabelAlign="Right" Width="280px" LabelWidth="90">

View File

@ -11,6 +11,7 @@ using System.Linq;
using System.IO; using System.IO;
using BLL; using BLL;
using System.Text; using System.Text;
using Newtonsoft.Json.Linq;
namespace FineUIPro.Web.WeldingProcess.TrustManage namespace FineUIPro.Web.WeldingProcess.TrustManage
{ {
@ -28,6 +29,8 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
{ {
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString(); this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
BLL.Project_InstallationService.InitInstallationDropDownList(this.drpInstallation, true, this.CurrUser.LoginProjectId, Resources.Lan.PleaseSelect); BLL.Project_InstallationService.InitInstallationDropDownList(this.drpInstallation, true, this.CurrUser.LoginProjectId, Resources.Lan.PleaseSelect);
Funs.FineUIPleaseSelect(this.drpWorkAreaId, Resources.Lan.PleaseSelect);
//BLL.Project_WorkAreaService.InitWorkAreaDropDownList(this.drpWorkAreaId, true, this.CurrUser.LoginProjectId, "", "", string.Empty, Resources.Lan.PleaseSelect);//区域
} }
} }
@ -47,6 +50,11 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
strSql += " AND InstallationId = @InstallationId"; strSql += " AND InstallationId = @InstallationId";
listStr.Add(new SqlParameter("@InstallationId", drpInstallation.SelectedValue)); listStr.Add(new SqlParameter("@InstallationId", drpInstallation.SelectedValue));
} }
if (drpWorkAreaId.SelectedValue != Const._Null)
{
strSql += " AND WorkAreaId = @WorkAreaId";
listStr.Add(new SqlParameter("@WorkAreaId", drpWorkAreaId.SelectedValue));
}
if (!string.IsNullOrEmpty(this.txtTrustBatchCode.Text)) if (!string.IsNullOrEmpty(this.txtTrustBatchCode.Text))
{ {
strSql += " AND TrustBatchCode LIKE @TrustBatchCode"; strSql += " AND TrustBatchCode LIKE @TrustBatchCode";
@ -85,6 +93,12 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
var table = this.GetPagedDataTable(Grid1, tb); var table = this.GetPagedDataTable(Grid1, tb);
Grid1.DataSource = table; Grid1.DataSource = table;
Grid1.DataBind(); Grid1.DataBind();
var distinctTrustBatchCode = tb.AsEnumerable().GroupBy(row => row.Field<string>("TrustBatchId")).Select(group => group.First());
JObject summary = new JObject();
summary.Add("TrustBatchCode", "合计委托单数:"+distinctTrustBatchCode.Count().ToString());
summary.Add("WeldJointCode", tb.Rows.Count.ToString());
Grid1.SummaryData = summary;
} }
/// <summary> /// <summary>
@ -285,5 +299,27 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
} }
#region
/// <summary>
/// 单位下拉选择事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void drpInstallation_SelectedIndexChanged(object sender, EventArgs e)
{
this.drpWorkAreaId.Items.Clear();
if (this.drpInstallation.SelectedValue != BLL.Const._Null)
{
BLL.Project_WorkAreaService.InitWorkAreaDropDownList(this.drpWorkAreaId, true, this.CurrUser.LoginProjectId, this.drpInstallation.SelectedValue, string.Empty, string.Empty, Resources.Lan.PleaseSelect);
}
else
{
Funs.FineUIPleaseSelect(this.drpWorkAreaId, Resources.Lan.PleaseSelect);
}
this.drpWorkAreaId.SelectedValue = BLL.Const._Null;
}
#endregion
} }
} }

View File

@ -68,6 +68,15 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
/// </remarks> /// </remarks>
protected global::FineUIPro.DropDownList drpInstallation; protected global::FineUIPro.DropDownList drpInstallation;
/// <summary>
/// drpWorkAreaId 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpWorkAreaId;
/// <summary> /// <summary>
/// txtTrustBatchCode 控件。 /// txtTrustBatchCode 控件。
/// </summary> /// </summary>

View File

@ -521,7 +521,15 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
var jot = BLL.Pipeline_WeldJointService.GetWeldJointByWeldJointId(this.WeldJointId); var jot = BLL.Pipeline_WeldJointService.GetWeldJointByWeldJointId(this.WeldJointId);
if (!string.IsNullOrEmpty(jot.WeldingDailyId)) if (!string.IsNullOrEmpty(jot.WeldingDailyId))
{ {
BLL.Pipeline_WeldJointService.UpdateDepartWeldJoint(newJointInfo); if (this.CurrUser.Account == Const.Gly)
{
BLL.Pipeline_WeldJointService.UpdateWeldJointByGly(newJointInfo);
}
else
{
BLL.Pipeline_WeldJointService.UpdateDepartWeldJoint(newJointInfo);
}
} }
else else
{ {

View File

@ -1245,7 +1245,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
if (ds.Tables[0].Rows[i]["WPS编号"] != null && !string.IsNullOrEmpty(ds.Tables[0].Rows[i]["WPS编号"].ToString())) if (ds.Tables[0].Rows[i]["WPS编号"] != null && !string.IsNullOrEmpty(ds.Tables[0].Rows[i]["WPS编号"].ToString()))
{ {
var wps = wpsList.FirstOrDefault(x => x.WPQCode == ds.Tables[0].Rows[i]["WPS编号"].ToString()); var wps = wpsList.FirstOrDefault(x => x.WPQCode == ds.Tables[0].Rows[i]["WPS编号"].ToString().Trim());
if (wps == null) if (wps == null)
{ {
errorInfos += (i + 2) + "行,WPS编号[" + ds.Tables[0].Rows[i]["WPS编号"].ToString() + "]不存在;"; errorInfos += (i + 2) + "行,WPS编号[" + ds.Tables[0].Rows[i]["WPS编号"].ToString() + "]不存在;";
@ -1263,22 +1263,45 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
{ {
d.WeldingMethodId = wps.WeldingMethodId; d.WeldingMethodId = wps.WeldingMethodId;
} }
if (!string.IsNullOrEmpty(wps.WeldMatId))
{ d.WeldMatId = wps.WeldMatId;
d.WeldMatId = wps.WeldMatId;
}
if (!string.IsNullOrEmpty(wps.WeldSilkId)) if (!string.IsNullOrEmpty(wps.WeldSilkId))
{ {
d.WeldSilkId = wps.WeldSilkId.Replace("|", ","); d.WeldSilkId = wps.WeldSilkId.Replace("|", ",");
} }
else
{
d.WeldSilkId = wps.WeldSilkId;
}
//} //}
} }
} }
else
{
var wps = wpsList.FirstOrDefault(x => x.WPQId == d.WPQId);
if (!string.IsNullOrEmpty(wps.WeldingMethodId))
{
d.WeldingMethodId = wps.WeldingMethodId;
}
d.WeldMatId = wps.WeldMatId;
if (!string.IsNullOrEmpty(wps.WeldSilkId))
{
d.WeldSilkId = wps.WeldSilkId.Replace("|", ",");
}
else
{
d.WeldSilkId = wps.WeldSilkId;
}
}
#endregion #endregion
dayList.Add(d); dayList.Add(d);
// 查找dayList里的重复数据 //todo
// WPS焊工判断资质 // WPS焊工判断资质
if (isExistFloor && isExistCell) if (isExistFloor && isExistCell)
{ {
@ -1648,10 +1671,10 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
newWeldJoint.JointAttribute = item.JointAttribute; newWeldJoint.JointAttribute = item.JointAttribute;
newWeldJoint.WeldingLocationId = item.WeldingLocationId; newWeldJoint.WeldingLocationId = item.WeldingLocationId;
newWeldJoint.Size = item.Size; newWeldJoint.Size = item.Size;
newWeldJoint.DoneDin = item.Size;
newWeldJoint.ANSISCH = item.ANSISCH; newWeldJoint.ANSISCH = item.ANSISCH;
newWeldJoint.Dia = item.Dia; newWeldJoint.Dia = item.Dia;
newWeldJoint.Thickness = item.Thickness; newWeldJoint.Thickness = item.Thickness;
newWeldJoint.DoneDin = item.Size;
newWeldJoint.Specification = item.Specification; newWeldJoint.Specification = item.Specification;
newWeldJoint.WeldingMethodId = item.WeldingMethodId; newWeldJoint.WeldingMethodId = item.WeldingMethodId;
newWeldJoint.Material1Id = item.Material1Id; newWeldJoint.Material1Id = item.Material1Id;

View File

@ -42,7 +42,7 @@
<Rows> <Rows>
<f:FormRow> <f:FormRow>
<Items> <Items>
<f:TextBox ID="txtWeldingDailyCode" Label="<%$ Resources:Lan,WeldingReportCode %>" <f:TextBox ID="txtWeldingDailyCode" Label="<%$ Resources:Lan,WeldingReportCode %>" Readonly="true"
ShowRedStar="true" Required="true" runat="server" LabelWidth="120px" LabelAlign="Right" FocusOnPageLoad="true"> ShowRedStar="true" Required="true" runat="server" LabelWidth="120px" LabelAlign="Right" FocusOnPageLoad="true">
</f:TextBox> </f:TextBox>
<f:DropDownList ID="drpUnit" Label="<%$ Resources:Lan,UnitName %>" runat="server" <f:DropDownList ID="drpUnit" Label="<%$ Resources:Lan,UnitName %>" runat="server"
@ -101,14 +101,14 @@
TextAlign="Left" Width="180px"> TextAlign="Left" Width="180px">
</f:RenderField> </f:RenderField>
<f:RenderField HeaderText="<%$ Resources:Lan,WeldingJointNumber %>" ColumnID="WeldJointCode" <f:RenderField HeaderText="<%$ Resources:Lan,WeldingJointNumber %>" ColumnID="WeldJointCode"
DataField="WeldJointCode" SortField="WeldJointCode" FieldType="String" HeaderTextAlign="Center" DataField="WeldJointCode" FieldType="String" HeaderTextAlign="Center"
TextAlign="Left" Width="70px"> TextAlign="Left" Width="70px">
</f:RenderField> </f:RenderField>
<%--<f:RenderField HeaderText="探伤比例" ColumnID="NDTR_Name" DataField="NDTR_Name" SortField="NDTR_Name" <%--<f:RenderField HeaderText="探伤比例" ColumnID="NDTR_Name" DataField="NDTR_Name" SortField="NDTR_Name"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="80px"> FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="80px">
</f:RenderField> --%> </f:RenderField> --%>
<f:RenderField HeaderText="<%$ Resources:Lan,CoveringWelder %>" ColumnID="CoverWelderId" <f:RenderField HeaderText="<%$ Resources:Lan,CoveringWelder %>" ColumnID="CoverWelderId"
DataField="CoverWelderCode" SortField="CoverWelderCode" FieldType="String" HeaderTextAlign="Center" DataField="CoverWelderCode" FieldType="String" HeaderTextAlign="Center"
TextAlign="Left" Width="110px"> TextAlign="Left" Width="110px">
<Editor> <Editor>
<f:DropDownList ID="drpCoverWelderId" EnableEdit="true" Required="true" runat="server" <f:DropDownList ID="drpCoverWelderId" EnableEdit="true" Required="true" runat="server"
@ -117,7 +117,7 @@
</Editor> </Editor>
</f:RenderField> </f:RenderField>
<f:RenderField HeaderText="<%$ Resources:Lan,FloorWelder %>" ColumnID="BackingWelderId" <f:RenderField HeaderText="<%$ Resources:Lan,FloorWelder %>" ColumnID="BackingWelderId"
DataField="BackingWelderCode" SortField="BackingWelderCode" FieldType="String" DataField="BackingWelderCode" FieldType="String"
HeaderTextAlign="Center" TextAlign="Left" Width="110px"> HeaderTextAlign="Center" TextAlign="Left" Width="110px">
<Editor> <Editor>
<f:DropDownList ID="drpBackingWelderId" EnableEdit="true" Required="true" runat="server" <f:DropDownList ID="drpBackingWelderId" EnableEdit="true" Required="true" runat="server"
@ -126,7 +126,7 @@
</Editor> </Editor>
</f:RenderField> </f:RenderField>
<f:RenderField HeaderText="<%$ Resources:Lan,WeldingJointType %>" ColumnID="WeldTypeId" <f:RenderField HeaderText="<%$ Resources:Lan,WeldingJointType %>" ColumnID="WeldTypeId"
DataField="WeldTypeId" SortField="WeldTypeId" FieldType="String" HeaderTextAlign="Center" DataField="WeldTypeId" FieldType="String" HeaderTextAlign="Center"
TextAlign="Left" Width="100px"> TextAlign="Left" Width="100px">
<Editor> <Editor>
<f:DropDownList ID="drpWeldType" Required="true" runat="server" ShowRedStar="true"> <f:DropDownList ID="drpWeldType" Required="true" runat="server" ShowRedStar="true">
@ -134,7 +134,7 @@
</Editor> </Editor>
</f:RenderField> </f:RenderField>
<f:RenderField HeaderText="<%$ Resources:Lan,WeldingJointQuality %>" ColumnID="JointAttribute" <f:RenderField HeaderText="<%$ Resources:Lan,WeldingJointQuality %>" ColumnID="JointAttribute"
DataField="JointAttribute" SortField="JointAttribute" FieldType="String" HeaderTextAlign="Center" DataField="JointAttribute" FieldType="String" HeaderTextAlign="Center"
TextAlign="Left" Width="100px"> TextAlign="Left" Width="100px">
<Editor> <Editor>
<f:DropDownList ID="drpJointAttribute" Required="true" runat="server" ShowRedStar="true"> <f:DropDownList ID="drpJointAttribute" Required="true" runat="server" ShowRedStar="true">
@ -142,18 +142,18 @@
</Editor> </Editor>
</f:RenderField> </f:RenderField>
<f:RenderField HeaderText="<%$ Resources:Lan,WleldingLocation %>" ColumnID="WeldingLocationId" <f:RenderField HeaderText="<%$ Resources:Lan,WleldingLocation %>" ColumnID="WeldingLocationId"
DataField="WeldingLocationCode" SortField="WeldingLocationCode" FieldType="String" DataField="WeldingLocationCode" FieldType="String"
HeaderTextAlign="Center" TextAlign="Left" Width="100px"> HeaderTextAlign="Center" TextAlign="Left" Width="100px">
<Editor> <Editor>
<f:DropDownList ID="drpWeldingLocationId" Required="true" runat="server" ShowRedStar="true"> <f:DropDownList ID="drpWeldingLocationId" Required="true" runat="server" ShowRedStar="true">
</f:DropDownList> </f:DropDownList>
</Editor> </Editor>
</f:RenderField> </f:RenderField>
<f:RenderField HeaderText="<%$ Resources:Lan,InchDiameter %>" ColumnID="DoneDin" DataField="DoneDin" <f:RenderField HeaderText="<%$ Resources:Lan,InchDiameter %>" ColumnID="Size" DataField="Size"
SortField="DoneDin" FieldType="Double" HeaderTextAlign="Center" TextAlign="Left" FieldType="Double" HeaderTextAlign="Center" TextAlign="Left"
Width="100px"> Width="100px">
<Editor> <Editor>
<f:NumberBox ID="txtDoneDin" NoDecimal="false" NoNegative="true" runat="server" ShowRedStar="true"> <f:NumberBox ID="txtSize" NoDecimal="false" NoNegative="true" runat="server" ShowRedStar="true">
</f:NumberBox> </f:NumberBox>
</Editor> </Editor>
</f:RenderField> </f:RenderField>
@ -189,7 +189,7 @@
</f:RenderField>--%> </f:RenderField>--%>
<f:RenderField HeaderText="材质1" ColumnID="Material1Code" <f:RenderField HeaderText="材质1" ColumnID="Material1Code"
DataField="Material1Code" SortField="Material1Code" FieldType="String" DataField="Material1Code" FieldType="String"
HeaderTextAlign="Center" TextAlign="Left" Width="150px"> HeaderTextAlign="Center" TextAlign="Left" Width="150px">
<Editor> <Editor>
<f:DropDownList ID="drpMaterial1" Required="true" runat="server" ShowRedStar="true"> <f:DropDownList ID="drpMaterial1" Required="true" runat="server" ShowRedStar="true">
@ -197,7 +197,7 @@
</Editor> </Editor>
</f:RenderField> </f:RenderField>
<f:RenderField HeaderText="材质2" ColumnID="Material2Code" <f:RenderField HeaderText="材质2" ColumnID="Material2Code"
DataField="Material2Code" SortField="Material2Code" FieldType="String" DataField="Material2Code" FieldType="String"
HeaderTextAlign="Center" TextAlign="Left" Width="150px"> HeaderTextAlign="Center" TextAlign="Left" Width="150px">
<Editor> <Editor>
<f:DropDownList ID="drpMaterial2" Required="true" runat="server" ShowRedStar="true"> <f:DropDownList ID="drpMaterial2" Required="true" runat="server" ShowRedStar="true">
@ -206,7 +206,7 @@
</f:RenderField> </f:RenderField>
<f:RenderField HeaderText="组件1" ColumnID="Components1Code" <f:RenderField HeaderText="组件1" ColumnID="Components1Code"
DataField="Components1Code" SortField="Components1Code" FieldType="String" DataField="Components1Code" FieldType="String"
HeaderTextAlign="Center" TextAlign="Left" Width="100px"> HeaderTextAlign="Center" TextAlign="Left" Width="100px">
<Editor> <Editor>
<f:DropDownList ID="drpComponents1" Required="true" runat="server" ShowRedStar="true"> <f:DropDownList ID="drpComponents1" Required="true" runat="server" ShowRedStar="true">
@ -214,7 +214,7 @@
</Editor> </Editor>
</f:RenderField> </f:RenderField>
<f:RenderField HeaderText="组件2" ColumnID="Components2Code" <f:RenderField HeaderText="组件2" ColumnID="Components2Code"
DataField="Components2Code" SortField="Components2Code" FieldType="String" DataField="Components2Code" FieldType="String"
HeaderTextAlign="Center" TextAlign="Left" Width="100px"> HeaderTextAlign="Center" TextAlign="Left" Width="100px">
<Editor> <Editor>
<f:DropDownList ID="drpComponents2" Required="true" runat="server" ShowRedStar="true"> <f:DropDownList ID="drpComponents2" Required="true" runat="server" ShowRedStar="true">
@ -222,7 +222,7 @@
</Editor> </Editor>
</f:RenderField> </f:RenderField>
<f:RenderField HeaderText="炉批号1" ColumnID="HeartNo1" <f:RenderField HeaderText="炉批号1" ColumnID="HeartNo1"
DataField="HeartNo1" SortField="HeartNo1" FieldType="String" DataField="HeartNo1" FieldType="String"
HeaderTextAlign="Center" TextAlign="Left" Width="120px"> HeaderTextAlign="Center" TextAlign="Left" Width="120px">
<Editor> <Editor>
<f:TextBox ID="txtHeartNo1" runat="server" > <f:TextBox ID="txtHeartNo1" runat="server" >
@ -230,7 +230,7 @@
</Editor> </Editor>
</f:RenderField> </f:RenderField>
<f:RenderField HeaderText="炉批号2" ColumnID="HeartNo2" <f:RenderField HeaderText="炉批号2" ColumnID="HeartNo2"
DataField="HeartNo2" SortField="HeartNo2" FieldType="String" DataField="HeartNo2" FieldType="String"
HeaderTextAlign="Center" TextAlign="Left" Width="120px"> HeaderTextAlign="Center" TextAlign="Left" Width="120px">
<Editor> <Editor>
<f:TextBox ID="txtHeartNo2" runat="server" > <f:TextBox ID="txtHeartNo2" runat="server" >

View File

@ -280,7 +280,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
// 2.获取当前分页数据 // 2.获取当前分页数据
//var table = this.GetPagedDataTable(GridNewDynamic, tb1); //var table = this.GetPagedDataTable(GridNewDynamic, tb1);
Grid1.RecordCount = tb.Rows.Count; Grid1.RecordCount = tb.Rows.Count;
tb = GetFilteredTable(Grid1.FilteredData, tb); //tb = GetFilteredTable(Grid1.FilteredData, tb);
var table = this.GetPagedDataTable(Grid1, tb); var table = this.GetPagedDataTable(Grid1, tb);
Grid1.DataSource = table; Grid1.DataSource = table;
@ -968,14 +968,17 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
{ {
newWeldJoint.WeldingMethodId = wps.WeldingMethodId; newWeldJoint.WeldingMethodId = wps.WeldingMethodId;
} }
if (!string.IsNullOrEmpty(wps.WeldMatId))
{ newWeldJoint.WeldMatId = wps.WeldMatId;
newWeldJoint.WeldMatId = wps.WeldMatId;
}
if (!string.IsNullOrEmpty(wps.WeldSilkId)) if (!string.IsNullOrEmpty(wps.WeldSilkId))
{ {
newWeldJoint.WeldSilkId = wps.WeldSilkId.Replace("|", ","); newWeldJoint.WeldSilkId = wps.WeldSilkId.Replace("|", ",");
} }
else
{
newWeldJoint.WeldSilkId = wps.WeldSilkId;
}
} }
BLL.Pipeline_WeldJointService.UpdateWeldJoint(newWeldJoint); BLL.Pipeline_WeldJointService.UpdateWeldJoint(newWeldJoint);
@ -1134,7 +1137,8 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
newWeldJoint.BackingWelderId = item.BackingWelderId; newWeldJoint.BackingWelderId = item.BackingWelderId;
newWeldJoint.WeldTypeId = item.WeldTypeId; newWeldJoint.WeldTypeId = item.WeldTypeId;
newWeldJoint.JointArea = item.JointArea; newWeldJoint.JointArea = item.JointArea;
newWeldJoint.DoneDin = item.DoneDin; newWeldJoint.DoneDin = item.Size;
newWeldJoint.Size = item.Size;
newWeldJoint.JointAttribute = item.JointAttribute; newWeldJoint.JointAttribute = item.JointAttribute;
newWeldJoint.WeldingLocationId = item.WeldingLocationId; newWeldJoint.WeldingLocationId = item.WeldingLocationId;
BLL.Pipeline_WeldJointService.UpdateWeldJoint(newWeldJoint); BLL.Pipeline_WeldJointService.UpdateWeldJoint(newWeldJoint);
@ -1238,8 +1242,8 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
item.WeldingLocationCode = values.Value<string>("WeldingLocationId").ToString(); item.WeldingLocationCode = values.Value<string>("WeldingLocationId").ToString();
item.WeldingLocationId = weldingLocation.WeldingLocationId; item.WeldingLocationId = weldingLocation.WeldingLocationId;
} }
item.Size = Funs.GetNewDecimalOrZero(values.Value<string>("DoneDin").ToString()); item.Size = Funs.GetNewDecimalOrZero(values.Value<string>("Size").ToString());
item.DoneDin = Funs.GetNewDecimalOrZero(values.Value<string>("DoneDin").ToString()); item.DoneDin = Funs.GetNewDecimalOrZero(values.Value<string>("Size").ToString());
item.HeartNo1= values.Value<string>("HeartNo1").ToString(); item.HeartNo1= values.Value<string>("HeartNo1").ToString();
item.HeartNo2 = values.Value<string>("HeartNo2").ToString(); item.HeartNo2 = values.Value<string>("HeartNo2").ToString();
item.Specification= values.Value<string>("Specification").ToString(); item.Specification= values.Value<string>("Specification").ToString();
@ -1330,7 +1334,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
item.PipeSegment = values.Value<string>("PipeSegment").ToString(); item.PipeSegment = values.Value<string>("PipeSegment").ToString();
var wps = (from x in Funs.DB.WPQ_WPQList var wps = (from x in Funs.DB.WPQ_WPQList
where x.WPQCode == values.Value<string>("WPQCode") && x.ProjectId==CurrUser.LoginProjectId where x.WPQCode == values.Value<string>("WPQCode").Trim() && x.ProjectId==CurrUser.LoginProjectId
select x).FirstOrDefault(); select x).FirstOrDefault();
if (wps != null) if (wps != null)
{ {
@ -1340,18 +1344,20 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
{ {
var met = BLL.Base_WeldingMethodService.GetWeldingMethodByWeldingMethodId(wps.WeldingMethodId); var met = BLL.Base_WeldingMethodService.GetWeldingMethodByWeldingMethodId(wps.WeldingMethodId);
item.WeldingMethodId = wps.WeldingMethodId; item.WeldingMethodId = wps.WeldingMethodId;
item.WeldingMethodCode= met.WeldingMethodCode; item.WeldingMethodCode = met.WeldingMethodCode;
}
if (!string.IsNullOrEmpty(wps.WeldMatId))
{
item.WeldMatId = wps.WeldMatId;
} }
item.WeldMatId = wps.WeldMatId;
if (!string.IsNullOrEmpty(wps.WeldSilkId)) if (!string.IsNullOrEmpty(wps.WeldSilkId))
{ {
item.WeldSilkId = wps.WeldSilkId.Replace("|", ","); item.WeldSilkId = wps.WeldSilkId.Replace("|", ",");
} }
else
{
item.WeldSilkId = wps.WeldSilkId;
}
} }
getNewWeldReportItem.Add(item); getNewWeldReportItem.Add(item);
} }

View File

@ -7,11 +7,13 @@
// </自动生成> // </自动生成>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace FineUIPro.Web.WeldingProcess.WeldingManage { namespace FineUIPro.Web.WeldingProcess.WeldingManage
{
public partial class WeldReportEdit {
public partial class WeldReportEdit
{
/// <summary> /// <summary>
/// form1 控件。 /// form1 控件。
/// </summary> /// </summary>
@ -20,7 +22,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1; protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary> /// <summary>
/// PageManager1 控件。 /// PageManager1 控件。
/// </summary> /// </summary>
@ -29,7 +31,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.PageManager PageManager1; protected global::FineUIPro.PageManager PageManager1;
/// <summary> /// <summary>
/// Panel1 控件。 /// Panel1 控件。
/// </summary> /// </summary>
@ -38,7 +40,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.Panel Panel1; protected global::FineUIPro.Panel Panel1;
/// <summary> /// <summary>
/// panelCenterRegion 控件。 /// panelCenterRegion 控件。
/// </summary> /// </summary>
@ -47,7 +49,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.Panel panelCenterRegion; protected global::FineUIPro.Panel panelCenterRegion;
/// <summary> /// <summary>
/// Toolbar2 控件。 /// Toolbar2 控件。
/// </summary> /// </summary>
@ -56,7 +58,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.Toolbar Toolbar2; protected global::FineUIPro.Toolbar Toolbar2;
/// <summary> /// <summary>
/// hdItemsString 控件。 /// hdItemsString 控件。
/// </summary> /// </summary>
@ -65,7 +67,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.HiddenField hdItemsString; protected global::FineUIPro.HiddenField hdItemsString;
/// <summary> /// <summary>
/// hdTablerId 控件。 /// hdTablerId 控件。
/// </summary> /// </summary>
@ -74,7 +76,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.HiddenField hdTablerId; protected global::FineUIPro.HiddenField hdTablerId;
/// <summary> /// <summary>
/// ToolbarFill1 控件。 /// ToolbarFill1 控件。
/// </summary> /// </summary>
@ -83,7 +85,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.ToolbarFill ToolbarFill1; protected global::FineUIPro.ToolbarFill ToolbarFill1;
/// <summary> /// <summary>
/// btnSave 控件。 /// btnSave 控件。
/// </summary> /// </summary>
@ -92,7 +94,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.Button btnSave; protected global::FineUIPro.Button btnSave;
/// <summary> /// <summary>
/// SimpleForm1 控件。 /// SimpleForm1 控件。
/// </summary> /// </summary>
@ -101,7 +103,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.Form SimpleForm1; protected global::FineUIPro.Form SimpleForm1;
/// <summary> /// <summary>
/// txtWeldingDailyCode 控件。 /// txtWeldingDailyCode 控件。
/// </summary> /// </summary>
@ -110,7 +112,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.TextBox txtWeldingDailyCode; protected global::FineUIPro.TextBox txtWeldingDailyCode;
/// <summary> /// <summary>
/// drpUnit 控件。 /// drpUnit 控件。
/// </summary> /// </summary>
@ -119,7 +121,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.DropDownList drpUnit; protected global::FineUIPro.DropDownList drpUnit;
/// <summary> /// <summary>
/// drpInstallation 控件。 /// drpInstallation 控件。
/// </summary> /// </summary>
@ -128,7 +130,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.DropDownList drpInstallation; protected global::FineUIPro.DropDownList drpInstallation;
/// <summary> /// <summary>
/// txtWeldingDate 控件。 /// txtWeldingDate 控件。
/// </summary> /// </summary>
@ -137,7 +139,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.DatePicker txtWeldingDate; protected global::FineUIPro.DatePicker txtWeldingDate;
/// <summary> /// <summary>
/// txtTabler 控件。 /// txtTabler 控件。
/// </summary> /// </summary>
@ -146,7 +148,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.TextBox txtTabler; protected global::FineUIPro.TextBox txtTabler;
/// <summary> /// <summary>
/// txtTableDate 控件。 /// txtTableDate 控件。
/// </summary> /// </summary>
@ -155,7 +157,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.DatePicker txtTableDate; protected global::FineUIPro.DatePicker txtTableDate;
/// <summary> /// <summary>
/// txtRemark 控件。 /// txtRemark 控件。
/// </summary> /// </summary>
@ -164,7 +166,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.TextBox txtRemark; protected global::FineUIPro.TextBox txtRemark;
/// <summary> /// <summary>
/// lbAmount 控件。 /// lbAmount 控件。
/// </summary> /// </summary>
@ -173,7 +175,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.Label lbAmount; protected global::FineUIPro.Label lbAmount;
/// <summary> /// <summary>
/// Grid1 控件。 /// Grid1 控件。
/// </summary> /// </summary>
@ -182,7 +184,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.Grid Grid1; protected global::FineUIPro.Grid Grid1;
/// <summary> /// <summary>
/// Toolbar1 控件。 /// Toolbar1 控件。
/// </summary> /// </summary>
@ -191,7 +193,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.Toolbar Toolbar1; protected global::FineUIPro.Toolbar Toolbar1;
/// <summary> /// <summary>
/// ckSelect 控件。 /// ckSelect 控件。
/// </summary> /// </summary>
@ -200,7 +202,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.Button ckSelect; protected global::FineUIPro.Button ckSelect;
/// <summary> /// <summary>
/// drpCoverWelderId 控件。 /// drpCoverWelderId 控件。
/// </summary> /// </summary>
@ -209,7 +211,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.DropDownList drpCoverWelderId; protected global::FineUIPro.DropDownList drpCoverWelderId;
/// <summary> /// <summary>
/// drpBackingWelderId 控件。 /// drpBackingWelderId 控件。
/// </summary> /// </summary>
@ -218,7 +220,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.DropDownList drpBackingWelderId; protected global::FineUIPro.DropDownList drpBackingWelderId;
/// <summary> /// <summary>
/// drpWeldType 控件。 /// drpWeldType 控件。
/// </summary> /// </summary>
@ -227,7 +229,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.DropDownList drpWeldType; protected global::FineUIPro.DropDownList drpWeldType;
/// <summary> /// <summary>
/// drpJointAttribute 控件。 /// drpJointAttribute 控件。
/// </summary> /// </summary>
@ -236,7 +238,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.DropDownList drpJointAttribute; protected global::FineUIPro.DropDownList drpJointAttribute;
/// <summary> /// <summary>
/// drpWeldingLocationId 控件。 /// drpWeldingLocationId 控件。
/// </summary> /// </summary>
@ -245,16 +247,16 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.DropDownList drpWeldingLocationId; protected global::FineUIPro.DropDownList drpWeldingLocationId;
/// <summary> /// <summary>
/// txtDoneDin 控件。 /// txtSize 控件。
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// 自动生成的字段。 /// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.NumberBox txtDoneDin; protected global::FineUIPro.NumberBox txtSize;
/// <summary> /// <summary>
/// drpANSISCH 控件。 /// drpANSISCH 控件。
/// </summary> /// </summary>
@ -263,7 +265,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.DropDownList drpANSISCH; protected global::FineUIPro.DropDownList drpANSISCH;
/// <summary> /// <summary>
/// drpMaterial1 控件。 /// drpMaterial1 控件。
/// </summary> /// </summary>
@ -272,7 +274,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.DropDownList drpMaterial1; protected global::FineUIPro.DropDownList drpMaterial1;
/// <summary> /// <summary>
/// drpMaterial2 控件。 /// drpMaterial2 控件。
/// </summary> /// </summary>
@ -281,7 +283,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.DropDownList drpMaterial2; protected global::FineUIPro.DropDownList drpMaterial2;
/// <summary> /// <summary>
/// drpComponents1 控件。 /// drpComponents1 控件。
/// </summary> /// </summary>
@ -290,7 +292,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.DropDownList drpComponents1; protected global::FineUIPro.DropDownList drpComponents1;
/// <summary> /// <summary>
/// drpComponents2 控件。 /// drpComponents2 控件。
/// </summary> /// </summary>
@ -299,7 +301,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.DropDownList drpComponents2; protected global::FineUIPro.DropDownList drpComponents2;
/// <summary> /// <summary>
/// txtHeartNo1 控件。 /// txtHeartNo1 控件。
/// </summary> /// </summary>
@ -308,7 +310,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.TextBox txtHeartNo1; protected global::FineUIPro.TextBox txtHeartNo1;
/// <summary> /// <summary>
/// txtHeartNo2 控件。 /// txtHeartNo2 控件。
/// </summary> /// </summary>
@ -317,7 +319,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.TextBox txtHeartNo2; protected global::FineUIPro.TextBox txtHeartNo2;
/// <summary> /// <summary>
/// txtPipeSegment 控件。 /// txtPipeSegment 控件。
/// </summary> /// </summary>
@ -326,7 +328,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.TextBox txtPipeSegment; protected global::FineUIPro.TextBox txtPipeSegment;
/// <summary> /// <summary>
/// drpWPS 控件。 /// drpWPS 控件。
/// </summary> /// </summary>
@ -335,7 +337,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.DropDownList drpWPS; protected global::FineUIPro.DropDownList drpWPS;
/// <summary> /// <summary>
/// Window1 控件。 /// Window1 控件。
/// </summary> /// </summary>
@ -344,7 +346,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.Window Window1; protected global::FineUIPro.Window Window1;
/// <summary> /// <summary>
/// Menu1 控件。 /// Menu1 控件。
/// </summary> /// </summary>
@ -353,7 +355,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.Menu Menu1; protected global::FineUIPro.Menu Menu1;
/// <summary> /// <summary>
/// btnMenuDelete 控件。 /// btnMenuDelete 控件。
/// </summary> /// </summary>

View File

@ -5,12 +5,29 @@
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server"> <head runat="server">
<title>焊口综合信息</title> <title>焊口综合信息</title>
<style> <style>
.f-grid-row-summary .f-grid-cell-inner { .f-grid-row-summary .f-grid-cell-inner {
font-weight: bold; font-weight: bold;
color: red; color: red;
} }
</style>
/*定义父容器*/
.content {
width: 550px;
height: 30px;
background: #E4F1FB;
margin: 0 auto;
}
/*定义进度条*/
.box {
width: 0px;
height: 30px;
line-height: 30px;
text-align: center;
background: #3BAAE3;
color: #fff;
}
</style>
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" /> <link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
</head> </head>
<body> <body>
@ -27,10 +44,10 @@
<Toolbars> <Toolbars>
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left"> <f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left">
<Items> <Items>
<f:DropDownList ID="drpWorkAreaId" runat="server" Label="<%$ Resources:Lan,Area %>" AutoPostBack="true" <f:DropDownList ID="drpWorkAreaId" runat="server" Label="<%$ Resources:Lan,Area %>" EnableMultiSelect="true" EnableCheckBoxSelect="true"
LabelAlign="Right" Width="280px" OnSelectedIndexChanged="drpWorkAreaId_OnSelectedIndexChanged"> AutoPostBack="true" LabelAlign="Right" Width="480px" OnSelectedIndexChanged="drpWorkAreaId_OnSelectedIndexChanged">
</f:DropDownList> </f:DropDownList>
<f:DropDownList ID="drpPipeLine" runat="server" Label="管线" LabelAlign="Right" Width="600px" EmptyText="请选择管线" <f:DropDownList ID="drpPipeLine" runat="server" Label="管线" LabelAlign="Right" Width="480px" EmptyText="请选择管线"
LabelWidth="60px" EnableEdit="true" EnableCheckBoxSelect="true" EnableMultiSelect="true" > LabelWidth="60px" EnableEdit="true" EnableCheckBoxSelect="true" EnableMultiSelect="true" >
</f:DropDownList> </f:DropDownList>
<f:ToolbarFill ID="ToolbarFill1" runat="server"> <f:ToolbarFill ID="ToolbarFill1" runat="server">
@ -248,6 +265,22 @@
</f:Grid> </f:Grid>
</Items> </Items>
</f:Panel> </f:Panel>
<f:Window ID="WindowExport" Hidden="true" runat="server" MinHeight="30px"
Target="Parent" ShowHeader="false" BodyPadding="0" Margin="0"
IsModal="true" Width="550px" Height="30px">
<Items>
<f:ContentPanel ShowBorder="false" Height="30px" ShowHeader="false" ID="ContentPanel3" runat="server">
<div class="content" id="content">
<div class="box" id="box"></div>
</div>
</f:ContentPanel>
</Items>
</f:Window>
<asp:ScriptManager ID="ScriptManager2" runat="server" EnablePageMethods="true">
<Scripts>
<asp:ScriptReference Path="~/res/ProcessBar.js" />
</Scripts>
</asp:ScriptManager>
</form> </form>
</body> </body>
</html> </html>

View File

@ -9,12 +9,28 @@ using System.Data.SqlClient;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using Newtonsoft.Json.Linq; using Newtonsoft.Json.Linq;
using System.Threading;
namespace FineUIPro.Web.WeldingProcess.WeldingReport namespace FineUIPro.Web.WeldingProcess.WeldingReport
{ {
public partial class JointComprehensive : PageBase public partial class JointComprehensive : PageBase
{ {
public static int percent { get; set; }
public static string url { get; set; }
[System.Web.Services.WebMethod]
public static int getPercent()
{
return percent;
}
[System.Web.Services.WebMethod]
public static string getUrl()
{
return url;
}
#region #region
/// <summary> /// <summary>
/// 加载页面 /// 加载页面
@ -37,9 +53,12 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport
if (drpWorkAreaId.SelectedValue != Const._Null && drpWorkAreaId.SelectedValue != null) if (drpWorkAreaId.SelectedValue != Const._Null && drpWorkAreaId.SelectedValue != null)
{ {
listStr.Add(new SqlParameter("@workAreaId", this.drpWorkAreaId.SelectedValue)); string[] areaList = drpWorkAreaId.SelectedValueArray;
string workAreaIds = string.Join(",", areaList);
listStr.Add(new SqlParameter("@workAreaIds", workAreaIds));
// listStr.Add(new SqlParameter("@workAreaId", this.drpWorkAreaId.SelectedValue));
} }
if (!string.IsNullOrEmpty(drpPipeLine.SelectedValue)) if (!string.IsNullOrEmpty(drpPipeLine.SelectedValue) && drpPipeLine.SelectedValue!=Const._Null)
{ {
string[] pipeList = drpPipeLine.SelectedValueArray; string[] pipeList = drpPipeLine.SelectedValueArray;
string pipeLineIds = string.Join(",", pipeList); string pipeLineIds = string.Join(",", pipeList);
@ -95,10 +114,10 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport
protected void drpWorkAreaId_OnSelectedIndexChanged(object sender, EventArgs e) protected void drpWorkAreaId_OnSelectedIndexChanged(object sender, EventArgs e)
{ {
string workAreaId = drpWorkAreaId.SelectedValue; string[] workAreaIds = drpWorkAreaId.SelectedValueArray;
if (!string.IsNullOrEmpty(workAreaId)) if (workAreaIds.Length == 1)
{ {
BLL.Pipeline_PipelineService.InitPipelineDropDownList(drpPipeLine, workAreaId); BLL.Pipeline_PipelineService.InitPipelineDropDownList(drpPipeLine, workAreaIds[0], Resources.Lan.PleaseSelect);
} }
} }
@ -146,12 +165,25 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport
} }
#endregion #endregion
#region #region
/// 导出按钮 /// 导出按钮
/// </summary> /// </summary>
/// <param name="sender"></param> /// <param name="sender"></param>
/// <param name="e"></param> /// <param name="e"></param>
protected void btnOut_Click(object sender, EventArgs e) protected void btnOut_Click(object sender, EventArgs e)
{
percent = 0;
url = "";
Thread t = new Thread(new ThreadStart(() => { Export(); }));
t.Start();
PageContext.RegisterStartupScript("showProcessBar()");
}
private void Export()
{ {
string rootPath = Server.MapPath("~/") + Const.ExcelUrl; string rootPath = Server.MapPath("~/") + Const.ExcelUrl;
//模板文件 //模板文件
@ -162,7 +194,9 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport
{ {
Directory.CreateDirectory(filePath); Directory.CreateDirectory(filePath);
} }
string ReportFileName = filePath + "out.xlsx";
string ReportFileName = filePath + "焊口综合分析" + DateTime.Now.ToString("yyyyMMddhhmmss") + ".xlsx";
//string ReportFileName = filePath + "out.xlsx";
FileStream file = new FileStream(TempletFileName, FileMode.Open, FileAccess.Read); FileStream file = new FileStream(TempletFileName, FileMode.Open, FileAccess.Read);
XSSFWorkbook hssfworkbook = new XSSFWorkbook(file); XSSFWorkbook hssfworkbook = new XSSFWorkbook(file);
@ -192,6 +226,8 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport
dataTable.DefaultView.Sort = "WorkAreaCode asc,PipelineCode asc,WeldJointCode asc"; dataTable.DefaultView.Sort = "WorkAreaCode asc,PipelineCode asc,WeldJointCode asc";
DataTable tb = dataTable.DefaultView.ToTable(); DataTable tb = dataTable.DefaultView.ToTable();
int totalNum = tb.Rows.Count;
if (tb.Rows.Count > 0) if (tb.Rows.Count > 0)
{ {
var rowIndex = 1; var rowIndex = 1;
@ -221,7 +257,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport
if (reportModel.GetRow(rowIndex).GetCell(4) == null) reportModel.GetRow(rowIndex).CreateCell(4); if (reportModel.GetRow(rowIndex).GetCell(4) == null) reportModel.GetRow(rowIndex).CreateCell(4);
reportModel.GetRow(rowIndex).GetCell(4).SetCellValue(itemOver["SingleNumber"].ToString()); reportModel.GetRow(rowIndex).GetCell(4).SetCellValue(itemOver["SingleNumber"].ToString());
reportModel.GetRow(rowIndex).GetCell(4).CellStyle = style; reportModel.GetRow(rowIndex).GetCell(4).CellStyle = style;
//管线号 //管线号
if (reportModel.GetRow(rowIndex).GetCell(5) == null) reportModel.GetRow(rowIndex).CreateCell(5); if (reportModel.GetRow(rowIndex).GetCell(5) == null) reportModel.GetRow(rowIndex).CreateCell(5);
reportModel.GetRow(rowIndex).GetCell(5).SetCellValue(itemOver["PipelineCode"].ToString()); reportModel.GetRow(rowIndex).GetCell(5).SetCellValue(itemOver["PipelineCode"].ToString());
@ -383,10 +419,15 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport
if (reportModel.GetRow(rowIndex).GetCell(40) == null) reportModel.GetRow(rowIndex).CreateCell(40); if (reportModel.GetRow(rowIndex).GetCell(40) == null) reportModel.GetRow(rowIndex).CreateCell(40);
reportModel.GetRow(rowIndex).GetCell(40).SetCellValue(ConvertWeldFlux(itemOver["WeldSilkId"])); reportModel.GetRow(rowIndex).GetCell(40).SetCellValue(ConvertWeldFlux(itemOver["WeldSilkId"]));
reportModel.GetRow(rowIndex).GetCell(40).CellStyle = style; reportModel.GetRow(rowIndex).GetCell(40).CellStyle = style;
#endregion #endregion
rowIndex++; if ((int)(90 * (rowIndex) / totalNum) > percent)
{
percent = (int)(100 * (rowIndex) / totalNum);
}
rowIndex++;
} }
var distinctPipelineCode = tb.AsEnumerable().GroupBy(row => row.Field<string>("PipelineId")).Select(group => group.First()); var distinctPipelineCode = tb.AsEnumerable().GroupBy(row => row.Field<string>("PipelineId")).Select(group => group.First());
@ -433,6 +474,12 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport
if (reportModel.GetRow(rowIndex).GetCell(24) == null) reportModel.GetRow(rowIndex).CreateCell(24); if (reportModel.GetRow(rowIndex).GetCell(24) == null) reportModel.GetRow(rowIndex).CreateCell(24);
reportModel.GetRow(rowIndex).GetCell(24).SetCellValue(coverWelder.Count().ToString()); reportModel.GetRow(rowIndex).GetCell(24).SetCellValue(coverWelder.Count().ToString());
reportModel.GetRow(rowIndex).GetCell(24).CellStyle.SetFont(cs_content_Font); reportModel.GetRow(rowIndex).GetCell(24).CellStyle.SetFont(cs_content_Font);
//if ((int)(90 * (rowIndex + 1) / totalNum) > percent)
//{
// percent = (int)(100 * (rowIndex + 1) / totalNum);
//}
} }
#endregion #endregion
reportModel.ForceFormulaRecalculation = true; reportModel.ForceFormulaRecalculation = true;
@ -441,28 +488,25 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport
{ {
hssfworkbook.Write(filess); hssfworkbook.Write(filess);
} }
FileInfo filet = new FileInfo(ReportFileName);
Response.Clear();
Response.Charset = "GB2312";
Response.ContentEncoding = System.Text.Encoding.UTF8;
// 添加头信息,为"文件下载/另存为"对话框指定默认文件名
Response.AddHeader("Content-Disposition", "attachment; filename=焊口综合分析_" + Server.UrlEncode(DateTime.Now.ToString("yyyyMMddhhmmss") + ".xlsx"));
// 添加头信息,指定文件大小,让浏览器能够显示下载进度
Response.AddHeader("Content-Length", filet.Length.ToString());
// 指定返回的是一个不能被客户端读取的流,必须被下载
Response.ContentType = "application/ms-excel";
// 把文件流发送到客户端
Response.WriteFile(filet.FullName);
// 停止页面的执行
Response.End();
//Response.ClearContent(); percent = 100;
//string filename = Funs.GetNewFileName(); url = ReportFileName.Replace(Server.MapPath("~/"), "");
//Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode(Resources.Lan.JointComprehensive + filename, System.Text.Encoding.UTF8) + ".xls");
//Response.ContentType = "application/excel"; //FileInfo filet = new FileInfo(ReportFileName);
//Response.Clear();
//Response.Charset = "GB2312";
//Response.ContentEncoding = System.Text.Encoding.UTF8; //Response.ContentEncoding = System.Text.Encoding.UTF8;
//Response.Write(GetGridTableHtml(Grid1)); //// 添加头信息,为"文件下载/另存为"对话框指定默认文件名
//Response.AddHeader("Content-Disposition", "attachment; filename=焊口综合分析_" + Server.UrlEncode(DateTime.Now.ToString("yyyyMMddhhmmss") + ".xlsx"));
//// 添加头信息,指定文件大小,让浏览器能够显示下载进度
//Response.AddHeader("Content-Length", filet.Length.ToString());
//// 指定返回的是一个不能被客户端读取的流,必须被下载
//Response.ContentType = "application/ms-excel";
//// 把文件流发送到客户端
//Response.WriteFile(filet.FullName);
//// 停止页面的执行
//Response.End(); //Response.End();
} }
/// <summary> /// <summary>

View File

@ -7,11 +7,13 @@
// </自动生成> // </自动生成>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace FineUIPro.Web.WeldingProcess.WeldingReport { namespace FineUIPro.Web.WeldingProcess.WeldingReport
{
public partial class JointComprehensive {
public partial class JointComprehensive
{
/// <summary> /// <summary>
/// form1 控件。 /// form1 控件。
/// </summary> /// </summary>
@ -20,7 +22,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1; protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary> /// <summary>
/// PageManager1 控件。 /// PageManager1 控件。
/// </summary> /// </summary>
@ -29,7 +31,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.PageManager PageManager1; protected global::FineUIPro.PageManager PageManager1;
/// <summary> /// <summary>
/// Panel1 控件。 /// Panel1 控件。
/// </summary> /// </summary>
@ -38,7 +40,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.Panel Panel1; protected global::FineUIPro.Panel Panel1;
/// <summary> /// <summary>
/// Grid1 控件。 /// Grid1 控件。
/// </summary> /// </summary>
@ -47,7 +49,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.Grid Grid1; protected global::FineUIPro.Grid Grid1;
/// <summary> /// <summary>
/// Toolbar1 控件。 /// Toolbar1 控件。
/// </summary> /// </summary>
@ -56,7 +58,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.Toolbar Toolbar1; protected global::FineUIPro.Toolbar Toolbar1;
/// <summary> /// <summary>
/// drpWorkAreaId 控件。 /// drpWorkAreaId 控件。
/// </summary> /// </summary>
@ -65,7 +67,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.DropDownList drpWorkAreaId; protected global::FineUIPro.DropDownList drpWorkAreaId;
/// <summary> /// <summary>
/// drpPipeLine 控件。 /// drpPipeLine 控件。
/// </summary> /// </summary>
@ -74,7 +76,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.DropDownList drpPipeLine; protected global::FineUIPro.DropDownList drpPipeLine;
/// <summary> /// <summary>
/// ToolbarFill1 控件。 /// ToolbarFill1 控件。
/// </summary> /// </summary>
@ -83,7 +85,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.ToolbarFill ToolbarFill1; protected global::FineUIPro.ToolbarFill ToolbarFill1;
/// <summary> /// <summary>
/// BtnAnalyse 控件。 /// BtnAnalyse 控件。
/// </summary> /// </summary>
@ -92,7 +94,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.Button BtnAnalyse; protected global::FineUIPro.Button BtnAnalyse;
/// <summary> /// <summary>
/// btnOut 控件。 /// btnOut 控件。
/// </summary> /// </summary>
@ -101,7 +103,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.Button btnOut; protected global::FineUIPro.Button btnOut;
/// <summary> /// <summary>
/// labNumber 控件。 /// labNumber 控件。
/// </summary> /// </summary>
@ -110,7 +112,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Label labNumber; protected global::System.Web.UI.WebControls.Label labNumber;
/// <summary> /// <summary>
/// Label3 控件。 /// Label3 控件。
/// </summary> /// </summary>
@ -119,7 +121,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Label Label3; protected global::System.Web.UI.WebControls.Label Label3;
/// <summary> /// <summary>
/// Label1 控件。 /// Label1 控件。
/// </summary> /// </summary>
@ -128,7 +130,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.Label Label1; protected global::System.Web.UI.WebControls.Label Label1;
/// <summary> /// <summary>
/// ToolbarSeparator1 控件。 /// ToolbarSeparator1 控件。
/// </summary> /// </summary>
@ -137,7 +139,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
/// <summary> /// <summary>
/// ToolbarText1 控件。 /// ToolbarText1 控件。
/// </summary> /// </summary>
@ -146,7 +148,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.ToolbarText ToolbarText1; protected global::FineUIPro.ToolbarText ToolbarText1;
/// <summary> /// <summary>
/// ddlPageSize 控件。 /// ddlPageSize 控件。
/// </summary> /// </summary>
@ -155,5 +157,32 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.DropDownList ddlPageSize; protected global::FineUIPro.DropDownList ddlPageSize;
/// <summary>
/// WindowExport 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window WindowExport;
/// <summary>
/// ContentPanel3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ContentPanel ContentPanel3;
/// <summary>
/// ScriptManager2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.ScriptManager ScriptManager2;
} }
} }

View File

@ -0,0 +1,87 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RTRateConfirm.aspx.cs" Inherits="FineUIPro.Web.WeldingProcess.WeldingReport.RTRateConfirm" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>RT比例确认表</title>
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="RT比例确认表"
EnableCollapse="true" runat="server" BoxFlex="1" EnableColumnLines="true" >
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:DropDownList ID="drpWorkAreaId" runat="server" Label="<%$ Resources:Lan,Area %>"
AutoPostBack="true" LabelAlign="Right" Width="480px" OnSelectedIndexChanged="drpWorkAreaId_OnSelectedIndexChanged">
</f:DropDownList>
<f:DropDownList ID="drpPipeLine" runat="server" Label="管线" LabelAlign="Right" Width="480px" EmptyText="请选择管线"
LabelWidth="60px" EnableEdit="true">
</f:DropDownList>
<f:Button ID="BtnAnalyse" Text="查询" Icon="ChartPie"
runat="server" OnClick="BtnAnalyse_Click">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Columns>
<f:RenderField HeaderText="管线号" ColumnID="PipelineCode"
DataField="PipelineCode" FieldType="String" HeaderTextAlign="Center"
Width="260px" >
</f:RenderField>
<f:RenderField HeaderText="材质" ColumnID="MaterialCode"
DataField="MaterialCode" FieldType="String" HeaderTextAlign="Center"
Width="150px">
</f:RenderField>
<f:RenderField HeaderText="规格" ColumnID="Specification"
DataField="Specification" FieldType="String"
HeaderTextAlign="Center" Width="150px">
</f:RenderField>
<f:RenderField HeaderText="焊口总数" ColumnID="JointTotalNum"
DataField="JointTotalNum" FieldType="String" HeaderTextAlign="Center"
Width="130px">
</f:RenderField>
<f:RenderField HeaderText="固定口数" ColumnID="GJointTotalNum"
DataField="GJointTotalNum" FieldType="String"
HeaderTextAlign="Center" Width="130px">
</f:RenderField>
<f:RenderField HeaderText="焊工代号" ColumnID="WelderCode"
DataField="WelderCode" FieldType="String" HeaderTextAlign="Center"
Width="130px">
</f:RenderField>
<f:RenderField HeaderText="施焊数量" ColumnID="WeldingNum"
DataField="WeldingNum" FieldType="String" HeaderTextAlign="Center"
Width="130px">
</f:RenderField>
<f:RenderField HeaderText="检测总数" ColumnID="NdeNum" DataField="NdeNum"
FieldType="String" HeaderTextAlign="Center" Width="130px">
</f:RenderField>
<f:RenderField HeaderText="检测固定口数" ColumnID="GNdeNum" DataField="GNdeNum"
FieldType="String" HeaderTextAlign="Center" Width="130px">
</f:RenderField>
<f:RenderField HeaderText="实际检测比例" ColumnID="CheckRate" DataField="CheckRate"
FieldType="String" HeaderTextAlign="Center" Width="130px">
</f:RenderField>
<f:RenderField HeaderText="应检测比例" ColumnID="DetectionRate" DataField="DetectionRate"
FieldType="String" HeaderTextAlign="Center" Width="130px">
</f:RenderField>
</Columns>
<Listeners>
<f:Listener Event="dataload" Handler="onGridDataLoad" />
</Listeners>
</f:Grid>
</Items>
</f:Panel>
</form>
<script>
function onGridDataLoad(event) {
this.mergeColumns(['PipelineCode', 'MaterialCode', 'Specification', 'JointTotalNum', 'GJointTotalNum']);
}
</script>
</body>
</html>

View File

@ -0,0 +1,94 @@
using BLL;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FineUIPro.Web.WeldingProcess.WeldingReport
{
public partial class RTRateConfirm : PageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
BLL.Project_WorkAreaService.InitWorkAreaDropDownList(this.drpWorkAreaId, true, this.CurrUser.LoginProjectId, string.Empty, string.Empty, string.Empty, Resources.Lan.PleaseSelect);//区域
}
}
private void BindGrid()
{
string strSql = @"SELECT t.WorkAreaId,t.PipelineCode,mat.MaterialCode,t.Specification,t.JointTotalNum,t.GJointTotalNum,
welder.WelderCode,t.WeldingNum,t.NdeNum,t.GNdeNum,(CONVERT(NVARCHAR(10),r.DetectionRateValue)+'%') AS DetectionRate,
CONVERT(NVARCHAR(10),((CAST((CASE ISNULL(t.WeldingNum,0) WHEN 0 THEN 0
ELSE 1.0 * ISNULL(t.NdeNum,0) /(1.0 * t.WeldingNum)
END ) AS DECIMAL(9,2)))*100))+'%' AS CheckRate
FROM
(SELECT pipe.WorkAreaId, jot.PipelineId,pipe.PipelineCode,pipe.MainMaterialId,pipe.DetectionRateId,jot.CoverWelderId,
COUNT(*) AS WeldingNum, pipe.Specification,--MAX(jot.Specification) AS Specification,
(SELECT COUNT(*) FROM dbo.Pipeline_WeldJoint WHERE PipelineId=jot.PipelineId) AS JointTotalNum,
(SELECT COUNT(*) FROM dbo.Pipeline_WeldJoint WHERE PipelineId=jot.PipelineId AND JointAttribute='F') AS GJointTotalNum,
(SELECT count(1) FROM Batch_NDEItem as nde
LEFT join Batch_BatchTrustItem as trust ON trust.TrustBatchItemId = nde.TrustBatchItemId
LEFT JOIN View_Pipeline_WeldJoint as joint ON joint.WeldJointId=trust.WeldJointId
WHERE joint.PipelineId=jot.PipelineId and joint.CoverWelderId=jot.CoverWelderId) AS NdeNum,
(SELECT count(1) FROM Batch_NDEItem as nde
LEFT join Batch_BatchTrustItem as trust ON trust.TrustBatchItemId = nde.TrustBatchItemId
LEFT JOIN View_Pipeline_WeldJoint as joint ON joint.WeldJointId=trust.WeldJointId
WHERE joint.PipelineId=jot.PipelineId and joint.CoverWelderId=jot.CoverWelderId AND joint.JointAttribute='F') AS GNdeNum
FROM dbo.Pipeline_WeldJoint jot
LEFT JOIN dbo.Pipeline_Pipeline pipe ON pipe.PipelineId = jot.PipelineId
WHERE jot.CoverWelderId IS NOT NULL
GROUP BY pipe.WorkAreaId, jot.PipelineId,pipe.PipelineCode,pipe.MainMaterialId,pipe.Specification,pipe.DetectionRateId,jot.CoverWelderId) t
LEFT JOIN dbo.Base_Material mat ON mat.MaterialId = t.MainMaterialId
LEFT JOIN dbo.Welder_Welder welder ON welder.WelderId = t.CoverWelderId
LEFT JOIN dbo.Base_DetectionRate r ON r.DetectionRateId = t.DetectionRateId
WHERE t.PipelineId=@PipelineId";
List<SqlParameter> listStr = new List<SqlParameter>
{
};
listStr.Add(new SqlParameter("@PipelineId", this.drpPipeLine.SelectedValue));
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
Grid1.DataSource = tb;
Grid1.DataBind();
}
protected void drpWorkAreaId_OnSelectedIndexChanged(object sender, EventArgs e)
{
string[] workAreaIds = drpWorkAreaId.SelectedValueArray;
if (workAreaIds.Length == 1)
{
BLL.Pipeline_PipelineService.InitPipelineDropDownList(drpPipeLine, workAreaIds[0], Resources.Lan.PleaseSelect);
}
}
#region
/// <summary>
/// 统计
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void BtnAnalyse_Click(object sender, EventArgs e)
{
if (drpPipeLine.SelectedValue != null && drpPipeLine.SelectedValue != Const._Null)
{
BindGrid();
}
else
{
ShowNotify("请选择管线!", MessageBoxIcon.Warning);
}
}
#endregion
}
}

View File

@ -0,0 +1,89 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.WeldingProcess.WeldingReport
{
public partial class RTRateConfirm
{
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// Panel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel1;
/// <summary>
/// Grid1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// Toolbar1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// drpWorkAreaId 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpWorkAreaId;
/// <summary>
/// drpPipeLine 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpPipeLine;
/// <summary>
/// BtnAnalyse 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button BtnAnalyse;
}
}

View File

@ -29,10 +29,6 @@ namespace Model
#region #region
partial void OnCreated(); partial void OnCreated();
partial void OnCreated()
{
this.CommandTimeout = 600;
}
partial void InsertAttachFile(AttachFile instance); partial void InsertAttachFile(AttachFile instance);
partial void UpdateAttachFile(AttachFile instance); partial void UpdateAttachFile(AttachFile instance);
partial void DeleteAttachFile(AttachFile instance); partial void DeleteAttachFile(AttachFile instance);
@ -34549,6 +34545,8 @@ namespace Model
private string _WorkAreaCode; private string _WorkAreaCode;
private string _WorkAreaId;
private string _PipelineCode; private string _PipelineCode;
private string _PipingClassCode; private string _PipingClassCode;
@ -34561,6 +34559,8 @@ namespace Model
private string _WelderCode; private string _WelderCode;
private string _TeamGroupName;
private string _WeldTypeCode; private string _WeldTypeCode;
private System.Nullable<double> _Dia; private System.Nullable<double> _Dia;
@ -34581,6 +34581,8 @@ namespace Model
private string _AcceptLevel; private string _AcceptLevel;
private string _PIPClassCode;
private string _Sheet; private string _Sheet;
private string _PNO; private string _PNO;
@ -34833,6 +34835,22 @@ namespace Model
} }
} }
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkAreaId", DbType="NVarChar(50)")]
public string WorkAreaId
{
get
{
return this._WorkAreaId;
}
set
{
if ((this._WorkAreaId != value))
{
this._WorkAreaId = value;
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PipelineCode", DbType="NVarChar(100)")] [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PipelineCode", DbType="NVarChar(100)")]
public string PipelineCode public string PipelineCode
{ {
@ -34929,6 +34947,22 @@ namespace Model
} }
} }
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TeamGroupName", DbType="NVarChar(50)")]
public string TeamGroupName
{
get
{
return this._TeamGroupName;
}
set
{
if ((this._TeamGroupName != value))
{
this._TeamGroupName = value;
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WeldTypeCode", DbType="NVarChar(50)")] [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WeldTypeCode", DbType="NVarChar(50)")]
public string WeldTypeCode public string WeldTypeCode
{ {
@ -35089,6 +35123,22 @@ namespace Model
} }
} }
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PIPClassCode", DbType="NVarChar(50)")]
public string PIPClassCode
{
get
{
return this._PIPClassCode;
}
set
{
if ((this._PIPClassCode != value))
{
this._PIPClassCode = value;
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Sheet", DbType="NVarChar(50)")] [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Sheet", DbType="NVarChar(50)")]
public string Sheet public string Sheet
{ {
@ -38184,6 +38234,10 @@ namespace Model
private int _IsWelderFirst; private int _IsWelderFirst;
private string _PointState;
private string _RepairRecordId;
public View_GenerateTrust_FJ() public View_GenerateTrust_FJ()
{ {
} }
@ -38347,6 +38401,38 @@ namespace Model
} }
} }
} }
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PointState", DbType="Char(1)")]
public string PointState
{
get
{
return this._PointState;
}
set
{
if ((this._PointState != value))
{
this._PointState = value;
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RepairRecordId", DbType="NVarChar(50)")]
public string RepairRecordId
{
get
{
return this._RepairRecordId;
}
set
{
if ((this._RepairRecordId != value))
{
this._RepairRecordId = value;
}
}
}
} }
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_GenerateTrustItem")] [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_GenerateTrustItem")]
@ -38534,6 +38620,10 @@ namespace Model
private System.Nullable<decimal> _Dia; private System.Nullable<decimal> _Dia;
private string _PointState;
private string _RepairRecordId;
public View_GenerateTrustItem_FJ() public View_GenerateTrustItem_FJ()
{ {
} }
@ -38761,6 +38851,38 @@ namespace Model
} }
} }
} }
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PointState", DbType="Char(1)")]
public string PointState
{
get
{
return this._PointState;
}
set
{
if ((this._PointState != value))
{
this._PointState = value;
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RepairRecordId", DbType="NVarChar(50)")]
public string RepairRecordId
{
get
{
return this._RepairRecordId;
}
set
{
if ((this._RepairRecordId != value))
{
this._RepairRecordId = value;
}
}
}
} }
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_Hard_Report")] [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_Hard_Report")]