| | |
| | | |
| | | public int rechargeTimes;//充值次数 |
| | | |
| | | public short swipeNumber;//刷卡次数 一般不用精细管控才用 |
| | | public int swipeNumber;//刷卡次数 一般不用精细管控才用 |
| | | |
| | | public float electricityPrice;//电量单价 管理元可以修改 |
| | | |
| | |
| | | byte[] electricityPriceBytes = new byte[4]; |
| | | System.arraycopy(zero, 4, electricityPriceBytes, 0, electricityPriceBytes.length); |
| | | |
| | | userCard.electricityPrice = HexUtil.hexToFloat(HexUtil.bytesToHex(electricityPriceBytes)); |
| | | userCard.electricityPrice = HexUtil.hexToFloatLowHigh(electricityPriceBytes); |
| | | userCard.state = BcdUtil.bcdToStr(zero[8]); |
| | | byte[] balanceBytes = new byte[4]; |
| | | System.arraycopy(zero, 9, balanceBytes, 0, balanceBytes.length); |
| | | |
| | | userCard.balance = HexUtil.get16to10LowHigh(HexUtil.bytesToHex(balanceBytes)); |
| | | |
| | | // userCard.balance = HexUtil.get16to10LowHigh(HexUtil.bytesToHex(balanceBytes)); |
| | | userCard.balance = HexUtil.get16To10LowHightByBytes(balanceBytes); |
| | | byte[] addressCodeBytes = new byte[6]; |
| | | System.arraycopy(zero, 13, addressCodeBytes, 0, 2); |
| | | System.arraycopy(two, 11, addressCodeBytes, 2, 4); |
| | |
| | | |
| | | System.arraycopy(swipeNumbers, 0, data, 2, swipeNumbers.length); |
| | | |
| | | byte[] electricityPrices = HexUtil.hexToByteArray(HexUtil.folatToHexString(electricityPrice)); |
| | | byte[] electricityPrices = HexUtil.hexToByteArray(HexUtil.floatToHexLowHigh(electricityPrice)); |
| | | |
| | | System.arraycopy(electricityPrices, 0, data, 4, electricityPrices.length); |
| | | try { |
| | |
| | | } |
| | | |
| | | |
| | | public short getSwipeNumber() { |
| | | public int getSwipeNumber() { |
| | | return swipeNumber; |
| | | } |
| | | |
| | | public void setSwipeNumber(short swipeNumber) { |
| | | public void setSwipeNumber(int swipeNumber) { |
| | | this.swipeNumber = swipeNumber; |
| | | } |
| | | |