Browse Source

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

lyr 8 năm trước cách đây
mục cha
commit
a0e752626d

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

@ -247,7 +247,7 @@ public class FamilyMemberService extends BaseService {
     * @param patient 居民
     * @return
     */
    public JSONArray getPatientFamilyMembers(String patient, String doctorCode, boolean isContain, String current) {
    public JSONArray getPatientFamilyMembers(String patient, String doctorCode) {
        JSONArray resultArray = new JSONArray();
        String sql = "select * " +
                " from " +
@ -321,6 +321,23 @@ public class FamilyMemberService extends BaseService {
            }
        }
        return resultArray;
    }
    /**
     * 获取居民的家庭成员
     *
     * @param patient 居民
     * @return
     */
    public JSONArray getPatientMembers(String patient, String doctorCode, boolean isContain, String current) {
        JSONArray resultArray = getPatientFamilyMembers(patient,doctorCode);
        if(resultArray == null){
            resultArray = new JSONArray();
        }
        if (isContain && !patient.equals(current)) {
            Patient p = patientDao.findByCode(patient);
@ -365,6 +382,7 @@ public class FamilyMemberService extends BaseService {
        return resultArray;
    }
    /**
     * 查询居民的某个家庭成员
     *

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

@ -39,7 +39,7 @@ public class DoctorFamilyController extends WeixinBaseController {
        try {
            Map<String, JSONObject> result = new HashMap<>();
            JSONArray patients = familyService.getfamilyMember(patientCode, idcard, doctorCode);
            JSONArray patientsCustom = familyMemberService.getPatientFamilyMembers(patientCode, doctorCode,false,"");
            JSONArray patientsCustom = familyMemberService.getPatientFamilyMembers(patientCode, doctorCode);
            if (patients != null) {
                for(int i = 0;i < patients.length(); i++){

+ 6 - 2
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/family/FamilyMemberController.java

@ -148,8 +148,12 @@ public class FamilyMemberController extends BaseController {
    @ApiOperation(value = "家庭成员查询")
    public String getPatientFamilyMembers(@RequestParam(required = false) String patient) {
        try {
            JSONArray result = familyMemberService.getPatientFamilyMembers(StringUtils.isNotEmpty(patient) ? patient : getUID(), "", StringUtils.isNotEmpty(patient) ? true : false,getUID());
            JSONArray result = new JSONArray();
            if (StringUtils.isNotEmpty(patient)) {
                result = familyMemberService.getPatientMembers(patient, "", true, getUID());
            } else {
                result = familyMemberService.getPatientFamilyMembers(getUID(), "");
            }
            return write(200, "查询成功", "data", result);
        } catch (Exception e) {
            e.printStackTrace();