提交代码
This commit is contained in:
@@ -1161,6 +1161,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
|||||||
BLL.WeldTaskService.UpdateWelderTask(weldTaskId, drpCanWelder.SelectedValue);
|
BLL.WeldTaskService.UpdateWelderTask(weldTaskId, drpCanWelder.SelectedValue);
|
||||||
}
|
}
|
||||||
this.BindGrid(null);
|
this.BindGrid(null);
|
||||||
|
this.Grid1.SelectedRowIDArray = selectedRowId;
|
||||||
drpCanWelder.Items.Clear();
|
drpCanWelder.Items.Clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,6 +32,17 @@
|
|||||||
</f:DatePicker>
|
</f:DatePicker>
|
||||||
</Items>
|
</Items>
|
||||||
</f:Toolbar>
|
</f:Toolbar>
|
||||||
|
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left">
|
||||||
|
<Items>
|
||||||
|
<f:TextBox ID="txtWeldJointCode" runat="server" Label="焊口号" LabelAlign="Right"
|
||||||
|
EmptyText="输入查询条件" Width="180px" LabelWidth="70px">
|
||||||
|
</f:TextBox>
|
||||||
|
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||||
|
<f:Button ID="btnTreeFind" ToolTip="查询" Icon="SystemSearch"
|
||||||
|
EnablePostBack="true" OnClick="btnTreeFind_Click" runat="server">
|
||||||
|
</f:Button>
|
||||||
|
</Items>
|
||||||
|
</f:Toolbar>
|
||||||
</Toolbars>
|
</Toolbars>
|
||||||
<Items>
|
<Items>
|
||||||
<f:Tree ID="tvControlItem" ShowHeader="false" Height="700px" Title="焊接任务单" runat="server" ShowBorder="false" EnableCollapse="true"
|
<f:Tree ID="tvControlItem" ShowHeader="false" Height="700px" Title="焊接任务单" runat="server" ShowBorder="false" EnableCollapse="true"
|
||||||
|
|||||||
@@ -65,6 +65,16 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 树查询
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void btnTreeFind_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
this.InitTreeMenu();
|
||||||
|
}
|
||||||
|
|
||||||
#region 加载树装置-单位
|
#region 加载树装置-单位
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 加载树
|
/// 加载树
|
||||||
@@ -114,8 +124,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
//}
|
//}
|
||||||
//else
|
//else
|
||||||
//{
|
//{
|
||||||
unitWork1 = (from x in unitWorkList where x.ProjectType == "1" 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();
|
unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList();
|
||||||
//}
|
//}
|
||||||
if (unitWork1.Count() > 0)
|
if (unitWork1.Count() > 0)
|
||||||
{
|
{
|
||||||
@@ -151,26 +161,57 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
foreach (var q in unitWork2)
|
foreach (var q in unitWork2)
|
||||||
{
|
{
|
||||||
var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId);
|
var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId);
|
||||||
var a = (from x in Funs.DB.HJGL_WeldTask
|
if (string.IsNullOrEmpty(this.txtWeldJointCode.Text.Trim()))
|
||||||
where x.UnitWorkId == q.UnitWorkId
|
|
||||||
&& x.TaskDate < Convert.ToDateTime(this.txtTaskDateMonth.Text.Trim() + "-01").AddMonths(1)
|
|
||||||
&& x.TaskDate >= Convert.ToDateTime(this.txtTaskDateMonth.Text.Trim() + "-01")
|
|
||||||
select x.TaskDate.Value.Date).Distinct().Count();
|
|
||||||
TreeNode tn2 = new TreeNode();
|
|
||||||
tn2.NodeID = q.UnitWorkId;
|
|
||||||
tn2.Text = q.UnitWorkName;
|
|
||||||
tn2.CommandName = "单位工程";
|
|
||||||
tn2.ToolTip = "施工单位:" + unitNamesUnitIds;
|
|
||||||
tn2.EnableClickEvent = true;
|
|
||||||
tn2.EnableExpandEvent = true;
|
|
||||||
rootNode2.Nodes.Add(tn2);
|
|
||||||
if (a > 0)
|
|
||||||
{
|
{
|
||||||
// BindNodes(tn1);
|
var a = (from x in Funs.DB.HJGL_WeldTask
|
||||||
TreeNode newNode = new TreeNode();
|
where x.UnitWorkId == q.UnitWorkId
|
||||||
newNode.Text = "加载管线...";
|
&& x.TaskDate < Convert.ToDateTime(this.txtTaskDateMonth.Text.Trim() + "-01").AddMonths(1)
|
||||||
newNode.NodeID = "加载管线...";
|
&& x.TaskDate >= Convert.ToDateTime(this.txtTaskDateMonth.Text.Trim() + "-01")
|
||||||
tn2.Nodes.Add(newNode);
|
select x.TaskDate.Value.Date).Distinct().Count();
|
||||||
|
TreeNode tn2 = new TreeNode();
|
||||||
|
tn2.NodeID = q.UnitWorkId;
|
||||||
|
tn2.Text = q.UnitWorkName;
|
||||||
|
tn2.CommandName = "单位工程";
|
||||||
|
tn2.ToolTip = "施工单位:" + unitNamesUnitIds;
|
||||||
|
tn2.EnableClickEvent = true;
|
||||||
|
tn2.EnableExpandEvent = true;
|
||||||
|
rootNode2.Nodes.Add(tn2);
|
||||||
|
if (a > 0)
|
||||||
|
{
|
||||||
|
// BindNodes(tn1);
|
||||||
|
TreeNode newNode = new TreeNode();
|
||||||
|
newNode.Text = "加载管线...";
|
||||||
|
newNode.NodeID = "加载管线...";
|
||||||
|
tn2.Nodes.Add(newNode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var a = (from x in Funs.DB.HJGL_WeldTask
|
||||||
|
join y in Funs.DB.HJGL_WeldJoint on x.WeldJointId equals y.WeldJointId
|
||||||
|
where x.UnitWorkId == q.UnitWorkId && y.WeldJointCode.Contains(this.txtWeldJointCode.Text.Trim())
|
||||||
|
select x.TaskDate.Value.Date).Distinct().Count();
|
||||||
|
TreeNode tn2 = new TreeNode();
|
||||||
|
tn2.NodeID = q.UnitWorkId;
|
||||||
|
tn2.Text = q.UnitWorkName;
|
||||||
|
tn2.CommandName = "单位工程";
|
||||||
|
tn2.ToolTip = "施工单位:" + unitNamesUnitIds;
|
||||||
|
tn2.EnableClickEvent = true;
|
||||||
|
tn2.EnableExpandEvent = true;
|
||||||
|
rootNode2.Nodes.Add(tn2);
|
||||||
|
if (a > 0)
|
||||||
|
{
|
||||||
|
var date = (from x in Funs.DB.HJGL_WeldTask
|
||||||
|
join y in Funs.DB.HJGL_WeldJoint on x.WeldJointId equals y.WeldJointId
|
||||||
|
where x.UnitWorkId == q.UnitWorkId && y.WeldJointCode.Contains(this.txtWeldJointCode.Text.Trim())
|
||||||
|
select x.TaskDate.Value.Date).First();
|
||||||
|
this.txtTaskDateMonth.Text = string.Format("{0:yyyy-MM}", date);
|
||||||
|
// BindNodes(tn1);
|
||||||
|
TreeNode newNode = new TreeNode();
|
||||||
|
newNode.Text = "加载管线...";
|
||||||
|
newNode.NodeID = "加载管线...";
|
||||||
|
tn2.Nodes.Add(newNode);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -187,21 +228,43 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
}
|
}
|
||||||
private void BindNodes(TreeNode node)
|
private void BindNodes(TreeNode node)
|
||||||
{
|
{
|
||||||
var p = (from x in Funs.DB.HJGL_WeldTask
|
if (string.IsNullOrEmpty(this.txtWeldJointCode.Text.Trim()))
|
||||||
where x.UnitWorkId == node.NodeID
|
|
||||||
&& x.TaskDate < Convert.ToDateTime(this.txtTaskDateMonth.Text.Trim() + "-01").AddMonths(1)
|
|
||||||
&& x.TaskDate >= Convert.ToDateTime(this.txtTaskDateMonth.Text.Trim() + "-01")
|
|
||||||
select new { x.TaskDate.Value.Date ,x.UnitId}).Distinct();
|
|
||||||
if (p.Count() > 0)
|
|
||||||
{
|
{
|
||||||
foreach (var item in p)
|
var p = (from x in Funs.DB.HJGL_WeldTask
|
||||||
|
where x.UnitWorkId == node.NodeID
|
||||||
|
&& x.TaskDate < Convert.ToDateTime(this.txtTaskDateMonth.Text.Trim() + "-01").AddMonths(1)
|
||||||
|
&& x.TaskDate >= Convert.ToDateTime(this.txtTaskDateMonth.Text.Trim() + "-01")
|
||||||
|
select new { x.TaskDate.Value.Date, x.UnitId }).Distinct();
|
||||||
|
if (p.Count() > 0)
|
||||||
{
|
{
|
||||||
TreeNode newNode = new TreeNode();
|
foreach (var item in p)
|
||||||
newNode.CommandName = "Date";
|
{
|
||||||
newNode.Text = string.Format("{0:yyyy-MM-dd}", item.Date)+"("+BLL.UnitService.getUnitNamesUnitIds(item.UnitId)+")";
|
TreeNode newNode = new TreeNode();
|
||||||
newNode.NodeID = node.NodeID + "|" + string.Format("{0:yyyy-MM-dd}", item.Date);
|
newNode.CommandName = "Date";
|
||||||
newNode.EnableClickEvent = true;
|
newNode.Text = string.Format("{0:yyyy-MM-dd}", item.Date) + "(" + BLL.UnitService.getUnitNamesUnitIds(item.UnitId) + ")";
|
||||||
node.Nodes.Add(newNode);
|
newNode.NodeID = node.NodeID + "|" + string.Format("{0:yyyy-MM-dd}", item.Date);
|
||||||
|
newNode.EnableClickEvent = true;
|
||||||
|
node.Nodes.Add(newNode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var p = (from x in Funs.DB.HJGL_WeldTask
|
||||||
|
join y in Funs.DB.HJGL_WeldJoint on x.WeldJointId equals y.WeldJointId
|
||||||
|
where x.UnitWorkId == node.NodeID && y.WeldJointCode.Contains(this.txtWeldJointCode.Text.Trim())
|
||||||
|
select new { x.TaskDate.Value.Date, x.UnitId }).Distinct();
|
||||||
|
if (p.Count() > 0)
|
||||||
|
{
|
||||||
|
foreach (var item in p)
|
||||||
|
{
|
||||||
|
TreeNode newNode = new TreeNode();
|
||||||
|
newNode.CommandName = "Date";
|
||||||
|
newNode.Text = string.Format("{0:yyyy-MM-dd}", item.Date) + "(" + BLL.UnitService.getUnitNamesUnitIds(item.UnitId) + ")";
|
||||||
|
newNode.NodeID = node.NodeID + "|" + string.Format("{0:yyyy-MM-dd}", item.Date);
|
||||||
|
newNode.EnableClickEvent = true;
|
||||||
|
node.Nodes.Add(newNode);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -823,7 +886,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
NewItem.WeldingWireCode = values.Value<string>("WeldingWireCode").ToString();
|
NewItem.WeldingWireCode = values.Value<string>("WeldingWireCode").ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(values.Value<string>("Size"))&&!string.IsNullOrEmpty(values.Value<int>("Size").ToString()))
|
if (!string.IsNullOrEmpty(values.Value<string>("Size")) && !string.IsNullOrEmpty(values.Value<int>("Size").ToString()))
|
||||||
{
|
{
|
||||||
NewItem.Size = values.Value<int>("Size");
|
NewItem.Size = values.Value<int>("Size");
|
||||||
}
|
}
|
||||||
@@ -853,7 +916,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
{
|
{
|
||||||
string UnitWorkId = w.UnitWorkId;
|
string UnitWorkId = w.UnitWorkId;
|
||||||
string taskDate = "";
|
string taskDate = "";
|
||||||
string strList = UnitWorkId + "|" + taskDate;
|
string strList = UnitWorkId + "|" + taskDate;
|
||||||
|
|
||||||
string window = String.Format("SelectTaskWeldJoint.aspx?strList={0}", strList, "编辑 - ");
|
string window = String.Format("SelectTaskWeldJoint.aspx?strList={0}", strList, "编辑 - ");
|
||||||
PageContext.RegisterStartupScript(Window1.GetSaveStateReference(hdTaskWeldJoint.ClientID) + Window1.GetShowReference(window));
|
PageContext.RegisterStartupScript(Window1.GetSaveStateReference(hdTaskWeldJoint.ClientID) + Window1.GetShowReference(window));
|
||||||
@@ -880,7 +943,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
{
|
{
|
||||||
taskDate = tvControlItem.SelectedNodeID;
|
taskDate = tvControlItem.SelectedNodeID;
|
||||||
}
|
}
|
||||||
string strList = UnitWorkId + "|" + taskDate;
|
string strList = UnitWorkId + "|" + taskDate;
|
||||||
|
|
||||||
string window = String.Format("SelectTaskWeldJoint.aspx?strList={0}", strList, "编辑 - ");
|
string window = String.Format("SelectTaskWeldJoint.aspx?strList={0}", strList, "编辑 - ");
|
||||||
PageContext.RegisterStartupScript(Window1.GetSaveStateReference(hdTaskWeldJoint.ClientID) + Window1.GetShowReference(window));
|
PageContext.RegisterStartupScript(Window1.GetSaveStateReference(hdTaskWeldJoint.ClientID) + Window1.GetShowReference(window));
|
||||||
@@ -1122,48 +1185,48 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
DateTime? taskTime = Funs.GetNewDateTime(tvControlItem.SelectedNodeID.Split('|')[1]);
|
DateTime? taskTime = Funs.GetNewDateTime(tvControlItem.SelectedNodeID.Split('|')[1]);
|
||||||
if (taskTime != null)
|
if (taskTime != null)
|
||||||
{
|
{
|
||||||
var pipelines = BLL.WeldTaskService.GetWeldingTaskList(this.CurrUser.LoginProjectId, tvControlItem.SelectedNode.ParentNode.NodeID, Convert.ToDateTime(taskTime)).Select(x=>x.PipelineId).Distinct().ToList();
|
var pipelines = BLL.WeldTaskService.GetWeldingTaskList(this.CurrUser.LoginProjectId, tvControlItem.SelectedNode.ParentNode.NodeID, Convert.ToDateTime(taskTime)).Select(x => x.PipelineId).Distinct().ToList();
|
||||||
|
|
||||||
if (pipelines.Any())
|
if (pipelines.Any())
|
||||||
{
|
{
|
||||||
BLL.FastReportService.ResetData();
|
BLL.FastReportService.ResetData();
|
||||||
|
|
||||||
var result = HJGL_PipelineComponentService.GetPrintModelByPipelineComponentIds(null, pipelines.ToArray(),true);
|
var result = HJGL_PipelineComponentService.GetPrintModelByPipelineComponentIds(null, pipelines.ToArray(), true);
|
||||||
var PipelineComponentIds = result.Select(x => x.PipelineComponentId).ToArray();
|
var PipelineComponentIds = result.Select(x => x.PipelineComponentId).ToArray();
|
||||||
var tb = LINQToDataTable(result);
|
var tb = LINQToDataTable(result);
|
||||||
if (tb != null && tb.Rows.Count>0)
|
if (tb != null && tb.Rows.Count > 0)
|
||||||
{
|
{
|
||||||
tb.TableName = "Table1";
|
tb.TableName = "Table1";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ShowNotify("该管线已打印完成", MessageBoxIcon.Question);
|
ShowNotify("该管线已打印完成", MessageBoxIcon.Question);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
BLL.FastReportService.AddFastreportTable(tb);
|
BLL.FastReportService.AddFastreportTable(tb);
|
||||||
string initTemplatePath = "";
|
string initTemplatePath = "";
|
||||||
string rootPath = Server.MapPath("~/");
|
string rootPath = Server.MapPath("~/");
|
||||||
initTemplatePath = "File\\Fastreport\\组件打印.frx";
|
initTemplatePath = "File\\Fastreport\\组件打印.frx";
|
||||||
|
|
||||||
if (File.Exists(rootPath + initTemplatePath))
|
if (File.Exists(rootPath + initTemplatePath))
|
||||||
{
|
{
|
||||||
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("~/Controls/Fastreport.aspx?ReportPath={0}", rootPath + initTemplatePath)));
|
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("~/Controls/Fastreport.aspx?ReportPath={0}", rootPath + initTemplatePath)));
|
||||||
|
|
||||||
HJGL_PipelineComponentService.UpdateIsPrint(PipelineComponentIds);
|
HJGL_PipelineComponentService.UpdateIsPrint(PipelineComponentIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ShowNotify("无关联管线", MessageBoxIcon.Question);
|
ShowNotify("无关联管线", MessageBoxIcon.Question);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ShowNotify("请选择任务单",MessageBoxIcon.Question);
|
ShowNotify("请选择任务单", MessageBoxIcon.Question);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+29
-4
@@ -7,12 +7,10 @@
|
|||||||
// </自动生成>
|
// </自动生成>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
namespace FineUIPro.Web.HJGL.WeldingManage
|
namespace FineUIPro.Web.HJGL.WeldingManage {
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
public partial class WeldTask
|
public partial class WeldTask {
|
||||||
{
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// form1 控件。
|
/// form1 控件。
|
||||||
@@ -68,6 +66,33 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.DatePicker txtTaskDateMonth;
|
protected global::FineUIPro.DatePicker txtTaskDateMonth;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Toolbar1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Toolbar Toolbar1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// txtWeldJointCode 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.TextBox txtWeldJointCode;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnTreeFind 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Button btnTreeFind;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// tvControlItem 控件。
|
/// tvControlItem 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user