feat(hjgl): 完善焊前检查和防腐检查流程

焊前检查需要同时覆盖下料、组对和防腐检查,并支持移动端查询与保存。
扩展焊前检查模型、服务和页面字段,补充检查结果、不合格原因、整改要求、
附件和防腐检查记录,便于按焊口和材料追溯检查过程。
This commit is contained in:
2026-07-07 10:40:21 +08:00
parent 02b524b895
commit bb6615ebb0
57 changed files with 5035 additions and 2057 deletions
@@ -6,10 +6,10 @@ namespace FineUIPro.Web.HJGL.PreWeld
{
public partial class FitupCheckEdit : PageBase
{
public string WeldJointId
public string FitupCheckId
{
get { return (string)ViewState["WeldJointId"]; }
set { ViewState["WeldJointId"] = value; }
get { return (string)ViewState["FitupCheckId"]; }
set { ViewState["FitupCheckId"] = value; }
}
protected void Page_Load(object sender, EventArgs e)
@@ -17,15 +17,26 @@ namespace FineUIPro.Web.HJGL.PreWeld
if (!IsPostBack)
{
btnClose.OnClientClick = ActiveWindow.GetHideReference();
WeldJointId = Request.Params["WeldJointId"];
FitupCheckId = Request.Params["FitupCheckId"];
var weldJointId = Request.Params["WeldJointId"];
BindWeldJoint();
BindGrooveType();
if (!string.IsNullOrEmpty(WeldJointId))
BindCheckPerson();
ddlCheckResult.SelectedValue = "合格";
if (!string.IsNullOrEmpty(FitupCheckId))
{
BindData();
}
else if (!string.IsNullOrEmpty(weldJointId))
{
drpWeldJoint.SelectedValue = weldJointId;
drpWeldJoint.Enabled = false;
drpCheckPerson.SelectedValue = CurrUser.PersonId;
dpCheckTime.SelectedDate = DateTime.Now;
}
else
{
drpCheckPerson.SelectedValue = CurrUser.PersonId;
dpCheckTime.SelectedDate = DateTime.Now;
}
}
@@ -50,6 +61,11 @@ namespace FineUIPro.Web.HJGL.PreWeld
}
}
private void BindCheckPerson()
{
Person_PersonsService.InitUserProjectIdUnitIdRoleIdDropDownList(drpCheckPerson, CurrUser.LoginProjectId, null, null, true);
}
private void BindGrooveType()
{
drpGrooveType.DataTextField = "BaseInfoName";
@@ -60,8 +76,12 @@ namespace FineUIPro.Web.HJGL.PreWeld
private void BindData()
{
var model = PreWeldInspectionService.GetFitupCheckByWeldJointId(WeldJointId);
var weldJoint = APIPreWeldInspectionService.GetPreWeldJointByWeldJointId(WeldJointId);
var model = PreWeldInspectionService.GetFitupCheckById(FitupCheckId);
if (model == null)
{
return;
}
var weldJoint = APIPreWeldInspectionService.GetPreWeldJointByWeldJointId(model.WeldJointId);
if (weldJoint != null)
{
drpWeldJoint.SelectedValue = weldJoint.WeldJointId;
@@ -97,7 +117,30 @@ namespace FineUIPro.Web.HJGL.PreWeld
{
numMisalignment.Text = model.Misalignment.Value.ToString();
}
if (model.WeldReinforcement.HasValue)
{
numWeldReinforcement.Text = model.WeldReinforcement.Value.ToString();
}
if (model.WeldHeight.HasValue)
{
numWeldHeight.Text = model.WeldHeight.Value.ToString();
}
if (model.WeldWidth.HasValue)
{
numWeldWidth.Text = model.WeldWidth.Value.ToString();
}
txtSurfaceDefect.Text = model.SurfaceDefect;
if (!string.IsNullOrEmpty(model.CheckResult))
{
ddlCheckResult.SelectedValue = model.CheckResult;
}
if (!string.IsNullOrEmpty(model.CheckPerson))
{
drpCheckPerson.SelectedValue = model.CheckPerson;
}
dpCheckTime.SelectedDate = model.CheckTime;
txtUnqualifiedReason.Text = model.UnqualifiedReason;
txtRectifyRequirement.Text = model.RectifyRequirement;
txtRemark.Text = model.Remark;
}
}
@@ -110,8 +153,9 @@ namespace FineUIPro.Web.HJGL.PreWeld
return;
}
var item = new Model.PreWeldFitupCheckItem
var item = new Model.PreWeldFitupCheckInput
{
FitupCheckId = FitupCheckId,
ProjectId = CurrUser.LoginProjectId,
WeldJointId = drpWeldJoint.SelectedValue,
GrooveTypeId = drpGrooveType.SelectedValue,
@@ -119,24 +163,27 @@ namespace FineUIPro.Web.HJGL.PreWeld
GrooveAngle = string.IsNullOrWhiteSpace(numGrooveAngle.Text) ? (decimal?)null : Convert.ToDecimal(numGrooveAngle.Text),
FitupGap = string.IsNullOrWhiteSpace(numFitupGap.Text) ? (decimal?)null : Convert.ToDecimal(numFitupGap.Text),
Misalignment = string.IsNullOrWhiteSpace(numMisalignment.Text) ? (decimal?)null : Convert.ToDecimal(numMisalignment.Text),
CheckPerson = CurrUser.PersonId,
WeldReinforcement = string.IsNullOrWhiteSpace(numWeldReinforcement.Text) ? (decimal?)null : Convert.ToDecimal(numWeldReinforcement.Text),
WeldHeight = string.IsNullOrWhiteSpace(numWeldHeight.Text) ? (decimal?)null : Convert.ToDecimal(numWeldHeight.Text),
WeldWidth = string.IsNullOrWhiteSpace(numWeldWidth.Text) ? (decimal?)null : Convert.ToDecimal(numWeldWidth.Text),
SurfaceDefect = txtSurfaceDefect.Text.Trim(),
CheckResult = ddlCheckResult.SelectedValue,
CheckPerson = drpCheckPerson.SelectedValue,
CheckTime = dpCheckTime.SelectedDate ?? DateTime.Now,
CreateUser = CurrUser.PersonId,
UnqualifiedReason = txtUnqualifiedReason.Text.Trim(),
RectifyRequirement = txtRectifyRequirement.Text.Trim(),
Remark = txtRemark.Text.Trim()
};
APIPreWeldInspectionService.SaveFitupCheck(item);
FitupCheckId = APIPreWeldInspectionService.SaveFitupCheck(item);
ShowNotify("保存成功!", MessageBoxIcon.Success);
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
}
protected void btnAttachUrl_Click(object sender, EventArgs e)
{
string weldJointId = drpWeldJoint.SelectedValue;
var check = string.IsNullOrEmpty(weldJointId)
? null
: Funs.DB.HJGL_PreWeldFitupCheck.FirstOrDefault(x => x.WeldJointId == weldJointId);
if (check == null)
if (string.IsNullOrEmpty(FitupCheckId))
{
Alert.ShowInTop("请先保存组对抽检记录后再上传附件!", MessageBoxIcon.Warning);
return;
@@ -144,7 +191,7 @@ namespace FineUIPro.Web.HJGL.PreWeld
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(
string.Format("../../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/HJGL/PreWeld/FitupCheck&menuId={1}&edit=1&type=-1",
check.FitupCheckId, Const.HJGL_PreWeldFitupCheckMenuId)));
FitupCheckId, Const.HJGL_PreWeldFitupCheckMenuId)));
}
}
}