fix(mobile): show supervisor team review queue
This commit is contained in:
+9
-4
@@ -60,12 +60,12 @@ public class AihrMobileController {
|
|||||||
public R<List<RecordResponse>> practiceReviews(@RequestParam(required = false) String projectCode,
|
public R<List<RecordResponse>> practiceReviews(@RequestParam(required = false) String projectCode,
|
||||||
@RequestParam(required = false) String extPartyId,
|
@RequestParam(required = false) String extPartyId,
|
||||||
@RequestParam(required = false) Integer limit) {
|
@RequestParam(required = false) Integer limit) {
|
||||||
return R.ok(mobileSeedService.practiceReviews(currentAppUsername(), projectCode, extPartyId, limit));
|
return R.ok(mobileSeedService.practiceReviews(supervisorScopeExtPartyId(), projectCode, extPartyId, limit));
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/practice/reviews/{id}")
|
@GetMapping("/practice/reviews/{id}")
|
||||||
public R<Map<String, Object>> practiceReview(@PathVariable Long id) {
|
public R<Map<String, Object>> practiceReview(@PathVariable Long id) {
|
||||||
ReviewDetailResponse detail = mobileSeedService.practiceReview(id, currentAppUsername());
|
ReviewDetailResponse detail = mobileSeedService.practiceReview(id, supervisorScopeExtPartyId());
|
||||||
return detail == null ? R.fail("复盘记录不存在") : R.ok(reviewDetailPayload(detail));
|
return detail == null ? R.fail("复盘记录不存在") : R.ok(reviewDetailPayload(detail));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -76,7 +76,7 @@ public class AihrMobileController {
|
|||||||
|
|
||||||
@PostMapping("/practice/reviews/{id}/reviewed")
|
@PostMapping("/practice/reviews/{id}/reviewed")
|
||||||
public R<Void> markReviewed(@PathVariable Long id, @RequestBody(required = false) ReviewAdviceRequest request) {
|
public R<Void> markReviewed(@PathVariable Long id, @RequestBody(required = false) ReviewAdviceRequest request) {
|
||||||
return mobileSeedService.markReviewed(id, request, currentAppUsername()) ? R.ok() : R.fail("复盘记录不存在");
|
return mobileSeedService.markReviewed(id, request, supervisorScopeExtPartyId()) ? R.ok() : R.fail("复盘记录不存在");
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/profile")
|
@GetMapping("/profile")
|
||||||
@@ -91,7 +91,7 @@ public class AihrMobileController {
|
|||||||
|
|
||||||
@GetMapping("/practice/alerts")
|
@GetMapping("/practice/alerts")
|
||||||
public R<List<PracticeAlertResponse>> practiceAlerts() {
|
public R<List<PracticeAlertResponse>> practiceAlerts() {
|
||||||
return R.ok(mobileSeedService.practiceAlerts(currentAppUsername()));
|
return R.ok(mobileSeedService.practiceAlerts(supervisorScopeExtPartyId()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/practice/assignments")
|
@GetMapping("/practice/assignments")
|
||||||
@@ -123,6 +123,11 @@ public class AihrMobileController {
|
|||||||
return ownMobileExtPartyId(requested);
|
return ownMobileExtPartyId(requested);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static String supervisorScopeExtPartyId() {
|
||||||
|
// ponytail: supervisor H5 keeps team-scope reviews/alerts until mobile roles exist.
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
private static String currentAppUsername() {
|
private static String currentAppUsername() {
|
||||||
LoginUser loginUser = LoginHelper.getLoginUser();
|
LoginUser loginUser = LoginHelper.getLoginUser();
|
||||||
if (loginUser == null || !UserType.APP_USER.getUserType().equals(loginUser.getUserType())) {
|
if (loginUser == null || !UserType.APP_USER.getUserType().equals(loginUser.getUserType())) {
|
||||||
|
|||||||
Reference in New Issue
Block a user