提交代码

This commit is contained in:
2023-12-01 17:08:50 +08:00
parent b696a63438
commit 877a874667
6 changed files with 98 additions and 79 deletions
@@ -44,9 +44,9 @@
FieldType="String" HeaderText="包装编号" HeaderTextAlign="Center" TextAlign="Center"> FieldType="String" HeaderText="包装编号" HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField> </f:RenderField>
<f:RenderField Width="120px" ColumnID="PlanStartDate" DataField="PlanStartDate" FieldType="String" <%--<f:RenderField Width="120px" ColumnID="PlanStartDate" DataField="PlanStartDate" FieldType="String"
HeaderText="最早安装时间" HeaderTextAlign="Center" TextAlign="Center"> HeaderText="最早安装时间" HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField> </f:RenderField>--%>
<f:RenderField Width="120px" ColumnID="StackingPosition" DataField="StackingPosition" FieldType="String" <f:RenderField Width="120px" ColumnID="StackingPosition" DataField="StackingPosition" FieldType="String"
HeaderText="堆放位置" HeaderTextAlign="Center" TextAlign="Center"> HeaderText="堆放位置" HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField> </f:RenderField>
@@ -66,11 +66,11 @@
</f:FormRow> </f:FormRow>
<f:FormRow> <f:FormRow>
<Items> <Items>
<f:TextBox ID="txtPlanStartDate" runat="server" Label="最早安装时间" LabelAlign="Right" Readonly="true" <%--<f:TextBox ID="txtPlanStartDate" runat="server" Label="最早安装时间" LabelAlign="Right" Readonly="true"
LabelWidth="140px"> LabelWidth="140px">
</f:TextBox> </f:TextBox>--%>
<f:TextBox ID="txtStackingPosition" runat="server" Label="堆放位置" LabelAlign="Right" Required="true" ShowRedStar="true" EmptyText="主项号+区域编号" <f:TextBox ID="txtStackingPosition" runat="server" Label="堆放位置" LabelWidth="140px" LabelAlign="Right" Required="true" ShowRedStar="true" EmptyText="主项号+区域编号"
LabelWidth="180px"> >
</f:TextBox> </f:TextBox>
</Items> </Items>
</f:FormRow> </f:FormRow>
@@ -111,15 +111,6 @@ namespace FineUIPro.Web.HJGL.PreDesign {
/// </remarks> /// </remarks>
protected global::FineUIPro.Button btnFind; protected global::FineUIPro.Button btnFind;
/// <summary>
/// txtPlanStartDate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtPlanStartDate;
/// <summary> /// <summary>
/// txtStackingPosition 控件。 /// txtStackingPosition 控件。
/// </summary> /// </summary>
@@ -78,9 +78,9 @@
<f:ListItem Text="新增口" Value="新增口" /> <f:ListItem Text="新增口" Value="新增口" />
<f:ListItem Text="修改口" Value="修改口" /> <f:ListItem Text="修改口" Value="修改口" />
</f:DropDownList> </f:DropDownList>
<f:DropDownList ID="drpUnit" runat="server" Required="true" ShowRedStar="true" <%--<f:DropDownList ID="drpUnit" runat="server" Required="true" ShowRedStar="true"
Label="工艺规程编制单位" LabelAlign="Right" LabelWidth="180px"> Label="工艺规程编制单位" LabelAlign="Right" LabelWidth="180px">
</f:DropDownList> </f:DropDownList>--%>
<f:ToolbarFill ID="ToolbarFill1" runat="server"> <f:ToolbarFill ID="ToolbarFill1" runat="server">
</f:ToolbarFill> </f:ToolbarFill>
@@ -92,8 +92,8 @@
<f:Button ID="btnBatchAdd" Text="批量增加" Icon="TableAdd" Hidden="true" <f:Button ID="btnBatchAdd" Text="批量增加" Icon="TableAdd" Hidden="true"
runat="server" OnClick="btnBatchAdd_Click"> runat="server" OnClick="btnBatchAdd_Click">
</f:Button> </f:Button>
<f:Button ID="btnAutoInput" Text="自动录入" Icon="Add" runat="server" OnClick="btnAutoInput_Click"> <%--<f:Button ID="btnAutoInput" Text="自动录入" Icon="Add" runat="server" OnClick="btnAutoInput_Click">
</f:Button> </f:Button>--%>
<f:Button ID="btnOut2" runat="server" Text="导出" ToolTip="导出焊口初始数据信息" Hidden="true" <f:Button ID="btnOut2" runat="server" Text="导出" ToolTip="导出焊口初始数据信息" Hidden="true"
Icon="FolderUp" EnableAjax="false" DisableControlBeforePostBack="false" OnClick="btnOut2_Click"> Icon="FolderUp" EnableAjax="false" DisableControlBeforePostBack="false" OnClick="btnOut2_Click">
</f:Button> </f:Button>
@@ -524,49 +524,49 @@ namespace FineUIPro.Web.HJGL.WeldingManage
/// <param name="e"></param> /// <param name="e"></param>
protected void btnAutoInput_Click(object sender, EventArgs e) protected void btnAutoInput_Click(object sender, EventArgs e)
{ {
if (this.drpUnit.SelectedValue == BLL.Const._Null) //if (this.drpUnit.SelectedValue == BLL.Const._Null)
{ //{
ShowNotify("请选择工艺规程编制单位!", MessageBoxIcon.Warning); // ShowNotify("请选择工艺规程编制单位!", MessageBoxIcon.Warning);
return; // return;
} //}
if (!string.IsNullOrEmpty(tvControlItem.SelectedNodeID)) //if (!string.IsNullOrEmpty(tvControlItem.SelectedNodeID))
{ //{
var jotList = from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == tvControlItem.SelectedNodeID && x.WPQId == null && x.IsTwoJoint == true 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) // if (jotList.Count() > 0)
{ // {
foreach (var jot in jotList) // foreach (var jot in jotList)
{ // {
List<Model.View_HJGL_WPQ> wpqList = BLL.WPQListServiceService.GetMatchWPQ(jot, this.CurrUser.LoginProjectId, drpUnit.SelectedValue); // List<Model.View_HJGL_WPQ> wpqList = BLL.WPQListServiceService.GetMatchWPQ(jot, this.CurrUser.LoginProjectId, drpUnit.SelectedValue);
if (wpqList != null) // if (wpqList != null)
{ // {
Model.HJGL_WeldJoint newJot = WeldJointService.GetWeldJointByWeldJointId(jot.WeldJointId); // Model.HJGL_WeldJoint newJot = WeldJointService.GetWeldJointByWeldJointId(jot.WeldJointId);
Model.WPQ_WPQList wps = new Model.WPQ_WPQList(); // Model.WPQ_WPQList wps = new Model.WPQ_WPQList();
var a = wpqList.FirstOrDefault(x => x.WeldingMethodId == "feb1234c-a538-476f-99ac-7b3ab15997c1"); //优先匹配GTAW+SMAW的焊评 // var a = wpqList.FirstOrDefault(x => x.WeldingMethodId == "feb1234c-a538-476f-99ac-7b3ab15997c1"); //优先匹配GTAW+SMAW的焊评
if (a == null) // if (a == null)
{ // {
wps = BLL.WPQListServiceService.GetWPQById(wpqList.First().WPQId); // wps = BLL.WPQListServiceService.GetWPQById(wpqList.First().WPQId);
} // }
else // else
{ // {
wps = BLL.WPQListServiceService.GetWPQById(a.WPQId); // wps = BLL.WPQListServiceService.GetWPQById(a.WPQId);
} // }
newJot.WPQId = wps.WPQId; // newJot.WPQId = wps.WPQId;
newJot.WeldJointId = jot.WeldJointId; // newJot.WeldJointId = jot.WeldJointId;
newJot.WeldingRod = wps.WeldingRod; // newJot.WeldingRod = wps.WeldingRod;
newJot.WeldingWire = wps.WeldingWire; // newJot.WeldingWire = wps.WeldingWire;
newJot.WeldingMethodId = wps.WeldingMethodId; // newJot.WeldingMethodId = wps.WeldingMethodId;
newJot.GrooveTypeId = wps.GrooveType; // newJot.GrooveTypeId = wps.GrooveType;
newJot.PreTemperature = wps.PreTemperature; // newJot.PreTemperature = wps.PreTemperature;
newJot.IsHotProess = wps.IsHotProess; // newJot.IsHotProess = wps.IsHotProess;
newJot.MatchableWPQ = string.Join(",", wpqList.Select(x => x.WPQCode)); // newJot.MatchableWPQ = string.Join(",", wpqList.Select(x => x.WPQCode));
BLL.WeldJointService.UpdateConWeldJoint(newJot); // BLL.WeldJointService.UpdateConWeldJoint(newJot);
} // }
} // }
} // }
BindGrid(); // BindGrid();
ShowNotify("该管线焊口已完成自动录入!", MessageBoxIcon.Success); // ShowNotify("该管线焊口已完成自动录入!", MessageBoxIcon.Success);
} //}
} }
/// <summary> /// <summary>
/// 焊口信息编辑 /// 焊口信息编辑
@@ -609,6 +609,52 @@ namespace FineUIPro.Web.HJGL.WeldingManage
{ {
BLL.WeldJointService.UpdateJointAudit(jot, CurrUser.PersonId, DateTime.Now); BLL.WeldJointService.UpdateJointAudit(jot, CurrUser.PersonId, DateTime.Now);
} }
if (!string.IsNullOrEmpty(tvControlItem.SelectedNodeID))
{
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)
{
string unitId = string.Empty;
Model.Person_Persons person = BLL.Person_PersonsService.GetPerson_PersonsById(jot.SubmitMan);
if (person != null)
{
unitId = person.UnitId;
}
List<Model.View_HJGL_WPQ> wpqList = BLL.WPQListServiceService.GetMatchWPQ(jot, this.CurrUser.LoginProjectId, unitId);
if (wpqList != null)
{
Model.HJGL_WeldJoint newJot = WeldJointService.GetWeldJointByWeldJointId(jot.WeldJointId);
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;
newJot.WeldingRod = wps.WeldingRod;
newJot.WeldingWire = wps.WeldingWire;
newJot.WeldingMethodId = wps.WeldingMethodId;
newJot.GrooveTypeId = wps.GrooveType;
newJot.PreTemperature = wps.PreTemperature;
newJot.IsHotProess = wps.IsHotProess;
newJot.MatchableWPQ = string.Join(",", wpqList.Select(x => x.WPQCode));
BLL.WeldJointService.UpdateConWeldJoint(newJot);
}
}
}
//BindGrid();
//ShowNotify("该管线焊口已完成自动录入!", MessageBoxIcon.Success);
}
ShowNotify("所选口审核成功!", MessageBoxIcon.Success); ShowNotify("所选口审核成功!", MessageBoxIcon.Success);
BindGrid(); BindGrid();
//string weldJointIdList = string.Join("|", Grid1.SelectedRowIDArray); //string weldJointIdList = string.Join("|", Grid1.SelectedRowIDArray);
@@ -174,15 +174,6 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// </remarks> /// </remarks>
protected global::FineUIPro.DropDownList DropTwoJointType; protected global::FineUIPro.DropDownList DropTwoJointType;
/// <summary>
/// drpUnit 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpUnit;
/// <summary> /// <summary>
/// ToolbarFill1 控件。 /// ToolbarFill1 控件。
/// </summary> /// </summary>
@@ -219,15 +210,6 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// </remarks> /// </remarks>
protected global::FineUIPro.Button btnBatchAdd; protected global::FineUIPro.Button btnBatchAdd;
/// <summary>
/// btnAutoInput 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnAutoInput;
/// <summary> /// <summary>
/// btnOut2 控件。 /// btnOut2 控件。
/// </summary> /// </summary>