| | |
| | | HttpWebRequest request = (System.Net.HttpWebRequest)WebRequest.Create(url); |
| | | request.Method = "POST"; |
| | | // 内容类型 |
| | | request.ContentType = "application/json"; |
| | | request.ContentType = "application/json;charset=utf-8"; |
| | | var payload = System.Text.Encoding.UTF8.GetBytes(content); |
| | | request.ContentLength = payload.Length; |
| | | Stream writer = request.GetRequestStream(); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | return ""; |
| | | return "Error"; |
| | | } |
| | | } |
| | | public object GetChinaStockDetail(int CompanyId, int ReportType, string TSCode, int Year) |
| | |
| | | industyStockListPara.SearchInfo = SearchInfo; |
| | | industyStockListPara.ReportType = ReportType; |
| | | string Content = JsonHelper.ToJson(industyStockListPara); |
| | | string GetSarchUrl = $"{URL}/IndustryStock/GetIndustryStockList"; |
| | | string Result = SendRequest(GetSarchUrl, Content, Encoding.UTF8); |
| | | string GetSearchUrl = $"{URL}/IndustryStock/GetIndustryStockList"; |
| | | string Result = SendRequest(GetSearchUrl, Content, Encoding.UTF8); |
| | | //JavaMsgData javaMsgData = JsonHelper.ToObject<JavaMsgData>(Result); |
| | | return (JObject)JsonConvert.DeserializeObject(Result); |
| | | } |
| | | |
| | | //public object GetWenCaiAnswerList(string SearchInfo, int PageSize,int PageNo) |
| | | //{ |
| | | // string URL = "http://www.iwencai.com/unifiedwap/unified-wap/v2/result/get-robot-data"; |
| | | // WenCaiListPara wenCaiListPara = new WenCaiListPara(); |
| | | // wenCaiListPara.question = SearchInfo; |
| | | // wenCaiListPara.perpage = PageSize.ToString(); |
| | | // wenCaiListPara.page = PageNo.ToString(); |
| | | // string Content = JsonHelper.ToJson(wenCaiListPara); |
| | | // string GetSearchUrl = URL;//+"?question=连续5日成交额大于5亿且股东人数&perpage=1000&page=1&secondary_intent=&log_info={'input_type':'click'}&source=Ths_iwencai_Xuangu&version=2.0"; |
| | | // string Result = SendRequest(GetSearchUrl, Content, Encoding.UTF8); |
| | | // return (JObject)JsonConvert.DeserializeObject(Result); |
| | | //} |
| | | |
| | | //public object GetChinaStockList(string SearchInfo, int ReportType) |
| | | //{ |
| | | // string URL = Configs.GetValue("HYSiteUrl"); |
| | |
| | | var StrWhere=" 1=1 "; |
| | | if (ParContent!="") |
| | | { |
| | | ParContent=ParContent.Replace("(", "").Replace(")", ""); |
| | | ParContent=ParContent.Replace("(", "(").Replace(")", ")"); |
| | | StrWhere += $" and (contains(Contents ,'*{ParContent}*')"; |
| | | if (ParContent.Length <= 5) //判断是否是上市公司并匹配20230318 |
| | | { |
| | |
| | | var chinaStockFirst = chinaStocks.FirstOrDefault(); |
| | | if (chinaStockFirst != null) |
| | | { |
| | | string FullName = chinaStockFirst.fullname; |
| | | string FullName = chinaStockFirst.fullname.Replace("(", "(").Replace(")", ")"); |
| | | StrWhere += $" or contains(Contents ,'*{FullName}*') "; |
| | | } |
| | | } |
| | |
| | | |
| | | for (int i = 0; i < InfoKeywordArray.Length; i++) |
| | | { |
| | | StrWhere += (i==0?"":" or ")+ $" contains(Contents ,'*{InfoKeywordArray[i].Trim()}*') "; |
| | | StrWhere += (i==0?"":" or ")+ $" contains(Contents ,'*{InfoKeywordArray[i].Trim().Replace("(", "(").Replace(")", ")")}*') "; |
| | | } |
| | | StrWhere += ")"; |
| | | } |
| | |
| | | var StrWhere = " 1=1 "; |
| | | if (ParContent != "") |
| | | { |
| | | ParContent = ParContent.Replace("(", "").Replace(")", ""); |
| | | ParContent = ParContent.Replace("(", "(").Replace(")", ")");//待优化 |
| | | StrWhere += $" and (contains(Contents ,'*{ParContent}*') "; //or Title like '%{ParContent}%' |
| | | if (ParContent.Length <= 5) //判断是否是上市公司并匹配20230318 |
| | | { |
| | |
| | | var chinaStockFirst = chinaStocks.FirstOrDefault(); |
| | | if (chinaStockFirst != null) |
| | | { |
| | | string FullName = chinaStockFirst.fullname; |
| | | string FullName = chinaStockFirst.fullname.Replace("(", "(").Replace(")", ")"); |
| | | StrWhere += $" or contains(Contents ,'*{FullName}*') "; //or Title like '%{FullName}%' |
| | | } |
| | | } |
| | |
| | | string[] InfoKeywordArray = InfoKeyword.Keyword.Split(new char[] { ',', ',' }); |
| | | for (int i = 0; i < InfoKeywordArray.Length; i++) |
| | | { |
| | | StrWhere += (i == 0 ? "" : " or ") + $" contains(Contents ,'*{InfoKeywordArray[i].Trim()}*') "; |
| | | StrWhere += (i == 0 ? "" : " or ") + $" contains(Contents ,'*{InfoKeywordArray[i].Trim().Replace("(", "(").Replace(")", ")")}*') "; |
| | | } |
| | | StrWhere += ")"; |
| | | } |
| | |
| | | <Compile Include="WaterfallInnerDAL.cs" /> |
| | | <Compile Include="WaterfallTableDAL.cs" /> |
| | | <Compile Include="CrawlerMonitorDAL.cs" /> |
| | | <Compile Include="WenCaiListPara.cs" /> |
| | | <Compile Include="WxUserDAL.cs" /> |
| | | <Compile Include="YongYiTrustDAL.cs" /> |
| | | </ItemGroup> |
| New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace GasolineBlend.DAL |
| | | { |
| | | public class WenCaiListPara |
| | | { |
| | | |
| | | public string question { get; set; } |
| | | |
| | | public string perpage { get; set; } |
| | | |
| | | public string page { get; set; } |
| | | |
| | | public string secondary_intent { get; set; } = ""; |
| | | |
| | | public string log_info { get; set; } = "{ 'input_type':'click' }"; |
| | | |
| | | public string source { get; set; } = "Ths_iwencai_Xuangu"; |
| | | |
| | | public string version { get; set; } = "2.0"; |
| | | } |
| | | } |
| | |
| | | { |
| | | switch (WarnLevel) |
| | | { |
| | | case 0: |
| | | return "无风险"; |
| | | case 1: |
| | | return "低风险"; |
| | | case 2: |
| | |
| | | /// 内容 |
| | | /// </summary> |
| | | public string Content { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 内容时间 |
| | | /// </summary> |
| | | public DateTime ContentTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 是否初次 |
| | | /// </summary> |
| | | public bool BlankFlag { get; set; } |
| | | |
| | | //public DateTime CreateTime { get; set; } |
| | | /// <summary> |
| | | /// 详情 |
| | |
| | | } |
| | | } |
| | | |
| | | //[HttpPost] |
| | | //public ActionResult GetChinaStockDetail(string fullName) |
| | | //{ |
| | | // try |
| | | // { |
| | | // var list = _acc.GetChinaStockDetail(fullName); |
| | | // return SuccessNoShow(data: list); |
| | | // } |
| | | // catch (Exception e) |
| | | // { |
| | | // LogHelper.Write(Level.Error, "获取上市公司股票详情 GetChinaStockDetail", e, |
| | | // "Guest"); //OperatorProvider.Instance.Current.LoginName |
| | | // return Error(); |
| | | // } |
| | | //} |
| | | |
| | | [HttpPost] |
| | | public ActionResult GetIndustryStockList(string SearchInfo, int ReportType) |
| | |
| | | return Error(); |
| | | } |
| | | } |
| | | |
| | | //[HttpPost] |
| | | //public ActionResult GetWenCaiAnswerList(string SearchInfo, int PageSize, int PageNo) |
| | | //{ |
| | | // try |
| | | // { |
| | | // var list = _acc.GetWenCaiAnswerList(SearchInfo,PageSize,PageNo); |
| | | // return SuccessNoShow(data: list); |
| | | // } |
| | | // catch (Exception e) |
| | | // { |
| | | // LogHelper.Write(Level.Error, "获取问财问答列表 GetWenCaiAnswerList", e, |
| | | // "Guest");//OperatorProvider.Instance.Current.LoginName |
| | | // return Error(); |
| | | // } |
| | | //} |
| | | } |
| | | } |
| | |
| | | using CommonHelper; |
| | | using GasolineBlend.BLL; |
| | | using GasolineBlend.Entity; |
| | | using GasolineBlend.Filter; |
| | | using RiskControl.NewService.Entity.RRAutoBIDB; |
| | | using RiskControl.NewService.Service; |
| | | using RiskControl.NewService.ViewModel; |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取指定Id的预警信息 |
| | | /// </summary> |
| | | /// <param name="Id"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | [LoginChecked(false)] |
| | | public ActionResult GetDynamicById(int Id) |
| | | { |
| | | var res = _alarmService.GetDynamicById(Id); |
| | | return SuccessNoShow(data: res); |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 获取投资事件的数量-投资方 |
| | | /// </summary> |
| | | /// <param name="title"></param> |
| | |
| | | account.MoneyMonitorId = MoneyMonitorId; |
| | | account.CompanyMonitorId = CompanyMonitorId; |
| | | account.CurrentTypeId = CurrentTypeId; |
| | | account.ValidDateTime=DateTime.Now.AddMonths(6); |
| | | account.Id = 0; |
| | | |
| | | var redisClient = new CustomerRedis(0); |
| | |
| | | //如果企业为空就返回空 |
| | | if (companyNames.Length == 0) return new List<WarnEventTypeCountResult>(); |
| | | |
| | | var sqlTemp = $@"SELECT EventType,COUNT(1) num INTO #temp FROM dbo.ComDynamic WHERE CompanyName IN ('{string.Join("','", companyNames)}') |
| | | var sqlTemp = $@"SELECT EventType,COUNT(1) num INTO #temp FROM dbo.ComDynamic WHERE BlankFlag=0 and CompanyName IN ('{string.Join("','", companyNames)}') |
| | | {(startTime == null ? "" : $" AND ContentTime>='{startTime:yyyy-MM-dd HH:mm:ss}'")} |
| | | {(endTime == null ? "" : $" AND ContentTime<='{endTime:yyyy-MM-dd HH:mm:ss}'")} |
| | | GROUP BY EventType;"; |
| | |
| | | { |
| | | eventTypeSql = @" |
| | | SELECT '新闻类' level1,EventType level2,SUM(num) num FROM #temp |
| | | WHERE EventType IN ('深度信息-经营信息-招投标','深度信息-经营信息-购地信息','深度信息-经营信息-招聘信息','深度信息-经营信息-新闻舆论','深度信息-经营信息-新闻快讯','深度信息-经营信息-新闻资讯','深度信息-经营信息-商标信息','深度信息-经营信息-专利信息') |
| | | WHERE EventType IN ('深度信息-经营信息-招投标','深度信息-经营信息-购地信息','深度信息-经营信息-招聘信息','深度信息-经营信息-新闻舆论','深度信息-经营信息-新闻快讯','深度信息-经营信息-新闻资讯','深度信息-经营信息-商标信息','深度信息-经营信息-专利信息') |
| | | GROUP BY EventType"; |
| | | } |
| | | else if (type == "公告类") |
| | | { |
| | | eventTypeSql = @" |
| | | SELECT '公告类' level1,EventType level2,SUM(num) num FROM #temp |
| | | WHERE EventType IN ('深度信息-上市信息-公司公告-业绩预告','深度信息-上市信息-公司公告-公司公告','深度信息-新三板上市信息-公司公告','深度信息-上市信息-行情走势-交易行情-每日指标', '深度信息-上市信息-行情走势-股东增减持') |
| | | WHERE EventType IN ('深度信息-上市信息-公司公告-业绩预告','深度信息-上市信息-公司公告-公司公告','深度信息-新三板上市信息-公司公告','深度信息-上市信息-行情走势-交易行情-每日指标', '深度信息-上市信息-行情走势-股东增减持','深度信息-上市信息-行情走势-交易行情-资金流向','深度信息-上市信息-行情走势-融资融券','深度信息-上市信息-行情走势-大宗交易','深度信息-上市信息-行情走势-股票回购','深度信息-上市信息-公司资料-基本信息','深度信息-上市信息-分红融资-分红送股') |
| | | GROUP BY EventType"; |
| | | } |
| | | else |
| | |
| | | "深度信息-经营信息-招投标", "深度信息-经营信息-购地信息", "深度信息-经营信息-招聘信息", "深度信息-经营信息-新闻舆论","深度信息-经营信息-新闻快讯","深度信息-经营信息-新闻资讯", "深度信息-经营信息-商标信息", |
| | | "深度信息-经营信息-专利信息" |
| | | }; |
| | | var anTypeArr = new[] {"深度信息-上市信息-公司公告-业绩预告", "深度信息-上市信息-公司公告-公司公告", "深度信息-新三板上市信息-公司公告", "深度信息-上市信息-行情走势-交易行情-每日指标", "深度信息-上市信息-行情走势-股东增减持" }; |
| | | var anTypeArr = new[] |
| | | { |
| | | "深度信息-上市信息-公司公告-业绩预告", "深度信息-上市信息-公司公告-公司公告", "深度信息-新三板上市信息-公司公告", "深度信息-上市信息-行情走势-交易行情-每日指标", |
| | | "深度信息-上市信息-行情走势-股东增减持", "深度信息-上市信息-行情走势-交易行情-资金流向", "深度信息-上市信息-行情走势-融资融券", "深度信息-上市信息-行情走势-大宗交易", |
| | | "深度信息-上市信息-行情走势-股票回购", "深度信息-上市信息-公司资料-基本信息","深度信息-上市信息-分红融资-分红送股" |
| | | }; |
| | | |
| | | |
| | | var sqlTemp = $@"SELECT EventType,WarnLevel,COUNT(1) Num FROM dbo.ComDynamic WHERE CompanyName IN ('{string.Join("','", companyNames)}') |
| | | var sqlTemp = $@"SELECT EventType,WarnLevel,COUNT(1) Num FROM dbo.ComDynamic WHERE BlankFlag=0 and CompanyName IN ('{string.Join("','", companyNames)}') |
| | | {(startTime == null ? "" : $" AND ContentTime>='{startTime:yyyy-MM-dd HH:mm:ss}'")} |
| | | {(endTime == null ? "" : $" AND ContentTime<='{endTime:yyyy-MM-dd HH:mm:ss}'")} |
| | | GROUP BY EventType,WarnLevel;"; |
| | |
| | | "深度信息-经营信息-招投标", "深度信息-经营信息-购地信息", "深度信息-经营信息-招聘信息", "深度信息-经营信息-新闻舆论","深度信息-经营信息-新闻快讯","深度信息-经营信息-新闻资讯", "深度信息-经营信息-商标信息", |
| | | "深度信息-经营信息-专利信息" |
| | | }; |
| | | var anTypeArr = new[] { "深度信息-上市信息-公司公告-业绩预告", "深度信息-上市信息-公司公告-公司公告", "深度信息-新三板上市信息-公司公告", "深度信息-上市信息-行情走势-交易行情-每日指标", "深度信息-上市信息-行情走势-股东增减持" }; |
| | | var anTypeArr = new[] |
| | | { |
| | | "深度信息-上市信息-公司公告-业绩预告", "深度信息-上市信息-公司公告-公司公告", "深度信息-新三板上市信息-公司公告", "深度信息-上市信息-行情走势-交易行情-每日指标", |
| | | "深度信息-上市信息-行情走势-股东增减持", "深度信息-上市信息-行情走势-交易行情-资金流向", "深度信息-上市信息-行情走势-融资融券", "深度信息-上市信息-行情走势-大宗交易", |
| | | "深度信息-上市信息-行情走势-股票回购", "深度信息-上市信息-公司资料-基本信息","深度信息-上市信息-分红融资-分红送股" |
| | | }; |
| | | var result = alarmDb.Queryable<ComDynamic>() |
| | | .WhereIF(startTime != null, a => a.ContentTime >= startTime) |
| | | .WhereIF(endTime != null, a => a.ContentTime <= endTime) |
| | |
| | | .WhereIF(type == "风险", a => rateTypeArr.Contains(a.EventType)) |
| | | .WhereIF(type == "新闻", a => newsTypeArr.Contains(a.EventType)) |
| | | .WhereIF(type == "公告", a => anTypeArr.Contains(a.EventType)) |
| | | .Where(a => a.BlankFlag == false) |
| | | .WhereIF(level != null, a => a.WarnLevel == level) |
| | | .ToList(); |
| | | return result; |
| | |
| | | "深度信息-经营信息-招投标", "深度信息-经营信息-购地信息", "深度信息-经营信息-招聘信息", "深度信息-经营信息-新闻舆论","深度信息-经营信息-新闻快讯","深度信息-经营信息-新闻资讯", "深度信息-经营信息-商标信息", |
| | | "深度信息-经营信息-专利信息" |
| | | }; |
| | | var anTypeArr = new[] { "深度信息-上市信息-公司公告-业绩预告", "深度信息-上市信息-公司公告-公司公告", "深度信息-新三板上市信息-公司公告", "深度信息-上市信息-行情走势-交易行情-每日指标", "深度信息-上市信息-行情走势-股东增减持" }; |
| | | var anTypeArr = new[] |
| | | { |
| | | "深度信息-上市信息-公司公告-业绩预告", "深度信息-上市信息-公司公告-公司公告", "深度信息-新三板上市信息-公司公告", "深度信息-上市信息-行情走势-交易行情-每日指标", |
| | | "深度信息-上市信息-行情走势-股东增减持", "深度信息-上市信息-行情走势-交易行情-资金流向", "深度信息-上市信息-行情走势-融资融券", "深度信息-上市信息-行情走势-大宗交易", |
| | | "深度信息-上市信息-行情走势-股票回购", "深度信息-上市信息-公司资料-基本信息","深度信息-上市信息-分红融资-分红送股" |
| | | }; |
| | | var orWhere = Expressionable.Create<ComDynamic>(); |
| | | orWhere.AndIF(eventType1.Contains("经营预警类"), a => a.EventType.StartsWith("深度信息-经营预警")) |
| | | .OrIF(eventType1.Contains("司法涉诉类"), a => a.EventType.StartsWith("深度信息-司法涉诉")) |
| | |
| | | .WhereIF(startTime != null, a => a.ContentTime >= startTime) |
| | | .WhereIF(endTime != null, a => a.ContentTime <= endTime) |
| | | .Where(a => companyNames.Contains(a.CompanyName)) |
| | | .Where(a => a.BlankFlag==false) |
| | | .Where(orWhere.ToExpression()) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(eventType2), a => a.EventType.EndsWith(eventType2)) |
| | | .WhereIF(warnLevel != null, a => a.WarnLevel == warnLevel) |
| | |
| | | return result; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 获取指定Id的预警信息 |
| | | /// </summary> |
| | | /// <param name="Id"></param> |
| | | /// <returns></returns> |
| | | public ComDynamic GetDynamicById(int Id) |
| | | { |
| | | var result = alarmDb.Queryable<ComDynamic>() |
| | | .WhereIF(Id > 0, a => a.Id == Id) |
| | | .First(); |
| | | return result; |
| | | } |
| | | } |
| | | } |
| | |
| | | var list = tushareService.GetMoneyFlow(queryParam); |
| | | if (list.Result.Data != null) |
| | | { |
| | | int WarnLevel = 1; |
| | | int WarnLevel = 0; |
| | | var slist = (list.Result.Data as IEnumerable<object>).ToList(); |
| | | //交易日期 |
| | | var trade_date = slist[0].GetType().GetProperty("trade_date").GetValue(slist[0]); |
| | |
| | | } |
| | | else |
| | | { |
| | | WarnLevel = 2; |
| | | Content += $"当日净流出{net_mf_vol}手,"; |
| | | } |
| | | if (Convert.ToDouble(net_mf_amount) > 0) |
| | |
| | | .AndIF(startTime != null, a => a.CreateTime >= startTime) |
| | | .AndIF(endTime != null, a => a.CreateTime <= endTime) |
| | | .AndIF(payment != null, a => a.Payment == payment) |
| | | .And(a=>a.PaymentStatus!= EnumPaymentStatus.Paying) |
| | | .ToExpression(); |
| | | |
| | | var res = await RiskControlRRDb.Queryable<PayOrder>() |