From b10af2e3314bee4103d52a4e093442f8f01ee051 Mon Sep 17 00:00:00 2001
From: gaofei1985 <181547018@qq.com>
Date: Thu, 27 Mar 2025 15:22:48 +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
---
SGGL/BLL/ZHGL/RealName/SynchroSetService.cs | 9 +-
SGGL/FineUIPro.Web/DataShow/JD.aspx | 65 ++++++++-
SGGL/FineUIPro.Web/DataShow/JD.aspx.cs | 131 +++++++++++++++++-
.../DataShow/JD.aspx.designer.cs | 81 +++++++++++
SGGL/FineUIPro.Web/FineUIPro.Web.csproj | 2 +-
SGGL/WebAPI/WebAPI.csproj.user | 2 +-
6 files changed, 277 insertions(+), 13 deletions(-)
diff --git a/SGGL/BLL/ZHGL/RealName/SynchroSetService.cs b/SGGL/BLL/ZHGL/RealName/SynchroSetService.cs
index f3c71dd6..4a0bc23c 100644
--- a/SGGL/BLL/ZHGL/RealName/SynchroSetService.cs
+++ b/SGGL/BLL/ZHGL/RealName/SynchroSetService.cs
@@ -1444,10 +1444,10 @@ namespace BLL
string contenttype = "application/json;charset=unicode";
var getData = (from x in Funs.DB.SitePerson_Person
join y in Funs.DB.Base_Project on x.ProjectId equals y.ProjectId
- join z in Funs.DB.RealName_Project on y.ContractNo equals z.ProCode
+ join z in Funs.DB.RealName_Project on y.JTProjectCode equals z.ProCode
join v in Funs.DB.ProjectData_TeamGroup on x.TeamGroupId equals v.TeamGroupId
join w in Funs.DB.Base_WorkPost on x.WorkPostId equals w.WorkPostId
- where x.IdentityCard == identityCard && y.ContractNo == proCode
+ where x.IdentityCard == identityCard && y.JTProjectCode == proCode
&& v.TeamId.HasValue && z.JTproCode != null
&& ((type == Const.BtnAdd && x.HeadImage != null && x.HeadImage.Length > 0) || (type == Const.BtnModify && x.RealNameAddTime.HasValue))
select new
@@ -1507,7 +1507,7 @@ namespace BLL
pushContent = JsonConvert.SerializeObject(addlistObject);
returndata = BLL.APIGetHttpService.OutsideHttp(Funs.RealNameApiUrl + "/foreignApi/accept/persons", "POST", contenttype, newToken, pushContent);
}
-
+ InsertRealNamePushLog(null, proCode, "推送人员数据", sucess, code, mess, returndata, pushContent);
if (!string.IsNullOrEmpty(returndata))
{
JObject obj = JObject.Parse(returndata);
@@ -1545,8 +1545,7 @@ namespace BLL
}
}
}
-
- InsertRealNamePushLog(null, proCode, "推送人员数据", sucess, code, mess, data, pushContent);
+ //InsertRealNamePushLog(null, proCode, "推送人员数据", sucess, code, mess, data, pushContent);
if (data.Contains("已存在") || mess.Contains("已存在"))
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
diff --git a/SGGL/FineUIPro.Web/DataShow/JD.aspx b/SGGL/FineUIPro.Web/DataShow/JD.aspx
index b221328e..717af060 100644
--- a/SGGL/FineUIPro.Web/DataShow/JD.aspx
+++ b/SGGL/FineUIPro.Web/DataShow/JD.aspx
@@ -23,8 +23,8 @@
-
@@ -56,10 +56,16 @@
-
-
+
+
+
+
@@ -77,6 +83,57 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SGGL/FineUIPro.Web/DataShow/JD.aspx.cs b/SGGL/FineUIPro.Web/DataShow/JD.aspx.cs
index 259ab5a7..35ca7424 100644
--- a/SGGL/FineUIPro.Web/DataShow/JD.aspx.cs
+++ b/SGGL/FineUIPro.Web/DataShow/JD.aspx.cs
@@ -14,16 +14,40 @@ namespace FineUIPro.Web.DataShow
if (!IsPostBack)
{
Funs.DropDownPageSize(this.ddlPageSize);
+ Funs.DropDownPageSize(this.ddlPageSize2);
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
+ ddlPageSize2.SelectedValue = Grid2.PageSize.ToString();
BLL.ProjectService.InitProjectDropDownList(this.drpProject, true);
+ BLL.ProjectService.InitProjectDropDownList(this.drpProject2, true);
BindGrid1();
}
}
private void BindGrid1()
{
- string strSql = @"select ProjectId,ProjectCode, ProjectName,(select sum(isnull(RealNum,0)) from JDGL_ProgressCompletion a where a.ProjectId=p.ProjectId) as RealNum
- from Base_Project p where ProjectState =1 ";
+ string strSql = @"select p.ProjectId,ProjectCode, ProjectName,(select sum(isnull(RealNum,0)) from JDGL_ProgressCompletion a where a.ProjectId=p.ProjectId) as RealNum,
+ cast((case when isnull(MonthPlan.MonthPlanNum,0)=0 then 0 else isnull(MonthPlanOK.MonthPlanOKNum,0)/(1.0 *isnull(MonthPlan.MonthPlanNum,0))*100 end) as DECIMAL(19,2)) as MonthPlanRate,
+ cast((case when isnull(WeekPlan.WeekPlanNum,0)=0 then 0 else isnull(WeekPlanOK.WeekPlanOKNum,0)/(1.0 *isnull(WeekPlan.WeekPlanNum,0))*100 end) as DECIMAL(19,2)) as WeekPlanRate
+ from Base_Project p
+ left join (
+ SELECT COUNT(w.WeekPlanId) AS WeekPlanNum,w.ProjectId FROM JDGL_WeekPlan w
+ GROUP BY w.ProjectId
+ ) AS WeekPlan ON WeekPlan.ProjectId=p.ProjectId
+ left join (
+ SELECT COUNT(w.WeekPlanId) AS WeekPlanOKNum,w.ProjectId FROM JDGL_WeekPlan w
+ where w.IsOK=1
+ GROUP BY w.ProjectId
+ ) AS WeekPlanOK ON WeekPlanOK.ProjectId=p.ProjectId
+left join (
+ SELECT COUNT(w.MonthPlanId) AS MonthPlanNum,w.ProjectId FROM JDGL_MonthPlan w
+ GROUP BY w.ProjectId
+ ) AS MonthPlan ON MonthPlan.ProjectId=p.ProjectId
+ left join (
+ SELECT COUNT(w.MonthPlanId) AS MonthPlanOKNum,w.ProjectId FROM JDGL_MonthPlan w
+ where w.RealDate is not null and w.RealDate<=w.PlanDate
+ GROUP BY w.ProjectId
+ ) AS MonthPlanOK ON MonthPlanOK.ProjectId=p.ProjectId
+ where ProjectState =1 ";
List listStr = new List();
string cpara = string.Empty;
if (this.drpProject.SelectedValue != Const._Null)
@@ -39,6 +63,58 @@ namespace FineUIPro.Web.DataShow
Grid1.DataBind();
}
+ ///
+ /// 绑定数据
+ ///
+ private void BindGrid2()
+ {
+ //string strSql = @"select ProjectId,ProjectCode, ProjectName from Base_Project where ProjectState =1 ";
+ //List listStr = new List();
+ //string cpara = string.Empty;
+ //if (this.drpProject2.SelectedValue != Const._Null)
+ //{
+ // strSql += " AND projectId = @projectId"; ///状态为已完成
+ // listStr.Add(new SqlParameter("@projectId", this.drpProject2.SelectedValue));
+ //}
+
+ //SqlParameter[] parameter = listStr.ToArray();
+ //DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
+ //Grid2.RecordCount = tb.Rows.Count;
+ //var table = this.GetPagedDataTable(Grid2, tb);
+ //Grid2.DataSource = table;
+ //Grid2.DataBind();
+
+ DataTable table = new DataTable();
+ table.Columns.Add(new DataColumn("BaseId", typeof(String)));
+ table.Columns.Add(new DataColumn("SupId", typeof(String)));
+ table.Columns.Add(new DataColumn("Name", typeof(String)));
+ table.Columns.Add(new DataColumn("ProjectId", typeof(String)));
+ table.Columns.Add(new DataColumn("DrawingNo", typeof(String)));
+ table.Columns.Add(new DataColumn("DrawingName", typeof(String)));
+ table.Columns.Add(new DataColumn("Part", typeof(String)));
+ table.Columns.Add(new DataColumn("ProjectContent", typeof(String)));
+ table.Columns.Add(new DataColumn("Unit", typeof(String)));
+ table.Columns.Add(new DataColumn("Amount", typeof(decimal)));
+ table.Columns.Add(new DataColumn("WorkTeam", typeof(String)));
+ table.Columns.Add(new DataColumn("State", typeof(String)));
+
+ DataRow row;
+ row = table.NewRow();
+ row[0] = "0";
+ row[1] = null;
+ row[2] = "工程量基础表";
+ row[3] = "";
+ row[4] = "";
+ row[5] = "";
+ row[6] = "";
+ row[7] = "";
+ row[8] = "";
+ row[9] = DBNull.Value;
+ row[10] = "";
+ row[11] = "";
+ table.Rows.Add(row);
+ }
+
#region 查询
///
/// 查询
@@ -82,6 +158,57 @@ namespace FineUIPro.Web.DataShow
Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
BindGrid1();
}
+
+ ///
+ /// 查询
+ ///
+ ///
+ ///
+ protected void TextBox2_TextChanged(object sender, EventArgs e)
+ {
+ this.BindGrid2();
+ }
#endregion
+
+ #region 表排序、分页、关闭窗口
+ ///
+ /// 分页
+ ///
+ ///
+ ///
+ protected void Grid2_PageIndexChange(object sender, GridPageEventArgs e)
+ {
+ BindGrid2();
+ }
+
+ ///
+ /// 排序
+ ///
+ ///
+ ///
+ protected void Grid2_Sort(object sender, GridSortEventArgs e)
+ {
+ BindGrid2();
+ }
+
+ ///
+ /// 分页显示条数下拉框
+ ///
+ ///
+ ///
+ protected void ddlPageSize2_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ Grid2.PageSize = Convert.ToInt32(ddlPageSize2.SelectedValue);
+ BindGrid2();
+ }
+ #endregion
+
+ protected void TabStrip1_TabIndexChanged(object sender, EventArgs e)
+ {
+ if (TabStrip1.ActiveTabIndex == 1)
+ {
+ BindGrid2();
+ }
+ }
}
}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/DataShow/JD.aspx.designer.cs b/SGGL/FineUIPro.Web/DataShow/JD.aspx.designer.cs
index 37fd77ce..5634ecf5 100644
--- a/SGGL/FineUIPro.Web/DataShow/JD.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/DataShow/JD.aspx.designer.cs
@@ -138,6 +138,87 @@ namespace FineUIPro.Web.DataShow {
///
protected global::FineUIPro.Tab Tab2;
+ ///
+ /// Grid2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Grid Grid2;
+
+ ///
+ /// Toolbar1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar Toolbar1;
+
+ ///
+ /// drpProject2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpProject2;
+
+ ///
+ /// Button1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button Button1;
+
+ ///
+ /// Label1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label Label1;
+
+ ///
+ /// lblPlanNum 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label lblPlanNum;
+
+ ///
+ /// ToolbarSeparator2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarSeparator ToolbarSeparator2;
+
+ ///
+ /// ToolbarText2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarText ToolbarText2;
+
+ ///
+ /// ddlPageSize2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList ddlPageSize2;
+
///
/// Tab3 控件。
///
diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
index 30d31f89..c21d940b 100644
--- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
+++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
@@ -19814,7 +19814,7 @@
-
+