|  |  |  | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public String userCard; //用户卡号 | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public byte type;//当前状态 00:充值管理机写 01:控制器反写的  当01时将1扇区0块原管理卡信息改成用户卡内容 | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public int totalElectric;//总用电量位 底位在前,高位在后  1位小数点  含1位小数点的整数 | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public int getTotalElectric() { | 
|---|
|  |  |  | return totalElectric; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public byte getType() { | 
|---|
|  |  |  | return type; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public void setType(byte type) { | 
|---|
|  |  |  | this.type = type; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public String getUserCard() { | 
|---|
|  |  |  | return userCard; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | public static ManageCard getBean(List<byte[]> data) { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if (data != null) { | 
|---|
|  |  |  | ManageCard passWordCard = new ManageCard(); | 
|---|
|  |  |  | ManageCard manageCard = new ManageCard(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | byte[] zero = data.get(0); | 
|---|
|  |  |  | byte[] passWordByte = new byte[4]; | 
|---|
|  |  |  | System.arraycopy(zero, 5, passWordByte, 0, passWordByte.length); | 
|---|
|  |  |  | passWordCard.setUserCard(HexUtil.bytesToHex(passWordByte)); | 
|---|
|  |  |  | return passWordCard; | 
|---|
|  |  |  | manageCard.setUserCard(HexUtil.bytesToHex(passWordByte)); | 
|---|
|  |  |  | manageCard.setType(zero[9]); | 
|---|
|  |  |  | byte[] totalElectricByte = new byte[4]; | 
|---|
|  |  |  | System.arraycopy(zero, 10, totalElectricByte, 0, totalElectricByte.length); | 
|---|
|  |  |  | manageCard.totalElectric = HexUtil.get16To10LowHightByBytes(totalElectricByte); | 
|---|
|  |  |  | return manageCard; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return null; | 
|---|
|  |  |  | } | 
|---|