|
|
|
|
using KGIS.Framework.Utils;
|
|
|
|
|
using Kingo.PluginServiceInterface;
|
|
|
|
|
using Kingo.PluginServiceInterface.Model;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.IO;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using System.Xml.Linq;
|
|
|
|
|
|
|
|
|
|
namespace KDataCheck
|
|
|
|
|
{
|
|
|
|
|
class Program
|
|
|
|
|
{
|
|
|
|
|
[STAThread]
|
|
|
|
|
static void Main(string[] args)
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
if (!KGIS.Framework.AE.AELicense.AoInit())
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
//args = new string[] { "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iZ2IyMzEyIj8+PElER1BhcmFtZXRlciB4bWxuczp4c2k9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hLWluc3RhbmNlIiB4bWxuczp4c2Q9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hIj48U3RyUHJvakluZm8+Rzpc5bel5L2cXOW5tOW6puWPmOabtOiwg+afpVzlt6XkvZznm67lvZVc6IKH5Lic5biCKDIzMTI4Milc5bel56iL55uu5b2VXOiCh+S4nDEyMTItMVzogofkuJwxMjEyLTEuS0JHPC9TdHJQcm9qSW5mbz48RXhlRExUQj5mYWxzZTwvRXhlRExUQj48RXhlR0REQj5mYWxzZTwvRXhlR0REQj48RXhlQ0pEQ1E+ZmFsc2U8L0V4ZUNKRENRPjxFeGVYWlE+ZmFsc2U8L0V4ZVhaUT48RXhlQ1pDPmZhbHNlPC9FeGVDWkM+PEV4ZVpMSFo+ZmFsc2U8L0V4ZVpMSFo+PENoZWNrVHlwZT5CR0RCPC9DaGVja1R5cGU+PC9J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zosaHlsbHljr8oMzMwMjI1KVzlt6XnqIvnm67lvZVcMDMzMF8xXEJHVEouc3FsaXRlPC9QcmpEYlBhdGg+PC9JREdQYXJhbWV0ZXI+" };
|
|
|
|
|
byte[] base64ToByte = Convert.FromBase64String(args[0]);
|
|
|
|
|
string strParm = Encoding.UTF8.GetString(base64ToByte);
|
|
|
|
|
IDGParameter gPParamClass = SerializeAPI.DeserializeToObject<IDGParameter>(strParm);
|
|
|
|
|
if (gPParamClass == null)
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(gPParamClass.StrProjInfo) && File.Exists(gPParamClass.StrProjInfo))
|
|
|
|
|
{
|
|
|
|
|
gPParamClass.PrjInfo = ProjectInfo.OpenProject(gPParamClass.StrProjInfo);
|
|
|
|
|
if (gPParamClass.PrjInfo == null)
|
|
|
|
|
{
|
|
|
|
|
Console.WriteLine("Err:获取工程信息失败!");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Dictionary<string, decimal> _kcxsDic = new Dictionary<string, decimal>();//《字符串-数字》字典集合
|
|
|
|
|
string strPath = SysAppPath.GetBGGDLXConfigPath();//获取配置文件路径
|
|
|
|
|
XDocument xDoc = XDocument.Load(strPath);
|
|
|
|
|
foreach (XElement xElement in xDoc.Descendants("Item"))
|
|
|
|
|
{
|
|
|
|
|
string gdlx = xElement.Attributes("GDLX").Single().Value;
|
|
|
|
|
string gdpdjb = xElement.Attributes("GDPDJB").Single().Value;
|
|
|
|
|
string strKcdlxs = xElement.Attributes("KCDLXS").Single().Value;
|
|
|
|
|
decimal kcdlxs = Convert.ToDecimal(xElement.Attributes("KCDLXS").Single().Value == "" ? "0" : xElement.Attributes("KCDLXS").Single().Value);
|
|
|
|
|
string key = string.Format("{0}-{1}", gdlx, gdpdjb);
|
|
|
|
|
_kcxsDic.Add(key, kcdlxs);
|
|
|
|
|
}
|
|
|
|
|
gPParamClass.KCXSDic = _kcxsDic;
|
|
|
|
|
if (gPParamClass.PrjInfo.ListZLXXInfo == null)
|
|
|
|
|
gPParamClass.PrjInfo.ListZLXXInfo = new System.Collections.ObjectModel.ObservableCollection<Kingo.PluginServiceInterface.ZLXXInfo>();
|
|
|
|
|
|
|
|
|
|
DataCheckHelper helper = new DataCheckHelper();
|
|
|
|
|
helper.ZLDataCheck(gPParamClass);
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
Console.WriteLine("Err:" + ex.ToString());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|