Package com.bytedesk.core.quality
Class QualityController
java.lang.Object
com.bytedesk.core.quality.QualityController
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<QualityInspectionEntity>
createInspection
(String threadUid, org.springframework.security.core.userdetails.UserDetails userDetails) org.springframework.http.ResponseEntity<QualityRuleEntity>
createRule
(@Valid QualityRuleDTO dto) org.springframework.http.ResponseEntity<Void>
deleteInspection
(Long inspectionId) org.springframework.http.ResponseEntity<Void>
deleteRule
(Long ruleId) org.springframework.http.ResponseEntity<Double>
getAverageScore
(String agentUid, LocalDateTime startTime, LocalDateTime endTime) org.springframework.http.ResponseEntity<org.springframework.data.domain.Page<QualityInspectionEntity>>
getInspections
(org.springframework.data.domain.Pageable pageable) org.springframework.http.ResponseEntity<org.springframework.data.domain.Page<QualityInspectionEntity>>
getInspectionsByAgent
(String agentUid, org.springframework.data.domain.Pageable pageable) getScoreDistribution
(String agentUid) org.springframework.http.ResponseEntity<QualityInspectionEntity>
updateInspection
(Long inspectionId, @Valid QualityInspectionDTO dto) org.springframework.http.ResponseEntity<QualityRuleEntity>
updateRule
(Long ruleId, @Valid QualityRuleDTO dto)
-
Field Details
-
qualityService
-
-
Constructor Details
-
QualityController
public QualityController()
-
-
Method Details
-
createInspection
@PostMapping("/inspections") @PreAuthorize("hasRole(\'QUALITY_INSPECTOR\')") public org.springframework.http.ResponseEntity<QualityInspectionEntity> createInspection(@RequestParam String threadUid, @AuthenticationPrincipal org.springframework.security.core.userdetails.UserDetails userDetails) -
updateInspection
@PutMapping("/inspections/{inspectionId}") @PreAuthorize("hasRole(\'QUALITY_INSPECTOR\')") public org.springframework.http.ResponseEntity<QualityInspectionEntity> updateInspection(@PathVariable Long inspectionId, @Valid @RequestBody @Valid QualityInspectionDTO dto) -
deleteInspection
-
getInspections
@GetMapping("/inspections") public org.springframework.http.ResponseEntity<org.springframework.data.domain.Page<QualityInspectionEntity>> getInspections(org.springframework.data.domain.Pageable pageable) -
getInspectionsByAgent
@GetMapping("/inspections/agent/{agentUid}") public org.springframework.http.ResponseEntity<org.springframework.data.domain.Page<QualityInspectionEntity>> getInspectionsByAgent(@PathVariable String agentUid, org.springframework.data.domain.Pageable pageable) -
getAverageScore
@GetMapping("/stats/agent/{agentUid}/score") public org.springframework.http.ResponseEntity<Double> getAverageScore(@PathVariable String agentUid, @RequestParam @DateTimeFormat(iso=DATE_TIME) LocalDateTime startTime, @RequestParam @DateTimeFormat(iso=DATE_TIME) LocalDateTime endTime) -
getScoreDistribution
-
createRule
@PostMapping("/rules") @PreAuthorize("hasRole(\'QUALITY_ADMIN\')") public org.springframework.http.ResponseEntity<QualityRuleEntity> createRule(@Valid @RequestBody @Valid QualityRuleDTO dto) -
updateRule
@PutMapping("/rules/{ruleId}") @PreAuthorize("hasRole(\'QUALITY_ADMIN\')") public org.springframework.http.ResponseEntity<QualityRuleEntity> updateRule(@PathVariable Long ruleId, @Valid @RequestBody @Valid QualityRuleDTO dto) -
deleteRule
-