From 9ab54cd75cd3b48012e5e27f8ab2c8ca367e1747 Mon Sep 17 00:00:00 2001 From: wendy <408182087@qq.com> Date: Wed, 20 May 2026 14:59:12 +0800 Subject: [PATCH] =?UTF-8?q?20260520=20=E7=84=8A=E7=BC=9D=E8=BF=94=E4=BF=AE?= =?UTF-8?q?=E5=8F=B0=E8=B4=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../版本日志/HJGLDB_DS_2026-05-20_bwj.sql | 102 ++++++ HJGL_DS/BLL/Common/Const.cs | 5 + HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj | 8 + .../FineUIPro.Web/FineUIPro.Web.csproj.user | 4 +- .../HJGL/WeldingReport/WeldRepairLists.aspx | 168 ++++++++++ .../WeldingReport/WeldRepairLists.aspx.cs | 308 ++++++++++++++++++ .../WeldRepairLists.aspx.designer.cs | 125 +++++++ HJGL_DS/FineUIPro.Web/Web.config | 2 +- HJGL_DS/WebAPI/WebAPI.csproj.user | 4 +- 9 files changed, 721 insertions(+), 5 deletions(-) create mode 100644 DataBase/版本日志/HJGLDB_DS_2026-05-20_bwj.sql create mode 100644 HJGL_DS/FineUIPro.Web/HJGL/WeldingReport/WeldRepairLists.aspx create mode 100644 HJGL_DS/FineUIPro.Web/HJGL/WeldingReport/WeldRepairLists.aspx.cs create mode 100644 HJGL_DS/FineUIPro.Web/HJGL/WeldingReport/WeldRepairLists.aspx.designer.cs diff --git a/DataBase/版本日志/HJGLDB_DS_2026-05-20_bwj.sql b/DataBase/版本日志/HJGLDB_DS_2026-05-20_bwj.sql new file mode 100644 index 0000000..a110135 --- /dev/null +++ b/DataBase/版本日志/HJGLDB_DS_2026-05-20_bwj.sql @@ -0,0 +1,102 @@ +insert into Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuModule) +values('C2D55C90-59BE-4400-9BCD-D0A8B72B3F2B','췵̨','HJGL/WeldingReport/WeldRepairLists.aspx',250,'F3B157B7-9BEE-4150-6666-087828F1C51D','3') +go + +CREATE PROCEDURE [dbo].[HJGL_rpt_RepairLists] +( + @projectId NVARCHAR(50) =null +) +AS +/************̨************/ +select distinct jointInfo.JOT_ID,jointInfo.ISO_ID,isoInfo.ISO_IsoNo,jointInfo.JOT_JointNo,jointInfo.JOT_JointDesc, +(case when Steel.STE_Code is not null + then (case when Steel2.STE_Code is not null and Steel.STE_Code<>Steel2.STE_Code + then Steel.STE_Code+'/'+Steel2.STE_Code + else Steel.STE_Code end) + else Steel2.STE_Code end) as SteelCode,-- +rate.NDTR_Name, +----------κ-------------- +(case when Welder.WED_Code is not null + then (case when FloorWelder.WED_Code is not null and Welder.WED_Code<>FloorWelder.WED_Code + then Welder.WED_Code+'/'+FloorWelder.WED_Code + else Welder.WED_Code end) + else FloorWelder.WED_Code end) as WelderCode, -- +(CASE WHEN JointInfo.Jot_WeldingDate IS NOT NULL THEN JointInfo.Jot_WeldingDate + ELSE WeldReportMain.JOT_WeldDate END) AS JOT_WeldDate, -- +(SELECT TOP 1 PostHeatingDate FROM dbo.HJGL_HotProessItem HotProessItem WHERE HotProessItem.JOT_ID=jointInfo.JOT_ID) as PostHeatingDate,-- +null as PostHeatingCode,--߱ +(SELECT TOP 1 HotProessDate FROM dbo.HJGL_HotProessItem HotProessItem WHERE HotProessItem.JOT_ID=jointInfo.JOT_ID) as HotProessDate,--ȴ +(SELECT TOP 1 RecordChartNo FROM dbo.HJGL_HotProessItem HotProessItem WHERE HotProessItem.JOT_ID=jointInfo.JOT_ID and RecordChartNo is not null and RecordChartNo!='') AS RecordChartNo,--ȴ߱ +CONVERT(VARCHAR,(case when jointInfo.RT_States is not null and jointInfo.RT_States='ϸ' then jointInfo.RT_TrustDate +else (case when jointInfo.UT_States is not null and jointInfo.UT_States='ϸ' then jointInfo.UT_TrustDate +else (case when jointInfo.MT_States is not null and jointInfo.MT_States='ϸ' then jointInfo.MT_TrustDate +else (case when jointInfo.PT_States is not null and jointInfo.PT_States='ϸ' then jointInfo.PT_TrustDate +else (case when jointInfo.PAUT_States is not null and jointInfo.PAUT_States='ϸ' then jointInfo.PAUT_TrustDate +else null end) end)end) end) end),23) as TestDate,-- +--------------------------------- +------------һ------------ +repairItemRecord.RepairWelderCode1,-- +repairItemRecord.WeldDate as RepairWeldDate1,-- +null as RepairPostHeatingDate1,-- +null as RepairPostHeatingCode1,--߱ +CONVERT(VARCHAR,repairItemRecord.TrustDate,23) as RepairHotDate1,--ȴ +null as RepairRecordChartNo1,--ȴ߱ +null as RepairTestDate1,-- +--------------------------------- +------------------------ +repairItemRecord2.RepairWelderCode2,-- +repairItemRecord2.WeldDate as RepairWeldDate2,-- +null as RepairPostHeatingDate2,-- +null as RepairPostHeatingCode2,--߱ +CONVERT(VARCHAR,repairItemRecord2.TrustDate,23) as RepairHotDate2,--ȴ +null as RepairRecordChartNo2,---ȴ߱ +null as RepairTestDate2,-- +--------------------------------- +------------Ӳ------------ +--һʱ +--һʱ +--һʱ +--------------------------------- +jointType.JOTY_Group, +jointInfo.Sort1, +jointInfo.Sort2, +jointInfo.Sort3, +jointInfo.Sort4, +jointInfo.Sort5 +from HJGL_PW_JointInfo jointInfo +left join HJGL_PW_IsoInfo as isoInfo on isoInfo.ISO_ID = jointInfo.ISO_ID +LEFT JOIN HJGL_BS_Steel AS Steel ON Steel.STE_ID=jointInfo.STE_ID +LEFT JOIN HJGL_BS_Steel AS Steel2 ON Steel2.STE_ID=jointInfo.STE_ID2 +LEFT JOIN HJGL_BS_JointType AS jointType ON jointType.JOTY_ID=jointInfo.JOTY_ID +left join HJGL_BS_NDTRate as rate on rate.NDTR_ID = jointInfo.NDTR_ID +LEFT JOIN HJGL_BS_Welder AS Welder ON Welder.WED_ID= jointInfo.JOT_CellWelder +LEFT JOIN HJGL_BS_Welder AS FloorWelder ON FloorWelder.WED_ID=jointInfo.JOT_FloorWelder +LEFT JOIN HJGL_BO_WeldReportMain AS WeldReportMain ON WeldReportMain.DReportID=jointInfo.DReportID +--һ +--һ +left join (select distinct HJGL_CH_RepairItemRecord.JOT_ID,(case when Welder.WED_Code is not null + then (case when FloorWelder.WED_Code is not null and Welder.WED_Code<>FloorWelder.WED_Code + then Welder.WED_Code+'/'+FloorWelder.WED_Code + else Welder.WED_Code end) + else FloorWelder.WED_Code end) as RepairWelderCode1,CONVERT(VARCHAR, WeldDate, 23) as WeldDate,hotProessTrustItem.TrustDate + from HJGL_CH_RepairItemRecord + LEFT JOIN HJGL_BS_Welder AS Welder ON Welder.WED_ID= HJGL_CH_RepairItemRecord.JOT_CellWelder + LEFT JOIN HJGL_BS_Welder AS FloorWelder ON FloorWelder.WED_ID=HJGL_CH_RepairItemRecord.JOT_FloorWelder + left join HJGL_CH_HotProessTrustItem as hotProessTrustItem on hotProessTrustItem.TrustItemID = HJGL_CH_RepairItemRecord.RepairItemRecordId + where RepairMark='R1') as repairItemRecord on repairItemRecord.JOT_ID = jointInfo.JOT_ID +---- +left join (select distinct HJGL_CH_RepairItemRecord.JOT_ID,(case when Welder.WED_Code is not null + then (case when FloorWelder.WED_Code is not null and Welder.WED_Code<>FloorWelder.WED_Code + then Welder.WED_Code+'/'+FloorWelder.WED_Code + else Welder.WED_Code end) + else FloorWelder.WED_Code end) as RepairWelderCode2,CONVERT(VARCHAR, WeldDate, 23) as WeldDate,hotProessTrustItem.TrustDate + from HJGL_CH_RepairItemRecord + LEFT JOIN HJGL_BS_Welder AS Welder ON Welder.WED_ID= HJGL_CH_RepairItemRecord.JOT_CellWelder + LEFT JOIN HJGL_BS_Welder AS FloorWelder ON FloorWelder.WED_ID=HJGL_CH_RepairItemRecord.JOT_FloorWelder + left join HJGL_CH_HotProessTrustItem as hotProessTrustItem on hotProessTrustItem.TrustItemID = HJGL_CH_RepairItemRecord.RepairItemRecordId + where RepairMark='R2') as repairItemRecord2 on repairItemRecord2.JOT_ID = jointInfo.JOT_ID + +where jointInfo.JOT_ID in (select JOT_ID from HJGL_CH_RepairItem) +and (jointInfo.ProjectId=@projectId or @projectId is null) +order by isoInfo.ISO_IsoNo,jointType.JOTY_Group,jointInfo.Sort1,jointInfo.Sort2,jointInfo.Sort3,jointInfo.Sort4,jointInfo.Sort5 +go \ No newline at end of file diff --git a/HJGL_DS/BLL/Common/Const.cs b/HJGL_DS/BLL/Common/Const.cs index 1f0e827..572f990 100644 --- a/HJGL_DS/BLL/Common/Const.cs +++ b/HJGL_DS/BLL/Common/Const.cs @@ -2601,5 +2601,10 @@ namespace BLL /// 黄金(碰头)焊口材质及检测确认表导出模板 /// public const string HJGL_GoldMouthLedgerUrl = "File\\Excel\\黄金(碰头)焊口材质及检测确认表导出模板.xlsx"; + + /// + /// 焊缝返修台账导出模板 + /// + public const string HJGL_WeldRepairListsUrl = "File\\Excel\\焊缝返修台账导出模板.xlsx"; } } diff --git a/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj b/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj index e790227..f7aa33a 100644 --- a/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj +++ b/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj @@ -1452,6 +1452,7 @@ + @@ -6959,6 +6960,13 @@ WeldInspectionCheckRecordItem.aspx + + WeldRepairLists.aspx + ASPXCodeBehind + + + WeldRepairLists.aspx + AcceptanceCertificate.aspx ASPXCodeBehind diff --git a/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj.user b/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj.user index abef49a..e3436b8 100644 --- a/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj.user +++ b/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj.user @@ -1,8 +1,8 @@ - + true - Debug|Any CPU + Release|Any CPU diff --git a/HJGL_DS/FineUIPro.Web/HJGL/WeldingReport/WeldRepairLists.aspx b/HJGL_DS/FineUIPro.Web/HJGL/WeldingReport/WeldRepairLists.aspx new file mode 100644 index 0000000..7d50c78 --- /dev/null +++ b/HJGL_DS/FineUIPro.Web/HJGL/WeldingReport/WeldRepairLists.aspx @@ -0,0 +1,168 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WeldRepairLists.aspx.cs" Inherits="FineUIPro.Web.HJGL.WeldingReport.WeldRepairLists" %> + + + + + + + 焊缝返修台账 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HJGL_DS/FineUIPro.Web/HJGL/WeldingReport/WeldRepairLists.aspx.cs b/HJGL_DS/FineUIPro.Web/HJGL/WeldingReport/WeldRepairLists.aspx.cs new file mode 100644 index 0000000..96b2c01 --- /dev/null +++ b/HJGL_DS/FineUIPro.Web/HJGL/WeldingReport/WeldRepairLists.aspx.cs @@ -0,0 +1,308 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.IO; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.HJGL.WeldingReport +{ + public partial class WeldRepairLists : PageBase + { + #region 加载页面 + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.drpProjectId.DataTextField = "ProjectCode"; + this.drpProjectId.DataValueField = "ProjectId"; + this.drpProjectId.DataSource = BLL.Base_ProjectService.GetProjectListByUserId(this.CurrUser.UserId, "1"); + this.drpProjectId.DataBind(); + //Funs.FineUIPleaseSelect(drpProjectId); + if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId)) + { + this.drpProjectId.SelectedValue = this.CurrUser.LoginProjectId; + } + + ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); + + // 绑定表格 + BindGrid(); + } + } + + /// + /// 绑定数据 + /// + private void BindGrid() + { + List listStr = new List(); + if (this.drpProjectId.SelectedValue != BLL.Const._Null && this.drpProjectId.SelectedValue != null) + { + listStr.Add(new SqlParameter("@projectId", this.drpProjectId.SelectedValue)); + } + else + { + listStr.Add(new SqlParameter("@projectId", null)); + } + + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunProc("HJGL_rpt_RepairLists", parameter); + + Grid1.RecordCount = tb.Rows.Count; + //tb = GetFilteredTable(Grid1.FilteredData, tb); + var table = this.GetPagedDataTable(Grid1, tb); + + Grid1.DataSource = table; + Grid1.DataBind(); + } + #endregion + + #region 分页 + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + + protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e) + { + Grid1.SortDirection = e.SortDirection; + Grid1.SortField = e.SortField; + BindGrid(); + } + #endregion + + #region 查询 + /// + /// 项目下拉选择事件 + /// + /// + /// + protected void drpProjectId_SelectedIndexChanged(object sender, EventArgs e) + { + BindGrid(); + } + #endregion + + #region 统计 + /// + /// 统计 + /// + /// + /// + protected void BtnAnalyse_Click(object sender, EventArgs e) + { + BindGrid(); + } + #endregion + + #region 导出 + /// + /// 导出 + /// + /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + string rootPath = Server.MapPath("~/"); + string initTemplatePath = Const.HJGL_WeldRepairListsUrl; + string uploadfilepath = string.Empty; + string newUrl = string.Empty; + uploadfilepath = rootPath + initTemplatePath; + + List listStr = new List(); + if (this.drpProjectId.SelectedValue != BLL.Const._Null && this.drpProjectId.SelectedValue != null) + { + listStr.Add(new SqlParameter("@projectId", this.drpProjectId.SelectedValue)); + } + else + { + listStr.Add(new SqlParameter("@projectId", null)); + } + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunProc("HJGL_rpt_RepairLists", parameter); + + if (tb.Rows.Count > 0) + { + newUrl = uploadfilepath.Replace("焊缝返修台账导出模板", "焊缝返修台账"); + if (File.Exists(newUrl)) + { + File.Delete(newUrl); + } + File.Copy(uploadfilepath, newUrl); + // 第一步:读取文件流 + NPOI.SS.UserModel.IWorkbook workbook; + using (FileStream stream = new FileStream(newUrl, FileMode.Open, FileAccess.Read)) + { + workbook = new NPOI.XSSF.UserModel.XSSFWorkbook(stream);//2007版 + //workbook = new NPOI.HSSF.UserModel.HSSFWorkbook(stream); //2003版 + } + // 创建单元格样式 + NPOI.SS.UserModel.ICellStyle cellStyle = workbook.CreateCellStyle(); + cellStyle.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin; + cellStyle.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin; + cellStyle.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin; + cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; + cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; + cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; + cellStyle.WrapText = true;//自动换行 + var font = workbook.CreateFont(); + font.FontHeightInPoints = 11; + cellStyle.SetFont(font); + // 第二步:创建新数据行 + NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0); + NPOI.SS.UserModel.IRow row = sheet.GetRow(0); + NPOI.SS.UserModel.ICell cell; + int i = 3; + + for (int j = 0; j < tb.Rows.Count; j++) + { + // 第二步:创建新数据行 + row = sheet.CreateRow(i); + // 添加数据 + cell = row.CreateCell(0); + cell.CellStyle = cellStyle; + cell.SetCellValue((j + 1).ToString());//序号 + + cell = row.CreateCell(1); + cell.CellStyle = cellStyle; + cell.SetCellValue(tb.Rows[j]["ISO_IsoNo"].ToString());//管线号 + cell = row.CreateCell(2); + cell.CellStyle = cellStyle; + cell.SetCellValue(tb.Rows[j]["JOT_JointNo"].ToString());//焊口号 + cell = row.CreateCell(3); + cell.CellStyle = cellStyle; + cell.SetCellValue(tb.Rows[j]["JOT_JointDesc"].ToString());//规格 + cell = row.CreateCell(4); + cell.CellStyle = cellStyle; + cell.SetCellValue(tb.Rows[j]["SteelCode"].ToString());//材质 + cell = row.CreateCell(5); + cell.CellStyle = cellStyle; + cell.SetCellValue(tb.Rows[j]["NDTR_Name"].ToString());//检测比例 + cell = row.CreateCell(6); + cell.CellStyle = cellStyle; + cell.SetCellValue(tb.Rows[j]["WelderCode"].ToString());//焊工号 + cell = row.CreateCell(7); + cell.CellStyle = cellStyle; + cell.SetCellValue(string.Format("{0:yyyy-MM-dd}", tb.Rows[j]["JOT_WeldDate"]));//焊接日期 + cell = row.CreateCell(8); + cell.CellStyle = cellStyle; + cell.SetCellValue(string.Format("{0:yyyy-MM-dd}", tb.Rows[j]["PostHeatingDate"].ToString()));//后热日期 + cell = row.CreateCell(9); + cell.CellStyle = cellStyle; + cell.SetCellValue(tb.Rows[j]["PostHeatingCode"].ToString());//后热曲线编号 + cell = row.CreateCell(10); + cell.CellStyle = cellStyle; + cell.SetCellValue(string.Format("{0:yyyy-MM-dd}", tb.Rows[j]["HotProessDate"]));//热处理日期 + cell = row.CreateCell(11); + cell.CellStyle = cellStyle; + cell.SetCellValue(tb.Rows[j]["RecordChartNo"].ToString());//热处理曲线编号 + cell = row.CreateCell(12); + cell.CellStyle = cellStyle; + cell.SetCellValue(string.Format("{0:yyyy-MM-dd}", tb.Rows[j]["TestDate"].ToString()));//检测日期 + + //一返 + cell = row.CreateCell(13); + cell.CellStyle = cellStyle; + cell.SetCellValue(tb.Rows[j]["RepairWelderCode1"].ToString());//焊工号 + cell = row.CreateCell(14); + cell.CellStyle = cellStyle; + cell.SetCellValue(string.Format("{0:yyyy-MM-dd}", tb.Rows[j]["RepairWeldDate1"].ToString()));//焊接日期 + cell = row.CreateCell(15); + cell.CellStyle = cellStyle; + cell.SetCellValue(string.Format("{0:yyyy-MM-dd}", tb.Rows[j]["RepairPostHeatingDate1"].ToString()));//后热日期 + cell = row.CreateCell(16); + cell.CellStyle = cellStyle; + cell.SetCellValue(tb.Rows[j]["RepairPostHeatingCode1"].ToString());//后热曲线编号 + cell = row.CreateCell(17); + cell.CellStyle = cellStyle; + cell.SetCellValue(string.Format("{0:yyyy-MM-dd}", tb.Rows[j]["RepairHotDate1"].ToString()));//热处理日期 + cell = row.CreateCell(18); + cell.CellStyle = cellStyle; + cell.SetCellValue(tb.Rows[j]["RepairRecordChartNo1"].ToString());//热处理曲线编号 + cell = row.CreateCell(19); + cell.CellStyle = cellStyle; + cell.SetCellValue(string.Format("{0:yyyy-MM-dd}", tb.Rows[j]["RepairTestDate1"].ToString()));//检测日期 + + //二返 + cell = row.CreateCell(20); + cell.CellStyle = cellStyle; + cell.SetCellValue(tb.Rows[j]["RepairWelderCode2"].ToString());//焊工号 + cell = row.CreateCell(21); + cell.CellStyle = cellStyle; + cell.SetCellValue(string.Format("{0:yyyy-MM-dd}", tb.Rows[j]["RepairWeldDate2"].ToString()));//焊接日期 + cell = row.CreateCell(22); + cell.CellStyle = cellStyle; + cell.SetCellValue(string.Format("{0:yyyy-MM-dd}", tb.Rows[j]["RepairPostHeatingDate2"].ToString()));//后热日期 + cell = row.CreateCell(23); + cell.CellStyle = cellStyle; + cell.SetCellValue(tb.Rows[j]["RepairPostHeatingCode2"].ToString());//后热曲线编号 + cell = row.CreateCell(24); + cell.CellStyle = cellStyle; + cell.SetCellValue(string.Format("{0:yyyy-MM-dd}", tb.Rows[j]["RepairHotDate2"].ToString()));//热处理日期 + cell = row.CreateCell(25); + cell.CellStyle = cellStyle; + cell.SetCellValue(tb.Rows[j]["RepairRecordChartNo2"].ToString());//热处理曲线编号 + cell = row.CreateCell(26); + cell.CellStyle = cellStyle; + cell.SetCellValue(string.Format("{0:yyyy-MM-dd}", tb.Rows[j]["RepairTestDate2"].ToString()));//检测日期 + + //硬度 + cell = row.CreateCell(27); + cell.CellStyle = cellStyle; + cell.SetCellValue("");//第一次时间 + cell = row.CreateCell(28); + cell.CellStyle = cellStyle; + cell.SetCellValue("");//第一次时间 + cell = row.CreateCell(29); + cell.CellStyle = cellStyle; + cell.SetCellValue("");//第一次时间 + + //100%签字 + cell = row.CreateCell(30); + cell.CellStyle = cellStyle; + cell.SetCellValue("");//承包商项目经理 + cell = row.CreateCell(31); + cell.CellStyle = cellStyle; + cell.SetCellValue("");//总监 + cell = row.CreateCell(32); + cell.CellStyle = cellStyle; + cell.SetCellValue("");//业主项目经理 + i++; + } + // 第三步:写入文件流 + using (FileStream stream = new FileStream(newUrl, FileMode.Create, FileAccess.Write)) + { + workbook.Write(stream); + workbook.Close(); + } + string fileName = Path.GetFileName(newUrl); + FileInfo info = new FileInfo(newUrl); + long fileSize = info.Length; + Response.Clear(); + Response.ContentType = "application/x-zip-compressed"; + Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8)); + Response.AddHeader("Content-Length", fileSize.ToString()); + Response.TransmitFile(newUrl, 0, fileSize); + Response.Flush(); + Response.Close(); + File.Delete(newUrl); + } + else + { + Alert.ShowInTop("当前无记录,无法导出!", MessageBoxIcon.Warning); + } + } + #endregion + } +} \ No newline at end of file diff --git a/HJGL_DS/FineUIPro.Web/HJGL/WeldingReport/WeldRepairLists.aspx.designer.cs b/HJGL_DS/FineUIPro.Web/HJGL/WeldingReport/WeldRepairLists.aspx.designer.cs new file mode 100644 index 0000000..c92e926 --- /dev/null +++ b/HJGL_DS/FineUIPro.Web/HJGL/WeldingReport/WeldRepairLists.aspx.designer.cs @@ -0,0 +1,125 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.HJGL.WeldingReport +{ + + + public partial class WeldRepairLists + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// drpProjectId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpProjectId; + + /// + /// ToolbarFill1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// BtnAnalyse 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button BtnAnalyse; + + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + } +} diff --git a/HJGL_DS/FineUIPro.Web/Web.config b/HJGL_DS/FineUIPro.Web/Web.config index 557f12f..3c98f31 100644 --- a/HJGL_DS/FineUIPro.Web/Web.config +++ b/HJGL_DS/FineUIPro.Web/Web.config @@ -67,7 +67,7 @@ - + diff --git a/HJGL_DS/WebAPI/WebAPI.csproj.user b/HJGL_DS/WebAPI/WebAPI.csproj.user index a48b337..8cd7f1f 100644 --- a/HJGL_DS/WebAPI/WebAPI.csproj.user +++ b/HJGL_DS/WebAPI/WebAPI.csproj.user @@ -1,7 +1,7 @@ - + - Debug|Any CPU + Release|Any CPU FolderProfile true