| GasolineBlend/Controllers/RRController.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| GasolineBlend/GasolineBlend.csproj | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| RiskControl.NewService/Entity/RiskControlRR/RRGraphChain.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| RiskControl.NewService/RiskControl.NewService.csproj | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| RiskControl.NewService/Service/RRService.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
GasolineBlend/Controllers/RRController.cs
New file @@ -0,0 +1,30 @@ using System.Linq; using System.Threading.Tasks; using System.Web.Mvc; using RiskControl.NewService.Service; namespace GasolineBlend.Controllers { public class RRController : BaseController { private readonly RRService _rrService = new RRService(); [HttpPost] public async Task<ActionResult> GetRRGraphChain(string mainNode) { var list = await _rrService.GetRRGraphChain(mainNode); var res = list.Select(a => new { label = a.AssociationNode, type = a.Relationship == "上级" ? "top" : "next", id = a.Id }).ToList(); var maxid = list.Max(a => a.Id); res.Add(new {label =mainNode, type="main", id = 0}); res.Add(new {label ="上级", type="topText", id = maxid+1}); res.Add(new {label ="下级", type="nextText", id = maxid+2}); res = res.OrderBy(a => a.id).ToList(); return SuccessNoShow(data: res); } } } GasolineBlend/GasolineBlend.csproj
@@ -328,6 +328,7 @@ <Compile Include="Controllers\PageRouteController.cs" /> <Compile Include="Controllers\PjrzController.cs" /> <Compile Include="Controllers\PjrzDataCountController.cs" /> <Compile Include="Controllers\RRController.cs" /> <Compile Include="Controllers\UseController.cs" /> <Compile Include="Controllers\PayController.cs" /> <Compile Include="Controllers\ProjectController.cs" /> RiskControl.NewService/Entity/RiskControlRR/RRGraphChain.cs
New file @@ -0,0 +1,25 @@ using SqlSugar; namespace RiskControl.NewService.Entity.RiskControlRR { public class RRGraphChain { /// <summary> /// ///</summary> [SugarColumn(ColumnName = "Id", IsPrimaryKey = true, IsIdentity = true)] public int Id { get; set; } /// <summary> /// 中心点 /// </summary> public string MainNode { get; set; } /// <summary> /// 关联节点 /// </summary> public string AssociationNode { get; set; } /// <summary> /// 关系 /// </summary> public string Relationship { get; set; } } } RiskControl.NewService/RiskControl.NewService.csproj
@@ -160,6 +160,7 @@ <Compile Include="Entity\CreditRatingReportStar.cs" /> <Compile Include="Entity\QccDbEntity\SysCompanyOriginalName.cs" /> <Compile Include="Entity\RiskControlRR\PayErrLog.cs" /> <Compile Include="Entity\RiskControlRR\RRGraphChain.cs" /> <Compile Include="Entity\RiskControlRR\UseOrder.cs" /> <Compile Include="Entity\RiskControlRR\PayOrder.cs" /> <Compile Include="Entity\RiskControlRR\PayRechargeAmount.cs" /> @@ -558,6 +559,7 @@ <Compile Include="Service\IndustryChainService.cs" /> <Compile Include="Service\LeaseProjService.cs" /> <Compile Include="Service\PjrzService.cs" /> <Compile Include="Service\RRService.cs" /> <Compile Include="Service\UseService.cs" /> <Compile Include="Service\SmartInvestAlarmService.cs" /> <Compile Include="Service\LeaseAlarmService.cs" /> RiskControl.NewService/Service/RRService.cs
New file @@ -0,0 +1,17 @@ using System.Collections.Generic; using System.Threading.Tasks; using RiskControl.NewService.Entity.RiskControlRR; namespace RiskControl.NewService.Service { public class RRService : DbContext { public async Task<List<RRGraphChain>> GetRRGraphChain(string mainNode) { var list = await RiskControlRRDb.Queryable<RRGraphChain>() .Where(a => a.MainNode == mainNode) .ToListAsync(); return list; } } }