进度和实施计划修改

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
@@ -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 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)
{
date = ActionPlan_ActionPlanListApproveList2.OrderByDescending(x => x.ApproveDate).FirstOrDefault().ApproveDate.Value;
#region
//主要评审部门
builder.InsertCell();
@@ -782,9 +784,20 @@ namespace FineUIPro.Web.HSSE.ActionPlan
builder.Font.Bold = true;
builder.RowFormat.Height = 40;
builder.Write("公司安全总监/部门负责人:");
builder.Write(" 年");
builder.Write(" 月");
builder.Write(" 日");
var personAQ = BLL.Person_PersonsService.GetPerson_PersonsById("905a75d6-e733-449f-9742-4dcd71e8d2e1"); //安全总监任学宁
if (!string.IsNullOrEmpty(personAQ.SignatureUrl) && File.Exists(rootPath + personAQ.SignatureUrl))
{
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.InsertCell();
@@ -805,9 +818,31 @@ namespace FineUIPro.Web.HSSE.ActionPlan
builder.Font.Bold = true;
builder.RowFormat.Height = 40;
builder.Write("公司主管生产/安全领导:");
builder.Write(" 年");
builder.Write(" 月");
builder.Write(" 日");
var GSLDApprove = (from x in db.ActionPlan_ActionPlanListApprove
join y in db.Person_Persons
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.Font.Bold = false;
@@ -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 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)
{
date = ActionPlan_ActionPlanListApproveList2.OrderByDescending(x => x.ApproveDate).FirstOrDefault().ApproveDate.Value;
#region
//主要评审部门
builder.InsertCell();
@@ -764,9 +766,20 @@ namespace FineUIPro.Web.ZHGL.Plan
builder.Font.Bold = true;
builder.RowFormat.Height = 40;
builder.Write("公司安全总监/部门负责人:");
builder.Write(" 年");
builder.Write(" 月");
builder.Write(" 日");
var personAQ = BLL.Person_PersonsService.GetPerson_PersonsById("905a75d6-e733-449f-9742-4dcd71e8d2e1"); //安全总监任学宁
if (!string.IsNullOrEmpty(personAQ.SignatureUrl) && File.Exists(rootPath + personAQ.SignatureUrl))
{
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.InsertCell();
@@ -787,9 +800,31 @@ namespace FineUIPro.Web.ZHGL.Plan
builder.Font.Bold = true;
builder.RowFormat.Height = 40;
builder.Write("公司主管生产/安全领导:");
builder.Write(" 年");
builder.Write(" 月");
builder.Write(" 日");
var GSLDApprove = (from x in db.ActionPlan_ActionPlanListApprove
join y in db.Person_Persons
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.Font.Bold = false;