提交代码
This commit is contained in:
		
							parent
							
								
									74327b5a3e
								
							
						
					
					
						commit
						988d168cbf
					
				| 
						 | 
					@ -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;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -58,7 +58,7 @@ namespace BLL
 | 
				
			||||||
            using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
 | 
					            using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                var getPerson = from x in db.View_SitePerson_Person
 | 
					                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
 | 
					                                select new Model.PersonItem
 | 
				
			||||||
                                {
 | 
					                                {
 | 
				
			||||||
                                    PersonId = x.PersonId,
 | 
					                                    PersonId = x.PersonId,
 | 
				
			||||||
| 
						 | 
					@ -1752,5 +1752,83 @@ namespace BLL
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            return message;
 | 
					            return message;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        #region 二维码扫码获取人员
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 二维码扫码获取人员
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        /// <param name="personId"></param>
 | 
				
			||||||
 | 
					        /// <returns></returns>
 | 
				
			||||||
 | 
					        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
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -43,6 +43,18 @@ namespace BLL
 | 
				
			||||||
                                  States = x.States,
 | 
					                                  States = x.States,
 | 
				
			||||||
                                  AttachUrl1 = APIUpLoadFileService.getFileUrl(x.CheckSpecialId, null),
 | 
					                                  AttachUrl1 = APIUpLoadFileService.getFileUrl(x.CheckSpecialId, null),
 | 
				
			||||||
                                  CheckSpecialDetailItems = getCheckSpecialDetailList(x.CheckSpecialId),
 | 
					                                  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();
 | 
					                return getInfo.FirstOrDefault();
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
| 
						 | 
					@ -117,18 +129,38 @@ namespace BLL
 | 
				
			||||||
                    PartInPersons = UserService.getUserNamesUserIds(newItem.PartInPersonIds),
 | 
					                    PartInPersons = UserService.getUserNamesUserIds(newItem.PartInPersonIds),
 | 
				
			||||||
                    PartInPersonNames = newItem.PartInPersonNames2,
 | 
					                    PartInPersonNames = newItem.PartInPersonNames2,
 | 
				
			||||||
                    CompileMan = newItem.CompileManId,
 | 
					                    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)
 | 
					                //if (newItem.States != Const.State_1)
 | 
				
			||||||
                //{
 | 
					                //{
 | 
				
			||||||
                //    newCheckSpecial.States = Const.State_0;
 | 
					                //    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);                      
 | 
					                        SaveCheckSpecialDetail(item);                      
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
                    //// 单据完成后 系统自动按照单位 整改要求生成隐患整改单
 | 
					                    //// 单据完成后 系统自动按照单位 整改要求生成隐患整改单
 | 
				
			||||||
                    if (newItem.States == Const.State_1)
 | 
					                    ///五环不需要
 | 
				
			||||||
                    {
 | 
					                    //if (newItem.States == Const.State_1)
 | 
				
			||||||
                        var getC = newItem.CheckSpecialDetailItems.FirstOrDefault(x => x.CompleteStatus == false);
 | 
					                    //{
 | 
				
			||||||
                        if (getC == null)
 | 
					                    //    var getC = newItem.CheckSpecialDetailItems.FirstOrDefault(x => x.CompleteStatus == false);
 | 
				
			||||||
                        {
 | 
					                    //    if (getC == null)
 | 
				
			||||||
                            newCheckSpecial.States = Const.State_2;
 | 
					                    //    {
 | 
				
			||||||
                            Check_CheckSpecialService.UpdateCheckSpecial(newCheckSpecial);
 | 
					                    //        newCheckSpecial.States = Const.State_2;
 | 
				
			||||||
                        }
 | 
					                    //        Check_CheckSpecialService.UpdateCheckSpecial(newCheckSpecial);
 | 
				
			||||||
                        else
 | 
					                    //    }
 | 
				
			||||||
                        {
 | 
					                    //    else
 | 
				
			||||||
                            var getNA = newItem.CheckSpecialDetailItems.FirstOrDefault(x => x.CompleteStatus == false && (x.HandleStep== null || x.HandleStep==""));
 | 
					                    //    {
 | 
				
			||||||
                            if (getNA == null)
 | 
					                    //        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)
 | 
					                    //            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);
 | 
					                    //            {
 | 
				
			||||||
                                }
 | 
					                    //                message = Check_CheckSpecialService.IssueRectification(detailLists.ToList(), newCheckSpecial);
 | 
				
			||||||
                            }
 | 
					                    //            }
 | 
				
			||||||
                            else
 | 
					                    //        }
 | 
				
			||||||
                            {
 | 
					                    //        else
 | 
				
			||||||
                                message += "存在待整改,没有处理措施的记录!";
 | 
					                    //        {
 | 
				
			||||||
                            }
 | 
					                    //            message += "存在待整改,没有处理措施的记录!";
 | 
				
			||||||
                        }
 | 
					                    //        }
 | 
				
			||||||
                    }
 | 
					                    //    }
 | 
				
			||||||
 | 
					                    //}
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
                return message;
 | 
					                return message;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
| 
						 | 
					@ -238,6 +271,7 @@ namespace BLL
 | 
				
			||||||
                                  CheckItemDetailSetId = x.CheckItemSetId,
 | 
					                                  CheckItemDetailSetId = x.CheckItemSetId,
 | 
				
			||||||
                                  CheckItemDetailContent = x.CheckItemSetContent,
 | 
					                                  CheckItemDetailContent = x.CheckItemSetContent,
 | 
				
			||||||
                                  Rectification_Date = string.Format("{0:yyyy-MM-dd}", x.Rectification_Date),
 | 
					                                  Rectification_Date = string.Format("{0:yyyy-MM-dd}", x.Rectification_Date),
 | 
				
			||||||
 | 
					                                  CheckOpinions=x.CheckOpinions,
 | 
				
			||||||
                              };
 | 
					                              };
 | 
				
			||||||
                return getInfo.ToList();
 | 
					                return getInfo.ToList();
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
| 
						 | 
					@ -290,6 +324,7 @@ namespace BLL
 | 
				
			||||||
                                  CheckItemDetailSetId=x.CheckItemSetId,
 | 
					                                  CheckItemDetailSetId=x.CheckItemSetId,
 | 
				
			||||||
                                  CheckItemDetailContent=x.CheckItemSetContent,
 | 
					                                  CheckItemDetailContent=x.CheckItemSetContent,
 | 
				
			||||||
                                  Rectification_Date= string.Format("{0:yyyy-MM-dd}", x.Rectification_Date),
 | 
					                                  Rectification_Date= string.Format("{0:yyyy-MM-dd}", x.Rectification_Date),
 | 
				
			||||||
 | 
					                                  CheckOpinions=x.CheckOpinions
 | 
				
			||||||
                              };
 | 
					                              };
 | 
				
			||||||
                return getInfo.First();
 | 
					                return getInfo.First();
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
| 
						 | 
					@ -316,7 +351,7 @@ namespace BLL
 | 
				
			||||||
                        UnitId = newDetail.UnitId,
 | 
					                        UnitId = newDetail.UnitId,
 | 
				
			||||||
                        HandleStep = newDetail.HandleStep,
 | 
					                        HandleStep = newDetail.HandleStep,
 | 
				
			||||||
                        HiddenHazardType = newDetail.HiddenHazardType,
 | 
					                        HiddenHazardType = newDetail.HiddenHazardType,
 | 
				
			||||||
                        CompleteStatus = newDetail.CompleteStatus ?? false,
 | 
					                        CompleteStatus = newDetail.CompleteStatus,
 | 
				
			||||||
                        RectifyNoticeId = newDetail.RectifyNoticeId,
 | 
					                        RectifyNoticeId = newDetail.RectifyNoticeId,
 | 
				
			||||||
                        LimitedDate = Funs.GetNewDateTime(newDetail.LimitedDate),
 | 
					                        LimitedDate = Funs.GetNewDateTime(newDetail.LimitedDate),
 | 
				
			||||||
                        CompletedDate = Funs.GetNewDateTime(newDetail.CompletedDate),
 | 
					                        CompletedDate = Funs.GetNewDateTime(newDetail.CompletedDate),
 | 
				
			||||||
| 
						 | 
					@ -325,10 +360,11 @@ namespace BLL
 | 
				
			||||||
                        CheckArea = newDetail.WorkAreaId,
 | 
					                        CheckArea = newDetail.WorkAreaId,
 | 
				
			||||||
                        CheckContent = newDetail.CheckContent,
 | 
					                        CheckContent = newDetail.CheckContent,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                        //整改日期、检查内容、检查内容id
 | 
					                        //整改日期、检查内容、检查内容id、处理意见
 | 
				
			||||||
                        CheckItemSetId= newDetail.CheckItemDetailSetId,
 | 
					                        CheckItemSetId= newDetail.CheckItemDetailSetId,
 | 
				
			||||||
                        CheckItemSetContent= newDetail.CheckItemDetailContent,
 | 
					                        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))
 | 
					                    if (newCheckSpecialDetail.CompleteStatus == false && newCheckSpecialDetail.HandleStep.Contains("1") && string.IsNullOrEmpty(newCheckSpecialDetail.HiddenHazardType))
 | 
				
			||||||
                    {
 | 
					                    {
 | 
				
			||||||
| 
						 | 
					@ -371,10 +407,11 @@ namespace BLL
 | 
				
			||||||
                        updateDetail.CheckArea = newCheckSpecialDetail.CheckArea;
 | 
					                        updateDetail.CheckArea = newCheckSpecialDetail.CheckArea;
 | 
				
			||||||
                        updateDetail.CheckContent = newCheckSpecialDetail.CheckContent;
 | 
					                        updateDetail.CheckContent = newCheckSpecialDetail.CheckContent;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                        //整改日期、检查内容、检查内容id
 | 
					                        //整改日期、检查内容、检查内容id、处理意见
 | 
				
			||||||
                        updateDetail.CheckItemSetId = newDetail.CheckItemDetailSetId;
 | 
					                        updateDetail.CheckItemSetId = newDetail.CheckItemDetailSetId;
 | 
				
			||||||
                        updateDetail.CheckItemSetContent = newDetail.CheckItemDetailContent;
 | 
					                        updateDetail.CheckItemSetContent = newDetail.CheckItemDetailContent;
 | 
				
			||||||
                        updateDetail.Rectification_Date = Funs.GetNewDateTime(newDetail.Rectification_Date);
 | 
					                        updateDetail.Rectification_Date = Funs.GetNewDateTime(newDetail.Rectification_Date);
 | 
				
			||||||
 | 
					                        updateDetail.CheckOpinions = newDetail.CheckOpinions;
 | 
				
			||||||
                        db.SubmitChanges();
 | 
					                        db.SubmitChanges();
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
                    ////保存附件
 | 
					                    ////保存附件
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -244,7 +244,8 @@ namespace BLL
 | 
				
			||||||
                            {
 | 
					                            {
 | 
				
			||||||
                                Model.RectifyNoticesItemItem newRItem = new Model.RectifyNoticesItemItem
 | 
					                                Model.RectifyNoticesItemItem newRItem = new Model.RectifyNoticesItemItem
 | 
				
			||||||
                                {
 | 
					                                {
 | 
				
			||||||
                                    WrongContent = item.Unqualified
 | 
					                                    //WrongContent = item.Unqualified
 | 
				
			||||||
 | 
					                                    WrongContent = item.CheckItemSetContent
 | 
				
			||||||
                                };
 | 
					                                };
 | 
				
			||||||
                                if (string.IsNullOrEmpty(rectifyNotices.CheckSpecialDetailId))
 | 
					                                if (string.IsNullOrEmpty(rectifyNotices.CheckSpecialDetailId))
 | 
				
			||||||
                                {
 | 
					                                {
 | 
				
			||||||
| 
						 | 
					@ -298,7 +299,8 @@ namespace BLL
 | 
				
			||||||
                        foreach (var item in getUnitDItem)
 | 
					                        foreach (var item in getUnitDItem)
 | 
				
			||||||
                        {
 | 
					                        {
 | 
				
			||||||
                            Model.PunishNoticeItemItem newPItem = new Model.PunishNoticeItemItem();
 | 
					                            Model.PunishNoticeItemItem newPItem = new Model.PunishNoticeItemItem();
 | 
				
			||||||
                            newPItem.PunishContent = item.Unqualified;
 | 
					                            //newPItem.PunishContent = item.Unqualified;
 | 
				
			||||||
 | 
					                            newPItem.PunishContent = item.CheckItemSetContent;
 | 
				
			||||||
                            newPItem.SortIndex = item.SortIndex;
 | 
					                            newPItem.SortIndex = item.SortIndex;
 | 
				
			||||||
                            punishNotice.PunishNoticeItemItem.Add(newPItem);
 | 
					                            punishNotice.PunishNoticeItemItem.Add(newPItem);
 | 
				
			||||||
                            if (string.IsNullOrEmpty(punishNotice.CheckSpecialDetailId))
 | 
					                            if (string.IsNullOrEmpty(punishNotice.CheckSpecialDetailId))
 | 
				
			||||||
| 
						 | 
					@ -335,7 +337,8 @@ namespace BLL
 | 
				
			||||||
                        foreach (var item in getUnitDItem)
 | 
					                        foreach (var item in getUnitDItem)
 | 
				
			||||||
                        {
 | 
					                        {
 | 
				
			||||||
                            Model.RectifyNoticesItemItem newRItem = new Model.RectifyNoticesItemItem();
 | 
					                            Model.RectifyNoticesItemItem newRItem = new Model.RectifyNoticesItemItem();
 | 
				
			||||||
                            pauseNotice.ThirdContent += item.Unqualified;
 | 
					                            //pauseNotice.ThirdContent += item.Unqualified;
 | 
				
			||||||
 | 
					                            pauseNotice.ThirdContent += item.CheckItemSetContent;
 | 
				
			||||||
                            string checkAreaName= UnitWorkService.GetNameById(item.CheckArea);
 | 
					                            string checkAreaName= UnitWorkService.GetNameById(item.CheckArea);
 | 
				
			||||||
                            if (!string.IsNullOrEmpty(checkAreaName))
 | 
					                            if (!string.IsNullOrEmpty(checkAreaName))
 | 
				
			||||||
                            {
 | 
					                            {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -761,5 +761,21 @@ namespace BLL
 | 
				
			||||||
                return q;
 | 
					                return q;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// 获取问题类型名称
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        /// <param name="UnitId"></param>
 | 
				
			||||||
 | 
					        /// <returns></returns>
 | 
				
			||||||
 | 
					        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;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,9 +1,61 @@
 | 
				
			||||||
 | 
					PK
 | 
				
			||||||
                                  专项检查
 | 
					 | ||||||