12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- /*-------------------------------------------------------------------------
- * 功能描述:GplotSystemCheckManager
- * 作者:xulisong
- * 创建时间: 2019/2/28 11:43:24
- * 版本号:v1.0
- * -------------------------------------------------------------------------*/
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using Autodesk.Revit.DB;
- namespace SAGA.GplotRelationComputerManage.SystemChecks
- {
- public class GplotSystemCheckManager
- {
- public static void CheckSystem(List<Document> documents,List<string> gplotTypeSystems)
- {
- if (gplotTypeSystems == null || !gplotTypeSystems.Any())
- return;
- if (documents == null || !documents.Any())
- return;
- GplotSystemCheckContext context = new GplotSystemCheckContext();
- context.Relations.AddRange(gplotTypeSystems);
- foreach (var document in documents)
- {
- var floorItem = new FloorCheckItem(document);
- floorItem.Parse(context);
- }
- //向数据库提交信息
- }
- public static SystemCheckReportItem GetCacheCheckSystemResult(Document document, string gplotType)
- {
- /*
- * 判断数据库中是否存在;存在直接查询数据库返回;不存在的话进行检测,再返回
- */
- return GetCheckSystemResult(document, gplotType);
- }
- public static SystemCheckReportItem GetCheckSystemResult(Document document, string gplotType)
- {
- CheckSystem(new List<Document>() { document }, new List<string>() { gplotType });
- return new SystemCheckReportItem();
- }
- }
- }
|