From 65ae08adebb31ca602206867224e08e3a8c934a4 Mon Sep 17 00:00:00 2001
From: gaofei1985 <181547018@qq.com>
Date: Mon, 2 Feb 2026 09:58:47 +0800
Subject: [PATCH] 1
---
.gitignore | 1 +
HJGL_DS/BLL/WeldMat/Stock/StockInitService.cs | 43 ++++++-
.../MaterialManage/QualityCertificate.aspx | 6 +-
.../QualityCertificateEdit.aspx | 6 +-
.../QualityCertificateEdit.aspx.cs | 23 ++--
.../QualityCertificateEdit.aspx.designer.cs | 8 +-
.../HJGL/WeldingManage/JointInfo.aspx | 2 +
.../HJGL/WeldingManage/JointInfo.aspx.cs | 69 +++++++++++
.../WeldingManage/JointInfo.aspx.designer.cs | 9 ++
HJGL_DS/FineUIPro.Web/Login.aspx.cs | 113 +++++++++---------
10 files changed, 202 insertions(+), 78 deletions(-)
diff --git a/.gitignore b/.gitignore
index c635c20..2b9bbd2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -38,3 +38,4 @@ bin-release/
/HJGL_DS/FineUIPro.Web/ErrLog.txt
/HJGL_DS/Model/packages.config
/CreateModel2017.bat
+*.xls
diff --git a/HJGL_DS/BLL/WeldMat/Stock/StockInitService.cs b/HJGL_DS/BLL/WeldMat/Stock/StockInitService.cs
index ba5a5ca..b521973 100644
--- a/HJGL_DS/BLL/WeldMat/Stock/StockInitService.cs
+++ b/HJGL_DS/BLL/WeldMat/Stock/StockInitService.cs
@@ -97,7 +97,24 @@ namespace BLL
}
///
- /// 获取施工部用户
+ /// 加载入库自编号下拉框
+ ///
+ ///
+ ///
+ public static void InitWarrantybook(FineUIPro.DropDownList dropName, bool isShowPlease)
+ {
+ dropName.DataValueField = "Value";
+ dropName.DataTextField = "Text";
+ dropName.DataSource = GetWarrantybookList();
+ dropName.DataBind();
+ if (isShowPlease)
+ {
+ Funs.FineUIPleaseSelect(dropName);
+ }
+ }
+
+ ///
+ /// 获取批号
///
///
///
@@ -118,5 +135,29 @@ namespace BLL
return lis;
}
}
+
+ ///
+ /// 获取入库自编号
+ ///
+ ///
+ ///
+ public static ListItem[] GetWarrantybookList()
+ {
+ using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
+ {
+ var ls = (from x in db.Weld_StockIn
+ select new
+ {
+ x.Warrantybook,
+ x.HeartNo,
+ }).Distinct().ToList();
+ ListItem[] lis = new ListItem[ls.Count()];
+ for (int i = 0; i < ls.Count(); i++)
+ {
+ lis[i] = new ListItem(ls[i].Warrantybook ?? "", ls[i].HeartNo.ToString());
+ }
+ return lis;
+ }
+ }
}
}
diff --git a/HJGL_DS/FineUIPro.Web/HJGL/MaterialManage/QualityCertificate.aspx b/HJGL_DS/FineUIPro.Web/HJGL/MaterialManage/QualityCertificate.aspx
index d594206..f3d744b 100644
--- a/HJGL_DS/FineUIPro.Web/HJGL/MaterialManage/QualityCertificate.aspx
+++ b/HJGL_DS/FineUIPro.Web/HJGL/MaterialManage/QualityCertificate.aspx
@@ -66,12 +66,12 @@
-
-
+
+
diff --git a/HJGL_DS/FineUIPro.Web/HJGL/MaterialManage/QualityCertificateEdit.aspx b/HJGL_DS/FineUIPro.Web/HJGL/MaterialManage/QualityCertificateEdit.aspx
index d71eac2..bb4eb25 100644
--- a/HJGL_DS/FineUIPro.Web/HJGL/MaterialManage/QualityCertificateEdit.aspx
+++ b/HJGL_DS/FineUIPro.Web/HJGL/MaterialManage/QualityCertificateEdit.aspx
@@ -38,8 +38,8 @@
-
+
@@ -47,7 +47,7 @@
-
+
diff --git a/HJGL_DS/FineUIPro.Web/HJGL/MaterialManage/QualityCertificateEdit.aspx.cs b/HJGL_DS/FineUIPro.Web/HJGL/MaterialManage/QualityCertificateEdit.aspx.cs
index 4fe0cdb..1fe893c 100644
--- a/HJGL_DS/FineUIPro.Web/HJGL/MaterialManage/QualityCertificateEdit.aspx.cs
+++ b/HJGL_DS/FineUIPro.Web/HJGL/MaterialManage/QualityCertificateEdit.aspx.cs
@@ -35,7 +35,7 @@ namespace FineUIPro.Web.HJGL.MaterialManage
{
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
this.QualityCertificateId = Request.Params["QualityCertificateId"];
- StockInitService.InitHeartNo(this.drpHeartNo, true);
+ StockInitService.InitHeartNo(this.drpWarrantybook, true);
if (!string.IsNullOrEmpty(this.QualityCertificateId))
{
this.hdQualityCertificateId.Text = this.QualityCertificateId;
@@ -60,8 +60,8 @@ namespace FineUIPro.Web.HJGL.MaterialManage
}
}
}
- this.drpHeartNo.SelectedItem.Text = qc.HeartNo;
- this.txtWarrantybook.Text = qc.Warrantybook;
+ this.drpWarrantybook.SelectedItem.Text = qc.Warrantybook;
+ this.txtHeartNo.Text = qc.HeartNo;
}
}
}
@@ -86,9 +86,9 @@ namespace FineUIPro.Web.HJGL.MaterialManage
Alert.ShowInTop("请选择焊材牌号!", MessageBoxIcon.Warning);
return;
}
- if (this.drpHeartNo.SelectedValue == BLL.Const._Null)
+ if (this.drpWarrantybook.SelectedValue == BLL.Const._Null)
{
- Alert.ShowInTop("请选择批号!", MessageBoxIcon.Warning);
+ Alert.ShowInTop("请选择入库自编号!", MessageBoxIcon.Warning);
return;
}
if (string.IsNullOrEmpty(this.hdQualityCertificateId.Text.Trim()))
@@ -112,10 +112,9 @@ namespace FineUIPro.Web.HJGL.MaterialManage
qc.WeldId = this.hdWeldId.Text.Trim();
}
- qc.Warrantybook = this.txtWarrantybook.Text.Trim();
+ qc.Warrantybook = drpWarrantybook.SelectedItem.Text.Trim();
//qc.Number = txtNumber.Text.Trim();
- qc.HeartNo = drpHeartNo.SelectedItem.Text.Trim();
- qc.Warrantybook = txtWarrantybook.Text.Trim();
+ qc.HeartNo = this.txtHeartNo.Text.Trim();
qc.CompileMan = this.CurrUser.UserId;
qc.CompileDate = DateTime.Now;
if (!string.IsNullOrEmpty(this.QualityCertificateId))
@@ -204,12 +203,12 @@ namespace FineUIPro.Web.HJGL.MaterialManage
#endregion
- protected void drpHeartNo_SelectedIndexChanged(object sender, EventArgs e)
+ protected void drpWarrantybook_SelectedIndexChanged(object sender, EventArgs e)
{
- this.txtWarrantybook.Text = string.Empty;
- if (this.drpHeartNo.SelectedValue != BLL.Const._Null)
+ this.txtHeartNo.Text = string.Empty;
+ if (this.drpWarrantybook.SelectedValue != BLL.Const._Null)
{
- this.txtWarrantybook.Text = this.drpHeartNo.SelectedValue;
+ this.txtHeartNo.Text = this.drpWarrantybook.SelectedValue;
}
}
}
diff --git a/HJGL_DS/FineUIPro.Web/HJGL/MaterialManage/QualityCertificateEdit.aspx.designer.cs b/HJGL_DS/FineUIPro.Web/HJGL/MaterialManage/QualityCertificateEdit.aspx.designer.cs
index 327a2bf..2f9760f 100644
--- a/HJGL_DS/FineUIPro.Web/HJGL/MaterialManage/QualityCertificateEdit.aspx.designer.cs
+++ b/HJGL_DS/FineUIPro.Web/HJGL/MaterialManage/QualityCertificateEdit.aspx.designer.cs
@@ -85,13 +85,13 @@ namespace FineUIPro.Web.HJGL.MaterialManage {
protected global::FineUIPro.TextBox txtWeldSpec;
///
- /// drpHeartNo 控件。
+ /// drpWarrantybook 控件。
///
///
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
- protected global::FineUIPro.DropDownList drpHeartNo;
+ protected global::FineUIPro.DropDownList drpWarrantybook;
///
/// txtWeldType 控件。
@@ -103,13 +103,13 @@ namespace FineUIPro.Web.HJGL.MaterialManage {
protected global::FineUIPro.TextBox txtWeldType;
///
- /// txtWarrantybook 控件。
+ /// txtHeartNo 控件。
///
///
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
- protected global::FineUIPro.Label txtWarrantybook;
+ protected global::FineUIPro.Label txtHeartNo;
///
/// UploadAttach2 控件。
diff --git a/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/JointInfo.aspx b/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/JointInfo.aspx
index e3c37e1..1a612c3 100644
--- a/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/JointInfo.aspx
+++ b/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/JointInfo.aspx
@@ -66,6 +66,8 @@
+
+
diff --git a/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/JointInfo.aspx.cs b/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/JointInfo.aspx.cs
index d911d06..9d60245 100644
--- a/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/JointInfo.aspx.cs
+++ b/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/JointInfo.aspx.cs
@@ -1317,5 +1317,74 @@ namespace FineUIPro.Web.HJGL.WeldingManage
}
}
#endregion
+
+ ///
+ /// 批量增加焊口信息
+ ///
+ ///
+ ///
+ protected void btnBatchDel_Click(object sender, EventArgs e)
+ {
+ if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.HJGL_JointInfoMenuId, Const.BtnDelete))
+ {
+ if (Grid1.SelectedRowIndexArray.Length == 0)
+ {
+ Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
+ return;
+ }
+
+ bool isShow = true;
+ if (Grid1.SelectedRowIndexArray.Length > 1)
+ {
+ isShow = false;
+ }
+ string err = string.Empty;
+ foreach (int rowIndex in Grid1.SelectedRowIndexArray)
+ {
+ string rowID = Grid1.DataKeys[rowIndex][0].ToString();
+ string content = judgementDelete(rowID, isShow);
+ if (string.IsNullOrEmpty(content))
+ {
+ Model.SGGLDB db = Funs.DB;
+ var hotProessTrustItem = db.HJGL_CH_HotProessTrustItem.FirstOrDefault(x => x.JOT_ID == rowID);
+ if (hotProessTrustItem != null)
+ {
+ db.HJGL_CH_HotProessTrustItem.DeleteOnSubmit(hotProessTrustItem);
+ }
+ var hotProessItem = db.HJGL_HotProessItem.FirstOrDefault(x => x.JOT_ID == rowID);
+ if (hotProessItem != null)
+ {
+ db.HJGL_HotProessItem.DeleteOnSubmit(hotProessItem);
+ }
+ var hotProessResult = db.HJGL_CH_HotProessResult.FirstOrDefault(x => x.JOT_ID == rowID);
+ if (hotProessResult != null)
+ {
+ db.HJGL_CH_HotProessResult.DeleteOnSubmit(hotProessResult);
+ }
+ db.SubmitChanges();
+ BLL.HJGL_BO_BatchDetailService.DeleteBatchDetail(rowID); //删除批明细
+ BLL.HJGL_PW_JointInfoService.DeleteJointInfo(rowID);
+ BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.CurrUser.LoginProjectId, this.CurrUser.UserId, "删除焊口信息");
+ }
+ else
+ {
+ err += content;
+ }
+ }
+ if (string.IsNullOrEmpty(err))
+ {
+ Alert.ShowInTop("删除成功!", MessageBoxIcon.Success);
+ }
+ else
+ {
+ Alert.ShowInTop(err, MessageBoxIcon.Warning);
+ }
+ this.BindGrid();
+ }
+ else
+ {
+ ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
+ }
+ }
}
}
\ No newline at end of file
diff --git a/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/JointInfo.aspx.designer.cs b/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/JointInfo.aspx.designer.cs
index a0f5e3b..46ff740 100644
--- a/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/JointInfo.aspx.designer.cs
+++ b/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/JointInfo.aspx.designer.cs
@@ -174,6 +174,15 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
///
protected global::FineUIPro.Button btnBatchAdd;
+ ///
+ /// btnBatchDel 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnBatchDel;
+
///
/// btnOut 控件。
///
diff --git a/HJGL_DS/FineUIPro.Web/Login.aspx.cs b/HJGL_DS/FineUIPro.Web/Login.aspx.cs
index ccfb8d1..4d5123d 100644
--- a/HJGL_DS/FineUIPro.Web/Login.aspx.cs
+++ b/HJGL_DS/FineUIPro.Web/Login.aspx.cs
@@ -57,69 +57,72 @@ namespace FineUIPro.Web
string password = this.tbxPassword.Text;
bool rememberMe = this.savemessgae.Checked;
bool isLogin = false;
- var sysUser = Funs.DB.Sys_User.FirstOrDefault(x => x.Account == userName && x.IsPost == true);
- if (sysUser != null)
+ using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
- if (sysUser.LockTime.HasValue && sysUser.LockTime.Value > DateTime.Now)
+ var sysUser = db.Sys_User.FirstOrDefault(x => x.Account == userName && x.IsPost == true);
+ if (sysUser != null)
{
- Alert.Show("账号锁定30分钟!", MessageBoxIcon.Error);
- return;
- }
- else
- {
- if (sysUser.Password.ToUpper() != Sys_UserService.EncryptionPassword(password).ToUpper())
+ if (sysUser.LockTime.HasValue && sysUser.LockTime.Value > DateTime.Now)
{
- if (sysUser.LockTime.HasValue && sysUser.LockTime.Value < DateTime.Now)
- {
- sysUser.ErrorTimes = null;
- sysUser.LockTime = null;
- Sys_UserService.UpdateUser(sysUser);
- }
- if (sysUser.ErrorTimes.HasValue && sysUser.ErrorTimes.Value >= 4)
- {
- sysUser.ErrorTimes = sysUser.ErrorTimes.Value + 1;
- sysUser.LockTime = DateTime.Now.AddMinutes(30);
- Sys_UserService.UpdateUser(sysUser);
- Alert.Show("账号锁定30分钟!", MessageBoxIcon.Error);
- return;
- }
- else if (sysUser.ErrorTimes.HasValue)
- {
- sysUser.ErrorTimes = sysUser.ErrorTimes.Value + 1;
- Sys_UserService.UpdateUser(sysUser);
- // error = "密码错误" + sysUser.ErrorTimes + "次,超过5次将锁定10分钟!";
- Alert.Show("用户名或密码错误,超过5次将锁定30分钟,请重新输入!", MessageBoxIcon.Error);
- return;
- }
- else
- {
- sysUser.ErrorTimes = 1;
- Sys_UserService.UpdateUser(sysUser);
- Alert.Show("用户名或密码错误,超过5次将锁定30分钟,请重新输入!", MessageBoxIcon.Error);
- return;
- }
- }
- ///登陆信息是否正确
- if (BLL.Sys_UserService.UserLogOn(userName, password, rememberMe, this.Page))
- {
- isLogin = true;
- }
- if (isLogin)
- {
- BLL.Sys_LogService.AddLog(Const.System_1, this.CurrUser.LoginProjectId, this.CurrUser.UserId, "登陆成功!");
- Response.Redirect("~/default.aspx");
+ Alert.Show("账号锁定30分钟!", MessageBoxIcon.Error);
+ return;
}
else
{
- Alert.Show("账户与密码不匹配!", MessageBoxIcon.Error);
- return;
+ if (sysUser.Password.ToUpper() != Sys_UserService.EncryptionPassword(password).ToUpper())
+ {
+ if (sysUser.LockTime.HasValue && sysUser.LockTime.Value < DateTime.Now)
+ {
+ sysUser.ErrorTimes = null;
+ sysUser.LockTime = null;
+ Sys_UserService.UpdateUser(sysUser);
+ }
+ if (sysUser.ErrorTimes.HasValue && sysUser.ErrorTimes.Value >= 4)
+ {
+ sysUser.ErrorTimes = sysUser.ErrorTimes.Value + 1;
+ sysUser.LockTime = DateTime.Now.AddMinutes(30);
+ Sys_UserService.UpdateUser(sysUser);
+ Alert.Show("账号锁定30分钟!", MessageBoxIcon.Error);
+ return;
+ }
+ else if (sysUser.ErrorTimes.HasValue)
+ {
+ sysUser.ErrorTimes = sysUser.ErrorTimes.Value + 1;
+ Sys_UserService.UpdateUser(sysUser);
+ // error = "密码错误" + sysUser.ErrorTimes + "次,超过5次将锁定10分钟!";
+ Alert.Show("用户名或密码错误,超过5次将锁定30分钟,请重新输入!", MessageBoxIcon.Error);
+ return;
+ }
+ else
+ {
+ sysUser.ErrorTimes = 1;
+ Sys_UserService.UpdateUser(sysUser);
+ Alert.Show("用户名或密码错误,超过5次将锁定30分钟,请重新输入!", MessageBoxIcon.Error);
+ return;
+ }
+ }
+ ///登陆信息是否正确
+ if (BLL.Sys_UserService.UserLogOn(userName, password, rememberMe, this.Page))
+ {
+ isLogin = true;
+ }
+ if (isLogin)
+ {
+ BLL.Sys_LogService.AddLog(Const.System_1, this.CurrUser.LoginProjectId, this.CurrUser.UserId, "登陆成功!");
+ Response.Redirect("~/default.aspx");
+ }
+ else
+ {
+ Alert.Show("账户与密码不匹配!", MessageBoxIcon.Error);
+ return;
+ }
}
}
- }
- else
- {
- Alert.Show("用户名或密码错误,请重新输入!", MessageBoxIcon.Error);
- return;
+ else
+ {
+ Alert.Show("用户名或密码错误,请重新输入!", MessageBoxIcon.Error);
+ return;
+ }
}
}