|
@ -1,10 +1,12 @@
|
|
package com.yihu.wlyy.web.patient.account;
|
|
package com.yihu.wlyy.web.patient.account;
|
|
|
|
|
|
import com.yihu.wlyy.entity.doctor.profile.Doctor;
|
|
import com.yihu.wlyy.entity.doctor.profile.Doctor;
|
|
|
|
import com.yihu.wlyy.entity.doctor.team.admin.AdminTeam;
|
|
import com.yihu.wlyy.entity.patient.Patient;
|
|
import com.yihu.wlyy.entity.patient.Patient;
|
|
import com.yihu.wlyy.entity.patient.SignFamily;
|
|
import com.yihu.wlyy.entity.patient.SignFamily;
|
|
import com.yihu.wlyy.service.app.account.PatientInfoService;
|
|
import com.yihu.wlyy.service.app.account.PatientInfoService;
|
|
import com.yihu.wlyy.service.app.sign.FamilyContractService;
|
|
import com.yihu.wlyy.service.app.sign.FamilyContractService;
|
|
|
|
import com.yihu.wlyy.service.app.team.AdminTeamService;
|
|
import com.yihu.wlyy.service.app.team.DrHealthTeamService;
|
|
import com.yihu.wlyy.service.app.team.DrHealthTeamService;
|
|
import com.yihu.wlyy.service.common.account.DoctorService;
|
|
import com.yihu.wlyy.service.common.account.DoctorService;
|
|
import com.yihu.wlyy.service.common.account.TokenService;
|
|
import com.yihu.wlyy.service.common.account.TokenService;
|
|
@ -24,6 +26,7 @@ import org.springframework.web.bind.annotation.RequestParam;
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
import org.springside.modules.utils.Encodes;
|
|
import org.springside.modules.utils.Encodes;
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.HashMap;
|
|
import java.util.HashMap;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
@ -48,6 +51,8 @@ public class PatientController extends WeixinBaseController {
|
|
private DrHealthTeamService doctorTeamService;
|
|
private DrHealthTeamService doctorTeamService;
|
|
@Autowired
|
|
@Autowired
|
|
private DoctorService doctorService;
|
|
private DoctorService doctorService;
|
|
|
|
@Autowired
|
|
|
|
AdminTeamService teamService;
|
|
|
|
|
|
/**
|
|
/**
|
|
* 患者基本信息查询接口
|
|
* 患者基本信息查询接口
|
|
@ -324,7 +329,7 @@ public class PatientController extends WeixinBaseController {
|
|
*/
|
|
*/
|
|
@RequestMapping(value = "teachers")
|
|
@RequestMapping(value = "teachers")
|
|
@ResponseBody
|
|
@ResponseBody
|
|
public String teachers() {
|
|
|
|
|
|
public String teachers(@RequestParam(required = false,defaultValue = "") String signDoctor) {
|
|
try {
|
|
try {
|
|
String code = getUID();//getUID();
|
|
String code = getUID();//getUID();
|
|
// 查询签约信息
|
|
// 查询签约信息
|
|
@ -338,6 +343,7 @@ public class PatientController extends WeixinBaseController {
|
|
// 查询三师医生信息
|
|
// 查询三师医生信息
|
|
List<Doctor> doctors = doctorTeamService.findSanshiTeamDoctors(code);
|
|
List<Doctor> doctors = doctorTeamService.findSanshiTeamDoctors(code);
|
|
JSONArray jsonArray = new JSONArray();
|
|
JSONArray jsonArray = new JSONArray();
|
|
|
|
String qkDoctor = "";
|
|
if (doctors != null) {
|
|
if (doctors != null) {
|
|
for (Doctor doctor : doctors) {
|
|
for (Doctor doctor : doctors) {
|
|
if (doctor == null) {
|
|
if (doctor == null) {
|
|
@ -356,6 +362,7 @@ public class PatientController extends WeixinBaseController {
|
|
json.put("typename", "专科医生");
|
|
json.put("typename", "专科医生");
|
|
} else if (type == 2) {
|
|
} else if (type == 2) {
|
|
json.put("typename", "全科医生");
|
|
json.put("typename", "全科医生");
|
|
|
|
qkDoctor = doctor.getCode();
|
|
} else if (type == 3) {
|
|
} else if (type == 3) {
|
|
json.put("typename", "健康管理师");
|
|
json.put("typename", "健康管理师");
|
|
} else {
|
|
} else {
|
|
@ -365,6 +372,12 @@ public class PatientController extends WeixinBaseController {
|
|
jsonArray.put(json);
|
|
jsonArray.put(json);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if(StringUtils.isNotEmpty(signDoctor)){
|
|
|
|
List<AdminTeam> teams = teamService.findDoctorsTeams(signDoctor,qkDoctor);
|
|
|
|
doctorJson.put("team",teams != null ? new JSONArray(teams) : new ArrayList<AdminTeam>());
|
|
|
|
}
|
|
|
|
|
|
doctorJson.put("list", jsonArray);
|
|
doctorJson.put("list", jsonArray);
|
|
return write(200, "查询成功!", "data", doctorJson);
|
|
return write(200, "查询成功!", "data", doctorJson);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|