| | |
| | | package com.sandu.ximon.admin.controller; |
| | | |
| | | import com.sandu.common.domain.ResponseVO; |
| | | import com.sandu.common.object.BaseConditionVO; |
| | | import com.sandu.common.util.ResponseUtil; |
| | | import com.sandu.ximon.admin.param.C3ChargingParam; |
| | | import com.sandu.ximon.admin.service.C3ChargingService; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | /** |
| | | * @author ZZQ |
| | |
| | | public class C3ChargingController { |
| | | private C3ChargingService c3ChargingService; |
| | | |
| | | |
| | | @GetMapping("/C3ChargingList") |
| | | public ResponseVO<Object> C3ChargingList(BaseConditionVO baseConditionVO) { |
| | | return ResponseUtil.successPage(c3ChargingService.getC3ChargingList(baseConditionVO)); |
| | | } |
| | | |
| | | /** |
| | | * 充电开启 |
| | | */ |
| | |
| | | this.sec = hex.substring(18, 20); |
| | | this.chargingPort = hex.substring(20, 24); |
| | | this.statusBit = hex.substring(24, 26); |
| | | this.deviceTemperature = hex.substring(26, 30); |
| | | this.deviceTemperature = (parseVal(hex, 26, 28) + "." + parseVal(hex, 28, 30)); |
| | | this.gridVoltage = hex.substring(30, 34); |
| | | this.gridCurrent = hex.substring(34, 38); |
| | | this.frequency = hex.substring(38, 42); |
| | |
| | | |
| | | return this; |
| | | } |
| | | |
| | | private Integer parseVal(String frame, int start, int end) { |
| | | return Integer.parseInt(frame.substring(start, end), 16); |
| | | } |
| | | } |
| | | } |
| | |
| | | package com.sandu.ximon.admin.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.github.pagehelper.PageHelper; |
| | | import com.sandu.common.object.BaseConditionVO; |
| | | import com.sandu.common.service.impl.BaseServiceImpl; |
| | | import com.sandu.ximon.admin.manager.iot.frame.A5Frame; |
| | | import com.sandu.ximon.admin.manager.iot.frame.inner.report.A5C3HeartbeatReportInnerFrame; |
| | |
| | | import com.sandu.ximon.dao.mapper.C3mChargingMapper; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author ZZQ |
| | |
| | | } |
| | | |
| | | /** |
| | | * 查询C3充电桩设备列表 |
| | | * |
| | | * @return |
| | | */ |
| | | public List<C3mCharging> getC3ChargingList(BaseConditionVO baseConditionVO) { |
| | | PageHelper.startPage(baseConditionVO.getPageNo(), baseConditionVO.getPageSize()); |
| | | return list(); |
| | | } |
| | | |
| | | /** |
| | | * 开始充电 |
| | | * |
| | | * @param c3Mac |