|
@ -95,7 +95,7 @@ public class AdminTeamController extends BaseController {
|
|
@RequestMapping(value = "/{team_id}/leader", method = RequestMethod.PUT)
|
|
@RequestMapping(value = "/{team_id}/leader", method = RequestMethod.PUT)
|
|
@ApiOperation(value = "更新团队领导")
|
|
@ApiOperation(value = "更新团队领导")
|
|
public String updateTeamLeader(@PathVariable("team_id") long teamId,
|
|
public String updateTeamLeader(@PathVariable("team_id") long teamId,
|
|
@RequestParam("doctor_code") String doctorCode) {
|
|
|
|
|
|
@RequestParam("doctor_code") String doctorCode) {
|
|
try {
|
|
try {
|
|
AdminTeam team = teamService.updateTeamLeader(teamId, doctorCode);
|
|
AdminTeam team = teamService.updateTeamLeader(teamId, doctorCode);
|
|
|
|
|
|
@ -122,7 +122,7 @@ public class AdminTeamController extends BaseController {
|
|
|
|
|
|
@ResponseBody
|
|
@ResponseBody
|
|
@RequestMapping(value = "/{team_id}/members", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/{team_id}/members", method = RequestMethod.POST)
|
|
@ApiOperation(value = "添加成员")
|
|
|
|
|
|
@ApiOperation(value = "添加团队成员")
|
|
public String addMember(@PathVariable("team_id") long teamId,
|
|
public String addMember(@PathVariable("team_id") long teamId,
|
|
@RequestParam("doctor_code") String doctorCode) {
|
|
@RequestParam("doctor_code") String doctorCode) {
|
|
try {
|
|
try {
|
|
@ -138,9 +138,10 @@ public class AdminTeamController extends BaseController {
|
|
@ResponseBody
|
|
@ResponseBody
|
|
@RequestMapping(value = "/{team_id}/members", method = RequestMethod.GET)
|
|
@RequestMapping(value = "/{team_id}/members", method = RequestMethod.GET)
|
|
@ApiOperation(value = "获取团队成员")
|
|
@ApiOperation(value = "获取团队成员")
|
|
public String getTeamMembers(@PathVariable("team_id") long teamId) {
|
|
|
|
|
|
public String getTeamMembers(@PathVariable("team_id") long teamId,
|
|
|
|
@RequestParam(value = "doctor_role", required = false) String role) {
|
|
try {
|
|
try {
|
|
List<Doctor> members = memberService.getMembers(teamId);
|
|
|
|
|
|
List<Doctor> members = memberService.getMembers(teamId, role);
|
|
|
|
|
|
return write(200, "OK", "data", new JSONArray(members));
|
|
return write(200, "OK", "data", new JSONArray(members));
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
@ -170,11 +171,11 @@ public class AdminTeamController extends BaseController {
|
|
@RequestMapping(value = "/team/{doctor_code}/teams", method = RequestMethod.GET)
|
|
@RequestMapping(value = "/team/{doctor_code}/teams", method = RequestMethod.GET)
|
|
@ApiOperation(value = "获取医生团队列表")
|
|
@ApiOperation(value = "获取医生团队列表")
|
|
public String getDoctorTeams(@PathVariable("doctor_code") String doctorCode) {
|
|
public String getDoctorTeams(@PathVariable("doctor_code") String doctorCode) {
|
|
try{
|
|
|
|
|
|
try {
|
|
List<AdminTeam> teamList = teamService.getDoctorTeams(doctorCode);
|
|
List<AdminTeam> teamList = teamService.getDoctorTeams(doctorCode);
|
|
|
|
|
|
return write(200, "OK", "data", new JSONArray(teamList));
|
|
return write(200, "OK", "data", new JSONArray(teamList));
|
|
} catch (Exception e){
|
|
|
|
|
|
} catch (Exception e) {
|
|
error(e);
|
|
error(e);
|
|
return error(-1, e.getMessage());
|
|
return error(-1, e.getMessage());
|
|
}
|
|
}
|