This commit is contained in:
2026-05-30 11:36:22 +08:00
parent 7b944d66c5
commit e714396c85
12 changed files with 136 additions and 130 deletions
@@ -412,10 +412,10 @@ namespace FineUIPro.Web.HJGL.DataIn
row["qty"] = item.Value<string>("qty");
row["page_no"] = item.Value<string>("page_no");
row["remark"] = item.Value<string>("remark");
if (string.IsNullOrEmpty(row["drawing_number"].ToString()))
if (string.IsNullOrEmpty(row["pipe_no"].ToString()))
{
var rowOther = dtOther.Select("page= " + row["page_no"].ToString()).FirstOrDefault();
row["drawing_number"] = rowOther["text"];
row["pipe_no"] = rowOther["text"];
}
dt.Rows.Add(row);
}
@@ -81,12 +81,19 @@
Locked="true">
</f:WindowField>
<f:RenderField Width="200px" ColumnID="UnitName" DataField="UnitName" SortField="UnitName"
FieldType="String" HeaderText="单位名称" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
<f:TemplateField Width="130px" HeaderText="无损检测类型" HeaderTextAlign="Center"
<f:TemplateField Width="130px" HeaderText="单位名称" HeaderTextAlign="Center"
TextAlign="Center" SortField="UnitId">
<ItemTemplate>
<asp:Label ID="Label10" runat="server" Text='<%# ConvertUnit(Eval("UnitId")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:TemplateField Width="130px" HeaderText="单位工程" HeaderTextAlign="Center"
TextAlign="Center" SortField="UnitWorkId">
<ItemTemplate>
<asp:Label ID="Label11" runat="server" Text='<%# ConvertUnitWork(Eval("UnitWorkId")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:TemplateField Width="130px" HeaderText="无损检测类型" HeaderTextAlign="Center"
TextAlign="Center" SortField="DetectionType">
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# ConvertDetectionType(Eval("DetectionType")) %>'></asp:Label>
@@ -647,12 +647,36 @@ namespace FineUIPro.Web.HJGL.DataIn
isoList[i].PipingClassId = iso.PipingClassId;
}
}
this.IsoGrid.DataSource = this.isoList;
this.IsoGrid.DataBind();
}
public static string ConvertUnitWork(object UnitWorkId)
{
if (UnitWorkId != null)
{
var unitWork = Funs.DB.WBS_UnitWork.FirstOrDefault(x => x.UnitWorkId == UnitWorkId.ToString());
if (unitWork != null)
{
return unitWork.UnitWorkName;
}
}
return null;
}
public static string ConvertUnit(object UnitId)
{
if (UnitId != null)
{
var unit = Funs.DB.Base_Unit.FirstOrDefault(x => x.UnitId == UnitId.ToString());
if (unit != null)
{
return unit.UnitName;
}
}
return null;
}
public static string ConvertDetectionType(object DetectionTypeId)
{
if (DetectionTypeId != null)
@@ -140,6 +140,24 @@ namespace FineUIPro.Web.HJGL.DataIn
/// </remarks>
protected global::FineUIPro.Grid IsoGrid;
/// <summary>
/// Label10 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label10;
/// <summary>
/// Label11 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label11;
/// <summary>
/// Label1 控件。
/// </summary>
@@ -95,7 +95,7 @@
<f:FormRow>
<Items>
<f:TextBox ID="numDesignPress" Label="设计压力 MPa(g)" runat="server" LabelWidth="140px">
</f:TextBox>
</f:TextBox>
<f:DropDownList ID="drpTestMedium" Label="压力试验介质" runat="server"
EnableEdit="true" LabelWidth="120px">
</f:DropDownList>
@@ -148,7 +148,7 @@
<f:FormRow>
<Items>
<f:CheckBox ID="ckAll" runat="server" Checked="true" Text="是否批量修改"></f:CheckBox>
<f:CheckBox ID="ckAll" runat="server" Checked="true" Hidden="true" Text="是否批量修改"></f:CheckBox>
</Items>
</f:FormRow>
</Rows>
@@ -462,19 +462,17 @@ namespace FineUIPro.Web.HJGL.InfoQuery
}
protected void btnJoinMarke_Click(object sender, EventArgs e)
{ //string httpUrl = @"FileUpload\HJGL_DataImport\095e9691-99c2-4f70-8e67-e70c8fa6be9c\2022-06\管道焊接工作记录.pdf";
//var newurl = Funs.SGGLUrl + httpUrl.Replace(Funs.RootPath, "");
//var newurl = Funs.SGGLUrl + httpUrl.Replace(Funs.RootPath, "");
var id = Grid1.SelectedRowID;
if (string.IsNullOrEmpty(id))
{
ShowNotify("请选择相对应的ISO轴测图", MessageBoxIcon.Warning);
return;
}
var SingleName = (from x in Funs.DB.View_HJGL_Pipeline where x.PipelineId == id select (x.SingleName)).FirstOrDefault();
var filemodel = BLL.HJGL_DataImportService.GetLatestFileByFileName(SingleName, "0", this.CurrUser.LoginProjectId);
if (filemodel != null)
if (id != null)
{
string httpUrl = filemodel.FilePath;
PageContext.RegisterStartupScript(Window3.GetShowReference(String.Format("../JoinMarking/JoinMarking.aspx?ISO_ID=?fileUrl={0}", httpUrl, "查看 -")));
PageContext.RegisterStartupScript(Window3.GetShowReference(String.Format("../JoinMarking/JoinMarking.aspx?ISO_ID={0}", id, "查看 -")));
}
else
@@ -60,7 +60,7 @@
LabelWidth="100px" DecimalPrecision="4" NoNegative="true" ShowRedStar="true" Required="true"
EnableBlurEvent="true" OnBlur="txtText_TextChanged" LabelAlign="Right">
</f:NumberBox>
<f:TextBox ID="txtSpecification" Label="规格" runat="server" Readonly="true"
<f:TextBox ID="txtSpecification" Label="规格" runat="server"
LabelWidth="100px" ShowRedStar="true" Required="true" LabelAlign="Right">
</f:TextBox>
<f:DropDownList ID="drpWeldTypeCode" Label="焊缝类型"
@@ -81,26 +81,15 @@ namespace FineUIPro.Web.HJGL.JoinMarking
if (!string.IsNullOrEmpty(WeldJointId))
{
Model.HJGL_WeldJoint joint = dic[WeldJointId];
Model.WPQ_WPQList list = BLL.WPQListServiceService.GetWPQById(joint.WPQId);
this.txtWpqId.Text = joint.WPQId;
if (joint != null)
{
this.PipelineId = joint.PipelineId;
if (list != null)
{
this.txtWPQCode.Text = list.WPQCode;
this.txtWpqId.Text = list.WPQId;
}
if (Request.Params["Type"] == "add") //插入焊口
{
var baseWeldJoints = BLL.WeldJointService.GetBaseWeldJointsByWeldJointId(WeldJointId);
this.txtWeldJointCode.Text = joint.WeldJointCode + "Z-" + (baseWeldJoints.Count + 1).ToString();
}
else
{
this.txtWeldJointCode.Text = joint.WeldJointCode;
}
this.txtWeldJointCode.Text = joint.WeldJointCode;
if (!string.IsNullOrEmpty(joint.Material1Id))
{
this.drpMaterial1.SelectedValue = joint.Material1Id;
@@ -166,14 +155,7 @@ namespace FineUIPro.Web.HJGL.JoinMarking
drpJointAttribute.SelectedValue = joint.JointAttribute;
}
//if (!string.IsNullOrEmpty(joint.Components1Id))
//{
// drpComponent1.SelectedValue = joint.Components1Id;
//}
//if (!string.IsNullOrEmpty(joint.Components2Id))
//{
// drpComponent2.SelectedValue = joint.Components2Id;
//}
this.txtPreTemperature.Text = joint.PreTemperature;
this.txtSpecification.Text = joint.Specification;
txtRemark.Text = joint.Remark;
@@ -181,35 +163,12 @@ namespace FineUIPro.Web.HJGL.JoinMarking
{
drpIsHotProess.SelectedValue = joint.IsHotProess.Value.ToString();
}
//if (!string.IsNullOrEmpty(joint.DesignIsHotProess.ToString()))
//{
// drpDesignIsHotProess.SelectedValue = joint.DesignIsHotProess.Value.ToString();
//}
}
}
else
{
if (!string.IsNullOrEmpty(Request.Params["PipelineId"]))
{
this.PipelineId = Request.Params["PipelineId"];
}
}
Model.View_HJGL_Pipeline pipeline = BLL.PipelineService.GetViewPipelineByPipelineId(this.PipelineId);
if (!string.IsNullOrEmpty(isTwoJoint))
{
//string perfix = txtPipelineCode.Text + "/Z-";
string perfix = pipeline.PipelineCode + "/";
this.txtWeldJointCode.Text = perfix;
// txtWeldJointCode.Text = BLL.SQLHelper.RunProcNewIdByProjectId("SpGetNewCode4ByProjectId", "dbo.HJGL_WeldJoint", "WeldJointCode", this.CurrUser.LoginProjectId, perfix);
// txtWeldJointCode.Text = txtWeldJointCode.Text.Replace(perfix, "");
}
}
}
@@ -234,8 +193,6 @@ namespace FineUIPro.Web.HJGL.JoinMarking
return;
}
Model.HJGL_Pipeline pipeline = BLL.PipelineService.GetPipelineByPipelineId(this.PipelineId);
//PageContext.RegisterStartupScript(Window1.GetSaveStateReference(txtWpqId.ClientID, txtWPQCode.ClientID, drpWeldingRod.ClientID, drpWeldingWire.ClientID, drpWeldingMethodId.ClientID, drpGrooveType.ClientID, txtPreTemperature.ClientID, drpMaterial1.ClientID,drpMaterial2.ClientID,txtIsHotProess.ClientID)
// + Window1.GetShowReference(String.Format("SelectWPS.aspx?Material1={0}&Material2={1}&Dia={2}&Thickness={3}&UnitId={4}&WeldingMethod={5}&WeldType={6}", this.drpMaterial1.SelectedValue, this.drpMaterial2.SelectedValue, this.txtDia.Text, this.txtThickness.Text,pipeline.UnitId,this.drpWeldingMethodId.SelectedText,this.drpWeldTypeCode.SelectedText, "维护 - ")));
PageContext.RegisterStartupScript(Window1.GetSaveStateReference(txtWpqId.ClientID, txtWPQCode.ClientID, drpWeldingRod.ClientID, drpWeldingWire.ClientID, drpWeldingMethodId.ClientID, hdWeldingMethodId.ClientID, drpGrooveType.ClientID, hdGrooveType.ClientID, txtPreTemperature.ClientID, txtIsHotProess.ClientID)
+ Window1.GetShowReference(String.Format("SelectWPS.aspx?Material1={0}&Material2={1}&Dia={2}&Thickness={3}&UnitId={4}&WeldingMethod={5}&WeldType={6}", this.drpMaterial1.SelectedValue, this.drpMaterial2.SelectedValue, this.txtDia.Text, this.txtThickness.Text, pipeline.UnitId, this.drpWeldingMethodId.SelectedText, this.drpWeldTypeCode.SelectedText, "维护 - ")));
}
@@ -249,23 +206,7 @@ namespace FineUIPro.Web.HJGL.JoinMarking
{
string weldJointCode = string.Empty;
int joint = Funs.GetNewIntOrZero(this.txtWeldJointCode.Text.Trim());
if (joint != 0)
{
if (joint < 10)
{
weldJointCode = "0" + Convert.ToString(joint);
}
else
{
weldJointCode = Convert.ToString(joint);
}
}
else
{
weldJointCode = this.txtWeldJointCode.Text;
}
if (BLL.WeldJointService.IsExistWeldJointCode(weldJointCode, this.PipelineId, WeldJointId))
{
@@ -282,7 +223,6 @@ namespace FineUIPro.Web.HJGL.JoinMarking
/// </summary>
private void SaveData(bool isClosed)
{
// 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.drpMaterial1.SelectedValue == BLL.Const._Null || this.drpMaterial2.SelectedValue == BLL.Const._Null || this.drpWeldTypeCode.SelectedValue == BLL.Const._Null)
{
Alert.ShowInTop("页面必填项不能为空", MessageBoxIcon.Warning);
@@ -294,24 +234,10 @@ namespace FineUIPro.Web.HJGL.JoinMarking
joint.PipelineId = this.PipelineId;
joint.ProjectId = this.CurrUser.LoginProjectId;
//if (!this.txtWeldJointCode.Text.Contains("G"))
//{
int jointCode = Funs.GetNewIntOrZero(this.txtWeldJointCode.Text.Trim());
if (jointCode != 0)
{
if (jointCode < 10)
{
joint.WeldJointCode = "0" + Convert.ToString(jointCode);
}
else
{
joint.WeldJointCode = Convert.ToString(jointCode);
}
}
else
{
joint.WeldJointCode = this.txtWeldJointCode.Text;
}
joint.WeldJointCode = this.txtWeldJointCode.Text;
//}
//else
//{
@@ -59,7 +59,7 @@
</f:ContentPanel>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="焊口标注" EnableCollapse="true" Hidden="true"
runat="server" BoxFlex="1" DataKeyNames="WeldJointId" PageSize="15" OnPageIndexChange="Grid1_PageIndexChange"
EnableColumnLines="true" ClicksToEdit="2" DataIDField="TempId" AllowSorting="true"
EnableColumnLines="true" ClicksToEdit="2" DataIDField="WeldJointId" AllowSorting="true"
SortField="WeldJointCode" SortDirection="ASC" OnSort="Grid1_Sort"
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True">
<Columns>
@@ -1,5 +1,6 @@
using BLL;
using BLL.Common;
using FineUIPro.Web.HJGL.WeldingManage;
using Newtonsoft.Json.Linq;
using NPOI.POIFS.Properties;
using Org.BouncyCastle.Asn1.Tsp;
@@ -16,17 +17,8 @@ namespace FineUIPro.Web.HJGL.JoinMarking
{
public partial class PDFMarking : PageBase
{
public List<Model.HJGL_WeldJoint> WeldJointlist
{
get
{
return (List<Model.HJGL_WeldJoint>)ViewState["ISO_ID"];
}
set
{
ViewState["ISO_ID"] = value;
}
}
public static Dictionary<string, List<Model.HJGL_WeldJoint>> WeldJointlist = new Dictionary<string, List<Model.HJGL_WeldJoint>>();
private string ISO_ID
{
@@ -86,7 +78,15 @@ namespace FineUIPro.Web.HJGL.JoinMarking
FileId = Request.Params["FileId"];
URL = Funs.SGGLUrl + Request.Params["pdfurl"];
this.IsPDMS = "0";
WeldJointlist = new List<Model.HJGL_WeldJoint>();
if (!WeldJointlist.ContainsKey(CurrUser.PersonId))
{
WeldJointlist.Add(CurrUser.PersonId, new List<Model.HJGL_WeldJoint>());
}
else
{
WeldJointlist[ CurrUser.PersonId]= new List<Model.HJGL_WeldJoint>();
}
}
}
@@ -96,10 +96,17 @@ namespace FineUIPro.Web.HJGL.JoinMarking
/// </summary>
private void BindGrid()
{
Grid1.RecordCount = WeldJointlist.Count;
Grid1.DataSource = WeldJointlist;
Grid1.DataBind();
if (!WeldJointlist.ContainsKey(CurrUser.PersonId))
{
Grid1.RecordCount = WeldJointlist[CurrUser.PersonId].Count;
Grid1.DataSource = WeldJointlist[CurrUser.PersonId];
}
else
{
Grid1.RecordCount = 0;
Grid1.DataSource = null;
}
Grid1.DataBind();
}
#endregion
@@ -118,7 +125,9 @@ namespace FineUIPro.Web.HJGL.JoinMarking
}
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, Const.HJGL_DataInMenuId, Const.BtnIn))
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("DataInEdit.aspx?TempId={0}", Grid1.SelectedRowID, "维护 - ")));
DataInEdit.dic[Grid1.SelectedRowID] = WeldJointlist[CurrUser.PersonId].FirstOrDefault(x => x.WeldJointId == Grid1.SelectedRowID);
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("DataInEdit.aspx?WeldJointId={0}", Grid1.SelectedRowID, "维护 - ")));
}
else
{
@@ -142,7 +151,8 @@ namespace FineUIPro.Web.HJGL.JoinMarking
Alert.ShowInTop("请选择一条记录", MessageBoxIcon.Warning);
return;
}
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("DataInEdit.aspx?TempId={0}", Grid1.SelectedRowID, "维护 - ")));
DataInEdit.dic[Grid1.SelectedRowID] = WeldJointlist[CurrUser.PersonId].FirstOrDefault(x=>x.WeldJointId == Grid1.SelectedRowID);
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("DataInEdit.aspx?WeldJointId={0}", Grid1.SelectedRowID, "维护 - ")));
}
else
{
@@ -168,8 +178,8 @@ namespace FineUIPro.Web.HJGL.JoinMarking
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
{
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
var WeldJoint = WeldJointlist.FirstOrDefault(x => x.WeldJointId == rowID);
WeldJointlist.Remove(WeldJoint);
var WeldJoint = WeldJointlist[CurrUser.PersonId].FirstOrDefault(x => x.WeldJointId == rowID);
WeldJointlist[CurrUser.PersonId].Remove(WeldJoint);
}
ShowNotify("删除成功!", MessageBoxIcon.Success);
@@ -229,8 +239,9 @@ namespace FineUIPro.Web.HJGL.JoinMarking
protected void btnSaveMethod(string LoginProjectId, string UserId, string IsPDMS)
{
//beginProgress();
Funs.DB.HJGL_WeldJoint.InsertAllOnSubmit(WeldJointlist);
Funs.DB.HJGL_WeldJoint.InsertAllOnSubmit(WeldJointlist[CurrUser.PersonId]);
Funs.DB.SubmitChanges();
WeldJointlist.Remove(CurrUser.PersonId);
}
#endregion
@@ -254,8 +265,8 @@ namespace FineUIPro.Web.HJGL.JoinMarking
if (iso != null)
{
var unit = Funs.DB.Base_Unit.FirstOrDefault(x => x.UnitId == iso.UnitId);
WeldJointlist = new List<Model.HJGL_WeldJoint>();
WeldJointlist[CurrUser.PersonId] = new List<Model.HJGL_WeldJoint>();
for (int i = 0; i < jsonArray.Count; i++)
{
JObject item = jsonArray[i] as JObject;
@@ -272,7 +283,7 @@ namespace FineUIPro.Web.HJGL.JoinMarking
newDataInTemp.Y2 = item.Value<string>("y2");
newDataInTemp.AttachSourceId = FileId;
newDataInTemp.WeldingMode = "手动";
WeldJointlist.Add(newDataInTemp);
WeldJointlist[CurrUser.PersonId].Add(newDataInTemp);
}
File diff suppressed because one or more lines are too long