|
|
|
|
using KGIS.Framework.DBOperator;
|
|
|
|
|
using KGIS.Framework.Maps;
|
|
|
|
|
using KGIS.Framework.Utils;
|
|
|
|
|
using KGIS.Framework.Utils.ExtensionMethod;
|
|
|
|
|
using KGIS.Framework.Utils.Helper;
|
|
|
|
|
using Kingo.PluginServiceInterface;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Data;
|
|
|
|
|
using System.IO;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
|
|
|
|
namespace Kingo.Plugin.BGResultManager.Utility
|
|
|
|
|
{
|
|
|
|
|
public class CreateBGBasicStatisticsTable
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
public DataTable dt_DealWithBGJCTJB_WithOutNullOrEmpty = new DataTable();
|
|
|
|
|
|
|
|
|
|
public void ToCreateBGBasicStatisticsTable()
|
|
|
|
|
{
|
|
|
|
|
DateTime dTimeStart = DateTime.Now;
|
|
|
|
|
|
|
|
|
|
BGReportBasicOperate iBGReportBasicOperate = new BGReportBasicOperate();
|
|
|
|
|
|
|
|
|
|
IRDBHelper rdbHelper = null;
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
ProjectInfo ProInfo = MapsManager.Instance.MapService.GetProjectInfo() as ProjectInfo;
|
|
|
|
|
if (ProInfo == null)
|
|
|
|
|
{
|
|
|
|
|
MessageHelper.Show("请先打开要统计的工程");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
string sProjDBPath = ProInfo.GetProjFilePath();
|
|
|
|
|
if (string.IsNullOrWhiteSpace(sProjDBPath) == true)
|
|
|
|
|
{
|
|
|
|
|
MessageHelper.Show("工程信息地址获取失败,无法输出报表!");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
string dbPath = System.IO.Path.GetDirectoryName(sProjDBPath) + "\\BGTJ.sqlite";
|
|
|
|
|
if (File.Exists(dbPath) == false)
|
|
|
|
|
{
|
|
|
|
|
MessageHelper.Show("变更信息未能记录成功,故信息生成失败");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
rdbHelper = RDBFactory.CreateDbHelper("Data Source=" + dbPath, DatabaseType.SQLite);
|
|
|
|
|
|
|
|
|
|
rdbHelper.ExecuteSQL(@" create table BGYLB_Temp as select * from BGYLB ");
|
|
|
|
|
string sSQL_GetBGJCTJB_WithNullOrEmpty = string.Format(iBGReportBasicOperate.sSQL_GroupBySelect_BGYLB, "BGYLB_Temp");
|
|
|
|
|
DataTable dtBGJCTJB_WithNullOrEmpty = rdbHelper.ExecuteDatatable("GetBGJCTJB_WithNullOrEmpty", sSQL_GetBGJCTJB_WithNullOrEmpty, true);
|
|
|
|
|
if (dtBGJCTJB_WithNullOrEmpty == null || dtBGJCTJB_WithNullOrEmpty.Rows.Count <= 0)
|
|
|
|
|
{
|
|
|
|
|
LogAPI.Debug("未能获取到 变更一览表信息,故 生成 变更基础统计表 失败 ; ");
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
#region 有 变更一览表信息
|
|
|
|
|
//处理成空,为实现 ’’(空字符串)与NULL,均被视作“空”,因此将作为同一个分组;
|
|
|
|
|
string sNeedDealWithNullOrEmptyFields = iBGReportBasicOperate.sNeedDealWithFields_NullOrEmpty;
|
|
|
|
|
|
|
|
|
|
dt_DealWithBGJCTJB_WithOutNullOrEmpty = new DataTable();
|
|
|
|
|
dt_DealWithBGJCTJB_WithOutNullOrEmpty = dtBGJCTJB_WithNullOrEmpty;
|
|
|
|
|
DealWith_TablesFields_WithOutNullOrEmpty(sNeedDealWithNullOrEmptyFields);
|
|
|
|
|
DataTable dtBGJCTJB_WithOutNullOrEmpty = dt_DealWithBGJCTJB_WithOutNullOrEmpty;
|
|
|
|
|
|
|
|
|
|
if (dtBGJCTJB_WithOutNullOrEmpty == null || dtBGJCTJB_WithOutNullOrEmpty.Rows.Count <= 0)
|
|
|
|
|
{
|
|
|
|
|
LogAPI.Debug("变更基础统计表临时表信息数据为空,故 未能生成 变更基础统计表 ; ");
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
//将数据插入成一个新的表
|
|
|
|
|
#region 将数据插入成一个新的表
|
|
|
|
|
rdbHelper.ExecuteSQL(@" Drop Table BGJCTJB_WithOutNullOrEmpty ");
|
|
|
|
|
string sSQL_Create_BGJCTJB_WithOutNullOrEmpty = string.Format(iBGReportBasicOperate.sSQL_Create_BGJCTJB, "BGJCTJB_WithOutNullOrEmpty");
|
|
|
|
|
rdbHelper.ExecuteSQL(sSQL_Create_BGJCTJB_WithOutNullOrEmpty);
|
|
|
|
|
for (int m = 0; m < dtBGJCTJB_WithOutNullOrEmpty.Rows.Count; m++)
|
|
|
|
|
{
|
|
|
|
|
//后期可以用一个语句执行所有的
|
|
|
|
|
rdbHelper.ExecuteSQL(
|
|
|
|
|
string.Format(
|
|
|
|
|
iBGReportBasicOperate.sSQL_Insert_BGJCTJB,
|
|
|
|
|
"BGJCTJB_WithOutNullOrEmpty",
|
|
|
|
|
dtBGJCTJB_WithOutNullOrEmpty.Rows[m]["BGQDLBM"], dtBGJCTJB_WithOutNullOrEmpty.Rows[m]["BGQQSXZ"], dtBGJCTJB_WithOutNullOrEmpty.Rows[m]["BGQZLDWDM"],
|
|
|
|
|
dtBGJCTJB_WithOutNullOrEmpty.Rows[m]["BGQGDLX"], dtBGJCTJB_WithOutNullOrEmpty.Rows[m]["BGQGDPDJB"], dtBGJCTJB_WithOutNullOrEmpty.Rows[m]["BGQTBXHDM"],
|
|
|
|
|
dtBGJCTJB_WithOutNullOrEmpty.Rows[m]["BGQZZSXDM"], dtBGJCTJB_WithOutNullOrEmpty.Rows[m]["BGQCZCSXM"], dtBGJCTJB_WithOutNullOrEmpty.Rows[m]["BGQMSSM"],
|
|
|
|
|
|
|
|
|
|
dtBGJCTJB_WithOutNullOrEmpty.Rows[m]["BGHDLBM"], dtBGJCTJB_WithOutNullOrEmpty.Rows[m]["BGHQSXZ"], dtBGJCTJB_WithOutNullOrEmpty.Rows[m]["BGHZLDWDM"],
|
|
|
|
|
dtBGJCTJB_WithOutNullOrEmpty.Rows[m]["BGHGDLX"], dtBGJCTJB_WithOutNullOrEmpty.Rows[m]["BGHGDPDJB"], dtBGJCTJB_WithOutNullOrEmpty.Rows[m]["BGHTBXHDM"],
|
|
|
|
|
dtBGJCTJB_WithOutNullOrEmpty.Rows[m]["BGHZZSXDM"], dtBGJCTJB_WithOutNullOrEmpty.Rows[m]["BGHCZCSXM"], dtBGJCTJB_WithOutNullOrEmpty.Rows[m]["BGHMSSM"],
|
|
|
|
|
dtBGJCTJB_WithOutNullOrEmpty.Rows[m]["BGMJ"]
|
|
|
|
|
)
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
//将新表中的数据group by一把后得到所需排除了空格和Null的数据
|
|
|
|
|
#region 将新表中的数据group by一把后得到所需排除了空格和Null的数据
|
|
|
|
|
string sSQL_GetBGJCTJB_WithOutNullOrEmpty = string.Format(iBGReportBasicOperate.sSQL_GroupBySelect_BGYLB, "BGJCTJB_WithOutNullOrEmpty");
|
|
|
|
|
DataTable dtBGJCTJB_WithOutNullOrEmpty_Need = rdbHelper.ExecuteDatatable("GetBGJCTJB_WithOutNullOrEmpty", sSQL_GetBGJCTJB_WithOutNullOrEmpty, true);
|
|
|
|
|
if (dtBGJCTJB_WithOutNullOrEmpty_Need == null || dtBGJCTJB_WithOutNullOrEmpty_Need.Rows.Count <= 0)
|
|
|
|
|
{
|
|
|
|
|
LogAPI.Debug("变更基础统计表临时表 信息数据查询为空,故 未能生成 变更基础统计表 ; ");
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
//把所需的数据插入到 平方米版本-变更基础统计表 中
|
|
|
|
|
#region 把所需的数据插入到 平方米版本-变更基础统计表 中
|
|
|
|
|
rdbHelper.ExecuteSQL(@" Drop Table BGJCTJB_Mi ");
|
|
|
|
|
string sSQL_Create_BGJCTJB_Mi = string.Format(iBGReportBasicOperate.sSQL_Create_BGJCTJB, "BGJCTJB_Mi");
|
|
|
|
|
rdbHelper.ExecuteSQL(sSQL_Create_BGJCTJB_Mi);
|
|
|
|
|
for (int n = 0; n < dtBGJCTJB_WithOutNullOrEmpty_Need.Rows.Count; n++)
|
|
|
|
|
{
|
|
|
|
|
//后期可以用一个语句执行所有的
|
|
|
|
|
rdbHelper.ExecuteSQL(
|
|
|
|
|
string.Format(
|
|
|
|
|
iBGReportBasicOperate.sSQL_Insert_BGJCTJB,
|
|
|
|
|
"BGJCTJB_Mi",
|
|
|
|
|
dtBGJCTJB_WithOutNullOrEmpty_Need.Rows[n]["BGQDLBM"], dtBGJCTJB_WithOutNullOrEmpty_Need.Rows[n]["BGQQSXZ"], dtBGJCTJB_WithOutNullOrEmpty_Need.Rows[n]["BGQZLDWDM"],
|
|
|
|
|
dtBGJCTJB_WithOutNullOrEmpty_Need.Rows[n]["BGQGDLX"], dtBGJCTJB_WithOutNullOrEmpty_Need.Rows[n]["BGQGDPDJB"], dtBGJCTJB_WithOutNullOrEmpty_Need.Rows[n]["BGQTBXHDM"],
|
|
|
|
|
dtBGJCTJB_WithOutNullOrEmpty_Need.Rows[n]["BGQZZSXDM"], dtBGJCTJB_WithOutNullOrEmpty_Need.Rows[n]["BGQCZCSXM"], dtBGJCTJB_WithOutNullOrEmpty_Need.Rows[n]["BGQMSSM"],
|
|
|
|
|
|
|
|
|
|
dtBGJCTJB_WithOutNullOrEmpty_Need.Rows[n]["BGHDLBM"], dtBGJCTJB_WithOutNullOrEmpty_Need.Rows[n]["BGHQSXZ"], dtBGJCTJB_WithOutNullOrEmpty_Need.Rows[n]["BGHZLDWDM"],
|
|
|
|
|
dtBGJCTJB_WithOutNullOrEmpty_Need.Rows[n]["BGHGDLX"], dtBGJCTJB_WithOutNullOrEmpty_Need.Rows[n]["BGHGDPDJB"], dtBGJCTJB_WithOutNullOrEmpty_Need.Rows[n]["BGHTBXHDM"],
|
|
|
|
|
dtBGJCTJB_WithOutNullOrEmpty_Need.Rows[n]["BGHZZSXDM"], dtBGJCTJB_WithOutNullOrEmpty_Need.Rows[n]["BGHCZCSXM"], dtBGJCTJB_WithOutNullOrEmpty_Need.Rows[n]["BGHMSSM"],
|
|
|
|
|
dtBGJCTJB_WithOutNullOrEmpty_Need.Rows[n]["BGMJ"]
|
|
|
|
|
)
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
//依据 平方米版本-变更基础统计表 创建成 公顷版-变更基础统计表(此表就是最终实际需要的表)---其实直接创建这个公顷版或者平方米级表多加个字段也可以
|
|
|
|
|
//Ps:这里不直接复制 平方米级表 为 公顷表后再将 面积改成公顷版是因为避免后期转化过程中有误而使得分不清错误数据和有效数据
|
|
|
|
|
#region 生成 公顷版变更基础统计表
|
|
|
|
|
rdbHelper.ExecuteSQL(@" Drop Table BGJCTJB_Gq ");
|
|
|
|
|
string sSQL_Create_BGJCTJB_Gq = string.Format(iBGReportBasicOperate.sSQL_Create_BGJCTJB, "BGJCTJB_Gq");
|
|
|
|
|
rdbHelper.ExecuteSQL(sSQL_Create_BGJCTJB_Gq);
|
|
|
|
|
DataTable dtGet_BGJCTJB_Mi = rdbHelper.ExecuteDatatable("Get_BGJCTJB_Mi", " select * from BGJCTJB_Mi ", true);
|
|
|
|
|
if (dtGet_BGJCTJB_Mi == null || dtGet_BGJCTJB_Mi.Rows.Count <= 0)
|
|
|
|
|
{
|
|
|
|
|
LogAPI.Debug("变更基础统计表(平方米级) 信息获取 失败 ; ");
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
double dBGMJ_TempNow = 0.00;
|
|
|
|
|
double dBGMJ_TempConverNow = 0.00;
|
|
|
|
|
string sErrorMsgLog = "";
|
|
|
|
|
for (int f = 0; f < dtGet_BGJCTJB_Mi.Rows.Count; f++)
|
|
|
|
|
{
|
|
|
|
|
#region 公顷版变更基础统计表 数据插入
|
|
|
|
|
|
|
|
|
|
#region 记录那些面积有问题的信息
|
|
|
|
|
if (ExtendMethd.JudgeIsCouldConversionDouble((dtGet_BGJCTJB_Mi.Rows[f]["BGMJ"] as object)) == false)
|
|
|
|
|
{
|
|
|
|
|
sErrorMsgLog += "变更基础统计表(平方米级) 信息 变更面积有误,";
|
|
|
|
|
foreach (System.Data.DataColumn dc in dtGet_BGJCTJB_Mi.Columns)
|
|
|
|
|
{
|
|
|
|
|
sErrorMsgLog += dc.ColumnName + " = " + dtGet_BGJCTJB_Mi.Rows[f][dc.ColumnName] + " , ";
|
|
|
|
|
}
|
|
|
|
|
sErrorMsgLog = sErrorMsgLog.Trim().TrimEnd(',').Trim();
|
|
|
|
|
LogAPI.Debug(sErrorMsgLog);
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 平方米转公顷
|
|
|
|
|
string sConverToDouble_LogMsg1 = "";
|
|
|
|
|
sConverToDouble_LogMsg1 += "面积内容 转化前= " + ExtendMethd.GetStringByObject(dtGet_BGJCTJB_Mi.Rows[f]["BGMJ"] as object).Trim() + " ;\n ";
|
|
|
|
|
dBGMJ_TempNow = (dtGet_BGJCTJB_Mi.Rows[f]["BGMJ"] as object).ToDouble();
|
|
|
|
|
sConverToDouble_LogMsg1 += "转成Double 后= " + dBGMJ_TempNow + " ;\n ";
|
|
|
|
|
dBGMJ_TempConverNow = dBGMJ_TempNow * 0.0001;//单位转化:平方米转化成公顷
|
|
|
|
|
sConverToDouble_LogMsg1 += "平方米转成公顷 后= " + dBGMJ_TempConverNow + " ;\n ";
|
|
|
|
|
dBGMJ_TempConverNow = Math.Round(dBGMJ_TempConverNow, 2);
|
|
|
|
|
sConverToDouble_LogMsg1 += "公顷保留两位小数后= " + dBGMJ_TempConverNow + " ;\n ";
|
|
|
|
|
//LogAPI.Debug(sConverToDouble_LogMsg1);//记录一波 平方米转公顷 转化日志
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
//后期可以用一个语句执行所有的
|
|
|
|
|
rdbHelper.ExecuteSQL(
|
|
|
|
|
string.Format(
|
|
|
|
|
iBGReportBasicOperate.sSQL_Insert_BGJCTJB,
|
|
|
|
|
"BGJCTJB_Gq",
|
|
|
|
|
dtGet_BGJCTJB_Mi.Rows[f]["BGQDLBM"], dtGet_BGJCTJB_Mi.Rows[f]["BGQQSXZ"], dtGet_BGJCTJB_Mi.Rows[f]["BGQZLDWDM"],
|
|
|
|
|
dtGet_BGJCTJB_Mi.Rows[f]["BGQGDLX"], dtGet_BGJCTJB_Mi.Rows[f]["BGQGDPDJB"], dtGet_BGJCTJB_Mi.Rows[f]["BGQTBXHDM"],
|
|
|
|
|
dtGet_BGJCTJB_Mi.Rows[f]["BGQZZSXDM"], dtGet_BGJCTJB_Mi.Rows[f]["BGQCZCSXM"], dtGet_BGJCTJB_Mi.Rows[f]["BGQMSSM"],
|
|
|
|
|
|
|
|
|
|
dtGet_BGJCTJB_Mi.Rows[f]["BGHDLBM"], dtGet_BGJCTJB_Mi.Rows[f]["BGHQSXZ"], dtGet_BGJCTJB_Mi.Rows[f]["BGHZLDWDM"],
|
|
|
|
|
dtGet_BGJCTJB_Mi.Rows[f]["BGHGDLX"], dtGet_BGJCTJB_Mi.Rows[f]["BGHGDPDJB"], dtGet_BGJCTJB_Mi.Rows[f]["BGHTBXHDM"],
|
|
|
|
|
dtGet_BGJCTJB_Mi.Rows[f]["BGHZZSXDM"], dtGet_BGJCTJB_Mi.Rows[f]["BGHCZCSXM"], dtGet_BGJCTJB_Mi.Rows[f]["BGHMSSM"],
|
|
|
|
|
dBGMJ_TempConverNow.ToString()
|
|
|
|
|
)
|
|
|
|
|
);
|
|
|
|
|
#endregion
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//TimeSpan tSpan = DateTime.Now - dTimeStart;
|
|
|
|
|
//LogAPI.Debug("创建变更基础统计表耗时: " + tSpan + " ; ");
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
LogAPI.Debug("生成 变更基础统计表 时失败,异常原因: " + ex + " ; ");
|
|
|
|
|
}
|
|
|
|
|
finally
|
|
|
|
|
{
|
|
|
|
|
if (rdbHelper != null)
|
|
|
|
|
{
|
|
|
|
|
rdbHelper = null;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void DealWith_TablesFields_WithOutNullOrEmpty(string sDealWithFields)
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
if (string.IsNullOrWhiteSpace(sDealWithFields) == true)
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
string[] theDealWithFieldsArray = sDealWithFields.Split(',');
|
|
|
|
|
List<String> theDealWithFieldsList = new List<string>(theDealWithFieldsArray);
|
|
|
|
|
|
|
|
|
|
for (int u = 0; u < theDealWithFieldsList.Count(); u++)
|
|
|
|
|
{
|
|
|
|
|
DealWith_TablesField_WithOutNullOrEmpty(theDealWithFieldsList[u]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
LogAPI.Debug("处理变更基础统计表 表中空格或者Null数据 时失败,异常原因: " + ex + " ; ");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void DealWith_TablesField_WithOutNullOrEmpty(string sDealWithField)
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
if (string.IsNullOrWhiteSpace(sDealWithField) == true)
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (dt_DealWithBGJCTJB_WithOutNullOrEmpty == null || dt_DealWithBGJCTJB_WithOutNullOrEmpty.Rows.Count <= 0)
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//PS:默认不会出现意外的数据类型(即不会出现规定外的也不是空值的未定义内容,比如:耕地类型只有“TT、PD、空”三种,不会有ABC这种内容的出现),故只处理那些需要为空的情况
|
|
|
|
|
string sJudgeValueTemp = "";
|
|
|
|
|
switch (sDealWithField)
|
|
|
|
|
{
|
|
|
|
|
//变更前地类编码和变更后地类编码:按照末级分类进行分组,对于带“A、K”的地类单独分类,如08H2与08H2A,分别进行分组统计;
|
|
|
|
|
case "BGQDLBM"://变更前地类编码
|
|
|
|
|
for (int i = 0; i < dt_DealWithBGJCTJB_WithOutNullOrEmpty.Rows.Count; i++)
|
|
|
|
|
{
|
|
|
|
|
sJudgeValueTemp = ExtendMethd.GetStringByObject(dt_DealWithBGJCTJB_WithOutNullOrEmpty.Rows[i]["BGQDLBM"] as object).Trim();
|
|
|
|
|
if (string.IsNullOrWhiteSpace(sJudgeValueTemp) == true)
|
|
|
|
|
{
|
|
|
|
|
dt_DealWithBGJCTJB_WithOutNullOrEmpty.Rows[i]["BGQDLBM"] = "空";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case "BGHDLBM"://变更后地类编码
|
|
|
|
|
for (int i = 0; i < dt_DealWithBGJCTJB_WithOutNullOrEmpty.Rows.Count; i++)
|
|
|
|
|
{
|
|
|
|
|
sJudgeValueTemp = ExtendMethd.GetStringByObject(dt_DealWithBGJCTJB_WithOutNullOrEmpty.Rows[i]["BGHDLBM"] as object).Trim();
|
|
|
|
|
if (string.IsNullOrWhiteSpace(sJudgeValueTemp) == true)
|
|
|
|
|
{
|
|
|
|
|
dt_DealWithBGJCTJB_WithOutNullOrEmpty.Rows[i]["BGHDLBM"] = "空";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
//变更前权属性质和变更后权属性质:将权属性质代码映射为“国有”或“集体”,然后按照国有和集体两种类型进行分组;
|
|
|
|
|
case "BGQQSXZ"://变更前权属性质
|
|
|
|
|
for (int i = 0; i < dt_DealWithBGJCTJB_WithOutNullOrEmpty.Rows.Count; i++)
|
|
|
|
|
{
|
|
|
|
|
sJudgeValueTemp = ExtendMethd.GetStringByObject(dt_DealWithBGJCTJB_WithOutNullOrEmpty.Rows[i]["BGQQSXZ"] as object).Trim();
|
|
|
|
|
if (string.IsNullOrWhiteSpace(sJudgeValueTemp) == true)
|
|
|
|
|
{
|
|
|
|
|
dt_DealWithBGJCTJB_WithOutNullOrEmpty.Rows[i]["BGQQSXZ"] = "空";
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
if (sJudgeValueTemp.StartsWith("1") == true ||
|
|
|
|
|
sJudgeValueTemp.StartsWith("2") == true)
|
|
|
|
|
{
|
|
|
|
|
dt_DealWithBGJCTJB_WithOutNullOrEmpty.Rows[i]["BGQQSXZ"] = "国有";
|
|
|
|
|
}
|
|
|
|
|
else if (sJudgeValueTemp.StartsWith("3") == true ||
|
|
|
|
|
sJudgeValueTemp.StartsWith("4") == true)
|
|
|
|
|
{
|
|
|
|
|
dt_DealWithBGJCTJB_WithOutNullOrEmpty.Rows[i]["BGQQSXZ"] = "集体";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case "BGHQSXZ"://变更后权属性质
|
|
|
|
|
for (int i = 0; i < dt_DealWithBGJCTJB_WithOutNullOrEmpty.Rows.Count; i++)
|
|
|
|
|
{
|
|
|
|
|
sJudgeValueTemp = ExtendMethd.GetStringByObject(dt_DealWithBGJCTJB_WithOutNullOrEmpty.Rows[i]["BGHQSXZ"] as object).Trim();
|
|
|
|
|
if (string.IsNullOrWhiteSpace(sJudgeValueTemp) == true)
|
|
|
|
|
{
|
|
|
|
|
dt_DealWithBGJCTJB_WithOutNullOrEmpty.Rows[i]["BGHQSXZ"] = "空";
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
if (sJudgeValueTemp.StartsWith("1") == true ||
|
|
|
|
|
sJudgeValueTemp.StartsWith("2") == true)
|
|
|
|
|
{
|
|
|
|
|
dt_DealWithBGJCTJB_WithOutNullOrEmpty.Rows[i]["BGHQSXZ"] = "国有";
|
|
|
|
|
}
|
|
|
|
|
else if (sJudgeValueTemp.StartsWith("3") == true ||
|
|
|
|
|
sJudgeValueTemp.StartsWith("4") == true)
|
|
|
|
|
{
|
|
|
|
|
dt_DealWithBGJCTJB_WithOutNullOrEmpty.Rows[i]["BGHQSXZ"] = "集体";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
//变更前座落代码和变更后座落代码:按村级调查区为分组最小单元,即在土地利用一览表中以坐落单位代码前12位一致的为一组,进行统计;
|
|
|
|
|
case "BGQZLDWDM"://变更前座落代码
|
|
|
|
|
for (int i = 0; i < dt_DealWithBGJCTJB_WithOutNullOrEmpty.Rows.Count; i++)
|
|
|
|
|
{
|
|
|
|
|
sJudgeValueTemp = ExtendMethd.GetStringByObject(dt_DealWithBGJCTJB_WithOutNullOrEmpty.Rows[i]["BGQZLDWDM"] as object).Trim();
|
|
|
|
|
if (string.IsNullOrWhiteSpace(sJudgeValueTemp) == true)
|
|
|
|
|
{
|
|
|
|
|
dt_DealWithBGJCTJB_WithOutNullOrEmpty.Rows[i]["BGQZLDWDM"] = "空";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case "BGHZLDWDM"://变更后座落代码
|
|
|
|
|
for (int i = 0; i < dt_DealWithBGJCTJB_WithOutNullOrEmpty.Rows.Count; i++)
|
|
|
|
|
{
|
|
|
|
|
sJudgeValueTemp = ExtendMethd.GetStringByObject(dt_DealWithBGJCTJB_WithOutNullOrEmpty.Rows[i]["BGHZLDWDM"] as object).Trim();
|
|
|
|
|
if (string.IsNullOrWhiteSpace(sJudgeValueTemp) == true)
|
|
|
|
|
{
|
|
|
|
|
dt_DealWithBGJCTJB_WithOutNullOrEmpty.Rows[i]["BGHZLDWDM"] = "空";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
//变更前耕地类型和变更后耕地类型:按照“TT、PD、空”三种类型进行分类;
|
|
|
|
|
case "BGQGDLX"://变更前耕地类型
|
|
|
|
|
for (int i = 0; i < dt_DealWithBGJCTJB_WithOutNullOrEmpty.Rows.Count; i++)
|
|
|
|
|
{
|
|
|
|
|
sJudgeValueTemp = ExtendMethd.GetStringByObject(dt_DealWithBGJCTJB_WithOutNullOrEmpty.Rows[i]["BGQGDLX"] as object).Trim();
|
|
|
|
|
if (string.IsNullOrWhiteSpace(sJudgeValueTemp) == true)
|
|
|
|
|
{
|
|
|
|
|
dt_DealWithBGJCTJB_WithOutNullOrEmpty.Rows[i]["BGQGDLX"] = "空";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case "BGHGDLX"://变更后耕地类型
|
|
|
|
|
for (int i = 0; i < dt_DealWithBGJCTJB_WithOutNullOrEmpty.Rows.Count; i++)
|
|
|
|
|
{
|
|
|
|
|
sJudgeValueTemp = ExtendMethd.GetStringByObject(dt_DealWithBGJCTJB_WithOutNullOrEmpty.Rows[i]["BGHGDLX"] as object).Trim();
|
|
|
|
|
if (string.IsNullOrWhiteSpace(sJudgeValueTemp) == true)
|
|
|
|
|
{
|
|
|
|
|
dt_DealWithBGJCTJB_WithOutNullOrEmpty.Rows[i]["BGHGDLX"] = "空";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
//变更前耕地坡度分级和变更后耕地坡度分级:按照“1、2、3、4、5、空”六种类型进行分类;
|
|
|
|
|
case "BGQGDPDJB"://变更前耕地坡度分级
|
|
|
|
|
for (int i = 0; i < dt_DealWithBGJCTJB_WithOutNullOrEmpty.Rows.Count; i++)
|
|
|
|
|
{
|
|
|
|
|
sJudgeValueTemp = ExtendMethd.GetStringByObject(dt_DealWithBGJCTJB_WithOutNullOrEmpty.Rows[i]["BGQGDPDJB"] as object).Trim();
|
|
|
|
|
if (string.IsNullOrWhiteSpace(sJudgeValueTemp) == true)
|
|
|
|
|
{
|
|
|
|
|
dt_DealWithBGJCTJB_WithOutNullOrEmpty.Rows[i]["BGQGDPDJB"] = "空";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case "BGHGDPDJB"://变更后耕地坡度分级
|
|
|
|
|
for (int i = 0; i < dt_DealWithBGJCTJB_WithOutNullOrEmpty.Rows.Count; i++)
|
|
|
|
|
{
|
|
|
|
|
sJudgeValueTemp = ExtendMethd.GetStringByObject(dt_DealWithBGJCTJB_WithOutNullOrEmpty.Rows[i]["BGHGDPDJB"] as object).Trim();
|
|
|
|
|
if (string.IsNullOrWhiteSpace(sJudgeValueTemp) == true)
|
|
|
|
|
{
|
|
|
|
|
dt_DealWithBGJCTJB_WithOutNullOrEmpty.Rows[i]["BGHGDPDJB"] = "空";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
//变更前图斑细化代码和变更后图斑细化代码:按照“HDGD、HQGD、LQGD、MQGD、SHGD、SMGD、YJGD、LQYD、LJTM、GCCD、HDGY、GTGY、MTGY、SNGY、BLGY、DLGY、FQ、空”十八种类型进行分类;
|
|
|
|
|
case "BGQTBXHDM"://变更前图斑细化代码
|
|
|
|
|
for (int i = 0; i < dt_DealWithBGJCTJB_WithOutNullOrEmpty.Rows.Count; i++)
|
|
|
|
|
{
|
|
|
|
|
sJudgeValueTemp = ExtendMethd.GetStringByObject(dt_DealWithBGJCTJB_WithOutNullOrEmpty.Rows[i]["BGQTBXHDM"] as object).Trim();
|
|
|
|
|
if (string.IsNullOrWhiteSpace(sJudgeValueTemp) == true)
|
|
|
|
|
{
|
|
|
|
|
dt_DealWithBGJCTJB_WithOutNullOrEmpty.Rows[i]["BGQTBXHDM"] = "空";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case "BGHTBXHDM"://变更后图斑细化代码
|
|
|
|
|
for (int i = 0; i < dt_DealWithBGJCTJB_WithOutNullOrEmpty.Rows.Count; i++)
|
|
|
|
|
{
|
|
|
|
|
sJudgeValueTemp = ExtendMethd.GetStringByObject(dt_DealWithBGJCTJB_WithOutNullOrEmpty.Rows[i]["BGHTBXHDM"] as object).Trim();
|
|
|
|
|
if (string.IsNullOrWhiteSpace(sJudgeValueTemp) == true)
|
|
|
|
|
{
|
|
|
|
|
dt_DealWithBGJCTJB_WithOutNullOrEmpty.Rows[i]["BGHTBXHDM"] = "空";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
//变更前种植属性代码和变更后种植属性代码:按照“LS、FLS、LYFL、XG、LLJZ、WG、JKHF、GCHF、空”九种类型进行分类;
|
|
|
|
|
case "BGQZZSXDM"://变更前种植属性代码
|
|
|
|
|
for (int i = 0; i < dt_DealWithBGJCTJB_WithOutNullOrEmpty.Rows.Count; i++)
|
|
|
|
|
{
|
|
|
|
|
sJudgeValueTemp = ExtendMethd.GetStringByObject(dt_DealWithBGJCTJB_WithOutNullOrEmpty.Rows[i]["BGQZZSXDM"] as object).Trim();
|
|
|
|
|
if (string.IsNullOrWhiteSpace(sJudgeValueTemp) == true)
|
|
|
|
|
{
|
|
|
|
|
dt_DealWithBGJCTJB_WithOutNullOrEmpty.Rows[i]["BGQZZSXDM"] = "空";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case "BGHZZSXDM"://变更后种植属性代码
|
|
|
|
|
for (int i = 0; i < dt_DealWithBGJCTJB_WithOutNullOrEmpty.Rows.Count; i++)
|
|
|
|
|
{
|
|
|
|
|
sJudgeValueTemp = ExtendMethd.GetStringByObject(dt_DealWithBGJCTJB_WithOutNullOrEmpty.Rows[i]["BGHZZSXDM"] as object).Trim();
|
|
|
|
|
if (string.IsNullOrWhiteSpace(sJudgeValueTemp) == true)
|
|
|
|
|
{
|
|
|
|
|
dt_DealWithBGJCTJB_WithOutNullOrEmpty.Rows[i]["BGHZZSXDM"] = "空";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
//变更前城镇村属性码和变更后城镇村属性码:按照“201、201A、202、202A、203、203A、204、205、空”九种类型进行分类;
|
|
|
|
|
case "BGQCZCSXM"://变更前城镇村属性码
|
|
|
|
|
for (int i = 0; i < dt_DealWithBGJCTJB_WithOutNullOrEmpty.Rows.Count; i++)
|
|
|
|
|
{
|
|
|
|
|
sJudgeValueTemp = ExtendMethd.GetStringByObject(dt_DealWithBGJCTJB_WithOutNullOrEmpty.Rows[i]["BGQCZCSXM"] as object).Trim();
|
|
|
|
|
if (string.IsNullOrWhiteSpace(sJudgeValueTemp) == true)
|
|
|
|
|
{
|
|
|
|
|
dt_DealWithBGJCTJB_WithOutNullOrEmpty.Rows[i]["BGQCZCSXM"] = "空";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case "BGHCZCSXM"://变更后城镇村属性码
|
|
|
|
|
for (int i = 0; i < dt_DealWithBGJCTJB_WithOutNullOrEmpty.Rows.Count; i++)
|
|
|
|
|
{
|
|
|
|
|
sJudgeValueTemp = ExtendMethd.GetStringByObject(dt_DealWithBGJCTJB_WithOutNullOrEmpty.Rows[i]["BGHCZCSXM"] as object).Trim();
|
|
|
|
|
if (string.IsNullOrWhiteSpace(sJudgeValueTemp) == true)
|
|
|
|
|
{
|
|
|
|
|
dt_DealWithBGJCTJB_WithOutNullOrEmpty.Rows[i]["BGHCZCSXM"] = "空";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
//变更前描述说明和变更后描述说明:按照“00、01”两种类型进行分类;
|
|
|
|
|
case "BGQMSSM"://变更前描述说明
|
|
|
|
|
for (int i = 0; i < dt_DealWithBGJCTJB_WithOutNullOrEmpty.Rows.Count; i++)
|
|
|
|
|
{
|
|
|
|
|
sJudgeValueTemp = ExtendMethd.GetStringByObject(dt_DealWithBGJCTJB_WithOutNullOrEmpty.Rows[i]["BGQMSSM"] as object).Trim();
|
|
|
|
|
if (string.IsNullOrWhiteSpace(sJudgeValueTemp) == true)
|
|
|
|
|
{
|
|
|
|
|
dt_DealWithBGJCTJB_WithOutNullOrEmpty.Rows[i]["BGQMSSM"] = "空";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case "BGHMSSM"://变更后描述说明
|
|
|
|
|
for (int i = 0; i < dt_DealWithBGJCTJB_WithOutNullOrEmpty.Rows.Count; i++)
|
|
|
|
|
{
|
|
|
|
|
sJudgeValueTemp = ExtendMethd.GetStringByObject(dt_DealWithBGJCTJB_WithOutNullOrEmpty.Rows[i]["BGHMSSM"] as object).Trim();
|
|
|
|
|
if (string.IsNullOrWhiteSpace(sJudgeValueTemp) == true)
|
|
|
|
|
{
|
|
|
|
|
dt_DealWithBGJCTJB_WithOutNullOrEmpty.Rows[i]["BGHMSSM"] = "空";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
LogAPI.Debug("在处理变更基础统计表 表中空格或者Null数据 时失败,异常原因: " + ex + " ; ");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|