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
1f3af219
Commit
1f3af219
authored
Nov 06, 2023
by
lisong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
坐席处理事件统计接口修改
parent
bfc0baad
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
8 deletions
+30
-8
AlertCalledMapper.java
...os/boot/module/elevator/api/mapper/AlertCalledMapper.java
+2
-2
AlertCalledServiceImpl.java
...ule/elevator/biz/service/impl/AlertCalledServiceImpl.java
+6
-3
AlertStatisticsServiceImpl.java
...elevator/biz/service/impl/AlertStatisticsServiceImpl.java
+22
-3
No files found.
amos-boot-system-tzs/amos-boot-module-96333/amos-boot-module-96333-api/src/main/java/com/yeejoin/amos/boot/module/elevator/api/mapper/AlertCalledMapper.java
View file @
1f3af219
...
...
@@ -109,8 +109,8 @@ public interface AlertCalledMapper extends BaseMapper<AlertCalled> {
List
<
AlertPaperInfoDto
>
getEquipmentHistory
(
@Param
(
"regionCodes"
)
List
<
String
>
regionCodes
,
@Param
(
"equipmentClassCode"
)
String
equipmentClassCode
,
@Param
(
"current"
)
Integer
current
,
@Param
(
"pageNum"
)
Integer
pageNum
,
@Param
(
"equipmentCode"
)
String
equipmentCode
);
@Select
(
"select count(1) from tz_alert_called where rec_user_name =#{userName} and rec_date >= #{startTime} and rec_date <= #{endTime}"
)
Integer
getCountNum
(
String
userName
,
Date
startTime
,
Date
endTime
);
@Select
(
"select count(1) from tz_alert_called where rec_user_name =#{userName} and rec_date >= #{startTime} and rec_date <= #{endTime}
and skill_group = #{groupCode}
"
)
Integer
getCountNum
(
String
userName
,
Date
startTime
,
Date
endTime
,
String
groupCode
);
Map
<
String
,
Long
>
getMyBacklog
(
String
groupCode
);
}
amos-boot-system-tzs/amos-boot-module-96333/amos-boot-module-96333-biz/src/main/java/com/yeejoin/amos/boot/module/elevator/biz/service/impl/AlertCalledServiceImpl.java
View file @
1f3af219
...
...
@@ -481,7 +481,7 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
}
citInfoDto
.
setStatus
(
status
);
}
citInfoDto
.
setCountNum
(
countNum
(
citInfo
.
getCtiUserName
()));
citInfoDto
.
setCountNum
(
countNum
(
citInfo
.
getCtiUserName
()
,
citInfo
.
getCtiUserId
()
));
citInfoDtoList
.
add
(
citInfoDto
);
}
// List<AgencyUserModel> userList = userListResult.getResult();
...
...
@@ -931,7 +931,9 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
// 今日值班人员接警数量统计
public
Integer
countNum
(
String
userName
){
public
Integer
countNum
(
String
userName
,
String
userId
){
//获取当前登录人所在的技能组code
String
groupCode
=
ctiService
.
getSkillGroup
(
userId
);
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
String
format
=
simpleDateFormat
.
format
(
new
Date
());
StrBuilder
strBuilderStart
=
new
StrBuilder
();
...
...
@@ -948,6 +950,6 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
e
.
printStackTrace
();
logger
.
error
(
"日期转化失敗:"
+
e
.
getMessage
());
}
return
alertCalledMapper
.
getCountNum
(
userName
,
startTime
,
endTim
e
);
return
alertCalledMapper
.
getCountNum
(
userName
,
startTime
,
endTime
,
groupCod
e
);
}
}
\ No newline at end of file
amos-boot-system-tzs/amos-boot-module-96333/amos-boot-module-96333-biz/src/main/java/com/yeejoin/amos/boot/module/elevator/biz/service/impl/AlertStatisticsServiceImpl.java
View file @
1f3af219
...
...
@@ -80,6 +80,7 @@ public class AlertStatisticsServiceImpl extends BaseService<AlertStatisticsDto,
AlertStatistics
statistics
=
new
AlertStatistics
();
String
startDate
=
null
;
String
endDate
=
null
;
if
(!
ObjectUtils
.
isEmpty
(
alertStatistics
)){
for
(
AlertStatistics
item
:
alertStatistics
)
{
if
(
ObjectUtils
.
isEmpty
(
startDate
))
{
startDate
=
item
.
getStartDate
();
...
...
@@ -99,7 +100,17 @@ public class AlertStatisticsServiceImpl extends BaseService<AlertStatisticsDto,
statistics
.
setAvgDaysEmergencyEvents
(
ObjectUtils
.
isEmpty
(
statistics
.
getEmergencyEvents
())
?
String
.
valueOf
(
item
.
getEmergencyEvents
())
:
String
.
valueOf
(
item
.
getEmergencyEvents
()
+
statistics
.
getEmergencyEvents
()));
statistics
.
setAvgDaysTrappedPeople
(
ObjectUtils
.
isEmpty
(
statistics
.
getTrappedPeople
())
?
String
.
valueOf
(
item
.
getTrappedPeople
())
:
String
.
valueOf
(
item
.
getTrappedPeople
()
+
statistics
.
getTrappedPeople
()));
statistics
.
setAvgDaysBreakdownRescue
(
ObjectUtils
.
isEmpty
(
statistics
.
getBreakdownRescue
())
?
String
.
valueOf
(
item
.
getBreakdownRescue
())
:
String
.
valueOf
(
item
.
getBreakdownRescue
()
+
statistics
.
getBreakdownRescue
()));
}
}
else
{
statistics
.
setElevatorNum
(
0
);
statistics
.
setEmergencyEvents
(
0
);
statistics
.
setTrappedPeople
(
0
);
statistics
.
setBreakdownRescue
(
0
);
statistics
.
setRescuePersonnel
(
0
);
statistics
.
setComplaint
(
0
);
statistics
.
setAvgDaysEmergencyEvents
(
"0"
);
statistics
.
setAvgDaysTrappedPeople
(
"0"
);
statistics
.
setAvgDaysBreakdownRescue
(
"0"
);
}
statistics
.
setSupervisoryUnitName
(
"合计"
);
statistics
.
setSequenceNbr
(
0L
);
...
...
@@ -108,7 +119,6 @@ public class AlertStatisticsServiceImpl extends BaseService<AlertStatisticsDto,
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
if
(
ObjectUtils
.
isEmpty
(
statistics
.
getEmergencyEvents
())
||
ObjectUtils
.
isEmpty
(
statistics
.
getElevatorNum
())
||
statistics
.
getEmergencyEvents
()
==
0
||
statistics
.
getElevatorNum
()
==
0
)
{
statistics
.
setFailureRate
(
"0%"
);
}
else
{
BigDecimal
bigDecimal
=
new
BigDecimal
(
statistics
.
getEmergencyEvents
().
toString
());
BigDecimal
bigDecimal1
=
new
BigDecimal
(
statistics
.
getElevatorNum
().
toString
());
...
...
@@ -119,25 +129,34 @@ public class AlertStatisticsServiceImpl extends BaseService<AlertStatisticsDto,
AlertStatistics
avg
=
new
AlertStatistics
();
avg
.
setSupervisoryUnitName
(
"平均每天"
);
avg
.
setSequenceNbr
(
1L
);
long
days
=
DateUtil
.
betweenDay
(
simpleDateFormat
.
parse
(
startDate
),
simpleDateFormat
.
parse
(
endDate
),
true
);
long
days
=
0L
;
if
(!
ObjectUtils
.
isEmpty
(
startDate
)
&&
!
ObjectUtils
.
isEmpty
(
endDate
))
{
days
=
DateUtil
.
betweenDay
(
simpleDateFormat
.
parse
(
startDate
),
simpleDateFormat
.
parse
(
endDate
),
true
);
}
int
avgNum
=
Integer
.
parseInt
(
String
.
valueOf
(
days
));
if
(!
ObjectUtils
.
isEmpty
(
statistics
.
getEmergencyEvents
())
&&
statistics
.
getEmergencyEvents
()
!=
0
&&
avgNum
!=
0
)
{
BigDecimal
bigDecimal
=
new
BigDecimal
(
statistics
.
getEmergencyEvents
().
toString
());
BigDecimal
bigDecimal1
=
new
BigDecimal
(
avgNum
);
BigDecimal
divide
=
bigDecimal
.
divide
(
bigDecimal1
,
6
,
BigDecimal
.
ROUND_HALF_UP
);
avg
.
setAvgDaysEmergencyEvents
(
decimalFormatAvg
.
format
(
divide
));
}
else
{
avg
.
setAvgDaysEmergencyEvents
(
"0"
);
}
if
(!
ObjectUtils
.
isEmpty
(
statistics
.
getTrappedPeople
())
&&
statistics
.
getTrappedPeople
()
!=
0
&&
avgNum
!=
0
)
{
BigDecimal
bigDecimal
=
new
BigDecimal
(
statistics
.
getTrappedPeople
().
toString
());
BigDecimal
bigDecimal1
=
new
BigDecimal
(
avgNum
);
BigDecimal
divide
=
bigDecimal
.
divide
(
bigDecimal1
,
6
,
BigDecimal
.
ROUND_HALF_UP
);
avg
.
setAvgDaysTrappedPeople
(
decimalFormatAvg
.
format
(
divide
));
}
else
{
avg
.
setAvgDaysTrappedPeople
(
"0"
);
}
if
(!
ObjectUtils
.
isEmpty
(
statistics
.
getBreakdownRescue
())
&&
statistics
.
getBreakdownRescue
()
!=
0
&&
avgNum
!=
0
)
{
BigDecimal
bigDecimal
=
new
BigDecimal
(
statistics
.
getBreakdownRescue
().
toString
());
BigDecimal
bigDecimal1
=
new
BigDecimal
(
avgNum
);
BigDecimal
divide
=
bigDecimal
.
divide
(
bigDecimal1
,
6
,
BigDecimal
.
ROUND_HALF_UP
);
avg
.
setAvgDaysBreakdownRescue
(
decimalFormatAvg
.
format
(
divide
));
}
else
{
avg
.
setAvgDaysBreakdownRescue
(
"0"
);
}
alertStatistics
.
add
(
avg
);
return
alertStatistics
;
...
...
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