| | |
| | | if(cvo.flowNo.length() != 12){ |
| | | throw new Exception("流水号必须是12位数字") ; |
| | | } |
| | | byte[] bs = new byte[34] ; |
| | | byte[] bs = new byte[40] ; |
| | | int index = 0 ; |
| | | bs[index] = (byte)(Integer.parseInt(cvo.controllerType, 16)); |
| | | |
| | |
| | | bs[index++] = 0 ; |
| | | } |
| | | } |
| | | if(cvo.chargeMoney != null){ |
| | | String chargeMoney = "" + (Double.valueOf(cvo.chargeWater * 100)).longValue() ; |
| | | byte[] bTemp = ByteUtil.string2BCD_LE(chargeMoney) ; |
| | | if(cvo.chargeWater != null){ |
| | | String chargeWater = "" + (Double.valueOf(cvo.chargeWater * 100)).longValue() ; |
| | | byte[] bTemp = ByteUtil.string2BCD_LE(chargeWater) ; |
| | | int bTempLen = bTemp.length ; |
| | | int count = 0 ; |
| | | for(int i = 0 ; i < bTempLen; i++){ |
| | |
| | | ByteUtil.string2BCD_BE(bs, cvo.flowNo, index) ; |
| | | |
| | | index += 6 ; |
| | | GlCreate.createDt(bs, index); |
| | | |
| | | index += 6 ; |
| | | GlCreate.createPw(bs, index); |
| | | |
| | | index += 2 ; |