Commit 16c55603 by wangonghui

暂时代码提交

parent 41c60bd5
...@@ -330,5 +330,61 @@ namespace VIZ.TVP.WMCUP.Module ...@@ -330,5 +330,61 @@ namespace VIZ.TVP.WMCUP.Module
} }
/// <summary>
///女足球队历史数据统计
/// </summary>
/// <returns></returns>
public async static Task<TeamStats> PostTeamHistoryData_Path(string teamId)
{
try
{
GethttpUrl();
TeamStats teamStats = new TeamStats();
await Task.Run(() =>
{
string TeamScoreDataPath = strUrl + "women/historyStat";
Dictionary<string, string> dict = new Dictionary<string, string>();
dict.Add("teamId", teamId);
string newKey = Utils.GetKey(appID, appKey);
string result = JsonHelper.Post(TeamScoreDataPath, dict, newKey);
if (dataFromSource)
{
Log.Info($"球队积分排行数据:主数据来源:{TeamScoreDataPath}==>:" + result);
}
else
{
Log.Info($"球队积分排行数据:备份数据来源:{TeamScoreDataPath}==>:" + result);
}
JsonSerializerSettings settings = new JsonSerializerSettings();
settings.NullValueHandling = NullValueHandling.Ignore;
teamStats = JsonConvert.DeserializeObject<TeamStats>(result, settings);
Console.WriteLine("球队积分排行数据============>:" + TeamScoreDataPath);
});
return teamStats;
}
catch (Exception ex)
{
Log.Error(ex.Message);
return null;
}
}
} }
} }
...@@ -51,25 +51,10 @@ namespace VIZ.TVP.WMCUP.Module ...@@ -51,25 +51,10 @@ namespace VIZ.TVP.WMCUP.Module
public string visitingShortTeamName { get; set; } //客队球队简称 public string visitingShortTeamName { get; set; } //客队球队简称
public string visitTeamId { get; set; }//客户队伍Id
//private HighLightEnum light = HighLightEnum.OffLight; public string homeTeamId { get; set; }//主队队伍Id
///// <summary>
/////
///// </summary>
//public HighLightEnum Light
//{
// get { return light; }
// set { light = value; this.RaisePropertyChanged(nameof(Light)); }
//}
private string selectLight = "不高亮";
public string SelectLight
{
get { return selectLight; }
set { selectLight = value; this.RaisePropertyChanged(nameof(SelectLight)); }
}
} }
} }
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VIZ.Package.Domain;
namespace VIZ.TVP.WMCUP.Module
{
/// <summary>
/// 球员历史数据对比
/// </summary>
public class FTeamHistoryComparePlugin : IPluginLifeCycle
{
/// <summary>
/// 插件ID
/// </summary>
/// <remarks>
/// 插件ID不能包含点号
/// </remarks>
public const string PLUGIN_ID = "FTeamHistoryCompareView";
/// <summary>
/// 插件显示名称
/// </summary>
public const string PLUGIN_NAME = "历史对比数据";
public void Dispose()
{
}
public void Initialize()
{
}
public PluginInfo Register()
{
PluginInfo info = new PluginInfo();
info.Group = PluginConstant.GroupName;
info.ID = PLUGIN_ID;
info.Name = PLUGIN_NAME;
info.PluginType = PluginType.Page;
info.ViewType = typeof(FTeamHistoryCompareView);
//info.SettingViewType = typeof(DayMatchUI);
return info;
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VIZ.TVP.WMCUP.Module.FTeamHistoryCompare.Model
{
/// <summary>
/// 技术统计
/// </summary>
public class TeamStat
{
/// <summary>
/// 队伍Id
/// </summary>
public string teamId { get; set; }
/// <summary>
/// 赛事Id
/// </summary>
public string competitionId { get; set; }
/// <summary>
/// 球队名称
/// </summary>
public string teamName { get; set; }
/// <summary>
/// 国家名称
/// </summary>
public string nationName { get; set; }
/// <summary>
/// 赛季Id
/// </summary>
public string seasonId { get; set; }
/// <summary>
/// 球队logo标志
/// </summary>
public string countryLogo { get; set; }
/// <summary>
/// 技术统计项的值
/// </summary>
public List<statistic> statistics { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VIZ.TVP.WMCUP.Module.FTeamHistoryCompare.Model;
namespace VIZ.TVP.WMCUP.Module
{
public class TeamStats
{
/// <summary>
/// 最后推送时间
/// </summary>
public string LastPushDataDateTime { get; set; }
/// <summary>
/// 数据统计
/// </summary>
public List<TeamStat> teamStat { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VIZ.TVP.WMCUP.Module
{
/// <summary>
/// 统计项数
/// </summary>
public class statistic
{
/// <summary>
/// 技术统计名称
/// </summary>
public string name { get; set; }
/// <summary>
/// 技术统计值
/// </summary>
public string value { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using VIZ.Framework.Core;
using VIZ.Package.Domain;
using VIZ.Package.Service;
using VIZ.Package.Storage;
namespace VIZ.TVP.WMCUP.Module
{
/// <summary>
/// FTeamHistoryCompareView.xaml 的交互逻辑
/// </summary>
public partial class FTeamHistoryCompareView : UserControl
{
public FTeamHistoryCompareViewModel vm = new FTeamHistoryCompareViewModel();
public FTeamHistoryCompareView()
{
InitializeComponent();
WPFHelper.BindingViewModel(this, vm);
FTeamHistoryCompareViewModel.TeamStatsHistoryInstance.Add(vm);
}
/// <summary>
/// 操作日志服务
/// </summary>
private RecordLogService recordLogService = new RecordLogService();
public void Dispose()
{
}
public void PageOpend(ConnModel conn, PageModel page)
{
if (conn.IsConnected && vm.teamHomeStats != null)
{
conn.EndpointManager.Send(String.Format(VizEngineCommands.SCRIPT_INVOKE, "Data", vm.CombineTeamComData()));
}
}
public void PreviewContinue(ConnModel conn)
{
}
public void PreviewIn(ConnModel conn)
{
this.recordLogService.AppendLog(ApplicationConstants.APPLICATION_GROUP_NAME, RecordLogOperate.Operate, RecordLogTrigger.Human, RecordLogConstants.OPERATE_PREVIEW_PLAY);
if (conn.IsConnected && vm.teamHomeStats != null)
{
conn.EndpointManager.Send(String.Format(VizEngineCommands.SCRIPT_INVOKE, "Data", vm.CombineTeamComData()));
}
}
public void PreviewOut(ConnModel conn)
{
}
public void PreviewUpdate(ConnModel conn)
{
this.recordLogService.AppendLog(ApplicationConstants.APPLICATION_GROUP_NAME, RecordLogOperate.Operate, RecordLogTrigger.Human, RecordLogConstants.OPERATE_PREVIEW_UPDATE);
if (conn.IsConnected && vm.teamHomeStats != null)
{
conn.EndpointManager.Send(String.Format(VizEngineCommands.SCRIPT_INVOKE, "Data", vm.CombineTeamComData()));
}
}
public void TakeContinue(ConnModel conns)
{
this.recordLogService.AppendLog(ApplicationConstants.APPLICATION_GROUP_NAME, RecordLogOperate.Operate, RecordLogTrigger.Human, RecordLogConstants.OPERATE_TAKE_CONTINUE);
if (conns.IsConnected && vm.teamHomeStats != null)
{
conns.EndpointManager.Send(VizEngineCommands.STAGE_CONTINUE);
}
}
public void TakeOut(ConnModel conns)
{
this.recordLogService.AppendLog(ApplicationConstants.APPLICATION_GROUP_NAME, RecordLogOperate.Operate, RecordLogTrigger.Human, RecordLogConstants.OPERATE_TAKE_OUT);
if (conns.IsConnected && vm.teamHomeStats != null)
{
conns.EndpointManager.Send(VizEngineCommands.STAGE_CONTINUE);
}
}
public void TakeUpdate(ConnModel conns)
{
this.recordLogService.AppendLog(ApplicationConstants.APPLICATION_GROUP_NAME, RecordLogOperate.Operate, RecordLogTrigger.Human, RecordLogConstants.OPERATE_TAKE_UPDATE);
if (conns.IsConnected && vm.teamHomeStats != null)
{
conns.EndpointManager.Send(String.Format(VizEngineCommands.SCRIPT_INVOKE, "Data", vm.CombineTeamComData()));
}
}
public void TakIn(ConnModel conns)
{
this.recordLogService.AppendLog(ApplicationConstants.APPLICATION_GROUP_NAME, RecordLogOperate.Operate, RecordLogTrigger.Human, RecordLogConstants.OPERATE_TAKE_TAKE);
if (conns.IsConnected && vm.teamHomeStats != null)
{
conns.EndpointManager.Send(String.Format(VizEngineCommands.SCRIPT_INVOKE, "Data", vm.CombineTeamComData()));
}
}
}
}
...@@ -117,7 +117,7 @@ ...@@ -117,7 +117,7 @@
Focusable="False"> Focusable="False">
</ScrollViewer> </ScrollViewer>
<dxg:GridControl x:Name="grid" ShowBorder="False" ItemsSource="{Binding Path= MatchData,Mode=TwoWay}"> <dxg:GridControl x:Name="grid" ShowBorder="False" ItemsSource="{Binding Path= MatchData,Mode=TwoWay}" SelectedItem="{Binding Path=SelectMatchData,Mode=TwoWay}" >
<!--<dxg:GridColumn FieldName="SelectLight" Header="" Width="112"> <!--<dxg:GridColumn FieldName="SelectLight" Header="" Width="112">
<dxg:GridColumn.EditSettings> <dxg:GridColumn.EditSettings>
......
...@@ -114,6 +114,14 @@ ...@@ -114,6 +114,14 @@
<Compile Include="FGTeamStanding\View\FGTeamStandingView.xaml.cs"> <Compile Include="FGTeamStanding\View\FGTeamStandingView.xaml.cs">
<DependentUpon>FGTeamStandingView.xaml</DependentUpon> <DependentUpon>FGTeamStandingView.xaml</DependentUpon>
</Compile> </Compile>
<Compile Include="FTeamHistoryCompare\FTeamHistoryComparePlugin.cs" />
<Compile Include="FTeamHistoryCompare\Model\statistic.cs" />
<Compile Include="FTeamHistoryCompare\Model\TeamStat.cs" />
<Compile Include="FTeamHistoryCompare\Model\TeamStats.cs" />
<Compile Include="FTeamHistoryCompare\ViewModel\FTeamHistoryCompareViewModel.cs" />
<Compile Include="FTeamHistoryCompare\View\FTeamHistoryCompareView.xaml.cs">
<DependentUpon>FTeamHistoryCompareView.xaml</DependentUpon>
</Compile>
<Compile Include="FTeamStandings\FTeamStandingViewPlugin.cs" /> <Compile Include="FTeamStandings\FTeamStandingViewPlugin.cs" />
<Compile Include="FTeamStandings\Mdoel\Teamrank.cs" /> <Compile Include="FTeamStandings\Mdoel\Teamrank.cs" />
<Compile Include="FTeamStandings\Mdoel\TeamRanks.cs" /> <Compile Include="FTeamStandings\Mdoel\TeamRanks.cs" />
...@@ -229,6 +237,10 @@ ...@@ -229,6 +237,10 @@
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</Page> </Page>
<Page Include="FTeamHistoryCompare\View\FTeamHistoryCompareView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="FTeamStandings\View\FTeamStandingView.xaml"> <Page Include="FTeamStandings\View\FTeamStandingView.xaml">
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
...@@ -256,5 +268,8 @@ ...@@ -256,5 +268,8 @@
<ItemGroup> <ItemGroup>
<Folder Include="FFormation\Model\" /> <Folder Include="FFormation\Model\" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Resource Include="Image\FT\refresh2525.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project> </Project>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment