年度变更建库软件5.0版本
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

66 lines
2.8 KiB

using ESRI.ArcGIS.Geodatabase;
using KGIS.Framework.Utils;
using KGIS.Framework.Utils.ExtensionMethod;
using Kingo.RuleCheck;
using System.Collections.Generic;
using System.Data;
using System.Windows.Controls;
namespace Kingo.Plugin.General.Helper
{
#region 陕西-单图斑加载细节需求处理
public class DataOperationHelper_61 : DataOperationHelper_Default
{
public DataOperationHelper_61(TreeView _tvPackges) : base(_tvPackges)
{ }
#region DTBCheckPackage
public override List<RuleEntity> DTBCheckPackage(object obj)
{
List<RuleEntity> CheckResultsTemp = new List<RuleEntity>();
IFeature feature = null;
try
{
#region 陕西代码需求-矢量数据质检-仅注释不删除
if (CurrentSelectNode != null && CurrentSelectNode.NodeLevel == 2 && CurrentSelectNode.Data is DataRow)
{
foreach (var item in CurrentSelectNode.Nodes)
{
feature = DtbFeatureLayer.FeatureClass.GetFeature(item.NodeID.ToInt());
List<RuleEntity> ruleEntities = RuleCheck.XJRuleCheck.RuleCheckOpertion_DTB.StartXJSHCheck(feature, null);
CheckResultsTemp.AddRange(ruleEntities);
if (ruleEntities != null)
item.PackageState = ruleEntities.Count > 0 ? "质检错误" : "已完成";
}
CurrentSelectNode.PackageState = GetNodesJCZT(CurrentSelectNode);
return CheckResultsTemp;
}
else if (CurrentSelectNode != null && CurrentSelectNode.NodeLevel == 3 && CurrentSelectNode.ParentNode.Data is DataRow)
{
foreach (var item in CurrentSelectNode.ParentNode.Nodes)
{
feature = DtbFeatureLayer.FeatureClass.GetFeature(item.NodeID.ToInt());
List<RuleEntity> ruleEntities = RuleCheck.XJRuleCheck.RuleCheckOpertion_DTB.StartXJSHCheck(feature, null);
CheckResultsTemp.AddRange(ruleEntities);
if (ruleEntities != null)
item.PackageState = ruleEntities.Count > 0 ? "质检错误" : "已完成";
}
CurrentSelectNode.ParentNode.PackageState = GetNodesJCZT(CurrentSelectNode.ParentNode);
return CheckResultsTemp;
}
#endregion
}
catch (System.Exception ex)
{
LogAPI.Debug("DTBCheckPackage异常:" + ex.Message);
LogAPI.Debug("DTBCheckPackage异常:" + ex.StackTrace);
throw ex;
}
return CheckResultsTemp;
}
#endregion
}
#endregion
}