Beispiel #1
0
        public IList <HouseInfoBase> GetWBHouseInfoByZL(string zl)
        {
            FCWebServiceDal       dal        = new FCWebServiceDal();
            IList <HouseInfoBase> houseinfos = dal.GetWBHouseInfoByZL(zl);

            return(houseinfos);
        }
Beispiel #2
0
        public IList <HouseInfoBase> GetHouseInfoByIds(string ids)
        {
            string[] idArray = ids.Split(',');
            string where = string.Join(",", idArray.Select(t => "'" + t + "'"));
            FCWebServiceDal       dal        = new FCWebServiceDal();
            IList <HouseInfoBase> houseinfos = dal.GetHouseInfoByIds(where);

            return(houseinfos);
        }
Beispiel #3
0
        public IList <string> GetHouseIdsInCGBySLBH(string slbh)
        {
            FCWebServiceDal dal = new FCWebServiceDal();
            DataTable       dt  = dal.GetHouseIdsBySLBH(slbh);
            IList <string>  ids = new List <string>();

            if (dt != null && dt.Rows.Count > 0)
            {
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    ids.Add(dt.Rows[i]["TSTYBM"].ToString());
                }
            }
            return(ids);
        }
        private IList <string> GetQlrMCInBdc(string houseId)
        {
            FCWebServiceDal dal = new FCWebServiceDal();
            DataTable       dt  = dal.GetQLRMCByHouseId(houseId);
            IList <string>  mc  = new List <string>();

            if (dt != null && dt.Rows.Count > 0)
            {
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    mc.Add(dt.Rows[i][0].ToString());
                }
            }
            return(mc);
        }
        private static string How2Check(string h, string slbh)
        {//是否做过登记,如果做个登记,就在不动产中检查,否则在网备中检查
            FCWebServiceDal dal = new FCWebServiceDal();
            DataTable       dt  = dal.GetRegistState(h, slbh);
            string          res = string.Empty;

            if (null != dt && dt.Rows.Count > 0)
            {
                foreach (DataRow row in dt.Rows)
                {
                    if (string.IsNullOrEmpty(res))
                    {
                        res = row[0].ToString();
                    }
                    else
                    {
                        res += "、" + row[0].ToString();
                    }
                }
            }
            return(res);
        }
Beispiel #6
0
        public int SetOracle_WB(string tstybm, string houseid)
        {
            FCWebServiceDal dal = new FCWebServiceDal();

            return(dal.SetOracle_WB(tstybm, houseid));
        }
Beispiel #7
0
        //private string GetQlr(string hid)
        //{
        //    FCWebServiceDal dal = new FCWebServiceDal();
        //    DataTable dt = dal.GetQLRMCByHouseId(hid);
        //    if(null!=dt && dt.Rows.Count>0)
        //    {
        //        return
        //    }
        //}

        private string GetCQZH(string hid)
        {
            FCWebServiceDal dal = new FCWebServiceDal();

            return(dal.GetCQZHByHouseId(hid));
        }
Beispiel #8
0
        public EasyUIGridModel GetWBCLFInfoByHouseIds(string slbh)
        {
            IList <WBCLFInfo> wbinfos = new List <WBCLFInfo>();

            FCWebServiceDal    dal         = new FCWebServiceDal();
            IList <XGZHAndQLR> xgzhAndQlrs = dal.GetFDJBInfo(slbh);

            foreach (XGZHAndQLR xgzhAndQlr in xgzhAndQlrs)
            {
                IList <string> qlrs = xgzhAndQlr.QLRS;

                if (qlrs.Count > 0)
                {
                    foreach (string qlr in qlrs)
                    {
                        IDictionary <string, string> paramss = new Dictionary <string, string>();
                        paramss["CQZH"] = xgzhAndQlr.XGZH;
                        paramss["SYQR"] = qlr;
                        FC_CLMMHT_WSData ht_Data = new FC_CLMMHT_WSData(CLMMHT_Webservice_Address, "2000");

                        string backDatas = ht_Data.GetWebServiceData(paramss, null);

                        var bdc = ht_Data.XMLParsing(backDatas);

                        if (bdc.data != null && bdc.data.dt != null && bdc.data.dt.Rows.Count > 0)
                        {
                            string htid  = bdc.data.dt.Rows[0]["HTID"].ToString().Trim();
                            string htbah = bdc.data.dt.Rows[0]["CLHTBAH"].ToString();

                            var    qlrBdc = GetQLR(htbah);
                            string yrwmc  = "";
                            string ywrno  = "";
                            if (qlrBdc.data != null && qlrBdc.data.dt != null && qlrBdc.data.dt.Rows.Count > 0)
                            {
                                foreach (DataRow row in qlrBdc.data.dt.Rows)
                                {
                                    if (row["XGRLX"].ToString() == "1")
                                    {
                                        if (yrwmc == "")
                                        {
                                            yrwmc = row["XGRMC"].ToString();
                                            ywrno = row["ZJHM"].ToString();
                                        }
                                        else
                                        {
                                            yrwmc += "," + row["XGRMC"].ToString();
                                            ywrno += "," + row["ZJHM"].ToString();
                                        }
                                    }
                                }
                            }
                            WBCLFInfo wci = (from wi in wbinfos where wi.HTID == htid select wi).FirstOrDefault();
                            if (null != wci)
                            {
                                wci.SYQR      += "," + bdc.data.dt.Rows[0]["SYQR"].ToString();
                                wci.BARPASSNO += "," + bdc.data.dt.Rows[0]["BARPASSNO"].ToString();
                            }
                            else
                            {
                                wci           = new WBCLFInfo();
                                wci.BARPASSNO = bdc.data.dt.Rows[0]["BARPASSNO"].ToString();
                                wci.SYQR      = bdc.data.dt.Rows[0]["SYQR"].ToString();
                                wci.HTID      = htid.Trim();
                                wci.CQZH      = bdc.data.dt.Rows[0]["CQZH"].ToString();


                                wci.HID     = bdc.data.dt.Rows[0]["HID"].ToString();
                                wci.ZID     = bdc.data.dt.Rows[0]["ZID"].ToString();
                                wci.CLHTBAH = bdc.data.dt.Rows[0]["CLHTBAH"].ToString();
                                wci.HTBASJ  = bdc.data.dt.Rows[0]["HTBASJ"] == null ? null : Convert.ToDateTime(bdc.data.dt.Rows[0]["HTBASJ"]).ToString();
                                wci.FWZL    = bdc.data.dt.Rows[0]["FWZL"].ToString();
                                wci.FWLX    = bdc.data.dt.Rows[0]["FWLX"].ToString();
                                wci.FWJG    = bdc.data.dt.Rows[0]["FWJG"].ToString();
                                wci.HX      = bdc.data.dt.Rows[0]["HX"].ToString();
                                wci.JZMJ    = bdc.data.dt.Rows[0]["JZMJ"].ToString();
                                wci.TNJZMJ  = bdc.data.dt.Rows[0]["TNJZMJ"].ToString();

                                wci.FTJZMJ = bdc.data.dt.Rows[0]["FTJZMJ"].ToString();
                                wci.JYJG   = bdc.data.dt.Rows[0]["JYJG"].ToString();
                                wci.FKLX   = bdc.data.dt.Rows[0]["FKLX"].ToString();
                                wci.DKFS   = bdc.data.dt.Rows[0]["DKFS"].ToString();
                                wci.FKSJ   = bdc.data.dt.Rows[0]["FKSJ"].ToString();

                                wci.QDSJ     = bdc.data.dt.Rows[0]["QDSJ"].ToString();
                                wci.QRSJ     = bdc.data.dt.Rows[0]["QRSJ"].ToString();
                                wci.QRQZSJ   = bdc.data.dt.Rows[0]["QRQZSJ"].ToString();
                                wci.ZHBGTGSJ = bdc.data.dt.Rows[0]["ZHBGTGSJ"].ToString();
                                wci.JSSJ     = bdc.data.dt.Rows[0]["JSSJ"].ToString();
                                wci.SFYX     = bdc.data.dt.Rows[0]["SFYX"].ToString();

                                wci.YWR   = yrwmc;
                                wci.YWRNO = ywrno;

                                wbinfos.Add(wci);
                            }
                        }
                    }
                }
            }
            if (wbinfos.Count == 0)
            {
                wbinfos.Add(new WBCLFInfo {
                    HTID = "网备中无此房屋合同信息"
                });
            }
            EasyUIGridModel ret = new EasyUIGridModel(0, wbinfos.Count, wbinfos);

            return(ret);
        }
 public BDCFilterResult Filter(PageParams param)
 {
     try
     {
         if (configFromBDC.ContainsKey("RegistCheckFilter") && configFromBDC["RegistCheckFilter"].Equals("是"))
         {
             string djlx = getDJLXBySLBH(param.PrjId);
             IList <BDCFilterResult> retS = new List <BDCFilterResult>();
             IList <string>          hs   = GetDJHouses(param.PrjId);
             if (hs == null || hs.Count == 0)
             {
                 return(new BDCFilterResult {
                     IsSuccess = true
                 });
             }
             string tzr = GetTXRXM(param.PrjId, djlx);
             if (hs.Count > 0)
             {
                 foreach (string h in hs)
                 {//在不动产系统中安装
                     BDCFilterResult ret = new BDCFilterResult();
                     ret.IsSuccess = true;
                     if (!configFromBDC.ContainsKey("RegistCheckFrom"))
                     {
                         int how2Check = How2Check(h, param.PrjId);
                         if (how2Check == 1 && djlx != "预告")
                         {
                             ret = CheckInBDC(h, djlx, param.PrjId, tzr);
                         }
                         else if (how2Check == 2 || djlx == "预告")
                         {
                             WBInfoForAHouse aH = GetInfoInWB(h);
                             if (aH != null)
                             {
                                 ret = CheckInWB(aH, djlx, param.PrjId, tzr);
                             }
                             else
                             {
                                 FCWebServiceDal dal = new FCWebServiceDal();
                                 if (!string.IsNullOrEmpty(dal.GetHYCId(h)))
                                 {
                                     ret.IsSuccess   = false;
                                     ret.Message     = "户ID为[" + h + "]存在预测信息,但在网备中未找到任何信息。\n";
                                     ret.ConfirmType = 1;
                                 }
                             }
                         }
                         retS.Add(ret);
                     }
                     else
                     {
                         if (configFromBDC["RegistCheckFrom"].Contains("不动产"))
                         {
                             ret = CheckInBDC(h, djlx, param.PrjId, tzr);
                             retS.Add(ret);
                         }
                         if (configFromBDC["RegistCheckFrom"].Contains("网备"))
                         {
                             WBInfoForAHouse aH = GetInfoInWB(h);
                             if (aH != null)
                             {
                                 ret = CheckInWB(aH, djlx, param.PrjId, tzr);
                             }
                             else
                             {
                                 FCWebServiceDal dal = new FCWebServiceDal();
                                 if (!string.IsNullOrEmpty(dal.GetHYCId(h)))
                                 {
                                     ret.IsSuccess   = false;
                                     ret.Message     = "户ID为[" + h + "]存在预测信息,但在网备中未找到任何信息。\n";
                                     ret.ConfirmType = 1;
                                 }
                             }
                             retS.Add(ret);
                         }
                     }
                 }
             }
             if (configFromBDC.ContainsKey("RegistCheckFrom") && configFromBDC["RegistCheckFrom"].Equals("存量房"))
             {
                 FCWebServiceDal    dal         = new FCWebServiceDal();
                 IList <XGZHAndQLR> xgzhAndQlrs = dal.GetFDJBInfo(param.PrjId);
                 BDCFilterResult    ret         = CheckInCLF(xgzhAndQlrs, djlx, param.PrjId, tzr);
                 retS.Add(ret);
             }
             BDCFilterResult retn        = new BDCFilterResult();
             bool            isSuccess   = true;
             string          message     = "";
             int             confirmType = -1;
             foreach (BDCFilterResult r in retS)
             {
                 if (!r.IsSuccess)
                 {
                     isSuccess   = false;
                     message    += r.Message + "\n";
                     confirmType = 1;
                 }
                 if (r.ConfirmType == 0)
                 {
                     confirmType = 0;
                 }
             }
             retn.ConfirmType = confirmType;
             retn.Message     = message;
             retn.IsSuccess   = isSuccess;
             return(retn);
         }
         else
         {
             return(new BDCFilterResult {
                 IsSuccess = true
             });
         }
     }
     catch (Exception ex) {
         return(new BDCFilterResult {
             IsSuccess = false, ConfirmType = 0, Message = ex.Message
         });
     }
 }
        //private IList<string> GetLastQlrMc(string houseid) {
        //    IList<string> ret = GetQlrMCInBdc(houseid);
        //    if (ret == null || ret.Count == 0)
        //    {
        //        return GetQlrMCInWB(houseid);
        //    }
        //    else {
        //        return ret;
        //    }
        //}

        /// <summary>
        /// 如果没有
        /// 怎样检查数据。1,在不动产中检查,2,在网备中检查
        /// </summary>
        /// <returns></returns>
        private int How2Check(string h, string slbh)
        {//是否做过登记,如果做个登记,就在不动产中检查,否则在网备中检查
            FCWebServiceDal dal = new FCWebServiceDal();

            return(dal.HasQSOrYGRegister(h, slbh) > 0 ? 1 : 2);
        }