提交代码
This commit is contained in:
commit
774af1be61
Binary file not shown.
|
|
@ -0,0 +1,83 @@
|
|||
{
|
||||
"Version": 1,
|
||||
"WorkspaceRootPath": "D:\\\u6570\u636E\\\u8BFA\u5FC5\u8FBE\\\u8D5B\u9F0E\\SGGL_SeDin_New\\",
|
||||
"Documents": [],
|
||||
"DocumentGroupContainers": [
|
||||
{
|
||||
"Orientation": 0,
|
||||
"VerticalTabListWidth": 256,
|
||||
"DocumentGroups": [
|
||||
{
|
||||
"DockedWidth": 386,
|
||||
"SelectedChildIndex": -1,
|
||||
"Children": [
|
||||
{
|
||||
"$type": "Bookmark",
|
||||
"Name": "ST:0:0:{1c4feeaa-4718-4aa9-859d-94ce25d182ba}"
|
||||
},
|
||||
{
|
||||
"$type": "Bookmark",
|
||||
"Name": "ST:0:0:{e506b91c-c606-466a-90a9-123d1d1e12b3}"
|
||||
},
|
||||
{
|
||||
"$type": "Bookmark",
|
||||
"Name": "ST:130:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}"
|
||||
},
|
||||
{
|
||||
"$type": "Bookmark",
|
||||
"Name": "ST:132:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}"
|
||||
},
|
||||
{
|
||||
"$type": "Bookmark",
|
||||
"Name": "ST:133:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}"
|
||||
},
|
||||
{
|
||||
"$type": "Bookmark",
|
||||
"Name": "ST:134:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}"
|
||||
},
|
||||
{
|
||||
"$type": "Bookmark",
|
||||
"Name": "ST:1:0:{f2bd8fb8-fc94-3dae-a733-fd993c73cc87}"
|
||||
},
|
||||
{
|
||||
"$type": "Bookmark",
|
||||
"Name": "ST:131:0:{1fc202d4-d401-403c-9834-5b218574bb67}"
|
||||
},
|
||||
{
|
||||
"$type": "Bookmark",
|
||||
"Name": "ST:129:0:{13b12e3e-c1b4-4539-9371-4fe9a0d523fc}"
|
||||
},
|
||||
{
|
||||
"$type": "Bookmark",
|
||||
"Name": "ST:2:0:{f2bd8fb8-fc94-3dae-a733-fd993c73cc87}"
|
||||
},
|
||||
{
|
||||
"$type": "Bookmark",
|
||||
"Name": "ST:3:0:{f2bd8fb8-fc94-3dae-a733-fd993c73cc87}"
|
||||
},
|
||||
{
|
||||
"$type": "Bookmark",
|
||||
"Name": "ST:129:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}"
|
||||
},
|
||||
{
|
||||
"$type": "Bookmark",
|
||||
"Name": "ST:131:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}"
|
||||
},
|
||||
{
|
||||
"$type": "Bookmark",
|
||||
"Name": "ST:0:0:{1a46fd64-28d5-434c-8eb3-17a02d419b53}"
|
||||
},
|
||||
{
|
||||
"$type": "Bookmark",
|
||||
"Name": "ST:0:0:{5726b0e3-1012-5233-81f9-d1fad48e7a56}"
|
||||
},
|
||||
{
|
||||
"$type": "Bookmark",
|
||||
"Name": "ST:0:0:{aa2115a1-9712-457b-9047-dbb71ca2cdd2}"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -292,8 +292,13 @@ namespace BLL
|
|||
TwMaterialstockService.UpdateStockNum(master.ProjectId, detail.MaterialCode, master.WarehouseCode, TwConst.InOutType.入库, detailTable.ActNum);
|
||||
|
||||
}
|
||||
plan.State= (int)TwConst.State.已完成;
|
||||
TwInOutplanmasterService.Update(plan);
|
||||
var planTable =TwInOutplanmasterService.GetById(plan.Id);
|
||||
if (planTable != null)
|
||||
{
|
||||
planTable.State = (int)TwConst.State.已完成;
|
||||
TwInOutplanmasterService.Update(planTable);
|
||||
}
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 根据计划单撤销入库单
|
||||
|
|
|
|||
|
|
@ -455,17 +455,96 @@ namespace BLL
|
|||
}
|
||||
public static List<Model.View_HJGL_WeldJoint> GetViewWeldJointsBymodel(Model.View_HJGL_WeldJoint model)
|
||||
{
|
||||
var q = (from x in Funs.DB.View_HJGL_WeldJoint
|
||||
where
|
||||
(string.IsNullOrEmpty(model.ProjectId) || x.ProjectId.Contains(model.ProjectId))
|
||||
&& (string.IsNullOrEmpty(model.UnitWorkId) || x.UnitWorkId.Contains(model.UnitWorkId))
|
||||
&& (string.IsNullOrEmpty(model.PipelineId) || x.PipelineId.Contains(model.PipelineId))
|
||||
&& (string.IsNullOrEmpty(model.PipelineCode) || x.PipelineCode.Contains(model.PipelineCode))
|
||||
&& (string.IsNullOrEmpty(model.WeldJointCode) || x.WeldJointCode.Contains(model.WeldJointCode))
|
||||
orderby x.WeldJointCode
|
||||
select x).AsParallel().ToList();
|
||||
return q;
|
||||
var baseQuery = from x in Funs.DB.View_HJGL_WeldJoint select x;
|
||||
if (!string.IsNullOrEmpty(model.ProjectId))
|
||||
baseQuery = baseQuery.Where(x => x.ProjectId == model.ProjectId);
|
||||
if (!string.IsNullOrEmpty(model.UnitWorkId))
|
||||
baseQuery = baseQuery.Where(x => x.UnitWorkId == model.UnitWorkId);
|
||||
if (!string.IsNullOrEmpty(model.PipelineId))
|
||||
baseQuery = baseQuery.Where(x => x.PipelineId == model.PipelineId);
|
||||
if (!string.IsNullOrEmpty(model.PipelineCode))
|
||||
baseQuery = baseQuery.Where(x => x.PipelineCode.Contains(model.PipelineCode));
|
||||
if (!string.IsNullOrEmpty(model.WeldJointCode))
|
||||
baseQuery = baseQuery.Where(x => x.WeldJointCode.Contains(model.WeldJointCode));
|
||||
|
||||
return baseQuery.ToList();
|
||||
}
|
||||
public static IEnumerable<Model.View_HJGL_WeldJoint> GetIEnumerableViewWeldJointsBymodel(Model.View_HJGL_WeldJoint model)
|
||||
{
|
||||
var baseQuery = from x in Funs.DB.View_HJGL_WeldJoint select x;
|
||||
if (!string.IsNullOrEmpty(model.ProjectId))
|
||||
baseQuery = baseQuery.Where(x => x.ProjectId == model.ProjectId);
|
||||
if (!string.IsNullOrEmpty(model.UnitWorkId))
|
||||
baseQuery = baseQuery.Where(x => x.UnitWorkId == model.UnitWorkId);
|
||||
if (!string.IsNullOrEmpty(model.PipelineId))
|
||||
baseQuery = baseQuery.Where(x => x.PipelineId == model.PipelineId);
|
||||
if (!string.IsNullOrEmpty(model.PipelineCode))
|
||||
baseQuery = baseQuery.Where(x => x.PipelineCode.Contains(model.PipelineCode));
|
||||
if (!string.IsNullOrEmpty(model.WeldJointCode))
|
||||
baseQuery = baseQuery.Where(x => x.WeldJointCode.Contains(model.WeldJointCode));
|
||||
|
||||
return baseQuery.ToList() ;
|
||||
}
|
||||
public static (List<Model.View_HJGL_WeldJoint> Data, int Total)GetDataBymodel(Model.View_HJGL_WeldJoint model, int pageIndex = 0, int pageSize = 20)
|
||||
{
|
||||
// 阶段一:构建基础查询
|
||||
var baseQuery = Funs.DB.View_HJGL_WeldJoint.AsQueryable();
|
||||
|
||||
// 阶段二:构建动态查询条件
|
||||
if (!string.IsNullOrEmpty(model.ProjectId))
|
||||
baseQuery = baseQuery.Where(x => x.ProjectId == model.ProjectId);
|
||||
if (!string.IsNullOrEmpty(model.UnitWorkId))
|
||||
baseQuery = baseQuery.Where(x => x.UnitWorkId == model.UnitWorkId);
|
||||
if (!string.IsNullOrEmpty(model.PipelineId))
|
||||
baseQuery = baseQuery.Where(x => x.PipelineId == model.PipelineId);
|
||||
if (!string.IsNullOrEmpty(model.PipelineCode))
|
||||
baseQuery = baseQuery.Where(x => x.PipelineCode .Contains(model.PipelineCode));
|
||||
if (!string.IsNullOrEmpty(model.WeldJointCode))
|
||||
baseQuery = baseQuery.Where(x => x.WeldJointCode.Contains( model.WeldJointCode));
|
||||
|
||||
// 阶段三:排序与分页控制(索引优化关键)
|
||||
var orderedQuery = baseQuery.OrderBy(x => x.WeldJointCode);
|
||||
|
||||
// 阶段四:分页执行(数据库层面分页)
|
||||
var pagedData = orderedQuery
|
||||
.Skip((pageIndex ) * pageSize)
|
||||
.Take(pageSize)
|
||||
.ToList();
|
||||
|
||||
// 获取总记录数(延迟计数优化)
|
||||
var totalCount = baseQuery.Count();
|
||||
|
||||
return (pagedData, totalCount);
|
||||
}
|
||||
public static List<Model.View_HJGL_WeldJoint> GetViewWeldJointsBymodel(Model.View_HJGL_WeldJoint model, int pageIndex = 0, int pageSize = 20)
|
||||
{
|
||||
// 阶段一:构建基础查询
|
||||
var baseQuery = Funs.DB.View_HJGL_WeldJoint.AsQueryable();
|
||||
|
||||
// 阶段二:构建动态查询条件
|
||||
if (!string.IsNullOrEmpty(model.ProjectId))
|
||||
baseQuery = baseQuery.Where(x => x.ProjectId == model.ProjectId);
|
||||
if (!string.IsNullOrEmpty(model.UnitWorkId))
|
||||
baseQuery = baseQuery.Where(x => x.UnitWorkId == model.UnitWorkId);
|
||||
if (!string.IsNullOrEmpty(model.PipelineId))
|
||||
baseQuery = baseQuery.Where(x => x.PipelineId == model.PipelineId);
|
||||
if (!string.IsNullOrEmpty(model.PipelineCode))
|
||||
baseQuery = baseQuery.Where(x => x.PipelineCode.Contains(model.PipelineCode));
|
||||
if (!string.IsNullOrEmpty(model.WeldJointCode))
|
||||
baseQuery = baseQuery.Where(x => x.WeldJointCode.Contains(model.WeldJointCode));
|
||||
|
||||
// 阶段三:排序与分页控制(索引优化关键)
|
||||
var orderedQuery = baseQuery.OrderBy(x => x.WeldJointCode);
|
||||
|
||||
// 阶段四:分页执行(数据库层面分页)
|
||||
var pagedData = orderedQuery
|
||||
.Skip((pageIndex) * pageSize)
|
||||
.Take(pageSize)
|
||||
.ToList();
|
||||
|
||||
return pagedData;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据壁厚计算焊口达因
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -12,6 +12,12 @@ namespace FineUIPro.Web.CLGL
|
|||
{
|
||||
public partial class ArrivalStatistics : PageBase
|
||||
{
|
||||
#region Methods
|
||||
|
||||
protected void btnSearch_Click(object sender, EventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
|
@ -20,14 +26,17 @@ namespace FineUIPro.Web.CLGL
|
|||
drpWarehouse.DataTextField = "Text";
|
||||
drpWarehouse.DataValueField = "Value";
|
||||
drpWarehouse.DataSource = BLL.DropListService.HJGL_WarehouseCode();
|
||||
drpWarehouse.DataBind();
|
||||
drpWarehouse.DataBind();
|
||||
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
|
||||
// 绑定表格
|
||||
// this.BindGrid();
|
||||
// this.BindGrid();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Methods
|
||||
|
||||
#region 绑定数据
|
||||
|
||||
/// <summary>
|
||||
/// 绑定数据
|
||||
/// </summary>
|
||||
|
|
@ -61,14 +70,14 @@ namespace FineUIPro.Web.CLGL
|
|||
if (model?.MatchRate < 1 || model?.MatchRate == null)
|
||||
{
|
||||
Grid1.Rows[i].RowCssClass = "red";
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion 绑定数据
|
||||
|
||||
#region GV 数据操作
|
||||
|
||||
/// <summary>
|
||||
/// 过滤表头
|
||||
/// </summary>
|
||||
|
|
@ -79,6 +88,17 @@ namespace FineUIPro.Web.CLGL
|
|||
// this.BindGrid();
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// 分页显示条数下拉框
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
this.Grid1.PageSize = Convert.ToInt32(this.ddlPageSize.SelectedValue);
|
||||
this.BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页
|
||||
/// </summary>
|
||||
|
|
@ -101,20 +121,10 @@ namespace FineUIPro.Web.CLGL
|
|||
this.Grid1.SortField = e.SortField;
|
||||
this.BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页显示条数下拉框
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
this.Grid1.PageSize = Convert.ToInt32(this.ddlPageSize.SelectedValue);
|
||||
this.BindGrid();
|
||||
}
|
||||
#endregion
|
||||
#endregion GV 数据操作
|
||||
|
||||
#region 关闭弹出窗
|
||||
|
||||
/// <summary>
|
||||
/// 关闭弹出窗
|
||||
/// </summary>
|
||||
|
|
@ -124,11 +134,11 @@ namespace FineUIPro.Web.CLGL
|
|||
{
|
||||
BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#endregion 关闭弹出窗
|
||||
|
||||
#region 导出按钮
|
||||
|
||||
/// 导出按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
|
|
@ -182,11 +192,7 @@ namespace FineUIPro.Web.CLGL
|
|||
|
||||
return sb.ToString();
|
||||
}
|
||||
#endregion
|
||||
|
||||
protected void btnSearch_Click(object sender, EventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
#endregion 导出按钮
|
||||
}
|
||||
}
|
||||
|
|
@ -15,6 +15,7 @@ namespace FineUIPro.Web.CLGL
|
|||
{
|
||||
public partial class InPlanMaster : PageBase
|
||||
{
|
||||
#region Methods
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
|
@ -27,34 +28,27 @@ namespace FineUIPro.Web.CLGL
|
|||
}
|
||||
}
|
||||
|
||||
#region 绑定数据
|
||||
private void InitDrpList()
|
||||
{
|
||||
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
|
||||
drpWarehouse.DataTextField = "Text";
|
||||
drpWarehouse.DataValueField = "Value";
|
||||
drpWarehouse.DataSource = BLL.DropListService .HJGL_WarehouseCode();
|
||||
drpWarehouse.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpWarehouse);
|
||||
drpTypeInt.DataTextField = "Key";
|
||||
drpTypeInt.DataValueField = "Value";
|
||||
drpTypeInt.DataSource = BLL.TwConst.TypeIntMap.Where(x=>x.Key.Contains("入库"));
|
||||
drpTypeInt.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpTypeInt);
|
||||
drpStates.DataTextField = "Key";
|
||||
drpStates.DataValueField = "Value";
|
||||
drpStates.DataSource = BLL.TwConst.StateMap;
|
||||
drpStates.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpStates);
|
||||
#endregion Methods
|
||||
|
||||
#region 绑定数据
|
||||
|
||||
private void BindDetailGrid(string inOutPlanMasterId)
|
||||
{
|
||||
Model.Tw_InOutDetailOutput table = new Model.Tw_InOutDetailOutput();
|
||||
table.InOutPlanMasterId = inOutPlanMasterId;
|
||||
table.MaterialCode = txtMaterialCode.Text;
|
||||
var tb = BLL.TwInOutplandetailService.GetListData(table, Grid2);
|
||||
Grid2.DataSource = tb;
|
||||
Grid2.DataBind();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 绑定数据
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
Model.Tw_InOutMasterOutput table = new Model.Tw_InOutMasterOutput();
|
||||
table.ProjectId=this.CurrUser.LoginProjectId;
|
||||
table.ProjectId = this.CurrUser.LoginProjectId;
|
||||
table.InOutType = (int?)TwConst.InOutType.入库;
|
||||
if (drpTypeInt.SelectedValue != Const._Null)
|
||||
{
|
||||
|
|
@ -69,25 +63,38 @@ namespace FineUIPro.Web.CLGL
|
|||
table.WarehouseCode = drpWarehouse.SelectedValue;
|
||||
}
|
||||
var tb = BLL.TwInOutplanmasterService.GetListData(table, Grid1);
|
||||
Grid1.RecordCount = TwInOutplanmasterService.Count;
|
||||
Grid1.RecordCount = TwInOutplanmasterService.Count;
|
||||
Grid1.DataSource = tb;
|
||||
Grid1.DataBind();
|
||||
|
||||
Grid2.DataSource=null;
|
||||
Grid2.DataSource = null;
|
||||
Grid2.DataBind();
|
||||
}
|
||||
private void BindDetailGrid(string inOutPlanMasterId)
|
||||
|
||||
private void InitDrpList()
|
||||
{
|
||||
Model.Tw_InOutDetailOutput table = new Model.Tw_InOutDetailOutput();
|
||||
table.InOutPlanMasterId = inOutPlanMasterId;
|
||||
table.MaterialCode = txtMaterialCode.Text;
|
||||
var tb = BLL.TwInOutplandetailService.GetListData(table, Grid2);
|
||||
Grid2.DataSource = tb;
|
||||
Grid2.DataBind();
|
||||
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
|
||||
drpWarehouse.DataTextField = "Text";
|
||||
drpWarehouse.DataValueField = "Value";
|
||||
drpWarehouse.DataSource = BLL.DropListService.HJGL_WarehouseCode();
|
||||
drpWarehouse.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpWarehouse);
|
||||
drpTypeInt.DataTextField = "Key";
|
||||
drpTypeInt.DataValueField = "Value";
|
||||
drpTypeInt.DataSource = BLL.TwConst.TypeIntMap.Where(x => x.Key.Contains("入库"));
|
||||
drpTypeInt.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpTypeInt);
|
||||
drpStates.DataTextField = "Key";
|
||||
drpStates.DataValueField = "Value";
|
||||
drpStates.DataSource = BLL.TwConst.StateMap;
|
||||
drpStates.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpStates);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#endregion 绑定数据
|
||||
|
||||
#region GV 数据操作
|
||||
|
||||
/// <summary>
|
||||
/// 过滤表头
|
||||
/// </summary>
|
||||
|
|
@ -98,6 +105,17 @@ namespace FineUIPro.Web.CLGL
|
|||
// this.BindGrid();
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// 分页显示条数下拉框
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
this.Grid1.PageSize = Convert.ToInt32(this.ddlPageSize.SelectedValue);
|
||||
this.BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页
|
||||
/// </summary>
|
||||
|
|
@ -109,6 +127,15 @@ namespace FineUIPro.Web.CLGL
|
|||
this.BindGrid();
|
||||
}
|
||||
|
||||
protected void Grid1_RowClick(object sender, GridRowClickEventArgs e)
|
||||
{
|
||||
if (e.RowIndex >= 0)
|
||||
{
|
||||
string ID = Grid1.DataKeys[e.RowIndex][0].ToString();
|
||||
BindDetailGrid(ID);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序
|
||||
/// </summary>
|
||||
|
|
@ -120,41 +147,45 @@ namespace FineUIPro.Web.CLGL
|
|||
this.Grid1.SortField = e.SortField;
|
||||
this.BindGrid();
|
||||
}
|
||||
protected void Grid1_RowClick(object sender, GridRowClickEventArgs e)
|
||||
|
||||
protected void Grid1_RowCommand(object sender, GridCommandEventArgs e)
|
||||
{
|
||||
if (e.RowIndex >= 0)
|
||||
if (e.CommandName == "btnInPlanMasterPrint")
|
||||
{
|
||||
string ID = Grid1.DataKeys[e.RowIndex][0].ToString();
|
||||
BindDetailGrid(ID);
|
||||
Print(e.RowID);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 分页显示条数下拉框
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
this.Grid1.PageSize = Convert.ToInt32(this.ddlPageSize.SelectedValue);
|
||||
this.BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#endregion GV 数据操作
|
||||
|
||||
#region 数据编辑事件
|
||||
protected void btnSearch_Click(object sender, EventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 新增
|
||||
/// 批量删除
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnImport_Click(object sender, EventArgs e)
|
||||
protected void btnDelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("InPlanMasterDataIn.aspx?", "导入 - ")));
|
||||
if (Grid1.SelectedRowIndexArray.Length > 0)
|
||||
{
|
||||
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
|
||||
{
|
||||
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
|
||||
var model = BLL.TwInOutplanmasterService.GetById(rowID);
|
||||
if (model.State == (int)TwConst.State.已审核 || model.State == (int)TwConst.State.已完成)
|
||||
{
|
||||
Alert.ShowInTop("请选择有效的计划!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
BLL.TwInOutplanmasterService.DeleteById(rowID);
|
||||
BindGrid();
|
||||
ShowNotify("删除数据成功!", MessageBoxIcon.Success);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -177,70 +208,6 @@ namespace FineUIPro.Web.CLGL
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Grid行双击事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
|
||||
{
|
||||
this.btnEdit_Click(null, null);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量删除
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnDelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length > 0)
|
||||
{
|
||||
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
|
||||
{
|
||||
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
|
||||
var model = BLL.TwInOutplanmasterService.GetById(rowID);
|
||||
if (model.State == (int)TwConst.State.已审核|| model.State == (int)TwConst.State.已完成)
|
||||
{
|
||||
Alert.ShowInTop("请选择有效的计划!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
BLL.TwInOutplanmasterService.DeleteById(rowID);
|
||||
BindGrid();
|
||||
ShowNotify("删除数据成功!", MessageBoxIcon.Success);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
protected void btnPassMaster_OnClick(object sender, EventArgs e)
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
string planId = Grid1.SelectedRowID;
|
||||
var planMaster = BLL.TwInOutplanmasterService.GetById(planId);
|
||||
if (planMaster.State != (int)TwConst.State.待审核)
|
||||
{
|
||||
Alert.ShowInTop("请选择有效的计划!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
planMaster.State = (int)TwConst.State.已审核;
|
||||
planMaster.AuditMan=this.CurrUser.PersonId;
|
||||
planMaster.AuditDate = DateTime.Now;
|
||||
TwInOutplanmasterService.Update(planMaster);
|
||||
ShowNotify("审核通过!", MessageBoxIcon.Success);
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
}
|
||||
protected void btnGenInMaster_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
|
|
@ -258,23 +225,56 @@ namespace FineUIPro.Web.CLGL
|
|||
else
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("InPlanMasterEdit.aspx?Id={0}", Grid1.SelectedRowID, "编辑 - ")));
|
||||
|
||||
}
|
||||
//if ( planMaster.State != (int)TwConst.State.已审核)
|
||||
//{
|
||||
// Alert.ShowInTop("请选择有效的计划!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// TwInputmasterService.GenInMasterByPlanId(planId);
|
||||
// BindGrid();
|
||||
// ShowNotify("生成入库单成功!", MessageBoxIcon.Success);
|
||||
//}
|
||||
//if ( planMaster.State != (int)TwConst.State.已审核)
|
||||
//{
|
||||
// Alert.ShowInTop("请选择有效的计划!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// TwInputmasterService.GenInMasterByPlanId(planId);
|
||||
// BindGrid();
|
||||
// ShowNotify("生成入库单成功!", MessageBoxIcon.Success);
|
||||
//}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 新增
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnImport_Click(object sender, EventArgs e)
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("InPlanMasterDataIn.aspx?", "导入 - ")));
|
||||
}
|
||||
|
||||
protected void btnPassMaster_OnClick(object sender, EventArgs e)
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
string planId = Grid1.SelectedRowID;
|
||||
var planMaster = BLL.TwInOutplanmasterService.GetById(planId);
|
||||
if (planMaster.State != (int)TwConst.State.待审核)
|
||||
{
|
||||
Alert.ShowInTop("请选择有效的计划!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
planMaster.State = (int)TwConst.State.已审核;
|
||||
planMaster.AuditMan = this.CurrUser.PersonId;
|
||||
planMaster.AuditDate = DateTime.Now;
|
||||
TwInOutplanmasterService.Update(planMaster);
|
||||
ShowNotify("审核通过!", MessageBoxIcon.Success);
|
||||
BindGrid();
|
||||
}
|
||||
}
|
||||
|
||||
protected void btnRevokeGenInMaster_Click(object sender, EventArgs e)
|
||||
protected void btnRevokeGenInMaster_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
|
|
@ -292,13 +292,29 @@ namespace FineUIPro.Web.CLGL
|
|||
{
|
||||
TwInputmasterService.RevokeGenInMasterByPlanId(planId);
|
||||
BindGrid();
|
||||
ShowNotify("撤销入库单成功!",MessageBoxIcon.Success);
|
||||
}
|
||||
|
||||
ShowNotify("撤销入库单成功!", MessageBoxIcon.Success);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
protected void btnSearch_Click(object sender, EventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Grid行双击事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
|
||||
{
|
||||
this.btnEdit_Click(null, null);
|
||||
}
|
||||
|
||||
#endregion 数据编辑事件
|
||||
|
||||
#region 关闭弹出窗
|
||||
|
||||
/// <summary>
|
||||
/// 关闭弹出窗
|
||||
/// </summary>
|
||||
|
|
@ -308,9 +324,11 @@ namespace FineUIPro.Web.CLGL
|
|||
{
|
||||
BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#endregion 关闭弹出窗
|
||||
|
||||
#region 获取权限按钮
|
||||
|
||||
/// <summary>
|
||||
/// 获取按钮权限
|
||||
/// </summary>
|
||||
|
|
@ -342,9 +360,11 @@ namespace FineUIPro.Web.CLGL
|
|||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#endregion 获取权限按钮
|
||||
|
||||
#region 导出按钮
|
||||
|
||||
/// 导出按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
|
|
@ -399,21 +419,18 @@ namespace FineUIPro.Web.CLGL
|
|||
return sb.ToString();
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion 导出按钮
|
||||
|
||||
protected void Grid1_RowCommand(object sender, GridCommandEventArgs e)
|
||||
protected void txtMaterialCode_OnTextChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (e.CommandName == "btnInPlanMasterPrint")
|
||||
{
|
||||
Print(e.RowID);
|
||||
}
|
||||
BindDetailGrid(Grid1.SelectedRowID);
|
||||
}
|
||||
|
||||
private void Print(string Id)
|
||||
{
|
||||
BLL.FastReportService.ResetData();
|
||||
if (string.IsNullOrEmpty(Id))
|
||||
{
|
||||
|
||||
ShowNotify("请选择要打印的项", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
|
@ -422,12 +439,11 @@ namespace FineUIPro.Web.CLGL
|
|||
{
|
||||
Id = Id
|
||||
};
|
||||
var result =TwInOutplanmasterService.GetListData(queryModel).FirstOrDefault();
|
||||
var result = TwInOutplanmasterService.GetListData(queryModel).FirstOrDefault();
|
||||
List<Model.Tw_PrintMaster> tw_PrintMasters = new List<Model.Tw_PrintMaster>();
|
||||
List<Model.Tw_PrintDetail> tw_PrintDetails = new List<Model.Tw_PrintDetail>();
|
||||
Model.Tw_PrintMaster printMaster = new Model.Tw_PrintMaster
|
||||
{
|
||||
|
||||
ReqUnitName = result.ReqUnitName,
|
||||
CusBillCode = result.CusBillCode,
|
||||
CreateDate = result.CreateDate.Value.ToString("yyyy-MM-dd"),
|
||||
|
|
@ -452,47 +468,47 @@ namespace FineUIPro.Web.CLGL
|
|||
{
|
||||
InOutPlanMasterId = Id
|
||||
};
|
||||
var ListDetailRelation =TwInoutplandetailRelationService.GetTw_InOutPlanDetail_RelationByModle(queryModel2).ToList();
|
||||
var ListDetailRelation = TwInoutplandetailRelationService.GetTw_InOutPlanDetail_RelationByModle(queryModel2).ToList();
|
||||
int SortIndex = 1;
|
||||
int SortIndex2 = 1;
|
||||
var tw_PrintDetailRelation=(from x in ListDetailRelation
|
||||
join y in Funs.DB.HJGL_MaterialCodeLib on x.MaterialCode equals y.MaterialCode
|
||||
join z in Funs.DB.HJGL_Pipeline on x.PipelineId equals z.PipelineId
|
||||
join m in Funs.DB.WBS_UnitWork on z.UnitWorkId equals m.UnitWorkId
|
||||
select new Model.Tw_PrintDetail
|
||||
{
|
||||
SortIndex=SortIndex++,
|
||||
PipelineCode=z.PipelineCode,
|
||||
PipelineComponentCode=x.PrefabricatedComponents,
|
||||
MaterialCode=y.MaterialCode,
|
||||
MaterialDef=y.MaterialDef,
|
||||
MaterialSpec=y.MaterialSpec,
|
||||
MaterialUnit=y.MaterialUnit,
|
||||
PlanNum = (x.Number ?? 0).ToString(),
|
||||
UnitWorkName = m.UnitWorkName,
|
||||
}).ToList();
|
||||
var UnitWorkName= tw_PrintDetailRelation.FirstOrDefault()?.UnitWorkName;
|
||||
Tw_PrintDetail tw_PrintDetailRelation2 = new Tw_PrintDetail
|
||||
{
|
||||
MaterialDef = "材料编码合计"
|
||||
};
|
||||
var tw_PrintDetail = ( from x in Funs.DB.Tw_InOutPlanDetail
|
||||
join y in Funs.DB.HJGL_MaterialCodeLib on x.MaterialCode equals y.MaterialCode
|
||||
where x.InOutPlanMasterId==Id
|
||||
orderby x.SortIndex
|
||||
var tw_PrintDetailRelation = (from x in ListDetailRelation
|
||||
join y in Funs.DB.HJGL_MaterialCodeLib on x.MaterialCode equals y.MaterialCode
|
||||
join z in Funs.DB.HJGL_Pipeline on x.PipelineId equals z.PipelineId
|
||||
join m in Funs.DB.WBS_UnitWork on z.UnitWorkId equals m.UnitWorkId
|
||||
select new Model.Tw_PrintDetail
|
||||
{
|
||||
SortIndex =0,
|
||||
PipelineCode = "-",
|
||||
PipelineComponentCode = "-",
|
||||
SortIndex = SortIndex++,
|
||||
PipelineCode = z.PipelineCode,
|
||||
PipelineComponentCode = x.PrefabricatedComponents,
|
||||
MaterialCode = y.MaterialCode,
|
||||
MaterialDef = y.MaterialDef,
|
||||
MaterialSpec = y.MaterialSpec,
|
||||
MaterialUnit = y.MaterialUnit,
|
||||
PlanNum = (x.PlanNum ?? 0).ToString(),
|
||||
ActNum = (x.ActNum ?? 0).ToString(),
|
||||
UnitWorkName = UnitWorkName,
|
||||
PlanNum = (x.Number ?? 0).ToString(),
|
||||
UnitWorkName = m.UnitWorkName,
|
||||
}).ToList();
|
||||
var UnitWorkName = tw_PrintDetailRelation.FirstOrDefault()?.UnitWorkName;
|
||||
Tw_PrintDetail tw_PrintDetailRelation2 = new Tw_PrintDetail
|
||||
{
|
||||
MaterialDef = "材料编码合计"
|
||||
};
|
||||
var tw_PrintDetail = (from x in Funs.DB.Tw_InOutPlanDetail
|
||||
join y in Funs.DB.HJGL_MaterialCodeLib on x.MaterialCode equals y.MaterialCode
|
||||
where x.InOutPlanMasterId == Id
|
||||
orderby x.SortIndex
|
||||
select new Model.Tw_PrintDetail
|
||||
{
|
||||
SortIndex = 0,
|
||||
PipelineCode = "-",
|
||||
PipelineComponentCode = "-",
|
||||
MaterialCode = y.MaterialCode,
|
||||
MaterialDef = y.MaterialDef,
|
||||
MaterialSpec = y.MaterialSpec,
|
||||
MaterialUnit = y.MaterialUnit,
|
||||
PlanNum = (x.PlanNum ?? 0).ToString(),
|
||||
ActNum = (x.ActNum ?? 0).ToString(),
|
||||
UnitWorkName = UnitWorkName,
|
||||
}).ToList();
|
||||
foreach (var item in tw_PrintDetail)
|
||||
{
|
||||
item.SortIndex = SortIndex2++;
|
||||
|
|
@ -507,7 +523,7 @@ namespace FineUIPro.Web.CLGL
|
|||
}
|
||||
BLL.FastReportService.ResetData();
|
||||
BLL.FastReportService.AddFastreportTable(Table1);
|
||||
BLL.FastReportService.AddFastreportTable(Data);
|
||||
BLL.FastReportService.AddFastreportTable(Data);
|
||||
string initTemplatePath = "";
|
||||
string rootPath = Server.MapPath("~/");
|
||||
initTemplatePath = "File\\Fastreport\\材料入库计划单.frx";
|
||||
|
|
@ -515,13 +531,7 @@ namespace FineUIPro.Web.CLGL
|
|||
if (File.Exists(rootPath + initTemplatePath))
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("~/Controls/Fastreport.aspx?ReportPath={0}", rootPath + initTemplatePath)));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
protected void txtMaterialCode_OnTextChanged(object sender, EventArgs e)
|
||||
{
|
||||
BindDetailGrid(Grid1.SelectedRowID);
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -153,6 +153,9 @@
|
|||
<HintPath>..\packages\System.Text.Encoding.CodePages.4.5.0\lib\net461\System.Text.Encoding.CodePages.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Transactions" />
|
||||
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.DataVisualization" />
|
||||
<Reference Include="System.Web.DynamicData" />
|
||||
<Reference Include="System.Web.Entity" />
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ using System.Drawing;
|
|||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using AspNet = System.Web.UI.WebControls;
|
||||
|
||||
namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
|
|
@ -287,24 +288,33 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
|||
{
|
||||
Model.View_HJGL_WeldJoint model = new Model.View_HJGL_WeldJoint();
|
||||
model.ProjectId = this.CurrUser.LoginProjectId;
|
||||
model.WeldJointCode = this.txtWeldJointCode.Text;
|
||||
|
||||
if (this.tvControlItem.SelectedNode.CommandName.Split('|').Count() == 2)
|
||||
{
|
||||
model.UnitWorkId = this.tvControlItem.SelectedNodeID;
|
||||
|
||||
model.WeldJointCode = this.txtWeldJointCode.Text;
|
||||
var list = BLL.WeldJointService.GetDataBymodel(model, Grid1.PageIndex, Grid1.PageSize);
|
||||
Grid1.RecordCount = list.Total;
|
||||
Grid1.DataSource = list.Data;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
else if (this.tvControlItem.SelectedNode.CommandName == "管线")
|
||||
{
|
||||
model.PipelineId = this.tvControlItem.SelectedNodeID;
|
||||
|
||||
var list = BLL.WeldJointService.GetViewWeldJointsBymodel(model);
|
||||
View_HJGL_WeldJoint = list;
|
||||
Grid1.RecordCount = list.Count;
|
||||
var table = list.Skip(Grid1.PageSize * (Grid1.PageIndex)).Take(Grid1.PageSize).ToList();
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
model.WeldJointCode = this.txtWeldJointCode.Text;
|
||||
var list = BLL.WeldJointService.GetViewWeldJointsBymodel(model);
|
||||
View_HJGL_WeldJoint = list;
|
||||
Grid1.RecordCount = list.Count;
|
||||
// var table = this.GetPagedDataTable(Grid1, list);
|
||||
var table = list.Skip(Grid1.PageSize * (Grid1.PageIndex)).Take(Grid1.PageSize).ToList();
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -477,14 +487,15 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
|||
/// <param name="e"></param>
|
||||
protected void btnOut_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.tvControlItem.SelectedNode.CommandName.Split('|').Count() == 2)
|
||||
if (this.tvControlItem.SelectedNode.CommandName.Split('|').Count() == 2) //单位工程
|
||||
{
|
||||
Model.View_HJGL_WeldJoint model = new Model.View_HJGL_WeldJoint();
|
||||
model.ProjectId = this.CurrUser.LoginProjectId;
|
||||
model.UnitWorkId = this.tvControlItem.SelectedNodeID;
|
||||
var list = BLL.WeldJointService.GetViewWeldJointsBymodel(model);
|
||||
View_HJGL_WeldJoint = list;
|
||||
}
|
||||
/* PrintByUnitWork(this.tvControlItem.SelectedNodeID);
|
||||
return;*/
|
||||
}
|
||||
|
||||
string path = Funs.RootPath + @"File\Excel\Temp\JointQuery.xlsx";
|
||||
path = path.Replace(".xlsx", string.Format("{0:yyyy-MM-dd-HH-mm}", DateTime.Now) + ".xlsx");
|
||||
|
|
@ -546,6 +557,89 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
|||
//Response.Write(GetGridTableHtml(Grid1));
|
||||
//Response.End();
|
||||
}
|
||||
protected void PrintByUnitWork(string unitWorkId)
|
||||
{
|
||||
const int pageSize = 10000;
|
||||
int pageIndex = 0;
|
||||
bool isFirstPage = true;
|
||||
var model = new Model.View_HJGL_WeldJoint
|
||||
{
|
||||
ProjectId = this.CurrUser.LoginProjectId,
|
||||
UnitWorkId = unitWorkId
|
||||
};
|
||||
|
||||
// 生成唯一文件路径(带GUID哈希值)
|
||||
string path = $@"{Funs.RootPath}File\Excel\Temp\JointQuery_{Guid.NewGuid().GetHashCode():x}.xlsx";
|
||||
var AllData = new List<object>();
|
||||
using (var excelStream = new FileStream(path, FileMode.Create))
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
// 分页获取数据
|
||||
var pageData = BLL.WeldJointService.GetDataBymodel(model, pageIndex, pageSize);
|
||||
|
||||
if (!pageData.Data.Any()) break;
|
||||
|
||||
// 动态转换查询结果
|
||||
var currentChunk = pageData.Data.Select(x => new
|
||||
{
|
||||
焊口号 = x.WeldJointCode,
|
||||
完成状态 = x.IsWeldOK,
|
||||
单位名称 = x.UnitName,
|
||||
流水段 = x.FlowingSection,
|
||||
材质1 = x.Material1Code,
|
||||
材质2 = x.Material2Code,
|
||||
达因 = x.Size,
|
||||
外径 = x.Dia,
|
||||
壁厚 = x.Thickness,
|
||||
规格 = x.Specification,
|
||||
焊缝类型 = x.WeldTypeCode,
|
||||
焊接方法 = x.WeldingMethodCode,
|
||||
WPS编号 = x.WPQCode,
|
||||
坡口类型 = x.GrooveTypeCode,
|
||||
焊条 = x.WeldingRodCode,
|
||||
焊丝 = x.WeldingWireCode,
|
||||
预热温度 = x.PreTemperature,
|
||||
焊口属性 = x.JointAttribute,
|
||||
焊接日期 = x.WeldingDate,
|
||||
打底焊工号 = x.BackingWelderCode,
|
||||
打底焊工班组 = x.BackingWelderTeamGroupName,
|
||||
盖面焊工号 = x.CoverWelderCode,
|
||||
盖面焊工班组 = x.CoverWelderTeamGroupName,
|
||||
热处理报告编号 = x.HotProessReportNo,
|
||||
热处理检测结果 = x.HotProessResult,
|
||||
硬度报告编号 = x.HardReportNo,
|
||||
硬度检测结果 = x.HardResult,
|
||||
委托单编号 = x.TrustBatchCode,
|
||||
检测单编号 = x.NDECode,
|
||||
探伤类型 = x.DetectionTypeCode,
|
||||
探伤比例 = x.DetectionRateCode
|
||||
|
||||
}).ToList();
|
||||
|
||||
AllData.AddRange(currentChunk);
|
||||
// 内存清理 & 翻页操作
|
||||
currentChunk = null;
|
||||
pageIndex++;
|
||||
GC.Collect(GC.MaxGeneration, GCCollectionMode.Optimized, blocking: true);
|
||||
}
|
||||
|
||||
MiniExcel.SaveAs(path, AllData );
|
||||
|
||||
}
|
||||
string fileName = "焊口信息总览.xlsx";
|
||||
FileInfo info = new FileInfo(path);
|
||||
long fileSize = info.Length;
|
||||
System.Web.HttpContext.Current.Response.Clear();
|
||||
System.Web.HttpContext.Current.Response.ContentType = "application/x-zip-compressed";
|
||||
System.Web.HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));
|
||||
System.Web.HttpContext.Current.Response.AddHeader("Content-Length", fileSize.ToString());
|
||||
System.Web.HttpContext.Current.Response.TransmitFile(path, 0, fileSize);
|
||||
System.Web.HttpContext.Current.Response.Flush();
|
||||
System.Web.HttpContext.Current.Response.Close();
|
||||
File.Delete(path); // 多保险清理机制
|
||||
}
|
||||
|
||||
protected void btnOutNOComPipeline_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.tvControlItem.SelectedNode.CommandName.Split('|').Count() == 2)
|
||||
|
|
|
|||
Loading…
Reference in New Issue