liubing 3 years ago
parent
commit
26527c7e11

+ 8 - 2
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/security/SecurityMonitoringOrderEndpoint.java

@ -350,9 +350,15 @@ public class SecurityMonitoringOrderEndpoint extends EnvelopRestEndpoint {
    @ResponseBody
    public ObjEnvelop findMonitorPatientsByDoctor(@ApiParam(name = "doctor",  required = true)@RequestParam(value = "doctor")String doctor,
                                                  @ApiParam(name = "topicItem", value = "专题code,关联security_topic_dict字典", required = true)
                                                  @RequestParam(value = "topicItem",required = true,defaultValue = "preventLost") String topicItem) {
                                                  @RequestParam(value = "topicItem",required = true,defaultValue = "preventLost") String topicItem,
                                                  @ApiParam(name = "page")
                                                  @RequestParam(value = "page",required = false,defaultValue = "preventLost") Integer page,
                                                  @ApiParam(name = "pageSize")
                                                  @RequestParam(value = "pageSize",required = false,defaultValue = "preventLost") Integer pageSize,
                                                  @ApiParam(name = "detail", value = "是否返回专题详情", required = true)
                                                  @RequestParam(value = "detail",required = true,defaultValue = "0") Integer detail) {
        try {
            return ObjEnvelop.getSuccess( "查询成功", securityMonitoringOrderService.findMonitorPatientsByDoctor(doctor,topicItem));
            return ObjEnvelop.getSuccess( "查询成功", securityMonitoringOrderService.findMonitorPatientsByDoctor(doctor,topicItem,page,pageSize,detail));
        } catch (Exception e) {
            return failedObjEnvelopException2(e);
        }

+ 1 - 2
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/message/PatientMessageService.java

@ -187,7 +187,6 @@ public class PatientMessageService {
    public void ConfirmFences(String msgId,String safe_area){
        SystemMessageDO systemMessageDO = systemMessageDao.findOne(msgId);
        if (systemMessageDO!=null){
            systemMessageDO.setDel("0");
            systemMessageDao.save(systemMessageDO);
        }
        List<PatientSafeAreaDO> patientSafeAreaDOs = patientSafeAreaDao.findByPatient2(systemMessageDO.getRelationCode());
@ -211,6 +210,6 @@ public class PatientMessageService {
        //修改数据
        patientSafeAreaConfirmDao.manageByPatient(patientSafeAreaDO.getPatient());
        systemMessageDao.readByTypeAndRelationCode(patientSafeAreaDO.getPatient(),"44","1");
        systemMessageDao.readByTypeAndRelationCode("44",patientSafeAreaDO.getPatient(),"1");
    }
}

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

@ -2058,7 +2058,9 @@ public class SecurityMonitoringOrderService extends BaseJpaService<SecurityMonit
        }
    }
    public List<Map<String,Object>> findMonitorPatientsByDoctor(String doctor,String topicItem){
    public JSONObject findMonitorPatientsByDoctor(String doctor,String topicItem,Integer page,Integer pageSize,Integer detail){
        JSONObject result = new JSONObject();
        String sql = " SELECT DISTINCT p.id,p.name,p.residential_area residentialArea,p.photo,p.idcard,p.mobile, " +
                " p.openid,p.sex,p.pad_imei padImei " +
                " from base_patient p , base_service_package_sign_record sr,base_service_package_record r,base_team_member m  " +
@ -2071,7 +2073,9 @@ public class SecurityMonitoringOrderService extends BaseJpaService<SecurityMonit
        if ("preventLost".equals(topicItem)){//有绑定围栏的居民
            filter += " and EXISTS (select 1 from wlyy_patient_safe_area sf where sf.patient = p.id and sf.del=1 and sf.manage_status=1) ";
        }
        return jdbcTemplate.queryForList(sql+filter);
        List<Map<String,Object>> list =  jdbcTemplate.queryForList(sql+filter);
        result.put("patientList",list);
        return result;
    }
}

+ 4 - 0
svr/svr-cloud-device/src/main/java/com/yihu/jw/care/util/DeviceLostMessageUtil.java

@ -37,6 +37,10 @@ public class DeviceLostMessageUtil {
    public void deviceLostMessage(List<String> devices){
        List<SystemMessageDO> messageDOS = new ArrayList<>();
        for (String id:devices){
            List<SystemMessageDO> sendMessageBefore = systemMessageDao.queryByRelationCodeAndTypeIn(id,new String[]{"43"});
            if (sendMessageBefore.size()>0){//删除之前的离线消息
                systemMessageDao.delete(sendMessageBefore);
            }
            List<DevicePatientDevice> pds =  patientDeviceDao.findByDeviceSn(id);
            if (pds.size()>0){
                DevicePatientDevice deviceDO = pds.get(0);

+ 4 - 0
svr/svr-cloud-job/src/main/java/com/yihu/jw/care/util/DeviceLostMessageUtil.java

@ -38,6 +38,10 @@ public class DeviceLostMessageUtil {
    public void deviceLostMessage(List<String> devices){
        List<SystemMessageDO> messageDOS = new ArrayList<>();
        for (String id:devices){
            List<SystemMessageDO> sendMessageBefore = systemMessageDao.queryByRelationCodeAndTypeIn(id,new String[]{"43"});
            if (sendMessageBefore.size()>0){//删除之前的离线消息
                systemMessageDao.delete(sendMessageBefore);
            }
            List<DevicePatientDevice> pds =  patientDeviceDao.findByDeviceSn(id);
            if (pds.size()>0){
                DevicePatientDevice deviceDO = pds.get(0);