Browse Source

Merge branch 'dev' of lyr/patient-co-management into dev

lyr 8 years ago
parent
commit
7293383427

+ 5 - 6
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/family/FamilyMemberService.java

@ -195,14 +195,13 @@ public class FamilyMemberService extends BaseService {
        JSONObject result = new JSONObject();
        Patient p = patientDao.findByIdcard(idcard);
        if (p.getCode().equals(patient)) {
            result.put("isRegister", -1); //不能添加自己
            return result;
        }
        if (p == null) {
            result.put("isRegister", 0);
        } else {
            if (patient.equals(p.getCode())) {
                result.put("isRegister", -1); //不能添加自己
                return result;
            }
            result.put("isRegister", 1);
            result.put("mobile", StringUtils.isEmpty(p.getMobile()) ? "" : p.getMobile());
            result.put("name", StringUtils.isEmpty(p.getName()) ? "" : p.getName());
@ -267,7 +266,7 @@ public class FamilyMemberService extends BaseService {
                obj.put("idcard", StringUtils.isEmpty(String.valueOf(map.get("idcard"))) ? "" : map.get("idcard").toString());
                obj.put("photo", map.get("photo"));
                obj.put("mobile", map.get("mobile"));
                obj.put("address", map.get("address"));
                obj.put("address", StringUtils.isEmpty(String.valueOf(map.get("address"))) ? "" : map.get("address"));
                obj.put("familyRelation", map.get("family_relation"));
                if (StringUtils.isEmpty(doctorCode)) {

+ 1 - 1
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/family/DoctorFamilyController.java

@ -56,7 +56,7 @@ public class DoctorFamilyController extends WeixinBaseController {
                }
            }
            return write(200, "查询成功", "list", result.size() > 0 ? result.values() : new JSONArray());
            return write(200, "查询成功", "list", result.size() > 0 ? new JSONObject(result.values()) : new JSONArray());
        } catch (Exception e) {
            e.printStackTrace();
            return error(-1, "查询失败!");