1
This commit is contained in:
@@ -76,19 +76,31 @@ namespace FineUIPro.Web.HJGL.JoinMarking
|
||||
UnitName = Funs.DB.Base_Unit.FirstOrDefault(x => x.UnitId == iso.BSU_ID)?.UnitName;
|
||||
}
|
||||
|
||||
var jotids = Funs.DB.HJGL_PW_JointInfo.Where(x => x.ISO_ID == ISO_ID && x.AttachSourceId == FileId).Select(x => x.JOT_ID).ToList();
|
||||
|
||||
string sqlData = @"select a.JOT_ID ,a.JOT_JointNo,c.WED_Code,JOT_Location,b.JOT_WeldDate ,'/' DetectionTypeCode ,'/' IsRepair,'/' IsHotProcess,x,y,x2,y2
|
||||
string sqlData = @"select a.JOT_ID ,a.JOT_JointNo,
|
||||
(case when cellWelder.WED_Code is not null and floorWelder.WED_Code is not null
|
||||
and cellWelder.WED_Code <> floorWelder.WED_Code
|
||||
then cellWelder.WED_Code + '/' + floorWelder.WED_Code
|
||||
else coalesce(cellWelder.WED_Code, floorWelder.WED_Code, '') end) WED_Code,
|
||||
JOT_Location,b.JOT_WeldDate ,'/' DetectionTypeCode ,'/' IsRepair,'/' IsHotProcess,x,y,x2,y2
|
||||
,(case a.JOT_JointStatus
|
||||
when '100' then '正常'
|
||||
when '102' then '扩透'
|
||||
when '101' then '点口'
|
||||
when '104' then '已切除' end) as JOT_JointStatus from HJGL_PW_JointInfo a
|
||||
left join HJGL_BO_WeldReportMain b on a.DReportID=b.DReportID
|
||||
left join HJGL_bs_welder AS c ON a.JOT_FloorWelder = c.wed_id
|
||||
WHERE a.ProjectId = @ProjectId and a.JOT_ID in ('" + string.Join("','", jotids) + "') ";
|
||||
SqlParameter[] parameter1 = new SqlParameter[] { new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId) };
|
||||
left join HJGL_BO_WeldReportMain b on a.DReportID=b.DReportID
|
||||
left join HJGL_bs_welder cellWelder on a.JOT_CellWelder = cellWelder.WED_ID
|
||||
left join HJGL_bs_welder floorWelder on a.JOT_FloorWelder = floorWelder.WED_ID
|
||||
where a.ProjectId = @ProjectId and a.ISO_ID = @IsoId";
|
||||
SqlParameter[] parameter1 = new SqlParameter[]
|
||||
{
|
||||
new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId),
|
||||
new SqlParameter("@IsoId", ISO_ID)
|
||||
};
|
||||
DataTable tb1 = SQLHelper.GetDataTableRunText(sqlData, parameter1);
|
||||
List<string> jotids = tb1.Rows.Cast<DataRow>()
|
||||
.Select(x => x["JOT_ID"].ToString())
|
||||
.ToList();
|
||||
|
||||
string sqlTrust = @"select a.JOT_ID, c.DetectionTypeCode,b.CH_TrustType from CH_TrustItem AS a
|
||||
LEFT JOIN CH_Trust AS b ON a.CH_TrustID = b.CH_TrustID
|
||||
@@ -132,42 +144,17 @@ namespace FineUIPro.Web.HJGL.JoinMarking
|
||||
}
|
||||
}
|
||||
}
|
||||
if (tb1 != null)
|
||||
foreach (DataRow row in tb1.Rows)
|
||||
{
|
||||
foreach (DataRow row in tb1.Rows)
|
||||
{
|
||||
string JOT_ID = row["JOT_ID"].ToString();
|
||||
if (DetectionTypeDic.ContainsKey(JOT_ID))
|
||||
{
|
||||
row["DetectionTypeCode"] = DetectionTypeDic[JOT_ID];
|
||||
}
|
||||
else
|
||||
{
|
||||
row["DetectionTypeCode"] = "/";
|
||||
}
|
||||
if (TrustTypeDic.ContainsKey(JOT_ID))
|
||||
{
|
||||
row["IsRepair"] = "是";
|
||||
}
|
||||
else
|
||||
{
|
||||
row["IsRepair"] = "/";
|
||||
}
|
||||
if (HotProessDic.ContainsKey(JOT_ID))
|
||||
{
|
||||
row["IsHotProcess"] ="是";
|
||||
}
|
||||
else
|
||||
{
|
||||
row["IsHotProcess"] = "/";
|
||||
}
|
||||
}
|
||||
string JOT_ID = row["JOT_ID"].ToString();
|
||||
string detectionType;
|
||||
row["DetectionTypeCode"] = DetectionTypeDic.TryGetValue(JOT_ID, out detectionType)
|
||||
? detectionType : "/";
|
||||
row["IsRepair"] = TrustTypeDic.ContainsKey(JOT_ID) ? "是" : "/";
|
||||
row["IsHotProcess"] = HotProessDic.ContainsKey(JOT_ID) ? "是" : "/";
|
||||
}
|
||||
|
||||
annotionData.Value = ExtendDrawingJson(annotionData.Value, tb1);
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user