|
@ -4,7 +4,7 @@ import com.alibaba.fastjson.JSONObject;
|
|
|
import com.yihu.jw.care.aop.ObserverRequired;
|
|
|
import com.yihu.jw.care.service.consult.ConsultTeamService;
|
|
|
import com.yihu.jw.care.service.doctor.CareDoctorService;
|
|
|
import com.yihu.jw.care.service.doorCoach.DoctorDoorCoachOrderService;
|
|
|
import com.yihu.jw.care.service.doctor.DoctorServicePermissionsService;
|
|
|
import com.yihu.jw.care.service.sign.CapacityAssessmentRecordService;
|
|
|
import com.yihu.jw.care.util.EntranceUtil;
|
|
|
import com.yihu.jw.doctor.dao.BaseDoctorDao;
|
|
@ -13,11 +13,9 @@ import com.yihu.jw.restmodel.web.ListEnvelop;
|
|
|
import com.yihu.jw.restmodel.web.ObjEnvelop;
|
|
|
import com.yihu.jw.restmodel.web.PageEnvelop;
|
|
|
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
|
|
|
import io.netty.handler.codec.serialization.ObjectEncoder;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import io.swagger.annotations.ApiParam;
|
|
|
import org.apache.commons.lang.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
@ -42,6 +40,8 @@ public class DoctorEndpoint extends EnvelopRestEndpoint {
|
|
|
private ConsultTeamService consultTeamService;
|
|
|
@Autowired
|
|
|
private EntranceUtil entranceUtil;
|
|
|
@Autowired
|
|
|
private DoctorServicePermissionsService doctorServicePermissionsService;
|
|
|
|
|
|
@GetMapping(value = "doctorPage")
|
|
|
@ApiOperation(value = "获取医生记录分页")
|
|
@ -53,7 +53,7 @@ public class DoctorEndpoint extends EnvelopRestEndpoint {
|
|
|
@ApiParam(name = "page", value = "分页大小", required = true, defaultValue = "1")
|
|
|
@RequestParam(value = "page") int page,
|
|
|
@ApiParam(name = "size", value = "页码", required = true, defaultValue = "15")
|
|
|
@RequestParam(value = "size") int size) throws Exception {
|
|
|
@RequestParam(value = "size") int size){
|
|
|
try{
|
|
|
return doctorService.doctorPage(name, orgCode, page, size);
|
|
|
}catch (Exception e){
|
|
@ -67,7 +67,7 @@ public class DoctorEndpoint extends EnvelopRestEndpoint {
|
|
|
@ApiParam(name = "doctorId", value = "医生id", required = true)
|
|
|
@RequestParam(value = "doctorId",required = true) String doctorId,
|
|
|
@ApiParam(name = "isRole", value = "是否返回角色(1是 0否)", required = false)
|
|
|
@RequestParam(value = "isRole",required = false) String isRole) throws Exception {
|
|
|
@RequestParam(value = "isRole",required = false) String isRole){
|
|
|
try{
|
|
|
return ObjEnvelop.getSuccess("查询成功",doctorService.doctorInfo(doctorId,isRole));
|
|
|
}catch (Exception e){
|
|
@ -75,11 +75,23 @@ public class DoctorEndpoint extends EnvelopRestEndpoint {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@GetMapping(value = "servicePermissions")
|
|
|
@ApiOperation(value = "获取医生服务权限")
|
|
|
public ObjEnvelop servicePermissions (
|
|
|
@ApiParam(name = "doctorId", value = "医生id", required = true)
|
|
|
@RequestParam(value = "doctorId",required = true) String doctorId) {
|
|
|
try{
|
|
|
return ObjEnvelop.getSuccess("查询成功",doctorServicePermissionsService.findByDoctor(doctorId));
|
|
|
}catch (Exception e){
|
|
|
return failedObjEnvelopException2(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@GetMapping(value = "patientCount")
|
|
|
@ApiOperation(value = "获取我的居民统计数量")
|
|
|
public ObjEnvelop patientCount (
|
|
|
@ApiParam(name = "doctorId", value = "医生id", required = true)
|
|
|
@RequestParam(value = "doctorId",required = true) String doctorId) throws Exception {
|
|
|
@RequestParam(value = "doctorId",required = true) String doctorId){
|
|
|
try{
|
|
|
return ObjEnvelop.getSuccess("查询成功",capacityAssessmentRecordService.getPatientNum(doctorId));
|
|
|
}catch (Exception e){
|
|
@ -92,13 +104,18 @@ public class DoctorEndpoint extends EnvelopRestEndpoint {
|
|
|
@ObserverRequired
|
|
|
public Envelop update(
|
|
|
@ApiParam(name = "baseDoctorVo", value = "JSON数据", required = true)
|
|
|
@RequestParam(value = "baseDoctorVo") String baseDoctorVo)throws Exception{
|
|
|
JSONObject jsonObject = JSONObject.parseObject(baseDoctorVo);
|
|
|
Boolean update = doctorService.update(jsonObject);
|
|
|
if (!update){
|
|
|
return failed("保存失败,参数不可为空");
|
|
|
@RequestParam(value = "baseDoctorVo") String baseDoctorVo){
|
|
|
try {
|
|
|
JSONObject jsonObject = JSONObject.parseObject(baseDoctorVo);
|
|
|
Boolean update = doctorService.update(jsonObject);
|
|
|
if (!update){
|
|
|
return failed("保存失败,参数不可为空");
|
|
|
}
|
|
|
return success("保存成功");
|
|
|
}catch (Exception e){
|
|
|
e.printStackTrace();
|
|
|
return failedException2(e);
|
|
|
}
|
|
|
return success("保存成功");
|
|
|
}
|
|
|
|
|
|
|