From 1ce0a6da17feeaef20b579688239730cc933c8d3 Mon Sep 17 00:00:00 2001 From: gaofei1985 <181547018@qq.com> Date: Mon, 4 Dec 2023 12:11:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BLL/HJGL/WeldingManage/WeldTaskService.cs | 10 +- SGGL/FineUIPro.Web/AttachFile/LookPic.aspx | 26 +++++ SGGL/FineUIPro.Web/AttachFile/LookPic.aspx.cs | 45 +++++++++ .../AttachFile/LookPic.aspx.designer.cs | 69 +++++++++++++ .../AttachFile/webuploader.aspx.cs | 10 +- SGGL/FineUIPro.Web/FineUIPro.Web.csproj | 8 ++ .../HJGL/WeldingManage/JotTwoDesign.aspx.cs | 2 +- .../WeldingManage/SelectTaskWeldJoint.aspx.cs | 41 +++++++- .../HJGL/WeldingManage/WeldTask.aspx.cs | 99 +++++++++---------- .../HJGL/WeldingManage/WeldingPlan.aspx | 8 ++ .../HJGL/WeldingManage/WeldingPlan.aspx.cs | 3 + SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx | 30 ++++++ .../common/mainMenu_HJGL3.aspx.cs | 26 +++++ .../common/mainMenu_HJGL3.aspx.designer.cs | 18 ++++ 14 files changed, 334 insertions(+), 61 deletions(-) create mode 100644 SGGL/FineUIPro.Web/AttachFile/LookPic.aspx create mode 100644 SGGL/FineUIPro.Web/AttachFile/LookPic.aspx.cs create mode 100644 SGGL/FineUIPro.Web/AttachFile/LookPic.aspx.designer.cs diff --git a/SGGL/BLL/HJGL/WeldingManage/WeldTaskService.cs b/SGGL/BLL/HJGL/WeldingManage/WeldTaskService.cs index 9119bc19..e3aa4165 100644 --- a/SGGL/BLL/HJGL/WeldingManage/WeldTaskService.cs +++ b/SGGL/BLL/HJGL/WeldingManage/WeldTaskService.cs @@ -65,19 +65,23 @@ namespace BLL return code; } - public static List GetWeldingTaskList(string ProjectId, string UnitWorkId, DateTime taskDate,string canWelder) + public static List GetWeldingTaskList(string ProjectId, string UnitWorkId, string unitId, DateTime taskDate, string canWelder) { var q = from x in Funs.DB.View_HJGL_WeldingTask where x.ProjectId == ProjectId && x.UnitWorkId == UnitWorkId && x.TaskDate.Value.Date == taskDate.Date select x; + if (!string.IsNullOrEmpty(unitId)) + { + q = q.Where(x => x.UnitId == unitId); + } if (canWelder == "0") { q = q.Where(x => x.CanWelderId == null); } - else if(canWelder == "1") + else if (canWelder == "1") { - q=q.Where(x => x.CanWelderId != null); + q = q.Where(x => x.CanWelderId != null); } return q.ToList(); } diff --git a/SGGL/FineUIPro.Web/AttachFile/LookPic.aspx b/SGGL/FineUIPro.Web/AttachFile/LookPic.aspx new file mode 100644 index 00000000..bd163f55 --- /dev/null +++ b/SGGL/FineUIPro.Web/AttachFile/LookPic.aspx @@ -0,0 +1,26 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="LookPic.aspx.cs" Inherits="FineUIPro.Web.AttachFile.LookPic" %> + + + + + + + + + +
+ + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/AttachFile/LookPic.aspx.cs b/SGGL/FineUIPro.Web/AttachFile/LookPic.aspx.cs new file mode 100644 index 00000000..27798d12 --- /dev/null +++ b/SGGL/FineUIPro.Web/AttachFile/LookPic.aspx.cs @@ -0,0 +1,45 @@ +using BLL; +using System; +using System.IO; + +namespace FineUIPro.Web.AttachFile +{ + public partial class LookPic : PageBase + { + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); + + var url = Request.Params["fileUrl"]; + //var Baseurl = "https://view.officeapps.live.com/op/embed.aspx?src="; + // var Baseurl = "https://view.xdocin.com/view?src="; + var Fileurl = Funs.SGGLUrl + url.Replace(Funs.RootPath, ""); + //var newurl = ""; + //var FiletExtension = Path.GetExtension(url); + //if (FiletExtension == ".docx" || FiletExtension == ".doc" || FiletExtension == ".xls" || FiletExtension == ".xlsx") + //{ + // newurl = Baseurl + Fileurl; + //} + //else if (FiletExtension == ".txt" || FiletExtension == "pdf") + //{ + // newurl = Fileurl; + //} + //else + //{ + // newurl = Fileurl; + //} + + this.LookHtml.Src = Fileurl; + this.Tab1.IFrameUrl = Fileurl; + //StreamReader fread = new StreamReader(url, System.Text.Encoding.GetEncoding("gb2312")); + //string ss = fread.ReadToEnd(); + //Response.Write(ss); + //fread.Close(); + //fread.Dispose(); + + } + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/AttachFile/LookPic.aspx.designer.cs b/SGGL/FineUIPro.Web/AttachFile/LookPic.aspx.designer.cs new file mode 100644 index 00000000..3ee531d9 --- /dev/null +++ b/SGGL/FineUIPro.Web/AttachFile/LookPic.aspx.designer.cs @@ -0,0 +1,69 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.AttachFile { + + + public partial class LookPic { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// TabStrip1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TabStrip TabStrip1; + + /// + /// Tab1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Tab Tab1; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + + /// + /// LookHtml 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlIframe LookHtml; + } +} diff --git a/SGGL/FineUIPro.Web/AttachFile/webuploader.aspx.cs b/SGGL/FineUIPro.Web/AttachFile/webuploader.aspx.cs index 097c9fc0..ff9d5542 100644 --- a/SGGL/FineUIPro.Web/AttachFile/webuploader.aspx.cs +++ b/SGGL/FineUIPro.Web/AttachFile/webuploader.aspx.cs @@ -376,8 +376,14 @@ namespace FineUIPro.Web.AttachFile } else { - ShowNotify("不支持预览", MessageBoxIcon.Warning); - + if (FiletExtension == ".gif" || FiletExtension == ".jpg" || FiletExtension == ".jpeg" || FiletExtension == ".bmp" || FiletExtension == ".png") + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../AttachFile/LookPic.aspx?fileUrl={0}", url, "查看 -"))); + } + else + { + ShowNotify("不支持预览", MessageBoxIcon.Warning); + } } //if (FiletExtension == ".docx" || FiletExtension == ".pdf") //{ diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index b08999df..ad06bb28 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -229,6 +229,7 @@ + @@ -5848,6 +5849,13 @@ Look.aspx + + LookPic.aspx + ASPXCodeBehind + + + LookPic.aspx + OnlineEditing.aspx ASPXCodeBehind diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx.cs index f93d0496..643349f6 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/JotTwoDesign.aspx.cs @@ -612,7 +612,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage if (!string.IsNullOrEmpty(tvControlItem.SelectedNodeID)) { - var jotList = from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == tvControlItem.SelectedNodeID && x.WPQId == null && x.IsTwoJoint == true select x; + var jotList = from x in Funs.DB.HJGL_WeldJoint where weldJointIdList.Contains(x.WeldJointId) && x.WPQId == null && x.IsTwoJoint == true select x; if (jotList.Count() > 0) { foreach (var jot in jotList) diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/SelectTaskWeldJoint.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/SelectTaskWeldJoint.aspx.cs index cf44bb6c..89b58748 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/SelectTaskWeldJoint.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/SelectTaskWeldJoint.aspx.cs @@ -123,16 +123,49 @@ namespace FineUIPro.Web.HJGL.WeldingManage string strList = Request.Params["strList"]; List list = Funs.GetStrListByStr(strList, '|'); - if (list.Count() == 2) + if (list.Count() == 3) { this.UnitWorkId = list[0]; - TaskDate = list[1]; + string unitId = list[1]; + TaskDate = list[2]; InitDropList(); Model.WBS_UnitWork UnitWork = BLL.UnitWorkService.getUnitWorkByUnitWorkId(this.UnitWorkId); BLL.UnitService.InitUnitDropDownListByUnitIds(this.drpUnit, UnitWork.UnitId, false);//单位 + this.drpUnit.SelectedValue = unitId; + if (!string.IsNullOrEmpty(TaskDate)) + { + txtTaskDate.Text = TaskDate; + txtTaskDate.Enabled = false; + var task = (from x in Funs.DB.HJGL_WeldTask + where x.UnitWorkId == UnitWorkId && x.UnitId == unitId + && x.TaskDate.Value.Date.ToString() == Convert.ToDateTime(txtTaskDate.Text.Trim()).ToString("yyyy-MM-dd") + select x).FirstOrDefault(); + if (task != null) + { + txtTaskCode.Text = task.TaskCode; + //drpUnit.SelectedValue = task.UnitId; + } + txtTaskCode.Enabled = false; + } + string projectId = string.Empty; + if (UnitWorkId != null) + { + + projectId = UnitWork.ProjectId; + this.txtUnitWorkName.Text = UnitWork.UnitWorkName; + } + } + else + { + this.UnitWorkId = list[0]; + TaskDate = list[1]; + InitDropList(); + + Model.WBS_UnitWork UnitWork = BLL.UnitWorkService.getUnitWorkByUnitWorkId(this.UnitWorkId); + BLL.UnitService.InitUnitDropDownListByUnitIds(this.drpUnit, UnitWork.UnitId, false);//单位 if (!string.IsNullOrEmpty(TaskDate)) { txtTaskDate.Text = TaskDate; @@ -144,7 +177,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage if (task != null) { txtTaskCode.Text = task.TaskCode; - drpUnit.SelectedValue = task.UnitId; + //drpUnit.SelectedValue = task.UnitId; } txtTaskCode.Enabled = false; } @@ -464,7 +497,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage else { var task = from x in Funs.DB.HJGL_WeldTask - where x.UnitWorkId == UnitWorkId + where x.UnitWorkId == UnitWorkId && x.UnitId == this.drpUnit.SelectedValue && x.TaskDate.Value.Date.ToString() == Convert.ToDateTime(txtTaskDate.Text.Trim()).ToString("yyyy-MM-dd") select x; if (task.Count() > 0) diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldTask.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldTask.aspx.cs index db685eeb..70df517d 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldTask.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldTask.aspx.cs @@ -242,7 +242,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage 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.NodeID = node.NodeID + "|" + item.UnitId + "|" + string.Format("{0:yyyy-MM-dd}", item.Date); newNode.EnableClickEvent = true; node.Nodes.Add(newNode); } @@ -262,7 +262,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage 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.NodeID = node.NodeID + "|" + item.UnitId + "|" + string.Format("{0:yyyy-MM-dd}", item.Date); newNode.EnableClickEvent = true; node.Nodes.Add(newNode); } @@ -613,28 +613,22 @@ namespace FineUIPro.Web.HJGL.WeldingManage { BLL.WeldTaskService.UpdateCanWelderTask(weldTaskId, canWelderId.Substring(0, canWelderId.Length - 1), canWelderCode.Substring(0, canWelderCode.Length - 1)); } - - + + //GetCanWelderDropDownList(GetWeldingTaskList); } - DateTime? taskTime = null; + string unitWorkId = string.Empty, unitId2 = string.Empty; if (tvControlItem.SelectedNodeID.Contains("|")) { - taskTime = Funs.GetNewDateTime(tvControlItem.SelectedNodeID.Split('|')[1]); + unitWorkId = tvControlItem.SelectedNodeID.Split('|')[0]; + unitId2 = tvControlItem.SelectedNodeID.Split('|')[1]; } else { - taskTime = Funs.GetNewDateTime(tvControlItem.SelectedNodeID); + unitWorkId = tvControlItem.SelectedNodeID; } List GetWeldingTaskList = null; - if (taskTime != null) - { - GetWeldingTaskList = BLL.WeldTaskService.GetWeldingTaskList(this.CurrUser.LoginProjectId, tvControlItem.SelectedNode.ParentNode.NodeID, Convert.ToDateTime(tvControlItem.SelectedNodeID.Split('|')[1]), this.rbIsAudit.SelectedValue); - } - else - { - GetWeldingTaskList = BLL.WeldTaskService.GetWeldingTaskList(this.CurrUser.LoginProjectId, tvControlItem.SelectedNodeID, Convert.ToDateTime(hdTaskWeldJoint.Text), this.rbIsAudit.SelectedValue); - } + GetWeldingTaskList = BLL.WeldTaskService.GetWeldingTaskList(this.CurrUser.LoginProjectId, unitWorkId, unitId2, Convert.ToDateTime(hdTaskWeldJoint.Text), this.rbIsAudit.SelectedValue); this.BindGrid(GetWeldingTaskList); Alert.ShowInTop("已生成可焊焊工!", MessageBoxIcon.Success); @@ -935,19 +929,19 @@ namespace FineUIPro.Web.HJGL.WeldingManage var w = BLL.UnitWorkService.getUnitWorkByUnitWorkId(tvControlItem.SelectedNode.ParentNode.NodeID); if (w != null) { - string UnitWorkId = w.UnitWorkId; - string taskDate = string.Empty; - if (tvControlItem.SelectedNodeID.Contains("|")) - { - taskDate = tvControlItem.SelectedNodeID.Split('|')[1]; - } - else - { - taskDate = tvControlItem.SelectedNodeID; - } - string strList = UnitWorkId + "|" + taskDate; + //string UnitWorkId = w.UnitWorkId; + //string taskDate = string.Empty; + //if (tvControlItem.SelectedNodeID.Contains("|")) + //{ + // taskDate = tvControlItem.SelectedNodeID.Split('|')[2]; + //} + //else + //{ + // taskDate = tvControlItem.SelectedNodeID; + //} + //string strList = UnitWorkId + "|" + taskDate; - string window = String.Format("SelectTaskWeldJoint.aspx?strList={0}", strList, "编辑 - "); + string window = String.Format("SelectTaskWeldJoint.aspx?strList={0}", tvControlItem.SelectedNodeID, "编辑 - "); PageContext.RegisterStartupScript(Window1.GetSaveStateReference(hdTaskWeldJoint.ClientID) + Window1.GetShowReference(window)); //PageContext.RegisterStartupScript(Window1.GetShowReference(window)); } @@ -989,17 +983,18 @@ namespace FineUIPro.Web.HJGL.WeldingManage } } } - var unit = BLL.UnitWorkService.GetUnitWorkByUnitWorkId(tvControlItem.SelectedNodeID); - List GetWeldingTaskList = null; - if (unit == null) + string unitWorkId = string.Empty, unitId = string.Empty; + if (tvControlItem.SelectedNodeID.Contains("|")) { - GetWeldingTaskList = BLL.WeldTaskService.GetWeldingTaskList(this.CurrUser.LoginProjectId, tvControlItem.SelectedNodeID.Split('|')[0], Convert.ToDateTime(hdTaskWeldJoint.Text.Trim()), this.rbIsAudit.SelectedValue); + unitWorkId = tvControlItem.SelectedNodeID.Split('|')[0]; + unitId = tvControlItem.SelectedNodeID.Split('|')[1]; } else { - GetWeldingTaskList = BLL.WeldTaskService.GetWeldingTaskList(this.CurrUser.LoginProjectId, tvControlItem.SelectedNodeID, Convert.ToDateTime(hdTaskWeldJoint.Text.Trim()), this.rbIsAudit.SelectedValue); - + unitWorkId = tvControlItem.SelectedNodeID; } + List GetWeldingTaskList = null; + GetWeldingTaskList = BLL.WeldTaskService.GetWeldingTaskList(this.CurrUser.LoginProjectId, unitWorkId, unitId, Convert.ToDateTime(hdTaskWeldJoint.Text.Trim()), this.rbIsAudit.SelectedValue); this.BindGrid(GetWeldingTaskList); } @@ -1058,12 +1053,12 @@ namespace FineUIPro.Web.HJGL.WeldingManage protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e) { var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.HJGL_WeldTaskMenuId); - if (this.tvControlItem.SelectedNode.CommandName == "建筑工程" || this.tvControlItem.SelectedNode.CommandName == "安装工程") + if (this.tvControlItem.SelectedNodeID.Length == 1) { this.btnMenuAdd.Hidden = true; this.btnMotify.Hidden = true; } - else if (this.tvControlItem.SelectedNode.CommandName == "单位工程") + else if (!this.tvControlItem.SelectedNodeID.Contains("|")) { if (buttonList.Contains(BLL.Const.BtnAdd)) { @@ -1071,7 +1066,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage } this.btnMotify.Hidden = true; } - else if (this.tvControlItem.SelectedNode.CommandName == "Date") + else if (this.tvControlItem.SelectedNodeID.Contains("|")) { if (buttonList.Contains(BLL.Const.BtnModify) || buttonList.Contains(BLL.Const.BtnSave)) { @@ -1080,12 +1075,12 @@ namespace FineUIPro.Web.HJGL.WeldingManage this.btnMenuAdd.Hidden = true; } var w = BLL.UnitWorkService.getUnitWorkByUnitWorkId(tvControlItem.SelectedNodeID); - if (w == null && this.tvControlItem.SelectedNode.CommandName != "建筑工程" && this.tvControlItem.SelectedNode.CommandName != "安装工程") + if (w == null) { - DateTime? taskTime = Funs.GetNewDateTime(tvControlItem.SelectedNodeID.Split('|')[1]); + DateTime? taskTime = Funs.GetNewDateTime(tvControlItem.SelectedNodeID.Split('|')[2]); if (taskTime != null) { - List GetWeldingTaskList = BLL.WeldTaskService.GetWeldingTaskList(this.CurrUser.LoginProjectId, tvControlItem.SelectedNode.ParentNode.NodeID, Convert.ToDateTime(taskTime), this.rbIsAudit.SelectedValue); + List GetWeldingTaskList = BLL.WeldTaskService.GetWeldingTaskList(this.CurrUser.LoginProjectId, tvControlItem.SelectedNodeID.Split('|')[0], tvControlItem.SelectedNodeID.Split('|')[1], Convert.ToDateTime(taskTime), this.rbIsAudit.SelectedValue); this.BindGrid(GetWeldingTaskList); } @@ -1127,22 +1122,24 @@ namespace FineUIPro.Web.HJGL.WeldingManage DateTime? taskTime = null; if (tvControlItem.SelectedNodeID.Contains("|")) { - taskTime = Funs.GetNewDateTime(tvControlItem.SelectedNodeID.Split('|')[1]); + taskTime = Funs.GetNewDateTime(tvControlItem.SelectedNodeID.Split('|')[2]); } else { taskTime = Funs.GetNewDateTime(tvControlItem.SelectedNodeID); } - List GetWeldingTaskList = null; - if (taskTime != null) + string unitWorkId = string.Empty, unitId = string.Empty; + if (tvControlItem.SelectedNodeID.Contains("|")) { - GetWeldingTaskList = BLL.WeldTaskService.GetWeldingTaskList(this.CurrUser.LoginProjectId, tvControlItem.SelectedNode.ParentNode.NodeID, Convert.ToDateTime(taskTime), this.rbIsAudit.SelectedValue); + unitWorkId = tvControlItem.SelectedNodeID.Split('|')[0]; + unitId = tvControlItem.SelectedNodeID.Split('|')[1]; } else { - GetWeldingTaskList = BLL.WeldTaskService.GetWeldingTaskList(this.CurrUser.LoginProjectId, tvControlItem.SelectedNodeID, Convert.ToDateTime(txtTaskDate.Text), this.rbIsAudit.SelectedValue); - + unitWorkId = tvControlItem.SelectedNodeID; } + List GetWeldingTaskList = null; + GetWeldingTaskList = BLL.WeldTaskService.GetWeldingTaskList(this.CurrUser.LoginProjectId, unitWorkId, unitId, Convert.ToDateTime(txtTaskDate.Text), this.rbIsAudit.SelectedValue); this.BindGrid(GetWeldingTaskList); drpCanWelder.Items.Clear(); //GetCanWelderDropDownList(GetWeldingTaskList); @@ -1202,20 +1199,20 @@ namespace FineUIPro.Web.HJGL.WeldingManage protected void btnSearch_Click(object sender, EventArgs e) { //List GetWeldingTaskItem = this.CollectGridJointInfo(); - DateTime? taskTime = Funs.GetNewDateTime(tvControlItem.SelectedNodeID.Split('|')[1]); + DateTime? taskTime = Funs.GetNewDateTime(tvControlItem.SelectedNodeID.Split('|')[2]); if (taskTime != null) { - List GetWeldingTaskList = BLL.WeldTaskService.GetWeldingTaskList(this.CurrUser.LoginProjectId, tvControlItem.SelectedNode.ParentNode.NodeID, Convert.ToDateTime(taskTime), this.rbIsAudit.SelectedValue); + List GetWeldingTaskList = BLL.WeldTaskService.GetWeldingTaskList(this.CurrUser.LoginProjectId, tvControlItem.SelectedNodeID.Split('|')[0], tvControlItem.SelectedNodeID.Split('|')[1], Convert.ToDateTime(taskTime), this.rbIsAudit.SelectedValue); this.BindGrid(GetWeldingTaskList); } } protected void btnPrint_Click(object sender, EventArgs e) { - DateTime? taskTime = Funs.GetNewDateTime(tvControlItem.SelectedNodeID.Split('|')[1]); + DateTime? taskTime = Funs.GetNewDateTime(tvControlItem.SelectedNodeID.Split('|')[2]); if (taskTime != null) { - var pipelines = BLL.WeldTaskService.GetWeldingTaskList(this.CurrUser.LoginProjectId, tvControlItem.SelectedNode.ParentNode.NodeID, Convert.ToDateTime(taskTime), this.rbIsAudit.SelectedValue).Select(x => x.PipelineId).Distinct().ToList(); + var pipelines = BLL.WeldTaskService.GetWeldingTaskList(this.CurrUser.LoginProjectId, tvControlItem.SelectedNodeID.Split('|')[0], tvControlItem.SelectedNodeID.Split('|')[1], Convert.ToDateTime(taskTime), this.rbIsAudit.SelectedValue).Select(x => x.PipelineId).Distinct().ToList(); if (pipelines.Any()) { @@ -1262,10 +1259,10 @@ namespace FineUIPro.Web.HJGL.WeldingManage protected void rbIsAudit_SelectedIndexChanged(object sender, EventArgs e) { - DateTime? taskTime = Funs.GetNewDateTime(tvControlItem.SelectedNodeID.Split('|')[1]); + DateTime? taskTime = Funs.GetNewDateTime(tvControlItem.SelectedNodeID.Split('|')[2]); if (taskTime != null) { - List GetWeldingTaskList = BLL.WeldTaskService.GetWeldingTaskList(this.CurrUser.LoginProjectId, tvControlItem.SelectedNode.ParentNode.NodeID, Convert.ToDateTime(taskTime), this.rbIsAudit.SelectedValue); + List GetWeldingTaskList = BLL.WeldTaskService.GetWeldingTaskList(this.CurrUser.LoginProjectId, tvControlItem.SelectedNodeID.Split('|')[0], tvControlItem.SelectedNodeID.Split('|')[1], Convert.ToDateTime(taskTime), this.rbIsAudit.SelectedValue); this.BindGrid(GetWeldingTaskList); } } diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldingPlan.aspx b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldingPlan.aspx index c168b2c9..93ede0db 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldingPlan.aspx +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldingPlan.aspx @@ -124,6 +124,14 @@ DataField="PipelineCode" SortField="PipelineCode" FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="150px"> + + + + diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldingPlan.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldingPlan.aspx.cs index bed6b1ce..8ea0f45c 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldingPlan.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldingPlan.aspx.cs @@ -132,6 +132,9 @@ namespace FineUIPro.Web.HJGL.WeldingManage { string strSql = @"select (line.PipelineId+'&'+ISNULL(com.PipelineComponentId,'') ) as ID ,line.PipelineId + ,(select ISNULL(SUM(ISNULL(jot.Size,0)),0) FROM dbo.HJGL_WeldJoint jot WHERE jot.PipelineId=line.PipelineId) as TotalSize + ,(case when line.PipeArea='1' then (select ISNULL(SUM(ISNULL(jot.Size,0)),0) FROM dbo.HJGL_WeldJoint jot WHERE jot.PipelineId=line.PipelineId and jot.JointAttribute='预制口') + else (select ISNULL(SUM(ISNULL(jot.Size,0)),0) FROM dbo.HJGL_WeldJoint jot WHERE jot.PipelineId=line.PipelineId) end) as TotalYZSize ,line.PipelineCode ,line.ProjectId ,line.UnitWorkId diff --git a/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx b/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx index 5c06271e..21389cf2 100644 --- a/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx +++ b/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx @@ -106,6 +106,35 @@ + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx.cs b/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx.cs index 37337ce0..1e5ff831 100644 --- a/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx.cs +++ b/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx.cs @@ -19,6 +19,7 @@ namespace FineUIPro.Web.common this.InitTreeMenu();//加载树 this.txtWeldingDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); BindGrid1(); + BindGrid3(); } } @@ -26,6 +27,7 @@ namespace FineUIPro.Web.common { BindGrid1(); BindGrid2(this.tvControlItem.SelectedNodeID); + BindGrid3(); } #region 加载树装置-单位-工作区 @@ -197,6 +199,30 @@ select '现场施工' as PipeArea,UnitWorkId,TotalDin,TodayFinishSize,FinishSize this.lbNotCompleteDin2.Text = notCompleteDin2.ToString(); } } + + /// + /// 数据绑定 + /// + private void BindGrid3() + { + string strSql = @"select distinct UnitName, +CAST((SELECT ISNULL(SUM(ISNULL(jot.Size,0)),0) FROM dbo.HJGL_WeldJoint jot left join dbo.HJGL_WeldingDaily d on d.WeldingDailyId=jot.WeldingDailyId WHERE d.ProjectId=@ProjectId and d.UnitId=b.UnitId and jot.WeldingDailyId IS NOT NULL and d.WeldingDate=@WeldingDate) AS DECIMAL(12,3)) AS TodayFinishSize, +CAST((SELECT ISNULL(SUM(ISNULL(jot.Size,0)),0) FROM dbo.HJGL_WeldJoint jot left join dbo.HJGL_WeldingDaily d on d.WeldingDailyId=jot.WeldingDailyId WHERE d.ProjectId=@ProjectId and d.UnitId=b.UnitId and jot.WeldingDailyId IS NOT NULL and d.WeldingDate<=@WeldingDate) AS DECIMAL(12,3)) AS FinishSize + from HJGL_WeldingDaily b + left join Base_Unit u on b.UnitId=u.UnitId + where b.ProjectId=@ProjectId"; + + List listStr = new List(); + listStr.Add(new SqlParameter("@ProjectId", (CurrUser != null) ? CurrUser.LoginProjectId : "")); + listStr.Add(new SqlParameter("@WeldingDate", this.txtWeldingDate.Text.Trim())); + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + Grid3.RecordCount = tb.Rows.Count; + tb = GetFilteredTable(Grid3.FilteredData, tb); + var table = GetPagedDataTable(Grid3, tb); + Grid3.DataSource = table; + Grid3.DataBind(); + } #endregion /// diff --git a/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx.designer.cs b/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx.designer.cs index 15ab632c..5587a964 100644 --- a/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/common/mainMenu_HJGL3.aspx.designer.cs @@ -192,6 +192,24 @@ namespace FineUIPro.Web.common { /// protected global::FineUIPro.Button btnQueryTotal; + /// + /// panel2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel panel2; + + /// + /// Grid3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid3; + /// /// panelCenterRegion 控件。 ///