|
@ -25,7 +25,9 @@ import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
import org.springside.modules.utils.Encodes;
|
|
|
|
|
|
import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
|
|
|
/**
|
|
|
* 患者帳戶信息的Controller.
|
|
@ -428,8 +430,8 @@ public class PatientController extends WeixinBaseController {
|
|
|
@ResponseBody
|
|
|
public String signStaus() {
|
|
|
try {
|
|
|
JSONArray teamDoctors = new JSONArray();
|
|
|
JSONArray familyDoctors = new JSONArray();
|
|
|
Map<String,String> teamDoctors = new HashMap<>();
|
|
|
Map<String,String> familyDoctors = new HashMap<>();
|
|
|
String id = getUID();
|
|
|
//查询家庭签约
|
|
|
SignFamily jt = familyContractService.findByPatientYes(id);
|
|
@ -440,7 +442,7 @@ public class PatientController extends WeixinBaseController {
|
|
|
if (doctor == null) {
|
|
|
continue;
|
|
|
}
|
|
|
familyDoctors.put(doctor.getName());
|
|
|
familyDoctors.put(doctor.getCode(),doctor.getName());
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@ -453,7 +455,7 @@ public class PatientController extends WeixinBaseController {
|
|
|
if (doctor == null) {
|
|
|
continue;
|
|
|
}
|
|
|
teamDoctors.put(doctor.getName());
|
|
|
teamDoctors.put(doctor.getCode(),doctor.getName());
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@ -473,8 +475,8 @@ public class PatientController extends WeixinBaseController {
|
|
|
json.put("status", 200);
|
|
|
json.put("msg", "获取签约状态成功!");
|
|
|
json.put("data", sign);
|
|
|
json.put("teamDoctors", teamDoctors);
|
|
|
json.put("familyDoctors", familyDoctors);
|
|
|
json.put("teamDoctors", teamDoctors.size() > 0 ? new JSONArray(teamDoctors.values()) : new JSONArray());
|
|
|
json.put("familyDoctors", familyDoctors.size() > 0 ? new JSONArray(familyDoctors.values()) : new JSONArray());
|
|
|
return json.toString();
|
|
|
} catch (Exception e) {
|
|
|
error(e);
|
|
@ -491,8 +493,8 @@ public class PatientController extends WeixinBaseController {
|
|
|
@ResponseBody
|
|
|
public String signDoctors() {
|
|
|
try {
|
|
|
JSONArray teamDoctors = new JSONArray();
|
|
|
JSONArray familyDoctors = new JSONArray();
|
|
|
Map<String,JSONObject> teamDoctors = new HashMap<>();
|
|
|
Map<String,JSONObject> familyDoctors = new HashMap<>();
|
|
|
String id = getUID();
|
|
|
//查询家庭签约
|
|
|
SignFamily jt = familyContractService.findByPatientYes(id);
|
|
@ -507,7 +509,7 @@ public class PatientController extends WeixinBaseController {
|
|
|
doctorJson.put("code", doctor.getCode());
|
|
|
doctorJson.put("name", doctor.getName());
|
|
|
doctorJson.put("level", doctor.getLevel());
|
|
|
familyDoctors.put(doctorJson);
|
|
|
familyDoctors.put(doctor.getCode(),doctorJson);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@ -524,7 +526,7 @@ public class PatientController extends WeixinBaseController {
|
|
|
doctorJson.put("code", doctor.getCode());
|
|
|
doctorJson.put("name", doctor.getName());
|
|
|
doctorJson.put("level", doctor.getLevel());
|
|
|
teamDoctors.put(doctorJson);
|
|
|
teamDoctors.put(doctor.getCode(),doctorJson);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@ -544,8 +546,8 @@ public class PatientController extends WeixinBaseController {
|
|
|
json.put("status", 200);
|
|
|
json.put("msg", "获取签约状态成功!");
|
|
|
json.put("data", sign);
|
|
|
json.put("teamDoctors", teamDoctors);
|
|
|
json.put("familyDoctors", familyDoctors);
|
|
|
json.put("teamDoctors", teamDoctors.size() > 0 ? new JSONArray(teamDoctors.values()) : new JSONArray());
|
|
|
json.put("familyDoctors", familyDoctors.size() > 0 ? new JSONArray(familyDoctors.values()) : new JSONArray());
|
|
|
return json.toString();
|
|
|
} catch (Exception e) {
|
|
|
error(e);
|