Ejemplo n.º 1
0
        private void CheckBdcInWB(DataTable dt, Action <DataRow, string, string> Write, string pch)
        {
            string    getHIdsInBdc = "Select TSTYBM as HouseId,ZL,'' as HouseState from FC_H_QSDC Where ComesFromCG=0";
            DataTable dtbdc        = OleDBHelper.GetDataTable(getHIdsInBdc);

            if (dt != null && dtbdc != null && dtbdc.Rows.Count > 0)
            {
                for (int i = 0; i < dtbdc.Rows.Count; i++)
                {
                    bool has = false;
                    for (int j = 0; j < dt.Rows.Count; j++)
                    {
                        if (dt.Rows[j]["HouseId"].ToString().Equals(dtbdc.Rows[i]["HouseId"]))
                        {
                            has = true;
                            break;
                        }
                    }
                    if (!has)
                    {
                        Write(dtbdc.Rows[i], "不动产系统中的ID在中网备系统不存在", pch);
                    }
                }
            }
        }
Ejemplo n.º 2
0
 private void CheckWBInBDC(DataTable dt, Action <DataRow, string, string> Write, string pch)
 {
     if (dt != null && dt.Rows.Count > 0)
     {
         for (int i = 0; i < dt.Rows.Count; i++)
         {
             string sql = "Select TSTYBM,C**t from mortagetimes Where TSTYBM='{0}'";
             if (dt.Rows[i]["Houseid"].ToString() == "0663B473-BAC4-0026-E053-C0A864060026")
             {
             }
             sql = string.Format(sql, dt.Rows[i]["Houseid"]);
             DataTable dtbdc = OleDBHelper.GetDataTable(sql);
             if (dtbdc != null && dtbdc.Rows.Count > 0)
             {
                 int cfcsinbdc = Convert.ToInt32(dtbdc.Rows[0]["C**t"].ToString());
                 int cfcsinwb  = Convert.ToInt32(dt.Rows[i]["PledgeSate"].ToString());
                 if (cfcsinbdc != cfcsinwb)
                 {
                     Write(dt.Rows[i], "可销售房屋抵押次数对不到", pch);
                 }
             }
             else  //说明抵押次数是0
             {
                 int cfcsinwb = Convert.ToInt32(dt.Rows[i]["PledgeSate"].ToString());
                 if (cfcsinwb != 0)
                 {
                     Write(dt.Rows[i], "可销售房屋抵押次数对不到", pch);
                 }
             }
         }
     }
 }
Ejemplo n.º 3
0
 private void CheckWBInBdc(DataTable dt, Action <DataRow, string, string> Write, string pch)
 {
     if (dt != null && dt.Rows.Count > 0)
     {
         string sqlTmp = "Select Count(1) From FC_H_QSDC Where TSTYBM='{0}'";
         for (int i = 0; i < dt.Rows.Count; i++)
         {
             int C = OleDBHelper.GetScalar(string.Format(sqlTmp, dt.Rows[i]["HouseId"]));
             if (C <= 0) //网备库中不存在
             {
                 Write(dt.Rows[i], "网备系统中的ID在不动产系统中不存在", pch);
             }
         }
     }
 }
Ejemplo n.º 4
0
        /// <summary>
        /// 将检查结果写入数据库
        /// </summary>
        /// <returns></returns>
        private string WriteCheckResult2DB(DataRow dr, string errorType, string pch)
        {
            string sql = "Insert into WBIDCheck(HouseID,ZL,HouseState,ErrorType,PCH) Values(:HouseID,:ZL,:HouseState,:ErrorType,:PCH)";

            OleDbParameter[] cmdParms = new OleDbParameter[4];
            cmdParms[0]       = new OleDbParameter("HouseID", OleDbType.VarChar);
            cmdParms[0].Value = dr["HouseID"].ToString();
            cmdParms[1]       = new OleDbParameter("ZL", OleDbType.VarChar);
            cmdParms[1].Value = dr["ZL"].ToString();
            cmdParms[2]       = new OleDbParameter("HouseState", OleDbType.VarChar);
            cmdParms[2].Value = dr["HouseState"].ToString();
            cmdParms[3]       = new OleDbParameter("ErrorType", OleDbType.VarChar);
            cmdParms[3].Value = errorType;
            cmdParms[4]       = new OleDbParameter("PCH", OleDbType.VarChar);
            cmdParms[4].Value = dr["PCH"].ToString();
            OleDBHelper.ExecuteSql(sql, cmdParms);
            return(pch);
        }
Ejemplo n.º 5
0
        /// <summary>
        /// 所有没有领过权证的数据
        /// </summary>
        /// <returns></returns>
        private DataTable CheckDataParper()
        {
            string    sql   = @"select DJ_CF.SLBH,dj_tsgl.tstybm as HouseID,dj_cf.qlr,FC_H_QSDC.ZL,'' as HouseState   from dj_tsgl
join DJ_CF on dj_tsgl.SLBH=DJ_CF.SLBH
left join FC_H_QSDC on FC_H_QSDC.TSTYBM=dj_tsgl.TSTYBM
 where FC_H_QSDC.tstybm in (select TSTYBM
                    from dj_tsgl gl1
                   where not exists (select 1
                            from (select distinct tstybm
                                    from dj_tsgl
                                   where djzl = '权属') t
                           where t.tstybm = gl1.tstybm))
   and length(FC_H_QSDC.tstybm) = 36 
  ";
            DataTable dtbdc = OleDBHelper.GetDataTable(sql);

            return(dtbdc);
        }
Ejemplo n.º 6
0
        /// <summary>
        ///
        /// </summary>
        private void CheckWBInBdc(DataTable dt, Action <DataRow, string, string> Write, string pch)
        {
            if (dt != null && dt.Rows.Count > 0)
            {
                string    sql   = @"Select distinct DJ_TSGL.TSTYBM from DJ_TSGL Join (Select TSTYBM from FC_H_QSDC where ComesFromCG=0) cgh on cgh.TSTYBM=DJ_TSGL.TSTYBM 
Where DJ_TSGL.DJZL='预告' and nvl2(dj_tsgl.Lifecycle,dj_tsgl.Lifecycle,0)=0";
                DataTable dtbdc = OleDBHelper.GetDataTable(sql);
                for (int i = 0; i < dtbdc.Rows.Count; i++)
                {
                    for (int j = 0; j < dt.Rows.Count; j++)
                    {
                        if (dtbdc.Rows[i]["TSTYBM"].ToString().Equals(dt.Rows[j]["Houseid"].ToString()))
                        {
                            Write(dt.Rows[j], "不动产做过预告,网备没有预告记录", pch);
                            break;
                        }
                    }
                }
            }
        }
Ejemplo n.º 7
0
 /// <summary>
 /// 网备里面是查封的
 /// </summary>
 private void CheckWBInBdc(DataTable dt, Action <DataRow, string, string> Write, string pch)
 {
     if (dt != null && dt.Rows.Count > 0)
     {
         for (int i = 0; i < dt.Rows.Count; i++)
         {
             string sql = "Select TSTYBM,C**t from SEALTIMES Where TSTYBM='{0}'";
             sql = string.Format(sql, dt.Rows[i]["Houseid"]);
             DataTable dtbdc = OleDBHelper.GetDataTable(sql);
             if (dtbdc != null && dtbdc.Rows.Count > 0)
             {
                 int cfcsinbdc = Convert.ToInt32(dtbdc.Rows[0]["C**t"].ToString());
                 int cfcsinwb  = Convert.ToInt32(dt.Rows[i]["SealState"].ToString());
                 if (cfcsinbdc != cfcsinwb)
                 {
                     if (cfcsinbdc > cfcsinwb)
                     {//bdc多
                         Write(dt.Rows[i], "不动产中的查封比网备的查封次数多", pch);
                     }
                     else
                     {
                         Write(dt.Rows[i], "网备中的查封比的不动产查封次数多", pch);
                     }
                 }
             }
             else
             {
                 int cfcsinwb = Convert.ToInt32(dt.Rows[i]["SealState"].ToString());
                 if (cfcsinwb != 0)
                 {
                     Write(dt.Rows[i], "网备中的查封比的不动产查封次数多", pch);
                 }
             }
         }
     }
 }