Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
shouzhouServer
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
chenjinjing
shouzhouServer
Commits
a530048b
Commit
a530048b
authored
Jul 18, 2024
by
chenjinjing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
5e6321b3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
abstractDataStrategyRight.ts
src/biz/strategies/right/abstractDataStrategyRight.ts
+2
-1
getEventCountByYearStrategy.ts
src/biz/strategies/right/getEventCountByYearStrategy.ts
+1
-1
No files found.
src/biz/strategies/right/abstractDataStrategyRight.ts
View file @
a530048b
...
...
@@ -6,6 +6,7 @@
import
{
dataStrategy
}
from
"../dataStrategy"
;
import
{
DataExtractor
}
from
"../../../util/dataExtractor"
;
import
excelSerialToJSDate
from
"../../../util/excelDateToJSDate"
;
import
moment
=
require
(
"moment"
);
/**
* 抽象数据策略右侧类,所有右侧具体策略类都需要继承该抽象类。
...
...
@@ -85,7 +86,7 @@ protected getListCount(list: string[], target: string, data: any, year: string)
let
rowDate
:
any
=
0
;
if
(
!
isNaN
(
row
[
'创建时间'
]))
rowDate
=
excelSerialToJSDate
(
row
[
'创建时间'
]);
else
rowDate
=
row
[
'创建时间'
];
const
rowYear
=
rowDate
.
getFullYear
(
);
let
rowYear
=
parseInt
(
moment
(
rowDate
).
format
(
"YYYY"
)
);
if
(
rowYear
==
targetYear
)
{
count
.
set
(
row
[
target
],
(
count
.
get
(
row
[
target
])
||
0
)
+
1
);
}
...
...
src/biz/strategies/right/getEventCountByYearStrategy.ts
View file @
a530048b
...
...
@@ -44,7 +44,7 @@ export class getEventCountByYearStrategy extends abstractDataStrategyRight {
let
rowDate
:
any
=
0
;
if
(
!
isNaN
(
row
[
'创建时间'
]))
rowDate
=
excelSerialToJSDate
(
row
[
'创建时间'
]);
else
rowDate
=
row
[
'创建时间'
];
let
rowYear
=
rowDate
.
getFullYear
(
);
let
rowYear
=
parseInt
(
moment
(
rowDate
).
format
(
"YYYY"
)
);
// const rowDate = excelSerialToJSDate(rawDate);
...
...
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