ningshuxia
昨天 71c12ff40d58c3dbdde6867396dd99224e57fc32
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
using Yw.Vmo;
 
namespace HStation.WinFrmUI
{
    public class BimfaceFileStateHelper
    {
        //查找项目是否存在模型
        public static async Task<BimfaceFileVmo> IsHaveBimFace(long ProjectID)
        {
            var projectSite = await BLLFactory<HStation.BLL.XhsProjectSite>.Instance.GetDefaultByProjectID(ProjectID);
            if (projectSite == null)
            {
                return null;
            }
            var relation = await BLLFactory<Yw.BLL.BimfaceFileRelation>.Instance
               .GetDefaultByObjectTypeAndObjectIDOfPurpose(HStation.Xhs.DataType.XhsProjectSite, projectSite.ID, Yw.Bimface.Purpose.Simulation);
            if (relation == null)
            {
                return null;
            }
            var bimfaceFile = await BLLFactory<Yw.BLL.BimfaceFile>.Instance.GetByID(relation.BimfaceFileID);
            if (bimfaceFile == null)
            {
                return null;
            }
            return bimfaceFile;
        }
    }
}