吴世龙 3 years ago
parent
commit
8d8b60c067

+ 19 - 0
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/security/SecurityMonitoringOrderService.java

@ -11,6 +11,7 @@ import com.yihu.jw.care.dao.team.BaseTeamMemberDao;
import com.yihu.jw.care.service.common.DictService;
import com.yihu.jw.care.service.consult.ConsultTeamService;
import com.yihu.jw.care.service.contacts.ContactsService;
import com.yihu.jw.care.service.device.DeviceService;
import com.yihu.jw.care.service.device.PatientDeviceService;
import com.yihu.jw.care.service.device.YsDeviceService;
import com.yihu.jw.care.service.doctor.DoctorServicePermissionsService;
@ -142,6 +143,8 @@ public class SecurityMonitoringOrderService extends BaseJpaService<SecurityMonit
    private DeviceDetailDao deviceDetailDao;
    @Autowired
    private HealthIndexUtil healthIndexUtil;
    @Autowired
    private DeviceService deviceService;
    private Logger logger = LoggerFactory.getLogger(SecurityMonitoringOrderService.class);
@ -1646,9 +1649,23 @@ public class SecurityMonitoringOrderService extends BaseJpaService<SecurityMonit
            result.put("emeAssistance", true);
        }
        List<DevicePatientDevice> devices4 = patientDeviceDao.findByUserAndCategoryCode(patient, "4");//手表
        //手表佩戴
        result.put("wear_flag","");
        result.put("wear_flagName","");
        if (devices4.size() > 0) {
            result = patientSignTopicInfo(result, patient, "preventLost", devices4.get(0).getDeviceSn(), true);
        }
        JSONObject response = patientDeviceService.getAqgDeviceInfo2(devices4.get(0).getDeviceSn());
        //手表佩戴状态
        if (response.containsKey("wear_flag") && response.get("wear_flag") != null) {
            result.put("wear_flag", response.get("wear_flag"));
            result.put("wear_flagName", 1==response.getInteger("wear_flag")?"未佩戴":"已佩戴");
        }
        patientSignTopicInfo(result, patient, "preventFall", null, true);
@ -1694,6 +1711,8 @@ public class SecurityMonitoringOrderService extends BaseJpaService<SecurityMonit
        }else {
            result.put("xt",null);
        }
        String patientDeviceCategoryCode = deviceService.getPatientDeviceCategoryCode(patient);
        result.put("deviceShowInfo",patientDeviceCategoryCode);
        return result;
    }