From 3867399b7ec58a23b1605c7d192a7d7a7f5c7183 Mon Sep 17 00:00:00 2001
From: gaofei1985 <181547018@qq.com>
Date: Sat, 24 May 2025 14:49:05 +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/Common/BaseInfo/Base_UnitService.cs | 16 +++
HJGL_DS/BLL/WeldMat/Stock/StockInService.cs | 2 +-
.../HJGL/WeldingReport/WelderPerformance.aspx | 3 +-
.../WeldingReport/WelderPerformance.aspx.cs | 106 ++++++++++++++++--
.../WelderPerformance.aspx.designer.cs | 9 ++
.../WeldMat/Stock/StockInEdit.aspx | 4 +-
.../WeldMat/Stock/StockInEdit.aspx.cs | 5 +
.../Stock/StockInEdit.aspx.designer.cs | 9 ++
.../WeldMat/UsingPlan/UsingPlan2.aspx.cs | 26 ++---
.../WeldMat/UsingPlan/UsingPlanEdit.aspx.cs | 10 +-
10 files changed, 165 insertions(+), 25 deletions(-)
diff --git a/HJGL_DS/BLL/Common/BaseInfo/Base_UnitService.cs b/HJGL_DS/BLL/Common/BaseInfo/Base_UnitService.cs
index 01208af..ea172ad 100644
--- a/HJGL_DS/BLL/Common/BaseInfo/Base_UnitService.cs
+++ b/HJGL_DS/BLL/Common/BaseInfo/Base_UnitService.cs
@@ -205,6 +205,22 @@
select x).ToList();
return q;
}
+
+ ///
+ /// 根据单位id获取单位信息
+ ///
+ ///
+ /// 一个单位有可能多种类型
+ ///
+ public static List GetAllUnits()
+ {
+ var q = (from x in Funs.DB.Base_Unit
+ join y in Funs.DB.Project_Unit on x.UnitId equals y.UnitId
+ orderby x.UnitCode
+ select x).Distinct().ToList();
+ return q;
+ }
+
///
/// 根据分包本单位类型ID获取单位项
///
diff --git a/HJGL_DS/BLL/WeldMat/Stock/StockInService.cs b/HJGL_DS/BLL/WeldMat/Stock/StockInService.cs
index 1d43042..53b86c6 100644
--- a/HJGL_DS/BLL/WeldMat/Stock/StockInService.cs
+++ b/HJGL_DS/BLL/WeldMat/Stock/StockInService.cs
@@ -115,7 +115,7 @@ namespace BLL
newStockIn.WeldId = stockIn.WeldId;
newStockIn.Amount = stockIn.Amount;
newStockIn.Weight = stockIn.Weight;
- //newStockIn.RecycleAmount = stockIn.RecycleAmount;
+ newStockIn.RecycleAmount = stockIn.RecycleAmount;
//newStockIn.RecycleWeight = stockIn.RecycleWeight;
//newStockIn.Materialman = stockIn.Materialman;
//newStockIn.InStockDate = stockIn.InStockDate;
diff --git a/HJGL_DS/FineUIPro.Web/HJGL/WeldingReport/WelderPerformance.aspx b/HJGL_DS/FineUIPro.Web/HJGL/WeldingReport/WelderPerformance.aspx
index 0245af5..edbc1bc 100644
--- a/HJGL_DS/FineUIPro.Web/HJGL/WeldingReport/WelderPerformance.aspx
+++ b/HJGL_DS/FineUIPro.Web/HJGL/WeldingReport/WelderPerformance.aspx
@@ -28,7 +28,7 @@
-
@@ -45,6 +45,7 @@
+
+ /// 绑定数据
+ ///
+ private void BindGrid3()
+ {
+ string projectIds = String.Join(",", drpProject.SelectedValueArray);
+ List listStr = new List();
+
+ if (this.drpIns.SelectedValue != BLL.Const._Null)
+ {
+ listStr.Add(new SqlParameter("@installationId", this.drpIns.SelectedValue));
+ }
+ else
+ {
+ listStr.Add(new SqlParameter("@installationId", null));
+ }
+
+ if (this.drpUnit.SelectedValue != BLL.Const._Null)
+ {
+ listStr.Add(new SqlParameter("@unitcode", this.drpUnit.SelectedValue));
+ }
+ else
+ {
+ listStr.Add(new SqlParameter("@unitcode", null));
+ }
+
+ if (this.drpSteel.SelectedValue != BLL.Const._Null)
+ {
+ listStr.Add(new SqlParameter("@steel", this.drpSteel.SelectedValue));
+ }
+ else
+ {
+ listStr.Add(new SqlParameter("@steel", null));
+ }
+ if (this.drpWloName.SelectedValue != BLL.Const._Null)
+ {
+ listStr.Add(new SqlParameter("@WED_ID", this.drpWloName.SelectedValue));
+ }
+ else
+ {
+ listStr.Add(new SqlParameter("@WED_ID", null));
+ }
+
+ if (!string.IsNullOrEmpty(this.txtStarTime.Text))
+ {
+ listStr.Add(new SqlParameter("@date1", Convert.ToDateTime(this.txtStarTime.Text)));
+ }
+ else
+ {
+ listStr.Add(new SqlParameter("@date1", null));
+ }
+
+ if (!string.IsNullOrEmpty(this.txtEndTime.Text))
+ {
+ listStr.Add(new SqlParameter("@date2", Convert.ToDateTime(this.txtEndTime.Text).AddDays(1)));
+ }
+ else
+ {
+ listStr.Add(new SqlParameter("@date2", null));
+ }
+
+ if (this.drpProject.SelectedValueArray.Length > 0 && this.drpProject.SelectedValueArray[0] != BLL.Const._Null)
+ {
+ listStr.Add(new SqlParameter("@projectId", projectIds));
+ }
+ else
+ {
+ listStr.Add(new SqlParameter("@projectId", null));
+ }
+
+ SqlParameter[] parameter = listStr.ToArray();
+ tb = SQLHelper.GetDataTableRunProc("HJGL_sp_rpt_welderPerformance3", parameter);
+ this.Grid1.RecordCount = tb.Rows.Count;
+ tb = GetFilteredTable(Grid1.FilteredData, tb);
+ var table = this.GetPagedDataTable(Grid1, tb);
+ Grid1.DataSource = table;
+ Grid1.DataBind();
+ }
#endregion
#region 分页
@@ -415,6 +494,19 @@
this.Grid1.SummaryData = null;
//OutputSummaryData();
}
+
+ ///
+ /// 统计
+ ///
+ ///
+ ///
+ protected void BtnAnalyse3_Click(object sender, EventArgs e)
+ {
+ this.Grid1.Columns[1].Hidden = true;
+ BindGrid3();
+ this.Grid1.SummaryData = null;
+ //OutputSummaryData();
+ }
#endregion
#region 导出按钮
@@ -482,7 +574,7 @@
protected void drpProject_OnSelectedIndexChanged(object sender, EventArgs e)
{
drpIns.Items.Clear();
- this.drpUnit.Items.Clear(); ///单位
+ //this.drpUnit.Items.Clear(); ///单位
this.drpWloName.Items.Clear(); ///焊工
if (drpProject.SelectedValueArray.Length > 1)
{
@@ -494,9 +586,9 @@
}
if (drpProject.SelectedValueArray.Length == 1 && this.drpProject.SelectedValueArray[0] != BLL.Const._Null)
{
- var pUnit = BLL.Base_UnitService.GetUnitsByProjectUnitType(drpProject.SelectedValueArray[0], BLL.Const.UnitType_4);
- this.drpUnit.DataSource = pUnit;
- this.drpUnit.DataBind();
+ //var pUnit = BLL.Base_UnitService.GetUnitsByProjectUnitType(drpProject.SelectedValueArray[0], BLL.Const.UnitType_4);
+ //this.drpUnit.DataSource = pUnit;
+ //this.drpUnit.DataBind();
this.drpIns.Items.Clear();
this.drpIns.DataTextField = "Text";
@@ -507,8 +599,8 @@
}
Funs.FineUIPleaseSelect(this.drpIns);
this.drpIns.SelectedValue = BLL.Const._Null;
- Funs.FineUIPleaseSelect(this.drpUnit);
- this.drpUnit.SelectedValue = BLL.Const._Null;
+ //Funs.FineUIPleaseSelect(this.drpUnit);
+ //this.drpUnit.SelectedValue = BLL.Const._Null;
this.drpWloName.DataTextField = "Text";
this.drpWloName.DataValueField = "Value";
if (drpProject.SelectedValueArray.Length == 1 && this.drpProject.SelectedValueArray[0] == BLL.Const._Null)
diff --git a/HJGL_DS/FineUIPro.Web/HJGL/WeldingReport/WelderPerformance.aspx.designer.cs b/HJGL_DS/FineUIPro.Web/HJGL/WeldingReport/WelderPerformance.aspx.designer.cs
index e1cd877..07d01f4 100644
--- a/HJGL_DS/FineUIPro.Web/HJGL/WeldingReport/WelderPerformance.aspx.designer.cs
+++ b/HJGL_DS/FineUIPro.Web/HJGL/WeldingReport/WelderPerformance.aspx.designer.cs
@@ -147,6 +147,15 @@ namespace FineUIPro.Web.HJGL.WeldingReport {
///
protected global::FineUIPro.ToolbarFill ToolbarFill1;
+ ///
+ /// BtnAnalyse3 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button BtnAnalyse3;
+
///
/// BtnAnalyse2 控件。
///
diff --git a/HJGL_DS/FineUIPro.Web/WeldMat/Stock/StockInEdit.aspx b/HJGL_DS/FineUIPro.Web/WeldMat/Stock/StockInEdit.aspx
index c98b077..cfc85fc 100644
--- a/HJGL_DS/FineUIPro.Web/WeldMat/Stock/StockInEdit.aspx
+++ b/HJGL_DS/FineUIPro.Web/WeldMat/Stock/StockInEdit.aspx
@@ -59,10 +59,12 @@
-
+
+
+
diff --git a/HJGL_DS/FineUIPro.Web/WeldMat/Stock/StockInEdit.aspx.cs b/HJGL_DS/FineUIPro.Web/WeldMat/Stock/StockInEdit.aspx.cs
index 1021b9d..6df1de1 100644
--- a/HJGL_DS/FineUIPro.Web/WeldMat/Stock/StockInEdit.aspx.cs
+++ b/HJGL_DS/FineUIPro.Web/WeldMat/Stock/StockInEdit.aspx.cs
@@ -129,6 +129,10 @@ namespace FineUIPro.Web.WeldMat.Stock
{
this.lbRemainingAmount.Text = stockIn.Weight.ToString();
}
+ if (stockIn.RecycleAmount != null)
+ {
+ this.txtRecycleAmount.Text = stockIn.RecycleAmount.Value.ToString("0.####");
+ }
}
}
}
@@ -207,6 +211,7 @@ namespace FineUIPro.Web.WeldMat.Stock
{
if (!string.IsNullOrEmpty(Request.Params["RemainingAmount"]))
{
+ stockIn.RecycleAmount = Funs.GetNewDecimal(this.txtRecycleAmount.Text.Trim());
BLL.StockInService.UpdateStockIn2(stockIn);
}
else
diff --git a/HJGL_DS/FineUIPro.Web/WeldMat/Stock/StockInEdit.aspx.designer.cs b/HJGL_DS/FineUIPro.Web/WeldMat/Stock/StockInEdit.aspx.designer.cs
index 03298c1..15c8848 100644
--- a/HJGL_DS/FineUIPro.Web/WeldMat/Stock/StockInEdit.aspx.designer.cs
+++ b/HJGL_DS/FineUIPro.Web/WeldMat/Stock/StockInEdit.aspx.designer.cs
@@ -156,6 +156,15 @@ namespace FineUIPro.Web.WeldMat.Stock {
///
protected global::FineUIPro.Label lbReAmount;
+ ///
+ /// txtRecycleAmount 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.NumberBox txtRecycleAmount;
+
///
/// drpUnitStore 控件。
///
diff --git a/HJGL_DS/FineUIPro.Web/WeldMat/UsingPlan/UsingPlan2.aspx.cs b/HJGL_DS/FineUIPro.Web/WeldMat/UsingPlan/UsingPlan2.aspx.cs
index ce2e90d..06e934d 100644
--- a/HJGL_DS/FineUIPro.Web/WeldMat/UsingPlan/UsingPlan2.aspx.cs
+++ b/HJGL_DS/FineUIPro.Web/WeldMat/UsingPlan/UsingPlan2.aspx.cs
@@ -21,19 +21,19 @@ namespace FineUIPro.Web.WeldMat.UsingPlan
{
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
- string lastPlan = @"SELECT p.UsingPlanId FROM dbo.Weld_UsingPlan p
- WHERE p.OrderDate 0)
- {
- for (int i = 0; i < dt.Rows.Count; i++)
- {
- string usingPlanId = dt.Rows[i]["UsingPlanId"].ToString();
- BLL.UsingPlanService.UpdateIsCancel(usingPlanId, "超时未领用");
- }
- }
+ //string lastPlan = @"SELECT p.UsingPlanId FROM dbo.Weld_UsingPlan p
+ // WHERE p.OrderDate 0)
+ //{
+ // for (int i = 0; i < dt.Rows.Count; i++)
+ // {
+ // string usingPlanId = dt.Rows[i]["UsingPlanId"].ToString();
+ // BLL.UsingPlanService.UpdateIsCancel(usingPlanId, "超时未领用");
+ // }
+ //}
// 绑定表格
BindGrid();
diff --git a/HJGL_DS/FineUIPro.Web/WeldMat/UsingPlan/UsingPlanEdit.aspx.cs b/HJGL_DS/FineUIPro.Web/WeldMat/UsingPlan/UsingPlanEdit.aspx.cs
index b0b48d2..b03db91 100644
--- a/HJGL_DS/FineUIPro.Web/WeldMat/UsingPlan/UsingPlanEdit.aspx.cs
+++ b/HJGL_DS/FineUIPro.Web/WeldMat/UsingPlan/UsingPlanEdit.aspx.cs
@@ -373,8 +373,14 @@ namespace FineUIPro.Web.WeldMat.UsingPlan
{
usingPlan.TeamGroupId = this.drpTeamGroup.SelectedValue;
}
-
- usingPlan.CancelDate = Funs.GetNewDateTime(this.txtCancelDate.Text.Trim());
+ if (!string.IsNullOrEmpty(this.txtCancelDate.Text.Trim()))
+ {
+ usingPlan.CancelDate = DateTime.Now;
+ }
+ else
+ {
+ usingPlan.CancelDate = null;
+ }
usingPlan.IsCancel = Convert.ToBoolean(this.rblIsCancel.SelectedValue);
usingPlan.CancelResult = this.txtCancelResult.Text.Trim();
usingPlan.IsSubmit = isSubmit;