Class QualityController

java.lang.Object
com.bytedesk.core.quality.QualityController

@RestController @RequestMapping("/api/v1/quality") public class QualityController extends Object
  • Field Details

  • 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

      @DeleteMapping("/inspections/{inspectionId}") @PreAuthorize("hasRole(\'QUALITY_ADMIN\')") public org.springframework.http.ResponseEntity<Void> deleteInspection(@PathVariable Long inspectionId)
    • 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

      @GetMapping("/stats/agent/{agentUid}/distribution") public org.springframework.http.ResponseEntity<Map<String,Double>> getScoreDistribution(@PathVariable String agentUid)
    • 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

      @DeleteMapping("/rules/{ruleId}") @PreAuthorize("hasRole(\'QUALITY_ADMIN\')") public org.springframework.http.ResponseEntity<Void> deleteRule(@PathVariable Long ruleId)