Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-serivce
/
glsk-analysis-admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 84b167d8
authored
Jul 18, 2025
by
zhangxw
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
话术萃取数据问题bug修复
1 parent
27ad4e7a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
8 deletions
src/modules/clue/clue.service.ts
src/modules/clue/clue.service.ts
View file @
84b167d
...
@@ -150,18 +150,26 @@ export class ClueService {
...
@@ -150,18 +150,26 @@ export class ClueService {
}
}
if
(
params
.
table
==
'script_record_browse_log'
)
{
// 话术萃取
if
(
params
.
table
==
'script_record_browse_log'
)
{
// 话术萃取
const
uniqueAccounts
=
new
Set
(
data
.
map
(
user
=>
user
.
staff_phone
))
const
uniqueAccounts
=
new
Set
(
data
.
map
(
user
=>
user
.
staff_phone
))
const
uniqueDates
=
data
.
reduce
((
set
,
val
)
=>
{
const
uniqueDates
=
new
Set
(
const
dateStr
=
new
Date
(
val
.
start_time
).
toISOString
().
split
(
'T'
)[
0
];
data
.
map
(
user
=>
{
set
.
add
(
dateStr
);
const
d
=
new
Date
(
user
.
start_time
);
return
set
;
// 格式化成 YYYY-MM-DD HH:mm:ss
},
new
Set
());
const
Y
=
d
.
getFullYear
();
const
M
=
String
(
d
.
getMonth
()
+
1
).
padStart
(
2
,
'0'
);
const
D
=
String
(
d
.
getDate
()).
padStart
(
2
,
'0'
);
const
h
=
String
(
d
.
getHours
()).
padStart
(
2
,
'0'
);
const
m
=
String
(
d
.
getMinutes
()).
padStart
(
2
,
'0'
);
const
s
=
String
(
d
.
getSeconds
()).
padStart
(
2
,
'0'
);
return
`
${
Y
}
-
${
M
}
-
${
D
}
${
h
}
:
${
m
}
:
${
s
}
`
;
})
)
return
{
return
{
code
:
RESPONSE_CODE
.
SUCCESS
,
code
:
RESPONSE_CODE
.
SUCCESS
,
message
:
'查询成功'
,
message
:
'查询成功'
,
data
:
[{
data
:
[{
count
:
total
,
count
:
total
,
batchTotal
:
unique
Account
s
.
size
,
batchTotal
:
unique
Date
s
.
size
,
peopleTotal
:
unique
Date
s
.
size
,
peopleTotal
:
unique
Account
s
.
size
,
formattedStart
,
formattedStart
,
formattedEnd
,
formattedEnd
,
}],
}],
...
@@ -201,7 +209,7 @@ export class ClueService {
...
@@ -201,7 +209,7 @@ export class ClueService {
const
date
=
new
Date
(
utcStr
);
const
date
=
new
Date
(
utcStr
);
if
(
isNaN
(
date
.
getTime
()))
return
''
;
if
(
isNaN
(
date
.
getTime
()))
return
''
;
const
datePlus8
=
new
Date
(
date
.
getTime
()
+
8
*
60
*
60
*
1000
);
const
datePlus8
=
new
Date
(
date
.
getTime
());
const
year
=
datePlus8
.
getUTCFullYear
();
const
year
=
datePlus8
.
getUTCFullYear
();
const
month
=
(
datePlus8
.
getUTCMonth
()
+
1
).
toString
().
padStart
(
2
,
'0'
);
const
month
=
(
datePlus8
.
getUTCMonth
()
+
1
).
toString
().
padStart
(
2
,
'0'
);
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment