提交代码
This commit is contained in:
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);
|
TwMaterialstockService.UpdateStockNum(master.ProjectId, detail.MaterialCode, master.WarehouseCode, TwConst.InOutType.入库, detailTable.ActNum);
|
||||||
|
|
||||||
}
|
}
|
||||||
plan.State= (int)TwConst.State.已完成;
|
var planTable =TwInOutplanmasterService.GetById(plan.Id);
|
||||||
TwInOutplanmasterService.Update(plan);
|
if (planTable != null)
|
||||||
|
{
|
||||||
|
planTable.State = (int)TwConst.State.已完成;
|
||||||
|
TwInOutplanmasterService.Update(planTable);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 根据计划单撤销入库单
|
/// 根据计划单撤销入库单
|
||||||
|
|||||||
@@ -455,17 +455,96 @@ namespace BLL
|
|||||||
}
|
}
|
||||||
public static List<Model.View_HJGL_WeldJoint> GetViewWeldJointsBymodel(Model.View_HJGL_WeldJoint model)
|
public static List<Model.View_HJGL_WeldJoint> GetViewWeldJointsBymodel(Model.View_HJGL_WeldJoint model)
|
||||||
{
|
{
|
||||||
var q = (from x in Funs.DB.View_HJGL_WeldJoint
|
var baseQuery = from x in Funs.DB.View_HJGL_WeldJoint select x;
|
||||||
where
|
if (!string.IsNullOrEmpty(model.ProjectId))
|
||||||
(string.IsNullOrEmpty(model.ProjectId) || x.ProjectId.Contains(model.ProjectId))
|
baseQuery = baseQuery.Where(x => x.ProjectId == model.ProjectId);
|
||||||
&& (string.IsNullOrEmpty(model.UnitWorkId) || x.UnitWorkId.Contains(model.UnitWorkId))
|
if (!string.IsNullOrEmpty(model.UnitWorkId))
|
||||||
&& (string.IsNullOrEmpty(model.PipelineId) || x.PipelineId.Contains(model.PipelineId))
|
baseQuery = baseQuery.Where(x => x.UnitWorkId == model.UnitWorkId);
|
||||||
&& (string.IsNullOrEmpty(model.PipelineCode) || x.PipelineCode.Contains(model.PipelineCode))
|
if (!string.IsNullOrEmpty(model.PipelineId))
|
||||||
&& (string.IsNullOrEmpty(model.WeldJointCode) || x.WeldJointCode.Contains(model.WeldJointCode))
|
baseQuery = baseQuery.Where(x => x.PipelineId == model.PipelineId);
|
||||||
orderby x.WeldJointCode
|
if (!string.IsNullOrEmpty(model.PipelineCode))
|
||||||
select x).AsParallel().ToList();
|
baseQuery = baseQuery.Where(x => x.PipelineCode.Contains(model.PipelineCode));
|
||||||
return q;
|
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>
|
||||||
/// 根据壁厚计算焊口达因
|
/// 根据壁厚计算焊口达因
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -12,6 +12,12 @@ namespace FineUIPro.Web.CLGL
|
|||||||
{
|
{
|
||||||
public partial class ArrivalStatistics : PageBase
|
public partial class ArrivalStatistics : PageBase
|
||||||
{
|
{
|
||||||
|
#region Methods
|
||||||
|
|
||||||
|
protected void btnSearch_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
BindGrid();
|
||||||
|
}
|
||||||
|
|
||||||
protected void Page_Load(object sender, EventArgs e)
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
@@ -27,7 +33,10 @@ namespace FineUIPro.Web.CLGL
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion Methods
|
||||||
|
|
||||||
#region 绑定数据
|
#region 绑定数据
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 绑定数据
|
/// 绑定数据
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -61,14 +70,14 @@ namespace FineUIPro.Web.CLGL
|
|||||||
if (model?.MatchRate < 1 || model?.MatchRate == null)
|
if (model?.MatchRate < 1 || model?.MatchRate == null)
|
||||||
{
|
{
|
||||||
Grid1.Rows[i].RowCssClass = "red";
|
Grid1.Rows[i].RowCssClass = "red";
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion 绑定数据
|
||||||
|
|
||||||
#region GV 数据操作
|
#region GV 数据操作
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 过滤表头
|
/// 过滤表头
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -79,6 +88,17 @@ namespace FineUIPro.Web.CLGL
|
|||||||
// this.BindGrid();
|
// 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>
|
||||||
/// 分页
|
/// 分页
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -101,20 +121,10 @@ namespace FineUIPro.Web.CLGL
|
|||||||
this.Grid1.SortField = e.SortField;
|
this.Grid1.SortField = e.SortField;
|
||||||
this.BindGrid();
|
this.BindGrid();
|
||||||
}
|
}
|
||||||
|
#endregion GV 数据操作
|
||||||
/// <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
|
|
||||||
|
|
||||||
#region 关闭弹出窗
|
#region 关闭弹出窗
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 关闭弹出窗
|
/// 关闭弹出窗
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -124,11 +134,11 @@ namespace FineUIPro.Web.CLGL
|
|||||||
{
|
{
|
||||||
BindGrid();
|
BindGrid();
|
||||||
}
|
}
|
||||||
#endregion
|
|
||||||
|
|
||||||
|
|
||||||
|
#endregion 关闭弹出窗
|
||||||
|
|
||||||
#region 导出按钮
|
#region 导出按钮
|
||||||
|
|
||||||
/// 导出按钮
|
/// 导出按钮
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="sender"></param>
|
/// <param name="sender"></param>
|
||||||
@@ -182,11 +192,7 @@ namespace FineUIPro.Web.CLGL
|
|||||||
|
|
||||||
return sb.ToString();
|
return sb.ToString();
|
||||||
}
|
}
|
||||||
#endregion
|
|
||||||
|
|
||||||
protected void btnSearch_Click(object sender, EventArgs e)
|
#endregion 导出按钮
|
||||||
{
|
|
||||||
BindGrid();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -15,6 +15,7 @@ namespace FineUIPro.Web.CLGL
|
|||||||
{
|
{
|
||||||
public partial class InPlanMaster : PageBase
|
public partial class InPlanMaster : PageBase
|
||||||
{
|
{
|
||||||
|
#region Methods
|
||||||
|
|
||||||
protected void Page_Load(object sender, EventArgs e)
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
@@ -27,27 +28,20 @@ namespace FineUIPro.Web.CLGL
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#region 绑定数据
|
#endregion Methods
|
||||||
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);
|
|
||||||
|
|
||||||
|
#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>
|
||||||
/// 绑定数据
|
/// 绑定数据
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -76,18 +70,31 @@ namespace FineUIPro.Web.CLGL
|
|||||||
Grid2.DataSource = null;
|
Grid2.DataSource = null;
|
||||||
Grid2.DataBind();
|
Grid2.DataBind();
|
||||||
}
|
}
|
||||||
private void BindDetailGrid(string inOutPlanMasterId)
|
|
||||||
|
private void InitDrpList()
|
||||||
{
|
{
|
||||||
Model.Tw_InOutDetailOutput table = new Model.Tw_InOutDetailOutput();
|
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
|
||||||
table.InOutPlanMasterId = inOutPlanMasterId;
|
drpWarehouse.DataTextField = "Text";
|
||||||
table.MaterialCode = txtMaterialCode.Text;
|
drpWarehouse.DataValueField = "Value";
|
||||||
var tb = BLL.TwInOutplandetailService.GetListData(table, Grid2);
|
drpWarehouse.DataSource = BLL.DropListService.HJGL_WarehouseCode();
|
||||||
Grid2.DataSource = tb;
|
drpWarehouse.DataBind();
|
||||||
Grid2.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 数据操作
|
#region GV 数据操作
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 过滤表头
|
/// 过滤表头
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -98,6 +105,17 @@ namespace FineUIPro.Web.CLGL
|
|||||||
// this.BindGrid();
|
// 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>
|
||||||
/// 分页
|
/// 分页
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -109,6 +127,15 @@ namespace FineUIPro.Web.CLGL
|
|||||||
this.BindGrid();
|
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>
|
||||||
/// 排序
|
/// 排序
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -120,72 +147,18 @@ namespace FineUIPro.Web.CLGL
|
|||||||
this.Grid1.SortField = e.SortField;
|
this.Grid1.SortField = e.SortField;
|
||||||
this.BindGrid();
|
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();
|
Print(e.RowID);
|
||||||
BindDetailGrid(ID);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/// <summary>
|
|
||||||
/// 分页显示条数下拉框
|
#endregion GV 数据操作
|
||||||
/// </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
|
|
||||||
|
|
||||||
#region 数据编辑事件
|
#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)
|
|
||||||
{
|
|
||||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("InPlanMasterDataIn.aspx?", "导入 - ")));
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 编辑按钮
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="sender"></param>
|
|
||||||
/// <param name="e"></param>
|
|
||||||
protected void btnEdit_Click(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
|
||||||
{
|
|
||||||
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
string ID = Grid1.SelectedRowID;
|
|
||||||
var model = BLL.TwInOutplanmasterService.GetById(ID);
|
|
||||||
if (model != null) ///已上报时不能删除
|
|
||||||
{
|
|
||||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("InPlanMasterEdit.aspx?Id={0}", ID, "编辑 - ")));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <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>
|
||||||
/// 批量删除
|
/// 批量删除
|
||||||
@@ -212,10 +185,70 @@ namespace FineUIPro.Web.CLGL
|
|||||||
ShowNotify("删除数据成功!", MessageBoxIcon.Success);
|
ShowNotify("删除数据成功!", MessageBoxIcon.Success);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 编辑按钮
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void btnEdit_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||||
|
{
|
||||||
|
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
string ID = Grid1.SelectedRowID;
|
||||||
|
var model = BLL.TwInOutplanmasterService.GetById(ID);
|
||||||
|
if (model != null) ///已上报时不能删除
|
||||||
|
{
|
||||||
|
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("InPlanMasterEdit.aspx?Id={0}", ID, "编辑 - ")));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void btnGenInMaster_Click(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
|
||||||
|
{
|
||||||
|
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);
|
||||||
|
//}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <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)
|
protected void btnPassMaster_OnClick(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||||
@@ -239,39 +272,6 @@ namespace FineUIPro.Web.CLGL
|
|||||||
ShowNotify("审核通过!", MessageBoxIcon.Success);
|
ShowNotify("审核通过!", MessageBoxIcon.Success);
|
||||||
BindGrid();
|
BindGrid();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
protected void btnGenInMaster_Click(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
|
|
||||||
{
|
|
||||||
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);
|
|
||||||
//}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void btnRevokeGenInMaster_Click(object sender, EventArgs e)
|
protected void btnRevokeGenInMaster_Click(object sender, EventArgs e)
|
||||||
@@ -294,11 +294,27 @@ namespace FineUIPro.Web.CLGL
|
|||||||
BindGrid();
|
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 关闭弹出窗
|
#region 关闭弹出窗
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 关闭弹出窗
|
/// 关闭弹出窗
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -308,9 +324,11 @@ namespace FineUIPro.Web.CLGL
|
|||||||
{
|
{
|
||||||
BindGrid();
|
BindGrid();
|
||||||
}
|
}
|
||||||
#endregion
|
|
||||||
|
#endregion 关闭弹出窗
|
||||||
|
|
||||||
#region 获取权限按钮
|
#region 获取权限按钮
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取按钮权限
|
/// 获取按钮权限
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -342,9 +360,11 @@ namespace FineUIPro.Web.CLGL
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
|
||||||
|
#endregion 获取权限按钮
|
||||||
|
|
||||||
#region 导出按钮
|
#region 导出按钮
|
||||||
|
|
||||||
/// 导出按钮
|
/// 导出按钮
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="sender"></param>
|
/// <param name="sender"></param>
|
||||||
@@ -399,21 +419,18 @@ namespace FineUIPro.Web.CLGL
|
|||||||
return sb.ToString();
|
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")
|
BindDetailGrid(Grid1.SelectedRowID);
|
||||||
{
|
|
||||||
Print(e.RowID);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Print(string Id)
|
private void Print(string Id)
|
||||||
{
|
{
|
||||||
BLL.FastReportService.ResetData();
|
BLL.FastReportService.ResetData();
|
||||||
if (string.IsNullOrEmpty(Id))
|
if (string.IsNullOrEmpty(Id))
|
||||||
{
|
{
|
||||||
|
|
||||||
ShowNotify("请选择要打印的项", MessageBoxIcon.Warning);
|
ShowNotify("请选择要打印的项", MessageBoxIcon.Warning);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -427,7 +444,6 @@ namespace FineUIPro.Web.CLGL
|
|||||||
List<Model.Tw_PrintDetail> tw_PrintDetails = new List<Model.Tw_PrintDetail>();
|
List<Model.Tw_PrintDetail> tw_PrintDetails = new List<Model.Tw_PrintDetail>();
|
||||||
Model.Tw_PrintMaster printMaster = new Model.Tw_PrintMaster
|
Model.Tw_PrintMaster printMaster = new Model.Tw_PrintMaster
|
||||||
{
|
{
|
||||||
|
|
||||||
ReqUnitName = result.ReqUnitName,
|
ReqUnitName = result.ReqUnitName,
|
||||||
CusBillCode = result.CusBillCode,
|
CusBillCode = result.CusBillCode,
|
||||||
CreateDate = result.CreateDate.Value.ToString("yyyy-MM-dd"),
|
CreateDate = result.CreateDate.Value.ToString("yyyy-MM-dd"),
|
||||||
@@ -515,13 +531,7 @@ namespace FineUIPro.Web.CLGL
|
|||||||
if (File.Exists(rootPath + initTemplatePath))
|
if (File.Exists(rootPath + initTemplatePath))
|
||||||
{
|
{
|
||||||
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("~/Controls/Fastreport.aspx?ReportPath={0}", 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>
|
<HintPath>..\packages\System.Text.Encoding.CodePages.4.5.0\lib\net461\System.Text.Encoding.CodePages.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Transactions" />
|
<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.DataVisualization" />
|
||||||
<Reference Include="System.Web.DynamicData" />
|
<Reference Include="System.Web.DynamicData" />
|
||||||
<Reference Include="System.Web.Entity" />
|
<Reference Include="System.Web.Entity" />
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ using System.Drawing;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using System.Web;
|
||||||
using AspNet = System.Web.UI.WebControls;
|
using AspNet = System.Web.UI.WebControls;
|
||||||
|
|
||||||
namespace FineUIPro.Web.HJGL.InfoQuery
|
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.View_HJGL_WeldJoint model = new Model.View_HJGL_WeldJoint();
|
||||||
model.ProjectId = this.CurrUser.LoginProjectId;
|
model.ProjectId = this.CurrUser.LoginProjectId;
|
||||||
|
model.WeldJointCode = this.txtWeldJointCode.Text;
|
||||||
|
|
||||||
if (this.tvControlItem.SelectedNode.CommandName.Split('|').Count() == 2)
|
if (this.tvControlItem.SelectedNode.CommandName.Split('|').Count() == 2)
|
||||||
{
|
{
|
||||||
model.UnitWorkId = this.tvControlItem.SelectedNodeID;
|
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 == "管线")
|
else if (this.tvControlItem.SelectedNode.CommandName == "管线")
|
||||||
{
|
{
|
||||||
model.PipelineId = this.tvControlItem.SelectedNodeID;
|
model.PipelineId = this.tvControlItem.SelectedNodeID;
|
||||||
|
|
||||||
}
|
|
||||||
model.WeldJointCode = this.txtWeldJointCode.Text;
|
|
||||||
var list = BLL.WeldJointService.GetViewWeldJointsBymodel(model);
|
var list = BLL.WeldJointService.GetViewWeldJointsBymodel(model);
|
||||||
View_HJGL_WeldJoint = list;
|
View_HJGL_WeldJoint = list;
|
||||||
Grid1.RecordCount = list.Count;
|
Grid1.RecordCount = list.Count;
|
||||||
// var table = this.GetPagedDataTable(Grid1, list);
|
|
||||||
var table = list.Skip(Grid1.PageSize * (Grid1.PageIndex)).Take(Grid1.PageSize).ToList();
|
var table = list.Skip(Grid1.PageSize * (Grid1.PageIndex)).Take(Grid1.PageSize).ToList();
|
||||||
Grid1.DataSource = table;
|
Grid1.DataSource = table;
|
||||||
Grid1.DataBind();
|
Grid1.DataBind();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -477,13 +487,14 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
|||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
protected void btnOut_Click(object sender, EventArgs e)
|
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.View_HJGL_WeldJoint model = new Model.View_HJGL_WeldJoint();
|
||||||
model.ProjectId = this.CurrUser.LoginProjectId;
|
|
||||||
model.UnitWorkId = this.tvControlItem.SelectedNodeID;
|
model.UnitWorkId = this.tvControlItem.SelectedNodeID;
|
||||||
var list = BLL.WeldJointService.GetViewWeldJointsBymodel(model);
|
var list = BLL.WeldJointService.GetViewWeldJointsBymodel(model);
|
||||||
View_HJGL_WeldJoint = list;
|
View_HJGL_WeldJoint = list;
|
||||||
|
/* PrintByUnitWork(this.tvControlItem.SelectedNodeID);
|
||||||
|
return;*/
|
||||||
}
|
}
|
||||||
|
|
||||||
string path = Funs.RootPath + @"File\Excel\Temp\JointQuery.xlsx";
|
string path = Funs.RootPath + @"File\Excel\Temp\JointQuery.xlsx";
|
||||||
@@ -546,6 +557,89 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
|||||||
//Response.Write(GetGridTableHtml(Grid1));
|
//Response.Write(GetGridTableHtml(Grid1));
|
||||||
//Response.End();
|
//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)
|
protected void btnOutNOComPipeline_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (this.tvControlItem.SelectedNode.CommandName.Split('|').Count() == 2)
|
if (this.tvControlItem.SelectedNode.CommandName.Split('|').Count() == 2)
|
||||||
|
|||||||
Reference in New Issue
Block a user