提交代码
This commit is contained in:
@@ -9,7 +9,7 @@ namespace BLL
|
||||
{
|
||||
public static class WeldJointService
|
||||
{
|
||||
public static List<Model.HJGL_WeldJoint> hJGL_WeldJoints
|
||||
public static List<Model.HJGL_WeldJoint> hJGL_WeldJoints
|
||||
{
|
||||
|
||||
get;
|
||||
@@ -66,14 +66,14 @@ namespace BLL
|
||||
}
|
||||
public static List<Model.HJGL_WeldJoint> GetWeldJointsByPipelineId(string PipelineId)
|
||||
{
|
||||
var q = (from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == PipelineId select x).ToList();
|
||||
var q = (from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == PipelineId select x).ToList();
|
||||
return q;
|
||||
}
|
||||
|
||||
public static Model.HJGL_WeldJoint GetWeldJointsByWeldJointCode(string PipelineId, string WeldJointCode)
|
||||
{
|
||||
var q=(from x in Funs.DB.HJGL_WeldJoint where x.PipelineId==PipelineId && x.WeldJointCode==WeldJointCode select x ).FirstOrDefault();
|
||||
|
||||
{
|
||||
var q = (from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == PipelineId && x.WeldJointCode == WeldJointCode select x).FirstOrDefault();
|
||||
|
||||
return q;
|
||||
}
|
||||
|
||||
@@ -87,7 +87,6 @@ namespace BLL
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_WeldJoint newWeldJoint = new Model.HJGL_WeldJoint
|
||||
{
|
||||
WeldJointId = SQLHelper.GetNewID(typeof(Model.HJGL_WeldJoint)),
|
||||
ProjectId = weldJoint.ProjectId,
|
||||
PipelineId = weldJoint.PipelineId,
|
||||
PipelineCode = weldJoint.PipelineCode,
|
||||
@@ -97,7 +96,7 @@ namespace BLL
|
||||
Material2Id = weldJoint.Material2Id,
|
||||
Thickness = weldJoint.Thickness,
|
||||
Dia = weldJoint.Dia,
|
||||
DNDia=weldJoint.DNDia,
|
||||
DNDia = weldJoint.DNDia,
|
||||
Size = weldJoint.Size,
|
||||
DetectionTypeId = weldJoint.DetectionTypeId,
|
||||
JointArea = weldJoint.JointArea,
|
||||
@@ -120,9 +119,16 @@ namespace BLL
|
||||
Remark = weldJoint.Remark,
|
||||
IsTwoJoint = weldJoint.IsTwoJoint,
|
||||
SubmitMan = weldJoint.SubmitMan,
|
||||
TwoJointType=weldJoint.TwoJointType
|
||||
TwoJointType = weldJoint.TwoJointType
|
||||
};
|
||||
|
||||
if (!string.IsNullOrEmpty(weldJoint.WeldJointId))
|
||||
{
|
||||
newWeldJoint.WeldJointId = weldJoint.WeldJointId;
|
||||
}
|
||||
else
|
||||
{
|
||||
newWeldJoint.WeldJointId = SQLHelper.GetNewID(typeof(Model.HJGL_WeldJoint));
|
||||
}
|
||||
db.HJGL_WeldJoint.InsertOnSubmit(newWeldJoint);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
@@ -285,7 +291,7 @@ namespace BLL
|
||||
public static void DeleteWeldJointByPipelineId(string pipelineId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
var weldline = db.HJGL_WeldJoint.Where(e => e.PipelineId == pipelineId);
|
||||
var weldline = db.HJGL_WeldJoint.Where(e => e.PipelineId == pipelineId);
|
||||
if (weldline != null)
|
||||
{
|
||||
db.HJGL_WeldJoint.DeleteAllOnSubmit(weldline);
|
||||
@@ -297,7 +303,7 @@ namespace BLL
|
||||
/// 根据unitworkid删除焊口
|
||||
/// </summary>
|
||||
/// <param name="unitworkId"></param>
|
||||
public static void DeleteWeldJointByUnitWorkId(string unitworkId)
|
||||
public static void DeleteWeldJointByUnitWorkId(string unitworkId)
|
||||
{
|
||||
var oldPipeline = BLL.PipelineService.GetPipelinesByUnitWordId(unitworkId);
|
||||
if (oldPipeline != null)
|
||||
@@ -353,14 +359,14 @@ namespace BLL
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
var q = (from x in db.HJGL_WeldJoint
|
||||
join y in db.HJGL_Pipeline on x.PipelineId equals y.PipelineId into tt
|
||||
from g in tt.DefaultIfEmpty()
|
||||
where g.UnitWorkId == UnitWorkId
|
||||
join y in db.HJGL_Pipeline on x.PipelineId equals y.PipelineId into tt
|
||||
from g in tt.DefaultIfEmpty()
|
||||
where g.UnitWorkId == UnitWorkId
|
||||
select x).ToList();
|
||||
|
||||
return q;
|
||||
}
|
||||
public static List<Model.HJGL_WeldJoint> GetWeldJointByProjectid(string ProjectId)
|
||||
public static List<Model.HJGL_WeldJoint> GetWeldJointByProjectid(string ProjectId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
|
||||
@@ -368,7 +374,7 @@ namespace BLL
|
||||
where x.ProjectId == ProjectId
|
||||
select x).ToList();
|
||||
return q;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据焊口Id获取插入焊口数
|
||||
@@ -445,13 +451,14 @@ 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
|
||||
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();
|
||||
orderby x.WeldJointCode
|
||||
select x).AsParallel().ToList();
|
||||
return q;
|
||||
}
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user