This commit is contained in:
2026-02-10 15:41:06 +08:00
parent 51d772994f
commit 31be7ae4b8
183 changed files with 29172 additions and 9245 deletions
+28 -3
View File
@@ -63,13 +63,38 @@ namespace BLL
public static Model.Editor_TDC GetTDCByEprojectId(string eProjectId, string type)
{
var q = (from x in Funs.DB.Editor_TDC where x.EProjectId == eProjectId && x.Type == type select x).ToList();
if (q.Count > 1)
if (q.Count > 0)
{
return (from x in Funs.DB.Editor_TDC where x.EProjectId == eProjectId && x.Type == type && x.Disc == "00_ALL" orderby x.ReceiveHC descending select x).FirstOrDefault();
if (type == "D02_AS-BUILT" || type == "D03_MD")
{
var qq = (from x in Funs.DB.Editor_TDC
where x.EProjectId == eProjectId && x.Type == type && !x.Disc.Contains("00_ALL")
select x).ToList();
if (qq.Count > 0)
{
return (from x in Funs.DB.Editor_TDC where x.EProjectId == eProjectId && x.Type == type && !x.Disc.Contains("00_ALL") orderby x.ReceivePDF descending select x).FirstOrDefault();
}
else
{
return (from x in Funs.DB.Editor_TDC where x.EProjectId == eProjectId && x.Type == type select x).FirstOrDefault();
}
}
else if (type == "D11_MC" || type == "D30_FC")
{
return (from x in Funs.DB.Editor_TDC where x.EProjectId == eProjectId && x.Type == type && x.Disc == "00_ALL" orderby x.ReceiveHC descending select x).FirstOrDefault();
}
else if (type == "D12_RFSU")
{
return (from x in Funs.DB.Editor_TDC where x.EProjectId == eProjectId && x.Type == type && !x.Disc.Contains("00_ALL") orderby x.ReceiveHC descending select x).FirstOrDefault();
}
else
{
return null;
}
}
else
{
return (from x in Funs.DB.Editor_TDC where x.EProjectId == eProjectId && x.Type == type orderby x.ReceiveHC descending select x).FirstOrDefault();
return null;
}
}