111
This commit is contained in:
@@ -7,6 +7,7 @@ using System.Data.SqlClient;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Web.Services.Description;
|
||||
|
||||
namespace FineUIPro.Web.HSSE.License
|
||||
{
|
||||
@@ -299,7 +300,16 @@ namespace FineUIPro.Web.HSSE.License
|
||||
File.Copy(uploadfilepath, newUrl);
|
||||
///更新书签
|
||||
var getFireWork = LicensePublicService.GetFireWorkById(Id);
|
||||
var projectName = ProjectService.GetProjectNameByProjectId(getFireWork.ProjectId);
|
||||
Document doc = new Aspose.Words.Document(newUrl);
|
||||
Bookmark bookmarkProjectName = doc.Range.Bookmarks["ProjectName"];//编号
|
||||
if (bookmarkProjectName != null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(projectName))
|
||||
{
|
||||
bookmarkProjectName.Text = projectName;
|
||||
}
|
||||
}
|
||||
Bookmark bookmarkLicenseCode = doc.Range.Bookmarks["LicenseCode"];//编号
|
||||
if (bookmarkLicenseCode != null)
|
||||
{
|
||||
@@ -308,32 +318,39 @@ namespace FineUIPro.Web.HSSE.License
|
||||
bookmarkLicenseCode.Text = getFireWork.LicenseCode;
|
||||
}
|
||||
}
|
||||
Bookmark bookmarkApplyManName = doc.Range.Bookmarks["ApplyManName"];//申请人
|
||||
Bookmark bookmarkApplyManName1 = doc.Range.Bookmarks["ApplyManName1"];//申请人
|
||||
Bookmark bookmarkApplyManPhone = doc.Range.Bookmarks["ApplyManPhone"];//申请人
|
||||
if (bookmarkApplyManName != null)
|
||||
Bookmark bookmarkWorkLeader = doc.Range.Bookmarks["WorkLeader"];//现场负责人
|
||||
if (bookmarkWorkLeader != null)
|
||||
{
|
||||
if (getFireWork != null)
|
||||
{
|
||||
var getUser = UserService.GetUserByUserId(getFireWork.ApplyManId);
|
||||
var getUser = UserService.GetUserByUserId(getFireWork.WorkLeaderId) ;
|
||||
if (getUser != null)
|
||||
{
|
||||
bookmarkApplyManName.Text = getUser.UserName;
|
||||
if (bookmarkApplyManName1 != null)
|
||||
{
|
||||
bookmarkApplyManName1.Text = getUser.UserName;
|
||||
}
|
||||
if (bookmarkApplyManPhone != null)
|
||||
{
|
||||
bookmarkApplyManPhone.Text = getUser.Telephone;
|
||||
}
|
||||
bookmarkWorkLeader.Text = getUser.UserName;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Bookmark bookmarkWorkLeaderTel = doc.Range.Bookmarks["WorkLeaderTel"];//现场负责人电话
|
||||
if (bookmarkWorkLeaderTel != null)
|
||||
{
|
||||
if (getFireWork != null&&!string.IsNullOrEmpty(getFireWork.WorkLeaderTel))
|
||||
{
|
||||
bookmarkWorkLeaderTel.Text = getFireWork.WorkLeaderTel;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Bookmark bookmarkFireMan = doc.Range.Bookmarks["FireMan"];//动火人
|
||||
if (bookmarkFireMan != null)
|
||||
{
|
||||
if (getFireWork != null && !string.IsNullOrEmpty(getFireWork.FireMan))
|
||||
{
|
||||
bookmarkFireMan.Text = getFireWork.FireMan;
|
||||
}
|
||||
}
|
||||
|
||||
Bookmark bookmarkUnitName = doc.Range.Bookmarks["UnitName"];//申请单位
|
||||
if (bookmarkUnitName != null)
|
||||
{
|
||||
@@ -346,31 +363,23 @@ namespace FineUIPro.Web.HSSE.License
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Bookmark bookmarkWorkPalce = doc.Range.Bookmarks["WorkPalce"];//作业地点
|
||||
if (bookmarkWorkPalce != null)
|
||||
{
|
||||
if (getFireWork != null)
|
||||
if (getFireWork != null && !string.IsNullOrEmpty(getFireWork.WorkPalce))
|
||||
{
|
||||
bookmarkWorkPalce.Text = getFireWork.WorkPalce;
|
||||
|
||||
}
|
||||
}
|
||||
Bookmark bookmarkFireWatchManName = doc.Range.Bookmarks["FireWatchManName"];//监火人员
|
||||
if (bookmarkFireWatchManName != null)
|
||||
Bookmark bookmarkOtherAttach = doc.Range.Bookmarks["OtherAttach"];//
|
||||
if (bookmarkOtherAttach != null && !string.IsNullOrEmpty(getFireWork.OtherAttach))
|
||||
{
|
||||
if (getFireWork != null)
|
||||
{
|
||||
//var getUser = UserService.GetUserByUserId(getFireWork.FireWatchManId);
|
||||
//if (getUser != null)
|
||||
//{
|
||||
if (!string.IsNullOrEmpty(getFireWork.FireWatchManName))
|
||||
{
|
||||
bookmarkFireWatchManName.Text = getFireWork.FireWatchManName;
|
||||
}
|
||||
//}
|
||||
|
||||
}
|
||||
}
|
||||
bookmarkOtherAttach.Text = getFireWork.OtherAttach;
|
||||
}
|
||||
|
||||
|
||||
Bookmark bookmarkValidityDate = doc.Range.Bookmarks["ValidityDate"];//有效期限
|
||||
if (bookmarkValidityDate != null)
|
||||
{
|
||||
@@ -379,325 +388,127 @@ namespace FineUIPro.Web.HSSE.License
|
||||
if (getFireWork.ValidityStartTime.HasValue)
|
||||
{
|
||||
|
||||
bookmarkValidityDate.Text = getFireWork.ValidityStartTime.Value.Year + "年" + getFireWork.ValidityStartTime.Value.Month + "月" + getFireWork.ValidityStartTime.Value.Day + "日" + getFireWork.ValidityStartTime.Value.Hour + "时至";
|
||||
bookmarkValidityDate.Text = getFireWork.ValidityStartTime.Value.Year + "年" + getFireWork.ValidityStartTime.Value.Month + "月" + getFireWork.ValidityStartTime.Value.Day + "日" + getFireWork.ValidityStartTime.Value.Hour + "时" + getFireWork.ValidityStartTime.Value.Minute + "分至";
|
||||
if (getFireWork.ValidityEndTime.HasValue)
|
||||
{
|
||||
bookmarkValidityDate.Text += getFireWork.ValidityEndTime.Value.Year + "年" + getFireWork.ValidityEndTime.Value.Month + "月" + getFireWork.ValidityEndTime.Value.Day + "日" + getFireWork.ValidityEndTime.Value.Hour + "时";
|
||||
bookmarkValidityDate.Text += getFireWork.ValidityEndTime.Value.Year + "年" + getFireWork.ValidityEndTime.Value.Month + "月" + getFireWork.ValidityEndTime.Value.Day + "日" + getFireWork.ValidityEndTime.Value.Hour + "时" + getFireWork.ValidityEndTime.Value.Minute + "分";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Bookmark bookmarkWorkMeasures = doc.Range.Bookmarks["WorkMeasures"];//作业内容
|
||||
if (bookmarkWorkMeasures != null)
|
||||
if (bookmarkWorkMeasures != null && !string.IsNullOrEmpty(getFireWork.WorkMeasures))
|
||||
{
|
||||
if (getFireWork != null)
|
||||
{
|
||||
bookmarkWorkMeasures.Text = getFireWork.WorkMeasures;
|
||||
|
||||
}
|
||||
bookmarkWorkMeasures.Text = getFireWork.WorkMeasures;
|
||||
}
|
||||
Bookmark bookmarkAnalysisData = doc.Range.Bookmarks["AnalysisData"];//分析数据
|
||||
if (bookmarkAnalysisData != null&& getFireWork.AnalysisData!=null)
|
||||
Bookmark bookmarOther1 = doc.Range.Bookmarks["Other1"];//作业内容
|
||||
if (bookmarOther1 != null && !string.IsNullOrEmpty(getFireWork.Other1))
|
||||
{
|
||||
if (getFireWork != null)
|
||||
{
|
||||
bookmarkAnalysisData.Text = getFireWork.AnalysisData;
|
||||
|
||||
}
|
||||
bookmarOther1.Text = getFireWork.Other1;
|
||||
}
|
||||
Bookmark bookmarOther2 = doc.Range.Bookmarks["Other2"];//作业内容
|
||||
if (bookmarOther2 != null && !string.IsNullOrEmpty(getFireWork.Other2))
|
||||
{
|
||||
bookmarOther2.Text = getFireWork.Other2;
|
||||
}
|
||||
|
||||
Bookmark bookmarkHasSpecial1 = doc.Range.Bookmarks["HasSpecial1"];//分析数据
|
||||
Bookmark bookmarkHasSpecial2 = doc.Range.Bookmarks["HasSpecial2"];//分析数据
|
||||
if (!string.IsNullOrEmpty(getFireWork.HasSpecialProgramme))
|
||||
{
|
||||
if (getFireWork.HasSpecialProgramme == "是")
|
||||
{
|
||||
bookmarkHasSpecial1.Text = "■";
|
||||
bookmarkHasSpecial2.Text = "□";
|
||||
}
|
||||
else
|
||||
{
|
||||
bookmarkHasSpecial1.Text = "□";
|
||||
bookmarkHasSpecial2.Text = "■";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
bookmarkHasSpecial2.Text = "□";
|
||||
bookmarkHasSpecial1.Text = "□";
|
||||
}
|
||||
bookmarWorkType(doc, getFireWork, "WorkType1", "焊接");
|
||||
bookmarWorkType(doc, getFireWork, "WorkType2", "气割");
|
||||
bookmarWorkType(doc, getFireWork, "WorkType3", "燃烧");
|
||||
bookmarWorkType(doc, getFireWork, "WorkType4", "明火");
|
||||
bookmarWorkType(doc, getFireWork, "WorkType5", "研磨");
|
||||
bookmarWorkType(doc, getFireWork, "WorkType6", "打磨");
|
||||
bookmarWorkType(doc, getFireWork, "WorkType7", "钻孔");
|
||||
bookmarWorkType(doc, getFireWork, "WorkType8", "破碎");
|
||||
bookmarWorkType(doc, getFireWork, "WorkType9", "其他1");
|
||||
bookmarWorkType(doc, getFireWork, "WorkType10", "使用非防爆的电气设备");
|
||||
bookmarWorkType(doc, getFireWork, "WorkType11", "使用内燃发动机设备");
|
||||
bookmarWorkType(doc, getFireWork, "WorkType12", "其他特种作业");
|
||||
bookmarWorkType(doc, getFireWork, "WorkType13", "其他2");
|
||||
|
||||
bookmarWorkType(doc, getFireWork, "PossibleHazards1", "爆炸");
|
||||
bookmarWorkType(doc, getFireWork, "PossibleHazards2", "火灾");
|
||||
bookmarWorkType(doc, getFireWork, "PossibleHazards3", "灼伤");
|
||||
bookmarWorkType(doc, getFireWork, "PossibleHazards4", "烫伤");
|
||||
bookmarWorkType(doc, getFireWork, "PossibleHazards5", "机械伤害");
|
||||
bookmarWorkType(doc, getFireWork, "PossibleHazards6", "中毒");
|
||||
bookmarWorkType(doc, getFireWork, "PossibleHazards7", "辐射");
|
||||
bookmarWorkType(doc, getFireWork, "PossibleHazards8", "触电");
|
||||
bookmarWorkType(doc, getFireWork, "PossibleHazards9", "泄漏");
|
||||
bookmarWorkType(doc, getFireWork, "PossibleHazards10", "窒息");
|
||||
bookmarWorkType(doc, getFireWork, "PossibleHazards11", "坠落");
|
||||
bookmarWorkType(doc, getFireWork, "PossibleHazards12", "落物");
|
||||
bookmarWorkType(doc, getFireWork, "PossibleHazards13", "掩埋");
|
||||
bookmarWorkType(doc, getFireWork, "PossibleHazards14", "噪声");
|
||||
bookmarWorkType(doc, getFireWork, "PossibleHazards15", "其他");
|
||||
|
||||
|
||||
|
||||
Bookmark bookmarkNeedGasDetection1 = doc.Range.Bookmarks["NeedGasDetection1"];//是否需要气体检测
|
||||
Bookmark bookmarkNeedGasDetection2 = doc.Range.Bookmarks["NeedGasDetection2"];//是否需要气体检测
|
||||
|
||||
if (getFireWork != null && getFireWork.NeedGasDetection == "是")
|
||||
{
|
||||
bookmarkNeedGasDetection1.Text = "■";
|
||||
bookmarkNeedGasDetection2.Text = "□";
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
bookmarkNeedGasDetection1.Text = "□";
|
||||
bookmarkNeedGasDetection2.Text = "■";
|
||||
|
||||
}
|
||||
|
||||
Bookmark bookmarkDetectionFrequency = doc.Range.Bookmarks["DetectionFrequency"];// 检测频次
|
||||
if (bookmarkDetectionFrequency != null && !string.IsNullOrEmpty(getFireWork.DetectionFrequency))
|
||||
{
|
||||
bookmarkDetectionFrequency.Text = getFireWork.DetectionFrequency;
|
||||
}
|
||||
|
||||
|
||||
var GetLicenseItemList = LicensePublicService.GetLicenseItemListByDataId(Id);
|
||||
if (GetLicenseItemList.Count > 0)
|
||||
{
|
||||
var item1 = GetLicenseItemList.FirstOrDefault(x => x.SortIndex == 1);
|
||||
if (item1 != null)
|
||||
{
|
||||
if (item1.IsUsed == true)
|
||||
{
|
||||
Bookmark bookmarkUser1 = doc.Range.Bookmarks["User1"];//确认执行
|
||||
if (bookmarkUser1 != null)
|
||||
{
|
||||
bookmarkUser1.Text = "√";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Bookmark bookmarkIsFit1 = doc.Range.Bookmarks["IsFit1"];
|
||||
if (bookmarkIsFit1 != null)
|
||||
{
|
||||
if (item1 != null)
|
||||
{
|
||||
bookmarkIsFit1.Text = "×";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
bookmarLicense_LicenseItem(doc, GetLicenseItemList, 1, "LicenseItemList1");
|
||||
bookmarLicense_LicenseItem(doc, GetLicenseItemList, 2, "LicenseItemList2");
|
||||
bookmarLicense_LicenseItem(doc, GetLicenseItemList, 3, "LicenseItemList3");
|
||||
bookmarLicense_LicenseItem(doc, GetLicenseItemList, 4, "LicenseItemList4");
|
||||
bookmarLicense_LicenseItem(doc, GetLicenseItemList, 5, "LicenseItemList5");
|
||||
bookmarLicense_LicenseItem(doc, GetLicenseItemList, 6, "LicenseItemList6");
|
||||
bookmarLicense_LicenseItem(doc, GetLicenseItemList, 7, "LicenseItemList7");
|
||||
bookmarLicense_LicenseItem(doc, GetLicenseItemList, 8, "LicenseItemList8");
|
||||
bookmarLicense_LicenseItem(doc, GetLicenseItemList, 9, "LicenseItemList9");
|
||||
bookmarLicense_LicenseItem(doc, GetLicenseItemList, 10, "LicenseItemList10");
|
||||
bookmarLicense_LicenseItem(doc, GetLicenseItemList, 11, "LicenseItemList11");
|
||||
bookmarLicense_LicenseItem(doc, GetLicenseItemList, 12, "LicenseItemList12");
|
||||
bookmarLicense_LicenseItem(doc, GetLicenseItemList, 13, "LicenseItemList13");
|
||||
bookmarLicense_LicenseItem(doc, GetLicenseItemList, 14, "LicenseItemList14");
|
||||
bookmarLicense_LicenseItem(doc, GetLicenseItemList, 15, "LicenseItemList15");
|
||||
bookmarLicense_LicenseItem(doc, GetLicenseItemList, 16, "LicenseItemList16");
|
||||
bookmarLicense_LicenseItem(doc, GetLicenseItemList, 17, "LicenseItemList17");
|
||||
bookmarLicense_LicenseItem(doc, GetLicenseItemList, 18, "LicenseItemList18");
|
||||
|
||||
var item2 = GetLicenseItemList.FirstOrDefault(x => x.SortIndex == 2);
|
||||
if (item2 != null)
|
||||
{
|
||||
if (item2.IsUsed == true)
|
||||
{
|
||||
Bookmark bookmarkUser2 = doc.Range.Bookmarks["User2"];//确认执行
|
||||
if (bookmarkUser2 != null)
|
||||
{
|
||||
bookmarkUser2.Text = "√";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Bookmark bookmarkIsFit2 = doc.Range.Bookmarks["IsFit2"];
|
||||
if (bookmarkIsFit2 != null)
|
||||
{
|
||||
if (item2 != null)
|
||||
{
|
||||
bookmarkIsFit2.Text = "×";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
var item3 = GetLicenseItemList.FirstOrDefault(x => x.SortIndex == 3);
|
||||
if (item3 != null)
|
||||
{
|
||||
if (item3.IsUsed == true)
|
||||
{
|
||||
Bookmark bookmarkUser3 = doc.Range.Bookmarks["User3"];//确认执行
|
||||
if (bookmarkUser3 != null)
|
||||
{
|
||||
bookmarkUser3.Text = "√";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Bookmark bookmarkIsFit3 = doc.Range.Bookmarks["IsFit3"];
|
||||
if (bookmarkIsFit3 != null)
|
||||
{
|
||||
if (item3 != null)
|
||||
{
|
||||
bookmarkIsFit3.Text = "×";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var item4 = GetLicenseItemList.FirstOrDefault(x => x.SortIndex == 4);
|
||||
if (item4 != null)
|
||||
{
|
||||
if (item4.IsUsed == true)
|
||||
{
|
||||
Bookmark bookmarkUser4 = doc.Range.Bookmarks["User4"];//确认执行
|
||||
if (bookmarkUser4 != null)
|
||||
{
|
||||
bookmarkUser4.Text = "√";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Bookmark bookmarkIsFit4 = doc.Range.Bookmarks["IsFit4"];
|
||||
if (bookmarkIsFit4 != null)
|
||||
{
|
||||
if (item4 != null)
|
||||
{
|
||||
bookmarkIsFit4.Text = "×";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
var item5 = GetLicenseItemList.FirstOrDefault(x => x.SortIndex == 5);
|
||||
if (item5 != null)
|
||||
{
|
||||
if (item5.IsUsed == true)
|
||||
{
|
||||
Bookmark bookmarkUser5 = doc.Range.Bookmarks["User5"];//确认执行
|
||||
if (bookmarkUser5 != null)
|
||||
{
|
||||
bookmarkUser5.Text = "√";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Bookmark bookmarkIsFit5 = doc.Range.Bookmarks["IsFit5"];
|
||||
if (bookmarkIsFit5 != null)
|
||||
{
|
||||
if (item5 != null)
|
||||
{
|
||||
bookmarkIsFit5.Text = "×";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var item6 = GetLicenseItemList.FirstOrDefault(x => x.SortIndex == 6);
|
||||
if (item6 != null)
|
||||
{
|
||||
if (item6.IsUsed == true)
|
||||
{
|
||||
Bookmark bookmarkUser6 = doc.Range.Bookmarks["User6"];//确认执行
|
||||
if (bookmarkUser6 != null)
|
||||
{
|
||||
bookmarkUser6.Text = "√";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Bookmark bookmarkIsFit6 = doc.Range.Bookmarks["IsFit6"];
|
||||
if (bookmarkIsFit6 != null)
|
||||
{
|
||||
if (item6 != null)
|
||||
{
|
||||
bookmarkIsFit6.Text = "×";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
var item7 = GetLicenseItemList.FirstOrDefault(x => x.SortIndex == 7);
|
||||
if (item7 != null)
|
||||
{
|
||||
if (item7.IsUsed == true)
|
||||
{
|
||||
Bookmark bookmarkUser7 = doc.Range.Bookmarks["User7"];//确认执行
|
||||
if (bookmarkUser7 != null)
|
||||
{
|
||||
bookmarkUser7.Text = "√";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Bookmark bookmarkIsFit7 = doc.Range.Bookmarks["IsFit7"];
|
||||
if (bookmarkIsFit7 != null)
|
||||
{
|
||||
if (item7 != null)
|
||||
{
|
||||
bookmarkIsFit7.Text = "×";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var item8 = GetLicenseItemList.FirstOrDefault(x => x.SortIndex == 8);
|
||||
if (item8 != null)
|
||||
{
|
||||
if (item8.IsUsed == true)
|
||||
{
|
||||
Bookmark bookmarkUser8 = doc.Range.Bookmarks["User8"];//确认执行
|
||||
if (bookmarkUser8 != null)
|
||||
{
|
||||
bookmarkUser8.Text = "√";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Bookmark bookmarkIsFit8 = doc.Range.Bookmarks["IsFit8"];
|
||||
if (bookmarkIsFit8 != null)
|
||||
{
|
||||
if (item8 != null)
|
||||
{
|
||||
bookmarkIsFit8.Text = "×";
|
||||
}
|
||||
}
|
||||
}
|
||||
Bookmark bookmarkMeasure8 = doc.Range.Bookmarks["Measure8"];//
|
||||
if (bookmarkMeasure8 != null)
|
||||
{
|
||||
bookmarkMeasure8.Text = item8.SafetyMeasures;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
var item9 = GetLicenseItemList.FirstOrDefault(x => x.SortIndex == 9);
|
||||
if (item9 != null)
|
||||
{
|
||||
if (item9.IsUsed == true)
|
||||
{
|
||||
Bookmark bookmarkUser9 = doc.Range.Bookmarks["User9"];//确认执行
|
||||
if (bookmarkUser9 != null)
|
||||
{
|
||||
bookmarkUser9.Text = "√";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Bookmark bookmarkIsFit9 = doc.Range.Bookmarks["IsFit9"];
|
||||
if (bookmarkIsFit9 != null)
|
||||
{
|
||||
if (item9 != null)
|
||||
{
|
||||
bookmarkIsFit9.Text = "×";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var item10 = GetLicenseItemList.FirstOrDefault(x => x.SortIndex == 10);
|
||||
if (item10 != null)
|
||||
{
|
||||
if (item10.IsUsed == true)
|
||||
{
|
||||
Bookmark bookmarkUser10 = doc.Range.Bookmarks["User10"];//确认执行
|
||||
if (bookmarkUser10 != null)
|
||||
{
|
||||
bookmarkUser10.Text = "√";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Bookmark bookmarkIsFit10 = doc.Range.Bookmarks["IsFit10"];
|
||||
if (bookmarkIsFit10 != null)
|
||||
{
|
||||
if (item10 != null)
|
||||
{
|
||||
bookmarkIsFit10.Text = "×";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
var item11 = GetLicenseItemList.FirstOrDefault(x => x.SortIndex == 11);
|
||||
if (item11 != null)
|
||||
{
|
||||
if (item11.IsUsed == true)
|
||||
{
|
||||
Bookmark bookmarkUser11 = doc.Range.Bookmarks["User11"];//确认执行
|
||||
if (bookmarkUser11 != null)
|
||||
{
|
||||
bookmarkUser11.Text = "√";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Bookmark bookmarkIsFit11 = doc.Range.Bookmarks["IsFit11"];
|
||||
if (bookmarkIsFit11 != null)
|
||||
{
|
||||
if (item11 != null)
|
||||
{
|
||||
bookmarkIsFit11.Text = "×";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var item12 = GetLicenseItemList.FirstOrDefault(x => x.SortIndex == 12);
|
||||
if (item12 != null)
|
||||
{
|
||||
if (item12.IsUsed == true)
|
||||
{
|
||||
Bookmark bookmarkUser12 = doc.Range.Bookmarks["User12"];//确认执行
|
||||
if (bookmarkUser12 != null)
|
||||
{
|
||||
bookmarkUser12.Text = "√";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Bookmark bookmarkIsFit12 = doc.Range.Bookmarks["IsFit12"];
|
||||
if (bookmarkIsFit12 != null)
|
||||
{
|
||||
if (item12 != null)
|
||||
{
|
||||
bookmarkIsFit12.Text = "×";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -865,8 +676,62 @@ namespace FineUIPro.Web.HSSE.License
|
||||
}
|
||||
}
|
||||
}
|
||||
var getF4 = getFlows.FirstOrDefault(x => x.SortIndex == 4);
|
||||
if (getF4!= null)
|
||||
{
|
||||
Bookmark bookmarkOpinion4 = doc.Range.Bookmarks["Opinion4"];
|
||||
if (bookmarkOpinion4 != null)
|
||||
{
|
||||
|
||||
Bookmark bookmarkCance = doc.Range.Bookmarks["Cancel"];//取消
|
||||
if (getF4.IsAgree == true)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(getF4.Opinion))
|
||||
{
|
||||
bookmarkOpinion4.Text = getF4.Opinion;
|
||||
}
|
||||
else
|
||||
{
|
||||
bookmarkOpinion4.Text = "同意。";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
bookmarkOpinion4.Text = "不同意: " + getF4.Opinion;
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(getF4.SignatureUrl) && File.Exists(rootPath + getF4.SignatureUrl))
|
||||
{
|
||||
DocumentBuilder builders = new DocumentBuilder(doc);
|
||||
var file = rootPath + getF4.SignatureUrl;
|
||||
builders.MoveToBookmark("OperaterMan4");
|
||||
builders.InsertImage(file, 80, 20);
|
||||
}
|
||||
else
|
||||
{
|
||||
var getUser = UserService.GetUserByUserId(getF4.OperaterId);
|
||||
if (getUser != null)
|
||||
{
|
||||
Bookmark bookmarkOperaterMan4 = doc.Range.Bookmarks["OperaterMan4"];
|
||||
if (bookmarkOperaterMan4 != null && getF4.OperaterTime.HasValue)
|
||||
{
|
||||
bookmarkOperaterMan4.Text = getUser.UserName;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Bookmark bookmarkOperaterTime4 = doc.Range.Bookmarks["OperaterTime4"];
|
||||
if (bookmarkOperaterTime4 != null)
|
||||
{
|
||||
if (getF4.OperaterTime.HasValue)
|
||||
{
|
||||
bookmarkOperaterTime4.Text = string.Format("{0:yyyy年MM月dd日 HH:mm}", getF4.OperaterTime);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Bookmark bookmarkCance = doc.Range.Bookmarks["Cancel"];//取消
|
||||
if (bookmarkCance != null)
|
||||
{
|
||||
if (getFireWork != null)
|
||||
@@ -945,6 +810,50 @@ namespace FineUIPro.Web.HSSE.License
|
||||
File.Delete(newUrl);
|
||||
File.Delete(pdfUrl);
|
||||
}
|
||||
|
||||
private void bookmarWorkType(Document doc, Model.License_FireWork getFireWork, string WorkType1, string WorkType)
|
||||
{
|
||||
Bookmark bookmarkWorkType1 = doc.Range.Bookmarks[WorkType1];//分析数据
|
||||
if (!string.IsNullOrEmpty(WorkType))
|
||||
{
|
||||
if (!string.IsNullOrEmpty(getFireWork.WorkType) &&getFireWork.WorkType.Contains(WorkType) )
|
||||
{
|
||||
bookmarkWorkType1.Text = "■";
|
||||
}
|
||||
else
|
||||
{
|
||||
bookmarkWorkType1.Text = "□";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void bookmarLicense_LicenseItem(Document doc, List<Model.License_LicenseItem> list, int index, string LicenseItem)
|
||||
{
|
||||
var item1 = list.FirstOrDefault(x => x.SortIndex == index);
|
||||
if (item1 != null)
|
||||
{
|
||||
Bookmark bookmarkUser1 = doc.Range.Bookmarks[LicenseItem];//确认执行
|
||||
|
||||
if (item1.IsUsed == true)
|
||||
{
|
||||
if (bookmarkUser1 != null)
|
||||
{
|
||||
bookmarkUser1.Text = "■" + item1.SafetyMeasures;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (bookmarkUser1 != null)
|
||||
{
|
||||
bookmarkUser1.Text = "□" + item1.SafetyMeasures;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user