试压管理修改

This commit is contained in:
2025-08-18 10:15:28 +08:00
parent b81501713e
commit edebefa3c9
26 changed files with 1351 additions and 1315 deletions
@@ -1,4 +1,5 @@
using BLL;
using FineUIPro.Web.DataShow;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
@@ -210,7 +211,11 @@ namespace FineUIPro.Web.HJGL.TestPackage
private void SaveData(string saveType)
{
bool flag = true;
bool flag_A = true;
bool flag_B = true;
Model.Project_Sys_Set PressMustCheckBItem = BLL.Project_SysSetService.GetSysSetBySetId("10", this.CurrUser.LoginProjectId);
bool isMustCheckBItem = false;
isMustCheckBItem= (bool)PressMustCheckBItem?.IsAuto;//是否必须检查B项
///保存明细
if (saveType == Const.BtnSubmit)
{
@@ -223,7 +228,12 @@ namespace FineUIPro.Web.HJGL.TestPackage
{
if (item.ItemType == "A" && item.Result != "合格")
{
flag = false;
flag_A = false;
}
if (isMustCheckBItem && item.ItemType == "B" && item.Result != "合格")
{
flag_B = false;
}
}
if (saveType != Const.BtnSave)
@@ -238,11 +248,16 @@ namespace FineUIPro.Web.HJGL.TestPackage
}
if (State == Const.TestPackage_Complete || State == Const.TestPackage_Audit3)
{
if (!flag)
if (!flag_A)
{
Alert.ShowInTop("A项尾项尚未全部合格,请打回施工单位重新整改!", MessageBoxIcon.Warning);
return;
}
if (!flag_B)
{
Alert.ShowInTop("B项尾项尚未全部合格,请打回施工单位重新整改!", MessageBoxIcon.Warning);
return;
}
}
Model.PTP_TestPackageApprove approve1 = BLL.TestPackageApproveService.GetTestPackageApproveById(this.ItemEndCheckListId);
if (approve1 != null && saveType == Const.BtnSubmit)
@@ -265,7 +280,7 @@ namespace FineUIPro.Web.HJGL.TestPackage
var ItemEndCheckList = ItemEndCheckListService.GetItemEndCheckListByID(this.ItemEndCheckListId);
if (ItemEndCheckList != null)
{
if (flag)
if (flag_A)
{
ItemEndCheckList.AOKState = true;
}