Browse Source

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

lyr 8 years ago
parent
commit
38fac2282b

+ 1 - 1
patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/followup/FollowUpDao.java

@ -28,6 +28,6 @@ public interface FollowUpDao extends PagingAndSortingRepository<Followup, Long>,
    @Query(value = "select a.* from wlyy_followup a where a.doctor_code in ?1 and a.patient_code = ?2 and a.followup_class=?3 and a.status ='1' order by a.followup_date DESC limit 1",nativeQuery = true)
    Followup findLastFollowup(String[] doctors,String patientCode,String followClass) throws Exception;
    @Query("select d.code,d.name,d.photo,a.followupType,a.followupClass,a.status,a.createTime,a.updateTime from Followup a, Doctor d where a.doctorCode = d.code and a.patientCode = ?1 and a.adminTeamCode = ?2 ")
    @Query("select d.code,d.name,d.photo,a.followupType,a.followupClass,a.status,a.createTime,a.updateTime,a.followupManagerStatus from Followup a, Doctor d where a.doctorCode = d.code and a.patientCode = ?1 and a.adminTeamCode = ?2 ")
    Page<Object> findByPatientAndTeam(String patient, Long teamCode, Pageable pageable);
}

+ 10 - 1
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/followup/FollowUpService.java

@ -177,13 +177,19 @@ public class FollowUpService extends BaseService {
        if (result != null && result.getContent().size() > 0) {
            Map<String, String> dictMap = new HashMap<>();
            Map<String, String> statusMap = new HashMap<>();
            Map<String, String> mngStatusMap = new HashMap<>();
            List<SystemDict> dicts = dictService.getDictByDictName("FOLLOWUP_WAY_DICT");
            List<SystemDict> mngDicts = dictService.getDictByDictName("FOLLOWUP_MANAGER_STATUS");
            if (dicts != null) {
                for (SystemDict dict : dicts) {
                    dictMap.put(dict.getCode(), dict.getValue());
                }
            }
            if (mngDicts != null) {
                for (SystemDict dict : mngDicts) {
                    mngStatusMap.put(dict.getCode(), dict.getValue());
                }
            }
            statusMap.put("0", "取消");
            statusMap.put("1", "已完成");
@ -204,6 +210,9 @@ public class FollowUpService extends BaseService {
                followup.put("statusName", objArr[5] == null ? "" : (statusMap.get(objArr[5].toString()) != null ? statusMap.get(objArr[5].toString()) : ""));
                followup.put("createTime", objArr[6]);
                followup.put("updateTime", objArr[7]);
                followup.put("managerStatus", objArr[8] == null ? "" : objArr[8]);
                followup.put("managerStatusName", objArr[8] == null ? "" : (mngStatusMap.get(objArr[8].toString()) != null ? mngStatusMap.get(objArr[8].toString()) : ""));
                array.put(followup);
            }
        }