Kaynağa Gözat

专科医生

trick9191 7 yıl önce
ebeveyn
işleme
8196a15c60

+ 48 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/third/specialist/ThirdSpecialistController.java

@ -0,0 +1,48 @@
package com.yihu.wlyy.web.third.specialist;
import com.yihu.wlyy.service.specialist.SpecialistService;
import com.yihu.wlyy.web.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
/**
 * Created by Trick on 2018/7/13.
 */
@RestController
@RequestMapping(value = "/third/specialist",produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@Api(description = "专科医生信息")
public class ThirdSpecialistController extends BaseController{
    @Autowired
    private SpecialistService specialistService;
    @RequestMapping(value = "/findSpecialistTeamInfo", method = RequestMethod.GET)
    @ApiOperation(value = "获取专科医生所在团队信息")
    public String findSpecialistTeamInfo(@ApiParam(name = "doctor", value = "医生code") @RequestParam(required = true)String doctor,
                                         @ApiParam(name = "teamCode", value = "团队code") @RequestParam(required = true)Long teamCode){
        try {
            return write(200, "获取成功", "data", specialistService.findSpecialistTeamInfo(doctor,teamCode));
        } catch (Exception e) {
            error(e);
            return error(-1, "请求失败");
        }
    }
    @RequestMapping(value = "/findTeamDiseaseRelation", method = RequestMethod.GET)
    @ApiOperation(value = "获取团队专病服务信息")
    public String findTeamDiseaseRelation(@ApiParam(name = "teamCode", value = "团队code") @RequestParam(required = true)Long teamCode) {
        try {
            return write(200, "获取成功", "data", specialistService.findTeamDiseaseRelation(teamCode));
        } catch (Exception e) {
            error(e);
            return error(-1, "请求失败");
        }
    }
}