Beispiel #1
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);
        }
Beispiel #2
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);
        }
Beispiel #3
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);
        }
Beispiel #4
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);
        }