This commit is contained in:
2024-05-12 20:12:40 +08:00
7 changed files with 49 additions and 22 deletions
@@ -79,19 +79,21 @@ namespace BLL
/// <param name="WPQ"></param>
public static void UpdateTestPlanDetail(Model.Welder_TestPlanDetail TestPlanDetail)
{
Model.SGGLDB db = Funs.DB;
Model.Welder_TestPlanDetail newTestPlanDetail = db.Welder_TestPlanDetail.FirstOrDefault(e => e.TestPlanDetailId == TestPlanDetail.TestPlanDetailId);
if (newTestPlanDetail != null)
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
newTestPlanDetail.PersonId = TestPlanDetail.PersonId;
newTestPlanDetail.QualifiedItem = TestPlanDetail.QualifiedItem;
newTestPlanDetail.TestItem = TestPlanDetail.TestItem;
newTestPlanDetail.IsAppearanceOK = TestPlanDetail.IsAppearanceOK;
newTestPlanDetail.CheckMan = TestPlanDetail.CheckMan;
newTestPlanDetail.NDTResult = TestPlanDetail.NDTResult;
newTestPlanDetail.CheckUnit = TestPlanDetail.CheckUnit;
newTestPlanDetail.State = TestPlanDetail.State;
db.SubmitChanges();
Model.Welder_TestPlanDetail newTestPlanDetail = db.Welder_TestPlanDetail.FirstOrDefault(e => e.TestPlanDetailId == TestPlanDetail.TestPlanDetailId);
if (newTestPlanDetail != null)
{
newTestPlanDetail.PersonId = TestPlanDetail.PersonId;
newTestPlanDetail.QualifiedItem = TestPlanDetail.QualifiedItem;
newTestPlanDetail.TestItem = TestPlanDetail.TestItem;
newTestPlanDetail.IsAppearanceOK = TestPlanDetail.IsAppearanceOK;
newTestPlanDetail.CheckMan = TestPlanDetail.CheckMan;
newTestPlanDetail.NDTResult = TestPlanDetail.NDTResult;
newTestPlanDetail.CheckUnit = TestPlanDetail.CheckUnit;
newTestPlanDetail.State = TestPlanDetail.State;
db.SubmitChanges();
}
}
}
@@ -205,11 +205,11 @@ namespace FineUIPro.Web.CQMS.PersonManage
{
err += "检查人不能为空!";
}
if (string.IsNullOrEmpty(NDTResult))
if (string.IsNullOrEmpty(NDTResult) && IsAppearanceOK == "是")
{
err += "无损检测结果不能为空!";
}
if (string.IsNullOrEmpty(CheckUnit))
if (string.IsNullOrEmpty(CheckUnit) && IsAppearanceOK == "是")
{
err += "检测单位不能为空!";
}
@@ -251,13 +251,27 @@ namespace FineUIPro.Web.CQMS.PersonManage
{
detail.CheckMan = person.PersonId;
}
detail.NDTResult = NDTResult == "合格" ? true : false;
if (NDTResult == "合格")
{
detail.NDTResult = true;
}
else if (NDTResult == "不合格")
{
detail.NDTResult = false;
}
var unit = units.FirstOrDefault(x => x.UnitName == CheckUnit);
if (unit != null)
{
detail.CheckUnit = unit.UnitId;
}
detail.State = State == "合格" ? true : false;
if (State == "合格")
{
detail.State = true;
}
else if (State == "不合格")
{
detail.State = false;
}
details.Add(detail);
}
return details;
+10 -1
View File
@@ -14454,6 +14454,15 @@
<Isolated>False</Isolated>
<EmbedInteropTypes>True</EmbedInteropTypes>
</COMReference>
<COMReference Include="Microsoft.Office.Interop.Excel">
<Guid>{00020813-0000-0000-C000-000000000046}</Guid>
<VersionMajor>1</VersionMajor>
<VersionMinor>6</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>primary</WrapperTool>
<Isolated>False</Isolated>
<EmbedInteropTypes>True</EmbedInteropTypes>
</COMReference>
<COMReference Include="Microsoft.Office.Interop.Word">
<Guid>{00020905-0000-0000-C000-000000000046}</Guid>
<VersionMajor>8</VersionMajor>
@@ -14483,7 +14492,7 @@
<AutoAssignPort>True</AutoAssignPort>
<DevelopmentServerPort>0</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath>
<IISUrl>http://localhost:6233/</IISUrl>
<IISUrl>http://localhost:3001/</IISUrl>
<NTLMAuthentication>False</NTLMAuthentication>
<UseCustomServer>False</UseCustomServer>
<CustomServerUrl>
@@ -765,13 +765,15 @@ namespace FineUIPro.Web.HSSE.Check
bookmarkProjectName.Text = BLL.ProjectService.GetProjectNameByProjectId(getRectify.ProjectId);
}
Bookmark IsRectify = doc.Range.Bookmarks["IsRectify"];
if (IsRectify != null)
var RectifyNoticesItem = Funs.DB.Check_RectifyNoticesItem.FirstOrDefault(x => x.RectifyNoticesId == getRectify.RectifyNoticesId && (x.IsRectify == false || x.IsRectify == null));
if (RectifyNoticesItem == null)
{
if (getRectify.IsRectify?.ToString() == "True")
IsRectify.Text = "合格";
else
IsRectify.Text = "不合格";
IsRectify.Text = "合格";
}
else
{ IsRectify.Text = "不合格"; }
Bookmark bookmarkRectifyNoticesCode = doc.Range.Bookmarks["RectifyNoticesCode"];
if (bookmarkRectifyNoticesCode != null)
{