代码无效引用清理,试压包资料界面看板修改
This commit is contained in:
@@ -4,8 +4,6 @@ using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
|
||||
|
||||
namespace BLL
|
||||
@@ -33,7 +31,7 @@ namespace BLL
|
||||
(string.IsNullOrEmpty(table.PipelineId) || x.PipelineId.Contains(table.PipelineId)) &&
|
||||
(string.IsNullOrEmpty(table.InOutPlanMasterId) || x.InOutPlanMasterId.Contains(table.InOutPlanMasterId)) &&
|
||||
(string.IsNullOrEmpty(table.MaterialCode) || x.MaterialCode.Contains(table.MaterialCode)) &&
|
||||
(string.IsNullOrEmpty(table.PrefabricatedComponents) || x.PrefabricatedComponents.Contains(table.PrefabricatedComponents))
|
||||
(string.IsNullOrEmpty(table.PrefabricatedComponents) || x.PrefabricatedComponents.Contains(table.PrefabricatedComponents))
|
||||
select x
|
||||
;
|
||||
|
||||
@@ -58,7 +56,7 @@ namespace BLL
|
||||
// q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize);
|
||||
return from x in q
|
||||
join y in Funs.DB.HJGL_Pipeline on x.PipelineId equals y.PipelineId
|
||||
join mat in Funs.DB.HJGL_MaterialCodeLib on x.MaterialCode equals mat.MaterialCode into mm
|
||||
join mat in Funs.DB.HJGL_MaterialCodeLib on x.MaterialCode equals mat.MaterialCode into mm
|
||||
from mat in mm.DefaultIfEmpty()
|
||||
orderby x.PipelineId, x.PrefabricatedComponents
|
||||
select new
|
||||
@@ -70,7 +68,7 @@ namespace BLL
|
||||
x.MaterialCode,
|
||||
x.PrefabricatedComponents,
|
||||
x.Number,
|
||||
mat.MaterialName,
|
||||
mat.MaterialName,
|
||||
mat.MaterialDef
|
||||
};
|
||||
}
|
||||
@@ -81,14 +79,14 @@ namespace BLL
|
||||
return Funs.DB.Tw_InOutPlanDetail_Relation.FirstOrDefault(x => x.Id == Id);
|
||||
}
|
||||
|
||||
public static Model.Tw_InOutPlanDetail_Relation GetByPipelineId(string pipelineId,string WarehouseCode)
|
||||
public static Model.Tw_InOutPlanDetail_Relation GetByPipelineId(string pipelineId, string WarehouseCode)
|
||||
{
|
||||
int typeInt = (int)TwConst.TypeInt.散件出库;
|
||||
var q= from x in Funs.DB.Tw_InOutPlanDetail_Relation
|
||||
join y in Funs.DB .Tw_InOutPlanMaster on x.InOutPlanMasterId equals y.Id
|
||||
where x.PipelineId == pipelineId && y.WarehouseCode == WarehouseCode && y.TypeInt!= typeInt
|
||||
select x;
|
||||
return q.FirstOrDefault();
|
||||
var q = from x in Funs.DB.Tw_InOutPlanDetail_Relation
|
||||
join y in Funs.DB.Tw_InOutPlanMaster on x.InOutPlanMasterId equals y.Id
|
||||
where x.PipelineId == pipelineId && y.WarehouseCode == WarehouseCode && y.TypeInt != typeInt
|
||||
select x;
|
||||
return q.FirstOrDefault();
|
||||
}
|
||||
public static void Add(Model.Tw_InOutPlanDetail_Relation newtable)
|
||||
{
|
||||
@@ -156,14 +154,14 @@ namespace BLL
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static void InsertByPipeLineMat(string inOutPlanMasterId, List<Model.Tw_PipeLineMat> tw_PipeLineMats)
|
||||
{
|
||||
var master =TwInOutplanmasterService.GetById(inOutPlanMasterId);
|
||||
var master = TwInOutplanmasterService.GetById(inOutPlanMasterId);
|
||||
if (master == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
var outMateriaList = from x in tw_PipeLineMats
|
||||
group x by new { x.MaterialCode, x.MaterialUnit }
|
||||
into g
|
||||
@@ -183,7 +181,7 @@ namespace BLL
|
||||
outMateriaList.Where(x => x.MaterialName.Contains("个"));//管件
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
foreach (var item in outMateriaList)
|
||||
{
|
||||
Model.Tw_InOutPlanDetail detail = new Model.Tw_InOutPlanDetail
|
||||
@@ -206,27 +204,27 @@ namespace BLL
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static IEnumerable GetPrintListByOutputMasterIds(List<string> outputMasterIds)
|
||||
{
|
||||
var q = from x in Funs.DB.Tw_InOutPlanDetail_Relation
|
||||
join y in Funs.DB.HJGL_MaterialCodeLib on x.MaterialCode equals y.MaterialCode
|
||||
join plan in Funs.DB.Tw_InOutPlanMaster on x.InOutPlanMasterId equals plan.Id
|
||||
join plan in Funs.DB.Tw_InOutPlanMaster on x.InOutPlanMasterId equals plan.Id
|
||||
join master in Funs.DB.Tw_OutputMaster on plan.Id equals master.InOutPlanMasterId
|
||||
join pipe in Funs.DB.HJGL_Pipeline on x.PipelineId equals pipe.PipelineId
|
||||
where outputMasterIds.Contains(master.Id)
|
||||
orderby master.CusBillCode
|
||||
select new
|
||||
{
|
||||
出库单编号 = master.CusBillCode,
|
||||
管线号=pipe.PipelineCode,
|
||||
预制组件号= x.PrefabricatedComponents,
|
||||
材料编码 = x.MaterialCode,
|
||||
材料名称 = y.MaterialName,
|
||||
材料描述 = y.MaterialDef,
|
||||
单位=y.MaterialUnit,
|
||||
所需量 = x.Number,
|
||||
};
|
||||
orderby master.CusBillCode
|
||||
select new
|
||||
{
|
||||
出库单编号 = master.CusBillCode,
|
||||
管线号 = pipe.PipelineCode,
|
||||
预制组件号 = x.PrefabricatedComponents,
|
||||
材料编码 = x.MaterialCode,
|
||||
材料名称 = y.MaterialName,
|
||||
材料描述 = y.MaterialDef,
|
||||
单位 = y.MaterialUnit,
|
||||
所需量 = x.Number,
|
||||
};
|
||||
return q;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user