feat(HJGL): 新增材料仓库管理并优化管线划分页面
**新增功能:** - 添加材料仓库管理模块(增删改查) - 管线划分页面支持按流水段和管线划分筛选 - 管线划分页面支持批量设置仓库 **技术改进:** - 新增 Base_Warehouse 表和模型 - 扩展 HJGL_Pipeline 模型添加 WarehouseId 字段 - 优化管线查询支持多条件组合
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using BLL;
|
||||
using FineUIPro.Web.DataShow;
|
||||
using Model;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
@@ -12,18 +13,16 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
public partial class WeldMatMatch : PageBase
|
||||
{
|
||||
public int pageSize = PipelineService.pageSize;
|
||||
//public Dictionary<string, string> dicSeclectPipeLine = new Dictionary<string, string>();
|
||||
//public static List<Model.Tw_PipeMatMatchOutput> tw_PipeMatMatchOutputs ;
|
||||
public static decimal Rate = 0;
|
||||
public string WarehouseCode
|
||||
public string WarehouseId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["WarehouseCode"];
|
||||
return (string)ViewState["WarehouseId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["WarehouseCode"] = value;
|
||||
ViewState["WarehouseId"] = value;
|
||||
}
|
||||
}
|
||||
public string PipeArea
|
||||
@@ -79,15 +78,12 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
tw_PipeMatMatchOutputs = new List<Model.Tw_PipeMatMatchOutput>();
|
||||
PipeArea = Request.Params["PipeArea"];
|
||||
if (PipeArea == "2")
|
||||
{
|
||||
WarehouseCode = "现场安装";
|
||||
}
|
||||
else
|
||||
{
|
||||
WarehouseCode = "工厂预制";
|
||||
}
|
||||
HJGL_MaterialService.materialStockItems_FIELD = new List<Model.MaterialStockItem>();
|
||||
drpWarehouse.DataTextField = "Key";
|
||||
drpWarehouse.DataValueField = "Value";
|
||||
drpWarehouse.DataSource = BLL.TwInOutplanmasterService.GetWarehouseCode(this.CurrUser.LoginProjectId);
|
||||
drpWarehouse.DataBind();
|
||||
drpWarehouse_SelectedIndexChanged(null, null);
|
||||
; HJGL_MaterialService.materialStockItems_FIELD = new List<Model.MaterialStockItem>();
|
||||
HJGL_MaterialService.materialStockItems_SHOP = new List<Model.MaterialStockItem>();
|
||||
dicSeclectPipeLine = new Dictionary<string, string>();
|
||||
var pipeline = (from x in Funs.DB.HJGL_Pipeline
|
||||
@@ -159,7 +155,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
foreach (var q in unitWork1)
|
||||
{
|
||||
|
||||
int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId && x.PipeArea == PipeArea select x).Count();
|
||||
int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId && x.PipeArea == PipeArea && x.WarehouseId == WarehouseId select x).Count();
|
||||
var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId);
|
||||
TreeNode tn1 = new TreeNode();
|
||||
tn1.NodeID = q.UnitWorkId;
|
||||
@@ -182,7 +178,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
foreach (var q in unitWork2)
|
||||
{
|
||||
int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId && x.PipeArea == PipeArea select x).Count();
|
||||
int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId && x.PipeArea == PipeArea && x.WarehouseId == WarehouseId select x).Count();
|
||||
// var NowComPipelineCode = PipelineService.GetNoComPipelinesByUnitWordId(q.UnitWorkId);
|
||||
//int a = NowComPipelineCode.Count();
|
||||
var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId);
|
||||
@@ -221,14 +217,14 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
//}
|
||||
var CompleteInOutPlanDetail_RelationList = from x in Funs.DB.Tw_InOutPlanDetail_Relation
|
||||
join y in Funs.DB.Tw_InOutPlanMaster on x.InOutPlanMasterId equals y.Id
|
||||
where y.State == (int)TwConst.State.已完成 && y.WarehouseCode == WarehouseCode
|
||||
where y.State == (int)TwConst.State.已完成 && y.WarehouseCode == drpWarehouse.SelectedValue
|
||||
select x;
|
||||
|
||||
var pipeline = (from x in Funs.DB.HJGL_Pipeline
|
||||
join y in CompleteInOutPlanDetail_RelationList on x.PipelineId equals y.PipelineId into temp
|
||||
from y in temp.DefaultIfEmpty()
|
||||
where y == null && x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == node.NodeID
|
||||
&& x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim())
|
||||
&& x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim()) && x.WarehouseId==WarehouseId
|
||||
orderby x.PipelineCode
|
||||
select x).ToList();
|
||||
if (!string.IsNullOrEmpty(drpFlowingSection.SelectedValue) && drpFlowingSection.SelectedValue != Const._Null)
|
||||
@@ -396,7 +392,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
var model2 = JsonConvert.DeserializeObject<Dictionary<string, string>>(JsonConvert.SerializeObject(model));
|
||||
string pipeid = model2.First().Value;
|
||||
|
||||
var relationModle = TwInoutplandetailRelationService.GetByPipelineId(pipeid, WarehouseCode);
|
||||
var relationModle = TwInoutplandetailRelationService.GetByPipelineId(pipeid, drpWarehouse.SelectedValue);
|
||||
if (relationModle != null)
|
||||
{
|
||||
Grid3.Rows[i].RowCssClass = "yellow";
|
||||
@@ -499,7 +495,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(tvControlItem.SelectedNodeID);
|
||||
var pipeline = (from x in Funs.DB.HJGL_Pipeline
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == tvControlItem.SelectedNodeID && x.PipeArea == PipeArea
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == tvControlItem.SelectedNodeID && x.PipeArea == PipeArea && x.WarehouseId == WarehouseId
|
||||
orderby x.PipelineCode
|
||||
select x).ToList();
|
||||
List<string> pipelineList = new List<string>();
|
||||
@@ -570,7 +566,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
dicSeclectPipeLine.Add(node.NodeID, node.Text);
|
||||
}
|
||||
}
|
||||
tw_PipeMatMatchOutputs = TwArrivalStatisticsService.GetPipeMatMatch(this.CurrUser.LoginProjectId, dicSeclectPipeLine.Keys.ToList(), WarehouseCode);
|
||||
tw_PipeMatMatchOutputs = TwArrivalStatisticsService.GetPipeMatMatch(this.CurrUser.LoginProjectId, dicSeclectPipeLine.Keys.ToList(), drpWarehouse.SelectedValue);
|
||||
|
||||
BindGrid3();
|
||||
BindGrid2();
|
||||
@@ -587,7 +583,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
node.Checked = false;
|
||||
}
|
||||
|
||||
tw_PipeMatMatchOutputs = TwArrivalStatisticsService.GetPipeMatMatch(this.CurrUser.LoginProjectId, dicSeclectPipeLine.Keys.ToList(), WarehouseCode);
|
||||
tw_PipeMatMatchOutputs = TwArrivalStatisticsService.GetPipeMatMatch(this.CurrUser.LoginProjectId, dicSeclectPipeLine.Keys.ToList(), drpWarehouse.SelectedValue);
|
||||
|
||||
BindGrid3();
|
||||
BindGrid2();
|
||||
@@ -765,8 +761,13 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
return isCover;
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
protected void drpWarehouse_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
WarehouseId = Base_WarehouseService.GetWarehouseList(this.CurrUser.LoginProjectId).Where(x => x.WarehouseName == drpWarehouse.SelectedValue).Select(x => x.WarehouseId).FirstOrDefault();
|
||||
this.InitTreeMenu();//加载树
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user