Ejemplo n.º 1
0
        /// <summary>
        /// 根据城市名称查询楼盘信息
        /// </summary>
        /// <param name="cityName"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="count"></param>
        /// <param name="isGetCount">是否获取总数</param>
        /// <returns></returns>
        public static List <FxtApi_DATProject> GetProjectByCityName(string cityName, int pageIndex, int pageSize, out int count, bool isGetCount = true, FxtAPIClientExtend _fxtApi = null)
        {
            count = 0;
            int isgetcount = 1;

            if (!isGetCount)
            {
                isgetcount = 0;
            }
            FxtAPIClientExtend fxtApi = new FxtAPIClientExtend(_fxtApi);


            string name    = "GetProjectByCityNameAndPage";
            var    para    = new { cityName = cityName, pageIndex = pageIndex, pageSize = pageSize, isGetCount = isgetcount };
            string jsonStr = Convert.ToString(EntranceApi.Entrance(name, para.ToJSONjss(), _fxtApi: fxtApi));

            if (string.IsNullOrEmpty(jsonStr))
            {
                fxtApi.Abort();
                return(new List <FxtApi_DATProject>());
            }
            FxtApi_ResultPageList listObj = FxtApi_ResultPageList.ConvertToObj(jsonStr);

            count = listObj.Count;
            List <FxtApi_DATProject> list = FxtApi_DATProject.ConvertToObjList(listObj.ObjJson);

            list = list.DecodeField();
            fxtApi.Abort();
            return(list);
        }
Ejemplo n.º 2
0
        public static bool InsertProjectApi(string projectName, int cityId, int areaId, int purposeCode, string address, out string message, FxtAPIClientExtend _fxtApi = null)
        {
            bool r = true;

            message = "";
            FxtAPIClientExtend fxtApi = new FxtAPIClientExtend(_fxtApi);

            try
            {
                string        name    = "InsertProject";
                var           para    = new { projectName = projectName, cityId = cityId, areaId = areaId, purposeCode = purposeCode, address = address };
                string        jsonStr = Convert.ToString(EntranceApi.Entrance(name, para.ToJSONjss(), _fxtApi: fxtApi));
                FxtApi_Result result  = FxtApi_Result.ConvertToObj(jsonStr);
                if (result == null)
                {
                    fxtApi.Abort();
                    return(false);
                }
                r       = result.Result == 0 ? false : true;
                message = JsonHelp.DecodeField(result.Message);
                fxtApi.Abort();
            }
            catch (Exception ex)
            {
                fxtApi.Abort();
                log.Error("InsertProjectApi(string projectName,int cityId,int areaId,int purposeCode,string address,out string message)", ex);
                return(false);
            }
            return(r);
        }
Ejemplo n.º 3
0
        public static List <FxtApi_DATProject> GetProjectByCityIdAndProjectIds(int fxtCityId, int[] projectIds, FxtAPIClientExtend _fxtApi = null)
        {
            string projectIdsStr          = projectIds.ConvertToString();
            List <FxtApi_DATProject> list = new List <FxtApi_DATProject>();

            if (string.IsNullOrEmpty(projectIdsStr))
            {
                return(list);
            }
            FxtAPIClientExtend fxtApi = new FxtAPIClientExtend(_fxtApi);

            try
            {
                JObject jObjPara = new JObject();
                jObjPara.Add(new JProperty("cityId", fxtCityId));
                jObjPara.Add(new JProperty("projectIds", projectIdsStr));
                string methodName = "GetProjectByCityIdAndProjectIds";
                string jsonStr    = Convert.ToString(EntranceApi.Entrance(methodName, jObjPara.ToJSONjss(), _fxtApi: fxtApi));
                if (string.IsNullOrEmpty(jsonStr))
                {
                    fxtApi.Abort();
                    return(new List <FxtApi_DATProject>());
                }
                list = FxtApi_DATProject.ConvertToObjList(jsonStr);
                list = list.DecodeField();
                fxtApi.Abort();
            }
            catch (Exception ex)
            {
                fxtApi.Abort();
                log.Error(string.Format("GetProjectByCityIdAndProjectIds(int fxtCityId, int[] projectIds, FxtAPIClientExtend _fxtApi = null),fxtCity={0}",
                                        fxtCityId), ex);
            }
            return(list);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// 根据楼盘名+城市名获取楼盘信息
        /// </summary>
        /// <param name="projectName"></param>
        /// <param name="cityName"></param>
        /// <returns></returns>
        public static FxtApi_DATProject GetProjectByProjectNameAndCityName(string projectName, string cityName, FxtAPIClientExtend _fxtApi = null)
        {
            if (string.IsNullOrEmpty(projectName) || string.IsNullOrEmpty(cityName))
            {
                return(null);
            }
            FxtApi_DATProject  project = null;
            FxtAPIClientExtend fxtApi  = new FxtAPIClientExtend(_fxtApi);

            try
            {
                string name    = "GetProjectByProjectNameAndCityName";
                var    para    = new { projectName = projectName, cityName = cityName };
                string jsonStr = Convert.ToString(EntranceApi.Entrance(name, para.ToJSONjss(), _fxtApi: fxtApi));

                if (string.IsNullOrEmpty(jsonStr))
                {
                    fxtApi.Abort();
                    return(null);
                }
                project = FxtApi_DATProject.ConvertToObj(jsonStr);
                project = project.DecodeField();
                fxtApi.Abort();
            }
            catch (Exception ex)
            {
                fxtApi.Abort();
                log.Error(string.Format("GetProjectByProjectNameAndCityName(string projectName:{0}, string cityName:{1})",
                                        projectName == null ? "null" : "", cityName == null ? "null" : ""), ex);
            }
            return(project);
        }
Ejemplo n.º 5
0
        /// <summary>
        /// 根据房讯通城市ID and 案例ID获取案例信息
        /// </summary>
        /// <param name="fxtCityId"></param>
        /// <param name="fxtCaseId"></param>
        /// <returns></returns>
        public static FxtApi_DATCase GetCaseByFxtCityIdAndCaseId(int fxtCityId, int fxtCaseId, FxtAPIClientExtend _fxtApi = null)
        {
            FxtApi_DATCase     _case  = null;
            FxtAPIClientExtend fxtApi = new FxtAPIClientExtend(_fxtApi);

            try
            {
                JObject jObjPara = new JObject();
                jObjPara.Add(new JProperty("cityId", fxtCityId));
                jObjPara.Add(new JProperty("caseId", fxtCaseId));
                string methodName = "GetCaseByCityIdAndCaseId";
                string jsonStr    = Convert.ToString(EntranceApi.Entrance(methodName, jObjPara.ToJSONjss(), _fxtApi: fxtApi));
                if (string.IsNullOrEmpty(jsonStr))
                {
                    fxtApi.Abort();
                    return(_case);
                }
                _case = FxtApi_DATCase.ConvertToObj(jsonStr);
                _case = _case.DecodeField();
                fxtApi.Abort();
            }
            catch (Exception ex)
            {
                log.Error(string.Format("GetCaseByFxtCityIdAndCaseId(int fxtCityId:{0}, int fxtCaseId:{1}, FxtAPIClientExtend _fxtApi = null)", fxtCityId, fxtCaseId), ex);
                fxtApi.Abort();
            }
            return(_case);
        }
Ejemplo n.º 6
0
        public static List <FxtApi_SYSProvince> GetAllProvince(FxtAPIClientExtend _fxtApi = null)
        {
            List <FxtApi_SYSProvince> list   = new List <FxtApi_SYSProvince>();
            FxtAPIClientExtend        fxtApi = new FxtAPIClientExtend(_fxtApi);

            try
            {
                string name    = "GetProvince";
                string jsonStr = Convert.ToString(EntranceApi.Entrance(name, "", _fxtApi: fxtApi));

                FxtApi_PublicResult result = FxtApi_PublicResult.ConvertToObj(jsonStr);
                if (result == null || string.IsNullOrEmpty(Convert.ToString(result.data)))
                {
                    fxtApi.Abort();
                    return(new List <FxtApi_SYSProvince>());
                }
                list = FxtApi_SYSProvince.ConvertToObjList(Convert.ToString(result.data));
                fxtApi.Abort();
            }
            catch (Exception ex)
            {
                fxtApi.Abort();
                log.Error("GetAllProvince()", ex);
            }
            return(list);
        }
Ejemplo n.º 7
0
        /// <summary>
        /// 根据城市名称 and 多个楼盘Ids获取案例Id+楼盘名
        /// </summary>
        /// <param name="cityId"></param>
        /// <param name="fxtCaseIds"></param>
        /// <returns></returns>
        public static Dictionary <int, string> GetCaseIdJoinProjectNameByCityNameAndCaseIds(string cityName, int[] fxtCaseIds, FxtAPIClientExtend _fxtApi = null)
        {
            Dictionary <int, string> dic    = new Dictionary <int, string>();
            FxtAPIClientExtend       fxtApi = new FxtAPIClientExtend(_fxtApi);

            try
            {
                string name    = "GetCityByCityName";
                var    para    = new { cityName = cityName };
                string jsonStr = Convert.ToString(EntranceApi.Entrance(name, para.ToJSONjss(), _fxtApi: fxtApi));

                if (string.IsNullOrEmpty(jsonStr))
                {
                    fxtApi.Abort();
                    return(dic);
                }
                FxtApi_SYSCity city = FxtApi_SYSCity.ConvertToObj(jsonStr);
                if (city == null)
                {
                    fxtApi.Abort();
                    return(dic);
                }
                int cityId = city.CityId;
                dic = GetCaseIdJoinProjectNameByFxtCityIdAndCaseIds(cityId, fxtCaseIds, _fxtApi: fxtApi);
                fxtApi.Abort();
            }
            catch (Exception ex)
            {
                fxtApi.Abort();
                log.Error(string.Format("GetCaseIdJoinProjectNameByCityNameAndCaseIds(string cityName:{0}, int[] fxtCaseIds)", cityName == null ? "null" : ""), ex);
            }
            return(dic);
        }
Ejemplo n.º 8
0
        /// <summary>
        /// 根据名称成城市ID,获取楼盘信息(关联网络名查询)
        /// </summary>
        /// <param name="projectName">名字</param>
        /// <param name="fxtCityId">服务端的城市ID</param>
        /// <returns></returns>
        public static List <FxtApi_DATProject> GetProjectJoinProjectMatchByProjectNameCityId(string projectName, int fxtCityId, FxtAPIClientExtend _fxtApi = null)
        {
            if (string.IsNullOrEmpty(projectName))
            {
                return(new List <FxtApi_DATProject>());
            }
            List <FxtApi_DATProject> list   = new List <FxtApi_DATProject>();
            FxtAPIClientExtend       fxtApi = new FxtAPIClientExtend(_fxtApi);

            try
            {
                string name    = "GetProjectJoinProjectMatchByProjectNameCityId";
                var    para    = new { projectName = projectName, cityId = fxtCityId };
                string jsonStr = Convert.ToString(EntranceApi.Entrance(name, para.ToJSONjss(), _fxtApi: fxtApi));

                if (string.IsNullOrEmpty(jsonStr))
                {
                    fxtApi.Abort();
                    return(new List <FxtApi_DATProject>());
                }
                list = FxtApi_DATProject.ConvertToObjList(jsonStr);
                list = list.DecodeField();
                fxtApi.Abort();
            }
            catch (Exception ex)
            {
                fxtApi.Abort();
                log.Error(string.Format("GetProjectJoinProjectMatchByProjectNameCityId(string projectName:{0}, int fxtCityId:{1})",
                                        projectName == null ? "null" : "", fxtCityId), ex);
            }
            return(list);
        }
Ejemplo n.º 9
0
        /// <summary>
        /// 根据条件获取DATProjectAvgPrice
        /// </summary>
        /// <param name="projectId"></param>
        /// <param name="fxtCityId"></param>
        /// <param name="purposeCode"></param>
        /// <param name="buildingTypeCode"></param>
        /// <param name="buildingAreaCode"></param>
        /// <param name="date"></param>
        /// <param name="dateRange"></param>
        /// <param name="_fxtApi"></param>
        /// <returns></returns>
        public static List <FxtApi_DATProjectAvgPrice> GetProjectAvgPriceByProjectIdAndCityIdAndBy(int projectId, int fxtCityId, int purposeCode, int?buildingTypeCode, int?buildingAreaCode, string date, int dateRange, FxtAPIClientExtend _fxtApi = null)
        {
            List <FxtApi_DATProjectAvgPrice> list = new List <FxtApi_DATProjectAvgPrice>();
            FxtAPIClientExtend fxtApi             = new FxtAPIClientExtend(_fxtApi);

            try
            {
                string name = "GetProjectAvgPriceByProjectIdAndCityIdAndBy";
                var    para = new { projectId = projectId, cityId = fxtCityId, purposeCode = purposeCode, buildingTypeCode = buildingTypeCode, buildingAreaCode = buildingAreaCode, date = date, dateRange = dateRange };

                string json = Convert.ToString(EntranceApi.Entrance(name, para.ToJSONjss(), _fxtApi: fxtApi));
                FxtApi_PublicResult result = FxtApi_PublicResult.ConvertToObj(json);
                if (result == null || string.IsNullOrEmpty(Convert.ToString(result.data)))
                {
                    fxtApi.Abort();
                    return(list);
                }
                list = FxtApi_DATProjectAvgPrice.ConvertToObjList(Convert.ToString(result.data));
                fxtApi.Abort();
            }
            catch (Exception ex)
            {
                log.Error("GetProjectAvgPriceByProjectIdAndCityIdAndBy", ex);
                fxtApi.Abort();
            }
            return(list);
        }
Ejemplo n.º 10
0
        /// <summary>
        /// 获取别墅相关的住宅用途
        /// </summary>
        /// <param name="_fxtApi"></param>
        /// <returns></returns>
        public static List <FxtApi_SYSCode> GetPurposeTypeCodeVillaType(FxtAPIClientExtend _fxtApi = null)
        {
            List <FxtApi_SYSCode> list   = new List <FxtApi_SYSCode>();
            FxtAPIClientExtend    fxtApi = new FxtAPIClientExtend(_fxtApi);

            try
            {
                string name    = "GetPurposeTypeCodeVillaType";
                string jsonStr = Convert.ToString(EntranceApi.Entrance(name, "", _fxtApi: fxtApi));
                if (string.IsNullOrEmpty(jsonStr))
                {
                    fxtApi.Abort();
                    return(new List <FxtApi_SYSCode>());
                }
                list = FxtApi_SYSCode.ConvertToObjList(jsonStr);
                list.DecodeField <FxtApi_SYSCode>();
                fxtApi.Abort();
            }
            catch (Exception ex)
            {
                fxtApi.Abort();
                log.Error("GetPurposeTypeCodeVillaType()", ex);
            }
            return(list);
        }
Ejemplo n.º 11
0
        public static FxtApi_DATProjectAvgPrice ResetCross(int projectId, int fxtCityId, int purposeTypeCode, int buildingTypeCode, int buildingAreaType, string date, out string message, FxtAPIClientExtend _fxtApi = null)
        {
            message = "";
            FxtAPIClientExtend        fxtApi   = new FxtAPIClientExtend(_fxtApi);
            FxtApi_DATProjectAvgPrice avgPrice = null;

            try
            {
                string name    = "ResetCrossBy";
                var    para    = new { projectId = projectId, cityId = fxtCityId, purposeTypeCode = purposeTypeCode, buildingTypeCode = buildingTypeCode, buildingAreaType = buildingAreaType, date = date };
                string jsonStr = Convert.ToString(EntranceApi.Entrance(name, para.ToJSONjss(), _fxtApi: fxtApi));

                if (!string.IsNullOrEmpty(jsonStr))
                {
                    avgPrice = FxtApi_DATProjectAvgPrice.ConvertToObj(jsonStr);
                }
            }
            catch (Exception ex)
            {
                fxtApi.Abort();
                message = "系统异常";
                log.Error("ResetCross(int projectId, int fxtCityId, int purposeTypeCode, int buildingTypeCode, int buildingAreaType, string date, FxtAPIClientExtend _fxtApi = null)", ex);
                return(null);
            }
            fxtApi.Abort();
            return(avgPrice);
        }
Ejemplo n.º 12
0
        public static List <FxtApi_SYSCode> GetSYSCodeById(int id, FxtAPIClientExtend _fxtApi = null)
        {
            List <FxtApi_SYSCode> list   = new List <FxtApi_SYSCode>();
            FxtAPIClientExtend    fxtApi = new FxtAPIClientExtend(_fxtApi);

            try
            {
                string name    = "GetSYSCodeByID";
                var    para    = new { id = id };
                string jsonStr = Convert.ToString(EntranceApi.Entrance(name, para.ToJSONjss(), _fxtApi: fxtApi));

                if (string.IsNullOrEmpty(jsonStr))
                {
                    fxtApi.Abort();
                    return(new List <FxtApi_SYSCode>());
                }
                list = FxtApi_SYSCode.ConvertToObjList(jsonStr);
                list.DecodeField <FxtApi_SYSCode>();
                fxtApi.Abort();
            }
            catch (Exception ex)
            {
                fxtApi.Abort();
                log.Error("GetSYSCodeById(int id,FxtAPIClientExtend _fxtApi = null)", ex);
            }
            return(list);
        }
Ejemplo n.º 13
0
        /// <summary>
        /// 根据城市ID和多个caseId删除案例
        /// </summary>
        /// <param name="fxtCityId"></param>
        /// <param name="caseIds"></param>
        /// <param name="message"></param>
        /// <param name="_fxtApi"></param>
        /// <returns></returns>
        public static bool DeleteCaseByFxtCityIdAndCaseIds(int fxtCityId, int[] caseIds, out string message, FxtAPIClientExtend _fxtApi = null)
        {
            message = "";
            if (caseIds == null || caseIds.Length < 1)
            {
                return(true);
            }
            FxtAPIClientExtend fxtApi = new FxtAPIClientExtend(_fxtApi);

            try
            {
                string name = "DeleteCaseByCityIdAndCaseIds";
                var    para = new { cityId = fxtCityId, caseIds = caseIds.ConvertToString() };
                string json = Convert.ToString(EntranceApi.Entrance(name, para.ToJSONjss(), _fxtApi: fxtApi));
                FxtApi_PublicResult result = FxtApi_PublicResult.ConvertToObj(json);
                bool _re = true;
                if (result.type == 0)
                {
                    message = result.message.DecodeField();
                    _re     = false;
                }
                fxtApi.Abort();
                return(_re);
            }
            catch (Exception ex)
            {
                message = "系统异常";
                log.Error("DeleteCaseByCityIdAndCaseIds(int cityId, int[] caseIds,out string message)", ex);
                fxtApi.Abort();
                return(false);
            }
            return(true);
        }
Ejemplo n.º 14
0
        /// <summary>
        /// 根据城市名称获取城市信息
        /// </summary>
        /// <param name="cityName"></param>
        /// <returns></returns>
        public static FxtApi_SYSCity GetCityByCityName(string cityName, FxtAPIClientExtend _fxtApi = null)
        {
            FxtApi_SYSCity     city   = null;
            FxtAPIClientExtend fxtApi = new FxtAPIClientExtend(_fxtApi);

            try
            {
                string name    = "GetCityByCityName";
                var    para    = new { cityName = cityName };
                string jsonStr = Convert.ToString(EntranceApi.Entrance(name, para.ToJSONjss(), _fxtApi: fxtApi));
                if (string.IsNullOrEmpty(jsonStr))
                {
                    fxtApi.Abort();
                    return(null);
                }
                city = FxtApi_SYSCity.ConvertToObj(jsonStr);
                fxtApi.Abort();
            }
            catch (Exception ex)
            {
                fxtApi.Abort();
                log.Error(string.Format("GetCityByCityName(string cityName:{0})", cityName == null ? "null" : ""), ex);
            }
            return(city);
        }
Ejemplo n.º 15
0
        /// <summary>
        /// 根据fxt省份ID获取城市信息
        /// </summary>
        /// <param name="fxtProvinceId"></param>
        /// <returns></returns>
        public static List <FxtApi_SYSCity> GetCityByProvinceId(int fxtProvinceId, FxtAPIClientExtend _fxtApi = null)
        {
            List <FxtApi_SYSCity> list   = new List <FxtApi_SYSCity>();
            FxtAPIClientExtend    fxtApi = new FxtAPIClientExtend(_fxtApi);

            try
            {
                string name                = "GetCity";
                var    para                = new { provinceId = fxtProvinceId };
                string jsonStr             = Convert.ToString(EntranceApi.Entrance(name, para.ToJSONjss(), _fxtApi: fxtApi));
                FxtApi_PublicResult result = FxtApi_PublicResult.ConvertToObj(jsonStr);
                if (result == null || string.IsNullOrEmpty(Convert.ToString(result.data)))
                {
                    fxtApi.Abort();
                    return(new List <FxtApi_SYSCity>());
                }

                list = FxtApi_SYSCity.ConvertToObjList(Convert.ToString(result.data));
                fxtApi.Abort();
            }
            catch (Exception ex)
            {
                fxtApi.Abort();
                log.Error(string.Format(" GetCityByProvinceId(int provinceId:{0})", fxtProvinceId), ex);
            }
            return(list);
        }
Ejemplo n.º 16
0
        /// <summary>
        /// 根据字段code获取code信息
        /// </summary>
        /// <param name="code"></param>
        /// <param name="_fxtApi"></param>
        /// <returns></returns>
        public static FxtApi_SYSCode GetSYSCodeByCode(int code, FxtAPIClientExtend _fxtApi = null)
        {
            FxtApi_SYSCode     codeObj = null;
            FxtAPIClientExtend fxtApi  = new FxtAPIClientExtend(_fxtApi);

            try
            {
                JObject jObjPara = new JObject();
                jObjPara.Add(new JProperty("code", code));
                string methodName = "GetSYSCodeByCode";
                string jsonStr    = Convert.ToString(EntranceApi.Entrance(methodName, jObjPara.ToJSONjss(), _fxtApi: fxtApi));
                if (string.IsNullOrEmpty(jsonStr))
                {
                    fxtApi.Abort();
                    return(codeObj);
                }
                codeObj = FxtApi_SYSCode.ConvertToObj(jsonStr);
                codeObj = codeObj.DecodeField();
                fxtApi.Abort();
            }
            catch (Exception ex)
            {
                fxtApi.Abort();
                log.Error(string.Format("GetSYSCodeByCode(int code, FxtAPIClientExtend _fxtApi = null)),code={0}",
                                        code), ex);
            }
            return(codeObj);
        }
Ejemplo n.º 17
0
        public static List <FxtApi_DATProjectView> GetProjectViewByCityNameAndLikeProjectName(string projectNameLike, string cityName, int count, FxtAPIClientExtend _fxtApi = null)
        {
            if (string.IsNullOrEmpty(projectNameLike) || string.IsNullOrEmpty(cityName))
            {
                return(new List <FxtApi_DATProjectView>());
            }
            List <FxtApi_DATProjectView> list   = new List <FxtApi_DATProjectView>();
            FxtAPIClientExtend           fxtApi = new FxtAPIClientExtend(_fxtApi);

            try
            {
                string name    = "GetProjectViewByCityNameAndLikePrjName";
                var    para    = new { cityName = cityName, projectName = projectNameLike, length = count };
                string jsonStr = Convert.ToString(EntranceApi.Entrance(name, para.ToJSONjss(), _fxtApi: fxtApi));

                if (string.IsNullOrEmpty(jsonStr))
                {
                    fxtApi.Abort();
                    return(new List <FxtApi_DATProjectView>());
                }
                list = FxtApi_DATProjectView.ConvertToObjList(jsonStr);
                list = list.DecodeField();
                fxtApi.Abort();
            }
            catch (Exception ex)
            {
                fxtApi.Abort();
                log.Error(string.Format("GetProjectViewByCityNameAndLikeProjectName(string projectNameLike:{0}, string cityName:{1}, int count:{2})",
                                        projectNameLike == null ? "null" : "", cityName == null ? "null" : "", count), ex);
            }
            return(list);
        }
Ejemplo n.º 18
0
        public static List <FxtApi_SYSArea> GetAreaByAreaIds(int[] areaIds, FxtAPIClientExtend _fxtApi = null)
        {
            string areaIdsStr          = areaIds.ConvertToString();
            List <FxtApi_SYSArea> list = new List <FxtApi_SYSArea>();

            if (string.IsNullOrEmpty(areaIdsStr))
            {
                return(list);
            }
            FxtAPIClientExtend fxtApi = new FxtAPIClientExtend(_fxtApi);

            try
            {
                JObject jObjPara = new JObject();
                jObjPara.Add(new JProperty("areaIds", areaIdsStr));
                string methodName = "GetSYSAreaByAreaIds";
                string jsonStr    = Convert.ToString(EntranceApi.Entrance(methodName, jObjPara.ToJSONjss(), _fxtApi: fxtApi));
                if (string.IsNullOrEmpty(jsonStr))
                {
                    fxtApi.Abort();
                    return(new List <FxtApi_SYSArea>());
                }
                list = FxtApi_SYSArea.ConvertToObjList(jsonStr);
                list = list.DecodeField();
                fxtApi.Abort();
            }
            catch (Exception ex)
            {
                fxtApi.Abort();
                log.Error(string.Format("GetAreaByAreaIds(int[] areaIds, FxtAPIClientExtend _fxtApi = null),areaIds={0}",
                                        areaIdsStr == null?"null":areaIdsStr), ex);
            }
            return(list);
        }
Ejemplo n.º 19
0
        public static void testcross()
        {
            FxtAPIClientExtend fxtApi = new FxtAPIClientExtend();

            try
            {
                JObject jObjPara = new JObject();
                jObjPara.Add(new JProperty("cityId", 1));
                string methodName = "testcross";
                string jsonStr    = Convert.ToString(EntranceApi.Entrance(methodName, jObjPara.ToJSONjss(), _fxtApi: fxtApi));

                fxtApi.Abort();
            }
            catch (Exception ex)
            {
            }
        }
Ejemplo n.º 20
0
        public static List <FxtApi_DATProjectAvgPrice> GetProjectAvgPriceByProjectIdsAndCityIdAndDateRangeAndAvgPriceDates(int[] projectIds, int fxtCityId, int dateRange, string[] avgPriceDates, FxtAPIClientExtend _fxtApi = null)
        {
            List <FxtApi_DATProjectAvgPrice> list = new List <FxtApi_DATProjectAvgPrice>();
            FxtAPIClientExtend fxtApi             = new FxtAPIClientExtend(_fxtApi);

            string name    = "GetProjectAvgPriceByProjectIdsAndCityIdAndDateRangeAndAvgPriceDates";
            var    para    = new { projectIds = projectIds.ConvertToString(), cityId = fxtCityId, dateRange = dateRange, avgPriceDates = avgPriceDates.ConvertToString() };
            string jsonStr = Convert.ToString(EntranceApi.Entrance(name, para.ToJSONjss(), _fxtApi: fxtApi));

            if (string.IsNullOrEmpty(jsonStr))
            {
                return(list);
            }
            list = FxtApi_DATProjectAvgPrice.ConvertToObjList(jsonStr);
            fxtApi.Abort();
            return(list);
        }
Ejemplo n.º 21
0
        public static List <FxtApi_DATProjectAvgPrice> GetCrossByCompanyId(int projectId, int fxtCityId, int codeType, string date, int fxtCompanyId, FxtAPIClientExtend _fxtApi = null)
        {
            List <FxtApi_DATProjectAvgPrice> list = new List <FxtApi_DATProjectAvgPrice>();
            FxtAPIClientExtend fxtApi             = new FxtAPIClientExtend(_fxtApi);


            string name    = "CrossByFxtCompanyId";
            var    para    = new { projectId = projectId, cityId = fxtCityId, codeType = codeType, date = date, fxtCompanyId = fxtCompanyId };
            string jsonStr = Convert.ToString(EntranceApi.Entrance(name, para.ToJSONjss(), _fxtApi: fxtApi));

            if (string.IsNullOrEmpty(jsonStr))
            {
                return(list);
            }
            list = FxtApi_DATProjectAvgPrice.ConvertToObjList(jsonStr);
            fxtApi.Abort();
            return(list);
        }
Ejemplo n.º 22
0
        public static int GetCrossProjectByCodeType(int projectId, int fxtCityId, int codeType, string date, FxtAPIClientExtend _fxtApi = null)
        {
            FxtAPIClientExtend fxtApi = new FxtAPIClientExtend(_fxtApi);


            string name    = "CrossProjectByCodeType";
            var    para    = new { projectId = projectId, cityId = fxtCityId, codeType = codeType, date = date };
            string jsonStr = Convert.ToString(EntranceApi.Entrance(name, para.ToJSONjss(), _fxtApi: fxtApi));

            fxtApi.Abort();
            FxtApi_PublicResult result = FxtApi_PublicResult.ConvertToObj(jsonStr);

            if (result == null || string.IsNullOrEmpty(Convert.ToString(result.data)))
            {
                return(0);
            }
            return(Convert.ToInt32(result.data));
        }
Ejemplo n.º 23
0
        /// <summary>
        /// 查询案例
        /// </summary>
        /// <param name="fxtCityId"></param>
        /// <param name="projectId"></param>
        /// <param name="buildingTypeCode"></param>
        /// <param name="purposeCode">用途</param>
        /// <param name="buildingAreaCode">面积段code</param>
        /// <param name="startDate">案例时间</param>
        /// <param name="endDate"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="count"></param>
        /// <param name="isGetCount">是否获取总个数</param>
        /// <returns></returns>
        public static List <FxtApi_DATCase> GetCaseByFxtCityIdAndFxtProjectIdAndBuildingTypeCodeAndPurposeCodeAndAreaTypeAndDate(int fxtCityId, int projectId, string fxtCompanyIds, int?buildingTypeCode, int purposeCode, int?buildingAreaCode, DateTime?startDate, DateTime?endDate, int pageIndex, int pageSize, out int count, bool isGetCount = true, FxtAPIClientExtend _fxtApi = null)
        {
            count = 0;
            int isgetcount = 1;

            if (!isGetCount)
            {
                isgetcount = 0;
            }
            FxtAPIClientExtend fxtApi = new FxtAPIClientExtend(_fxtApi);


            string name = "GetCaseByCityIdAndProjectIdAndPurposeCodeAndBuildingTypeCodeAndAreaTypeAndDateAndPage";
            var    para = new
            {
                cityId           = fxtCityId,
                projectId        = projectId,
                fxtCompanyIds    = fxtCompanyIds,
                buildingTypeCode = buildingTypeCode,
                purposeCode      = purposeCode,
                buildingAreaCode = buildingAreaCode,
                startDate        = Convert.ToString(startDate),
                endDate          = Convert.ToString(endDate),
                pageIndex        = pageIndex,
                pageSize         = pageSize,
                isGetCount       = isgetcount
            };
            string jsonStr = Convert.ToString(EntranceApi.Entrance(name, para.ToJSONjss(), _fxtApi: fxtApi));

            if (string.IsNullOrEmpty(jsonStr))
            {
                fxtApi.Abort();
                return(new List <FxtApi_DATCase>());
            }
            FxtApi_ResultPageList listObj = FxtApi_ResultPageList.ConvertToObj(jsonStr);

            count = listObj.Count;
            List <FxtApi_DATCase> list = FxtApi_DATCase.ConvertToObjList(listObj.ObjJson);

            list = list.DecodeField();
            fxtApi.Abort();
            return(list);
        }
Ejemplo n.º 24
0
        public static FxtApi_SYSProvince GetProvinceById(int fxtId, FxtAPIClientExtend _fxtApi = null)
        {
            FxtApi_SYSProvince obj    = null;
            FxtAPIClientExtend fxtApi = new FxtAPIClientExtend(_fxtApi);

            try
            {
                string name    = "GetProvinceById";
                var    para    = new { provinceId = fxtId };
                string jsonStr = Convert.ToString(EntranceApi.Entrance(name, para.ToJSONjss(), _fxtApi: fxtApi));
                obj = FxtApi_SYSProvince.ConvertToObj(jsonStr);
                fxtApi.Abort();
            }
            catch (Exception ex)
            {
                fxtApi.Abort();
                log.Error(string.Format("GetProvinceById(int Id:{0})", fxtId), ex);
            }
            return(obj);
        }
Ejemplo n.º 25
0
        /// <summary>
        /// 根据房讯通城市ID and 多个楼盘Ids获取案例Id+楼盘名
        /// </summary>
        /// <param name="cityId"></param>
        /// <param name="fxtCaseIds"></param>
        /// <returns></returns>
        public static Dictionary <int, string> GetCaseIdJoinProjectNameByFxtCityIdAndCaseIds(int fxtCityId, int[] fxtCaseIds, FxtAPIClientExtend _fxtApi = null)
        {
            Dictionary <int, string> dic    = new Dictionary <int, string>();
            FxtAPIClientExtend       fxtApi = new FxtAPIClientExtend(_fxtApi);

            try
            {
                if (fxtCaseIds == null || fxtCaseIds.Length < 1)
                {
                    return(dic);
                }
                string fxtCaseIdsStr = fxtCaseIds.ConvertToString();


                string name    = "GetCaseIdJoinProjectNameByCityIdAndCaseIds";
                var    para    = new { cityId = fxtCityId, caseIds = fxtCaseIdsStr };
                string jsonStr = Convert.ToString(EntranceApi.Entrance(name, para.ToJSONjss(), _fxtApi: fxtApi));
                fxtApi.Abort();
                if (string.IsNullOrEmpty(jsonStr))
                {
                    return(dic);
                }
                JArray jarray = JArray.Parse(jsonStr);
                foreach (JObject jobject in jarray)
                {
                    int    fxtCaseId   = jobject["CaseId"].Value <int>();
                    string projectName = jobject["ProjectName"].Value <string>();
                    projectName = projectName.DecodeField();
                    if (!dic.ContainsKey(fxtCaseId))
                    {
                        dic.Add(fxtCaseId, projectName);
                    }
                }
            }
            catch (Exception ex)
            {
                fxtApi.Abort();
                log.Error(string.Format("GetCaseIdJoinProjectNameByFxtCityIdAndCaseIds(int fxtCityId:{0}, int[] fxtCaseIds)", fxtCityId), ex);
            }
            return(dic);
        }
Ejemplo n.º 26
0
        public static FxtApi_PriviCompanyShowData GetPriviCompanyShowDataByCompanyIdAndCityId(int fxtCompanyId, int fxtCityId, FxtAPIClientExtend _fxtApi = null)
        {
            FxtAPIClientExtend fxtApi = new FxtAPIClientExtend(_fxtApi);
            string             name   = "GetPriviCompanyShowDataByCompanyIdAndCityId";
            var para = new
            {
                fxtCompanyId = fxtCompanyId,
                cityId       = fxtCityId
            };
            string jsonStr = Convert.ToString(EntranceApi.Entrance(name, para.ToJSONjss(), _fxtApi: fxtApi));

            fxtApi.Abort();
            FxtApi_PublicResult resultObj = FxtApi_PublicResult.ConvertToObj(jsonStr);

            if (resultObj == null || string.IsNullOrEmpty(Convert.ToString(resultObj.data)))
            {
                return(null);
            }
            FxtApi_PriviCompanyShowData obj = FxtApi_PriviCompanyShowData.ConvertToObj(Convert.ToString(resultObj.data));

            return(obj);
        }
Ejemplo n.º 27
0
        /// <summary>
        /// 获取指定日期楼盘下各别墅用途的案例个数
        /// </summary>
        /// <param name="fxtCityId"></param>
        /// <param name="projectId"></param>
        /// <param name="date"></param>
        /// <param name="_fxtApi"></param>
        /// <returns></returns>
        public static List <FxtApi_ProjectJoinPurposeTypeJoinVillaCaseCount> GetCaseCountJoinProjectJoinPurposeTypeByVillaPurposeAndCityIdAndProjectIdAndDate(int fxtCityId, int projectId, string fxtCompanyIds, string date, FxtAPIClientExtend _fxtApi = null)
        {
            List <FxtApi_ProjectJoinPurposeTypeJoinVillaCaseCount> objList = new List <FxtApi_ProjectJoinPurposeTypeJoinVillaCaseCount>();

            if (string.IsNullOrEmpty(date))
            {
                return(objList);
            }
            FxtAPIClientExtend fxtApi = new FxtAPIClientExtend(_fxtApi);


            string name    = "GetCaseCountJoinProjectJoinPurposeTypeByVillaPurposeAndCityIdAndProjectIdAndDate";
            var    para    = new { cityId = fxtCityId, projectId = projectId, fxtCompanyIds = fxtCompanyIds, date = date };
            string jsonStr = Convert.ToString(EntranceApi.Entrance(name, para.ToJSONjss(), _fxtApi: fxtApi));

            if (string.IsNullOrEmpty(jsonStr))
            {
                return(objList);
            }
            objList = FxtApi_ProjectJoinPurposeTypeJoinVillaCaseCount.ConvertToObjList(jsonStr);
            fxtApi.Abort();
            return(objList);
        }
Ejemplo n.º 28
0
        public static bool UpdateCase(int fxtCityId, FxtApi_DATCase caseObj, out string message, FxtAPIClientExtend _fxtApi = null)
        {
            message = "";
            if (caseObj == null)
            {
                return(true);
            }
            FxtAPIClientExtend fxtApi = new FxtAPIClientExtend(_fxtApi);

            try
            {
                string caseJson = caseObj.EncodeField().ToJSONjss();


                string name    = "UpdateCase";
                var    para    = new { cityId = fxtCityId, caseJson = caseJson };
                string jsonStr = Convert.ToString(EntranceApi.Entrance(name, para.ToJSONjss(), _fxtApi: fxtApi));

                FxtApi_Result result = FxtApi_Result.ConvertToObj(jsonStr);
                if (result.Result == 0)
                {
                    message = result.Message.DecodeField();
                    fxtApi.Abort();
                    return(false);
                }
                fxtApi.Abort();
                caseObj.DecodeField();
            }
            catch (Exception ex)
            {
                message = "系统异常";
                log.Error("UpdateCase(int fxtCityId, FxtApi_DATCase caseObj, out string message)", ex);
                fxtApi.Abort();
                return(false);
            }
            return(true);
        }
Ejemplo n.º 29
0
        /// <summary>
        /// 根据房讯通城市ID and 多个案例ID获取案例信息
        /// </summary>
        /// <param name="fxtCityId"></param>
        /// <param name="fxtIds"></param>
        /// <returns></returns>
        public static List <FxtApi_DATCase> GetCaseByFxtCityIdAndCaseIds(int fxtCityId, int[] fxtCaseIds, FxtAPIClientExtend _fxtApi = null)
        {
            if (fxtCaseIds == null || fxtCaseIds.Length < 1)
            {
                return(new List <FxtApi_DATCase>());
            }
            List <FxtApi_DATCase> list   = new List <FxtApi_DATCase>();
            FxtAPIClientExtend    fxtApi = new FxtAPIClientExtend(_fxtApi);

            try
            {
                StringBuilder sb = new StringBuilder("");
                foreach (int id in fxtCaseIds)
                {
                    sb.Append(id).Append(",");
                }
                string str = sb.ToString().TrimEnd(',');

                string name    = "GetCaseByCityIdAndCaseIds";
                var    para    = new { cityId = fxtCityId, caseIds = str };
                string jsonStr = Convert.ToString(EntranceApi.Entrance(name, para.ToJSONjss(), _fxtApi: fxtApi));

                if (string.IsNullOrEmpty(jsonStr))
                {
                    return(new List <FxtApi_DATCase>());
                }
                list = FxtApi_DATCase.ConvertToObjList(jsonStr);
                list = list.DecodeField <FxtApi_DATCase>();
                fxtApi.Abort();
            }
            catch (Exception ex)
            {
                log.Error(string.Format("GetCaseByFxtCityIdAndCaseIds(int fxtCityId:{0}, int[] fxtCaseIds)", fxtCityId), ex);
                fxtApi.Abort();
            }
            return(list);
        }
Ejemplo n.º 30
0
        public static bool InsertProjectMatch(List <FxtApi_SYSProjectMatch> list, out string message, FxtAPIClientExtend _fxtApi = null)
        {
            message = "";
            if (list == null || list.Count < 1)
            {
                return(true);
            }
            FxtAPIClientExtend fxtApi = new FxtAPIClientExtend(_fxtApi);

            try
            {
                list = list.EncodeField();
                string json = list.ToJSONjss();


                string name    = "InsertSYSProjectMatchList";
                var    para    = new { jsonData = json };
                string jsonStr = Convert.ToString(EntranceApi.Entrance(name, para.ToJSONjss(), _fxtApi: fxtApi));

                FxtApi_Result result = FxtApi_Result.ConvertToObj(jsonStr);
                if (result.Result == 0)
                {
                    message = result.Message.DecodeField();
                    fxtApi.Abort();
                    return(false);
                }
                fxtApi.Abort();
            }
            catch (Exception ex)
            {
                fxtApi.Abort();
                log.Error("InsertProjectMatch(List<FxtApi_SYSProjectMatch> list,out string message)", ex);
                return(false);
            }
            return(true);
        }