diff --git a/DataBase/版本日志/SGGLDB_WH_2023-09-27.sql b/DataBase/版本日志/SGGLDB_WH_2023-09-27.sql new file mode 100644 index 00000000..e3bfcf70 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_WH_2023-09-27.sql @@ -0,0 +1,39 @@ +--רܼ쵥λ +alter table Check_CheckSpecial add ResponsibleUnit nvarchar(50) null; +--λ +alter table Check_CheckSpecial add WorkAreaId nvarchar(50) null; +-- +alter table Check_CheckSpecial add QuestionType nvarchar(50) null; +-- +alter table Check_CheckSpecial add ResponsibleMan nvarchar(50) null; +--ӱӴֶ +alter table Check_CheckSpecialDetail add CheckOpinions nvarchar(2000) null; + +----------------------------------------------------------޸Ա״̬ + +--1.ô +alter table SitePerson_Person disable trigger SitePerson_Person_Bak_TRIGGER; + +--α +DECLARE @projectid nvarchar(50) -- + +DECLARE mycursor CURSOR FOR select projectid from base_project where ProjectState='3' --α + +OPEN mycursor --α + +FETCH NEXT FROM mycursor INTO @projectid + +WHILE(@@FETCH_STATUS = 0) --еݣ@@FETCH_STATUSֵΪ0ʾFETCHִгɹ +BEGIN + update SitePerson_Person set IsUsed=0 where ProjectId=@projectid;--޸ + FETCH NEXT FROM mycursor INTO @projectid --ȡһα +END + +CLOSE mycursor --رα + +DEALLOCATE mycursor --ɾα +GO + +--ô +alter table SitePerson_Person enable trigger SitePerson_Person_Bak_TRIGGER; + diff --git a/SGGL/BLL/API/APIPersonService.cs b/SGGL/BLL/API/APIPersonService.cs index 7000b083..c89257b8 100644 --- a/SGGL/BLL/API/APIPersonService.cs +++ b/SGGL/BLL/API/APIPersonService.cs @@ -58,7 +58,7 @@ namespace BLL using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) { var getPerson = from x in db.View_SitePerson_Person - where x.PersonId == personId || x.IdentityCard == personId + where (x.PersonId == personId || x.IdentityCard == personId) select new Model.PersonItem { PersonId = x.PersonId, @@ -1752,5 +1752,83 @@ namespace BLL return message; } + + #region 二维码扫码获取人员 + /// + /// 二维码扫码获取人员 + /// + /// + /// + public static Model.PersonItem getPersonByPersonIdQrcode(string personId) + { + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + var getPerson = from x in db.View_SitePerson_Person + where (x.PersonId == personId || x.IdentityCard == personId) && x.IsUsed == true + select new Model.PersonItem + { + PersonId = x.PersonId, + CardNo = x.CardNo, + PersonName = x.PersonName, + Sex = x.Sex, + SexName = x.SexName, + IdentityCard = x.IdentityCard, + Address = x.Address, + ProjectId = x.ProjectId, + ProjectCode = x.ProjectCode, + ProjectName = x.ProjectName, + UnitId = x.UnitId, + UnitCode = x.UnitCode, + UnitName = x.UnitName, + TeamGroupId = x.TeamGroupId, + TeamGroupName = x.TeamGroupName, + WorkPostId = x.WorkPostId, + WorkPostName = x.WorkPostName, + InTime = string.Format("{0:yyyy-MM-dd}", x.InTime), + OutTime = string.Format("{0:yyyy-MM-dd}", x.OutTime), + OutResult = x.OutResult, + Telephone = x.Telephone, + PhotoUrl = x.PhotoUrl, + DepartName = x.DepartName, + IsUsed = x.IsUsed, + IsUsedName = x.IsUsed == false ? "不启用" : "启用", + AuditorId = x.AuditorId, + AuditorName = db.Sys_User.First(z => z.UserId == x.AuditorId).UserName, + IsForeign = x.IsForeign.HasValue ? x.IsForeign : false, + IsOutside = x.IsOutside.HasValue ? x.IsOutside : false, + AuditorDate = string.Format("{0:yyyy-MM-dd}", x.AuditorDate), + AttachUrl1 = x.IDCardUrl == null ? APIUpLoadFileService.getFileUrl(personId + "#1", null) : x.IDCardUrl.Replace('\\', '/'), + AttachUrl2 = APIUpLoadFileService.getFileUrl(personId + "#2", null), + AttachUrl3 = APIUpLoadFileService.getFileUrl(personId + "#3", null), + AttachUrl4 = getAttachUrl4(x.PersonId), + AttachUrl5 = APIUpLoadFileService.getFileUrl(personId + "#5", null), + IdcardType = x.IdcardType, + IdcardTypeName = x.IdcardTypeName, + IdcardStartDate = string.Format("{0:yyyy-MM-dd}", x.IdcardStartDate), + IdcardEndDate = string.Format("{0:yyyy-MM-dd}", x.IdcardEndDate), + IdcardForever = x.IdcardForever, + IdcardForeverStr = x.IdcardForeverStr, + PoliticsStatus = x.PoliticsStatus, + PoliticsStatusName = x.PoliticsStatusName, + IdcardAddress = x.IdcardAddress, + Nation = x.Nation, + NationName = x.NationName, + EduLevel = x.EduLevel, + EduLevelName = x.EduLevelName, + MaritalStatus = x.MaritalStatus, + MaritalStatusName = x.MaritalStatusName, + CountryCode = x.CountryCode, + CountryName = x.CountryName, + ProvinceCode = x.ProvinceCode, + ProvinceName = x.ProvinceName, + MainCNProfessionalId = x.MainCNProfessionalId, + MainCNProfessionalName = x.MainCNProfessionalName, + ViceCNProfessionalId = x.ViceCNProfessionalId, + ViceCNProfessionalName = x.ViceCNProfessionalName + }; + return getPerson.FirstOrDefault(); + } + } + #endregion } } diff --git a/SGGL/BLL/API/HSSE/APICheckSpecialService.cs b/SGGL/BLL/API/HSSE/APICheckSpecialService.cs index 03c4a833..09c6c784 100644 --- a/SGGL/BLL/API/HSSE/APICheckSpecialService.cs +++ b/SGGL/BLL/API/HSSE/APICheckSpecialService.cs @@ -43,6 +43,18 @@ namespace BLL States = x.States, AttachUrl1 = APIUpLoadFileService.getFileUrl(x.CheckSpecialId, null), CheckSpecialDetailItems = getCheckSpecialDetailList(x.CheckSpecialId), + + ResponsibleUnit=x.ResponsibleUnit, + ResponsibleUnitName=UnitService.GetUnitNameByUnitId(x.ResponsibleUnit), + WorkAreaId=x.WorkAreaId, + WorkAreaName= UnitWorkService.GetUnitWorkName(x.WorkAreaId), + QuestionType=x.QuestionType, + QuestionTypeName=UnitService.GetQuestionTypeId(x.QuestionType), + + ResponsibleMan=x.ResponsibleMan, + + + }; return getInfo.FirstOrDefault(); } @@ -117,18 +129,38 @@ namespace BLL PartInPersons = UserService.getUserNamesUserIds(newItem.PartInPersonIds), PartInPersonNames = newItem.PartInPersonNames2, CompileMan = newItem.CompileManId, - States = Const.State_0, + States = newItem.States, + + ResponsibleUnit=newItem.ResponsibleUnit, + WorkAreaId=newItem.WorkAreaId, + QuestionType=newItem.QuestionType, + //审核人 + ResponsibleMan=newItem.ResponsibleMan }; //if (newItem.States != Const.State_1) //{ // newCheckSpecial.States = Const.State_0; //} - if (newItem.CheckSpecialDetailItems == null || newItem.CheckSpecialDetailItems.Count() == 0) + //if (newItem.CheckSpecialDetailItems == null || newItem.CheckSpecialDetailItems.Count() == 0) + //{ + // if (newItem.States == Const.State_1) + // { + // newCheckSpecial.States = Const.State_2; + // } + //} + + //如果审核状态不为空 + if (!string.IsNullOrEmpty(newItem.AuditState)) { - if (newItem.States == Const.State_1) + //不同意的话 + if (newItem.AuditState=="0") { - newCheckSpecial.States = Const.State_2; + newCheckSpecial.States = "0"; + } + else if (newItem.AuditState=="1") + { + newCheckSpecial.States = "2"; } } @@ -167,31 +199,32 @@ namespace BLL SaveCheckSpecialDetail(item); } //// 单据完成后 系统自动按照单位 整改要求生成隐患整改单 - if (newItem.States == Const.State_1) - { - var getC = newItem.CheckSpecialDetailItems.FirstOrDefault(x => x.CompleteStatus == false); - if (getC == null) - { - newCheckSpecial.States = Const.State_2; - Check_CheckSpecialService.UpdateCheckSpecial(newCheckSpecial); - } - else - { - var getNA = newItem.CheckSpecialDetailItems.FirstOrDefault(x => x.CompleteStatus == false && (x.HandleStep== null || x.HandleStep=="")); - if (getNA == null) - { - var detailLists = db.Check_CheckSpecialDetail.Where(x => x.CheckSpecialId == newCheckSpecial.CheckSpecialId && x.CompleteStatus == false); - if (detailLists.Count() > 0) - { - message = Check_CheckSpecialService.IssueRectification(detailLists.ToList(), newCheckSpecial); - } - } - else - { - message += "存在待整改,没有处理措施的记录!"; - } - } - } + ///五环不需要 + //if (newItem.States == Const.State_1) + //{ + // var getC = newItem.CheckSpecialDetailItems.FirstOrDefault(x => x.CompleteStatus == false); + // if (getC == null) + // { + // newCheckSpecial.States = Const.State_2; + // Check_CheckSpecialService.UpdateCheckSpecial(newCheckSpecial); + // } + // else + // { + // var getNA = newItem.CheckSpecialDetailItems.FirstOrDefault(x => x.CompleteStatus == false && (x.HandleStep== null || x.HandleStep=="")); + // if (getNA == null) + // { + // var detailLists = db.Check_CheckSpecialDetail.Where(x => x.CheckSpecialId == newCheckSpecial.CheckSpecialId && x.CompleteStatus == false); + // if (detailLists.Count() > 0) + // { + // message = Check_CheckSpecialService.IssueRectification(detailLists.ToList(), newCheckSpecial); + // } + // } + // else + // { + // message += "存在待整改,没有处理措施的记录!"; + // } + // } + //} } return message; } @@ -238,6 +271,7 @@ namespace BLL CheckItemDetailSetId = x.CheckItemSetId, CheckItemDetailContent = x.CheckItemSetContent, Rectification_Date = string.Format("{0:yyyy-MM-dd}", x.Rectification_Date), + CheckOpinions=x.CheckOpinions, }; return getInfo.ToList(); } @@ -290,6 +324,7 @@ namespace BLL CheckItemDetailSetId=x.CheckItemSetId, CheckItemDetailContent=x.CheckItemSetContent, Rectification_Date= string.Format("{0:yyyy-MM-dd}", x.Rectification_Date), + CheckOpinions=x.CheckOpinions }; return getInfo.First(); } @@ -316,7 +351,7 @@ namespace BLL UnitId = newDetail.UnitId, HandleStep = newDetail.HandleStep, HiddenHazardType = newDetail.HiddenHazardType, - CompleteStatus = newDetail.CompleteStatus ?? false, + CompleteStatus = newDetail.CompleteStatus, RectifyNoticeId = newDetail.RectifyNoticeId, LimitedDate = Funs.GetNewDateTime(newDetail.LimitedDate), CompletedDate = Funs.GetNewDateTime(newDetail.CompletedDate), @@ -325,10 +360,11 @@ namespace BLL CheckArea = newDetail.WorkAreaId, CheckContent = newDetail.CheckContent, - //整改日期、检查内容、检查内容id + //整改日期、检查内容、检查内容id、处理意见 CheckItemSetId= newDetail.CheckItemDetailSetId, CheckItemSetContent= newDetail.CheckItemDetailContent, - Rectification_Date = Funs.GetNewDateTime(newDetail.Rectification_Date) + Rectification_Date = Funs.GetNewDateTime(newDetail.Rectification_Date), + CheckOpinions=newDetail.CheckOpinions, }; if (newCheckSpecialDetail.CompleteStatus == false && newCheckSpecialDetail.HandleStep.Contains("1") && string.IsNullOrEmpty(newCheckSpecialDetail.HiddenHazardType)) { @@ -371,10 +407,11 @@ namespace BLL updateDetail.CheckArea = newCheckSpecialDetail.CheckArea; updateDetail.CheckContent = newCheckSpecialDetail.CheckContent; - //整改日期、检查内容、检查内容id + //整改日期、检查内容、检查内容id、处理意见 updateDetail.CheckItemSetId = newDetail.CheckItemDetailSetId; updateDetail.CheckItemSetContent = newDetail.CheckItemDetailContent; updateDetail.Rectification_Date = Funs.GetNewDateTime(newDetail.Rectification_Date); + updateDetail.CheckOpinions = newDetail.CheckOpinions; db.SubmitChanges(); } ////保存附件 diff --git a/SGGL/BLL/HSSE/Check/Check_CheckSpecialService.cs b/SGGL/BLL/HSSE/Check/Check_CheckSpecialService.cs index f349d0ac..621af157 100644 --- a/SGGL/BLL/HSSE/Check/Check_CheckSpecialService.cs +++ b/SGGL/BLL/HSSE/Check/Check_CheckSpecialService.cs @@ -244,7 +244,8 @@ namespace BLL { Model.RectifyNoticesItemItem newRItem = new Model.RectifyNoticesItemItem { - WrongContent = item.Unqualified + //WrongContent = item.Unqualified + WrongContent = item.CheckItemSetContent }; if (string.IsNullOrEmpty(rectifyNotices.CheckSpecialDetailId)) { @@ -298,7 +299,8 @@ namespace BLL foreach (var item in getUnitDItem) { Model.PunishNoticeItemItem newPItem = new Model.PunishNoticeItemItem(); - newPItem.PunishContent = item.Unqualified; + //newPItem.PunishContent = item.Unqualified; + newPItem.PunishContent = item.CheckItemSetContent; newPItem.SortIndex = item.SortIndex; punishNotice.PunishNoticeItemItem.Add(newPItem); if (string.IsNullOrEmpty(punishNotice.CheckSpecialDetailId)) @@ -335,7 +337,8 @@ namespace BLL foreach (var item in getUnitDItem) { Model.RectifyNoticesItemItem newRItem = new Model.RectifyNoticesItemItem(); - pauseNotice.ThirdContent += item.Unqualified; + //pauseNotice.ThirdContent += item.Unqualified; + pauseNotice.ThirdContent += item.CheckItemSetContent; string checkAreaName= UnitWorkService.GetNameById(item.CheckArea); if (!string.IsNullOrEmpty(checkAreaName)) { diff --git a/SGGL/BLL/SysManage/UnitService.cs b/SGGL/BLL/SysManage/UnitService.cs index dbe2aed1..647c8449 100644 --- a/SGGL/BLL/SysManage/UnitService.cs +++ b/SGGL/BLL/SysManage/UnitService.cs @@ -761,5 +761,21 @@ namespace BLL return q; } } + + /// + /// 获取问题类型名称 + /// + /// + /// + public static string GetQuestionTypeId(string RegisterTypesId) + { + string name = string.Empty; + var unit = Funs.DB.HSSE_Hazard_HazardRegisterTypes.FirstOrDefault(x => x.RegisterTypesId == RegisterTypesId); + if (unit != null) + { + name = unit.RegisterTypesName; + } + return name; + } } } diff --git a/SGGL/FineUIPro.Web/File/Word/HSSE/专项检查.doc b/SGGL/FineUIPro.Web/File/Word/HSSE/专项检查.doc index 84c6efe3..90ca6147 100644 --- a/SGGL/FineUIPro.Web/File/Word/HSSE/专项检查.doc +++ b/SGGL/FineUIPro.Web/File/Word/HSSE/专项检查.doc @@ -1,9 +1,61 @@ - - 专项检查 -项目名称: 编号: - -|检查类别 | |检查日期 | | -|参检人员 | | - - -序号 |单位工程 |受检单位 |问题描述 |问题类型 |处理结果 |隐患类别 | | +PK +N@ docProps/PKN@NN\qdocProps/app.xmlQo0ߗ?ޡ9S0Ӳ4͠mj߯E9=CΠ "&K.`{RQV +H+=> +`<!L7֪B5QpJZ'udUqkNbg.D en8|泸*:R {ӆA7li &r4&hHPMuԛ#E޸p79 .IZS#E +ii[wAv;ܬFewmvN9J3j]a>~:9Fq$qN⧗v l8#+L0p+`DRAil PNr.?p-1轓4MLwQcv[`D)yܮH6,Φ+rI)%%'_ +ږWTeq}q7Q25< ʶlRxG*51|+x^p6"G X"2"ݼC0R~ۇ;meS7[9zź1a3DYoPNw?mf|c<|FiZn8aeΉb^0ϔ&O:2PK +N@word/PKN@% eword/styles.xml]Kr;w@`e/$7ҴݔduMɳ.E\D6=U"jV{Y>G W?><=2b??{YΒE2cg/,x@]_yz9e,;)O\S-F1Sߊ qr1F'GG~#~ + K9W;>W2(bq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_¿B]]u5k@lMv0NԇC;lOJ <^ +mI<}/n鐲ӆPKN@|I~b +([Content_Types].xmlPK +N@%_rels/PKN@""  %_rels/.relsPK +N@ docProps/PKN@NN\q 'docProps/app.xmlPKN@+J} docProps/core.xmlPKN@r* *docProps/custom.xmlPK +N@word/PK +N@ &word/_rels/PKN@P +'word/_rels/document.xml.relsPKN@ZI word/document.xmlPKN@Ӽ  "word/fontTable.xmlPKN@Sł + word/settings.xmlPKN@% e word/styles.xmlPK +N@ [word/theme/PKN@ݵ + word/theme/theme1.xmlPK) \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HSSE/Check/CheckSpecial.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Check/CheckSpecial.aspx.cs index 29002a1c..c178df09 100644 --- a/SGGL/FineUIPro.Web/HSSE/Check/CheckSpecial.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/Check/CheckSpecial.aspx.cs @@ -1,4 +1,5 @@ using Aspose.Words; +using Aspose.Words.Tables; using BLL; using System; using System.Collections.Generic; @@ -45,7 +46,7 @@ namespace FineUIPro.Web.HSSE.Check Technique_CheckItemSetService.InitCheckItemSetDropDownList(this.drpSupCheckItemSet, "2", "0", true); ////权限按钮方法 this.GetButtonPower(); - btnNew.OnClientClick = Window1.GetShowReference("CheckSpecialEdit.aspx") + "return false;"; + //btnNew.OnClientClick = Window1.GetShowReference("CheckSpecialEdit.aspx") + "return false;"; ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); // 绑定表格 BindGrid(); @@ -203,7 +204,9 @@ namespace FineUIPro.Web.HSSE.Check } else { - PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("CheckSpecialEdit.aspx?CheckSpecialId={0}", CheckSpecialId, "编辑 - "))); + //PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("CheckSpecialEdit.aspx?CheckSpecialId={0}", CheckSpecialId, "编辑 - "))); + //pc端只有台账 + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("CheckSpecialView.aspx?CheckSpecialId={0}", CheckSpecialId, "查看 - "))); } } } @@ -254,7 +257,7 @@ namespace FineUIPro.Web.HSSE.Check { if (buttonList.Contains(BLL.Const.BtnAdd)) { - this.btnNew.Hidden = false; + //this.btnNew.Hidden = false; } if (buttonList.Contains(BLL.Const.BtnModify)) { @@ -357,7 +360,7 @@ namespace FineUIPro.Web.HSSE.Check initTemplatePath = "File\\Word\\HSSE\\专项检查.doc"; uploadfilepath = rootPath + initTemplatePath; newUrl = uploadfilepath.Replace(".doc", string.Format("{0:yyyy-MM}", DateTime.Now) + ".doc"); - filePath = initTemplatePath.Replace(".doc", string.Format("{0:yyyy-MM}", DateTime.Now) + ".pdf"); + //filePath = initTemplatePath.Replace(".doc", string.Format("{0:yyyy-MM}", DateTime.Now) + ".pdf"); if (File.Exists(newUrl)) { File.Delete(newUrl); } @@ -427,6 +430,65 @@ namespace FineUIPro.Web.HSSE.Check } } + Bookmark bookmarkWorkAreaName = doc.Range.Bookmarks["WorkAreaName"]; + if (bookmarkWorkAreaName != null) + { + if (checkSpecial != null) + { + if (!string.IsNullOrEmpty(checkSpecial.WorkAreaId)) + { + bookmarkWorkAreaName.Text = UnitWorkService.GetUnitWorkName(checkSpecial.WorkAreaId); + } + + } + + } + + Bookmark bookmarkResponsibleName = doc.Range.Bookmarks["ResponsibleName"]; + if (bookmarkResponsibleName != null) + { + if (checkSpecial != null) + { + if (!string.IsNullOrEmpty(checkSpecial.ResponsibleUnit)) + { + bookmarkResponsibleName.Text = UnitService.GetUnitNameByUnitId(checkSpecial.ResponsibleUnit); + } + + } + + } + + Bookmark bookmarkQuestionName = doc.Range.Bookmarks["QuestionName"]; + if (bookmarkQuestionName != null) + { + if (checkSpecial != null) + { + if (!string.IsNullOrEmpty(checkSpecial.QuestionType)) + { + bookmarkQuestionName.Text = UnitService.GetQuestionTypeId(checkSpecial.QuestionType); + } + + } + + } + + Bookmark bookmarkPartInPersonNames = doc.Range.Bookmarks["PartInPersonNames"]; + if (bookmarkPartInPersonNames != null) + { + if (checkSpecial != null) + { + if (!string.IsNullOrEmpty(checkSpecial.PartInPersonNames)) + { + bookmarkPartInPersonNames.Text = checkSpecial.PartInPersonNames; + } + + } + + } + //WorkAreaName + // ResponsibleName + // QuestionName + // PartInPersonNames //专项检查列表 Aspose.Words.DocumentBuilder builder = new Aspose.Words.DocumentBuilder(doc); builder.MoveToBookmark("tab"); @@ -443,6 +505,57 @@ namespace FineUIPro.Web.HSSE.Check orderby x.SortIndex select x).ToList(); int num = 1; + #region 插入表头 + builder.InsertCell(); + builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None; + builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First; + builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐 + builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐 + builder.CellFormat.Width = 40; + builder.Write("序号"); + + builder.InsertCell(); + builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None; + builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First; + builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐 + builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐 + builder.CellFormat.Width = 100; + builder.Write("问题描述"); + + builder.InsertCell(); + builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None; + builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First; + builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐 + builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐 + builder.CellFormat.Width = 250; + builder.CellFormat.WrapText = true; + builder.Write("检查内容"); + + //builder.InsertCell(); + //builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None; + //builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First; + //builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐 + //builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐 + //builder.CellFormat.Width = 60; + //builder.Write("处理结果"); + + builder.InsertCell(); + builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None; + builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First; + builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐 + builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐 + builder.CellFormat.Width = 60; + builder.Write("整改期限"); + + builder.InsertCell(); + builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None; + builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First; + builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐 + builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐 + builder.CellFormat.Width = 60; + builder.Write("处理措施"); + builder.EndRow(); + #endregion foreach (Model.View_CheckSpecialDetail detail in checkSpecialDetails) { //序号 @@ -451,80 +564,89 @@ namespace FineUIPro.Web.HSSE.Check builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First; builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐 builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐 - builder.CellFormat.Width = 20; + builder.CellFormat.Width = 40; builder.Write(num.ToString()); - //单位工程 - builder.InsertCell(); - builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None; - builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First; - builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐 - builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐 - builder.CellFormat.Width = 55; - builder.Write(string.IsNullOrEmpty(detail.CheckAreaName) ? "" : detail.CheckAreaName); - //单位 - builder.InsertCell(); - builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None; - builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First; - builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐 - builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐 - builder.CellFormat.Width = 120; - builder.Write(string.IsNullOrEmpty(detail.UnitName) ? "" : detail.UnitName); + ////单位工程 + //builder.InsertCell(); + //builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None; + //builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First; + //builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐 + //builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐 + //builder.CellFormat.Width = 60; + //builder.Write(string.IsNullOrEmpty(detail.CheckAreaName) ? "" : detail.CheckAreaName); + ////单位 + //builder.InsertCell(); + //builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None; + //builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First; + //builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐 + //builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐 + //builder.CellFormat.Width = 120; + //builder.Write(string.IsNullOrEmpty(detail.UnitName) ? "" : detail.UnitName); //问题描述 builder.InsertCell(); builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None; builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First; builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐 builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐 - builder.CellFormat.Width = 40; - builder.Write(string.IsNullOrEmpty(detail.Unqualified) ? "" : detail.Unqualified); - //问题类型 - builder.InsertCell(); - builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None; - builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First; - builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐 - builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐 builder.CellFormat.Width = 100; - builder.Write(string.IsNullOrEmpty(detail.CheckItemName)?"": detail.CheckItemName); + builder.Write(string.IsNullOrEmpty(detail.Unqualified) ? "" : detail.Unqualified); + //问题内容 + builder.InsertCell(); + builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None; + builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First; + builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐 + builder.ParagraphFormat.Alignment = ParagraphAlignment.Left;//水平居中对齐 + builder.CellFormat.Width = 250; + builder.CellFormat.WrapText = true; + builder.Write(string.IsNullOrEmpty(detail.CheckItemSetContent)?"": detail.CheckItemSetContent); - //处理结果 + ////处理结果 + //builder.InsertCell(); + //builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None; + //builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First; + //builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐 + //builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐 + //builder.CellFormat.Width = 60; + //builder.Write(string.IsNullOrEmpty(detail.CompleteStatusName) ? "" : detail.CompleteStatusName); + //整改期限 builder.InsertCell(); builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None; builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First; builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐 builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐 - builder.CellFormat.Width = 50; - builder.Write(string.IsNullOrEmpty(detail.CompleteStatusName) ? "" : detail.CompleteStatusName); + builder.CellFormat.Width = 60; + builder.Write(string.Format("{0:yyyy-MM-dd}", detail.Rectification_Date)); //隐患类别 builder.InsertCell(); builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None; builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First; builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐 builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐 - builder.CellFormat.Width = 50; - builder.Write(string.IsNullOrEmpty(detail.HiddenHazardTypeName) ? "" : detail.HiddenHazardTypeName); + builder.CellFormat.Width = 60; + builder.Write(string.IsNullOrEmpty(detail.HandleStepLink) ? "" : detail.HandleStepLink); builder.EndRow(); num++; } builder.EndTable(); doc.Save(newUrl); //生成PDF文件 - string pdfUrl = newUrl.Replace(".doc", ".pdf"); + //string pdfUrl = newUrl.Replace(".doc", ".pdf"); Document doc1 = new Aspose.Words.Document(newUrl); //验证参数 - if (doc1 == null) { throw new Exception("Word文件无效"); } - doc1.Save(pdfUrl, Aspose.Words.SaveFormat.Pdf);//还可以改成其它格式 - string fileName = Path.GetFileName(filePath); - FileInfo info = new FileInfo(pdfUrl); + //if (doc1 == null) { throw new Exception("Word文件无效"); } + //doc1.Save(pdfUrl, Aspose.Words.SaveFormat.Pdf);//还可以改成其它格式 + string fileName = Path.GetFileName(newUrl); + FileInfo info = new FileInfo(newUrl); long fileSize = info.Length; Response.Clear(); Response.ContentType = "application/x-zip-compressed"; Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8)); Response.AddHeader("Content-Length", fileSize.ToString()); - Response.TransmitFile(pdfUrl, 0, fileSize); + Response.TransmitFile(newUrl, 0, fileSize); Response.Flush(); Response.Close(); File.Delete(newUrl); - File.Delete(pdfUrl); + //File.Delete(pdfUrl); } #endregion } diff --git a/SGGL/FineUIPro.Web/HSSE/Check/CheckSpecialView.aspx b/SGGL/FineUIPro.Web/HSSE/Check/CheckSpecialView.aspx index 3e87226e..4eb70936 100644 --- a/SGGL/FineUIPro.Web/HSSE/Check/CheckSpecialView.aspx +++ b/SGGL/FineUIPro.Web/HSSE/Check/CheckSpecialView.aspx @@ -33,6 +33,18 @@ + + + + + + + + + + + + @@ -50,28 +62,28 @@ - - - --%> + <%-- - - --%> + - - - --%> + - - + --%> //------------------------------------------------------------------------------ -namespace FineUIPro.Web.HSSE.Check { - - - public partial class CheckSpecialView { - +namespace FineUIPro.Web.HSSE.Check +{ + + + public partial class CheckSpecialView + { + /// /// form1 控件。 /// @@ -20,7 +22,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -29,7 +31,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// SimpleForm1 控件。 /// @@ -38,7 +40,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form SimpleForm1; - + /// /// txtCheckSpecialCode 控件。 /// @@ -47,7 +49,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtCheckSpecialCode; - + /// /// rbType 控件。 /// @@ -56,7 +58,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.RadioButtonList rbType; - + /// /// txtSupCheckItemSet 控件。 /// @@ -65,7 +67,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtSupCheckItemSet; - + /// /// txtCheckDate 控件。 /// @@ -74,7 +76,34 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtCheckDate; - + + /// + /// txtResponsibleUnit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtResponsibleUnit; + + /// + /// txtWorkAreaId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtWorkAreaId; + + /// + /// txtQuestionType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtQuestionType; + /// /// txtPartInPersons 控件。 /// @@ -83,7 +112,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtPartInPersons; - + /// /// txtPartInPersonNames 控件。 /// @@ -92,7 +121,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtPartInPersonNames; - + /// /// Grid1 控件。 /// @@ -101,7 +130,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid1; - + /// /// Toolbar1 控件。 /// @@ -110,7 +139,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar1; - + /// /// lbTemp 控件。 /// @@ -119,7 +148,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label lbTemp; - + /// /// btnAttachUrl 控件。 /// @@ -128,7 +157,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnAttachUrl; - + /// /// ToolbarFill1 控件。 /// @@ -137,7 +166,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarFill ToolbarFill1; - + /// /// btnClose 控件。 /// @@ -146,7 +175,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnClose; - + /// /// hdId 控件。 /// @@ -155,7 +184,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.HiddenField hdId; - + /// /// hdAttachUrl 控件。 /// @@ -164,7 +193,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.HiddenField hdAttachUrl; - + /// /// WindowAtt 控件。 /// @@ -173,7 +202,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window WindowAtt; - + /// /// Window1 控件。 /// diff --git a/SGGL/FineUIPro.Web/HSSE/InformationAnalysis/CheckAnalysis.aspx.cs b/SGGL/FineUIPro.Web/HSSE/InformationAnalysis/CheckAnalysis.aspx.cs index 7ca15220..e1888b58 100644 --- a/SGGL/FineUIPro.Web/HSSE/InformationAnalysis/CheckAnalysis.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/InformationAnalysis/CheckAnalysis.aspx.cs @@ -59,37 +59,66 @@ namespace FineUIPro.Web.HSSE.InformationAnalysis dtCheck.Columns.Add("检查类型", typeof(string)); dtCheck.Columns.Add("数量", typeof(string)); - List newCheckAnalyseView = new List(); - var checkAnalyseView = from x in Funs.DB.View_CheckAnalysis - where x.ProjectId == this.ProjectId - select x; - if (!string.IsNullOrEmpty(this.txtStarTime.Text)) - { - checkAnalyseView = checkAnalyseView.Where(x => x.CheckTime >= Funs.GetNewDateTime(this.txtStarTime.Text)); - } - if (!string.IsNullOrEmpty(this.txtEndTime.Text)) - { - checkAnalyseView = checkAnalyseView.Where(x => x.CheckTime <= Funs.GetNewDateTime(this.txtEndTime.Text)); - } - if (checkAnalyseView.Count() > 0) - { - foreach (var item in checkAnalyseView) - { - Model.SpResourceCollection view = new Model.SpResourceCollection - { - UnitName = BLL.Check_ProjectCheckItemSetService.ConvertCheckItemType(item.CheckItem), - TotalCount = 1 - }; - newCheckAnalyseView.Add(view); - } - } + //List newCheckAnalyseView = new List(); + //var checkAnalyseView = from x in Funs.DB.View_CheckAnalysis + // where x.ProjectId == this.ProjectId + // select x; + //if (!string.IsNullOrEmpty(this.txtStarTime.Text)) + //{ + // checkAnalyseView = checkAnalyseView.Where(x => x.CheckTime >= Funs.GetNewDateTime(this.txtStarTime.Text)); + //} + //if (!string.IsNullOrEmpty(this.txtEndTime.Text)) + //{ + // checkAnalyseView = checkAnalyseView.Where(x => x.CheckTime <= Funs.GetNewDateTime(this.txtEndTime.Text)); + //} + //if (checkAnalyseView.Count() > 0) + //{ + // foreach (var item in checkAnalyseView) + // { + // Model.SpResourceCollection view = new Model.SpResourceCollection + // { + // UnitName = BLL.Check_ProjectCheckItemSetService.ConvertCheckItemType(item.CheckItem), + // TotalCount = 1 + // }; + // newCheckAnalyseView.Add(view); + // } + //} - var checkType = newCheckAnalyseView.Select(x => x.UnitName).Distinct(); - foreach (var itemType in checkType) + //var checkType = newCheckAnalyseView.Select(x => x.UnitName).Distinct(); + string[] TypeArray = { "HSE巡检", "专项检查", "综合检查", "开工前检查", "季节性/节假日前检查" }; + #region 加载各项数据的子数据 + var count1 = Funs.DB.View_Hazard_HazardRegister.Where(x => x.ProjectId == this.ProjectId).ToList().Count(); + + var count2 = (from x in Funs.DB.Check_CheckSpecialDetail + join y in Funs.DB.Check_CheckSpecial on x.CheckSpecialId equals y.CheckSpecialId + select x).ToList().Count(); + + var count3 = (from x in Funs.DB.Check_CheckColligationDetail + join y in Funs.DB.Check_CheckColligation on x.CheckColligationId equals y.CheckColligationId + where y.ProjectId == this.ProjectId + select x).ToList().Count(); + + var count4 = (from x in Funs.DB.Check_CheckWorkDetail + join y in Funs.DB.Check_CheckWork on x.CheckWorkId equals y.CheckWorkId + where y.ProjectId == this.ProjectId + select x).ToList().Count; + + var count5 = (from x in Funs.DB.Check_CheckHolidayDetail + join y in Funs.DB.Check_CheckHoliday on x.CheckHolidayId equals y.CheckHolidayId + select x).ToList().Count(); + + List list = new List(); + list.Add(new CheckAnalysisModel() { itemType = TypeArray[0], count = count1 }); + list.Add(new CheckAnalysisModel() { itemType = TypeArray[1], count = count2 }); + list.Add(new CheckAnalysisModel() { itemType = TypeArray[2], count = count3 }); + list.Add(new CheckAnalysisModel() { itemType = TypeArray[3], count = count4 }); + list.Add(new CheckAnalysisModel() { itemType = TypeArray[4], count = count5 }); + #endregion + foreach (var itemType in list) { DataRow rowUnit = dtCheck.NewRow(); - rowUnit["检查类型"] = itemType; - rowUnit["数量"] = newCheckAnalyseView.Where(x => x.UnitName == itemType).Count(); + rowUnit["检查类型"] = itemType.itemType; + rowUnit["数量"] = itemType.count; dtCheck.Rows.Add(rowUnit); } @@ -97,6 +126,11 @@ namespace FineUIPro.Web.HSSE.InformationAnalysis this.gvCheck.DataBind(); this.ChartCostTime.CreateChart(BLL.ChartControlService.GetDataSourceChart(dtCheck, "危险因素分析", this.drpChartType.SelectedValue, 1150, 450, this.ckbShow.Checked)); } + + public class CheckAnalysisModel { + public string itemType { get; set; } + public int count { get; set; } + } #endregion #region 统计查询 diff --git a/SGGL/Model/APIItem/HSSE/CheckSpecialDetailItem.cs b/SGGL/Model/APIItem/HSSE/CheckSpecialDetailItem.cs index b5539e84..8d6f8c13 100644 --- a/SGGL/Model/APIItem/HSSE/CheckSpecialDetailItem.cs +++ b/SGGL/Model/APIItem/HSSE/CheckSpecialDetailItem.cs @@ -203,5 +203,9 @@ namespace Model /// public string Rectification_Date { get; set; } + /// + /// 处理意见 + /// + public string CheckOpinions { get; set; } } } diff --git a/SGGL/Model/APIItem/HSSE/CheckSpecialItem.cs b/SGGL/Model/APIItem/HSSE/CheckSpecialItem.cs index 91f4f824..bda13b16 100644 --- a/SGGL/Model/APIItem/HSSE/CheckSpecialItem.cs +++ b/SGGL/Model/APIItem/HSSE/CheckSpecialItem.cs @@ -180,5 +180,65 @@ namespace Model get; set; } + + /// + /// 受检单位 + /// + public string ResponsibleUnit + { + get; + set; + } + /// + /// 受检单位 + /// + public string ResponsibleUnitName + { + get; + set; + } + /// + /// 单位工程ID + /// + public string WorkAreaId + { + get; + set; + } + /// + /// 单位工程ID + /// + public string WorkAreaName + { + get; + set; + } + /// + /// 问题类型 + /// + public string QuestionType + { + get; + set; + } + /// + /// 问题类型 + /// + public string QuestionTypeName + { + get; + set; + } + + /// + /// 审核人 + /// + public string ResponsibleMan { get; set; } + + /// + /// 审核状态 + /// + public string AuditState { get; set; } + } } diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs index f3139172..339bc509 100644 --- a/SGGL/Model/Model.cs +++ b/SGGL/Model/Model.cs @@ -59583,6 +59583,14 @@ namespace Model private string _CheckItemSetId; + private string _ResponsibleUnit; + + private string _WorkAreaId; + + private string _QuestionType; + + private string _ResponsibleMan; + private EntityRef _Base_Project; private EntityRef _Technique_CheckItemSet; @@ -59623,6 +59631,14 @@ namespace Model partial void OnPartInPersonNamesChanged(); partial void OnCheckItemSetIdChanging(string value); partial void OnCheckItemSetIdChanged(); + partial void OnResponsibleUnitChanging(string value); + partial void OnResponsibleUnitChanged(); + partial void OnWorkAreaIdChanging(string value); + partial void OnWorkAreaIdChanged(); + partial void OnQuestionTypeChanging(string value); + partial void OnQuestionTypeChanged(); + partial void OnResponsibleManChanging(string value); + partial void OnResponsibleManChanged(); #endregion public Check_CheckSpecial() @@ -59960,6 +59976,86 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResponsibleUnit", DbType="NVarChar(50)")] + public string ResponsibleUnit + { + get + { + return this._ResponsibleUnit; + } + set + { + if ((this._ResponsibleUnit != value)) + { + this.OnResponsibleUnitChanging(value); + this.SendPropertyChanging(); + this._ResponsibleUnit = value; + this.SendPropertyChanged("ResponsibleUnit"); + this.OnResponsibleUnitChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkAreaId", DbType="NVarChar(50)")] + public string WorkAreaId + { + get + { + return this._WorkAreaId; + } + set + { + if ((this._WorkAreaId != value)) + { + this.OnWorkAreaIdChanging(value); + this.SendPropertyChanging(); + this._WorkAreaId = value; + this.SendPropertyChanged("WorkAreaId"); + this.OnWorkAreaIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_QuestionType", DbType="NVarChar(50)")] + public string QuestionType + { + get + { + return this._QuestionType; + } + set + { + if ((this._QuestionType != value)) + { + this.OnQuestionTypeChanging(value); + this.SendPropertyChanging(); + this._QuestionType = value; + this.SendPropertyChanged("QuestionType"); + this.OnQuestionTypeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResponsibleMan", DbType="NVarChar(50)")] + public string ResponsibleMan + { + get + { + return this._ResponsibleMan; + } + set + { + if ((this._ResponsibleMan != value)) + { + this.OnResponsibleManChanging(value); + this.SendPropertyChanging(); + this._ResponsibleMan = value; + this.SendPropertyChanged("ResponsibleMan"); + this.OnResponsibleManChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Check_CheckSpecial_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] public Base_Project Base_Project { @@ -60099,6 +60195,8 @@ namespace Model private System.Nullable _Rectification_Date; + private string _CheckOpinions; + private EntityRef _Base_Unit; private EntityRef _WBS_UnitWork; @@ -60151,6 +60249,8 @@ namespace Model partial void OnCheckItemSetContentChanged(); partial void OnRectification_DateChanging(System.Nullable value); partial void OnRectification_DateChanged(); + partial void OnCheckOpinionsChanging(string value); + partial void OnCheckOpinionsChanged(); #endregion public Check_CheckSpecialDetail() @@ -60608,6 +60708,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CheckOpinions", DbType="NVarChar(2000)")] + public string CheckOpinions + { + get + { + return this._CheckOpinions; + } + set + { + if ((this._CheckOpinions != value)) + { + this.OnCheckOpinionsChanging(value); + this.SendPropertyChanging(); + this._CheckOpinions = value; + this.SendPropertyChanged("CheckOpinions"); + this.OnCheckOpinionsChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Check_CheckSpecialDetail_Base_Unit", Storage="_Base_Unit", ThisKey="UnitId", OtherKey="UnitId", IsForeignKey=true)] public Base_Unit Base_Unit { diff --git a/SGGL/WebAPI/Controllers/PersonController.cs b/SGGL/WebAPI/Controllers/PersonController.cs index 71118084..a146cd00 100644 --- a/SGGL/WebAPI/Controllers/PersonController.cs +++ b/SGGL/WebAPI/Controllers/PersonController.cs @@ -1083,5 +1083,28 @@ namespace WebAPI.Controllers return responeData; } #endregion + + #region 二维码扫码获取人员 + /// + /// 二维码扫码获取人员 + /// + /// + /// + public Model.ResponeData getPersonByPersonIdQrcode(string personId) + { + var responeData = new Model.ResponeData(); + try + { + responeData.data = APIPersonService.getPersonByPersonIdQrcode(personId); + } + catch (Exception ex) + { + responeData.code = 0; + responeData.message = ex.Message; + } + + return responeData; + } + #endregion } } \ No newline at end of file