mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 19:15:35 +08:00
同步获取响应数据
This commit is contained in:
@@ -78,7 +78,7 @@ public class TempController extends BaseController {
|
||||
*/
|
||||
@PostMapping("/proofreadTimeTest")
|
||||
public AjaxResult proofreadTimeTest(@RequestBody QueryPileDTO queryPileDTO) {
|
||||
pileRemoteService.proofreadTimeTest(queryPileDTO.getPileSn());
|
||||
pileRemoteService.proofreadTime(queryPileDTO.getPileSn());
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
|
||||
@@ -151,16 +151,6 @@ public class PileRemoteService {
|
||||
ykcPushCommandService.pushProofreadTimeCommand(command);
|
||||
}
|
||||
|
||||
|
||||
public void proofreadTimeTest(String pileSn) {
|
||||
ProofreadTimeCommand command = ProofreadTimeCommand.builder().pileSn(pileSn).build();
|
||||
try {
|
||||
ykcPushCommandService.pushProofreadTimeCommandTest(command);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 下发充电桩计费模型
|
||||
*/
|
||||
|
||||
@@ -84,5 +84,4 @@ public interface YKCPushCommandService {
|
||||
*/
|
||||
void pushReservationChargingCommand(ReservationChargingCommand command);
|
||||
|
||||
void pushProofreadTimeCommandTest(ProofreadTimeCommand command) throws Exception;
|
||||
}
|
||||
|
||||
@@ -401,24 +401,6 @@ public class YKCPushCommandServiceImpl implements YKCPushCommandService {
|
||||
log.info("[充电桩:{}对时, 时间:{}, CP56Time2a:{}]", pileSn, DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, date), BytesUtil.binary(dateBytes, 16));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void pushProofreadTimeCommandTest(ProofreadTimeCommand command) throws Exception {
|
||||
String pileSn = command.getPileSn();
|
||||
byte[] pileSnByteArr = BytesUtil.str2Bcd(pileSn);
|
||||
|
||||
// 时间
|
||||
Date date = DateUtils.parseDate(DateUtils.getDateTime());
|
||||
byte[] dateBytes = Cp56Time2aUtil.date2Hbyte(date);
|
||||
|
||||
// 拼装msg
|
||||
byte[] msg = Bytes.concat(pileSnByteArr, dateBytes);
|
||||
|
||||
byte[] bytes = this.send(msg, pileSn, YKCFrameTypeCode.TIME_CHECK_SETTING_CODE);
|
||||
log.info("[充电桩:{}对时, 时间:{}, CP56Time2a:{}], 响应:{}",
|
||||
pileSn, DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, date), BytesUtil.binary(dateBytes, 16), BytesUtil.binary(bytes, 16));
|
||||
}
|
||||
|
||||
/**
|
||||
* 向充电桩发送计费模板
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user