| | |
| | | public boolean updateReportState(String deviceName, String c3Mac, String statusBit, String deviceTemperature) { |
| | | C3mCharging one = getOne(Wrappers.lambdaQuery(C3mCharging.class).eq(C3mCharging::getPoleDevicesCode, deviceName)); |
| | | if (one != null) { |
| | | one.setStatusBit(Integer.valueOf(statusBit)); |
| | | // one.setStatusBit(Integer.valueOf(statusBit)); |
| | | one.setDeviceTemperature(deviceTemperature); |
| | | one.setPoleDevicesCode(deviceName); |
| | | one.setC3Mac(c3Mac); |
| | |
| | | * 获取心跳包,判断在线 |
| | | */ |
| | | A5C3HeartbeatReportInnerFrame.HeartBeatDataPackage aPackage = ReadTheHeartbeatPackage(c3Mac); |
| | | if(aPackage == null){ |
| | | if (aPackage == null) { |
| | | LogUtils.error("读取心跳包为空"); |
| | | return false; |
| | | } |
| | |
| | | */ |
| | | String end = EndOfTheSynchronization(c3Mac); |
| | | if (!"操作成功".equals(end)) { |
| | | LogUtils.error("C3同步结束响应结果"+end); |
| | | LogUtils.error("C3同步结束响应结果" + end); |
| | | return false; |
| | | } |
| | | return flag; |
| | |
| | | c3ChargingParam.setKeyword(c3ChargingParam.getKeyword().trim()); |
| | | } |
| | | |
| | | List<C3ChargingBo> c3ChargingBoList |
| | | = c3mChargingMapper.listC3mChargingDto(c3ChargingParam.getKeyword()); |
| | | List<C3ChargingBo> c3ChargingBoList = c3mChargingMapper.listC3mChargingDto(c3ChargingParam.getKeyword()); |
| | | for (C3ChargingBo one : c3ChargingBoList) { |
| | | String s = RedisUtils.getBean().get(C3mRedisConstant.C3_STATUS.getCode() + one.getC3Mac()); |
| | | if(s != null){ |
| | | one.setStatusBit(1); |
| | | }else{ |
| | | one.setStatusBit(0); |
| | | } |
| | | |
| | | } |
| | | return c3ChargingBoList; |
| | | } |
| | | |
| | |
| | | } |
| | | return getOne(Wrappers.lambdaQuery(C3mCharging.class).eq(C3mCharging::getC3Mac, one.getDeviceCode())); |
| | | } |
| | | |
| | | |
| | | |
| | | } |