焊接修改

This commit is contained in:
2024-10-17 21:46:32 +08:00
parent 022aebc00d
commit fec4225aff
62 changed files with 4200 additions and 1016 deletions
@@ -33,29 +33,32 @@ namespace BLL
/// <param name="NDEItem"></param>
public static void AddRepairRecord(Model.Repair_RepairRecord repair)
{
Model.HJGLDB db = Funs.DB;
Model.Repair_RepairRecord newRepair = new Model.Repair_RepairRecord();
newRepair.RepairRecordId = repair.RepairRecordId;
newRepair.RepairRecordCode = repair.RepairRecordCode;
newRepair.ProjectId = repair.ProjectId;
newRepair.UnitId = repair.UnitId;
newRepair.InstallationId = repair.InstallationId;
newRepair.WorkAreaId = repair.WorkAreaId;
newRepair.NoticeDate = repair.NoticeDate;
newRepair.NDEItemID = repair.NDEItemID;
newRepair.WeldJointId = repair.WeldJointId;
newRepair.DetectionTypeId = repair.DetectionTypeId;
newRepair.RepairLocation = repair.RepairLocation;
newRepair.WelderId = repair.WelderId;
newRepair.RepairMark = repair.RepairMark;
newRepair.CheckDefects = repair.CheckDefects;
newRepair.RepairWelder = repair.RepairWelder;
newRepair.RepairDate = repair.RepairDate;
newRepair.PhotoUrl = repair.PhotoUrl;
newRepair.Ex_ToPointBatchItemId = repair.Ex_ToPointBatchItemId;
using (Model.HJGLDB db = new Model.HJGLDB(Funs.ConnString))
{
db.Repair_RepairRecord.InsertOnSubmit(newRepair);
db.SubmitChanges();
Model.Repair_RepairRecord newRepair = new Model.Repair_RepairRecord();
newRepair.RepairRecordId = repair.RepairRecordId;
newRepair.RepairRecordCode = repair.RepairRecordCode;
newRepair.ProjectId = repair.ProjectId;
newRepair.UnitId = repair.UnitId;
newRepair.InstallationId = repair.InstallationId;
newRepair.WorkAreaId = repair.WorkAreaId;
newRepair.NoticeDate = repair.NoticeDate;
newRepair.NDEItemID = repair.NDEItemID;
newRepair.WeldJointId = repair.WeldJointId;
newRepair.DetectionTypeId = repair.DetectionTypeId;
newRepair.RepairLocation = repair.RepairLocation;
newRepair.WelderId = repair.WelderId;
newRepair.RepairMark = repair.RepairMark;
newRepair.CheckDefects = repair.CheckDefects;
newRepair.RepairWelder = repair.RepairWelder;
newRepair.RepairDate = repair.RepairDate;
newRepair.PhotoUrl = repair.PhotoUrl;
newRepair.Ex_ToPointBatchItemId = repair.Ex_ToPointBatchItemId;
db.Repair_RepairRecord.InsertOnSubmit(newRepair);
db.SubmitChanges();
}
}
public static void UpdateRepairRecord(Model.Repair_RepairRecord repair)
@@ -68,6 +68,7 @@ namespace BLL
newDataInTemp.Value36 = dataInTemp.Value36;
newDataInTemp.Value37 = dataInTemp.Value37;
newDataInTemp.Value38 = dataInTemp.Value38;
newDataInTemp.Value39 = dataInTemp.Value39;
newDataInTemp.ToopValue = dataInTemp.ToopValue;
db.Sys_DataInTemp.InsertOnSubmit(newDataInTemp);
db.SubmitChanges();
@@ -123,6 +124,7 @@ namespace BLL
newDataInTemp.Value36 = dataInTemp.Value36;
newDataInTemp.Value37 = dataInTemp.Value37;
newDataInTemp.Value38 = dataInTemp.Value38;
newDataInTemp.Value39 = dataInTemp.Value39;
newDataInTemp.ToopValue = dataInTemp.ToopValue;
try
{
@@ -142,6 +142,13 @@ namespace BLL
db.SubmitChanges();
}
public static List<Model.PTP_PipelineList> getPipelineListByPTP_ID(string PTP_ID)
{
Model.HJGLDB db = Funs.DB;
var view = (from x in db.PTP_PipelineList where x.PTP_ID == PTP_ID select x).ToList();
return view;
}
/// <summary>
/// 根据主键删除试压信息明细
/// </summary>
@@ -156,7 +163,31 @@ namespace BLL
db.SubmitChanges();
}
}
/// <summary>
/// 根据试压包和区域主键删除试压信息明细
/// </summary>
/// <param name="testPackageID"></param>
/// <param name="workAreaId"></param>
public static void DeletePipelineListByPTP_IDAndWorkAreaId(string testPackageID,string workAreaId)
{
Model.HJGLDB db = Funs.DB;
var testPackage = from x in db.PTP_PipelineList where x.PTP_ID == testPackageID && x.WorkAreaId==workAreaId select x;
if (testPackage != null)
{
db.PTP_PipelineList.DeleteAllOnSubmit(testPackage);
db.SubmitChanges();
}
}
public static void DeletePipelineListByPT_PipeId(string PT_PipeId)
{
Model.HJGLDB db = Funs.DB;
var testPackage = from x in db.PTP_PipelineList where x.PT_PipeId == PT_PipeId select x;
if (testPackage != null)
{
db.PTP_PipelineList.DeleteAllOnSubmit(testPackage);
db.SubmitChanges();
}
}
/// <summary>
/// 增加试压信息明细
/// </summary>
@@ -176,7 +207,19 @@ namespace BLL
db.PTP_PipelineList.InsertOnSubmit(newPipelineList);
db.SubmitChanges();
}
public static bool IsPipelineListExists(string PTP_ID, string PipelineId)
{
Model.HJGLDB db = Funs.DB;
var pipelineList = from x in db.PTP_PipelineList where x.PTP_ID == PTP_ID && x.PipelineId == PipelineId select x;
if (pipelineList.Count() > 0)
{
return true;
}
else
{
return false;
}
}
/// <summary>
/// 根据单位获取试压
/// </summary>
@@ -55,59 +55,123 @@ namespace BLL
/// <param name="weldJoint"></param>
public static void AddWeldJoint(Model.Pipeline_WeldJoint weldJoint)
{
Model.HJGLDB db = Funs.DB;
Model.Pipeline_WeldJoint newWeldJoint = new Model.Pipeline_WeldJoint
using (Model.HJGLDB db = new Model.HJGLDB(Funs.ConnString))
{
WeldJointId = SQLHelper.GetNewID(typeof(Model.Pipeline_WeldJoint)),
ProjectId = weldJoint.ProjectId,
PipelineId = weldJoint.PipelineId,
WeldJointCode = weldJoint.WeldJointCode,
WeldTypeId = weldJoint.WeldTypeId,
Material1Id = weldJoint.Material1Id,
Material2Id = weldJoint.Material2Id,
Thickness = weldJoint.Thickness,
Dia = weldJoint.Dia,
Size = weldJoint.Size,
JointAttribute = weldJoint.JointAttribute,
JointArea = weldJoint.JointArea,
WeldingMethodId = weldJoint.WeldingMethodId,
IsHotProess = weldJoint.IsHotProess,
WeldingLocationId = weldJoint.WeldingLocationId,
WeldMatId = weldJoint.WeldMatId,
WeldSilkId = weldJoint.WeldSilkId,
GrooveTypeId = weldJoint.GrooveTypeId,
PipeSegment = weldJoint.PipeSegment,
PipeAssembly1Id = weldJoint.PipeAssembly1Id,
PipeAssembly2Id = weldJoint.PipeAssembly2Id,
PipeAssemblyCount = weldJoint.PipeAssemblyCount,
HeartNo1 = weldJoint.HeartNo1,
HeartNo2 = weldJoint.HeartNo2,
LastTemp = weldJoint.LastTemp,
CellTemp = weldJoint.CellTemp,
PrepareTemp = weldJoint.PrepareTemp,
Electricity = weldJoint.Electricity,
Voltage = weldJoint.Voltage,
TestPackageNo = weldJoint.TestPackageNo,
WeldingDailyCode = weldJoint.WeldingDailyCode,
BackingWelderId = weldJoint.BackingWelderId,
CoverWelderId = weldJoint.CoverWelderId,
WeldingDailyId = weldJoint.WeldingDailyId,
PipingClassId = weldJoint.PipingClassId,
Specification = weldJoint.Specification,
DoneDin = weldJoint.DoneDin,
SystemNumber = weldJoint.SystemNumber,
Remark = weldJoint.Remark,
IsGoldJoint = weldJoint.IsGoldJoint,
IsPMI=weldJoint.IsPMI,
WPQId = weldJoint.WPQId,
DetectionType = weldJoint.DetectionType,
PageNum = weldJoint.PageNum,
ANSISCH = weldJoint.ANSISCH
Model.Pipeline_WeldJoint newWeldJoint = new Model.Pipeline_WeldJoint
{
WeldJointId = SQLHelper.GetNewID(typeof(Model.Pipeline_WeldJoint)),
ProjectId = weldJoint.ProjectId,
PipelineId = weldJoint.PipelineId,
WeldJointCode = weldJoint.WeldJointCode,
WeldTypeId = weldJoint.WeldTypeId,
Material1Id = weldJoint.Material1Id,
Material2Id = weldJoint.Material2Id,
Thickness = weldJoint.Thickness,
Dia = weldJoint.Dia,
Size = weldJoint.Size,
JointAttribute = weldJoint.JointAttribute,
JointArea = weldJoint.JointArea,
WeldingMethodId = weldJoint.WeldingMethodId,
IsHotProess = weldJoint.IsHotProess,
WeldingLocationId = weldJoint.WeldingLocationId,
WeldMatId = weldJoint.WeldMatId,
WeldSilkId = weldJoint.WeldSilkId,
GrooveTypeId = weldJoint.GrooveTypeId,
PipeSegment = weldJoint.PipeSegment,
PipeAssembly1Id = weldJoint.PipeAssembly1Id,
PipeAssembly2Id = weldJoint.PipeAssembly2Id,
PipeAssemblyCount = weldJoint.PipeAssemblyCount,
HeartNo1 = weldJoint.HeartNo1,
HeartNo2 = weldJoint.HeartNo2,
LastTemp = weldJoint.LastTemp,
CellTemp = weldJoint.CellTemp,
PrepareTemp = weldJoint.PrepareTemp,
Electricity = weldJoint.Electricity,
Voltage = weldJoint.Voltage,
TestPackageNo = weldJoint.TestPackageNo,
WeldingDailyCode = weldJoint.WeldingDailyCode,
BackingWelderId = weldJoint.BackingWelderId,
CoverWelderId = weldJoint.CoverWelderId,
WeldingDailyId = weldJoint.WeldingDailyId,
PipingClassId = weldJoint.PipingClassId,
Specification = weldJoint.Specification,
DoneDin = weldJoint.DoneDin,
SystemNumber = weldJoint.SystemNumber,
Remark = weldJoint.Remark,
IsGoldJoint = weldJoint.IsGoldJoint,
IsPMI = weldJoint.IsPMI,
WPQId = weldJoint.WPQId,
DetectionType = weldJoint.DetectionType,
PageNum = weldJoint.PageNum,
ANSISCH = weldJoint.ANSISCH,
IsBracket = weldJoint.IsBracket,
};
};
db.Pipeline_WeldJoint.InsertOnSubmit(newWeldJoint);
db.SubmitChanges();
db.Pipeline_WeldJoint.InsertOnSubmit(newWeldJoint);
db.SubmitChanges();
}
}
public static string AddWeldJointRef(Model.Pipeline_WeldJoint weldJoint )
{ string weldJointId = "";
using (Model.HJGLDB db = new Model.HJGLDB(Funs.ConnString))
{
Model.Pipeline_WeldJoint newWeldJoint = new Model.Pipeline_WeldJoint
{
WeldJointId = SQLHelper.GetNewID(typeof(Model.Pipeline_WeldJoint)),
ProjectId = weldJoint.ProjectId,
PipelineId = weldJoint.PipelineId,
WeldJointCode = weldJoint.WeldJointCode,
WeldTypeId = weldJoint.WeldTypeId,
Material1Id = weldJoint.Material1Id,
Material2Id = weldJoint.Material2Id,
Thickness = weldJoint.Thickness,
Dia = weldJoint.Dia,
Size = weldJoint.Size,
JointAttribute = weldJoint.JointAttribute,
JointArea = weldJoint.JointArea,
WeldingMethodId = weldJoint.WeldingMethodId,
IsHotProess = weldJoint.IsHotProess,
WeldingLocationId = weldJoint.WeldingLocationId,
WeldMatId = weldJoint.WeldMatId,
WeldSilkId = weldJoint.WeldSilkId,
GrooveTypeId = weldJoint.GrooveTypeId,
PipeSegment = weldJoint.PipeSegment,
PipeAssembly1Id = weldJoint.PipeAssembly1Id,
PipeAssembly2Id = weldJoint.PipeAssembly2Id,
PipeAssemblyCount = weldJoint.PipeAssemblyCount,
HeartNo1 = weldJoint.HeartNo1,
HeartNo2 = weldJoint.HeartNo2,
LastTemp = weldJoint.LastTemp,
CellTemp = weldJoint.CellTemp,
PrepareTemp = weldJoint.PrepareTemp,
Electricity = weldJoint.Electricity,
Voltage = weldJoint.Voltage,
TestPackageNo = weldJoint.TestPackageNo,
WeldingDailyCode = weldJoint.WeldingDailyCode,
BackingWelderId = weldJoint.BackingWelderId,
CoverWelderId = weldJoint.CoverWelderId,
WeldingDailyId = weldJoint.WeldingDailyId,
PipingClassId = weldJoint.PipingClassId,
Specification = weldJoint.Specification,
DoneDin = weldJoint.DoneDin,
SystemNumber = weldJoint.SystemNumber,
Remark = weldJoint.Remark,
IsGoldJoint = weldJoint.IsGoldJoint,
IsPMI = weldJoint.IsPMI,
WPQId = weldJoint.WPQId,
DetectionType = weldJoint.DetectionType,
PageNum = weldJoint.PageNum,
ANSISCH = weldJoint.ANSISCH
};
db.Pipeline_WeldJoint.InsertOnSubmit(newWeldJoint);
db.SubmitChanges();
weldJointId = newWeldJoint.WeldJointId;
}
return weldJointId;
}
/// <summary>
@@ -163,7 +227,8 @@ namespace BLL
newWeldJoint.WPQId = weldJoint.WPQId;
newWeldJoint.DetectionType = weldJoint.DetectionType;
newWeldJoint.PageNum = weldJoint.PageNum;
newWeldJoint.ANSISCH = weldJoint.ANSISCH;
newWeldJoint.ANSISCH = weldJoint.ANSISCH;
newWeldJoint.IsBracket = weldJoint.IsBracket;
db.SubmitChanges();
}
}
@@ -213,6 +278,7 @@ namespace BLL
newWeldJoint.DetectionType = weldJoint.DetectionType;
newWeldJoint.PageNum = weldJoint.PageNum;
newWeldJoint.ANSISCH = weldJoint.ANSISCH;
newWeldJoint.IsBracket = weldJoint.IsBracket;
db.SubmitChanges();
}
}
@@ -252,10 +318,8 @@ namespace BLL
{
newWeldJoint.WeldingLocationId = weldJoint.WeldingLocationId;
}
if (!string.IsNullOrEmpty(weldJoint.WeldMatId))
{
newWeldJoint.WeldMatId = weldJoint.WeldMatId;
}
newWeldJoint.WeldMatId = weldJoint.WeldMatId;
if (!string.IsNullOrEmpty(weldJoint.WeldSilkId))
{
newWeldJoint.WeldSilkId = weldJoint.WeldSilkId;
@@ -338,6 +402,8 @@ namespace BLL
newWeldJoint.IsGoldJoint = weldJoint.IsGoldJoint;
newWeldJoint.WPQId = weldJoint.WPQId;
newWeldJoint.DetectionType = weldJoint.DetectionType;
newWeldJoint.IsBracket = weldJoint.IsBracket;
if (!string.IsNullOrEmpty(weldJoint.PageNum))
{
newWeldJoint.PageNum = weldJoint.PageNum;