This commit is contained in:
2023-02-20 10:49:59 +08:00
6 changed files with 107 additions and 170 deletions
+12
View File
@@ -84,6 +84,18 @@ namespace BLL
{ {
return (from x in Funs.DB.WBS_WorkPackage where x.SuperWorkPackageId == null && x.UnitWorkId.ToString() == unitWorkId && x.IsApprove == true orderby x.WorkPackageCode select x).ToList(); return (from x in Funs.DB.WBS_WorkPackage where x.SuperWorkPackageId == null && x.UnitWorkId.ToString() == unitWorkId && x.IsApprove == true orderby x.WorkPackageCode select x).ToList();
} }
/// <summary>
/// 根据分部分项名称和单位工程id获取项目分部分项内容
/// </summary>
/// <param name="workPackageCode"></param>
/// <param name="projectId"></param>
/// <returns></returns>
public static Model.WBS_WorkPackage GetWorkPackageByPackageContent(string packageContent, string unitWorkId)
{
return Funs.DB.WBS_WorkPackage.FirstOrDefault(x => x.PackageContent == packageContent && x.UnitWorkId == unitWorkId);
}
/// <summary> /// <summary>
/// 根据单位工程Id获取所有分部信息 /// 根据单位工程Id获取所有分部信息
/// </summary> /// </summary>
@@ -200,7 +200,6 @@ namespace FineUIPro.Web.CQMS.WBS
string col0 = pds.Rows[i][0].ToString().Trim(); string col0 = pds.Rows[i][0].ToString().Trim();
string col1 = pds.Rows[i][1].ToString().Trim(); string col1 = pds.Rows[i][1].ToString().Trim();
string col2 = pds.Rows[i][2].ToString().Trim(); string col2 = pds.Rows[i][2].ToString().Trim();
string col3 = pds.Rows[i][3].ToString().Trim();
if (!string.IsNullOrEmpty(col0)) if (!string.IsNullOrEmpty(col0))
{ {
if (string.IsNullOrEmpty(col0)) if (string.IsNullOrEmpty(col0))
@@ -208,6 +207,8 @@ namespace FineUIPro.Web.CQMS.WBS
result += "第" + (i + 2).ToString() + "行," + "导入项" + "," + "分项为必填项!" + "|"; result += "第" + (i + 2).ToString() + "行," + "导入项" + "," + "分项为必填项!" + "|";
} }
else else
{
if (BLL.WorkPackageService.GetWorkPackageByPackageContent(col0 + "-" + col1 + "-" + col2, UnitWorkId) == null) //数据库中不存在同样位号记录
{ {
Model.WBS_WorkPackage newWorkPackage = new Model.WBS_WorkPackage Model.WBS_WorkPackage newWorkPackage = new Model.WBS_WorkPackage
{ {
@@ -234,6 +235,7 @@ namespace FineUIPro.Web.CQMS.WBS
} }
ViewWorkPackages.Add(newWorkPackage); ViewWorkPackages.Add(newWorkPackage);
}
if (!string.IsNullOrEmpty(result)) if (!string.IsNullOrEmpty(result))
{ {
results += result; results += result;
@@ -386,7 +388,6 @@ namespace FineUIPro.Web.CQMS.WBS
string col0 = pds.Rows[i][0].ToString().Trim(); string col0 = pds.Rows[i][0].ToString().Trim();
string col1 = pds.Rows[i][1].ToString().Trim(); string col1 = pds.Rows[i][1].ToString().Trim();
string col2 = pds.Rows[i][2].ToString().Trim(); string col2 = pds.Rows[i][2].ToString().Trim();
string col3 = pds.Rows[i][3].ToString().Trim();
if (!string.IsNullOrEmpty(col0)) if (!string.IsNullOrEmpty(col0))
{ {
if (string.IsNullOrEmpty(col0)) if (string.IsNullOrEmpty(col0))
@@ -394,6 +395,8 @@ namespace FineUIPro.Web.CQMS.WBS
result += "第" + (i + 2).ToString() + "行," + "导入项" + "," + "分项为必填项!" + "|"; result += "第" + (i + 2).ToString() + "行," + "导入项" + "," + "分项为必填项!" + "|";
} }
else else
{
if (BLL.WorkPackageService.GetWorkPackageByPackageContent(col0 + "-" + col1 + "-" + col2, UnitWorkId) == null) //数据库中不存在同样位号记录
{ {
Model.WBS_WorkPackage newWorkPackage = new Model.WBS_WorkPackage Model.WBS_WorkPackage newWorkPackage = new Model.WBS_WorkPackage
{ {
@@ -427,6 +430,7 @@ namespace FineUIPro.Web.CQMS.WBS
} }
} }
} }
}
if (!string.IsNullOrEmpty(results)) if (!string.IsNullOrEmpty(results))
{ {
results = "数据导入失败,未成功数据:" + results.Substring(0, results.LastIndexOf("|")); results = "数据导入失败,未成功数据:" + results.Substring(0, results.LastIndexOf("|"));
@@ -469,6 +473,8 @@ namespace FineUIPro.Web.CQMS.WBS
string txtName = values.Value<string>("SuperWorkPack"); string txtName = values.Value<string>("SuperWorkPack");
Model.WBS_WorkPackageProject workPackageProject = BLL.WorkPackageProjectService.GetWorkPackageProjectByWorkPackageCode(workPackageCode2, this.CurrUser.LoginProjectId); Model.WBS_WorkPackageProject workPackageProject = BLL.WorkPackageProjectService.GetWorkPackageProjectByWorkPackageCode(workPackageCode2, this.CurrUser.LoginProjectId);
if (oldWorkPackage == null) //新增内容 if (oldWorkPackage == null) //新增内容
{
if (BLL.WorkPackageService.GetWorkPackageByPackageContent(workPackageProject.PackageContent + "-" + txtName, UnitWorkId) == null) //数据库中不存在同样位号记录
{ {
Model.WBS_WorkPackage newWorkPackage = new Model.WBS_WorkPackage(); Model.WBS_WorkPackage newWorkPackage = new Model.WBS_WorkPackage();
if (workPackageCode != workPackageProject.WorkPackageCode) //循环至新的分部 if (workPackageCode != workPackageProject.WorkPackageCode) //循环至新的分部
@@ -521,6 +527,7 @@ namespace FineUIPro.Web.CQMS.WBS
num++; num++;
} }
} }
}
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
ShowNotify("保存成功!", MessageBoxIcon.Success); ShowNotify("保存成功!", MessageBoxIcon.Success);
} }
-82
View File
@@ -1,82 +0,0 @@
System.InvalidOperationException: 可为空的对象必须具有一个值。
在 System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
在 System.Nullable`1.get_Value()
在 BLL.HJGL_MaterialService.isInStockByPipeline(String pipelineid, String projectid) 位置 D:\诺必达\赛鼎\SGGL_SeDin\SGGL\BLL\HJGL\PreDesign\HJGL_MaterialService.cs:行号 284
System.InvalidOperationException: 可为空的对象必须具有一个值。
在 System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
在 System.Nullable`1.get_Value()
在 BLL.HJGL_MaterialService.isInStockByPipeline(String pipelineid, String projectid) 位置 D:\诺必达\赛鼎\SGGL_SeDin\SGGL\BLL\HJGL\PreDesign\HJGL_MaterialService.cs:行号 284
System.InvalidOperationException: 可为空的对象必须具有一个值。
在 System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
在 System.Nullable`1.get_Value()
在 BLL.HJGL_MaterialService.isInStockByPipeline(String pipelineid, String projectid) 位置 D:\诺必达\赛鼎\SGGL_SeDin\SGGL\BLL\HJGL\PreDesign\HJGL_MaterialService.cs:行号 284
System.InvalidOperationException: 可为空的对象必须具有一个值。
在 System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
在 System.Nullable`1.get_Value()
在 BLL.HJGL_MaterialService.isInStockByPipeline(String pipelineid, String projectid) 位置 D:\诺必达\赛鼎\SGGL_SeDin\SGGL\BLL\HJGL\PreDesign\HJGL_MaterialService.cs:行号 284
System.InvalidOperationException: 可为空的对象必须具有一个值。
在 System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
在 System.Nullable`1.get_Value()
在 BLL.HJGL_MaterialService.isInStockByPipeline(String pipelineid, String projectid) 位置 D:\诺必达\赛鼎\SGGL_SeDin\SGGL\BLL\HJGL\PreDesign\HJGL_MaterialService.cs:行号 284
System.InvalidOperationException: 可为空的对象必须具有一个值。
在 System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
在 System.Nullable`1.get_Value()
在 BLL.HJGL_MaterialService.isInStockByPipeline(String pipelineid, String projectid) 位置 D:\诺必达\赛鼎\SGGL_SeDin\SGGL\BLL\HJGL\PreDesign\HJGL_MaterialService.cs:行号 284
System.InvalidOperationException: 可为空的对象必须具有一个值。
在 System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
在 System.Nullable`1.get_Value()
在 BLL.HJGL_MaterialService.isInStockByPipeline(String pipelineid, String projectid) 位置 D:\诺必达\赛鼎\SGGL_SeDin\SGGL\BLL\HJGL\PreDesign\HJGL_MaterialService.cs:行号 284
System.InvalidOperationException: 可为空的对象必须具有一个值。
在 System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
在 System.Nullable`1.get_Value()
在 BLL.HJGL_MaterialService.isInStockByPipeline(String pipelineid, String projectid) 位置 D:\诺必达\赛鼎\SGGL_SeDin\SGGL\BLL\HJGL\PreDesign\HJGL_MaterialService.cs:行号 284
System.InvalidOperationException: 可为空的对象必须具有一个值。
在 System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
在 System.Nullable`1.get_Value()
在 BLL.HJGL_MaterialService.isInStockByPipeline(String pipelineid, String projectid) 位置 D:\诺必达\赛鼎\SGGL_SeDin\SGGL\BLL\HJGL\PreDesign\HJGL_MaterialService.cs:行号 284
System.InvalidOperationException: 可为空的对象必须具有一个值。
在 System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
在 System.Nullable`1.get_Value()
在 BLL.HJGL_MaterialService.isInStockByPipeline(String pipelineid, String projectid) 位置 D:\诺必达\赛鼎\SGGL_SeDin\SGGL\BLL\HJGL\PreDesign\HJGL_MaterialService.cs:行号 284
System.InvalidOperationException: 可为空的对象必须具有一个值。
在 System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
在 System.Nullable`1.get_Value()
在 BLL.HJGL_MaterialService.isInStockByPipeline(String pipelineid, String projectid) 位置 D:\诺必达\赛鼎\SGGL_SeDin\SGGL\BLL\HJGL\PreDesign\HJGL_MaterialService.cs:行号 284
System.InvalidOperationException: 可为空的对象必须具有一个值。
在 System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
在 System.Nullable`1.get_Value()
在 BLL.HJGL_MaterialService.isInStockByPipeline(String pipelineid, String projectid) 位置 D:\诺必达\赛鼎\SGGL_SeDin\SGGL\BLL\HJGL\PreDesign\HJGL_MaterialService.cs:行号 284
错误信息开始=====>
错误类型:FormatException
错误信息:输入字符串的格式不正确。
错误堆栈:
在 System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt)
在 System.String.System.IConvertible.ToDouble(IFormatProvider provider)
在 System.Convert.ToDouble(Object value)
在 FineUIPro.RenderField.VQscVYXUOqxsrrrlgEYaXHIhTAZB(GridRow )
在 (GridColumn , GridRow )
在 FineUIPro.GridRow.BkpgFeAELTFlAvoTrOBrConfcLJbA()
在 (GridRow )
在 FineUIPro.Grid.BkpgFeAELTFlAvoTrOBrConfcLJbA(Int32 , Object )
在 (Grid , Int32 , Object )
在 FineUIPro.Grid.LDChsdiaqdhUTcxBcQPMKyQFfjEDB(DataTable , Boolean )
在 (Grid , DataTable , Boolean )
在 FineUIPro.Grid.DataBind(Boolean keepCurrentData)
在 (Grid , Boolean )
在 FineUIPro.Grid.DataBind()
在 FineUIPro.Web.HJGL.WeldingManage.SelectTaskWeldJoint.BindGrid() 位置 D:\诺必达\赛鼎\SGGL_SeDin\SGGL\FineUIPro.Web\HJGL\WeldingManage\SelectTaskWeldJoint.aspx.cs:行号 339
在 FineUIPro.Web.HJGL.WeldingManage.SelectTaskWeldJoint.tvControlItem_NodeCommand(Object sender, TreeCommandEventArgs e) 位置 D:\诺必达\赛鼎\SGGL_SeDin\SGGL\FineUIPro.Web\HJGL\WeldingManage\SelectTaskWeldJoint.aspx.cs:行号 296
在 FineUIPro.Tree.OnNodeCommand(TreeCommandEventArgs e)
在 (Tree , TreeCommandEventArgs )
在 FineUIPro.Tree.RaisePostBackEvent(String eventArgument)
在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
出错时间:02/17/2023 15:15:39
出错文件:http://localhost:4909/HJGL/WeldingManage/SelectTaskWeldJoint.aspx?strList=51f17d4a-92b5-4bbc-8935-fa0fced13bcb%7C1af885ff-b778-46c6-a13d-a21b304ac835%7C2022-12-01
IP地址:::1
操作人员:JT
出错时间:02/17/2023 15:15:39
+1 -1
View File
@@ -12812,7 +12812,7 @@
<AutoAssignPort>True</AutoAssignPort> <AutoAssignPort>True</AutoAssignPort>
<DevelopmentServerPort>0</DevelopmentServerPort> <DevelopmentServerPort>0</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath> <DevelopmentServerVPath>/</DevelopmentServerVPath>
<IISUrl>http://localhost:4909/</IISUrl> <IISUrl>http://localhost:8899/</IISUrl>
<NTLMAuthentication>False</NTLMAuthentication> <NTLMAuthentication>False</NTLMAuthentication>
<UseCustomServer>False</UseCustomServer> <UseCustomServer>False</UseCustomServer>
<CustomServerUrl> <CustomServerUrl>
@@ -256,11 +256,11 @@ namespace FineUIPro.Web.HSSE.Hazard
} }
string strSql = @"SELECT H.HazardId,T.HazardListTypeId,T.HazardListTypeCode,T.HazardListTypeName,H.HazardCode,H.HazardItems,H.DefectsType," string strSql = @"SELECT H.HazardId,T.HazardListTypeId,T.HazardListTypeCode,T.HazardListTypeName,H.HazardCode,H.HazardItems,H.DefectsType,"
+ @" H.MayLeadAccidents,H.HelperMethod,H.HazardJudge_L,H.HazardJudge_E,H.HazardJudge_C,H.HazardJudge_D,Const0007.ConstText AS HazardLevel," + @" H.MayLeadAccidents,H.HelperMethod,H.HazardJudge_L,H.HazardJudge_E,H.HazardJudge_C,H.HazardJudge_D,Const0007.ConstText AS HazardLevel,"
+ @" H.ControlMeasures,H.CompileMan,H.CompileDate,H.AuditMan,H.AuditDate,H.IsPass,U.PersonName AS CompileManName,UR.UserName AS AuditManName" + @" H.ControlMeasures,H.CompileMan,H.CompileDate,H.AuditMan,H.AuditDate,H.IsPass,U.PersonName AS CompileManName,UR.PersonName AS AuditManName"
+ @" FROM Technique_HazardList AS H" + @" FROM Technique_HazardList AS H"
+ @" LEFT JOIN Technique_HazardListType AS T ON T.HazardListTypeId = H.HazardListTypeId" + @" LEFT JOIN Technique_HazardListType AS T ON T.HazardListTypeId = H.HazardListTypeId"
+ @" LEFT JOIN Person_Persons AS U ON U.PersonId = H.CompileMan" + @" LEFT JOIN Person_Persons AS U ON U.PersonId = H.CompileMan"
+ @" LEFT JOIN Person_Persons AS UR ON UR.UserId = H.AuditMan" + @" LEFT JOIN Person_Persons AS UR ON UR.PersonId = H.AuditMan"
+ @" LEFT JOIN Sys_Const AS Const0007 ON Const0007.ConstValue = H.HazardLevel and Const0007.GroupId = '" + ConstValue.Group_0007 + "'" + @" LEFT JOIN Sys_Const AS Const0007 ON Const0007.ConstValue = H.HazardLevel and Const0007.GroupId = '" + ConstValue.Group_0007 + "'"
+ @" WHERE T.HazardListTypeId = @HazardListTypeId "; + @" WHERE T.HazardListTypeId = @HazardListTypeId ";
List<SqlParameter> listStr = new List<SqlParameter> List<SqlParameter> listStr = new List<SqlParameter>
@@ -100,11 +100,11 @@ namespace FineUIPro.Web.HSSE.Hazard
{ {
string strSql = @"SELECT H.HazardId,T.HazardListTypeId,T.HazardListTypeCode,T.HazardListTypeName,H.HazardCode,H.HazardItems,H.DefectsType," string strSql = @"SELECT H.HazardId,T.HazardListTypeId,T.HazardListTypeCode,T.HazardListTypeName,H.HazardCode,H.HazardItems,H.DefectsType,"
+ @" H.MayLeadAccidents,H.HelperMethod,H.HazardJudge_L,H.HazardJudge_E,H.HazardJudge_C,H.HazardJudge_D,Const0007.ConstText AS HazardLevel," + @" H.MayLeadAccidents,H.HelperMethod,H.HazardJudge_L,H.HazardJudge_E,H.HazardJudge_C,H.HazardJudge_D,Const0007.ConstText AS HazardLevel,"
+ @" H.ControlMeasures,H.CompileMan,H.CompileDate,H.AuditMan,H.AuditDate,H.IsPass,U.PersonName AS CompileManName,UR.UserName AS AuditManName" + @" H.ControlMeasures,H.CompileMan,H.CompileDate,H.AuditMan,H.AuditDate,H.IsPass,U.PersonName AS CompileManName,UR.PersonName AS AuditManName"
+ @" FROM Technique_HazardList AS H" + @" FROM Technique_HazardList AS H"
+ @" LEFT JOIN Technique_HazardListType AS T ON T.HazardListTypeId = H.HazardListTypeId" + @" LEFT JOIN Technique_HazardListType AS T ON T.HazardListTypeId = H.HazardListTypeId"
+ @" LEFT JOIN Person_Persons AS U ON U.PersonId = H.CompileMan" + @" LEFT JOIN Person_Persons AS U ON U.PersonId = H.CompileMan"
+ @" LEFT JOIN Person_Persons AS UR ON UR.UserId = H.AuditMan" + @" LEFT JOIN Person_Persons AS UR ON UR.PersonId = H.AuditMan"
+ @" LEFT JOIN Sys_Const AS Const0007 ON Const0007.ConstValue = H.HazardLevel and Const0007.GroupId = '" + ConstValue.Group_0007 + "'" + @" LEFT JOIN Sys_Const AS Const0007 ON Const0007.ConstValue = H.HazardLevel and Const0007.GroupId = '" + ConstValue.Group_0007 + "'"
+ @" WHERE T.HazardListTypeId = @HazardListTypeId "; + @" WHERE T.HazardListTypeId = @HazardListTypeId ";
List<SqlParameter> listStr = new List<SqlParameter>(); List<SqlParameter> listStr = new List<SqlParameter>();