Kaynağa Gözat

空指针报错

liubing 3 yıl önce
ebeveyn
işleme
671882f67b

+ 1 - 1
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/device/PatientDeviceDao.java

@ -55,7 +55,7 @@ public interface PatientDeviceDao extends PagingAndSortingRepository<DevicePatie
    @Query("select a from DevicePatientDevice a")
    List<DevicePatientDevice> findAll();
    @Query("select a from DevicePatientDevice a group by a.user")
    @Query("select a from DevicePatientDevice a where a.del=0  group by a.user")
    List<DevicePatientDevice> findAllGroupUser();
    @Query("select a from DevicePatientDevice a where a.categoryCode = ?1 and a.del=0 group by a.user")

+ 3 - 0
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/statistics/DetectionPlatformService.java

@ -259,6 +259,9 @@ public class DetectionPlatformService  {
                JSONArray array = new JSONArray();
                JSONObject userObj = new JSONObject();
                userObj.put("patient",patientDevices.get(i).getUser());
                if (null==byId.get(patientDevices.get(i).getUser())){
                    continue;
                }
                userObj.put("patientName",byId.get(patientDevices.get(i).getUser()).get(0).getName());
                userObj.put("patientType",byId.get(patientDevices.get(i).getUser()).get(0).getArchiveType());
                userObj.put("latLon",byId.get(patientDevices.get(i).getUser()).get(0).getLatLon());