| | |
| | | BaseResult baseResult = requestCheck(false, baseRequest, request); |
| | | if(0 != baseResult.getRet()){ |
| | | baseResult.setData(""); |
| | | baseResult.setSig(TCECUtil.buildSign(baseResult)); |
| | | baseResult.setSig(TCECUtil.ourBuildSign(baseResult)); |
| | | return baseResult; |
| | | } |
| | | QueryTokenResult queryTokenResult = new QueryTokenResult(); |
| | |
| | | queryTokenResult.setFailReason(1); |
| | | //参数加密 |
| | | String jsonString = JSON.toJSONString(queryTokenResult); |
| | | String encrypt = AESUtil.encrypt(jsonString, operator.getDataSecret(), operator.getDataSecretIv()); |
| | | String encrypt = AESUtil.encrypt(jsonString, operator.getOurDataSecret(), operator.getOurDataSecretIv()); |
| | | baseResult.setData(encrypt); |
| | | baseResult.setSig(TCECUtil.buildSign(baseResult)); |
| | | baseResult.setSig(TCECUtil.ourBuildSign(baseResult)); |
| | | return baseResult; |
| | | } |
| | | |
| | |
| | | queryTokenResult.setFailReason(2); |
| | | //参数加密 |
| | | String jsonString = JSON.toJSONString(queryTokenResult); |
| | | String encrypt = AESUtil.encrypt(jsonString, operator.getDataSecret(), operator.getDataSecretIv()); |
| | | String encrypt = AESUtil.encrypt(jsonString, operator.getOurDataSecret(), operator.getOurDataSecretIv()); |
| | | baseResult.setData(encrypt); |
| | | baseResult.setSig(TCECUtil.buildSign(baseResult)); |
| | | baseResult.setSig(TCECUtil.ourBuildSign(baseResult)); |
| | | return baseResult; |
| | | } |
| | | |
| | |
| | | queryTokenResult.setTokenAvailableTime(expires_in * 60); |
| | | //参数加密 |
| | | String jsonString = JSON.toJSONString(queryTokenResult); |
| | | String encrypt = AESUtil.encrypt(jsonString, operator.getDataSecret(), operator.getDataSecretIv()); |
| | | String encrypt = AESUtil.encrypt(jsonString, operator.getOurDataSecret(), operator.getOurDataSecretIv()); |
| | | baseResult.setData(encrypt); |
| | | baseResult.setSig(TCECUtil.buildSign(baseResult)); |
| | | baseResult.setSig(TCECUtil.ourBuildSign(baseResult)); |
| | | return baseResult; |
| | | } |
| | | |
| | |
| | | BaseResult baseResult = requestCheck(true, baseRequest, request); |
| | | if(0 != baseResult.getRet()){ |
| | | baseResult.setData(""); |
| | | baseResult.setSig(TCECUtil.buildSign(baseResult)); |
| | | baseResult.setSig(TCECUtil.ourBuildSign(baseResult)); |
| | | return baseResult; |
| | | } |
| | | Operator operator = baseResult.getOperator(); |
| | |
| | | queryStationsInfoResult.setStationInfos(buildSite(parkingLots, siteListPaging.getRecords())); |
| | | //参数加密 |
| | | String jsonString = JSON.toJSONString(queryStationsInfoResult); |
| | | String encrypt = AESUtil.encrypt(jsonString, operator.getDataSecret(), operator.getDataSecretIv()); |
| | | String encrypt = AESUtil.encrypt(jsonString, operator.getOurDataSecret(), operator.getOurDataSecretIv()); |
| | | baseResult.setData(encrypt); |
| | | baseResult.setSig(TCECUtil.buildSign(baseResult)); |
| | | baseResult.setSig(TCECUtil.ourBuildSign(baseResult)); |
| | | return baseResult; |
| | | } |
| | | |
| | |
| | | BaseResult baseResult = requestCheck(true, baseRequest, request); |
| | | if(0 != baseResult.getRet()){ |
| | | baseResult.setData(""); |
| | | baseResult.setSig(TCECUtil.buildSign(baseResult)); |
| | | baseResult.setSig(TCECUtil.ourBuildSign(baseResult)); |
| | | return baseResult; |
| | | } |
| | | Operator operator = baseResult.getOperator(); |
| | |
| | | result.setStationStatusInfos(StationStatusInfos); |
| | | //参数加密 |
| | | String jsonString = JSON.toJSONString(result); |
| | | String encrypt = AESUtil.encrypt(jsonString, operator.getDataSecret(), operator.getDataSecretIv()); |
| | | String encrypt = AESUtil.encrypt(jsonString, operator.getOurDataSecret(), operator.getOurDataSecretIv()); |
| | | baseResult.setData(encrypt); |
| | | baseResult.setSig(TCECUtil.buildSign(baseResult)); |
| | | baseResult.setSig(TCECUtil.ourBuildSign(baseResult)); |
| | | return baseResult; |
| | | } |
| | | |
| | |
| | | BaseResult baseResult = requestCheck(true, baseRequest, request); |
| | | if(0 != baseResult.getRet()){ |
| | | baseResult.setData(""); |
| | | baseResult.setSig(TCECUtil.buildSign(baseResult)); |
| | | baseResult.setSig(TCECUtil.ourBuildSign(baseResult)); |
| | | return baseResult; |
| | | } |
| | | Operator operator = baseResult.getOperator(); |
| | |
| | | result.setStationStats(stationStats); |
| | | //参数加密 |
| | | String jsonString = JSON.toJSONString(result); |
| | | String encrypt = AESUtil.encrypt(jsonString, operator.getDataSecret(), operator.getDataSecretIv()); |
| | | String encrypt = AESUtil.encrypt(jsonString, operator.getOurDataSecret(), operator.getOurDataSecretIv()); |
| | | baseResult.setData(encrypt); |
| | | baseResult.setSig(TCECUtil.buildSign(baseResult)); |
| | | baseResult.setSig(TCECUtil.ourBuildSign(baseResult)); |
| | | return baseResult; |
| | | } |
| | | |
| | |
| | | BaseResult baseResult = requestCheck(true, baseRequest, request); |
| | | if(0 != baseResult.getRet()){ |
| | | baseResult.setData(""); |
| | | baseResult.setSig(TCECUtil.buildSign(baseResult)); |
| | | baseResult.setSig(TCECUtil.ourBuildSign(baseResult)); |
| | | return baseResult; |
| | | } |
| | | Operator operator = baseResult.getOperator(); |
| | |
| | | } |
| | | //参数加密 |
| | | String jsonString = JSON.toJSONString(queryEquipAuthResult); |
| | | String encrypt = AESUtil.encrypt(jsonString, operator.getDataSecret(), operator.getDataSecretIv()); |
| | | String encrypt = AESUtil.encrypt(jsonString, operator.getOurDataSecret(), operator.getOurDataSecretIv()); |
| | | baseResult.setData(encrypt); |
| | | baseResult.setSig(TCECUtil.buildSign(baseResult)); |
| | | baseResult.setSig(TCECUtil.ourBuildSign(baseResult)); |
| | | return baseResult; |
| | | } |
| | | |
| | |
| | | BaseResult baseResult = requestCheck(true, baseRequest, request); |
| | | if(0 != baseResult.getRet()){ |
| | | baseResult.setData(""); |
| | | baseResult.setSig(TCECUtil.buildSign(baseResult)); |
| | | baseResult.setSig(TCECUtil.ourBuildSign(baseResult)); |
| | | return baseResult; |
| | | } |
| | | Operator operator = baseResult.getOperator(); |
| | |
| | | baseResult.setMsg("connectorID 参数无效"); |
| | | //参数加密 |
| | | String jsonString = JSON.toJSONString(queryEquipBusinessPolicyResult); |
| | | String encrypt = AESUtil.encrypt(jsonString, operator.getDataSecret(), operator.getDataSecretIv()); |
| | | String encrypt = AESUtil.encrypt(jsonString, operator.getOurDataSecret(), operator.getOurDataSecretIv()); |
| | | baseResult.setData(encrypt); |
| | | baseResult.setSig(TCECUtil.buildSign(baseResult)); |
| | | baseResult.setSig(TCECUtil.ourBuildSign(baseResult)); |
| | | return baseResult; |
| | | } |
| | | Integer accountingStrategyId = tChargingGun.getAccountingStrategyId(); |
| | |
| | | queryEquipBusinessPolicyResult.setSumPeriod(0); |
| | | //参数加密 |
| | | String jsonString = JSON.toJSONString(queryEquipBusinessPolicyResult); |
| | | String encrypt = AESUtil.encrypt(jsonString, operator.getDataSecret(), operator.getDataSecretIv()); |
| | | String encrypt = AESUtil.encrypt(jsonString, operator.getOurDataSecret(), operator.getOurDataSecretIv()); |
| | | baseResult.setData(encrypt); |
| | | baseResult.setSig(TCECUtil.buildSign(baseResult)); |
| | | baseResult.setSig(TCECUtil.ourBuildSign(baseResult)); |
| | | return baseResult; |
| | | } |
| | | List<PolicyInfo> PolicyInfos = new ArrayList<>(); |
| | |
| | | queryEquipBusinessPolicyResult.setPolicyInfos(PolicyInfos); |
| | | //参数加密 |
| | | String jsonString = JSON.toJSONString(queryEquipBusinessPolicyResult); |
| | | String encrypt = AESUtil.encrypt(jsonString, operator.getDataSecret(), operator.getDataSecretIv()); |
| | | String encrypt = AESUtil.encrypt(jsonString, operator.getOurDataSecret(), operator.getOurDataSecretIv()); |
| | | baseResult.setData(encrypt); |
| | | baseResult.setSig(TCECUtil.buildSign(baseResult)); |
| | | baseResult.setSig(TCECUtil.ourBuildSign(baseResult)); |
| | | return baseResult; |
| | | } |
| | | |
| | |
| | | BaseResult baseResult = requestCheck(true, baseRequest, request); |
| | | if(0 != baseResult.getRet()){ |
| | | baseResult.setData(""); |
| | | baseResult.setSig(TCECUtil.buildSign(baseResult)); |
| | | baseResult.setSig(TCECUtil.ourBuildSign(baseResult)); |
| | | return baseResult; |
| | | } |
| | | Operator operator = baseResult.getOperator(); |
| | |
| | | result.setStartChargeSeqStat(5); |
| | | //参数加密 |
| | | String jsonString = JSON.toJSONString(result); |
| | | String encrypt = AESUtil.encrypt(jsonString, operator.getDataSecret(), operator.getDataSecretIv()); |
| | | String encrypt = AESUtil.encrypt(jsonString, operator.getOurDataSecret(), operator.getOurDataSecretIv()); |
| | | baseResult.setData(encrypt); |
| | | baseResult.setSig(TCECUtil.buildSign(baseResult)); |
| | | baseResult.setSig(TCECUtil.ourBuildSign(baseResult)); |
| | | return baseResult; |
| | | } |
| | | //设备离线 |
| | |
| | | result.setStartChargeSeqStat(5); |
| | | //参数加密 |
| | | String jsonString = JSON.toJSONString(result); |
| | | String encrypt = AESUtil.encrypt(jsonString, operator.getDataSecret(), operator.getDataSecretIv()); |
| | | String encrypt = AESUtil.encrypt(jsonString, operator.getOurDataSecret(), operator.getOurDataSecretIv()); |
| | | baseResult.setData(encrypt); |
| | | baseResult.setSig(TCECUtil.buildSign(baseResult)); |
| | | baseResult.setSig(TCECUtil.ourBuildSign(baseResult)); |
| | | return baseResult; |
| | | } |
| | | //调用充电接口 |
| | |
| | | result.setStartChargeSeqStat(2); |
| | | //参数加密 |
| | | String jsonString = JSON.toJSONString(result); |
| | | String encrypt = AESUtil.encrypt(jsonString, operator.getDataSecret(), operator.getDataSecretIv()); |
| | | String encrypt = AESUtil.encrypt(jsonString, operator.getOurDataSecret(), operator.getOurDataSecretIv()); |
| | | baseResult.setData(encrypt); |
| | | baseResult.setSig(TCECUtil.buildSign(baseResult)); |
| | | baseResult.setSig(TCECUtil.ourBuildSign(baseResult)); |
| | | return baseResult; |
| | | } |
| | | result.setStartChargeSeqStat(1); |
| | |
| | | result.setFailReason(0); |
| | | //参数加密 |
| | | String jsonString = JSON.toJSONString(result); |
| | | String encrypt = AESUtil.encrypt(jsonString, operator.getDataSecret(), operator.getDataSecretIv()); |
| | | String encrypt = AESUtil.encrypt(jsonString, operator.getOurDataSecret(), operator.getOurDataSecretIv()); |
| | | baseResult.setData(encrypt); |
| | | baseResult.setSig(TCECUtil.buildSign(baseResult)); |
| | | baseResult.setSig(TCECUtil.ourBuildSign(baseResult)); |
| | | return baseResult; |
| | | } |
| | | |
| | |
| | | BaseResult baseResult = requestCheck(true, baseRequest, request); |
| | | if(0 != baseResult.getRet()){ |
| | | baseResult.setData(""); |
| | | baseResult.setSig(TCECUtil.buildSign(baseResult)); |
| | | baseResult.setSig(TCECUtil.ourBuildSign(baseResult)); |
| | | return baseResult; |
| | | } |
| | | Operator operator = baseResult.getOperator(); |
| | |
| | | QueryEquipChargeStatusResult queryEquipChargeStatusResult = buildQueryEquipChargeStatusResult(queryEquipChargeStatus.getStartChargeSeq()); |
| | | //参数加密 |
| | | String jsonString = JSON.toJSONString(queryEquipChargeStatusResult); |
| | | String encrypt = AESUtil.encrypt(jsonString, operator.getDataSecret(), operator.getDataSecretIv()); |
| | | String encrypt = AESUtil.encrypt(jsonString, operator.getOurDataSecret(), operator.getOurDataSecretIv()); |
| | | baseResult.setData(encrypt); |
| | | baseResult.setSig(TCECUtil.buildSign(baseResult)); |
| | | baseResult.setSig(TCECUtil.ourBuildSign(baseResult)); |
| | | return baseResult; |
| | | } |
| | | |
| | |
| | | BaseResult baseResult = requestCheck(true, baseRequest, request); |
| | | if(0 != baseResult.getRet()){ |
| | | baseResult.setData(""); |
| | | baseResult.setSig(TCECUtil.buildSign(baseResult)); |
| | | baseResult.setSig(TCECUtil.ourBuildSign(baseResult)); |
| | | return baseResult; |
| | | } |
| | | Operator operator = baseResult.getOperator(); |
| | |
| | | queryStopChargeResult.setFailReason(3); |
| | | //参数加密 |
| | | String jsonString = JSON.toJSONString(queryStopChargeResult); |
| | | String encrypt = AESUtil.encrypt(jsonString, operator.getDataSecret(), operator.getDataSecretIv()); |
| | | String encrypt = AESUtil.encrypt(jsonString, operator.getOurDataSecret(), operator.getOurDataSecretIv()); |
| | | baseResult.setData(encrypt); |
| | | baseResult.setSig(TCECUtil.buildSign(baseResult)); |
| | | baseResult.setSig(TCECUtil.ourBuildSign(baseResult)); |
| | | return baseResult; |
| | | } |
| | | //参数加密 |
| | | String jsonString = JSON.toJSONString(queryStopChargeResult); |
| | | String encrypt = AESUtil.encrypt(jsonString, operator.getDataSecret(), operator.getDataSecretIv()); |
| | | String encrypt = AESUtil.encrypt(jsonString, operator.getOurDataSecret(), operator.getOurDataSecretIv()); |
| | | baseResult.setData(encrypt); |
| | | baseResult.setSig(TCECUtil.buildSign(baseResult)); |
| | | baseResult.setSig(TCECUtil.ourBuildSign(baseResult)); |
| | | return baseResult; |
| | | } |
| | | |
| | |
| | | BaseResult baseResult = requestCheck(true, baseRequest, request); |
| | | if(0 != baseResult.getRet()){ |
| | | baseResult.setData(""); |
| | | baseResult.setSig(TCECUtil.buildSign(baseResult)); |
| | | baseResult.setSig(TCECUtil.ourBuildSign(baseResult)); |
| | | return baseResult; |
| | | } |
| | | Operator operator = baseResult.getOperator(); |
| | |
| | | |
| | | //参数加密 |
| | | String jsonString = JSON.toJSONString(queryTerminalCodeResult); |
| | | String encrypt = AESUtil.encrypt(jsonString, operator.getDataSecret(), operator.getDataSecretIv()); |
| | | String encrypt = AESUtil.encrypt(jsonString, operator.getOurDataSecret(), operator.getOurDataSecretIv()); |
| | | baseResult.setData(encrypt); |
| | | baseResult.setSig(TCECUtil.buildSign(baseResult)); |
| | | baseResult.setSig(TCECUtil.ourBuildSign(baseResult)); |
| | | return baseResult; |
| | | } |
| | | |
| | |
| | | BaseResult baseResult = requestCheck(true, baseRequest, request); |
| | | if(0 != baseResult.getRet()){ |
| | | baseResult.setData(""); |
| | | baseResult.setSig(TCECUtil.buildSign(baseResult)); |
| | | baseResult.setSig(TCECUtil.ourBuildSign(baseResult)); |
| | | return baseResult; |
| | | } |
| | | Operator operator = baseResult.getOperator(); |
| | |
| | | QueryChargeOrderInfoResult result = buildQueryChargeOrderInfoResult(queryChargeOrderInfo); |
| | | //参数加密 |
| | | String jsonString = JSON.toJSONString(result); |
| | | String encrypt = AESUtil.encrypt(jsonString, operator.getDataSecret(), operator.getDataSecretIv()); |
| | | String encrypt = AESUtil.encrypt(jsonString, operator.getOurDataSecret(), operator.getOurDataSecretIv()); |
| | | baseResult.setData(encrypt); |
| | | baseResult.setSig(TCECUtil.buildSign(baseResult)); |
| | | baseResult.setSig(TCECUtil.ourBuildSign(baseResult)); |
| | | return baseResult; |
| | | } |
| | | |