左晓为主开发手持机充值管理机
zuoxiao
2024-05-09 b8f8323cc39091d3119101923251a0455da87f55
henanlibrary/src/main/java/com/dayu/henanlibrary/card/UserCard.java
@@ -19,7 +19,7 @@
    public int rechargeTimes;//充值次数
    public short swipeNumber;//刷卡次数 一般不用精细管控才用
    public int swipeNumber;//刷卡次数 一般不用精细管控才用
    public float electricityPrice;//电量单价 管理元可以修改
@@ -72,12 +72,14 @@
                    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);
@@ -152,7 +154,7 @@
            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 {
@@ -251,11 +253,11 @@
    }
    public short getSwipeNumber() {
    public int getSwipeNumber() {
        return swipeNumber;
    }
    public void setSwipeNumber(short swipeNumber) {
    public void setSwipeNumber(int swipeNumber) {
        this.swipeNumber = swipeNumber;
    }