提交代码
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 +0,0 @@
|
||||||
|
|
||||||
专项检查
|
|
||||||
项目名称: 编号:
|
|
||||||
|
|
||||||
|检查类别 | |检查日期 | |
|
|
||||||
|参检人员 | |
|
|
||||||
|
|
||||||
|
|
||||||
序号 |单位工程 |受检单位 |问题描述 |问题类型 |处理结果 |隐患类别 | |
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
using Aspose.Words;
|
using Aspose.Words;
|
||||||
|
using Aspose.Words.Tables;
|
||||||
using BLL;
|
using BLL;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
@ -45,7 +46,7 @@ namespace FineUIPro.Web.HSSE.Check
|
||||||
Technique_CheckItemSetService.InitCheckItemSetDropDownList(this.drpSupCheckItemSet, "2", "0", true);
|
Technique_CheckItemSetService.InitCheckItemSetDropDownList(this.drpSupCheckItemSet, "2", "0", true);
|
||||||
////权限按钮方法
|
////权限按钮方法
|
||||||
this.GetButtonPower();
|
this.GetButtonPower();
|
||||||
btnNew.OnClientClick = Window1.GetShowReference("CheckSpecialEdit.aspx") + "return false;";
|
//btnNew.OnClientClick = Window1.GetShowReference("CheckSpecialEdit.aspx") + "return false;";
|
||||||
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||||
// 绑定表格
|
// 绑定表格
|
||||||
BindGrid();
|
BindGrid();
|
||||||
|
@ -203,7 +204,9 @@ namespace FineUIPro.Web.HSSE.Check
|
||||||
}
|
}
|
||||||
else
|
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))
|
if (buttonList.Contains(BLL.Const.BtnAdd))
|
||||||
{
|
{
|
||||||
this.btnNew.Hidden = false;
|
//this.btnNew.Hidden = false;
|
||||||
}
|
}
|
||||||
if (buttonList.Contains(BLL.Const.BtnModify))
|
if (buttonList.Contains(BLL.Const.BtnModify))
|
||||||
{
|
{
|
||||||
|
@ -357,7 +360,7 @@ namespace FineUIPro.Web.HSSE.Check
|
||||||
initTemplatePath = "File\\Word\\HSSE\\专项检查.doc";
|
initTemplatePath = "File\\Word\\HSSE\\专项检查.doc";
|
||||||
uploadfilepath = rootPath + initTemplatePath;
|
uploadfilepath = rootPath + initTemplatePath;
|
||||||
newUrl = uploadfilepath.Replace(".doc", string.Format("{0:yyyy-MM}", DateTime.Now) + ".doc");
|
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)) {
|
if (File.Exists(newUrl)) {
|
||||||
File.Delete(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);
|
Aspose.Words.DocumentBuilder builder = new Aspose.Words.DocumentBuilder(doc);
|
||||||
builder.MoveToBookmark("tab");
|
builder.MoveToBookmark("tab");
|
||||||
|
@ -443,6 +505,57 @@ namespace FineUIPro.Web.HSSE.Check
|
||||||
orderby x.SortIndex
|
orderby x.SortIndex
|
||||||
select x).ToList();
|
select x).ToList();
|
||||||
int num = 1;
|
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)
|
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.HorizontalMerge = Aspose.Words.Tables.CellMerge.First;
|
||||||
builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐
|
builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐
|
||||||
builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐
|
builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐
|
||||||
builder.CellFormat.Width = 20;
|
builder.CellFormat.Width = 40;
|
||||||
builder.Write(num.ToString());
|
builder.Write(num.ToString());
|
||||||
//单位工程
|
////单位工程
|
||||||
builder.InsertCell();
|
//builder.InsertCell();
|
||||||
builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None;
|
//builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None;
|
||||||
builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First;
|
//builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First;
|
||||||
builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐
|
//builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐
|
||||||
builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐
|
//builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐
|
||||||
builder.CellFormat.Width = 55;
|
//builder.CellFormat.Width = 60;
|
||||||
builder.Write(string.IsNullOrEmpty(detail.CheckAreaName) ? "" : detail.CheckAreaName);
|
//builder.Write(string.IsNullOrEmpty(detail.CheckAreaName) ? "" : detail.CheckAreaName);
|
||||||
//单位
|
////单位
|
||||||
builder.InsertCell();
|
//builder.InsertCell();
|
||||||
builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None;
|
//builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None;
|
||||||
builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First;
|
//builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First;
|
||||||
builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐
|
//builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐
|
||||||
builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐
|
//builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐
|
||||||
builder.CellFormat.Width = 120;
|
//builder.CellFormat.Width = 120;
|
||||||
builder.Write(string.IsNullOrEmpty(detail.UnitName) ? "" : detail.UnitName);
|
//builder.Write(string.IsNullOrEmpty(detail.UnitName) ? "" : detail.UnitName);
|
||||||
//问题描述
|
//问题描述
|
||||||
builder.InsertCell();
|
builder.InsertCell();
|
||||||
builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None;
|
builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None;
|
||||||
builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First;
|
builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First;
|
||||||
builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐
|
builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐
|
||||||
builder.ParagraphFormat.Alignment = ParagraphAlignment.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.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.InsertCell();
|
||||||
builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None;
|
builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None;
|
||||||
builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First;
|
builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First;
|
||||||
builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐
|
builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐
|
||||||
builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐
|
builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐
|
||||||
builder.CellFormat.Width = 50;
|
builder.CellFormat.Width = 60;
|
||||||
builder.Write(string.IsNullOrEmpty(detail.CompleteStatusName) ? "" : detail.CompleteStatusName);
|
builder.Write(string.Format("{0:yyyy-MM-dd}", detail.Rectification_Date));
|
||||||
//隐患类别
|
//隐患类别
|
||||||
builder.InsertCell();
|
builder.InsertCell();
|
||||||
builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None;
|
builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None;
|
||||||
builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First;
|
builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First;
|
||||||
builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐
|
builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐
|
||||||
builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐
|
builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐
|
||||||
builder.CellFormat.Width = 50;
|
builder.CellFormat.Width = 60;
|
||||||
builder.Write(string.IsNullOrEmpty(detail.HiddenHazardTypeName) ? "" : detail.HiddenHazardTypeName);
|
builder.Write(string.IsNullOrEmpty(detail.HandleStepLink) ? "" : detail.HandleStepLink);
|
||||||
builder.EndRow();
|
builder.EndRow();
|
||||||
num++;
|
num++;
|
||||||
}
|
}
|
||||||
builder.EndTable();
|
builder.EndTable();
|
||||||
doc.Save(newUrl);
|
doc.Save(newUrl);
|
||||||
//生成PDF文件
|
//生成PDF文件
|
||||||
string pdfUrl = newUrl.Replace(".doc", ".pdf");
|
//string pdfUrl = newUrl.Replace(".doc", ".pdf");
|
||||||
Document doc1 = new Aspose.Words.Document(newUrl);
|
Document doc1 = new Aspose.Words.Document(newUrl);
|
||||||
//验证参数
|
//验证参数
|
||||||
if (doc1 == null) { throw new Exception("Word文件无效"); }
|
//if (doc1 == null) { throw new Exception("Word文件无效"); }
|
||||||
doc1.Save(pdfUrl, Aspose.Words.SaveFormat.Pdf);//还可以改成其它格式
|
//doc1.Save(pdfUrl, Aspose.Words.SaveFormat.Pdf);//还可以改成其它格式
|
||||||
string fileName = Path.GetFileName(filePath);
|
string fileName = Path.GetFileName(newUrl);
|
||||||
FileInfo info = new FileInfo(pdfUrl);
|
FileInfo info = new FileInfo(newUrl);
|
||||||
long fileSize = info.Length;
|
long fileSize = info.Length;
|
||||||
Response.Clear();
|
Response.Clear();
|
||||||
Response.ContentType = "application/x-zip-compressed";
|
Response.ContentType = "application/x-zip-compressed";
|
||||||
Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));
|
Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));
|
||||||
Response.AddHeader("Content-Length", fileSize.ToString());
|
Response.AddHeader("Content-Length", fileSize.ToString());
|
||||||
Response.TransmitFile(pdfUrl, 0, fileSize);
|
Response.TransmitFile(newUrl, 0, fileSize);
|
||||||
Response.Flush();
|
Response.Flush();
|
||||||
Response.Close();
|
Response.Close();
|
||||||
File.Delete(newUrl);
|
File.Delete(newUrl);
|
||||||
File.Delete(pdfUrl);
|
//File.Delete(pdfUrl);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,6 +33,18 @@
|
||||||
</f:TextBox>
|
</f:TextBox>
|
||||||
</Items>
|
</Items>
|
||||||
</f:FormRow>
|
</f:FormRow>
|
||||||
|
|
||||||
|
<f:FormRow>
|
||||||
|
<Items>
|
||||||
|
<f:TextBox ID="txtResponsibleUnit" runat="server" Label="受检单位" Readonly="true">
|
||||||
|
</f:TextBox>
|
||||||
|
<f:TextBox ID="txtWorkAreaId" runat="server" Label="单位工程" Readonly="true" Width="200px">
|
||||||
|
</f:TextBox>
|
||||||
|
<f:TextBox ID="txtQuestionType" runat="server" Label="问题类型" Readonly="true">
|
||||||
|
</f:TextBox>
|
||||||
|
</Items>
|
||||||
|
</f:FormRow>
|
||||||
|
|
||||||
<f:FormRow>
|
<f:FormRow>
|
||||||
<Items>
|
<Items>
|
||||||
<f:TextBox ID="txtPartInPersons" runat="server" Label="参检人员" Readonly="true" MaxLength="200">
|
<f:TextBox ID="txtPartInPersons" runat="server" Label="参检人员" Readonly="true" MaxLength="200">
|
||||||
|
@ -50,28 +62,28 @@
|
||||||
<Columns>
|
<Columns>
|
||||||
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="50px" HeaderTextAlign="Center"
|
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="50px" HeaderTextAlign="Center"
|
||||||
TextAlign="Center" />
|
TextAlign="Center" />
|
||||||
<f:RenderField Width="130px" ColumnID="CheckAreaName" DataField="CheckAreaName" SortField="CheckAreaName"
|
<%-- <f:RenderField Width="130px" ColumnID="CheckAreaName" DataField="CheckAreaName" SortField="CheckAreaName"
|
||||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" HeaderText="单位工程">
|
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" HeaderText="单位工程">
|
||||||
</f:RenderField>
|
</f:RenderField>--%>
|
||||||
<f:RenderField Width="240px" ColumnID="UnitName" DataField="UnitName" SortField="UnitName"
|
<%-- <f:RenderField Width="240px" ColumnID="UnitName" DataField="UnitName" SortField="UnitName"
|
||||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" HeaderText="受检单位">
|
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" HeaderText="受检单位">
|
||||||
</f:RenderField>
|
</f:RenderField>--%>
|
||||||
<f:RenderField Width="200px" ColumnID="Unqualified" DataField="Unqualified" SortField="Unqualified"
|
<f:RenderField Width="200px" ColumnID="Unqualified" DataField="Unqualified" SortField="Unqualified"
|
||||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" HeaderText="问题描述" >
|
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" HeaderText="问题描述" >
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
<f:RenderField Width="160px" ColumnID="CheckItemName" DataField="CheckItemName" SortField="CheckItemName"
|
<%-- <f:RenderField Width="160px" ColumnID="CheckItemName" DataField="CheckItemName" SortField="CheckItemName"
|
||||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" HeaderText="问题类型">
|
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" HeaderText="问题类型">
|
||||||
</f:RenderField>
|
</f:RenderField>--%>
|
||||||
<f:RenderField Width="250px" ColumnID="CheckItemSetContent" DataField="CheckItemSetContent" SortField="CheckItemSetContent"
|
<f:RenderField Width="650px" ColumnID="CheckItemSetContent" DataField="CheckItemSetContent" SortField="CheckItemSetContent"
|
||||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" HeaderText="检查内容">
|
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" HeaderText="检查内容">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
<f:RenderField Width="160px" ColumnID="Rectification_Date" DataField="Rectification_Date" SortField="Rectification_Date"
|
<f:RenderField Width="160px" ColumnID="Rectification_Date" DataField="Rectification_Date" SortField="Rectification_Date"
|
||||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" HeaderText="整改期限">
|
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" HeaderText="整改期限">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
|
|
||||||
<f:RenderField Width="80px" ColumnID="CompleteStatusName" DataField="CompleteStatusName" SortField="CompleteStatusName"
|
<%-- <f:RenderField Width="80px" ColumnID="CompleteStatusName" DataField="CompleteStatusName" SortField="CompleteStatusName"
|
||||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" HeaderText="处理结果">
|
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" HeaderText="处理结果">
|
||||||
</f:RenderField>
|
</f:RenderField> --%>
|
||||||
<f:LinkButtonField Width="150px" ColumnID="HandleStepLink" DataTextField="HandleStepLink" DataToolTipField="HandleStepLink" HeaderText="处理措施"
|
<f:LinkButtonField Width="150px" ColumnID="HandleStepLink" DataTextField="HandleStepLink" DataToolTipField="HandleStepLink" HeaderText="处理措施"
|
||||||
CommandName="click" EnableAjax="false" />
|
CommandName="click" EnableAjax="false" />
|
||||||
<f:RenderField Width="80px" ColumnID="HiddenHazardTypeName" DataField="HiddenHazardTypeName" SortField="HiddenHazardTypeName"
|
<f:RenderField Width="80px" ColumnID="HiddenHazardTypeName" DataField="HiddenHazardTypeName" SortField="HiddenHazardTypeName"
|
||||||
|
|
|
@ -66,6 +66,10 @@ namespace FineUIPro.Web.HSSE.Check
|
||||||
where x.CheckSpecialId == this.CheckSpecialId
|
where x.CheckSpecialId == this.CheckSpecialId
|
||||||
orderby x.UnitName, x.SortIndex
|
orderby x.UnitName, x.SortIndex
|
||||||
select x).ToList();
|
select x).ToList();
|
||||||
|
//新增加的三项
|
||||||
|
this.txtResponsibleUnit.Text = UnitService.GetUnitNameByUnitId(checkSpecial.ResponsibleUnit);
|
||||||
|
this.txtWorkAreaId.Text = UnitWorkService.GetUnitWorkName(checkSpecial.WorkAreaId);
|
||||||
|
this.txtQuestionType.Text = UnitService.GetQuestionTypeId(checkSpecial.QuestionType);
|
||||||
}
|
}
|
||||||
Grid1.DataSource = checkSpecialDetails;
|
Grid1.DataSource = checkSpecialDetails;
|
||||||
Grid1.DataBind();
|
Grid1.DataBind();
|
||||||
|
|
|
@ -7,11 +7,13 @@
|
||||||
// </自动生成>
|
// </自动生成>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
namespace FineUIPro.Web.HSSE.Check {
|
namespace FineUIPro.Web.HSSE.Check
|
||||||
|
{
|
||||||
|
|
||||||
public partial class CheckSpecialView {
|
|
||||||
|
public partial class CheckSpecialView
|
||||||
|
{
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// form1 控件。
|
/// form1 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -20,7 +22,7 @@ namespace FineUIPro.Web.HSSE.Check {
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// PageManager1 控件。
|
/// PageManager1 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -29,7 +31,7 @@ namespace FineUIPro.Web.HSSE.Check {
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.PageManager PageManager1;
|
protected global::FineUIPro.PageManager PageManager1;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// SimpleForm1 控件。
|
/// SimpleForm1 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -38,7 +40,7 @@ namespace FineUIPro.Web.HSSE.Check {
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.Form SimpleForm1;
|
protected global::FineUIPro.Form SimpleForm1;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// txtCheckSpecialCode 控件。
|
/// txtCheckSpecialCode 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -47,7 +49,7 @@ namespace FineUIPro.Web.HSSE.Check {
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.TextBox txtCheckSpecialCode;
|
protected global::FineUIPro.TextBox txtCheckSpecialCode;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// rbType 控件。
|
/// rbType 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -56,7 +58,7 @@ namespace FineUIPro.Web.HSSE.Check {
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.RadioButtonList rbType;
|
protected global::FineUIPro.RadioButtonList rbType;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// txtSupCheckItemSet 控件。
|
/// txtSupCheckItemSet 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -65,7 +67,7 @@ namespace FineUIPro.Web.HSSE.Check {
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.TextBox txtSupCheckItemSet;
|
protected global::FineUIPro.TextBox txtSupCheckItemSet;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// txtCheckDate 控件。
|
/// txtCheckDate 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -74,7 +76,34 @@ namespace FineUIPro.Web.HSSE.Check {
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.TextBox txtCheckDate;
|
protected global::FineUIPro.TextBox txtCheckDate;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// txtResponsibleUnit 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.TextBox txtResponsibleUnit;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// txtWorkAreaId 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.TextBox txtWorkAreaId;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// txtQuestionType 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.TextBox txtQuestionType;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// txtPartInPersons 控件。
|
/// txtPartInPersons 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -83,7 +112,7 @@ namespace FineUIPro.Web.HSSE.Check {
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.TextBox txtPartInPersons;
|
protected global::FineUIPro.TextBox txtPartInPersons;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// txtPartInPersonNames 控件。
|
/// txtPartInPersonNames 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -92,7 +121,7 @@ namespace FineUIPro.Web.HSSE.Check {
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.TextBox txtPartInPersonNames;
|
protected global::FineUIPro.TextBox txtPartInPersonNames;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Grid1 控件。
|
/// Grid1 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -101,7 +130,7 @@ namespace FineUIPro.Web.HSSE.Check {
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.Grid Grid1;
|
protected global::FineUIPro.Grid Grid1;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Toolbar1 控件。
|
/// Toolbar1 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -110,7 +139,7 @@ namespace FineUIPro.Web.HSSE.Check {
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.Toolbar Toolbar1;
|
protected global::FineUIPro.Toolbar Toolbar1;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// lbTemp 控件。
|
/// lbTemp 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -119,7 +148,7 @@ namespace FineUIPro.Web.HSSE.Check {
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.Label lbTemp;
|
protected global::FineUIPro.Label lbTemp;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// btnAttachUrl 控件。
|
/// btnAttachUrl 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -128,7 +157,7 @@ namespace FineUIPro.Web.HSSE.Check {
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.Button btnAttachUrl;
|
protected global::FineUIPro.Button btnAttachUrl;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ToolbarFill1 控件。
|
/// ToolbarFill1 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -137,7 +166,7 @@ namespace FineUIPro.Web.HSSE.Check {
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// btnClose 控件。
|
/// btnClose 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -146,7 +175,7 @@ namespace FineUIPro.Web.HSSE.Check {
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.Button btnClose;
|
protected global::FineUIPro.Button btnClose;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// hdId 控件。
|
/// hdId 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -155,7 +184,7 @@ namespace FineUIPro.Web.HSSE.Check {
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.HiddenField hdId;
|
protected global::FineUIPro.HiddenField hdId;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// hdAttachUrl 控件。
|
/// hdAttachUrl 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -164,7 +193,7 @@ namespace FineUIPro.Web.HSSE.Check {
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.HiddenField hdAttachUrl;
|
protected global::FineUIPro.HiddenField hdAttachUrl;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// WindowAtt 控件。
|
/// WindowAtt 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -173,7 +202,7 @@ namespace FineUIPro.Web.HSSE.Check {
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.Window WindowAtt;
|
protected global::FineUIPro.Window WindowAtt;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Window1 控件。
|
/// Window1 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -59,37 +59,66 @@ namespace FineUIPro.Web.HSSE.InformationAnalysis
|
||||||
dtCheck.Columns.Add("检查类型", typeof(string));
|
dtCheck.Columns.Add("检查类型", typeof(string));
|
||||||
dtCheck.Columns.Add("数量", typeof(string));
|
dtCheck.Columns.Add("数量", typeof(string));
|
||||||
|
|
||||||
List<Model.SpResourceCollection> newCheckAnalyseView = new List<Model.SpResourceCollection>();
|
//List<Model.SpResourceCollection> newCheckAnalyseView = new List<Model.SpResourceCollection>();
|
||||||
var checkAnalyseView = from x in Funs.DB.View_CheckAnalysis
|
//var checkAnalyseView = from x in Funs.DB.View_CheckAnalysis
|
||||||
where x.ProjectId == this.ProjectId
|
// where x.ProjectId == this.ProjectId
|
||||||
select x;
|
// select x;
|
||||||
if (!string.IsNullOrEmpty(this.txtStarTime.Text))
|
//if (!string.IsNullOrEmpty(this.txtStarTime.Text))
|
||||||
{
|
//{
|
||||||
checkAnalyseView = checkAnalyseView.Where(x => x.CheckTime >= Funs.GetNewDateTime(this.txtStarTime.Text));
|
// checkAnalyseView = checkAnalyseView.Where(x => x.CheckTime >= Funs.GetNewDateTime(this.txtStarTime.Text));
|
||||||
}
|
//}
|
||||||
if (!string.IsNullOrEmpty(this.txtEndTime.Text))
|
//if (!string.IsNullOrEmpty(this.txtEndTime.Text))
|
||||||
{
|
//{
|
||||||
checkAnalyseView = checkAnalyseView.Where(x => x.CheckTime <= Funs.GetNewDateTime(this.txtEndTime.Text));
|
// checkAnalyseView = checkAnalyseView.Where(x => x.CheckTime <= Funs.GetNewDateTime(this.txtEndTime.Text));
|
||||||
}
|
//}
|
||||||
if (checkAnalyseView.Count() > 0)
|
//if (checkAnalyseView.Count() > 0)
|
||||||
{
|
//{
|
||||||
foreach (var item in checkAnalyseView)
|
// foreach (var item in checkAnalyseView)
|
||||||
{
|
// {
|
||||||
Model.SpResourceCollection view = new Model.SpResourceCollection
|
// Model.SpResourceCollection view = new Model.SpResourceCollection
|
||||||
{
|
// {
|
||||||
UnitName = BLL.Check_ProjectCheckItemSetService.ConvertCheckItemType(item.CheckItem),
|
// UnitName = BLL.Check_ProjectCheckItemSetService.ConvertCheckItemType(item.CheckItem),
|
||||||
TotalCount = 1
|
// TotalCount = 1
|
||||||
};
|
// };
|
||||||
newCheckAnalyseView.Add(view);
|
// newCheckAnalyseView.Add(view);
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
|
||||||
var checkType = newCheckAnalyseView.Select(x => x.UnitName).Distinct();
|
//var checkType = newCheckAnalyseView.Select(x => x.UnitName).Distinct();
|
||||||
foreach (var itemType in checkType)
|
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<CheckAnalysisModel> list = new List<CheckAnalysisModel>();
|
||||||
|
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();
|
DataRow rowUnit = dtCheck.NewRow();
|
||||||
rowUnit["检查类型"] = itemType;
|
rowUnit["检查类型"] = itemType.itemType;
|
||||||
rowUnit["数量"] = newCheckAnalyseView.Where(x => x.UnitName == itemType).Count();
|
rowUnit["数量"] = itemType.count;
|
||||||
dtCheck.Rows.Add(rowUnit);
|
dtCheck.Rows.Add(rowUnit);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -97,6 +126,11 @@ namespace FineUIPro.Web.HSSE.InformationAnalysis
|
||||||
this.gvCheck.DataBind();
|
this.gvCheck.DataBind();
|
||||||
this.ChartCostTime.CreateChart(BLL.ChartControlService.GetDataSourceChart(dtCheck, "危险因素分析", this.drpChartType.SelectedValue, 1150, 450, this.ckbShow.Checked));
|
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
|
#endregion
|
||||||
|
|
||||||
#region 统计查询
|
#region 统计查询
|
||||||
|
|
|
@ -203,5 +203,9 @@ namespace Model
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Rectification_Date { get; set; }
|
public string Rectification_Date { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 处理意见
|
||||||
|
/// </summary>
|
||||||
|
public string CheckOpinions { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -180,5 +180,65 @@ namespace Model
|
||||||
get;
|
get;
|
||||||
set;
|
set;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 受检单位
|
||||||
|
/// </summary>
|
||||||
|
public string ResponsibleUnit
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
set;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 受检单位
|
||||||
|
/// </summary>
|
||||||
|
public string ResponsibleUnitName
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
set;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 单位工程ID
|
||||||
|
/// </summary>
|
||||||
|
public string WorkAreaId
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
set;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 单位工程ID
|
||||||
|
/// </summary>
|
||||||
|
public string WorkAreaName
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
set;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 问题类型
|
||||||
|
/// </summary>
|
||||||
|
public string QuestionType
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
set;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 问题类型
|
||||||
|
/// </summary>
|
||||||
|
public string QuestionTypeName
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
set;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 审核人
|
||||||
|
/// </summary>
|
||||||
|
public string ResponsibleMan { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 审核状态
|
||||||
|
/// </summary>
|
||||||
|
public string AuditState { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -59583,6 +59583,14 @@ namespace Model
|
||||||
|
|
||||||
private string _CheckItemSetId;
|
private string _CheckItemSetId;
|
||||||
|
|
||||||
|
private string _ResponsibleUnit;
|
||||||
|
|
||||||
|
private string _WorkAreaId;
|
||||||
|
|
||||||
|
private string _QuestionType;
|
||||||
|
|
||||||
|
private string _ResponsibleMan;
|
||||||
|
|
||||||
private EntityRef<Base_Project> _Base_Project;
|
private EntityRef<Base_Project> _Base_Project;
|
||||||
|
|
||||||
private EntityRef<Technique_CheckItemSet> _Technique_CheckItemSet;
|
private EntityRef<Technique_CheckItemSet> _Technique_CheckItemSet;
|
||||||
|
@ -59623,6 +59631,14 @@ namespace Model
|
||||||
partial void OnPartInPersonNamesChanged();
|
partial void OnPartInPersonNamesChanged();
|
||||||
partial void OnCheckItemSetIdChanging(string value);
|
partial void OnCheckItemSetIdChanging(string value);
|
||||||
partial void OnCheckItemSetIdChanged();
|
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
|
#endregion
|
||||||
|
|
||||||
public Check_CheckSpecial()
|
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)]
|
[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
|
public Base_Project Base_Project
|
||||||
{
|
{
|
||||||
|
@ -60099,6 +60195,8 @@ namespace Model
|
||||||
|
|
||||||
private System.Nullable<System.DateTime> _Rectification_Date;
|
private System.Nullable<System.DateTime> _Rectification_Date;
|
||||||
|
|
||||||
|
private string _CheckOpinions;
|
||||||
|
|
||||||
private EntityRef<Base_Unit> _Base_Unit;
|
private EntityRef<Base_Unit> _Base_Unit;
|
||||||
|
|
||||||
private EntityRef<WBS_UnitWork> _WBS_UnitWork;
|
private EntityRef<WBS_UnitWork> _WBS_UnitWork;
|
||||||
|
@ -60151,6 +60249,8 @@ namespace Model
|
||||||
partial void OnCheckItemSetContentChanged();
|
partial void OnCheckItemSetContentChanged();
|
||||||
partial void OnRectification_DateChanging(System.Nullable<System.DateTime> value);
|
partial void OnRectification_DateChanging(System.Nullable<System.DateTime> value);
|
||||||
partial void OnRectification_DateChanged();
|
partial void OnRectification_DateChanged();
|
||||||
|
partial void OnCheckOpinionsChanging(string value);
|
||||||
|
partial void OnCheckOpinionsChanged();
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public Check_CheckSpecialDetail()
|
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)]
|
[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
|
public Base_Unit Base_Unit
|
||||||
{
|
{
|
||||||
|
|
|
@ -1083,5 +1083,28 @@ namespace WebAPI.Controllers
|
||||||
return responeData;
|
return responeData;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region 二维码扫码获取人员
|
||||||
|
/// <summary>
|
||||||
|
/// 二维码扫码获取人员
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="personId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
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
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue