Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
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
项目统一框架
amos-boot-biz
Commits
8de75800
Commit
8de75800
authored
Mar 07, 2023
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改扫描bug
parent
1af9b72d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
49 deletions
+19
-49
VoiceRecordFileServiceImpl.java
...dule/jcs/biz/service/impl/VoiceRecordFileServiceImpl.java
+10
-8
VoiceRecordLogServiceImpl.java
...odule/jcs/biz/service/impl/VoiceRecordLogServiceImpl.java
+6
-39
WarningServiceImpl.java
.../boot/module/jcs/biz/service/impl/WarningServiceImpl.java
+1
-1
YesServiceImpl.java
...amos/boot/module/jcs/biz/service/impl/YesServiceImpl.java
+2
-1
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/VoiceRecordFileServiceImpl.java
View file @
8de75800
...
@@ -93,7 +93,9 @@ public class VoiceRecordFileServiceImpl extends BaseService<VoiceRecordFileDto,
...
@@ -93,7 +93,9 @@ public class VoiceRecordFileServiceImpl extends BaseService<VoiceRecordFileDto,
log
.
setDealTimes
(
0
);
log
.
setDealTimes
(
0
);
if
(!
ValidationUtil
.
isEmpty
(
callRecord
))
{
if
(!
ValidationUtil
.
isEmpty
(
callRecord
))
{
model
.
setFilePath
(
String
.
format
(
"/%s/%s"
,
callRecord
.
get
(
"subPath"
),
callRecord
.
get
(
"recordName"
).
replace
(
"wav"
,
"mp3"
)));
model
.
setFilePath
(
String
.
format
(
"/%s/%s"
,
callRecord
.
get
(
"subPath"
),
callRecord
.
get
(
"recordName"
).
replace
(
"wav"
,
"mp3"
)));
logger
.
info
(
String
.
format
(
"音频地址:【%s】"
,
String
.
format
(
"/%s/%s"
,
callRecord
.
get
(
"subPath"
),
callRecord
.
get
(
"recordName"
))));
String
logs
=
String
.
format
(
"音频地址:【%s】"
,
String
.
format
(
"/%s/%s"
,
callRecord
.
get
(
"subPath"
),
callRecord
.
get
(
"recordName"
)));
logger
.
info
(
logs
);
}
else
{
// 无录音地址记录日志
}
else
{
// 无录音地址记录日志
iVoiceRecordLogServiceImpl
.
save
(
log
);
iVoiceRecordLogServiceImpl
.
save
(
log
);
}
}
...
@@ -133,12 +135,12 @@ public class VoiceRecordFileServiceImpl extends BaseService<VoiceRecordFileDto,
...
@@ -133,12 +135,12 @@ public class VoiceRecordFileServiceImpl extends BaseService<VoiceRecordFileDto,
@Override
@Override
public
List
<
FusionDto
>
getCarList
(
Boolean
hasFusion
)
{
public
List
<
FusionDto
>
getCarList
(
Boolean
hasFusion
)
{
List
<
FusionDto
>
fusionDtos
=
new
ArrayList
<>();
List
<
FusionDto
>
fusionDtos
=
new
ArrayList
<>();
List
carList
=
equipFeignClient
.
getCarFusionList
().
getResult
();
List
<
Map
<
String
,
Object
>>
carList
=
equipFeignClient
.
getCarFusionList
().
getResult
();
List
<
String
>
employeeIDs
=
getAllOnlineUser
(
hasFusion
);
List
<
String
>
employeeIDs
=
getAllOnlineUser
(
hasFusion
);
if
(!
ValidationUtil
.
isEmpty
(
carList
))
{
if
(!
ValidationUtil
.
isEmpty
(
carList
))
{
carList
.
forEach
(
x
->
{
carList
.
forEach
(
x
->
{
FusionDto
fusionDto
=
new
FusionDto
();
FusionDto
fusionDto
=
new
FusionDto
();
Map
map
=
(
Map
)
x
;
Map
<
String
,
Object
>
map
=
(
Map
<
String
,
Object
>
)
x
;
fusionDto
.
setName
(
String
.
valueOf
(
map
.
get
(
"name"
)));
fusionDto
.
setName
(
String
.
valueOf
(
map
.
get
(
"name"
)));
fusionDto
.
setCarNum
(
String
.
valueOf
(
map
.
get
(
"carNum"
)));
fusionDto
.
setCarNum
(
String
.
valueOf
(
map
.
get
(
"carNum"
)));
buildFusionDtoAndId
(
fusionDto
,
employeeIDs
,
hasFusion
,
map
);
buildFusionDtoAndId
(
fusionDto
,
employeeIDs
,
hasFusion
,
map
);
...
@@ -211,16 +213,16 @@ public class VoiceRecordFileServiceImpl extends BaseService<VoiceRecordFileDto,
...
@@ -211,16 +213,16 @@ public class VoiceRecordFileServiceImpl extends BaseService<VoiceRecordFileDto,
return
employeeIDs
;
return
employeeIDs
;
}
}
private
FusionDto
buildFusionDtoAndId
(
FusionDto
fusionDto
,
List
<
String
>
employeeIDs
,
Boolean
hasFusion
,
Map
map
)
{
private
FusionDto
buildFusionDtoAndId
(
FusionDto
fusionDto
,
List
<
String
>
employeeIDs
,
Boolean
hasFusion
,
Map
<
String
,
Object
>
map
)
{
List
carPropertyList
=
(
List
)
map
.
get
(
"carPropertyList"
);
List
carPropertyList
=
(
List
)
map
.
get
(
"carPropertyList"
);
carPropertyList
.
forEach
(
carProperty
->
{
carPropertyList
.
forEach
(
carProperty
->
{
Map
carPropertyMap
=
(
Map
)
carProperty
;
Map
<
String
,
Object
>
carPropertyMap
=
(
Map
<
String
,
Object
>
)
carProperty
;
Object
nameKey
=
carPropertyMap
.
get
(
"nameKey"
);
Object
nameKey
=
carPropertyMap
.
get
(
"nameKey"
);
if
(
hasFusion
&&
PropertyEnum
.
GIS
.
getValue
().
equals
(
nameKey
))
{
fusionDto
.
setId
(
String
.
valueOf
(
carPropertyMap
.
get
(
"value"
)));
if
((
hasFusion
&&
PropertyEnum
.
GIS
.
getValue
().
equals
(
nameKey
))||
(!
hasFusion
&&
PropertyEnum
.
VIDEO
.
getValue
().
equals
(
nameKey
))){
}
else
if
(!
hasFusion
&&
PropertyEnum
.
VIDEO
.
getValue
().
equals
(
nameKey
))
{
fusionDto
.
setId
(
String
.
valueOf
(
carPropertyMap
.
get
(
"value"
)));
fusionDto
.
setId
(
String
.
valueOf
(
carPropertyMap
.
get
(
"value"
)));
}
}
});
});
buildFusionDto
(
fusionDto
,
employeeIDs
,
hasFusion
);
buildFusionDto
(
fusionDto
,
employeeIDs
,
hasFusion
);
return
fusionDto
;
return
fusionDto
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/VoiceRecordLogServiceImpl.java
View file @
8de75800
...
@@ -64,7 +64,8 @@ public class VoiceRecordLogServiceImpl extends BaseService<VoiceRecordLogDto,Voi
...
@@ -64,7 +64,8 @@ public class VoiceRecordLogServiceImpl extends BaseService<VoiceRecordLogDto,Voi
// @Scheduled(fixedDelay=ONE_Minute)
// @Scheduled(fixedDelay=ONE_Minute)
public
void
fixedDelayJob
(){
public
void
fixedDelayJob
(){
// 设置token
// 设置token
System
.
out
.
println
(
JSON
.
toJSONString
(
RequestContext
.
cloneRequestContext
()));
String
logs
=
JSON
.
toJSONString
(
RequestContext
.
cloneRequestContext
());
logger
.
info
(
logs
);
// 首先查找未完成 且失败次数少于5 的 记录
// 首先查找未完成 且失败次数少于5 的 记录
List
<
VoiceRecordLog
>
logList
=
this
.
list
(
new
LambdaQueryWrapper
<
VoiceRecordLog
>().
eq
(
VoiceRecordLog:
:
getIsDeal
,
false
).
lt
(
VoiceRecordLog:
:
getDealTimes
,
5
));
List
<
VoiceRecordLog
>
logList
=
this
.
list
(
new
LambdaQueryWrapper
<
VoiceRecordLog
>().
eq
(
VoiceRecordLog:
:
getIsDeal
,
false
).
lt
(
VoiceRecordLog:
:
getDealTimes
,
5
));
if
(
logList
!=
null
&&
logList
.
size
()
>
0
)
{
if
(
logList
!=
null
&&
logList
.
size
()
>
0
)
{
...
@@ -77,10 +78,7 @@ public class VoiceRecordLogServiceImpl extends BaseService<VoiceRecordLogDto,Voi
...
@@ -77,10 +78,7 @@ public class VoiceRecordLogServiceImpl extends BaseService<VoiceRecordLogDto,Voi
}
}
l
.
setDealTimes
(
dealTimes
);
l
.
setDealTimes
(
dealTimes
);
Map
<
String
,
String
>
map
=
fusionService
.
getCallRecordByCID
(
l
.
getConnectId
());
Map
<
String
,
String
>
map
=
fusionService
.
getCallRecordByCID
(
l
.
getConnectId
());
// if(ctiInfos == null || ctiInfos.size() == 0) {
// this.updateById(l);
// return;
// }
VoiceRecordFileDto
model
=
new
VoiceRecordFileDto
();
VoiceRecordFileDto
model
=
new
VoiceRecordFileDto
();
model
.
setAlertId
(
l
.
getAlertId
());
model
.
setAlertId
(
l
.
getAlertId
());
model
.
setCaller
(
map
.
get
(
"caller"
));
model
.
setCaller
(
map
.
get
(
"caller"
));
...
@@ -105,15 +103,7 @@ public class VoiceRecordLogServiceImpl extends BaseService<VoiceRecordLogDto,Voi
...
@@ -105,15 +103,7 @@ public class VoiceRecordLogServiceImpl extends BaseService<VoiceRecordLogDto,Voi
}
}
Map
<
String
,
String
>
downloadFile
=
null
;
Map
<
String
,
String
>
downloadFile
=
null
;
try
{
// JSONObject jsonObject = fusionService.getCallRecordByCID(l.getConnectId());
// Map<String, String> map = voiceRecordFileService.getResult(jsonObject);
// downloadFile = ctiService.downLoadRecordFile(recordInfo.getString("connectionid"));
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
this
.
updateById
(
l
);
return
;
}
if
(
downloadFile
.
isEmpty
())
{
if
(
downloadFile
.
isEmpty
())
{
this
.
updateById
(
l
);
this
.
updateById
(
l
);
return
;
return
;
...
@@ -121,34 +111,10 @@ public class VoiceRecordLogServiceImpl extends BaseService<VoiceRecordLogDto,Voi
...
@@ -121,34 +111,10 @@ public class VoiceRecordLogServiceImpl extends BaseService<VoiceRecordLogDto,Voi
for
(
Map
.
Entry
<
String
,
String
>
file
:
downloadFile
.
entrySet
())
{
for
(
Map
.
Entry
<
String
,
String
>
file
:
downloadFile
.
entrySet
())
{
model
.
setFilePath
(
file
.
getKey
());
model
.
setFilePath
(
file
.
getKey
());
}
}
// AlertCalledFormDto alertDto = iAlertCalledService.selectAlertCalledByIdNoCache(model.getAlertId());
// if(alertDto == null || alertDto.getAlertCalledDto() == null) {
// this.updateById(l);
// return;
// }
// model.setAlertStage(alertDto.getAlertCalledDto().getAlertStage());
// model.setAlertStageCode(alertDto.getAlertCalledDto().getAlertStageCode());
// model.setSourceId(-1l);
// voiceRecordFileServiceImpl.createWithModel(model);
// JSONObject json = new JSONObject();
// json.put("alertId",model.getAlertId());
// try {
// emqKeeper.getMqttClient().publish(ctiMessage, json.toJSONString().getBytes(), 2, false);
// try {
// redisUtils.del(RedisKey.jcs_ALERTCALLED_ID+model.getAlertId());
// } catch (Exception e) {
// e.printStackTrace();
// logger.error("删除redis失败:" + e.getMessage());
// }
// } catch (MqttException e) {
// logger.error("推送失败");
// }
// l.setIsDeal(true);
// this.updateById(l);
});
});
}
}
System
.
out
.
println
(
"执行通话记录任务"
);
logger
.
info
(
"执行通话记录任务"
);
}
}
}
}
\ No newline at end of file
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/WarningServiceImpl.java
View file @
8de75800
...
@@ -19,7 +19,7 @@ public class WarningServiceImpl implements IHomePageService {
...
@@ -19,7 +19,7 @@ public class WarningServiceImpl implements IHomePageService {
@Autowired
@Autowired
EquipFeignClient
quipFeignClient
;
EquipFeignClient
quipFeignClient
;
private
static
EquipFeignClient
quipFeignClient1
;
private
EquipFeignClient
quipFeignClient1
;
@PostConstruct
@PostConstruct
public
void
init
(){
public
void
init
(){
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/YesServiceImpl.java
View file @
8de75800
...
@@ -19,7 +19,8 @@ public class YesServiceImpl implements IHomePageService {
...
@@ -19,7 +19,8 @@ public class YesServiceImpl implements IHomePageService {
@Autowired
@Autowired
EquipFeignClient
quipFeignClient
;
EquipFeignClient
quipFeignClient
;
private
static
EquipFeignClient
quipFeignClient1
;
private
EquipFeignClient
quipFeignClient1
;
@PostConstruct
@PostConstruct
public
void
init
(){
public
void
init
(){
...
...
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