Commit 6eabbe4f by wangonghui

女足世界杯功能开发

parent 16c55603
...@@ -291,8 +291,8 @@ namespace VIZ.TVP.WMCUP.Module ...@@ -291,8 +291,8 @@ namespace VIZ.TVP.WMCUP.Module
//dict.Add("competitionId", footballType); //dict.Add("competitionId", footballType);
//dict.Add("seasonId", seasonId);//"110000005454" //dict.Add("seasonId", seasonId);//"110000005454"
//dict.Add("startOffset", startOffset); dict.Add("startOffset", startOffset);
//dict.Add("endOffset", endOffset); dict.Add("endOffset", endOffset);
string newKey = Utils.GetKey(appID, appKey); string newKey = Utils.GetKey(appID, appKey);
...@@ -313,11 +313,11 @@ namespace VIZ.TVP.WMCUP.Module ...@@ -313,11 +313,11 @@ namespace VIZ.TVP.WMCUP.Module
shootPlayerRanks = JsonConvert.DeserializeObject<ShootPlayerRanks>(result, settings); shootPlayerRanks = JsonConvert.DeserializeObject<ShootPlayerRanks>(result, settings);
if (shootPlayerRanks.aystatrank == null) return; if (shootPlayerRanks.playstatrank == null) return;
var sortPlayerShoot = shootPlayerRanks.aystatrank.Take(4).ToList(); //var sortPlayerShoot = shootPlayerRanks.aystatrank.Take(4).ToList();
shootPlayerRanks.aystatrank = sortPlayerShoot; //shootPlayerRanks.aystatrank = sortPlayerShoot;
}); });
return shootPlayerRanks; return shootPlayerRanks;
} }
...@@ -332,6 +332,128 @@ namespace VIZ.TVP.WMCUP.Module ...@@ -332,6 +332,128 @@ namespace VIZ.TVP.WMCUP.Module
/// <summary>
///女足球队队员全部信息
/// </summary>
/// <returns></returns>
public async static Task<SingleTeamPlayers> PostTeamPlayerData_Path(string teamId,string role)
{
try
{
GethttpUrl();
SingleTeamPlayers singleTeamPlayers = new SingleTeamPlayers();
if (string.IsNullOrEmpty(teamId))
{
return null;
}
await Task.Run(() =>
{
string TeamScoreDataPath = strUrl + "women/getPlaysByTeam";
Dictionary<string, string> dict = new Dictionary<string, string>();
dict.Add("teamId", teamId);
if (!string.IsNullOrEmpty(role))
{
dict.Add("role", role);
}
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;
singleTeamPlayers = JsonConvert.DeserializeObject<SingleTeamPlayers>(result, settings);
Console.WriteLine("球队队伍球员============>:" + TeamScoreDataPath);
});
return singleTeamPlayers;
}
catch (Exception ex)
{
Log.Error(ex.Message);
return null;
}
}
/// <summary>
///女足单数据统计
/// </summary>
/// <returns></returns>
public async static Task<SinglePlayers> PostSinglePlayerData_Path(string playerId)
{
try
{
GethttpUrl();
SinglePlayers singlePlayers = new SinglePlayers();
await Task.Run(() =>
{
string TeamScoreDataPath = strUrl + "women/getPlayStatBySeason";
Dictionary<string, string> dict = new Dictionary<string, string>();
dict.Add("playerId", playerId);
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;
singlePlayers = JsonConvert.DeserializeObject<SinglePlayers>(result, settings);
Console.WriteLine("单球员球员数据统计============>:" + TeamScoreDataPath);
});
return singlePlayers;
}
catch (Exception ex)
{
Log.Error(ex.Message);
return null;
}
}
/// <summary> /// <summary>
///女足球队历史数据统计 ///女足球队历史数据统计
/// </summary> /// </summary>
...@@ -344,6 +466,11 @@ namespace VIZ.TVP.WMCUP.Module ...@@ -344,6 +466,11 @@ namespace VIZ.TVP.WMCUP.Module
TeamStats teamStats = new TeamStats(); TeamStats teamStats = new TeamStats();
if(string.IsNullOrEmpty(teamId))
{
return null;
}
await Task.Run(() => await Task.Run(() =>
{ {
string TeamScoreDataPath = strUrl + "women/historyStat"; string TeamScoreDataPath = strUrl + "women/historyStat";
......
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
{
public class FComparePlayerPlugin : IPluginLifeCycle
{
/// <summary>
/// 插件ID
/// </summary>
/// <remarks>
/// 插件ID不能包含点号
/// </remarks>
public const string PLUGIN_ID = "FComparePlayerView";
/// <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(FComparePlayerView);
//info.SettingViewType = typeof(DayMatchUI);
return info;
}
}
}
using log4net;
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.Module;
using VIZ.Package.Service;
using VIZ.Package.Storage;
namespace VIZ.TVP.WMCUP.Module
{
/// <summary>
/// FComparePlayerView.xaml 的交互逻辑
/// </summary>
public partial class FComparePlayerView : UserControl, IPluginView
{
FComparePlayerViewModel vm = new FComparePlayerViewModel();
private static ILog Log = LogManager.GetLogger(typeof(FSinglePlayerViewModel));
/// <summary>
/// 操作日志服务
/// </summary>
private RecordLogService recordLogService = new RecordLogService();
public FComparePlayerView()
{
InitializeComponent();
WPFHelper.BindingViewModel(this, vm);
FComparePlayerViewModel.PlayerCompareViewModelInstance.Add(vm);
this.Loaded += NewSinglePlayerView_Loaded;
this.IsVisibleChanged += NewSinglePlayerView_IsVisibleChanged;
}
private void NewSinglePlayerView_IsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e)
{
if (!string.IsNullOrEmpty(vm.homeTeamId) && !string.IsNullOrEmpty(vm.visitTeamId))
{
vm.SetTeamData();
}
}
private void NewSinglePlayerView_Loaded(object sender, RoutedEventArgs e)
{
var service = ApplicationDomainEx.ServiceManager.GetService<IPluginService>(ViewServiceKeys.PLUGIN_SERVICE);
if (service == null)
return;
vm.page = service.GetPageModelFromView(this);
}
public void Dispose()
{
}
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)
{
conn.EndpointManager.Send(String.Format(VizEngineCommands.SCRIPT_INVOKE, "Data", vm.CombineTeamComData()));
Log.Info("已经发送命令===>" + vm.CombineTeamComData());
}
}
public void PreviewOut(ConnModel conn)
{
//if(conn.IsConnected)
// {
// conn.EndpointManager.Send(VizEngineCommands.STAGE_CONTINUE);
// }
}
public void TakeContinue(ConnModel conns)
{
}
public void TakeOut(ConnModel conns)
{
this.recordLogService.AppendLog(ApplicationConstants.APPLICATION_GROUP_NAME, RecordLogOperate.Operate, RecordLogTrigger.Human, RecordLogConstants.OPERATE_TAKE_OUT);
if (conns.IsConnected)
{
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)
{
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)
{
conns.EndpointManager.Send(String.Format(VizEngineCommands.SCRIPT_INVOKE, "Data", vm.CombineTeamComData()));
}
}
public void PageOpend(ConnModel conn, PageModel page)
{
if (conn.IsConnected)
{
conn.EndpointManager.Send(String.Format(VizEngineCommands.SCRIPT_INVOKE, "Data", vm.CombineTeamComData()));
}
}
public void PreviewUpdate(ConnModel conn)
{
this.recordLogService.AppendLog(ApplicationConstants.APPLICATION_GROUP_NAME, RecordLogOperate.Operate, RecordLogTrigger.Human, RecordLogConstants.OPERATE_PREVIEW_UPDATE);
if (conn.IsConnected)
{
conn.EndpointManager.Send(String.Format(VizEngineCommands.SCRIPT_INVOKE, "Data", vm.CombineTeamComData()));
}
}
}
}
...@@ -365,25 +365,29 @@ namespace VIZ.TVP.WMCUP.Module ...@@ -365,25 +365,29 @@ namespace VIZ.TVP.WMCUP.Module
data += "*"; data += "*";
//if (string.IsNullOrEmpty(tempMatchData.homeTeamScore) && string.IsNullOrEmpty(tempMatchData.visitingTeamScore)) if (string.IsNullOrEmpty(tempMatchData.homeTeamScore) && string.IsNullOrEmpty(tempMatchData.visitingTeamScore))
//{
// data += "vs";
//}
//else
//{
if(string.IsNullOrEmpty(tempMatchData.homeTeamScore))
{ {
tempMatchData.homeTeamScore = "0";
}
if(string.IsNullOrEmpty(tempMatchData.visitingTeamScore)) data += "vs";
}
else
{ {
tempMatchData.visitingTeamScore = "0";
//if (string.IsNullOrEmpty(tempMatchData.homeTeamScore))
//{
// tempMatchData.homeTeamScore = "0";
//}
//if (string.IsNullOrEmpty(tempMatchData.visitingTeamScore))
//{
// tempMatchData.visitingTeamScore = "0";
//}
data += string.Format("{0}:{1}", tempMatchData.homeTeamScore, tempMatchData.visitingTeamScore);
} }
data += string.Format("{0}:{1}", tempMatchData.homeTeamScore, tempMatchData.visitingTeamScore); //data += string.Format("{0}:{1}", tempMatchData.homeTeamScore, tempMatchData.visitingTeamScore);
......
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
{
public class FSinglePlayerViewPlugin : IPluginLifeCycle
{
/// <summary>
/// 插件ID
/// </summary>
/// <remarks>
/// 插件ID不能包含点号
/// </remarks>
public const string PLUGIN_ID = "FSinglePlayerView";
/// <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(FSinglePlayerView);
//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
{
public class MatchTeamPlayer
{
/// <summary>
/// 球员figureId
/// </summary>
public string figureId { get; set; }
/// <summary>
/// 队伍teamId
/// </summary>
public string teamId { get; set; }
/// <summary>
/// 球员名称
/// </summary>
public string figureName { get; set; }
/// <summary>
/// 球员球衣号
/// </summary>
public string playerNum { get; set; }
/// <summary>
/// 最后更新时间
/// </summary>
public string LastPushDataDateTime { get; set; }
/// <summary>
/// 人物角色 1 首发 2 替补 3 教练
/// </summary>
public string role { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VIZ.TVP.WMCUP.Module
{
public class SinglePlayer
{
/// <summary>
/// 球员名称
/// </summary>
public string figureName { get; set; }
/// <summary>
/// 队伍Id
/// </summary>
public string teamId { get; set; }
/// <summary>
/// 队伍名称
/// </summary>
public string teamName { get; set; }
/// <summary>
/// 国家名称即是国旗
/// </summary>
public string nationName { 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;
namespace VIZ.TVP.WMCUP.Module
{
public class SinglePlayers
{
public string LastPushDataDateTime { get; set; }
/// <summary>
/// 球员统计信息
/// </summary>
public SinglePlayer playerStat { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VIZ.TVP.WMCUP.Module
{
public class SingleTeamPlayers
{
/// <summary>
/// 最后更新时间
/// </summary>
public string LastPushDataDateTime { get; set; }
/// <summary>
/// 球员相关信息
/// </summary>
public List<MatchTeamPlayer> matchTeamPlayers { get; set; }
}
}
using log4net;
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.Module;
using VIZ.Package.Service;
using VIZ.Package.Storage;
namespace VIZ.TVP.WMCUP.Module
{
/// <summary>
/// FSinglePlayerView.xaml 的交互逻辑
/// </summary>
public partial class FSinglePlayerView : UserControl, IPluginView
{
FSinglePlayerViewModel vm = new FSinglePlayerViewModel();
private static ILog Log = LogManager.GetLogger(typeof(FSinglePlayerViewModel));
/// <summary>
/// 操作日志服务
/// </summary>
private RecordLogService recordLogService = new RecordLogService();
public FSinglePlayerView()
{
InitializeComponent();
WPFHelper.BindingViewModel(this, vm);
FSinglePlayerViewModel.FSinglePlayerInstance.Add(vm);
this.Loaded += NewSinglePlayerView_Loaded;
this.IsVisibleChanged += NewSinglePlayerView_IsVisibleChanged;
}
private void NewSinglePlayerView_IsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e)
{
if (!string.IsNullOrEmpty(vm.homeTeamId) && !string.IsNullOrEmpty(vm.visitTeamId))
{
vm.SetTeamData();
}
}
private void NewSinglePlayerView_Loaded(object sender, RoutedEventArgs e)
{
var service = ApplicationDomainEx.ServiceManager.GetService<IPluginService>(ViewServiceKeys.PLUGIN_SERVICE);
if (service == null)
return;
vm.page = service.GetPageModelFromView(this);
}
public void Dispose()
{
}
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)
{
conn.EndpointManager.Send(String.Format(VizEngineCommands.SCRIPT_INVOKE, "Data", vm.CombineTeamComData()));
Log.Info("已经发送命令===>" + vm.CombineTeamComData());
}
}
public void PreviewOut(ConnModel conn)
{
//if(conn.IsConnected)
// {
// conn.EndpointManager.Send(VizEngineCommands.STAGE_CONTINUE);
// }
}
public void TakeContinue(ConnModel conns)
{
}
public void TakeOut(ConnModel conns)
{
this.recordLogService.AppendLog(ApplicationConstants.APPLICATION_GROUP_NAME, RecordLogOperate.Operate, RecordLogTrigger.Human, RecordLogConstants.OPERATE_TAKE_OUT);
if (conns.IsConnected)
{
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)
{
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)
{
conns.EndpointManager.Send(String.Format(VizEngineCommands.SCRIPT_INVOKE, "Data", vm.CombineTeamComData()));
}
}
public void PageOpend(ConnModel conn, PageModel page)
{
if (conn.IsConnected)
{
conn.EndpointManager.Send(String.Format(VizEngineCommands.SCRIPT_INVOKE, "Data", vm.CombineTeamComData()));
}
}
public void PreviewUpdate(ConnModel conn)
{
this.recordLogService.AppendLog(ApplicationConstants.APPLICATION_GROUP_NAME, RecordLogOperate.Operate, RecordLogTrigger.Human, RecordLogConstants.OPERATE_PREVIEW_UPDATE);
if (conn.IsConnected)
{
conn.EndpointManager.Send(String.Format(VizEngineCommands.SCRIPT_INVOKE, "Data", vm.CombineTeamComData()));
}
}
}
}
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -22,7 +22,7 @@ namespace VIZ.TVP.WMCUP.Module ...@@ -22,7 +22,7 @@ namespace VIZ.TVP.WMCUP.Module
/// <summary> /// <summary>
/// FTeamHistoryCompareView.xaml 的交互逻辑 /// FTeamHistoryCompareView.xaml 的交互逻辑
/// </summary> /// </summary>
public partial class FTeamHistoryCompareView : UserControl public partial class FTeamHistoryCompareView : UserControl, IPluginView
{ {
public FTeamHistoryCompareViewModel vm = new FTeamHistoryCompareViewModel(); public FTeamHistoryCompareViewModel vm = new FTeamHistoryCompareViewModel();
...@@ -53,6 +53,7 @@ namespace VIZ.TVP.WMCUP.Module ...@@ -53,6 +53,7 @@ namespace VIZ.TVP.WMCUP.Module
{ {
if (conn.IsConnected && vm.teamHomeStats != null) if (conn.IsConnected && vm.teamHomeStats != null)
{ {
vm.SetTeamData();
conn.EndpointManager.Send(String.Format(VizEngineCommands.SCRIPT_INVOKE, "Data", vm.CombineTeamComData())); conn.EndpointManager.Send(String.Format(VizEngineCommands.SCRIPT_INVOKE, "Data", vm.CombineTeamComData()));
} }
} }
...@@ -66,7 +67,7 @@ namespace VIZ.TVP.WMCUP.Module ...@@ -66,7 +67,7 @@ namespace VIZ.TVP.WMCUP.Module
{ {
this.recordLogService.AppendLog(ApplicationConstants.APPLICATION_GROUP_NAME, RecordLogOperate.Operate, RecordLogTrigger.Human, RecordLogConstants.OPERATE_PREVIEW_PLAY); this.recordLogService.AppendLog(ApplicationConstants.APPLICATION_GROUP_NAME, RecordLogOperate.Operate, RecordLogTrigger.Human, RecordLogConstants.OPERATE_PREVIEW_PLAY);
if (conn.IsConnected && vm.teamHomeStats != null) if (conn.IsConnected && vm.teamHomeStats != null)//
{ {
conn.EndpointManager.Send(String.Format(VizEngineCommands.SCRIPT_INVOKE, "Data", vm.CombineTeamComData())); conn.EndpointManager.Send(String.Format(VizEngineCommands.SCRIPT_INVOKE, "Data", vm.CombineTeamComData()));
} }
...@@ -81,7 +82,7 @@ namespace VIZ.TVP.WMCUP.Module ...@@ -81,7 +82,7 @@ namespace VIZ.TVP.WMCUP.Module
public void PreviewUpdate(ConnModel conn) public void PreviewUpdate(ConnModel conn)
{ {
this.recordLogService.AppendLog(ApplicationConstants.APPLICATION_GROUP_NAME, RecordLogOperate.Operate, RecordLogTrigger.Human, RecordLogConstants.OPERATE_PREVIEW_UPDATE); this.recordLogService.AppendLog(ApplicationConstants.APPLICATION_GROUP_NAME, RecordLogOperate.Operate, RecordLogTrigger.Human, RecordLogConstants.OPERATE_PREVIEW_UPDATE);
if (conn.IsConnected && vm.teamHomeStats != null) if (conn.IsConnected && vm.teamHomeStats != null)//
{ {
conn.EndpointManager.Send(String.Format(VizEngineCommands.SCRIPT_INVOKE, "Data", vm.CombineTeamComData())); conn.EndpointManager.Send(String.Format(VizEngineCommands.SCRIPT_INVOKE, "Data", vm.CombineTeamComData()));
} }
......
...@@ -52,6 +52,20 @@ namespace VIZ.TVP.WMCUP.Module ...@@ -52,6 +52,20 @@ namespace VIZ.TVP.WMCUP.Module
/// </summary> /// </summary>
private RecordLogService recordLogService = new RecordLogService(); private RecordLogService recordLogService = new RecordLogService();
public static string HomeTeamId;
public static string VisitTeamId;
public static string HomeNationName;
public static string VisitingNationName;
public static string HomeTeamName;
public static string VisitingTeamName;
/// <summary> /// <summary>
/// 主数据库连接 /// 主数据库连接
/// </summary> /// </summary>
...@@ -116,6 +130,10 @@ namespace VIZ.TVP.WMCUP.Module ...@@ -116,6 +130,10 @@ namespace VIZ.TVP.WMCUP.Module
#region 球队统计信息 #region 球队统计信息
HomeTeamId = selectMatchData.homeTeamId;
VisitTeamId= selectMatchData.visitTeamId;
if (FTeamHistoryCompareViewModel.TeamStatsHistoryInstance.Count > 0) if (FTeamHistoryCompareViewModel.TeamStatsHistoryInstance.Count > 0)
{ {
// Log.Error(string.Format("TeamStatsViewModel.CreateInstance Count:{0}", TeamStatsViewModel.TeamStatsViewModelInstance.Count)); // Log.Error(string.Format("TeamStatsViewModel.CreateInstance Count:{0}", TeamStatsViewModel.TeamStatsViewModelInstance.Count));
...@@ -130,6 +148,8 @@ namespace VIZ.TVP.WMCUP.Module ...@@ -130,6 +148,8 @@ namespace VIZ.TVP.WMCUP.Module
tempTeamStatsViewModel.visitTeamId = selectMatchData.visitTeamId; tempTeamStatsViewModel.visitTeamId = selectMatchData.visitTeamId;
// Log.Error(string.Format("DateHeader_ScheduleId:{0}", selectMatchData.ScheduleID)); // Log.Error(string.Format("DateHeader_ScheduleId:{0}", selectMatchData.ScheduleID));
//Log.Error(string.Format("DateHeader_ScheduleTypeId:{0}", selectMatchData.ScheduleTypeID)); //Log.Error(string.Format("DateHeader_ScheduleTypeId:{0}", selectMatchData.ScheduleTypeID));
tempTeamStatsViewModel.SetTeamData(); tempTeamStatsViewModel.SetTeamData();
...@@ -214,20 +234,50 @@ namespace VIZ.TVP.WMCUP.Module ...@@ -214,20 +234,50 @@ namespace VIZ.TVP.WMCUP.Module
//} //}
//if (NewSinglePlayerViewModel.SinglePlayerViewModelInstance.Count > 0) HomeNationName= selectMatchData.homeNationName;
//{ VisitingTeamName= selectMatchData.visitingNationName;
// foreach (var tempSinglePlayerViewModel in NewSinglePlayerViewModel.SinglePlayerViewModelInstance)
// {
// tempSinglePlayerViewModel.ScheduleID = selectMatchData.ScheduleID;
// tempSinglePlayerViewModel.Matchtypeid = selectMatchData.ScheduleTypeID;
// if (tempSinglePlayerViewModel.page != null && ApplicationDomainEx.CurrentPage == tempSinglePlayerViewModel.page)
// {
// tempSinglePlayerViewModel.SetSingleData(); HomeTeamName = selectMatchData.homeTeamName;
// } VisitingTeamName = selectMatchData.visitingTeamName;
// }
//} if (FSinglePlayerViewModel.FSinglePlayerInstance.Count > 0)
{
foreach (var tempSinglePlayerViewModel in FSinglePlayerViewModel.FSinglePlayerInstance)
{
// tempSinglePlayerViewModel.ScheduleID = selectMatchData.ScheduleID;
// tempSinglePlayerViewModel.Matchtypeid = selectMatchData.ScheduleTypeID;
tempSinglePlayerViewModel.homeTeamId = selectMatchData.homeTeamId;
tempSinglePlayerViewModel.visitTeamId = selectMatchData.visitTeamId;
//主队国家名称
tempSinglePlayerViewModel.homeNationTeam = selectMatchData.homeNationName;
//客队国家名称
tempSinglePlayerViewModel.awayNationTeam = selectMatchData.visitingNationName;
if(tempSinglePlayerViewModel.TeamItems!=null)
{
tempSinglePlayerViewModel.TeamItems.Clear();
}
tempSinglePlayerViewModel.TeamItems = new ObservableCollection<string>();
tempSinglePlayerViewModel.TeamItems.Add(selectMatchData.homeTeamName);
tempSinglePlayerViewModel.TeamItems.Add(selectMatchData.visitingTeamName);
if (tempSinglePlayerViewModel.page != null && ApplicationDomainEx.CurrentPage == tempSinglePlayerViewModel.page)
{
tempSinglePlayerViewModel.SetTeamData();
}
}
}
...@@ -254,6 +304,36 @@ namespace VIZ.TVP.WMCUP.Module ...@@ -254,6 +304,36 @@ namespace VIZ.TVP.WMCUP.Module
#region 球员对比信息 #region 球员对比信息
if(FComparePlayerViewModel.PlayerCompareViewModelInstance.Count>0)
{
foreach (var tempSinglePlayerViewModel in FComparePlayerViewModel.PlayerCompareViewModelInstance)
{
// tempSinglePlayerViewModel.ScheduleID = selectMatchData.ScheduleID;
// tempSinglePlayerViewModel.Matchtypeid = selectMatchData.ScheduleTypeID;
tempSinglePlayerViewModel.homeTeamId = selectMatchData.homeTeamId;
tempSinglePlayerViewModel.visitTeamId = selectMatchData.visitTeamId;
//主队国家名称
tempSinglePlayerViewModel.homeNationTeam = selectMatchData.homeNationName;
//客队国家名称
tempSinglePlayerViewModel.awayNationTeam = selectMatchData.visitingNationName;
//主队客数据对比
tempSinglePlayerViewModel.HName = selectMatchData.homeTeamName;
tempSinglePlayerViewModel.AName = selectMatchData.visitingTeamName;
if (tempSinglePlayerViewModel.page != null && ApplicationDomainEx.CurrentPage == tempSinglePlayerViewModel.page)
{
tempSinglePlayerViewModel.SetTeamData();
}
}
}
//if(PlayerCompareViewModel.PlayerCompareViewModelInstance.Count>0) //if(PlayerCompareViewModel.PlayerCompareViewModelInstance.Count>0)
//{ //{
// foreach(var playerCompareViewModel in PlayerCompareViewModel.PlayerCompareViewModelInstance) // foreach(var playerCompareViewModel in PlayerCompareViewModel.PlayerCompareViewModelInstance)
...@@ -305,8 +385,8 @@ namespace VIZ.TVP.WMCUP.Module ...@@ -305,8 +385,8 @@ namespace VIZ.TVP.WMCUP.Module
#endregion 双球员---任务 #endregion 双球员---任务
//设置球队赛季数据 //设置球队赛季数据
// GetTeamSeasonData(); // GetTeamSeasonData();
// #endregion // #endregion
} }
} }
......
...@@ -193,6 +193,19 @@ ...@@ -193,6 +193,19 @@
</WrapPanel>--> </WrapPanel>-->
<TextBlock Text="图片地址:" Grid.Row="8" VerticalAlignment="Center" HorizontalAlignment="Center" />
<!-- 球队地址 -->
<!--<TextBlock Text="球队图片地址:" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,10,0" Grid.Row="9"></TextBlock>
<dxe:TextEdit Grid.Column="1" Height="30" Grid.Row="9"
EditValue="{Binding Path=TeamsLogo,Mode=TwoWay}"></dxe:TextEdit>-->
<TextBlock Text="球员图片地址:" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,10,0" Grid.Row="10"></TextBlock>
<dxe:TextEdit Grid.Column="1" Height="30" Grid.Row="10"
EditValue="{Binding Path=PlayersLogo,Mode=TwoWay}"></dxe:TextEdit>
</Grid> </Grid>
</GroupBox> </GroupBox>
......
...@@ -149,6 +149,21 @@ namespace VIZ.TVP.WMCUP.Module ...@@ -149,6 +149,21 @@ namespace VIZ.TVP.WMCUP.Module
#endregion #endregion
/// <summary>
/// 球员图片地址
/// </summary>
private string playersLogo;
public string PlayersLogo
{
get { return playersLogo; }
set { playersLogo = value; this.RaisePropertyChanged(nameof(PlayersLogo)); }
}
#endregion #endregion
// ========================================================================= // =========================================================================
...@@ -180,6 +195,8 @@ namespace VIZ.TVP.WMCUP.Module ...@@ -180,6 +195,8 @@ namespace VIZ.TVP.WMCUP.Module
this.BAppKey = AppSetup_InitLiteDB.HttpUrlConfigEntity.BAppKey; this.BAppKey = AppSetup_InitLiteDB.HttpUrlConfigEntity.BAppKey;
this.PlayersLogo = AppSetup_InitLiteDB.HttpUrlConfigEntity.PlayersLogo;
// this.SelectFootballType = AppSetup_InitLiteDB.HttpUrlConfigEntity.SelectFootballType; // this.SelectFootballType = AppSetup_InitLiteDB.HttpUrlConfigEntity.SelectFootballType;
// this.SelectSeason = AppSetup_InitLiteDB.HttpUrlConfigEntity.SelectSeason; // this.SelectSeason = AppSetup_InitLiteDB.HttpUrlConfigEntity.SelectSeason;
...@@ -207,6 +224,8 @@ namespace VIZ.TVP.WMCUP.Module ...@@ -207,6 +224,8 @@ namespace VIZ.TVP.WMCUP.Module
config.BUrl = this.BUrl; config.BUrl = this.BUrl;
config.BAppId = this.BAppId; config.BAppId = this.BAppId;
config.BAppKey = this.BAppKey; config.BAppKey = this.BAppKey;
config.PlayersLogo = this.PlayersLogo;
//config.SelectFootballType = this.SelectFootballType; //config.SelectFootballType = this.SelectFootballType;
// 选择赛事和赛事Id // 选择赛事和赛事Id
......
...@@ -27,7 +27,7 @@ namespace VIZ.TVP.WMCUP.Module ...@@ -27,7 +27,7 @@ namespace VIZ.TVP.WMCUP.Module
/// <summary> /// <summary>
/// 出场次数 /// 出场次数
/// </summary> /// </summary>
public string games { get; set; } public string appearances { get; set; }
/// <summary> /// <summary>
/// 进球数量 /// 进球数量
......
...@@ -16,7 +16,7 @@ namespace VIZ.TVP.WMCUP.Module ...@@ -16,7 +16,7 @@ namespace VIZ.TVP.WMCUP.Module
/// <summary> /// <summary>
/// 球员统计 /// 球员统计
/// </summary> /// </summary>
public List<ShootPlayerRank> aystatrank { get; set; } public List<ShootPlayerRank> playstatrank { get; set; }
} }
} }
...@@ -117,8 +117,8 @@ ...@@ -117,8 +117,8 @@
<dxg:GridColumn FieldName="rank" Header="排名" Width="112" /> <dxg:GridColumn FieldName="rank" Header="排名" Width="112" />
<dxg:GridColumn FieldName="figureName" Header="球员名称" Width="112" /> <dxg:GridColumn FieldName="figureName" Header="球员名称" Width="112" />
<dxg:GridColumn FieldName="nationName" Header="球队国旗" Width="112"/> <dxg:GridColumn FieldName="nationName" Header="球队国旗" Width="112"/>
<dxg:GridColumn FieldName="shortTeamName" Header="球队名称" Width="112"/> <dxg:GridColumn FieldName="teamName" Header="球队名称" Width="112"/>
<dxg:GridColumn FieldName="games" Header="场次" Width="180" /> <dxg:GridColumn FieldName="appearances" Header="场次" Width="180" />
<dxg:GridColumn FieldName="goals" Header="进球数" Width="180" /> <dxg:GridColumn FieldName="goals" Header="进球数" Width="180" />
<!--<dxg:GridColumn FieldName="penaltyGoals" Header="点球" Width="100" />--> <!--<dxg:GridColumn FieldName="penaltyGoals" Header="点球" Width="100" />-->
......
...@@ -62,10 +62,10 @@ namespace VIZ.TVP.WMCUP.Module ...@@ -62,10 +62,10 @@ namespace VIZ.TVP.WMCUP.Module
shootPlayerRanks = await JsonModel.Post_ShootPlayerRankData(SeasonId, StartOffset, EndOffset); shootPlayerRanks = await JsonModel.Post_ShootPlayerRankData(SeasonId, StartOffset, EndOffset);
if (shootPlayerRanks == null) return; if (shootPlayerRanks == null||shootPlayerRanks.playstatrank==null) return;
//ShootPlayerModel = new ObservableCollection<ShootPlayerRank>(); ShootPlayerModel = new ObservableCollection<ShootPlayerRank>();
////shootPlayerModel ////shootPlayerModel
...@@ -120,19 +120,19 @@ namespace VIZ.TVP.WMCUP.Module ...@@ -120,19 +120,19 @@ namespace VIZ.TVP.WMCUP.Module
// figureName="中国", // figureName="中国",
//}) ; //}) ;
foreach (var playerRank in shootPlayerRanks.aystatrank) foreach (var playerRank in shootPlayerRanks.playstatrank)
{ {
playerRank.playerLogo = playerRank.figureName; playerRank.playerLogo = playerRank.figureName;
playerRank.teamLogo = playerRank.teamName; playerRank.teamLogo = playerRank.teamName;
if (playerRank.goals != "0") if (playerRank.goals != "0"&&playerRank.goals!=null)
{ {
playerRank.goals = playerRank.goals.TrimEnd('0').TrimEnd('.'); playerRank.goals = playerRank.goals.TrimEnd('0').TrimEnd('.');
} }
if (playerRank.penaltyGoals != "0") //if (playerRank.penaltyGoals != "0")
{ //{
playerRank.penaltyGoals = playerRank.penaltyGoals.TrimEnd('0').TrimEnd('.'); // playerRank.penaltyGoals = playerRank.penaltyGoals.TrimEnd('0').TrimEnd('.');
} //}
ShootPlayerModel.Add(playerRank); ShootPlayerModel.Add(playerRank);
...@@ -192,13 +192,13 @@ namespace VIZ.TVP.WMCUP.Module ...@@ -192,13 +192,13 @@ namespace VIZ.TVP.WMCUP.Module
data += "*"; data += "*";
if (string.IsNullOrEmpty(tempTeamRankModel.shortTeamName)) if (string.IsNullOrEmpty(tempTeamRankModel.teamName))
{ {
data += ""; data += "";
} }
else else
{ {
data += tempTeamRankModel.shortTeamName.Replace(" ", ""); data += tempTeamRankModel.teamName.Replace(" ", "");
} }
...@@ -206,13 +206,13 @@ namespace VIZ.TVP.WMCUP.Module ...@@ -206,13 +206,13 @@ namespace VIZ.TVP.WMCUP.Module
data += "*"; data += "*";
if (string.IsNullOrEmpty(tempTeamRankModel.games)) if (string.IsNullOrEmpty(tempTeamRankModel.appearances))
{ {
data += ""; data += "";
} }
else else
{ {
data += tempTeamRankModel.games.Replace(" ", ""); data += tempTeamRankModel.appearances.Replace(" ", "");
} }
...@@ -244,7 +244,15 @@ namespace VIZ.TVP.WMCUP.Module ...@@ -244,7 +244,15 @@ namespace VIZ.TVP.WMCUP.Module
//data += tempTeamRankModel.penaltyGoals.ToString().Replace(" ", ""); //data += tempTeamRankModel.penaltyGoals.ToString().Replace(" ", "");
data += "*"; data += "*";
data += tempTeamRankModel.rank.ToString().Replace(" ", "");
if (string.IsNullOrEmpty(tempTeamRankModel.rank))
{
data += "";
}
else
{
data += tempTeamRankModel.rank.ToString().Replace(" ", "");
}
data += ";"; data += ";";
......
...@@ -97,6 +97,9 @@ namespace VIZ.TVP.WMCUP.Module ...@@ -97,6 +97,9 @@ namespace VIZ.TVP.WMCUP.Module
////西甲选中赛季 ////西甲选中赛季
//public string SelectSLPSeasonId { get; set; } //public string SelectSLPSeasonId { get; set; }
//Z:\2022_migu_picture\\PlayerHeadLogo\\
public string PlayersLogo { get; set; } = "X:\\VZIRT\\playerphoto\\";
#endregion #endregion
......
...@@ -77,6 +77,7 @@ ...@@ -77,6 +77,7 @@
<Reference Include="System.Configuration" /> <Reference Include="System.Configuration" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="System.Web" /> <Reference Include="System.Web" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xaml" /> <Reference Include="System.Xaml" />
<Reference Include="System.Xml.Linq" /> <Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" /> <Reference Include="System.Data.DataSetExtensions" />
...@@ -85,6 +86,7 @@ ...@@ -85,6 +86,7 @@
<Reference Include="System.Net.Http" /> <Reference Include="System.Net.Http" />
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
<Reference Include="WindowsBase" /> <Reference Include="WindowsBase" />
<Reference Include="WindowsFormsIntegration" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="Common\JsonHelper.cs" /> <Compile Include="Common\JsonHelper.cs" />
...@@ -93,6 +95,11 @@ ...@@ -93,6 +95,11 @@
<Compile Include="Common\Model\Seasons.cs" /> <Compile Include="Common\Model\Seasons.cs" />
<Compile Include="Common\PluginConstant.cs" /> <Compile Include="Common\PluginConstant.cs" />
<Compile Include="Common\Utils.cs" /> <Compile Include="Common\Utils.cs" />
<Compile Include="FComparePlayer\FComparePlayerPlugin.cs" />
<Compile Include="FComparePlayer\ViewModel\FComparePlayerViewModel.cs" />
<Compile Include="FComparePlayer\View\FComparePlayerView.xaml.cs">
<DependentUpon>FComparePlayerView.xaml</DependentUpon>
</Compile>
<Compile Include="FDayMatchResult\FDayMatchResultViewPlugin.cs" /> <Compile Include="FDayMatchResult\FDayMatchResultViewPlugin.cs" />
<Compile Include="FDayMatchResult\ViewModel\FDayMatchResultViewModel.cs" /> <Compile Include="FDayMatchResult\ViewModel\FDayMatchResultViewModel.cs" />
<Compile Include="FDayMatchResult\View\FDayMatchResultView.xaml.cs"> <Compile Include="FDayMatchResult\View\FDayMatchResultView.xaml.cs">
...@@ -114,6 +121,15 @@ ...@@ -114,6 +121,15 @@
<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="FSinglePlayer\FSinglePlayerViewPlugin.cs" />
<Compile Include="FSinglePlayer\Model\MatchTeamPlayer.cs" />
<Compile Include="FSinglePlayer\Model\SinglePlayer.cs" />
<Compile Include="FSinglePlayer\Model\SinglePlayers.cs" />
<Compile Include="FSinglePlayer\Model\SingleTeamPlayers.cs" />
<Compile Include="FSinglePlayer\ViewModel\FSinglePlayerViewModel.cs" />
<Compile Include="FSinglePlayer\View\FSinglePlayerView.xaml.cs">
<DependentUpon>FSinglePlayerView.xaml</DependentUpon>
</Compile>
<Compile Include="FTeamHistoryCompare\FTeamHistoryComparePlugin.cs" /> <Compile Include="FTeamHistoryCompare\FTeamHistoryComparePlugin.cs" />
<Compile Include="FTeamHistoryCompare\Model\statistic.cs" /> <Compile Include="FTeamHistoryCompare\Model\statistic.cs" />
<Compile Include="FTeamHistoryCompare\Model\TeamStat.cs" /> <Compile Include="FTeamHistoryCompare\Model\TeamStat.cs" />
...@@ -221,6 +237,10 @@ ...@@ -221,6 +237,10 @@
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Page Include="FComparePlayer\View\FComparePlayerView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="FDayMatchResult\View\FDayMatchResultView.xaml"> <Page Include="FDayMatchResult\View\FDayMatchResultView.xaml">
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
...@@ -237,6 +257,10 @@ ...@@ -237,6 +257,10 @@
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</Page> </Page>
<Page Include="FSinglePlayer\View\FSinglePlayerView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="FTeamHistoryCompare\View\FTeamHistoryCompareView.xaml"> <Page Include="FTeamHistoryCompare\View\FTeamHistoryCompareView.xaml">
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
...@@ -266,6 +290,7 @@ ...@@ -266,6 +290,7 @@
<Resource Include="Image\FT\Prompt2525.png" /> <Resource Include="Image\FT\Prompt2525.png" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Folder Include="FComparePlayer\Model\" />
<Folder Include="FFormation\Model\" /> <Folder Include="FFormation\Model\" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
......
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