进度和实施计划修改

This commit is contained in:
高飞 2023-07-26 09:35:27 +08:00
parent 0bdd467fdb
commit 71eac2c7a9
5 changed files with 113 additions and 15 deletions

View File

@ -25,3 +25,26 @@ alter table [dbo].[WBS_UnitWork] add RealStartDate datetime null
GO GO
alter table [dbo].[WBS_UnitWork] add RealEndDate datetime null alter table [dbo].[WBS_UnitWork] add RealEndDate datetime null
GO GO
CREATE VIEW [dbo].[View_WBS]
AS
select '1' as Id,'0' as SupId ,'JZ' as Code, '½¨Öþ¹¤³Ì' as Name,'ProjectType' as WBSType,
ProjectId from dbo.WBS_UnitWork
Union
select UnitWorkId as Id,ProjectType as SupId ,UnitWorkCode as Code, UnitWorkCode+'-'+UnitWorkName as Name,'UnitWork' as WBSType,
ProjectId from dbo.WBS_UnitWork
Union all
select WorkPackageId as id,UnitWorkId as SupId,WorkPackageCode as Code, PackageContent as Name,'WorkPackage' as WBSType,
ProjectId from dbo.WBS_WorkPackage w where IsApprove=1 and SuperWorkPackageId is null
Union all
select WorkPackageId as id,SuperWorkPackageId as SupId,WorkPackageCode as Code, PackageContent as Name,'WorkPackage' as WBSType,
ProjectId from dbo.WBS_WorkPackage w where IsApprove=1 and SuperWorkPackageId is not null
GO

View File

@ -211,6 +211,11 @@
/// </summary> /// </summary>
public const string Depart_constructionId = "ab1eb44a-1821-48ee-86f2-64b7e6425efa"; public const string Depart_constructionId = "ab1eb44a-1821-48ee-86f2-64b7e6425efa";
/// <summary>
///公司领导部门id
/// </summary>
public const string Depart_CompanyLeaderId = "c09c17b7-742a-4d1e-aa26-5470b6782d1e";
/// <summary> /// <summary>
///测试项目id ///测试项目id
/// </summary> /// </summary>

View File

@ -600,8 +600,10 @@ namespace FineUIPro.Web.HSSE.ActionPlan
} }
var approves = db.ActionPlan_ActionPlanListApprove.Where(x => x.ActionPlanListId == Id && x.ApproveType == BLL.Const.ActionPlanList_Reviewing).ToList(); var approves = db.ActionPlan_ActionPlanListApprove.Where(x => x.ActionPlanListId == Id && x.ApproveType == BLL.Const.ActionPlanList_Reviewing).ToList();
var ActionPlan_ActionPlanListApproveList2 = db.ActionPlan_ActionPlanListApprove.Where(x => x.ActionPlanListId == Id && x.ApproveType == "6").ToList(); var ActionPlan_ActionPlanListApproveList2 = db.ActionPlan_ActionPlanListApprove.Where(x => x.ActionPlanListId == Id && x.ApproveType == "6").ToList();
DateTime date = DateTime.Now;
if (ActionPlan_ActionPlanListApproveList2.Count > 0 || approves.Count > 0) if (ActionPlan_ActionPlanListApproveList2.Count > 0 || approves.Count > 0)
{ {
date = ActionPlan_ActionPlanListApproveList2.OrderByDescending(x => x.ApproveDate).FirstOrDefault().ApproveDate.Value;
#region #region
//主要评审部门 //主要评审部门
builder.InsertCell(); builder.InsertCell();
@ -782,9 +784,20 @@ namespace FineUIPro.Web.HSSE.ActionPlan
builder.Font.Bold = true; builder.Font.Bold = true;
builder.RowFormat.Height = 40; builder.RowFormat.Height = 40;
builder.Write("公司安全总监/部门负责人:"); builder.Write("公司安全总监/部门负责人:");
builder.Write(" 年"); var personAQ = BLL.Person_PersonsService.GetPerson_PersonsById("905a75d6-e733-449f-9742-4dcd71e8d2e1"); //安全总监任学宁
builder.Write(" 月"); if (!string.IsNullOrEmpty(personAQ.SignatureUrl) && File.Exists(rootPath + personAQ.SignatureUrl))
builder.Write(" 日"); {
var file = rootPath + personAQ.SignatureUrl;
builder.InsertImage(file, 80, 20);
builder.Write(date.ToString().Split(' ')[0]);
}
else
{
builder.Write(personAQ.PersonName + " " + date.ToString().Split(' ')[0]);
}
//builder.Write(" 年");
//builder.Write(" 月");
//builder.Write(" 日");
builder.EndRow(); builder.EndRow();
builder.InsertCell(); builder.InsertCell();
@ -805,9 +818,31 @@ namespace FineUIPro.Web.HSSE.ActionPlan
builder.Font.Bold = true; builder.Font.Bold = true;
builder.RowFormat.Height = 40; builder.RowFormat.Height = 40;
builder.Write("公司主管生产/安全领导:"); builder.Write("公司主管生产/安全领导:");
builder.Write(" 年"); var GSLDApprove = (from x in db.ActionPlan_ActionPlanListApprove
builder.Write(" 月"); join y in db.Person_Persons
builder.Write(" 日"); on x.ApproveMan equals y.PersonId
where x.ActionPlanListId == Id && x.DepartId == BLL.Const.Depart_CompanyLeaderId
select x).FirstOrDefault();
if (GSLDApprove != null)
{
var personGSLD = BLL.Person_PersonsService.GetPerson_PersonsById(GSLDApprove.ApproveMan);
if (!string.IsNullOrEmpty(personGSLD.SignatureUrl) && File.Exists(rootPath + personGSLD.SignatureUrl))
{
var file = rootPath + personGSLD.SignatureUrl;
builder.InsertImage(file, 80, 20);
builder.Write(GSLDApprove.ApproveDate.ToString().Split(' ')[0]);
}
else
{
builder.Write(personGSLD.PersonName + " " + GSLDApprove.ApproveDate.ToString().Split(' ')[0]);
}
}
else
{
builder.Write(" 年");
builder.Write(" 月");
builder.Write(" 日");
}
builder.EndRow(); builder.EndRow();
builder.Font.Bold = false; builder.Font.Bold = false;

View File

@ -582,8 +582,10 @@ namespace FineUIPro.Web.ZHGL.Plan
} }
var approves = db.ActionPlan_ActionPlanListApprove.Where(x => x.ActionPlanListId == Id && x.ApproveType == BLL.Const.ActionPlanList_Reviewing).ToList(); var approves = db.ActionPlan_ActionPlanListApprove.Where(x => x.ActionPlanListId == Id && x.ApproveType == BLL.Const.ActionPlanList_Reviewing).ToList();
var ActionPlan_ActionPlanListApproveList2 = db.ActionPlan_ActionPlanListApprove.Where(x => x.ActionPlanListId == Id && x.ApproveType == "6").ToList(); var ActionPlan_ActionPlanListApproveList2 = db.ActionPlan_ActionPlanListApprove.Where(x => x.ActionPlanListId == Id && x.ApproveType == "6").ToList();
DateTime date = DateTime.Now;
if (ActionPlan_ActionPlanListApproveList2.Count > 0 || approves.Count > 0) if (ActionPlan_ActionPlanListApproveList2.Count > 0 || approves.Count > 0)
{ {
date = ActionPlan_ActionPlanListApproveList2.OrderByDescending(x => x.ApproveDate).FirstOrDefault().ApproveDate.Value;
#region #region
//主要评审部门 //主要评审部门
builder.InsertCell(); builder.InsertCell();
@ -764,9 +766,20 @@ namespace FineUIPro.Web.ZHGL.Plan
builder.Font.Bold = true; builder.Font.Bold = true;
builder.RowFormat.Height = 40; builder.RowFormat.Height = 40;
builder.Write("公司安全总监/部门负责人:"); builder.Write("公司安全总监/部门负责人:");
builder.Write(" 年"); var personAQ = BLL.Person_PersonsService.GetPerson_PersonsById("905a75d6-e733-449f-9742-4dcd71e8d2e1"); //安全总监任学宁
builder.Write(" 月"); if (!string.IsNullOrEmpty(personAQ.SignatureUrl) && File.Exists(rootPath + personAQ.SignatureUrl))
builder.Write(" 日"); {
var file = rootPath + personAQ.SignatureUrl;
builder.InsertImage(file, 80, 20);
builder.Write(date.ToString().Split(' ')[0]);
}
else
{
builder.Write(personAQ.PersonName + " " + date.ToString().Split(' ')[0]);
}
//builder.Write(" 年");
//builder.Write(" 月");
//builder.Write(" 日");
builder.EndRow(); builder.EndRow();
builder.InsertCell(); builder.InsertCell();
@ -787,9 +800,31 @@ namespace FineUIPro.Web.ZHGL.Plan
builder.Font.Bold = true; builder.Font.Bold = true;
builder.RowFormat.Height = 40; builder.RowFormat.Height = 40;
builder.Write("公司主管生产/安全领导:"); builder.Write("公司主管生产/安全领导:");
builder.Write(" 年"); var GSLDApprove = (from x in db.ActionPlan_ActionPlanListApprove
builder.Write(" 月"); join y in db.Person_Persons
builder.Write(" 日"); on x.ApproveMan equals y.PersonId
where x.ActionPlanListId == Id && x.DepartId == BLL.Const.Depart_CompanyLeaderId
select x).FirstOrDefault();
if (GSLDApprove != null)
{
var personGSLD = BLL.Person_PersonsService.GetPerson_PersonsById(GSLDApprove.ApproveMan);
if (!string.IsNullOrEmpty(personGSLD.SignatureUrl) && File.Exists(rootPath + personGSLD.SignatureUrl))
{
var file = rootPath + personGSLD.SignatureUrl;
builder.InsertImage(file, 80, 20);
builder.Write(GSLDApprove.ApproveDate.ToString().Split(' ')[0]);
}
else
{
builder.Write(personGSLD.PersonName + " " + GSLDApprove.ApproveDate.ToString().Split(' ')[0]);
}
}
else
{
builder.Write(" 年");
builder.Write(" 月");
builder.Write(" 日");
}
builder.EndRow(); builder.EndRow();
builder.Font.Bold = false; builder.Font.Bold = false;

View File

@ -11402,7 +11402,7 @@ namespace Model
} }
} }
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveIdea", DbType="NVarChar(200)")] [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveIdea", DbType="NVarChar(2000)")]
public string ApproveIdea public string ApproveIdea
{ {
get get
@ -148713,7 +148713,7 @@ namespace Model
} }
} }
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttentPerson", DbType="NVarChar(500)")] [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttentPerson", DbType="NVarChar(3000)")]
public string AttentPerson public string AttentPerson
{ {
get get