提交代码
This commit is contained in:
parent
206d2c5c43
commit
560f6d8b7b
|
|
@ -135,9 +135,11 @@ namespace BLL
|
|||
|
||||
public static void AddBulkWeldJoint(List<Model.HJGL_WeldJoint> weldJoints)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
db.HJGL_WeldJoint.InsertAllOnSubmit(weldJoints);
|
||||
db.SubmitChanges();
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
db.HJGL_WeldJoint.InsertAllOnSubmit(weldJoints);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -114,6 +114,9 @@
|
|||
<f:RenderField HeaderText="单位名称" ColumnID="UnitName" DataField="UnitName"
|
||||
SortField="UnitName" FieldType="String" HeaderTextAlign="Center" Width="180px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="流水段" ColumnID="FlowingSection" DataField="FlowingSection"
|
||||
SortField="FlowingSection" FieldType="String" HeaderTextAlign="Center" Width="100px">
|
||||
</f:RenderField>
|
||||
<%--<f:RenderField HeaderText="单位工程" ColumnID="UnitWorkCode" DataField="UnitWorkCode"
|
||||
SortField="UnitWorkCode" FieldType="String" HeaderTextAlign="Center" Width="100px">
|
||||
</f:RenderField>--%>
|
||||
|
|
@ -161,11 +164,11 @@
|
|||
<f:RenderField HeaderText="坡口类型" ColumnID="GrooveTypeCode" DataField="GrooveTypeCode"
|
||||
SortField="GrooveTypeCode" FieldType="String" HeaderTextAlign="Center" Width="90px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="焊条" ColumnID="WeldingRod" DataField="WeldingRod"
|
||||
SortField="WeldingRod" FieldType="String" HeaderTextAlign="Center" Width="90px">
|
||||
<f:RenderField HeaderText="焊条" ColumnID="WeldingRodCode" DataField="WeldingRodCode"
|
||||
SortField="WeldingRodCode" FieldType="String" HeaderTextAlign="Center" Width="90px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="焊丝" ColumnID="WeldingWire" DataField="WeldingWire"
|
||||
SortField="WeldingWire" FieldType="String" HeaderTextAlign="Center" Width="90px">
|
||||
<f:RenderField HeaderText="焊丝" ColumnID="WeldingWireCode" DataField="WeldingWireCode"
|
||||
SortField="WeldingWireCode" FieldType="String" HeaderTextAlign="Center" Width="90px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="预热温度" ColumnID="PreTemperature"
|
||||
DataField="PreTemperature" SortField="PreTemperature" FieldType="String"
|
||||
|
|
|
|||
|
|
@ -94,8 +94,8 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
|||
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
|
||||
this.InitTreeMenu();//加载树
|
||||
this.JointComplete = 0;
|
||||
this.JointNoComplete =0;
|
||||
this.JointPre =0;
|
||||
this.JointNoComplete = 0;
|
||||
this.JointPre = 0;
|
||||
this.JointNoPre = 0;
|
||||
|
||||
}
|
||||
|
|
@ -146,8 +146,8 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
|||
//}
|
||||
//else
|
||||
//{
|
||||
unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList();
|
||||
unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList();
|
||||
unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList();
|
||||
unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList();
|
||||
//}
|
||||
if (unitWork1.Count() > 0)
|
||||
{
|
||||
|
|
@ -182,7 +182,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
|||
foreach (var q in unitWork2)
|
||||
{
|
||||
int a = (from x in Funs.DB.HJGL_Pipeline
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId
|
||||
&& x.PipelineCode.Contains(this.tvPipeCode.Text.Trim())
|
||||
|
||||
select x).Count();
|
||||
|
|
@ -233,7 +233,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
|||
this.BindGrid();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
protected void tvControlItem_TreeNodeExpanded(object sender, TreeNodeEventArgs e)
|
||||
|
|
@ -276,7 +276,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
|||
newNode.CommandName = "加载";
|
||||
newNode.Icon = Icon.ArrowDown;
|
||||
newNode.EnableClickEvent = true;
|
||||
node.Nodes.Add(newNode);
|
||||
node.Nodes.Add(newNode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -285,9 +285,9 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
|||
|
||||
private void BindGrid()
|
||||
{
|
||||
Model.View_HJGL_WeldJoint model =new Model.View_HJGL_WeldJoint();
|
||||
Model.View_HJGL_WeldJoint model = new Model.View_HJGL_WeldJoint();
|
||||
model.ProjectId = this.CurrUser.LoginProjectId;
|
||||
if (this.tvControlItem.SelectedNode.CommandName.Split('|').Count() == 2 )
|
||||
if (this.tvControlItem.SelectedNode.CommandName.Split('|').Count() == 2)
|
||||
{
|
||||
model.UnitWorkId = this.tvControlItem.SelectedNodeID;
|
||||
|
||||
|
|
@ -298,12 +298,12 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
|||
|
||||
}
|
||||
model.WeldJointCode = this.txtWeldJointCode.Text;
|
||||
var list= BLL.WeldJointService.GetViewWeldJointsBymodel(model);
|
||||
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();
|
||||
Grid1.DataSource = table;
|
||||
// var table = this.GetPagedDataTable(Grid1, list);
|
||||
var table = list.Skip(Grid1.PageSize * (Grid1.PageIndex)).Take(Grid1.PageSize).ToList();
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
|
||||
}
|
||||
|
|
@ -464,7 +464,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
|||
}
|
||||
protected void btnGetChart_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("JointQueryChart.aspx?JointComplete={0}&&JointNoComplete={1}&&JointPre={2}&&JointNoPre={3}", JointComplete, JointNoComplete, JointPre, JointNoPre, "编辑 - ")));
|
||||
|
||||
}
|
||||
|
|
@ -485,7 +485,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
|||
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
|
||||
|
|
@ -493,6 +493,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
|||
{
|
||||
焊口号 = x.WeldJointCode,
|
||||
单位名称 = x.UnitName,
|
||||
流水段 = x.FlowingSection,
|
||||
材质1 = x.Material1Code,
|
||||
材质2 = x.Material2Code,
|
||||
达因 = x.Size,
|
||||
|
|
@ -503,8 +504,8 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
|||
焊接方法 = x.WeldingMethodCode,
|
||||
WPS编号 = x.WPQCode,
|
||||
坡口类型 = x.GrooveTypeCode,
|
||||
焊条 = x.WeldingRod,
|
||||
焊丝 = x.WeldingWire,
|
||||
焊条 = x.WeldingRodCode,
|
||||
焊丝 = x.WeldingWireCode,
|
||||
预热温度 = x.PreTemperature,
|
||||
焊口属性 = x.JointAttribute,
|
||||
焊接日期 = x.WeldingDate,
|
||||
|
|
@ -544,33 +545,38 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
|||
{
|
||||
if (this.tvControlItem.SelectedNode.CommandName.Split('|').Count() == 2)
|
||||
{
|
||||
var q = (from x in Funs.DB.View_HJGL_WeldJoint where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == this.tvControlItem.SelectedNodeID
|
||||
select new {
|
||||
PipelineId=x.PipelineId,
|
||||
WeldingDate=x.WeldingDate,
|
||||
WeldJointCode=x.WeldJointCode,
|
||||
PipelineCode=x.PipelineCode,
|
||||
Size=x.Size,
|
||||
var q = (from x in Funs.DB.View_HJGL_WeldJoint
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == this.tvControlItem.SelectedNodeID
|
||||
select new
|
||||
{
|
||||
PipelineId = x.PipelineId,
|
||||
WeldingDate = x.WeldingDate,
|
||||
WeldJointCode = x.WeldJointCode,
|
||||
PipelineCode = x.PipelineCode,
|
||||
Size = x.Size,
|
||||
});
|
||||
var noCompipeline = from x in q
|
||||
group x by x.PipelineId into g
|
||||
select new
|
||||
{
|
||||
PipelineId = g.Key,
|
||||
Count = (from x2 in g where x2.WeldingDate!=null && x2.WeldingDate!="" select x2).Count(),
|
||||
};
|
||||
var Noweldjoint =( from x in q
|
||||
join y in noCompipeline on x.PipelineId equals y.PipelineId
|
||||
where y.Count == 0
|
||||
select new { 焊口号=x.WeldJointCode ,
|
||||
管线号=x.PipelineCode,
|
||||
达因=x.Size}).ToList();
|
||||
group x by x.PipelineId into g
|
||||
select new
|
||||
{
|
||||
PipelineId = g.Key,
|
||||
Count = (from x2 in g where x2.WeldingDate != null && x2.WeldingDate != "" select x2).Count(),
|
||||
};
|
||||
var Noweldjoint = (from x in q
|
||||
join y in noCompipeline on x.PipelineId equals y.PipelineId
|
||||
where y.Count == 0
|
||||
select new
|
||||
{
|
||||
焊口号 = x.WeldJointCode,
|
||||
管线号 = x.PipelineCode,
|
||||
达因 = x.Size
|
||||
}).ToList();
|
||||
|
||||
string path = Funs.RootPath + @"File\Excel\Temp\NoCompleteWeldjoint.xlsx";
|
||||
path = path.Replace(".xlsx", string.Format("{0:yyyy-MM-dd-HH-mm}", DateTime.Now) + ".xlsx");
|
||||
|
||||
MiniExcel.SaveAs(path, Noweldjoint);
|
||||
|
||||
|
||||
string fileName = "未完成管线焊口.xlsx";
|
||||
FileInfo info = new FileInfo(path);
|
||||
long fileSize = info.Length;
|
||||
|
|
@ -587,7 +593,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
|||
{
|
||||
Alert.Show("请选择主项");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 导出方法
|
||||
|
|
@ -648,7 +654,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
|||
parameter3D.ColorModel = colorModel;
|
||||
parameter3D.TagNum = string.Join(",", weldjointcodes);
|
||||
parameter3D.ButtonType = "2.1";
|
||||
parameter3D.Crater_data = "1";
|
||||
parameter3D.Crater_data = "1";
|
||||
if (this.tvControlItem.SelectedNode.CommandName.Split('|').Count() == 2)
|
||||
{
|
||||
parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(tvControlItem.SelectedNodeID);
|
||||
|
|
@ -668,11 +674,11 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
|||
parameter3D.Transparency = colorModel.PipelineComplete;
|
||||
parameter3D.Finished_color = colorModel.JointCompleteColor;
|
||||
parameter3D.Incomplete_color = colorModel.JointNOCompleteColor;
|
||||
ctlAuditFlow.Url_item = BLL.Project_SysSetService.GetAvevaNetUrl_Item(this.CurrUser.LoginProjectId) + parameter3D.ModelName;
|
||||
ctlAuditFlow.Url_item = BLL.Project_SysSetService.GetAvevaNetUrl_Item(this.CurrUser.LoginProjectId) + parameter3D.ModelName;
|
||||
ctlAuditFlow.data = parameter3D;
|
||||
ctlAuditFlow.BindData();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -215,26 +215,26 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||
}
|
||||
if (pds.Count > 0 && pds != null)
|
||||
{
|
||||
|
||||
var getPipeline = from x in Funs.DB.View_HJGL_WeldJoint where x.ProjectId == this.CurrUser.LoginProjectId select x;
|
||||
var getMedium = from x in Funs.DB.Base_Medium where x.ProjectId == this.CurrUser.LoginProjectId select x;//介质
|
||||
var getPipeLineClass = from x in Funs.DB.Base_PipingClass where x.ProjectId == this.CurrUser.LoginProjectId select x;//管道等级
|
||||
var getDetectionRate = from x in Funs.DB.Base_DetectionRate select x;//探伤比例
|
||||
var getDetectionType = from x in Funs.DB.Base_DetectionType select x;//探伤类型
|
||||
var getPressurePipingClass = from x in Funs.DB.Base_PressurePipingClass select x;//压力管道级别
|
||||
var getTestMedium = from x in Funs.DB.Base_TestMedium where x.TestType == "1" select x;//压力试验介质
|
||||
var getLeakMedium = from x in Funs.DB.Base_TestMedium where x.TestType == "2" select x;//泄露性试验介质
|
||||
var getPurgeMethod = from x in Funs.DB.Base_PurgeMethod select x;
|
||||
var getMaterial = from x in Funs.DB.Base_Material select x;
|
||||
var getWeldType = from x in Funs.DB.Base_WeldType select x;
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
var getPipeline = from x in db.View_HJGL_WeldJoint where x.ProjectId == this.CurrUser.LoginProjectId select x;
|
||||
var getMedium = from x in db.Base_Medium where x.ProjectId == this.CurrUser.LoginProjectId select x;//介质
|
||||
var getPipeLineClass = from x in db.Base_PipingClass where x.ProjectId == this.CurrUser.LoginProjectId select x;//管道等级
|
||||
var getDetectionRate = from x in db.Base_DetectionRate select x;//探伤比例
|
||||
var getDetectionType = from x in db.Base_DetectionType select x;//探伤类型
|
||||
var getPressurePipingClass = from x in db.Base_PressurePipingClass select x;//压力管道级别
|
||||
var getTestMedium = from x in db.Base_TestMedium where x.TestType == "1" select x;//压力试验介质
|
||||
var getLeakMedium = from x in db.Base_TestMedium where x.TestType == "2" select x;//泄露性试验介质
|
||||
var getPurgeMethod = from x in db.Base_PurgeMethod select x;
|
||||
var getMaterial = from x in db.Base_Material select x;
|
||||
var getWeldType = from x in db.Base_WeldType select x;
|
||||
//var getComponents = from x in Funs.DB.Base_Components where x.ProjeceId == this.CurrUser.LoginProjectId select x;
|
||||
|
||||
|
||||
Model.WBS_UnitWork unitWork = BLL.UnitWorkService.GetUnitWorkByUnitWorkId(Request.Params["UnitWorkId"]);
|
||||
for (int i = 1; i < pds.Count; i++)
|
||||
{
|
||||
Model.View_HJGL_WeldJoint pipeline = new Model.View_HJGL_WeldJoint();
|
||||
//pipeline.PipelineId = SQLHelper.GetNewID();
|
||||
Model.WBS_UnitWork unitWork = BLL.UnitWorkService.GetUnitWorkByUnitWorkId(Request.Params["UnitWorkId"]);
|
||||
|
||||
if (unitWork != null)
|
||||
{
|
||||
pipeline.UnitWorkId = Request.Params["UnitWorkId"];
|
||||
|
|
@ -662,7 +662,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||
{
|
||||
if (col6.Contains("RT"))
|
||||
{
|
||||
Model.Base_DetectionType rt = BLL.Base_DetectionTypeService.GetDetectionTypeIdByDetectionTypeCode("RT");
|
||||
Model.Base_DetectionType rt = getDetectionType.FirstOrDefault(x => x.DetectionTypeCode == "RT");
|
||||
if (rt != null)
|
||||
{
|
||||
pipeline.DetectionTypeId = rt.DetectionTypeId;
|
||||
|
|
@ -670,7 +670,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||
}
|
||||
else
|
||||
{
|
||||
Model.Base_DetectionType ut = BLL.Base_DetectionTypeService.GetDetectionTypeIdByDetectionTypeCode("UT");
|
||||
Model.Base_DetectionType ut = getDetectionType.FirstOrDefault(x => x.DetectionTypeCode == "UT");
|
||||
if (ut != null)
|
||||
{
|
||||
pipeline.DetectionTypeId = ut.DetectionTypeId;
|
||||
|
|
@ -681,7 +681,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||
{
|
||||
if (col6.Contains("MT"))
|
||||
{
|
||||
Model.Base_DetectionType mt = BLL.Base_DetectionTypeService.GetDetectionTypeIdByDetectionTypeCode("MT");
|
||||
Model.Base_DetectionType mt = getDetectionType.FirstOrDefault(x => x.DetectionTypeCode == "MT");
|
||||
if (mt != null)
|
||||
{
|
||||
pipeline.DetectionTypeId = mt.DetectionTypeId;
|
||||
|
|
@ -689,7 +689,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||
}
|
||||
else
|
||||
{
|
||||
Model.Base_DetectionType pt = BLL.Base_DetectionTypeService.GetDetectionTypeIdByDetectionTypeCode("PT");
|
||||
Model.Base_DetectionType pt = getDetectionType.FirstOrDefault(x => x.DetectionTypeCode == "PT");
|
||||
if (pt != null)
|
||||
{
|
||||
pipeline.DetectionTypeId = pt.DetectionTypeId;
|
||||
|
|
@ -1017,7 +1017,12 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||
}
|
||||
void addHJGL_WeldJoints(List<Model.View_HJGL_WeldJoint> PipelineList, string UnitWorkId)
|
||||
{
|
||||
var getpipelines = from y in Funs.DB.HJGL_Pipeline where y.UnitWorkId == UnitWorkId select y;
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
var getpipelines = from y in db.HJGL_Pipeline where y.UnitWorkId == UnitWorkId select y;
|
||||
var allWeldJoints = from x in db.HJGL_WeldJoint
|
||||
join y in db.HJGL_Pipeline on x.PipelineId equals y.PipelineId
|
||||
where y.UnitWorkId == UnitWorkId
|
||||
select x;
|
||||
List<Model.HJGL_WeldJoint> weldJoints_add = new List<Model.HJGL_WeldJoint>();
|
||||
|
||||
var weldJoints = (from x in PipelineList
|
||||
|
|
@ -1055,7 +1060,6 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||
temp.IsHotProess
|
||||
}).ToList();
|
||||
|
||||
var weldJointCodes =weldJoints.Select(x=>x.WeldJointCode).Distinct().ToList();
|
||||
var pipelineCodes = weldJoints.Select(x => x.PipelineCode).Distinct().ToList();
|
||||
for (int i = 0; i < weldJoints.Count(); i++)
|
||||
{
|
||||
|
|
@ -1076,7 +1080,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||
weldJoint.ProjectId = weldJoints[i].ProjectId;
|
||||
weldJoint.IsHotProess = weldJoints[i].IsHotProess;
|
||||
|
||||
var isExistJot = WeldJointService.GetWeldJointsByWeldJointCode(weldJoint.PipelineId, weldJoint.WeldJointCode);
|
||||
var isExistJot = allWeldJoints.FirstOrDefault(x => x.PipelineId == weldJoint.PipelineId && x.WeldJointCode == weldJoint.WeldJointCode);
|
||||
if (isExistJot != null) // 更新焊口
|
||||
{
|
||||
weldJoint.WeldJointId = isExistJot.WeldJointId;
|
||||
|
|
@ -1086,24 +1090,29 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||
{
|
||||
weldJoint.WeldJointId = SQLHelper.GetNewID();
|
||||
weldJoints_add.Add(weldJoint);
|
||||
//BLL.WeldJointService.AddWeldJoint(weldJoint);
|
||||
}
|
||||
|
||||
}
|
||||
//db.SubmitChanges();
|
||||
if (weldJoints_add.Count > 0)
|
||||
{
|
||||
BLL.WeldJointService.AddBulkWeldJoint(weldJoints_add);
|
||||
|
||||
}
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
var q = from x in db.HJGL_WeldJoint
|
||||
join y in db.HJGL_Pipeline on x.PipelineId equals y.PipelineId
|
||||
where y.UnitWorkId == Request.Params["UnitWorkId"] && pipelineCodes.Contains(x.PipelineCode) && !weldJointCodes.Contains(x.WeldJointCode)
|
||||
select x;
|
||||
if (q.Count() > 0)
|
||||
Model.SGGLDB db2 = Funs.DB;
|
||||
List<Model.HJGL_WeldJoint> delJoints = new List<Model.HJGL_WeldJoint>();
|
||||
var allWeldJoints2 = from x in db2.HJGL_WeldJoint
|
||||
join y in db2.HJGL_Pipeline on x.PipelineId equals y.PipelineId
|
||||
where y.UnitWorkId == Request.Params["UnitWorkId"]
|
||||
select x;
|
||||
foreach (var pipelineCode in pipelineCodes)
|
||||
{
|
||||
db.HJGL_WeldJoint.DeleteAllOnSubmit(q);
|
||||
db.SubmitChanges();
|
||||
var pipelineWeldJointCodes = weldJoints.Where(x => x.PipelineCode == pipelineCode).Select(x => x.WeldJointCode).ToList();
|
||||
var q = allWeldJoints2.Where(x => x.PipelineCode == pipelineCode && !pipelineWeldJointCodes.Contains(x.WeldJointCode)).ToList();
|
||||
delJoints.AddRange(q);
|
||||
}
|
||||
if (delJoints.Count() > 0)
|
||||
{
|
||||
db2.HJGL_WeldJoint.DeleteAllOnSubmit(delJoints);
|
||||
db2.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1112,7 +1121,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||
// string unitworkId = Request.Params["UnitWorkId"];
|
||||
|
||||
// var getPipeline = from x in Funs.DB.View_HJGL_WeldJoint where x.UnitWorkId== unitworkId select x;
|
||||
// List<Model.HJGL_WeldJoint> weldJoints_add = new List<Model.HJGL_WeldJoint>();
|
||||
// List<Model.HJGL_WeldJoint> weldJoints_add = new List<Model.HJGL_WeldJoint>();
|
||||
|
||||
// for (int i = 0; i < PipelineList.Count(); i++)
|
||||
// {
|
||||
|
|
|
|||
|
|
@ -24,84 +24,127 @@
|
|||
</f:Tree>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
|
||||
<f:Panel ID="Panel2" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||
ShowHeader="false" Layout="Region" BoxConfigAlign="Stretch">
|
||||
<f:Panel runat="server" ID="panel6" RegionPosition="Center" ShowBorder="true" BoxConfigAlign="StretchMax"
|
||||
Layout="Fit" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" Title="进度统计"
|
||||
TitleToolTip="进度统计" AutoScroll="true">
|
||||
<Items>
|
||||
<f:Panel runat="server" ID="panel3" RegionPosition="Top" RegionSplit="true" EnableCollapse="true" ShowBorder="true"
|
||||
Layout="Fit" ShowHeader="true" RegionSplitWidth="20px" BodyPadding="1px" Height="300px" Title="项目进度统计"
|
||||
TitleToolTip="项目进度统计" AutoScroll="true" RegionPercent="30%">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="项目进度统计"
|
||||
EnableCollapse="true" runat="server" BoxFlex="1" DataKeyNames="ProjectId"
|
||||
EnableColumnLines="true" DataIDField="ProjectId"
|
||||
AllowSorting="true" SortField="ProjectId" SortDirection="ASC"
|
||||
PageSize="15">
|
||||
<Columns>
|
||||
<f:RenderField HeaderText="总达因数" ColumnID="TotalDin"
|
||||
DataField="TotalDin" SortField="TotalDin" FieldType="Double" HeaderTextAlign="Center"
|
||||
TextAlign="Center" Width="300px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="已完成达因数" ColumnID="FinishSize"
|
||||
DataField="FinishSize" SortField="FinishSize" FieldType="Double" HeaderTextAlign="Center"
|
||||
TextAlign="Center" Width="300px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="完成进度" ColumnID="Rate"
|
||||
DataField="Rate" SortField="Rate" FieldType="String" HeaderTextAlign="Center"
|
||||
TextAlign="Center" Width="300px">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" RegionSplit="true" EnableCollapse="true" ShowBorder="true"
|
||||
Layout="Fit" ShowHeader="true" RegionSplitWidth="20px" BodyPadding="1px" Height="300px" Title="单位工程进度统计"
|
||||
TitleToolTip="单位工程进度统计" AutoScroll="true" RegionPercent="30%">
|
||||
<Items>
|
||||
<f:Grid ID="Grid2" ShowBorder="true" ShowHeader="false" Title="单位工程进度统计"
|
||||
EnableCollapse="true" runat="server" BoxFlex="1" DataKeyNames="UnitWorkId"
|
||||
EnableColumnLines="true" DataIDField="UnitWorkId"
|
||||
AllowSorting="true" SortField="UnitWorkId" SortDirection="ASC"
|
||||
PageSize="15">
|
||||
<Columns>
|
||||
<f:RenderField HeaderText="总达因数" ColumnID="TotalDin"
|
||||
DataField="TotalDin" SortField="TotalDin" FieldType="Double" HeaderTextAlign="Center"
|
||||
TextAlign="Center" Width="300px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="已完成达因数" ColumnID="FinishSize"
|
||||
DataField="FinishSize" SortField="FinishSize" FieldType="Double" HeaderTextAlign="Center"
|
||||
TextAlign="Center" Width="300px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="完成进度" ColumnID="Rate"
|
||||
DataField="Rate" SortField="Rate" FieldType="String" HeaderTextAlign="Center"
|
||||
TextAlign="Center" Width="300px">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Panel runat="server" ID="panel4" RegionPosition="Bottom" RegionSplit="true" EnableCollapse="true" ShowBorder="true"
|
||||
Layout="Fit" ShowHeader="true" RegionSplitWidth="20px" BodyPadding="1px" Height="200px" Title="单位工程进度预测"
|
||||
TitleToolTip="单位工程进度预测" AutoScroll="true" RegionPercent="30%">
|
||||
<Items>
|
||||
<f:Form ID="Form2" ShowBorder="false" ShowHeader="false" AutoScroll="true"
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right" LabelWidth="110px">
|
||||
<Rows>
|
||||
<f:FormRow ColumnWidths="23% 23% 23% 23% 8%">
|
||||
<f:Form ID="SimpleForm1" ShowBorder="true" ShowHeader="false" AutoScroll="true" BoxFlex="1"
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Panel runat="server" ID="panel3" RegionPosition="Top" RegionSplit="true" EnableCollapse="true" ShowBorder="true"
|
||||
Layout="Fit" ShowHeader="true" RegionSplitWidth="20px" BodyPadding="1px" Height="110px" Title="项目进度统计"
|
||||
TitleToolTip="项目进度统计" >
|
||||
<Items>
|
||||
<f:Label runat="server" ID="lbNotCompleteDin" Label="未完成达因"></f:Label>
|
||||
<f:NumberBox runat="server" ID="txtLeaveDay" Label="剩余工期(天)" LabelWidth="120px" NoNegative="true" NoDecimal="true"></f:NumberBox>
|
||||
<f:NumberBox runat="server" ID="txtWorkEfficiency" Label="日工效" NoNegative="true" NoDecimal="false" ></f:NumberBox>
|
||||
<f:Label runat="server" ID="lbNeedWelderNum" Label="每日所需焊工数" LabelWidth="120px" LabelAlign="Right"></f:Label>
|
||||
<f:Button ID="btnQuery" ToolTip="查询" Icon="SystemSearch" Text="查询"
|
||||
EnablePostBack="true" OnClick="btnQuery_Click" runat="server">
|
||||
</f:Button>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="项目进度统计"
|
||||
EnableCollapse="true" runat="server" BoxFlex="1" DataKeyNames="ProjectId"
|
||||
EnableColumnLines="true" DataIDField="ProjectId" Height="20px"
|
||||
AllowSorting="true" SortField="ProjectId" SortDirection="ASC"
|
||||
PageSize="15">
|
||||
<Columns>
|
||||
<f:RenderField HeaderText="总达因数" ColumnID="TotalDin" ExpandUnusedSpace="true"
|
||||
DataField="TotalDin" SortField="TotalDin" FieldType="Double" HeaderTextAlign="Center"
|
||||
TextAlign="Center" Width="350px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="已完成达因数" ColumnID="FinishSize"
|
||||
DataField="FinishSize" SortField="FinishSize" FieldType="Double" HeaderTextAlign="Center"
|
||||
TextAlign="Center" Width="350px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="完成进度" ColumnID="Rate"
|
||||
DataField="Rate" SortField="Rate" FieldType="String" HeaderTextAlign="Center"
|
||||
TextAlign="Center" Width="350px">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
</f:Form>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
</f:Panel>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Panel runat="server" ID="panel5" RegionPosition="Top" RegionSplit="true" EnableCollapse="true" ShowBorder="true"
|
||||
Layout="Fit" ShowHeader="true" RegionSplitWidth="20px" BodyPadding="1px" Height="110px" Title="项目进度预测"
|
||||
TitleToolTip="项目进度预测" AutoScroll="true">
|
||||
<Items>
|
||||
<f:Form ID="Form3" ShowBorder="false" ShowHeader="false" AutoScroll="true"
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right" LabelWidth="110px">
|
||||
<Rows>
|
||||
<f:FormRow ColumnWidths="23% 23% 23% 23% 8%">
|
||||
<Items>
|
||||
<f:Label runat="server" ID="lbNotCompleteDinTotal" Label="未完成达因"></f:Label>
|
||||
<f:NumberBox runat="server" ID="txtLeaveDayTotal" Label="剩余工期(天)" LabelWidth="120px" NoNegative="true" NoDecimal="true"></f:NumberBox>
|
||||
<f:NumberBox runat="server" ID="txtWorkEfficiencyTotal" Label="日工效" NoNegative="true" NoDecimal="false"></f:NumberBox>
|
||||
<f:Label runat="server" ID="lbNeedWelderNumTotal" Label="每日所需焊工数" LabelWidth="120px" LabelAlign="Right"></f:Label>
|
||||
<f:Button ID="btnQueryTotal" ToolTip="查询" Icon="SystemSearch" Text="查询"
|
||||
EnablePostBack="true" OnClick="btnQueryTotal_Click" runat="server">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
</f:Form>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" RegionSplit="true" EnableCollapse="true" ShowBorder="true"
|
||||
Layout="Fit" ShowHeader="true" RegionSplitWidth="20px" BodyPadding="1px" Height="110px" Title="单位工程进度统计"
|
||||
TitleToolTip="单位工程进度统计" AutoScroll="true">
|
||||
<Items>
|
||||
<f:Grid ID="Grid2" ShowBorder="true" ShowHeader="false" Title="单位工程进度统计"
|
||||
EnableCollapse="true" runat="server" BoxFlex="1" DataKeyNames="UnitWorkId"
|
||||
EnableColumnLines="true" DataIDField="UnitWorkId"
|
||||
AllowSorting="true" SortField="UnitWorkId" SortDirection="ASC"
|
||||
PageSize="15">
|
||||
<Columns>
|
||||
<f:RenderField HeaderText="总达因数" ColumnID="TotalDin" ExpandUnusedSpace="true"
|
||||
DataField="TotalDin" SortField="TotalDin" FieldType="Double" HeaderTextAlign="Center"
|
||||
TextAlign="Center" Width="350px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="已完成达因数" ColumnID="FinishSize"
|
||||
DataField="FinishSize" SortField="FinishSize" FieldType="Double" HeaderTextAlign="Center"
|
||||
TextAlign="Center" Width="350px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="完成进度" ColumnID="Rate"
|
||||
DataField="Rate" SortField="Rate" FieldType="String" HeaderTextAlign="Center"
|
||||
TextAlign="Center" Width="350px">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Panel runat="server" ID="panel4" RegionPosition="Bottom" RegionSplit="true" EnableCollapse="true" ShowBorder="true"
|
||||
Layout="Fit" ShowHeader="true" RegionSplitWidth="20px" BodyPadding="1px" Height="110px" Title="单位工程进度预测"
|
||||
TitleToolTip="单位工程进度预测" AutoScroll="true">
|
||||
<Items>
|
||||
<f:Form ID="Form2" ShowBorder="false" ShowHeader="false" AutoScroll="true"
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right" LabelWidth="110px">
|
||||
<Rows>
|
||||
<f:FormRow ColumnWidths="23% 23% 23% 23% 8%">
|
||||
<Items>
|
||||
<f:Label runat="server" ID="lbNotCompleteDin" Label="未完成达因"></f:Label>
|
||||
<f:NumberBox runat="server" ID="txtLeaveDay" Label="剩余工期(天)" LabelWidth="120px" NoNegative="true" NoDecimal="true"></f:NumberBox>
|
||||
<f:NumberBox runat="server" ID="txtWorkEfficiency" Label="日工效" NoNegative="true" NoDecimal="false"></f:NumberBox>
|
||||
<f:Label runat="server" ID="lbNeedWelderNum" Label="每日所需焊工数" LabelWidth="120px" LabelAlign="Right"></f:Label>
|
||||
<f:Button ID="btnQuery" ToolTip="查询" Icon="SystemSearch" Text="查询"
|
||||
EnablePostBack="true" OnClick="btnQuery_Click" runat="server">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
</f:Form>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
</f:Form>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
</Items>
|
||||
|
|
|
|||
|
|
@ -139,6 +139,10 @@ namespace FineUIPro.Web.common
|
|||
var table = GetPagedDataTable(Grid1, tb);
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
decimal totalDin = Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[0].ToString());
|
||||
decimal finishSize = Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[1].ToString());
|
||||
decimal notCompleteDin = totalDin - finishSize;
|
||||
this.lbNotCompleteDinTotal.Text = notCompleteDin.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -220,5 +224,48 @@ namespace FineUIPro.Web.common
|
|||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnQueryTotal_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.txtLeaveDayTotal.Text.Trim()))
|
||||
{
|
||||
ShowNotify("请输入剩余工期(天)!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (string.IsNullOrEmpty(this.txtWorkEfficiencyTotal.Text.Trim()))
|
||||
{
|
||||
ShowNotify("请输入日工效!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
decimal totalDin = Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[0].ToString());
|
||||
decimal finishSize = Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[1].ToString());
|
||||
decimal notCompleteDin = totalDin - finishSize;
|
||||
decimal leaveDay = Funs.GetNewDecimalOrZero(this.txtLeaveDayTotal.Text.Trim());
|
||||
decimal workEfficiency = Funs.GetNewDecimalOrZero(this.txtWorkEfficiencyTotal.Text.Trim());
|
||||
if (notCompleteDin > 0)
|
||||
{
|
||||
if (leaveDay == 0)
|
||||
{
|
||||
ShowNotify("剩余工期(天)为0!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (workEfficiency == 0)
|
||||
{
|
||||
ShowNotify("日工效为0!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
this.lbNeedWelderNumTotal.Text = Convert.ToInt32(Math.Ceiling(notCompleteDin / leaveDay / workEfficiency)).ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("未完成达因为0!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -58,13 +58,22 @@ namespace FineUIPro.Web.common {
|
|||
protected global::FineUIPro.Tree tvControlItem;
|
||||
|
||||
/// <summary>
|
||||
/// Panel2 控件。
|
||||
/// panel6 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel2;
|
||||
protected global::FineUIPro.Panel panel6;
|
||||
|
||||
/// <summary>
|
||||
/// SimpleForm1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Form SimpleForm1;
|
||||
|
||||
/// <summary>
|
||||
/// panel3 控件。
|
||||
|
|
@ -84,6 +93,69 @@ namespace FineUIPro.Web.common {
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
/// <summary>
|
||||
/// panel5 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel panel5;
|
||||
|
||||
/// <summary>
|
||||
/// Form3 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Form Form3;
|
||||
|
||||
/// <summary>
|
||||
/// lbNotCompleteDinTotal 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label lbNotCompleteDinTotal;
|
||||
|
||||
/// <summary>
|
||||
/// txtLeaveDayTotal 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtLeaveDayTotal;
|
||||
|
||||
/// <summary>
|
||||
/// txtWorkEfficiencyTotal 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtWorkEfficiencyTotal;
|
||||
|
||||
/// <summary>
|
||||
/// lbNeedWelderNumTotal 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label lbNeedWelderNumTotal;
|
||||
|
||||
/// <summary>
|
||||
/// btnQueryTotal 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnQueryTotal;
|
||||
|
||||
/// <summary>
|
||||
/// panelCenterRegion 控件。
|
||||
/// </summary>
|
||||
|
|
|
|||
Loading…
Reference in New Issue