Esempio n. 1
0
        /// <summary>
        /// 获取分行的客户渗透率
        /// </summary>
        /// <param name="isGetPenetranceByBranch"></param>
        /// <param name="userID"></param>
        /// <param name="param"></param>
        /// <returns></returns>
        public OperationResult PostPenetranceByBranch(Boolean isGetPenetranceByBranch, string userID, branchParams param)
        {
            var result = new OperationResult();

            CommomMethods.visitLog(2, param.bankID, userID);
            try
            {
                using (var db = new HeatMapEntities())
                {
                    var cmbUserCount       = db.Pro_GetTwoBankData(param.bankID, param.level, param.type, param.isAum, param.AUMLevel, param.UMPLlevel, param.isNoDF, param.isCheck, param.longitude, param.latitude, param.distance * 2).Sum(x => x.UserCount);
                    var _3rdPartyUserCount = db.Pro_Get3rdDataByCityID(0, param.level, param.type, param.longitude, param.latitude, param.distance * 2).Sum(x => x.UserCount);
                    result.ReturnData = new
                    {
                        cmbUserCount       = cmbUserCount,
                        _3rdPartyUserCount = _3rdPartyUserCount
                    };
                    result.ReturnCode = 1;
                }
            }
            catch (Exception ex)
            {
                result.Message    = ex.Message;
                result.ReturnCode = 0;
                Logger.Log.Error(ex.StackTrace);
            }
            return(result);
        }
Esempio n. 2
0
        /// <summary>
        /// 城市级别获取热力图数据
        /// </summary>
        /// <param name="isGetPointsByBranchWithClientFilter"></param>
        /// <param name="userID"></param>
        /// <param name="param"></param>
        /// <returns></returns>
        public OperationResult PostPointsByBranchWithClientFilter(Boolean isGetPointsByBranchWithClientFilter, string userID, branchParams param)
        {
            var result = new OperationResult();

            CommomMethods.visitLog(2, param.bankID, userID);
            try
            {
                using (var db = new HeatMapEntities())
                {
                    var data = db.Pro_GetTwoBankData(param.bankID, param.level, param.type, param.isAum, param.AUMLevel, param.UMPLlevel, param.isNoDF, param.isCheck, param.longitude, param.latitude, param.distance * 2).ToList().Select(x => new HeatmapPoint
                    {
                        lng       = x.Longitude,
                        lat       = x.Latitude,
                        userCount = x.UserCount,
                        aumCount  = x.AUMMoney,
                        deposit   = x.DepositMoney
                    });
                    var _3rdPartyData = db.Pro_Get3rdDataByCityID(0, param.level, param.type, param.longitude, param.latitude, param.distance * 2).ToList().Select(x => new
                    {
                        lng        = x.Longitude,
                        lat        = x.Latitude,
                        thirdParty = x.UserCount,
                    });
                    result.ReturnData = new
                    {
                        CMBData       = data,
                        _3rdPartyData = _3rdPartyData
                    };
                    result.ReturnCode = 1;
                }
            }
            catch (Exception ex)
            {
                result.Message    = ex.Message;
                result.ReturnCode = 0;
                Logger.Log.Error(ex.StackTrace);
            }
            return(result);
        }