提交代码

This commit is contained in:
2023-11-29 10:46:42 +08:00
parent dcb9ef5f6c
commit a8799ec7bb
3 changed files with 45 additions and 35 deletions
@@ -103,7 +103,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
HJGL_MaterialService.materialStockItems_FIELD = new List<Model.MaterialStockItem>(); HJGL_MaterialService.materialStockItems_FIELD = new List<Model.MaterialStockItem>();
HJGL_MaterialService.materialStockItems_SHOP = new List<Model.MaterialStockItem>(); HJGL_MaterialService.materialStockItems_SHOP = new List<Model.MaterialStockItem>();
Tree_hJGL_Pipelines =new List<HJGL_Pipeline> (); Tree_hJGL_Pipelines = new List<HJGL_Pipeline>();
this.txtTaskDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now.AddDays(1)); this.txtTaskDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now.AddDays(1));
this.txtTaskCode.Text = BLL.WeldTaskService.GetTaskCodeByDate(this.CurrUser.LoginProjectId, this.txtTaskDate.Text); this.txtTaskCode.Text = BLL.WeldTaskService.GetTaskCodeByDate(this.CurrUser.LoginProjectId, this.txtTaskDate.Text);
BLL.Base_WeldingLocationServie.InitWeldingLocationDropDownList(drpWeldingLocation, true); BLL.Base_WeldingLocationServie.InitWeldingLocationDropDownList(drpWeldingLocation, true);
@@ -202,15 +202,16 @@ namespace FineUIPro.Web.HJGL.WeldingManage
} }
} }
void AddTreeNode(string PipeArea , TreeNode node ) void AddTreeNode(string PipeArea, TreeNode node)
{ {
var pipeline = (from x in Funs.DB.HJGL_Pipeline var pipeline = (from x in Funs.DB.HJGL_Pipeline
where x.ProjectId == this.CurrUser.LoginProjectId where x.ProjectId == this.CurrUser.LoginProjectId
&& x.UnitWorkId == this.UnitWorkId && x.UnitWorkId == this.UnitWorkId
&& x.PipeArea == PipeArea && x.PipeArea == PipeArea
&& x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim()) && x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim())
orderby x.PipelineCode select x).ToList(); orderby x.PipelineCode
if (!string .IsNullOrEmpty( drpFlowingSection.SelectedValue)&& drpFlowingSection.SelectedValue!=Const._Null) select x).ToList();
if (!string.IsNullOrEmpty(drpFlowingSection.SelectedValue) && drpFlowingSection.SelectedValue != Const._Null)
{ {
pipeline = pipeline.Where(x => x.FlowingSection == drpFlowingSection.SelectedValue).ToList(); pipeline = pipeline.Where(x => x.FlowingSection == drpFlowingSection.SelectedValue).ToList();
} }
@@ -316,7 +317,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
string pipelineId = this.tvControlItem.SelectedNodeID; string pipelineId = this.tvControlItem.SelectedNodeID;
var toDoMatterList = (from x in Funs.DB.View_HJGL_NoWeldJointFind var toDoMatterList = (from x in Funs.DB.View_HJGL_NoWeldJointFind
where x.PipelineId == pipelineId && x.WeldingDailyId == null &&x.JointAttribute==drpJointAttribute.SelectedValue where x.PipelineId == pipelineId && x.WeldingDailyId == null && x.JointAttribute == drpJointAttribute.SelectedValue
&& (string.IsNullOrEmpty(drpWeldTypeCode.SelectedValue) || x.WeldTypeCode.Contains(drpWeldTypeCode.SelectedValue)) && (string.IsNullOrEmpty(drpWeldTypeCode.SelectedValue) || x.WeldTypeCode.Contains(drpWeldTypeCode.SelectedValue))
select x).ToList(); select x).ToList();
@@ -571,7 +572,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
NewTask.Tabler = this.CurrUser.PersonId; NewTask.Tabler = this.CurrUser.PersonId;
NewTask.TableDate = DateTime.Now; NewTask.TableDate = DateTime.Now;
weldJoint.WeldingMode= drpWeldingMode.SelectedValue; weldJoint.WeldingMode = drpWeldingMode.SelectedValue;
BLL.WeldJointService.UpdateWeldJoint(weldJoint); BLL.WeldJointService.UpdateWeldJoint(weldJoint);
BLL.WeldTaskService.AddWeldTask(NewTask); BLL.WeldTaskService.AddWeldTask(NewTask);
} }
@@ -304,13 +304,13 @@ namespace FineUIPro.Web.HJGL.WeldingManage
} }
else else
{ {
SaveData(); SaveData(true);
} }
} }
/// <summary> /// <summary>
/// 提交数据 /// 提交数据
/// </summary> /// </summary>
private void SaveData() 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.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) 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)
@@ -457,9 +457,12 @@ namespace FineUIPro.Web.HJGL.WeldingManage
BLL.WeldJointService.AddWeldJoint(joint); BLL.WeldJointService.AddWeldJoint(joint);
} }
if (isClosed)
{
ShowNotify("提交成功!", MessageBoxIcon.Success); ShowNotify("提交成功!", MessageBoxIcon.Success);
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
} }
}
/// <summary> /// <summary>
/// 根据焊缝类型获取探伤类型 /// 根据焊缝类型获取探伤类型
@@ -871,7 +874,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
{ {
if (string.IsNullOrEmpty(this.WeldJointId)) if (string.IsNullOrEmpty(this.WeldJointId))
{ {
SaveData(); SaveData(false);
} }
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/WeldJoint&menuId={1}", WeldJointId, BLL.Const.HJGL_WeldJointMenuId))); PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/WeldJoint&menuId={1}", WeldJointId, BLL.Const.HJGL_WeldJointMenuId)));
} }
@@ -959,6 +959,12 @@ namespace FineUIPro.Web.HJGL.WeldingManage
string str1 = hdItemsString.Text; string str1 = hdItemsString.Text;
string str2 = hdTaskWeldJoint.Text; string str2 = hdTaskWeldJoint.Text;
this.InitTreeMenu(); this.InitTreeMenu();
tvControlItem.SelectedNode.Expanded = true;
if (tvControlItem.SelectedNode.CommandName == "单位工程")
{
tvControlItem.SelectedNode.Nodes.Clear();
BindNodes(tvControlItem.SelectedNode);
}
var unit = BLL.UnitWorkService.GetUnitWorkByUnitWorkId(tvControlItem.SelectedNodeID); var unit = BLL.UnitWorkService.GetUnitWorkByUnitWorkId(tvControlItem.SelectedNodeID);
List<Model.View_HJGL_WeldingTask> GetWeldingTaskList = null; List<Model.View_HJGL_WeldingTask> GetWeldingTaskList = null;
if (unit == null) if (unit == null)