Beispiel #1
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);
        }
        private BDCFilterResult CheckInCLF(IList <XGZHAndQLR> xgzhAndQlrs, string djlx, string slbh, string tzr)
        {
            BDCSrvSoap soap  = new BDCSrvSoapClient();
            bool       find  = false;
            string     htbah = "";

            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("CLF_FC_CLMMHT", "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)
                        {
                            find  = true;
                            htbah = bdc.data.dt.Rows[0]["CLHTBAH"].ToString();
                            break;
                        }
                    }
                }
            }
            BDCFilterResult ret = new BDCFilterResult {
                IsSuccess = true
            };

            if (djlx.Equals("权属")) //转移的通知人是不是和义务人一样
            {                      //
                if (find)
                {
                    string message  = "";
                    bool   isSucess = IfTZRInCLR(htbah, tzr, ref message);
                    if (isSucess)
                    {
                        return(new BDCFilterResult {
                            IsSuccess = true
                        });
                    }
                    else
                    {
                        return(new BDCFilterResult {
                            IsSuccess = false, Message = "存量房系统中购房者为:" + message, ConfirmType = 1
                        });
                    }
                }
                else
                {
                    return(new BDCFilterResult {
                        IsSuccess = false, Message = "存量房系统中未发现交易信息"
                    });
                }
            }
            else if (djlx.Equals("查封") || djlx.Equals("抵押"))
            {
                if (find)
                {
                    string message  = "";
                    bool   isSucess = IfTZRInCLR(htbah, tzr, ref message);
                    if (isSucess)
                    {
                        return(new BDCFilterResult {
                            IsSuccess = true
                        });
                    }
                    else
                    {
                        return(new BDCFilterResult {
                            IsSuccess = false, Message = "存量房系统中存在交易信息购房者为:" + message, ConfirmType = 1
                        });
                    }
                }
                else
                {
                    return(new BDCFilterResult {
                        IsSuccess = true
                    });
                }
            }
            return(new BDCFilterResult {
                IsSuccess = true
            });
        }