Package com.bytedesk.core.quality
Class QualityServiceImpl
java.lang.Object
com.bytedesk.core.quality.QualityServiceImpl
- All Implemented Interfaces:
QualityService
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate QualityInspectionRepository
private QualityRuleRepository
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
applyRule
(QualityRuleEntity rule, ThreadEntity thread) void
autoInspectThread
(String threadUid) private long
calculateResponseTime
(ThreadEntity thread) createInspection
(String threadUid, String inspectorUid) createRule
(QualityRuleDTO dto) void
deleteInspection
(Long inspectionId) void
deleteRule
(Long ruleId) getAverageScore
(String agentUid, LocalDateTime startTime, LocalDateTime endTime) private Double
getAverageScoreByType
(String agentUid, String scoreType) getInspection
(Long inspectionId) org.springframework.data.domain.Page<QualityInspectionEntity>
getInspections
(org.springframework.data.domain.Pageable pageable) org.springframework.data.domain.Page<QualityInspectionEntity>
getInspectionsByAgent
(String agentUid, org.springframework.data.domain.Pageable pageable) org.springframework.data.domain.Page<QualityInspectionEntity>
getInspectionsByInspector
(String inspectorUid, org.springframework.data.domain.Pageable pageable) getLowScoreInspections
(Integer threshold) getRules()
getScoreDistribution
(String agentUid) void
updateInspection
(Long inspectionId, QualityInspectionDTO dto) updateRule
(Long ruleId, QualityRuleDTO dto) private void
updateRuleFromDTO
(QualityRuleEntity rule, QualityRuleDTO dto)
-
Field Details
-
inspectionRepository
-
ruleRepository
-
-
Constructor Details
-
QualityServiceImpl
public QualityServiceImpl()
-
-
Method Details
-
createInspection
@Transactional public QualityInspectionEntity createInspection(String threadUid, String inspectorUid) - Specified by:
createInspection
in interfaceQualityService
-
autoInspectThread
- Specified by:
autoInspectThread
in interfaceQualityService
-
scheduleAutoInspection
@Scheduled(cron="0 0 1 * * ?") public void scheduleAutoInspection()- Specified by:
scheduleAutoInspection
in interfaceQualityService
-
applyRule
-
updateInspection
- Specified by:
updateInspection
in interfaceQualityService
-
deleteInspection
- Specified by:
deleteInspection
in interfaceQualityService
-
getInspection
- Specified by:
getInspection
in interfaceQualityService
-
getInspections
public org.springframework.data.domain.Page<QualityInspectionEntity> getInspections(org.springframework.data.domain.Pageable pageable) - Specified by:
getInspections
in interfaceQualityService
-
getInspectionsByAgent
public org.springframework.data.domain.Page<QualityInspectionEntity> getInspectionsByAgent(String agentUid, org.springframework.data.domain.Pageable pageable) - Specified by:
getInspectionsByAgent
in interfaceQualityService
-
getInspectionsByInspector
public org.springframework.data.domain.Page<QualityInspectionEntity> getInspectionsByInspector(String inspectorUid, org.springframework.data.domain.Pageable pageable) - Specified by:
getInspectionsByInspector
in interfaceQualityService
-
getAverageScore
- Specified by:
getAverageScore
in interfaceQualityService
-
getScoreDistribution
- Specified by:
getScoreDistribution
in interfaceQualityService
-
getLowScoreInspections
- Specified by:
getLowScoreInspections
in interfaceQualityService
-
createRule
- Specified by:
createRule
in interfaceQualityService
-
updateRule
- Specified by:
updateRule
in interfaceQualityService
-
deleteRule
- Specified by:
deleteRule
in interfaceQualityService
-
getRules
- Specified by:
getRules
in interfaceQualityService
-
updateRuleFromDTO
-
getAverageScoreByType
-
calculateResponseTime
-