diff --git a/DataBase/版本日志/SGGLDB_CD_V2023-06-06-001.sql b/DataBase/版本日志/SGGLDB_CD_V2023-06-06-001.sql
new file mode 100644
index 00000000..d541d3ff
--- /dev/null
+++ b/DataBase/版本日志/SGGLDB_CD_V2023-06-06-001.sql
@@ -0,0 +1,6 @@
+alter table Base_Project add isDelete bit null
+
+ALTER TABLE [dbo].[Base_Project] ADD [ProjectAttribute] [varchar](50) NULL
+
+Alter TABLE [dbo].[Accident_AccidentPersonRecord] Add
+ [IsAttempt] [char](1) NULL
\ No newline at end of file
diff --git a/SGGL/BLL/Common/CommonService.cs b/SGGL/BLL/Common/CommonService.cs
index 309f6ce7..aa74639c 100644
--- a/SGGL/BLL/Common/CommonService.cs
+++ b/SGGL/BLL/Common/CommonService.cs
@@ -725,5 +725,16 @@ namespace BLL
{
return Funs.DB.Base_Unit.FirstOrDefault(x=>x.UnitId==Const.UnitId_CD);
}
+
+ ///
+ /// 得到本单位Id
+ ///
+ ///
+ public static string GetThisUnitId()
+ {
+ string unitId = Const.UnitId_CD;
+
+ return unitId;
+ }
}
}
diff --git a/SGGL/FineUIPro.Web/DataShow/Accident.aspx.cs b/SGGL/FineUIPro.Web/DataShow/Accident.aspx.cs
index 828a7bd9..3278df13 100644
--- a/SGGL/FineUIPro.Web/DataShow/Accident.aspx.cs
+++ b/SGGL/FineUIPro.Web/DataShow/Accident.aspx.cs
@@ -53,12 +53,7 @@ namespace FineUIPro.Web.DataShow
if (rbType.SelectedValue == "0")
{
- strSql += " AND AccidentType.AccidentTypeName LIKE @values";
- listStr.Add(new SqlParameter("@values", "% 未遂%"));
- }
- else
- {
- strSql += " AND '未遂' NOT IN (AccidentType.AccidentTypeName)";
+ strSql += " AND Record.IsAttempt='1'";
}
}
else
diff --git a/SGGL/FineUIPro.Web/DataShow/Check.aspx.cs b/SGGL/FineUIPro.Web/DataShow/Check.aspx.cs
index 68ff82dc..0114067e 100644
--- a/SGGL/FineUIPro.Web/DataShow/Check.aspx.cs
+++ b/SGGL/FineUIPro.Web/DataShow/Check.aspx.cs
@@ -1,8 +1,12 @@
-using BLL;
+using Aspose.Words;
+using BLL;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
+using System.IO;
+using System.Linq;
+using System.Text;
namespace FineUIPro.Web.DataShow
{
diff --git a/SGGL/FineUIPro.Web/DataShow/CompanyPerson.aspx.cs b/SGGL/FineUIPro.Web/DataShow/CompanyPerson.aspx.cs
index b710c640..89fd70c3 100644
--- a/SGGL/FineUIPro.Web/DataShow/CompanyPerson.aspx.cs
+++ b/SGGL/FineUIPro.Web/DataShow/CompanyPerson.aspx.cs
@@ -26,7 +26,7 @@ namespace FineUIPro.Web.DataShow
}
}
- ///
+ ///
/// 绑定数据
///
private void BindGrid()
@@ -37,16 +37,17 @@ namespace FineUIPro.Web.DataShow
+ @" LEFT JOIN Base_Unit AS Unit ON Unit.UnitId=Person.UnitId "
+ @" LEFT JOIN Base_WorkPost AS WorkPost ON Person.WorkPostId=WorkPost.WorkPostId WHERE 1=1 ";
List listStr = new List();
+ string UnitId = CommonService.GetThisUnitId();
if (this.rbCom.SelectedValue == "0")
{
- strSql += " AND Person.UnitId = @UnitId";
+ strSql += " AND Person.UnitId = @UnitId";
+ listStr.Add(new SqlParameter("@UnitId", UnitId));
}
else
{
strSql += " AND Person.UnitId != @UnitId";
+ listStr.Add(new SqlParameter("@UnitId", UnitId));
}
- listStr.Add(new SqlParameter("@UnitId", Const.UnitId_CD));
-
if (rbType.SelectedValue == "0")
{
strSql += " AND Person.WorkPostId = @WorkPostId";
diff --git a/SGGL/FineUIPro.Web/DataShow/HJGLDefect.aspx.cs b/SGGL/FineUIPro.Web/DataShow/HJGLDefect.aspx.cs
index 5cb335d8..91e9cd40 100644
--- a/SGGL/FineUIPro.Web/DataShow/HJGLDefect.aspx.cs
+++ b/SGGL/FineUIPro.Web/DataShow/HJGLDefect.aspx.cs
@@ -35,7 +35,7 @@ namespace FineUIPro.Web.DataShow
///
private void BindGrid()
{
- string strSql = @"SELECT Project.ProjectId,Project.ProjectName,Defects_Definition,COUNT(Item.CHT_CheckItemID) AS Counts
+ string strSql = @"SELECT NEWID() AS ID,Project.ProjectId,Project.ProjectName,Defects_Definition,COUNT(Item.CHT_CheckItemID) AS Counts
FROM CH_CheckItem AS Item
LEFT JOIN CH_Check AS Checks ON Item.CHT_CheckID =Checks.CHT_CheckID
LEFT JOIN Base_Project AS Project ON Checks.ProjectId =Project.ProjectId
diff --git a/SGGL/FineUIPro.Web/DataShow/HJGLWelding.aspx.cs b/SGGL/FineUIPro.Web/DataShow/HJGLWelding.aspx.cs
index d6b2f6f7..c8e610a6 100644
--- a/SGGL/FineUIPro.Web/DataShow/HJGLWelding.aspx.cs
+++ b/SGGL/FineUIPro.Web/DataShow/HJGLWelding.aspx.cs
@@ -34,7 +34,7 @@ namespace FineUIPro.Web.DataShow
///
private void BindGrid()
{
- string strSql = @"select ProjectId,ProjectCode, ProjectName from Base_Project where ProjectState =1";
+ string strSql = @"select ProjectId,ProjectCode, ProjectName from Base_Project where ProjectState =1 and (isDelete IS NULL OR isDelete =0) ";
List listStr = new List();
string cpara = string.Empty;
if (this.drpProject.SelectedValue != Const._Null)
diff --git a/SGGL/FineUIPro.Web/DataShow/HiddenRectification.aspx b/SGGL/FineUIPro.Web/DataShow/HiddenRectification.aspx
index 3427e7b9..a1ecc9b5 100644
--- a/SGGL/FineUIPro.Web/DataShow/HiddenRectification.aspx
+++ b/SGGL/FineUIPro.Web/DataShow/HiddenRectification.aspx
@@ -37,7 +37,7 @@
-
+
diff --git a/SGGL/FineUIPro.Web/DataShow/HiddenRectification.aspx.cs b/SGGL/FineUIPro.Web/DataShow/HiddenRectification.aspx.cs
index dbf0a5eb..42bc6869 100644
--- a/SGGL/FineUIPro.Web/DataShow/HiddenRectification.aspx.cs
+++ b/SGGL/FineUIPro.Web/DataShow/HiddenRectification.aspx.cs
@@ -33,7 +33,7 @@ namespace FineUIPro.Web.DataShow
///
private void BindGrid()
{
- string strSql = @"select ProjectId,ProjectCode, ProjectName from Base_Project where ProjectState =1";
+ string strSql = @"select ProjectId,ProjectCode, ProjectName from Base_Project where ProjectState =1 and (isDelete IS NULL OR isDelete =0) ";
List listStr = new List();
string cpara = string.Empty;
if (this.drpProject.SelectedValue != Const._Null)
diff --git a/SGGL/FineUIPro.Web/DataShow/HiddenRectificationItem.aspx.cs b/SGGL/FineUIPro.Web/DataShow/HiddenRectificationItem.aspx.cs
index 8964368f..95f7dd72 100644
--- a/SGGL/FineUIPro.Web/DataShow/HiddenRectificationItem.aspx.cs
+++ b/SGGL/FineUIPro.Web/DataShow/HiddenRectificationItem.aspx.cs
@@ -1,10 +1,13 @@
-using BLL;
+using Aspose.Words;
+using BLL;
+using Org.BouncyCastle.Asn1.Ocsp;
using System;
using System.Collections.Generic;
-using System.Configuration;
using System.Data;
using System.Data.SqlClient;
+using System.IO;
using System.Linq;
+using System.Text;
namespace FineUIPro.Web.DataShow
{
@@ -153,12 +156,18 @@ namespace FineUIPro.Web.DataShow
protected string ConvertImageUrlByImage(object registrationId)
{
string url = string.Empty;
+ string httpUrl = string.Empty;
+ var sysSet6 = (from x in Funs.DB.Sys_Set where x.SetName == "程序访问地址" select x).ToList().FirstOrDefault();
+ if (sysSet6 != null)
+ {
+ httpUrl = sysSet6.SetValue;
+ }
if (registrationId != null)
{
var registration = BLL.HSSE_Hazard_HazardRegisterService.GetHazardRegisterByHazardRegisterId(registrationId.ToString());
if (registration != null)
{
- url = BLL.UploadAttachmentService.ShowImage(ConfigurationManager.AppSettings["SGGLUrl"], registration.ImageUrl);
+ url = BLL.UploadAttachmentService.ShowImage(httpUrl, registration.ImageUrl);
}
}
return url;
@@ -173,16 +182,21 @@ namespace FineUIPro.Web.DataShow
protected string ConvertImgUrlByImage(object registrationId)
{
string url = string.Empty;
+ string httpUrl = string.Empty;
+ var sysSet6 = (from x in Funs.DB.Sys_Set where x.SetName == "程序访问地址" select x).ToList().FirstOrDefault();
+ if (sysSet6 != null)
+ {
+ httpUrl = sysSet6.SetValue;
+ }
if (registrationId != null)
{
var registration = BLL.HSSE_Hazard_HazardRegisterService.GetHazardRegisterByHazardRegisterId(registrationId.ToString());
if (registration != null)
{
- url = BLL.UploadAttachmentService.ShowImage(ConfigurationManager.AppSettings["SGGLUrl"], registration.RectificationImageUrl);
+ url = BLL.UploadAttachmentService.ShowImage(httpUrl, registration.RectificationImageUrl);
}
}
return url;
-
}
}
}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/DataShow/LargeEngineering.aspx.cs b/SGGL/FineUIPro.Web/DataShow/LargeEngineering.aspx.cs
index 3eaef7bc..fa4c4f63 100644
--- a/SGGL/FineUIPro.Web/DataShow/LargeEngineering.aspx.cs
+++ b/SGGL/FineUIPro.Web/DataShow/LargeEngineering.aspx.cs
@@ -43,7 +43,7 @@ namespace FineUIPro.Web.DataShow
///
private void BindGrid()
{
- string strSql = @"select ProjectId,ProjectCode, ProjectName from Base_Project where ProjectState =1";
+ string strSql = @"select ProjectId,ProjectCode, ProjectName from Base_Project where ProjectState =1 and (isDelete IS NULL OR isDelete =0) ";
List listStr = new List();
string cpara = string.Empty;
if (this.drpProject.SelectedValue != Const._Null)
diff --git a/SGGL/FineUIPro.Web/DataShow/LargeEngineeringItem.aspx.cs b/SGGL/FineUIPro.Web/DataShow/LargeEngineeringItem.aspx.cs
index df3fcf26..463a6b9a 100644
--- a/SGGL/FineUIPro.Web/DataShow/LargeEngineeringItem.aspx.cs
+++ b/SGGL/FineUIPro.Web/DataShow/LargeEngineeringItem.aspx.cs
@@ -1,8 +1,13 @@
-using BLL;
+using Aspose.Words;
+using BLL;
+using Org.BouncyCastle.Asn1.Ocsp;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
+using System.IO;
+using System.Linq;
+using System.Text;
namespace FineUIPro.Web.DataShow
{
diff --git a/SGGL/FineUIPro.Web/DataShow/Project.aspx.cs b/SGGL/FineUIPro.Web/DataShow/Project.aspx.cs
index a1fb51d1..80554519 100644
--- a/SGGL/FineUIPro.Web/DataShow/Project.aspx.cs
+++ b/SGGL/FineUIPro.Web/DataShow/Project.aspx.cs
@@ -32,12 +32,12 @@ namespace FineUIPro.Web.DataShow
private void BindGrid()
{
string strSql = "SELECT Project.ProjectId,Project.ProjectCode,Project.ProjectName,unit.UnitName,Project.StartDate,Project.EndDate,Project.ProjectAddress,ShortName, ConstructionMoney,"
- + @" (CASE WHEN ProjectState='" + BLL.Const.ProjectState_2 + "' THEN '暂停中' WHEN ProjectState='" + BLL.Const.ProjectState_3 + "' THEN '已完工' ELSE '施工中' END) AS ProjectStateName,Project.ProjectState"
+ + @" (CASE WHEN ProjectState='" + BLL.Const.ProjectState_2 + "' THEN '暂停中' WHEN ProjectState='" + BLL.Const.ProjectState_3 + "' THEN '已完工' ELSE '施工中' END) AS ProjectStateName,Project.ProjectState,(case ProjectAttribute when 'GONGCHENG' then '工程' when 'SHIYE' then '实业' else '' end) as ProjectAttributeName"
+ @" ,ProjectMoney,DATEDIFF(DAY,Project.StartDate,GETDATE()) AS DayCount,ProjectType.ProjectTypeName AS ProjectTypeName,sysConst.ConstText as ProjectStateName2"
+ @" FROM Base_Project AS Project LEFT JOIN Base_Unit as unit on unit.UnitId=Project.UnitId "
+ @" LEFT JOIN Base_ProjectType AS ProjectType ON Project.ProjectType =ProjectType.ProjectTypeId"
+ @" LEFT JOIN Sys_Const AS sysConst ON Project.ProjectState2 =sysConst.ConstValue AND sysConst.GroupId= '" + BLL.ConstValue.GroupId_ProjectState + "' "
- + @" WHERE 1=1";
+ + @" WHERE (ProjectAttribute='GONGCHENG' OR ProjectAttribute IS NULL ) and (Project.isDelete IS NULL OR Project.isDelete =0) ";
List listStr = new List();
if (this.ckState.SelectedValue != "0")
diff --git a/SGGL/FineUIPro.Web/DataShow/QualityControlPoint.aspx.cs b/SGGL/FineUIPro.Web/DataShow/QualityControlPoint.aspx.cs
index d90b2bc7..d88e21cc 100644
--- a/SGGL/FineUIPro.Web/DataShow/QualityControlPoint.aspx.cs
+++ b/SGGL/FineUIPro.Web/DataShow/QualityControlPoint.aspx.cs
@@ -35,7 +35,7 @@ namespace FineUIPro.Web.DataShow
///
private void BindGrid()
{
- string strSql = @"select ProjectId,ProjectCode, ProjectName from Base_Project where ProjectState =1";
+ string strSql = @"select ProjectId,ProjectCode, ProjectName from Base_Project where ProjectState =1 and (isDelete IS NULL OR isDelete =0)";
List listStr = new List();
string cpara = string.Empty;
if (this.drpProject.SelectedValue != Const._Null)
diff --git a/SGGL/FineUIPro.Web/DataShow/QualityInstruments.aspx.cs b/SGGL/FineUIPro.Web/DataShow/QualityInstruments.aspx.cs
index 1c7be0de..612b9602 100644
--- a/SGGL/FineUIPro.Web/DataShow/QualityInstruments.aspx.cs
+++ b/SGGL/FineUIPro.Web/DataShow/QualityInstruments.aspx.cs
@@ -34,7 +34,7 @@ namespace FineUIPro.Web.DataShow
///
private void BindGrid()
{
- string strSql = @"select ProjectId,ProjectCode, ProjectName from Base_Project where ProjectState =1";
+ string strSql = @"select ProjectId,ProjectCode, ProjectName from Base_Project where ProjectState =1 and (isDelete IS NULL OR isDelete =0)";
List listStr = new List();
string cpara = string.Empty;
if (this.drpProject.SelectedValue != Const._Null)
diff --git a/SGGL/FineUIPro.Web/DataShow/QualityPerson.aspx.cs b/SGGL/FineUIPro.Web/DataShow/QualityPerson.aspx.cs
index 3a6b7271..41817452 100644
--- a/SGGL/FineUIPro.Web/DataShow/QualityPerson.aspx.cs
+++ b/SGGL/FineUIPro.Web/DataShow/QualityPerson.aspx.cs
@@ -42,7 +42,7 @@ namespace FineUIPro.Web.DataShow
+ @" FROM Person_CompanyBranchPerson AS Person "
+ @" LEFT JOIN Base_Unit AS Unit ON Unit.UnitId=Person.UnitId "
+ @" LEFT JOIN Base_WorkPost AS WorkPost ON Person.WorkPostId=WorkPost.WorkPostId WHERE WorkPost.IsCQMS=1 ";
-
+ string UnitId = CommonService.GetThisUnitId();
if (this.rbCom.SelectedValue == "1")
{
strSql += " AND Person.UnitId = @UnitId";
@@ -51,7 +51,7 @@ namespace FineUIPro.Web.DataShow
{
strSql += " AND Person.UnitId != @UnitId";
}
- listStr.Add(new SqlParameter("@UnitId", Const.UnitId_CD));
+ listStr.Add(new SqlParameter("@UnitId", UnitId));
this.Grid1.Columns[1].Hidden = true;
}
else
diff --git a/SGGL/FineUIPro.Web/DataShow/QualityProblem.aspx b/SGGL/FineUIPro.Web/DataShow/QualityProblem.aspx
index 4db771a9..03ef5aa7 100644
--- a/SGGL/FineUIPro.Web/DataShow/QualityProblem.aspx
+++ b/SGGL/FineUIPro.Web/DataShow/QualityProblem.aspx
@@ -34,8 +34,8 @@
-
-
+
+
@@ -52,8 +52,8 @@
-
-
+
+
@@ -91,7 +91,7 @@
+ Width="1200px" Height="620px" Maximized="true">