fix: 医生下拉关联真实用户 + 清理脏数据 + 3D查看器
修复: - 医生下拉改为调用/system/user/list获取所有活跃用户 - 新建任务表单filterable选择真实医生 - 清理测试产生的脏数据(7个CANCELLED任务+5个测试报告) - 修复卡住的PROCESSING任务(改为CANCELLED) 医生列表: - 显示所有活跃用户的nickName+userName - 支持搜索过滤
This commit is contained in:
@@ -4,6 +4,10 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.core.common.core.domain.R;
|
||||
import com.healthlink.his.reconstruction.domain.*;
|
||||
import com.healthlink.his.reconstruction.service.*;
|
||||
import com.core.system.service.ISysUserService;
|
||||
import com.core.system.service.ISysRoleService;
|
||||
import com.core.common.core.domain.entity.SysRole;
|
||||
import com.core.common.core.domain.entity.SysUser;
|
||||
import lombok.AllArgsConstructor;import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.StringUtils;import org.springframework.web.bind.annotation.*;
|
||||
@@ -13,6 +17,8 @@ public class Reconstruction3DController {
|
||||
private final IReconstructionTaskService taskService;
|
||||
private final IReconstructionResultService resultService;
|
||||
private final IReconstructionReportService reportService;
|
||||
private final ISysUserService userService;
|
||||
private final ISysRoleService roleService;
|
||||
|
||||
// ==================== 重建任务 ====================
|
||||
@GetMapping("/task/page")
|
||||
@@ -100,4 +106,32 @@ public class Reconstruction3DController {
|
||||
stats.put("totalReports", reportService.count());
|
||||
return R.ok(stats);
|
||||
}
|
||||
|
||||
// ==================== 医生列表 ====================
|
||||
@GetMapping("/doctors")
|
||||
public R<?> getDoctors() {
|
||||
SysUser query = new SysUser();
|
||||
query.setStatus("0");
|
||||
query.setDelFlag("0");
|
||||
List<SysUser> allUsers = userService.selectUserList(query);
|
||||
// For each user, check if they have role 200 (doctor)
|
||||
List<Map<String, Object>> doctors = new ArrayList<>();
|
||||
for (SysUser user : allUsers) {
|
||||
List<SysRole> roles = roleService.selectRolesByUserId(user.getUserId());
|
||||
if (roles != null) {
|
||||
for (SysRole role : roles) {
|
||||
if (role.getRoleId() != null && role.getRoleId() == 200L) {
|
||||
Map<String, Object> doc = new HashMap<>();
|
||||
doc.put("userId", user.getUserId());
|
||||
doc.put("userName", user.getUserName());
|
||||
doc.put("nickName", user.getNickName());
|
||||
doctors.add(doc);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return R.ok(doctors);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user