This commit is contained in:
jackchenyang 2024-05-27 15:57:14 +08:00
commit bd97eda8b0
21 changed files with 810 additions and 66 deletions

View File

@ -25,9 +25,9 @@ REM --------------
@echo 设置.net控制台环境
@echo.
@call "%VS150%"
@call "%VS100COMNTOOLS%"vsvars32.bat
SqlMetal /views /server:. /database:HJGLDB_ZJBSF /code:%Model_ROOT%\Model.cs /namespace:Model
SqlMetal /views /server:.\SQL2016 /database:HJGLDB_ZJBSF /code:%Model_ROOT%\Model.cs /namespace:Model
@ECHO 完成
pause

Binary file not shown.

View File

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

View File

@ -286,17 +286,24 @@ namespace BLL
newPointBatchItem.WeldJointId = weldJointId;
newPointBatchItem.WeldingDate = weldingDate;
newPointBatchItem.IsCheckRepair = false;
if (rate.DetectionRateValue != 0)
if (ndttype.SysType == "射线检测")
{
if (rate.DetectionRateValue == 5 || rate.DetectionRateValue == 10)
if (rate.DetectionRateValue != 0)
{
newPointBatchItem.AcceptLevel = "Ⅲ";
}
else
{
newPointBatchItem.AcceptLevel = "Ⅱ";
if (rate.DetectionRateValue == 5 || rate.DetectionRateValue == 10)
{
newPointBatchItem.AcceptLevel = "Ⅲ";
}
else
{
newPointBatchItem.AcceptLevel = "Ⅱ";
}
}
}
else
{
newPointBatchItem.AcceptLevel = "";
}
newPointBatchItem.IsCompletedPoint = false;
BLL.Batch_PointBatchItemService.AddPointBatchItem(newPointBatchItem); // 插入明细表

View File

@ -21,6 +21,7 @@ namespace FineUIPro.Web.PublicInfo.WPQ
ckbWelders.DataTextField = "WelderCode";
ckbWelders.DataSource = from x in Funs.DB.Welder_Welder
join y in Funs.DB.Welder_ProjectWelder on x.WelderId equals y.WelderId
orderby x.WelderCode
where y.ProjectId == CurrUser.LoginProjectId
select x;
ckbWelders.DataBind();

View File

@ -9,7 +9,7 @@
<section name="FineUIPro" type="FineUIPro.ConfigSection, FineUIPro" requirePermission="false"/>
</configSections>
<connectionStrings>
<add name="HJGLDBConnectionString" connectionString="Data Source=.;Initial Catalog=HJGLDB_ZJBSF;uid=sa;pwd=Sh@nghai9;"/>
<add name="HJGLDBConnectionString" connectionString="Data Source=.\sql2016;Initial Catalog=HJGLDB_ZJBSF;uid=sa;pwd=1111;"/>
<!--<add name="HJGLDBConnectionString" connectionString="Data Source=.;Initial Catalog=HJGLDB;Integrated Security=True"
providerName="System.Data.SqlClient" />-->
</connectionStrings>

View File

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

View File

@ -126,6 +126,7 @@ namespace FineUIPro.Web.WelderManage
{
updateQue.ThicknessMax = 0;
}
updateQue.IsHand=true;
Funs.DB.SubmitChanges();
BLL.Sys_LogService.AddLog(Const.System_1, this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.Welder_QualifiedProjectMenuId, Const.BtnModify, this.WelderQualifiedProjectId);

View File

@ -95,10 +95,12 @@ namespace FineUIPro.Web.WelderManage
{
welders = welders.Where(e => e.WelderName.Contains(this.txtWelderNameS.Text.Trim())).ToList();
}
welders= welders.OrderBy(x=>x.WelderCode).ToList();
foreach (var item in welders)
{
TreeNode newNode = new TreeNode();
newNode.Text = item.WelderName;
newNode.Text = item.WelderName + "(" + item.WelderCode + ")";
newNode.NodeID = item.WelderId;
newNode.ToolTip = item.WelderCode;
newNode.EnableClickEvent = true;
@ -373,7 +375,8 @@ namespace FineUIPro.Web.WelderManage
{
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
{
var que = from x in Funs.DB.Welder_WelderQualify where x.WelderId == this.tvControlItem.SelectedNodeID select x;
// 手动的不自动分析 IsHand==null
var que = from x in Funs.DB.Welder_WelderQualify where x.WelderId == this.tvControlItem.SelectedNodeID && x.IsHand==null select x;
if (que.Count() > 0)
{
foreach (var q in que)

View File

@ -123,6 +123,8 @@
<f:Button ID="btnSelectExpandPoint" Text="重新选择扩口" ToolTip="重新选择扩口" Icon="ArrowRefresh"
runat="server" OnClick="btnSelectExpandPoint_Click" Hidden="true">
</f:Button>
<f:Button ID="btnPTIn" Text="PT导入" runat="server" OnClick="btnPTIn_Click" >
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>

View File

@ -1,9 +1,14 @@
using BLL;
using FineUIPro.Web.common.BaseInfo;
using FineUIPro.Web.common.ProjectSet;
using NPOI.SS.Formula.Functions;
using Org.BouncyCastle.Asn1.Tsp;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Management;
using System.Reflection;
using System.Web.UI.WebControls;
@ -1534,6 +1539,66 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
}
#endregion
protected void btnPTIn_Click(object sender, EventArgs e)
{
string strSql = @"SELECT pipe.PipelineId,pipe.PipelineCode,pipe.DetectionRateId,rate.DetectionRateCode
FROM dbo.Pipeline_Pipeline pipe
LEFT JOIN dbo.Base_DetectionRate rate ON rate.DetectionRateId = pipe.DetectionRateId
WHERE (SELECT COUNT(*) FROM dbo.Pipeline_WeldJoint jot
WHERE jot.PipelineId=pipe.PipelineId
AND jot.WeldingDailyId IS NOT NULL
AND jot.DetectionType LIKE '%53704a2c-ce45-41d9-a6e7-be24f0780d87%' )>0";
DataTable tb = SQLHelper.GetDataTableRunText(strSql, null);
if (tb != null)
{
foreach (DataRow dr in tb.Rows)
{
string pipelineId =dr["PipelineId"].ToString();
string pipelineCode = dr["PipelineCode"].ToString();
string detectionRateId = dr["DetectionRateId"].ToString();
string detectionRateCode = dr["DetectionRateCode"].ToString();
Model.Batch_PointBatch newPointBatch = new Model.Batch_PointBatch();
string pointBatchId = SQLHelper.GetNewID(typeof(Model.Batch_PointBatch));
string pointBatchCode = Batch_PointBatchService.GetNewPointBatchCode("0bbe1ae1-e643-4f86-9695-4381ed792ec9", pipelineCode, "PT", detectionRateCode);
newPointBatch.PointBatchId = pointBatchId;
newPointBatch.PointBatchCode = pointBatchCode;
newPointBatch.ProjectId = "0bbe1ae1-e643-4f86-9695-4381ed792ec9";
newPointBatch.UnitId = "8c730dfc-07a5-424e-8f58-75098493e0c5";
newPointBatch.PipelineId = pipelineId;
newPointBatch.InstallationId = "2990422b-4589-42a1-b2b5-b0c2e39324d0";
newPointBatch.DetectionTypeId = "53704a2c-ce45-41d9-a6e7-be24f0780d87";
newPointBatch.DetectionRateId = detectionRateId;
newPointBatch.StartDate = System.DateTime.Now;
newPointBatch.IsTrust = true;
Batch_PointBatchService.AddPointBatch(newPointBatch); // 生成主表
// 增加明细
var jotList = (from x in Funs.DB.Pipeline_WeldJoint
join y in Funs.DB.Pipeline_WeldingDaily on x.WeldingDailyId equals y.WeldingDailyId
where x.PipelineId == pipelineId && x.WeldingDailyId != null
&& x.DetectionType.Contains("53704a2c-ce45-41d9-a6e7-be24f0780d87")
select new { x.WeldJointId, y.WeldingDate }).ToList();
foreach (var jot in jotList)
{
Model.Batch_PointBatchItem newPointBatchItem = new Model.Batch_PointBatchItem();
string pointBatchItemId = SQLHelper.GetNewID(typeof(Model.Batch_PointBatchItem));
newPointBatchItem.PointBatchItemId = pointBatchItemId;
newPointBatchItem.PointBatchId = pointBatchId;
newPointBatchItem.WeldJointId = jot.WeldJointId;
newPointBatchItem.WeldingDate = jot.WeldingDate;
newPointBatchItem.IsCheckRepair = false;
newPointBatchItem.AcceptLevel = "";
newPointBatchItem.IsCompletedPoint = true;
BLL.Batch_PointBatchItemService.AddPointBatchItem(newPointBatchItem); // 插入明细表
}
}
}
}
private string GetNewTrust(string code)
{
int r_num = 0;
@ -1558,5 +1623,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
return newTrustCode;
}
}
}

View File

@ -7,11 +7,13 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.WeldingProcess.TrustManage {
public partial class PointManage {
namespace FineUIPro.Web.WeldingProcess.TrustManage
{
public partial class PointManage
{
/// <summary>
/// form1 控件。
/// </summary>
@ -20,7 +22,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
@ -29,7 +31,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// Panel1 控件。
/// </summary>
@ -38,7 +40,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel1;
/// <summary>
/// panelLeftRegion 控件。
/// </summary>
@ -47,7 +49,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelLeftRegion;
/// <summary>
/// Toolbar1 控件。
/// </summary>
@ -56,7 +58,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// drpTrust 控件。
/// </summary>
@ -65,7 +67,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpTrust;
/// <summary>
/// Toolbar3 控件。
/// </summary>
@ -74,7 +76,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar3;
/// <summary>
/// drpNde 控件。
/// </summary>
@ -83,7 +85,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpNde;
/// <summary>
/// Toolbar6 控件。
/// </summary>
@ -92,7 +94,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar6;
/// <summary>
/// txtPipeCode 控件。
/// </summary>
@ -101,7 +103,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtPipeCode;
/// <summary>
/// Toolbar5 控件。
/// </summary>
@ -110,7 +112,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar5;
/// <summary>
/// txtJotDate 控件。
/// </summary>
@ -119,7 +121,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtJotDate;
/// <summary>
/// tvControlItem 控件。
/// </summary>
@ -128,7 +130,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Tree tvControlItem;
/// <summary>
/// panelCenterRegion 控件。
/// </summary>
@ -137,7 +139,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelCenterRegion;
/// <summary>
/// Toolbar2 控件。
/// </summary>
@ -146,7 +148,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar2;
/// <summary>
/// drpIsTrust 控件。
/// </summary>
@ -155,7 +157,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpIsTrust;
/// <summary>
/// drpIsCompletedPoint 控件。
/// </summary>
@ -164,7 +166,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpIsCompletedPoint;
/// <summary>
/// drpWelder 控件。
/// </summary>
@ -173,7 +175,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpWelder;
/// <summary>
/// ToolbarFill1 控件。
/// </summary>
@ -182,7 +184,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarFill ToolbarFill1;
/// <summary>
/// btnGenerate 控件。
/// </summary>
@ -191,7 +193,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnGenerate;
/// <summary>
/// btnHandGenerate 控件。
/// </summary>
@ -200,7 +202,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnHandGenerate;
/// <summary>
/// btnbtnOpenResetPoint 控件。
/// </summary>
@ -209,7 +211,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnbtnOpenResetPoint;
/// <summary>
/// btnClear 控件。
/// </summary>
@ -218,7 +220,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnClear;
/// <summary>
/// btnSelectExpandPoint 控件。
/// </summary>
@ -227,7 +229,16 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSelectExpandPoint;
/// <summary>
/// btnPTIn 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnPTIn;
/// <summary>
/// SimpleForm1 控件。
/// </summary>
@ -236,7 +247,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form SimpleForm1;
/// <summary>
/// txtStartDate 控件。
/// </summary>
@ -245,7 +256,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label txtStartDate;
/// <summary>
/// txtEndDate 控件。
/// </summary>
@ -254,7 +265,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label txtEndDate;
/// <summary>
/// txtState 控件。
/// </summary>
@ -263,7 +274,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label txtState;
/// <summary>
/// Grid1 控件。
/// </summary>
@ -272,7 +283,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// ToolbarSeparator1 控件。
/// </summary>
@ -281,7 +292,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
/// <summary>
/// ToolbarText1 控件。
/// </summary>
@ -290,7 +301,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarText ToolbarText1;
/// <summary>
/// ddlPageSize 控件。
/// </summary>
@ -299,7 +310,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlPageSize;
/// <summary>
/// Window1 控件。
/// </summary>
@ -308,7 +319,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window1;
/// <summary>
/// Window2 控件。
/// </summary>
@ -317,7 +328,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window2;
/// <summary>
/// Menu1 控件。
/// </summary>
@ -326,7 +337,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Menu Menu1;
/// <summary>
/// btnCancelPoint 控件。
/// </summary>
@ -335,7 +346,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnCancelPoint;
/// <summary>
/// btnCancel 控件。
/// </summary>
@ -344,7 +355,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnCancel;
/// <summary>
/// btnModefyFristWeld 控件。
/// </summary>
@ -353,7 +364,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnModefyFristWeld;
/// <summary>
/// btnCut 控件。
/// </summary>

View File

@ -188,9 +188,16 @@ namespace FineUIPro.Web.WeldingManage
FROM View_Pipeline_Pipeline WHERE ProjectId= @ProjectId";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
strSql += " AND WorkAreaId =@WorkAreaId";
listStr.Add(new SqlParameter("@WorkAreaId", this.tvControlItem.SelectedNodeID));
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
{
var area = BLL.Project_WorkAreaService.GetProject_WorkAreaByWorkAreaId(this.tvControlItem.SelectedNodeID);
if (area != null)
{
strSql += " AND WorkAreaId =@WorkAreaId";
listStr.Add(new SqlParameter("@WorkAreaId", this.tvControlItem.SelectedNodeID));
}
}
if (!string.IsNullOrEmpty(this.txtPipelineCode.Text.Trim()))
{
strSql += " AND PipelineCode LIKE @PipelineCode";

View File

@ -982,8 +982,15 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
sch = dn.First().XXS;
}
}
d.Thickness = sch;
if (sch != null)
{
d.Thickness = sch;
}
else
{
errorInfos += (i + 2) + "行,美标壁厚[" + ansi + "]未设置值;";
}
if (dia != null && sch != null)
{
@ -1254,7 +1261,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
{
bool canSave = false;
var jot = BLL.Pipeline_WeldJointService.GetWeldJointByWeldJointId(jotId);
var joty = BLL.Base_WeldTypeService.GetWeldTypeByWeldTypeId(jot.WeldTypeId);
var joty = BLL.Base_WeldTypeService.GetWeldTypeByWeldTypeId(d.WeldTypeId);
string weldTypeGroup = joty.Flag;
string weldTypeCode = joty.WeldTypeCode;
string floorWelder = floorWelderId;
@ -1263,7 +1270,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
//decimal? sch = jot.Thickness;
string weldingMethodCode = string.Empty;
var wm = BLL.Base_WeldingMethodService.GetWeldingMethodByWeldingMethodId(jot.WeldingMethodId);
var wm = BLL.Base_WeldingMethodService.GetWeldingMethodByWeldingMethodId(d.WeldingMethodId);
if (wm != null)
{
weldingMethodCode = wm.WeldingMethodCode;
@ -1271,7 +1278,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
string[] wmeCodes = weldingMethodCode.Split('+');
string location = string.Empty;
var loc = BLL.Base_WeldingLocationServie.GetWeldingLocationById(jot.WeldingLocationId);
var loc = BLL.Base_WeldingLocationServie.GetWeldingLocationById(d.WeldingLocationId);
if (loc != null)
{
location = loc.WeldingLocationCode;

View File

@ -429,6 +429,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
bool canSave = false;
var jot = BLL.Pipeline_WeldJointService.GetWeldJointByWeldJointId(item.WeldJointId);
var joty = BLL.Base_WeldTypeService.GetWeldTypeByWeldTypeId(jot.WeldTypeId);
string weldTypeGroup = joty.Flag;
string weldTypeCode = joty.WeldTypeCode;
string floorWelder = item.BackingWelderId;
@ -1330,7 +1331,9 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
item.WPQId = wps.WPQId;
if (!string.IsNullOrEmpty(wps.WeldingMethodId))
{
var met = BLL.Base_WeldingMethodService.GetWeldingMethodByWeldingMethodId(wps.WeldingMethodId);
item.WeldingMethodId = wps.WeldingMethodId;
item.WeldingMethodCode= met.WeldingMethodCode;
}
if (!string.IsNullOrEmpty(wps.WeldMatId))
{

View File

@ -46674,6 +46674,8 @@ namespace Model
private string _Remark;
private System.Nullable<bool> _IsHand;
private EntityRef<Welder_Welder> _Welder_Welder;
#region
@ -46712,6 +46714,8 @@ namespace Model
partial void OnIsPassChanged();
partial void OnRemarkChanging(string value);
partial void OnRemarkChanged();
partial void OnIsHandChanging(System.Nullable<bool> value);
partial void OnIsHandChanged();
#endregion
public Welder_WelderQualify()
@ -47044,6 +47048,26 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsHand", DbType="Bit")]
public System.Nullable<bool> IsHand
{
get
{
return this._IsHand;
}
set
{
if ((this._IsHand != value))
{
this.OnIsHandChanging(value);
this.SendPropertyChanging();
this._IsHand = value;
this.SendPropertyChanged("IsHand");
this.OnIsHandChanged();
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Welder_WelderQualify_Welder_Welder", Storage="_Welder_Welder", ThisKey="WelderId", OtherKey="WelderId", IsForeignKey=true)]
public Welder_Welder Welder_Welder
{

View File

@ -0,0 +1,312 @@
-- 管线焊工 增加是否 PMI处理
alter table Pipeline_WeldJoint add isPMI bit NULL
GO
update Pipeline_WeldJoint set isPMI=0
GO
ALTER VIEW [dbo].[View_Pipeline_WeldJoint]
AS
/************焊口信息视图*****************/
SELECT WeldJoint.WeldJointId,
WeldJoint.ProjectId,
WeldJoint.PipelineId,
WeldJoint.WeldJointCode,
dbo.Fun_GetParseInt(WeldJoint.WeldJointCode) AS ConvertWeldJoint,
WeldJoint.WeldTypeId,
WeldJoint.Material1Id,
WeldJoint.Material2Id,
WeldJoint.ANSISCH,
WeldJoint.Thickness,
WeldJoint.Dia,
WeldJoint.Size,
WeldJoint.JointAttribute,
WeldJoint.JointArea,
WeldJoint.WeldingMethodId,
WeldJoint.IsHotProess,
WeldJoint.WeldingLocationId,
WeldJoint.WeldMatId,
WeldJoint.WeldSilkId,
WeldJoint.GrooveTypeId,
WeldJoint.PipeSegment,
WeldJoint.PipeAssembly1Id,
WeldJoint.PipeAssembly2Id,
WeldJoint.PipeAssemblyCount,
WeldJoint.HeartNo1,
WeldJoint.HeartNo2,
WeldJoint.LastTemp,
WeldJoint.CellTemp,
WeldJoint.PrepareTemp,
WeldJoint.Electricity,
WeldJoint.SystemNumber,
WeldJoint.Remark,
WeldJoint.DoneDin,
WeldJoint.Voltage,
WeldJoint.TestPackageNo,
WeldJoint.WeldingDailyCode,
WeldJoint.WeldingDailyId,
WeldJoint.BackingWelderId,
WeldJoint.CoverWelderId,
WeldJoint.PipingClassId,
WeldJoint.Specification,
WeldJoint.CancelResult,
Project.ProjectCode,
Project.ProjectName,
Pipeline.PipelineCode,
Pipeline.InstallationId,
Pipeline.UnitId,
Pipeline.SingleNumber,
Pipeline.WorkAreaId,
WeldType.WeldTypeCode,
Material1.MaterialCode AS Material1Code,
Material2.MaterialCode AS Material2Code,
WeldingMethod.WeldingMethodCode,
WeldingLocation.WeldingLocationCode,
WeldMat.ConsumablesCode AS WeldMatCode,
--WeldSilk.ConsumablesCode AS WeldSilkCode,
'' AS WeldSilkCode,
GrooveType.GrooveTypeCode,
CASE WHEN WeldJoint.WeldingDailyId IS NULL THEN '' ELSE '' END AS Is_hjName,
CASE WHEN WeldJoint.IsHotProess=1 THEN '' ELSE '' END AS IsHotProessStr,
Components1.ComponentsCode AS ComponentsCode1,
Components2.ComponentsCode AS ComponentsCode2,
BackingWelder.WelderCode AS BackingWelderCode,
BackingWelder.WelderName AS BackingWelderName,
CoverWelder.WelderCode AS CoverWelderCode,
CoverWelder.WelderName AS CoverWelderName,
(CASE WHEN CoverWelder.WelderCode IS NOT NULL AND BackingWelder.WelderCode IS NOT NULL
THEN CoverWelder.WelderCode + '/' + BackingWelder.WelderCode
ELSE (ISNULL(CoverWelder.WelderCode,'') + ISNULL(BackingWelder.WelderCode,'')) END) AS WelderCode, --
(CASE WHEN Material1.MaterialCode IS NOT NULL AND Material2.MaterialCode IS NOT NULL
THEN Material1.MaterialCode + '/' + Material2.MaterialCode
ELSE (ISNULL(Material1.MaterialCode,'') + ISNULL(Material2.MaterialCode,'')) END) AS MaterialCode, --
pipingClass.PipingClassCode,pip.PIPClassCode,
CONVERT(VARCHAR(100), WeldingDaily.WeldingDate, 23) AS WeldingDate,
WeldJoint.IsCancel,
WeldJoint.IsPMI,
WeldJoint.IsGoldJoint,
WeldJoint.WPQId,wps.WPQCode,
WeldJoint.DetectionType,
WeldJoint.PageNum
FROM Pipeline_WeldJoint AS WeldJoint
LEFT JOIN Base_Project AS Project ON Project.ProjectId=WeldJoint.ProjectId
LEFT JOIN Pipeline_Pipeline AS Pipeline ON Pipeline.PipelineId = WeldJoint.PipelineId
LEFT JOIN Base_WeldType AS WeldType ON WeldType.WeldTypeId=WeldJoint.WeldTypeId
LEFT JOIN Base_Material AS Material1 ON Material1.MaterialId = WeldJoint.Material1Id
LEFT JOIN Base_Material AS Material2 ON Material2.MaterialId = WeldJoint.Material2Id
LEFT JOIN Base_WeldingMethod AS WeldingMethod ON WeldingMethod.WeldingMethodId=WeldJoint.WeldingMethodId
LEFT JOIN Base_WeldingLocation AS WeldingLocation ON WeldingLocation.WeldingLocationId=WeldJoint.WeldingLocationId
LEFT JOIN Base_Consumables AS WeldMat ON WeldMat.ConsumablesId=WeldJoint.WeldMatId
--LEFT JOIN Base_Consumables AS WeldSilk ON WeldSilk.ConsumablesId=WeldJoint.WeldSilkId
LEFT JOIN Base_GrooveType AS GrooveType ON GrooveType.GrooveTypeId=WeldJoint.GrooveTypeId
LEFT JOIN Base_Components AS Components1 ON Components1.ComponentsId = WeldJoint.PipeAssembly1Id
LEFT JOIN Base_Components AS Components2 ON Components2.ComponentsId = WeldJoint.PipeAssembly2Id
LEFT JOIN Welder_Welder AS BackingWelder ON BackingWelder.WelderId=WeldJoint.BackingWelderId
LEFT JOIN Welder_Welder AS CoverWelder ON CoverWelder.WelderId=WeldJoint.CoverWelderId
LEFT JOIN Pipeline_WeldingDaily AS WeldingDaily ON WeldingDaily.WeldingDailyId=WeldJoint.WeldingDailyId
LEFT JOIN Base_PipingClass AS pipingClass ON pipingClass.PipingClassId=WeldJoint.PipingClassId
LEFT JOIN dbo.Base_PIPClass pip ON pip.PIPClassId = Pipeline.PIPClassId
LEFT JOIN dbo.WPQ_WPQList wps ON wps.WPQId=WeldJoint.WPQId
GO
ALTER PROC [dbo].[sp_rpt_JointComprehensive]
@projectId NVARCHAR(50),
@workAreaId NVARCHAR(50)=NULL,
@pipelineIds NVARCHAR(MAX) = NULL
AS
/**********焊口综合信息**********/
SELECT
weldJoint.WeldJointId,
weldJoint.ProjectId,
WorkArea.WorkAreaId,
WorkArea.WorkAreaCode,
weldJoint.SystemNumber,
weldJoint.TestPackageNo,
pipeline.SingleNumber,
pipeline.PipelineCode,
pipeline.DrawingsNum,
pipingClass.PipingClassCode,pip.PIPClassCode,
weldJoint.PageNum,
weldJoint.PipeSegment,--
weldJoint.WeldJointCode,
weldType.WeldTypeCode,
weldJoint.JointAttribute,
wl.WeldingLocationCode,
weldJoint.Dia,
weldJoint.Thickness,--
weldJoint.HeartNo1,
weldJoint.HeartNo2,
com1.ComponentsName AS PipeAssembly1,
com2.ComponentsName AS PipeAssembly2,
--material.MaterialCode,
mat1.MaterialCode AS MaterialCode1,
mat2.MaterialCode AS MaterialCode2,
cw.WelderCode AS CoverWelderCode,
fw.WelderCode AS BackingWelderCode,
WeldMethod.WeldingMethodName,
medium.MediumName,
weldingDaily.WeldingDate,
weldingDaily.WeldingDailyCode,
trust.TrustBatchCode,
--TrustBatchCode.DetectionRateCode,
--TrustBatchCode.AcceptLevel,
(CASE WHEN weldJoint.IsHotProess=1 THEN '' ELSE '' END) AS IsHotProess,
null as TrustBatchCode,
null as DetectionRateCode,
null as AcceptLevel,
nde.NDEDate AS CHT_CHECKDATE,
ndeItem.NDEReportNo,
CAST(CAST(ISNULL(weldJoint.Size,0) AS REAL) AS NVARCHAR(8)) AS JOT_Size,
WeldMaterialMat.ConsumablesCode AS WMT_MatCode,
WeldMaterialMat.ConsumablesName AS WMT_Matname,
weldJoint.WeldSilkId,
--WeldMaterialSilk.ConsumablesCode AS hsCode,
--WeldMaterialSilk.ConsumablesName AS hsname,
--WeldMaterialSilk.UserFlux,
weldJoint.Specification,
wps.WPQCode,ndttype.DetectionTypeCode,NULL AS HotReportCode,
(CASE WHEN (PointBatchItem.PointState='1' OR PointBatchItem.PointState='2')
THEN (CASE WHEN PointBatchItem.IsWelderFirst=1 THEN '是首三口' ELSE '' END) ELSE '' END) AS if_dk
FROM Pipeline_WeldJoint AS weldJoint
LEFT JOIN Pipeline_Pipeline AS pipeline ON pipeline.PipelineId = weldJoint.PipelineId
LEFT JOIN Project_WorkArea AS WorkArea ON WorkArea.WorkAreaId = pipeline.WorkAreaId
LEFT JOIN Base_Material AS mat1 ON mat1.MaterialId = weldJoint.Material1Id
LEFT JOIN Base_Material AS mat2 ON mat2.MaterialId = weldJoint.Material2Id
LEFT JOIN Base_WeldingMethod AS WeldMethod ON WeldMethod.WeldingMethodId = weldJoint.WeldingMethodId
LEFT JOIN dbo.Base_WeldType weldType ON weldType.WeldTypeId = weldJoint.WeldTypeId
LEFT JOIN dbo.Base_WeldingLocation wl ON wl.WeldingLocationId = weldJoint.WeldingLocationId
LEFT JOIN Base_Medium AS medium ON medium.MediumId = pipeline.MediumId
LEFT JOIN Base_Components com1 ON com1.ComponentsId=weldJoint.PipeAssembly1Id
LEFT JOIN Base_Components com2 ON com2.ComponentsId=weldJoint.PipeAssembly2Id
LEFT JOIN Base_PipingClass AS pipingClass ON pipingClass.PipingClassId=WeldJoint.PipingClassId
LEFT JOIN dbo.Base_PIPClass pip ON pip.PIPClassId = Pipeline.PIPClassId
LEFT JOIN Pipeline_WeldingDaily AS weldingDaily ON weldingDaily.WeldingDailyId = weldJoint.WeldingDailyId
LEFT JOIN dbo.WPQ_WPQList wps ON wps.WPQId = weldJoint.WPQId
left join Welder_Welder AS fw on weldJoint.BackingWelderId = fw.WelderId
left join Welder_Welder AS cw on weldJoint.CoverWelderId = cw.WelderId
LEFT JOIN Base_Consumables AS WeldMaterialMat ON WeldMaterialMat.ConsumablesId =weldJoint.WeldMatId
--LEFT JOIN Base_Consumables AS WeldMaterialSilk ON WeldMaterialSilk.ConsumablesId =weldJoint.WeldSilkId
LEFT JOIN Batch_PointBatchItem AS PointBatchItem ON PointBatchItem.WeldJointId =weldJoint.WeldJointId
LEFT JOIN dbo.Batch_PointBatch point ON point.PointBatchId = PointBatchItem.PointBatchId
LEFT JOIN dbo.Base_DetectionType ndttype ON ndttype.DetectionTypeId = point.DetectionTypeId
LEFT JOIN dbo.Batch_BatchTrustItem trustItem ON trustItem.PointBatchItemId = PointBatchItem.PointBatchItemId
LEFT JOIN dbo.Batch_BatchTrust trust ON trust.TrustBatchId = trustItem.TrustBatchId
LEFT JOIN dbo.Batch_NDEItem ndeItem ON ndeItem.TrustBatchItemId = trustItem.TrustBatchItemId
LEFT JOIN dbo.Batch_NDE nde ON nde.NDEID = ndeItem.NDEID
WHERE weldJoint.ProjectId=@projectId
AND(pipeline.WorkAreaId=@workAreaId OR @workAreaId IS NULL)
AND (CHARINDEX(weldJoint.PipelineId,@pipelineIds)>0 or @pipelineIds IS NULl)
--AND(pipeline.PipelineCode=@pipelineCode OR @pipelineCode IS NULl)
GO
UPDATE dbo.Template_Files SET title=REPLACE(title,cast(sortindex as nvarchar(50))+'-','')
GO
UPDATE dbo.Template_Files SET SortIndex=SortIndex+1 where SortIndex>24
GO
INSERT INTO [dbo].[Template_Files]([id],[title],[filePath],[SortIndex])
VALUES('95125974-3DD4-4E16-B4F0-A9D9C9A1406D','管道焊接接头PMI检测比例确认表','',25)
GO
-- PMI处理委托
create table PMI_Delegation
(
Id nvarchar(50) not null primary key,
DelegationNo nvarchar(50) not null,
DelegationDate datetime,
ProjectId nvarchar(50) not null,
InstallationId nvarchar(50),
UnitId nvarchar(50),
DetectionStandard nvarchar(50),
Tabler nvarchar(50),
Remark nvarchar(255),
CreatedTime datetime default getdate()
)
go
---- PMI处理委托 明细
create table PMI_DelegationDetails
(
Id nvarchar(50) not null primary key,
PMIId nvarchar(50) not null,
JointId nvarchar(50) not null,
QualityNo nvarchar(255),
Acceptance nvarchar(255),
Status int not null,
CreatedTime datetime default getdate()
)
go
-- 插入PMI委托菜单
insert into Sys_Menu values('A6FB44C3-0920-4F77-862F-D814FD5E5D23','PMI检测管理','PMI detection management','',21,0,3,NUll,1)
insert into Sys_Menu values(NEWID(),'PMI委托','PMI delegation','/WeldingProcess/PMI/PMIDelegation.aspx',1,'A6FB44C3-0920-4F77-862F-D814FD5E5D23',3,NULL,1)
insert into Sys_Menu values(NEWID(),'PMI检测录入','PMI detection entry','/WeldingProcess/PMI/PMIDetectionEntry.aspx',2,'A6FB44C3-0920-4F77-862F-D814FD5E5D23',3,NULL,1)
GO
/*******PMI委托明细视图***********/
USE [HJGLDB_ZJBSF]
GO
/****** Object: View [dbo].[View_PMI_DelegationDetails] Script Date: 2024-5-13 9:06:44 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- 增加报告编号
ALTER TABLE dbo.PMI_DelegationDetails ADD reportNo NVARCHAR(50)
-- 增加报告日期
ALTER TABLE dbo.PMI_DelegationDetails ADD reportTime datetime
GO
ALTER VIEW [dbo].[View_PMI_DelegationDetails]
AS
/********PMI处理明细********/
SELECT
TrustItem.Id,
TrustItem.Acceptance,
TrustItem.checkTime,
TrustItem.reportTime,
TrustItem.JointId as WeldJointId,
TrustItem.status,
TrustItem.QualityNo,
TrustItem.PMIId,
Trust.ProjectId,
Trust.DelegationNo,
Trust.DelegationDate,
ISNULL(TrustItem.reportNo,Trust.DelegationNo) as reportNo,
WeldJoint.WeldJointCode,
Pipeline.PipelineCode,
WeldJoint.Specification,
Material.MaterialCode,
Pipeline.WorkAreaId
FROM PMI_DelegationDetails AS TrustItem
LEFT JOIN PMI_Delegation AS Trust ON Trust.Id=TrustItem.PMIId
LEFT JOIN Pipeline_WeldJoint AS WeldJoint ON WeldJoint.WeldJointId=TrustItem.JointId
LEFT JOIN Pipeline_Pipeline AS Pipeline ON Pipeline.PipelineId=WeldJoint.PipelineId
LEFT JOIN Base_Material AS Material ON Material.MaterialId=WeldJoint.Material1Id
GO

View File

@ -0,0 +1,193 @@
USE [HJGLDB_ZJBSF]
GO
/****** Object: Table [dbo].[Email_Params] Script Date: 2024-5-17 15:35:13 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Email_Params](
[ID] [varchar](50) NOT NULL,
[MailClassName] [varchar](100) NULL,
[MailClassID] [varchar](50) NOT NULL,
[CreateName] [varchar](100) NOT NULL,
[CreateTime] [datetime] NOT NULL,
[UpdateName] [nchar](10) NULL,
[UpdateTime] [datetime] NULL,
CONSTRAINT [PK_Email_Params] PRIMARY KEY CLUSTERED
(
[ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[Email_Pop] Script Date: 2024-5-17 15:35:13 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Email_Pop](
[EmailID] [varchar](50) NOT NULL,
[EmailFwq] [varchar](50) NULL,
[EmailDk] [varchar](50) NULL,
[EmailYx] [varchar](50) NULL,
[EmailUsername] [varchar](50) NULL,
[EmailPass] [varchar](50) NULL,
[CreateTime] [varchar](50) NULL,
[CreateName] [varchar](50) NULL,
[UpdateTime] [varchar](50) NULL,
[UpdateName] [varchar](50) NULL,
CONSTRAINT [PK_Email_Pop] PRIMARY KEY CLUSTERED
(
[EmailID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[Email_SendLog] Script Date: 2024-5-17 15:35:13 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Email_SendLog](
[EmailId] [varchar](50) NOT NULL,
[EmailTile] [varchar](255) NULL,
[EmailContent] [text] NULL,
[EmailURL] [varchar](50) NULL,
[EmailName] [varchar](50) NULL,
[EmailStatus] [varchar](10) NULL,
[CreateTime] [datetime] NULL,
[CreateName] [varchar](50) NULL,
CONSTRAINT [PK_Email_Send] PRIMARY KEY CLUSTERED
(
[EmailId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object: Table [dbo].[Email_SendTemplate] Script Date: 2024-5-17 15:35:13 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Email_SendTemplate](
[EmailId] [varchar](50) NOT NULL,
[EmailParamsID] [varchar](50) NOT NULL,
[EailTiaoJian] [varchar](500) NULL,
[EmailUserYN] [int] NULL,
[EmailTitle] [varchar](500) NULL,
[EmailContext] [text] NULL,
[CreateName] [varchar](500) NULL,
[CreateTime] [datetime] NULL,
[UpdateName] [varchar](500) NULL,
[UpdateTime] [datetime] NULL,
[EmailDesc] [varchar](500) NULL,
CONSTRAINT [PK_Email_SendTemplate] PRIMARY KEY CLUSTERED
(
[EmailId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object: Table [dbo].[Email_ToPeople] Script Date: 2024-5-17 15:35:13 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Email_ToPeople](
[EmID] [varchar](50) NOT NULL,
[EmtempID] [varchar](50) NOT NULL,
[EmuserID] [varchar](50) NULL,
[EmuserName] [varchar](50) NULL,
[EmuaerEmailAddress] [varchar](100) NULL,
[EMPeopleType] [varchar](5) NULL,
CONSTRAINT [PK_Email_ToPeople] PRIMARY KEY CLUSTERED
(
[EmID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
INSERT [dbo].[Email_Params] ([ID], [MailClassName], [MailClassID], [CreateName], [CreateTime], [UpdateName], [UpdateTime]) VALUES (N'1a800170-48e2-4b41-a2af-20258aa74907', N'监理审核', N'监理', N'管理员', CAST(N'2024-05-16T14:53:01.747' AS DateTime), N'管理员 ', CAST(N'2024-05-16T17:05:42.987' AS DateTime))
GO
INSERT [dbo].[Email_Params] ([ID], [MailClassName], [MailClassID], [CreateName], [CreateTime], [UpdateName], [UpdateTime]) VALUES (N'859e5eaf-6a9e-46a8-8eb1-f3ba61f3be79', N'管理公司审核', N'管理公司', N'管理员', CAST(N'2024-05-14T17:39:53.640' AS DateTime), N'管理员 ', CAST(N'2024-05-16T17:05:48.370' AS DateTime))
GO
INSERT [dbo].[Email_Pop] ([EmailID], [EmailFwq], [EmailDk], [EmailYx], [EmailUsername], [EmailPass], [CreateTime], [CreateName], [UpdateTime], [UpdateName]) VALUES (N'7EC5E991-B7A0-495A-90ED-2BE15370C959', N'smtp.163.com', N'25', N'Scs13965090560@163.com', N'scs', N'CLXGLMKBGQBEXSSW', N'2024-5-16 14:46:25', N'管理员', NULL, NULL)
GO
INSERT [dbo].[Email_SendLog] ([EmailId], [EmailTile], [EmailContent], [EmailURL], [EmailName], [EmailStatus], [CreateTime], [CreateName]) VALUES (N'3cfa3bbf-e73a-494b-bb60-f682b52dad84', N'监理—点口未审核的焊口', N'<p style="text-wrap: wrap;">尊敬的各位领导,</p><p style="text-wrap: wrap;">&nbsp; &nbsp; &nbsp;&nbsp;</p><p style="text-wrap: wrap;">&nbsp; &nbsp; &nbsp; &nbsp;您有<span style="color:#ff0000">2105</span>条点口记录待审核!</p><p><br/></p>', N'jackchenyang@sina.cn', N'jackchenyang@sina.cn', N'发送成功', CAST(N'2024-05-17T14:32:14.573' AS DateTime), N'sys')
GO
INSERT [dbo].[Email_SendLog] ([EmailId], [EmailTile], [EmailContent], [EmailURL], [EmailName], [EmailStatus], [CreateTime], [CreateName]) VALUES (N'3f61427f-2b6f-42cb-8028-27726807f8e8', N'测试再发送一个邮件', N'这是一个邮件内容,请查收!', N'408299694@qq.com', N'408299694@qq.com', N'发送成功', CAST(N'2024-05-16T14:51:03.117' AS DateTime), N'sys')
GO
INSERT [dbo].[Email_SendLog] ([EmailId], [EmailTile], [EmailContent], [EmailURL], [EmailName], [EmailStatus], [CreateTime], [CreateName]) VALUES (N'632f4c12-08c6-4f19-88a1-5ed760486ae0', N'测试发邮件', N'这个是一个测试的发送邮件内容。。。。', N'874821510@qq.com', N'874821510@qq.com', N'发送失败', CAST(N'2024-05-16T14:45:45.350' AS DateTime), N'sys')
GO
INSERT [dbo].[Email_SendLog] ([EmailId], [EmailTile], [EmailContent], [EmailURL], [EmailName], [EmailStatus], [CreateTime], [CreateName]) VALUES (N'6488713b-86f4-4dc2-989c-32152fe53727', N'管理公司—点口未审核的焊口', N'<p style="text-wrap: wrap;">尊敬的各位领导,</p><p style="text-wrap: wrap;">&nbsp; &nbsp; &nbsp;&nbsp;</p><p style="text-wrap: wrap;">&nbsp; &nbsp; &nbsp; &nbsp;您有<span style="color:#ff0000">2176</span>条点口记录待审核!</p><p><br style="text-wrap: wrap;"/></p><p><br/></p>', N'jackchenyang@sina.cn', N'jackchenyang@sina.cn', N'发送成功', CAST(N'2024-05-17T14:32:16.627' AS DateTime), N'sys')
GO
INSERT [dbo].[Email_SendLog] ([EmailId], [EmailTile], [EmailContent], [EmailURL], [EmailName], [EmailStatus], [CreateTime], [CreateName]) VALUES (N'709cb7de-0564-4ab9-84e6-0b0b2f6732d8', N'测试再发送一个邮件', N'这是一个邮件内容,请查收!', N'874821510@qq.com', N'874821510@qq.com', N'发送成功', CAST(N'2024-05-16T14:51:03.113' AS DateTime), N'sys')
GO
INSERT [dbo].[Email_SendLog] ([EmailId], [EmailTile], [EmailContent], [EmailURL], [EmailName], [EmailStatus], [CreateTime], [CreateName]) VALUES (N'9857506c-83a4-4b79-b09a-d6e061376f17', N'点口未审核的焊口', N'<p style="text-wrap: wrap;">尊敬的各位领导,</p><p style="text-wrap: wrap;">&nbsp; &nbsp; &nbsp;&nbsp;</p><p style="text-wrap: wrap;">&nbsp; &nbsp; &nbsp; &nbsp;您有<span style="color:#ff0000">2176</span>条点口记录待审核!</p><p><br style="text-wrap: wrap;"/></p><p><br/></p>', N'jackchenyang@sina.cn', N'jackchenyang@sina.cn', N'发送成功', CAST(N'2024-05-17T14:26:32.310' AS DateTime), N'sys')
GO
INSERT [dbo].[Email_SendLog] ([EmailId], [EmailTile], [EmailContent], [EmailURL], [EmailName], [EmailStatus], [CreateTime], [CreateName]) VALUES (N'd349818c-9434-4ff9-ab73-c868c81de870', N'点口未审核的焊口', N'<p style="text-wrap: wrap;">尊敬的各位领导,</p><p style="text-wrap: wrap;">&nbsp; &nbsp; &nbsp;&nbsp;</p><p style="text-wrap: wrap;">&nbsp; &nbsp; &nbsp; &nbsp;您有<span style="color:#ff0000">2105</span>条点口记录待审核!</p><p><br/></p>', N'jackchenyang@sina.cn', N'jackchenyang@sina.cn', N'发送成功', CAST(N'2024-05-17T14:26:10.880' AS DateTime), N'sys')
GO
INSERT [dbo].[Email_SendLog] ([EmailId], [EmailTile], [EmailContent], [EmailURL], [EmailName], [EmailStatus], [CreateTime], [CreateName]) VALUES (N'd8740146-2ce5-4582-baa0-45063e967f02', N'测试发邮件', N'这个是一个测试的发送邮件内容。。。。', N'874821510@qq.com', N'874821510@qq.com', N'发送成功', CAST(N'2024-05-16T14:46:31.487' AS DateTime), N'sys')
GO
INSERT [dbo].[Email_SendTemplate] ([EmailId], [EmailParamsID], [EailTiaoJian], [EmailUserYN], [EmailTitle], [EmailContext], [CreateName], [CreateTime], [UpdateName], [UpdateTime], [EmailDesc]) VALUES (N'1a605eaf-6e0a-49d2-a0db-9e1238b65e8a', N'监理', N'点口未审核的焊口', 1, N'监理点口审核', N'<p style="text-wrap: wrap;">尊敬的各位领导,</p><p style="text-wrap: wrap;">&nbsp; &nbsp; &nbsp;&nbsp;</p><p style="text-wrap: wrap;">&nbsp; &nbsp; &nbsp; &nbsp;您有<span style="color:#ff0000">{{totalCount}}</span>条点口记录待审核!</p><p><br/></p>', N'管理员', CAST(N'2024-05-16T17:04:30.020' AS DateTime), N'管理员', CAST(N'2024-05-17T14:16:54.980' AS DateTime), NULL)
GO
INSERT [dbo].[Email_SendTemplate] ([EmailId], [EmailParamsID], [EailTiaoJian], [EmailUserYN], [EmailTitle], [EmailContext], [CreateName], [CreateTime], [UpdateName], [UpdateTime], [EmailDesc]) VALUES (N'ad5201c3-0398-4316-a880-0a285e0f06fa', N'管理公司', N'点口未审核的焊口', 1, N'管理公司点口审核', N'<p style="text-wrap: wrap;">尊敬的各位领导,</p><p style="text-wrap: wrap;">&nbsp; &nbsp; &nbsp;&nbsp;</p><p style="text-wrap: wrap;">&nbsp; &nbsp; &nbsp; &nbsp;您有<span style="color:#ff0000">{{totalCount}}</span>条点口记录待审核!</p><p><br style="text-wrap: wrap;"/></p><p><br/></p>', N'管理员', CAST(N'2024-05-16T14:54:15.743' AS DateTime), N'管理员', CAST(N'2024-05-17T14:16:58.267' AS DateTime), NULL)
GO
INSERT [dbo].[Email_ToPeople] ([EmID], [EmtempID], [EmuserID], [EmuserName], [EmuaerEmailAddress], [EMPeopleType]) VALUES (N'33e99721-b831-46f5-83b6-039be6a89050', N'1a605eaf-6e0a-49d2-a0db-9e1238b65e8a', N'29188391-731e-4645-ad09-c99c2a9fc6ce', N'李庆华', N'jackchenyang@sina.cn', N'0')
GO
INSERT [dbo].[Email_ToPeople] ([EmID], [EmtempID], [EmuserID], [EmuserName], [EmuaerEmailAddress], [EMPeopleType]) VALUES (N'6144c9f6-6e91-4e88-ae3a-fe9f99bc78af', N'ad5201c3-0398-4316-a880-0a285e0f06fa', N'29188391-731e-4645-ad09-c99c2a9fc6ce', N'李庆华', N'jackchenyang@sina.cn', N'0')
GO
INSERT [dbo].[Email_ToPeople] ([EmID], [EmtempID], [EmuserID], [EmuserName], [EmuaerEmailAddress], [EMPeopleType]) VALUES (N'd78fa8fb-b675-4264-8040-8a0cf3d9649d', N'1a605eaf-6e0a-49d2-a0db-9e1238b65e8a', N'18485804-501b-4123-9e9a-1afb3c53aed0', N'陈阳', N'874821510@qq.com', N'1')
GO
INSERT [dbo].[Email_ToPeople] ([EmID], [EmtempID], [EmuserID], [EmuserName], [EmuaerEmailAddress], [EMPeopleType]) VALUES (N'ff5fefa1-2ab8-4643-b3f7-b38fd049597a', N'ad5201c3-0398-4316-a880-0a285e0f06fa', N'18485804-501b-4123-9e9a-1afb3c53aed0', N'陈阳', N'874821510@qq.com', N'1')
GO
SET ANSI_PADDING ON
GO
/****** Object: Index [IX_Email_Params] Script Date: 2024-5-17 15:35:13 ******/
ALTER TABLE [dbo].[Email_Params] ADD CONSTRAINT [IX_Email_Params] UNIQUE NONCLUSTERED
(
[MailClassID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
SET ANSI_PADDING ON
GO
/****** Object: Index [IX_Email_SendTemplate] Script Date: 2024-5-17 15:35:13 ******/
ALTER TABLE [dbo].[Email_SendTemplate] ADD CONSTRAINT [IX_Email_SendTemplate] UNIQUE NONCLUSTERED
(
[EmailParamsID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Email_Params] ADD CONSTRAINT [DF_Email_Params_CreateName] DEFAULT ('sys') FOR [CreateName]
GO
ALTER TABLE [dbo].[Email_Params] ADD CONSTRAINT [DF_Email_Params_CreateTime] DEFAULT (getdate()) FOR [CreateTime]
GO
ALTER TABLE [dbo].[Email_ToPeople] ADD CONSTRAINT [DF_Email_ToPeople_EMPeopleType] DEFAULT ((0)) FOR [EMPeopleType]
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'邮件分类名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Email_Params', @level2type=N'COLUMN',@level2name=N'MailClassName'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'邮件分类ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Email_Params', @level2type=N'COLUMN',@level2name=N'MailClassID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'参数MailClassID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Email_SendTemplate', @level2type=N'COLUMN',@level2name=N'EmailParamsID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'内容条件说明' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Email_SendTemplate', @level2type=N'COLUMN',@level2name=N'EailTiaoJian'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'邮件标题' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Email_SendTemplate', @level2type=N'COLUMN',@level2name=N'EmailTitle'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'邮件具体内容' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Email_SendTemplate', @level2type=N'COLUMN',@level2name=N'EmailContext'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Email_SendTemplate', @level2type=N'COLUMN',@level2name=N'EmailDesc'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'发送人类型 0-发送人 1-抄送人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Email_ToPeople', @level2type=N'COLUMN',@level2name=N'EMPeopleType'
GO
--- 插入菜单
INSERT [dbo].[Sys_Menu] ([MenuId], [MenuName], [MenuEnName], [Url], [SortIndex], [SuperMenu], [MenuModule], [IsAudiFlow], [IsUse]) VALUES (N'97143EDB-6A32-4BBA-9F49-E33E87912BC8', N'发送邮件', N'Send Email', N'Email_Send/Email_Send_Edit.aspx', 10, N'D05CSEAC-2854-4822-A7E9-24AD3EAF0A6E', N'2 ', NULL, 1)
GO
INSERT [dbo].[Sys_Menu] ([MenuId], [MenuName], [MenuEnName], [Url], [SortIndex], [SuperMenu], [MenuModule], [IsAudiFlow], [IsUse]) VALUES (N'9E9DD8E3-D91B-4FD4-B922-2F5CC23D2745', N'邮件配置', N'Send Email Pop', N'Email_Send/Email_Pop_Edit.aspx', 20, N'D05CSEAC-2854-4822-A7E9-24AD3EAF0A6E', N'2 ', NULL, 1)
GO
INSERT [dbo].[Sys_Menu] ([MenuId], [MenuName], [MenuEnName], [Url], [SortIndex], [SuperMenu], [MenuModule], [IsAudiFlow], [IsUse]) VALUES (N'D05CSEAC-2854-4822-A7E9-24AD3EAF0A6E', N'发送邮件', N'Send Email', N'', 60, N'0', N'2 ', NULL, 1)
GO
INSERT [dbo].[Sys_Menu] ([MenuId], [MenuName], [MenuEnName], [Url], [SortIndex], [SuperMenu], [MenuModule], [IsAudiFlow], [IsUse]) VALUES (N'F19A6438-C757-4BC2-ADC2-72AAF02089E5', N'邮件类型', N'Mail Parameters', N'Email_Send/Email_Params_List.aspx', 60, N'D05CSEAC-2854-4822-A7E9-24AD3EAF0A6E', N'2 ', NULL, 1)
GO
INSERT [dbo].[Sys_Menu] ([MenuId], [MenuName], [MenuEnName], [Url], [SortIndex], [SuperMenu], [MenuModule], [IsAudiFlow], [IsUse]) VALUES (N'06EB7C08-6F6E-433B-91A7-579BFC435A0C', N'邮件模板设置', N'Send Email Template', N'Email_Send/Email_SendTemplate_List.aspx', 40, N'D05CSEAC-2854-4822-A7E9-24AD3EAF0A6E', N'2 ', NULL, 1)
GO
INSERT [dbo].[Sys_Menu] ([MenuId], [MenuName], [MenuEnName], [Url], [SortIndex], [SuperMenu], [MenuModule], [IsAudiFlow], [IsUse]) VALUES (N'5941BE0C-C262-48C7-899F-F0BE5A779926', N'发送邮件日志', N'Send Email Log', N'Email_Send/Email_SendLog_List.aspx', 30, N'D05CSEAC-2854-4822-A7E9-24AD3EAF0A6E', N'2 ', NULL, 1)
GO
SELECT * FROM dbo.Sys_Menu WHERE MenuName LIKE '%邮件%'

View File

@ -0,0 +1,106 @@
UPDATE dbo.Batch_PointBatchItem SET PointState=NULL,PointDate=NULL,
JLAudit=NULL,GLGSAudit=NULL,QTAudit=NULL
WHERE PointState='1' AND
PointBatchItemId NOT IN(SELECT PointBatchItemId FROM dbo.Batch_BatchTrustItem)
GO
UPDATE dbo.Batch_PointBatchItem SET IsCompletedPoint=1
GO
alter table PTP_PipelineList add WorkAreaId nvarchar(50)
alter table PTP_PipelineList add isAll bit
alter table PTP_PipelineList add WeldJonintCode nvarchar(max)
GO
ALTER VIEW [dbo].[View_Batch_PointBatchItem]
AS
/*************点口明细表*************/
SELECT PointBatchItem.PointBatchItemId,
PointBatchItem.PointBatchId,
PointBatch.ProjectId,
PointBatch.InstallationId,
PointBatch.UnitId,
PointBatch.PointBatchCode,
PointBatch.DetectionTypeId,
Pipeline.WorkAreaId,
PointBatchItem.WeldJointId,
PointBatchItem.PointState AS PState,
(CASE PointBatchItem.PointState WHEN '1' THEN '点口' WHEN '2' THEN '扩透' END) AS PointState,
--(CASE PointBatchItem.IsAudit WHEN 1 THEN '' ELSE '' END) AS PointIsAudit,
--(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,--
PointBatchItem.RepairDate,--
PointBatchItem.CutDate,--
PointBatchItem.RepairRecordId,
PointBatchItem.IsBuildTrust,--
WorkArea.WorkAreaCode,--
jot.WeldJointCode,--
jot.BackingWelderId AS WelderId, --ID
jot.JointArea,--
jot.Dia,
jot.Size,--
WeldingDaily.WeldingDate,--
jot.PipelineId, --线ID
jot.Material1Id AS Mat, --
jot.Specification, --
jot.JointAttribute,
weldType.Flag, --
Pipeline.PipelineCode, --线
PipingClass.PipingClassName, --
PointBatchItem.IsWelderFirst,
PointBatchItem.IsCompletedPoint,
trust.TrustBatchItemId,
(CASE WHEN PointBatchItem.JLAudit IS NOT NULL THEN userJL.UserName ELSE (CASE WHEN PointBatchItem.PointState IS NOT NULL THEN '未审核' ELSE '' END) END) AS JLAudit,
(CASE WHEN PointBatchItem.GLGSAudit IS NOT NULL THEN userGLGS.UserName ELSE (CASE WHEN PointBatchItem.PointState IS NOT NULL THEN '未审核' ELSE '' END) END) AS GLGSAudit,
(CASE WHEN PointBatchItem.QTAudit IS NOT NULL THEN userQT.UserName ELSE (CASE WHEN PointBatchItem.PointState IS NOT NULL THEN '未审核' ELSE '' END) END) AS QTAudit,
(CASE WHEN jot.BackingWelderId!=jot.CoverWelderId THEN backingWelder.WelderCode+'/'+coverWelder.WelderCode ELSE backingWelder.WelderCode END) AS WelderCode, --
(CASE WHEN PointBatchItem.JLAudit IS NOT NULL AND PointBatchItem.GLGSAudit IS NOT NULL THEN 1 ELSE 0 END) AS IsPointAudit
FROM Batch_PointBatchItem AS PointBatchItem
LEFT JOIN Batch_PointBatch AS PointBatch ON PointBatch.PointBatchId=PointBatchItem.PointBatchId
LEFT JOIN dbo.Batch_BatchTrustItem trust ON trust.PointBatchItemId = PointBatchItem.PointBatchItemId
LEFT JOIN Pipeline_WeldJoint AS jot ON jot.WeldJointId=PointBatchItem.WeldJointId
LEFT JOIN Pipeline_Pipeline AS Pipeline ON Pipeline.PipelineId=jot.PipelineId
LEFT JOIN dbo.Base_WeldType weldType ON weldType.WeldTypeId = jot.WeldTypeId
LEFT JOIN dbo.Welder_Welder backingWelder ON backingWelder.WelderId = jot.BackingWelderId
LEFT JOIN dbo.Welder_Welder coverWelder ON coverWelder.WelderId = jot.CoverWelderId
LEFT JOIN Project_WorkArea AS WorkArea ON WorkArea.WorkAreaId=Pipeline.WorkAreaId
LEFT JOIN Pipeline_WeldingDaily AS WeldingDaily ON WeldingDaily.WeldingDailyId=jot.WeldingDailyId
LEFT JOIN Base_PipingClass AS PipingClass ON PipingClass.PipingClassId=Pipeline.PipingClassId
LEFT JOIN dbo.Sys_User userJL ON userJL.UserId = PointBatchItem.JLAudit
LEFT JOIN dbo.Sys_User userGLGS ON userGLGS.UserId = PointBatchItem.GLGSAudit
LEFT JOIN dbo.Sys_User userQT ON userQT.UserId = PointBatchItem.QTAudit
GO
CREATE VIEW [dbo].[View_TrustBathcIn]
AS
/*用于导入数据时,查询焊口信息*/
SELECT
pitem.PointBatchItemId,pitem.PointBatchId,jot.ProjectId
,pipeline.InstallationId,ins.InstallationCode
,pipeline.WorkAreaId,workArea.WorkAreaCode
,jot.PipelineId,pipeline.PipelineCode
,pitem.WeldJointId,jot.WeldJointCode
,point.DetectionTypeId,nde.DetectionTypeCode
,pitem.IsWelderFirst,trust.TrustBatchItemId
FROM dbo.Batch_PointBatchItem AS pitem
LEFT JOIN dbo.Batch_PointBatch point ON point.PointBatchId = pitem.PointBatchId
LEFT JOIN Pipeline_WeldJoint jot ON jot.WeldJointId = pitem.WeldJointId
LEFT JOIN Pipeline_Pipeline AS pipeline ON jot.PipelineId = pipeline.PipelineId
LEFT JOIN dbo.Project_WorkArea AS workArea ON workArea.WorkAreaId=pipeline.WorkAreaId
LEFT JOIN dbo.Project_Installation ins ON ins.InstallationId = workArea.InstallationId
LEFT JOIN dbo.Base_DetectionType nde ON nde.DetectionTypeId = point.DetectionTypeId
LEFT JOIN dbo.Batch_BatchTrustItem trust ON trust.PointBatchItemId = pitem.PointBatchItemId
GO