This commit is contained in:
佘春生 2024-05-22 20:44:40 +08:00
parent 2f6957a8c0
commit af2e76ff84
23 changed files with 1875 additions and 151 deletions

View File

@ -0,0 +1,39 @@
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
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

View File

@ -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" />

Binary file not shown.

View File

@ -243,6 +243,11 @@ namespace BLL
/// </summary>
public const string WelderQueTemplateUrl = "File\\Excel\\WelderQue.xlsx";
/// <summary>
/// 委托单导入模板
/// </summary>
public const string HJGL_TrustInTemplateUrl = "File\\Excel\\HJGL_DataIn\\TrustIn.xlsx";
/// <summary>
/// 检测单导入模版文件原始的虚拟路径
/// </summary>

View File

@ -92,7 +92,7 @@ namespace BLL
public static List<Model.Batch_PointBatchItem> GetExportItem(string repairRecordId)
{
Model.HJGLDB db = Funs.DB;
var exp =from x in db.Batch_PointBatchItem where x.RepairRecordId == repairRecordId select x;
var exp =from x in db.Batch_PointBatchItem where x.RepairRecordId == repairRecordId && x.PointState == "2" select x;
if (exp.Count() > 0)
{
return exp.ToList();

View File

@ -1252,6 +1252,7 @@
<Content Include="WeldingProcess\TrustManage\RTTrustReplace.aspx" />
<Content Include="WeldingProcess\TrustManage\SelectExpandPoint.aspx" />
<Content Include="WeldingProcess\TrustManage\PointAudit.aspx" />
<Content Include="WeldingProcess\TrustManage\TrustBatchIn.aspx" />
<Content Include="WeldingProcess\TrustManage\TrustBatchManage.aspx" />
<Content Include="WeldingProcess\TrustManage\TrustBatchOut.aspx" />
<Content Include="WeldingProcess\TrustManage\TrustBatchSelect.aspx" />
@ -5538,6 +5539,13 @@
<Compile Include="WeldingProcess\TrustManage\PointAudit.aspx.designer.cs">
<DependentUpon>PointAudit.aspx</DependentUpon>
</Compile>
<Compile Include="WeldingProcess\TrustManage\TrustBatchIn.aspx.cs">
<DependentUpon>TrustBatchIn.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WeldingProcess\TrustManage\TrustBatchIn.aspx.designer.cs">
<DependentUpon>TrustBatchIn.aspx</DependentUpon>
</Compile>
<Compile Include="WeldingProcess\TrustManage\TrustBatchManage.aspx.cs">
<DependentUpon>TrustBatchManage.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>

View File

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

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>
@ -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="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=15.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91" validate="false"/>
</httpHandlers>
<compilation debug="false" targetFramework="4.8">
<compilation debug="true" targetFramework="4.8">
<assemblies>
<!--<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"/>

View File

@ -401,12 +401,23 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage
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();
}
}
db.SubmitChanges();
var exp = BLL.RepairRecordService.GetExportItem(repairRecordId);
if (exp != null)
@ -444,7 +455,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage
// 大于500的焊口扩透口是自身这时要增加批明细
else
{
Model.Batch_PointBatchItem pointItem = db.Batch_PointBatchItem.FirstOrDefault(x => x.RepairRecordId == repairRecordId);
Model.Batch_PointBatchItem pointItem = db.Batch_PointBatchItem.FirstOrDefault(x => x.RepairRecordId == repairRecordId && x.PointState == "2");
// 大于500的焊口扩透口是自身保存后不能再次增加
if (pointItem == null)
{

View File

@ -0,0 +1,66 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TrustBatchIn.aspx.cs" Inherits="FineUIPro.Web.WeldingProcess.TrustManage.TrustBatchIn" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>委托单导入</title>
<link href="../res/css/common.css" rel="stylesheet" type="text/css" />
<style>
.f-grid-row .f-grid-cell-inner
{
white-space: normal;
word-break: break-all;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="SimpleForm1" runat="server" OnCustomEvent="PageManager1_CustomEvent" />
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" ToolbarAlign="Right" runat="server">
<Items>
<f:Button ID="btnAudit" Icon="ApplicationEdit" Text="审核" runat="server" ToolTip="审核" ValidateForms="SimpleForm1"
OnClick="btnAudit_Click">
</f:Button>
<f:Button ID="btnImport" Icon="ApplicationGet" Text="导入" runat="server" ToolTip="导入" ValidateForms="SimpleForm1"
OnClick="btnImport_Click">
</f:Button>
<f:Button ID="btnDownLoad" runat="server" Text="下载模板" Icon="ApplicationGo" ToolTip="下载模板" OnClick="btnDownLoad_Click">
</f:Button>
<%--<f:Button ID="btnOut" Icon="Pencil" runat="server" Text="导出" ToolTip="导出错误列表" ValidateForms="SimpleForm1"
OnClick="btnOut_Click" Hidden="true"></f:Button>--%>
</Items>
</f:Toolbar>
</Toolbars>
<Rows>
<f:FormRow>
<Items>
<f:FileUpload runat="server" ID="fuAttachUrl" EmptyText="选择要导入的文件" Label="选择要导入的文件"
LabelWidth="150px">
</f:FileUpload>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:HiddenField ID="hdFileName" runat="server">
</f:HiddenField>
<f:HiddenField ID="hdCheckResult" runat="server">
</f:HiddenField>
<f:Label ID="lbResult" runat="server" Label="审核结果"></f:Label>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<%--<f:Label ID="lblBottom" runat="server" Text="说明:规则是">
</f:Label>--%>
</Items>
</f:FormRow>
</Rows>
</f:Form>
</form>
</body>
</html>

View File

@ -0,0 +1,595 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.OleDb;
using System.IO;
using System.Linq;
using System.Web.UI;
using BLL;
using FineUIPro.Web.common.ProjectSet;
using FineUIPro.Web.Common.ProjectSet;
namespace FineUIPro.Web.WeldingProcess.TrustManage
{
public partial class TrustBatchIn : PageBase
{
#region
/// <summary>
/// 上传预设的虚拟路径
/// </summary>
private string initPath = Const.ExcelUrl;
/// <summary>
/// 错误集合
/// </summary>
public static string errorInfos = string.Empty;
#endregion
#region
/// <summary>
/// 加载页面
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
this.hdFileName.Text = string.Empty;
this.hdCheckResult.Text = string.Empty;
errorInfos = string.Empty;
}
}
#endregion
#region
/// <summary>
/// 审核
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnAudit_Click(object sender, EventArgs e)
{
errorInfos = string.Empty;
if (this.fuAttachUrl.HasFile == false)
{
ShowNotify("请选择Excel文件!", MessageBoxIcon.Warning);
return;
}
string IsXls = Path.GetExtension(this.fuAttachUrl.FileName).ToString().Trim().ToLower();
if (IsXls != ".xls" && IsXls != ".xlsx")
{
ShowNotify("只能选择Excel文件!", MessageBoxIcon.Warning);
return;
}
string rootPath = Server.MapPath("~/");
string initFullPath = rootPath + initPath;
if (!Directory.Exists(initFullPath))
{
Directory.CreateDirectory(initFullPath);
}
//指定上传文件名称
this.hdFileName.Text = BLL.Funs.GetNewFileName() + IsXls;
//上传文件路径
string filePath = initFullPath + this.hdFileName.Text;
//文件上传服务器
this.fuAttachUrl.PostedFile.SaveAs(filePath);
//文件上传服务器后的名称
string fileName = rootPath + initPath + this.hdFileName.Text;
//读取Excel
DataSet ds = NPOIHelper.ExcelToDataSet(fileName, out errorInfos, true);
//验证Excel读取是否有误
if (!string.IsNullOrEmpty(errorInfos))
{
ShowNotify(errorInfos, MessageBoxIcon.Warning);
return;
}
if (ds.Tables.Count > 0)
{
string result = string.Empty;
List<Model.Batch_BatchTrust> trustList= new List<Model.Batch_BatchTrust>();
var units = from x in Funs.DB.Base_Unit select x;
var area = from x in Funs.DB.Project_WorkArea where x.ProjectId == this.CurrUser.LoginProjectId select x;
var installation = from x in Funs.DB.Project_Installation where x.ProjectId == this.CurrUser.LoginProjectId select x;
var trustIn = from x in Funs.DB.View_TrustBathcIn where x.ProjectId == this.CurrUser.LoginProjectId select x;
var pipeList = from x in Funs.DB.Pipeline_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId select x;
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
string col0 = ds.Tables[0].Rows[i][0].ToString().Trim();
string col1 = ds.Tables[0].Rows[i][1].ToString().Trim();
string col2 = ds.Tables[0].Rows[i][2].ToString().Trim();
string col3 = ds.Tables[0].Rows[i][3].ToString().Trim();
string col4 = ds.Tables[0].Rows[i][4].ToString().Trim();
string col5 = ds.Tables[0].Rows[i][5].ToString().Trim();
string col6 = ds.Tables[0].Rows[i][6].ToString().Trim();
string col7 = ds.Tables[0].Rows[i][7].ToString().Trim();
string col8 = ds.Tables[0].Rows[i][8].ToString().Trim();
string col9 = ds.Tables[0].Rows[i][9].ToString().Trim();
Model.Batch_BatchTrust t = new Model.Batch_BatchTrust();
if (string.IsNullOrEmpty(col0))
{
result += "第" + (i + 2).ToString() + "行," + "委托单号" + "," + "此项为必填项!" + "|";
}
else
{
var oldTrust = Funs.DB.Batch_BatchTrust.FirstOrDefault(x => x.TrustBatchCode == col0);
if (oldTrust != null)
{
result += "第" + (i + 2).ToString() + "行," + "委托单号" + "," + "[" + col0 + "]已存在!" + "|";
}
else
{
t.TrustBatchCode = col0;
}
}
string installationId = string.Empty;
if (!string.IsNullOrEmpty(col1))
{
Model.Project_Installation ins = installation.FirstOrDefault(x => x.InstallationCode == col1);
if (ins == null)
{
result += "第" + (i + 2).ToString() + "行," + "装置编号" + "," + "[" + col1 + "]不存在!" + "|";
}
else
{
installationId = ins.InstallationId;
t.InstallationId = installationId;
}
}
else
{
result += "第" + (i + 2).ToString() + "行," + "装置编号" + "," + "此项为必填项!" + "|";
}
string workAreaId = string.Empty;
if (!string.IsNullOrEmpty(col2))
{
Model.Project_WorkArea workArea = area.FirstOrDefault(x => x.WorkAreaCode == col2 && x.InstallationId == installationId);
if (workArea == null)
{
result += "第" + (i + 2).ToString() + "行," + "区域编号" + "," + "[" + col2 + "]不存在!" + "|";
}
else
{
workAreaId = workArea.WorkAreaId;
t.WorkAreaId = workAreaId;
}
}
else
{
result += "第" + (i + 2).ToString() + "行," + "区域编号" + "," + "此项为必填项!" + "|";
}
string pipelineId = string.Empty;
if (!string.IsNullOrEmpty(col3))
{
var pipe = pipeList.FirstOrDefault(x => x.PipelineCode == col3 && x.WorkAreaId == workAreaId);
if (pipe == null)
{
result += "第" + (i + 2).ToString() + "行," + "该区域管线号" + "," + "[" + col3 + "]不存在!" + "|";
}
else
{
pipelineId = pipe.PipelineId;
t.PipelineId = pipelineId;
}
}
else
{
result += "第" + (i + 2).ToString() + "行," + "管线号" + "," + "此项为必填项!" + "|";
}
string weldJointId = string.Empty;
if (!string.IsNullOrEmpty(col4))
{
var weldJoint = from x in Funs.DB.Pipeline_WeldJoint where x.PipelineId == pipelineId && x.WeldJointCode == col4 select x;
if (weldJoint.Count() == 0)
{
result += "第" + (i + 2).ToString() + "行," + "焊口号" + "," + "[" + col4 + "]不存在!" + "|";
}
else if (weldJoint.Count() == 1)
{
weldJointId = weldJoint.First().WeldJointId;
t.WeldingMethodId=weldJoint.First().WeldingMethodId;
t.GrooveTypeId = weldJoint.First().GrooveTypeId;
}
else
{
result += "第" + (i + 2).ToString() + "行," + "焊口号" + "," + "[" + col4 + "]重复!" + "|";
}
}
else
{
result += "第" + (i + 2).ToString() + "行," + "焊口号" + "," + "此项为必填项!" + "|";
}
string ndeId = string.Empty;
if (!string.IsNullOrEmpty(col5))
{
var nde = Funs.DB.Base_DetectionType.FirstOrDefault(x => x.DetectionTypeCode == col5);
if (nde == null)
{
result += "第" + (i + 2).ToString() + "行," + "探伤类型" + "," + "[" + col5 + "]错误!" + "|";
}
else
{
ndeId = nde.DetectionTypeId;
t.DetectionTypeId = nde.DetectionTypeId;
}
}
else
{
result += "第" + (i + 2).ToString() + "行," + "探伤类型" + "," + "此项为必填项!" + "|";
}
var pointBatchItem = trustIn.FirstOrDefault(x => x.InstallationId == installationId && x.WorkAreaId == workAreaId && x.PipelineId == pipelineId && x.WeldJointId == weldJointId && x.DetectionTypeId == ndeId);
if (pointBatchItem == null)
{
result += "第" + (i + 2).ToString() + "行," + "检验批中不存在对应焊口信息" + "|";
}
else
{
if (pointBatchItem.TrustBatchItemId != null)
{
result += "第" + (i + 2).ToString() + "行," + "焊口已委托" + "|";
}
else
{
t.IsWelderFirst = pointBatchItem.IsWelderFirst;
}
}
if (!string.IsNullOrEmpty(col6))
{
try
{
DateTime d = Convert.ToDateTime(col6);
t.TrustDate = d.Date;
}
catch (Exception)
{
result += "第" + (i + 2).ToString() + "行," + "委托日期" + "," + "[" + col6 + "]错误!" + "|";
}
}
else
{
result += "第" + (i + 2).ToString() + "行," + "委托日期" + "," + "此项为必填项!" + "|";
}
if (!string.IsNullOrEmpty(col7))
{
Model.Base_Unit unit = Funs.DB.Base_Unit.FirstOrDefault(x => x.UnitCode == col7);
if (unit == null)
{
result += "第" + (i + 2).ToString() + "行," + "检测单位编号" + "," + "[" + col7 + "]错误!" + "|";
}
else
{
t.NDEUuit = unit.UnitId;
}
}
else
{
result += "第" + (i + 2).ToString() + "行," + "检测单位" + "," + "此项为必填项!" + "|";
}
if (!string.IsNullOrEmpty(col8))
{
if (col8!= "打磨" && col8 != "机加工" && col8 != "喷砂" && col8 != "漆面")
{
result += "第" + (i + 2).ToString() + "行," + "表面检测需录入:打磨、机加工、喷砂、漆面" + "|";
}
}
if (!string.IsNullOrEmpty(col9))
{
if (col9 != "焊后" && col9 != "打磨后" && col9 != "热处理后" && col9 != "坡口准备" && col9 != "清根后" && col9 != "压力试验后" && col9 != "其他")
{
result += "第" + (i + 2).ToString() + "行," + "检测时机需录入:焊后、打磨后、热处理后、坡口准备、清根后、压力试验后、其他" + "|";
}
}
trustList.Add(t);
}
var trustCodeList=trustList.Select(p=>p.TrustBatchCode).Distinct();
foreach (var trustCode in trustCodeList)
{
var t = from x in trustList where x.TrustBatchCode == trustCode select x;
if (t.Select(x => x.InstallationId).Distinct().Count() > 1)
{
result += "委托单" + trustCode + "装置不一至" + "|";
}
if (t.Select(x => x.WorkAreaId).Distinct().Count() > 1)
{
result += "委托单" + trustCode + "区域不一至" + "|";
}
if (t.Select(x => x.PipelineId).Distinct().Count() > 1)
{
result += "委托单" + trustCode + "管线不一至" + "|";
}
if (t.Select(x => x.WeldingMethodId).Distinct().Count() > 1)
{
result += "委托单" + trustCode + "焊接方法不一至" + "|";
}
if (t.Select(x => x.GrooveTypeId).Distinct().Count() > 1)
{
result += "委托单" + trustCode + "坡口类型不一至" + "|";
}
if (t.Select(x => x.DetectionTypeId).Distinct().Count() > 1)
{
result += "委托单" + trustCode + "探伤类型不一至" + "|";
}
if (t.Select(x => x.TrustDate).Distinct().Count() > 1)
{
result += "委托单" + trustCode + "委托日期不一至" + "|";
}
}
if (!string.IsNullOrEmpty(result))
{
if (result.Contains("|"))
{
result = result.Substring(0, result.LastIndexOf("|"));
}
errorInfos = result;
lbResult.Text = result;
}
else
{
errorInfos = string.Empty;
lbResult.Text = "审核数据正确,请点击导入!";
}
}
}
#endregion
#region
/// <summary>
/// 导入
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnImport_Click(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(this.hdFileName.Text))
{
if (errorInfos == string.Empty)
{
string IsXls = Path.GetExtension(this.fuAttachUrl.FileName).ToString().Trim().ToLower();
if (IsXls != ".xls" && IsXls != ".xlsx")
{
ShowNotify("只能选择Excel文件!", MessageBoxIcon.Warning);
return;
}
string rootPath = Server.MapPath("~/");
string initFullPath = rootPath + initPath;
if (!Directory.Exists(initFullPath))
{
Directory.CreateDirectory(initFullPath);
}
//指定上传文件名称
this.hdFileName.Text = BLL.Funs.GetNewFileName() + IsXls;
//上传文件路径
string filePath = initFullPath + this.hdFileName.Text;
//文件上传服务器
this.fuAttachUrl.PostedFile.SaveAs(filePath);
//文件上传服务器后的名称
string fileName = rootPath + initPath + this.hdFileName.Text;
//读取Excel
DataSet ds = NPOIHelper.ExcelToDataSet(fileName, out errorInfos, true);
if (ds.Tables.Count > 0)
{
string result = string.Empty;
List<Model.Batch_BatchTrust> trustList = new List<Model.Batch_BatchTrust>();
var units = from x in Funs.DB.Base_Unit select x;
var area = from x in Funs.DB.Project_WorkArea where x.ProjectId == this.CurrUser.LoginProjectId select x;
var installation = from x in Funs.DB.Project_Installation where x.ProjectId == this.CurrUser.LoginProjectId select x;
var trustIn = from x in Funs.DB.View_TrustBathcIn where x.ProjectId == this.CurrUser.LoginProjectId select x;
var pipeList = from x in Funs.DB.Pipeline_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId select x;
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
string col0 = ds.Tables[0].Rows[i][0].ToString().Trim();
string col1 = ds.Tables[0].Rows[i][1].ToString().Trim();
string col2 = ds.Tables[0].Rows[i][2].ToString().Trim();
string col3 = ds.Tables[0].Rows[i][3].ToString().Trim();
string col4 = ds.Tables[0].Rows[i][4].ToString().Trim();
string col5 = ds.Tables[0].Rows[i][5].ToString().Trim();
string col6 = ds.Tables[0].Rows[i][6].ToString().Trim();
string col7 = ds.Tables[0].Rows[i][7].ToString().Trim();
string col8 = ds.Tables[0].Rows[i][8].ToString().Trim();
string col9 = ds.Tables[0].Rows[i][9].ToString().Trim();
Model.Batch_BatchTrust t = new Model.Batch_BatchTrust();
t.TrustBatchCode = col0;
Model.Project_Installation ins = installation.FirstOrDefault(x => x.InstallationCode == col1);
t.InstallationId = ins.InstallationId;
Model.Project_WorkArea workArea = area.FirstOrDefault(x => x.WorkAreaCode == col2 && x.InstallationId == ins.InstallationId);
t.WorkAreaId = workArea.WorkAreaId;
var pipe = pipeList.FirstOrDefault(x => x.PipelineCode == col3 && x.WorkAreaId == workArea.WorkAreaId);
t.PipelineId = pipe.PipelineId;
t.UnitId = pipe.UnitId;
var jot = Funs.DB.Pipeline_WeldJoint.FirstOrDefault(x => x.PipelineId == pipe.PipelineId && x.WeldJointCode == col4);
t.QuaCertFile = jot.WeldJointId; // 作为焊口ID
t.WeldingMethodId = jot.WeldingMethodId;
t.GrooveTypeId = jot.GrooveTypeId;
var nde = Funs.DB.Base_DetectionType.FirstOrDefault(x => x.DetectionTypeCode == col5);
t.DetectionTypeId = nde.DetectionTypeId;
var pointBatchItem = trustIn.FirstOrDefault(x => x.WorkAreaId == workArea.WorkAreaId && x.PipelineId == pipe.PipelineId && x.WeldJointId == jot.WeldJointId && x.DetectionTypeId == nde.DetectionTypeId);
t.IsWelderFirst = pointBatchItem.IsWelderFirst;
t.AcceptStandard = pointBatchItem.PointBatchItemId; // 作为点口明细ID
t.TopointBatch = pointBatchItem.PointBatchId;
t.TrustDate = Convert.ToDateTime(col6).Date;
Model.Base_Unit unit = Funs.DB.Base_Unit.FirstOrDefault(x => x.UnitCode == col7);
t.NDEUuit = unit.UnitId;
if (!string.IsNullOrEmpty(col8))
{
t.SurfaceState = col8;
}
else
{
t.SurfaceState = "打磨";
}
if (!string.IsNullOrEmpty(col9))
{
t.DetectionTiming = col9;
}
else
{
t.DetectionTiming = "焊后";
}
trustList.Add(t);
}
var trustCodeList = trustList.Select(p => p.TrustBatchCode).Distinct();
foreach (var trustCode in trustCodeList)
{
var t = from x in trustList where x.TrustBatchCode == trustCode select x;
Model.Batch_BatchTrust newBatchTrust = new Model.Batch_BatchTrust();
string trustBatchId = SQLHelper.GetNewID(typeof(Model.Batch_BatchTrust));
newBatchTrust.TrustBatchId = trustBatchId;
newBatchTrust.TrustBatchCode = trustCode;
newBatchTrust.TrustDate = t.First().TrustDate;
newBatchTrust.ProjectId = CurrUser.LoginProjectId;
newBatchTrust.UnitId = t.First().UnitId;
newBatchTrust.InstallationId = t.First().InstallationId;
newBatchTrust.WorkAreaId = t.First().WorkAreaId;
newBatchTrust.WeldingMethodId = t.First().WeldingMethodId;
newBatchTrust.GrooveTypeId = t.First().GrooveTypeId;
newBatchTrust.IsWelderFirst = t.First().IsWelderFirst;
newBatchTrust.DetectionTypeId = t.First().DetectionTypeId;
newBatchTrust.PipelineId = t.First().PipelineId;
newBatchTrust.TopointBatch = t.First().TopointBatch;
BLL.Batch_BatchTrustService.AddBatchTrust(newBatchTrust); // 新增委托单
// 生成委托明细,并回写点口明细信息
foreach (var p in t)
{
Model.Batch_BatchTrustItem trustItem = new Model.Batch_BatchTrustItem
{
TrustBatchItemId = SQLHelper.GetNewID(typeof(Model.Batch_BatchTrustItem)),
TrustBatchId = trustBatchId,
PointBatchItemId = p.AcceptStandard,
WeldJointId = p.QuaCertFile,
//FilmNum = fileNum,
CreateDate = p.TrustDate
};
Batch_BatchTrustItemService.AddBatchTrustItem(trustItem);
var pointItem = BLL.Batch_PointBatchItemService.GetPointBatchItemByPointBatchItemId(p.AcceptStandard);
pointItem.PointDate = p.TrustDate;
pointItem.PointState = "1";
pointItem.IsBuildTrust = true;
pointItem.GLGSAudit = Const.GlyId; // 导入时默认为管理员
pointItem.JLAudit = Const.GlyId;
Funs.DB.SubmitChanges();
}
}
ShowNotify("导入成功!", MessageBoxIcon.Success);
}
else
{
ShowNotify("无记录!", MessageBoxIcon.Warning);
}
}
else
{
ShowNotify("请修正错误数据后再导入!", MessageBoxIcon.Warning);
}
}
else
{
ShowNotify("请先审核要导入的文件!", MessageBoxIcon.Warning);
}
}
#endregion
#region
/// <summary>
/// 导出错误提示
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnOut_Click(object sender, EventArgs e)
{
}
/// <summary>
/// 重载VerifyRenderingInServerForm方法否则运行的时候会出现如下错误提示“类型“GridView”的控件“GridView1”必须放在具有 runat=server 的窗体标记内”
/// </summary>
/// <param name="control"></param>
public override void VerifyRenderingInServerForm(Control control)
{
}
#endregion
#region
/// <summary>
/// 下载模板按钮
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnDownLoad_Click(object sender, EventArgs e)
{
PageContext.RegisterStartupScript(Confirm.GetShowReference("确定下载导入模板吗?", String.Empty, MessageBoxIcon.Question, PageManager1.GetCustomEventReference(false, "Confirm_OK"), PageManager1.GetCustomEventReference("Confirm_Cancel")));
}
/// <summary>
/// 下载导入模板
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void PageManager1_CustomEvent(object sender, CustomEventArgs e)
{
if (e.EventArgument == "Confirm_OK")
{
string rootPath = Server.MapPath("~/");
string uploadfilepath = rootPath + Const.HJGL_TrustInTemplateUrl;
//string filePath = Const.HJGL_TrustInTemplateUrl;
//string fileName = Path.GetFileName(filePath);
FileInfo info = new FileInfo(uploadfilepath);
long fileSize = info.Length;
Response.ClearContent();
Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode("委托单模板.xlsx", System.Text.Encoding.UTF8));
Response.ContentType = "excel/plain";
Response.ContentEncoding = System.Text.Encoding.UTF8;
Response.AddHeader("Content-Length", fileSize.ToString().Trim());
Response.TransmitFile(uploadfilepath, 0, fileSize);
Response.End();
}
}
#endregion
}
}

View File

@ -0,0 +1,116 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.WeldingProcess.TrustManage
{
public partial class TrustBatchIn
{
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// SimpleForm1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form SimpleForm1;
/// <summary>
/// Toolbar2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar2;
/// <summary>
/// btnAudit 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnAudit;
/// <summary>
/// btnImport 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnImport;
/// <summary>
/// btnDownLoad 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnDownLoad;
/// <summary>
/// fuAttachUrl 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.FileUpload fuAttachUrl;
/// <summary>
/// hdFileName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.HiddenField hdFileName;
/// <summary>
/// hdCheckResult 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.HiddenField hdCheckResult;
/// <summary>
/// lbResult 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label lbResult;
}
}

View File

@ -55,42 +55,54 @@
<Toolbars>
<f:Toolbar ID="Toolbar3" Position="Top" runat="server" ToolbarAlign="Right">
<Items>
<f:TextBox ID="txtTrustCode" runat="server" EmptyText="录入要修改的委托单号" Width="200px"
ShowRedStar="true" Required="true">
</f:TextBox>
<f:DropDownList ID="drpNDEUnit" EmptyText="请选择检测单位" runat="server"
ShowRedStar="true" Required="true" EnableEdit="true" Width="210px">
</f:DropDownList>
<f:DatePicker ID="txtTrustDate" EmptyText="修改委托日期" runat="server" DateFormatString="yyyy-MM-dd"
ShowRedStar="true" Required="true" Width="130px" LabelAlign="Right">
</f:DatePicker>
<f:DropDownList ID="drpSurfaceState" runat="server" EmptyText="请选择表面状态" Width="135px">
<f:ListItem Value="打磨" Text="打磨" />
<f:ListItem Value="机加工" Text="机加工" />
<f:ListItem Value="喷砂" Text="喷砂" />
<f:ListItem Value="漆面" Text="漆面" />
</f:DropDownList>
<f:DropDownList ID="drpDetectionTiming" runat="server" EmptyText="请选择检测时机" Width="135px">
<f:ListItem Value="焊后" Text="焊后" />
<f:ListItem Value="打磨后" Text="打磨后" />
<f:ListItem Value="热处理后" Text="热处理后" />
<f:ListItem Value="坡口准备" Text="坡口准备" />
<f:ListItem Value="清根后" Text="清根后" />
<f:ListItem Value="压力试验后" Text="压力试验后" />
<f:ListItem Value="其他" Text="其他" />
</f:DropDownList>
<f:Button ID="btnSave" Text="<%$ Resources:Lan,Save %>" ToolTip="<%$ Resources:Lan,Save %>" Icon="SystemSave" runat="server"
OnClick="btnSave_Click">
</f:Button>
<f:ToolbarFill ID="ToolbarFill1" runat="server">
</f:ToolbarFill>
<f:TextBox ID="txtTrustCode" runat="server" EmptyText="录入要修改的委托单号" Width="200px"
ShowRedStar="true" Required="true"></f:TextBox>
<f:DropDownList ID="drpNDEUnit" EmptyText="请选择检测单位" runat="server"
ShowRedStar="true" Required="true" EnableEdit="true" Width="210px" >
</f:DropDownList>
<f:DatePicker ID="txtTrustDate" EmptyText="修改委托日期" runat="server" DateFormatString="yyyy-MM-dd"
ShowRedStar="true" Required="true" Width="130px" LabelAlign="Right">
</f:DatePicker>
<f:DropDownList ID="drpSurfaceState" runat="server" EmptyText="请选择表面状态" Hidden="true" Width="135px">
<f:ListItem Value="打磨" Text="打磨"/>
<f:ListItem Value="机加工" Text="机加工"/>
<f:ListItem Value="喷砂" Text="喷砂"/>
<f:ListItem Value="漆面" Text="漆面"/>
</f:DropDownList>
<f:DropDownList ID="drpDetectionTiming" runat="server" EmptyText="请选择检测时机" Hidden="true" Width="135px">
<f:ListItem Value="焊后" Text="焊后"/>
<f:ListItem Value="打磨后" Text="打磨后"/>
<f:ListItem Value="热处理后" Text="热处理后"/>
<f:ListItem Value="坡口准备" Text="坡口准备"/>
<f:ListItem Value="清根后" Text="清根后"/>
<f:ListItem Value="压力试验后" Text="压力试验后"/>
<f:ListItem Value="其他" Text="其他"/>
</f:DropDownList>
<f:TextBox ID="txtQuaCertFile" runat="server" EmptyText="请录入质量证明文件编号" Width="180px" Hidden="true"></f:TextBox>
<f:TextBox ID="txtAcceptStandard" runat="server" EmptyText="请录入制造/验收标准" Width="180px" Hidden="true"></f:TextBox>
<f:Button ID="btnSave" Text="<%$ Resources:Lan,Save %>" ToolTip="<%$ Resources:Lan,Save %>" Icon="SystemSave" runat="server"
OnClick="btnSave_Click">
</Items>
</f:Toolbar>
<f:Toolbar Position="Top" runat="server" ToolbarAlign="Right">
<Items>
<f:ToolbarFill ID="ToolbarFill2" runat="server">
</f:ToolbarFill>
<f:Button ID="btnImport" Text="导入" ToolTip="导入" Icon="ApplicationGet" runat="server"
OnClick="btnImport_Click">
</f:Button>
<f:Button ID="btnPrint" Text="<%$ Resources:Lan,Print %>" Icon="Printer" runat="server"
OnClick="btnPrint_Click" Hidden="true">
</f:Button>
<f:Button ID="btnExport" Text="打印" ToolTip="导出" EnableAjax="false" DisableControlBeforePostBack="false" Icon="ApplicationGet" runat="server"
OnClick="btnExport_Click">
</f:Button>
OnClick="btnExport_Click">
</f:Button>
<f:Button ID="btnDelete" Text="<%$ Resources:Lan,Delete %>" Icon="Delete" runat="server"
OnClick="btnDelete_Click">
</f:Button>
@ -213,6 +225,10 @@
EnableMaximize="true" Target="Top" EnableResize="true" runat="server" OnClose="Window1_Close"
IsModal="true" Width="720px" Height="400px">
</f:Window>
<f:Window ID="Window4" Title="委托单导入" Hidden="true" EnableIFrame="true"
EnableMaximize="true" Target="Parent" EnableResize="true" runat="server" IsModal="false" OnClose="Window4_Close"
CloseAction="HidePostBack" Width="1024px" Height="640px">
</f:Window>
<f:Menu ID="Menu1" runat="server">
<f:MenuButton ID="btnMenuCancel" OnClick="btnMenuCancel_Click" EnablePostBack="true"
ConfirmText="确定要取消此焊口的委托吗?" ConfirmTarget="Top" runat="server"

View File

@ -6,6 +6,7 @@ using System.IO;
using System.Linq;
using System.Web;
using BLL;
using Model;
using NPOI.HSSF.Util;
using NPOI.SS.UserModel;
using NPOI.SS.Util;
@ -194,25 +195,8 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
protected void tvControlItem_TreeNodeExpanded(object sender, TreeNodeEventArgs e)
{
txtQuaCertFile.Hidden = true;
txtAcceptStandard.Hidden = true;
drpDetectionTiming.Hidden = true;
drpSurfaceState.Hidden = true;
if (e.Node.ToolTip == "DetectionType")
{
if (e.Node.Text == "PMI")
{
txtQuaCertFile.Hidden = false;
txtAcceptStandard.Hidden = false;
}
else
{
drpDetectionTiming.Hidden = false;
drpSurfaceState.Hidden = false;
}
e.Node.Nodes.Clear();
// 单号
var trusts = from x in Funs.DB.Batch_BatchTrust
@ -268,22 +252,6 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
/// <param name="e"></param>
protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e)
{
txtQuaCertFile.Hidden = true;
txtAcceptStandard.Hidden = true;
drpDetectionTiming.Hidden = true;
drpSurfaceState.Hidden = true;
if (e.Node.ParentNode.Text == "PMI")
{
txtQuaCertFile.Hidden = false;
txtAcceptStandard.Hidden = false;
}
else
{
drpDetectionTiming.Hidden = false;
drpSurfaceState.Hidden = false;
}
Model.View_Batch_BatchTrust trust = BLL.Batch_BatchTrustService.GetBatchTrustViewById(this.tvControlItem.SelectedNodeID);
if (trust != null)
{
@ -319,8 +287,6 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
this.txtDetectionTypeCode.Text = trust.DetectionTypeCode;
drpNDEUnit.SelectedValue = trust.NDEUuit;
txtTrustDate.Text = string.Format("{0:yyyy-MM-dd}", trust.TrustDate);
txtAcceptStandard.Text = trust.AcceptStandard;
txtQuaCertFile.Text = trust.QuaCertFile;
if (!string.IsNullOrEmpty(trust.SurfaceState))
{
drpSurfaceState.SelectedValue = trust.SurfaceState;
@ -480,10 +446,8 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
string trustCode = txtTrustCode.Text.Trim();
string surfaceState = drpSurfaceState.SelectedValue;
string detectionTiming = drpDetectionTiming.SelectedValue;
string quaCertFile = txtQuaCertFile.Text.Trim();
string acceptStandard = txtAcceptStandard.Text.Trim();
DateTime? trustDate= Funs.GetNewDateTime(this.txtTrustDate.Text);
BLL.Batch_BatchTrustService.BatchTrustNDEUnit(trustBatchId, ndtUnit, trustCode, surfaceState, detectionTiming,quaCertFile, acceptStandard, trustDate);
BLL.Batch_BatchTrustService.BatchTrustNDEUnit(trustBatchId, ndtUnit, trustCode, surfaceState, detectionTiming, null, null, trustDate);
txtTrustBatchCode.Text = trustCode;
ShowNotify(Resources.Lan.SaveSuccessfully, MessageBoxIcon.Success);
}
@ -712,6 +676,35 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
}
}
#region
/// <summary>
/// 导入按钮
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnImport_Click(object sender, EventArgs e)
{
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.HJGL_CheckManageMenuId, Const.BtnAdd))
{
PageContext.RegisterStartupScript(Window4.GetShowReference(String.Format("TrustBatchIn.aspx", "导入 - ")));
}
else
{
ShowNotify(Resources.Lan.NoPrivilegePrompt, MessageBoxIcon.Warning);
}
}
/// <summary>
/// 关闭导入弹出窗口
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Window4_Close(object sender, WindowCloseEventArgs e)
{
InitTreeMenu();
}
#endregion
protected void btnExport_Click(object sender, EventArgs e)
{
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.HJGL_BatchTrustMenuId, Const.BtnOut))

View File

@ -7,11 +7,13 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.WeldingProcess.TrustManage {
public partial class TrustBatchManage {
namespace FineUIPro.Web.WeldingProcess.TrustManage
{
public partial class TrustBatchManage
{
/// <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>
/// txtTrustDateMonth 控件。
/// </summary>
@ -65,7 +67,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtTrustDateMonth;
/// <summary>
/// Toolbar6 控件。
/// </summary>
@ -74,7 +76,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar6;
/// <summary>
/// txtPipeCode 控件。
/// </summary>
@ -83,7 +85,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtPipeCode;
/// <summary>
/// Toolbar5 控件。
/// </summary>
@ -92,7 +94,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar5;
/// <summary>
/// txtSearchCode 控件。
/// </summary>
@ -101,7 +103,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtSearchCode;
/// <summary>
/// tvControlItem 控件。
/// </summary>
@ -110,7 +112,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Tree tvControlItem;
/// <summary>
/// panelCenterRegion 控件。
/// </summary>
@ -119,7 +121,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelCenterRegion;
/// <summary>
/// Toolbar3 控件。
/// </summary>
@ -128,16 +130,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar3;
/// <summary>
/// ToolbarFill1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarFill ToolbarFill1;
/// <summary>
/// txtTrustCode 控件。
/// </summary>
@ -146,7 +139,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtTrustCode;
/// <summary>
/// drpNDEUnit 控件。
/// </summary>
@ -155,7 +148,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpNDEUnit;
/// <summary>
/// txtTrustDate 控件。
/// </summary>
@ -164,7 +157,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtTrustDate;
/// <summary>
/// drpSurfaceState 控件。
/// </summary>
@ -173,7 +166,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpSurfaceState;
/// <summary>
/// drpDetectionTiming 控件。
/// </summary>
@ -182,25 +175,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpDetectionTiming;
/// <summary>
/// txtQuaCertFile 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtQuaCertFile;
/// <summary>
/// txtAcceptStandard 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtAcceptStandard;
/// <summary>
/// btnSave 控件。
/// </summary>
@ -209,7 +184,34 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSave;
/// <summary>
/// ToolbarFill1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarFill ToolbarFill1;
/// <summary>
/// ToolbarFill2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarFill ToolbarFill2;
/// <summary>
/// btnImport 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnImport;
/// <summary>
/// btnPrint 控件。
/// </summary>
@ -218,7 +220,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnPrint;
/// <summary>
/// btnExport 控件。
/// </summary>
@ -227,7 +229,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnExport;
/// <summary>
/// btnDelete 控件。
/// </summary>
@ -236,7 +238,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnDelete;
/// <summary>
/// SimpleForm1 控件。
/// </summary>
@ -245,7 +247,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form SimpleForm1;
/// <summary>
/// lbTrustUnit 控件。
/// </summary>
@ -254,7 +256,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label lbTrustUnit;
/// <summary>
/// txtTrustBatchCode 控件。
/// </summary>
@ -263,7 +265,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label txtTrustBatchCode;
/// <summary>
/// txtDetectionTypeCode 控件。
/// </summary>
@ -272,7 +274,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label txtDetectionTypeCode;
/// <summary>
/// txtname 控件。
/// </summary>
@ -281,7 +283,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label txtname;
/// <summary>
/// txtTestStandard 控件。
/// </summary>
@ -290,7 +292,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label txtTestStandard;
/// <summary>
/// txtTestRate 控件。
/// </summary>
@ -299,7 +301,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label txtTestRate;
/// <summary>
/// txtTechLevel 控件。
/// </summary>
@ -308,7 +310,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label txtTechLevel;
/// <summary>
/// txtWeldMothed 控件。
/// </summary>
@ -317,7 +319,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label txtWeldMothed;
/// <summary>
/// txtGrooveType 控件。
/// </summary>
@ -326,7 +328,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label txtGrooveType;
/// <summary>
/// txtPipClass 控件。
/// </summary>
@ -335,7 +337,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label txtPipClass;
/// <summary>
/// Grid1 控件。
/// </summary>
@ -344,7 +346,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// ToolbarSeparator1 控件。
/// </summary>
@ -353,7 +355,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
/// <summary>
/// ToolbarText1 控件。
/// </summary>
@ -362,7 +364,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarText ToolbarText1;
/// <summary>
/// ddlPageSize 控件。
/// </summary>
@ -371,7 +373,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlPageSize;
/// <summary>
/// Window1 控件。
/// </summary>
@ -380,7 +382,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window1;
/// <summary>
/// Window2 控件。
/// </summary>
@ -389,7 +391,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window2;
/// <summary>
/// Window3 控件。
/// </summary>
@ -398,7 +400,16 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window3;
/// <summary>
/// Window4 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window4;
/// <summary>
/// Menu1 控件。
/// </summary>
@ -407,7 +418,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Menu Menu1;
/// <summary>
/// btnMenuCancel 控件。
/// </summary>
@ -416,7 +427,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuCancel;
/// <summary>
/// btnMenuReTrust 控件。
/// </summary>
@ -425,7 +436,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuReTrust;
/// <summary>
/// btnMenuRtReplace 控件。
/// </summary>

View File

@ -593,7 +593,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
{
var pipeline = from x in Funs.DB.Pipeline_Pipeline
where x.ProjectId == this.CurrUser.LoginProjectId
&& x.InstallationId == insId && x.PipelineCode == ds.Tables[0].Rows[i]["管线号"].ToString()
&& x.InstallationId == insId && x.WorkAreaId==areaId && x.PipelineCode == ds.Tables[0].Rows[i]["管线号"].ToString()
select x;
if (pipeline.Count() > 0)

View File

@ -1161,6 +1161,14 @@ namespace Model
}
}
public System.Data.Linq.Table<View_TrustBathcIn> View_TrustBathcIn
{
get
{
return this.GetTable<View_TrustBathcIn>();
}
}
public System.Data.Linq.Table<View_WelderPerformance> View_WelderPerformance
{
get
@ -25380,6 +25388,12 @@ namespace Model
private string _PT_DataType;
private string _WorkAreaId;
private System.Nullable<bool> _IsAll;
private string _WeldJonintCode;
private EntityRef<Pipeline_Pipeline> _Pipeline_Pipeline;
private EntityRef<PTP_TestPackage> _PTP_TestPackage;
@ -25396,6 +25410,12 @@ namespace Model
partial void OnPipelineIdChanged();
partial void OnPT_DataTypeChanging(string value);
partial void OnPT_DataTypeChanged();
partial void OnWorkAreaIdChanging(string value);
partial void OnWorkAreaIdChanged();
partial void OnIsAllChanging(System.Nullable<bool> value);
partial void OnIsAllChanged();
partial void OnWeldJonintCodeChanging(string value);
partial void OnWeldJonintCodeChanged();
#endregion
public PTP_PipelineList()
@ -25493,6 +25513,66 @@ 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.OnWorkAreaIdChanging(value);
this.SendPropertyChanging();
this._WorkAreaId = value;
this.SendPropertyChanged("WorkAreaId");
this.OnWorkAreaIdChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Name="isAll", Storage="_IsAll", DbType="Bit")]
public System.Nullable<bool> IsAll
{
get
{
return this._IsAll;
}
set
{
if ((this._IsAll != value))
{
this.OnIsAllChanging(value);
this.SendPropertyChanging();
this._IsAll = value;
this.SendPropertyChanged("IsAll");
this.OnIsAllChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WeldJonintCode", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)]
public string WeldJonintCode
{
get
{
return this._WeldJonintCode;
}
set
{
if ((this._WeldJonintCode != value))
{
this.OnWeldJonintCodeChanging(value);
this.SendPropertyChanging();
this._WeldJonintCode = value;
this.SendPropertyChanged("WeldJonintCode");
this.OnWeldJonintCodeChanged();
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_PTP_IsoList_PTP_IsoList", Storage="_Pipeline_Pipeline", ThisKey="PipelineId", OtherKey="PipelineId", IsForeignKey=true)]
public Pipeline_Pipeline Pipeline_Pipeline
{
@ -43014,6 +43094,285 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_TrustBathcIn")]
public partial class View_TrustBathcIn
{
private string _PointBatchItemId;
private string _PointBatchId;
private string _ProjectId;
private string _InstallationId;
private string _InstallationCode;
private string _WorkAreaId;
private string _WorkAreaCode;
private string _PipelineId;
private string _PipelineCode;
private string _WeldJointId;
private string _WeldJointCode;
private string _DetectionTypeId;
private string _DetectionTypeCode;
private System.Nullable<bool> _IsWelderFirst;
private string _TrustBatchItemId;
public View_TrustBathcIn()
{
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PointBatchItemId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
public string PointBatchItemId
{
get
{
return this._PointBatchItemId;
}
set
{
if ((this._PointBatchItemId != value))
{
this._PointBatchItemId = value;
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PointBatchId", DbType="NVarChar(50)")]
public string PointBatchId
{
get
{
return this._PointBatchId;
}
set
{
if ((this._PointBatchId != value))
{
this._PointBatchId = value;
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")]
public string ProjectId
{
get
{
return this._ProjectId;
}
set
{
if ((this._ProjectId != value))
{
this._ProjectId = value;
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InstallationId", DbType="NVarChar(50)")]
public string InstallationId
{
get
{
return this._InstallationId;
}
set
{
if ((this._InstallationId != value))
{
this._InstallationId = value;
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InstallationCode", DbType="NVarChar(50)")]
public string InstallationCode
{
get
{
return this._InstallationCode;
}
set
{
if ((this._InstallationCode != value))
{
this._InstallationCode = value;
}
}
}
[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="_WorkAreaCode", DbType="NVarChar(20)")]
public string WorkAreaCode
{
get
{
return this._WorkAreaCode;
}
set
{
if ((this._WorkAreaCode != value))
{
this._WorkAreaCode = value;
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PipelineId", DbType="NVarChar(50)")]
public string PipelineId
{
get
{
return this._PipelineId;
}
set
{
if ((this._PipelineId != value))
{
this._PipelineId = value;
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PipelineCode", DbType="NVarChar(100)")]
public string PipelineCode
{
get
{
return this._PipelineCode;
}
set
{
if ((this._PipelineCode != value))
{
this._PipelineCode = value;
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WeldJointId", DbType="NVarChar(50)")]
public string WeldJointId
{
get
{
return this._WeldJointId;
}
set
{
if ((this._WeldJointId != value))
{
this._WeldJointId = value;
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WeldJointCode", DbType="NVarChar(50)")]
public string WeldJointCode
{
get
{
return this._WeldJointCode;
}
set
{
if ((this._WeldJointCode != value))
{
this._WeldJointCode = value;
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DetectionTypeId", DbType="NVarChar(50)")]
public string DetectionTypeId
{
get
{
return this._DetectionTypeId;
}
set
{
if ((this._DetectionTypeId != value))
{
this._DetectionTypeId = value;
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DetectionTypeCode", DbType="NVarChar(50)")]
public string DetectionTypeCode
{
get
{
return this._DetectionTypeCode;
}
set
{
if ((this._DetectionTypeCode != value))
{
this._DetectionTypeCode = value;
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsWelderFirst", DbType="Bit")]
public System.Nullable<bool> IsWelderFirst
{
get
{
return this._IsWelderFirst;
}
set
{
if ((this._IsWelderFirst != value))
{
this._IsWelderFirst = value;
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TrustBatchItemId", DbType="NVarChar(50)")]
public string TrustBatchItemId
{
get
{
return this._TrustBatchItemId;
}
set
{
if ((this._TrustBatchItemId != value))
{
this._TrustBatchItemId = value;
}
}
}
}
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_WelderPerformance")]
public partial class View_WelderPerformance
{

View File

@ -8,7 +8,7 @@
<IISExpressWindowsAuthentication />
<IISExpressUseClassicPipelineMode />
<UseGlobalApplicationHostFile />
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
<NameOfLastUsedPublishProfile>FolderProfile</NameOfLastUsedPublishProfile>
</PropertyGroup>
<ProjectExtensions>

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 '%邮件%'