成达修改20230724
This commit is contained in:
@@ -366,11 +366,11 @@ namespace FineUIPro.Web.HSSE.Check
|
||||
}
|
||||
////保存流程审核数据
|
||||
this.ctlAuditFlow.btnSaveData(this.ProjectId, BLL.Const.ProjectCheckColligationMenuId, this.CheckColligationId, (type == BLL.Const.BtnSubmit ? true : false), this.txtCheckDate.Text.Trim(), "~/Check/CheckColligationView.aspx?CheckColligationId={0}");
|
||||
//if (type == BLL.Const.BtnSubmit)
|
||||
//{
|
||||
// APICommonService.SendSubscribeMessage(this.ctlAuditFlow.NextPerson, "职业健康安全待办理", this.CurrUser.UserName, string.Format("{0:yyyy-MM-dd HH:mm:ss}", DateTime.Now));
|
||||
//}
|
||||
}
|
||||
if (type == BLL.Const.BtnSubmit)
|
||||
{
|
||||
APICommonService.SendSubscribeMessage(this.ctlAuditFlow.NextPerson, "综合检查", this.CurrUser.UserName, string.Format("{0:yyyy-MM-dd HH:mm:ss}", DateTime.Now));
|
||||
}
|
||||
}
|
||||
|
||||
#region 关闭弹出窗
|
||||
/// <summary>
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
using BLL;
|
||||
using BLL.Common;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using AspNet = System.Web.UI.WebControls;
|
||||
@@ -367,29 +369,79 @@ namespace FineUIPro.Web.HSSE.Hazard
|
||||
/// <param name="e"></param>
|
||||
protected void btnOut_Click(object sender, EventArgs e)
|
||||
{
|
||||
Response.ClearContent();
|
||||
|
||||
string strSql = @"select CodeRecords.Code 清单编号, HazardList.VersionNo 版本号, WorkStage .WorkStageName 工作阶段, HazardList.WorkAreaName 单位工程, HazardList.IdentificationDate 评估时间,
|
||||
ControllingPersonUsers.UserName AS 风险责任人 , Users.UserName 编制人 , HazardList.CompileDate 编制日期,
|
||||
(CASE WHEN HazardList.States = 0 OR HazardList.States IS NULL THEN '待['+OperateUser.UserName+']提交' WHEN HazardList.States = 2 THEN '审核/审批完成' ELSE '待['+OperateUser.UserName+']办理' END) AS 状态,
|
||||
SupHazardListType.HazardListTypeName 危险源类别, HazardListType.HazardListTypeName 危险源项, HazardItems 危险因素明细,DefectsType 缺陷类型, MayLeadAccidents 可能导致的事故,
|
||||
HelperMethod 辅助方法, HazardJudge_L L,HazardJudge_E E,HazardJudge_C C, HazardJudge_D D, HazardLevel 危险级别, ControlMeasures 控制措施
|
||||
from Hazard_HazardList AS HazardList
|
||||
LEFT JOIN Sys_FlowOperate AS FlowOperate ON HazardList.HazardListId=FlowOperate.DataId AND FlowOperate.IsClosed <> 1
|
||||
LEFT JOIN Sys_User AS OperateUser ON FlowOperate.OperaterId=OperateUser.UserId
|
||||
LEFT JOIN Sys_User AS Users ON HazardList.CompileMan=Users.UserId
|
||||
LEFT JOIN Sys_User AS ControllingPersonUsers ON HazardList.ControllingPerson=ControllingPersonUsers.UserId
|
||||
LEFT JOIN Sys_CodeRecords AS CodeRecords ON HazardList.HazardListId=CodeRecords.DataId
|
||||
LEFT JOIN Hazard_HazardSelectedItem AS Item ON Item.HazardListId = HazardList.HazardListId
|
||||
LEFT JOIN Technique_HazardListType AS HazardListType ON HazardListType.HazardListTypeId=Item.HazardListTypeId
|
||||
LEFT JOIN Technique_HazardListType AS SupHazardListType ON HazardListType.HazardListTypeId=SupHazardListType.HazardListTypeId
|
||||
LEFT JOIN Base_WorkStage AS WorkStage on WorkStage.WorkStageId = Item.WorkStage
|
||||
WHERE 1=1 ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
strSql += " AND HazardList.ProjectId = @ProjectId";
|
||||
if (!string.IsNullOrEmpty(Request.Params["projectId"])) ///是否文件柜查看页面传项目值
|
||||
{
|
||||
listStr.Add(new SqlParameter("@ProjectId", Request.Params["projectId"]));
|
||||
strSql += " AND HazardList.States = @States"; ///状态为已完成
|
||||
listStr.Add(new SqlParameter("@States", BLL.Const.State_2));
|
||||
}
|
||||
else
|
||||
|
||||
{
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtHazardListCode.Text.Trim()))
|
||||
{
|
||||
strSql += " AND HazardListCode LIKE @HazardListCode";
|
||||
listStr.Add(new SqlParameter("@HazardListCode", "%" + this.txtHazardListCode.Text.Trim() + "%"));
|
||||
}
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
tb.TableName = "风险评估";
|
||||
Response.ClearContent();
|
||||
string filename = Funs.GetNewFileName();
|
||||
Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("风险评估" + filename, System.Text.Encoding.UTF8) + ".xls");
|
||||
Response.ContentType = "application/excel";
|
||||
Response.ContentEncoding = System.Text.Encoding.UTF8;
|
||||
this.Grid1.PageSize = Grid1.RecordCount;
|
||||
this.BindGrid();
|
||||
|
||||
string uploadfilepath = Server.MapPath("~/") + filename;
|
||||
NPOIHelper.DataSetToExcel(tb, uploadfilepath);
|
||||
|
||||
Response.Write(GetGridTableHtml(Grid1));
|
||||
string fileName = Path.GetFileName(filename);
|
||||
FileInfo info = new FileInfo(uploadfilepath);
|
||||
if (info.Exists)
|
||||
{
|
||||
long fileSize = info.Length;
|
||||
Response.Clear();
|
||||
Response.ContentType = "application/x-zip-compressed";
|
||||
Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode("风险评估" + filename, System.Text.Encoding.UTF8) + ".xls");
|
||||
Response.AddHeader("Content-Length", fileSize.ToString());
|
||||
Response.TransmitFile(uploadfilepath, 0, fileSize);
|
||||
Response.Flush();
|
||||
Response.Close();
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("文件不存在!", MessageBoxIcon.Warning);
|
||||
}
|
||||
Response.Write(GetGridTableHtml(Grid1));
|
||||
|
||||
|
||||
Response.End();
|
||||
}
|
||||
|
||||
#pragma warning disable CS0108 // “HazardList.GetGridTableHtml(Grid)”隐藏继承的成员“PageBase.GetGridTableHtml(Grid)”。如果是有意隐藏,请使用关键字 new。
|
||||
/// <summary>
|
||||
/// 导出方法
|
||||
/// </summary>
|
||||
/// <param name="grid"></param>
|
||||
/// <returns></returns>
|
||||
private string GetGridTableHtml(Grid grid)
|
||||
#pragma warning restore CS0108 // “HazardList.GetGridTableHtml(Grid)”隐藏继承的成员“PageBase.GetGridTableHtml(Grid)”。如果是有意隐藏,请使用关键字 new。
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("<meta http-equiv=\"content-type\" content=\"application/excel; charset=UTF-8\"/>");
|
||||
|
||||
@@ -192,7 +192,7 @@ namespace FineUIPro.Web.HSSE.Hazard
|
||||
{
|
||||
if (this.drpHazardLevel.Items[i].Selected)
|
||||
{
|
||||
if (hazardTemplate.HazardLevel.ToString() == this.drpHazardLevel.Items[i].Value)
|
||||
if (hazardTemplate.HazardLevel == this.drpHazardLevel.Items[i].Value)
|
||||
{
|
||||
newHazardTemplates2.Add(hazardTemplate);
|
||||
}
|
||||
|
||||
@@ -174,12 +174,12 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
||||
}
|
||||
if (this.drpStates.SelectedValueArray.Contains("2"))
|
||||
{
|
||||
strSqlTemp += " ( States in( '2','3') and datediff(DAY,RectificationPeriod,RectificationTime)>0 ) OR";
|
||||
strSqlTemp += " ( States in( '2','3') and datediff(DAY,RectificationPeriod,RectificationTime)<=0 ) OR";
|
||||
|
||||
}
|
||||
if (this.drpStates.SelectedValueArray.Contains("3"))
|
||||
{
|
||||
strSqlTemp += " (States in( '2','3') and datediff(DAY,RectificationPeriod,RectificationTime)<=0 ) OR";
|
||||
strSqlTemp += " (States in( '2','3') and datediff(DAY,RectificationPeriod,RectificationTime)>0 ) OR";
|
||||
|
||||
}
|
||||
if (this.drpStates.SelectedValueArray.Contains("4"))
|
||||
@@ -705,15 +705,13 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
||||
Response.Write(GetGridTableHtml(Grid1));
|
||||
Response.End();
|
||||
}
|
||||
|
||||
#pragma warning disable CS0108 // “HiddenRectificationList.GetGridTableHtml(Grid)”隐藏继承的成员“PageBase.GetGridTableHtml(Grid)”。如果是有意隐藏,请使用关键字 new。
|
||||
|
||||
/// <summary>
|
||||
/// 导出方法
|
||||
/// </summary>
|
||||
/// <param name="grid"></param>
|
||||
/// <returns></returns>
|
||||
private string GetGridTableHtml(Grid grid)
|
||||
#pragma warning restore CS0108 // “HiddenRectificationList.GetGridTableHtml(Grid)”隐藏继承的成员“PageBase.GetGridTableHtml(Grid)”。如果是有意隐藏,请使用关键字 new。
|
||||
private string GetGridTableHtml(Grid grid)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("<meta http-equiv=\"content-type\" content=\"application/excel; charset=UTF-8\"/>");
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
<f:Panel ID="Panel4" CssClass="blockpanel" runat="server" EnableCollapse="false" MarginTop="10px"
|
||||
BodyPadding="10px" ShowBorder="true" ShowHeader="false">
|
||||
<Items>
|
||||
<f:TabStrip ID="TabStrip1" CssClass="f-tabstrip-theme-simple" Height="400px" ShowBorder="true"
|
||||
<f:TabStrip ID="TabStrip1" CssClass="f-tabstrip-theme-simple" Height="700px" ShowBorder="true"
|
||||
TabPosition="Top" MarginBottom="5px" EnableTabCloseMenu="false" runat="server">
|
||||
<Tabs>
|
||||
<f:Tab ID="Tab2" Title="按类别" BodyPadding="5px" Layout="Fit" IconFont="Bookmark" runat="server"
|
||||
@@ -57,7 +57,7 @@
|
||||
<Items>
|
||||
<f:ContentPanel ShowHeader="false" runat="server" ID="cpAccidentTime" Margin="0 0 0 0" >
|
||||
|
||||
<div id="divAccidentTime" style=" height: 300px;">
|
||||
<div id="divAccidentTime" style=" height: 700px;">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@@ -95,6 +95,9 @@
|
||||
<%-- <f:WindowField TextAlign="Center" Width="80px" WindowID="WindowAtt" HeaderText="扫描件"
|
||||
Text="查看" ToolTip="附件查看" DataIFrameUrlFields="EquipmentPersonQualityId" DataIFrameUrlFormatString="~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/EquipmentPersonQualityAttachUrl&menuId=EBEA762D-1F46-47C5-9EAD-759E13D9B41C&type=-1"
|
||||
HeaderTextAlign="Center" ColumnID="attWindow" />--%>
|
||||
<f:WindowField TextAlign="Left" Width="60px" WindowID="WindowAtt" HeaderText="附件" Text="附件" ToolTip="附件上传查看"
|
||||
DataIFrameUrlFields="PersonId" DataIFrameUrlFormatString="../SitePerson/PersonListImg.aspx?toKeyId={0}"
|
||||
HeaderTextAlign="Center" />
|
||||
</Columns>
|
||||
<Listeners>
|
||||
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
|
||||
|
||||
@@ -97,9 +97,11 @@
|
||||
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="审核时间"
|
||||
HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>--%>
|
||||
|
||||
<f:LinkButtonField HeaderText="附件" ConfirmTarget="Top" Width="60px" CommandName="attchUrl" ColumnID="AttchUrl"
|
||||
TextAlign="Center" ToolTip="附件" Text="附件" />
|
||||
<f:WindowField TextAlign="Left" Width="60px" WindowID="WindowAtt" HeaderText="附件" Text="附件" ToolTip="附件上传查看"
|
||||
DataIFrameUrlFields="PersonId" DataIFrameUrlFormatString="../SitePerson/PersonListImg.aspx?toKeyId={0}"
|
||||
HeaderTextAlign="Center" />
|
||||
<%--<f:LinkButtonField HeaderText="附件" ConfirmTarget="Top" Width="60px" CommandName="attchUrl" ColumnID="AttchUrl"
|
||||
TextAlign="Center" ToolTip="附件" Text="附件" />--%>
|
||||
</Columns>
|
||||
<Listeners>
|
||||
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
|
||||
|
||||
@@ -49,11 +49,11 @@
|
||||
<asp:Label ID="lblNumber" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:RenderField Width="90px" ColumnID="UnitCode" DataField="UnitCode"
|
||||
<f:RenderField Width="120px" ColumnID="UnitCode" DataField="UnitCode"
|
||||
SortField="UnitCode" FieldType="String" HeaderText="单位代码" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="230px" ColumnID="UnitName" DataField="UnitName"
|
||||
<f:RenderField Width="260px" ColumnID="UnitName" DataField="UnitName"
|
||||
SortField="UnitName" FieldType="String" HeaderText="单位名称" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
@@ -73,11 +73,11 @@
|
||||
SortField="CertificateNo" FieldType="String" HeaderText="证书编号" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="90px" ColumnID="SendDate" DataField="SendDate" SortField="SendDate"
|
||||
<f:RenderField Width="100px" ColumnID="SendDate" DataField="SendDate" SortField="SendDate"
|
||||
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="发证时间"
|
||||
HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="90px" ColumnID="LimitDate" DataField="LimitDate" SortField="LimitDate"
|
||||
<f:RenderField Width="100px" ColumnID="LimitDate" DataField="LimitDate" SortField="LimitDate"
|
||||
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="有效期至"
|
||||
HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
@@ -85,13 +85,16 @@
|
||||
SortField="Grade" FieldType="String" HeaderText="操作类别" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="220px" ColumnID="SendUnit" DataField="SendUnit"
|
||||
<f:RenderField Width="220px" ColumnID="SendUnit" DataField="SendUnit" ExpandUnusedSpace="true"
|
||||
SortField="SendUnit" FieldType="String" HeaderText="发证单位" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:WindowField TextAlign="Center" Width="90px" WindowID="WindowAtt" HeaderText="证书扫描件"
|
||||
<f:WindowField TextAlign="Left" Width="60px" WindowID="WindowAtt" HeaderText="附件" Text="附件" ToolTip="附件上传查看"
|
||||
DataIFrameUrlFields="PersonId" DataIFrameUrlFormatString="../SitePerson/PersonListImg.aspx?toKeyId={0}"
|
||||
HeaderTextAlign="Center" />
|
||||
<%-- <f:WindowField TextAlign="Center" Width="90px" WindowID="WindowAtt" HeaderText="证书扫描件"
|
||||
Text="查看" ToolTip="附件上传查看" DataIFrameUrlFields="SafePersonQualityId" DataIFrameUrlFormatString="../../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/SafePersonQualityAttachUrl&menuId=750F5074-45B9-470E-AE1E-6204957421E6&type=-1"
|
||||
HeaderTextAlign="Center" ColumnID="attWindow" />
|
||||
HeaderTextAlign="Center" ColumnID="attWindow" />--%>
|
||||
</Columns>
|
||||
<Listeners>
|
||||
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
|
||||
|
||||
@@ -392,27 +392,27 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
this.EditData();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 编辑
|
||||
/// </summary>
|
||||
private void EditData()
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
/// <summary>
|
||||
/// 编辑
|
||||
/// </summary>
|
||||
private void EditData()
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
this.PersonId = Grid1.SelectedRowID;
|
||||
string id = this.tvProjectAndUnit.SelectedNodeID;
|
||||
string[] str = id.Split('|');
|
||||
if (str.Count() > 1)
|
||||
{
|
||||
string unitId = id.Split('|')[0];
|
||||
string projectId = id.Split('|')[1];
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PersonListEdit.aspx?PersonId={0}&&ProjectId={1}&&UnitId={2}", this.PersonId, projectId, unitId, "编辑 - ")));
|
||||
}
|
||||
}
|
||||
this.PersonId = Grid1.SelectedRowID;
|
||||
var person = Funs.DB.SitePerson_Person.FirstOrDefault(x => x.PersonId == PersonId);
|
||||
|
||||
if (person != null)
|
||||
{
|
||||
string unitId = person.UnitId;
|
||||
string projectId = person.ProjectId;
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PersonListEdit.aspx?PersonId={0}&&ProjectId={1}&&UnitId={2}", this.PersonId, projectId, unitId, "编辑 - ")));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Grid双击事件
|
||||
|
||||
Reference in New Issue
Block a user