|
@ -192,7 +192,8 @@ public class AdminTeamController extends BaseController {
|
|
|
@ApiOperation(value = "根据患者代码,获取医生团队信息")
|
|
|
public String getTeam(@PathVariable("patient_code") String patientCode) {
|
|
|
try {
|
|
|
Map<String, Object> team = teamService.getPatientSigningTeam(patientCode);
|
|
|
|
|
|
Map<String, Object> team = teamService.getPatientSigningTeam(patientCode, super.getUID());
|
|
|
|
|
|
return write(200, "OK", "data", new JSONObject(team));
|
|
|
} catch (Exception e) {
|
|
@ -226,7 +227,7 @@ public class AdminTeamController extends BaseController {
|
|
|
page = page <= 0 ? 0 : page - 1;
|
|
|
List<Patient> patients = memberService.getMemberSigningPatients(teamId, healthDoctorCode, page, size);
|
|
|
List<Map<String, Object>> simplifiedPatients = new ArrayList<>();
|
|
|
for (Patient patient : patients){
|
|
|
for (Patient patient : patients) {
|
|
|
Map<String, Object> simplified = new HashMap<>();
|
|
|
simplified.put("code", patient.getCode());
|
|
|
simplified.put("name", patient.getName());
|
|
@ -249,9 +250,9 @@ public class AdminTeamController extends BaseController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
private List<Map<String, Object>> copyBeans(Collection<? extends Object> beans, String...propertyNames){
|
|
|
private List<Map<String, Object>> copyBeans(Collection<? extends Object> beans, String... propertyNames) {
|
|
|
List<Map<String, Object>> result = new ArrayList<>();
|
|
|
for (Object bean : beans){
|
|
|
for (Object bean : beans) {
|
|
|
result.add(copyBeanProperties(bean, propertyNames));
|
|
|
}
|
|
|
|
|
@ -265,11 +266,11 @@ public class AdminTeamController extends BaseController {
|
|
|
* @param propertyNames
|
|
|
* @return
|
|
|
*/
|
|
|
private Map<String, Object> copyBeanProperties(Object bean, String...propertyNames){
|
|
|
private Map<String, Object> copyBeanProperties(Object bean, String... propertyNames) {
|
|
|
Map<String, Object> simplifiedBean = new HashMap<>();
|
|
|
for (String propertyName : propertyNames){
|
|
|
for (String propertyName : propertyNames) {
|
|
|
Field field = ReflectionUtils.findField(bean.getClass(), propertyName);
|
|
|
if (field != null){
|
|
|
if (field != null) {
|
|
|
field.setAccessible(true);
|
|
|
Object value = ReflectionUtils.getField(field, bean);
|
|
|
simplifiedBean.put(propertyName, value == null ? "" : value);
|