From ea313cbbba9d95f879cc628c6877ca3963a4f0ae Mon Sep 17 00:00:00 2001 From: gaofei1985 <181547018@qq.com> Date: Thu, 24 Jul 2025 16:43:15 +0800 Subject: [PATCH] 1 --- DataBase/版本日志/HJGLDB_DS_2025-07-24_gf.sql | 2 ++ HJGL_DS/BLL/API/APIBaseServices.cs | 2 +- .../BLL/WeldMat/BaseInfo/WeldInfoService.cs | 2 ++ HJGL_DS/FineUIPro.Web/ErrLog.txt | 18 ++++++++++++++ HJGL_DS/FineUIPro.Web/Web.config | 2 +- .../WeldMat/BaseInfo/WeldInfo.aspx | 1 + .../WeldMat/BaseInfo/WeldInfo.aspx.cs | 17 ++++++++++++- .../BaseInfo/WeldInfo.aspx.designer.cs | 9 +++++++ .../WeldMat/UsingPlan/ShowPlanWeld.aspx.cs | 2 +- .../WeldMat/UsingPlan/UsingPlanImport.aspx.cs | 2 +- HJGL_DS/Model/Model.cs | 24 +++++++++++++++++++ .../PublishProfiles/FolderProfile.pubxml.user | 14 +++++------ 12 files changed, 83 insertions(+), 12 deletions(-) create mode 100644 DataBase/版本日志/HJGLDB_DS_2025-07-24_gf.sql diff --git a/DataBase/版本日志/HJGLDB_DS_2025-07-24_gf.sql b/DataBase/版本日志/HJGLDB_DS_2025-07-24_gf.sql new file mode 100644 index 0000000..b53b273 --- /dev/null +++ b/DataBase/版本日志/HJGLDB_DS_2025-07-24_gf.sql @@ -0,0 +1,2 @@ +alter table Weld_WeldInfo add IsLock bit null +GO \ No newline at end of file diff --git a/HJGL_DS/BLL/API/APIBaseServices.cs b/HJGL_DS/BLL/API/APIBaseServices.cs index e7658df..11e08fc 100644 --- a/HJGL_DS/BLL/API/APIBaseServices.cs +++ b/HJGL_DS/BLL/API/APIBaseServices.cs @@ -165,7 +165,7 @@ namespace BLL.API if (!string.IsNullOrEmpty(unitStoreId)) { q = (from x in db.Weld_WeldInfo - where (from y in db.Weld_StockIn where y.UnitStoreId == unitStoreId && y.WeldId == x.WeldId select y.Amount ?? 0).Sum() - (from y in db.Weld_StockIn where y.UnitStoreId == unitStoreId && y.WeldId == x.WeldId select y.UsingAmount ?? 0).Sum() > 0 + where (from y in db.Weld_StockIn where y.UnitStoreId == unitStoreId && y.WeldId == x.WeldId select y.Amount ?? 0).Sum() - (from y in db.Weld_StockIn where y.UnitStoreId == unitStoreId && y.WeldId == x.WeldId select y.UsingAmount ?? 0).Sum() > 0 && (x.IsLock == null || x.IsLock == false) orderby x.WeldCode select x).ToList(); } diff --git a/HJGL_DS/BLL/WeldMat/BaseInfo/WeldInfoService.cs b/HJGL_DS/BLL/WeldMat/BaseInfo/WeldInfoService.cs index f950047..e597b59 100644 --- a/HJGL_DS/BLL/WeldMat/BaseInfo/WeldInfoService.cs +++ b/HJGL_DS/BLL/WeldMat/BaseInfo/WeldInfoService.cs @@ -35,6 +35,7 @@ namespace BLL newWeld.WarnAmount = weld.WarnAmount; newWeld.SteelType = weld.SteelType; newWeld.CreateMan = weld.CreateMan; + newWeld.IsLock = weld.IsLock; db.Weld_WeldInfo.InsertOnSubmit(newWeld); db.SubmitChanges(); } @@ -57,6 +58,7 @@ namespace BLL newWeld.WarnAmount = weld.WarnAmount; newWeld.SteelType = weld.SteelType; newWeld.ModifyMan = weld.ModifyMan; + newWeld.IsLock = weld.IsLock; db.SubmitChanges(); } } diff --git a/HJGL_DS/FineUIPro.Web/ErrLog.txt b/HJGL_DS/FineUIPro.Web/ErrLog.txt index 7742905..58615fa 100644 --- a/HJGL_DS/FineUIPro.Web/ErrLog.txt +++ b/HJGL_DS/FineUIPro.Web/ErrLog.txt @@ -61,3 +61,21 @@ IP地址:::1 出错时间:07/08/2025 16:56:56 出错时间:07/08/2025 16:56:56 + +错误信息开始=====> +错误类型:NullReferenceException +错误信息:未将对象引用设置到对象的实例。 +错误堆栈: + 在 FineUIPro.Web._default.Page_Init(Object sender, EventArgs e) 位置 D:\工作\鼎盛\HJGL_DS\HJGL_DS\FineUIPro.Web\default.aspx.cs:行号 114 + 在 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) + 在 System.Web.UI.Control.OnInit(EventArgs e) + 在 System.Web.UI.Page.OnInit(EventArgs e) + 在 FineUIPro.Web.PageBase.OnInit(EventArgs e) 位置 D:\工作\鼎盛\HJGL_DS\HJGL_DS\FineUIPro.Web\common\PageBase.cs:行号 135 + 在 System.Web.UI.Control.InitRecursive(Control namingContainer) + 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +出错时间:07/24/2025 16:12:09 +出错文件:http://localhost:64304/default.aspx +IP地址:::1 + +出错时间:07/24/2025 16:12:09 + diff --git a/HJGL_DS/FineUIPro.Web/Web.config b/HJGL_DS/FineUIPro.Web/Web.config index aa58035..bf404b8 100644 --- a/HJGL_DS/FineUIPro.Web/Web.config +++ b/HJGL_DS/FineUIPro.Web/Web.config @@ -11,7 +11,7 @@ - + diff --git a/HJGL_DS/FineUIPro.Web/WeldMat/BaseInfo/WeldInfo.aspx b/HJGL_DS/FineUIPro.Web/WeldMat/BaseInfo/WeldInfo.aspx index 5fffe75..9b5698b 100644 --- a/HJGL_DS/FineUIPro.Web/WeldMat/BaseInfo/WeldInfo.aspx +++ b/HJGL_DS/FineUIPro.Web/WeldMat/BaseInfo/WeldInfo.aspx @@ -124,6 +124,7 @@ + diff --git a/HJGL_DS/FineUIPro.Web/WeldMat/BaseInfo/WeldInfo.aspx.cs b/HJGL_DS/FineUIPro.Web/WeldMat/BaseInfo/WeldInfo.aspx.cs index e24b399..f1b2dff 100644 --- a/HJGL_DS/FineUIPro.Web/WeldMat/BaseInfo/WeldInfo.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/WeldMat/BaseInfo/WeldInfo.aspx.cs @@ -274,6 +274,14 @@ namespace FineUIPro.Web.WeldMat.BaseInfo { this.txtWarnAmount.Text = weldInfo.WarnAmount.ToString(); } + if (weldInfo.IsLock == true) + { + this.cbIsLock.Checked = true; + } + else + { + this.cbIsLock.Checked = false; + } hfFormID.Text = Id; this.btnDelete.Enabled = true; } @@ -348,7 +356,14 @@ namespace FineUIPro.Web.WeldMat.BaseInfo //{ // weld.WarnAmount = 20; //} - + if (this.cbIsLock.Checked) + { + weld.IsLock = true; + } + else + { + weld.IsLock = null; + } if (string.IsNullOrEmpty(strRowID)) { strRowID = SQLHelper.GetNewID(typeof(Model.Weld_WeldInfo)); diff --git a/HJGL_DS/FineUIPro.Web/WeldMat/BaseInfo/WeldInfo.aspx.designer.cs b/HJGL_DS/FineUIPro.Web/WeldMat/BaseInfo/WeldInfo.aspx.designer.cs index f448d92..60906e9 100644 --- a/HJGL_DS/FineUIPro.Web/WeldMat/BaseInfo/WeldInfo.aspx.designer.cs +++ b/HJGL_DS/FineUIPro.Web/WeldMat/BaseInfo/WeldInfo.aspx.designer.cs @@ -210,6 +210,15 @@ namespace FineUIPro.Web.WeldMat.BaseInfo { /// protected global::FineUIPro.NumberBox txtWarnAmount; + /// + /// cbIsLock 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.CheckBox cbIsLock; + /// /// Toolbar1 控件。 /// diff --git a/HJGL_DS/FineUIPro.Web/WeldMat/UsingPlan/ShowPlanWeld.aspx.cs b/HJGL_DS/FineUIPro.Web/WeldMat/UsingPlan/ShowPlanWeld.aspx.cs index f4b7cc1..7a61b87 100644 --- a/HJGL_DS/FineUIPro.Web/WeldMat/UsingPlan/ShowPlanWeld.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/WeldMat/UsingPlan/ShowPlanWeld.aspx.cs @@ -53,7 +53,7 @@ namespace FineUIPro.Web.WeldMat.UsingPlan WeldType.WeldTypeName,WeldType.WeldUnit FROM dbo.Weld_WeldInfo weld LEFT JOIN Weld_WeldType AS weldType ON weldType.WeldTypeId =weld.WeldTypeId - WHERE 1 = 1 + WHERE 1 = 1 and (weld.IsLock is null or weld.IsLock=0) and (select (SUM(ISNULL(stockIn.Amount,0))-SUM(ISNULL(stockIn.UsingAmount,0))) from Weld_StockIn stockIn where UnitStoreId=@UnitStoreId and WeldId=weld.WeldId)>0"; List listStr = new List(); //listStr.Add(new SqlParameter("@ProjectId", this.ProjectId)); diff --git a/HJGL_DS/FineUIPro.Web/WeldMat/UsingPlan/UsingPlanImport.aspx.cs b/HJGL_DS/FineUIPro.Web/WeldMat/UsingPlan/UsingPlanImport.aspx.cs index 3c0cecc..3758336 100644 --- a/HJGL_DS/FineUIPro.Web/WeldMat/UsingPlan/UsingPlanImport.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/WeldMat/UsingPlan/UsingPlanImport.aspx.cs @@ -211,7 +211,7 @@ namespace FineUIPro.Web.WeldMat.UsingPlan { Model.SGGLDB db = Funs.DB; var q = from x in db.Weld_WeldInfo - where (from y in db.Weld_StockIn where y.UnitStoreId == unitStoreId && y.WeldId == usingPlan.WeldId select y.Amount ?? 0).Sum() - (from y in db.Weld_StockIn where y.UnitStoreId == unitStoreId && y.WeldId == usingPlan.WeldId select y.UsingAmount ?? 0).Sum() > 0 + where (from y in db.Weld_StockIn where y.UnitStoreId == unitStoreId && y.WeldId == usingPlan.WeldId select y.Amount ?? 0).Sum() - (from y in db.Weld_StockIn where y.UnitStoreId == unitStoreId && y.WeldId == usingPlan.WeldId select y.UsingAmount ?? 0).Sum() > 0 && (x.IsLock == null || x.IsLock == false) orderby x.WeldCode select x; if (q.Count() == 0) diff --git a/HJGL_DS/Model/Model.cs b/HJGL_DS/Model/Model.cs index b722aa8..a10d210 100644 --- a/HJGL_DS/Model/Model.cs +++ b/HJGL_DS/Model/Model.cs @@ -113974,6 +113974,8 @@ namespace Model private string _ModifyMan; + private System.Nullable _IsLock; + private EntitySet _Weld_ProjectPlan; private EntitySet _Weld_RecycleMat; @@ -114012,6 +114014,8 @@ namespace Model partial void OnCreateManChanged(); partial void OnModifyManChanging(string value); partial void OnModifyManChanged(); + partial void OnIsLockChanging(System.Nullable value); + partial void OnIsLockChanged(); #endregion public Weld_WeldInfo() @@ -114230,6 +114234,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsLock", DbType="Bit")] + public System.Nullable IsLock + { + get + { + return this._IsLock; + } + set + { + if ((this._IsLock != value)) + { + this.OnIsLockChanging(value); + this.SendPropertyChanging(); + this._IsLock = value; + this.SendPropertyChanged("IsLock"); + this.OnIsLockChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Weld_ProjectPlan_Weld_WeldInfo", Storage="_Weld_ProjectPlan", ThisKey="WeldId", OtherKey="WeldId", DeleteRule="NO ACTION")] public EntitySet Weld_ProjectPlan { diff --git a/HJGL_DS/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user b/HJGL_DS/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user index 1eaae6f..c7227c3 100644 --- a/HJGL_DS/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user +++ b/HJGL_DS/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user @@ -79,13 +79,13 @@ 09/10/2013 16:29:20 - 07/24/2025 10:18:37 + 07/24/2025 16:36:52 07/03/2024 11:01:05 - 07/24/2025 10:18:37 + 07/24/2025 16:36:52 12/17/2020 21:32:28 @@ -115,10 +115,10 @@ 07/25/2012 11:48:56 - 07/24/2025 10:18:37 + 07/24/2025 16:36:51 - 07/24/2025 10:18:37 + 07/24/2025 16:36:51 02/18/2018 09:44:54 @@ -316,10 +316,10 @@ 02/01/2018 12:20:56 - 07/24/2025 10:18:40 + 07/24/2025 16:36:53 - 07/24/2025 10:18:40 + 07/24/2025 16:36:53 01/23/2014 13:57:34 @@ -445,7 +445,7 @@ 07/03/2024 11:01:07 - 07/24/2025 10:18:55 + 07/24/2025 16:37:05 \ No newline at end of file