| | |
| | | import com.sandu.ximon.admin.manager.iot.rrpc.mainboard.MainBoardInvokeSyncService; |
| | | import com.sandu.ximon.dao.domain.C3mCharging; |
| | | import com.sandu.ximon.dao.domain.C3mChargingCharge; |
| | | import com.sandu.ximon.dao.domain.PoleBinding; |
| | | import com.sandu.ximon.dao.mapper.C3mChargingMapper; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | public class C3ChargingService extends BaseServiceImpl<C3mChargingMapper, C3mCharging> { |
| | | |
| | | private final C3mChargingChargeService c3mChargingChargeService; |
| | | private final PoleBindingService bindingService; |
| | | |
| | | /** |
| | | * 保存上报C3充电设备心跳数据 |
| | |
| | | throw new BusinessException("数据校验错误,请重新请求"); |
| | | } |
| | | } |
| | | |
| | | public C3mCharging getC3mByPoleId(Long poleId) { |
| | | PoleBinding one = bindingService.getOne(Wrappers.lambdaQuery(PoleBinding.class).eq(PoleBinding::getDeviceType, 2).eq(PoleBinding::getPoleId, poleId)); |
| | | if (one == null) { |
| | | throw new BusinessException("未找到绑定关系"); |
| | | } |
| | | return getOne(Wrappers.lambdaQuery(C3mCharging.class).eq(C3mCharging::getC3Mac, one.getDeviceCode())); |
| | | } |
| | | } |