提交代码

This commit is contained in:
高飞 2023-11-24 18:29:30 +08:00
parent 00db9731bf
commit 3aeb7e47de
12 changed files with 541 additions and 27 deletions

View File

@ -31,3 +31,63 @@ ORDER BY daily.UnitId,detectionType.DetectionTypeCode,jot.WeldJointCode
GO
ALTER VIEW [dbo].[View_HJGL_Batch_PointBatchItem]
AS
/*************点口明细表*************/
SELECT PointBatchItem.PointBatchItemId,
PointBatchItem.PointBatchId,
PointBatch.ProjectId,
PointBatch.UnitId,
PointBatch.DetectionTypeId,
PointBatch.DetectionRateId,
PointBatch.PointBatchCode,
Pipeline.UnitWorkId,
PointBatchItem.WeldJointId,
(CASE PointBatchItem.PointState WHEN '1' THEN '点口' WHEN '2' THEN '扩透' END) AS PointState,
(CASE PointBatchItem.IsBuildTrust WHEN 1 THEN '' ELSE '' END) AS IsBuildTrust,
(CASE WHEN PointBatchItem.IsAudit=1 THEN ''
WHEN (PointBatchItem.IsAudit IS NULL OR PointBatchItem.IsAudit=0) AND PointBatchItem.PointState IS NOT NULL THEN ''
WHEN (PointBatchItem.IsAudit IS NULL OR PointBatchItem.IsAudit=0) AND PointBatchItem.PointState IS NULL THEN '' END) AS PointIsAudit,
PointBatchItem.PointDate,--
(CASE PointBatchItem.IsWelderFirst WHEN 1 THEN '' ELSE '' END) AS IsWelderFirst,
PointBatchItem.RepairDate,--
PointBatchItem.RepairRecordId,
PointBatchItem.CutDate,--
PointBatchItem.PBackingWelderId,--
PointBatchItem.PCoverWelderId,--
UnitWork.UnitWorkCode,--
WeldJoint.WeldJointCode,--
WeldJoint.BackingWelderId AS WelderId, --ID
BackingWelder.WelderCode AS BackingWelderCode,
CoverWelder.WelderCode AS CoverWelderCode,
WeldType.WeldTypeCode,
WeldJoint.JointAttribute,
WeldJoint.JointArea,--
WeldJoint.Size,--
WeldingDaily.WeldingDate,--
WeldJoint.PipelineId, --线ID
WeldJoint.Material1Id AS Mat, --
WeldJoint.Specification, --
Pipeline.PipelineCode, --线
PipingClass.PipingClassName , --
WeldJoint.BackingWelderId,
WeldJoint.CoverWelderId
FROM dbo.HJGL_Batch_PointBatchItem AS PointBatchItem
LEFT JOIN dbo.HJGL_Batch_PointBatch AS PointBatch ON PointBatch.PointBatchId=PointBatchItem.PointBatchId
LEFT JOIN dbo.HJGL_WeldJoint AS WeldJoint ON WeldJoint.WeldJointId=PointBatchItem.WeldJointId
LEFT JOIN dbo.HJGL_Pipeline AS Pipeline ON Pipeline.PipelineId=WeldJoint.PipelineId
LEFT JOIN dbo.WBS_UnitWork AS UnitWork ON UnitWork.UnitWorkId=Pipeline.UnitWorkId
LEFT JOIN dbo.HJGL_WeldingDaily AS WeldingDaily ON WeldingDaily.WeldingDailyId=WeldJoint.WeldingDailyId
LEFT JOIN dbo.Base_PipingClass AS PipingClass ON PipingClass.PipingClassId=Pipeline.PipingClassId
LEFT JOIN SitePerson_Person AS BackingWelder ON BackingWelder.PersonId=WeldJoint.BackingWelderId
LEFT JOIN SitePerson_Person AS CoverWelder ON CoverWelder.PersonId=WeldJoint.CoverWelderId
LEFT JOIN Base_WeldType AS WeldType ON WeldType.WeldTypeId=WeldJoint.WeldTypeId
LEFT JOIN HJGL_Hard_TrustItem HardTrustItem ON HardTrustItem.WeldJointId=PointBatchItem.WeldJointId
where (WeldJoint.IsHotProess!=1 or (WeldJoint.IsHotProess=1 and HardTrustItem.IsPass=1))
and BackingWelder.ProjectId=Pipeline.ProjectId and CoverWelder.ProjectId=Pipeline.ProjectId
GO

View File

@ -658,6 +658,7 @@
<Content Include="HJGL\PointTrust\PointAudit.aspx" />
<Content Include="HJGL\PointTrust\PointBatch.aspx" />
<Content Include="HJGL\PointTrust\PointTrust.aspx" />
<Content Include="HJGL\PointTrust\PointWeldJointView.aspx" />
<Content Include="HJGL\PointTrust\TrustBatch.aspx" />
<Content Include="HJGL\PreDesign\MaterialManage.aspx" />
<Content Include="HJGL\PreDesign\MaterialManageEdit.aspx" />
@ -8534,6 +8535,13 @@
<Compile Include="HJGL\PointTrust\PointTrust.aspx.designer.cs">
<DependentUpon>PointTrust.aspx</DependentUpon>
</Compile>
<Compile Include="HJGL\PointTrust\PointWeldJointView.aspx.cs">
<DependentUpon>PointWeldJointView.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="HJGL\PointTrust\PointWeldJointView.aspx.designer.cs">
<DependentUpon>PointWeldJointView.aspx</DependentUpon>
</Compile>
<Compile Include="HJGL\PointTrust\TrustBatch.aspx.cs">
<DependentUpon>TrustBatch.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>

View File

@ -133,6 +133,8 @@
</f:Label>
<f:Label ID="lbPointJointNum2" Label="已检测焊口数" runat="server" LabelAlign="Right" LabelWidth="120px">
</f:Label>
<f:Button ID="btnShow" Text="已检测口明细" Icon="ApplicationViewIcons" runat="server" OnClick="btnShow_Click">
</f:Button>
<f:Label ID="lbLastJointNum2" Label="尚需检测焊口数" runat="server" LabelAlign="Right" LabelWidth="130px">
</f:Label>
</Items>

View File

@ -647,8 +647,103 @@ namespace FineUIPro.Web.HJGL.PointTrust
{
if (!string.IsNullOrEmpty(Grid1.SelectedRowID))
{
Model.SGGLDB db = Funs.DB;
var weldJoint = (from x in db.HJGL_WeldJoint
join y in db.HJGL_Batch_PointBatchItem on x.WeldJointId equals y.WeldJointId
where y.PointBatchItemId == Grid1.SelectedRowID
select x).FirstOrDefault();
Model.Project_Sys_Set batchSet = BLL.Project_SysSetService.GetSysSetBySetId("5", this.CurrUser.LoginProjectId);
if (batchSet != null && weldJoint != null)
{
int needJointNum = 0;
int pointNumG = 0;
int pointNumA = 0;
if (batchSet.SetValue.Contains("6")) //按管线组批
{
var pipeline = (from x in db.HJGL_Pipeline
join y in db.HJGL_WeldJoint on x.PipelineId equals y.PipelineId
join z in db.HJGL_Batch_PointBatchItem on y.WeldJointId equals z.WeldJointId
where z.PointBatchId == this.PointBatchId
select x).FirstOrDefault();
if (pipeline != null)
{
this.lbPipelineCode.Text = pipeline.PipelineCode;
Model.Base_DetectionRate rate = BLL.Base_DetectionRateService.GetDetectionRateByDetectionRateId(pipeline.DetectionRateId);
if (rate != null)
{
int totalJointCount = db.HJGL_WeldJoint.Count(x => x.PipelineId == pipeline.PipelineId);
needJointNum = Convert.ToInt32(Math.Ceiling((totalJointCount * rate.DetectionRateValue.Value) * 0.01));
// 安装口检测数量
pointNumG = Convert.ToInt32(Math.Ceiling(needJointNum * 0.4));
// 预制口要检测的数量
pointNumA = needJointNum - pointNumG;
var pointGNum = (from x in db.HJGL_Batch_PointBatchItem
join y in db.HJGL_WeldJoint on x.WeldJointId equals y.WeldJointId
where y.PipelineId == pipeline.PipelineId && x.PointState == "1" && y.JointAttribute == "安装口"
select x).Count();
var pointNotGNum = (from x in db.HJGL_Batch_PointBatchItem
join y in db.HJGL_WeldJoint on x.WeldJointId equals y.WeldJointId
where y.PipelineId == pipeline.PipelineId && x.PointState == "1" && y.JointAttribute == "预制口"
select x).Count();
if (weldJoint.JointAttribute == "安装口" && pointGNum >= pointNumG)
{
Alert.ShowInTop("安装口已达检测标准,无需再点此安装口!", MessageBoxIcon.Warning);
return;
}
if (weldJoint.JointAttribute == "预制口" && pointNotGNum >= pointNumA)
{
Alert.ShowInTop("预制口已达检测标准,无需再点此预制口!", MessageBoxIcon.Warning);
return;
}
}
}
}
else //不按管线组批
{
string unitWorkId = this.tvControlItem.SelectedNode.ParentNode.ParentNode.ParentNode.NodeID;
string rateId = this.tvControlItem.SelectedNode.ParentNode.NodeID.Split('|')[0];
string detectionType = this.tvControlItem.SelectedNode.ParentNode.ParentNode.NodeID.Split('|')[0];
int totalJointNum = (from x in db.HJGL_WeldJoint
join y in db.HJGL_Pipeline on x.PipelineId equals y.PipelineId
where y.DetectionRateId == rateId && y.UnitWorkId == unitWorkId && y.DetectionType == detectionType
select x).Count();
Model.Base_DetectionRate rate = BLL.Base_DetectionRateService.GetDetectionRateByDetectionRateId(rateId);
if (rate != null)
{
needJointNum = Convert.ToInt32(Math.Ceiling((totalJointNum * rate.DetectionRateValue.Value) * 0.01));
// 安装口检测数量
pointNumG = Convert.ToInt32(Math.Ceiling(needJointNum * 0.4));
// 预制口要检测的数量
pointNumA = needJointNum - pointNumG;
var pointGNum = (from x in db.HJGL_Batch_PointBatchItem
join y in db.HJGL_Batch_PointBatch on x.PointBatchId equals y.PointBatchId
join z in db.HJGL_WeldJoint on x.WeldJointId equals z.WeldJointId
where y.DetectionRateId == rateId && y.UnitWorkId == unitWorkId && y.DetectionTypeId == detectionType
&& x.PointState == "1" && z.JointAttribute == "安装口"
select x).Count();
var pointNotGNum = (from x in db.HJGL_Batch_PointBatchItem
join y in db.HJGL_Batch_PointBatch on x.PointBatchId equals y.PointBatchId
join z in db.HJGL_WeldJoint on x.WeldJointId equals z.WeldJointId
where y.DetectionRateId == rateId && y.UnitWorkId == unitWorkId && y.DetectionTypeId == detectionType
&& x.PointState == "1" && z.JointAttribute == "预制口"
select x).Count();
if (weldJoint.JointAttribute == "安装口" && pointGNum >= pointNumG)
{
Alert.ShowInTop("安装口已达检测标准,无需再点此安装口!", MessageBoxIcon.Warning);
return;
}
if (weldJoint.JointAttribute == "预制口" && pointNotGNum >= pointNumA)
{
Alert.ShowInTop("预制口已达检测标准,无需再点此预制口!", MessageBoxIcon.Warning);
return;
}
}
}
}
PointBatchDetailService.UpdatePointBatchDetail(Grid1.SelectedRowID, "1", System.DateTime.Now);
this.BindGrid();
tvControlItem_NodeCommand(null, null);
Alert.ShowInTop("已成功点口!", MessageBoxIcon.Success);
}
else
@ -893,5 +988,18 @@ namespace FineUIPro.Web.HJGL.PointTrust
return newTrustCode;
}
/// <summary>
/// 已检测口明细
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnShow_Click(object sender, EventArgs e)
{
string unitWorkId = this.tvControlItem.SelectedNode.ParentNode.ParentNode.ParentNode.NodeID;
string rateId = this.tvControlItem.SelectedNode.ParentNode.NodeID.Split('|')[0];
string detectionType = this.tvControlItem.SelectedNode.ParentNode.ParentNode.NodeID.Split('|')[0];
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PointWeldJointView.aspx?unitWorkId={0}&rateId={1}&detectionType={2}", unitWorkId, rateId, detectionType, "新增 - ")));
}
}
}

View File

@ -318,6 +318,15 @@ namespace FineUIPro.Web.HJGL.PointTrust {
/// </remarks>
protected global::FineUIPro.Label lbPointJointNum2;
/// <summary>
/// btnShow 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnShow;
/// <summary>
/// lbLastJointNum2 控件。
/// </summary>

View File

@ -0,0 +1,91 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PointWeldJointView.aspx.cs" Inherits="FineUIPro.Web.HJGL.PointTrust.PointWeldJointView" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
</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="点口管理" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="PointBatchItemId" AllowCellEditing="true"
AllowColumnLocking="true" EnableColumnLines="true" ClicksToEdit="2" DataIDField="PointBatchItemId"
AllowSorting="true" SortField="PipelineCode,WeldJointCode" SortDirection="ASC"
OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true" PageSize="20"
OnPageIndexChange="Grid1_PageIndexChange" EnableTextSelection="True" Height="500px">
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:TextBox runat="server" ID="txtpipelinecode" Label ="管线号" LabelWidth="100px" LabelAlign="Right"> </f:TextBox>
<f:Button ID="btnQuery" Text="查询" ToolTip="查询" Icon="SystemSearch" runat="server"
OnClick="btnQuery_Click">
</f:Button>
<f:Label runat="server" Label="已检测口明细" ID="lbDef" LabelWidth="120px" LabelAlign="Right"></f:Label>
<f:ToolbarFill runat="server"></f:ToolbarFill>
</Items>
</f:Toolbar>
</Toolbars>
<Columns>
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号"
Width="45px" HeaderTextAlign="Center" TextAlign="Center" />
<f:RenderField HeaderText="管线号" ColumnID="PipelineCode" DataField="PipelineCode"
SortField="PipelineCode" FieldType="String" HeaderTextAlign="Center" TextAlign="Left"
Width="220px" Locked="true">
</f:RenderField>
<f:RenderField HeaderText="焊口代号" ColumnID="WeldJointCode" DataField="WeldJointCode"
SortField="WeldJointCode" FieldType="String" HeaderTextAlign="Center" TextAlign="Left"
Width="80px" Locked="true">
</f:RenderField>
<f:RenderField HeaderText="焊接日期" ColumnID="WeldingDate" DataField="WeldingDate" SortField="WeldingDate"
FieldType="Date" Renderer="Date" HeaderTextAlign="Center" TextAlign="Left" Width="100px">
</f:RenderField>
<f:RenderField HeaderText="焊口属性" ColumnID="JointAttribute" DataField="JointAttribute" SortField="JointAttribute"
FieldType="String" HeaderTextAlign="Center" TextAlign="Center" Width="80px">
</f:RenderField>
<f:RenderField HeaderText="焊接区域" ColumnID="JointArea" DataField="JointArea" SortField="JointArea"
FieldType="String" HeaderTextAlign="Center" TextAlign="Center" Width="80px">
</f:RenderField>
<f:RenderField HeaderText="点口类型" ColumnID="PointState" DataField="PointState" SortField="PointState"
FieldType="String" HeaderTextAlign="Center" TextAlign="Center" Width="80px">
</f:RenderField>
<f:RenderField HeaderText="点口日期" ColumnID="PointDate" DataField="PointDate" SortField="PointDate"
FieldType="Date" Renderer="Date" HeaderTextAlign="Center" TextAlign="Left" Width="100px">
</f:RenderField>
<f:RenderField HeaderText="打底焊工" ColumnID="BackingWelderCode" DataField="BackingWelderCode"
FieldType="String" HeaderTextAlign="Center" TextAlign="Center"
Width="90px">
</f:RenderField>
<f:RenderField HeaderText="盖面焊工" ColumnID="CoverWelderCode" DataField="CoverWelderCode"
FieldType="String" HeaderTextAlign="Center" TextAlign="Center"
Width="90px">
</f:RenderField>
<f:RenderField HeaderText="备注" ColumnID="Remark" DataField="Remark" SortField="Remark"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="60px">
</f:RenderField>
</Columns>
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
</f:ToolbarSeparator>
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
</f:ToolbarText>
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
<f:ListItem Text="10" Value="10" />
<f:ListItem Text="15" Value="15" />
<f:ListItem Text="20" Value="20" />
<f:ListItem Text="25" Value="25" />
<f:ListItem Text="所有行" Value="10000" />
</f:DropDownList>
</PageItems>
</f:Grid>
</Items>
</f:Panel>
</form>
</body>
</html>

View File

@ -0,0 +1,87 @@
using BLL;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
namespace FineUIPro.Web.HJGL.PointTrust
{
public partial class PointWeldJointView : PageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
string unitWorkId = Request.Params["unitWorkId"];
string detectionType = Request.Params["detectionType"];
string rateId = Request.Params["rateId"];
Model.SGGLDB db = Funs.DB;
var pointJoints = (from x in db.HJGL_Batch_PointBatchItem
join y in db.HJGL_Batch_PointBatch on x.PointBatchId equals y.PointBatchId
join z in db.HJGL_WeldJoint on x.WeldJointId equals z.WeldJointId
where y.DetectionRateId == rateId && y.UnitWorkId == unitWorkId && y.DetectionTypeId == detectionType
&& x.PointState == "1"
select new { x.WeldJointId, z.WeldJointCode, z.JointAttribute });
this.lbDef.Text = "预制口:" + pointJoints.Count(x => x.JointAttribute == "预制口").ToString() + "个,安装口:" + pointJoints.Count(x => x.JointAttribute == "安装口").ToString()+"个。";
BindGrid();
}
}
#region
/// <summary>
/// 绑定数据
/// </summary>
public void BindGrid()
{
string strSql = @"SELECT PointBatchItemId,PointBatchId,WeldJointId,PointState,PointDate,RepairDate,CutDate,WeldJointCode,IsBuildTrust,WeldTypeCode,
JointAttribute ,JointArea,IsWelderFirst,Size,WeldingDate,PipelineCode,PipingClassName,PointIsAudit,BackingWelderCode,CoverWelderCode
FROM dbo.View_HJGL_Batch_PointBatchItem
WHERE UnitWorkId=@UnitWorkId and DetectionTypeId=@DetectionTypeId and DetectionRateId=@DetectionRateId and PointState=''";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@UnitWorkId", Request.Params["unitWorkId"]));
listStr.Add(new SqlParameter("@DetectionTypeId", Request.Params["detectionType"]));
listStr.Add(new SqlParameter("@DetectionRateId", Request.Params["rateId"]));
if (!string.IsNullOrEmpty(txtpipelinecode.Text.Trim()))
{
strSql += " and PipelineCode like @PipelineCode ";
listStr.Add(new SqlParameter("@PipelineCode", "%" + txtpipelinecode.Text.Trim() + "%"));
}
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
Grid1.RecordCount = tb.Rows.Count;
// tb = GetFilteredTable(Grid1.FilteredData, tb);
var table = this.GetPagedDataTable(Grid1, tb);
Grid1.DataSource = table;
Grid1.DataBind();
}
#endregion
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
{
BindGrid();
}
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
{
BindGrid();
}
protected void btnQuery_Click(object sender, EventArgs e)
{
this.BindGrid();
}
#region
/// <summary>
/// 排序
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_Sort(object sender, GridSortEventArgs e)
{
BindGrid();
}
#endregion
}
}

View File

@ -0,0 +1,114 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.HJGL.PointTrust {
public partial class PointWeldJointView {
/// <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>
/// txtpipelinecode 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtpipelinecode;
/// <summary>
/// btnQuery 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnQuery;
/// <summary>
/// lbDef 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label lbDef;
/// <summary>
/// ToolbarSeparator1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
/// <summary>
/// ToolbarText1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarText ToolbarText1;
/// <summary>
/// ddlPageSize 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlPageSize;
}
}

View File

@ -484,7 +484,16 @@ namespace FineUIPro.Web.HJGL.WeldingManage
if (wpqList != null)
{
Model.HJGL_WeldJoint newJot = WeldJointService.GetWeldJointByWeldJointId(jot.WeldJointId);
Model.WPQ_WPQList wps = BLL.WPQListServiceService.GetWPQById(wpqList.First().WPQId);
Model.WPQ_WPQList wps = new Model.WPQ_WPQList();
var a = wpqList.FirstOrDefault(x => x.WeldingMethodId == "feb1234c-a538-476f-99ac-7b3ab15997c1"); //优先匹配GTAW+SMAW的焊评
if (a == null)
{
wps = BLL.WPQListServiceService.GetWPQById(wpqList.First().WPQId);
}
else
{
wps = BLL.WPQListServiceService.GetWPQById(a.WPQId);
}
newJot.WPQId = wps.WPQId;
newJot.WeldJointId = jot.WeldJointId;

View File

@ -34,7 +34,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
ViewState["WeldJointId"] = value;
}
}
protected void Page_Load(object sender, EventArgs e)
{
@ -235,10 +235,10 @@ namespace FineUIPro.Web.HJGL.WeldingManage
//string perfix = txtPipelineCode.Text + "/Z-";
string perfix = txtPipelineCode.Text + "/";
this.txtWeldJointCode.Text = perfix;
// txtWeldJointCode.Text = BLL.SQLHelper.RunProcNewIdByProjectId("SpGetNewCode4ByProjectId", "dbo.HJGL_WeldJoint", "WeldJointCode", this.CurrUser.LoginProjectId, perfix);
// txtWeldJointCode.Text = txtWeldJointCode.Text.Replace(perfix, "");
// txtWeldJointCode.Text = BLL.SQLHelper.RunProcNewIdByProjectId("SpGetNewCode4ByProjectId", "dbo.HJGL_WeldJoint", "WeldJointCode", this.CurrUser.LoginProjectId, perfix);
// txtWeldJointCode.Text = txtWeldJointCode.Text.Replace(perfix, "");
}
}
@ -322,7 +322,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
/// </summary>
private void SaveData()
{
// if (string.IsNullOrEmpty(this.txtWeldJointCode.Text.Trim()) || this.drpPipingClass.SelectedValue == BLL.Const._Null || this.drpMaterial1.SelectedValue == BLL.Const._Null || this.drpMaterial2.SelectedValue == BLL.Const._Null || this.drpWeldTypeCode.SelectedValue == BLL.Const._Null || string.IsNullOrEmpty(this.hdWeldingMethodId.Text) || string.IsNullOrEmpty(this.txtWpqId.Text.Trim()))
// if (string.IsNullOrEmpty(this.txtWeldJointCode.Text.Trim()) || this.drpPipingClass.SelectedValue == BLL.Const._Null || this.drpMaterial1.SelectedValue == BLL.Const._Null || this.drpMaterial2.SelectedValue == BLL.Const._Null || this.drpWeldTypeCode.SelectedValue == BLL.Const._Null || string.IsNullOrEmpty(this.hdWeldingMethodId.Text) || string.IsNullOrEmpty(this.txtWpqId.Text.Trim()))
if (string.IsNullOrEmpty(this.txtWeldJointCode.Text.Trim()) || this.drpPipingClass.SelectedValue == BLL.Const._Null || this.drpMaterial1.SelectedValue == BLL.Const._Null || this.drpMaterial2.SelectedValue == BLL.Const._Null || this.drpWeldTypeCode.SelectedValue == BLL.Const._Null)
{
Alert.ShowInTop("页面必填项不能为空", MessageBoxIcon.Warning);
@ -337,22 +337,22 @@ namespace FineUIPro.Web.HJGL.WeldingManage
//if (!this.txtWeldJointCode.Text.Contains("G"))
//{
int jointCode = Funs.GetNewIntOrZero(this.txtWeldJointCode.Text.Trim());
if (jointCode != 0)
int jointCode = Funs.GetNewIntOrZero(this.txtWeldJointCode.Text.Trim());
if (jointCode != 0)
{
if (jointCode < 10)
{
if (jointCode < 10)
{
joint.WeldJointCode = "0" + Convert.ToString(jointCode);
}
else
{
joint.WeldJointCode = Convert.ToString(jointCode);
}
joint.WeldJointCode = "0" + Convert.ToString(jointCode);
}
else
{
joint.WeldJointCode = this.txtWeldJointCode.Text;
joint.WeldJointCode = Convert.ToString(jointCode);
}
}
else
{
joint.WeldJointCode = this.txtWeldJointCode.Text;
}
//}
//else
//{
@ -370,7 +370,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
}
joint.Size = Funs.GetNewDecimal(this.txtSize.Text.Trim());
joint.Dia = Funs.GetNewDecimal(this.txtDia.Text.Trim());
joint.DNDia=txtDNDia.Text.Trim();
joint.DNDia = txtDNDia.Text.Trim();
joint.Thickness = Funs.GetNewDecimal(this.txtThickness.Text.Trim());
//if (this.drpComponent1.SelectedValue != BLL.Const._Null)
//{
@ -644,7 +644,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
{
var wpsRod = BLL.Base_ConsumablesService.GetConsumablesByConsumablesId(wps.WeldingRod);
var matRod = BLL.Base_ConsumablesService.GetConsumablesByConsumablesId(drpWeldingRod.SelectedValue);
if (IsCoverClass(wpsRod.SteelType, matRod.SteelType))
if (wpsRod != null && matRod != null && IsCoverClass(wpsRod.SteelType, matRod.SteelType))
{
}
@ -683,7 +683,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
{
var wpsWire = BLL.Base_ConsumablesService.GetConsumablesByConsumablesId(wps.WeldingWire);
var matWire = BLL.Base_ConsumablesService.GetConsumablesByConsumablesId(drpWeldingWire.SelectedValue);
if (IsCoverClass(wpsWire.SteelType, matWire.SteelType))
if (wpsWire != null && matWire != null && IsCoverClass(wpsWire.SteelType, matWire.SteelType))
{
}

View File

@ -415,8 +415,16 @@ namespace FineUIPro.Web.HJGL.WeldingManage
Model.HJGL_WeldJoint newJot = new Model.HJGL_WeldJoint();
if (wpqList != null)
{
Model.WPQ_WPQList wps = BLL.WPQListServiceService.GetWPQById(wpqList.First().WPQId);
Model.WPQ_WPQList wps = new Model.WPQ_WPQList();
var a = wpqList.FirstOrDefault(x => x.WeldingMethodId == "feb1234c-a538-476f-99ac-7b3ab15997c1"); //优先匹配GTAW+SMAW的焊评
if (a == null)
{
wps = BLL.WPQListServiceService.GetWPQById(wpqList.First().WPQId);
}
else
{
wps = BLL.WPQListServiceService.GetWPQById(a.WPQId);
}
newJot.WPQId = wps.WPQId;
newJot.WeldJointId = jot.WeldJointId;
@ -483,11 +491,11 @@ namespace FineUIPro.Web.HJGL.WeldingManage
Alert.ShowInTop("请至少选择一条记录", MessageBoxIcon.Warning);
return;
}
if (BLL.WeldTaskService.GetWeldTaskByWeldJointId(Grid1.SelectedRowID) != null) //已下任务单,不可修改数据
{
Alert.ShowInTop("该焊口已生成焊接任务单,不能编辑!", MessageBoxIcon.Warning);
return;
}
//if (BLL.WeldTaskService.GetWeldTaskByWeldJointId(Grid1.SelectedRowID) != null) //已下任务单,不可修改数据
//{
// Alert.ShowInTop("该焊口已生成焊接任务单,不能编辑!", MessageBoxIcon.Warning);
// return;
//}
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("WeldJointEdit.aspx?WeldJointId={0}&flag=2", Grid1.SelectedRowID, "维护 - ")));
}
else

View File

@ -269072,6 +269072,8 @@ namespace Model
private string _DetectionTypeId;
private string _DetectionRateId;
private string _PointBatchCode;
private string _UnitWorkId;
@ -269216,6 +269218,22 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DetectionRateId", DbType="NVarChar(50)")]
public string DetectionRateId
{
get
{
return this._DetectionRateId;
}
set
{
if ((this._DetectionRateId != value))
{
this._DetectionRateId = value;
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PointBatchCode", DbType="NVarChar(100)")]
public string PointBatchCode
{