From 89af71fd6860d66b2c3dcd6db5957e480a8ab6d6 Mon Sep 17 00:00:00 2001 From: gaofei1985 <181547018@qq.com> Date: Tue, 21 Nov 2023 16:14:43 +0800 Subject: [PATCH 01/26] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BLL/CQMS/WBS/WorkPackageProjectService.cs | 2 +- SGGL/BLL/Common/Const.cs | 4 + .../CQMS/WBS/WorkPackageSet2.aspx | 1 + .../CQMS/WBS/WorkPackageSet2.aspx.cs | 16 +- .../CQMS/WBS/WorkPackageSet2.aspx.designer.cs | 9 + .../CQMS/WBS/WorkPackageSet2In2.aspx | 80 +++ .../CQMS/WBS/WorkPackageSet2In2.aspx.cs | 534 ++++++++++++++++++ .../WBS/WorkPackageSet2In2.aspx.designer.cs | 141 +++++ .../Excel/DataIn/WBS定制导入模板(电仪).xls | Bin 0 -> 19456 bytes .../File/Excel/DataIn/材料信息导入模板.xls | Bin 26112 -> 26112 bytes SGGL/FineUIPro.Web/FineUIPro.Web.csproj | 8 + 11 files changed, 792 insertions(+), 3 deletions(-) create mode 100644 SGGL/FineUIPro.Web/CQMS/WBS/WorkPackageSet2In2.aspx create mode 100644 SGGL/FineUIPro.Web/CQMS/WBS/WorkPackageSet2In2.aspx.cs create mode 100644 SGGL/FineUIPro.Web/CQMS/WBS/WorkPackageSet2In2.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/File/Excel/DataIn/WBS定制导入模板(电仪).xls diff --git a/SGGL/BLL/CQMS/WBS/WorkPackageProjectService.cs b/SGGL/BLL/CQMS/WBS/WorkPackageProjectService.cs index 9c252348..2a63d1db 100644 --- a/SGGL/BLL/CQMS/WBS/WorkPackageProjectService.cs +++ b/SGGL/BLL/CQMS/WBS/WorkPackageProjectService.cs @@ -32,7 +32,7 @@ namespace BLL public static void UpdateWorkPackageProject(Model.WBS_WorkPackageProject workPack) { Model.SGGLDB db = Funs.DB; - Model.WBS_WorkPackageProject newPack = db.WBS_WorkPackageProject.First(e => e.WorkPackageCode == workPack.WorkPackageCode); + Model.WBS_WorkPackageProject newPack = db.WBS_WorkPackageProject.First(e => e.WorkPackageCode == workPack.WorkPackageCode && e.ProjectId == workPack.ProjectId); newPack.WorkPackageCode = workPack.WorkPackageCode; newPack.IsChild = workPack.IsChild; newPack.PackageContent = workPack.PackageContent; diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs index 59aced14..3a88432f 100644 --- a/SGGL/BLL/Common/Const.cs +++ b/SGGL/BLL/Common/Const.cs @@ -3338,6 +3338,10 @@ namespace BLL /// public const string WBSWorkPackageTemplateUrl = "File\\Excel\\DataIn\\WBS定制导入模板.xls"; /// + /// WBS定制导入模板 + /// + public const string WBSWorkPackageTemplate2Url = "File\\Excel\\DataIn\\WBS定制导入模板(电仪).xls"; + /// /// WBS编码规则 /// public const string WBSCodeTemplateUrl = "File\\Excel\\DataIn\\WBS编码规则.xlsx"; diff --git a/SGGL/FineUIPro.Web/CQMS/WBS/WorkPackageSet2.aspx b/SGGL/FineUIPro.Web/CQMS/WBS/WorkPackageSet2.aspx index 9a9ee096..efe46b98 100644 --- a/SGGL/FineUIPro.Web/CQMS/WBS/WorkPackageSet2.aspx +++ b/SGGL/FineUIPro.Web/CQMS/WBS/WorkPackageSet2.aspx @@ -41,6 +41,7 @@ + diff --git a/SGGL/FineUIPro.Web/CQMS/WBS/WorkPackageSet2.aspx.cs b/SGGL/FineUIPro.Web/CQMS/WBS/WorkPackageSet2.aspx.cs index f47e26b6..36bb2281 100644 --- a/SGGL/FineUIPro.Web/CQMS/WBS/WorkPackageSet2.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/WBS/WorkPackageSet2.aspx.cs @@ -139,10 +139,15 @@ namespace FineUIPro.Web.CQMS.WBS } } } - var equipment = workPackages.FirstOrDefault(x => x.PackageContent == "机泵" || x.PackageContent == "静止设备"); + this.hdType.Text = string.Empty; + var equipment = workPackages.FirstOrDefault(x => x.PackageContent == "机泵" || x.PackageContent == "静止设备" || x.PackageContent == "桥架" || x.PackageContent == "仪表回路"); if (equipment != null) { this.btnImport.Hidden = false; + if (equipment.PackageContent == "桥架" || equipment.PackageContent == "仪表回路") + { + this.hdType.Text = "DY"; //电仪 + } } else { @@ -810,7 +815,14 @@ namespace FineUIPro.Web.CQMS.WBS protected void btnImport_Click(object sender, EventArgs e) { SaveData(); - PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("WorkPackageSet2In.aspx?WorkPackageId={0}", WorkPackageId, "导入 - "))); + if (string.IsNullOrEmpty(this.hdType.Text.Trim())) + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("WorkPackageSet2In.aspx?WorkPackageId={0}", WorkPackageId, "导入 - "))); + } + else + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("WorkPackageSet2In2.aspx?WorkPackageId={0}", WorkPackageId, "导入 - "))); + } } protected void Window1_Close(object sender, WindowCloseEventArgs e) diff --git a/SGGL/FineUIPro.Web/CQMS/WBS/WorkPackageSet2.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/WBS/WorkPackageSet2.aspx.designer.cs index ad7e5a05..6a26e72e 100644 --- a/SGGL/FineUIPro.Web/CQMS/WBS/WorkPackageSet2.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/WBS/WorkPackageSet2.aspx.designer.cs @@ -138,6 +138,15 @@ namespace FineUIPro.Web.CQMS.WBS { /// protected global::FineUIPro.HiddenField hdTotalValue; + /// + /// hdType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdType; + /// /// cbSelect 控件。 /// diff --git a/SGGL/FineUIPro.Web/CQMS/WBS/WorkPackageSet2In2.aspx b/SGGL/FineUIPro.Web/CQMS/WBS/WorkPackageSet2In2.aspx new file mode 100644 index 00000000..b62cafac --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/WBS/WorkPackageSet2In2.aspx @@ -0,0 +1,80 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WorkPackageSet2In2.aspx.cs" Inherits="FineUIPro.Web.CQMS.WBS.WorkPackageSet2In2" %> + + + + + + 导入 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/CQMS/WBS/WorkPackageSet2In2.aspx.cs b/SGGL/FineUIPro.Web/CQMS/WBS/WorkPackageSet2In2.aspx.cs new file mode 100644 index 00000000..7ad65f67 --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/WBS/WorkPackageSet2In2.aspx.cs @@ -0,0 +1,534 @@ +using BLL; +using Newtonsoft.Json.Linq; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.OleDb; +using System.IO; +using System.Linq; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.CQMS.WBS +{ + public partial class WorkPackageSet2In2 : PageBase + { + #region 定义变量 + /// + /// 上传预设的虚拟路径 + /// + private string initPath = Const.ExcelUrl; + + /// + /// 导入集合 + /// + private List ViewWorkPackages = new List(); + + /// + /// 错误集合 + /// + public static string errorInfos = string.Empty; + /// + /// 主键 + /// + public string WorkPackageId + { + get + { + return (string)ViewState["WorkPackageId"]; + } + set + { + ViewState["WorkPackageId"] = value; + } + } + /// + /// 单位工程 + /// + public string UnitWorkId + { + get + { + return (string)ViewState["UnitWorkId"]; + } + set + { + ViewState["UnitWorkId"] = value; + } + } + #endregion + + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.hdFileName.Text = string.Empty; + this.hdCheckResult.Text = string.Empty; + if (ViewWorkPackages != null) + { + ViewWorkPackages.Clear(); + } + errorInfos = string.Empty; + WorkPackageId = Request.Params["WorkPackageId"]; + var workPackage = BLL.WorkPackageService.GetWorkPackageByWorkPackageId(WorkPackageId); + if (workPackage != null) + { + UnitWorkId = workPackage.UnitWorkId; + } + + } + } + #endregion + + #region 数据导入 + /// + /// 数据导入 + /// + /// + /// + protected void btnAudit_Click(object sender, EventArgs e) + { + try + { + if (this.fuAttachUrl.HasFile == false) + { + Alert.ShowInTop("请您选择Excel文件!", MessageBoxIcon.Warning); + return; + } + string IsXls = Path.GetExtension(this.fuAttachUrl.FileName).ToString().Trim().ToLower(); + if (IsXls != ".xls") + { + Alert.ShowInTop("只可以选择Excel文件!", MessageBoxIcon.Warning); + return; + } + if (ViewWorkPackages != null) + { + ViewWorkPackages.Clear(); + } + if (!string.IsNullOrEmpty(errorInfos)) + { + errorInfos = string.Empty; + } + 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); + ImportXlsToData(rootPath + initPath + this.hdFileName.Text); + } + catch (Exception ex) + { + ShowNotify("'" + ex.Message + "'", MessageBoxIcon.Warning); + } + } + + #region 读Excel提取数据 + /// + /// 从Excel提取数据--》Dataset + /// + /// Excel文件路径名 + private void ImportXlsToData(string fileName) + { + try + { + ViewWorkPackages.Clear(); + string oleDBConnString = String.Empty; + oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;"; + oleDBConnString += "Data Source="; + oleDBConnString += fileName; + oleDBConnString += ";Extended Properties=Excel 8.0;"; + OleDbConnection oleDBConn = null; + OleDbDataAdapter oleAdMaster = null; + DataTable m_tableName = new DataTable(); + DataSet ds = new DataSet(); + + oleDBConn = new OleDbConnection(oleDBConnString); + oleDBConn.Open(); + m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null); + + if (m_tableName != null && m_tableName.Rows.Count > 0) + { + m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim(); + } + string sqlMaster; + sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; + oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn); + oleAdMaster.Fill(ds, "m_tableName"); + oleAdMaster.Dispose(); + oleDBConn.Close(); + oleDBConn.Dispose(); + + AddDatasetToSQL(ds.Tables[0]); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 将Dataset的数据导入数据库 + /// + /// 将Dataset的数据导入数据库 + /// + /// 数据集 + /// 数据集行数 + /// + private bool AddDatasetToSQL(DataTable pds) + { + + string results = string.Empty; + int ir = pds.Rows.Count; + if (pds != null && ir > 0) + { + Model.WBS_WorkPackage workPackage = BLL.WorkPackageService.GetWorkPackageByWorkPackageId(WorkPackageId); + var workPackageProjects = BLL.WorkPackageProjectService.GetWorkPackageProjects2ByWorkPackageCode(workPackage.InitWorkPackageCode, this.CurrUser.LoginProjectId); + if (workPackage != null) + { + for (int i = 0; i < ir; i++) + { + string result = string.Empty; + string col0 = pds.Rows[i][0].ToString().Trim(); + string col1 = pds.Rows[i][1].ToString().Trim(); + if (!string.IsNullOrEmpty(col0)) + { + if (string.IsNullOrEmpty(col0)) + { + result += "第" + (i + 2).ToString() + "行," + "导入项" + "," + "第二级为必填项!" + "|"; + } + else + { + if (BLL.WorkPackageService.GetWorkPackageByPackageContent(col0 + "-" + col1, UnitWorkId) == null) //数据库中不存在同样位号记录 + { + Model.WBS_WorkPackage newWorkPackage = new Model.WBS_WorkPackage + { + WorkPackageId = SQLHelper.GetNewID(typeof(Model.WBS_WorkPackage)), + + + }; + if (!string.IsNullOrEmpty(col1)) + { + newWorkPackage.SuperWorkPack = col1; + } + foreach (var item in workPackageProjects) + { + if (col0 == item.PackageContent) + { + newWorkPackage.PackageContent = col0; + newWorkPackage.WorkPackageCode = item.WorkPackageCode; + } + + } + if (string.IsNullOrEmpty(newWorkPackage.PackageContent)) + { + result += "第" + (i + 2).ToString() + "行," + "定制输入值有误!" + "|"; + } + + ViewWorkPackages.Add(newWorkPackage); + } + if (!string.IsNullOrEmpty(result)) + { + results += result; + } + } + } + } + if (!string.IsNullOrEmpty(results)) + { + results = "数据导入失败,未成功数据:" + results.Substring(0, results.LastIndexOf("|")); + errorInfos = results; + Alert.ShowInParent(results, MessageBoxIcon.Warning); + } + else + { + ViewWorkPackages = ViewWorkPackages.Distinct().ToList(); + this.Grid1.Hidden = false; + this.Grid1.DataSource = ViewWorkPackages; + this.Grid1.DataBind(); + errorInfos = string.Empty; + ShowNotify("导入成功!", MessageBoxIcon.Success); + } + } + } + else + { + Alert.ShowInTop("导入数据为空!", MessageBoxIcon.Warning); + } + + BLL.UploadFileService.DeleteFile(Funs.RootPath, initPath + this.hdFileName.Text); + return true; + } + #endregion + #endregion + + #region 下载模板 + /// + /// 下载模板按钮 + /// + /// + /// + 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"))); + } + + /// + /// 下载导入模板 + /// + /// + /// + protected void PageManager1_CustomEvent(object sender, CustomEventArgs e) + { + if (e.EventArgument == "Confirm_OK") + { + string rootPath = Server.MapPath("~/"); + string filePath = Const.WBSWorkPackageTemplate2Url; + string uploadfilepath = rootPath + filePath; + 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(fileName, 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 + /// + /// 保存数据 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + try + { + if (this.fuAttachUrl.HasFile == false) + { + Alert.ShowInTop("请您选择Excel文件!", MessageBoxIcon.Warning); + return; + } + string IsXls = Path.GetExtension(this.fuAttachUrl.FileName).ToString().Trim().ToLower(); + if (IsXls != ".xls") + { + Alert.ShowInTop("只可以选择Excel文件!", MessageBoxIcon.Warning); + return; + } + if (ViewWorkPackages != null) + { + ViewWorkPackages.Clear(); + } + if (!string.IsNullOrEmpty(errorInfos)) + { + errorInfos = string.Empty; + } + 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); + + ViewWorkPackages.Clear(); + string oleDBConnString = String.Empty; + oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;"; + oleDBConnString += "Data Source="; + oleDBConnString += rootPath + initPath + this.hdFileName.Text; + oleDBConnString += ";Extended Properties=Excel 8.0;"; + OleDbConnection oleDBConn = null; + OleDbDataAdapter oleAdMaster = null; + DataTable m_tableName = new DataTable(); + DataSet ds = new DataSet(); + + oleDBConn = new OleDbConnection(oleDBConnString); + oleDBConn.Open(); + m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null); + + if (m_tableName != null && m_tableName.Rows.Count > 0) + { + m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim(); + } + string sqlMaster; + sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; + oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn); + oleAdMaster.Fill(ds, "m_tableName"); + oleAdMaster.Dispose(); + oleDBConn.Close(); + oleDBConn.Dispose(); + + DataTable pds = ds.Tables[0]; + string results = string.Empty; + int ir = pds.Rows.Count; + if (pds != null && ir > 0) + { + Model.WBS_WorkPackage workPackage = BLL.WorkPackageService.GetWorkPackageByWorkPackageId(WorkPackageId); + var workPackageProjects = BLL.WorkPackageProjectService.GetWorkPackageProjects2ByWorkPackageCode(workPackage.InitWorkPackageCode, this.CurrUser.LoginProjectId); + if (workPackage != null) + { + for (int i = 0; i < ir; i++) + { + string result = string.Empty; + string col0 = pds.Rows[i][0].ToString().Trim(); + string col1 = pds.Rows[i][1].ToString().Trim(); + if (!string.IsNullOrEmpty(col0)) + { + if (string.IsNullOrEmpty(col0)) + { + result += "第" + (i + 2).ToString() + "行," + "导入项" + "," + "第二级为必填项!" + "|"; + } + else + { + if (BLL.WorkPackageService.GetWorkPackageByPackageContent(col0 + "-" + col1, UnitWorkId) == null) //数据库中不存在同样位号记录 + { + Model.WBS_WorkPackage newWorkPackage = new Model.WBS_WorkPackage + { + WorkPackageId = SQLHelper.GetNewID(typeof(Model.WBS_WorkPackage)), + + + }; + if (!string.IsNullOrEmpty(col1)) + { + newWorkPackage.SuperWorkPack = col1; + } + foreach (var item in workPackageProjects) + { + if (col0 == item.PackageContent) + { + newWorkPackage.PackageContent = col0; + newWorkPackage.WorkPackageCode = item.WorkPackageCode; + } + + } + if (string.IsNullOrEmpty(newWorkPackage.PackageContent)) + { + result += "第" + (i + 2).ToString() + "行," + "定制输入值有误!" + "|"; + } + + ViewWorkPackages.Add(newWorkPackage); + if (!string.IsNullOrEmpty(result)) + { + results += result; + } + } + } + } + } + if (!string.IsNullOrEmpty(results)) + { + results = "数据导入失败,未成功数据:" + results.Substring(0, results.LastIndexOf("|")); + errorInfos = results; + Alert.ShowInParent(results, MessageBoxIcon.Warning); + return; + } + else + { + ViewWorkPackages = ViewWorkPackages.Distinct().ToList(); + this.Grid1.Hidden = false; + this.Grid1.DataSource = ViewWorkPackages; + this.Grid1.DataBind(); + errorInfos = string.Empty; + } + } + } + else + { + Alert.ShowInTop("导入数据为空!", MessageBoxIcon.Warning); + } + BLL.UploadFileService.DeleteFile(Funs.RootPath, initPath + this.hdFileName.Text); + } + catch (Exception ex) + { + ShowNotify("'" + ex.Message + "'", MessageBoxIcon.Warning); + return; + } + string workPackageCode = string.Empty; + int num = 1; + string code = string.Empty; + Model.WBS_WorkPackage parentWorkPackage = BLL.WorkPackageService.GetWorkPackageByWorkPackageId(WorkPackageId); + foreach (JObject mergedRow in Grid1.GetMergedData()) + { + JObject values = mergedRow.Value("values"); + int i = mergedRow.Value("index"); + string workPackageId = this.Grid1.Rows[i].DataKeys[0].ToString(); + Model.WBS_WorkPackage oldWorkPackage = BLL.WorkPackageService.GetWorkPackageByWorkPackageId(workPackageId); + string workPackageCode2 = this.Grid1.Rows[i].DataKeys[1].ToString(); + string txtName = values.Value("SuperWorkPack"); + Model.WBS_WorkPackageProject workPackageProject = BLL.WorkPackageProjectService.GetWorkPackageProjectByWorkPackageCode(workPackageCode2, this.CurrUser.LoginProjectId); + if (oldWorkPackage == null) //新增内容 + { + if (BLL.WorkPackageService.GetWorkPackageByPackageContent(workPackageProject.PackageContent + "-" + txtName, UnitWorkId) == null) //数据库中不存在同样位号记录 + { + Model.WBS_WorkPackage newWorkPackage = new Model.WBS_WorkPackage(); + if (workPackageCode != workPackageProject.WorkPackageCode) //循环至新的分部 + { + workPackageCode = workPackageProject.WorkPackageCode; + var oldWorkPackages = BLL.WorkPackageService.GetWorkPackagesByInitWorkPackageCodeAndUnitWorkId(workPackageCode, UnitWorkId); + if (oldWorkPackages.Count > 0) //该工作包已存在内容 + { + var old = oldWorkPackages.First(); + string oldStr = old.WorkPackageCode.Substring(old.WorkPackageCode.Length - 2); + num = Convert.ToInt32(oldStr) + 1; + if (num < 10) + { + code = "0" + num.ToString(); + } + else + { + code = num.ToString(); + } + } + else + { + num = 1; + code = "01"; + } + } + else + { + if (num < 10) + { + code = "0" + num.ToString(); + } + else + { + code = num.ToString(); + } + } + newWorkPackage.WorkPackageId = SQLHelper.GetNewID(typeof(Model.WBS_WorkPackage)); + newWorkPackage.WorkPackageCode = parentWorkPackage.WorkPackageCode + workPackageCode.Substring(workPackageCode.IndexOf(parentWorkPackage.InitWorkPackageCode) + parentWorkPackage.InitWorkPackageCode.Length).Replace("00", "0000") + code; + newWorkPackage.ProjectId = this.CurrUser.LoginProjectId; + newWorkPackage.UnitWorkId = UnitWorkId; + newWorkPackage.PackageContent = workPackageProject.PackageContent + "-" + txtName; + newWorkPackage.SuperWorkPack = workPackageProject.SuperWorkPack; + newWorkPackage.SuperWorkPackageId = WorkPackageId; + newWorkPackage.PackageCode = workPackageProject.PackageCode; + newWorkPackage.ProjectType = workPackageProject.ProjectType; + newWorkPackage.InitWorkPackageCode = workPackageProject.WorkPackageCode; + newWorkPackage.IsApprove = true; + BLL.WorkPackageService.AddWorkPackage(newWorkPackage); + num++; + } + } + } + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + ShowNotify("保存成功!", MessageBoxIcon.Success); + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/WBS/WorkPackageSet2In2.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/WBS/WorkPackageSet2In2.aspx.designer.cs new file mode 100644 index 00000000..3a347250 --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/WBS/WorkPackageSet2In2.aspx.designer.cs @@ -0,0 +1,141 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.CQMS.WBS { + + + public partial class WorkPackageSet2In2 { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// btnAudit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAudit; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnDownLoad 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnDownLoad; + + /// + /// fuAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FileUpload fuAttachUrl; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// txtName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtName; + + /// + /// hdFileName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdFileName; + + /// + /// hdCheckResult 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdCheckResult; + + /// + /// hdTotalValue 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdTotalValue; + + /// + /// lblBottom 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lblBottom; + } +} diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/WBS定制导入模板(电仪).xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/WBS定制导入模板(电仪).xls new file mode 100644 index 0000000000000000000000000000000000000000..b3adbf10ed901434ee3a0e8e2e6810e01e5bc8cd GIT binary patch literal 19456 zcmeHP30M@z^6y=iWl<53LlltZ5CORl@dOl&8bK5lC7_712#TVJ!~-IVM57o{yhDr^ zc;E3v<1G@=prQm%@V>7osEO>qYG!Adot@o>@4fGRFaPiLemyf?-TkZT>gwuaXSeJ( zQI2p~G7POeYHEV=-mF;c;Z5FtEZx=t>a(?mkx@qgiOq=8Q$tG%KRMR0e3 zh<&aHQ36pPVk3x+AvS?%0I?}VLx^Ak#28{Th$awCA(}xnhu9pV1;iE*TSByiXa&(4 zVk?L?5Ty`pA=*Ji8)D+$NPT~MQNu|xd{Ut=dXRB&Pa#vFHyR$yiLP?Yqd$;J@Jh%r z>Po)An|0@P1^unA2{NaSK7@B2pk?aP1qK866f%a4pyU`s6F=kHj0gn?#dJhNs$%)> zo#>K1$UtcMWN3MJ5)0SZh5)e2m;!$Rq_IsX11n4GV>en&puGWP5*Z7hSW5T3p%>yQ zoggKZB*ODJEl5tlANk_gZ76>n&!q}XlpRGu`4Izk!yW%PF4^NB(|qF}={WxJ{=e|| z(15l!sYxRKX+guR~ENInZ!1 zDDGA8h;-)8r9-xAJvvR{VO|xT#z(pw|GmzJrZab@o?2QVCnGO&XUa2orXF)==>Ii$ zg&yk^cA&i5P`4IIWVtx=r z^jWi!f?J;?zEQ#VrR#sbwkZ`N>H>9x>ogqyM663T*__ua z$rKPVD5V;-v{Q7P($yU(6HUewm=kFANdGgT8zn=m0QGPT8rB7#1kn3JXhjQ3GMM=x z&xE?}pvoPlu3ab_AY{bgQit|X0`)RP7(|tuPhIV(Yg4!i$bPEMHHzW|E7(_1UOqh+ zRY|^uxpiLDfH0)rfV71C>-1N^Q$GDLimrmMiSN%)?jOptTUE{gMotdhR0Ca~mo9=a zgzXiOZ&h$apbb8{fV3xycBz!d{ewbpEP4X0n)u5L!EV*dyJ{#e(m=lfatHFtBOtyS z==!{L0_D}^L41jZ^2WU73F*wCw-Q;vdJ9IQU4fmwtG&HvCwPczTGAZHX6) zDN|O-x1PYM*%E9ER;bYqbR(TRMLQ{;qn%rcY(U?zSFO*bl%-Nc3L1y4tfC0=VPQZL zVOj%-lv73(i7Hq{?UxC8Cx^nya7>DHoQ>Ye!85;QGXA}EMCHT(|4bKPrzitQpXg>W zh-_5#ucW(apu1?GyKA6ZYM^^)pu1|ITWg><)Ft?!Uz`cba`9>vFIQkO~;ch z1zie{u#n==IpY!6zpDD7?F3h!6rEEZPs3Ep)Aj>?p5YryNPtpKF*r-U_KLw{^U-nl zP2n##HeS|vSz{tHr}Ty^J(?aLf7Irv4H5ZMbUeM|lM`2vd~{qeiRO#P*Uwu+Id@wZpzR>pS0d+ed21HDzDTt zJ$`Yw!KXJoQK9Jh#>VE2&7ogfQuw+sj|qq!EXR$FgQP)HBBsX?Vdy9T6=*#x>8VV4 zeQCPHl%(T?p$x&q-f~DyhQy6zsL%yaLI^t|Q|hz_Q`AHRlXp{ChX~ax;41aAD&Q&7 zXH~#0nAQqiIc>m^uA{jPxH#1zvUtRW6%4FVq|yut7X;0|0U&r5rWpi%O9Mc#>otR* zBWeJMo>mYvk_LdFEohbmT}J~z(DF5dpr84NAf+MNdk39N13bk_|4 z(cU}gTN(hOy?5~IlLmlj?;R@@5J;$we|qeA`)KbS`~s(55{)3*dk0Tk8UUibcVL!m z2#EIHkv0rOd+*pb3`DhexZc?wK{3i#sW~;yjg4#B#R6glNu~AuqllulHD7uFguXSQfuSQ2|ls z>H>vm)1@lJ64eR}*E28KTnBMxv9E66~qtpp9!@|?2PnR>m$c#(VXVIWI6&mr-)P?eZvb0cWq!?6m%&4rOpg>Kiz`#H? zq1ZG=D5TNQc-%w_&!(xbZ9JhkZEj3MRfJNn04ENt3cyXZ!$4GhHrEB=m&oW8REA_S#~lVj1zi{%ikU!Os;s~WyL=ilLSV|~32osUkETT6O*~0!A|-AR zJI3hb%$5y~%3q!`Qwm$fMUpUxbVa-hM6Kja;Ye3=4K!N;9PsOjWbxPUzn1IbGwuk% zt+mF@Ao4ZV&exlVubo!Dv`3`)>dNBZ+`Pfhx0!anK0JIKwet0WW+~b$mc>7LeUqQB ziFUreJbYcW^7XCft0#-UU-gWiuc>yvems2LweqDW4NA`v=-(HA@bfj(&bJ*8UvI5^ z>3N3Yt1pZH^th6ruQ~Gd)nc9M_G|-uwbfAeuc$QSKfAMeA)I~8d7oZFhAcG+WGR?b6c%^+4fu-QhMwfKi`(x`SRJbhgQC9 zdoB&xck>ZHUrX(L`Rv(8D_^!fmxlax-&AXW6q9_-d&$pF!zI^uVq?Iq*p1pleTwTe}*G4;EK6`f6%9m}= z-afn66!Y_yYUj&m&z@TOvhCU1C-1ysKH~PTt#-bA_Ux;bFWa8IeLfz`yU5K#Np**kd!CXC-$%y6X+!@U%p7vR<*E>pmolH^GacizH}w*cEgT2rS_ptrtTX&!LMuR5|5guKW0$vZkoB|OuBGpA~2_j}hvPHym z5=KOL;g!MAhcA@CxOyga8oo%Qy+sqdX!-inf-7@u{lvI_mt{#YrrJ}&sgQBUj`otY2T{Calv_+C+)e1s$fW;i# z;Nh|eHHG^)rp0(DKxqx7#!TFG&{Ef@Br19ODycl7A@Kku2#zJ(A2nz|aR1H;izJgc zQZxsC_4#aB@W_SIAT&iewJ@^aMp8^^5M`lLj4X7Dk%dm7ES@OK-S2)~*k<@_nd_)U z65O0nnxZZOp&#(8&u3c@HeF#s1~BTuJ;cxZav+Vu87RWWFi@CWHU`MaU>L&w2V_Az zW%Lrrk;MXJsn2KJ3^rETFK9nVz(X3^eta@@z%p8?Lh0&&K*0k-!^Gi>mtsrNhI}){ zP||@@QY_a~mSo$J8S#VHJ_PDpyI@rSk+oc+wgF^DRJ})p?Hq`q?9)7<8LT(d@X=9n z@om-c*~#;N&g%*k9eBnE?*wuzd*IpP?gA z@n=Y=_h)p9?L!3cLI*v<=sa9jbfNjnc=(%A{ADWq@$iOeM_^!@D*w;-ry>%NsSo3p zGrJ1)VcfnMdUW24C9~4hr@u@%i&82u5F79)>DPseB*RoYLf8lzfH`<9#Y_ltIF@33 zE*>e>>x)h?`l3^ezUb8Vk|E@KR#)djha1CZAk3vB;H6&~{JbO;e$sa|j0K~}PO(z7of zb`i1;UMF71%ENj&;L9W6b6g;SNXV!M0`eCL0wtmArra)mtM59^n{4=oIy?YZ!UR|Z zVdl!HcH!JCIh^!MNR})8viC@dIT^{~Y|bE%r4qL$OIbOX(XWq=$P`+HWLq+G?qQRU z@MHzzn7}Ysnp~byjZlf2>^3^Z7{q?g0{SHaoQtgdKTv#z}(Dns)S2wlD`(xnaLBkTV<1+4U z-17F%7tTc$E?)g~vf6BYtDiTlqGIs<7p9)hD+&ibUe%$qMPAYZ`}H^U9Ht~@Sk1WK zvXjZNZ-Qn&*yr>j=iRAZ`L9ovP5R){xO>Iwsaa<|Jm(hgT>a|L4^130mp2}=rPwF- ztF@PmPE@(>?Cz;I`kO~SxA$EbargN*rilSr&3`{H@;Mqk{9WJ^kB8!@-wn6!>-qRj z^z>7u%w`Z2!-(4~}jNgszgqT2EC~1y?sbJO(Oi2f6qbPfUs| zX`+WaUS}=%4OG-*_RH)eSr;?~Y<9gv0a=3n#=>*eqYwqN-iU<#*=c75>Aw zFW6Wj-*eKlbXC~#={sES_YjTqUmTKnZ^W979(M;E$=xX1T;8f|?|~0jKk+tn%#@|( zS~}qe*FKqmxpjpz4e@U*}f(k1TTPF=F?*?L{>t zIKO4r;?G8C!V z>)mO&af|5N>9s$OnH+rD!B%p0LyFG+tRb6{Mox+R)-&h6*{X%64;-T%h8*8AXKAs} zMsRbM+m7^ETK%KTCcSQs;+0Mlc1jYWhkmu`%9!{o z?^kc%mEu?wvO2i*n&4H-Ki1h!*(f}*7p@X^K^>nXQK+mqeizgIDhD_d^ zzwzmvI0vU;Pey!EZCkcl6j-&^u-B&(JJ&jg@5u=nFR}g6qb&cG`1q0*olJktwmolJ z(yuIJZ&s~OlgC~gYCoRdzayq|FvKq3y#4F_MZ@9+Ha3ADZ(T|;e^KST***Q;yEaFs zf3W@dymIi4Rp}3k&$-k+d>QcZadFtEpk4(ByL$vq|9I|?4IW3|zpqGMHMuHExM1@u z+t4}P_m>!7d#L{?zRBG$`+jj}MB8t@3NJLW(iv;`c-36%s^=}@1EOaiI8)SS_1yQF z{)L8Ck$St9yF95*_vvd@<^FK%$?OW^@3&)a_Uy~PZ+x0xb{S`LH`wN-dtd8{n!*;Q z;ZN)<=YMDapw-DuCyaZ4*KO+eHb!?Yz6dDze(2YUP6zIpWWN|te!P6lB3tVYGkjxy z4mNppuC$Hxz_nfHUvw$2F5U31U5C_#xkk&U%(7|rVEJqDDwq8Cy_!xqu~~dHd(bnJ z6i<^_vx>Y%ovn?}^iK|1|90C!`=Hx%FDG})eqEHY?0mE4&Zb>nT|AuKVTaxR4_*Dw z^nP%%X+q1vyIz*)Nc!j09C&m5>w`boezg88^YVb384H>f-yGF^W|417_mz5cR;_5X zz$4k{#i^IW&p0k$?xM5z=B9G}Q2ExR>mTd(B|ZG}ck^dcf4NuLq5syflb;&*dE0JP z;WW|i5fkQ3jaqX%;!#y#%$l%s_s{J(_eXe>L0|c2?R(tLZStM8s+ye1cW(Hv$uTI; zSr~OGwYu59wG(W_e!3IQTi>sAombueq3_O=@e7Z|8#If~2pZIR&IGY_`c2;t3rlA=k=#nnVRVL=>eb%^v)2`~;zMiNz+niB)bE+eQl?%Jxn5 zYt!h^C$soTZsi9LUYVaz*tz44FPH57?))0-kYSs}Sp|M;io2Gzn6ady%3(+3$r3#u z@2hG116*#b-S$=In7Q-fa*7>l7hauqvFD__>+K@UO)pOUeRx@MiO<%E>Z_OHZf9Pf zl0Q&Z(LQ@<^%4Kq;l{_aN98OFE41&krKBW0wY=$9=a<}rTchHYaDZ`{dmGxXi6(yC|e<0EtaNZB&r=d*E*{nvc;>+oAH zcV>(mRyjYV`QX#*|7yJ{+~BT!h0D~y8RzC)*;NxHS$0Nf|D*Hs%*JLDH+G8*Ir&Sb z`HAwTbIcFC%TAQI95~cYuG^tpKK4RnOUG^1A)9IvXNj^u^*TK>w~JFB$B!4J5x>>C z_gQp*R!H|jr&3>pQ-m z+S>DNnU2Zk+`pEti#+s!-otX&AO;t6f7%DLnk7u!_|_16cB9uL6ooZGE7m8WjZS!) z&Z?dHwIn(D@*$&zjyLC&Z7bKAbyD(h7{DP#5P9|Y;A9gd7Jns$Y>SlVx;e9x!$Ex#M(VPihD zu7B5wmD##ZYtNKc+5fOPMD%Oap+l!`L&NChmq6$SUtnumt3okW;90r$>!S+5UBT7Y zZVUQkt>?HExhtajil(q`W_JQt{ahsO@}wT=A|Dd9Sm9!Dji4T52fVYvmPU(7^y{OG z@2kLOOqUFW)^DbM(E0;xVt!z47$Ae>04;|@!@~6MCyi8oKiODlil9`$x)JcM$pwf8 zxG#iLKp||y45?>hY6D~h+mOFDy}lGWqF-PPMR%d-cmztwOp208ZB=N@)^NB4`z65) z$T<$%82Vo~vZ&ItsH>y0^rOHwtY;_X^Q%B-*7F*82VEbef@53w2;ujVLy$FuszBxr zzrK_>LZs7tSConlg8)N9GN7#(1{rjvq{1}fyV%yJfsNpb1b=S;L5RPYBO7>B`u#ps4qS1E(P0%myQT_saP z0!K`;hP;1<{JH%986Mi|{44xt0Wkh*B?lso)}J8a(C7X}9=^YW(1hCa;}h=vF>vp# zV8CM6;>=AS7m+4FLP&h+8_5UPSJdu$4g-xD>2dHx;}arPP|@vRrJjm3KI73$p8;Y0 zQj+5)jZEz}DKRN7LYAT;E_SWAr=Pc*mzTSjyQh1H4qkYAtvLwbFC}!qk)sZ||6OAb z)$0EPAS^yUaiom?D*&mtr>Bop(Gc`9-4f&D+rvp2A=F<5xKmAcZ%^KK*gZir^Z$aJ F{{zF=GsFM@ literal 0 HcmV?d00001 diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/材料信息导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/材料信息导入模板.xls index 378eebfa550c4b3bd3c8275f5685b64a1eb890c8..93bcae86c5c1510cb95ef4058af4a284f1e572ea 100644 GIT binary patch delta 482 zcmZoT!`N_!aYGIZ`+>r136>JKHW#z3Vq)AhS&m&CnUvhb#OPVQzs`_BgkcK<1H=FN z35-CBp$)7OA*;ZU0Tef5fXl99SFT6W%fiSAl-XpjXaXc91SPORcg4B}WVU|`_FA#Q?QJeYwKy99#`R&hoKd#ny(V6cO$ s->k%WBZ!Zmfejdtj12rh$i}vrBW4Q=XT#D2P&_g+PiAzrUX;iR0C%5n5&!@I delta 482 zcmZoT!`N_!aYGIZd%(*SiyXI`n~PaiF)<2FmSY!3CMAWK7(J`^*BLU1Fl=F9VEA7@ zfe}bCw1HJ3WEB`PfZ}EhaM^Y2%JoQkSr{3CvU`{ydJ$&cVZbHM0JITi8nSu@20^Ui zj0_xT=GTK94YI%lO#&v)iB+75K^&_E3=CX2#7(e^2QzSDmte5LD$dAYkJUj840dq! qo0T|k1o4RhO=bXkObiG)IX82}Y+>PKNQwf*BO~) + @@ -7389,6 +7390,13 @@ WorkPackageSet2In.aspx + + WorkPackageSet2In2.aspx + ASPXCodeBehind + + + WorkPackageSet2In2.aspx + Accident.aspx ASPXCodeBehind From 55b52e460a90eebf3a6e777df1a6c3e1809f8958 Mon Sep 17 00:00:00 2001 From: gaofei1985 <181547018@qq.com> Date: Tue, 21 Nov 2023 20:26:41 +0800 Subject: [PATCH 02/26] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DataBase/版本日志/SGGLDB_V2023-11-21.sql | 175 ++++++++++++++++ .../HJGL/WeldingManage/WeldJointService.cs | 18 ++ .../HJGL/WeldingManage/JotTwoDesign.aspx | 25 ++- .../HJGL/WeldingManage/JotTwoDesign.aspx.cs | 53 ++++- .../JotTwoDesign.aspx.designer.cs | 102 ++++++---- .../HJGL/WeldingManage/WeldReportEdit.aspx | 7 + .../HJGL/WeldingManage/WeldReportEdit.aspx.cs | 73 +++---- .../WeldReportEdit.aspx.designer.cs | 75 +++---- .../HJGL/WeldingManage/WeldTask.aspx.cs | 2 +- SGGL/Model/Model.cs | 186 +++++++++++++----- 10 files changed, 547 insertions(+), 169 deletions(-) create mode 100644 DataBase/版本日志/SGGLDB_V2023-11-21.sql diff --git a/DataBase/版本日志/SGGLDB_V2023-11-21.sql b/DataBase/版本日志/SGGLDB_V2023-11-21.sql new file mode 100644 index 00000000..6d348252 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_V2023-11-21.sql @@ -0,0 +1,175 @@ +alter table HJGL_WeldJoint add AuditMan2 nvarchar(50) null +GO +alter table HJGL_WeldJoint add AuditDate2 datetime null +GO + + +ALTER VIEW [dbo].[View_HJGL_WeldJoint] +AS +SELECT jot.[ProjectId] --ĿId + ,pipe.[UnitWorkId] --λId + ,uw.UnitWorkName --λ + ,pipe.[UnitId] --λId + ,unit.UnitName --λ + ,jot.[PipelineCode] --ߺ + ,pipe.[SingleNumber] --ͼ + ,pipe.[SingleName] --ͼֽ + ,pipe.[MediumId] --Id + ,medium.MediumCode + ,medium.MediumName -- + ,pipe.[PipingClassId] --ܵȼId + ,pipingClass.PipingClassCode --ܵȼ + ,pipe.[DetectionRateId] --̽˱Id + ,dr.DetectionRateCode --̽˱51020 + ,pipe.DetectionType --̽Id(ܶм|ָ) + ,STUFF((SELECT ',' + DetectionTypeCode FROM Base_DetectionType + WHERE CHARINDEX('|'+LTRIM(DetectionTypeId)+'|','|'+ pipe.DetectionType + '|') > 0 FOR XML PATH('') ), 1, 1, '') AS DetectionTypeStr --̽ͣܶм,ָ + ,pipe.DesignTemperature --¶ȡ + ,pipe.DesignPress --ѹMpa(g) + ,pipe.TestMedium --ѹId + ,tm.MediumName AS TestMediumName --ѹ + ,pipe.TestPressure --ѹѹMpa(g) + ,pipe.PressurePipingClassId --ѹܵId + ,ppc.PressurePipingClassCode --ѹܵ + ,pipe.PipeLenth --߳(m) + ,pipe.LeakMedium --й¶Id + ,tm2.MediumName AS LeakMediumName --й¶ + ,pipe.LeakPressure --й¶ѹMpa(g) + ,pipe.PCMedium --ϴҪId + ,pm.PurgeMethodCode --ϴҪ + ,pipe.VacuumPressure --ѹKpa(a) + ,pipe.MaterialId --Id + ,mat.MaterialCode AS PipeMaterialCode -- + ,pipe.Remark AS PipeRemark --ע + ,pipe.FlowingSection as FlowingSection --ˮ + ,jot.[WeldJointId] --Id + ,jot.[WeldJointCode] --ں + ,jot.[Material1Id] --1Id + ,mat1.MaterialCode AS Material1Code --1 + ,jot.[Material2Id] --2Id + ,mat2.MaterialCode AS Material2Code --2 + ,jot.[Dia] --⾶ + ,jot.DNDia --DNֱ + ,jot.[Size] -- + ,jot.[Thickness] --ں + ,jot.[Specification] -- + ,jot.[WeldTypeId] --Id + ,WeldType.WeldTypeCode -- + ,jot.[DetectionTypeId] --Id + ,ndt.DetectionTypeCode -- + ,jot.[Components1Id] --1Id + ,com1.ComponentsCode AS ComponentsCode1 --1 + ,jot.[Components2Id] --2Id + ,com2.ComponentsCode AS ComponentsCode2 --2 + ,jot.DesignIsHotProess --Ƿȴ + ,CASE jot.DesignIsHotProess WHEN 1 THEN '' ELSE '' END AS DesignIsHotProessStr --Ƿȴ + ,jot.[WeldingMethodId] --ӷId + ,WeldingMethod.WeldingMethodCode --ӷ + ,jot.WPQId --WPSId + ,wps.WPQCode --WPS + ,jot.[GrooveTypeId] --¿Id + ,GrooveType.GrooveTypeCode --¿ + ,jot.[WeldingRod] --Id + ,rod.ConsumablesCode AS WeldingRodCode -- + ,jot.[WeldingWire] --˿Id + ,wire.ConsumablesCode AS WeldingWireCode --˿ + ,jot.PreTemperature --Ԥ¶ + ,jot.[JointAttribute] -- + ,jot.TwoJointType --κ + ,daily.WeldingDate as WeldingDateD + ,CONVERT(VARCHAR(100), daily.WeldingDate, 23) AS WeldingDate -- + ,BackingWelder.WelderCode AS BackingWelderCode --׺ + ,CoverWelder.WelderCode AS CoverWelderCode --溸 + ,(CASE (SELECT COUNT(*) FROM [dbo].[HJGL_HotProess_TrustItem] hpti + WHERE hpti.WeldJointId=jot.WeldJointId) WHEN 0 THEN '' ELSE (SELECT TOP 1 ISNULL(ReportNo,'') FROM [dbo].[HJGL_HotProess_Trust] hpt + LEFT JOIN [dbo].[HJGL_HotProess_TrustItem] hpti ON hpti.HotProessTrustId=hpt.HotProessTrustId + WHERE hpti.WeldJointId=jot.WeldJointId) END) AS HotProessReportNo --ȴ + ,(CASE (SELECT TOP 1 IsCompleted FROM [dbo].[HJGL_HotProess_TrustItem] hpti + WHERE hpti.WeldJointId=jot.WeldJointId) WHEN 1 THEN '' WHEN 0 THEN 'δ' ELSE 'δȴ' END) AS HotProessResult --ȴ + ,(CASE (SELECT COUNT(*) FROM [dbo].HJGL_Hard_TrustItem hti + WHERE hti.WeldJointId=jot.WeldJointId) WHEN 0 THEN '' ELSE (SELECT TOP 1 ISNULL(InspectionNum,'') FROM [dbo].HJGL_Hard_Trust ht + LEFT JOIN [dbo].HJGL_Hard_TrustItem hti ON hti.HardTrustID=ht.HardTrustID + WHERE hti.WeldJointId=jot.WeldJointId) END) AS HardReportNo --Ӳȱ + ,(CASE (SELECT TOP 1 IsPass FROM [dbo].HJGL_Hard_TrustItem hti + WHERE hti.WeldJointId=jot.WeldJointId) WHEN 1 THEN 'ϸ' WHEN 0 THEN 'ϸ' ELSE '' END) AS HardResult --Ӳȼ + ,(CASE (SELECT COUNT(*) FROM [dbo].HJGL_Batch_BatchTrustItem bti + WHERE bti.WeldJointId=jot.WeldJointId) WHEN 0 THEN '' ELSE (SELECT TOP 1 TrustBatchCode FROM [dbo].HJGL_Batch_BatchTrust bt + LEFT JOIN [dbo].HJGL_Batch_BatchTrustItem bti ON bti.TrustBatchId=bt.TrustBatchId + WHERE bti.WeldJointId=jot.WeldJointId) END) AS TrustBatchCode --ίе + ,(CASE (SELECT COUNT(*) FROM [dbo].HJGL_Batch_NDEItem ndei + LEFT JOIN [dbo].HJGL_Batch_BatchTrustItem bti ON bti.TrustBatchItemId=ndei.TrustBatchItemId + WHERE bti.WeldJointId=jot.WeldJointId) WHEN 0 THEN '' ELSE (SELECT TOP 1 ISNULL(NDECode,'') FROM [dbo].HJGL_Batch_NDE nde + LEFT JOIN [dbo].HJGL_Batch_NDEItem ndei ON ndei.NDEID=nde.NDEID + LEFT JOIN [dbo].HJGL_Batch_BatchTrustItem bti ON bti.TrustBatchItemId=ndei.TrustBatchItemId + WHERE bti.WeldJointId=jot.WeldJointId) END) AS NDECode --ⵥ + ,(CASE (SELECT TOP 1 CheckResult FROM [dbo].HJGL_Batch_NDEItem ndei + LEFT JOIN [dbo].HJGL_Batch_BatchTrustItem bti ON bti.TrustBatchItemId=ndei.TrustBatchItemId + WHERE bti.WeldJointId=jot.WeldJointId) WHEN '1' THEN 'ϸ' WHEN '2' THEN 'ϸ' ELSE '' END) AS CheckResult -- + ,jot.PipelineId + ,jot.[JointArea] + ,jot.[WeldingLocationId] + ,jot.[HeartNo1] + ,jot.[HeartNo2] + ,jot.[IsHotProess] + ,jot.[WeldingDailyId] + ,jot.[BackingWelderId] + ,jot.[CoverWelderId] + ,jot.WeldingMode + ,jot.Remark + ,jot.IsTwoJoint + ,jot.SubmitMan + ,jot.AuditMan + ,jot.AuditMan2 + ,jot.AuditDate + ,jot.AuditDate2 + ,WeldingLocation.WeldingLocationCode + ,CASE WHEN jot.WeldingDailyId IS NULL THEN '' ELSE '' END AS IsWelding + ,CASE WHEN jot.IsHotProess=1 THEN '' ELSE '' END AS IsHotProessStr, + BackingWelder.PersonName AS BackingWelderName, + CoverWelder.PersonName 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 mat1.MaterialCode IS NOT NULL AND mat2.MaterialCode IS NOT NULL + THEN mat1.MaterialCode + '/' + mat2.MaterialCode + ELSE (ISNULL(mat1.MaterialCode,'') + ISNULL(mat2.MaterialCode,'')) END) AS MaterialCode, -- + + daily.WeldingDailyCode, + pointItem.PointBatchId, + point.PointBatchCode, + (CASE WHEN pointItem.PointState='1' THEN 'ѵ' WHEN pointItem.PointState='2' THEN '͸' ELSE '' END) AS IsPoint + FROM [dbo].[HJGL_WeldJoint] jot +LEFT JOIN dbo.HJGL_Pipeline pipe ON pipe.PipelineId=jot.PipelineId +LEFT JOIN dbo.WBS_UnitWork uw ON uw.UnitWorkId=pipe.UnitWorkId +LEFT JOIN dbo.Base_Unit unit ON unit.UnitId=pipe.UnitId +LEFT JOIN Base_WeldType AS WeldType ON WeldType.WeldTypeId=jot.WeldTypeId +LEFT JOIN dbo.Base_DetectionRate dr ON dr.DetectionRateId = pipe.DetectionRateId +LEFT JOIN Base_TestMedium tm ON tm.TestMediumId=pipe.TestMedium +LEFT JOIN Base_TestMedium tm2 ON tm2.TestMediumId=pipe.LeakMedium +LEFT JOIN Base_PurgeMethod pm ON pm.PurgeMethodId=pipe.PCMedium +LEFT JOIN Base_PressurePipingClass ppc ON ppc.PressurePipingClassId=pipe.PressurePipingClassId +LEFT JOIN Base_Material AS mat ON mat.MaterialId = pipe.MaterialId +LEFT JOIN Base_Material AS mat1 ON mat1.MaterialId = jot.Material1Id +LEFT JOIN Base_Material AS mat2 ON mat2.MaterialId = jot.Material2Id +LEFT JOIN Base_WeldingMethod AS WeldingMethod ON WeldingMethod.WeldingMethodId=jot.WeldingMethodId +LEFT JOIN Base_WeldingLocation AS WeldingLocation ON WeldingLocation.WeldingLocationId=jot.WeldingLocationId +LEFT JOIN Base_Consumables AS wire ON wire.ConsumablesId=jot.WeldingWire +LEFT JOIN Base_Consumables AS rod ON rod.ConsumablesId=jot.WeldingRod +LEFT JOIN Base_GrooveType AS GrooveType ON GrooveType.GrooveTypeId=jot.GrooveTypeId +LEFT JOIN Base_Components AS com1 ON com1.ComponentsId = jot.Components1Id +LEFT JOIN Base_Components AS com2 ON com2.ComponentsId = jot.Components2Id +LEFT JOIN SitePerson_Person AS BackingWelder ON BackingWelder.PersonId=jot.BackingWelderId and BackingWelder.ProjectId=jot.ProjectId +LEFT JOIN SitePerson_Person AS CoverWelder ON CoverWelder.PersonId=jot.CoverWelderId and CoverWelder.ProjectId=jot.ProjectId +LEFT JOIN dbo.HJGL_WeldingDaily AS daily ON daily.WeldingDailyId=jot.WeldingDailyId +LEFT JOIN Base_PipingClass AS pipingClass ON pipingClass.PipingClassId=pipe.PipingClassId +LEFT JOIN dbo.Base_Medium medium ON medium.MediumId = pipe.MediumId +LEFT JOIN dbo.Base_DetectionType ndt ON ndt.DetectionTypeId = jot.DetectionTypeId +LEFT JOIN dbo.WPQ_WPQList wps ON wps.WPQId = jot.WPQId +LEFT JOIN dbo.HJGL_Batch_PointBatchItem pointItem ON pointItem.WeldJointId = jot.WeldJointId +LEFT JOIN dbo.HJGL_Batch_PointBatch point ON point.PointBatchId = pointItem.PointBatchId + + + +GO + + diff --git a/SGGL/BLL/HJGL/WeldingManage/WeldJointService.cs b/SGGL/BLL/HJGL/WeldingManage/WeldJointService.cs index cfd95d31..dda5a978 100644 --- a/SGGL/BLL/HJGL/WeldingManage/WeldJointService.cs +++ b/SGGL/BLL/HJGL/WeldingManage/WeldJointService.cs @@ -246,6 +246,24 @@ namespace BLL } } + /// + /// 二次焊口施工经理审核 + /// + /// + /// + /// + public static void UpdateJointAudit2(string jointId, string auditMan, DateTime? auditDate) + { + Model.SGGLDB db = Funs.DB; + Model.HJGL_WeldJoint newWeldJoint = db.HJGL_WeldJoint.FirstOrDefault(e => e.WeldJointId == jointId); + if (newWeldJoint != null) + { + newWeldJoint.AuditMan2 = auditMan; + newWeldJoint.AuditDate2 = auditDate; + db.SubmitChanges(); + } + } + /// /// 根据主键删除焊口信息 /// diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx b/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx index dcecc461..356215ba 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx @@ -10,6 +10,11 @@ color: red; font-weight: bold; } + + .f-grid-colheader-text { + white-space: normal; + word-break: break-all; + } @@ -103,10 +108,16 @@ - - + + + + @@ -242,10 +253,16 @@ runat="server" Text="插入焊口" Icon="TableRowInsert" Hidden="true"> + runat="server" ConfirmText="确定通过选中行(二次焊口设计)的审核?" ConfirmTarget="Top" Text="专工审核" Icon="TableRowInsert"> + runat="server" ConfirmText="确定取消选中行(二次焊口设计)的审核?" ConfirmTarget="Top" Text="专工取消审核" Icon="TableRowInsert"> + + + + diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx.cs index a57814cb..a91c0e42 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx.cs @@ -267,9 +267,10 @@ namespace FineUIPro.Web.HJGL.WeldingManage WeldingMethodCode,WeldingWireCode,WeldingRodCode,WeldingDate,WeldingDailyCode, BackingWelderCode,CoverWelderCode,MediumCode ,PreTemperature,JointArea,WPQCode,Remark, (CASE WHEN AuditDate IS NOT NULL THEN '已审核' ELSE '未审核' END) AS IsAudit, - subMan.PersonName AS SubmitMan,auditMan.PersonName AS AuditMan,AuditDate + subMan.PersonName AS SubmitMan,auditMan.PersonName AS AuditMan,AuditDate,auditMan2.PersonName AS AuditMan2,AuditDate2 FROM View_HJGL_WeldJoint LEFT JOIN dbo.Person_Persons auditMan ON auditMan.PersonId=View_HJGL_WeldJoint.AuditMan + LEFT JOIN dbo.Person_Persons auditMan2 ON auditMan2.PersonId=View_HJGL_WeldJoint.AuditMan2 LEFT JOIN dbo.Person_Persons subMan ON subMan.PersonId=View_HJGL_WeldJoint.SubmitMan WHERE IsTwoJoint = 1"; List listStr = new List { }; @@ -548,6 +549,31 @@ namespace FineUIPro.Web.HJGL.WeldingManage } } + protected void btnAudit2_Click(object sender, EventArgs e) + { + if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.HJGL_JotTwoDesignMenuId, BLL.Const.BtnAuditing)) + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录", MessageBoxIcon.Warning); + return; + } + string[] weldJointIdList = Grid1.SelectedRowIDArray; + foreach (string jot in weldJointIdList) + { + BLL.WeldJointService.UpdateJointAudit2(jot, CurrUser.PersonId, DateTime.Now); + } + ShowNotify("所选口审核成功!", MessageBoxIcon.Success); + BindGrid(); + //string weldJointIdList = string.Join("|", Grid1.SelectedRowIDArray); + //PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("TwoJointAudit.aspx?WeldJointIdList={0}", Grid1.SelectedRowID, "维护 - "))); + } + else + { + ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); + } + } + protected void btnCancelAudit_Click(object sender, EventArgs e) { if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.HJGL_JotTwoDesignMenuId, BLL.Const.BtnAuditing)) @@ -573,6 +599,31 @@ namespace FineUIPro.Web.HJGL.WeldingManage } } + protected void btnCancelAudit2_Click(object sender, EventArgs e) + { + if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.HJGL_JotTwoDesignMenuId, BLL.Const.BtnAuditing)) + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录", MessageBoxIcon.Warning); + return; + } + string[] weldJointIdList = Grid1.SelectedRowIDArray; + foreach (string jot in weldJointIdList) + { + BLL.WeldJointService.UpdateJointAudit2(jot, null, null); + } + ShowNotify("已取消所选口的审核!", MessageBoxIcon.Success); + BindGrid(); + //string weldJointIdList = string.Join("|", Grid1.SelectedRowIDArray); + //PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("TwoJointAudit.aspx?WeldJointIdList={0}", Grid1.SelectedRowID, "维护 - "))); + } + else + { + ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); + } + } + /// /// 焊口信息插入 /// diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx.designer.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx.designer.cs index 895700dd..f798843a 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx.designer.cs @@ -7,13 +7,11 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.HJGL.WeldingManage -{ - - - public partial class JotTwoDesign - { - +namespace FineUIPro.Web.HJGL.WeldingManage { + + + public partial class JotTwoDesign { + /// /// form1 控件。 /// @@ -22,7 +20,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -31,7 +29,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// Panel1 控件。 /// @@ -40,7 +38,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel1; - + /// /// panelLeftRegion 控件。 /// @@ -49,7 +47,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel panelLeftRegion; - + /// /// Toolbar1 控件。 /// @@ -58,7 +56,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar1; - + /// /// txtPipelineCode 控件。 /// @@ -67,7 +65,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtPipelineCode; - + /// /// hdUnitWorkId 控件。 /// @@ -76,7 +74,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.HiddenField hdUnitWorkId; - + /// /// tvControlItem 控件。 /// @@ -85,7 +83,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Tree tvControlItem; - + /// /// panelCenterRegion 控件。 /// @@ -94,7 +92,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel panelCenterRegion; - + /// /// Toolbar3 控件。 /// @@ -103,7 +101,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar3; - + /// /// txtWeldJointCode 控件。 /// @@ -112,7 +110,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtWeldJointCode; - + /// /// ckIsAudit 控件。 /// @@ -121,7 +119,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.CheckBox ckIsAudit; - + /// /// lbSize 控件。 /// @@ -130,7 +128,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label lbSize; - + /// /// DropTwoJointType 控件。 /// @@ -139,7 +137,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList DropTwoJointType; - + /// /// drpUnit 控件。 /// @@ -148,7 +146,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpUnit; - + /// /// ToolbarFill1 控件。 /// @@ -157,7 +155,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarFill ToolbarFill1; - + /// /// btnSelectColumn 控件。 /// @@ -166,7 +164,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnSelectColumn; - + /// /// btnNew 控件。 /// @@ -175,7 +173,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnNew; - + /// /// btnBatchAdd 控件。 /// @@ -184,7 +182,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnBatchAdd; - + /// /// btnAutoInput 控件。 /// @@ -193,7 +191,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnAutoInput; - + /// /// btnOut2 控件。 /// @@ -202,7 +200,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnOut2; - + /// /// btnPrint 控件。 /// @@ -211,7 +209,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnPrint; - + /// /// Grid1 控件。 /// @@ -220,7 +218,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid1; - + /// /// ToolbarSeparator1 控件。 /// @@ -229,7 +227,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; - + /// /// ToolbarText1 控件。 /// @@ -238,7 +236,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarText ToolbarText1; - + /// /// ddlPageSize 控件。 /// @@ -247,7 +245,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList ddlPageSize; - + /// /// Window1 控件。 /// @@ -256,7 +254,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window Window1; - + /// /// Window2 控件。 /// @@ -265,7 +263,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window Window2; - + /// /// Window3 控件。 /// @@ -274,7 +272,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window Window3; - + /// /// Window4 控件。 /// @@ -283,7 +281,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window Window4; - + /// /// Menu1 控件。 /// @@ -292,7 +290,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Menu Menu1; - + /// /// btnMenuEdit 控件。 /// @@ -301,7 +299,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnMenuEdit; - + /// /// btnMenuInsert 控件。 /// @@ -310,7 +308,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnMenuInsert; - + /// /// btnAudit 控件。 /// @@ -319,7 +317,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnAudit; - + /// /// btnCancelAudit 控件。 /// @@ -328,7 +326,25 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnCancelAudit; - + + /// + /// btnAudit2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnAudit2; + + /// + /// btnCancelAudit2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnCancelAudit2; + /// /// btnView 控件。 /// @@ -337,7 +353,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnView; - + /// /// btnMenuDelete 控件。 /// diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReportEdit.aspx b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReportEdit.aspx index 905b5a2e..5285e86a 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReportEdit.aspx +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReportEdit.aspx @@ -153,6 +153,13 @@ + + + + + + - @@ -527,6 +531,12 @@ Text="删除" Icon="Delete"> + + + + diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointList.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointList.aspx.cs index 7486a93c..54592b9b 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointList.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointList.aspx.cs @@ -17,7 +17,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage public partial class WeldJointList : PageBase { public int pageSize = PipelineService.pageSize; - public static List WeldJointlist = new List(); + public static List WeldJointlist = new List(); /// /// 预制口总达因 /// @@ -40,7 +40,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage if (!IsPostBack) { - // WeldJointlist = WeldJointService.GetWeldJointByProjectid(this.CurrUser.LoginProjectId); + // WeldJointlist = WeldJointService.GetWeldJointByProjectid(this.CurrUser.LoginProjectId); this.InitTreeMenu();//加载树 //显示列 //Model.Sys_UserShowColumns c = BLL.UserShowColumnsService.GetColumnsByUserId(this.CurrUser.PersonId, "Joint"); @@ -111,8 +111,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage //} //else //{ - unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList(); - unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList(); + unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList(); + unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList(); //} if (unitWork1.Count() > 0) @@ -143,8 +143,9 @@ namespace FineUIPro.Web.HJGL.WeldingManage { foreach (var q in unitWork2) { - int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId - && x.PipelineCode.Contains(this.tvPipeCode.Text.Trim()) + int a = (from x in Funs.DB.HJGL_Pipeline + where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId +&& x.PipelineCode.Contains(this.tvPipeCode.Text.Trim()) select x).Count(); var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId); TreeNode tn2 = new TreeNode(); @@ -157,7 +158,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage tn2.ToolTip = "施工单位:" + unitNamesUnitIds; tn2.CommandName = 1 + "|" + Funs.GetEndPageNumber(a, pageSize); tn2.EnableExpandEvent = true; - tn2.EnableClickEvent= true; + tn2.EnableClickEvent = true; rootNode2.Nodes.Add(tn2); if (a > 0) { @@ -175,7 +176,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage #region private void BindNodes(TreeNode node) { - BLL.PipelineService.BindTreeNodes(node, this.tvPipeCode.Text.Trim(), this.CurrUser.LoginProjectId,pageSize); + BLL.PipelineService.BindTreeNodes(node, this.tvPipeCode.Text.Trim(), this.CurrUser.LoginProjectId, pageSize); } #endregion @@ -188,7 +189,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage } //e.Node.Nodes.Clear(); - + //if (e.Node.CommandName == "单位工程") //{ // var pipeline = (from x in Funs.DB.HJGL_Pipeline @@ -196,7 +197,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage // orderby x.PipelineCode // select x).ToList(); // var hJGL_WeldJoints = (from x in Funs.DB.HJGL_WeldJoint where x.ProjectId == this.CurrUser.LoginProjectId select x).ToList(); - + // // var WeldJointlist = (from x in Funs.DB.View_HJGL_WeldJoint where x.UnitWorkId == e.Node.NodeID && x.IsTwoJoint == null select x).ToList(); // foreach (var item in pipeline) @@ -210,7 +211,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage // e.Node.Nodes.Add(newNode); // } - + //} } @@ -266,7 +267,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage this.lbFiledSum.Text = FieldSum; } } - + } #endregion @@ -411,29 +412,29 @@ namespace FineUIPro.Web.HJGL.WeldingManage #endregion #region 预制率计算 - private string GetRateByUnitWork(string unitworkid) + private string GetRateByUnitWork(string unitworkid) { var db = Funs.DB; - var q=from x in db.View_HJGL_WeldJoint where x.UnitWorkId == unitworkid select x ; + var q = from x in db.View_HJGL_WeldJoint where x.UnitWorkId == unitworkid select x; string rate = ""; ShopSumSize = "0"; FieldSumSize = "0"; - if (q!=null&&q.Count()>0) + if (q != null && q.Count() > 0) { var proSum = (from x in q - where x.JointAttribute == "预制口" + where x.JointAttribute == "预制口" group x by x.UnitWorkId into g select new { SizeSum = g.Sum(x => x.Size) }).FirstOrDefault()?.SizeSum; var FieldSum = (from x in q - where x.JointAttribute == "安装口" - group x by x.UnitWorkId into g - select new - { - SizeSum = g.Sum(x => x.Size) - }).FirstOrDefault()?.SizeSum; + where x.JointAttribute == "安装口" + group x by x.UnitWorkId into g + select new + { + SizeSum = g.Sum(x => x.Size) + }).FirstOrDefault()?.SizeSum; var AllSum = (from x in q group x by x.UnitWorkId into g select new @@ -442,14 +443,14 @@ namespace FineUIPro.Web.HJGL.WeldingManage }).FirstOrDefault()?.SizeSum; proSum = (proSum != null) ? proSum : 0; FieldSum = (FieldSum != null) ? FieldSum : 0; - ShopSumSize = proSum.ToString() ; - FieldSumSize = FieldSum.ToString() ; - if (AllSum>0) + ShopSumSize = proSum.ToString(); + FieldSumSize = FieldSum.ToString(); + if (AllSum > 0) { var a = (decimal)100 * proSum / AllSum; - rate = Math.Round((decimal)a, 1).ToString()+"%"; + rate = Math.Round((decimal)a, 1).ToString() + "%"; } - + return rate; } return "0%"; @@ -496,28 +497,28 @@ namespace FineUIPro.Web.HJGL.WeldingManage var q = from x in db.View_HJGL_WeldJoint where x.PipelineId == pipelineid select x; if (q != null && q.Count() > 0) { - var proSumModel= (from x in q - where x.JointAttribute == "预制口" - group x by x.PipelineId into g - select new - { - SizeSum = g.Sum(x => x.Size) - }).FirstOrDefault(); - var proSum= (proSumModel !=null) ? proSumModel.SizeSum : 0; + var proSumModel = (from x in q + where x.JointAttribute == "预制口" + group x by x.PipelineId into g + select new + { + SizeSum = g.Sum(x => x.Size) + }).FirstOrDefault(); + var proSum = (proSumModel != null) ? proSumModel.SizeSum : 0; var FieldSumModel = (from x in q - where x.JointAttribute == "安装口" - group x by x.PipelineId into g - select new - { - SizeSum = g.Sum(x => x.Size) - }).FirstOrDefault(); - var FieldSum= (FieldSumModel != null) ? FieldSumModel.SizeSum : 0; + where x.JointAttribute == "安装口" + group x by x.PipelineId into g + select new + { + SizeSum = g.Sum(x => x.Size) + }).FirstOrDefault(); + var FieldSum = (FieldSumModel != null) ? FieldSumModel.SizeSum : 0; var AllSumModel = (from x in q - group x by x.PipelineId into g - select new - { - SizeSum = g.Sum(x => x.Size) - }).FirstOrDefault(); + group x by x.PipelineId into g + select new + { + SizeSum = g.Sum(x => x.Size) + }).FirstOrDefault(); var AllSum = (AllSumModel != null) ? AllSumModel.SizeSum : 0; proSum = (proSum != null) ? proSum : 0; @@ -529,7 +530,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage var a = (decimal)100 * proSum / AllSum; rate = Math.Round((decimal)a, 1).ToString() + "%"; } - + return rate; } return "0%"; @@ -549,13 +550,14 @@ namespace FineUIPro.Web.HJGL.WeldingManage var q = from x in db.View_HJGL_WeldJoint where x.PipelineId == pipelineid select x; if (q != null && q.Count() > 0) { - shopNum = (from x in q - where x.JointAttribute == "预制口" select x - ).Count(); - fieldNum = (from x in q - where x.JointAttribute == "安装口" - select x - ).Count(); + shopNum = (from x in q + where x.JointAttribute == "预制口" + select x + ).Count(); + fieldNum = (from x in q + where x.JointAttribute == "安装口" + select x + ).Count(); ShopSum = shopNum.ToString(); FieldSum = fieldNum.ToString(); AllNum = shopNum + fieldNum; @@ -765,6 +767,38 @@ namespace FineUIPro.Web.HJGL.WeldingManage } } + protected void btnMenuPipeLineAllDelete_Click(object sender, EventArgs e) + { + if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, Const.HJGL_WeldJointMenuId, Const.BtnDelete)) + { + if (this.tvControlItem.SelectedNode.CommandName != "管线") + { + Alert.ShowInTop("请选择一条管线!", MessageBoxIcon.Warning); + return; + } + string pipelineId = this.tvControlItem.SelectedNodeID; + var weldJoints = from x in Funs.DB.HJGL_WeldJoint + where x.PipelineId == pipelineId && x.WeldingDailyId != null + select x; + if (weldJoints.Count() > 0) + { + Alert.ShowInTop("存在已焊接的焊口,无法删除管线!", MessageBoxIcon.Warning); + return; + } + BLL.WeldJointService.DeleteWeldJointByPipelineId(pipelineId); + BLL.PipelineService.DeletePipeline(pipelineId); + //BLL.Sys_LogService.AddLog(BLL.Const.System_6, this.CurrUser.LoginProjectId, this.CurrUser.PersonId, Const.HJGL_PipelineMenuId, Const.BtnDelete, rowID); + ShowNotify("删除成功!", MessageBoxIcon.Success); + + + this.InitTreeMenu(); + } + else + { + ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); + } + } + protected void btnDelMat_Click(object sender, EventArgs e) { if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, Const.HJGL_WeldJointMenuId, Const.BtnDelete)) diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointList.aspx.designer.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointList.aspx.designer.cs index 85574aad..7ba41839 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointList.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointList.aspx.designer.cs @@ -7,13 +7,11 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.HJGL.WeldingManage -{ - - - public partial class WeldJointList - { - +namespace FineUIPro.Web.HJGL.WeldingManage { + + + public partial class WeldJointList { + /// /// form1 控件。 /// @@ -22,7 +20,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -31,7 +29,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// Panel1 控件。 /// @@ -40,7 +38,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel1; - + /// /// panelLeftRegion 控件。 /// @@ -49,7 +47,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel panelLeftRegion; - + /// /// Toolbar1 控件。 /// @@ -58,7 +56,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar1; - + /// /// tvPipeCode 控件。 /// @@ -67,7 +65,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox tvPipeCode; - + /// /// hdUnitWorkId 控件。 /// @@ -76,7 +74,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.HiddenField hdUnitWorkId; - + /// /// btnTreeFind 控件。 /// @@ -85,7 +83,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnTreeFind; - + /// /// tvControlItem 控件。 /// @@ -94,7 +92,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Tree tvControlItem; - + /// /// Panel2 控件。 /// @@ -103,7 +101,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel2; - + /// /// panelCenterRegion 控件。 /// @@ -112,7 +110,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel panelCenterRegion; - + /// /// Toolbar3 控件。 /// @@ -121,7 +119,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar3; - + /// /// txtWeldJointCode 控件。 /// @@ -130,7 +128,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtWeldJointCode; - + /// /// txtMaterialCode 控件。 /// @@ -139,7 +137,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtMaterialCode; - + /// /// ToolbarFill1 控件。 /// @@ -148,7 +146,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarFill ToolbarFill1; - + /// /// btnNew 控件。 /// @@ -157,7 +155,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnNew; - + /// /// btnPrint 控件。 /// @@ -166,7 +164,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnPrint; - + /// /// btnImport 控件。 /// @@ -175,7 +173,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnImport; - + /// /// btnUpdateImport 控件。 /// @@ -184,7 +182,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnUpdateImport; - + /// /// btnPDMSImport 控件。 /// @@ -193,7 +191,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnPDMSImport; - + /// /// btnMatImport 控件。 /// @@ -202,7 +200,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnMatImport; - + /// /// Toolbar2 控件。 /// @@ -211,7 +209,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar2; - + /// /// lbSinglePreRate 控件。 /// @@ -220,7 +218,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label lbSinglePreRate; - + /// /// lbShopSize 控件。 /// @@ -229,7 +227,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label lbShopSize; - + /// /// lbFiledSize 控件。 /// @@ -238,7 +236,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label lbFiledSize; - + /// /// Label2 控件。 /// @@ -247,7 +245,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label Label2; - + /// /// lbSinglePreRateByWeldJoint 控件。 /// @@ -256,7 +254,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label lbSinglePreRateByWeldJoint; - + /// /// lbShopSum 控件。 /// @@ -265,7 +263,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label lbShopSum; - + /// /// lbFiledSum 控件。 /// @@ -274,7 +272,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label lbFiledSum; - + /// /// Grid1 控件。 /// @@ -283,7 +281,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid1; - + /// /// Label1 控件。 /// @@ -292,7 +290,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.WebControls.Label Label1; - + /// /// panelBottomRegion 控件。 /// @@ -301,7 +299,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel panelBottomRegion; - + /// /// TabStrip1 控件。 /// @@ -310,7 +308,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TabStrip TabStrip1; - + /// /// TabJoint 控件。 /// @@ -319,7 +317,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Tab TabJoint; - + /// /// Grid3 控件。 /// @@ -328,7 +326,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid3; - + /// /// TabPipeMat 控件。 /// @@ -337,7 +335,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Tab TabPipeMat; - + /// /// Grid2 控件。 /// @@ -346,7 +344,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid2; - + /// /// Window1 控件。 /// @@ -355,7 +353,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window Window1; - + /// /// Window2 控件。 /// @@ -364,7 +362,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window Window2; - + /// /// Window3 控件。 /// @@ -373,7 +371,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window Window3; - + /// /// Window4 控件。 /// @@ -382,7 +380,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window Window4; - + /// /// Window5 控件。 /// @@ -391,7 +389,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window Window5; - + /// /// Menu1 控件。 /// @@ -400,7 +398,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Menu Menu1; - + /// /// btnMenuPipeLineEdit 控件。 /// @@ -409,7 +407,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnMenuPipeLineEdit; - + /// /// btnMenuPipeLineDelete 控件。 /// @@ -418,7 +416,25 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnMenuPipeLineDelete; - + + /// + /// Menu4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu4; + + /// + /// btnMenuPipeLineAllDelete 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuPipeLineAllDelete; + /// /// Menu2 控件。 /// @@ -427,7 +443,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Menu Menu2; - + /// /// btnDelMat 控件。 /// @@ -436,7 +452,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnDelMat; - + /// /// Menu3 控件。 /// @@ -445,7 +461,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Menu Menu3; - + /// /// btnMenuEdit 控件。 /// @@ -454,7 +470,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnMenuEdit; - + /// /// btnMenuInsert 控件。 /// @@ -463,7 +479,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnMenuInsert; - + /// /// btnView 控件。 /// @@ -472,7 +488,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnView; - + /// /// btnMenuDelete 控件。 /// diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldTask.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldTask.aspx.cs index 541a53cd..d105d0e5 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldTask.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldTask.aspx.cs @@ -251,8 +251,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage } else { - this.Grid1.Columns[12].Hidden = false; - this.btnSave.Hidden = false; + //this.Grid1.Columns[12].Hidden = false; + //this.btnSave.Hidden = false; } } #endregion diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldingConDate.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldingConDate.aspx.cs index d103e61a..39e30672 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldingConDate.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldingConDate.aspx.cs @@ -375,15 +375,16 @@ namespace FineUIPro.Web.HJGL.WeldingManage { if (!string.IsNullOrEmpty(tvControlItem.SelectedNodeID)) { - var jotList = from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == tvControlItem.SelectedNodeID &&x.JointAttribute==drpJointAttribute.SelectedValue && x.WPQId == null select x; + var jotList = from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == tvControlItem.SelectedNodeID &&x.JointAttribute==drpJointAttribute.SelectedValue select x; if (jotList.Count() > 0) { foreach (var jot in jotList) { List wpqList =BLL.WPQListServiceService.GetMatchWPQ(jot,this.CurrUser.LoginProjectId, drpUnit.SelectedValue); + Model.HJGL_WeldJoint newJot = new Model.HJGL_WeldJoint(); if (wpqList != null) { - Model.HJGL_WeldJoint newJot = new Model.HJGL_WeldJoint(); + Model.WPQ_WPQList wps = BLL.WPQListServiceService.GetWPQById(wpqList.First().WPQId); newJot.WPQId = wps.WPQId; @@ -396,8 +397,21 @@ namespace FineUIPro.Web.HJGL.WeldingManage newJot.IsHotProess = wps.IsHotProess; newJot.MatchableWPQ = string.Join(",", wpqList.Select(x => x.WPQCode)); - BLL.WeldJointService.UpdateConWeldJoint(newJot); + } + else + { + newJot.WPQId = null; + newJot.WeldJointId = jot.WeldJointId; + newJot.WeldingRod = null; + newJot.WeldingWire = null; + newJot.WeldingMethodId = null; + newJot.GrooveTypeId = null; + newJot.PreTemperature = null; + newJot.IsHotProess = null; + newJot.MatchableWPQ = null; + } + BLL.WeldJointService.UpdateConWeldJoint(newJot); } } BindGrid(); From aedd071d968141fae08a5c2c43d6998d2adb76cc Mon Sep 17 00:00:00 2001 From: gaofei1985 <181547018@qq.com> Date: Wed, 22 Nov 2023 17:10:54 +0800 Subject: [PATCH 05/26] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DataBase/版本日志/SGGLDB_V2023-11-22.sql | 172 ++++++++++++++++++ .../BLL/HJGL/WeldingManage/PipelineService.cs | 141 +++++++------- .../HJGL/WeldingManage/WeldingConDate.aspx | 4 + .../HJGL/WeldingManage/WeldingConDate.aspx.cs | 58 ++++-- .../WeldingConDate.aspx.designer.cs | 77 ++++---- SGGL/Model/Model.cs | 26 ++- 6 files changed, 358 insertions(+), 120 deletions(-) create mode 100644 DataBase/版本日志/SGGLDB_V2023-11-22.sql diff --git a/DataBase/版本日志/SGGLDB_V2023-11-22.sql b/DataBase/版本日志/SGGLDB_V2023-11-22.sql new file mode 100644 index 00000000..a031201e --- /dev/null +++ b/DataBase/版本日志/SGGLDB_V2023-11-22.sql @@ -0,0 +1,172 @@ + +ALTER VIEW [dbo].[View_HJGL_WeldJoint] +AS +SELECT jot.[ProjectId] --ĿId + ,pipe.[UnitWorkId] --λId + ,uw.UnitWorkName --λ + ,pipe.[UnitId] --λId + ,unit.UnitName --λ + ,jot.[PipelineCode] --ߺ + ,pipe.[SingleNumber] --ͼ + ,pipe.[SingleName] --ͼֽ + ,pipe.[MediumId] --Id + ,medium.MediumCode + ,medium.MediumName -- + ,pipe.[PipingClassId] --ܵȼId + ,pipingClass.PipingClassCode --ܵȼ + ,pipe.[DetectionRateId] --̽˱Id + ,dr.DetectionRateCode --̽˱51020 + ,pipe.DetectionType --̽Id(ܶм|ָ) + ,STUFF((SELECT ',' + DetectionTypeCode FROM Base_DetectionType + WHERE CHARINDEX('|'+LTRIM(DetectionTypeId)+'|','|'+ pipe.DetectionType + '|') > 0 FOR XML PATH('') ), 1, 1, '') AS DetectionTypeStr --̽ͣܶм,ָ + ,pipe.DesignTemperature --¶ȡ + ,pipe.DesignPress --ѹMpa(g) + ,pipe.TestMedium --ѹId + ,tm.MediumName AS TestMediumName --ѹ + ,pipe.TestPressure --ѹѹMpa(g) + ,pipe.PressurePipingClassId --ѹܵId + ,ppc.PressurePipingClassCode --ѹܵ + ,pipe.PipeLenth --߳(m) + ,pipe.LeakMedium --й¶Id + ,tm2.MediumName AS LeakMediumName --й¶ + ,pipe.LeakPressure --й¶ѹMpa(g) + ,pipe.PCMedium --ϴҪId + ,pm.PurgeMethodCode --ϴҪ + ,pipe.VacuumPressure --ѹKpa(a) + ,pipe.MaterialId --Id + ,mat.MaterialCode AS PipeMaterialCode -- + ,pipe.Remark AS PipeRemark --ע + ,pipe.FlowingSection as FlowingSection --ˮ + ,jot.[WeldJointId] --Id + ,jot.[WeldJointCode] --ں + ,jot.[Material1Id] --1Id + ,mat1.MaterialCode AS Material1Code --1 + ,jot.[Material2Id] --2Id + ,mat2.MaterialCode AS Material2Code --2 + ,jot.[Dia] --⾶ + ,jot.DNDia --DNֱ + ,jot.[Size] -- + ,jot.[Thickness] --ں + ,jot.[Specification] -- + ,jot.[WeldTypeId] --Id + ,WeldType.WeldTypeCode -- + ,jot.[DetectionTypeId] --Id + ,ndt.DetectionTypeCode -- + ,jot.[Components1Id] --1Id + ,com1.ComponentsCode AS ComponentsCode1 --1 + ,jot.[Components2Id] --2Id + ,com2.ComponentsCode AS ComponentsCode2 --2 + ,jot.DesignIsHotProess --Ƿȴ + ,CASE jot.DesignIsHotProess WHEN 1 THEN '' ELSE '' END AS DesignIsHotProessStr --Ƿȴ + ,jot.[WeldingMethodId] --ӷId + ,WeldingMethod.WeldingMethodCode --ӷ + ,jot.WPQId --WPSId + ,wps.WPQCode --WPS + ,jot.[GrooveTypeId] --¿Id + ,GrooveType.GrooveTypeCode --¿ + ,jot.[WeldingRod] --Id + ,rod.ConsumablesCode AS WeldingRodCode -- + ,jot.[WeldingWire] --˿Id + ,wire.ConsumablesCode AS WeldingWireCode --˿ + ,jot.PreTemperature --Ԥ¶ + ,jot.[JointAttribute] -- + ,jot.TwoJointType --κ + ,pipe.PipeArea --Ԥ/ֳװ + ,daily.WeldingDate as WeldingDateD + ,CONVERT(VARCHAR(100), daily.WeldingDate, 23) AS WeldingDate -- + ,BackingWelder.WelderCode AS BackingWelderCode --׺ + ,CoverWelder.WelderCode AS CoverWelderCode --溸 + ,(CASE (SELECT COUNT(*) FROM [dbo].[HJGL_HotProess_TrustItem] hpti + WHERE hpti.WeldJointId=jot.WeldJointId) WHEN 0 THEN '' ELSE (SELECT TOP 1 ISNULL(ReportNo,'') FROM [dbo].[HJGL_HotProess_Trust] hpt + LEFT JOIN [dbo].[HJGL_HotProess_TrustItem] hpti ON hpti.HotProessTrustId=hpt.HotProessTrustId + WHERE hpti.WeldJointId=jot.WeldJointId) END) AS HotProessReportNo --ȴ + ,(CASE (SELECT TOP 1 IsCompleted FROM [dbo].[HJGL_HotProess_TrustItem] hpti + WHERE hpti.WeldJointId=jot.WeldJointId) WHEN 1 THEN '' WHEN 0 THEN 'δ' ELSE 'δȴ' END) AS HotProessResult --ȴ + ,(CASE (SELECT COUNT(*) FROM [dbo].HJGL_Hard_TrustItem hti + WHERE hti.WeldJointId=jot.WeldJointId) WHEN 0 THEN '' ELSE (SELECT TOP 1 ISNULL(InspectionNum,'') FROM [dbo].HJGL_Hard_Trust ht + LEFT JOIN [dbo].HJGL_Hard_TrustItem hti ON hti.HardTrustID=ht.HardTrustID + WHERE hti.WeldJointId=jot.WeldJointId) END) AS HardReportNo --Ӳȱ + ,(CASE (SELECT TOP 1 IsPass FROM [dbo].HJGL_Hard_TrustItem hti + WHERE hti.WeldJointId=jot.WeldJointId) WHEN 1 THEN 'ϸ' WHEN 0 THEN 'ϸ' ELSE '' END) AS HardResult --Ӳȼ + ,(CASE (SELECT COUNT(*) FROM [dbo].HJGL_Batch_BatchTrustItem bti + WHERE bti.WeldJointId=jot.WeldJointId) WHEN 0 THEN '' ELSE (SELECT TOP 1 TrustBatchCode FROM [dbo].HJGL_Batch_BatchTrust bt + LEFT JOIN [dbo].HJGL_Batch_BatchTrustItem bti ON bti.TrustBatchId=bt.TrustBatchId + WHERE bti.WeldJointId=jot.WeldJointId) END) AS TrustBatchCode --ίе + ,(CASE (SELECT COUNT(*) FROM [dbo].HJGL_Batch_NDEItem ndei + LEFT JOIN [dbo].HJGL_Batch_BatchTrustItem bti ON bti.TrustBatchItemId=ndei.TrustBatchItemId + WHERE bti.WeldJointId=jot.WeldJointId) WHEN 0 THEN '' ELSE (SELECT TOP 1 ISNULL(NDECode,'') FROM [dbo].HJGL_Batch_NDE nde + LEFT JOIN [dbo].HJGL_Batch_NDEItem ndei ON ndei.NDEID=nde.NDEID + LEFT JOIN [dbo].HJGL_Batch_BatchTrustItem bti ON bti.TrustBatchItemId=ndei.TrustBatchItemId + WHERE bti.WeldJointId=jot.WeldJointId) END) AS NDECode --ⵥ + ,(CASE (SELECT TOP 1 CheckResult FROM [dbo].HJGL_Batch_NDEItem ndei + LEFT JOIN [dbo].HJGL_Batch_BatchTrustItem bti ON bti.TrustBatchItemId=ndei.TrustBatchItemId + WHERE bti.WeldJointId=jot.WeldJointId) WHEN '1' THEN 'ϸ' WHEN '2' THEN 'ϸ' ELSE '' END) AS CheckResult -- + ,jot.PipelineId + ,jot.[JointArea] + ,jot.[WeldingLocationId] + ,jot.[HeartNo1] + ,jot.[HeartNo2] + ,jot.[IsHotProess] + ,jot.[WeldingDailyId] + ,jot.[BackingWelderId] + ,jot.[CoverWelderId] + ,jot.WeldingMode + ,jot.Remark + ,jot.IsTwoJoint + ,jot.SubmitMan + ,jot.AuditMan + ,jot.AuditMan2 + ,jot.AuditDate + ,jot.AuditDate2 + ,WeldingLocation.WeldingLocationCode + ,CASE WHEN jot.WeldingDailyId IS NULL THEN '' ELSE '' END AS IsWelding + ,CASE WHEN jot.IsHotProess=1 THEN '' ELSE '' END AS IsHotProessStr, + BackingWelder.PersonName AS BackingWelderName, + CoverWelder.PersonName 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 mat1.MaterialCode IS NOT NULL AND mat2.MaterialCode IS NOT NULL + THEN mat1.MaterialCode + '/' + mat2.MaterialCode + ELSE (ISNULL(mat1.MaterialCode,'') + ISNULL(mat2.MaterialCode,'')) END) AS MaterialCode, -- + + daily.WeldingDailyCode, + pointItem.PointBatchId, + point.PointBatchCode, + (CASE WHEN pointItem.PointState='1' THEN 'ѵ' WHEN pointItem.PointState='2' THEN '͸' ELSE '' END) AS IsPoint + FROM [dbo].[HJGL_WeldJoint] jot +LEFT JOIN dbo.HJGL_Pipeline pipe ON pipe.PipelineId=jot.PipelineId +LEFT JOIN dbo.WBS_UnitWork uw ON uw.UnitWorkId=pipe.UnitWorkId +LEFT JOIN dbo.Base_Unit unit ON unit.UnitId=pipe.UnitId +LEFT JOIN Base_WeldType AS WeldType ON WeldType.WeldTypeId=jot.WeldTypeId +LEFT JOIN dbo.Base_DetectionRate dr ON dr.DetectionRateId = pipe.DetectionRateId +LEFT JOIN Base_TestMedium tm ON tm.TestMediumId=pipe.TestMedium +LEFT JOIN Base_TestMedium tm2 ON tm2.TestMediumId=pipe.LeakMedium +LEFT JOIN Base_PurgeMethod pm ON pm.PurgeMethodId=pipe.PCMedium +LEFT JOIN Base_PressurePipingClass ppc ON ppc.PressurePipingClassId=pipe.PressurePipingClassId +LEFT JOIN Base_Material AS mat ON mat.MaterialId = pipe.MaterialId +LEFT JOIN Base_Material AS mat1 ON mat1.MaterialId = jot.Material1Id +LEFT JOIN Base_Material AS mat2 ON mat2.MaterialId = jot.Material2Id +LEFT JOIN Base_WeldingMethod AS WeldingMethod ON WeldingMethod.WeldingMethodId=jot.WeldingMethodId +LEFT JOIN Base_WeldingLocation AS WeldingLocation ON WeldingLocation.WeldingLocationId=jot.WeldingLocationId +LEFT JOIN Base_Consumables AS wire ON wire.ConsumablesId=jot.WeldingWire +LEFT JOIN Base_Consumables AS rod ON rod.ConsumablesId=jot.WeldingRod +LEFT JOIN Base_GrooveType AS GrooveType ON GrooveType.GrooveTypeId=jot.GrooveTypeId +LEFT JOIN Base_Components AS com1 ON com1.ComponentsId = jot.Components1Id +LEFT JOIN Base_Components AS com2 ON com2.ComponentsId = jot.Components2Id +LEFT JOIN SitePerson_Person AS BackingWelder ON BackingWelder.PersonId=jot.BackingWelderId and BackingWelder.ProjectId=jot.ProjectId +LEFT JOIN SitePerson_Person AS CoverWelder ON CoverWelder.PersonId=jot.CoverWelderId and CoverWelder.ProjectId=jot.ProjectId +LEFT JOIN dbo.HJGL_WeldingDaily AS daily ON daily.WeldingDailyId=jot.WeldingDailyId +LEFT JOIN Base_PipingClass AS pipingClass ON pipingClass.PipingClassId=pipe.PipingClassId +LEFT JOIN dbo.Base_Medium medium ON medium.MediumId = pipe.MediumId +LEFT JOIN dbo.Base_DetectionType ndt ON ndt.DetectionTypeId = jot.DetectionTypeId +LEFT JOIN dbo.WPQ_WPQList wps ON wps.WPQId = jot.WPQId +LEFT JOIN dbo.HJGL_Batch_PointBatchItem pointItem ON pointItem.WeldJointId = jot.WeldJointId +LEFT JOIN dbo.HJGL_Batch_PointBatch point ON point.PointBatchId = pointItem.PointBatchId + + + + +GO + + diff --git a/SGGL/BLL/HJGL/WeldingManage/PipelineService.cs b/SGGL/BLL/HJGL/WeldingManage/PipelineService.cs index 8ec4b3db..96d64f9a 100644 --- a/SGGL/BLL/HJGL/WeldingManage/PipelineService.cs +++ b/SGGL/BLL/HJGL/WeldingManage/PipelineService.cs @@ -20,24 +20,24 @@ namespace BLL /// /// 工厂预制 /// - public const string PipeArea_SHOP="1"; + public const string PipeArea_SHOP = "1"; /// /// 现场安装 /// - public const string PipeArea_FIELD = "2"; + public const string PipeArea_FIELD = "2"; public const int pageSize = 20; public static List hJGL_Pipelines { - - get; - set; - + + get; + set; + } /// /// 实际日期类型 /// - public enum ActDateType + public enum ActDateType { /// /// 实际开始日期(预制) @@ -46,16 +46,16 @@ namespace BLL /// /// 实际完成日期(预制) /// - ActDateEnd_Shop , + ActDateEnd_Shop, /// /// 实际开始日期(安装) /// - ActDateStart_FIELD , + ActDateStart_FIELD, /// /// 实际完成日期(安装) /// - ActDateEnd_FIELD , - } + ActDateEnd_FIELD, + } /// /// 管线划分 /// @@ -67,7 +67,7 @@ namespace BLL list[1] = new ListItem("现场安装", PipeArea_FIELD); return list; } - public static void RestPipelineAndJoints(string projectid ) + public static void RestPipelineAndJoints(string projectid) { PipelineService.hJGL_Pipelines = PipelineService.GetPipelinesByProjectId(projectid); WeldJointService.hJGL_WeldJoints = WeldJointService.GetWeldJointByProjectid(projectid); @@ -92,7 +92,7 @@ namespace BLL var PlanEndDate = mdoel.PlanEndDate; var ActStartDate = new DateTime?(); var ActEndDate = new DateTime?(); - if (!string .IsNullOrEmpty(GetDateByPipelineId(pipelineId, ActDateType.ActDateStart_FIELD))) + if (!string.IsNullOrEmpty(GetDateByPipelineId(pipelineId, ActDateType.ActDateStart_FIELD))) { ActStartDate = Convert.ToDateTime(GetDateByPipelineId(pipelineId, ActDateType.ActDateStart_FIELD)); } @@ -100,22 +100,22 @@ namespace BLL { ActEndDate = Convert.ToDateTime(GetDateByPipelineId(pipelineId, ActDateType.ActDateEnd_FIELD)); } - if (PlanStartDate==null|| PlanEndDate==null) + if (PlanStartDate == null || PlanEndDate == null) { mdoel.State = 0; UpdatePipeline(mdoel); return; } - if (ActStartDate==null&&DateTime.Compare(DateTime.Now,PlanStartDate.Value)<0) + if (ActStartDate == null && DateTime.Compare(DateTime.Now, PlanStartDate.Value) < 0) { mdoel.State = 0; } - else if(ActStartDate == null && DateTime.Compare(DateTime.Now, PlanStartDate.Value) > 0) + else if (ActStartDate == null && DateTime.Compare(DateTime.Now, PlanStartDate.Value) > 0) { mdoel.State = 1; } - else if (ActStartDate!=null && DateTime.Compare(ActStartDate.Value, PlanStartDate.Value)<0 && ActEndDate==null) + else if (ActStartDate != null && DateTime.Compare(ActStartDate.Value, PlanStartDate.Value) < 0 && ActEndDate == null) { mdoel.State = 2; } @@ -138,7 +138,7 @@ namespace BLL /// public static string GetDateByPipelineId(object pipelineId, ActDateType actDateType) { - string result =""; + string result = ""; string _pipelineId = pipelineId.ToString(); string ActDateStart_Shop = ""; string ActDateEnd_Shop = ""; @@ -149,15 +149,16 @@ namespace BLL var joints = BLL.WeldJointService.GetWeldJointsByPipelineId(_pipelineId); int joint_Shop_count = joints.Where(x => x.JointAttribute == "预制口").Count(); int joint_Field_count = joints.Where(x => x.JointAttribute == "安装口").Count(); - var TaskJoints = (from x in Funs.DB.View_HJGL_WeldingTask where x.ProjectId == pipemodel.ProjectId && x.PipelineCode == pipemodel.PipelineCode && x.WeldingDailyId!=null - select x).ToList(); + var TaskJoints = (from x in Funs.DB.View_HJGL_WeldingTask + where x.ProjectId == pipemodel.ProjectId && x.PipelineCode == pipemodel.PipelineCode && x.WeldingDailyId != null + select x).ToList(); var TaskJoints_Shop = TaskJoints.Where(x => x.JointAttribute == "预制口").ToList(); - var TaskJoints_Field= TaskJoints.Where(x => x.JointAttribute == "安装口").ToList(); - if (TaskJoints_Shop.Count>0) + var TaskJoints_Field = TaskJoints.Where(x => x.JointAttribute == "安装口").ToList(); + if (TaskJoints_Shop.Count > 0) { ActDateStart_Shop = TaskJoints_Shop.OrderBy(x => x.TaskDate).First().TaskDate.Value.ToShortDateString(); } - if (joint_Shop_count== TaskJoints_Shop.Count&& joint_Shop_count>0) + if (joint_Shop_count == TaskJoints_Shop.Count && joint_Shop_count > 0) { ActDateEnd_Shop = TaskJoints_Shop.OrderByDescending(x => x.TaskDate).First().TaskDate.Value.Date.ToShortDateString(); } @@ -194,14 +195,14 @@ namespace BLL /// public static void UpdataDateByWeldJointId(string WeldJointId) { - - DateTime ? ActDateStart_FIELD = new DateTime(); - DateTime ? ActDateEnd_FIELD = new DateTime(); + + DateTime? ActDateStart_FIELD = new DateTime(); + DateTime? ActDateEnd_FIELD = new DateTime(); string JointAttribute = ""; - var model_joint=BLL.WeldJointService.GetWeldJointByWeldJointId(WeldJointId); - if (model_joint!=null) + var model_joint = BLL.WeldJointService.GetWeldJointByWeldJointId(WeldJointId); + if (model_joint != null) { JointAttribute = model_joint.JointAttribute; var model_pipeline = GetPipelineByPipelineId(model_joint.PipelineId); @@ -211,7 +212,7 @@ namespace BLL select x).ToList(); switch (JointAttribute) { - + case "安装口": int joint_Field_count = joints.Where(x => x.JointAttribute == "安装口").Count(); var TaskJoints_Field = TaskJoints.Where(x => x.JointAttribute == "安装口").ToList(); @@ -231,8 +232,8 @@ namespace BLL break; } - } - + } + } /// /// 根据管线code获取管线信息 @@ -251,8 +252,8 @@ namespace BLL public static List GetHJGL_PipelineList(HJGL_Pipeline model) { var db = Funs.DB; - var pipelineList =( from x in Funs.DB.HJGL_Pipeline - where + var pipelineList = (from x in Funs.DB.HJGL_Pipeline + where (string.IsNullOrEmpty(model.ProjectId) || x.ProjectId.Contains(model.ProjectId)) && (string.IsNullOrEmpty(model.UnitWorkId) || x.UnitWorkId.Contains(model.UnitWorkId)) && (string.IsNullOrEmpty(model.PipelineCode) || x.PipelineCode.Contains(model.PipelineCode)) @@ -260,15 +261,15 @@ namespace BLL && (string.IsNullOrEmpty(model.DesignPress) || x.DesignPress.Contains(model.DesignPress)) /* && (string.IsNullOrEmpty(model.MaterialCode) || x.MaterialCode.Contains(model.MaterialCode))*/ select x).ToList(); - if (model.IsFinished!=null) + if (model.IsFinished != null) { - if (model.IsFinished==true) + if (model.IsFinished == true) { - pipelineList= pipelineList.Where(x => x.IsFinished == true).ToList(); + pipelineList = pipelineList.Where(x => x.IsFinished == true).ToList(); } else { - pipelineList = pipelineList.Where(x => x.IsFinished == false||x.IsFinished==null).ToList(); + pipelineList = pipelineList.Where(x => x.IsFinished == false || x.IsFinished == null).ToList(); } @@ -338,16 +339,17 @@ namespace BLL /// /// /// - public static List GetNoComPipelinesByUnitWordId(string unitworkId) + public static List GetNoComPipelinesByUnitWordId(string unitworkId) { var q = (from x in Funs.DB.View_HJGL_WeldJoint - where x.UnitWorkId == unitworkId - select new { - PipelineId=x.PipelineId, - WeldingDate=x.WeldingDate, - PipelineCode=x.PipelineCode + where x.UnitWorkId == unitworkId + select new + { + PipelineId = x.PipelineId, + WeldingDate = x.WeldingDate, + PipelineCode = x.PipelineCode }).Distinct(); - if (q.Count()==0) + if (q.Count() == 0) { return new List(); } @@ -359,10 +361,10 @@ namespace BLL Count = (from x2 in g where x2.WeldingDate != null && x2.WeldingDate != "" select x2).Count(), }; var NowComPipelineCode = (from x in q - join y in noCompipeline on x.PipelineId equals y.PipelineId - where y.Count == 0 - select x.PipelineCode - ).Distinct(). ToList(); + join y in noCompipeline on x.PipelineId equals y.PipelineId + where y.Count == 0 + select x.PipelineCode + ).Distinct().ToList(); return NowComPipelineCode; } /// @@ -370,7 +372,7 @@ namespace BLL /// /// /// - public static void DownPipeArea_SHOPFile(string projectid,string unitworkid) + public static void DownPipeArea_SHOPFile(string projectid, string unitworkid) { string templatePath = Funs.RootPath + @"File\Excel\DataOut\WeldingPlanDataOut_SHOP.xlsx"; string path = Funs.RootPath + @"File\Excel\DataOut\WeldingPlanDataOut_SHOP.xlsx"; @@ -442,7 +444,7 @@ namespace BLL ["Data"] = tb, }; MiniExcel.SaveAsByTemplate(path, templatePath, value); - HJGL_DataImportService.DownFile(path.Replace(Funs.RootPath,"") , "焊接施工计划(预制).xlsx"); + HJGL_DataImportService.DownFile(path.Replace(Funs.RootPath, ""), "焊接施工计划(预制).xlsx"); File.Delete(path); } /// @@ -451,7 +453,7 @@ namespace BLL /// /// public static void DownPipeArea_FIELDFile(string projectid, string unitworkid) - { + { string templatePath = Funs.RootPath + @"File\Excel\DataOut\WeldingPlanDataOut2.xlsx"; string path = Funs.RootPath + @"File\Excel\DataOut\WeldingPlanDataOut2.xlsx"; path = path.Replace(".xlsx", string.Format("{0:yyyy-MM-dd-HH-mm}", DateTime.Now) + ".xlsx"); @@ -555,10 +557,10 @@ namespace BLL q = Funs.DB.HJGL_Pipeline.FirstOrDefault(x => x.PipelineCode == pipelineCode && x.UnitWorkId == unitWorkId); return q; } - /// - /// 添加管线信息 - /// - /// + /// + /// 添加管线信息 + /// + /// public static void AddPipeline(Model.HJGL_Pipeline pipeline) { Model.SGGLDB db = Funs.DB; @@ -589,7 +591,7 @@ namespace BLL newPipeline.PCtype = pipeline.PCtype; newPipeline.MaterialId = pipeline.MaterialId; newPipeline.State = pipeline.State; - newPipeline.FlowingSection=pipeline.FlowingSection; + newPipeline.FlowingSection = pipeline.FlowingSection; db.HJGL_Pipeline.InsertOnSubmit(newPipeline); db.SubmitChanges(); } @@ -755,7 +757,7 @@ namespace BLL } } - public static void BindTreeNodes(FineUIPro.TreeNode node,string pipecode,string ProjectId,int pageSize) + public static void BindTreeNodes(FineUIPro.TreeNode node, string pipecode, string ProjectId, int pageSize) { var pipeline = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == ProjectId && x.UnitWorkId == node.NodeID @@ -798,7 +800,7 @@ namespace BLL /// /// /// - public static void BindTreeNodes(FineUIPro.TreeNode node, string pipecode,string MaterialCode, string ProjectId, int pageSize) + public static void BindTreeNodes(FineUIPro.TreeNode node, string pipecode, string MaterialCode, string ProjectId, int pageSize) { //var pipeline = (from x in Funs.DB.HJGL_Pipeline // where x.ProjectId == ProjectId && x.UnitWorkId == node.NodeID @@ -806,8 +808,8 @@ namespace BLL // orderby x.PipelineCode // select x).ToList(); var pipeline = (from x in Funs.DB.HJGL_Pipeline - join y in Funs.DB.HJGL_PipeLineMat.Where(m => m.MaterialCode.Contains(MaterialCode)) on x.PipelineId equals y.PipelineId - where x.ProjectId == ProjectId && x.UnitWorkId == node.NodeID && x.PipelineCode.Contains(pipecode) + join y in Funs.DB.HJGL_PipeLineMat.Where(m => m.MaterialCode.Contains(MaterialCode)) on x.PipelineId equals y.PipelineId + where x.ProjectId == ProjectId && x.UnitWorkId == node.NodeID && x.PipelineCode.Contains(pipecode) select x).Distinct().ToList(); var hJGL_WeldJoints = (from x in Funs.DB.HJGL_WeldJoint where x.ProjectId == ProjectId select x).ToList(); int pageindex = int.Parse(node.CommandName.Split('|')[0]); @@ -837,23 +839,28 @@ namespace BLL } } } - public static void BindTreeNodes(FineUIPro.TreeNode node,bool isExitWPQId, string pipecode, string ProjectId, int pageSize) + public static void BindTreeNodes(FineUIPro.TreeNode node, bool isExitWPQId, string pipecode, string ProjectId, int pageSize, string pipeArea) { + string pipeAreasql = string.Empty; + if (pipeArea != BLL.Const._Null) + { + pipeAreasql += " AND PipeArea='" + pipeArea + "'"; + } if (isExitWPQId) { - string strSql = "SELECT distinct PipelineId, PipelineCode FROM View_HJGL_WeldJoint WHERE IsTwoJoint IS NULL AND UnitWorkId =@UnitWorkId AND WPQId IS NULL order by PipelineCode"; + string strSql = "SELECT distinct PipelineId, PipelineCode FROM View_HJGL_WeldJoint WHERE IsTwoJoint IS NULL AND UnitWorkId =@UnitWorkId AND WPQId IS NULL" + pipeAreasql + " order by PipelineCode"; List listStr = new List(); listStr.Add(new SqlParameter("@UnitWorkId", node.NodeID)); - if (!string .IsNullOrEmpty(pipecode)) + if (!string.IsNullOrEmpty(pipecode)) { strSql += " and PipelineCode=@PipelineCode "; - listStr.Add(new SqlParameter("@PipelineCode", ""+ pipecode + "")); + listStr.Add(new SqlParameter("@PipelineCode", "" + pipecode + "")); } SqlParameter[] parameter = listStr.ToArray(); System.Data.DataTable dt = SQLHelper.GetDataTableRunText(strSql, parameter); var pipeline = Funs.TableToEntity(dt); - + var hJGL_WeldJoints = (from x in Funs.DB.HJGL_WeldJoint where x.ProjectId == ProjectId select x).ToList(); int pageindex = int.Parse(node.CommandName.Split('|')[0]); int pageCount = int.Parse(node.CommandName.Split('|')[1]); @@ -890,6 +897,10 @@ namespace BLL && x.PipelineCode.Contains(pipecode) orderby x.PipelineCode select x).ToList(); + if (pipeArea != BLL.Const._Null) + { + pipeline = pipeline.Where(x => x.PipeArea == pipeArea).ToList(); + } var hJGL_WeldJoints = (from x in Funs.DB.HJGL_WeldJoint where x.ProjectId == ProjectId select x).ToList(); int pageindex = int.Parse(node.CommandName.Split('|')[0]); int pageCount = int.Parse(node.CommandName.Split('|')[1]); diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldingConDate.aspx b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldingConDate.aspx index cac234bf..ec4922f8 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldingConDate.aspx +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldingConDate.aspx @@ -37,6 +37,10 @@ + + 0) { foreach (var q in unitWork1) @@ -83,7 +93,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage int a = 0; if (ckNOEdit.Checked) { - string strSql = "SELECT distinct PipelineCode FROM View_HJGL_WeldJoint WHERE IsTwoJoint IS NULL AND UnitWorkId =@UnitWorkId AND WPQId IS NULL"; + string strSql = "SELECT distinct PipelineCode FROM View_HJGL_WeldJoint WHERE IsTwoJoint IS NULL AND UnitWorkId =@UnitWorkId AND WPQId IS NULL" + pipeAreasql; List listStr = new List(); listStr.Add(new SqlParameter("@UnitWorkId", q.UnitWorkId)); SqlParameter[] parameter = listStr.ToArray(); @@ -93,7 +103,14 @@ namespace FineUIPro.Web.HJGL.WeldingManage } else { - a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId select x).Count(); + if (this.drpPipeArea.SelectedValue == BLL.Const._Null) + { + a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId select x).Count(); + } + else + { + a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId && x.PipeArea == this.drpPipeArea.SelectedValue select x).Count(); + } } var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId); @@ -122,7 +139,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage int a = 0; if (ckNOEdit.Checked) { - string strSql = "SELECT distinct PipelineCode FROM View_HJGL_WeldJoint WHERE IsTwoJoint IS NULL AND UnitWorkId =@UnitWorkId AND WPQId IS NULL"; + string strSql = "SELECT distinct PipelineCode FROM View_HJGL_WeldJoint WHERE IsTwoJoint IS NULL AND UnitWorkId =@UnitWorkId AND WPQId IS NULL" + pipeAreasql; List listStr = new List(); listStr.Add(new SqlParameter("@UnitWorkId", q.UnitWorkId)); SqlParameter[] parameter = listStr.ToArray(); @@ -132,11 +149,20 @@ namespace FineUIPro.Web.HJGL.WeldingManage } else { - a = (from x in Funs.DB.HJGL_Pipeline + if (this.drpPipeArea.SelectedValue == BLL.Const._Null) + { + a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId && x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim()) select x).Count(); - + } + else + { + a = (from x in Funs.DB.HJGL_Pipeline + where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId + && x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim()) && x.PipeArea == this.drpPipeArea.SelectedValue + select x).Count(); + } } var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId); TreeNode tn2 = new TreeNode(); @@ -170,11 +196,11 @@ namespace FineUIPro.Web.HJGL.WeldingManage e.Node.Nodes.Clear(); BindNodes(e.Node); } - + } private void BindNodes(TreeNode node) { - BLL.PipelineService.BindTreeNodes(node, ckNOEdit.Checked, this.txtPipelineCode.Text.Trim(), this.CurrUser.LoginProjectId, pageSize); + BLL.PipelineService.BindTreeNodes(node, ckNOEdit.Checked, this.txtPipelineCode.Text.Trim(), this.CurrUser.LoginProjectId, pageSize, this.drpPipeArea.SelectedValue); } #endregion @@ -203,7 +229,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) { - + if (tvControlItem.SelectedNode.CommandName == "管线") { Model.HJGL_Pipeline pipeline = BLL.PipelineService.GetPipelineByPipelineId(this.tvControlItem.SelectedNodeID); @@ -221,7 +247,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage } } } - + } #endregion @@ -375,16 +401,16 @@ namespace FineUIPro.Web.HJGL.WeldingManage { if (!string.IsNullOrEmpty(tvControlItem.SelectedNodeID)) { - var jotList = from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == tvControlItem.SelectedNodeID &&x.JointAttribute==drpJointAttribute.SelectedValue select x; + var jotList = from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == tvControlItem.SelectedNodeID && x.JointAttribute == drpJointAttribute.SelectedValue select x; if (jotList.Count() > 0) { foreach (var jot in jotList) { - List wpqList =BLL.WPQListServiceService.GetMatchWPQ(jot,this.CurrUser.LoginProjectId, drpUnit.SelectedValue); + List wpqList = BLL.WPQListServiceService.GetMatchWPQ(jot, this.CurrUser.LoginProjectId, drpUnit.SelectedValue); Model.HJGL_WeldJoint newJot = new Model.HJGL_WeldJoint(); if (wpqList != null) { - + Model.WPQ_WPQList wps = BLL.WPQListServiceService.GetWPQById(wpqList.First().WPQId); newJot.WPQId = wps.WPQId; @@ -397,7 +423,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage newJot.IsHotProess = wps.IsHotProess; newJot.MatchableWPQ = string.Join(",", wpqList.Select(x => x.WPQCode)); - + } else { diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldingConDate.aspx.designer.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldingConDate.aspx.designer.cs index 831d6804..b9d45417 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldingConDate.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldingConDate.aspx.designer.cs @@ -7,13 +7,11 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.HJGL.WeldingManage -{ - - - public partial class WeldingConDate - { - +namespace FineUIPro.Web.HJGL.WeldingManage { + + + public partial class WeldingConDate { + /// /// form1 控件。 /// @@ -22,7 +20,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -31,7 +29,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// Panel1 控件。 /// @@ -40,7 +38,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel1; - + /// /// panelLeftRegion 控件。 /// @@ -49,7 +47,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel panelLeftRegion; - + /// /// Toolbar1 控件。 /// @@ -58,7 +56,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar1; - + /// /// txtPipelineCode 控件。 /// @@ -67,7 +65,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtPipelineCode; - + /// /// ckNOEdit 控件。 /// @@ -76,7 +74,16 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.CheckBox ckNOEdit; - + + /// + /// drpPipeArea 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpPipeArea; + /// /// hdUnitWorkId 控件。 /// @@ -85,7 +92,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.HiddenField hdUnitWorkId; - + /// /// btnTreeFind 控件。 /// @@ -94,7 +101,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnTreeFind; - + /// /// tvControlItem 控件。 /// @@ -103,7 +110,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Tree tvControlItem; - + /// /// panelCenterRegion 控件。 /// @@ -112,7 +119,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel panelCenterRegion; - + /// /// Toolbar3 控件。 /// @@ -121,7 +128,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar3; - + /// /// txtWeldJointCode 控件。 /// @@ -130,7 +137,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtWeldJointCode; - + /// /// rbInput 控件。 /// @@ -139,7 +146,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.RadioButtonList rbInput; - + /// /// drpUnit 控件。 /// @@ -148,7 +155,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpUnit; - + /// /// drpJointAttribute 控件。 /// @@ -157,7 +164,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpJointAttribute; - + /// /// ToolbarFill1 控件。 /// @@ -166,7 +173,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarFill ToolbarFill1; - + /// /// btnAutoInput 控件。 /// @@ -175,7 +182,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnAutoInput; - + /// /// btnEdit 控件。 /// @@ -184,7 +191,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnEdit; - + /// /// Grid1 控件。 /// @@ -193,7 +200,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid1; - + /// /// ToolbarSeparator1 控件。 /// @@ -202,7 +209,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; - + /// /// ToolbarText1 控件。 /// @@ -211,7 +218,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarText ToolbarText1; - + /// /// ddlPageSize 控件。 /// @@ -220,7 +227,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList ddlPageSize; - + /// /// Window1 控件。 /// @@ -229,7 +236,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window Window1; - + /// /// Window2 控件。 /// @@ -238,7 +245,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window Window2; - + /// /// Window3 控件。 /// @@ -247,7 +254,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window Window3; - + /// /// Menu 控件。 /// @@ -256,7 +263,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Menu Menu; - + /// /// btnMenuEdit 控件。 /// @@ -265,7 +272,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnMenuEdit; - + /// /// btnView 控件。 /// diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs index d5755eb8..348bf7fd 100644 --- a/SGGL/Model/Model.cs +++ b/SGGL/Model/Model.cs @@ -273628,6 +273628,8 @@ namespace Model private string _TwoJointType; + private string _PipeArea; + private System.Nullable _WeldingDateD; private string _WeldingDate; @@ -274814,6 +274816,22 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PipeArea", DbType="NChar(1)")] + public string PipeArea + { + get + { + return this._PipeArea; + } + set + { + if ((this._PipeArea != value)) + { + this._PipeArea = value; + } + } + } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WeldingDateD", DbType="DateTime")] public System.Nullable WeldingDateD { @@ -293173,7 +293191,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(50)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(200)")] public string Name { get @@ -293734,7 +293752,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(50)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(200)")] public string PackageContent { get @@ -293925,7 +293943,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(50)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(200)")] public string PackageContent { get @@ -299184,7 +299202,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(50)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(200)")] public string PackageContent { get From 1530dd850b6ce87f0d1d169589a596b6c801b393 Mon Sep 17 00:00:00 2001 From: gaofei1985 <181547018@qq.com> Date: Thu, 23 Nov 2023 16:50:57 +0800 Subject: [PATCH 06/26] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DataBase/版本日志/SGGLDB_V2023-11-23.sql | 5 + .../1-5焊接管理(Menu_HJGL).sql | 6 + SGGL/BLL/Common/Const.cs | 4 + SGGL/BLL/HJGL/PersonManage/WelderService.cs | 4 +- SGGL/BLL/HJGL/PointTrust/PointBatchService.cs | 61 +++-- .../HJGL/WeldingManage/WeldJointService.cs | 43 ++-- .../CQMS/PersonManage/WelderManage.aspx | 9 + .../CQMS/PersonManage/WelderManage.aspx.cs | 6 +- .../WelderManage.aspx.designer.cs | 106 +++++---- .../PersonManage/WelderManageEdit.aspx.cs | 19 +- .../File/Excel/DataOut/焊口二次设计信息.xlsx | Bin 0 -> 9482 bytes SGGL/FineUIPro.Web/FineUIPro.Web.csproj | 8 + .../HJGL/PersonManage/WelderManage.aspx | 9 + .../HJGL/PersonManage/WelderManage.aspx.cs | 20 +- .../WelderManage.aspx.designer.cs | 100 ++++---- .../PersonManage/WelderManageEdit.aspx.cs | 4 +- .../HJGL/WeldingManage/JotTwoDesign.aspx | 3 + .../HJGL/WeldingManage/JotTwoDesign.aspx.cs | 219 +++++++++++++----- .../JotTwoDesign.aspx.designer.cs | 9 + .../WeldingManage/PipelineListPDMSIn.aspx.cs | 100 ++++---- .../HJGL/WeldingManage/WeldJointList.aspx | 2 +- .../HJGL/WeldingManage/WeldJointView.aspx | 14 ++ .../HJGL/WeldingManage/WeldJointView.aspx.cs | 5 + .../WeldJointView.aspx.designer.cs | 27 +++ .../HJGL/WeldingReport/CheckResult.aspx | 99 ++++++++ .../HJGL/WeldingReport/CheckResult.aspx.cs | 174 ++++++++++++++ .../CheckResult.aspx.designer.cs | 168 ++++++++++++++ 27 files changed, 974 insertions(+), 250 deletions(-) create mode 100644 DataBase/版本日志/SGGLDB_V2023-11-23.sql create mode 100644 SGGL/FineUIPro.Web/File/Excel/DataOut/焊口二次设计信息.xlsx create mode 100644 SGGL/FineUIPro.Web/HJGL/WeldingReport/CheckResult.aspx create mode 100644 SGGL/FineUIPro.Web/HJGL/WeldingReport/CheckResult.aspx.cs create mode 100644 SGGL/FineUIPro.Web/HJGL/WeldingReport/CheckResult.aspx.designer.cs diff --git a/DataBase/版本日志/SGGLDB_V2023-11-23.sql b/DataBase/版本日志/SGGLDB_V2023-11-23.sql new file mode 100644 index 00000000..a2f11d5d --- /dev/null +++ b/DataBase/版本日志/SGGLDB_V2023-11-23.sql @@ -0,0 +1,5 @@ + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('2C66A01D-B53F-46A1-89F0-30ED137C7498','','HJGL/WeldingReport/CheckResult.aspx',100,'F3B157B7-9BEE-4150-80CB-087828F1C51D','Menu_HJGL',0,1,1) + GO + INSERT INTO Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES('C5671119-2DDD-4A64-B7C6-492B96C5AEC7','2C66A01D-B53F-46A1-89F0-30ED137C7498','鿴',1) + GO \ No newline at end of file diff --git a/DataBase/菜单初始化脚本/1-5焊接管理(Menu_HJGL).sql b/DataBase/菜单初始化脚本/1-5焊接管理(Menu_HJGL).sql index 20cc9602..a72dea5c 100644 --- a/DataBase/菜单初始化脚本/1-5焊接管理(Menu_HJGL).sql +++ b/DataBase/菜单初始化脚本/1-5焊接管理(Menu_HJGL).sql @@ -543,6 +543,12 @@ GO INSERT INTO Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES('47A49DB1-4689-421A-A93E-DCBD7C34D917','854C79DF-A1C0-4E3C-BCB4-7D5CD044F72B','鿴',1) GO + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('2C66A01D-B53F-46A1-89F0-30ED137C7498','','HJGL/WeldingReport/CheckResult.aspx',100,'F3B157B7-9BEE-4150-80CB-087828F1C51D','Menu_HJGL',0,1,1) + GO + INSERT INTO Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES('C5671119-2DDD-4A64-B7C6-492B96C5AEC7','2C66A01D-B53F-46A1-89F0-30ED137C7498','鿴',1) + GO + --INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) --VALUES('CF3CB43C-4031-4CFD-905F-154DC1CB881E','ۺϢ','HJGL/WeldingReport/IsoCompreInfo.aspx',80,'F3B157B7-9BEE-4150-80CB-087828F1C51D','Menu_HJGL',0,1,1) diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs index 3a88432f..1ae05411 100644 --- a/SGGL/BLL/Common/Const.cs +++ b/SGGL/BLL/Common/Const.cs @@ -3451,6 +3451,10 @@ namespace BLL /// 公司平均工效统计模板文件原始虚拟路径 /// public const string CompanyConstructionLogWorkEfficiencyTemplateUrl = "File\\Excel\\ConstructionLog\\公司平均工效统计.xlsx"; + /// + /// 焊口二次设计信息模板文件原始虚拟路径 + /// + public const string JotTwoDesignTemplateUrl = "File\\Excel\\DataOut\\焊口二次设计信息.xlsx"; #endregion #region 初始化上传路径 diff --git a/SGGL/BLL/HJGL/PersonManage/WelderService.cs b/SGGL/BLL/HJGL/PersonManage/WelderService.cs index 937ad266..5d363875 100644 --- a/SGGL/BLL/HJGL/PersonManage/WelderService.cs +++ b/SGGL/BLL/HJGL/PersonManage/WelderService.cs @@ -65,10 +65,10 @@ namespace BLL /// /// /// - public static bool IsExisWelderCode(string welderId, string welderCode) + public static bool IsExisWelderCode(string welderId, string welderCode, string projectId) { bool isExitCode = false; - var q = from x in Funs.DB.SitePerson_Person where x.WelderCode == welderCode && x.PersonId != welderId select x; + var q = from x in Funs.DB.SitePerson_Person where x.WelderCode == welderCode && x.PersonId != welderId && x.ProjectId == projectId select x; if (q.Count() > 0) { isExitCode = true; diff --git a/SGGL/BLL/HJGL/PointTrust/PointBatchService.cs b/SGGL/BLL/HJGL/PointTrust/PointBatchService.cs index c0be47d9..db4ebadd 100644 --- a/SGGL/BLL/HJGL/PointTrust/PointBatchService.cs +++ b/SGGL/BLL/HJGL/PointTrust/PointBatchService.cs @@ -100,31 +100,31 @@ namespace BLL { var newWeldJoint = BLL.WeldJointService.GetWeldJointByWeldJointId(weldJointId); - if (newWeldJoint != null ) + if (newWeldJoint != null) { var isTrust = from x in Funs.DB.HJGL_Batch_BatchTrustItem where x.WeldJointId == weldJointId select x; ; if (!isTrust.Any()) - { - var pointBatchItems = from x in Funs.DB.HJGL_Batch_PointBatchItem where x.WeldJointId == weldJointId select x; - string pointBatchId = pointBatchItems.FirstOrDefault()?.PointBatchId; + { + var pointBatchItems = from x in Funs.DB.HJGL_Batch_PointBatchItem where x.WeldJointId == weldJointId select x; + string pointBatchId = pointBatchItems.FirstOrDefault()?.PointBatchId; - // 删除焊口所在批明细信息 - BLL.PointBatchDetailService.DeleteBatchDetail(weldJointId); + // 删除焊口所在批明细信息 + BLL.PointBatchDetailService.DeleteBatchDetail(weldJointId); + + // 删除批信息 + var batch = from x in Funs.DB.HJGL_Batch_PointBatchItem where x.PointBatchId == pointBatchId select x; + if (!string.IsNullOrEmpty(pointBatchId) && !batch.Any()) + { + DeleteBatch(pointBatchId); + } + //BLL.Batch_NDEItemService.DeleteAllNDEInfoToWeldJoint(item.WeldJointId); - // 删除批信息 - var batch = from x in Funs.DB.HJGL_Batch_PointBatchItem where x.PointBatchId == pointBatchId select x; - if (!string .IsNullOrEmpty(pointBatchId) && !batch.Any()) - { - DeleteBatch(pointBatchId); - } - //BLL.Batch_NDEItemService.DeleteAllNDEInfoToWeldJoint(item.WeldJointId); - } else { - // errlog += "焊口【" + newWeldJoint.WeldJointCode + "】已进委托单了,不能删除。"; + // errlog += "焊口【" + newWeldJoint.WeldJointCode + "】已进委托单了,不能删除。"; } } } @@ -138,7 +138,7 @@ namespace BLL var newWeldJoint = BLL.WeldJointService.GetWeldJointByWeldJointId(weldJointId); var pipeline = BLL.PipelineService.GetPipelineByPipelineId(newWeldJoint.PipelineId); var project = BLL.ProjectService.GetProjectByProjectId(pipeline.ProjectId); - var unitWork = BLL.UnitWorkService.GetUnitWorkByUnitWorkId(pipeline.UnitWorkId); + var unitWork = BLL.UnitWorkService.GetUnitWorkByUnitWorkId(pipeline.UnitWorkId); var WeldingDaily = BLL.WeldingDailyService.GetPipeline_WeldingDailyByWeldingDailyId(newWeldJoint.WeldingDailyId); var ndt = BLL.Base_DetectionTypeService.GetDetectionTypeByDetectionTypeId(pipeline.DetectionType); var ndtr = BLL.Base_DetectionRateService.GetDetectionRateByDetectionRateId(pipeline.DetectionRateId); @@ -236,8 +236,33 @@ namespace BLL batch.PointBatchId = SQLHelper.GetNewID(typeof(Model.HJGL_Batch_PointBatch)); batchId = batch.PointBatchId; string perfix = project.ProjectCode + "-" + unitWork.UnitWorkCode + "-GD-DK-" + ndt.DetectionTypeCode + "-" + ndtr.DetectionRateValue.ToString() + "%-"; - batch.PointBatchCode = BLL.SQLHelper.RunProcNewIdByProjectId("SpGetNewCode4ByProjectId", "dbo.HJGL_Batch_PointBatch", "PointBatchCode", project.ProjectId, perfix); - + //batch.PointBatchCode = BLL.SQLHelper.RunProcNewIdByProjectId("SpGetNewCode4ByProjectId", "dbo.HJGL_Batch_PointBatch", "PointBatchCode", project.ProjectId, perfix); + var maxBatch = (from x in Funs.DB.HJGL_Batch_PointBatch where x.ProjectId == project.ProjectId && x.PointBatchCode.Contains(perfix) select x).FirstOrDefault(); + if (maxBatch == null) + { + batch.PointBatchCode = perfix + "0001"; + } + else + { + int code = Funs.GetNewIntOrZero(maxBatch.PointBatchCode.Substring(maxBatch.PointBatchCode.Length - 4)); + code = code + 1; + if (code < 10) + { + batch.PointBatchCode = perfix + "000" + code.ToString(); + } + else if (code >= 10 && code < 100) + { + batch.PointBatchCode = perfix + "00" + code.ToString(); + } + else if (code >= 100 && code < 1000) + { + batch.PointBatchCode = perfix + "0" + code.ToString(); + } + else + { + batch.PointBatchCode = perfix + code.ToString(); + } + } batch.ProjectId = project.ProjectId; batch.UnitWorkId = pipeline.UnitWorkId; batch.BatchCondition = batchCondition; diff --git a/SGGL/BLL/HJGL/WeldingManage/WeldJointService.cs b/SGGL/BLL/HJGL/WeldingManage/WeldJointService.cs index dda5a978..805526f8 100644 --- a/SGGL/BLL/HJGL/WeldingManage/WeldJointService.cs +++ b/SGGL/BLL/HJGL/WeldingManage/WeldJointService.cs @@ -9,7 +9,7 @@ namespace BLL { public static class WeldJointService { - public static List hJGL_WeldJoints + public static List hJGL_WeldJoints { get; @@ -66,14 +66,14 @@ namespace BLL } public static List GetWeldJointsByPipelineId(string PipelineId) { - var q = (from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == PipelineId select x).ToList(); + var q = (from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == PipelineId select x).ToList(); return q; } public static Model.HJGL_WeldJoint GetWeldJointsByWeldJointCode(string PipelineId, string WeldJointCode) - { - var q=(from x in Funs.DB.HJGL_WeldJoint where x.PipelineId==PipelineId && x.WeldJointCode==WeldJointCode select x ).FirstOrDefault(); - + { + var q = (from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == PipelineId && x.WeldJointCode == WeldJointCode select x).FirstOrDefault(); + return q; } @@ -87,7 +87,6 @@ namespace BLL Model.SGGLDB db = Funs.DB; Model.HJGL_WeldJoint newWeldJoint = new Model.HJGL_WeldJoint { - WeldJointId = SQLHelper.GetNewID(typeof(Model.HJGL_WeldJoint)), ProjectId = weldJoint.ProjectId, PipelineId = weldJoint.PipelineId, PipelineCode = weldJoint.PipelineCode, @@ -97,7 +96,7 @@ namespace BLL Material2Id = weldJoint.Material2Id, Thickness = weldJoint.Thickness, Dia = weldJoint.Dia, - DNDia=weldJoint.DNDia, + DNDia = weldJoint.DNDia, Size = weldJoint.Size, DetectionTypeId = weldJoint.DetectionTypeId, JointArea = weldJoint.JointArea, @@ -120,9 +119,16 @@ namespace BLL Remark = weldJoint.Remark, IsTwoJoint = weldJoint.IsTwoJoint, SubmitMan = weldJoint.SubmitMan, - TwoJointType=weldJoint.TwoJointType + TwoJointType = weldJoint.TwoJointType }; - + if (!string.IsNullOrEmpty(weldJoint.WeldJointId)) + { + newWeldJoint.WeldJointId = weldJoint.WeldJointId; + } + else + { + newWeldJoint.WeldJointId = SQLHelper.GetNewID(typeof(Model.HJGL_WeldJoint)); + } db.HJGL_WeldJoint.InsertOnSubmit(newWeldJoint); db.SubmitChanges(); } @@ -285,7 +291,7 @@ namespace BLL public static void DeleteWeldJointByPipelineId(string pipelineId) { Model.SGGLDB db = Funs.DB; - var weldline = db.HJGL_WeldJoint.Where(e => e.PipelineId == pipelineId); + var weldline = db.HJGL_WeldJoint.Where(e => e.PipelineId == pipelineId); if (weldline != null) { db.HJGL_WeldJoint.DeleteAllOnSubmit(weldline); @@ -297,7 +303,7 @@ namespace BLL /// 根据unitworkid删除焊口 /// /// - public static void DeleteWeldJointByUnitWorkId(string unitworkId) + public static void DeleteWeldJointByUnitWorkId(string unitworkId) { var oldPipeline = BLL.PipelineService.GetPipelinesByUnitWordId(unitworkId); if (oldPipeline != null) @@ -353,14 +359,14 @@ namespace BLL { Model.SGGLDB db = Funs.DB; var q = (from x in db.HJGL_WeldJoint - join y in db.HJGL_Pipeline on x.PipelineId equals y.PipelineId into tt - from g in tt.DefaultIfEmpty() - where g.UnitWorkId == UnitWorkId + join y in db.HJGL_Pipeline on x.PipelineId equals y.PipelineId into tt + from g in tt.DefaultIfEmpty() + where g.UnitWorkId == UnitWorkId select x).ToList(); return q; } - public static List GetWeldJointByProjectid(string ProjectId) + public static List GetWeldJointByProjectid(string ProjectId) { Model.SGGLDB db = Funs.DB; @@ -368,7 +374,7 @@ namespace BLL where x.ProjectId == ProjectId select x).ToList(); return q; - } + } /// /// 根据焊口Id获取插入焊口数 @@ -445,13 +451,14 @@ namespace BLL public static List GetViewWeldJointsBymodel(Model.View_HJGL_WeldJoint model) { var q = (from x in Funs.DB.View_HJGL_WeldJoint - where + where (string.IsNullOrEmpty(model.ProjectId) || x.ProjectId.Contains(model.ProjectId)) && (string.IsNullOrEmpty(model.UnitWorkId) || x.UnitWorkId.Contains(model.UnitWorkId)) && (string.IsNullOrEmpty(model.PipelineId) || x.PipelineId.Contains(model.PipelineId)) && (string.IsNullOrEmpty(model.PipelineCode) || x.PipelineCode.Contains(model.PipelineCode)) && (string.IsNullOrEmpty(model.WeldJointCode) || x.WeldJointCode.Contains(model.WeldJointCode)) - orderby x.WeldJointCode select x).AsParallel().ToList(); + orderby x.WeldJointCode + select x).AsParallel().ToList(); return q; } /// diff --git a/SGGL/FineUIPro.Web/CQMS/PersonManage/WelderManage.aspx b/SGGL/FineUIPro.Web/CQMS/PersonManage/WelderManage.aspx index ab645096..19e89f0d 100644 --- a/SGGL/FineUIPro.Web/CQMS/PersonManage/WelderManage.aspx +++ b/SGGL/FineUIPro.Web/CQMS/PersonManage/WelderManage.aspx @@ -39,6 +39,15 @@ EmptyText="输入查询条件" Width="190px" LabelWidth="80px" LabelAlign="Right"> + + + + + + + diff --git a/SGGL/FineUIPro.Web/CQMS/PersonManage/WelderManage.aspx.cs b/SGGL/FineUIPro.Web/CQMS/PersonManage/WelderManage.aspx.cs index 2a96a30e..f7260c40 100644 --- a/SGGL/FineUIPro.Web/CQMS/PersonManage/WelderManage.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/PersonManage/WelderManage.aspx.cs @@ -191,11 +191,15 @@ namespace FineUIPro.Web.CQMS.PersonManage rootNode.Text = item.UnitName; rootNode.EnableClickEvent = true; this.tvControlItem.Nodes.Add(rootNode); - var getWelders = (from x in Funs.DB.SitePerson_Person where x.ProjectId == this.CurrUser.LoginProjectId && x.WorkPostId == Const.WorkPost_Welder && x.States == Const.ProjectPersonStates_1 && x.UnitId == item.UnitId select x).ToList(); + var getWelders = (from x in Funs.DB.SitePerson_Person where x.ProjectId == this.CurrUser.LoginProjectId && x.WorkPostId == Const.WorkPost_Welder && x.UnitId == item.UnitId select x).ToList(); if (!string.IsNullOrEmpty(txtQueryWelderCode.Text.Trim())) { getWelders = getWelders.Where(x => x.WelderCode.Contains(txtQueryWelderCode.Text.Trim())).ToList(); } + if (!string.IsNullOrEmpty(txtName.Text.Trim())) + { + getWelders = getWelders.Where(x => x.PersonName.Contains(txtName.Text.Trim())).ToList(); + } foreach (var sitem in getWelders) { TreeNode tn = new TreeNode(); diff --git a/SGGL/FineUIPro.Web/CQMS/PersonManage/WelderManage.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/PersonManage/WelderManage.aspx.designer.cs index 10b5cf05..3d1b574b 100644 --- a/SGGL/FineUIPro.Web/CQMS/PersonManage/WelderManage.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/PersonManage/WelderManage.aspx.designer.cs @@ -7,13 +7,11 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.CQMS.PersonManage -{ - - - public partial class WelderManage - { - +namespace FineUIPro.Web.CQMS.PersonManage { + + + public partial class WelderManage { + /// /// form1 控件。 /// @@ -22,7 +20,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -31,7 +29,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// Panel1 控件。 /// @@ -40,7 +38,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel1; - + /// /// panelLeftRegion 控件。 /// @@ -49,7 +47,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel panelLeftRegion; - + /// /// Toolbar3 控件。 /// @@ -58,7 +56,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar3; - + /// /// txtQueryWelderCode 控件。 /// @@ -67,7 +65,25 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtQueryWelderCode; - + + /// + /// Toolbar4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar4; + + /// + /// txtName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtName; + /// /// btnQuery 控件。 /// @@ -76,7 +92,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnQuery; - + /// /// tvControlItem 控件。 /// @@ -85,7 +101,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Tree tvControlItem; - + /// /// panelCenterRegion 控件。 /// @@ -94,7 +110,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel panelCenterRegion; - + /// /// Toolbar1 控件。 /// @@ -103,7 +119,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar1; - + /// /// ToolbarFill2 控件。 /// @@ -112,7 +128,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarFill ToolbarFill2; - + /// /// btnEdit 控件。 /// @@ -121,7 +137,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnEdit; - + /// /// btnDelete 控件。 /// @@ -130,7 +146,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnDelete; - + /// /// SimpleForm1 控件。 /// @@ -139,7 +155,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form SimpleForm1; - + /// /// drpUnitId 控件。 /// @@ -148,7 +164,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label drpUnitId; - + /// /// txtWelderName 控件。 /// @@ -157,7 +173,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label txtWelderName; - + /// /// txtWelderCode 控件。 /// @@ -166,7 +182,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label txtWelderCode; - + /// /// rblSex 控件。 /// @@ -175,7 +191,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label rblSex; - + /// /// txtBirthday 控件。 /// @@ -184,7 +200,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label txtBirthday; - + /// /// txtCertificateCode 控件。 /// @@ -193,7 +209,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label txtCertificateCode; - + /// /// txtWelderLevel 控件。 /// @@ -202,7 +218,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label txtWelderLevel; - + /// /// cbIsOnDuty 控件。 /// @@ -211,7 +227,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.CheckBox cbIsOnDuty; - + /// /// txtCertificateLimitTime 控件。 /// @@ -220,7 +236,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label txtCertificateLimitTime; - + /// /// Grid1 控件。 /// @@ -229,7 +245,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid1; - + /// /// Toolbar2 控件。 /// @@ -238,7 +254,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar2; - + /// /// txtQualificationItem 控件。 /// @@ -247,7 +263,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtQualificationItem; - + /// /// ToolbarFill1 控件。 /// @@ -256,7 +272,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarFill ToolbarFill1; - + /// /// btnNew 控件。 /// @@ -265,7 +281,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnNew; - + /// /// ToolbarSeparator1 控件。 /// @@ -274,7 +290,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; - + /// /// ToolbarText1 控件。 /// @@ -283,7 +299,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarText ToolbarText1; - + /// /// ddlPageSize 控件。 /// @@ -292,7 +308,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList ddlPageSize; - + /// /// Window1 控件。 /// @@ -301,7 +317,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window Window1; - + /// /// Menu1 控件。 /// @@ -310,7 +326,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Menu Menu1; - + /// /// btnMenuAudit 控件。 /// @@ -319,7 +335,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnMenuAudit; - + /// /// btnMenuEdit 控件。 /// @@ -328,7 +344,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnMenuEdit; - + /// /// btnMenuDelete 控件。 /// @@ -337,7 +353,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnMenuDelete; - + /// /// btnView 控件。 /// @@ -346,7 +362,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnView; - + /// /// Menu2 控件。 /// @@ -355,7 +371,7 @@ namespace FineUIPro.Web.CQMS.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Menu Menu2; - + /// /// btnMenuTreeAudit 控件。 /// diff --git a/SGGL/FineUIPro.Web/CQMS/PersonManage/WelderManageEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/PersonManage/WelderManageEdit.aspx.cs index f54529fa..e5bf755e 100644 --- a/SGGL/FineUIPro.Web/CQMS/PersonManage/WelderManageEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/PersonManage/WelderManageEdit.aspx.cs @@ -170,7 +170,18 @@ namespace FineUIPro.Web.CQMS.PersonManage //newWelder.Sex = this.rblSex.SelectedValue; //newWelder.Birthday = Funs.GetNewDateTime(this.txtBirthday.Text.Trim()); newWelder.IdentityCard = this.txtIdentityCard.Text.Trim(); - newWelder.CertificateCode = this.txtCertificateCode.Text.Trim(); + if (!string.IsNullOrEmpty(this.txtCertificateCode.Text.Trim())) + { + newWelder.CertificateCode = this.txtCertificateCode.Text.Trim(); + } + else + { + var welder = BLL.SitePerson_PersonService.GetSitePersonByProjectIdPersonId(this.CurrUser.LoginProjectId, PersonId); + if (welder != null) + { + newWelder.CertificateCode = welder.IdentityCard; + } + } //newWelder.CertificateLimitTime = Funs.GetNewDateTime(this.txtCertificateLimitTime.Text.Trim()); newWelder.WelderLevel = this.txtWelderLevel.Text.Trim(); //if (this.cbIsOnDuty.Checked) @@ -184,10 +195,10 @@ namespace FineUIPro.Web.CQMS.PersonManage newWelder.Remark = this.txtRemark.Text.Trim(); //newWelder.PhotoUrl = this.PhotoAttachUrl; newWelder.Isprint = "0"; - // newWelder.IsUsed = true; + // newWelder.IsUsed = true; if (!string.IsNullOrEmpty(PersonId)) { - if (!BLL.WelderService.IsExisWelderCode(PersonId, this.txtWelderCode.Text)) + if (!BLL.WelderService.IsExisWelderCode(PersonId, this.txtWelderCode.Text, this.CurrUser.LoginProjectId)) { newWelder.PersonId = PersonId; BLL.WelderService.UpdateWelder(newWelder); @@ -201,7 +212,7 @@ namespace FineUIPro.Web.CQMS.PersonManage else { PersonId = SQLHelper.GetNewID(typeof(Model.SitePerson_Person)); - if (!BLL.WelderService.IsExisWelderCode(PersonId, this.txtWelderCode.Text)) + if (!BLL.WelderService.IsExisWelderCode(PersonId, this.txtWelderCode.Text, this.CurrUser.LoginProjectId)) { newWelder.PersonId = PersonId; // BLL.WelderService.AddWelder(newWelder); diff --git a/SGGL/FineUIPro.Web/File/Excel/DataOut/焊口二次设计信息.xlsx b/SGGL/FineUIPro.Web/File/Excel/DataOut/焊口二次设计信息.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..c62a090c4c85a757dc946efca5abe20645444bbb GIT binary patch literal 9482 zcmeHt1zTI&wsz3q?q008w@{$CJB8xKo!}`>(crGdDelFg&|<{`#a)U^i$l=@Bs)Z8Kk{$AJD}>U* zrFz>hvf$@LHg)F9#U)J)cmdO95hA{BoLj!11$G1%Q(ETHqp3bKHIyjiI)kGSW%j8c zIJPi==AJa@1-z%mqBcLE49JI@A~EH86(C{H#_(3C?K6um*~5hG^AG7P_$-KaF4An8 z4p~1Wd5)w_Tt-EfH8HYG!*cmj0Ge}rQXiw7v7|s4kjyC2Suh`2LR!RW6^mt@5NkN4 zm^Ve?-ka1gubdtnc>X*q^M{qK%Jv>_pL(JZtCRQW%YalJ0Jw(|oR) z4ZYgi+*n?ck1LS6kNQ?28obdxg<~MDY66sySBhi9OG?lq^nDt3c7?M$RJK=tT>OJw zxUv_wofTm^pfDnLyW41ZXXorD`g7rWbL66Ivkz(L@brY$W10-V*$r|4;O-6qp!PQ( zYW1iida;Z1V1z&gvxTwq?GaJ^rGqUSO==2LPL+=>OyV`XrrtBQ z9+f#-*tw>(RyG8EWHA&b+Mky|Mji!88KyJWCAE=}WGzWIbf$ciss!lAdoG3XTa9snpnor#fv>fZo6|k?+D+wM~4=jvky_zNV=vQDWKnLW6Fbl9uSD zBMT+z5`*$Vgx@kJaG}?n_rrA_F!uo!KUq>Tn`XQNyX20xl)jw-#Oa>be~K83#z;RqHKV;iOu@IU zxba<%w$Z58tIk|%?c(2^l>cP4%dPtJ*PgdKd2Ng&#wL>o)DD&*@wnV2SGi=C=zc`YD^s(Eh~e@^;v4|C2NHJZ`Z)$1X06532KiVJ@Ndgcg)}(&>#h28;#1PQzrWG8>BWI;+bgn5KKp ziMQEVR-#t#1Z}0;I)OII%HM2cP+w1@*|4*fDkzbbIXd(9)O2)#JKvJ*B?5vk71u1XI!2_C&B{@D3Hev4TMEVng-? z=eqLkvB{K#BR$lF*S^0=nndXOEuO4t8+r>YG4A!NTyRAb>o|$p8 ze!HG@zG~hA{%)KR4DpX^U}KCA>m~SeoL#L=TrA8rz%DipR<1u?vm#m5Zh?y=^bq0; z%)c(94^j`=r$B=&!7qH7qqj8;V;Ffh;I&Hw8m)9TRu*jBj7>EkGAY1hu7BC$lP-7O zSE4XLve(EjEB_ul_LUby+EtU`lmHE!J86TO8*dPXL}bOrcrC=RecrPLg26$d=Ta7h zhfawXb8?=DndoZrMQ?yz6SvDRfSXe*Z2L%g3%^YJTzBP(1a=V5)+@10ytg>C?^%W| zct&crn+Zszweq_p-dXjRs9z{YgYMF*l@I2Nsx2r6j^?|&9^Xc|;W*UbkX%Pad`@^Q z6C!ZhKw_~FCE|c+ve1n^#Ttl~G3e18Wrnjc2m$>_N|ZZuq{-YIvhsYY=j^ZGmp?ft z=X)sLt$E!QSNR!A+qKuYN&3ZUhS7CS zQdog<#OPO**bn+m^f`8Dx>mA4J`kMoZ!J5^;wUZR39VQ+n$+a>^Ur0sadN=5au4J8 zdgQ?cdZ|0+@Nb}z`lLArgoc4MS#ry78l(!y=%(79*AaDFovBo?=dA)Ck>BNDPv@lj z!aU`lt|Vm7qu2?XS_#-R)BSQKS8EFku=_dxCo>#5PnE{cqdLn zFeEkjX`7#KBba`lM_x#cyCAsruA{K%*xYm)*?gRFEnG@&i51T_*#ZyQFeA3EKJuPt zZx^o-*jXe%WfzV!nc!$kM^I5w2=9y2Aw;i%sMFt)e09 z&YRL3_R&o6t%?R1?v6y^m54nn=LaAe2~add@!DzMM{JdQHO(5uMi8&6 z#_~bU1g|Vj?Q^2hNkQ3qGf7bmH|}25W_$G{XOFQOyOWVBs-=p&psui!r;QPx)qW7V zK{`(>IIfkp6KgeQ&J5c1zo!BQ+?|8AI;bxTMN!2}Q0RuIg4s{g%?FZhF5}8Iw~S zmjOD5)v|RJZTxf|kH_qE7RAx~pjwwR(@{+g)8b_~hb7zUwJp0$tgaxUKj2xnyy@{2 z{D>OLa|#*-M&=roe&Mw|az- zwitCDZFa-E)1hTiADi2=-PpG|ei`m9(Ic8S#!hN_UlJ55s$e`_jxojb7$DiNnI!RF$m3+_TDRcgchBZ{zUUh~tn3S9 z8p9LT;SduHhg#s6L~lKfz>C=u=v>4*oF(lI8GA}A6}iids*zGd+C+t09va3?Z^ko* zW@83cGVLE6kivOZ*|T-}X3A`mZ%0IACZ3BO=TRKBSsCOQh5bo{GDja%k!^=6POK8W zY&oB%b5N9I(e`T|JFXsG%i4DtT^`8=%gAS3#kWaSrj%(eE|w>rfg~F7zHUTPOop$k z=@O(^&g=Ft6bN)LNccNd(?le@c{kt~yeDqsjM+as5(fflGFb|h1H$+RC*ua`KGlDx zto(vuQp%INn{LoY?^*7){nVh?mR!In)-Z$84%bh%@Svz$z$m8a)RX!^v}C}yUg^N( zHA-vwxUBjQrh)T2!=#I$&E3?s=tRTCdmh3vn+fs9&Q}(0k z?d>b(2}dHU2Vby`H69OTWTk62PFTFRaqor$52;dF2D~*FO0`;i1ZVQf25(4a6`avs z^ny-30bkq;0agBdoJ|itJFhR#Olv%>SrDqS2UMzk?l1$1TdC88|`lSGW+UdPy*^$p4rICdo0m)q)8RV z$8}-DtNGgf6Fyx=(z--8z1K{UCy4T6&_Q}eiee%L=RTq_mI*O@^`a;I#aQqsoe6e9 z&wQ*mXuf(S9D_n6tBPLO;KmPAi?6y?a#}8-u~Id0!!q-VC0K1mb;5k3m^U zGCxx9gXTYBIHIg2s8znTXIFykl~Kc6U~cY*anNd3h}qrZYOsb5o)r|(V4R{_@R#{Y-yGe0g)#AvH7r($(ygyW1TAHC_F~m}IR&9vfXnNHa>Elgl z8g?WTvEWV5MGP(-EkhJ+*wx2L@@J+eu-$dCFRdd970=3=_wvsRS#p)kmFhQY{hX)H zf!BMGd#u1JI%}`Z&NnoDt)P2((k1ah!#J^zhRXNStF=HlQ9g(~h@i6yM2`?Zh^!R< z@cnDDqd~o*0yEJ{&lmh9-r|MRC&+|NtJ5s(Zx>3yPv5R$2p3NuPUUoVb>+_x8mh%LgH%9x9KFZ2!2mTtQ%ZRo9~1FhQGW!n^w{06YnR)hq&|j zkeK!D5sAW!C<74c7?DBe^Wa9kRM$TBuPFpNl;H_ZmkH>)#+dr=oHdzIhm)RYa`m}? z4%aXqP^Z`mw6iEQ?Ryz~qlFu~GtknF;pEvL{!x?b0s8>&vv@WMjr{dyn&_dSR8@YX zcG4Fy=mY1`)BF)+&+N3+I11DSd#%>5R;L{h`UDfNy7#EIm&X16kalwqD z{|p)`lSXZ~d(*%q*3Yzr5iLAAud3G5}#gF6rnMjP;_2Kk@w_u#)Db_D|=(M>_nEvL%8P0EA&)`g&Z)Oa#d(S zlf*bH%7p)U4#Kex3DtL`-n=UNpjFWjiw}v-2JvXf<`ddQAwR}OrwTE9guj&PQ%-5O zS!}rnw;37TUEVmyO`pZ^D0^xQTArLfTp6wqJT119iR!iUh*a7>H_TP$O<1R#DF0y= zjCI1AF!o~gLhJ3-=K2xDz!$;D8OX1m2E(1>Tz|@Gei*Pl5A8qOJ4RI9|7uP!E5C9z2=#C#qVEKF zAMx#F?|Ll3`EbqD(?p$cXuk*v(UZdi9X?nEr#Wff5!3(pZR%&FOkHLL^OlEb007B9 zlHXrxZ<5vv*E}u)-{rJhY^5b_6fHZ_nhD#=dB@7u5oVbo0u=JR#_Qb+WJHCoAm7z> zCzpgpZw~(3!C0pHbIpRNK9MeVpe`TQWke4-HM>z?yH~#gL%25m2KU+6L*=o}mF?Ic z0g)GA#nO7Q2P(ex$vnp(AC)@-i0;*zu`w_j5jn8{AHG1^Kobpxw>!H^Gyk$d8z8CU%Ip{Ij& z4A6zZ5WYAt5}a7d{4DwQVT1ruKU@zV9g{SkTw}2$S%^sbDlf|LG6?SsLt}Q6!YC*5 zs#ljQ8`6+xSBt(G7wR{w;NS}mKm!e9;}1O6M~#HiBT#jDH0$ANFiU7jiJT;FnF+Bs z<`QAGc3L>Ucg-(&cJ+brT#0!LC$HU~|cxQVarz~zhQim*V9@2fmbw(?( zh{2bcQ>12zW2L+f$}&yEuV3#9yyYz_l6gD)I*m*R{~aq+8IESs;mZ|qAl1tid0_U- z6=~oWl3LH`)UyUArk(-Am&UpPBdIdbym8UEx^X(AEVIs&ve#>Rzz{*M@qi2p>r^r` z%I2wn@G9;p(mD$N0cLhLb=CbWXoudTMSit<5>Y<2G8D^K9-v%nq~l4kF_yJ=0eQ*Y ziU`u>;hqT6bvJndd60vtf@ZxhxpXPL{k};}RX3c3>NU`G16w2?;&Q`{uEUbxZ@q$j zR02eqg{y;ktG1UI-fE1D)MTg6x74EjqMufmL#a)%4eZwF_5wVWZ;-uLOz^4Auq!}o zO|uBH8JCFO#vuG0Q|uee<`)hCLAP26LZUfb{q>{RLO}(wM}s4XE#Oa~!Xnu%lO4gJ zF9^8gM8#TiGdPaLNFU@kw*B{XPv|Az?0#@Y#ccCf=t_&|avZYhyz?4*$7UGQg3jU| zo*Wk(fpiT_l#E>q?EK0s#COHCDuLET|7n|Br|@-EE!*5CuHzB)??PD>`fYd}EXc7D z!W{HZ=X8Rp4qyux4GS>%r~JTqug%S2YU8k{`Bd?v8o^VWn-akinr4A8fpBTX^}eFQ zQau|bYdvRYrpFRui3u`N(&9J7YuL_U@F`G0C|tBddL+_WO^`tLUDM*C>xj@{;UP{H z5;ZUkC-0-MRFsXto-ZP543wp}8@UBCU5qXKF>REX&zhubKP=uJH`1`uz?&F5IUE zrKy=+D!(_5$E;Ej>vXfUpI}Z4=SXj;_41%?xG3SX-fWgI$8qAb*YeM9>niS{=_s@) zX6vxFS~f(;tjHS5J}90$r=1bKP~$U}Z6od;n#D#CaH}+A)!HfX%sTo)zlyToDB+pZ zmCse%m2v@@Y`-P_w%$=?qPOhcPVO+Gq<%6mnRb|-^~g}AGNY-p5*k{#`_N?y3|m6@ zlC;iTZJyr>x@w=9t=viur{Pn4RAf{P`qsOi={!omvy!xnt4DCBHE)3KHJRekOFExv zz~NqUQ7TWAn1}=HhI1C9_{}Ak7%1}F6h>QXURw>;V+9k0abbe6xucnyi=&e(rvhE8>wP_Sj*+N+Q2w5t;W(kw^n#rxkb(-DGRr6D0Zc*QU^8|6vRoOq24C`%;!UQracG%>QHx0~Aoy~` zk|GKdITVd39HBP_UcBa6>&?Ay)3*%yeU81}m80lH)RooBuombKh{^z|eFLC9T0w;G zInna;{g)7fgwoKKRC^>?(KUEdAho!Nq6FO-nsxQ>cpfOIuQww{i_niPj?K%ky;H{} z%Z!?0A=!+pPH*I}G1HgEIJs-@+b+IN4Q&rhT$-A%UY?H~!hQlGXA*D#VF+U3#h|7l zvv&`gR>8l57v4i?!k}~rtz&|#&Y0V_b5u%P^1OR|@YwLVqF)uxdASfrgmfwVM*aSW zS4?4~_UyC0=6Wnmfj-OM)UBz$w_Fdo2#^(k=Py3bAd24TU%_(NKUoY1&kj@TfB!tk zzh~{=*WWzdp{DqEfWH@`|84m58VpOF|5BR1Z}|7h-d_!!U~=pKzs`3b=YF;47g7Oi zmwT`FbKm%W3FDVB25i7!#{Vd2+()>tkpDtBME}pv|4(}PeZc#I^Dn?-j6VSH%g^@# zgzjzfe*v_?1ni&p^q(#Nebf6po?oVWME7sz*Z$`|%Kg;r7fLuxM2G!>dx_co_8*Db zebB$h{a=s(KmY{*@Q*CuzWLwR>%W?#z|zbAnEz|_R#QZRaS#B&fV~)DG#-BNv-SS~ DP`F>i literal 0 HcmV?d00001 diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index 2e98eec6..52b765e6 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -721,6 +721,7 @@ + @@ -8977,6 +8978,13 @@ WeldTask.aspx + + CheckResult.aspx + ASPXCodeBehind + + + CheckResult.aspx + DefectStatistics.aspx ASPXCodeBehind diff --git a/SGGL/FineUIPro.Web/HJGL/PersonManage/WelderManage.aspx b/SGGL/FineUIPro.Web/HJGL/PersonManage/WelderManage.aspx index 067c0691..26d5e2b8 100644 --- a/SGGL/FineUIPro.Web/HJGL/PersonManage/WelderManage.aspx +++ b/SGGL/FineUIPro.Web/HJGL/PersonManage/WelderManage.aspx @@ -39,6 +39,15 @@ EmptyText="输入查询条件" Width="190px" LabelWidth="80px" LabelAlign="Right"> + + + + + + + diff --git a/SGGL/FineUIPro.Web/HJGL/PersonManage/WelderManage.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PersonManage/WelderManage.aspx.cs index be77a077..cdd7ea8a 100644 --- a/SGGL/FineUIPro.Web/HJGL/PersonManage/WelderManage.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PersonManage/WelderManage.aspx.cs @@ -37,9 +37,9 @@ namespace FineUIPro.Web.HJGL.PersonManage Model.SitePerson_Person welder = BLL.SitePerson_PersonService.GetSitePersonByProjectIdPersonId(this.CurrUser.LoginProjectId, this.tvControlItem.SelectedNodeID); if (welder != null) { - this.btnEdit.Hidden = false; - this.btnNew.Hidden = false; - this.btnDelete.Hidden = false; + //this.btnEdit.Hidden = false; + //this.btnNew.Hidden = false; + //this.btnDelete.Hidden = false; this.txtWelderCode.Text = welder.WelderCode; this.txtWelderName.Text = welder.PersonName; @@ -191,7 +191,15 @@ namespace FineUIPro.Web.HJGL.PersonManage rootNode.Text = item.UnitName; rootNode.EnableClickEvent = true; this.tvControlItem.Nodes.Add(rootNode); - var getWelders = (from x in Funs.DB.SitePerson_Person where x.ProjectId == this.CurrUser.LoginProjectId && x.WorkPostId == Const.WorkPost_Welder && x.UnitId == item.UnitId && x.WelderCode.Contains(txtQueryWelderCode.Text.Trim()) select x).ToList(); + var getWelders = (from x in Funs.DB.SitePerson_Person where x.ProjectId == this.CurrUser.LoginProjectId && x.WorkPostId == Const.WorkPost_Welder && x.UnitId == item.UnitId select x).ToList(); + if (!string.IsNullOrEmpty(txtQueryWelderCode.Text.Trim())) + { + getWelders = getWelders.Where(x => x.WelderCode.Contains(txtQueryWelderCode.Text.Trim())).ToList(); + } + if (!string.IsNullOrEmpty(txtName.Text.Trim())) + { + getWelders = getWelders.Where(x => x.PersonName.Contains(txtName.Text.Trim())).ToList(); + } foreach (var sitem in getWelders) { TreeNode tn = new TreeNode(); @@ -202,7 +210,7 @@ namespace FineUIPro.Web.HJGL.PersonManage } else { - tn.Text = sitem.PersonName+"【"+ sitem.WelderCode + "】"; + tn.Text = sitem.PersonName + "【" + sitem.WelderCode + "】"; } tn.EnableClickEvent = true; rootNode.Nodes.Add(tn); @@ -565,6 +573,6 @@ namespace FineUIPro.Web.HJGL.PersonManage #endregion - + } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HJGL/PersonManage/WelderManage.aspx.designer.cs b/SGGL/FineUIPro.Web/HJGL/PersonManage/WelderManage.aspx.designer.cs index e825a743..f61b6951 100644 --- a/SGGL/FineUIPro.Web/HJGL/PersonManage/WelderManage.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HJGL/PersonManage/WelderManage.aspx.designer.cs @@ -7,13 +7,11 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.HJGL.PersonManage -{ - - - public partial class WelderManage - { - +namespace FineUIPro.Web.HJGL.PersonManage { + + + public partial class WelderManage { + /// /// form1 控件。 /// @@ -22,7 +20,7 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -31,7 +29,7 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// Panel1 控件。 /// @@ -40,7 +38,7 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel1; - + /// /// panelLeftRegion 控件。 /// @@ -49,7 +47,7 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel panelLeftRegion; - + /// /// Toolbar3 控件。 /// @@ -58,7 +56,7 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar3; - + /// /// txtQueryWelderCode 控件。 /// @@ -67,7 +65,25 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtQueryWelderCode; - + + /// + /// Toolbar4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar4; + + /// + /// txtName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtName; + /// /// btnQuery 控件。 /// @@ -76,7 +92,7 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnQuery; - + /// /// tvControlItem 控件。 /// @@ -85,7 +101,7 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Tree tvControlItem; - + /// /// panelCenterRegion 控件。 /// @@ -94,7 +110,7 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel panelCenterRegion; - + /// /// Toolbar1 控件。 /// @@ -103,7 +119,7 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar1; - + /// /// ToolbarFill2 控件。 /// @@ -112,7 +128,7 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarFill ToolbarFill2; - + /// /// btnEdit 控件。 /// @@ -121,7 +137,7 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnEdit; - + /// /// btnDelete 控件。 /// @@ -130,7 +146,7 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnDelete; - + /// /// SimpleForm1 控件。 /// @@ -139,7 +155,7 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form SimpleForm1; - + /// /// drpUnitId 控件。 /// @@ -148,7 +164,7 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label drpUnitId; - + /// /// txtWelderName 控件。 /// @@ -157,7 +173,7 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label txtWelderName; - + /// /// txtWelderCode 控件。 /// @@ -166,7 +182,7 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label txtWelderCode; - + /// /// rblSex 控件。 /// @@ -175,7 +191,7 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label rblSex; - + /// /// txtBirthday 控件。 /// @@ -184,7 +200,7 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label txtBirthday; - + /// /// txtCertificateCode 控件。 /// @@ -193,7 +209,7 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label txtCertificateCode; - + /// /// txtWelderLevel 控件。 /// @@ -202,7 +218,7 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label txtWelderLevel; - + /// /// cbIsOnDuty 控件。 /// @@ -211,7 +227,7 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.CheckBox cbIsOnDuty; - + /// /// txtCertificateLimitTime 控件。 /// @@ -220,7 +236,7 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label txtCertificateLimitTime; - + /// /// Grid1 控件。 /// @@ -229,7 +245,7 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid1; - + /// /// Toolbar2 控件。 /// @@ -238,7 +254,7 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar2; - + /// /// txtQualificationItem 控件。 /// @@ -247,7 +263,7 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtQualificationItem; - + /// /// ToolbarFill1 控件。 /// @@ -256,7 +272,7 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarFill ToolbarFill1; - + /// /// btnNew 控件。 /// @@ -265,7 +281,7 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnNew; - + /// /// ToolbarSeparator1 控件。 /// @@ -274,7 +290,7 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; - + /// /// ToolbarText1 控件。 /// @@ -283,7 +299,7 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarText ToolbarText1; - + /// /// ddlPageSize 控件。 /// @@ -292,7 +308,7 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList ddlPageSize; - + /// /// Window1 控件。 /// @@ -301,7 +317,7 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window Window1; - + /// /// Menu1 控件。 /// @@ -310,7 +326,7 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Menu Menu1; - + /// /// btnMenuAudit 控件。 /// @@ -319,7 +335,7 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnMenuAudit; - + /// /// btnMenuEdit 控件。 /// @@ -328,7 +344,7 @@ namespace FineUIPro.Web.HJGL.PersonManage /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnMenuEdit; - + /// /// btnMenuDelete 控件。 /// diff --git a/SGGL/FineUIPro.Web/HJGL/PersonManage/WelderManageEdit.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PersonManage/WelderManageEdit.aspx.cs index fb0038e5..43af1acc 100644 --- a/SGGL/FineUIPro.Web/HJGL/PersonManage/WelderManageEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PersonManage/WelderManageEdit.aspx.cs @@ -178,7 +178,7 @@ namespace FineUIPro.Web.HJGL.PersonManage // newWelder.IsUsed = true; if (!string.IsNullOrEmpty(PersonId)) { - if (!BLL.WelderService.IsExisWelderCode(PersonId, this.txtWelderCode.Text)) + if (!BLL.WelderService.IsExisWelderCode(PersonId, this.txtWelderCode.Text, this.CurrUser.LoginProjectId)) { newWelder.PersonId = PersonId; BLL.WelderService.UpdateWelder(newWelder); @@ -192,7 +192,7 @@ namespace FineUIPro.Web.HJGL.PersonManage else { PersonId = SQLHelper.GetNewID(typeof(Model.SitePerson_Person)); - if (!BLL.WelderService.IsExisWelderCode(PersonId, this.txtWelderCode.Text)) + if (!BLL.WelderService.IsExisWelderCode(PersonId, this.txtWelderCode.Text, this.CurrUser.LoginProjectId)) { newWelder.PersonId = PersonId; // BLL.WelderService.AddWelder(newWelder); diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx b/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx index 356215ba..fd1d0ad3 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx @@ -83,6 +83,9 @@ + + diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx.cs index a91c0e42..d92292ea 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx.cs @@ -1,8 +1,10 @@ using BLL; +using NPOI.SS.Util; using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; +using System.IO; using System.Linq; using System.Text; using System.Web; @@ -839,27 +841,171 @@ namespace FineUIPro.Web.HJGL.WeldingManage #endregion #region 导出焊口信息 - /// - /// 导出焊口信息 + /// 导出按钮 /// /// /// protected void btnOut_Click(object sender, EventArgs e) { - //var iso = BLL.Pipeline_PipelineService.GetPipelineByPipelineId(this.tvControlItem.SelectedNodeID); - //var workArea = BLL.Project_WorkAreaService.GetProject_WorkAreaByWorkAreaId(this.tvControlItem.SelectedNodeID); - //if (iso != null) - //{ - // PageContext.RegisterStartupScript(Window3.GetShowReference(String.Format("JointInfoOut.aspx?PipelineId={0}", this.tvControlItem.SelectedNodeID, "导出 - "))); - //} - //else if (workArea != null) - //{ - // PageContext.RegisterStartupScript(Window3.GetShowReference(String.Format("JointInfoOut.aspx?WorkAreaId={0}", this.tvControlItem.SelectedNodeID, "导出 - "))); - //} - //else - //{ - // Alert.ShowInTop("请选择"PipelineOrArea, MessageBoxIcon.Warning); - //} + string rootPath = Server.MapPath("~/"); + string initTemplatePath = string.Empty; + string uploadfilepath = string.Empty; + string newUrl = string.Empty; + string filePath = string.Empty; + initTemplatePath = Const.JotTwoDesignTemplateUrl; + uploadfilepath = rootPath + initTemplatePath; + string constructionLogId = this.tvControlItem.SelectedNodeID; + Model.SGGLDB db = Funs.DB; + var workEfficiencys = from x in db.ZHGL_ConstructionLogWorkEfficiency + where x.ConstructionLogId == constructionLogId + select x; + var persons = from x in db.ZHGL_ConstructionLogPerson + where x.ConstructionLogId == constructionLogId + select x; + var machines = from x in db.ZHGL_ConstructionLogMachine + where x.ConstructionLogId == constructionLogId + select x; + if (this.Grid1.Rows.Count > 0) + { + newUrl = uploadfilepath.Replace(".xlsx", "(" + string.Format("{0:yyyy-MM-dd}", DateTime.Now) + ")" + ".xlsx"); + File.Copy(uploadfilepath, newUrl); + // 第一步:读取文件流 + NPOI.SS.UserModel.IWorkbook workbook; + using (FileStream stream = new FileStream(newUrl, FileMode.Open, FileAccess.Read)) + { + workbook = new NPOI.XSSF.UserModel.XSSFWorkbook(stream); + } + // 创建单元格样式 + NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle(); + cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin; + cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin; + cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin; + cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; + cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; + cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; + cellStyle0.WrapText = true; + var font = workbook.CreateFont(); + font.FontHeightInPoints = 11; + font.IsBold = false; + cellStyle0.SetFont(font); + // 第二步:创建新数据行 + NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0); + int rowCount = 2; + for (int i = 0; i < this.Grid1.Rows.Count; i++) + { + NPOI.SS.UserModel.IRow row1 = sheet.CreateRow(rowCount); + NPOI.SS.UserModel.ICell cell; + cell = row1.CreateCell(0); + cell.CellStyle = cellStyle0; + cell.SetCellValue((i+1).ToString()); + cell = row1.CreateCell(1); + cell.CellStyle = cellStyle0; + cell.SetCellValue(this.Grid1.Rows[i].Values[2].ToString()); + cell = row1.CreateCell(2); + cell.CellStyle = cellStyle0; + cell.SetCellValue(this.Grid1.Rows[i].Values[3].ToString()); + cell = row1.CreateCell(3); + cell.CellStyle = cellStyle0; + cell.SetCellValue(this.Grid1.Rows[i].Values[4].ToString()); + cell = row1.CreateCell(4); + cell.CellStyle = cellStyle0; + string date1 = this.Grid1.Rows[i].Values[5].ToString(); + if (!string.IsNullOrEmpty(date1)) + { + date1 = string.Format("{0:yyyy-MM-dd}",Funs.GetNewDateTime(date1)); + } + cell.SetCellValue(date1); + cell = row1.CreateCell(5); + cell.CellStyle = cellStyle0; + cell.SetCellValue(this.Grid1.Rows[i].Values[6].ToString()); + cell = row1.CreateCell(6); + cell.CellStyle = cellStyle0; + string date2 = this.Grid1.Rows[i].Values[7].ToString(); + if (!string.IsNullOrEmpty(date2)) + { + date2 = string.Format("{0:yyyy-MM-dd}", Funs.GetNewDateTime(date2)); + } + cell.SetCellValue(date2); + cell = row1.CreateCell(7); + cell.CellStyle = cellStyle0; + string weldJointCode = string.Empty; + var weldJoint = BLL.WeldJointService.GetWeldJointByWeldJointId(this.Grid1.Rows[i].RowID); + if (weldJoint != null) + { + weldJointCode = weldJoint.WeldJointCode; + } + cell.SetCellValue(weldJointCode); + cell = row1.CreateCell(8); + cell.CellStyle = cellStyle0; + cell.SetCellValue(this.Grid1.Rows[i].Values[10].ToString()); + cell = row1.CreateCell(9); + cell.CellStyle = cellStyle0; + cell.SetCellValue(this.Grid1.Rows[i].Values[11].ToString()); + cell = row1.CreateCell(10); + cell.CellStyle = cellStyle0; + cell.SetCellValue(this.Grid1.Rows[i].Values[12].ToString()); + cell = row1.CreateCell(11); + cell.CellStyle = cellStyle0; + cell.SetCellValue(this.Grid1.Rows[i].Values[13].ToString()); + cell = row1.CreateCell(12); + cell.CellStyle = cellStyle0; + cell.SetCellValue(this.Grid1.Rows[i].Values[14].ToString()); + cell = row1.CreateCell(13); + cell.CellStyle = cellStyle0; + cell.SetCellValue(this.Grid1.Rows[i].Values[15].ToString()); + cell = row1.CreateCell(14); + cell.CellStyle = cellStyle0; + cell.SetCellValue(this.Grid1.Rows[i].Values[16].ToString()); + cell = row1.CreateCell(15); + cell.CellStyle = cellStyle0; + cell.SetCellValue(this.Grid1.Rows[i].Values[17].ToString()); + cell = row1.CreateCell(16); + cell.CellStyle = cellStyle0; + cell.SetCellValue(this.Grid1.Rows[i].Values[18].ToString()); + cell = row1.CreateCell(17); + cell.CellStyle = cellStyle0; + cell.SetCellValue(this.Grid1.Rows[i].Values[20].ToString()); + cell = row1.CreateCell(18); + cell.CellStyle = cellStyle0; + cell.SetCellValue(this.Grid1.Rows[i].Values[21].ToString()); + cell = row1.CreateCell(19); + cell.CellStyle = cellStyle0; + cell.SetCellValue(this.Grid1.Rows[i].Values[22].ToString()); + cell = row1.CreateCell(20); + cell.CellStyle = cellStyle0; + cell.SetCellValue(this.Grid1.Rows[i].Values[27].ToString()); + rowCount++; + } + + + + + // 第三步:写入文件流 + using (FileStream stream = new FileStream(newUrl, FileMode.Create, FileAccess.Write)) + { + workbook.Write(stream); + workbook.Close(); + } + + + + + string fileName = Path.GetFileName(newUrl); + FileInfo info = new FileInfo(newUrl); + long fileSize = info.Length; + Response.Clear(); + Response.ContentType = "application/x-zip-compressed"; + Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8)); + Response.AddHeader("Content-Length", fileSize.ToString()); + Response.TransmitFile(newUrl, 0, fileSize); + Response.Flush(); + Response.Close(); + File.Delete(newUrl); + } + else + { + ShowNotify("无数据可导出!", MessageBoxIcon.Warning); + } } /// @@ -887,47 +1033,6 @@ namespace FineUIPro.Web.HJGL.WeldingManage // Alert.ShowInTop("请选择"PipelinetFirst, MessageBoxIcon.Warning); //} } - - /// - /// 导出方法 - /// - /// - /// - private string GetGridTableHtml(Grid grid) - { - StringBuilder sb = new StringBuilder(); - sb.Append(""); - sb.Append(""); - sb.Append(""); - foreach (GridColumn column in grid.Columns) - { - if (column.HeaderText != "序号") - { - sb.AppendFormat("", column.HeaderText); - } - } - sb.Append(""); - foreach (GridRow row in grid.Rows) - { - sb.Append(""); - foreach (GridColumn column in grid.Columns) - { - string html = row.Values[column.ColumnIndex].ToString(); - if (column.ColumnID != "tfNumber") - { - //html = (row.FindControl("lblNumber") as AspNet.Label).Text; - sb.AppendFormat("", html); - } - //sb.AppendFormat("", html); - } - - sb.Append(""); - } - - sb.Append("
{0}
{0}{0}
"); - - return sb.ToString(); - } #endregion #region 选择要显示列 diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx.designer.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx.designer.cs index f798843a..8a5836cc 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx.designer.cs @@ -201,6 +201,15 @@ namespace FineUIPro.Web.HJGL.WeldingManage { /// protected global::FineUIPro.Button btnOut2; + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + /// /// btnPrint 控件。 /// diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/PipelineListPDMSIn.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/PipelineListPDMSIn.aspx.cs index 2c73f034..9db0edd2 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/PipelineListPDMSIn.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/PipelineListPDMSIn.aspx.cs @@ -99,7 +99,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage var table = this.GetPagedDataTable(Grid2, tb); Grid2.DataSource = table; Grid2.DataBind(); - drpVersion.DataSource = BLL.HJGL_DesignBasisDataImportService.GetListVersionByUnitWorkId(Request.Params["UnitWorkId"], DataClassification); + drpVersion.DataSource = BLL.HJGL_DesignBasisDataImportService.GetListVersionByUnitWorkId(Request.Params["UnitWorkId"], DataClassification); drpVersion.DataBind(); } @@ -164,10 +164,10 @@ namespace FineUIPro.Web.HJGL.WeldingManage try { var ds = MiniExcel.Query(fileName).ToList(); - var columns = MiniExcel.GetColumns(fileName); - var cnt = columns.Count; - var reposedata = AddDatasetToSQL(ds, cnt); - if (reposedata.code==1) + var columns = MiniExcel.GetColumns(fileName); + var cnt = columns.Count; + var reposedata = AddDatasetToSQL(ds, cnt); + if (reposedata.code == 1) { State = (int)ButtonState.Import; ShowNotify("审核完成请点击导入"); @@ -192,7 +192,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage } #endregion - + #region 将Dataset的数据导入数据库 /// @@ -204,7 +204,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage private Model.ResponeData AddDatasetToSQL(List pds, int count) { Model.ResponeData responeData = new Model.ResponeData(); - // string result = string.Empty; + // string result = string.Empty; List result = new List(); //pds = BLL.Funs.FilterBlankLines(pds); if (count < 28) @@ -245,7 +245,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage string pipeLineId = string.Empty; if (string.IsNullOrEmpty(col0)) { - result.Add( "第" + (i + 1).ToString() + "行," + "管线号" + "," + "此项为必填项!" + "|"); + result.Add("第" + (i + 1).ToString() + "行," + "管线号" + "," + "此项为必填项!" + "|"); } else { @@ -265,8 +265,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage var Medium = getMedium.FirstOrDefault(x => x.MediumCode == col3); if (Medium == null) { - // result += "第" + (i + 1).ToString() + "行," + "该介质不存在!" + "|"; - result .Add( col3 + "-该介质不存在!" + "|"); + // result += "第" + (i + 1).ToString() + "行," + "该介质不存在!" + "|"; + result.Add(col3 + "-该介质不存在!" + "|"); } else { @@ -284,7 +284,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage var PipeLineClass = getPipeLineClass.FirstOrDefault(x => x.PipingClassCode == col4); if (PipeLineClass == null) { - // result += "第" + (i + 1).ToString() + "行," + "该管道等级不存在!" + "|"; + // result += "第" + (i + 1).ToString() + "行," + "该管道等级不存在!" + "|"; result.Add(col4 + "-该管道等级不存在!" + "|"); } else @@ -299,7 +299,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage var DetectionRate = getDetectionRate.FirstOrDefault(x => x.DetectionRateValue.ToString() == col5.Replace("%", "") || x.DetectionRateCode == col5); if (DetectionRate == null) { - // result += "第" + (i + 1).ToString() + "行," + "该探伤比例不存在!" + "|"; + // result += "第" + (i + 1).ToString() + "行," + "该探伤比例不存在!" + "|"; result.Add(col5 + "-该探伤比例不存在!" + "|"); } else @@ -316,26 +316,18 @@ namespace FineUIPro.Web.HJGL.WeldingManage string col6 = pds[i].G; if (!string.IsNullOrEmpty(col6)) { - string[] types = col6.ToString().Split(','); - foreach (string t in types) + string typeStr = col6.ToString(); + var type = getDetectionType.FirstOrDefault(x => x.DetectionTypeCode == typeStr); + if (type == null) { - var type = getDetectionType.FirstOrDefault(x => x.DetectionTypeCode == t); - if (type == null) - { - //result += "第" + (i + 1).ToString() + "行," + "探伤类型【" + t + "】不存在!" + "|"; - result.Add("探伤类型【" + t + "】不存在!" + "|"); - } - else - { - pipeline.DetectionType += type.DetectionTypeId + "|"; - } + //result += "第" + (i + 1).ToString() + "行," + "探伤类型【" + t + "】不存在!" + "|"; + result.Add("探伤类型【" + typeStr + "】不存在!" + "|"); } - if (!string.IsNullOrEmpty(pipeline.DetectionType)) + else { - pipeline.DetectionType = pipeline.DetectionType.Substring(0, pipeline.DetectionType.Length - 1); + pipeline.DetectionType = type.DetectionTypeId; pipeline.DetectionTypeStr = col6; } - } else { @@ -378,7 +370,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage var PressurePipingClass = getPressurePipingClass.FirstOrDefault(x => x.PressurePipingClassCode == col11); if (PressurePipingClass == null) { - // result += "第" + (i + 1).ToString() + "行," + "该压力管道级别不存在!" + "|"; + // result += "第" + (i + 1).ToString() + "行," + "该压力管道级别不存在!" + "|"; result.Add(col11 + "-该压力管道级别不存在!" + "|"); } else @@ -447,7 +439,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage var material = getMaterial.FirstOrDefault(x => x.MaterialCode == col17); if (material == null) { - // result += "第" + (i + 1).ToString() + "行," + "该材质不存在!" + "|"; + // result += "第" + (i + 1).ToString() + "行," + "该材质不存在!" + "|"; result.Add(col17 + "-该材质不存在!" + "|"); } else @@ -456,7 +448,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage pipeline.PipeMaterialCode = col17; } } - pipeline.FlowingSection= Convert.ToString(pds[i].S); + pipeline.FlowingSection = Convert.ToString(pds[i].S); pipeline.Remark = Convert.ToString(pds[i].T); // 以下是焊口信息 @@ -480,17 +472,17 @@ namespace FineUIPro.Web.HJGL.WeldingManage } string col20 = ""; - if (pds[i].V!=null) + if (pds[i].V != null) { col20 = pds[i].V.ToString(); } - + if (!string.IsNullOrEmpty(col20)) { var material = getMaterial.FirstOrDefault(x => x.MaterialCode == col20); if (material == null) { - // result += "第" + (i + 1).ToString() + "行," + "该材质1不存在!" + "|"; + // result += "第" + (i + 1).ToString() + "行," + "该材质1不存在!" + "|"; result.Add(col20 + "-该材质1不存在!" + "|"); } else @@ -505,11 +497,11 @@ namespace FineUIPro.Web.HJGL.WeldingManage } string col21 = ""; - if (pds[i].W!=null) + if (pds[i].W != null) { col21 = pds[i].W.ToString(); } - + if (!string.IsNullOrEmpty(col21)) { var material = getMaterial.FirstOrDefault(x => x.MaterialCode == col21); @@ -530,10 +522,10 @@ namespace FineUIPro.Web.HJGL.WeldingManage } string col22 = Convert.ToString(pds[i].X); - string col27 = ""; - if (pds[i].AC!=null) + string col27 = ""; + if (pds[i].AC != null) { - col27= pds[i].AC.ToString(); + col27 = pds[i].AC.ToString(); } if (rbDiaType.SelectedValue == "1") { @@ -576,7 +568,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage var col23 = Convert.ToString(pds[i].Y); - if (col23!=null) + if (col23 != null) { try { @@ -594,8 +586,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage } var col24 = Convert.ToString(pds[i].Z); - if (col24!=null) - { + if (col24 != null) + { // var Thickness = Convert.ToDecimal(col24); decimal Thickness = 0; string thickness = col24.ToString(); @@ -603,12 +595,12 @@ namespace FineUIPro.Web.HJGL.WeldingManage { if (rbDiaType.SelectedValue == "1")//外径 { - Thickness = (decimal)BLL.Base_DNCompareService.GetThicknessByDia(pipeline.Dia,thickness); + Thickness = (decimal)BLL.Base_DNCompareService.GetThicknessByDia(pipeline.Dia, thickness); pipeline.Thickness = Thickness; } else //DN直径 { - Thickness = (decimal)BLL.Base_DNCompareService.GetThicknessByDNDia(int.Parse( pipeline.DNDia.Replace("DN","")), thickness); + Thickness = (decimal)BLL.Base_DNCompareService.GetThicknessByDNDia(int.Parse(pipeline.DNDia.Replace("DN", "")), thickness); pipeline.Thickness = Thickness; } } @@ -635,7 +627,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage } } - + } else { @@ -658,7 +650,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage var weldType = getWeldType.FirstOrDefault(x => x.WeldTypeCode == col25); if (weldType == null) { - // result += "第" + (i + 1).ToString() + "行," + "该焊缝类型不存在!" + "|"; + // result += "第" + (i + 1).ToString() + "行," + "该焊缝类型不存在!" + "|"; result.Add(col25 + "-该焊缝类型不存在!" + "|"); } else @@ -746,7 +738,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage pipeline.ProjectId = this.CurrUser.LoginProjectId; PipelineList.Add(pipeline); } - + } if (result.Count > 0) @@ -840,21 +832,21 @@ namespace FineUIPro.Web.HJGL.WeldingManage { string rootPath = Server.MapPath("~/"); - string oldefilePath = rootPath+initPath + this.hdFileName.Text; + string oldefilePath = rootPath + initPath + this.hdFileName.Text; string unitworkId = Request.Params["UnitWorkId"]; - string filePath = rootPath+ Const.DesignBasisDataImportPath + this.hdFileName.Text; + string filePath = rootPath + Const.DesignBasisDataImportPath + this.hdFileName.Text; if (oldefilePath != string.Empty && System.IO.File.Exists(oldefilePath)) { if (!Directory.Exists(rootPath + Const.DesignBasisDataImportPath)) { Directory.CreateDirectory(rootPath + Const.DesignBasisDataImportPath); } - File.Move(oldefilePath, filePath); + File.Move(oldefilePath, filePath); //System.IO.File.Delete(oldefilePath);//删除上传的XLS文件 } string FileName = this.fuAttachUrl.FileName; - + if (DrpType.SelectedValue == "1")//更新导入 { @@ -863,8 +855,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage BLL.PipelineService.DeletePipelineByUnitworkId(unitworkId);//删除原有管线 AddView_HJGL_WeldJoint(PipelineList);//导入数据 - Model .HJGL_DesignBasisDataImport hJGL_DesignBasisDataImport = new Model .HJGL_DesignBasisDataImport(); - hJGL_DesignBasisDataImport.DesignBasisDataImportId= SQLHelper.GetNewID(); + Model.HJGL_DesignBasisDataImport hJGL_DesignBasisDataImport = new Model.HJGL_DesignBasisDataImport(); + hJGL_DesignBasisDataImport.DesignBasisDataImportId = SQLHelper.GetNewID(); hJGL_DesignBasisDataImport.ProjectId = this.CurrUser.LoginProjectId; hJGL_DesignBasisDataImport.UnitWorkId = unitworkId; hJGL_DesignBasisDataImport.ImportType = "1"; @@ -872,14 +864,14 @@ namespace FineUIPro.Web.HJGL.WeldingManage hJGL_DesignBasisDataImport.FileName = FileName; hJGL_DesignBasisDataImport.FilePath = filePath.Replace(rootPath, ""); hJGL_DesignBasisDataImport.FileType = BLL.HJGL_DesignBasisDataImportService.GetFileType(FileName); - hJGL_DesignBasisDataImport.Version = BLL.HJGL_DesignBasisDataImportService.GetNewVersionByUnitWorkId(unitworkId,DataClassification); + hJGL_DesignBasisDataImport.Version = BLL.HJGL_DesignBasisDataImportService.GetNewVersionByUnitWorkId(unitworkId, DataClassification); hJGL_DesignBasisDataImport.Remark = txtRemark.Text; hJGL_DesignBasisDataImport.CreateMan = this.CurrUser.PersonId; hJGL_DesignBasisDataImport.CreateDate = DateTime.Now.ToString("yyyy-MM-dd HH-mm-ss"); BLL.HJGL_DesignBasisDataImportService.AddHJGL_DesignBasisDataImport(hJGL_DesignBasisDataImport); BLL.HJGL_DesignBasisDataImportVerSionLogService.UpdateVersion(this.CurrUser.LoginProjectId, unitworkId, (decimal)hJGL_DesignBasisDataImport.Version, DataClassification); - + } else //补充导入 diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointList.aspx b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointList.aspx index 74e8be30..5c31c106 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointList.aspx +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointList.aspx @@ -95,7 +95,7 @@ - + diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointView.aspx b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointView.aspx index d5b6d26e..e6b9af9d 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointView.aspx +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointView.aspx @@ -11,6 +11,16 @@
+ + + + + + + + + @@ -139,6 +149,10 @@ + diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointView.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointView.aspx.cs index beb00aa8..aa9b5c05 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointView.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointView.aspx.cs @@ -160,5 +160,10 @@ namespace FineUIPro.Web.HJGL.WeldingManage } } + + protected void btnAttachUrl_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/WeldJoint&menuId={1}&type=-1", Request.Params["WeldJointId"], BLL.Const.HJGL_WeldJointMenuId))); + } } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointView.aspx.designer.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointView.aspx.designer.cs index e1b7b5f5..0c2ce3e5 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointView.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointView.aspx.designer.cs @@ -30,6 +30,24 @@ namespace FineUIPro.Web.HJGL.WeldingManage { /// protected global::FineUIPro.PageManager PageManager1; + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// btnAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAttachUrl; + /// /// GroupPanel3 控件。 /// @@ -281,5 +299,14 @@ namespace FineUIPro.Web.HJGL.WeldingManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox hdGrooveType; + + /// + /// WindowAtt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowAtt; } } diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingReport/CheckResult.aspx b/SGGL/FineUIPro.Web/HJGL/WeldingReport/CheckResult.aspx new file mode 100644 index 00000000..bb42e7c0 --- /dev/null +++ b/SGGL/FineUIPro.Web/HJGL/WeldingReport/CheckResult.aspx @@ -0,0 +1,99 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CheckResult.aspx.cs" Inherits="FineUIPro.Web.HJGL.WeldingReport.CheckResult" %> + + + + + + 检测结果汇总 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingReport/CheckResult.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingReport/CheckResult.aspx.cs new file mode 100644 index 00000000..27adf4a0 --- /dev/null +++ b/SGGL/FineUIPro.Web/HJGL/WeldingReport/CheckResult.aspx.cs @@ -0,0 +1,174 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Text; +using AspNet = System.Web.UI.WebControls; + +namespace FineUIPro.Web.HJGL.WeldingReport +{ + public partial class CheckResult : PageBase + { + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString(); + BLL.UnitService.InitUnitByProjectIdUnitTypeDropDownList(this.drpUnitId, this.CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_2, true); + BLL.Base_DetectionTypeService.InitDetectionTypeDropDownList(drpDetectionType, true, string.Empty); + + } + } + + #region + /// + /// 绑定数据 + /// + private void BindGrid() + { + List listStr = new List(); + + listStr.Add(new SqlParameter("@projectId", this.CurrUser.LoginProjectId)); + if (this.drpUnitId.SelectedValue != BLL.Const._Null) + { + listStr.Add(new SqlParameter("@unitcode", this.drpUnitId.SelectedValue)); + } + else + { + listStr.Add(new SqlParameter("@unitcode", null)); + } + if (this.drpDetectionType.SelectedValue != BLL.Const._Null) + { + listStr.Add(new SqlParameter("@detectionTypeId", this.drpDetectionType.SelectedValue)); + } + else + { + listStr.Add(new SqlParameter("@detectionTypeId", null)); + } + + if (!string.IsNullOrEmpty(this.txtStarTime.Text)) + { + listStr.Add(new SqlParameter("@date1", this.txtStarTime.Text.Trim())); + } + else + { + listStr.Add(new SqlParameter("@date1", null)); + } + if (!string.IsNullOrEmpty(this.txtEndTime.Text)) + { + listStr.Add(new SqlParameter("@date2", this.txtEndTime.Text.Trim())); + } + else + { + listStr.Add(new SqlParameter("@date2", null)); + } + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunProc("sp_rpt_WelderFirstPassRate", parameter); + this.Grid1.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + } + + /// + /// 改变索引事件 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 分页下拉选择事件 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e) + { + this.BindGrid(); + } + #endregion + + #region 统计按钮事件 + /// + /// 统计 + /// + /// + /// + protected void BtnAnalyse_Click(object sender, EventArgs e) + { + BindGrid(); + } + #endregion + + #region 导出按钮 + /// 导出按钮 + ///
+ /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + Response.ClearContent(); + string filename = Funs.GetNewFileName(); + Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("焊工一次合格率" + filename, System.Text.Encoding.UTF8) + ".xls"); + Response.ContentType = "application/excel"; + Response.ContentEncoding = System.Text.Encoding.UTF8; + Response.Write(GetGridTableHtml(Grid1)); + Response.End(); + } + + /// + /// 导出方法 + /// + /// + /// + private string GetGridTableHtml(Grid grid) + { + StringBuilder sb = new StringBuilder(); + sb.Append(""); + sb.Append(""); + sb.Append(""); + grid.PageSize = 10000; + BindGrid(); + foreach (GridColumn column in grid.Columns) + { + sb.AppendFormat("", column.HeaderText); + } + sb.Append(""); + foreach (GridRow row in grid.Rows) + { + sb.Append(""); + foreach (GridColumn column in grid.Columns) + { + string html = row.Values[column.ColumnIndex].ToString(); + if (column.ColumnID == "tfNumber") + { + html = (row.FindControl("labNumber") as AspNet.Label).Text; + } + sb.AppendFormat("", html); + } + + sb.Append(""); + } + + sb.Append("
{0}
{0}
"); + + return sb.ToString(); + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingReport/CheckResult.aspx.designer.cs b/SGGL/FineUIPro.Web/HJGL/WeldingReport/CheckResult.aspx.designer.cs new file mode 100644 index 00000000..3729067c --- /dev/null +++ b/SGGL/FineUIPro.Web/HJGL/WeldingReport/CheckResult.aspx.designer.cs @@ -0,0 +1,168 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.HJGL.WeldingReport { + + + public partial class CheckResult { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// drpUnitId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpUnitId; + + /// + /// drpDetectionType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpDetectionType; + + /// + /// txtStarTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtStarTime; + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label1; + + /// + /// txtEndTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtEndTime; + + /// + /// Toolbar3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar3; + + /// + /// ToolbarFill1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// BtnAnalyse 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button BtnAnalyse; + + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + } +} From 56fe58fe544f7cc72818361fa6b2b01ee6772bdd Mon Sep 17 00:00:00 2001 From: gaofei1985 <181547018@qq.com> Date: Thu, 23 Nov 2023 18:52:01 +0800 Subject: [PATCH 07/26] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PersonManage/WelderManageEdit.aspx.cs | 2 +- SGGL/FineUIPro.Web/HJGL/NDT/NDTBatch.aspx | 11 +- SGGL/FineUIPro.Web/HJGL/NDT/NDTBatch.aspx.cs | 19 ++- .../HJGL/NDT/NDTBatch.aspx.designer.cs | 18 +++ .../PersonManage/WelderManageEdit.aspx.cs | 2 +- .../HJGL/PointTrust/PointBatch.aspx | 7 ++ .../HJGL/PointTrust/PointBatch.aspx.cs | 28 +++-- .../PointTrust/PointBatch.aspx.designer.cs | 116 ++++++++++-------- .../HJGL/PointTrust/TrustBatch.aspx | 7 ++ .../HJGL/PointTrust/TrustBatch.aspx.cs | 48 ++++---- .../PointTrust/TrustBatch.aspx.designer.cs | 90 ++++++++------ .../HJGL/RepairAndExpand/RepairAndExpand.aspx | 7 ++ .../RepairAndExpand/RepairAndExpand.aspx.cs | 11 +- .../RepairAndExpand.aspx.designer.cs | 18 +++ .../HJGL/RepairAndExpand/RepairTrust.aspx | 7 ++ .../HJGL/RepairAndExpand/RepairTrust.aspx.cs | 9 +- .../RepairTrust.aspx.designer.cs | 86 +++++++------ .../HJGL/WeldingManage/JotTwoDesign.aspx.cs | 5 + .../HJGL/WeldingManage/WeldingConDate.aspx.cs | 5 + 19 files changed, 326 insertions(+), 170 deletions(-) diff --git a/SGGL/FineUIPro.Web/CQMS/PersonManage/WelderManageEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/PersonManage/WelderManageEdit.aspx.cs index e5bf755e..e72eadea 100644 --- a/SGGL/FineUIPro.Web/CQMS/PersonManage/WelderManageEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/PersonManage/WelderManageEdit.aspx.cs @@ -139,7 +139,7 @@ namespace FineUIPro.Web.CQMS.PersonManage { string PersonId = Request.Params["PersonId"]; var q = Funs.DB.SitePerson_Person.FirstOrDefault(x => x.WelderCode == this.txtWelderCode.Text.Trim() - && (x.PersonId != PersonId || (PersonId == null && PersonId != null))); + && (x.PersonId != PersonId || (PersonId == null && PersonId != null)) && x.ProjectId == this.CurrUser.LoginProjectId); if (q != null) { Alert.ShowInTop("焊工号已经存在!", MessageBoxIcon.Warning); diff --git a/SGGL/FineUIPro.Web/HJGL/NDT/NDTBatch.aspx b/SGGL/FineUIPro.Web/HJGL/NDT/NDTBatch.aspx index f43c9037..e7f6b12f 100644 --- a/SGGL/FineUIPro.Web/HJGL/NDT/NDTBatch.aspx +++ b/SGGL/FineUIPro.Web/HJGL/NDT/NDTBatch.aspx @@ -25,14 +25,21 @@ + Width="265px" LabelWidth="90px" DisplayType="Month" DateFormatString="yyyy-MM" LabelAlign="Right"> + + + + + + diff --git a/SGGL/FineUIPro.Web/HJGL/NDT/NDTBatch.aspx.cs b/SGGL/FineUIPro.Web/HJGL/NDT/NDTBatch.aspx.cs index 382b59c3..09846a9b 100644 --- a/SGGL/FineUIPro.Web/HJGL/NDT/NDTBatch.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/NDT/NDTBatch.aspx.cs @@ -53,6 +53,7 @@ namespace FineUIPro.Web.HJGL.NDT { GetButtonPower(); this.Type = Request.Params["Type"]; + BLL.UnitService.InitUnitByProjectIdUnitTypeDropDownList(this.drpUnit, this.CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_2, true); this.txtNDEDateMonth.Text = string.Format("{0:yyyy-MM}", DateTime.Now); this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString(); this.TrustBatchId = string.Empty; @@ -148,8 +149,8 @@ namespace FineUIPro.Web.HJGL.NDT //} //else //{ - unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList(); - unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList(); + unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList(); + unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList(); //} if (unitWork1.Count() > 0) @@ -195,7 +196,7 @@ namespace FineUIPro.Web.HJGL.NDT private void BindNodes(TreeNode node) { ///&& x.TrustType == (this.Type == "R" ? "R" : null) var p = from x in Funs.DB.HJGL_Batch_BatchTrust - where x.UnitWorkId == node.NodeID && Equals(x.TrustType, (this.Type == "R" ? "R" : null)) + where x.UnitWorkId == node.NodeID && Equals(x.TrustType, (this.Type == "R" ? "R" : null)) && x.TrustDate < Convert.ToDateTime(this.txtNDEDateMonth.Text.Trim() + "-01").AddMonths(1) && x.TrustDate >= Convert.ToDateTime(this.txtNDEDateMonth.Text.Trim() + "-01") select x; @@ -264,6 +265,10 @@ namespace FineUIPro.Web.HJGL.NDT && x.DetectionTypeId == ndtTypeId && x.DetectionRateId == item.DetectionRateId orderby x.TrustBatchCode descending select x; + if (this.drpUnit.SelectedValue != BLL.Const._Null) + { + trusts = trusts.Where(x => x.UnitId == this.drpUnit.SelectedValue).OrderBy(x => x.TrustBatchCode); + } if (item.DetectionRateValue > 0) //探伤比例为0的批不显示 { TreeNode newNode = new TreeNode(); @@ -300,6 +305,10 @@ namespace FineUIPro.Web.HJGL.NDT && x.DetectionTypeId == ndtTypeId && x.DetectionRateId == ndtRateId orderby x.TrustBatchCode descending select x; + if (this.drpUnit.SelectedValue != BLL.Const._Null) + { + trusts = trusts.Where(x => x.UnitId == this.drpUnit.SelectedValue).OrderBy(x => x.TrustBatchCode); + } foreach (var trust in trusts) { TreeNode newNode = new TreeNode(); @@ -318,11 +327,11 @@ namespace FineUIPro.Web.HJGL.NDT Model.HJGL_Batch_PointBatch batch = BLL.PointBatchService.GetPointBatchById(trust.PointBatchId); if (batch != null && batch.IsClosed == true) { - newNode.Text = code; + newNode.Text = code + "【" + BLL.UnitService.GetUnitNameByUnitId(trust.UnitId) + "】"; } else { - newNode.Text = "" + code + ""; + newNode.Text = "" + code + "【" + BLL.UnitService.GetUnitNameByUnitId(trust.UnitId) + "】" + ""; } } else diff --git a/SGGL/FineUIPro.Web/HJGL/NDT/NDTBatch.aspx.designer.cs b/SGGL/FineUIPro.Web/HJGL/NDT/NDTBatch.aspx.designer.cs index b4a991e5..ae94f6b0 100644 --- a/SGGL/FineUIPro.Web/HJGL/NDT/NDTBatch.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HJGL/NDT/NDTBatch.aspx.designer.cs @@ -66,6 +66,24 @@ namespace FineUIPro.Web.HJGL.NDT { /// protected global::FineUIPro.DatePicker txtNDEDateMonth; + /// + /// Toolbar3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar3; + + /// + /// drpUnit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpUnit; + /// /// Toolbar5 控件。 /// diff --git a/SGGL/FineUIPro.Web/HJGL/PersonManage/WelderManageEdit.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PersonManage/WelderManageEdit.aspx.cs index 43af1acc..d1c7bb54 100644 --- a/SGGL/FineUIPro.Web/HJGL/PersonManage/WelderManageEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PersonManage/WelderManageEdit.aspx.cs @@ -130,7 +130,7 @@ namespace FineUIPro.Web.HJGL.PersonManage { string PersonId = Request.Params["PersonId"]; var q = Funs.DB.SitePerson_Person.FirstOrDefault(x => x.WelderCode == this.txtWelderCode.Text.Trim() - && (x.PersonId != PersonId || (PersonId == null && PersonId != null))); + && (x.PersonId != PersonId || (PersonId == null && PersonId != null)) && x.ProjectId == this.CurrUser.LoginProjectId); if (q != null) { Alert.ShowInTop("焊工号已经存在!", MessageBoxIcon.Warning); diff --git a/SGGL/FineUIPro.Web/HJGL/PointTrust/PointBatch.aspx b/SGGL/FineUIPro.Web/HJGL/PointTrust/PointBatch.aspx index cf072bbc..bb60c63b 100644 --- a/SGGL/FineUIPro.Web/HJGL/PointTrust/PointBatch.aspx +++ b/SGGL/FineUIPro.Web/HJGL/PointTrust/PointBatch.aspx @@ -29,6 +29,13 @@ EnableCollapse="true" Width="300px" Title="点口管理" ShowBorder="true" Layout="VBox" ShowHeader="false" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft"> + + + + + + protected void Page_Load(object sender, EventArgs e) { - // ctlAuditFlow.Url = BLL.Project_SysSetService.GetAvevaNetUrl(this.CurrUser.LoginProjectId); + // ctlAuditFlow.Url = BLL.Project_SysSetService.GetAvevaNetUrl(this.CurrUser.LoginProjectId); if (!IsPostBack) { + BLL.UnitService.InitUnitByProjectIdUnitTypeDropDownList(this.drpUnit, this.CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_2, true); this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString(); this.txtStartTime.Text = string.Format("{0:yyyy-MM}", DateTime.Now); this.InitTreeMenu();//加载树 @@ -92,8 +93,8 @@ namespace FineUIPro.Web.HJGL.PointTrust //} //else //{ - unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList(); - unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList(); + unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList(); + unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList(); //} if (unitWork1.Count() > 0) @@ -245,7 +246,10 @@ namespace FineUIPro.Web.HJGL.PointTrust { pointManages = pointManages.Where(x => x.WelderCode.Contains(this.txtWelderCode.Text.Trim())); } - + if (this.drpUnit.SelectedValue != BLL.Const._Null) + { + pointManages = pointManages.Where(x => x.UnitId == this.drpUnit.SelectedValue); + } foreach (var item in pointManages) @@ -257,7 +261,7 @@ namespace FineUIPro.Web.HJGL.PointTrust ToolTip = "批", EnableClickEvent = true, }; - var pipeline= PointBatchService.GetPointBatchById(item.PointBatchId); + var pipeline = PointBatchService.GetPointBatchById(item.PointBatchId); string startdate = string.Format("{0:yyyy-MM-dd}", pipeline.StartDate); string PipeArea = ""; if (!string.IsNullOrEmpty(pipeline.PipelineId)) @@ -272,22 +276,22 @@ namespace FineUIPro.Web.HJGL.PointTrust break; } } - string code = "DK-" + item.PointBatchCode.Substring(item.PointBatchCode.Length - 4)+ PipeArea; + string code = "DK-" + item.PointBatchCode.Substring(item.PointBatchCode.Length - 4) + PipeArea; if (!item.EndDate.HasValue) ////批 没有关闭 粉色 { - newNode.Text = "" + code +"【"+startdate + "】"+""; + newNode.Text = "" + code + "【" + startdate + "】" + "【" + item.UnitName + "】" + ""; newNode.ToolTip = "批尚未关闭"; } // 当天批 else if (string.Format("{0:yyyy-MM-dd}", item.StartDate) == string.Format("{0:yyyy-MM-dd}", System.DateTime.Now) || string.Format("{0:yyyy-MM-dd}", item.EndDate) == string.Format("{0:yyyy-MM-dd}", System.DateTime.Now)) { - newNode.Text = "" + code + "【" + startdate + "】" + ""; + newNode.Text = "" + code + "【" + startdate + "】" + "【" + item.UnitName + "】" + ""; newNode.ToolTip = "当天批"; } else { - newNode.Text = code+ "【" + startdate + "】"; + newNode.Text = code + "【" + startdate + "】" + "【" + item.UnitName + "】"; } e.Node.Nodes.Add(newNode); @@ -454,7 +458,7 @@ namespace FineUIPro.Web.HJGL.PointTrust if (!string.IsNullOrEmpty(txtpipelinecode.Text.Trim())) { strSql += " and PipelineCode like @PipelineCode "; - listStr.Add(new SqlParameter("@PipelineCode", "%"+ txtpipelinecode.Text.Trim() + "%")); + listStr.Add(new SqlParameter("@PipelineCode", "%" + txtpipelinecode.Text.Trim() + "%")); } SqlParameter[] parameter = listStr.ToArray(); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); @@ -641,7 +645,7 @@ namespace FineUIPro.Web.HJGL.PointTrust var batch = BLL.PointBatchService.GetPointBatchById(this.PointBatchId); if (!batch.EndDate.HasValue) { - if (!string.IsNullOrEmpty(Grid1.SelectedRowID) ) + if (!string.IsNullOrEmpty(Grid1.SelectedRowID)) { PointBatchDetailService.UpdatePointBatchDetail(Grid1.SelectedRowID, "1", System.DateTime.Now); this.BindGrid(); @@ -652,7 +656,7 @@ namespace FineUIPro.Web.HJGL.PointTrust Alert.ShowInTop("请选择点口!", MessageBoxIcon.Warning); } - + } else { diff --git a/SGGL/FineUIPro.Web/HJGL/PointTrust/PointBatch.aspx.designer.cs b/SGGL/FineUIPro.Web/HJGL/PointTrust/PointBatch.aspx.designer.cs index cc1b5d5f..00266dd5 100644 --- a/SGGL/FineUIPro.Web/HJGL/PointTrust/PointBatch.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HJGL/PointTrust/PointBatch.aspx.designer.cs @@ -7,13 +7,11 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.HJGL.PointTrust -{ - - - public partial class PointBatch - { - +namespace FineUIPro.Web.HJGL.PointTrust { + + + public partial class PointBatch { + /// /// form1 控件。 /// @@ -22,7 +20,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -31,7 +29,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// Panel1 控件。 /// @@ -40,7 +38,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel1; - + /// /// panelLeftRegion 控件。 /// @@ -49,7 +47,25 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel panelLeftRegion; - + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// drpUnit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpUnit; + /// /// Toolbar4 控件。 /// @@ -58,7 +74,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar4; - + /// /// txtWelderCode 控件。 /// @@ -67,7 +83,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtWelderCode; - + /// /// Toolbar5 控件。 /// @@ -76,7 +92,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar5; - + /// /// txtStartTime 控件。 /// @@ -85,7 +101,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DatePicker txtStartTime; - + /// /// tvControlItem 控件。 /// @@ -94,7 +110,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Tree tvControlItem; - + /// /// Panel2 控件。 /// @@ -103,7 +119,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel2; - + /// /// panelCenterRegion 控件。 /// @@ -112,7 +128,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel panelCenterRegion; - + /// /// Toolbar3 控件。 /// @@ -121,7 +137,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar3; - + /// /// txtpipelinecode 控件。 /// @@ -130,7 +146,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtpipelinecode; - + /// /// btnQuery 控件。 /// @@ -139,7 +155,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnQuery; - + /// /// btnManual 控件。 /// @@ -148,7 +164,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnManual; - + /// /// btnAutoPoint 控件。 /// @@ -157,7 +173,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnAutoPoint; - + /// /// btnClose 控件。 /// @@ -166,7 +182,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnClose; - + /// /// btnbtnOpenResetPoint 控件。 /// @@ -175,7 +191,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnbtnOpenResetPoint; - + /// /// btnPointAudit 控件。 /// @@ -184,7 +200,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnPointAudit; - + /// /// btnGenerate 控件。 /// @@ -193,7 +209,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnGenerate; - + /// /// btnSelectExpandPoint 控件。 /// @@ -202,7 +218,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnSelectExpandPoint; - + /// /// btnPrint 控件。 /// @@ -211,7 +227,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnPrint; - + /// /// TbPipeline 控件。 /// @@ -220,7 +236,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar TbPipeline; - + /// /// lbPipelineCode 控件。 /// @@ -229,7 +245,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label lbPipelineCode; - + /// /// lbRate 控件。 /// @@ -238,7 +254,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label lbRate; - + /// /// lbNeedJointNum 控件。 /// @@ -247,7 +263,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label lbNeedJointNum; - + /// /// lbPointJointNum 控件。 /// @@ -256,7 +272,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label lbPointJointNum; - + /// /// lbLastJointNum 控件。 /// @@ -265,7 +281,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label lbLastJointNum; - + /// /// TbNotPipeline 控件。 /// @@ -274,7 +290,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar TbNotPipeline; - + /// /// lbTotalJointNum 控件。 /// @@ -283,7 +299,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label lbTotalJointNum; - + /// /// lbNeedJointNum2 控件。 /// @@ -292,7 +308,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label lbNeedJointNum2; - + /// /// lbPointJointNum2 控件。 /// @@ -301,7 +317,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label lbPointJointNum2; - + /// /// lbLastJointNum2 控件。 /// @@ -310,7 +326,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label lbLastJointNum2; - + /// /// Toolbar2 控件。 /// @@ -319,7 +335,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar2; - + /// /// txtPointBatchCode 控件。 /// @@ -328,7 +344,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label txtPointBatchCode; - + /// /// txtStartDate 控件。 /// @@ -337,7 +353,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label txtStartDate; - + /// /// txtEndDate 控件。 /// @@ -346,7 +362,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label txtEndDate; - + /// /// txtState 控件。 /// @@ -355,7 +371,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label txtState; - + /// /// txtPointState 控件。 /// @@ -364,7 +380,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label txtPointState; - + /// /// Grid1 控件。 /// @@ -373,7 +389,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid1; - + /// /// ToolbarSeparator1 控件。 /// @@ -382,7 +398,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; - + /// /// ToolbarText1 控件。 /// @@ -391,7 +407,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarText ToolbarText1; - + /// /// ddlPageSize 控件。 /// @@ -400,7 +416,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList ddlPageSize; - + /// /// Window1 控件。 /// diff --git a/SGGL/FineUIPro.Web/HJGL/PointTrust/TrustBatch.aspx b/SGGL/FineUIPro.Web/HJGL/PointTrust/TrustBatch.aspx index 82903cbe..469afc47 100644 --- a/SGGL/FineUIPro.Web/HJGL/PointTrust/TrustBatch.aspx +++ b/SGGL/FineUIPro.Web/HJGL/PointTrust/TrustBatch.aspx @@ -16,6 +16,13 @@ ShowBorder="true" Layout="VBox" ShowHeader="false" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft"> + + + + + + 0) @@ -220,7 +221,10 @@ namespace FineUIPro.Web.HJGL.PointTrust { pointManages = pointManages.Where(x => x.WelderCode.Contains(this.txtWelderCode.Text.Trim())); } - + if (this.drpUnit.SelectedValue != BLL.Const._Null) + { + pointManages = pointManages.Where(x => x.UnitId == this.drpUnit.SelectedValue); + } foreach (var item in pointManages) @@ -236,12 +240,12 @@ namespace FineUIPro.Web.HJGL.PointTrust // 未委托批次红色显示 if (BLL.Batch_BatchTrustService.GetBatchTrustViewByPointBatchId(item.PointBatchId) == null) { - newNode.Text = "" + code + ""; + newNode.Text = "" + code + "【" + item.UnitName + "】" + ""; newNode.ToolTip = "未委托"; } else { - newNode.Text = code; + newNode.Text = code + "【" + item.UnitName + "】"; } e.Node.Nodes.Add(newNode); @@ -619,8 +623,8 @@ namespace FineUIPro.Web.HJGL.PointTrust return; } string reportId = this.tvControlItem.SelectedNode.NodeID; - // Model.View_Batch_BatchTrust trust = BLL.Batch_BatchTrustService.GetBatchTrustViewByPointBatchId(this.tvControlItem.SelectedNodeID); - // Model.HJGL_Batch_PointBatch batch = BLL.PointBatchService.GetPointBatchById(this.tvControlItem.SelectedNodeID); + // Model.View_Batch_BatchTrust trust = BLL.Batch_BatchTrustService.GetBatchTrustViewByPointBatchId(this.tvControlItem.SelectedNodeID); + // Model.HJGL_Batch_PointBatch batch = BLL.PointBatchService.GetPointBatchById(this.tvControlItem.SelectedNodeID); var trust = BLL.Batch_BatchTrustService.GetBatchTrustViewByPointBatchId(reportId); if (trust != null) { @@ -633,16 +637,16 @@ namespace FineUIPro.Web.HJGL.PointTrust dr["CH_CheckUnit"] = BLL.UnitService.GetUnitNameByUnitId(trust.NDEUnit).ToString(); } - + if (!string.IsNullOrEmpty(trust.TrustBatchCode)) { dr["CH_TrustCode"] = trust.TrustBatchCode; } - /* if (!string.IsNullOrEmpty(trust.CH_NDTCriteria)) - { - dr["CH_NDTCriteria"] = trust.CH_NDTCriteria; - }*/ + /* if (!string.IsNullOrEmpty(trust.CH_NDTCriteria)) + { + dr["CH_NDTCriteria"] = trust.CH_NDTCriteria; + }*/ if (!string.IsNullOrEmpty(trust.DetectionTypeCode)) { dr["CH_NDTMethod"] = trust.DetectionTypeCode; @@ -680,17 +684,17 @@ namespace FineUIPro.Web.HJGL.PointTrust { keyValuePairs.Add("supUnit", BLL.UnitService.GetUnitNameByUnitId(unitcheck.UnitId).ToString()); } - /* if (!string.IsNullOrEmpty(trust.CH_CheckUnit)) - { - keyValuePairs.Add("CheckUnit", BLL.UnitService.GetUnitNameByUnitId(trust.CH_CheckUnit).ToString()); + /* if (!string.IsNullOrEmpty(trust.CH_CheckUnit)) + { + keyValuePairs.Add("CheckUnit", BLL.UnitService.GetUnitNameByUnitId(trust.CH_CheckUnit).ToString()); - } - if (!string.IsNullOrEmpty(trust.CH_TrustUnit)) - { - keyValuePairs.Add("ConUnit", BLL.UnitService.GetUnitNameByUnitId(trust.CH_TrustUnit).ToString()); + } + if (!string.IsNullOrEmpty(trust.CH_TrustUnit)) + { + keyValuePairs.Add("ConUnit", BLL.UnitService.GetUnitNameByUnitId(trust.CH_TrustUnit).ToString()); - } -*/ + } + */ BLL.FastReportService.ResetData(); BLL.FastReportService.AddFastreportTable(dt); @@ -701,7 +705,7 @@ namespace FineUIPro.Web.HJGL.PointTrust string initTemplatePath = ""; string rootPath = Server.MapPath("~/"); initTemplatePath = "File\\Fastreport\\管道焊口检测委托单NoPic.frx"; - + if (File.Exists(rootPath + initTemplatePath)) { PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("../../Controls/Fastreport.aspx?ReportPath={0}", rootPath + initTemplatePath))); diff --git a/SGGL/FineUIPro.Web/HJGL/PointTrust/TrustBatch.aspx.designer.cs b/SGGL/FineUIPro.Web/HJGL/PointTrust/TrustBatch.aspx.designer.cs index 77dca21f..1b5a6891 100644 --- a/SGGL/FineUIPro.Web/HJGL/PointTrust/TrustBatch.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HJGL/PointTrust/TrustBatch.aspx.designer.cs @@ -7,13 +7,11 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.HJGL.PointTrust -{ - - - public partial class TrustBatch - { - +namespace FineUIPro.Web.HJGL.PointTrust { + + + public partial class TrustBatch { + /// /// form1 控件。 /// @@ -22,7 +20,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -31,7 +29,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// Panel1 控件。 /// @@ -40,7 +38,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel1; - + /// /// panelLeftRegion 控件。 /// @@ -49,7 +47,25 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel panelLeftRegion; - + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// drpUnit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpUnit; + /// /// Toolbar4 控件。 /// @@ -58,7 +74,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar4; - + /// /// txtWelderCode 控件。 /// @@ -67,7 +83,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtWelderCode; - + /// /// Toolbar1 控件。 /// @@ -76,7 +92,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar1; - + /// /// txtTrustDateMonth 控件。 /// @@ -85,7 +101,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DatePicker txtTrustDateMonth; - + /// /// tvControlItem 控件。 /// @@ -94,7 +110,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Tree tvControlItem; - + /// /// panelCenterRegion 控件。 /// @@ -103,7 +119,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel panelCenterRegion; - + /// /// Toolbar3 控件。 /// @@ -112,7 +128,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar3; - + /// /// ToolbarFill1 控件。 /// @@ -121,7 +137,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarFill ToolbarFill1; - + /// /// btnAudit 控件。 /// @@ -130,7 +146,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnAudit; - + /// /// btnDelete 控件。 /// @@ -139,7 +155,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnDelete; - + /// /// btnPrint 控件。 /// @@ -148,7 +164,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnPrint; - + /// /// SimpleForm1 控件。 /// @@ -157,7 +173,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form SimpleForm1; - + /// /// txtTrustBatchCode 控件。 /// @@ -166,7 +182,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label txtTrustBatchCode; - + /// /// txtTrustDate 控件。 /// @@ -175,7 +191,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label txtTrustDate; - + /// /// txtDetectionTypeCode 控件。 /// @@ -184,7 +200,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label txtDetectionTypeCode; - + /// /// lbNDEUnit 控件。 /// @@ -193,7 +209,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label lbNDEUnit; - + /// /// lbIsTrust 控件。 /// @@ -202,7 +218,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label lbIsTrust; - + /// /// lbIsAudit 控件。 /// @@ -211,7 +227,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label lbIsAudit; - + /// /// Button1 控件。 /// @@ -220,7 +236,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button Button1; - + /// /// Grid1 控件。 /// @@ -229,7 +245,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid1; - + /// /// ToolbarSeparator1 控件。 /// @@ -238,7 +254,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; - + /// /// ToolbarText1 控件。 /// @@ -247,7 +263,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarText ToolbarText1; - + /// /// ddlPageSize 控件。 /// @@ -256,7 +272,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList ddlPageSize; - + /// /// Window1 控件。 /// @@ -265,7 +281,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window Window1; - + /// /// Window2 控件。 /// @@ -274,7 +290,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window Window2; - + /// /// Menu1 控件。 /// @@ -283,7 +299,7 @@ namespace FineUIPro.Web.HJGL.PointTrust /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Menu Menu1; - + /// /// btnPointAudit 控件。 /// diff --git a/SGGL/FineUIPro.Web/HJGL/RepairAndExpand/RepairAndExpand.aspx b/SGGL/FineUIPro.Web/HJGL/RepairAndExpand/RepairAndExpand.aspx index f1bcc2c9..6d0d135a 100644 --- a/SGGL/FineUIPro.Web/HJGL/RepairAndExpand/RepairAndExpand.aspx +++ b/SGGL/FineUIPro.Web/HJGL/RepairAndExpand/RepairAndExpand.aspx @@ -39,6 +39,13 @@ + + + + + + x.UnitId == this.drpUnit.SelectedValue).OrderBy(x => x.RepairRecordCode); + } foreach (var r in repairs) { var jot = BLL.WeldJointService.GetWeldJointByWeldJointId(r.WeldJointId); @@ -287,16 +292,16 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand } if (b) { - newNode.Text = iso.PipelineCode + "-" + jot.WeldJointCode + r.RepairMark; + newNode.Text = iso.PipelineCode + "-" + jot.WeldJointCode + r.RepairMark + "【" + BLL.UnitService.GetUnitNameByUnitId(r.UnitId) + "】"; } else { - newNode.Text = "" + iso.PipelineCode + "-" + jot.WeldJointCode + r.RepairMark + ""; + newNode.Text = "" + iso.PipelineCode + "-" + jot.WeldJointCode + r.RepairMark + "【" + BLL.UnitService.GetUnitNameByUnitId(r.UnitId) + "】" + ""; } } else { - newNode.Text = iso.PipelineCode + "-" + jot.WeldJointCode + r.RepairMark; + newNode.Text = iso.PipelineCode + "-" + jot.WeldJointCode + r.RepairMark + "【" + BLL.UnitService.GetUnitNameByUnitId(r.UnitId) + "】"; } newNode.NodeID = r.RepairRecordId; newNode.ToolTip = "返修单"; diff --git a/SGGL/FineUIPro.Web/HJGL/RepairAndExpand/RepairAndExpand.aspx.designer.cs b/SGGL/FineUIPro.Web/HJGL/RepairAndExpand/RepairAndExpand.aspx.designer.cs index e8ffe2e5..9098c2dc 100644 --- a/SGGL/FineUIPro.Web/HJGL/RepairAndExpand/RepairAndExpand.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HJGL/RepairAndExpand/RepairAndExpand.aspx.designer.cs @@ -66,6 +66,24 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand { /// protected global::FineUIPro.DatePicker txtRepairMonth; + /// + /// Toolbar4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar4; + + /// + /// drpUnit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpUnit; + /// /// Toolbar5 控件。 /// diff --git a/SGGL/FineUIPro.Web/HJGL/RepairAndExpand/RepairTrust.aspx b/SGGL/FineUIPro.Web/HJGL/RepairAndExpand/RepairTrust.aspx index 56cd9dbc..eac45b19 100644 --- a/SGGL/FineUIPro.Web/HJGL/RepairAndExpand/RepairTrust.aspx +++ b/SGGL/FineUIPro.Web/HJGL/RepairAndExpand/RepairTrust.aspx @@ -25,6 +25,13 @@ + + + + + + x.UnitId == this.drpUnit.SelectedValue).OrderBy(x => x.TrustBatchCode); + } foreach (var trust in trusts) { TreeNode newNode = new TreeNode(); string code = "FXWT-" + trust.TrustBatchCode.Substring(trust.TrustBatchCode.Length - 4); if (string.Format("{0:yyyy-MM-dd}", trust.TrustDate) == string.Format("{0:yyyy-MM-dd}", System.DateTime.Now)) { - newNode.Text = "" + code + ""; + newNode.Text = "" + code + "【" + BLL.UnitService.GetUnitNameByUnitId(trust.UnitId) + "】" + ""; newNode.ToolTip = "当天委托单"; } else { - newNode.Text = code; + newNode.Text = code + "【" + BLL.UnitService.GetUnitNameByUnitId(trust.UnitId) + "】"; newNode.ToolTip = "非当天委托单"; } newNode.NodeID = trust.TrustBatchId; diff --git a/SGGL/FineUIPro.Web/HJGL/RepairAndExpand/RepairTrust.aspx.designer.cs b/SGGL/FineUIPro.Web/HJGL/RepairAndExpand/RepairTrust.aspx.designer.cs index f6eeb648..2de61a8b 100644 --- a/SGGL/FineUIPro.Web/HJGL/RepairAndExpand/RepairTrust.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HJGL/RepairAndExpand/RepairTrust.aspx.designer.cs @@ -7,13 +7,11 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.HJGL.RepairAndExpand -{ - - - public partial class RepairTrust - { - +namespace FineUIPro.Web.HJGL.RepairAndExpand { + + + public partial class RepairTrust { + /// /// form1 控件。 /// @@ -22,7 +20,7 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -31,7 +29,7 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// Panel1 控件。 /// @@ -40,7 +38,7 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel1; - + /// /// panelLeftRegion 控件。 /// @@ -49,7 +47,7 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel panelLeftRegion; - + /// /// Toolbar1 控件。 /// @@ -58,7 +56,7 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar1; - + /// /// txtTrustDateMonth 控件。 /// @@ -67,7 +65,25 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DatePicker txtTrustDateMonth; - + + /// + /// Toolbar4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar4; + + /// + /// drpUnit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpUnit; + /// /// Toolbar5 控件。 /// @@ -76,7 +92,7 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar5; - + /// /// txtSearchCode 控件。 /// @@ -85,7 +101,7 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtSearchCode; - + /// /// tvControlItem 控件。 /// @@ -94,7 +110,7 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Tree tvControlItem; - + /// /// panelCenterRegion 控件。 /// @@ -103,7 +119,7 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel panelCenterRegion; - + /// /// Toolbar3 控件。 /// @@ -112,7 +128,7 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar3; - + /// /// ToolbarFill1 控件。 /// @@ -121,7 +137,7 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarFill ToolbarFill1; - + /// /// btnAudit 控件。 /// @@ -130,7 +146,7 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnAudit; - + /// /// btnPointAudit 控件。 /// @@ -139,7 +155,7 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnPointAudit; - + /// /// btnDelete 控件。 /// @@ -148,7 +164,7 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnDelete; - + /// /// btnPrint 控件。 /// @@ -157,7 +173,7 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnPrint; - + /// /// SimpleForm1 控件。 /// @@ -166,7 +182,7 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form SimpleForm1; - + /// /// txtTrustBatchCode 控件。 /// @@ -175,7 +191,7 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label txtTrustBatchCode; - + /// /// txtTrustDate 控件。 /// @@ -184,7 +200,7 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label txtTrustDate; - + /// /// txtDetectionTypeCode 控件。 /// @@ -193,7 +209,7 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label txtDetectionTypeCode; - + /// /// lbNDEUnit 控件。 /// @@ -202,7 +218,7 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label lbNDEUnit; - + /// /// lbIsCheck 控件。 /// @@ -211,7 +227,7 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label lbIsCheck; - + /// /// lbIsAudit 控件。 /// @@ -220,7 +236,7 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label lbIsAudit; - + /// /// Grid1 控件。 /// @@ -229,7 +245,7 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid1; - + /// /// ToolbarSeparator1 控件。 /// @@ -238,7 +254,7 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; - + /// /// ToolbarText1 控件。 /// @@ -247,7 +263,7 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarText ToolbarText1; - + /// /// ddlPageSize 控件。 /// @@ -256,7 +272,7 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList ddlPageSize; - + /// /// Window1 控件。 /// @@ -265,7 +281,7 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window Window1; - + /// /// Window2 控件。 /// diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx.cs index d92292ea..7317da8d 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx.cs @@ -468,6 +468,11 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// protected void btnAutoInput_Click(object sender, EventArgs e) { + if (this.drpUnit.SelectedValue == BLL.Const._Null) + { + ShowNotify("请选择工艺规程编制单位!", MessageBoxIcon.Warning); + return; + } if (!string.IsNullOrEmpty(tvControlItem.SelectedNodeID)) { var jotList = from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == tvControlItem.SelectedNodeID && x.WPQId == null select x; diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldingConDate.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldingConDate.aspx.cs index 7b46f9c4..91bfb84b 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldingConDate.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldingConDate.aspx.cs @@ -399,6 +399,11 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// protected void btnAutoInput_Click(object sender, EventArgs e) { + if (this.drpUnit.SelectedValue == BLL.Const._Null) + { + ShowNotify("请选择工艺规程编制单位!", MessageBoxIcon.Warning); + return; + } if (!string.IsNullOrEmpty(tvControlItem.SelectedNodeID)) { var jotList = from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == tvControlItem.SelectedNodeID && x.JointAttribute == drpJointAttribute.SelectedValue select x; From 31d0b92b8f49a55d94293b3adc5e88fd45bdff1f Mon Sep 17 00:00:00 2001 From: gaofei1985 <181547018@qq.com> Date: Fri, 24 Nov 2023 11:35:23 +0800 Subject: [PATCH 08/26] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DataBase/版本日志/SGGLDB_V2023-11-24.sql | 33 ++++ .../HJGL/WeldingManage/WeldReportEdit.aspx.cs | 2 + .../HJGL/WeldingReport/CheckResult.aspx | 173 +++++++++--------- .../HJGL/WeldingReport/CheckResult.aspx.cs | 19 +- .../CheckResult.aspx.designer.cs | 27 ++- SGGL/FineUIPro.Web/common/Menu_HJGL.xml | 1 + SGGL/FineUIPro.Web/common/Menu_HTGL.xml | 7 +- SGGL/FineUIPro.Web/common/Menu_PHTGL.xml | 21 ++- SGGL/FineUIPro.Web/common/Menu_ZHGL.xml | 7 +- 9 files changed, 179 insertions(+), 111 deletions(-) create mode 100644 DataBase/版本日志/SGGLDB_V2023-11-24.sql diff --git a/DataBase/版本日志/SGGLDB_V2023-11-24.sql b/DataBase/版本日志/SGGLDB_V2023-11-24.sql new file mode 100644 index 00000000..fa8b1feb --- /dev/null +++ b/DataBase/版本日志/SGGLDB_V2023-11-24.sql @@ -0,0 +1,33 @@ + +CREATE PROC [dbo].[sp_rpt_CheckResult] + @unitId NVARCHAR(50) = NULL, --λId + @detectionTypeId NVARCHAR(50) = NULL, --̽ + @flowingSection NVARCHAR(50) = NULL, --̽ + @date1 DATETIME = NULL, + @date2 DATETIME = NULL, + @projectId NVARCHAR(50) = NULL + +AS +/**/ + +select unit.UnitName,jot.WeldJointCode,detectionType.DetectionTypeCode,ndeItem.TotalFilm,ndeItem.PassFilm, +case ndeItem.CheckResult when '1' then 'ϸ' else 'ϸ' end as CheckResult,pipeline.FlowingSection +from HJGL_Batch_NDEItem ndeItem +LEFT JOIN dbo.Base_DetectionType detectionType ON detectionType.DetectionTypeId = ndeItem.DetectionTypeId +LEFT JOIN dbo.HJGL_Batch_BatchTrustItem trustItem ON trustItem.TrustBatchItemId = ndeItem.TrustBatchItemId +LEFT JOIN dbo.HJGL_WeldJoint jot ON jot.WeldJointId = trustItem.WeldJointId +LEFT JOIN dbo.HJGL_Pipeline pipeline ON jot.PipelineId = pipeline.PipelineId +LEFT JOIN dbo.HJGL_WeldingDaily daily ON daily.WeldingDailyId = jot.WeldingDailyId +LEFT JOIN dbo.Base_Unit unit ON unit.UnitId = daily.UnitId +WHERE (ndeItem.DetectionTypeId=@detectionTypeId OR @detectionTypeId IS NULL) +AND (jot.ProjectId=@projectId OR @projectId IS NULL) +AND (daily.UnitId = @unitId OR @unitId IS NULL) +AND (daily.WeldingDate >= @date1 OR @date1 IS NULL) +AND (daily.WeldingDate <= @date2 OR @date2 IS NULL) +AND (pipeline.FlowingSection like '%'+@flowingSection+'%' OR @flowingSection IS NULL) +ORDER BY daily.UnitId,detectionType.DetectionTypeCode,jot.WeldJointCode + + +GO + + diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReportEdit.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReportEdit.aspx.cs index 1ed9495f..02111680 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReportEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReportEdit.aspx.cs @@ -1015,6 +1015,8 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage #region 查找 protected void WeldingDateText_OnTextChanged(object sender, EventArgs e) { + string perfix = string.Format("{0:yyyyMMdd}", System.DateTime.Now) + "-"; + this.txtWeldingDailyCode.Text = BLL.SQLHelper.RunProcNewId("SpGetThreeNumber", "dbo.HJGL_WeldingDaily", "WeldingDailyCode", this.CurrUser.LoginProjectId, perfix); BindGrid(null); } /// diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingReport/CheckResult.aspx b/SGGL/FineUIPro.Web/HJGL/WeldingReport/CheckResult.aspx index bb42e7c0..ea731487 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingReport/CheckResult.aspx +++ b/SGGL/FineUIPro.Web/HJGL/WeldingReport/CheckResult.aspx @@ -10,90 +10,95 @@
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingReport/CheckResult.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingReport/CheckResult.aspx.cs index 27adf4a0..1dc4524b 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingReport/CheckResult.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingReport/CheckResult.aspx.cs @@ -31,12 +31,12 @@ namespace FineUIPro.Web.HJGL.WeldingReport listStr.Add(new SqlParameter("@projectId", this.CurrUser.LoginProjectId)); if (this.drpUnitId.SelectedValue != BLL.Const._Null) - { - listStr.Add(new SqlParameter("@unitcode", this.drpUnitId.SelectedValue)); + { + listStr.Add(new SqlParameter("@unitId", this.drpUnitId.SelectedValue)); } else { - listStr.Add(new SqlParameter("@unitcode", null)); + listStr.Add(new SqlParameter("@unitId", null)); } if (this.drpDetectionType.SelectedValue != BLL.Const._Null) { @@ -46,7 +46,14 @@ namespace FineUIPro.Web.HJGL.WeldingReport { listStr.Add(new SqlParameter("@detectionTypeId", null)); } - + if (!string.IsNullOrEmpty(this.txtFlowingSection.Text.Trim())) + { + listStr.Add(new SqlParameter("@flowingSection", this.txtFlowingSection.Text.Trim())); + } + else + { + listStr.Add(new SqlParameter("@flowingSection", null)); + } if (!string.IsNullOrEmpty(this.txtStarTime.Text)) { listStr.Add(new SqlParameter("@date1", this.txtStarTime.Text.Trim())); @@ -64,7 +71,7 @@ namespace FineUIPro.Web.HJGL.WeldingReport listStr.Add(new SqlParameter("@date2", null)); } SqlParameter[] parameter = listStr.ToArray(); - DataTable tb = SQLHelper.GetDataTableRunProc("sp_rpt_WelderFirstPassRate", parameter); + DataTable tb = SQLHelper.GetDataTableRunProc("sp_rpt_CheckResult", parameter); this.Grid1.RecordCount = tb.Rows.Count; var table = this.GetPagedDataTable(Grid1, tb); Grid1.DataSource = table; @@ -124,7 +131,7 @@ namespace FineUIPro.Web.HJGL.WeldingReport { Response.ClearContent(); string filename = Funs.GetNewFileName(); - Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("焊工一次合格率" + filename, System.Text.Encoding.UTF8) + ".xls"); + Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("检测结果汇总" + filename, System.Text.Encoding.UTF8) + ".xls"); Response.ContentType = "application/excel"; Response.ContentEncoding = System.Text.Encoding.UTF8; Response.Write(GetGridTableHtml(Grid1)); diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingReport/CheckResult.aspx.designer.cs b/SGGL/FineUIPro.Web/HJGL/WeldingReport/CheckResult.aspx.designer.cs index 3729067c..aafcac37 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingReport/CheckResult.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingReport/CheckResult.aspx.designer.cs @@ -75,6 +75,15 @@ namespace FineUIPro.Web.HJGL.WeldingReport { /// protected global::FineUIPro.DropDownList drpDetectionType; + /// + /// txtFlowingSection 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtFlowingSection; + /// /// txtStarTime 控件。 /// @@ -102,15 +111,6 @@ namespace FineUIPro.Web.HJGL.WeldingReport { /// protected global::FineUIPro.DatePicker txtEndTime; - /// - /// Toolbar3 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Toolbar Toolbar3; - /// /// ToolbarFill1 控件。 /// @@ -138,6 +138,15 @@ namespace FineUIPro.Web.HJGL.WeldingReport { /// protected global::FineUIPro.Button btnOut; + /// + /// labNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label labNumber; + /// /// ToolbarSeparator1 控件。 /// diff --git a/SGGL/FineUIPro.Web/common/Menu_HJGL.xml b/SGGL/FineUIPro.Web/common/Menu_HJGL.xml index 65eed927..89357168 100644 --- a/SGGL/FineUIPro.Web/common/Menu_HJGL.xml +++ b/SGGL/FineUIPro.Web/common/Menu_HJGL.xml @@ -60,6 +60,7 @@ + \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/common/Menu_HTGL.xml b/SGGL/FineUIPro.Web/common/Menu_HTGL.xml index c0fc81f0..95eeab91 100644 --- a/SGGL/FineUIPro.Web/common/Menu_HTGL.xml +++ b/SGGL/FineUIPro.Web/common/Menu_HTGL.xml @@ -7,6 +7,8 @@ + + @@ -14,7 +16,10 @@ - + + + + diff --git a/SGGL/FineUIPro.Web/common/Menu_PHTGL.xml b/SGGL/FineUIPro.Web/common/Menu_PHTGL.xml index eb672a76..31955789 100644 --- a/SGGL/FineUIPro.Web/common/Menu_PHTGL.xml +++ b/SGGL/FineUIPro.Web/common/Menu_PHTGL.xml @@ -17,19 +17,20 @@ - - - - - - - - - + + + + + + + + + + - + diff --git a/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml b/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml index 03eb9188..91287096 100644 --- a/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml +++ b/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml @@ -53,7 +53,12 @@ - + + + + + + From 98701b3991ca07480b2ef2010fd0e7d39c597b74 Mon Sep 17 00:00:00 2001 From: gaofei1985 <181547018@qq.com> Date: Fri, 24 Nov 2023 12:11:42 +0800 Subject: [PATCH 09/26] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DataBase/版本日志/SGGLDB_V2023-11-24.sql | 2 +- .../FineUIPro.Web/HJGL/WeldingManage/WeldReportEdit.aspx.cs | 2 +- SGGL/FineUIPro.Web/HJGL/WeldingReport/CheckResult.aspx | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/DataBase/版本日志/SGGLDB_V2023-11-24.sql b/DataBase/版本日志/SGGLDB_V2023-11-24.sql index fa8b1feb..880c945c 100644 --- a/DataBase/版本日志/SGGLDB_V2023-11-24.sql +++ b/DataBase/版本日志/SGGLDB_V2023-11-24.sql @@ -10,7 +10,7 @@ CREATE PROC [dbo].[sp_rpt_CheckResult] AS /**/ -select unit.UnitName,jot.WeldJointCode,detectionType.DetectionTypeCode,ndeItem.TotalFilm,ndeItem.PassFilm, +select ndeItem.NDEItemID,unit.UnitName,jot.WeldJointCode,detectionType.DetectionTypeCode,ndeItem.TotalFilm,ndeItem.PassFilm, case ndeItem.CheckResult when '1' then 'ϸ' else 'ϸ' end as CheckResult,pipeline.FlowingSection from HJGL_Batch_NDEItem ndeItem LEFT JOIN dbo.Base_DetectionType detectionType ON detectionType.DetectionTypeId = ndeItem.DetectionTypeId diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReportEdit.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReportEdit.aspx.cs index 02111680..e6a9690c 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReportEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReportEdit.aspx.cs @@ -1015,7 +1015,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage #region 查找 protected void WeldingDateText_OnTextChanged(object sender, EventArgs e) { - string perfix = string.Format("{0:yyyyMMdd}", System.DateTime.Now) + "-"; + string perfix = string.Format("{0:yyyyMMdd}", Funs.GetNewDateTimeOrNow(this.txtWeldingDate.Text.Trim())) + "-"; this.txtWeldingDailyCode.Text = BLL.SQLHelper.RunProcNewId("SpGetThreeNumber", "dbo.HJGL_WeldingDaily", "WeldingDailyCode", this.CurrUser.LoginProjectId, perfix); BindGrid(null); } diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingReport/CheckResult.aspx b/SGGL/FineUIPro.Web/HJGL/WeldingReport/CheckResult.aspx index ea731487..7940e9b5 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingReport/CheckResult.aspx +++ b/SGGL/FineUIPro.Web/HJGL/WeldingReport/CheckResult.aspx @@ -14,9 +14,9 @@ ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch"> From 00db9731bf5d41f9adf3b311200b87e024d06a28 Mon Sep 17 00:00:00 2001 From: gaofei1985 <181547018@qq.com> Date: Fri, 24 Nov 2023 12:20:07 +0800 Subject: [PATCH 10/26] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReportEdit.aspx.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReportEdit.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReportEdit.aspx.cs index e6a9690c..d3f6c885 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReportEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReportEdit.aspx.cs @@ -184,7 +184,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage //txtWeldingDate.MaxDate = DateTime.Now; this.txtWeldingDate.Text = string.Format("{0:yyyy-MM-dd}", System.DateTime.Now); this.txtTableDate.Text = string.Format("{0:yyyy-MM-dd}", System.DateTime.Now); - string perfix = string.Format("{0:yyyyMMdd}", System.DateTime.Now) + "-"; + string perfix = string.Format("{0:yyyyMMdd}", System.DateTime.Now) + "-" + this.CurrUser.PersonName + "-"; this.txtWeldingDailyCode.Text = BLL.SQLHelper.RunProcNewId("SpGetThreeNumber", "dbo.HJGL_WeldingDaily", "WeldingDailyCode", this.CurrUser.LoginProjectId, perfix); } } @@ -1015,7 +1015,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage #region 查找 protected void WeldingDateText_OnTextChanged(object sender, EventArgs e) { - string perfix = string.Format("{0:yyyyMMdd}", Funs.GetNewDateTimeOrNow(this.txtWeldingDate.Text.Trim())) + "-"; + string perfix = string.Format("{0:yyyyMMdd}", Funs.GetNewDateTimeOrNow(this.txtWeldingDate.Text.Trim())) + "-" + this.CurrUser.PersonName + "-"; this.txtWeldingDailyCode.Text = BLL.SQLHelper.RunProcNewId("SpGetThreeNumber", "dbo.HJGL_WeldingDaily", "WeldingDailyCode", this.CurrUser.LoginProjectId, perfix); BindGrid(null); } From 3aeb7e47de4946ffaa661cd7fb0d7802a489f9e2 Mon Sep 17 00:00:00 2001 From: gaofei1985 <181547018@qq.com> Date: Fri, 24 Nov 2023 18:29:30 +0800 Subject: [PATCH 11/26] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DataBase/版本日志/SGGLDB_V2023-11-24.sql | 60 +++++++++ SGGL/FineUIPro.Web/FineUIPro.Web.csproj | 8 ++ .../HJGL/PointTrust/PointBatch.aspx | 2 + .../HJGL/PointTrust/PointBatch.aspx.cs | 108 +++++++++++++++++ .../PointTrust/PointBatch.aspx.designer.cs | 9 ++ .../HJGL/PointTrust/PointWeldJointView.aspx | 91 ++++++++++++++ .../PointTrust/PointWeldJointView.aspx.cs | 87 +++++++++++++ .../PointWeldJointView.aspx.designer.cs | 114 ++++++++++++++++++ .../HJGL/WeldingManage/JotTwoDesign.aspx.cs | 11 +- .../HJGL/WeldingManage/WeldJointEdit.aspx.cs | 38 +++--- .../HJGL/WeldingManage/WeldingConDate.aspx.cs | 22 ++-- SGGL/Model/Model.cs | 18 +++ 12 files changed, 541 insertions(+), 27 deletions(-) create mode 100644 SGGL/FineUIPro.Web/HJGL/PointTrust/PointWeldJointView.aspx create mode 100644 SGGL/FineUIPro.Web/HJGL/PointTrust/PointWeldJointView.aspx.cs create mode 100644 SGGL/FineUIPro.Web/HJGL/PointTrust/PointWeldJointView.aspx.designer.cs diff --git a/DataBase/版本日志/SGGLDB_V2023-11-24.sql b/DataBase/版本日志/SGGLDB_V2023-11-24.sql index 880c945c..a26c6117 100644 --- a/DataBase/版本日志/SGGLDB_V2023-11-24.sql +++ b/DataBase/版本日志/SGGLDB_V2023-11-24.sql @@ -31,3 +31,63 @@ ORDER BY daily.UnitId,detectionType.DetectionTypeCode,jot.WeldJointCode GO + +ALTER VIEW [dbo].[View_HJGL_Batch_PointBatchItem] +AS +/*************ϸ*************/ +SELECT PointBatchItem.PointBatchItemId, +PointBatchItem.PointBatchId, +PointBatch.ProjectId, +PointBatch.UnitId, +PointBatch.DetectionTypeId, +PointBatch.DetectionRateId, +PointBatch.PointBatchCode, +Pipeline.UnitWorkId, +PointBatchItem.WeldJointId, +(CASE PointBatchItem.PointState WHEN '1' THEN '' WHEN '2' THEN '͸' END) AS PointState, +(CASE PointBatchItem.IsBuildTrust WHEN 1 THEN '' ELSE '' END) AS IsBuildTrust, +(CASE WHEN PointBatchItem.IsAudit=1 THEN '' + WHEN (PointBatchItem.IsAudit IS NULL OR PointBatchItem.IsAudit=0) AND PointBatchItem.PointState IS NOT NULL THEN '' + WHEN (PointBatchItem.IsAudit IS NULL OR PointBatchItem.IsAudit=0) AND PointBatchItem.PointState IS NULL THEN '' END) AS PointIsAudit, +PointBatchItem.PointDate,-- +(CASE PointBatchItem.IsWelderFirst WHEN 1 THEN '' ELSE '' END) AS IsWelderFirst, +PointBatchItem.RepairDate,-- +PointBatchItem.RepairRecordId, +PointBatchItem.CutDate,--г +PointBatchItem.PBackingWelderId,--޴׺ +PointBatchItem.PCoverWelderId,--޸溸 +UnitWork.UnitWorkCode,-- +WeldJoint.WeldJointCode,--ں +WeldJoint.BackingWelderId AS WelderId, --ID +BackingWelder.WelderCode AS BackingWelderCode, +CoverWelder.WelderCode AS CoverWelderCode, +WeldType.WeldTypeCode, +WeldJoint.JointAttribute, +WeldJoint.JointArea,-- +WeldJoint.Size,--ʵʴ羶 +WeldingDaily.WeldingDate,-- +WeldJoint.PipelineId, --ID +WeldJoint.Material1Id AS Mat, -- +WeldJoint.Specification, -- +Pipeline.PipelineCode, --ߺ +PipingClass.PipingClassName , --ܵȼ +WeldJoint.BackingWelderId, +WeldJoint.CoverWelderId +FROM dbo.HJGL_Batch_PointBatchItem AS PointBatchItem +LEFT JOIN dbo.HJGL_Batch_PointBatch AS PointBatch ON PointBatch.PointBatchId=PointBatchItem.PointBatchId +LEFT JOIN dbo.HJGL_WeldJoint AS WeldJoint ON WeldJoint.WeldJointId=PointBatchItem.WeldJointId +LEFT JOIN dbo.HJGL_Pipeline AS Pipeline ON Pipeline.PipelineId=WeldJoint.PipelineId +LEFT JOIN dbo.WBS_UnitWork AS UnitWork ON UnitWork.UnitWorkId=Pipeline.UnitWorkId +LEFT JOIN dbo.HJGL_WeldingDaily AS WeldingDaily ON WeldingDaily.WeldingDailyId=WeldJoint.WeldingDailyId +LEFT JOIN dbo.Base_PipingClass AS PipingClass ON PipingClass.PipingClassId=Pipeline.PipingClassId +LEFT JOIN SitePerson_Person AS BackingWelder ON BackingWelder.PersonId=WeldJoint.BackingWelderId +LEFT JOIN SitePerson_Person AS CoverWelder ON CoverWelder.PersonId=WeldJoint.CoverWelderId +LEFT JOIN Base_WeldType AS WeldType ON WeldType.WeldTypeId=WeldJoint.WeldTypeId +LEFT JOIN HJGL_Hard_TrustItem HardTrustItem ON HardTrustItem.WeldJointId=PointBatchItem.WeldJointId +where (WeldJoint.IsHotProess!=1 or (WeldJoint.IsHotProess=1 and HardTrustItem.IsPass=1)) +and BackingWelder.ProjectId=Pipeline.ProjectId and CoverWelder.ProjectId=Pipeline.ProjectId + + +GO + + diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index 52b765e6..8266f0e6 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -658,6 +658,7 @@ + @@ -8534,6 +8535,13 @@ PointTrust.aspx + + PointWeldJointView.aspx + ASPXCodeBehind + + + PointWeldJointView.aspx + TrustBatch.aspx ASPXCodeBehind diff --git a/SGGL/FineUIPro.Web/HJGL/PointTrust/PointBatch.aspx b/SGGL/FineUIPro.Web/HJGL/PointTrust/PointBatch.aspx index bb60c63b..4920bdb9 100644 --- a/SGGL/FineUIPro.Web/HJGL/PointTrust/PointBatch.aspx +++ b/SGGL/FineUIPro.Web/HJGL/PointTrust/PointBatch.aspx @@ -133,6 +133,8 @@ + + diff --git a/SGGL/FineUIPro.Web/HJGL/PointTrust/PointBatch.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PointTrust/PointBatch.aspx.cs index e2693c6e..0942ba3a 100644 --- a/SGGL/FineUIPro.Web/HJGL/PointTrust/PointBatch.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PointTrust/PointBatch.aspx.cs @@ -647,8 +647,103 @@ namespace FineUIPro.Web.HJGL.PointTrust { if (!string.IsNullOrEmpty(Grid1.SelectedRowID)) { + Model.SGGLDB db = Funs.DB; + var weldJoint = (from x in db.HJGL_WeldJoint + join y in db.HJGL_Batch_PointBatchItem on x.WeldJointId equals y.WeldJointId + where y.PointBatchItemId == Grid1.SelectedRowID + select x).FirstOrDefault(); + Model.Project_Sys_Set batchSet = BLL.Project_SysSetService.GetSysSetBySetId("5", this.CurrUser.LoginProjectId); + if (batchSet != null && weldJoint != null) + { + int needJointNum = 0; + int pointNumG = 0; + int pointNumA = 0; + if (batchSet.SetValue.Contains("6")) //按管线组批 + { + var pipeline = (from x in db.HJGL_Pipeline + join y in db.HJGL_WeldJoint on x.PipelineId equals y.PipelineId + join z in db.HJGL_Batch_PointBatchItem on y.WeldJointId equals z.WeldJointId + where z.PointBatchId == this.PointBatchId + select x).FirstOrDefault(); + if (pipeline != null) + { + this.lbPipelineCode.Text = pipeline.PipelineCode; + Model.Base_DetectionRate rate = BLL.Base_DetectionRateService.GetDetectionRateByDetectionRateId(pipeline.DetectionRateId); + if (rate != null) + { + int totalJointCount = db.HJGL_WeldJoint.Count(x => x.PipelineId == pipeline.PipelineId); + needJointNum = Convert.ToInt32(Math.Ceiling((totalJointCount * rate.DetectionRateValue.Value) * 0.01)); + // 安装口检测数量 + pointNumG = Convert.ToInt32(Math.Ceiling(needJointNum * 0.4)); + // 预制口要检测的数量 + pointNumA = needJointNum - pointNumG; + var pointGNum = (from x in db.HJGL_Batch_PointBatchItem + join y in db.HJGL_WeldJoint on x.WeldJointId equals y.WeldJointId + where y.PipelineId == pipeline.PipelineId && x.PointState == "1" && y.JointAttribute == "安装口" + select x).Count(); + var pointNotGNum = (from x in db.HJGL_Batch_PointBatchItem + join y in db.HJGL_WeldJoint on x.WeldJointId equals y.WeldJointId + where y.PipelineId == pipeline.PipelineId && x.PointState == "1" && y.JointAttribute == "预制口" + select x).Count(); + if (weldJoint.JointAttribute == "安装口" && pointGNum >= pointNumG) + { + Alert.ShowInTop("安装口已达检测标准,无需再点此安装口!", MessageBoxIcon.Warning); + return; + } + if (weldJoint.JointAttribute == "预制口" && pointNotGNum >= pointNumA) + { + Alert.ShowInTop("预制口已达检测标准,无需再点此预制口!", MessageBoxIcon.Warning); + return; + } + } + } + + } + else //不按管线组批 + { + string unitWorkId = this.tvControlItem.SelectedNode.ParentNode.ParentNode.ParentNode.NodeID; + string rateId = this.tvControlItem.SelectedNode.ParentNode.NodeID.Split('|')[0]; + string detectionType = this.tvControlItem.SelectedNode.ParentNode.ParentNode.NodeID.Split('|')[0]; + int totalJointNum = (from x in db.HJGL_WeldJoint + join y in db.HJGL_Pipeline on x.PipelineId equals y.PipelineId + where y.DetectionRateId == rateId && y.UnitWorkId == unitWorkId && y.DetectionType == detectionType + select x).Count(); + Model.Base_DetectionRate rate = BLL.Base_DetectionRateService.GetDetectionRateByDetectionRateId(rateId); + if (rate != null) + { + needJointNum = Convert.ToInt32(Math.Ceiling((totalJointNum * rate.DetectionRateValue.Value) * 0.01)); + // 安装口检测数量 + pointNumG = Convert.ToInt32(Math.Ceiling(needJointNum * 0.4)); + // 预制口要检测的数量 + pointNumA = needJointNum - pointNumG; + var pointGNum = (from x in db.HJGL_Batch_PointBatchItem + join y in db.HJGL_Batch_PointBatch on x.PointBatchId equals y.PointBatchId + join z in db.HJGL_WeldJoint on x.WeldJointId equals z.WeldJointId + where y.DetectionRateId == rateId && y.UnitWorkId == unitWorkId && y.DetectionTypeId == detectionType + && x.PointState == "1" && z.JointAttribute == "安装口" + select x).Count(); + var pointNotGNum = (from x in db.HJGL_Batch_PointBatchItem + join y in db.HJGL_Batch_PointBatch on x.PointBatchId equals y.PointBatchId + join z in db.HJGL_WeldJoint on x.WeldJointId equals z.WeldJointId + where y.DetectionRateId == rateId && y.UnitWorkId == unitWorkId && y.DetectionTypeId == detectionType + && x.PointState == "1" && z.JointAttribute == "预制口" + select x).Count(); + if (weldJoint.JointAttribute == "安装口" && pointGNum >= pointNumG) + { + Alert.ShowInTop("安装口已达检测标准,无需再点此安装口!", MessageBoxIcon.Warning); + return; + } + if (weldJoint.JointAttribute == "预制口" && pointNotGNum >= pointNumA) + { + Alert.ShowInTop("预制口已达检测标准,无需再点此预制口!", MessageBoxIcon.Warning); + return; + } + } + } + } PointBatchDetailService.UpdatePointBatchDetail(Grid1.SelectedRowID, "1", System.DateTime.Now); this.BindGrid(); + tvControlItem_NodeCommand(null, null); Alert.ShowInTop("已成功点口!", MessageBoxIcon.Success); } else @@ -893,5 +988,18 @@ namespace FineUIPro.Web.HJGL.PointTrust return newTrustCode; } + + /// + /// 已检测口明细 + /// + /// + /// + protected void btnShow_Click(object sender, EventArgs e) + { + string unitWorkId = this.tvControlItem.SelectedNode.ParentNode.ParentNode.ParentNode.NodeID; + string rateId = this.tvControlItem.SelectedNode.ParentNode.NodeID.Split('|')[0]; + string detectionType = this.tvControlItem.SelectedNode.ParentNode.ParentNode.NodeID.Split('|')[0]; + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PointWeldJointView.aspx?unitWorkId={0}&rateId={1}&detectionType={2}", unitWorkId, rateId, detectionType, "新增 - "))); + } } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HJGL/PointTrust/PointBatch.aspx.designer.cs b/SGGL/FineUIPro.Web/HJGL/PointTrust/PointBatch.aspx.designer.cs index 00266dd5..e2887ee5 100644 --- a/SGGL/FineUIPro.Web/HJGL/PointTrust/PointBatch.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HJGL/PointTrust/PointBatch.aspx.designer.cs @@ -318,6 +318,15 @@ namespace FineUIPro.Web.HJGL.PointTrust { /// protected global::FineUIPro.Label lbPointJointNum2; + /// + /// btnShow 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnShow; + /// /// lbLastJointNum2 控件。 /// diff --git a/SGGL/FineUIPro.Web/HJGL/PointTrust/PointWeldJointView.aspx b/SGGL/FineUIPro.Web/HJGL/PointTrust/PointWeldJointView.aspx new file mode 100644 index 00000000..1c66d2a0 --- /dev/null +++ b/SGGL/FineUIPro.Web/HJGL/PointTrust/PointWeldJointView.aspx @@ -0,0 +1,91 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PointWeldJointView.aspx.cs" Inherits="FineUIPro.Web.HJGL.PointTrust.PointWeldJointView" %> + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/HJGL/PointTrust/PointWeldJointView.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PointTrust/PointWeldJointView.aspx.cs new file mode 100644 index 00000000..cc586d61 --- /dev/null +++ b/SGGL/FineUIPro.Web/HJGL/PointTrust/PointWeldJointView.aspx.cs @@ -0,0 +1,87 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; + +namespace FineUIPro.Web.HJGL.PointTrust +{ + public partial class PointWeldJointView : PageBase + { + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + string unitWorkId = Request.Params["unitWorkId"]; + string detectionType = Request.Params["detectionType"]; + string rateId = Request.Params["rateId"]; + Model.SGGLDB db = Funs.DB; + var pointJoints = (from x in db.HJGL_Batch_PointBatchItem + join y in db.HJGL_Batch_PointBatch on x.PointBatchId equals y.PointBatchId + join z in db.HJGL_WeldJoint on x.WeldJointId equals z.WeldJointId + where y.DetectionRateId == rateId && y.UnitWorkId == unitWorkId && y.DetectionTypeId == detectionType + && x.PointState == "1" + select new { x.WeldJointId, z.WeldJointCode, z.JointAttribute }); + this.lbDef.Text = "预制口:" + pointJoints.Count(x => x.JointAttribute == "预制口").ToString() + "个,安装口:" + pointJoints.Count(x => x.JointAttribute == "安装口").ToString()+"个。"; + BindGrid(); + } + } + #region 绑定数据 + /// + /// 绑定数据 + /// + public void BindGrid() + { + string strSql = @"SELECT PointBatchItemId,PointBatchId,WeldJointId,PointState,PointDate,RepairDate,CutDate,WeldJointCode,IsBuildTrust,WeldTypeCode, + JointAttribute ,JointArea,IsWelderFirst,Size,WeldingDate,PipelineCode,PipingClassName,PointIsAudit,BackingWelderCode,CoverWelderCode + FROM dbo.View_HJGL_Batch_PointBatchItem + WHERE UnitWorkId=@UnitWorkId and DetectionTypeId=@DetectionTypeId and DetectionRateId=@DetectionRateId and PointState='点口'"; + List listStr = new List(); + listStr.Add(new SqlParameter("@UnitWorkId", Request.Params["unitWorkId"])); + listStr.Add(new SqlParameter("@DetectionTypeId", Request.Params["detectionType"])); + listStr.Add(new SqlParameter("@DetectionRateId", Request.Params["rateId"])); + if (!string.IsNullOrEmpty(txtpipelinecode.Text.Trim())) + { + strSql += " and PipelineCode like @PipelineCode "; + listStr.Add(new SqlParameter("@PipelineCode", "%" + txtpipelinecode.Text.Trim() + "%")); + } + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + + Grid1.RecordCount = tb.Rows.Count; + // tb = GetFilteredTable(Grid1.FilteredData, tb); + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + } + + #endregion + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + BindGrid(); + } + + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + protected void btnQuery_Click(object sender, EventArgs e) + { + this.BindGrid(); + } + + #region 排序 + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + BindGrid(); + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HJGL/PointTrust/PointWeldJointView.aspx.designer.cs b/SGGL/FineUIPro.Web/HJGL/PointTrust/PointWeldJointView.aspx.designer.cs new file mode 100644 index 00000000..537048b0 --- /dev/null +++ b/SGGL/FineUIPro.Web/HJGL/PointTrust/PointWeldJointView.aspx.designer.cs @@ -0,0 +1,114 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.HJGL.PointTrust { + + + public partial class PointWeldJointView { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// txtpipelinecode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtpipelinecode; + + /// + /// btnQuery 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnQuery; + + /// + /// lbDef 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbDef; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + } +} diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx.cs index 7317da8d..6bc37c67 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx.cs @@ -484,7 +484,16 @@ namespace FineUIPro.Web.HJGL.WeldingManage if (wpqList != null) { Model.HJGL_WeldJoint newJot = WeldJointService.GetWeldJointByWeldJointId(jot.WeldJointId); - Model.WPQ_WPQList wps = BLL.WPQListServiceService.GetWPQById(wpqList.First().WPQId); + Model.WPQ_WPQList wps = new Model.WPQ_WPQList(); + var a = wpqList.FirstOrDefault(x => x.WeldingMethodId == "feb1234c-a538-476f-99ac-7b3ab15997c1"); //优先匹配GTAW+SMAW的焊评 + if (a == null) + { + wps = BLL.WPQListServiceService.GetWPQById(wpqList.First().WPQId); + } + else + { + wps = BLL.WPQListServiceService.GetWPQById(a.WPQId); + } newJot.WPQId = wps.WPQId; newJot.WeldJointId = jot.WeldJointId; diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointEdit.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointEdit.aspx.cs index ec9605fb..a93fde9f 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointEdit.aspx.cs @@ -34,7 +34,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage ViewState["WeldJointId"] = value; } } - + protected void Page_Load(object sender, EventArgs e) { @@ -235,10 +235,10 @@ namespace FineUIPro.Web.HJGL.WeldingManage //string perfix = txtPipelineCode.Text + "/Z-"; string perfix = txtPipelineCode.Text + "/"; this.txtWeldJointCode.Text = perfix; - - // txtWeldJointCode.Text = BLL.SQLHelper.RunProcNewIdByProjectId("SpGetNewCode4ByProjectId", "dbo.HJGL_WeldJoint", "WeldJointCode", this.CurrUser.LoginProjectId, perfix); - // txtWeldJointCode.Text = txtWeldJointCode.Text.Replace(perfix, ""); + // txtWeldJointCode.Text = BLL.SQLHelper.RunProcNewIdByProjectId("SpGetNewCode4ByProjectId", "dbo.HJGL_WeldJoint", "WeldJointCode", this.CurrUser.LoginProjectId, perfix); + + // txtWeldJointCode.Text = txtWeldJointCode.Text.Replace(perfix, ""); } } @@ -322,7 +322,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage ///
private void SaveData() { - // if (string.IsNullOrEmpty(this.txtWeldJointCode.Text.Trim()) || this.drpPipingClass.SelectedValue == BLL.Const._Null || this.drpMaterial1.SelectedValue == BLL.Const._Null || this.drpMaterial2.SelectedValue == BLL.Const._Null || this.drpWeldTypeCode.SelectedValue == BLL.Const._Null || string.IsNullOrEmpty(this.hdWeldingMethodId.Text) || string.IsNullOrEmpty(this.txtWpqId.Text.Trim())) + // if (string.IsNullOrEmpty(this.txtWeldJointCode.Text.Trim()) || this.drpPipingClass.SelectedValue == BLL.Const._Null || this.drpMaterial1.SelectedValue == BLL.Const._Null || this.drpMaterial2.SelectedValue == BLL.Const._Null || this.drpWeldTypeCode.SelectedValue == BLL.Const._Null || string.IsNullOrEmpty(this.hdWeldingMethodId.Text) || string.IsNullOrEmpty(this.txtWpqId.Text.Trim())) if (string.IsNullOrEmpty(this.txtWeldJointCode.Text.Trim()) || this.drpPipingClass.SelectedValue == BLL.Const._Null || this.drpMaterial1.SelectedValue == BLL.Const._Null || this.drpMaterial2.SelectedValue == BLL.Const._Null || this.drpWeldTypeCode.SelectedValue == BLL.Const._Null) { Alert.ShowInTop("页面必填项不能为空", MessageBoxIcon.Warning); @@ -337,22 +337,22 @@ namespace FineUIPro.Web.HJGL.WeldingManage //if (!this.txtWeldJointCode.Text.Contains("G")) //{ - int jointCode = Funs.GetNewIntOrZero(this.txtWeldJointCode.Text.Trim()); - if (jointCode != 0) + int jointCode = Funs.GetNewIntOrZero(this.txtWeldJointCode.Text.Trim()); + if (jointCode != 0) + { + if (jointCode < 10) { - if (jointCode < 10) - { - joint.WeldJointCode = "0" + Convert.ToString(jointCode); - } - else - { - joint.WeldJointCode = Convert.ToString(jointCode); - } + joint.WeldJointCode = "0" + Convert.ToString(jointCode); } else { - joint.WeldJointCode = this.txtWeldJointCode.Text; + joint.WeldJointCode = Convert.ToString(jointCode); } + } + else + { + joint.WeldJointCode = this.txtWeldJointCode.Text; + } //} //else //{ @@ -370,7 +370,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage } joint.Size = Funs.GetNewDecimal(this.txtSize.Text.Trim()); joint.Dia = Funs.GetNewDecimal(this.txtDia.Text.Trim()); - joint.DNDia=txtDNDia.Text.Trim(); + joint.DNDia = txtDNDia.Text.Trim(); joint.Thickness = Funs.GetNewDecimal(this.txtThickness.Text.Trim()); //if (this.drpComponent1.SelectedValue != BLL.Const._Null) //{ @@ -644,7 +644,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { var wpsRod = BLL.Base_ConsumablesService.GetConsumablesByConsumablesId(wps.WeldingRod); var matRod = BLL.Base_ConsumablesService.GetConsumablesByConsumablesId(drpWeldingRod.SelectedValue); - if (IsCoverClass(wpsRod.SteelType, matRod.SteelType)) + if (wpsRod != null && matRod != null && IsCoverClass(wpsRod.SteelType, matRod.SteelType)) { } @@ -683,7 +683,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { var wpsWire = BLL.Base_ConsumablesService.GetConsumablesByConsumablesId(wps.WeldingWire); var matWire = BLL.Base_ConsumablesService.GetConsumablesByConsumablesId(drpWeldingWire.SelectedValue); - if (IsCoverClass(wpsWire.SteelType, matWire.SteelType)) + if (wpsWire != null && matWire != null && IsCoverClass(wpsWire.SteelType, matWire.SteelType)) { } diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldingConDate.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldingConDate.aspx.cs index 91bfb84b..2d19afcc 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldingConDate.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldingConDate.aspx.cs @@ -415,8 +415,16 @@ namespace FineUIPro.Web.HJGL.WeldingManage Model.HJGL_WeldJoint newJot = new Model.HJGL_WeldJoint(); if (wpqList != null) { - - Model.WPQ_WPQList wps = BLL.WPQListServiceService.GetWPQById(wpqList.First().WPQId); + Model.WPQ_WPQList wps = new Model.WPQ_WPQList(); + var a = wpqList.FirstOrDefault(x => x.WeldingMethodId == "feb1234c-a538-476f-99ac-7b3ab15997c1"); //优先匹配GTAW+SMAW的焊评 + if (a == null) + { + wps = BLL.WPQListServiceService.GetWPQById(wpqList.First().WPQId); + } + else + { + wps = BLL.WPQListServiceService.GetWPQById(a.WPQId); + } newJot.WPQId = wps.WPQId; newJot.WeldJointId = jot.WeldJointId; @@ -483,11 +491,11 @@ namespace FineUIPro.Web.HJGL.WeldingManage Alert.ShowInTop("请至少选择一条记录", MessageBoxIcon.Warning); return; } - if (BLL.WeldTaskService.GetWeldTaskByWeldJointId(Grid1.SelectedRowID) != null) //已下任务单,不可修改数据 - { - Alert.ShowInTop("该焊口已生成焊接任务单,不能编辑!", MessageBoxIcon.Warning); - return; - } + //if (BLL.WeldTaskService.GetWeldTaskByWeldJointId(Grid1.SelectedRowID) != null) //已下任务单,不可修改数据 + //{ + // Alert.ShowInTop("该焊口已生成焊接任务单,不能编辑!", MessageBoxIcon.Warning); + // return; + //} PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("WeldJointEdit.aspx?WeldJointId={0}&flag=2", Grid1.SelectedRowID, "维护 - "))); } else diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs index 348bf7fd..6b2ee015 100644 --- a/SGGL/Model/Model.cs +++ b/SGGL/Model/Model.cs @@ -269072,6 +269072,8 @@ namespace Model private string _DetectionTypeId; + private string _DetectionRateId; + private string _PointBatchCode; private string _UnitWorkId; @@ -269216,6 +269218,22 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DetectionRateId", DbType="NVarChar(50)")] + public string DetectionRateId + { + get + { + return this._DetectionRateId; + } + set + { + if ((this._DetectionRateId != value)) + { + this._DetectionRateId = value; + } + } + } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PointBatchCode", DbType="NVarChar(100)")] public string PointBatchCode { From 379880974007d32a5f6ecb1e281bd7342f138069 Mon Sep 17 00:00:00 2001 From: gaofei1985 <181547018@qq.com> Date: Sat, 25 Nov 2023 12:34:55 +0800 Subject: [PATCH 12/26] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SGGL/FineUIPro.Web/FineUIPro.Web.csproj | 8 + .../WeldingManage/PipelineListPDMSIn.aspx.cs | 12 + SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx | 117 +++++++++ .../common/mainMenu_HJGL3.aspx.cs | 224 ++++++++++++++++++ .../common/mainMenu_HJGL3.aspx.designer.cs | 168 +++++++++++++ SGGL/FineUIPro.Web/indexProject.aspx.cs | 2 +- 6 files changed, 530 insertions(+), 1 deletion(-) create mode 100644 SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx create mode 100644 SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx.cs create mode 100644 SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx.designer.cs diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index 8266f0e6..b08999df 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -307,6 +307,7 @@ + @@ -6281,6 +6282,13 @@ mainMenu_HJGL2.aspx + + mainMenu_HJGL3.aspx + ASPXCodeBehind + + + mainMenu_HJGL3.aspx + mainMenu_HJGL_AVEVA.aspx ASPXCodeBehind diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/PipelineListPDMSIn.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/PipelineListPDMSIn.aspx.cs index 9db0edd2..33922dc7 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/PipelineListPDMSIn.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/PipelineListPDMSIn.aspx.cs @@ -1055,6 +1055,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage temp.IsHotProess }).ToList(); + var weldJointCodes =weldJoints.Select(x=>x.WeldJointCode).Distinct().ToList(); + var pipelineCodes = weldJoints.Select(x => x.PipelineCode).Distinct().ToList(); for (int i = 0; i < weldJoints.Count(); i++) { Model.HJGL_WeldJoint weldJoint = new Model.HJGL_WeldJoint(); @@ -1093,6 +1095,16 @@ namespace FineUIPro.Web.HJGL.WeldingManage BLL.WeldJointService.AddBulkWeldJoint(weldJoints_add); } + Model.SGGLDB db = Funs.DB; + var q = from x in db.HJGL_WeldJoint + join y in db.HJGL_Pipeline on x.PipelineId equals y.PipelineId + where y.UnitWorkId == Request.Params["UnitWorkId"] && pipelineCodes.Contains(x.PipelineCode) && !weldJointCodes.Contains(x.WeldJointCode) + select x; + if (q.Count() > 0) + { + db.HJGL_WeldJoint.DeleteAllOnSubmit(q); + db.SubmitChanges(); + } } //public void AddView_HJGL_WeldJoint(List PipelineList) diff --git a/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx b/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx new file mode 100644 index 00000000..a2bc8721 --- /dev/null +++ b/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx @@ -0,0 +1,117 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="mainMenu_HJGL3.aspx.cs" Inherits="FineUIPro.Web.common.mainMenu_HJGL3" %> + + + + + + 焊接进度统计 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx.cs b/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx.cs new file mode 100644 index 00000000..2ce08e0a --- /dev/null +++ b/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx.cs @@ -0,0 +1,224 @@ +using BLL; +using MiniExcelLibs; +using Model; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.IO; +using System.Linq; + +namespace FineUIPro.Web.common +{ + public partial class mainMenu_HJGL3 : PageBase + { + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.InitTreeMenu();//加载树 + BindGrid1(); + } + } + + #region 加载树装置-单位-工作区 + /// + /// 加载树 + /// + private void InitTreeMenu() + { + this.tvControlItem.Nodes.Clear(); + + TreeNode rootNode1 = new TreeNode(); + rootNode1.NodeID = "1"; + rootNode1.Text = "建筑工程"; + rootNode1.CommandName = "建筑工程"; + rootNode1.Selectable = false; + this.tvControlItem.Nodes.Add(rootNode1); + + TreeNode rootNode2 = new TreeNode(); + rootNode2.NodeID = "2"; + rootNode2.Text = "安装工程"; + rootNode2.CommandName = "安装工程"; + rootNode2.Expanded = true; + this.tvControlItem.Nodes.Add(rootNode2); + + var pUnits = (from x in Funs.DB.Project_ProjectUnit where x.ProjectId == this.CurrUser.LoginProjectId select x).ToList(); + // 获取当前用户所在单位 + var currUnit = pUnits.FirstOrDefault(x => x.UnitId == this.CurrUser.UnitId); + + var unitWorkList = (from x in Funs.DB.WBS_UnitWork + where x.ProjectId == this.CurrUser.LoginProjectId + && x.SuperUnitWork == null && x.UnitId != null && x.ProjectType != null + select x).ToList(); + + List unitWork1 = null; + List unitWork2 = null; + + //// 当前为施工单位,只能操作本单位的数据 + //if (currUnit != null && currUnit.UnitType == Const.ProjectUnitType_2) + //{ + // unitWork1 = (from x in unitWorkList + // where x.UnitId == this.CurrUser.UnitId && x.ProjectType == "1" + // select x).ToList(); + // unitWork2 = (from x in unitWorkList + // where x.UnitId == this.CurrUser.UnitId && x.ProjectType == "2" + // select x).ToList(); + //} + //else + //{ + unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList(); + unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList(); + //} + + if (unitWork1.Count() > 0) + { + foreach (var q in unitWork1) + { + int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId select x).Count(); + var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId); + TreeNode tn1 = new TreeNode(); + tn1.NodeID = q.UnitWorkId; + tn1.Text = q.UnitWorkName + "【" + a.ToString() + "】" + "管线"; + tn1.ToolTip = "施工单位:" + unitNamesUnitIds; + tn1.EnableClickEvent = true; + rootNode1.Nodes.Add(tn1); + } + } + if (unitWork2.Count() > 0) + { + foreach (var q in unitWork2) + { + int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId select x).Count(); + var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId); + TreeNode tn2 = new TreeNode(); + tn2.NodeID = q.UnitWorkId; + tn2.Text = q.UnitWorkName + "【" + a.ToString() + "】" + "管线"; + tn2.ToolTip = "施工单位:" + unitNamesUnitIds; + tn2.EnableClickEvent = true; + rootNode2.Nodes.Add(tn2); + } + } + } + #endregion + + #region 点击TreeView + /// + /// 点击TreeView + /// + /// + /// + protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e) + { + if (this.tvControlItem.SelectedNodeID.Length > 1) + { + this.BindGrid2(this.tvControlItem.SelectedNodeID); + } + } + #endregion + + #region 数据绑定 + /// + /// 数据绑定 + /// + private void BindGrid1() + { + string strSql = @"select ProjectId,TotalDin,FinishSize,CONVERT(NVARCHAR(10),(CAST((CASE ISNULL(TotalDin,0) WHEN 0 THEN 0 + ELSE 100.0 * ISNULL(FinishSize,0)/(1.0 * TotalDin) END) AS DECIMAL(8,2))))+'%' + AS Rate from + (select ProjectId,CAST((SELECT SUM(ISNULL(Size,0)) FROM dbo.HJGL_WeldJoint WHERE ProjectId=b.ProjectId) AS DECIMAL(12,3)) AS TotalDin, + CAST((SELECT ISNULL(SUM(ISNULL(jot.Size,0)),0) FROM dbo.HJGL_WeldJoint jot WHERE ProjectId=b.ProjectId AND jot.WeldingDailyId IS NOT NULL) AS DECIMAL(12,3)) AS FinishSize + from Base_Project b) v where ProjectId=@ProjectId "; + + List listStr = new List(); + listStr.Add(new SqlParameter("@ProjectId", (CurrUser != null) ? CurrUser.LoginProjectId : "")); + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + Grid1.RecordCount = tb.Rows.Count; + tb = GetFilteredTable(Grid1.FilteredData, tb); + var table = GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + } + + /// + /// 数据绑定 + /// + private void BindGrid2(string unitWorkId) + { + string strSql = @"select UnitWorkId,TotalDin,FinishSize,CONVERT(NVARCHAR(10),(CAST((CASE ISNULL(TotalDin,0) WHEN 0 THEN 0 + ELSE 100.0 * ISNULL(FinishSize,0)/(1.0 * TotalDin) END) AS DECIMAL(8,2))))+'%' + AS Rate from + (select UnitWorkId,CAST((SELECT SUM(ISNULL(Size,0)) FROM dbo.HJGL_WeldJoint jot left join dbo.HJGL_Pipeline pipeline on jot.PipelineId=pipeline.PipelineId WHERE pipeline.UnitWorkId=b.UnitWorkId) AS DECIMAL(12,3)) AS TotalDin, + CAST((SELECT ISNULL(SUM(ISNULL(jot.Size,0)),0) FROM dbo.HJGL_WeldJoint jot left join dbo.HJGL_Pipeline pipeline on jot.PipelineId=pipeline.PipelineId WHERE pipeline.UnitWorkId=b.UnitWorkId AND jot.WeldingDailyId IS NOT NULL) AS DECIMAL(12,3)) AS FinishSize + from WBS_UnitWork b) v where UnitWorkId=@UnitWorkId "; + + List listStr = new List(); + listStr.Add(new SqlParameter("@UnitWorkId", unitWorkId)); + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + Grid2.RecordCount = tb.Rows.Count; + tb = GetFilteredTable(Grid2.FilteredData, tb); + var table = GetPagedDataTable(Grid2, tb); + Grid2.DataSource = table; + Grid2.DataBind(); + decimal totalDin = Funs.GetNewDecimalOrZero(this.Grid2.Rows[0].Values[0].ToString()); + decimal finishSize = Funs.GetNewDecimalOrZero(this.Grid2.Rows[0].Values[1].ToString()); + decimal notCompleteDin = totalDin - finishSize; + this.lbNotCompleteDin.Text = notCompleteDin.ToString(); + } + #endregion + + /// + /// 查询 + /// + /// + /// + protected void btnQuery_Click(object sender, EventArgs e) + { + if (this.tvControlItem.SelectedNodeID.Length > 1) + { + if (string.IsNullOrEmpty(this.txtLeaveDay.Text.Trim())) + { + ShowNotify("请输入剩余工期(天)!", MessageBoxIcon.Warning); + return; + } + if (string.IsNullOrEmpty(this.txtWorkEfficiency.Text.Trim())) + { + ShowNotify("请输入日工效!", MessageBoxIcon.Warning); + return; + } + decimal totalDin = Funs.GetNewDecimalOrZero(this.Grid2.Rows[0].Values[0].ToString()); + decimal finishSize = Funs.GetNewDecimalOrZero(this.Grid2.Rows[0].Values[1].ToString()); + decimal notCompleteDin = totalDin - finishSize; + this.lbNotCompleteDin.Text = notCompleteDin.ToString(); + decimal leaveDay = Funs.GetNewDecimalOrZero(this.txtLeaveDay.Text.Trim()); + decimal workEfficiency = Funs.GetNewDecimalOrZero(this.txtWorkEfficiency.Text.Trim()); + if (notCompleteDin > 0) + { + if (leaveDay == 0) + { + ShowNotify("剩余工期(天)为0!", MessageBoxIcon.Warning); + return; + } + if (workEfficiency == 0) + { + ShowNotify("日工效为0!", MessageBoxIcon.Warning); + return; + } + this.lbNeedWelderNum.Text = Convert.ToInt32(Math.Ceiling(notCompleteDin / leaveDay / workEfficiency)).ToString(); + } + else + { + ShowNotify("未完成达因为0!", MessageBoxIcon.Warning); + return; + } + } + else + { + ShowNotify("请选择单位工程", MessageBoxIcon.Warning); + return; + } + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx.designer.cs b/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx.designer.cs new file mode 100644 index 00000000..9bed7b97 --- /dev/null +++ b/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx.designer.cs @@ -0,0 +1,168 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.common { + + + public partial class mainMenu_HJGL3 { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// panelLeftRegion 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel panelLeftRegion; + + /// + /// tvControlItem 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Tree tvControlItem; + + /// + /// Panel2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel2; + + /// + /// panel3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel panel3; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// panelCenterRegion 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel panelCenterRegion; + + /// + /// Grid2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid2; + + /// + /// panel4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel panel4; + + /// + /// Form2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form Form2; + + /// + /// lbNotCompleteDin 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbNotCompleteDin; + + /// + /// txtLeaveDay 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtLeaveDay; + + /// + /// txtWorkEfficiency 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtWorkEfficiency; + + /// + /// lbNeedWelderNum 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbNeedWelderNum; + + /// + /// btnQuery 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnQuery; + } +} diff --git a/SGGL/FineUIPro.Web/indexProject.aspx.cs b/SGGL/FineUIPro.Web/indexProject.aspx.cs index 480dbe5c..93643687 100644 --- a/SGGL/FineUIPro.Web/indexProject.aspx.cs +++ b/SGGL/FineUIPro.Web/indexProject.aspx.cs @@ -618,7 +618,7 @@ namespace FineUIPro.Web } else if (type == Const.Menu_HJGL) { - this.Tab1.IFrameUrl = "~/common/mainMenu_HJGL_AVEVA.aspx"; + this.Tab1.IFrameUrl = "~/common/mainMenu_HJGL3.aspx"; } else if (type == Const.Menu_PZHGL) { From 206d2c5c432044a63915f513411b42285d25e508 Mon Sep 17 00:00:00 2001 From: gaofei1985 <181547018@qq.com> Date: Sat, 25 Nov 2023 16:03:59 +0800 Subject: [PATCH 13/26] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DataBase/版本日志/SGGLDB_V2023-11-25.sql | 2 + SGGL/BLL/CQMS/WBS/ControlItemInitService.cs | 2 + SGGL/BLL/CQMS/WBS/WorkPackageService.cs | 41 ++++++++++++++++++- .../CQMS/Check/EditSpotCheck.aspx.cs | 32 ++++++++++++++- .../CQMS/WBS/ControlItemInitEdit.aspx | 5 +++ .../CQMS/WBS/ControlItemInitEdit.aspx.cs | 5 +++ .../WBS/ControlItemInitEdit.aspx.designer.cs | 9 ++++ .../CQMS/WBS/ControlItemInitSet.aspx | 1 + .../CQMS/WBS/ControlItemInitSet.aspx.cs | 2 +- SGGL/Model/Model.cs | 24 +++++++++++ .../Controllers/CQMS/SpotCheckController.cs | 32 ++++++++++++++- 11 files changed, 149 insertions(+), 6 deletions(-) create mode 100644 DataBase/版本日志/SGGLDB_V2023-11-25.sql diff --git a/DataBase/版本日志/SGGLDB_V2023-11-25.sql b/DataBase/版本日志/SGGLDB_V2023-11-25.sql new file mode 100644 index 00000000..2c5a219f --- /dev/null +++ b/DataBase/版本日志/SGGLDB_V2023-11-25.sql @@ -0,0 +1,2 @@ +alter table [dbo].[WBS_ControlItemInit] add IsJDItem bit null +GO \ No newline at end of file diff --git a/SGGL/BLL/CQMS/WBS/ControlItemInitService.cs b/SGGL/BLL/CQMS/WBS/ControlItemInitService.cs index bbd0b196..f7603317 100644 --- a/SGGL/BLL/CQMS/WBS/ControlItemInitService.cs +++ b/SGGL/BLL/CQMS/WBS/ControlItemInitService.cs @@ -51,6 +51,7 @@ namespace BLL newControlItem.Standard = controlItem.Standard; newControlItem.ClauseNo = controlItem.ClauseNo; newControlItem.CheckAcceptType = controlItem.CheckAcceptType; + newControlItem.IsJDItem = controlItem.IsJDItem; db.WBS_ControlItemInit.InsertOnSubmit(newControlItem); db.SubmitChanges(); @@ -75,6 +76,7 @@ namespace BLL newControlItem.Standard = controlItem.Standard; newControlItem.ClauseNo = controlItem.ClauseNo; newControlItem.CheckAcceptType = controlItem.CheckAcceptType; + newControlItem.IsJDItem = controlItem.IsJDItem; db.SubmitChanges(); } diff --git a/SGGL/BLL/CQMS/WBS/WorkPackageService.cs b/SGGL/BLL/CQMS/WBS/WorkPackageService.cs index fd000c2f..6f3ccb43 100644 --- a/SGGL/BLL/CQMS/WBS/WorkPackageService.cs +++ b/SGGL/BLL/CQMS/WBS/WorkPackageService.cs @@ -444,7 +444,7 @@ namespace BLL List newList = new List(); if (getWBSs.Count() > 0) { - + var projectTypes = getWBSs.Where(x => x.WBSType == "ProjectType" && x.SupId == "0"); int a = 1; foreach (var item in projectTypes) @@ -827,6 +827,45 @@ namespace BLL } } + /// + /// 更新分部分项工程实际完成时间 + /// + /// + public static void UpdateWorkPackageRealEndDate2(string workPackageId) + { + using (var db = new Model.SGGLDB(Funs.ConnString)) + { + var workPackage = db.WBS_WorkPackage.FirstOrDefault(x => x.WorkPackageId == workPackageId); + if (workPackage != null) + { + workPackage.RealEndDate = DateTime.Now; + UpdateWorkPackages(db, workPackage, null, null, null, workPackage.RealEndDate); + db.SubmitChanges(); + var unitWork = db.WBS_UnitWork.FirstOrDefault(x => x.UnitWorkId == workPackage.UnitWorkId); + //获取是否存在其他未完成的分部分项 + var notEndOthenWorkPackage = db.WBS_WorkPackage.FirstOrDefault(x => x.UnitWorkId == unitWork.UnitWorkId && x.IsApprove == true && x.RealEndDate == null); + if (notEndOthenWorkPackage == null) + { + if (workPackage.RealEndDate != null) + { + if (unitWork.RealEndDate == null) + { + unitWork.RealEndDate = workPackage.RealEndDate; + } + else + { + if (unitWork.RealEndDate < workPackage.RealEndDate) + { + unitWork.RealEndDate = workPackage.RealEndDate; + } + } + } + } + } + db.SubmitChanges(); + } + } + #region 根据工作包ID获取wbs节点及父节点字符串 /// /// 根据工作包ID获取wbs节点及父节点字符串 diff --git a/SGGL/FineUIPro.Web/CQMS/Check/EditSpotCheck.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Check/EditSpotCheck.aspx.cs index d999a89d..a3abb8b3 100644 --- a/SGGL/FineUIPro.Web/CQMS/Check/EditSpotCheck.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Check/EditSpotCheck.aspx.cs @@ -967,6 +967,12 @@ namespace FineUIPro.Web.CQMS.Check foreach (var item in list) { Model.WBS_ControlItemAndCycle c = BLL.ControlItemAndCycleService.GetControlItemAndCycleById(item.ControlItemAndCycleId); + Model.WBS_ControlItemInit cInit = BLL.ControlItemInitService.GetControlItemInitByCode(c.InitControlItemCode); + bool isJDItem = false; + if (cInit != null && cInit.IsJDItem.HasValue) + { + isJDItem = cInit.IsJDItem.Value; + } if (c != null) { if (!string.IsNullOrEmpty(c.HGForms) || !string.IsNullOrEmpty(c.SHForms)) @@ -980,7 +986,18 @@ namespace FineUIPro.Web.CQMS.Check { c.RealEndDate = DateTime.Now; BLL.ControlItemAndCycleService.UpdateControlItemAndCycle(c); - BLL.WorkPackageService.UpdateWorkPackageRealEndDate(c.WorkPackageId); + if (isJDItem) //进度完成项 + { + BLL.WorkPackageService.UpdateWorkPackageRealEndDate2(c.WorkPackageId); + } + else //非进度完成项 + { + Model.WBS_WorkPackage workPackage = BLL.WorkPackageService.GetWorkPackageByWorkPackageId(c.WorkPackageId); + if (workPackage.RealEndDate == null) //分部分项还未生成实际完成时间 + { + BLL.WorkPackageService.UpdateWorkPackageRealEndDate(c.WorkPackageId); + } + } } else //检查多次 { @@ -989,7 +1006,18 @@ namespace FineUIPro.Web.CQMS.Check { c.RealEndDate = DateTime.Now; BLL.ControlItemAndCycleService.UpdateControlItemAndCycle(c); - BLL.WorkPackageService.UpdateWorkPackageRealEndDate(c.WorkPackageId); + if (isJDItem) //进度完成项 + { + BLL.WorkPackageService.UpdateWorkPackageRealEndDate2(c.WorkPackageId); + } + else //非进度完成项 + { + Model.WBS_WorkPackage workPackage = BLL.WorkPackageService.GetWorkPackageByWorkPackageId(c.WorkPackageId); + if (workPackage.RealEndDate == null) //分部分项还未生成实际完成时间 + { + BLL.WorkPackageService.UpdateWorkPackageRealEndDate(c.WorkPackageId); + } + } } } } diff --git a/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemInitEdit.aspx b/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemInitEdit.aspx index 2c8dd5ea..668efa6b 100644 --- a/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemInitEdit.aspx +++ b/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemInitEdit.aspx @@ -77,6 +77,11 @@ + + + + + diff --git a/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemInitEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemInitEdit.aspx.cs index d81af6f6..d1e2ae7e 100644 --- a/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemInitEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemInitEdit.aspx.cs @@ -102,6 +102,10 @@ namespace FineUIPro.Web.CQMS.WBS this.txtSHForms.Text = controlItem.SHForms; this.txtStandard.Text = controlItem.Standard; this.txtClauseNo.Text = controlItem.ClauseNo; + if (controlItem.IsJDItem == true) + { + this.cbIsJDItem.Checked = true; + } } } } @@ -130,6 +134,7 @@ namespace FineUIPro.Web.CQMS.WBS newControlItem.SHForms = this.txtSHForms.Text.Trim(); newControlItem.Standard = this.txtStandard.Text.Trim(); newControlItem.ClauseNo = this.txtClauseNo.Text.Trim(); + newControlItem.IsJDItem = this.cbIsJDItem.Checked; if (Request.Params["type"] == "add") { BLL.ControlItemInitService.AddControlItemInit(newControlItem); diff --git a/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemInitEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemInitEdit.aspx.designer.cs index 52473a32..e21574dd 100644 --- a/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemInitEdit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemInitEdit.aspx.designer.cs @@ -147,6 +147,15 @@ namespace FineUIPro.Web.CQMS.WBS { /// protected global::FineUIPro.TextBox txtClauseNo; + /// + /// cbIsJDItem 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.CheckBox cbIsJDItem; + /// /// Toolbar1 控件。 /// diff --git a/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemInitSet.aspx b/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemInitSet.aspx index 05076cf0..488f2215 100644 --- a/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemInitSet.aspx +++ b/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemInitSet.aspx @@ -88,6 +88,7 @@ + diff --git a/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemInitSet.aspx.cs b/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemInitSet.aspx.cs index 4bad54d8..b2a3a6e2 100644 --- a/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemInitSet.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemInitSet.aspx.cs @@ -455,7 +455,7 @@ namespace FineUIPro.Web.CQMS.WBS /// private void BindGrid() { - string strSql = @"SELECT ControlItemCode,WorkPackageCode,ControlItemContent,ControlPoint,ControlItemDef,Weights,HGForms,SHForms,Standard,ClauseNo" + string strSql = @"SELECT ControlItemCode,WorkPackageCode,ControlItemContent,ControlPoint,ControlItemDef,Weights,HGForms,SHForms,Standard,ClauseNo,IsJDItem" + @" FROM WBS_ControlItemInit "; List listStr = new List(); strSql += " where WorkPackageCode = @WorkPackageCode"; diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs index 6b2ee015..5bd66bdd 100644 --- a/SGGL/Model/Model.cs +++ b/SGGL/Model/Model.cs @@ -296714,6 +296714,8 @@ namespace Model private string _CheckAcceptType; + private System.Nullable _IsJDItem; + private EntityRef _WBS_WorkPackageInit; #region 可扩展性方法定义 @@ -296742,6 +296744,8 @@ namespace Model partial void OnClauseNoChanged(); partial void OnCheckAcceptTypeChanging(string value); partial void OnCheckAcceptTypeChanged(); + partial void OnIsJDItemChanging(System.Nullable value); + partial void OnIsJDItemChanged(); #endregion public WBS_ControlItemInit() @@ -296974,6 +296978,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsJDItem", DbType="Bit")] + public System.Nullable IsJDItem + { + get + { + return this._IsJDItem; + } + set + { + if ((this._IsJDItem != value)) + { + this.OnIsJDItemChanging(value); + this.SendPropertyChanging(); + this._IsJDItem = value; + this.SendPropertyChanged("IsJDItem"); + this.OnIsJDItemChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_WBS_ControlItemInit_WBS_WorkPackageInit", Storage="_WBS_WorkPackageInit", ThisKey="WorkPackageCode", OtherKey="WorkPackageCode", IsForeignKey=true)] public WBS_WorkPackageInit WBS_WorkPackageInit { diff --git a/SGGL/WebAPI/Controllers/CQMS/SpotCheckController.cs b/SGGL/WebAPI/Controllers/CQMS/SpotCheckController.cs index 4df65c82..534e786b 100644 --- a/SGGL/WebAPI/Controllers/CQMS/SpotCheckController.cs +++ b/SGGL/WebAPI/Controllers/CQMS/SpotCheckController.cs @@ -327,6 +327,12 @@ namespace Mvc.Controllers //更新明细记录 //判断明细是否需要上传资料 Model.WBS_ControlItemAndCycle c = BLL.ControlItemAndCycleService.GetControlItemAndCycleByIdForApi(item.ControlItemAndCycleId); + Model.WBS_ControlItemInit cInit = BLL.ControlItemInitService.GetControlItemInitByCode(c.InitControlItemCode); + bool isJDItem = false; + if (cInit != null && cInit.IsJDItem.HasValue) + { + isJDItem = cInit.IsJDItem.Value; + } if (c != null) { if (string.IsNullOrEmpty(c.HGForms) && string.IsNullOrEmpty(c.SHForms)) @@ -345,7 +351,18 @@ namespace Mvc.Controllers { c.RealEndDate = DateTime.Now; BLL.ControlItemAndCycleService.UpdateControlItemAndCycle(c); - BLL.WorkPackageService.UpdateWorkPackageRealEndDate(c.WorkPackageId); + if (isJDItem) //进度完成项 + { + BLL.WorkPackageService.UpdateWorkPackageRealEndDate2(c.WorkPackageId); + } + else //非进度完成项 + { + Model.WBS_WorkPackage workPackage = BLL.WorkPackageService.GetWorkPackageByWorkPackageId(c.WorkPackageId); + if (workPackage.RealEndDate == null) //分部分项还未生成实际完成时间 + { + BLL.WorkPackageService.UpdateWorkPackageRealEndDate(c.WorkPackageId); + } + } } else //检查多次 { @@ -354,7 +371,18 @@ namespace Mvc.Controllers { c.RealEndDate = DateTime.Now; BLL.ControlItemAndCycleService.UpdateControlItemAndCycle(c); - BLL.WorkPackageService.UpdateWorkPackageRealEndDate(c.WorkPackageId); + if (isJDItem) //进度完成项 + { + BLL.WorkPackageService.UpdateWorkPackageRealEndDate2(c.WorkPackageId); + } + else //非进度完成项 + { + Model.WBS_WorkPackage workPackage = BLL.WorkPackageService.GetWorkPackageByWorkPackageId(c.WorkPackageId); + if (workPackage.RealEndDate == null) //分部分项还未生成实际完成时间 + { + BLL.WorkPackageService.UpdateWorkPackageRealEndDate(c.WorkPackageId); + } + } } } } From 560f6d8b7beadf3cb9834416a50dca184815e362 Mon Sep 17 00:00:00 2001 From: gaofei1985 <181547018@qq.com> Date: Sun, 26 Nov 2023 17:43:05 +0800 Subject: [PATCH 14/26] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../HJGL/WeldingManage/WeldJointService.cs | 8 +- .../HJGL/InfoQuery/JointQuery.aspx | 11 +- .../HJGL/InfoQuery/JointQuery.aspx.cs | 88 ++++---- .../WeldingManage/PipelineListPDMSIn.aspx.cs | 75 ++++--- SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx | 193 +++++++++++------- .../common/mainMenu_HJGL3.aspx.cs | 47 +++++ .../common/mainMenu_HJGL3.aspx.designer.cs | 76 ++++++- 7 files changed, 340 insertions(+), 158 deletions(-) diff --git a/SGGL/BLL/HJGL/WeldingManage/WeldJointService.cs b/SGGL/BLL/HJGL/WeldingManage/WeldJointService.cs index 805526f8..03a74df0 100644 --- a/SGGL/BLL/HJGL/WeldingManage/WeldJointService.cs +++ b/SGGL/BLL/HJGL/WeldingManage/WeldJointService.cs @@ -135,9 +135,11 @@ namespace BLL public static void AddBulkWeldJoint(List weldJoints) { - Model.SGGLDB db = Funs.DB; - db.HJGL_WeldJoint.InsertAllOnSubmit(weldJoints); - db.SubmitChanges(); + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + db.HJGL_WeldJoint.InsertAllOnSubmit(weldJoints); + db.SubmitChanges(); + } } /// diff --git a/SGGL/FineUIPro.Web/HJGL/InfoQuery/JointQuery.aspx b/SGGL/FineUIPro.Web/HJGL/InfoQuery/JointQuery.aspx index f30af990..e03f02f7 100644 --- a/SGGL/FineUIPro.Web/HJGL/InfoQuery/JointQuery.aspx +++ b/SGGL/FineUIPro.Web/HJGL/InfoQuery/JointQuery.aspx @@ -114,6 +114,9 @@ + + <%-- --%> @@ -161,11 +164,11 @@ - + - + 0) { @@ -182,7 +182,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery foreach (var q in unitWork2) { int a = (from x in Funs.DB.HJGL_Pipeline - where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId + where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId && x.PipelineCode.Contains(this.tvPipeCode.Text.Trim()) select x).Count(); @@ -233,7 +233,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery this.BindGrid(); } - + } protected void tvControlItem_TreeNodeExpanded(object sender, TreeNodeEventArgs e) @@ -276,7 +276,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery newNode.CommandName = "加载"; newNode.Icon = Icon.ArrowDown; newNode.EnableClickEvent = true; - node.Nodes.Add(newNode); + node.Nodes.Add(newNode); } } } @@ -285,9 +285,9 @@ namespace FineUIPro.Web.HJGL.InfoQuery private void BindGrid() { - Model.View_HJGL_WeldJoint model =new Model.View_HJGL_WeldJoint(); + Model.View_HJGL_WeldJoint model = new Model.View_HJGL_WeldJoint(); model.ProjectId = this.CurrUser.LoginProjectId; - if (this.tvControlItem.SelectedNode.CommandName.Split('|').Count() == 2 ) + if (this.tvControlItem.SelectedNode.CommandName.Split('|').Count() == 2) { model.UnitWorkId = this.tvControlItem.SelectedNodeID; @@ -298,12 +298,12 @@ namespace FineUIPro.Web.HJGL.InfoQuery } model.WeldJointCode = this.txtWeldJointCode.Text; - var list= BLL.WeldJointService.GetViewWeldJointsBymodel(model); + var list = BLL.WeldJointService.GetViewWeldJointsBymodel(model); View_HJGL_WeldJoint = list; Grid1.RecordCount = list.Count; - // var table = this.GetPagedDataTable(Grid1, list); - var table = list.Skip(Grid1.PageSize * (Grid1.PageIndex)).Take(Grid1.PageSize).ToList(); - Grid1.DataSource = table; + // var table = this.GetPagedDataTable(Grid1, list); + var table = list.Skip(Grid1.PageSize * (Grid1.PageIndex)).Take(Grid1.PageSize).ToList(); + Grid1.DataSource = table; Grid1.DataBind(); } @@ -464,7 +464,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery } protected void btnGetChart_Click(object sender, EventArgs e) { - + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("JointQueryChart.aspx?JointComplete={0}&&JointNoComplete={1}&&JointPre={2}&&JointNoPre={3}", JointComplete, JointNoComplete, JointPre, JointNoPre, "编辑 - "))); } @@ -485,7 +485,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery var list = BLL.WeldJointService.GetViewWeldJointsBymodel(model); View_HJGL_WeldJoint = list; } - + string path = Funs.RootPath + @"File\Excel\Temp\JointQuery.xlsx"; path = path.Replace(".xlsx", string.Format("{0:yyyy-MM-dd-HH-mm}", DateTime.Now) + ".xlsx"); var q = (from x in View_HJGL_WeldJoint @@ -493,6 +493,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery { 焊口号 = x.WeldJointCode, 单位名称 = x.UnitName, + 流水段 = x.FlowingSection, 材质1 = x.Material1Code, 材质2 = x.Material2Code, 达因 = x.Size, @@ -503,8 +504,8 @@ namespace FineUIPro.Web.HJGL.InfoQuery 焊接方法 = x.WeldingMethodCode, WPS编号 = x.WPQCode, 坡口类型 = x.GrooveTypeCode, - 焊条 = x.WeldingRod, - 焊丝 = x.WeldingWire, + 焊条 = x.WeldingRodCode, + 焊丝 = x.WeldingWireCode, 预热温度 = x.PreTemperature, 焊口属性 = x.JointAttribute, 焊接日期 = x.WeldingDate, @@ -544,33 +545,38 @@ namespace FineUIPro.Web.HJGL.InfoQuery { if (this.tvControlItem.SelectedNode.CommandName.Split('|').Count() == 2) { - var q = (from x in Funs.DB.View_HJGL_WeldJoint where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == this.tvControlItem.SelectedNodeID - select new { - PipelineId=x.PipelineId, - WeldingDate=x.WeldingDate, - WeldJointCode=x.WeldJointCode, - PipelineCode=x.PipelineCode, - Size=x.Size, + var q = (from x in Funs.DB.View_HJGL_WeldJoint + where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == this.tvControlItem.SelectedNodeID + select new + { + PipelineId = x.PipelineId, + WeldingDate = x.WeldingDate, + WeldJointCode = x.WeldJointCode, + PipelineCode = x.PipelineCode, + Size = x.Size, }); var noCompipeline = from x in q - group x by x.PipelineId into g - select new - { - PipelineId = g.Key, - Count = (from x2 in g where x2.WeldingDate!=null && x2.WeldingDate!="" select x2).Count(), - }; - var Noweldjoint =( from x in q - join y in noCompipeline on x.PipelineId equals y.PipelineId - where y.Count == 0 - select new { 焊口号=x.WeldJointCode , - 管线号=x.PipelineCode, - 达因=x.Size}).ToList(); + group x by x.PipelineId into g + select new + { + PipelineId = g.Key, + Count = (from x2 in g where x2.WeldingDate != null && x2.WeldingDate != "" select x2).Count(), + }; + var Noweldjoint = (from x in q + join y in noCompipeline on x.PipelineId equals y.PipelineId + where y.Count == 0 + select new + { + 焊口号 = x.WeldJointCode, + 管线号 = x.PipelineCode, + 达因 = x.Size + }).ToList(); string path = Funs.RootPath + @"File\Excel\Temp\NoCompleteWeldjoint.xlsx"; path = path.Replace(".xlsx", string.Format("{0:yyyy-MM-dd-HH-mm}", DateTime.Now) + ".xlsx"); MiniExcel.SaveAs(path, Noweldjoint); - + string fileName = "未完成管线焊口.xlsx"; FileInfo info = new FileInfo(path); long fileSize = info.Length; @@ -587,7 +593,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery { Alert.Show("请选择主项"); } - + } /// /// 导出方法 @@ -648,7 +654,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery parameter3D.ColorModel = colorModel; parameter3D.TagNum = string.Join(",", weldjointcodes); parameter3D.ButtonType = "2.1"; - parameter3D.Crater_data = "1"; + parameter3D.Crater_data = "1"; if (this.tvControlItem.SelectedNode.CommandName.Split('|').Count() == 2) { parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(tvControlItem.SelectedNodeID); @@ -668,11 +674,11 @@ namespace FineUIPro.Web.HJGL.InfoQuery parameter3D.Transparency = colorModel.PipelineComplete; parameter3D.Finished_color = colorModel.JointCompleteColor; parameter3D.Incomplete_color = colorModel.JointNOCompleteColor; - ctlAuditFlow.Url_item = BLL.Project_SysSetService.GetAvevaNetUrl_Item(this.CurrUser.LoginProjectId) + parameter3D.ModelName; + ctlAuditFlow.Url_item = BLL.Project_SysSetService.GetAvevaNetUrl_Item(this.CurrUser.LoginProjectId) + parameter3D.ModelName; ctlAuditFlow.data = parameter3D; ctlAuditFlow.BindData(); } - + } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/PipelineListPDMSIn.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/PipelineListPDMSIn.aspx.cs index 33922dc7..b77d835a 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/PipelineListPDMSIn.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/PipelineListPDMSIn.aspx.cs @@ -215,26 +215,26 @@ namespace FineUIPro.Web.HJGL.WeldingManage } if (pds.Count > 0 && pds != null) { - - var getPipeline = from x in Funs.DB.View_HJGL_WeldJoint where x.ProjectId == this.CurrUser.LoginProjectId select x; - var getMedium = from x in Funs.DB.Base_Medium where x.ProjectId == this.CurrUser.LoginProjectId select x;//介质 - var getPipeLineClass = from x in Funs.DB.Base_PipingClass where x.ProjectId == this.CurrUser.LoginProjectId select x;//管道等级 - var getDetectionRate = from x in Funs.DB.Base_DetectionRate select x;//探伤比例 - var getDetectionType = from x in Funs.DB.Base_DetectionType select x;//探伤类型 - var getPressurePipingClass = from x in Funs.DB.Base_PressurePipingClass select x;//压力管道级别 - var getTestMedium = from x in Funs.DB.Base_TestMedium where x.TestType == "1" select x;//压力试验介质 - var getLeakMedium = from x in Funs.DB.Base_TestMedium where x.TestType == "2" select x;//泄露性试验介质 - var getPurgeMethod = from x in Funs.DB.Base_PurgeMethod select x; - var getMaterial = from x in Funs.DB.Base_Material select x; - var getWeldType = from x in Funs.DB.Base_WeldType select x; + Model.SGGLDB db = Funs.DB; + var getPipeline = from x in db.View_HJGL_WeldJoint where x.ProjectId == this.CurrUser.LoginProjectId select x; + var getMedium = from x in db.Base_Medium where x.ProjectId == this.CurrUser.LoginProjectId select x;//介质 + var getPipeLineClass = from x in db.Base_PipingClass where x.ProjectId == this.CurrUser.LoginProjectId select x;//管道等级 + var getDetectionRate = from x in db.Base_DetectionRate select x;//探伤比例 + var getDetectionType = from x in db.Base_DetectionType select x;//探伤类型 + var getPressurePipingClass = from x in db.Base_PressurePipingClass select x;//压力管道级别 + var getTestMedium = from x in db.Base_TestMedium where x.TestType == "1" select x;//压力试验介质 + var getLeakMedium = from x in db.Base_TestMedium where x.TestType == "2" select x;//泄露性试验介质 + var getPurgeMethod = from x in db.Base_PurgeMethod select x; + var getMaterial = from x in db.Base_Material select x; + var getWeldType = from x in db.Base_WeldType select x; //var getComponents = from x in Funs.DB.Base_Components where x.ProjeceId == this.CurrUser.LoginProjectId select x; - + Model.WBS_UnitWork unitWork = BLL.UnitWorkService.GetUnitWorkByUnitWorkId(Request.Params["UnitWorkId"]); for (int i = 1; i < pds.Count; i++) { Model.View_HJGL_WeldJoint pipeline = new Model.View_HJGL_WeldJoint(); //pipeline.PipelineId = SQLHelper.GetNewID(); - Model.WBS_UnitWork unitWork = BLL.UnitWorkService.GetUnitWorkByUnitWorkId(Request.Params["UnitWorkId"]); + if (unitWork != null) { pipeline.UnitWorkId = Request.Params["UnitWorkId"]; @@ -662,7 +662,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { if (col6.Contains("RT")) { - Model.Base_DetectionType rt = BLL.Base_DetectionTypeService.GetDetectionTypeIdByDetectionTypeCode("RT"); + Model.Base_DetectionType rt = getDetectionType.FirstOrDefault(x => x.DetectionTypeCode == "RT"); if (rt != null) { pipeline.DetectionTypeId = rt.DetectionTypeId; @@ -670,7 +670,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage } else { - Model.Base_DetectionType ut = BLL.Base_DetectionTypeService.GetDetectionTypeIdByDetectionTypeCode("UT"); + Model.Base_DetectionType ut = getDetectionType.FirstOrDefault(x => x.DetectionTypeCode == "UT"); if (ut != null) { pipeline.DetectionTypeId = ut.DetectionTypeId; @@ -681,7 +681,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { if (col6.Contains("MT")) { - Model.Base_DetectionType mt = BLL.Base_DetectionTypeService.GetDetectionTypeIdByDetectionTypeCode("MT"); + Model.Base_DetectionType mt = getDetectionType.FirstOrDefault(x => x.DetectionTypeCode == "MT"); if (mt != null) { pipeline.DetectionTypeId = mt.DetectionTypeId; @@ -689,7 +689,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage } else { - Model.Base_DetectionType pt = BLL.Base_DetectionTypeService.GetDetectionTypeIdByDetectionTypeCode("PT"); + Model.Base_DetectionType pt = getDetectionType.FirstOrDefault(x => x.DetectionTypeCode == "PT"); if (pt != null) { pipeline.DetectionTypeId = pt.DetectionTypeId; @@ -1017,7 +1017,12 @@ namespace FineUIPro.Web.HJGL.WeldingManage } void addHJGL_WeldJoints(List PipelineList, string UnitWorkId) { - var getpipelines = from y in Funs.DB.HJGL_Pipeline where y.UnitWorkId == UnitWorkId select y; + Model.SGGLDB db = Funs.DB; + var getpipelines = from y in db.HJGL_Pipeline where y.UnitWorkId == UnitWorkId select y; + var allWeldJoints = from x in db.HJGL_WeldJoint + join y in db.HJGL_Pipeline on x.PipelineId equals y.PipelineId + where y.UnitWorkId == UnitWorkId + select x; List weldJoints_add = new List(); var weldJoints = (from x in PipelineList @@ -1055,7 +1060,6 @@ namespace FineUIPro.Web.HJGL.WeldingManage temp.IsHotProess }).ToList(); - var weldJointCodes =weldJoints.Select(x=>x.WeldJointCode).Distinct().ToList(); var pipelineCodes = weldJoints.Select(x => x.PipelineCode).Distinct().ToList(); for (int i = 0; i < weldJoints.Count(); i++) { @@ -1076,7 +1080,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage weldJoint.ProjectId = weldJoints[i].ProjectId; weldJoint.IsHotProess = weldJoints[i].IsHotProess; - var isExistJot = WeldJointService.GetWeldJointsByWeldJointCode(weldJoint.PipelineId, weldJoint.WeldJointCode); + var isExistJot = allWeldJoints.FirstOrDefault(x => x.PipelineId == weldJoint.PipelineId && x.WeldJointCode == weldJoint.WeldJointCode); if (isExistJot != null) // 更新焊口 { weldJoint.WeldJointId = isExistJot.WeldJointId; @@ -1086,24 +1090,29 @@ namespace FineUIPro.Web.HJGL.WeldingManage { weldJoint.WeldJointId = SQLHelper.GetNewID(); weldJoints_add.Add(weldJoint); - //BLL.WeldJointService.AddWeldJoint(weldJoint); } - } + //db.SubmitChanges(); if (weldJoints_add.Count > 0) { BLL.WeldJointService.AddBulkWeldJoint(weldJoints_add); - } - Model.SGGLDB db = Funs.DB; - var q = from x in db.HJGL_WeldJoint - join y in db.HJGL_Pipeline on x.PipelineId equals y.PipelineId - where y.UnitWorkId == Request.Params["UnitWorkId"] && pipelineCodes.Contains(x.PipelineCode) && !weldJointCodes.Contains(x.WeldJointCode) - select x; - if (q.Count() > 0) + Model.SGGLDB db2 = Funs.DB; + List delJoints = new List(); + var allWeldJoints2 = from x in db2.HJGL_WeldJoint + join y in db2.HJGL_Pipeline on x.PipelineId equals y.PipelineId + where y.UnitWorkId == Request.Params["UnitWorkId"] + select x; + foreach (var pipelineCode in pipelineCodes) { - db.HJGL_WeldJoint.DeleteAllOnSubmit(q); - db.SubmitChanges(); + var pipelineWeldJointCodes = weldJoints.Where(x => x.PipelineCode == pipelineCode).Select(x => x.WeldJointCode).ToList(); + var q = allWeldJoints2.Where(x => x.PipelineCode == pipelineCode && !pipelineWeldJointCodes.Contains(x.WeldJointCode)).ToList(); + delJoints.AddRange(q); + } + if (delJoints.Count() > 0) + { + db2.HJGL_WeldJoint.DeleteAllOnSubmit(delJoints); + db2.SubmitChanges(); } } @@ -1112,7 +1121,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage // string unitworkId = Request.Params["UnitWorkId"]; // var getPipeline = from x in Funs.DB.View_HJGL_WeldJoint where x.UnitWorkId== unitworkId select x; - // List weldJoints_add = new List(); + // List weldJoints_add = new List(); // for (int i = 0; i < PipelineList.Count(); i++) // { diff --git a/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx b/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx index a2bc8721..adfc0c57 100644 --- a/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx +++ b/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx @@ -24,84 +24,127 @@ - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + - - - - - - + + + + + + + + + + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx.cs b/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx.cs index 2ce08e0a..218ce128 100644 --- a/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx.cs +++ b/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx.cs @@ -139,6 +139,10 @@ namespace FineUIPro.Web.common var table = GetPagedDataTable(Grid1, tb); Grid1.DataSource = table; Grid1.DataBind(); + decimal totalDin = Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[0].ToString()); + decimal finishSize = Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[1].ToString()); + decimal notCompleteDin = totalDin - finishSize; + this.lbNotCompleteDinTotal.Text = notCompleteDin.ToString(); } /// @@ -220,5 +224,48 @@ namespace FineUIPro.Web.common return; } } + + /// + /// 查询 + /// + /// + /// + protected void btnQueryTotal_Click(object sender, EventArgs e) + { + if (string.IsNullOrEmpty(this.txtLeaveDayTotal.Text.Trim())) + { + ShowNotify("请输入剩余工期(天)!", MessageBoxIcon.Warning); + return; + } + if (string.IsNullOrEmpty(this.txtWorkEfficiencyTotal.Text.Trim())) + { + ShowNotify("请输入日工效!", MessageBoxIcon.Warning); + return; + } + decimal totalDin = Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[0].ToString()); + decimal finishSize = Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[1].ToString()); + decimal notCompleteDin = totalDin - finishSize; + decimal leaveDay = Funs.GetNewDecimalOrZero(this.txtLeaveDayTotal.Text.Trim()); + decimal workEfficiency = Funs.GetNewDecimalOrZero(this.txtWorkEfficiencyTotal.Text.Trim()); + if (notCompleteDin > 0) + { + if (leaveDay == 0) + { + ShowNotify("剩余工期(天)为0!", MessageBoxIcon.Warning); + return; + } + if (workEfficiency == 0) + { + ShowNotify("日工效为0!", MessageBoxIcon.Warning); + return; + } + this.lbNeedWelderNumTotal.Text = Convert.ToInt32(Math.Ceiling(notCompleteDin / leaveDay / workEfficiency)).ToString(); + } + else + { + ShowNotify("未完成达因为0!", MessageBoxIcon.Warning); + return; + } + } } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx.designer.cs b/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx.designer.cs index 9bed7b97..c2bda08d 100644 --- a/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx.designer.cs @@ -58,13 +58,22 @@ namespace FineUIPro.Web.common { protected global::FineUIPro.Tree tvControlItem; /// - /// Panel2 控件。 + /// panel6 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.Panel Panel2; + protected global::FineUIPro.Panel panel6; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; /// /// panel3 控件。 @@ -84,6 +93,69 @@ namespace FineUIPro.Web.common { /// protected global::FineUIPro.Grid Grid1; + /// + /// panel5 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel panel5; + + /// + /// Form3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form Form3; + + /// + /// lbNotCompleteDinTotal 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbNotCompleteDinTotal; + + /// + /// txtLeaveDayTotal 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtLeaveDayTotal; + + /// + /// txtWorkEfficiencyTotal 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtWorkEfficiencyTotal; + + /// + /// lbNeedWelderNumTotal 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbNeedWelderNumTotal; + + /// + /// btnQueryTotal 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnQueryTotal; + /// /// panelCenterRegion 控件。 /// From a543e35f451238cb6cdc55c893b7662d5f484afb Mon Sep 17 00:00:00 2001 From: gaofei1985 <181547018@qq.com> Date: Sun, 26 Nov 2023 18:46:42 +0800 Subject: [PATCH 15/26] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../HJGL/WeldingManage/JotTwoDesign.aspx.cs | 25 +++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx.cs index 6bc37c67..6f72f7b0 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx.cs @@ -77,8 +77,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage //} //else //{ - unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList(); - unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList(); + unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList(); + unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList(); //} if (unitWork1.Count() > 0) @@ -139,7 +139,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { List pipeline = new List(); pipeline = (from x in Funs.DB.HJGL_Pipeline - where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == node.NodeID + where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == node.NodeID && x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim()) orderby x.PipelineCode select x).ToList(); @@ -220,7 +220,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { Model.HJGL_Pipeline pipeline = BLL.PipelineService.GetPipelineByPipelineId(this.tvControlItem.SelectedNodeID); this.hdUnitWorkId.Text = string.Empty; - + if (e.CommandName == "加载") { string CommandName = e.Node.ParentNode.CommandName; @@ -244,7 +244,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage } } - + } protected void tvControlItem_TreeNodeExpanded(object sender, TreeNodeEventArgs e) { @@ -285,19 +285,19 @@ namespace FineUIPro.Web.HJGL.WeldingManage strSql += " AND WeldJointCode LIKE @WeldJointCode"; listStr.Add(new SqlParameter("@WeldJointCode", "%" + this.txtWeldJointCode.Text.Trim() + "%")); } - if (DropTwoJointType.SelectedValue!=BLL.Const._Null) + if (DropTwoJointType.SelectedValue != BLL.Const._Null) { strSql += " AND TwoJointType = @TwoJointType"; listStr.Add(new SqlParameter("@TwoJointType", DropTwoJointType.SelectedValue)); } - if (ckIsAudit.Checked==true) + if (ckIsAudit.Checked == true) { strSql += " and AuditDate is null"; } SqlParameter[] parameter = listStr.ToArray(); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); var SizeSum = tb.AsEnumerable().Select(x => x.Field("Size")).Sum(); - lbSize.Text=SizeSum.ToString(); + lbSize.Text = SizeSum.ToString(); // 2.获取当前分页数据 Grid1.RecordCount = tb.Rows.Count; var table = this.GetPagedDataTable(Grid1, tb); @@ -372,7 +372,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage NoAuditBindGrid(); } - + } #endregion @@ -475,7 +475,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage } if (!string.IsNullOrEmpty(tvControlItem.SelectedNodeID)) { - var jotList = from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == tvControlItem.SelectedNodeID && x.WPQId == null select x; + var jotList = from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == tvControlItem.SelectedNodeID && x.WPQId == null && x.IsTwoJoint == true select x; if (jotList.Count() > 0) { foreach (var jot in jotList) @@ -504,7 +504,6 @@ namespace FineUIPro.Web.HJGL.WeldingManage newJot.PreTemperature = wps.PreTemperature; newJot.IsHotProess = wps.IsHotProess; newJot.MatchableWPQ = string.Join(",", wpqList.Select(x => x.WPQCode)); - newJot.IsTwoJoint = true; BLL.WeldJointService.UpdateConWeldJoint(newJot); } } @@ -911,7 +910,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage NPOI.SS.UserModel.ICell cell; cell = row1.CreateCell(0); cell.CellStyle = cellStyle0; - cell.SetCellValue((i+1).ToString()); + cell.SetCellValue((i + 1).ToString()); cell = row1.CreateCell(1); cell.CellStyle = cellStyle0; cell.SetCellValue(this.Grid1.Rows[i].Values[2].ToString()); @@ -926,7 +925,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage string date1 = this.Grid1.Rows[i].Values[5].ToString(); if (!string.IsNullOrEmpty(date1)) { - date1 = string.Format("{0:yyyy-MM-dd}",Funs.GetNewDateTime(date1)); + date1 = string.Format("{0:yyyy-MM-dd}", Funs.GetNewDateTime(date1)); } cell.SetCellValue(date1); cell = row1.CreateCell(5); From 971aae10d6338d997b8b2582e7716933d53fa4e4 Mon Sep 17 00:00:00 2001 From: gaofei1985 <181547018@qq.com> Date: Mon, 27 Nov 2023 11:00:08 +0800 Subject: [PATCH 16/26] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../HJGL/PointTrust/PointWeldJointView.aspx | 1 + .../PointTrust/PointWeldJointView.aspx.cs | 15 ++- .../PointWeldJointView.aspx.designer.cs | 9 ++ .../HJGL/WeldingManage/JotTwoDesign.aspx | 18 +++- .../HJGL/WeldingManage/JotTwoDesign.aspx.cs | 95 ++++++++++++------- .../JotTwoDesign.aspx.designer.cs | 22 ++++- 6 files changed, 119 insertions(+), 41 deletions(-) diff --git a/SGGL/FineUIPro.Web/HJGL/PointTrust/PointWeldJointView.aspx b/SGGL/FineUIPro.Web/HJGL/PointTrust/PointWeldJointView.aspx index 1c66d2a0..a60e74d8 100644 --- a/SGGL/FineUIPro.Web/HJGL/PointTrust/PointWeldJointView.aspx +++ b/SGGL/FineUIPro.Web/HJGL/PointTrust/PointWeldJointView.aspx @@ -27,6 +27,7 @@ OnClick="btnQuery_Click"> + diff --git a/SGGL/FineUIPro.Web/HJGL/PointTrust/PointWeldJointView.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PointTrust/PointWeldJointView.aspx.cs index cc586d61..087f0edc 100644 --- a/SGGL/FineUIPro.Web/HJGL/PointTrust/PointWeldJointView.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PointTrust/PointWeldJointView.aspx.cs @@ -23,7 +23,20 @@ namespace FineUIPro.Web.HJGL.PointTrust where y.DetectionRateId == rateId && y.UnitWorkId == unitWorkId && y.DetectionTypeId == detectionType && x.PointState == "1" select new { x.WeldJointId, z.WeldJointCode, z.JointAttribute }); - this.lbDef.Text = "预制口:" + pointJoints.Count(x => x.JointAttribute == "预制口").ToString() + "个,安装口:" + pointJoints.Count(x => x.JointAttribute == "安装口").ToString()+"个。"; + int totalJointNum = (from x in db.HJGL_WeldJoint + join y in db.HJGL_Pipeline on x.PipelineId equals y.PipelineId + where y.DetectionRateId == rateId && y.UnitWorkId == unitWorkId && y.DetectionType == detectionType + select x).Count(); + int needJointNum = 0, needYZJointNum = 0, needAZJointNum = 0; + Model.Base_DetectionRate rate = BLL.Base_DetectionRateService.GetDetectionRateByDetectionRateId(rateId); + if (rate != null) + { + needJointNum = Convert.ToInt32(Math.Ceiling((totalJointNum * rate.DetectionRateValue.Value) * 0.01)); + needAZJointNum = Convert.ToInt32(Math.Ceiling(needJointNum * 0.4)); + needYZJointNum = needJointNum - needAZJointNum; + } + this.lbDef.Text = "预制口:" + pointJoints.Count(x => x.JointAttribute == "预制口").ToString() + "个,安装口:" + pointJoints.Count(x => x.JointAttribute == "安装口").ToString() + "个。"; + this.lbNeedDef.Text = "预制口:" + (needYZJointNum - pointJoints.Count(x => x.JointAttribute == "预制口")).ToString() + "个,安装口:" + (needAZJointNum- pointJoints.Count(x => x.JointAttribute == "安装口")).ToString() + "个。"; BindGrid(); } } diff --git a/SGGL/FineUIPro.Web/HJGL/PointTrust/PointWeldJointView.aspx.designer.cs b/SGGL/FineUIPro.Web/HJGL/PointTrust/PointWeldJointView.aspx.designer.cs index 537048b0..c26c6e7a 100644 --- a/SGGL/FineUIPro.Web/HJGL/PointTrust/PointWeldJointView.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HJGL/PointTrust/PointWeldJointView.aspx.designer.cs @@ -84,6 +84,15 @@ namespace FineUIPro.Web.HJGL.PointTrust { /// protected global::FineUIPro.Label lbDef; + /// + /// lbNeedDef 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbNeedDef; + /// /// ToolbarSeparator1 控件。 /// diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx b/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx index fd1d0ad3..cf6561bf 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx @@ -30,10 +30,13 @@ + EmptyText="输入查询条件" + Width="230px" LabelWidth="60px"> + + <%-- --%> @@ -57,10 +60,17 @@ EmptyText="输入查询条件" AutoPostBack="true" OnTextChanged="TextBox_TextChanged" Width="240px" LabelWidth="80px" LabelAlign="Right"> - + + + + + + + - + diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx.cs index 6f72f7b0..fe2c5a20 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx.cs @@ -85,7 +85,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { foreach (var q in unitWork1) { - int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId select x).Count(); + int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId && x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim()) select x).Count(); var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId); TreeNode tn1 = new TreeNode(); tn1.NodeID = q.UnitWorkId; @@ -109,7 +109,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { foreach (var q in unitWork2) { - int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId select x).Count(); + int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId && x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim()) select x).Count(); var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId); TreeNode tn2 = new TreeNode(); tn2.NodeID = q.UnitWorkId; @@ -169,29 +169,22 @@ namespace FineUIPro.Web.HJGL.WeldingManage var AuditCount = (from x in hJGL_WeldJoints where x.PipelineId == item.PipelineId && x.IsTwoJoint == true && x.AuditDate != null select x).Count(); TreeNode newNode = new TreeNode(); - if (jotCount == AuditCount) //全部审核 - { - newNode.Text = "" + item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】" + ""; - - } - else if (AuditCount == 0) //全部未审核 - { - newNode.Text = "" + item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】" + ""; - - } - else //部分审核 - { - newNode.Text = "" + item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】" + ""; - - } - //if (jotCount > weldJotCount) + //if (jotCount == AuditCount) //全部审核 //{ - // newNode.Text = "" + item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】" + ""; + // newNode.Text = "" + item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】" + ""; + //} - //else + //else if (AuditCount == 0) //全部未审核 //{ - // newNode.Text = item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】"; + // newNode.Text = "" + item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】" + ""; + //} + //else //部分审核 + //{ + // newNode.Text = "" + item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】" + ""; + + //} + newNode.Text = item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】"; newNode.ToolTip = "管线号【焊口数】"; newNode.NodeID = item.PipelineId; newNode.EnableClickEvent = true; @@ -239,7 +232,6 @@ namespace FineUIPro.Web.HJGL.WeldingManage else { this.hdUnitWorkId.Text = this.tvControlItem.SelectedNodeID; - ckIsAudit.Checked = true; NoAuditBindGrid(); } @@ -290,13 +282,26 @@ namespace FineUIPro.Web.HJGL.WeldingManage strSql += " AND TwoJointType = @TwoJointType"; listStr.Add(new SqlParameter("@TwoJointType", DropTwoJointType.SelectedValue)); } - if (ckIsAudit.Checked == true) + if (rbIsAudit.SelectedValue != "2") { - strSql += " and AuditDate is null"; + if (rbIsAudit.SelectedValue == "0") + { + strSql += " and AuditDate is null"; + } + else + { + strSql += " and AuditDate is not null"; + } + } + if (!string.IsNullOrEmpty(this.txtAuditDate.Text.Trim())) + { + strSql += " AND CONVERT(VARCHAR(20),AuditDate,23) =@AuditDate"; + listStr.Add(new SqlParameter("@AuditDate", this.txtAuditDate.Text.Trim())); } SqlParameter[] parameter = listStr.ToArray(); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); - var SizeSum = tb.AsEnumerable().Select(x => x.Field("Size")).Sum(); + decimal? d = 0; + var SizeSum = tb.AsEnumerable().Select(x => x.Field("Size") ?? d).Sum(); lbSize.Text = SizeSum.ToString(); // 2.获取当前分页数据 Grid1.RecordCount = tb.Rows.Count; @@ -333,9 +338,21 @@ namespace FineUIPro.Web.HJGL.WeldingManage strSql += " AND TwoJointType = @TwoJointType"; listStr.Add(new SqlParameter("@TwoJointType", DropTwoJointType.SelectedValue)); } - if (ckIsAudit.Checked == true) + if (rbIsAudit.SelectedValue != "2") { - strSql += " and AuditDate is null"; + if (rbIsAudit.SelectedValue == "0") + { + strSql += " and AuditDate is null"; + } + else + { + strSql += " and AuditDate is not null"; + } + } + if (!string.IsNullOrEmpty(this.txtAuditDate.Text.Trim())) + { + strSql += " AND CONVERT(VARCHAR(20),AuditDate,23) =@AuditDate"; + listStr.Add(new SqlParameter("@AuditDate", this.txtAuditDate.Text.Trim())); } SqlParameter[] parameter = listStr.ToArray(); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); @@ -805,12 +822,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage this.BindGrid(); } - /// - /// 查询 - /// - /// - /// - protected void Tree_TextChanged(object sender, EventArgs e) + protected void btnTreeFind_Click(object sender, EventArgs e) { this.InitTreeMenu(); this.BindGrid(); @@ -1127,7 +1139,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage } #endregion - protected void ckIsAudit_CheckedChanged(object sender, CheckedEventArgs e) + protected void rbIsAudit_SelectedIndexChanged(object sender, EventArgs e) { Model.HJGL_Pipeline pipeline = BLL.PipelineService.GetPipelineByPipelineId(this.tvControlItem.SelectedNodeID); this.hdUnitWorkId.Text = string.Empty; @@ -1141,7 +1153,22 @@ namespace FineUIPro.Web.HJGL.WeldingManage this.hdUnitWorkId.Text = this.tvControlItem.SelectedNodeID; NoAuditBindGrid(); } + } + protected void txtAuditDate_TextChanged(object sender, EventArgs e) + { + Model.HJGL_Pipeline pipeline = BLL.PipelineService.GetPipelineByPipelineId(this.tvControlItem.SelectedNodeID); + this.hdUnitWorkId.Text = string.Empty; + if (pipeline != null) + { + this.hdUnitWorkId.Text = this.tvControlItem.SelectedNode.ParentNode.NodeID; + this.BindGrid(); + } + else + { + this.hdUnitWorkId.Text = this.tvControlItem.SelectedNodeID; + NoAuditBindGrid(); + } } } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx.designer.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx.designer.cs index 8a5836cc..4cb68f6e 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx.designer.cs @@ -75,6 +75,15 @@ namespace FineUIPro.Web.HJGL.WeldingManage { /// protected global::FineUIPro.HiddenField hdUnitWorkId; + /// + /// btnTreeFind 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnTreeFind; + /// /// tvControlItem 控件。 /// @@ -112,13 +121,22 @@ namespace FineUIPro.Web.HJGL.WeldingManage { protected global::FineUIPro.TextBox txtWeldJointCode; /// - /// ckIsAudit 控件。 + /// rbIsAudit 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.CheckBox ckIsAudit; + protected global::FineUIPro.RadioButtonList rbIsAudit; + + /// + /// txtAuditDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtAuditDate; /// /// lbSize 控件。 From 86d48d63f2c3ef096a70f610bd935a3b8da2c5e3 Mon Sep 17 00:00:00 2001 From: gaofei1985 <181547018@qq.com> Date: Mon, 27 Nov 2023 12:13:21 +0800 Subject: [PATCH 17/26] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DataBase/版本日志/SGGLDB_V2023-11-27.sql | 61 ++++++++++ .../InformationProject/ConstructionLog.aspx | 115 +++++++++++++++++- .../ConstructionLog.aspx.cs | 96 +++++++++++++++ SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx | 2 +- 4 files changed, 267 insertions(+), 7 deletions(-) create mode 100644 DataBase/版本日志/SGGLDB_V2023-11-27.sql diff --git a/DataBase/版本日志/SGGLDB_V2023-11-27.sql b/DataBase/版本日志/SGGLDB_V2023-11-27.sql new file mode 100644 index 00000000..1e679f87 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_V2023-11-27.sql @@ -0,0 +1,61 @@ + +ALTER VIEW [dbo].[View_HJGL_Batch_PointBatchItem] +AS +/*************ϸ*************/ +SELECT PointBatchItem.PointBatchItemId, +PointBatchItem.PointBatchId, +PointBatch.ProjectId, +PointBatch.UnitId, +PointBatch.DetectionTypeId, +PointBatch.DetectionRateId, +PointBatch.PointBatchCode, +Pipeline.UnitWorkId, +PointBatchItem.WeldJointId, +(CASE PointBatchItem.PointState WHEN '1' THEN '' WHEN '2' THEN '͸' END) AS PointState, +(CASE PointBatchItem.IsBuildTrust WHEN 1 THEN '' ELSE '' END) AS IsBuildTrust, +(CASE WHEN PointBatchItem.IsAudit=1 THEN '' + WHEN (PointBatchItem.IsAudit IS NULL OR PointBatchItem.IsAudit=0) AND PointBatchItem.PointState IS NOT NULL THEN '' + WHEN (PointBatchItem.IsAudit IS NULL OR PointBatchItem.IsAudit=0) AND PointBatchItem.PointState IS NULL THEN '' END) AS PointIsAudit, +PointBatchItem.PointDate,-- +(CASE PointBatchItem.IsWelderFirst WHEN 1 THEN '' ELSE '' END) AS IsWelderFirst, +PointBatchItem.RepairDate,-- +PointBatchItem.RepairRecordId, +PointBatchItem.CutDate,--г +PointBatchItem.PBackingWelderId,--޴׺ +PointBatchItem.PCoverWelderId,--޸溸 +UnitWork.UnitWorkCode,-- +WeldJoint.WeldJointCode,--ں +WeldJoint.BackingWelderId AS WelderId, --ID +BackingWelder.WelderCode AS BackingWelderCode, +CoverWelder.WelderCode AS CoverWelderCode, +WeldType.WeldTypeCode, +WeldJoint.JointAttribute, +WeldJoint.JointArea,-- +WeldJoint.Size,--ʵʴ羶 +WeldingDaily.WeldingDate,-- +WeldJoint.PipelineId, --ID +WeldJoint.Material1Id AS Mat, -- +WeldJoint.Specification, -- +Pipeline.PipelineCode, --ߺ +PipingClass.PipingClassName , --ܵȼ +WeldJoint.BackingWelderId, +WeldJoint.CoverWelderId +FROM dbo.HJGL_Batch_PointBatchItem AS PointBatchItem +LEFT JOIN dbo.HJGL_Batch_PointBatch AS PointBatch ON PointBatch.PointBatchId=PointBatchItem.PointBatchId +LEFT JOIN dbo.HJGL_WeldJoint AS WeldJoint ON WeldJoint.WeldJointId=PointBatchItem.WeldJointId +LEFT JOIN dbo.HJGL_Pipeline AS Pipeline ON Pipeline.PipelineId=WeldJoint.PipelineId +LEFT JOIN dbo.WBS_UnitWork AS UnitWork ON UnitWork.UnitWorkId=Pipeline.UnitWorkId +LEFT JOIN dbo.HJGL_WeldingDaily AS WeldingDaily ON WeldingDaily.WeldingDailyId=WeldJoint.WeldingDailyId +LEFT JOIN dbo.Base_PipingClass AS PipingClass ON PipingClass.PipingClassId=Pipeline.PipingClassId +LEFT JOIN SitePerson_Person AS BackingWelder ON BackingWelder.PersonId=WeldJoint.BackingWelderId +LEFT JOIN SitePerson_Person AS CoverWelder ON CoverWelder.PersonId=WeldJoint.CoverWelderId +LEFT JOIN Base_WeldType AS WeldType ON WeldType.WeldTypeId=WeldJoint.WeldTypeId +LEFT JOIN HJGL_Hard_TrustItem HardTrustItem ON HardTrustItem.WeldJointId=PointBatchItem.WeldJointId +where (WeldJoint.IsHotProess!=1 or WeldJoint.IsHotProess is null or (WeldJoint.IsHotProess=1 and HardTrustItem.IsPass=1)) +and BackingWelder.ProjectId=Pipeline.ProjectId and CoverWelder.ProjectId=Pipeline.ProjectId + + + +GO + + diff --git a/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionLog.aspx b/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionLog.aspx index de9c8c29..59158ad5 100644 --- a/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionLog.aspx +++ b/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionLog.aspx @@ -41,8 +41,8 @@ - + OnClick="imgBtnFile_Click"> + @@ -87,9 +87,9 @@ - + - + @@ -104,7 +104,7 @@ + SortField="ConstructionLogPersonId" EnableTextSelection="True" EnableSummary="true" SummaryPosition="Flow"> @@ -116,6 +116,9 @@ FieldType="String" Hidden="true"> + + + @@ -124,7 +127,7 @@ + SortField="ConstructionLogMachineId" EnableTextSelection="True" EnableSummary="true" SummaryPosition="Flow"> @@ -136,6 +139,9 @@ FieldType="String" Hidden="true"> + + + @@ -427,6 +433,103 @@ function reloadGrid() { __doPostBack(null, 'reloadGrid'); } + + function onGridAfterEdit(event, value, params) { + var me = this, columnId = params.columnId, rowId = params.rowId; + + if (columnId === 'TotalNum' || columnId === 'TotalCompleteNum1') { + var TotalNum = me.getCellValue(rowId, 'TotalNum'); + var TotalCompleteNum1 = me.getCellValue(rowId, 'TotalCompleteNum1'); + if (TotalNum.toString() != "" && TotalCompleteNum1.toString() != "") { + if (TotalNum !== "0") { + me.updateCellValue(rowId, 'TotalRate1', (TotalCompleteNum1 / TotalNum * 100).toFixed(2) + "%"); + } else { + me.updateCellValue(rowId, 'TotalRate1', ("")); + } + + } + } + + if (columnId === 'TotalNum' || columnId === 'TotalCompleteNum2') { + var TotalNum = me.getCellValue(rowId, 'TotalNum'); + var TotalCompleteNum2 = me.getCellValue(rowId, 'TotalCompleteNum2'); + + if (TotalNum.toString() != "" && TotalCompleteNum2.toString() != "") { + if (TotalNum !== "0") { + me.updateCellValue(rowId, 'TotalRate2', (TotalCompleteNum2 / TotalNum * 100).toFixed(2) + "%"); + } else { + me.updateCellValue(rowId, 'TotalRate2', ("")); + } + + } + } + + if (columnId === 'FilmNum' || columnId === 'NotOKFileNum') { + var FilmNum = me.getCellValue(rowId, 'FilmNum'); + var NotOKFileNum = me.getCellValue(rowId, 'NotOKFileNum'); + if (FilmNum.toString() != "" && NotOKFileNum.toString() != "") { + if (FilmNum !== "0") { + me.updateCellValue(rowId, 'OneOKRate', ((FilmNum - NotOKFileNum) / FilmNum * 100).toFixed(2) + "%"); + } else { + me.updateCellValue(rowId, 'OneOKRate', ("")); + } + } + updateSummary(); + } + if (columnId === 'TotalFilmNum' || columnId === 'TotalNotOKFileNum') { + var TotalFilmNum = me.getCellValue(rowId, 'TotalFilmNum'); + var TotalNotOKFileNum = me.getCellValue(rowId, 'TotalNotOKFileNum'); + if (TotalFilmNum.toString() != "" && TotalNotOKFileNum.toString() != "") { + if (TotalFilmNum !== "0") { + me.updateCellValue(rowId, 'TotalOneOKRate', ((TotalFilmNum - TotalNotOKFileNum) / TotalFilmNum * 100).toFixed(2) + "%"); + } else { + me.updateCellValue(rowId, 'TotalOneOKRate', ("")); + } + } + updateSummary(); + } + if (columnId === 'ThisPersonNum' || columnId === 'ThisOKPersonNum') { + var ThisPersonNum = me.getCellValue(rowId, 'ThisPersonNum'); + var ThisOKPersonNum = me.getCellValue(rowId, 'ThisOKPersonNum'); + if (ThisPersonNum.toString() != "" && ThisOKPersonNum.toString() != "") { + if (ThisPersonNum !== "0") { + me.updateCellValue(rowId, 'ThisOKRate', (ThisOKPersonNum / ThisPersonNum * 100).toFixed(2) + "%"); + } else { + me.updateCellValue(rowId, 'ThisOKRate', ("")); + } + } + updateSummary(); + } + + if (columnId === 'TotalPersonNum' || columnId === 'TotalOKPersonNum') { + var TotalPersonNum = me.getCellValue(rowId, 'TotalPersonNum'); + var TotalOKPersonNum = me.getCellValue(rowId, 'TotalOKPersonNum'); + if (TotalPersonNum.toString() != "" && TotalOKPersonNum.toString() != "") { + if (TotalPersonNum !== "0") { + me.updateCellValue(rowId, 'TotalOKRate', (TotalOKPersonNum / TotalPersonNum * 100).toFixed(2) + "%"); + } else { + me.updateCellValue(rowId, 'TotalOKRate', ("")); + } + } + updateSummary(); + } + if (columnId === 'TotalSpotNum' || columnId === 'TotalSpotOKNum') { + var TotalSpotNum = me.getCellValue(rowId, 'TotalSpotNum'); + var TotalSpotOKNum = me.getCellValue(rowId, 'TotalSpotOKNum'); + if (TotalSpotNum.toString() != "" && TotalSpotOKNum.toString() != "") { + if (TotalSpotNum !== "0") { + me.updateCellValue(rowId, 'TotalSpotOKRate', ((TotalSpotOKNum) / TotalSpotNum * 100).toFixed(2) + "%"); + } else { + me.updateCellValue(rowId, 'TotalSpotOKRate', ("")); + } + } + } + } + + function updateSummary() { + // 回发到后台更新 + __doPostBack('', 'UPDATE_SUMMARY'); + } diff --git a/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionLog.aspx.cs b/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionLog.aspx.cs index da9630c4..b405c609 100644 --- a/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionLog.aspx.cs +++ b/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionLog.aspx.cs @@ -131,9 +131,105 @@ namespace FineUIPro.Web.PZHGL.InformationProject this.txtReportDate.Text = string.Format("{0:yyyy-MM}", DateTime.Now); this.InitTreeMenu(); } + else + { + if (GetRequestEventArgument() == "UPDATE_SUMMARY") + { + // 页面要求重新计算合计行的值 + OutputSummaryData(); + } + } } #endregion + private void OutputSummaryData() + { + //JObject summary = new JObject(); + //int filmNum = 0, notOKFileNum = 0, repairFileNum = 0, totalFilmNum = 0, totalNotOKFileNum = 0; + //string oneOKRate = string.Empty, totalOneOKRate = string.Empty; + //foreach (JObject mergedRow in GridNDTCheck.GetMergedData()) + //{ + // JObject values = mergedRow.Value("values"); + // if (values["FilmNum"].ToString() != "" && values["NotOKFileNum"].ToString() != "") + // { + // filmNum += values.Value("FilmNum"); + // notOKFileNum += values.Value("NotOKFileNum"); + // } + // if (values["RepairFileNum"].ToString() != "") + // { + // repairFileNum += values.Value("RepairFileNum"); + // } + // if (values["TotalFilmNum"].ToString() != "" && values["TotalNotOKFileNum"].ToString() != "") + // { + // totalFilmNum += values.Value("TotalFilmNum"); + // totalNotOKFileNum += values.Value("TotalNotOKFileNum"); + // } + //} + //if (filmNum > 0) + //{ + // var a = Convert.ToDouble(filmNum - notOKFileNum); + // var b = Convert.ToDouble(filmNum); + // decimal result = decimal.Round(decimal.Parse((a / b * 100).ToString()), 2); + // oneOKRate = result.ToString() + "%"; + //} + //if (totalFilmNum > 0) + //{ + // var a = Convert.ToDouble(totalFilmNum - totalNotOKFileNum); + // var b = Convert.ToDouble(totalFilmNum); + // decimal result = decimal.Round(decimal.Parse((a / b * 100).ToString()), 2); + // totalOneOKRate = result.ToString() + "%"; + //} + //JObject summary1 = new JObject(); + //summary1.Add("UnitName", "合计"); + //summary1.Add("FilmNum", filmNum); + //summary1.Add("NotOKFileNum", notOKFileNum); + //summary1.Add("RepairFileNum", repairFileNum); + //summary1.Add("OneOKRate", oneOKRate); + //summary1.Add("TotalFilmNum", totalFilmNum); + //summary1.Add("TotalNotOKFileNum", totalNotOKFileNum); + //summary1.Add("TotalOneOKRate", totalOneOKRate); + //GridNDTCheck.SummaryData = summary1; + //int thisPersonNum = 0, thisOKPersonNum = 0, totalPersonNum = 0, totalOKPersonNum = 0; + //string thisOKRate = string.Empty, totalOKRate = string.Empty; + //foreach (JObject mergedRow in GridWelder.GetMergedData()) + //{ + // JObject values = mergedRow.Value("values"); + // if (values["ThisPersonNum"].ToString() != "" && values["ThisOKPersonNum"].ToString() != "") + // { + // thisPersonNum += values.Value("ThisPersonNum"); + // thisOKPersonNum += values.Value("ThisOKPersonNum"); + // } + // if (values["TotalPersonNum"].ToString() != "" && values["TotalOKPersonNum"].ToString() != "") + // { + // totalPersonNum += values.Value("TotalPersonNum"); + // totalOKPersonNum += values.Value("TotalOKPersonNum"); + // } + //} + //if (thisPersonNum > 0 && thisOKPersonNum > 0) + //{ + // var a = Convert.ToDouble(thisOKPersonNum); + // var b = Convert.ToDouble(thisPersonNum); + // decimal result = decimal.Round(decimal.Parse((a / b * 100).ToString()), 2); + // thisOKRate = result.ToString() + "%"; + //} + //if (totalPersonNum > 0 && totalOKPersonNum > 0) + //{ + // var a = Convert.ToDouble(totalOKPersonNum); + // var b = Convert.ToDouble(totalPersonNum); + // decimal result = decimal.Round(decimal.Parse((a / b * 100).ToString()), 2); + // totalOKRate = result.ToString() + "%"; + //} + //summary.Add("UnitName", "合计"); + //summary.Add("ThisPersonNum", thisPersonNum); + //summary.Add("ThisOKPersonNum", thisOKPersonNum); + //summary.Add("ThisOKRate", thisOKRate); + //summary.Add("TotalPersonNum", totalPersonNum); + //summary.Add("TotalOKPersonNum", totalOKPersonNum); + //summary.Add("TotalOKRate", totalOKRate); + //GridWelder.SummaryData = summary; + + } + #region 加载树装置-单位-工作区 /// /// 加载树 diff --git a/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx b/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx index adfc0c57..16cb6492 100644 --- a/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx +++ b/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx @@ -90,7 +90,7 @@ Date: Mon, 27 Nov 2023 16:06:24 +0800 Subject: [PATCH 18/26] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../HJGL/WeldingManage/WeldJointEdit.aspx.cs | 56 +++++----- .../HJGL/WeldingManage/WeldReport.aspx.cs | 2 +- SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx | 36 +++++-- .../common/mainMenu_HJGL3.aspx.cs | 101 ++++++++++++++---- .../common/mainMenu_HJGL3.aspx.designer.cs | 65 +++++++++-- 5 files changed, 190 insertions(+), 70 deletions(-) diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointEdit.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointEdit.aspx.cs index a93fde9f..529ca0e1 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointEdit.aspx.cs @@ -277,45 +277,35 @@ namespace FineUIPro.Web.HJGL.WeldingManage protected void btnSave_Click(object sender, EventArgs e) { - if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, Const.HJGL_WeldJointMenuId, Const.BtnSave)) + string weldJointCode = string.Empty; + + int joint = Funs.GetNewIntOrZero(this.txtWeldJointCode.Text.Trim()); + + if (joint != 0) { - string weldJointCode = string.Empty; - - int joint = Funs.GetNewIntOrZero(this.txtWeldJointCode.Text.Trim()); - - if (joint != 0) + if (joint < 10) { - if (joint < 10) - { - weldJointCode = "0" + Convert.ToString(joint); - } - else - { - weldJointCode = Convert.ToString(joint); - } + weldJointCode = "0" + Convert.ToString(joint); } else { - weldJointCode = this.txtWeldJointCode.Text; + weldJointCode = Convert.ToString(joint); } - - if (BLL.WeldJointService.IsExistWeldJointCode(weldJointCode, this.PipelineId, WeldJointId)) - { - Alert.ShowInTop("该管线焊口已存在!", MessageBoxIcon.Warning); - return; - } - else - { - SaveData(); - } - } else { - ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); - return; + weldJointCode = this.txtWeldJointCode.Text; } + if (BLL.WeldJointService.IsExistWeldJointCode(weldJointCode, this.PipelineId, WeldJointId)) + { + Alert.ShowInTop("该管线焊口已存在!", MessageBoxIcon.Warning); + return; + } + else + { + SaveData(); + } } /// /// 提交数据 @@ -740,7 +730,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { string dn = string.Empty; string s = string.Empty; - this.txtSize.Text = string.Empty; + //this.txtSize.Text = string.Empty; this.txtSpecification.Text = string.Empty; if (!string.IsNullOrEmpty(this.txtDia.Text.Trim())) { @@ -768,6 +758,14 @@ namespace FineUIPro.Web.HJGL.WeldingManage this.txtSpecification.Text = "Φ" + dn + "*" + this.txtThickness.Text.Trim(); } } + if (!string.IsNullOrEmpty(this.txtDNDia.Text.Trim())) + { + dn = this.txtDNDia.Text.Trim(); + if (!string.IsNullOrEmpty(this.txtThickness.Text.Trim())) + { + this.txtSpecification.Text = dn + "*" + this.txtThickness.Text.Trim(); + } + } } #endregion diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReport.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReport.aspx.cs index cd36c6bd..9c6bbf37 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReport.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReport.aspx.cs @@ -439,7 +439,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage } } BLL.WeldingDailyService.DeleteWeldingDaily(weldingDailyId); - //BLL.Sys_LogService.AddLog(BLL.Const.System_6, this.CurrUser.LoginProjectId, this.CurrUser.PersonId, Const.HJGL_WeldReportMenuId, Const.BtnDelete, weldingDailyId); + BLL.LogService.AddLog(this.CurrUser.PersonId, "删除焊接日报"); ShowNotify("删除成功!", MessageBoxIcon.Success); this.InitTreeMenu(); this.BindGrid(); diff --git a/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx b/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx index 16cb6492..e3f3a568 100644 --- a/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx +++ b/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx @@ -90,15 +90,18 @@ + + @@ -120,7 +123,7 @@ - - - - - + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx.cs b/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx.cs index 218ce128..ca5e2f58 100644 --- a/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx.cs +++ b/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx.cs @@ -126,7 +126,7 @@ namespace FineUIPro.Web.common string strSql = @"select ProjectId,TotalDin,FinishSize,CONVERT(NVARCHAR(10),(CAST((CASE ISNULL(TotalDin,0) WHEN 0 THEN 0 ELSE 100.0 * ISNULL(FinishSize,0)/(1.0 * TotalDin) END) AS DECIMAL(8,2))))+'%' AS Rate from - (select ProjectId,CAST((SELECT SUM(ISNULL(Size,0)) FROM dbo.HJGL_WeldJoint WHERE ProjectId=b.ProjectId) AS DECIMAL(12,3)) AS TotalDin, + (select ProjectId,CAST((SELECT ISNULL(SUM(ISNULL(Size,0)),0) FROM dbo.HJGL_WeldJoint WHERE ProjectId=b.ProjectId) AS DECIMAL(12,3)) AS TotalDin, CAST((SELECT ISNULL(SUM(ISNULL(jot.Size,0)),0) FROM dbo.HJGL_WeldJoint jot WHERE ProjectId=b.ProjectId AND jot.WeldingDailyId IS NOT NULL) AS DECIMAL(12,3)) AS FinishSize from Base_Project b) v where ProjectId=@ProjectId "; @@ -150,12 +150,19 @@ namespace FineUIPro.Web.common /// private void BindGrid2(string unitWorkId) { - string strSql = @"select UnitWorkId,TotalDin,FinishSize,CONVERT(NVARCHAR(10),(CAST((CASE ISNULL(TotalDin,0) WHEN 0 THEN 0 + string strSql = @"select '工厂预制' as PipeArea,UnitWorkId,TotalDin,FinishSize,CONVERT(NVARCHAR(10),(CAST((CASE ISNULL(TotalDin,0) WHEN 0 THEN 0 ELSE 100.0 * ISNULL(FinishSize,0)/(1.0 * TotalDin) END) AS DECIMAL(8,2))))+'%' AS Rate from - (select UnitWorkId,CAST((SELECT SUM(ISNULL(Size,0)) FROM dbo.HJGL_WeldJoint jot left join dbo.HJGL_Pipeline pipeline on jot.PipelineId=pipeline.PipelineId WHERE pipeline.UnitWorkId=b.UnitWorkId) AS DECIMAL(12,3)) AS TotalDin, - CAST((SELECT ISNULL(SUM(ISNULL(jot.Size,0)),0) FROM dbo.HJGL_WeldJoint jot left join dbo.HJGL_Pipeline pipeline on jot.PipelineId=pipeline.PipelineId WHERE pipeline.UnitWorkId=b.UnitWorkId AND jot.WeldingDailyId IS NOT NULL) AS DECIMAL(12,3)) AS FinishSize - from WBS_UnitWork b) v where UnitWorkId=@UnitWorkId "; + (select UnitWorkId,CAST((SELECT ISNULL(SUM(ISNULL(Size,0)),0) FROM dbo.HJGL_WeldJoint jot left join dbo.HJGL_Pipeline pipeline on jot.PipelineId=pipeline.PipelineId WHERE pipeline.UnitWorkId=b.UnitWorkId and PipeArea='1') AS DECIMAL(12,3)) AS TotalDin, + CAST((SELECT ISNULL(SUM(ISNULL(jot.Size,0)),0) FROM dbo.HJGL_WeldJoint jot left join dbo.HJGL_Pipeline pipeline on jot.PipelineId=pipeline.PipelineId WHERE pipeline.UnitWorkId=b.UnitWorkId and PipeArea='1' AND jot.WeldingDailyId IS NOT NULL) AS DECIMAL(12,3)) AS FinishSize + from WBS_UnitWork b) v where UnitWorkId=@UnitWorkId +union +select '现场安装' as PipeArea,UnitWorkId,TotalDin,FinishSize,CONVERT(NVARCHAR(10),(CAST((CASE ISNULL(TotalDin,0) WHEN 0 THEN 0 + ELSE 100.0 * ISNULL(FinishSize,0)/(1.0 * TotalDin) END) AS DECIMAL(8,2))))+'%' + AS Rate from + (select UnitWorkId,CAST((SELECT ISNULL(SUM(ISNULL(Size,0)),0) FROM dbo.HJGL_WeldJoint jot left join dbo.HJGL_Pipeline pipeline on jot.PipelineId=pipeline.PipelineId WHERE pipeline.UnitWorkId=b.UnitWorkId and PipeArea='2') AS DECIMAL(12,3)) AS TotalDin, + CAST((SELECT ISNULL(SUM(ISNULL(jot.Size,0)),0) FROM dbo.HJGL_WeldJoint jot left join dbo.HJGL_Pipeline pipeline on jot.PipelineId=pipeline.PipelineId WHERE pipeline.UnitWorkId=b.UnitWorkId and PipeArea='2' AND jot.WeldingDailyId IS NOT NULL) AS DECIMAL(12,3)) AS FinishSize + from WBS_UnitWork b) v where UnitWorkId=@UnitWorkId"; List listStr = new List(); listStr.Add(new SqlParameter("@UnitWorkId", unitWorkId)); @@ -166,10 +173,14 @@ namespace FineUIPro.Web.common var table = GetPagedDataTable(Grid2, tb); Grid2.DataSource = table; Grid2.DataBind(); - decimal totalDin = Funs.GetNewDecimalOrZero(this.Grid2.Rows[0].Values[0].ToString()); - decimal finishSize = Funs.GetNewDecimalOrZero(this.Grid2.Rows[0].Values[1].ToString()); - decimal notCompleteDin = totalDin - finishSize; - this.lbNotCompleteDin.Text = notCompleteDin.ToString(); + decimal totalDin1 = Funs.GetNewDecimalOrZero(this.Grid2.Rows[0].Values[1].ToString()); + decimal finishSize1 = Funs.GetNewDecimalOrZero(this.Grid2.Rows[0].Values[2].ToString()); + decimal notCompleteDin1 = totalDin1 - finishSize1; + this.lbNotCompleteDin1.Text = notCompleteDin1.ToString(); + decimal totalDin2 = Funs.GetNewDecimalOrZero(this.Grid2.Rows[1].Values[1].ToString()); + decimal finishSize2 = Funs.GetNewDecimalOrZero(this.Grid2.Rows[1].Values[2].ToString()); + decimal notCompleteDin2 = totalDin2 - finishSize2; + this.lbNotCompleteDin2.Text = notCompleteDin2.ToString(); } #endregion @@ -178,26 +189,26 @@ namespace FineUIPro.Web.common /// /// /// - protected void btnQuery_Click(object sender, EventArgs e) + protected void btnQuery1_Click(object sender, EventArgs e) { if (this.tvControlItem.SelectedNodeID.Length > 1) { - if (string.IsNullOrEmpty(this.txtLeaveDay.Text.Trim())) + if (string.IsNullOrEmpty(this.txtLeaveDay1.Text.Trim())) { ShowNotify("请输入剩余工期(天)!", MessageBoxIcon.Warning); return; } - if (string.IsNullOrEmpty(this.txtWorkEfficiency.Text.Trim())) + if (string.IsNullOrEmpty(this.txtWorkEfficiency1.Text.Trim())) { ShowNotify("请输入日工效!", MessageBoxIcon.Warning); return; } - decimal totalDin = Funs.GetNewDecimalOrZero(this.Grid2.Rows[0].Values[0].ToString()); - decimal finishSize = Funs.GetNewDecimalOrZero(this.Grid2.Rows[0].Values[1].ToString()); + decimal totalDin = Funs.GetNewDecimalOrZero(this.Grid2.Rows[0].Values[1].ToString()); + decimal finishSize = Funs.GetNewDecimalOrZero(this.Grid2.Rows[0].Values[2].ToString()); decimal notCompleteDin = totalDin - finishSize; - this.lbNotCompleteDin.Text = notCompleteDin.ToString(); - decimal leaveDay = Funs.GetNewDecimalOrZero(this.txtLeaveDay.Text.Trim()); - decimal workEfficiency = Funs.GetNewDecimalOrZero(this.txtWorkEfficiency.Text.Trim()); + this.lbNotCompleteDin1.Text = notCompleteDin.ToString(); + decimal leaveDay = Funs.GetNewDecimalOrZero(this.txtLeaveDay1.Text.Trim()); + decimal workEfficiency = Funs.GetNewDecimalOrZero(this.txtWorkEfficiency1.Text.Trim()); if (notCompleteDin > 0) { if (leaveDay == 0) @@ -210,11 +221,63 @@ namespace FineUIPro.Web.common ShowNotify("日工效为0!", MessageBoxIcon.Warning); return; } - this.lbNeedWelderNum.Text = Convert.ToInt32(Math.Ceiling(notCompleteDin / leaveDay / workEfficiency)).ToString(); + this.lbNeedWelderNum1.Text = Convert.ToInt32(Math.Ceiling(notCompleteDin / leaveDay / workEfficiency)).ToString(); } else { - ShowNotify("未完成达因为0!", MessageBoxIcon.Warning); + ShowNotify("工厂预制未完成达因为0!", MessageBoxIcon.Warning); + return; + } + } + else + { + ShowNotify("请选择单位工程", MessageBoxIcon.Warning); + return; + } + } + + /// + /// 查询 + /// + /// + /// + protected void btnQuery2_Click(object sender, EventArgs e) + { + if (this.tvControlItem.SelectedNodeID.Length > 1) + { + if (string.IsNullOrEmpty(this.txtLeaveDay1.Text.Trim())) + { + ShowNotify("请输入剩余工期(天)!", MessageBoxIcon.Warning); + return; + } + if (string.IsNullOrEmpty(this.txtWorkEfficiency1.Text.Trim())) + { + ShowNotify("请输入日工效!", MessageBoxIcon.Warning); + return; + } + decimal totalDin = Funs.GetNewDecimalOrZero(this.Grid2.Rows[1].Values[1].ToString()); + decimal finishSize = Funs.GetNewDecimalOrZero(this.Grid2.Rows[1].Values[2].ToString()); + decimal notCompleteDin = totalDin - finishSize; + this.lbNotCompleteDin2.Text = notCompleteDin.ToString(); + decimal leaveDay = Funs.GetNewDecimalOrZero(this.txtLeaveDay2.Text.Trim()); + decimal workEfficiency = Funs.GetNewDecimalOrZero(this.txtWorkEfficiency2.Text.Trim()); + if (notCompleteDin > 0) + { + if (leaveDay == 0) + { + ShowNotify("剩余工期(天)为0!", MessageBoxIcon.Warning); + return; + } + if (workEfficiency == 0) + { + ShowNotify("日工效为0!", MessageBoxIcon.Warning); + return; + } + this.lbNeedWelderNum2.Text = Convert.ToInt32(Math.Ceiling(notCompleteDin / leaveDay / workEfficiency)).ToString(); + } + else + { + ShowNotify("现场安装未完成达因为0!", MessageBoxIcon.Warning); return; } } diff --git a/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx.designer.cs b/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx.designer.cs index c2bda08d..899587dc 100644 --- a/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx.designer.cs @@ -193,48 +193,93 @@ namespace FineUIPro.Web.common { protected global::FineUIPro.Form Form2; /// - /// lbNotCompleteDin 控件。 + /// lbNotCompleteDin1 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.Label lbNotCompleteDin; + protected global::FineUIPro.Label lbNotCompleteDin1; /// - /// txtLeaveDay 控件。 + /// txtLeaveDay1 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.NumberBox txtLeaveDay; + protected global::FineUIPro.NumberBox txtLeaveDay1; /// - /// txtWorkEfficiency 控件。 + /// txtWorkEfficiency1 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.NumberBox txtWorkEfficiency; + protected global::FineUIPro.NumberBox txtWorkEfficiency1; /// - /// lbNeedWelderNum 控件。 + /// lbNeedWelderNum1 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.Label lbNeedWelderNum; + protected global::FineUIPro.Label lbNeedWelderNum1; /// - /// btnQuery 控件。 + /// btnQuery1 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.Button btnQuery; + protected global::FineUIPro.Button btnQuery1; + + /// + /// lbNotCompleteDin2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbNotCompleteDin2; + + /// + /// txtLeaveDay2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtLeaveDay2; + + /// + /// txtWorkEfficiency2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtWorkEfficiency2; + + /// + /// lbNeedWelderNum2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbNeedWelderNum2; + + /// + /// btnQuery2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnQuery2; } } From db46ed8cd1dd8bf88c5f7d45e9a2a9906617b258 Mon Sep 17 00:00:00 2001 From: gaofei1985 <181547018@qq.com> Date: Tue, 28 Nov 2023 10:59:50 +0800 Subject: [PATCH 19/26] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DataBase/版本日志/SGGLDB_V2023-11-28.sql | 22 +++ SGGL/BLL/CQMS/WBS/WorkPackageService.cs | 26 ++-- .../CQMS/WBS/WorkPackageSet2.aspx | 2 +- .../CQMS/WBS/WorkPackageSet2In2.aspx | 22 ++- .../CQMS/WBS/WorkPackageSet2In2.aspx.cs | 145 ++++++++++++++++++ .../Excel/DataIn/WBS定制导入模板(电仪).xls | Bin 19456 -> 25088 bytes .../WeldingManage/PipelineListPDMSIn.aspx.cs | 16 +- .../JDGL/Check/CompleteInput.aspx | 3 + SGGL/FineUIPro.Web/JDGL/Check/PlanSet.aspx | 8 + SGGL/FineUIPro.Web/JDGL/Check/PlanSet.aspx.cs | 2 + .../JDGL/Check/PlanSet.aspx.designer.cs | 9 ++ .../InformationProject/ConstructionLog.aspx | 89 +---------- .../ConstructionLog.aspx.cs | 118 +++++--------- .../ConstructionLogFileCabinet.aspx | 4 +- .../ConstructionLogFileCabinet.aspx.cs | 40 +++++ .../ProjectConstructionLog.aspx | 4 +- .../ProjectConstructionLog.aspx.cs | 41 +++++ SGGL/Model/Model.cs | 42 +++++ 18 files changed, 402 insertions(+), 191 deletions(-) create mode 100644 DataBase/版本日志/SGGLDB_V2023-11-28.sql diff --git a/DataBase/版本日志/SGGLDB_V2023-11-28.sql b/DataBase/版本日志/SGGLDB_V2023-11-28.sql new file mode 100644 index 00000000..d4097938 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_V2023-11-28.sql @@ -0,0 +1,22 @@ +alter table WBS_WorkPackage add DrawProjectQuantity decimal(18,2) null +GO + +ALTER VIEW [dbo].[View_WBS] +AS +select '1' as Id,'0' as SupId ,'JZ' as Code, '' as Name,'ProjectType' as WBSType,null as PlanStartDate,null as PlanEndDate,null as RealEndDate,null as WBSCode,null as JDWeights,null as Unit,null as PlanProjectQuantity,null as RealProjectQuantity,null as RealStartDate,null as IsMileStone,null as PlanCost,null as PreWorkCode,'' as ShowId,null as DrawProjectQuantity, +ProjectId from dbo.Base_Project +Union +select '2' as Id,'0' as SupId ,'AZ' as Code, 'װ' as Name,'ProjectType' as WBSType,null as PlanStartDate,null as PlanEndDate,null as RealEndDate,null as WBSCode,null as JDWeights,null as Unit,null as PlanProjectQuantity,null as RealProjectQuantity,null as RealStartDate,null as IsMileStone,null as PlanCost,null as PreWorkCode,'' as ShowId,null as DrawProjectQuantity, +ProjectId from dbo.Base_Project +Union +select UnitWorkId as Id,ProjectType as SupId ,UnitWorkCode as Code, UnitWorkName as Name,'UnitWork' as WBSType,PlanStartDate, PlanEndDate,RealEndDate,WBSCode,JDWeights,null as Unit,null as PlanProjectQuantity,null as RealProjectQuantity,RealStartDate,null as IsMileStone,PlanCost,null as PreWorkCode,'' as ShowId,null as DrawProjectQuantity, +ProjectId from dbo.WBS_UnitWork +Union all +select WorkPackageId as id,UnitWorkId as SupId,WorkPackageCode as Code,PackageContent as Name,'WorkPackage' as WBSType,PlanStartDate, PlanEndDate,RealEndDate,WBSCode,JDWeights,Unit,PlanProjectQuantity,RealProjectQuantity,RealStartDate,IsMileStone,PlanCost,PreWorkCode,case when (select COUNT(*) from WBS_WorkPackage a where a.SuperWorkPackageId=w.WorkPackageId and a.IsApprove=1)=0 then WorkPackageId else '' end as ShowId,DrawProjectQuantity, +ProjectId from dbo.WBS_WorkPackage w where IsApprove=1 and SuperWorkPackageId is null +Union all +select WorkPackageId as id,SuperWorkPackageId as SupId,WorkPackageCode as Code, PackageContent as Name,'WorkPackage' as WBSType,PlanStartDate, PlanEndDate,RealEndDate,WBSCode,JDWeights,Unit,PlanProjectQuantity,RealProjectQuantity,RealStartDate,IsMileStone,PlanCost,PreWorkCode,case when (select COUNT(*) from WBS_WorkPackage a where a.SuperWorkPackageId=w.WorkPackageId and a.IsApprove=1)=0 then WorkPackageId else '' end as ShowId,DrawProjectQuantity, +ProjectId from dbo.WBS_WorkPackage w where IsApprove=1 and SuperWorkPackageId is not null + + +GO diff --git a/SGGL/BLL/CQMS/WBS/WorkPackageService.cs b/SGGL/BLL/CQMS/WBS/WorkPackageService.cs index 6f3ccb43..2c6e85c7 100644 --- a/SGGL/BLL/CQMS/WBS/WorkPackageService.cs +++ b/SGGL/BLL/CQMS/WBS/WorkPackageService.cs @@ -40,6 +40,7 @@ namespace BLL newWorkPackage.RealStartDate = WorkPackage.RealStartDate; newWorkPackage.RealEndDate = WorkPackage.RealEndDate; newWorkPackage.Unit = WorkPackage.Unit; + newWorkPackage.DrawProjectQuantity = WorkPackage.DrawProjectQuantity; db.WBS_WorkPackage.InsertOnSubmit(newWorkPackage); db.SubmitChanges(); @@ -76,6 +77,7 @@ namespace BLL newWorkPackage.PlanCost = WorkPackage.PlanCost; newWorkPackage.JDWeights = WorkPackage.JDWeights; newWorkPackage.PreWorkCode = WorkPackage.PreWorkCode; + newWorkPackage.DrawProjectQuantity = WorkPackage.DrawProjectQuantity; db.SubmitChanges(); } @@ -505,6 +507,7 @@ namespace BLL table.Columns.Add(new DataColumn("JDWeights", typeof(String))); table.Columns.Add(new DataColumn("Unit", typeof(String))); table.Columns.Add(new DataColumn("PlanProjectQuantity", typeof(String))); + table.Columns.Add(new DataColumn("DrawProjectQuantity", typeof(String))); table.Columns.Add(new DataColumn("RealProjectQuantity", typeof(String))); table.Columns.Add(new DataColumn("PlanStartDate", typeof(DateTime))); table.Columns.Add(new DataColumn("PlanEndDate", typeof(DateTime))); @@ -551,30 +554,31 @@ namespace BLL row[6] = item.JDWeights; row[7] = item.Unit; row[8] = item.PlanProjectQuantity; - row[9] = item.RealProjectQuantity; + row[9] = item.DrawProjectQuantity; + row[10] = item.RealProjectQuantity; if (item.PlanStartDate != null) { - row[10] = item.PlanStartDate; + row[11] = item.PlanStartDate; } if (item.PlanEndDate != null) { - row[11] = item.PlanEndDate; + row[12] = item.PlanEndDate; } if (item.RealStartDate != null) { - row[12] = item.RealStartDate; + row[13] = item.RealStartDate; } if (item.RealEndDate != null) { - row[13] = item.RealEndDate; + row[14] = item.RealEndDate; } if (item.IsMileStone != null) { - row[14] = item.IsMileStone; + row[15] = item.IsMileStone; } - row[15] = item.PlanCost; - row[16] = item.PreWorkCode; - row[17] = item.Code; + row[16] = item.PlanCost; + row[17] = item.PreWorkCode; + row[18] = item.Code; if (!string.IsNullOrEmpty(item.ShowId)) { var details = getDetails.Where(x => x.WorkPackageId == item.Id).ToList(); @@ -583,11 +587,11 @@ namespace BLL var index = months.FindIndex(x => x.Equals(item1.Months)); if (item1.PlanNum != 0) { - row[18 + index * 2] = decimal.Round(Convert.ToDecimal(item1.PlanNum), 2); + row[19 + index * 2] = decimal.Round(Convert.ToDecimal(item1.PlanNum), 2); } if (item1.ThisNum != 0) { - row[19 + index * 2] = decimal.Round(Convert.ToDecimal(item1.ThisNum), 2); + row[20 + index * 2] = decimal.Round(Convert.ToDecimal(item1.ThisNum), 2); } } } diff --git a/SGGL/FineUIPro.Web/CQMS/WBS/WorkPackageSet2.aspx b/SGGL/FineUIPro.Web/CQMS/WBS/WorkPackageSet2.aspx index efe46b98..843cbead 100644 --- a/SGGL/FineUIPro.Web/CQMS/WBS/WorkPackageSet2.aspx +++ b/SGGL/FineUIPro.Web/CQMS/WBS/WorkPackageSet2.aspx @@ -116,7 +116,7 @@