示例#1
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);
        }
示例#2
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);
        }
示例#3
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);
        }
示例#4
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);
        }
示例#5
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));
        }
示例#6
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);
        }