diff --git a/DataBase/版本日志/SGGLDB_V2023-02-21.sql b/DataBase/版本日志/SGGLDB_V2023-02-21.sql
new file mode 100644
index 00000000..c6ba9f61
--- /dev/null
+++ b/DataBase/版本日志/SGGLDB_V2023-02-21.sql
@@ -0,0 +1,2 @@
+alter table HJGL_YardPlanning add YardPlanName varchar(100);
+alter table HJGL_YardPlanning add SurperId varchar(50);
\ No newline at end of file
diff --git a/SGGL/BLL/HJGL/PreDesign/HJGL_MaterialService.cs b/SGGL/BLL/HJGL/PreDesign/HJGL_MaterialService.cs
index 28d90280..2c0ee10e 100644
--- a/SGGL/BLL/HJGL/PreDesign/HJGL_MaterialService.cs
+++ b/SGGL/BLL/HJGL/PreDesign/HJGL_MaterialService.cs
@@ -132,11 +132,11 @@ namespace BLL
lib.MaterialMade,
-sum( pipe.Number) AS num
FROM dbo.HJGL_PipeLineMat pipe
- LEFT JOIN HJGL_Pipeline_ComponentJoint comjoint
- ON comjoint.PipelineComponentCode =pipe.PrefabricatedComponents
+ LEFT JOIN HJGL_Pipeline_Component com
+ ON com.PipelineComponentCode =pipe.PrefabricatedComponents
LEFT JOIN HJGL_MaterialCodeLib lib
ON lib.MaterialCode = pipe.MaterialCode
- WHERE comjoint.State=1
+ WHERE com.ProductionState=1
GROUP BY lib.MaterialCode,lib.MaterialName,lib.MaterialUnit, lib.MaterialSpec,lib.MaterialMade
UNION
SELECT lib.MaterialCode,
diff --git a/SGGL/BLL/HJGL/PreDesign/YardPlanningService.cs b/SGGL/BLL/HJGL/PreDesign/YardPlanningService.cs
index f435390c..d5f46421 100644
--- a/SGGL/BLL/HJGL/PreDesign/YardPlanningService.cs
+++ b/SGGL/BLL/HJGL/PreDesign/YardPlanningService.cs
@@ -14,6 +14,11 @@ namespace BLL
{
return Funs.DB.HJGL_YardPlanning.FirstOrDefault(e => e.YardPlanningId == YardPlanningId);
}
+ public static List GetHJGL_YardPlanningBySurperId(string SurperId)
+ {
+ var q= (from x in Funs.DB.HJGL_YardPlanning where x.SurperId== SurperId select x ) .ToList();
+ return q;
+ }
public static Model.HJGL_YardPlanning GetHJGL_YardPlanningByProjectId(string projectId,string unitworkid)
{
@@ -44,7 +49,15 @@ namespace BLL
Funs.DB.SubmitChanges();
}
}
-
+ public static void SavePic(string YardPlanningId, string imgurl)
+ {
+ var model = Funs.DB.HJGL_YardPlanning.FirstOrDefault(e => e.YardPlanningId== YardPlanningId);
+ if (model != null)
+ {
+ model.FlowChartPic = imgurl;
+ UpdateHJGL_YardPlanning(model);
+ }
+ }
public static void AddHJGL_YardPlanning(Model.HJGL_YardPlanning newtable)
{
Model.HJGL_YardPlanning table = new Model.HJGL_YardPlanning();
@@ -53,6 +66,8 @@ namespace BLL
table.Remark = newtable.Remark;
table.FlowChartPic = newtable.FlowChartPic;
table.UnitWorkId = newtable.UnitWorkId;
+ table.YardPlanName=newtable.YardPlanName;
+ table.SurperId = newtable.SurperId;
Funs.DB.HJGL_YardPlanning.InsertOnSubmit(table);
Funs.DB.SubmitChanges();
}
@@ -69,6 +84,8 @@ namespace BLL
table.Remark = newtable.Remark;
table.FlowChartPic = newtable.FlowChartPic;
table.UnitWorkId = newtable.UnitWorkId;
+ table.YardPlanName = newtable.YardPlanName;
+ table.SurperId = newtable.SurperId;
Funs.DB.SubmitChanges();
}
@@ -83,6 +100,31 @@ namespace BLL
}
}
+ public static void DeleteHJGL_YardPlanningBySurperId(string SurperId)
+ {
+ var q= GetHJGL_YardPlanningBySurperId(SurperId);
+ if (q.Count >0)
+ {
+ Funs.DB.HJGL_YardPlanning.DeleteAllOnSubmit(q);
+ Funs.DB.SubmitChanges();
+ }
+ }
+ public static void DleteAllById(string YardPlanningId)
+ {
+ var q = GetHJGL_YardPlanningById(YardPlanningId);
+ var id = q.YardPlanningId;
+ DeleteHJGL_YardPlanningById(YardPlanningId);
+ var chirdList = GetHJGL_YardPlanningBySurperId(id);
+ if (chirdList.Count>0)
+ {
+ foreach (var item in chirdList)
+ {
+ DleteAllById(item.YardPlanningId);
+ }
+ }
+
+
+ }
}
}
\ No newline at end of file
diff --git a/SGGL/BLL/HJGL/WeldingManage/HJGL_WeldingReportService.cs b/SGGL/BLL/HJGL/WeldingManage/HJGL_WeldingReportService.cs
index 8a5b030f..755c8bab 100644
--- a/SGGL/BLL/HJGL/WeldingManage/HJGL_WeldingReportService.cs
+++ b/SGGL/BLL/HJGL/WeldingManage/HJGL_WeldingReportService.cs
@@ -209,5 +209,6 @@ namespace BLL
return decimal.Truncate(result);
}
+
}
}
diff --git a/SGGL/BLL/HJGL/WeldingManage/WeldTaskService.cs b/SGGL/BLL/HJGL/WeldingManage/WeldTaskService.cs
index 90278433..a747818e 100644
--- a/SGGL/BLL/HJGL/WeldingManage/WeldTaskService.cs
+++ b/SGGL/BLL/HJGL/WeldingManage/WeldTaskService.cs
@@ -290,5 +290,7 @@ namespace BLL
db.SubmitChanges();
}
}
+
+
}
}
diff --git a/SGGL/BLL/HJGL/WeldingManage/WeldingDailyService.cs b/SGGL/BLL/HJGL/WeldingManage/WeldingDailyService.cs
index 887173d6..86ea8e24 100644
--- a/SGGL/BLL/HJGL/WeldingManage/WeldingDailyService.cs
+++ b/SGGL/BLL/HJGL/WeldingManage/WeldingDailyService.cs
@@ -310,6 +310,15 @@ namespace BLL
return list;
}
+ public static List GetPipelineDailyListByUnitWorkId(string UnitWorkId)
+ {
+ var list = (from x in Funs.DB.HJGL_WeldingDaily
+ where x.UnitWorkId == UnitWorkId
+ orderby x.WeldingDailyCode
+ select x).ToList();
+
+ return list;
+ }
public static Dictionary GetFileOutValueById(string WeldingDailyId)
{
var value = new Dictionary();
@@ -375,7 +384,7 @@ namespace BLL
/// 下拉框名称
/// 是否显示请选择
/// 耗材类型
- public static void InitWeldingDailyDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease, string unitId)
+ public static void InitDropDownListByUnitId(FineUIPro.DropDownList dropName, bool isShowPlease, string unitId)
{
dropName.DataValueField = "WeldingDailyId";
dropName.DataTextField = "WeldingDailyCode";
@@ -386,6 +395,17 @@ namespace BLL
Funs.FineUIPleaseSelect(dropName);
}
}
+ public static void InitDownListByUnitWortId(FineUIPro.DropDownList dropName, bool isShowPlease, string UnitWortId)
+ {
+ dropName.DataValueField = "WeldingDailyId";
+ dropName.DataTextField = "WeldingDailyCode";
+ dropName.DataSource = GetPipelineDailyListByUnitWorkId(UnitWortId);
+ dropName.DataBind();
+ if (isShowPlease)
+ {
+ Funs.FineUIPleaseSelect(dropName);
+ }
+ }
#endregion
}
}
diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
index 08a75dbb..091c8ffe 100644
--- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
+++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
@@ -558,6 +558,7 @@
+
@@ -7936,6 +7937,13 @@
PrePipelineEdit.aspx
+
+ YardPlanningEdit.aspx
+ ASPXCodeBehind
+
+
+ YardPlanningEdit.aspx
+
PC_ItemEndCheck.aspx
ASPXCodeBehind
diff --git a/SGGL/FineUIPro.Web/HJGL/InfoQuery/JointQuery.aspx b/SGGL/FineUIPro.Web/HJGL/InfoQuery/JointQuery.aspx
index 28398273..f30af990 100644
--- a/SGGL/FineUIPro.Web/HJGL/InfoQuery/JointQuery.aspx
+++ b/SGGL/FineUIPro.Web/HJGL/InfoQuery/JointQuery.aspx
@@ -188,16 +188,16 @@
-
-
-
View_HJGL_WeldJoint = new List();
+
protected void Page_Load(object sender, EventArgs e)
{
ctlAuditFlow.Url = BLL.Project_SysSetService.GetAvevaNetUrl(this.CurrUser.LoginProjectId);
@@ -293,9 +295,10 @@ namespace FineUIPro.Web.HJGL.InfoQuery
else if (this.tvControlItem.SelectedNode.CommandName == "管线")
{
}
- model.PipelineId= this.tvControlItem.SelectedNodeID;
+ model.PipelineId= this.tvControlItem.SelectedNodeID;
model.WeldJointCode = this.txtWeldJointCode.Text;
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();
@@ -473,28 +476,68 @@ namespace FineUIPro.Web.HJGL.InfoQuery
///
protected void btnOut_Click(object sender, EventArgs e)
{
- //Model.View_HJGL_WeldJoint model = new Model.View_HJGL_WeldJoint();
- //model.ProjectId = this.CurrUser.LoginProjectId;
- //if (this.tvControlItem.SelectedNode.CommandName.Split('|').Count() == 2)
- //{
- // model.UnitWorkId = this.tvControlItem.SelectedNodeID;
+ if (this.tvControlItem.SelectedNode.CommandName.Split('|').Count() == 2)
+ {
+ Model.View_HJGL_WeldJoint model = new Model.View_HJGL_WeldJoint();
+ model.ProjectId = this.CurrUser.LoginProjectId;
+ model.UnitWorkId = this.tvControlItem.SelectedNodeID;
+ 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
+ select new
+ {
+ 焊口号 = x.WeldJointCode,
+ 单位名称 = x.UnitName,
+ 材质1 = x.Material1Code,
+ 材质2 = x.Material2Code,
+ 达因 = x.Size,
+ 外径 = x.Dia,
+ 壁厚 = x.Thickness,
+ 规格 = x.Specification,
+ 焊缝类型 = x.WeldTypeCode,
+ 焊接方法 = x.WeldingMethodCode,
+ WPS编号 = x.WPQCode,
+ 坡口类型 = x.GrooveTypeCode,
+ 焊条 = x.WeldingRod,
+ 焊丝 = x.WeldingWire,
+ 预热温度 = x.PreTemperature,
+ 焊口属性 = x.JointAttribute,
+ 焊接日期 = x.WeldingDate,
+ 打底焊工号 = x.BackingWelderCode,
+ 盖面焊工号 = x.WelderCode,
+ 热处理报告编号 = x.HotProessReportNo,
+ 热处理检测结果 = x.HotProessResult,
+ 硬度报告编号 = x.HardReportNo,
+ 硬度检测结果 = x.HardResult,
+ 委托单编号 = x.TrustBatchCode,
+ 检测单编号 = x.NDECode,
- //}
- //else if (this.tvControlItem.SelectedNode.CommandName == "管线")
- //{
- // model.PipelineId = this.tvControlItem.SelectedNodeID;
- //}
- //model.WeldJointCode = this.txtWeldJointCode.Text;
- //var list = BLL.WeldJointService.GetViewWeldJointsBymodel(model);
+ }).ToList();
+ MiniExcel.SaveAs(path, q);
+ string fileName = "焊口信息总览.xlsx";
+ FileInfo info = new FileInfo(path);
+ long fileSize = info.Length;
+ System.Web.HttpContext.Current.Response.Clear();
+ System.Web.HttpContext.Current.Response.ContentType = "application/x-zip-compressed";
+ System.Web.HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));
+ System.Web.HttpContext.Current.Response.AddHeader("Content-Length", fileSize.ToString());
+ System.Web.HttpContext.Current.Response.TransmitFile(path, 0, fileSize);
+ System.Web.HttpContext.Current.Response.Flush();
+ System.Web.HttpContext.Current.Response.Close();
+ File.Delete(path);
- 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();
+ //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();
}
protected void btnOutNOComPipeline_Click(object sender, EventArgs e)
{
diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/PrePipeline.aspx b/SGGL/FineUIPro.Web/HJGL/PreDesign/PrePipeline.aspx
index 920651ef..fe74e0aa 100644
--- a/SGGL/FineUIPro.Web/HJGL/PreDesign/PrePipeline.aspx
+++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/PrePipeline.aspx
@@ -19,18 +19,25 @@
-
+
+
+
+
+
+
+
+
@@ -51,43 +58,45 @@
-
+
+
-
+
-
-
+
-
+
-
+
-
-
+
-
- <%--
@@ -142,7 +151,7 @@
-
+
@@ -180,7 +189,7 @@
");
+
+ }
+ }
+ }
+ else if (e.CommandName == "cmd_print")
+ {
+ string Id = this.Grid1.SelectedRowID;
+ Print(tvControlItem.SelectedNodeID, Id);
+ }
+
+ }
+ protected void btnSearch_Click(object sender, EventArgs e)
+ {
+ BindGrid();
+ }
+
#endregion
#region 关闭弹出窗口及刷新页面
@@ -474,17 +532,10 @@ namespace FineUIPro.Web.HJGL.PreDesign
{
this.BindGrid();
}
-
- ///
- /// 查询
- ///
- ///
- ///
- protected void Tree_TextChanged(object sender, EventArgs e)
+ protected void btnTreeFind_Click1(object sender, EventArgs e)
{
this.InitTreeMenu();
- tvControlItem.CollapseAllNodes(tvControlItem.Nodes[1].Nodes);
- this.BindGrid();
+
}
#endregion
@@ -493,10 +544,6 @@ namespace FineUIPro.Web.HJGL.PreDesign
///
///
///
- protected void btnSearch_Click(object sender, EventArgs e)
- {
- BindGrid();
- }
public string ConvertImageUrlByImage(object str, object id)
{
string path = string.Empty;
@@ -572,31 +619,6 @@ namespace FineUIPro.Web.HJGL.PreDesign
}
- protected void Grid1_RowCommand(object sender, GridCommandEventArgs e)
- {
- if (e.CommandName == "PreviewQRCode")
- {
- var ID = e.RowID;
- var q = HJGL_PipelineComponentService.GetPipelineComponentById(ID);
- string path = "";
- if (!string.IsNullOrEmpty(q.QRCode))
- {
- path = BLL.CreateQRCodeService.CreateCode_Simple(q.QRCode, ID);
- if (!string.IsNullOrEmpty(path))
- {
- string filepath = Funs.SGGLUrl + path.Replace("\\", "//");
-
- ClientScript.RegisterStartupScript(ClientScript.GetType(), "myscript", "");
-
- }
- }
- }
- else if (e.CommandName == "cmd_print")
- {
- string Id = this.Grid1.SelectedRowID;
- Print(tvControlItem.SelectedNodeID, Id);
- }
-
- }
+
}
}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/PrePipeline.aspx.designer.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/PrePipeline.aspx.designer.cs
index 70cff530..e5857b61 100644
--- a/SGGL/FineUIPro.Web/HJGL/PreDesign/PrePipeline.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/PrePipeline.aspx.designer.cs
@@ -77,6 +77,15 @@ namespace FineUIPro.Web.HJGL.PreDesign
///
protected global::FineUIPro.HiddenField hdUnitWorkId;
+ ///
+ /// btnTreeFind 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnTreeFind;
+
///
/// tvControlItem 控件。
///
@@ -131,6 +140,15 @@ namespace FineUIPro.Web.HJGL.PreDesign
///
protected global::FineUIPro.DropDownList drpProductionState;
+ ///
+ /// drpWeldingDailyCode 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpWeldingDailyCode;
+
///
/// ToolbarFill1 控件。
///
diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/YardPlanning.aspx b/SGGL/FineUIPro.Web/HJGL/PreDesign/YardPlanning.aspx
index bf422a5e..eda95f12 100644
--- a/SGGL/FineUIPro.Web/HJGL/PreDesign/YardPlanning.aspx
+++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/YardPlanning.aspx
@@ -11,14 +11,18 @@
-
+
+
+
+
@@ -37,7 +41,7 @@
-
+
@@ -60,72 +64,43 @@
Target="Parent" EnableResize="true" runat="server" IsModal="true" Width="700px"
Height="500px">
+
+
+
+
+
-
-
-