package BaoWen; import java.math.BigInteger; import DataBase.DatabaseManagement; import Method.GetNowTime; import Method.InsertData; import Method.StringToHex; import PbuliClass.Shi_jian_cha_sss; import PbuliClass.ShowMessage; import person.Person; import person.person_Dell; import tbDataModel_Dell.Userdata; /**0X0E»ùÕ¾ÉÏ´«±êÇ©Óû§Êý¾Ý * Êý¾Ý¸ñʽ55AA0E+Êý¾Ý³¤¶È£¨N+5£©+±êÇ©ID+Êý¾Ý³¤¶È+Êý¾Ý£¨N£©*/ public class Dell_55AA0E { static String[] hex; static Userdata usdata=new Userdata(); public static void dell(String message){ message=message.replaceAll("\r\n|\r|\n", "");//È¡³öËùÓГQÐкͻسµ String mdsold=usdata.getMessage();//»ñÈ¡ÉÏÒ»Ìõ·¢Ë͵ÄÐÅÏ¢ if( mdsold !=null && message.equals(mdsold) ) {//Èç¹ûµ±Ç°ÐÅÏ¢ºÍÉÏÒ»ÌõÐÅÏ¢Ò»Ñù String time=usdata.getTime(); int shicha=Shi_jian_cha_sss.get_time_cha_s(GetNowTime.now(), time); if(shicha<2) { return; } } usdata.setMessage(message); usdata.setTime(GetNowTime.now()); int lenth=message.length(); if(lenth<7) { return; } hex=StringToHex.hex(message); String tagid=hex[5]+hex[4];//±êÇ©ID String message0=message.substring(0, lenth-4); Person prs=person_Dell.get_Person(tagid); if(prs==null) { return; } String type=prs.getBaoliu19(); if(type==null) { ShowMessage.zidingyi(tagid+"±êÇ©ÀàÐͲ»´æÔÚ"); return; } if(type.equals("ÐÄÂÊ´øÆÁ")) { dell_heart_tag_message(message,tagid,prs); }else if(type.equals("³µÔØ´øÆÁ")) { dell_chezaidaipingtag_message(message0,tagid); } } /** 16½øÖÆ×ªÎª10½øÖÆ */ public static int decodeHEX(String hexs) { BigInteger bigint = new BigInteger(hexs, 16); int numb = bigint.intValue(); return numb; } /**´¦Àí³µÔØ´øÆÁÄ»±êÇ©ÉÏÀ´µÄÊý¾Ý*/ public static void dell_chezaidaipingtag_message(String message0,String tagid) { StringBuffer mes=new StringBuffer(); mes.append("userdata,"+tagid+","); String datalent=hex[6]; int dataletint=decodeHEX(datalent); for(int i=0;i Á½¸ö16½øÖÆ×Ö·û int n; for (int i = 0; i < bytes.length; i++) { n = str.indexOf(hexs[2 * i]) * 16; n += str.indexOf(hexs[2 * i + 1]); bytes[i] = (byte) (n & 0xff); } return new String(bytes); } }