feat(aihr): expose position SOP learning scope
This commit is contained in:
+7
@@ -9,6 +9,7 @@ import org.dromara.aihr.domain.AihrSopDto.LocalImportRequest;
|
||||
import org.dromara.aihr.domain.AihrSopDto.LocalImportResponse;
|
||||
import org.dromara.aihr.domain.AihrSopDto.LocalImportTaskResponse;
|
||||
import org.dromara.aihr.domain.AihrSopDto.ProcessingOverviewResponse;
|
||||
import org.dromara.aihr.domain.AihrSopDto.PositionSopResponse;
|
||||
import org.dromara.aihr.domain.AihrSopDto.SearchRequest;
|
||||
import org.dromara.aihr.domain.AihrSopDto.SearchResponse;
|
||||
import org.dromara.aihr.domain.AihrSopDto.SopReviewRequest;
|
||||
@@ -69,6 +70,12 @@ public class AihrSopController {
|
||||
return R.ok(sopSeedService.search(request));
|
||||
}
|
||||
|
||||
@GetMapping("/position-sop")
|
||||
public R<PositionSopResponse> positionSop(@RequestParam(required = false) String position,
|
||||
@RequestParam(required = false) String projectType) {
|
||||
return R.ok(sopSeedService.positionSop(position, projectType));
|
||||
}
|
||||
|
||||
@PostMapping("/answer-feedback")
|
||||
public R<AnswerFeedbackResponse> answerFeedback(@RequestBody AnswerFeedbackRequest request) {
|
||||
return R.ok(sopSeedService.answerFeedback(request));
|
||||
|
||||
+19
@@ -10,6 +10,25 @@ public final class AihrSopDto {
|
||||
public record SearchRequest(String queryText, String category, String position, String source, Integer limit) {
|
||||
}
|
||||
|
||||
public record PositionSopResponse(
|
||||
String position,
|
||||
String projectType,
|
||||
String routingMode,
|
||||
Boolean formalApplicabilityConfigured,
|
||||
String qualificationStatus,
|
||||
String message,
|
||||
List<PositionSopTopicResponse> topics
|
||||
) {
|
||||
}
|
||||
|
||||
public record PositionSopTopicResponse(
|
||||
String category,
|
||||
String question,
|
||||
String reference,
|
||||
String status
|
||||
) {
|
||||
}
|
||||
|
||||
public record SummaryCardRequest(String queryText, String category) {
|
||||
}
|
||||
|
||||
|
||||
+34
@@ -19,6 +19,8 @@ import org.dromara.aihr.domain.AihrSopDto.LocalImportResponse;
|
||||
import org.dromara.aihr.domain.AihrSopDto.LocalImportTaskResponse;
|
||||
import org.dromara.aihr.domain.AihrSopDto.MetricResponse;
|
||||
import org.dromara.aihr.domain.AihrSopDto.PipelineStepResponse;
|
||||
import org.dromara.aihr.domain.AihrSopDto.PositionSopResponse;
|
||||
import org.dromara.aihr.domain.AihrSopDto.PositionSopTopicResponse;
|
||||
import org.dromara.aihr.domain.AihrSopDto.ProcessingEventResponse;
|
||||
import org.dromara.aihr.domain.AihrSopDto.ProcessingOverviewResponse;
|
||||
import org.dromara.aihr.domain.AihrSopDto.ProcessingRulesResponse;
|
||||
@@ -156,6 +158,38 @@ public class AihrSopSeedService {
|
||||
return withReviewId(noEvidenceResponse(queryText, category), source);
|
||||
}
|
||||
|
||||
/**
|
||||
* 一期只提供岗位学习导航摘要,不把它冒充成正式的 SOP 适用范围或上岗资格判断。
|
||||
* 正式匹配需要 position_responsibility/sop_applicability 和组织项目数据落库后再开启。
|
||||
*/
|
||||
public PositionSopResponse positionSop(String requestedPosition, String projectType) {
|
||||
String position = firstNonBlank(requestedPosition, "生活顾问");
|
||||
String effectiveProjectType = firstNonBlank(projectType, "住宅");
|
||||
if (!"生活顾问".equals(position)) {
|
||||
return new PositionSopResponse(
|
||||
position,
|
||||
effectiveProjectType,
|
||||
"pilot-seed-navigation",
|
||||
false,
|
||||
"NOT_CONFIGURED",
|
||||
"当前一期只开放生活顾问试点,当前岗位尚未配置正式 SOP 适用范围。",
|
||||
List.of()
|
||||
);
|
||||
}
|
||||
List<PositionSopTopicResponse> topics = seeds.values().stream()
|
||||
.map(seed -> new PositionSopTopicResponse(seed.category(), seed.question(), seed.reference(), "可学习"))
|
||||
.toList();
|
||||
return new PositionSopResponse(
|
||||
position,
|
||||
effectiveProjectType,
|
||||
"pilot-seed-navigation",
|
||||
false,
|
||||
"NOT_CONFIGURED",
|
||||
"当前为生活顾问一期学习导航;正式上岗资格仍需组织身份、SOP 适用范围和资格规则配置。",
|
||||
topics
|
||||
);
|
||||
}
|
||||
|
||||
public SopReviewResponse reviewSearch(Long id, SopReviewRequest request) {
|
||||
if (id == null) {
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user