提交代码
This commit is contained in:
@@ -135,10 +135,12 @@ namespace BLL
|
|||||||
|
|
||||||
public static void AddBulkWeldJoint(List<Model.HJGL_WeldJoint> weldJoints)
|
public static void AddBulkWeldJoint(List<Model.HJGL_WeldJoint> weldJoints)
|
||||||
{
|
{
|
||||||
Model.SGGLDB db = Funs.DB;
|
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||||
|
{
|
||||||
db.HJGL_WeldJoint.InsertAllOnSubmit(weldJoints);
|
db.HJGL_WeldJoint.InsertAllOnSubmit(weldJoints);
|
||||||
db.SubmitChanges();
|
db.SubmitChanges();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 修改
|
/// 修改
|
||||||
|
|||||||
@@ -114,6 +114,9 @@
|
|||||||
<f:RenderField HeaderText="单位名称" ColumnID="UnitName" DataField="UnitName"
|
<f:RenderField HeaderText="单位名称" ColumnID="UnitName" DataField="UnitName"
|
||||||
SortField="UnitName" FieldType="String" HeaderTextAlign="Center" Width="180px">
|
SortField="UnitName" FieldType="String" HeaderTextAlign="Center" Width="180px">
|
||||||
</f:RenderField>
|
</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"
|
<%--<f:RenderField HeaderText="单位工程" ColumnID="UnitWorkCode" DataField="UnitWorkCode"
|
||||||
SortField="UnitWorkCode" FieldType="String" HeaderTextAlign="Center" Width="100px">
|
SortField="UnitWorkCode" FieldType="String" HeaderTextAlign="Center" Width="100px">
|
||||||
</f:RenderField>--%>
|
</f:RenderField>--%>
|
||||||
@@ -161,11 +164,11 @@
|
|||||||
<f:RenderField HeaderText="坡口类型" ColumnID="GrooveTypeCode" DataField="GrooveTypeCode"
|
<f:RenderField HeaderText="坡口类型" ColumnID="GrooveTypeCode" DataField="GrooveTypeCode"
|
||||||
SortField="GrooveTypeCode" FieldType="String" HeaderTextAlign="Center" Width="90px">
|
SortField="GrooveTypeCode" FieldType="String" HeaderTextAlign="Center" Width="90px">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
<f:RenderField HeaderText="焊条" ColumnID="WeldingRod" DataField="WeldingRod"
|
<f:RenderField HeaderText="焊条" ColumnID="WeldingRodCode" DataField="WeldingRodCode"
|
||||||
SortField="WeldingRod" FieldType="String" HeaderTextAlign="Center" Width="90px">
|
SortField="WeldingRodCode" FieldType="String" HeaderTextAlign="Center" Width="90px">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
<f:RenderField HeaderText="焊丝" ColumnID="WeldingWire" DataField="WeldingWire"
|
<f:RenderField HeaderText="焊丝" ColumnID="WeldingWireCode" DataField="WeldingWireCode"
|
||||||
SortField="WeldingWire" FieldType="String" HeaderTextAlign="Center" Width="90px">
|
SortField="WeldingWireCode" FieldType="String" HeaderTextAlign="Center" Width="90px">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
<f:RenderField HeaderText="预热温度" ColumnID="PreTemperature"
|
<f:RenderField HeaderText="预热温度" ColumnID="PreTemperature"
|
||||||
DataField="PreTemperature" SortField="PreTemperature" FieldType="String"
|
DataField="PreTemperature" SortField="PreTemperature" FieldType="String"
|
||||||
|
|||||||
@@ -94,8 +94,8 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
|||||||
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
|
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
|
||||||
this.InitTreeMenu();//加载树
|
this.InitTreeMenu();//加载树
|
||||||
this.JointComplete = 0;
|
this.JointComplete = 0;
|
||||||
this.JointNoComplete =0;
|
this.JointNoComplete = 0;
|
||||||
this.JointPre =0;
|
this.JointPre = 0;
|
||||||
this.JointNoPre = 0;
|
this.JointNoPre = 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -285,9 +285,9 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
|||||||
|
|
||||||
private void BindGrid()
|
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;
|
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;
|
model.UnitWorkId = this.tvControlItem.SelectedNodeID;
|
||||||
|
|
||||||
@@ -298,7 +298,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
|||||||
|
|
||||||
}
|
}
|
||||||
model.WeldJointCode = this.txtWeldJointCode.Text;
|
model.WeldJointCode = this.txtWeldJointCode.Text;
|
||||||
var list= BLL.WeldJointService.GetViewWeldJointsBymodel(model);
|
var list = BLL.WeldJointService.GetViewWeldJointsBymodel(model);
|
||||||
View_HJGL_WeldJoint = list;
|
View_HJGL_WeldJoint = list;
|
||||||
Grid1.RecordCount = list.Count;
|
Grid1.RecordCount = list.Count;
|
||||||
// var table = this.GetPagedDataTable(Grid1, list);
|
// var table = this.GetPagedDataTable(Grid1, list);
|
||||||
@@ -493,6 +493,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
|||||||
{
|
{
|
||||||
焊口号 = x.WeldJointCode,
|
焊口号 = x.WeldJointCode,
|
||||||
单位名称 = x.UnitName,
|
单位名称 = x.UnitName,
|
||||||
|
流水段 = x.FlowingSection,
|
||||||
材质1 = x.Material1Code,
|
材质1 = x.Material1Code,
|
||||||
材质2 = x.Material2Code,
|
材质2 = x.Material2Code,
|
||||||
达因 = x.Size,
|
达因 = x.Size,
|
||||||
@@ -503,8 +504,8 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
|||||||
焊接方法 = x.WeldingMethodCode,
|
焊接方法 = x.WeldingMethodCode,
|
||||||
WPS编号 = x.WPQCode,
|
WPS编号 = x.WPQCode,
|
||||||
坡口类型 = x.GrooveTypeCode,
|
坡口类型 = x.GrooveTypeCode,
|
||||||
焊条 = x.WeldingRod,
|
焊条 = x.WeldingRodCode,
|
||||||
焊丝 = x.WeldingWire,
|
焊丝 = x.WeldingWireCode,
|
||||||
预热温度 = x.PreTemperature,
|
预热温度 = x.PreTemperature,
|
||||||
焊口属性 = x.JointAttribute,
|
焊口属性 = x.JointAttribute,
|
||||||
焊接日期 = x.WeldingDate,
|
焊接日期 = x.WeldingDate,
|
||||||
@@ -544,27 +545,32 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
|||||||
{
|
{
|
||||||
if (this.tvControlItem.SelectedNode.CommandName.Split('|').Count() == 2)
|
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
|
var q = (from x in Funs.DB.View_HJGL_WeldJoint
|
||||||
select new {
|
where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == this.tvControlItem.SelectedNodeID
|
||||||
PipelineId=x.PipelineId,
|
select new
|
||||||
WeldingDate=x.WeldingDate,
|
{
|
||||||
WeldJointCode=x.WeldJointCode,
|
PipelineId = x.PipelineId,
|
||||||
PipelineCode=x.PipelineCode,
|
WeldingDate = x.WeldingDate,
|
||||||
Size=x.Size,
|
WeldJointCode = x.WeldJointCode,
|
||||||
|
PipelineCode = x.PipelineCode,
|
||||||
|
Size = x.Size,
|
||||||
});
|
});
|
||||||
var noCompipeline = from x in q
|
var noCompipeline = from x in q
|
||||||
group x by x.PipelineId into g
|
group x by x.PipelineId into g
|
||||||
select new
|
select new
|
||||||
{
|
{
|
||||||
PipelineId = g.Key,
|
PipelineId = g.Key,
|
||||||
Count = (from x2 in g where x2.WeldingDate!=null && x2.WeldingDate!="" select x2).Count(),
|
Count = (from x2 in g where x2.WeldingDate != null && x2.WeldingDate != "" select x2).Count(),
|
||||||
};
|
};
|
||||||
var Noweldjoint =( from x in q
|
var Noweldjoint = (from x in q
|
||||||
join y in noCompipeline on x.PipelineId equals y.PipelineId
|
join y in noCompipeline on x.PipelineId equals y.PipelineId
|
||||||
where y.Count == 0
|
where y.Count == 0
|
||||||
select new { 焊口号=x.WeldJointCode ,
|
select new
|
||||||
管线号=x.PipelineCode,
|
{
|
||||||
达因=x.Size}).ToList();
|
焊口号 = x.WeldJointCode,
|
||||||
|
管线号 = x.PipelineCode,
|
||||||
|
达因 = x.Size
|
||||||
|
}).ToList();
|
||||||
|
|
||||||
string path = Funs.RootPath + @"File\Excel\Temp\NoCompleteWeldjoint.xlsx";
|
string path = Funs.RootPath + @"File\Excel\Temp\NoCompleteWeldjoint.xlsx";
|
||||||
path = path.Replace(".xlsx", string.Format("{0:yyyy-MM-dd-HH-mm}", DateTime.Now) + ".xlsx");
|
path = path.Replace(".xlsx", string.Format("{0:yyyy-MM-dd-HH-mm}", DateTime.Now) + ".xlsx");
|
||||||
|
|||||||
@@ -215,26 +215,26 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
}
|
}
|
||||||
if (pds.Count > 0 && pds != null)
|
if (pds.Count > 0 && pds != null)
|
||||||
{
|
{
|
||||||
|
Model.SGGLDB db = Funs.DB;
|
||||||
var getPipeline = from x in Funs.DB.View_HJGL_WeldJoint where x.ProjectId == this.CurrUser.LoginProjectId select x;
|
var getPipeline = from x in 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 getMedium = from x in 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 getPipeLineClass = from x in db.Base_PipingClass where x.ProjectId == this.CurrUser.LoginProjectId select x;//管道等级
|
||||||
var getDetectionRate = from x in Funs.DB.Base_DetectionRate select x;//探伤比例
|
var getDetectionRate = from x in db.Base_DetectionRate select x;//探伤比例
|
||||||
var getDetectionType = from x in Funs.DB.Base_DetectionType select x;//探伤类型
|
var getDetectionType = from x in db.Base_DetectionType select x;//探伤类型
|
||||||
var getPressurePipingClass = from x in Funs.DB.Base_PressurePipingClass select x;//压力管道级别
|
var getPressurePipingClass = from x in db.Base_PressurePipingClass select x;//压力管道级别
|
||||||
var getTestMedium = from x in Funs.DB.Base_TestMedium where x.TestType == "1" select x;//压力试验介质
|
var getTestMedium = from x in 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 getLeakMedium = from x in db.Base_TestMedium where x.TestType == "2" select x;//泄露性试验介质
|
||||||
var getPurgeMethod = from x in Funs.DB.Base_PurgeMethod select x;
|
var getPurgeMethod = from x in db.Base_PurgeMethod select x;
|
||||||
var getMaterial = from x in Funs.DB.Base_Material select x;
|
var getMaterial = from x in db.Base_Material select x;
|
||||||
var getWeldType = from x in Funs.DB.Base_WeldType 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;
|
//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++)
|
for (int i = 1; i < pds.Count; i++)
|
||||||
{
|
{
|
||||||
Model.View_HJGL_WeldJoint pipeline = new Model.View_HJGL_WeldJoint();
|
Model.View_HJGL_WeldJoint pipeline = new Model.View_HJGL_WeldJoint();
|
||||||
//pipeline.PipelineId = SQLHelper.GetNewID();
|
//pipeline.PipelineId = SQLHelper.GetNewID();
|
||||||
Model.WBS_UnitWork unitWork = BLL.UnitWorkService.GetUnitWorkByUnitWorkId(Request.Params["UnitWorkId"]);
|
|
||||||
if (unitWork != null)
|
if (unitWork != null)
|
||||||
{
|
{
|
||||||
pipeline.UnitWorkId = Request.Params["UnitWorkId"];
|
pipeline.UnitWorkId = Request.Params["UnitWorkId"];
|
||||||
@@ -662,7 +662,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
{
|
{
|
||||||
if (col6.Contains("RT"))
|
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)
|
if (rt != null)
|
||||||
{
|
{
|
||||||
pipeline.DetectionTypeId = rt.DetectionTypeId;
|
pipeline.DetectionTypeId = rt.DetectionTypeId;
|
||||||
@@ -670,7 +670,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Model.Base_DetectionType ut = BLL.Base_DetectionTypeService.GetDetectionTypeIdByDetectionTypeCode("UT");
|
Model.Base_DetectionType ut = getDetectionType.FirstOrDefault(x => x.DetectionTypeCode == "UT");
|
||||||
if (ut != null)
|
if (ut != null)
|
||||||
{
|
{
|
||||||
pipeline.DetectionTypeId = ut.DetectionTypeId;
|
pipeline.DetectionTypeId = ut.DetectionTypeId;
|
||||||
@@ -681,7 +681,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
{
|
{
|
||||||
if (col6.Contains("MT"))
|
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)
|
if (mt != null)
|
||||||
{
|
{
|
||||||
pipeline.DetectionTypeId = mt.DetectionTypeId;
|
pipeline.DetectionTypeId = mt.DetectionTypeId;
|
||||||
@@ -689,7 +689,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Model.Base_DetectionType pt = BLL.Base_DetectionTypeService.GetDetectionTypeIdByDetectionTypeCode("PT");
|
Model.Base_DetectionType pt = getDetectionType.FirstOrDefault(x => x.DetectionTypeCode == "PT");
|
||||||
if (pt != null)
|
if (pt != null)
|
||||||
{
|
{
|
||||||
pipeline.DetectionTypeId = pt.DetectionTypeId;
|
pipeline.DetectionTypeId = pt.DetectionTypeId;
|
||||||
@@ -1017,7 +1017,12 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
}
|
}
|
||||||
void addHJGL_WeldJoints(List<Model.View_HJGL_WeldJoint> PipelineList, string UnitWorkId)
|
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>();
|
List<Model.HJGL_WeldJoint> weldJoints_add = new List<Model.HJGL_WeldJoint>();
|
||||||
|
|
||||||
var weldJoints = (from x in PipelineList
|
var weldJoints = (from x in PipelineList
|
||||||
@@ -1055,7 +1060,6 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
temp.IsHotProess
|
temp.IsHotProess
|
||||||
}).ToList();
|
}).ToList();
|
||||||
|
|
||||||
var weldJointCodes =weldJoints.Select(x=>x.WeldJointCode).Distinct().ToList();
|
|
||||||
var pipelineCodes = weldJoints.Select(x => x.PipelineCode).Distinct().ToList();
|
var pipelineCodes = weldJoints.Select(x => x.PipelineCode).Distinct().ToList();
|
||||||
for (int i = 0; i < weldJoints.Count(); i++)
|
for (int i = 0; i < weldJoints.Count(); i++)
|
||||||
{
|
{
|
||||||
@@ -1076,7 +1080,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
weldJoint.ProjectId = weldJoints[i].ProjectId;
|
weldJoint.ProjectId = weldJoints[i].ProjectId;
|
||||||
weldJoint.IsHotProess = weldJoints[i].IsHotProess;
|
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) // 更新焊口
|
if (isExistJot != null) // 更新焊口
|
||||||
{
|
{
|
||||||
weldJoint.WeldJointId = isExistJot.WeldJointId;
|
weldJoint.WeldJointId = isExistJot.WeldJointId;
|
||||||
@@ -1086,24 +1090,29 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
{
|
{
|
||||||
weldJoint.WeldJointId = SQLHelper.GetNewID();
|
weldJoint.WeldJointId = SQLHelper.GetNewID();
|
||||||
weldJoints_add.Add(weldJoint);
|
weldJoints_add.Add(weldJoint);
|
||||||
//BLL.WeldJointService.AddWeldJoint(weldJoint);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
//db.SubmitChanges();
|
||||||
if (weldJoints_add.Count > 0)
|
if (weldJoints_add.Count > 0)
|
||||||
{
|
{
|
||||||
BLL.WeldJointService.AddBulkWeldJoint(weldJoints_add);
|
BLL.WeldJointService.AddBulkWeldJoint(weldJoints_add);
|
||||||
|
|
||||||
}
|
}
|
||||||
Model.SGGLDB db = Funs.DB;
|
Model.SGGLDB db2 = Funs.DB;
|
||||||
var q = from x in db.HJGL_WeldJoint
|
List<Model.HJGL_WeldJoint> delJoints = new List<Model.HJGL_WeldJoint>();
|
||||||
join y in db.HJGL_Pipeline on x.PipelineId equals y.PipelineId
|
var allWeldJoints2 = from x in db2.HJGL_WeldJoint
|
||||||
where y.UnitWorkId == Request.Params["UnitWorkId"] && pipelineCodes.Contains(x.PipelineCode) && !weldJointCodes.Contains(x.WeldJointCode)
|
join y in db2.HJGL_Pipeline on x.PipelineId equals y.PipelineId
|
||||||
|
where y.UnitWorkId == Request.Params["UnitWorkId"]
|
||||||
select x;
|
select x;
|
||||||
if (q.Count() > 0)
|
foreach (var pipelineCode in pipelineCodes)
|
||||||
{
|
{
|
||||||
db.HJGL_WeldJoint.DeleteAllOnSubmit(q);
|
var pipelineWeldJointCodes = weldJoints.Where(x => x.PipelineCode == pipelineCode).Select(x => x.WeldJointCode).ToList();
|
||||||
db.SubmitChanges();
|
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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -24,39 +24,74 @@
|
|||||||
</f:Tree>
|
</f:Tree>
|
||||||
</Items>
|
</Items>
|
||||||
</f:Panel>
|
</f:Panel>
|
||||||
|
<f:Panel runat="server" ID="panel6" RegionPosition="Center" ShowBorder="true" BoxConfigAlign="StretchMax"
|
||||||
<f:Panel ID="Panel2" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
Layout="Fit" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" Title="进度统计"
|
||||||
ShowHeader="false" Layout="Region" BoxConfigAlign="Stretch">
|
TitleToolTip="进度统计" AutoScroll="true">
|
||||||
|
<Items>
|
||||||
|
<f:Form ID="SimpleForm1" ShowBorder="true" ShowHeader="false" AutoScroll="true" BoxFlex="1"
|
||||||
|
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||||
|
<Rows>
|
||||||
|
<f:FormRow>
|
||||||
<Items>
|
<Items>
|
||||||
<f:Panel runat="server" ID="panel3" RegionPosition="Top" RegionSplit="true" EnableCollapse="true" ShowBorder="true"
|
<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="项目进度统计"
|
Layout="Fit" ShowHeader="true" RegionSplitWidth="20px" BodyPadding="1px" Height="110px" Title="项目进度统计"
|
||||||
TitleToolTip="项目进度统计" AutoScroll="true" RegionPercent="30%">
|
TitleToolTip="项目进度统计" >
|
||||||
<Items>
|
<Items>
|
||||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="项目进度统计"
|
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="项目进度统计"
|
||||||
EnableCollapse="true" runat="server" BoxFlex="1" DataKeyNames="ProjectId"
|
EnableCollapse="true" runat="server" BoxFlex="1" DataKeyNames="ProjectId"
|
||||||
EnableColumnLines="true" DataIDField="ProjectId"
|
EnableColumnLines="true" DataIDField="ProjectId" Height="20px"
|
||||||
AllowSorting="true" SortField="ProjectId" SortDirection="ASC"
|
AllowSorting="true" SortField="ProjectId" SortDirection="ASC"
|
||||||
PageSize="15">
|
PageSize="15">
|
||||||
<Columns>
|
<Columns>
|
||||||
<f:RenderField HeaderText="总达因数" ColumnID="TotalDin"
|
<f:RenderField HeaderText="总达因数" ColumnID="TotalDin" ExpandUnusedSpace="true"
|
||||||
DataField="TotalDin" SortField="TotalDin" FieldType="Double" HeaderTextAlign="Center"
|
DataField="TotalDin" SortField="TotalDin" FieldType="Double" HeaderTextAlign="Center"
|
||||||
TextAlign="Center" Width="300px">
|
TextAlign="Center" Width="350px">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
<f:RenderField HeaderText="已完成达因数" ColumnID="FinishSize"
|
<f:RenderField HeaderText="已完成达因数" ColumnID="FinishSize"
|
||||||
DataField="FinishSize" SortField="FinishSize" FieldType="Double" HeaderTextAlign="Center"
|
DataField="FinishSize" SortField="FinishSize" FieldType="Double" HeaderTextAlign="Center"
|
||||||
TextAlign="Center" Width="300px">
|
TextAlign="Center" Width="350px">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
<f:RenderField HeaderText="完成进度" ColumnID="Rate"
|
<f:RenderField HeaderText="完成进度" ColumnID="Rate"
|
||||||
DataField="Rate" SortField="Rate" FieldType="String" HeaderTextAlign="Center"
|
DataField="Rate" SortField="Rate" FieldType="String" HeaderTextAlign="Center"
|
||||||
TextAlign="Center" Width="300px">
|
TextAlign="Center" Width="350px">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
</Columns>
|
</Columns>
|
||||||
</f:Grid>
|
</f:Grid>
|
||||||
</Items>
|
</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"
|
<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="单位工程进度统计"
|
Layout="Fit" ShowHeader="true" RegionSplitWidth="20px" BodyPadding="1px" Height="110px" Title="单位工程进度统计"
|
||||||
TitleToolTip="单位工程进度统计" AutoScroll="true" RegionPercent="30%">
|
TitleToolTip="单位工程进度统计" AutoScroll="true">
|
||||||
<Items>
|
<Items>
|
||||||
<f:Grid ID="Grid2" ShowBorder="true" ShowHeader="false" Title="单位工程进度统计"
|
<f:Grid ID="Grid2" ShowBorder="true" ShowHeader="false" Title="单位工程进度统计"
|
||||||
EnableCollapse="true" runat="server" BoxFlex="1" DataKeyNames="UnitWorkId"
|
EnableCollapse="true" runat="server" BoxFlex="1" DataKeyNames="UnitWorkId"
|
||||||
@@ -64,25 +99,29 @@
|
|||||||
AllowSorting="true" SortField="UnitWorkId" SortDirection="ASC"
|
AllowSorting="true" SortField="UnitWorkId" SortDirection="ASC"
|
||||||
PageSize="15">
|
PageSize="15">
|
||||||
<Columns>
|
<Columns>
|
||||||
<f:RenderField HeaderText="总达因数" ColumnID="TotalDin"
|
<f:RenderField HeaderText="总达因数" ColumnID="TotalDin" ExpandUnusedSpace="true"
|
||||||
DataField="TotalDin" SortField="TotalDin" FieldType="Double" HeaderTextAlign="Center"
|
DataField="TotalDin" SortField="TotalDin" FieldType="Double" HeaderTextAlign="Center"
|
||||||
TextAlign="Center" Width="300px">
|
TextAlign="Center" Width="350px">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
<f:RenderField HeaderText="已完成达因数" ColumnID="FinishSize"
|
<f:RenderField HeaderText="已完成达因数" ColumnID="FinishSize"
|
||||||
DataField="FinishSize" SortField="FinishSize" FieldType="Double" HeaderTextAlign="Center"
|
DataField="FinishSize" SortField="FinishSize" FieldType="Double" HeaderTextAlign="Center"
|
||||||
TextAlign="Center" Width="300px">
|
TextAlign="Center" Width="350px">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
<f:RenderField HeaderText="完成进度" ColumnID="Rate"
|
<f:RenderField HeaderText="完成进度" ColumnID="Rate"
|
||||||
DataField="Rate" SortField="Rate" FieldType="String" HeaderTextAlign="Center"
|
DataField="Rate" SortField="Rate" FieldType="String" HeaderTextAlign="Center"
|
||||||
TextAlign="Center" Width="300px">
|
TextAlign="Center" Width="350px">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
</Columns>
|
</Columns>
|
||||||
</f:Grid>
|
</f:Grid>
|
||||||
</Items>
|
</Items>
|
||||||
</f:Panel>
|
</f:Panel>
|
||||||
|
</Items>
|
||||||
|
</f:FormRow>
|
||||||
|
<f:FormRow>
|
||||||
|
<Items>
|
||||||
<f:Panel runat="server" ID="panel4" RegionPosition="Bottom" RegionSplit="true" EnableCollapse="true" ShowBorder="true"
|
<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="单位工程进度预测"
|
Layout="Fit" ShowHeader="true" RegionSplitWidth="20px" BodyPadding="1px" Height="110px" Title="单位工程进度预测"
|
||||||
TitleToolTip="单位工程进度预测" AutoScroll="true" RegionPercent="30%">
|
TitleToolTip="单位工程进度预测" AutoScroll="true">
|
||||||
<Items>
|
<Items>
|
||||||
<f:Form ID="Form2" ShowBorder="false" ShowHeader="false" AutoScroll="true"
|
<f:Form ID="Form2" ShowBorder="false" ShowHeader="false" AutoScroll="true"
|
||||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right" LabelWidth="110px">
|
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right" LabelWidth="110px">
|
||||||
@@ -91,7 +130,7 @@
|
|||||||
<Items>
|
<Items>
|
||||||
<f:Label runat="server" ID="lbNotCompleteDin" Label="未完成达因"></f:Label>
|
<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="txtLeaveDay" Label="剩余工期(天)" LabelWidth="120px" NoNegative="true" NoDecimal="true"></f:NumberBox>
|
||||||
<f:NumberBox runat="server" ID="txtWorkEfficiency" Label="日工效" NoNegative="true" NoDecimal="false" ></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:Label runat="server" ID="lbNeedWelderNum" Label="每日所需焊工数" LabelWidth="120px" LabelAlign="Right"></f:Label>
|
||||||
<f:Button ID="btnQuery" ToolTip="查询" Icon="SystemSearch" Text="查询"
|
<f:Button ID="btnQuery" ToolTip="查询" Icon="SystemSearch" Text="查询"
|
||||||
EnablePostBack="true" OnClick="btnQuery_Click" runat="server">
|
EnablePostBack="true" OnClick="btnQuery_Click" runat="server">
|
||||||
@@ -103,6 +142,10 @@
|
|||||||
</Items>
|
</Items>
|
||||||
</f:Panel>
|
</f:Panel>
|
||||||
</Items>
|
</Items>
|
||||||
|
</f:FormRow>
|
||||||
|
</Rows>
|
||||||
|
</f:Form>
|
||||||
|
</Items>
|
||||||
</f:Panel>
|
</f:Panel>
|
||||||
</Items>
|
</Items>
|
||||||
</f:Panel>
|
</f:Panel>
|
||||||
|
|||||||
@@ -139,6 +139,10 @@ namespace FineUIPro.Web.common
|
|||||||
var table = GetPagedDataTable(Grid1, tb);
|
var table = GetPagedDataTable(Grid1, tb);
|
||||||
Grid1.DataSource = table;
|
Grid1.DataSource = table;
|
||||||
Grid1.DataBind();
|
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>
|
/// <summary>
|
||||||
@@ -220,5 +224,48 @@ namespace FineUIPro.Web.common
|
|||||||
return;
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+74
-2
@@ -58,13 +58,22 @@ namespace FineUIPro.Web.common {
|
|||||||
protected global::FineUIPro.Tree tvControlItem;
|
protected global::FineUIPro.Tree tvControlItem;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Panel2 控件。
|
/// panel6 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// 自动生成的字段。
|
/// 自动生成的字段。
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.Panel Panel2;
|
protected global::FineUIPro.Panel panel6;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// SimpleForm1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Form SimpleForm1;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// panel3 控件。
|
/// panel3 控件。
|
||||||
@@ -84,6 +93,69 @@ namespace FineUIPro.Web.common {
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.Grid Grid1;
|
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>
|
/// <summary>
|
||||||
/// panelCenterRegion 控件。
|
/// panelCenterRegion 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user