Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zjxcxServer
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
zjxcxServer
Commits
6674ffbd
Commit
6674ffbd
authored
Apr 06, 2023
by
lixinming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2.1修bug 管理后台表格异常,管理后台分数查询不到
parent
e5651c63
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
fuHuaQi.ts
src/biz/admin/fuHuaQi/fuHuaQi.ts
+5
-4
scoreLog.ts
src/data/fuHuaQi/scoreLog.ts
+2
-2
No files found.
src/biz/admin/fuHuaQi/fuHuaQi.ts
View file @
6674ffbd
...
@@ -187,7 +187,7 @@ export async function outPutFuHuaQiBaseData(lv:number, institutionalNature:numbe
...
@@ -187,7 +187,7 @@ export async function outPutFuHuaQiBaseData(lv:number, institutionalNature:numbe
/**生成除了创始团队和场地之外的 小数组 */
/**生成除了创始团队和场地之外的 小数组 */
let
subList
=
[];
let
subList
=
[];
keyList
.
forEach
(
subInfo
=>
{
keyList
.
forEach
(
subInfo
=>
{
subList
.
push
(
info
[
subInfo
]
||
''
);
subList
.
push
(
changeData
[
subInfo
]
||
''
);
});
});
dataList
.
push
(
subList
);
dataList
.
push
(
subList
);
...
@@ -382,9 +382,9 @@ export async function fuHuaQiScore(time:number, name:string, page:number) {
...
@@ -382,9 +382,9 @@ export async function fuHuaQiScore(time:number, name:string, page:number) {
}
else
{
}
else
{
let
datList
=
await
scoreLogData
.
getUptotheminuteScore
(
time
);
let
endT
=
moment
(
time
).
endOf
(
'month'
).
valueOf
();
let
datList
=
await
scoreLogData
.
getUptotheminuteScore
(
time
,
endT
);
rankList
datList
.
forEach
(
info
=>
{
datList
.
forEach
(
info
=>
{
let
name
=
nameMap
[
info
.
_id
]
let
name
=
nameMap
[
info
.
_id
]
if
(
!
name
)
return
;
if
(
!
name
)
return
;
...
@@ -429,7 +429,8 @@ export async function outPutFuHuaQiScore(time:number) {
...
@@ -429,7 +429,8 @@ export async function outPutFuHuaQiScore(time:number) {
}
else
{
}
else
{
let
datList
=
await
scoreLogData
.
getUptotheminuteScore
(
time
);
let
endT
=
moment
(
time
).
endOf
(
'month'
).
valueOf
();
let
datList
=
await
scoreLogData
.
getUptotheminuteScore
(
time
,
endT
);
outPutName
=
`
${
new
Date
(
time
).
getFullYear
()}
年
${
new
Date
(
time
).
getMonth
()
+
1
}
月`
;
outPutName
=
`
${
new
Date
(
time
).
getFullYear
()}
年
${
new
Date
(
time
).
getMonth
()
+
1
}
月`
;
rankList
rankList
datList
.
forEach
(
info
=>
{
datList
.
forEach
(
info
=>
{
...
...
src/data/fuHuaQi/scoreLog.ts
View file @
6674ffbd
...
@@ -64,9 +64,9 @@ export async function getLog(uscc:string, startTime:number, endTime:number) {
...
@@ -64,9 +64,9 @@ export async function getLog(uscc:string, startTime:number, endTime:number) {
* @param timeMs
* @param timeMs
* @returns
* @returns
*/
*/
export
async
function
getUptotheminuteScore
(
t
imeMs
:
number
)
{
export
async
function
getUptotheminuteScore
(
startTimeMs
:
number
,
endT
imeMs
:
number
)
{
return
await
fuHuaQiScoreLogModel
.
aggregate
([
return
await
fuHuaQiScoreLogModel
.
aggregate
([
{
"$match"
:{
timeMs
:{
"$
lt"
:
t
imeMs
}
}
},
{
"$match"
:{
timeMs
:{
"$
gt"
:
startTimeMs
,
"$lt"
:
endT
imeMs
}
}
},
{
"$project"
:{
score
:
1
,
uscc
:
1
,
timeMs
:
1
}
},
{
"$project"
:{
score
:
1
,
uscc
:
1
,
timeMs
:
1
}
},
{
"$group"
:{
_id
:
"$uscc"
,
maxScore
:{
"$last"
:
"$score"
}
}
}
{
"$group"
:{
_id
:
"$uscc"
,
maxScore
:{
"$last"
:
"$score"
}
}
}
]);
]);
...
...
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