LAPTOP-KB9HII50\70708 %!s(int64=3) %!d(string=hai) anos
pai
achega
c89d27837d

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

@ -576,10 +576,11 @@ public class CarePatientService extends BaseJpaService<BasePatientDO, BasePatien
     */
    public List<Map<String,Object>> findOld(String name,String residentialArea,String limit,String filter1){
        String sql = "SELECT a.id,a.name,a.photo,a.idcard,CAST(IFNULL(a.birthday,'') AS char ) birthday,a.residential_area residentialArea,a.sex " +
                ", GROUP_CONCAT(DISTINCT d.category_code) deviceFlag,if(openid is null,0,1) onlineWx,IFNULL(a.on_line,0) onlinePad,IFNULL(sign_status,0) signStatus from base_patient a " +
                ", GROUP_CONCAT(DISTINCT d.category_code) deviceFlag,case 1 WHEN openid is not null then 1 WHEN a.on_line = '1' then 1 ELSE 0 end as online,IFNULL(sign_status,0) signStatus from base_patient a " +
                " LEFT JOIN wlyy_patient_device d on d.`user`=a.id  WHERE a.archive_type = 1 and a.del = '1' ";
        //case 1 WHEN openid is not null then 1 WHEN a.on_line = '1' then 1 ELSE 0 end as online
        //if(openid is null,0,1) onlineWx,IFNULL(a.on_line,0) onlinePad
        if(!StringUtil.isBlank(name)){
            sql+= " and name like '%"+name+"%' ";
        }

+ 31 - 0
svr/svr-cloud-device/src/main/java/com/yihu/jw/care/service/HvDeviceService.java

@ -234,5 +234,36 @@ public class HvDeviceService {
        }
    }
    public static void main(String[] args) {
        String value = "01018B00000000000061444C7F0001921900FFBC00000070000000003839383630343334313832313830313337323531383637303730303336313331313231000000000034363030343534343733303732353100000000002235343030302E313030302E33352E30332E31332E30380000000000001300600001006100010062000000000001000079";
        String byMessageId = value.substring(0,2);//业务类型
        String byFixedSign = value.substring(2,4);
        String byDevType = value.substring(4,6);//设备类型
        String byMax6 = value.substring(6,18);//max地址
        String byTime = value.substring(18,26);//时间 秒
        String byDevTypeEx =value.substring(26,28);
        String wPCI = value.substring(28,32);//16
        String bySnr = value.substring(32,34);
        String byEcl = value.substring(34,36);
        String byRsrp = value.substring(36,40);//16
        String dwUpHeaderLen = value.substring(40,48);//32 上报头长度
        String dwPackageNo = value.substring(48,56);//32 报警时 从1累加
        String byQCCID20 = value.substring(56,96);
        String byIMEI20 = value.substring(96,136);
        String byIMSI20 = value.substring(136,176);
        String byNBModuleVersion24 = value.substring(176,224);
        String dwCID = value.substring(224,232);//32 基站码
        String dwLAC = value.substring(232,240);//32
        System.out.println(byQCCID20);
        System.out.println(byIMEI20);
        System.out.println(byIMSI20);
        System.out.println(byNBModuleVersion24);
        System.out.println(dwCID);
        System.out.println(dwLAC);
        //38 36 37 30 37 30 30 33 36 31 33 31 31 32 31 0000000000
        System.out.println(value.substring(240));
    }
}

+ 20 - 0
svr/svr-cloud-device/src/main/java/com/yihu/jw/care/service/OnenetService.java

@ -184,6 +184,26 @@ public class OnenetService {
        }
    }
    /**
     * 海康设备解析
     */
    public void hkDevice(OnenetDevice onenetDevice,JSONObject jsonObject){
        String value = jsonObject.getString("value");
        String byMessageId = value.substring(0,2);
        String byDevType = value.substring(4,6);
        if("01".equals(byMessageId)){
            //信息上报
            return;
        }
        if("02".equals(byMessageId)){
            //报警
        }
        //其他信息暂时不处理
        // 03消音 04自检 05故障 06信号查询 07注册 08注销 ...
    }
    /**
     * 同步设备
     */