diff --git a/DataBase/版本日志/SGGLDB_V2025-03-17-001-gaofei.sql b/DataBase/版本日志/SGGLDB_V2025-03-17-001-gaofei.sql
index c0ea97e..ec34693 100644
--- a/DataBase/版本日志/SGGLDB_V2025-03-17-001-gaofei.sql
+++ b/DataBase/版本日志/SGGLDB_V2025-03-17-001-gaofei.sql
@@ -5,7 +5,7 @@ AS
select distinct C.BaseId,C.ProjectId,case when a.DrawingNo is not null then a.WorkSection else b.WorkSection end as WorkSection,case when a.DrawingNo is not null then a.DrawingNo else b.ChangeNo end as DrawingNo,
case when a.DrawingName is not null then a.DrawingName else b.ChangeName end as DrawingName,ba.State,
- case when a.DrawingNo is not null then ca.ProfessionalName else cb.ProfessionalName end as Major,ba.DrawingId
+ case when a.DrawingNo is not null then ca.ProfessionalName else cb.ProfessionalName end as Major,ba.DrawingId,
Part,ProjectContent,Unit,Amount,t.TeamGroupName as WorkTeam,C.WorkTeam as WorkTeamId
from QuantityManagement_DayInput C
left join QuantityManagement_Base ba on ba.BaseId=C.BaseId
@@ -17,7 +17,7 @@ select distinct C.BaseId,C.ProjectId,case when a.DrawingNo is not null then a.Wo
union
select BaseId,C.ProjectId,case when a.DrawingNo is not null then a.WorkSection else b.WorkSection end as WorkSection,case when a.DrawingNo is not null then a.DrawingNo else b.ChangeNo end as DrawingNo,
case when a.DrawingName is not null then a.DrawingName else b.ChangeName end as DrawingName,C.State,
- case when a.DrawingNo is not null then ca.ProfessionalName else cb.ProfessionalName end as Major,C.DrawingId
+ case when a.DrawingNo is not null then ca.ProfessionalName else cb.ProfessionalName end as Major,C.DrawingId,
Part,ProjectContent,Unit,Amount,t.TeamGroupName as WorkTeam,C.WorkTeam as WorkTeamId
from QuantityManagement_Base C
left join QuantityManagement_Drawing a on a.DrawingId=C.DrawingId
@@ -30,3 +30,34 @@ select BaseId,C.ProjectId,case when a.DrawingNo is not null then a.WorkSection e
GO
+
+ALTER VIEW [dbo].[View_QuantityManagement_WorkTeamStatistics]
+AS
+/********弰ܱ********/
+
+select distinct C.ProjectId+','+(case when a.DrawingNo is not null then a.WorkSection else b.WorkSection end)+','+ProjectContent+','+t.TeamGroupName as Id, C.ProjectId,case when a.DrawingNo is not null then a.WorkSection else b.WorkSection end as WorkSection,ba.State,
+ ProjectContent,Unit,t.TeamGroupName as WorkTeam,C.WorkTeam as WorkTeamId,
+ case when a.DrawingNo is not null then ca.ProfessionalName else cb.ProfessionalName end as Major
+ from QuantityManagement_DayInput C
+ left join QuantityManagement_Base ba on ba.BaseId=C.BaseId
+ left join QuantityManagement_Drawing a on a.DrawingId=ba.DrawingId
+ left join Base_CNProfessional ca on ca.CNProfessionalId=a.Major
+ left join QuantityManagement_Change b on b.ChangeId=ba.DrawingId
+ left join Base_CNProfessional cb on cb.CNProfessionalId=b.Major
+ left join ProjectData_TeamGroup t on t.TeamGroupId=C.WorkTeam
+union
+select C.ProjectId+','+(case when a.DrawingNo is not null then a.WorkSection else b.WorkSection end)+','+ProjectContent+','+t.TeamGroupName as Id,C.ProjectId,case when a.DrawingNo is not null then a.WorkSection else b.WorkSection end as WorkSection,C.State,
+ ProjectContent,Unit,t.TeamGroupName as WorkTeam,C.WorkTeam as WorkTeamId,
+ case when a.DrawingNo is not null then ca.ProfessionalName else cb.ProfessionalName end as Major
+ from QuantityManagement_Base C
+ left join QuantityManagement_Drawing a on a.DrawingId=C.DrawingId
+ left join Base_CNProfessional ca on ca.CNProfessionalId=a.Major
+ left join QuantityManagement_Change b on b.ChangeId=C.DrawingId
+ left join Base_CNProfessional cb on cb.CNProfessionalId=b.Major
+ left join ProjectData_TeamGroup t on t.TeamGroupId=C.WorkTeam
+
+
+
+GO
+
+
diff --git a/SGGL/BLL/CQMS/QuantityManagement/DrawingService.cs b/SGGL/BLL/CQMS/QuantityManagement/DrawingService.cs
index e1c27fe..0351057 100644
--- a/SGGL/BLL/CQMS/QuantityManagement/DrawingService.cs
+++ b/SGGL/BLL/CQMS/QuantityManagement/DrawingService.cs
@@ -121,6 +121,40 @@ namespace BLL
}
}
+ ///
+ /// 图纸登记下拉框
+ ///
+ /// 下拉框名字
+ /// 是否显示请选择
+ public static void InitDrawingChangeDropDownList2(FineUIPro.DropDownList dropName, string projectId, string workSection, bool isShowPlease)
+ {
+ dropName.DataValueField = "Value";
+ dropName.DataTextField = "Text";
+ dropName.DataSource = GetDrawingChangeListByProjectId(projectId, workSection);
+ dropName.DataBind();
+ if (isShowPlease)
+ {
+ Funs.FineUIPleaseSelect(dropName);
+ }
+ }
+
+ ///
+ /// 图纸登记下拉框
+ ///
+ /// 下拉框名字
+ /// 是否显示请选择
+ public static void InitWorkSectionDropDownList(FineUIPro.DropDownList dropName, string projectId, bool isShowPlease)
+ {
+ dropName.DataValueField = "Value";
+ dropName.DataTextField = "Text";
+ dropName.DataSource = GetInitWorkSectionDropDownListListByProjectId(projectId);
+ dropName.DataBind();
+ if (isShowPlease)
+ {
+ Funs.FineUIPleaseSelect(dropName);
+ }
+ }
+
///
/// 根据项目Id获取图纸登记下拉选择项
///
@@ -167,5 +201,63 @@ namespace BLL
return list;
}
}
+
+ ///
+ /// 根据项目Id获取图纸登记下拉选择项
+ ///
+ ///
+ ///
+ public static ListItem[] GetDrawingChangeListByProjectId(string projectId, string workSection)
+ {
+ using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
+ {
+ var q1 = (from x in db.QuantityManagement_Drawing
+ where x.ProjectId == projectId && x.WorkSection == workSection
+ orderby x.DrawingNo
+ select x).ToList();
+ var q2 = (from x in db.QuantityManagement_Change
+ where x.ProjectId == projectId && x.WorkSection == workSection
+ orderby x.ChangeNo
+ select x).ToList();
+ ListItem[] list = new ListItem[q1.Count() + q2.Count()];
+ for (int i = 0; i < q1.Count(); i++)
+ {
+ list[i] = new ListItem(q1[i].DrawingNo ?? "", q1[i].DrawingId.ToString());
+ }
+ for (int j = q1.Count(); j < q1.Count() + q2.Count(); j++)
+ {
+ list[j] = new ListItem(q2[j - q1.Count()].ChangeNo ?? "", q2[j - q1.Count()].ChangeId.ToString());
+ }
+ return list;
+ }
+ }
+
+ ///
+ /// 根据项目Id获取图纸登记下拉选择项
+ ///
+ ///
+ ///
+ public static ListItem[] GetInitWorkSectionDropDownListListByProjectId(string projectId)
+ {
+ using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
+ {
+ var q1 = (from x in db.QuantityManagement_Drawing
+ where x.ProjectId == projectId
+ orderby x.WorkSection
+ select x.WorkSection).ToList();
+ var q2 = (from x in db.QuantityManagement_Change
+ where x.ProjectId == projectId
+ orderby x.WorkSection
+ select x.WorkSection).ToList();
+ q1.AddRange(q2);
+ q1 = q1.Distinct().ToList();
+ ListItem[] list = new ListItem[q1.Count()];
+ for (int i = 0; i < q1.Count(); i++)
+ {
+ list[i] = new ListItem(q1[i], q1[i]);
+ }
+ return list;
+ }
+ }
}
}
diff --git a/SGGL/FineUIPro.Web/CQMS/QuantityManagement/DayInputStatistics.aspx b/SGGL/FineUIPro.Web/CQMS/QuantityManagement/DayInputStatistics.aspx
index 8826869..2756c4d 100644
--- a/SGGL/FineUIPro.Web/CQMS/QuantityManagement/DayInputStatistics.aspx
+++ b/SGGL/FineUIPro.Web/CQMS/QuantityManagement/DayInputStatistics.aspx
@@ -25,10 +25,18 @@
-
+
-
-
+
+
+
+
+
+
+
+
+
+
diff --git a/SGGL/FineUIPro.Web/CQMS/QuantityManagement/DayInputStatistics.aspx.cs b/SGGL/FineUIPro.Web/CQMS/QuantityManagement/DayInputStatistics.aspx.cs
index ab8af6e..4d31b73 100644
--- a/SGGL/FineUIPro.Web/CQMS/QuantityManagement/DayInputStatistics.aspx.cs
+++ b/SGGL/FineUIPro.Web/CQMS/QuantityManagement/DayInputStatistics.aspx.cs
@@ -110,19 +110,38 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
{
if (!IsPostBack)
{
- BLL.DrawingService.InitDrawingChangeDropDownList(drpDrawingNo, this.CurrUser.LoginProjectId, true);
- //BLL.TeamGroupService.InitTeamGroupProjectDropDownList(drpWorkTeam, this.CurrUser.LoginProjectId, true);
- if (!string.IsNullOrEmpty(Request.Params["DrawingNo"]))
+ BLL.DrawingService.InitWorkSectionDropDownList(drpWorkSection, this.CurrUser.LoginProjectId, true);
+ BLL.CNProfessionalService.InitCNProfessionalDownList(drpMajor, true);
+ BLL.TeamGroupService.InitTeamGroupProjectDropDownList(drpWorkTeam, this.CurrUser.LoginProjectId, true);
+ Funs.FineUIPleaseSelect(this.drpDrawingNo);
+ Funs.FineUIPleaseSelect(this.drpPart);
+ Funs.FineUIPleaseSelect(this.drpProjectContent);
+ if (!string.IsNullOrEmpty(Request.Params["WorkSection"]))
{
- this.drpDrawingNo.SelectedValue = Request.Params["DrawingNo"];
+ this.drpWorkSection.SelectedValue = Request.Params["WorkSection"];
+ BLL.DrawingService.InitDrawingChangeDropDownList2(drpDrawingNo, this.CurrUser.LoginProjectId, Request.Params["WorkSection"], true);
+ }
+ if (!string.IsNullOrEmpty(Request.Params["DrawingId"]))
+ {
+ this.drpDrawingNo.SelectedValue = Request.Params["DrawingId"];
+ BLL.BaseService.InitPartDropDownList(this.drpPart, Request.Params["DrawingId"], true);
+ }
+ if (!string.IsNullOrEmpty(Request.Params["Major"]))
+ {
+ this.drpMajor.SelectedValue = Request.Params["Major"];
}
if (!string.IsNullOrEmpty(Request.Params["Part"]))
{
- this.txtPart.Text = Request.Params["Part"];
+ this.drpPart.SelectedValue = Request.Params["Part"];
+ BLL.BaseService.InitProjectContentDropDownList(this.drpProjectContent, this.drpDrawingNo.SelectedValue, this.drpPart.SelectedValue, true);
}
if (!string.IsNullOrEmpty(Request.Params["ProjectContent"]))
{
- this.txtProjectContent.Text = Request.Params["ProjectContent"];
+ this.drpProjectContent.SelectedValue = Request.Params["ProjectContent"];
+ }
+ if (!string.IsNullOrEmpty(Request.Params["WorkTeam"]))
+ {
+ this.drpWorkTeam.SelectedValue = Request.Params["WorkTeam"];
}
ProjectService.InitAllProjectDropDownList(this.drpProject, false);
if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
@@ -149,20 +168,35 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
where C.ProjectId = @ProjectId";
List listStr = new List();
listStr.Add(new SqlParameter("@ProjectId", this.drpProject.SelectedValue));
+ if (this.drpWorkSection.SelectedValue != BLL.Const._Null)
+ {
+ strSql += " AND WorkSection = @WorkSection";
+ listStr.Add(new SqlParameter("@WorkSection", this.drpWorkSection.SelectedItem.Text));
+ }
if (this.drpDrawingNo.SelectedValue != BLL.Const._Null)
{
- strSql += " AND DrawingNo = @DrawingNo";
- listStr.Add(new SqlParameter("@DrawingNo", this.drpDrawingNo.SelectedItem.Text));
+ strSql += " AND DrawingId = @DrawingId";
+ listStr.Add(new SqlParameter("@DrawingId", this.drpDrawingNo.SelectedValue));
}
- if (!string.IsNullOrEmpty(this.txtPart.Text.Trim()))
+ if (this.drpMajor.SelectedValue != BLL.Const._Null)
{
- strSql += " AND Part like @Part";
- listStr.Add(new SqlParameter("@Part", "%" + this.txtPart.Text.Trim() + "%"));
+ strSql += " AND Major = @Major";
+ listStr.Add(new SqlParameter("@Major", this.drpMajor.SelectedItem.Text));
}
- if (!string.IsNullOrEmpty(this.txtProjectContent.Text.Trim()))
+ if (this.drpPart.SelectedValue != BLL.Const._Null)
{
- strSql += " AND ProjectContent like @ProjectContent";
- listStr.Add(new SqlParameter("@ProjectContent", "%" + this.txtProjectContent.Text.Trim() + "%"));
+ strSql += " AND Part = @Part";
+ listStr.Add(new SqlParameter("@Part", this.drpPart.SelectedItem.Text));
+ }
+ if (this.drpProjectContent.SelectedValue != BLL.Const._Null)
+ {
+ strSql += " AND ProjectContent = @ProjectContent";
+ listStr.Add(new SqlParameter("@ProjectContent", this.drpProjectContent.SelectedItem.Text));
+ }
+ if (this.drpWorkTeam.SelectedValue != BLL.Const._Null)
+ {
+ strSql += " AND WorkTeam = @WorkTeam";
+ listStr.Add(new SqlParameter("@WorkTeam", this.drpWorkTeam.SelectedItem.Text));
}
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
@@ -339,8 +373,9 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
///
protected void btnSearch_Click(object sender, EventArgs e)
{
- string url = "~/CQMS/QuantityManagement/DayInputStatistics.aspx?Date=" + this.txtMonths.Text.Trim() + "&DrawingId=" + this.drpDrawingNo.SelectedValue
- + "&Part=" + this.txtPart.Text.Trim() + "&ProjectContent=" + this.txtProjectContent.Text.Trim() + "&ProjectId=" + this.drpProject.SelectedValue;
+ string url = "~/CQMS/QuantityManagement/DayInputStatistics.aspx?Date=" + this.txtMonths.Text.Trim() + "&WorkSection=" + this.drpWorkSection.SelectedValue
+ + "&DrawingId=" + this.drpDrawingNo.SelectedValue + "&Major=" + this.drpMajor.SelectedValue + "&Part=" + this.drpPart.SelectedValue
+ + "&ProjectContent=" + this.drpProjectContent.SelectedValue+ "&WorkTeam=" + this.drpWorkTeam.SelectedValue + "&ProjectId=" + this.drpProject.SelectedValue;
PageContext.Redirect(url, "_self");
}
#endregion
@@ -616,38 +651,58 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
}
#endregion
- protected void drpDrawingNo_SelectedIndexChanged(object sender, EventArgs e)
+ protected void drpWorkSection_SelectedIndexChanged(object sender, EventArgs e)
{
- Model.QuantityManagement_Drawing drawing = BLL.DrawingService.GetDrawingById(this.drpDrawingNo.SelectedValue);
- Model.QuantityManagement_Change change = BLL.ChangeService.GetChangeById(this.drpDrawingNo.SelectedValue);
- if (drawing != null)
+ if (this.drpWorkSection.SelectedValue != BLL.Const._Null)
{
- //this.txtWorkSection.Text = drawing.WorkSection;
- //this.txtDrawingName.Text = drawing.DrawingName;
- //BLL.BaseService.InitPartDropDownList(this.drpPart, drawing.DrawingId, true);
- //this.drpPart.SelectedValue = BLL.Const._Null;
- }
- else if (change != null)
- {
- //this.txtWorkSection.Text = change.WorkSection;
- //this.txtDrawingName.Text = change.ChangeName;
- //BLL.BaseService.InitPartDropDownList(this.drpPart, change.ChangeId, true);
- //this.drpPart.SelectedValue = BLL.Const._Null;
+ BLL.DrawingService.InitDrawingChangeDropDownList2(drpDrawingNo, this.CurrUser.LoginProjectId, this.drpWorkSection.SelectedValue, true);
+ this.drpDrawingNo.SelectedValue = BLL.Const._Null;
}
else
{
- //this.txtWorkSection.Text = string.Empty;
- //this.txtDrawingName.Text = string.Empty;
- //this.drpPart.Items.Clear();
- //Funs.FineUIPleaseSelect(this.drpPart);
- //this.drpPart.SelectedValue = BLL.Const._Null;
+ drpDrawingNo.Items.Clear();
+ Funs.FineUIPleaseSelect(drpDrawingNo);
+ this.drpDrawingNo.SelectedValue = BLL.Const._Null;
+ }
+ drpPart.Items.Clear();
+ Funs.FineUIPleaseSelect(drpPart);
+ this.drpPart.SelectedValue = BLL.Const._Null;
+ drpProjectContent.Items.Clear();
+ Funs.FineUIPleaseSelect(drpProjectContent);
+ this.drpProjectContent.SelectedValue = BLL.Const._Null;
+ }
+
+ protected void drpDrawingNo_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ if (this.drpDrawingNo.SelectedValue != BLL.Const._Null)
+ {
+ BLL.BaseService.InitPartDropDownList(this.drpPart, this.drpDrawingNo.SelectedValue, true);
+ this.drpPart.SelectedValue = BLL.Const._Null;
+ }
+ else
+ {
+ drpPart.Items.Clear();
+ Funs.FineUIPleaseSelect(drpPart);
+ this.drpPart.SelectedValue = BLL.Const._Null;
+ }
+ drpProjectContent.Items.Clear();
+ Funs.FineUIPleaseSelect(drpProjectContent);
+ this.drpProjectContent.SelectedValue = BLL.Const._Null;
+ }
+
+ protected void drpPart_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ if (this.drpPart.SelectedValue != BLL.Const._Null)
+ {
+ BLL.BaseService.InitProjectContentDropDownList(this.drpProjectContent, this.drpDrawingNo.SelectedValue, this.drpPart.SelectedValue, true);
+ this.drpProjectContent.SelectedValue = BLL.Const._Null;
+ }
+ else
+ {
+ drpProjectContent.Items.Clear();
+ Funs.FineUIPleaseSelect(drpProjectContent);
+ this.drpProjectContent.SelectedValue = BLL.Const._Null;
}
- //this.drpProjectContent.Items.Clear();
- //Funs.FineUIPleaseSelect(this.drpProjectContent);
- //this.drpProjectContent.SelectedValue = BLL.Const._Null;
- //this.txtUnit.Text = string.Empty;
- //this.txtAmount.Text = string.Empty;
- //this.drpWorkTeam.SelectedValue = BLL.Const._Null;
}
}
}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/CQMS/QuantityManagement/DayInputStatistics.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/QuantityManagement/DayInputStatistics.aspx.designer.cs
index 7ff7635..e333362 100644
--- a/SGGL/FineUIPro.Web/CQMS/QuantityManagement/DayInputStatistics.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/CQMS/QuantityManagement/DayInputStatistics.aspx.designer.cs
@@ -66,6 +66,15 @@ namespace FineUIPro.Web.CQMS.QuantityManagement {
///
protected global::FineUIPro.DropDownList drpProject;
+ ///
+ /// drpWorkSection 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpWorkSection;
+
///
/// drpDrawingNo 控件。
///
@@ -76,22 +85,40 @@ namespace FineUIPro.Web.CQMS.QuantityManagement {
protected global::FineUIPro.DropDownList drpDrawingNo;
///
- /// txtPart 控件。
+ /// drpMajor 控件。
///
///
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
- protected global::FineUIPro.TextBox txtPart;
+ protected global::FineUIPro.DropDownList drpMajor;
///
- /// txtProjectContent 控件。
+ /// drpPart 控件。
///
///
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
- protected global::FineUIPro.TextBox txtProjectContent;
+ protected global::FineUIPro.DropDownList drpPart;
+
+ ///
+ /// drpProjectContent 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpProjectContent;
+
+ ///
+ /// drpWorkTeam 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpWorkTeam;
///
/// txtMonths 控件。
diff --git a/SGGL/FineUIPro.Web/CQMS/QuantityManagement/WorkTeamStatistics.aspx b/SGGL/FineUIPro.Web/CQMS/QuantityManagement/WorkTeamStatistics.aspx
index 14319ee..53fff5f 100644
--- a/SGGL/FineUIPro.Web/CQMS/QuantityManagement/WorkTeamStatistics.aspx
+++ b/SGGL/FineUIPro.Web/CQMS/QuantityManagement/WorkTeamStatistics.aspx
@@ -48,6 +48,9 @@
+
+
@@ -79,7 +82,7 @@