| | |
| | | |
| | | if (codeRequestFrame.isValidate()) { |
| | | if (deviceName != null) { |
| | | C3mCharging c3mCharging = SpringContextHolder.getBean(C3ChargingService.class). |
| | | getOne(Wrappers.lambdaQuery(C3mCharging.class).eq(C3mCharging::getC3Mac, codeRequestFrame.getDestinationAddress()).last("limit 1")); |
| | | if (c3mCharging == null) { |
| | | SpringContextHolder.getBean(C3ChargingService.class).saveReporEquipment(deviceName, codeRequestFrame.getMcuUdid(), codeRequestFrame.getDestinationAddress()); |
| | | } |
| | | // C3mCharging c3mCharging = SpringContextHolder.getBean(C3ChargingService.class). |
| | | // getOne(Wrappers.lambdaQuery(C3mCharging.class).eq(C3mCharging::getC3Mac, codeRequestFrame.getDestinationAddress()).last("limit 1")); |
| | | // if (c3mCharging == null) { |
| | | // SpringContextHolder.getBean(C3ChargingService.class).saveReporEquipment(deviceName, codeRequestFrame.getMcuUdid(), codeRequestFrame.getDestinationAddress()); |
| | | // } |
| | | |
| | | //设置二维码 |
| | | Pole pole = SpringContextHolder.getBean(PoleService.class).getOne(Wrappers.lambdaQuery(Pole.class).eq(Pole::getDeviceCode, deviceName)); |
| | |
| | | /** |
| | | * 保存C3充电桩故障数据 |
| | | */ |
| | | if (errorCodeRequestFrame.isValidate() && (errorCodeRequestFrame.getErrorCode() != 0)) { |
| | | if (errorCodeRequestFrame.isValidate() && errorCodeRequestFrame.getErrorMessage() != null) { |
| | | SpringContextHolder.getBean(C3mReportErrorService.class).saveReportError(errorCodeRequestFrame); |
| | | } else { |
| | | System.out.println("数据校验异常!"); |
| | | } |
| | | |
| | | } else if (C3ChargingEnum.StartCharging.getCode().equals(functionCode)) { |
| | |
| | | lastOrderByC3Mac.setChargingStates(1); |
| | | //设置剩余金额 |
| | | lastOrderByC3Mac.setSurplusAmount(Double.parseDouble(aPackage.getRemainingAmount())); |
| | | lastOrderByC3Mac.setRefundAmount(Double.parseDouble(aPackage.getRemainingAmount())); |
| | | SpringContextHolder.getBean(C3mOrderService.class).updateById(lastOrderByC3Mac); |
| | | } |
| | | } |