This commit is contained in:
高飞 2026-01-16 14:18:41 +08:00
parent 307180ed94
commit 2cce1d0e4e
1 changed files with 25 additions and 3 deletions

View File

@ -499,6 +499,23 @@ namespace FineUIPro.Web.HJGL.WeldingManage
if (judgementDelete(rowID, isShow))
{
isDelete = true;
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, "删除焊口信息");
@ -1051,10 +1068,15 @@ namespace FineUIPro.Web.HJGL.WeldingManage
private bool judgementDelete(string id, bool isShow)
{
string content = string.Empty;
if (BLL.Funs.DB.HJGL_CH_HotProessTrustItem.FirstOrDefault(x => x.JOT_ID == id) != null
|| BLL.Funs.DB.HJGL_CH_HotProessResult.FirstOrDefault(x => x.JOT_ID == id) != null)
//if (BLL.Funs.DB.HJGL_CH_HotProessTrustItem.FirstOrDefault(x => x.JOT_ID == id) != null
// || BLL.Funs.DB.HJGL_CH_HotProessResult.FirstOrDefault(x => x.JOT_ID == id) != null)
//{
// content = "该焊口已进行热处理委托,不能删除!";
//}
var joint = BLL.HJGL_PW_JointInfoService.GetJointInfoByJotID(id);
if (!string.IsNullOrEmpty(joint.DReportID))
{
content = "该焊口已进行热处理委托,不能删除!";
content = "该焊口已提交焊接记录,不能删除!";
}
var batchDetail = BLL.HJGL_BO_BatchDetailService.GetBatchDetailByJotId(id);
if (batchDetail != null)