Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sportsschoolserver
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
node_server
sportsschoolserver
Commits
3c82d295
Commit
3c82d295
authored
Nov 10, 2021
by
chenjinjing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
f2ac902f
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
9 deletions
+22
-9
xsxxfx.ts
src/biz/xsxxfx.ts
+3
-1
ydygl.ts
src/biz/ydygl.ts
+5
-5
xsxxfxData.ts
src/data/xsxxfxData.ts
+11
-0
ydyglData.ts
src/data/ydyglData.ts
+3
-3
No files found.
src/biz/xsxxfx.ts
View file @
3c82d295
import
{
info
}
from
"console"
;
import
{
info
}
from
"console"
;
import
{
get
选手详细分析
}
from
"../data/analysisData"
;
import
{
get
选手详细分析
}
from
"../data/analysisData"
;
import
{
getBaseData
,
get
单前比赛对局时间节点
,
get
右侧数据
,
get
图表
,
get
散点图
,
get
比赛详情
,
get
近期比赛概览
}
from
"../data/xsxxfxData"
;
import
{
getBaseData
,
get
全部比赛日期
,
get
单前比赛对局时间节点
,
get
右侧数据
,
get
图表
,
get
散点图
,
get
比赛详情
,
get
近期比赛概览
}
from
"../data/xsxxfxData"
;
import
{
getChartData
,
objKeyReplace
,
getKeyValue
,
getSingleYAndMoreData
,
getListData
,
getMoreYChartData
,
getKeyStringValue
}
from
"../util/tools"
;
import
{
getChartData
,
objKeyReplace
,
getKeyValue
,
getSingleYAndMoreData
,
getListData
,
getMoreYChartData
,
getKeyStringValue
}
from
"../util/tools"
;
export
async
function
getData
(
req
,
res
)
{
export
async
function
getData
(
req
,
res
)
{
...
@@ -37,6 +37,8 @@ export async function getData(req, res) {
...
@@ -37,6 +37,8 @@ export async function getData(req, res) {
ret
[
"point"
]
=
await
比赛时间节点
(
mid
);
ret
[
"point"
]
=
await
比赛时间节点
(
mid
);
ret
[
"allmatchtime"
]
=
await
get
全部比赛日期
();
res
.
send
(
ret
);
res
.
send
(
ret
);
}
}
...
...
src/biz/ydygl.ts
View file @
3c82d295
...
@@ -44,7 +44,7 @@ export async function getData(req, res) {
...
@@ -44,7 +44,7 @@ export async function getData(req, res) {
ret
[
"api7"
]
=
getChartData
(
"月训练量趋势"
,
countMap
,
false
,
false
);
ret
[
"api7"
]
=
getChartData
(
"月训练量趋势"
,
countMap
,
false
,
false
);
let
最新一条数据
=
await
get
最近一条淘汰赛时间
();
let
最新一条数据
=
await
get
最近一条淘汰赛时间
();
let
data
=
await
get
积分赛淘汰赛数据
(
最新一条数据
.
time
||
new
Date
()
,
0
);
let
data
=
await
get
积分赛淘汰赛数据
(
最新一条数据
.
time
||
new
Date
());
let
dataName
=
最新一条数据
.
type
==
1
?
"淘汰赛"
:
"校内积分赛"
;
let
dataName
=
最新一条数据
.
type
==
1
?
"淘汰赛"
:
"校内积分赛"
;
ret
[
"matchlist"
]
=
getListData
(
dataName
,
data
,
[
"排名"
,
"照片"
,
"学员"
,
"场次"
,
"胜场"
,
"负场"
,
"积分"
],
{
"排名"
:
"rank"
,
"照片"
:
"self_pic"
,
"学员"
:
"p_name"
,
"场次"
:
"gameCount"
,
"胜场"
:
"win"
,
"负场"
:
"lose"
,
"积分"
:
"points"
}
);
ret
[
"matchlist"
]
=
getListData
(
dataName
,
data
,
[
"排名"
,
"照片"
,
"学员"
,
"场次"
,
"胜场"
,
"负场"
,
"积分"
],
{
"排名"
:
"rank"
,
"照片"
:
"self_pic"
,
"学员"
:
"p_name"
,
"场次"
:
"gameCount"
,
"胜场"
:
"win"
,
"负场"
:
"lose"
,
"积分"
:
"points"
}
);
...
@@ -56,10 +56,10 @@ export async function getData(req, res) {
...
@@ -56,10 +56,10 @@ export async function getData(req, res) {
//淘汰赛积分赛接口
//淘汰赛积分赛接口
export
async
function
getCompetition
(
req
,
res
)
{
export
async
function
getCompetition
(
req
,
res
)
{
let
{
time
,
type
}
=
req
.
query
;
let
{
time
}
=
req
.
query
;
let
data
=
await
get
积分赛淘汰赛数据
(
time
,
type
);
let
data
=
await
get
积分赛淘汰赛数据
(
time
);
let
ret
:
any
=
{};
let
ret
:
any
=
{};
let
dataName
=
type
==
1
?
"淘汰赛"
:
"校内积分赛"
;
let
dataName
=
"校内积分赛"
;
ret
[
"matchlist"
]
=
getListData
(
dataName
,
data
,
[
"排名"
,
"
学员"
,
"场次"
,
"胜场"
,
"负场"
,
"积分"
],
{
"排名"
:
"RANK"
,
"学员"
:
"P_NAME"
,
"场次"
:
"GAMECOUNT"
,
"胜场"
:
"WIN"
,
"负场"
:
"LOSE"
,
"积分"
:
"POINTS
"
}
);
ret
[
"matchlist"
]
=
getListData
(
dataName
,
data
,
[
"排名"
,
"
照片"
,
"学员"
,
"场次"
,
"胜场"
,
"负场"
,
"积分"
],
{
"排名"
:
"rank"
,
"照片"
:
"self_pic"
,
"学员"
:
"p_name"
,
"场次"
:
"gameCount"
,
"胜场"
:
"win"
,
"负场"
:
"lose"
,
"积分"
:
"points
"
}
);
res
.
send
(
ret
);
res
.
send
(
ret
);
}
}
src/data/xsxxfxData.ts
View file @
3c82d295
...
@@ -65,6 +65,17 @@ export async function get近期比赛概览(PID, checkDate) {
...
@@ -65,6 +65,17 @@ export async function get近期比赛概览(PID, checkDate) {
return
{
dataList
:
result
,
firstDate
};
return
{
dataList
:
result
,
firstDate
};
}
}
export
async
function
get
全部比赛日期
()
{
let
sql
=
"select to_char(m_date,'yyyy/mm/dd') m_time from recent_match group by m_date"
;
let
selectResult
=
await
selectData
(
sql
);
// [{to_char:'日期'},...]
let
result
=
[];
selectResult
.
forEach
(
info
=>
{
result
.
push
(
info
.
M_TIME
);
});
return
result
;
// ["", "", "日期2.."]
}
function
dataFormat
(
time
)
{
function
dataFormat
(
time
)
{
let
date
=
new
Date
(
time
);
let
date
=
new
Date
(
time
);
let
match
=
date
.
getMonth
()
+
1
;
let
match
=
date
.
getMonth
()
+
1
;
...
...
src/data/ydyglData.ts
View file @
3c82d295
...
@@ -98,9 +98,9 @@ export async function get最近一条淘汰赛时间() {
...
@@ -98,9 +98,9 @@ export async function get最近一条淘汰赛时间() {
return
{
time
:
result
[
"G_MONTH"
],
type
:
result
[
"G_TYPE"
]};
return
{
time
:
result
[
"G_MONTH"
],
type
:
result
[
"G_TYPE"
]};
}
}
export
async
function
get
积分赛淘汰赛数据
(
time
,
type
)
{
export
async
function
get
积分赛淘汰赛数据
(
time
)
{
let
sql
=
'select * from points_competition where g_month = Placeholder1 and
g_type = Placeholder2 and
ROWNUM < 10 order by rank'
;
let
sql
=
'select * from points_competition where g_month = Placeholder1 and ROWNUM < 10 order by rank'
;
let
selectResult
=
await
selectData
(
sql
,
time
,
type
);
let
selectResult
=
await
selectData
(
sql
,
time
);
let
list
=
[];
let
list
=
[];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment